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EAAA,CAAA,EACA,IACA,GAAA,EAAA,GAEA,EAGA,GACA,CACA,EACA,AAAA,GAAA,EAAA,EAAA,C6NtSA,e7NwSA,GACA,GACA,2BACA,GACA,WACA,GACA,G6N7SA,iBACA,gBAEA,kBACA,iB7N8SA,EACA,AAAA,GAAA,EAyBA,WACA,OAAA,CACA,EA3BA,CACA,GACA,wBACA,2BACA,EACA,AAAA,GAAA,EAAA,EAAA,C6NnTA,0B7NqTA,GACA,0BACA,GACA,YACA,GACA,cACA,cACA,YACA,cACA,EACA,AAAA,GAAA,EAAA,WACA,IAAA,EAAA,CAAA,CAAA,GAAA,CACA,OAAA,EAAA,EAAA,IAAA,CAAA,IACA,EAAA,CACA,GACA,GACA,CAuBA,EACA,CAkTM,OApBN,EAAA,SAAA,CAAA,wBAAA,CAAA,SAAA,CAAA,EACA,OAAA,IACA,EAkBM,CACN,ID3pBA,IAAM,GAAqB,mBAHvB,SAAS,MAAM,CAAC,KAAK,CAAC,YAAA,wCAA0C,OAAS,IAKzE,KACA,OAAO,WAAW,CAAG,IAAI,GAAoB,CACzC,OAAQ,CACJ,iBAAkB,GAClB,oCAAqC,CAAA,CACzC,CACJ,GAEA,OAAO,WAAW,CAAC,eAAe,GAClC,OAAO,WAAW,CAAC,aAAa,G,C","sources":["","Scripts/ai.js","node_modules/@microsoft/applicationinsights-web/dist-es5/AISku.js","node_modules/@microsoft/dynamicproto-js/dist-es5/DynamicProto.js","node_modules/@microsoft/dynamicproto-js/src/DynamicProto.ts","node_modules/@nevware21/ts-utils/dist-es5/helpers/environment.js","node_modules/@nevware21/ts-utils/src/helpers/environment.ts","node_modules/@nevware21/ts-utils/dist-es5/internal/constants.js","node_modules/@nevware21/ts-utils/src/internal/constants.ts","node_modules/@nevware21/ts-utils/dist-es5/internal/global.js","node_modules/@nevware21/ts-utils/src/internal/global.ts","node_modules/@nevware21/ts-utils/dist-es5/helpers/safe_lazy.js","node_modules/@nevware21/ts-utils/src/helpers/safe_lazy.ts","node_modules/@nevware21/ts-utils/dist-es5/helpers/lazy.js","node_modules/@nevware21/ts-utils/src/helpers/lazy.ts","node_modules/@nevware21/ts-utils/dist-es5/object/define.js","node_modules/@nevware21/ts-utils/src/object/define.ts","node_modules/@nevware21/ts-utils/dist-es5/helpers/base.js","node_modules/@nevware21/ts-utils/src/helpers/base.ts","node_modules/@nevware21/ts-utils/dist-es5/helpers/safe_get.js","node_modules/@nevware21/ts-utils/src/helpers/safe_get.ts","node_modules/@nevware21/ts-utils/dist-es5/object/for_each_key.js","node_modules/@nevware21/ts-utils/src/object/for_each_key.ts","node_modules/@nevware21/ts-utils/dist-es5/object/has_own.js","node_modules/@nevware21/ts-utils/src/object/has_own.ts","node_modules/@nevware21/ts-utils/dist-es5/object/get_own_prop_desc.js","node_modules/@nevware21/ts-utils/src/object/get_own_prop_desc.ts","node_modules/@nevware21/ts-utils/dist-es5/object/has_own_prop.js","node_modules/@nevware21/ts-utils/src/object/has_own_prop.ts","node_modules/@parcel/node-resolver-core/lib/_empty.js","node_modules/@nevware21/ts-utils/dist-es5/helpers/throw.js","node_modules/@nevware21/ts-utils/src/helpers/throw.ts","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/JavaScriptSDK/AnalyticsPlugin.js","node_modules/@microsoft/applicationinsights-shims/dist-es5/TsLibShims.js","node_modules/@microsoft/applicationinsights-shims/src/TsLibShims.ts","node_modules/@nevware21/ts-utils/dist-es5/object/object.js","node_modules/@nevware21/ts-utils/src/object/object.ts","node_modules/@nevware21/ts-utils/dist-es5/polyfills/object.js","node_modules/@nevware21/ts-utils/src/polyfills/object.ts","node_modules/@nevware21/ts-utils/dist-es5/object/create.js","node_modules/@nevware21/ts-utils/src/object/create.ts","node_modules/@nevware21/ts-utils/dist-es5/helpers/diagnostics.js","node_modules/@nevware21/ts-utils/src/helpers/diagnostics.ts","node_modules/@microsoft/applicationinsights-shims/dist-es5/Constants.js","node_modules/@microsoft/applicationinsights-shims/src/Constants.ts","node_modules/@microsoft/applicationinsights-common/dist-es5/applicationinsights-common.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Util.js","node_modules/@nevware21/ts-utils/dist-es5/array/forEach.js","node_modules/@nevware21/ts-utils/src/array/forEach.ts","node_modules/@nevware21/ts-utils/dist-es5/array/indexOf.js","node_modules/@nevware21/ts-utils/src/array/indexOf.ts","node_modules/@nevware21/ts-utils/dist-es5/internal/unwrapFunction.js","node_modules/@nevware21/ts-utils/src/internal/unwrapFunction.ts","node_modules/@nevware21/ts-utils/dist-es5/string/as_string.js","node_modules/@nevware21/ts-utils/src/string/as_string.ts","node_modules/@nevware21/ts-utils/dist-es5/helpers/date.js","node_modules/@nevware21/ts-utils/src/helpers/date.ts","node_modules/@nevware21/ts-utils/dist-es5/helpers/perf.js","node_modules/@nevware21/ts-utils/src/helpers/perf.ts","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/W3cTraceParent.js","node_modules/@nevware21/ts-utils/dist-es5/string/substring.js","node_modules/@nevware21/ts-utils/src/string/substring.ts","node_modules/@nevware21/ts-utils/dist-es5/math/min_max.js","node_modules/@nevware21/ts-utils/src/math/min_max.ts","node_modules/@nevware21/ts-utils/dist-es5/string/slice.js","node_modules/@nevware21/ts-utils/src/string/slice.ts","node_modules/@nevware21/ts-utils/dist-es5/string/trim.js","node_modules/@nevware21/ts-utils/src/string/trim.ts","node_modules/@nevware21/ts-utils/dist-es5/polyfills/trim.js","node_modules/@nevware21/ts-utils/src/polyfills/trim.ts","node_modules/@microsoft/applicationinsights-core-js/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/CoreUtils.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/InternalConstants.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/RandomHelper.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/EnvUtils.js","node_modules/@nevware21/ts-utils/dist-es5/string/index_of.js","node_modules/@nevware21/ts-utils/src/string/index_of.ts","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/HelperFuncs.js","node_modules/@nevware21/ts-utils/dist-es5/object/is_plain_object.js","node_modules/@nevware21/ts-utils/src/object/is_plain_object.ts","node_modules/@nevware21/ts-utils/dist-es5/funcs/fnCall.js","node_modules/@nevware21/ts-utils/src/funcs/fnCall.ts","node_modules/@microsoft/applicationinsights-common/dist-es5/Constants.js","node_modules/@microsoft/applicationinsights-common/dist-es5/RequestResponseHeaders.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK.Enums/EnumHelperFuncs.js","node_modules/@nevware21/ts-utils/dist-es5/helpers/enum.js","node_modules/@nevware21/ts-utils/src/helpers/enum.ts","node_modules/@nevware21/ts-utils/dist-es5/internal/map.js","node_modules/@nevware21/ts-utils/src/internal/map.ts","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Common/DataSanitizer.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/DiagnosticLogger.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/DynamicConfig.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/DataCacheHelper.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/ConfigDefaults.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/DynamicProperty.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/DynamicSupport.js","node_modules/@nevware21/ts-utils/dist-es5/symbol/symbol.js","node_modules/@nevware21/ts-utils/src/symbol/symbol.ts","node_modules/@nevware21/ts-utils/dist-es5/polyfills/symbol.js","node_modules/@nevware21/ts-utils/src/polyfills/symbol.ts","node_modules/@nevware21/ts-utils/dist-es5/symbol/well_known.js","node_modules/@nevware21/ts-utils/src/symbol/well_known.ts","node_modules/@nevware21/ts-utils/dist-es5/string/starts_with.js","node_modules/@nevware21/ts-utils/src/string/starts_with.ts","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/DynamicState.js","node_modules/@nevware21/ts-utils/dist-es5/timer/timeout.js","node_modules/@nevware21/ts-utils/src/timer/timeout.ts","node_modules/@nevware21/ts-utils/dist-es5/array/slice.js","node_modules/@nevware21/ts-utils/src/array/slice.ts","node_modules/@nevware21/ts-utils/dist-es5/funcs/fnApply.js","node_modules/@nevware21/ts-utils/src/funcs/fnApply.ts","node_modules/@nevware21/ts-utils/dist-es5/timer/handler.js","node_modules/@nevware21/ts-utils/src/timer/handler.ts","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/AggregationError.js","node_modules/@nevware21/ts-utils/dist-es5/helpers/customError.js","node_modules/@nevware21/ts-utils/src/helpers/customError.ts","node_modules/@nevware21/ts-utils/dist-es5/object/set_proto.js","node_modules/@nevware21/ts-utils/src/object/set_proto.ts","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/DbgExtensionUtils.js","node_modules/@microsoft/applicationinsights-common/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-common/dist-es5/UrlHelperFuncs.js","node_modules/@microsoft/applicationinsights-common/dist-es5/ConnectionStringParser.js","node_modules/@nevware21/ts-utils/dist-es5/array/reduce.js","node_modules/@nevware21/ts-utils/src/array/reduce.ts","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Common/Envelope.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Event.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Exception.js","node_modules/@nevware21/ts-utils/dist-es5/array/map.js","node_modules/@nevware21/ts-utils/src/array/map.ts","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Metric.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Common/DataPoint.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/PageView.js","node_modules/@microsoft/applicationinsights-common/dist-es5/HelperFuncs.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/RemoteDependencyData.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Trace.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/PageViewPerformance.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Common/Data.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Interfaces/Contracts/ContextTagKeys.js","node_modules/@microsoft/applicationinsights-common/dist-es5/TelemetryItemCreator.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Interfaces/PartAExtensions.js","node_modules/@microsoft/applicationinsights-common/dist-es5/DomHelperFuncs.js","node_modules/@microsoft/applicationinsights-common/dist-es5/StorageHelperFuncs.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Enums.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/BaseTelemetryPlugin.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/ProcessTelemetryContext.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/PerfManager.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/TelemetryHelpers.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/UnloadHandlerContainer.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/UnloadHookContainer.js","node_modules/@nevware21/ts-utils/dist-es5/array/append.js","node_modules/@nevware21/ts-utils/src/array/append.ts","node_modules/@nevware21/ts-utils/dist-es5/iterator/iterator.js","node_modules/@nevware21/ts-utils/src/iterator/iterator.ts","node_modules/@nevware21/ts-utils/dist-es5/iterator/forOf.js","node_modules/@nevware21/ts-utils/src/iterator/forOf.ts","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/ConfigDefaultHelpers.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/EventHelpers.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/InstrumentHooks.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/CookieMgr.js","node_modules/@nevware21/ts-utils/dist-es5/string/ends_with.js","node_modules/@nevware21/ts-utils/src/string/ends_with.ts","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/JavaScriptSDK/Telemetry/PageViewManager.js","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/JavaScriptSDK/Telemetry/PageViewPerformanceManager.js","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/JavaScriptSDK/Telemetry/PageVisitTimeManager.js","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/JavaScriptSDK/Timing.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/Sender.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/AsyncUtils.js","node_modules/@nevware21/ts-async/dist-es5/promise/promise.js","node_modules/@nevware21/ts-async/src/promise/promise.ts","node_modules/@nevware21/ts-async/dist-es5/promise/base.js","node_modules/@nevware21/ts-async/src/promise/base.ts","node_modules/@nevware21/ts-async/dist-es5/promise/await.js","node_modules/@nevware21/ts-async/src/promise/await.ts","node_modules/@nevware21/ts-async/dist-es5/promise/debug.js","node_modules/@nevware21/ts-async/src/promise/debug.ts","node_modules/@nevware21/ts-async/dist-es5/internal/state.js","node_modules/@nevware21/ts-async/src/internal/state.ts","node_modules/@nevware21/ts-async/dist-es5/promise/event.js","node_modules/@nevware21/ts-async/src/promise/event.ts","node_modules/@nevware21/ts-async/dist-es5/internal/constants.js","node_modules/@nevware21/ts-async/src/internal/constants.ts","node_modules/@nevware21/ts-async/dist-es5/promise/nativePromise.js","node_modules/@nevware21/ts-async/src/promise/nativePromise.ts","node_modules/@nevware21/ts-async/dist-es5/promise/asyncPromise.js","node_modules/@nevware21/ts-async/src/promise/asyncPromise.ts","node_modules/@nevware21/ts-async/dist-es5/promise/itemProcessor.js","node_modules/@nevware21/ts-async/src/promise/itemProcessor.ts","node_modules/@nevware21/ts-utils/dist-es5/timer/idle.js","node_modules/@nevware21/ts-utils/src/timer/idle.ts","node_modules/@nevware21/ts-utils/dist-es5/helpers/length.js","node_modules/@nevware21/ts-utils/src/helpers/length.ts","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/EnvelopeCreator.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/InternalConstants.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/Offline.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/SendBuffer.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/Serializer.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/TelemetryProcessors/Sample.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/AppInsightsCore.js","node_modules/@nevware21/ts-utils/dist-es5/helpers/extend.js","node_modules/@nevware21/ts-utils/src/helpers/extend.ts","node_modules/@nevware21/ts-utils/dist-es5/object/copy.js","node_modules/@nevware21/ts-utils/src/object/copy.ts","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/Constants.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/NotificationManager.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/TelemetryInitializerPlugin.js","node_modules/@microsoft/applicationinsights-dependencies-js/dist-es5/ajax.js","node_modules/@microsoft/applicationinsights-dependencies-js/dist-es5/InternalConstants.js","node_modules/@microsoft/applicationinsights-dependencies-js/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-dependencies-js/dist-es5/ajaxRecord.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/PropertiesPlugin.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/TelemetryContext.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/Application.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/Device.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/Internal.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/Location.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/Session.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/TelemetryTrace.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/User.js","node_modules/@microsoft/applicationinsights-web/dist-es5/InternalConstants.js","node_modules/@microsoft/applicationinsights-web/dist-es5/__DynamicConstants.js"],"sourcesContent":["(() => {\n\n var $parcel$global = globalThis;\n /*\n * Application Insights JavaScript SDK - Web, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ // These constants are currently NOT exported directly, we may export them later associated with a frozen namespace (maybe)\n// For now do NOT expect that we will export these values.\nvar $b347daff6f5f8dc1$export$375c5ccc31575c19 = undefined;\nvar $b347daff6f5f8dc1$export$38c7ba05d207d137 = null;\nvar $b347daff6f5f8dc1$export$ccb33e29d92c9a58 = \"\";\nvar $b347daff6f5f8dc1$export$428cfe48a69a3b4f = \"boolean\";\nvar $b347daff6f5f8dc1$export$601fe16600f10158 = \"function\";\nvar $b347daff6f5f8dc1$export$4e8bcd47a31d751c = \"number\";\nvar $b347daff6f5f8dc1$export$8b8a958a7f6f130c = \"object\";\nvar $b347daff6f5f8dc1$export$4ddd10988dd20ff4 = \"prototype\";\nvar $b347daff6f5f8dc1$export$bac6e64dee11e7fb = \"__proto__\";\nvar $b347daff6f5f8dc1$export$a0e01ba2ebef17f2 = \"string\";\nvar $b347daff6f5f8dc1$export$6db089fe7b26f5b6 = \"undefined\";\nvar $b347daff6f5f8dc1$export$943e078395581e44 = \"constructor\";\nvar $b347daff6f5f8dc1$export$27c95a7104c1f7aa = \"Symbol\";\nvar $b347daff6f5f8dc1$export$e674ec9e2c0d330e = \"_polyfill\";\nvar $b347daff6f5f8dc1$export$b2c0731cca6bbbd0 = \"indexOf\";\nvar $b347daff6f5f8dc1$export$ecb956a5faeb2d4a = \"lastIndexOf\";\nvar $b347daff6f5f8dc1$export$5f32d5745d700b0e = \"length\";\nvar $b347daff6f5f8dc1$export$71efb3495f6084f2 = \"done\";\nvar $b347daff6f5f8dc1$export$764bd63f4c2043a2 = \"value\";\nvar $b347daff6f5f8dc1$export$3c5e605ca7ade9f2 = \"name\";\nvar $b347daff6f5f8dc1$export$ddd00fe728e19670 = \"slice\";\nvar $b347daff6f5f8dc1$export$9ec954dd81c90a5d = Object;\nvar $b347daff6f5f8dc1$export$e77bb59b5e655b3d = $b347daff6f5f8dc1$export$9ec954dd81c90a5d[$b347daff6f5f8dc1$export$4ddd10988dd20ff4];\nvar $b347daff6f5f8dc1$export$7ce2e0314415f079 = String;\nvar $b347daff6f5f8dc1$export$a31bd47275edb702 = $b347daff6f5f8dc1$export$7ce2e0314415f079[$b347daff6f5f8dc1$export$4ddd10988dd20ff4];\nvar $b347daff6f5f8dc1$export$dbb682be7aa6edc2 = Math;\nvar $b347daff6f5f8dc1$export$b42fc7fc171852c3 = Array;\nvar $b347daff6f5f8dc1$export$f3f471c81a14426 = $b347daff6f5f8dc1$export$b42fc7fc171852c3[$b347daff6f5f8dc1$export$4ddd10988dd20ff4];\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nvar $6b9be1171d21f18a$var$GLOBAL_CONFIG_KEY = \"__tsUtils$gblCfg\";\nvar $6b9be1171d21f18a$var$_globalCfg;\nfunction $6b9be1171d21f18a$export$141de058bfcfe74() {\n var result;\n if (typeof globalThis !== (0, $b347daff6f5f8dc1$export$6db089fe7b26f5b6)) result = globalThis;\n if (!result && typeof self !== (0, $b347daff6f5f8dc1$export$6db089fe7b26f5b6)) result = self;\n if (!result && typeof window !== (0, $b347daff6f5f8dc1$export$6db089fe7b26f5b6)) result = window;\n if (!result && typeof $parcel$global !== (0, $b347daff6f5f8dc1$export$6db089fe7b26f5b6)) result = $parcel$global;\n return result;\n}\nfunction $6b9be1171d21f18a$export$8a1a74f726f2b336() {\n if (!$6b9be1171d21f18a$var$_globalCfg) {\n var gbl = $6b9be1171d21f18a$export$141de058bfcfe74() || {};\n $6b9be1171d21f18a$var$_globalCfg = gbl[$6b9be1171d21f18a$var$GLOBAL_CONFIG_KEY] = gbl[$6b9be1171d21f18a$var$GLOBAL_CONFIG_KEY] || {};\n }\n return $6b9be1171d21f18a$var$_globalCfg;\n}\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /**\r\n * Function to safely execute a callback function, if the function throws the provided default\r\n * value will be returned.\r\n * @since 0.9.5\r\n * @group Safe\r\n * @param cb - Callback function be wrapped with an exception\r\n * @param defValue - The default value to return when an exception is thrown\r\n * @returns The result of the callback function or the default if an exception occurred calling the callback\r\n * function.\r\n * @example\r\n * ```ts\r\n * let theExpression = \"{ invalid: json value\";\r\n *\r\n * let result = safeGet(() => {\r\n * return JSON.parse(theExpression);\r\n * }, {});\r\n *\r\n * // result === {};\r\n * ```\r\n */ function $ab7fdd65453f0d9e$export$e51ae4db7b428f67(cb, defValue) {\n var result = defValue;\n try {\n result = cb();\n } catch (e) {\n // Do nothing\n }\n return result;\n}\n\n\nvar $533f826bbc418791$var$PRIMITIVE_TYPES = [\n (0, $b347daff6f5f8dc1$export$a0e01ba2ebef17f2),\n (0, $b347daff6f5f8dc1$export$4e8bcd47a31d751c),\n (0, $b347daff6f5f8dc1$export$428cfe48a69a3b4f),\n (0, $b347daff6f5f8dc1$export$6db089fe7b26f5b6),\n \"symbol\",\n \"bigint\"\n];\nfunction $533f826bbc418791$export$baab46d9fe4a4eef(theType) {\n return function(value) {\n return typeof value === theType;\n };\n}\nfunction $533f826bbc418791$export$76383c610bda195a(theName) {\n var theType = \"[object \" + theName + \"]\";\n return function(value) {\n return !!(value && $533f826bbc418791$export$3cbb80dec8953997(value) === theType);\n };\n}\nfunction $533f826bbc418791$export$3cbb80dec8953997(value) {\n return (0, $b347daff6f5f8dc1$export$e77bb59b5e655b3d).toString.call(value);\n}\nfunction $533f826bbc418791$export$aa336f94d74d9e02(value, theType) {\n return typeof value === theType;\n}\nfunction $533f826bbc418791$export$fce6876652108ab(value) {\n return typeof value === (0, $b347daff6f5f8dc1$export$6db089fe7b26f5b6) || value === (0, $b347daff6f5f8dc1$export$6db089fe7b26f5b6);\n}\nfunction $533f826bbc418791$export$565ef2e4233b16ad(arg) {\n return !$533f826bbc418791$export$4e62c701997796c1(arg);\n}\nfunction $533f826bbc418791$export$bedb7023a7733221(value) {\n return value === (0, $b347daff6f5f8dc1$export$38c7ba05d207d137) || $533f826bbc418791$export$fce6876652108ab(value);\n}\nfunction $533f826bbc418791$export$3388cdee8977b866(value) {\n return value === (0, $b347daff6f5f8dc1$export$38c7ba05d207d137) || !$533f826bbc418791$export$4e62c701997796c1(value);\n}\nfunction $533f826bbc418791$export$4e62c701997796c1(arg) {\n return !!arg || arg !== (0, $b347daff6f5f8dc1$export$375c5ccc31575c19);\n}\nvar $533f826bbc418791$export$c3825b437cbdea5c = function(value) {\n return value === (0, $b347daff6f5f8dc1$export$38c7ba05d207d137) || $533f826bbc418791$export$1f3b27a0956fac0e(typeof value);\n};\nvar $533f826bbc418791$export$1f3b27a0956fac0e = function(theType) {\n return theType !== (0, $b347daff6f5f8dc1$export$8b8a958a7f6f130c) && $533f826bbc418791$var$PRIMITIVE_TYPES.indexOf(theType) !== -1;\n};\nvar $533f826bbc418791$export$844ec244b1367d54 = $533f826bbc418791$export$baab46d9fe4a4eef((0, $b347daff6f5f8dc1$export$a0e01ba2ebef17f2));\nvar $533f826bbc418791$export$f6e2535fb5126e54 = $533f826bbc418791$export$baab46d9fe4a4eef((0, $b347daff6f5f8dc1$export$601fe16600f10158));\nfunction $533f826bbc418791$export$a6cdc56e425d0d0a(value) {\n if (!value && $533f826bbc418791$export$bedb7023a7733221(value)) return false;\n return !!value && typeof value === (0, $b347daff6f5f8dc1$export$8b8a958a7f6f130c);\n}\nvar $533f826bbc418791$export$43bee75e5e14138e = (0, $b347daff6f5f8dc1$export$b42fc7fc171852c3).isArray;\nvar $533f826bbc418791$export$871608497c498473 = $533f826bbc418791$export$76383c610bda195a(\"Date\");\nvar $533f826bbc418791$export$7e4aa119212bc614 = $533f826bbc418791$export$baab46d9fe4a4eef((0, $b347daff6f5f8dc1$export$4e8bcd47a31d751c));\nvar $533f826bbc418791$export$f9ce7b637dfbe238 = $533f826bbc418791$export$baab46d9fe4a4eef((0, $b347daff6f5f8dc1$export$428cfe48a69a3b4f));\nvar $533f826bbc418791$export$49841c62b9eff15 = $533f826bbc418791$export$76383c610bda195a(\"RegExp\");\nvar $533f826bbc418791$export$be78b3111c50efdd = $533f826bbc418791$export$76383c610bda195a(\"File\");\nvar $533f826bbc418791$export$67a42df2b7ab73bc = $533f826bbc418791$export$76383c610bda195a(\"FormData\");\nvar $533f826bbc418791$export$5bcd6e94ed871c88 = $533f826bbc418791$export$76383c610bda195a(\"Blob\");\nvar $533f826bbc418791$export$9dd3754ae86f0017 = $533f826bbc418791$export$76383c610bda195a(\"ArrayBuffer\");\nvar $533f826bbc418791$export$e6127cc7fe7395c3 = $533f826bbc418791$export$76383c610bda195a(\"Error\");\nfunction $533f826bbc418791$export$ae936b9d47e5870e(value) {\n return !!value && $533f826bbc418791$export$f6e2535fb5126e54(value.then);\n}\nvar $533f826bbc418791$export$f5b060c2914b97c8 = $533f826bbc418791$export$ae936b9d47e5870e;\nfunction $533f826bbc418791$export$4369c812aac99591(value) {\n return $533f826bbc418791$export$ae936b9d47e5870e(value) && $533f826bbc418791$export$f6e2535fb5126e54(value.catch);\n}\nfunction $533f826bbc418791$export$5f2b986706b25721(value) {\n return !value || !(0, $ab7fdd65453f0d9e$export$e51ae4db7b428f67)(function() {\n return value && 0 + value;\n }, value);\n}\nfunction $533f826bbc418791$export$8f9cae6546f97a9f(value) {\n // Objects created with no prototype (Object.create(null)) cannot be converted to primitives\n // Which causes this code to throw, additionally just using !! also fails for Boolean objects\n // !!(new Boolean(false)) evaluates to true\n return !(!value || (0, $ab7fdd65453f0d9e$export$e51ae4db7b428f67)(function() {\n return !(value && 0 + value);\n }, !value));\n//return !(!value || !(value && (0 + value)));\n}\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nvar $a1ed021ceb472abb$export$1bd5e8b059facbe9 = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d).getOwnPropertyDescriptor;\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nfunction $78c14fe71626d827$export$d76937f5d45b7158(obj, prop) {\n return obj && (0, $b347daff6f5f8dc1$export$e77bb59b5e655b3d).hasOwnProperty.call(obj, prop);\n}\n\n\nvar $08325aa6d8565cc0$export$34e6b98f73578a9c = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d)[\"hasOwn\"] || $08325aa6d8565cc0$export$9a4df78208de965f;\nfunction $08325aa6d8565cc0$export$9a4df78208de965f(obj, prop) {\n return (0, $78c14fe71626d827$export$d76937f5d45b7158)(obj, prop) || !!(0, $a1ed021ceb472abb$export$1bd5e8b059facbe9)(obj, prop);\n}\n\n\nfunction $45e528077703ac0c$export$aa0705d5774c95d1(theObject, callbackfn, thisArg) {\n if (theObject && (0, $533f826bbc418791$export$a6cdc56e425d0d0a)(theObject)) {\n for(var prop in theObject)if ((0, $08325aa6d8565cc0$export$34e6b98f73578a9c)(theObject, prop)) {\n if (callbackfn.call(thisArg || theObject, prop, theObject[prop]) === -1) break;\n }\n }\n}\n\n\n\n/**\r\n * @internal\r\n * @ignore\r\n * Mapping from ObjDefinePropDescriptor key to PropertyDescriptor key\r\n */ var $d212d948d25f959a$var$propMap = {\n e: \"enumerable\",\n c: \"configurable\",\n v: (0, $b347daff6f5f8dc1$export$764bd63f4c2043a2),\n w: \"writable\",\n g: \"get\",\n s: \"set\"\n};\n/**\r\n * @internal\r\n * @ignore\r\n * Helper to convert ObjDefinePropDescriptor into PropertyDescriptor\r\n * @param value - The prop descriptor to convert\r\n * @returns\r\n */ function $d212d948d25f959a$var$_createProp(value) {\n var prop = {};\n prop[$d212d948d25f959a$var$propMap[\"c\"]] = true;\n prop[$d212d948d25f959a$var$propMap[\"e\"]] = true;\n if (value.l) {\n // Asign a getter function to return the value when requested\n prop.get = function() {\n return value.l.v;\n };\n // If it has a setter then expose it as well\n var desc = (0, $a1ed021ceb472abb$export$1bd5e8b059facbe9)(value.l, \"v\");\n if (desc && desc.set) prop.set = function(newValue) {\n value.l.v = newValue;\n };\n }\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(value, function(key, value) {\n prop[$d212d948d25f959a$var$propMap[key]] = (0, $533f826bbc418791$export$fce6876652108ab)(value) ? prop[$d212d948d25f959a$var$propMap[key]] : value;\n });\n return prop;\n}\nvar $d212d948d25f959a$export$8b8fd4dfd45f6b81 = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d)[\"defineProperty\"];\nvar $d212d948d25f959a$export$aa4c975d12edd698 = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d)[\"defineProperties\"];\nfunction $d212d948d25f959a$export$4f97e7dc4bb3c3bb(target, key, value, configurable, enumerable) {\n var _a;\n return $d212d948d25f959a$export$8b8fd4dfd45f6b81(target, key, $d212d948d25f959a$var$_createProp((_a = {\n e: enumerable,\n c: configurable\n }, _a[(0, $533f826bbc418791$export$f6e2535fb5126e54)(value) ? \"g\" : \"v\"] = value, _a)));\n}\nfunction $d212d948d25f959a$export$5525b807dcec3e1b(target, prop, getProp, setProp, configurable, enumerable) {\n var desc = {\n e: enumerable,\n c: configurable\n };\n if (getProp) desc.g = getProp;\n if (setProp) desc.s = setProp;\n return $d212d948d25f959a$export$8b8fd4dfd45f6b81(target, prop, $d212d948d25f959a$var$_createProp(desc));\n}\nfunction $d212d948d25f959a$export$d0d2ebf910ad6e2(target, key, propDesc) {\n return $d212d948d25f959a$export$8b8fd4dfd45f6b81(target, key, $d212d948d25f959a$var$_createProp(propDesc));\n}\nfunction $d212d948d25f959a$export$343685e498f18ed2(target, propDescMap) {\n var props = {};\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(propDescMap, function(key, value) {\n props[key] = $d212d948d25f959a$var$_createProp(value);\n });\n return $d212d948d25f959a$export$aa4c975d12edd698(target, props);\n}\n\n\nvar $d8ec17546a34ef88$export$2d4a6284764f647f;\nvar $d8ec17546a34ef88$var$_fetchLazyTestHooks = function() {\n $d8ec17546a34ef88$export$2d4a6284764f647f = (0, $6b9be1171d21f18a$export$8a1a74f726f2b336)();\n $d8ec17546a34ef88$var$_fetchLazyTestHooks = (0, $b347daff6f5f8dc1$export$38c7ba05d207d137);\n};\nfunction $d8ec17546a34ef88$export$db98eae15987454c(cb) {\n var lazyValue = {};\n $d8ec17546a34ef88$var$_fetchLazyTestHooks && $d8ec17546a34ef88$var$_fetchLazyTestHooks();\n lazyValue.b = $d8ec17546a34ef88$export$2d4a6284764f647f.lzy;\n (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(lazyValue, \"v\", {\n configurable: true,\n get: function() {\n var result = cb();\n if (!$d8ec17546a34ef88$export$2d4a6284764f647f.lzy) {\n // Just replace the value\n (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(lazyValue, \"v\", {\n value: result\n });\n if (lazyValue.b) delete lazyValue.b;\n }\n if ($d8ec17546a34ef88$export$2d4a6284764f647f.lzy && lazyValue.b !== $d8ec17546a34ef88$export$2d4a6284764f647f.lzy) lazyValue.b = $d8ec17546a34ef88$export$2d4a6284764f647f.lzy;\n return result;\n }\n });\n return lazyValue;\n}\nfunction $d8ec17546a34ef88$export$31f2f77e19969b63(newValue) {\n $d8ec17546a34ef88$var$_fetchLazyTestHooks && $d8ec17546a34ef88$var$_fetchLazyTestHooks();\n $d8ec17546a34ef88$export$2d4a6284764f647f.lzy = newValue;\n}\nfunction $d8ec17546a34ef88$export$5405f984434b2087(cb) {\n var lazyValue = {};\n $d8ec17546a34ef88$var$_fetchLazyTestHooks && $d8ec17546a34ef88$var$_fetchLazyTestHooks();\n lazyValue.b = $d8ec17546a34ef88$export$2d4a6284764f647f.lzy;\n var _setValue = function(newValue) {\n // Just replace the value\n (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(lazyValue, \"v\", {\n value: newValue,\n writable: true\n });\n if (lazyValue.b) delete lazyValue.b;\n };\n (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(lazyValue, \"v\", {\n configurable: true,\n get: function() {\n var result = cb();\n if (!$d8ec17546a34ef88$export$2d4a6284764f647f.lzy) // Just replace the value\n _setValue(result);\n if ($d8ec17546a34ef88$export$2d4a6284764f647f.lzy && lazyValue.b !== $d8ec17546a34ef88$export$2d4a6284764f647f.lzy) lazyValue.b = $d8ec17546a34ef88$export$2d4a6284764f647f.lzy;\n return result;\n },\n set: _setValue\n });\n return lazyValue;\n}\n\n\n\nfunction $f07ca4f3c96b6502$export$c6675fd9042172d2(cb, defValue) {\n return (0, $d8ec17546a34ef88$export$db98eae15987454c)(function() {\n return (0, $ab7fdd65453f0d9e$export$e51ae4db7b428f67)(cb, defValue);\n });\n}\n\n\n\nvar $b364f2cd2faf3e98$exports = {};\n\"use strict\";\n\n\nvar $3d5fcb60a9467a45$var$WINDOW = \"window\";\nvar $3d5fcb60a9467a45$var$_cachedGlobal;\nvar $3d5fcb60a9467a45$var$_cachedWindow;\nvar $3d5fcb60a9467a45$var$_cachedDocument;\nvar $3d5fcb60a9467a45$var$_cachedNavigator;\nvar $3d5fcb60a9467a45$var$_cachedHistory;\nvar $3d5fcb60a9467a45$var$_isWebWorker;\nvar $3d5fcb60a9467a45$var$_isNode;\nvar $3d5fcb60a9467a45$export$45fd08e1bc14fe1c = function(name) {\n return (0, $f07ca4f3c96b6502$export$c6675fd9042172d2)(function() {\n return $3d5fcb60a9467a45$export$3df6e51375017edd(name) || (0, $b347daff6f5f8dc1$export$375c5ccc31575c19);\n }, (0, $b347daff6f5f8dc1$export$375c5ccc31575c19));\n};\nvar $3d5fcb60a9467a45$export$a4e55266d2135a7f = function(useCached) {\n (!$3d5fcb60a9467a45$var$_cachedGlobal || useCached === false || (0, $d8ec17546a34ef88$export$2d4a6284764f647f) && (0, $d8ec17546a34ef88$export$2d4a6284764f647f).lzy && !$3d5fcb60a9467a45$var$_cachedGlobal.b) && ($3d5fcb60a9467a45$var$_cachedGlobal = (0, $f07ca4f3c96b6502$export$c6675fd9042172d2)((0, $6b9be1171d21f18a$export$141de058bfcfe74), (0, $b347daff6f5f8dc1$export$38c7ba05d207d137)));\n return $3d5fcb60a9467a45$var$_cachedGlobal.v;\n};\nvar $3d5fcb60a9467a45$export$3df6e51375017edd = function(name, useCached) {\n var gbl = !$3d5fcb60a9467a45$var$_cachedGlobal || useCached === false ? $3d5fcb60a9467a45$export$a4e55266d2135a7f(useCached) : $3d5fcb60a9467a45$var$_cachedGlobal.v;\n if (gbl && gbl[name]) return gbl[name];\n // Test workaround, for environments where .window (when global == window) doesn't return the base window\n if (name === $3d5fcb60a9467a45$var$WINDOW && $3d5fcb60a9467a45$var$_cachedWindow) // tslint:disable-next-line: no-angle-bracket-type-assertion\n return $3d5fcb60a9467a45$var$_cachedWindow.v;\n return 0, $b347daff6f5f8dc1$export$38c7ba05d207d137;\n};\nvar $3d5fcb60a9467a45$export$c4372eca9c56fe99 = function() {\n return !!$3d5fcb60a9467a45$export$f65ca476c09acec0();\n};\nvar $3d5fcb60a9467a45$export$f65ca476c09acec0 = function() {\n (!$3d5fcb60a9467a45$var$_cachedDocument || (0, $d8ec17546a34ef88$export$2d4a6284764f647f) && (0, $d8ec17546a34ef88$export$2d4a6284764f647f).lzy && !$3d5fcb60a9467a45$var$_cachedDocument.b) && ($3d5fcb60a9467a45$var$_cachedDocument = $3d5fcb60a9467a45$export$45fd08e1bc14fe1c(\"document\"));\n return $3d5fcb60a9467a45$var$_cachedDocument.v;\n};\nvar $3d5fcb60a9467a45$export$fef62134eea24008 = function() {\n return !!$3d5fcb60a9467a45$export$38b2d434cce3ea22();\n};\nvar $3d5fcb60a9467a45$export$38b2d434cce3ea22 = function() {\n (!$3d5fcb60a9467a45$var$_cachedWindow || (0, $d8ec17546a34ef88$export$2d4a6284764f647f) && (0, $d8ec17546a34ef88$export$2d4a6284764f647f).lzy && !$3d5fcb60a9467a45$var$_cachedWindow.b) && ($3d5fcb60a9467a45$var$_cachedWindow = $3d5fcb60a9467a45$export$45fd08e1bc14fe1c($3d5fcb60a9467a45$var$WINDOW));\n return $3d5fcb60a9467a45$var$_cachedWindow.v;\n};\nvar $3d5fcb60a9467a45$export$bd82d106260417bf = function() {\n return !!$3d5fcb60a9467a45$export$a56241c767c1d89f();\n};\nvar $3d5fcb60a9467a45$export$a56241c767c1d89f = function() {\n (!$3d5fcb60a9467a45$var$_cachedNavigator || (0, $d8ec17546a34ef88$export$2d4a6284764f647f) && (0, $d8ec17546a34ef88$export$2d4a6284764f647f).lzy && !$3d5fcb60a9467a45$var$_cachedNavigator.b) && ($3d5fcb60a9467a45$var$_cachedNavigator = $3d5fcb60a9467a45$export$45fd08e1bc14fe1c(\"navigator\"));\n return $3d5fcb60a9467a45$var$_cachedNavigator.v;\n};\nvar $3d5fcb60a9467a45$export$b79afd6d47f11781 = function() {\n return !!$3d5fcb60a9467a45$export$f9582a3c130d9538();\n};\nvar $3d5fcb60a9467a45$export$f9582a3c130d9538 = function() {\n (!$3d5fcb60a9467a45$var$_cachedHistory || (0, $d8ec17546a34ef88$export$2d4a6284764f647f) && (0, $d8ec17546a34ef88$export$2d4a6284764f647f).lzy && !$3d5fcb60a9467a45$var$_cachedHistory.b) && ($3d5fcb60a9467a45$var$_cachedHistory = $3d5fcb60a9467a45$export$45fd08e1bc14fe1c(\"history\"));\n return $3d5fcb60a9467a45$var$_cachedHistory.v;\n};\nvar $3d5fcb60a9467a45$export$8ee0fc9ee280b4ee = function() {\n !$3d5fcb60a9467a45$var$_isNode && ($3d5fcb60a9467a45$var$_isNode = (0, $f07ca4f3c96b6502$export$c6675fd9042172d2)(function() {\n return !!($b364f2cd2faf3e98$exports && ($b364f2cd2faf3e98$exports.versions || {}).node);\n }, false));\n return $3d5fcb60a9467a45$var$_isNode.v;\n};\nvar $3d5fcb60a9467a45$export$97b87b8868ff7a3c = function() {\n !$3d5fcb60a9467a45$var$_isWebWorker && ($3d5fcb60a9467a45$var$_isWebWorker = (0, $f07ca4f3c96b6502$export$c6675fd9042172d2)(function() {\n return !!(self && self instanceof WorkerGlobalScope);\n }, false));\n return $3d5fcb60a9467a45$var$_isWebWorker.v;\n};\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /**\r\n * Throw an error exception with the specified optional message\r\n * @group Error\r\n * @param message\r\n */ function $44a1c24c0e411039$export$8bf7aba4a9e09055(message) {\n throw new Error(message);\n}\nfunction $44a1c24c0e411039$export$3f7738bd7dcba681(message) {\n throw new TypeError(message);\n}\nfunction $44a1c24c0e411039$export$462e4d432290318e(message) {\n throw new RangeError(message);\n}\n\n\nvar $c9b63384299a3252$var$_a;\nvar $c9b63384299a3252$var$UNDEFINED = \"undefined\";\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */ var $c9b63384299a3252$var$Constructor = \"constructor\";\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */ var $c9b63384299a3252$var$Prototype = \"prototype\";\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */ var $c9b63384299a3252$var$strFunction = \"function\";\n/**\r\n * Used to define the name of the instance function lookup table\r\n * @ignore\r\n */ var $c9b63384299a3252$var$DynInstFuncTable = \"_dynInstFuncs\";\n/**\r\n * Name used to tag the dynamic prototype function\r\n * @ignore\r\n */ var $c9b63384299a3252$var$DynProxyTag = \"_isDynProxy\";\n/**\r\n * Name added to a prototype to define the dynamic prototype \"class\" name used to lookup the function table\r\n * @ignore\r\n */ var $c9b63384299a3252$var$DynClassName = \"_dynClass\";\n/**\r\n * Prefix added to the classname to avoid any name clashes with other instance level properties\r\n * @ignore\r\n */ var $c9b63384299a3252$var$DynClassNamePrefix = \"_dynCls$\";\n/**\r\n * A tag which is used to check if we have already to attempted to set the instance function if one is not present\r\n * @ignore\r\n */ var $c9b63384299a3252$var$DynInstChkTag = \"_dynInstChk\";\n/**\r\n * A tag which is used to check if we are allows to try and set an instance function is one is not present. Using the same\r\n * tag name as the function level but a different const name for readability only.\r\n */ var $c9b63384299a3252$var$DynAllowInstChkTag = $c9b63384299a3252$var$DynInstChkTag;\n/**\r\n * The global (imported) instances where the global performance options are stored\r\n */ var $c9b63384299a3252$var$DynProtoDefaultOptions = \"_dfOpts\";\n/**\r\n * Value used as the name of a class when it cannot be determined\r\n * @ignore\r\n */ var $c9b63384299a3252$var$UnknownValue = \"_unknown_\";\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */ var $c9b63384299a3252$var$str__Proto = \"__proto__\";\n/**\r\n * The polyfill version of __proto__ so that it doesn't cause issues for anyone not expecting it to exist\r\n */ var $c9b63384299a3252$var$DynProtoBaseProto = \"_dyn\" + $c9b63384299a3252$var$str__Proto;\n/**\r\n * Runtime Global holder for dynamicProto settings\r\n */ var $c9b63384299a3252$var$DynProtoGlobalSettings = \"__dynProto$Gbl\";\n/**\r\n * Track the current prototype for IE8 as you can't look back to get the prototype\r\n */ var $c9b63384299a3252$var$DynProtoCurrent = \"_dynInstProto\";\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */ var $c9b63384299a3252$var$strUseBaseInst = \"useBaseInst\";\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */ var $c9b63384299a3252$var$strSetInstFuncs = \"setInstFuncs\";\nvar $c9b63384299a3252$var$Obj = Object;\n/**\r\n * Pre-lookup to check if we are running on a modern browser (i.e. not IE8)\r\n * @ignore\r\n */ var $c9b63384299a3252$var$_objGetPrototypeOf = $c9b63384299a3252$var$Obj[\"getPrototypeOf\"];\n/**\r\n * Pre-lookup to check for the existence of this function\r\n */ var $c9b63384299a3252$var$_objGetOwnProps = $c9b63384299a3252$var$Obj[\"getOwnPropertyNames\"];\n// Since 1.1.7 moving these to the runtime global to work around mixed version and module issues\n// See Issue https://github.com/microsoft/DynamicProto-JS/issues/57 for details\nvar $c9b63384299a3252$var$_gbl = (0, $3d5fcb60a9467a45$export$a4e55266d2135a7f)();\nvar $c9b63384299a3252$var$_gblInst = $c9b63384299a3252$var$_gbl[$c9b63384299a3252$var$DynProtoGlobalSettings] || ($c9b63384299a3252$var$_gbl[$c9b63384299a3252$var$DynProtoGlobalSettings] = {\n o: ($c9b63384299a3252$var$_a = {}, $c9b63384299a3252$var$_a[$c9b63384299a3252$var$strSetInstFuncs] = true, $c9b63384299a3252$var$_a[$c9b63384299a3252$var$strUseBaseInst] = true, $c9b63384299a3252$var$_a),\n n: 1000 // Start new global index @ 1000 so we \"fix\" some cases when mixed with 1.1.6 or earlier\n});\n/**\r\n * Helper used to check whether the target is an Object prototype or Array prototype\r\n * @ignore\r\n */ function $c9b63384299a3252$var$_isObjectOrArrayPrototype(target) {\n return target && (target === $c9b63384299a3252$var$Obj[$c9b63384299a3252$var$Prototype] || target === Array[$c9b63384299a3252$var$Prototype]);\n}\n/**\r\n * Helper used to check whether the target is an Object prototype, Array prototype or Function prototype\r\n * @ignore\r\n */ function $c9b63384299a3252$var$_isObjectArrayOrFunctionPrototype(target) {\n return $c9b63384299a3252$var$_isObjectOrArrayPrototype(target) || target === Function[$c9b63384299a3252$var$Prototype];\n}\n/**\r\n * Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.\r\n * @ignore\r\n */ function $c9b63384299a3252$var$_getObjProto(target) {\n var newProto;\n if (target) {\n // This method doesn't exist in older browsers (e.g. IE8)\n if ($c9b63384299a3252$var$_objGetPrototypeOf) return $c9b63384299a3252$var$_objGetPrototypeOf(target);\n var curProto = target[$c9b63384299a3252$var$str__Proto] || target[$c9b63384299a3252$var$Prototype] || (target[$c9b63384299a3252$var$Constructor] ? target[$c9b63384299a3252$var$Constructor][$c9b63384299a3252$var$Prototype] : null);\n // Using the pre-calculated value as IE8 doesn't support looking up the prototype of a prototype and thus fails for more than 1 base class\n newProto = target[$c9b63384299a3252$var$DynProtoBaseProto] || curProto;\n if (!(0, $78c14fe71626d827$export$d76937f5d45b7158)(target, $c9b63384299a3252$var$DynProtoBaseProto)) {\n // As this prototype doesn't have this property then this is from an inherited class so newProto is the base to return so save it\n // so we can look it up value (which for a multiple hierarchy dynamicProto will be the base class)\n delete target[$c9b63384299a3252$var$DynProtoCurrent]; // Delete any current value allocated to this instance so we pick up the value from prototype hierarchy\n newProto = target[$c9b63384299a3252$var$DynProtoBaseProto] = target[$c9b63384299a3252$var$DynProtoCurrent] || target[$c9b63384299a3252$var$DynProtoBaseProto];\n target[$c9b63384299a3252$var$DynProtoCurrent] = curProto;\n }\n }\n return newProto;\n}\n/**\r\n * Helper to get the properties of an object, including none enumerable ones as functions on a prototype in ES6\r\n * are not enumerable.\r\n * @param target\r\n */ function $c9b63384299a3252$var$_forEachProp(target, func) {\n var props = [];\n if ($c9b63384299a3252$var$_objGetOwnProps) props = $c9b63384299a3252$var$_objGetOwnProps(target);\n else {\n for(var name_1 in target)if (typeof name_1 === \"string\" && (0, $78c14fe71626d827$export$d76937f5d45b7158)(target, name_1)) props.push(name_1);\n }\n if (props && props.length > 0) for(var lp = 0; lp < props.length; lp++)func(props[lp]);\n}\n/**\r\n * Helper function to check whether the provided function name is a potential candidate for dynamic\r\n * callback and prototype generation.\r\n * @param target The target object, may be a prototype or class object\r\n * @param funcName The function name\r\n * @param skipOwn Skips the check for own property\r\n * @ignore\r\n */ function $c9b63384299a3252$var$_isDynamicCandidate(target, funcName, skipOwn) {\n return funcName !== $c9b63384299a3252$var$Constructor && typeof target[funcName] === $c9b63384299a3252$var$strFunction && (skipOwn || (0, $78c14fe71626d827$export$d76937f5d45b7158)(target, funcName));\n}\n/**\r\n * Helper to throw a TypeError exception\r\n * @param message the message\r\n * @ignore\r\n */ function $c9b63384299a3252$var$_throwTypeError(message) {\n (0, $44a1c24c0e411039$export$3f7738bd7dcba681)(\"DynamicProto: \" + message);\n}\n/**\r\n * Returns a collection of the instance functions that are defined directly on the thisTarget object, it does\r\n * not return any inherited functions\r\n * @param thisTarget The object to get the instance functions from\r\n * @ignore\r\n */ function $c9b63384299a3252$var$_getInstanceFuncs(thisTarget) {\n // Get the base proto\n var instFuncs = {};\n // Save any existing instance functions\n $c9b63384299a3252$var$_forEachProp(thisTarget, function(name) {\n // Don't include any dynamic prototype instances - as we only want the real functions\n if (!instFuncs[name] && $c9b63384299a3252$var$_isDynamicCandidate(thisTarget, name, false)) // Create an instance callback for passing the base function to the caller\n instFuncs[name] = thisTarget[name];\n });\n return instFuncs;\n}\n/**\r\n * Returns whether the value is included in the array\r\n * @param values The array of values\r\n * @param value The value\r\n */ function $c9b63384299a3252$var$_hasVisited(values, value) {\n for(var lp = values.length - 1; lp >= 0; lp--){\n if (values[lp] === value) return true;\n }\n return false;\n}\n/**\r\n * Returns an object that contains callback functions for all \"base/super\" functions, this is used to \"save\"\r\n * enabling calling super.xxx() functions without requiring that the base \"class\" has defined a prototype references\r\n * @param target The current instance\r\n * @ignore\r\n */ function $c9b63384299a3252$var$_getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {\n function _instFuncProxy(target, funcHost, funcName) {\n var theFunc = funcHost[funcName];\n if (theFunc[$c9b63384299a3252$var$DynProxyTag] && useBaseInst) {\n // grab and reuse the hosted looking function (if available) otherwise the original passed function\n var instFuncTable = target[$c9b63384299a3252$var$DynInstFuncTable] || {};\n if (instFuncTable[$c9b63384299a3252$var$DynAllowInstChkTag] !== false) theFunc = (instFuncTable[funcHost[$c9b63384299a3252$var$DynClassName]] || {})[funcName] || theFunc;\n }\n return function() {\n // eslint-disable-next-line prefer-rest-params\n return theFunc.apply(target, arguments);\n };\n }\n // Start creating a new baseFuncs by creating proxies for the instance functions (as they may get replaced)\n var baseFuncs = {};\n $c9b63384299a3252$var$_forEachProp(instFuncs, function(name) {\n // Create an instance callback for passing the base function to the caller\n baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);\n });\n // Get the base prototype functions\n var baseProto = $c9b63384299a3252$var$_getObjProto(classProto);\n var visited = [];\n // Don't include base object functions for Object, Array or Function\n while(baseProto && !$c9b63384299a3252$var$_isObjectArrayOrFunctionPrototype(baseProto) && !$c9b63384299a3252$var$_hasVisited(visited, baseProto)){\n // look for prototype functions\n $c9b63384299a3252$var$_forEachProp(baseProto, function(name) {\n // Don't include any dynamic prototype instances - as we only want the real functions\n // For IE 7/8 the prototype lookup doesn't provide the full chain so we need to bypass the \n // hasOwnProperty check we get all of the methods, main difference is that IE7/8 doesn't return\n // the Object prototype methods while bypassing the check\n if (!baseFuncs[name] && $c9b63384299a3252$var$_isDynamicCandidate(baseProto, name, !$c9b63384299a3252$var$_objGetPrototypeOf)) // Create an instance callback for passing the base function to the caller\n baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);\n });\n // We need to find all possible functions that might be overloaded by walking the entire prototype chain\n // This avoids the caller from needing to check whether it's direct base class implements the function or not\n // by walking the entire chain it simplifies the usage and issues from upgrading any of the base classes.\n visited.push(baseProto);\n baseProto = $c9b63384299a3252$var$_getObjProto(baseProto);\n }\n return baseFuncs;\n}\nfunction $c9b63384299a3252$var$_getInstFunc(target, funcName, proto, currentDynProtoProxy) {\n var instFunc = null;\n // We need to check whether the class name is defined directly on this prototype otherwise\n // it will walk the proto chain and return any parent proto classname.\n if (target && (0, $78c14fe71626d827$export$d76937f5d45b7158)(proto, $c9b63384299a3252$var$DynClassName)) {\n var instFuncTable = target[$c9b63384299a3252$var$DynInstFuncTable] || {};\n instFunc = (instFuncTable[proto[$c9b63384299a3252$var$DynClassName]] || {})[funcName];\n if (!instFunc) // Avoid stack overflow from recursive calling the same function\n $c9b63384299a3252$var$_throwTypeError(\"Missing [\" + funcName + \"] \" + $c9b63384299a3252$var$strFunction);\n // We have the instance function, lets check it we can speed up further calls\n // by adding the instance function back directly on the instance (avoiding the dynamic func lookup)\n if (!instFunc[$c9b63384299a3252$var$DynInstChkTag] && instFuncTable[$c9b63384299a3252$var$DynAllowInstChkTag] !== false) {\n // If the instance already has an instance function we can't replace it\n var canAddInst = !(0, $78c14fe71626d827$export$d76937f5d45b7158)(target, funcName);\n // Get current prototype\n var objProto = $c9b63384299a3252$var$_getObjProto(target);\n var visited = [];\n // Lookup the function starting at the top (instance level prototype) and traverse down, if the first matching function\n // if nothing is found or if the first hit is a dynamic proto instance then we can safely add an instance shortcut\n while(canAddInst && objProto && !$c9b63384299a3252$var$_isObjectArrayOrFunctionPrototype(objProto) && !$c9b63384299a3252$var$_hasVisited(visited, objProto)){\n var protoFunc = objProto[funcName];\n if (protoFunc) {\n canAddInst = protoFunc === currentDynProtoProxy;\n break;\n }\n // We need to find all possible initial functions to ensure that we don't bypass a valid override function\n visited.push(objProto);\n objProto = $c9b63384299a3252$var$_getObjProto(objProto);\n }\n try {\n if (canAddInst) // This instance doesn't have an instance func and the class hierarchy does have a higher level prototype version\n // so it's safe to directly assign for any subsequent calls (for better performance)\n target[funcName] = instFunc;\n // Block further attempts to set the instance function for any\n instFunc[$c9b63384299a3252$var$DynInstChkTag] = 1;\n } catch (e) {\n // Don't crash if the object is readonly or the runtime doesn't allow changing this\n // And set a flag so we don't try again for any function\n instFuncTable[$c9b63384299a3252$var$DynAllowInstChkTag] = false;\n }\n }\n }\n return instFunc;\n}\nfunction $c9b63384299a3252$var$_getProtoFunc(funcName, proto, currentDynProtoProxy) {\n var protoFunc = proto[funcName];\n // Check that the prototype function is not a self reference -- try to avoid stack overflow!\n if (protoFunc === currentDynProtoProxy) // It is so lookup the base prototype\n protoFunc = $c9b63384299a3252$var$_getObjProto(proto)[funcName];\n if (typeof protoFunc !== $c9b63384299a3252$var$strFunction) $c9b63384299a3252$var$_throwTypeError(\"[\" + funcName + \"] is not a \" + $c9b63384299a3252$var$strFunction);\n return protoFunc;\n}\n/**\r\n * Add the required dynamic prototype methods to the the class prototype\r\n * @param proto - The class prototype\r\n * @param className - The instance classname\r\n * @param target - The target instance\r\n * @param baseInstFuncs - The base instance functions\r\n * @param setInstanceFunc - Flag to allow prototype function to reset the instance function if one does not exist\r\n * @ignore\r\n */ function $c9b63384299a3252$var$_populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {\n function _createDynamicPrototype(proto, funcName) {\n var dynProtoProxy = function() {\n // Use the instance or prototype function\n var instFunc = $c9b63384299a3252$var$_getInstFunc(this, funcName, proto, dynProtoProxy) || $c9b63384299a3252$var$_getProtoFunc(funcName, proto, dynProtoProxy);\n // eslint-disable-next-line prefer-rest-params\n return instFunc.apply(this, arguments);\n };\n // Tag this function as a proxy to support replacing dynamic proxy elements (primary use case is for unit testing\n // via which can dynamically replace the prototype function reference)\n dynProtoProxy[$c9b63384299a3252$var$DynProxyTag] = 1;\n return dynProtoProxy;\n }\n if (!$c9b63384299a3252$var$_isObjectOrArrayPrototype(proto)) {\n var instFuncTable = target[$c9b63384299a3252$var$DynInstFuncTable] = target[$c9b63384299a3252$var$DynInstFuncTable] || {};\n var instFuncs_1 = instFuncTable[className] = instFuncTable[className] || {}; // fetch and assign if as it may not exist yet\n // Set whether we are allow to lookup instances, if someone has set to false then do not re-enable\n if (instFuncTable[$c9b63384299a3252$var$DynAllowInstChkTag] !== false) instFuncTable[$c9b63384299a3252$var$DynAllowInstChkTag] = !!setInstanceFunc;\n $c9b63384299a3252$var$_forEachProp(target, function(name) {\n // Only add overridden functions\n if ($c9b63384299a3252$var$_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {\n // Save the instance Function to the lookup table and remove it from the instance as it's not a dynamic proto function\n instFuncs_1[name] = target[name];\n delete target[name];\n // Add a dynamic proto if one doesn't exist or if a prototype function exists and it's not a dynamic one\n if (!(0, $78c14fe71626d827$export$d76937f5d45b7158)(proto, name) || proto[name] && !proto[name][$c9b63384299a3252$var$DynProxyTag]) proto[name] = _createDynamicPrototype(proto, name);\n }\n });\n }\n}\n/**\r\n * Checks whether the passed prototype object appears to be correct by walking the prototype hierarchy of the instance\r\n * @param classProto The class prototype instance\r\n * @param thisTarget The current instance that will be checked whether the passed prototype instance is in the hierarchy\r\n * @ignore\r\n */ function $c9b63384299a3252$var$_checkPrototype(classProto, thisTarget) {\n // This method doesn't existing in older browsers (e.g. IE8)\n if ($c9b63384299a3252$var$_objGetPrototypeOf) {\n // As this is primarily a coding time check, don't bother checking if running in IE8 or lower\n var visited = [];\n var thisProto = $c9b63384299a3252$var$_getObjProto(thisTarget);\n while(thisProto && !$c9b63384299a3252$var$_isObjectArrayOrFunctionPrototype(thisProto) && !$c9b63384299a3252$var$_hasVisited(visited, thisProto)){\n if (thisProto === classProto) return true;\n // This avoids the caller from needing to check whether it's direct base class implements the function or not\n // by walking the entire chain it simplifies the usage and issues from upgrading any of the base classes.\n visited.push(thisProto);\n thisProto = $c9b63384299a3252$var$_getObjProto(thisProto);\n }\n return false;\n }\n // If objGetPrototypeOf doesn't exist then just assume everything is ok.\n return true;\n}\n/**\r\n * Gets the current prototype name using the ES6 name if available otherwise falling back to a use unknown as the name.\r\n * It's not critical for this to return a name, it's used to decorate the generated unique name for easier debugging only.\r\n * @param target\r\n * @param unknownValue\r\n * @ignore\r\n */ function $c9b63384299a3252$var$_getObjName(target, unknownValue) {\n if ((0, $78c14fe71626d827$export$d76937f5d45b7158)(target, $c9b63384299a3252$var$Prototype)) // Look like a prototype\n return target.name || unknownValue || $c9b63384299a3252$var$UnknownValue;\n return ((target || {})[$c9b63384299a3252$var$Constructor] || {}).name || unknownValue || $c9b63384299a3252$var$UnknownValue;\n}\nfunction $c9b63384299a3252$export$2e2bcd8739ae039(theClass, target, delegateFunc, options) {\n // Make sure that the passed theClass argument looks correct\n if (!(0, $78c14fe71626d827$export$d76937f5d45b7158)(theClass, $c9b63384299a3252$var$Prototype)) $c9b63384299a3252$var$_throwTypeError(\"theClass is an invalid class definition.\");\n // Quick check to make sure that the passed theClass argument looks correct (this is a common copy/paste error)\n var classProto = theClass[$c9b63384299a3252$var$Prototype];\n if (!$c9b63384299a3252$var$_checkPrototype(classProto, target)) $c9b63384299a3252$var$_throwTypeError(\"[\" + $c9b63384299a3252$var$_getObjName(theClass) + \"] not in hierarchy of [\" + $c9b63384299a3252$var$_getObjName(target) + \"]\");\n var className = null;\n if ((0, $78c14fe71626d827$export$d76937f5d45b7158)(classProto, $c9b63384299a3252$var$DynClassName)) // Only grab the class name if it's defined on this prototype (i.e. don't walk the prototype chain)\n className = classProto[$c9b63384299a3252$var$DynClassName];\n else {\n // As not all browser support name on the prototype creating a unique dynamic one if we have not already\n // assigned one, so we can use a simple string as the lookup rather than an object for the dynamic instance\n // function table lookup.\n className = $c9b63384299a3252$var$DynClassNamePrefix + $c9b63384299a3252$var$_getObjName(theClass, \"_\") + \"$\" + $c9b63384299a3252$var$_gblInst.n;\n $c9b63384299a3252$var$_gblInst.n++;\n classProto[$c9b63384299a3252$var$DynClassName] = className;\n }\n var perfOptions = $c9b63384299a3252$export$2e2bcd8739ae039[$c9b63384299a3252$var$DynProtoDefaultOptions];\n var useBaseInst = !!perfOptions[$c9b63384299a3252$var$strUseBaseInst];\n if (useBaseInst && options && options[$c9b63384299a3252$var$strUseBaseInst] !== undefined) useBaseInst = !!options[$c9b63384299a3252$var$strUseBaseInst];\n // Get the current instance functions\n var instFuncs = $c9b63384299a3252$var$_getInstanceFuncs(target);\n // Get all of the functions for any base instance (before they are potentially overridden)\n var baseFuncs = $c9b63384299a3252$var$_getBaseFuncs(classProto, target, instFuncs, useBaseInst);\n // Execute the delegate passing in both the current target \"this\" and \"base\" function references\n // Note casting the same type as we don't actually have the base class here and this will provide some intellisense support\n delegateFunc(target, baseFuncs);\n // Don't allow setting instance functions for older IE instances\n var setInstanceFunc = !!$c9b63384299a3252$var$_objGetPrototypeOf && !!perfOptions[$c9b63384299a3252$var$strSetInstFuncs];\n if (setInstanceFunc && options) setInstanceFunc = !!options[$c9b63384299a3252$var$strSetInstFuncs];\n // Populate the Prototype for any overridden instance functions\n $c9b63384299a3252$var$_populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);\n}\n/**\r\n * Exposes the default global options to allow global configuration, if the global values are disabled these will override\r\n * any passed values. This is primarily exposed to support unit-testing without the need for individual classes to expose\r\n * their internal usage of dynamic proto.\r\n */ $c9b63384299a3252$export$2e2bcd8739ae039[$c9b63384299a3252$var$DynProtoDefaultOptions] = $c9b63384299a3252$var$_gblInst.o;\n\n\n/*\n * Application Insights JavaScript SDK - Web Analytics, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /**\r\n* ApplicationInsights.ts\r\n* @copyright Microsoft 2018\r\n*/ // Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\n\nfunction $f432995056d11d0e$export$43fe3a9b30d28d1e(obj) {\n if (!(0, $533f826bbc418791$export$a6cdc56e425d0d0a)(obj) || obj === (0, $b347daff6f5f8dc1$export$38c7ba05d207d137)) throw new TypeError(\"polyObjKeys called on non-object\");\n var result = [];\n for(var prop in obj)if ((0, $08325aa6d8565cc0$export$34e6b98f73578a9c)(obj, prop)) result.push(prop);\n return result;\n}\nfunction $f432995056d11d0e$export$aba5bd6a473725e4(value) {\n var result = [];\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(value, function(key, value) {\n result.push([\n key,\n value\n ]);\n });\n return result;\n}\nfunction $f432995056d11d0e$export$f478e11a4f5d56d5(value) {\n var result = [];\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(value, function(key, value) {\n result.push(value);\n });\n return result;\n}\n\n\nvar $36a077d9f4439b69$var$_objFreeze = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d)[\"freeze\"];\nvar $36a077d9f4439b69$var$_doNothing = function(value) {\n return value;\n};\nvar $36a077d9f4439b69$var$_getProto = function(value) {\n return value[0, $b347daff6f5f8dc1$export$bac6e64dee11e7fb] || (0, $b347daff6f5f8dc1$export$38c7ba05d207d137);\n};\nvar $36a077d9f4439b69$export$afe328edc487dcfe = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d)[\"assign\"];\nfunction $36a077d9f4439b69$export$f7628dc18f4211e5(value) {\n if (!(0, $533f826bbc418791$export$a6cdc56e425d0d0a)(value) || value === (0, $b347daff6f5f8dc1$export$38c7ba05d207d137)) (0, $44a1c24c0e411039$export$3f7738bd7dcba681)(\"objKeys called on non-object\");\n return (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d).keys(value);\n}\nfunction $36a077d9f4439b69$export$a15782d21797da4c(value) {\n if ($36a077d9f4439b69$var$_objFreeze) (0, $45e528077703ac0c$export$aa0705d5774c95d1)(value, function(key, value) {\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(value) || (0, $533f826bbc418791$export$a6cdc56e425d0d0a)(value)) $36a077d9f4439b69$var$_objFreeze(value);\n });\n return $36a077d9f4439b69$export$5da24d7703175bc5(value);\n}\nvar $36a077d9f4439b69$export$5da24d7703175bc5 = $36a077d9f4439b69$var$_objFreeze || $36a077d9f4439b69$var$_doNothing;\nvar $36a077d9f4439b69$export$8bbd42c2bec875c8 = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d)[\"seal\"] || $36a077d9f4439b69$var$_doNothing;\nvar $36a077d9f4439b69$export$743454acee35f1d4 = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d)[\"getPrototypeOf\"] || $36a077d9f4439b69$var$_getProto;\nvar $36a077d9f4439b69$export$5359e3134992ffd2 = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d).entries || (0, $f432995056d11d0e$export$aba5bd6a473725e4);\nvar $36a077d9f4439b69$export$91c2df05d37a1ffb = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d).values || (0, $f432995056d11d0e$export$f478e11a4f5d56d5);\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\nfunction $386f00e3a193a7da$export$21fce7cbd4dc679f(object, format) {\n var propertyValueDump = (0, $b347daff6f5f8dc1$export$ccb33e29d92c9a58);\n if ((0, $533f826bbc418791$export$e6127cc7fe7395c3)(object)) propertyValueDump = \"{ stack: '\" + object.stack + \"', message: '\" + object.message + \"', name: '\" + object.name + \"'\";\n else try {\n propertyValueDump = JSON.stringify(object, (0, $b347daff6f5f8dc1$export$38c7ba05d207d137), format ? (0, $533f826bbc418791$export$7e4aa119212bc614)(format) ? format : 4 : (0, $b347daff6f5f8dc1$export$375c5ccc31575c19));\n } catch (e) {\n // Unable to convert object (probably circular)\n propertyValueDump = \" - \" + $386f00e3a193a7da$export$21fce7cbd4dc679f(e, format);\n }\n return (0, $533f826bbc418791$export$3cbb80dec8953997)(object) + \": \" + propertyValueDump;\n}\n\n\nvar $f80c2443c3b8028d$var$_objCreate = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d)[\"create\"];\nvar $f80c2443c3b8028d$export$c09f2411a4ae511b = $f80c2443c3b8028d$var$_objCreate || $f80c2443c3b8028d$export$8a0865d167ee9eb4;\nfunction $f80c2443c3b8028d$export$8a0865d167ee9eb4(obj) {\n if (!obj) return {};\n var type = typeof obj;\n if (type !== (0, $b347daff6f5f8dc1$export$8b8a958a7f6f130c) && type !== (0, $b347daff6f5f8dc1$export$601fe16600f10158)) throw new TypeError(\"Prototype must be an Object or function: \" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(obj));\n function tempFunc() {}\n tempFunc[0, $b347daff6f5f8dc1$export$4ddd10988dd20ff4] = obj;\n return new tempFunc();\n}\n\n\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar $67b827af57eed1eb$export$327014e6dfd5ba11 = \"function\";\nvar $67b827af57eed1eb$export$127e9c2439c2ee16 = \"object\";\nvar $67b827af57eed1eb$export$9b7d2d86cf58b987 = \"undefined\";\nvar $67b827af57eed1eb$export$ecddaaeb55ecf049 = \"prototype\";\nvar $67b827af57eed1eb$export$b39d4edf23d6f14c = \"default\";\nvar $67b827af57eed1eb$export$9ec954dd81c90a5d = Object;\nvar $67b827af57eed1eb$export$e77bb59b5e655b3d = $67b827af57eed1eb$export$9ec954dd81c90a5d[$67b827af57eed1eb$export$ecddaaeb55ecf049];\n\n\nvar $2a74b38b87b38cda$export$3a8d60327f425095 = ((0, $3d5fcb60a9467a45$export$a4e55266d2135a7f)() || {})[\"Symbol\"];\nvar $2a74b38b87b38cda$export$904e7a8ad467688a = ((0, $3d5fcb60a9467a45$export$a4e55266d2135a7f)() || {})[\"Reflect\"];\nvar $2a74b38b87b38cda$export$9f6bdf37c7d86dfe = !!$2a74b38b87b38cda$export$904e7a8ad467688a;\nvar $2a74b38b87b38cda$var$strDecorate = \"decorate\";\nvar $2a74b38b87b38cda$var$strMetadata = \"metadata\";\nvar $2a74b38b87b38cda$var$strGetOwnPropertySymbols = \"getOwnPropertySymbols\";\nvar $2a74b38b87b38cda$var$strIterator = \"iterator\";\nvar $2a74b38b87b38cda$var$strHasOwnProperty = \"hasOwnProperty\";\nvar $2a74b38b87b38cda$export$64ecba31e1fc6f1e = function(t) {\n // tslint:disable-next-line: ban-comma-operator\n for(var s, i = 1, n = arguments.length; i < n; i++){\n s = arguments[i];\n for(var p in s)if ((0, $67b827af57eed1eb$export$e77bb59b5e655b3d)[$2a74b38b87b38cda$var$strHasOwnProperty].call(s, p)) t[p] = s[p];\n }\n return t;\n};\nvar $2a74b38b87b38cda$export$b3cf7a802e578501 = (0, $36a077d9f4439b69$export$afe328edc487dcfe) || $2a74b38b87b38cda$export$64ecba31e1fc6f1e;\n// tslint:disable-next-line: only-arrow-functions\nvar $2a74b38b87b38cda$var$extendStaticsFn = function(d, b) {\n $2a74b38b87b38cda$var$extendStaticsFn = (0, $67b827af57eed1eb$export$9ec954dd81c90a5d)[\"setPrototypeOf\"] || // tslint:disable-next-line: only-arrow-functions\n ({\n __proto__: []\n }) instanceof Array && function(d, b) {\n d.__proto__ = b;\n } || // tslint:disable-next-line: only-arrow-functions\n function(d, b) {\n for(var p in b)if (b[$2a74b38b87b38cda$var$strHasOwnProperty](p)) d[p] = b[p];\n };\n return $2a74b38b87b38cda$var$extendStaticsFn(d, b);\n};\nfunction $2a74b38b87b38cda$export$1f9c32e3fbfb8e62(d, b) {\n if (typeof b !== (0, $67b827af57eed1eb$export$327014e6dfd5ba11) && b !== null) (0, $44a1c24c0e411039$export$3f7738bd7dcba681)(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n $2a74b38b87b38cda$var$extendStaticsFn(d, b);\n function __() {\n this.constructor = d;\n }\n // tslint:disable-next-line: ban-comma-operator\n d[0, $67b827af57eed1eb$export$ecddaaeb55ecf049] = b === null ? (0, $f80c2443c3b8028d$export$c09f2411a4ae511b)(b) : (__[0, $67b827af57eed1eb$export$ecddaaeb55ecf049] = b[0, $67b827af57eed1eb$export$ecddaaeb55ecf049], new __());\n}\nfunction $2a74b38b87b38cda$export$b0e1e04064f2edd0(s, e) {\n var t = {};\n for(var k in s)if ((0, $78c14fe71626d827$export$d76937f5d45b7158)(s, k) && e.indexOf(k) < 0) t[k] = s[k];\n if (s != null && typeof (0, $67b827af57eed1eb$export$9ec954dd81c90a5d)[$2a74b38b87b38cda$var$strGetOwnPropertySymbols] === (0, $67b827af57eed1eb$export$327014e6dfd5ba11)) {\n for(var i = 0, p = (0, $67b827af57eed1eb$export$9ec954dd81c90a5d)[$2a74b38b87b38cda$var$strGetOwnPropertySymbols](s); i < p.length; i++)if (e.indexOf(p[i]) < 0 && (0, $67b827af57eed1eb$export$e77bb59b5e655b3d)[\"propertyIsEnumerable\"].call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nfunction $2a74b38b87b38cda$export$1f334cb233663b35(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = (0, $67b827af57eed1eb$export$9ec954dd81c90a5d)[\"getOwnPropertyDescriptor\"](target, key) : desc, d;\n if ($2a74b38b87b38cda$export$9f6bdf37c7d86dfe && typeof $2a74b38b87b38cda$export$904e7a8ad467688a[$2a74b38b87b38cda$var$strDecorate] === (0, $67b827af57eed1eb$export$327014e6dfd5ba11)) r = $2a74b38b87b38cda$export$904e7a8ad467688a[$2a74b38b87b38cda$var$strDecorate](decorators, target, key, desc);\n else {\n for(var i = decorators.length - 1; i >= 0; i--)// eslint-disable-next-line no-cond-assign\n if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n }\n // tslint:disable-next-line:ban-comma-operator\n return c > 3 && r && (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(target, key, r), r;\n}\nfunction $2a74b38b87b38cda$export$a862c09c17c00454(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n}\nfunction $2a74b38b87b38cda$export$652131891efe9c32(metadataKey, metadataValue) {\n if ($2a74b38b87b38cda$export$9f6bdf37c7d86dfe && $2a74b38b87b38cda$export$904e7a8ad467688a[$2a74b38b87b38cda$var$strMetadata] === (0, $67b827af57eed1eb$export$327014e6dfd5ba11)) return $2a74b38b87b38cda$export$904e7a8ad467688a[$2a74b38b87b38cda$var$strMetadata](metadataKey, metadataValue);\n}\nfunction $2a74b38b87b38cda$export$11150685fa6930db(m, o) {\n for(var p in m)if (p !== (0, $67b827af57eed1eb$export$b39d4edf23d6f14c) && !(0, $78c14fe71626d827$export$d76937f5d45b7158)(o, p)) $2a74b38b87b38cda$export$1ea27411cf67499d(o, m, p);\n}\nfunction $2a74b38b87b38cda$export$1ea27411cf67499d(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n if (!!(0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)) (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(o, k2, {\n enumerable: true,\n get: function() {\n return m[k];\n }\n });\n else o[k2] = m[k];\n}\nfunction $2a74b38b87b38cda$export$19cc45bf4f6ae179(o) {\n var s = typeof $2a74b38b87b38cda$export$3a8d60327f425095 === (0, $67b827af57eed1eb$export$327014e6dfd5ba11) && $2a74b38b87b38cda$export$3a8d60327f425095[$2a74b38b87b38cda$var$strIterator], m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n (0, $44a1c24c0e411039$export$3f7738bd7dcba681)(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nfunction $2a74b38b87b38cda$export$18637e2f1e451a15(o, n) {\n var m = typeof $2a74b38b87b38cda$export$3a8d60327f425095 === (0, $67b827af57eed1eb$export$327014e6dfd5ba11) && o[$2a74b38b87b38cda$export$3a8d60327f425095[$2a74b38b87b38cda$var$strIterator]];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while((n === void 0 || n-- > 0) && !(r = i.next()).done)ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally{\n try {\n // tslint:disable-next-line:no-conditional-assignment\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally{\n if (e) // eslint-disable-next-line no-unsafe-finally\n throw e.error;\n }\n }\n return ar;\n}\nfunction $2a74b38b87b38cda$export$e4572e1e87bd3458() {\n var theArgs = arguments;\n // Calculate new total size\n for(var s = 0, i = 0, il = theArgs.length; i < il; i++)s += theArgs[i].length;\n // Create new full array\n for(var r = Array(s), k = 0, i = 0; i < il; i++)for(var a = theArgs[i], j = 0, jl = a.length; j < jl; j++, k++)r[k] = a[j];\n return r;\n}\nfunction $2a74b38b87b38cda$export$643fbb7023bc1942(to, from) {\n for(var i = 0, il = from.length, j = to.length; i < il; i++, j++)to[j] = from[i];\n return to;\n}\nfunction $2a74b38b87b38cda$export$b4774f2d9ed4def4(cooked, raw) {\n if (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81) (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(cooked, \"raw\", {\n value: raw\n });\n else cooked.raw = raw;\n return cooked;\n}\nfunction $2a74b38b87b38cda$export$8f42f3b1d1cb5f6d(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) {\n for(var k in mod)if (k !== (0, $67b827af57eed1eb$export$b39d4edf23d6f14c) && Object.prototype.hasOwnProperty.call(mod, k)) $2a74b38b87b38cda$export$1ea27411cf67499d(result, mod, k);\n }\n // Set default module\n if (!!(0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)) (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(result, (0, $67b827af57eed1eb$export$b39d4edf23d6f14c), {\n enumerable: true,\n value: mod\n });\n else result[0, $67b827af57eed1eb$export$b39d4edf23d6f14c] = mod;\n return result;\n}\nfunction $2a74b38b87b38cda$export$b2781524d4888cea(mod) {\n return mod && mod.__esModule ? mod : {\n strDefault: mod\n };\n}\n\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // Licensed under the\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nfunction $f6bb085f8cf12216$export$e2e5bcdbdc49c586(theArray, callbackfn, thisArg) {\n if (theArray) {\n var len = theArray[0, $b347daff6f5f8dc1$export$5f32d5745d700b0e] >>> 0;\n for(var idx = 0; idx < len; idx++)if (idx in theArray) {\n if (callbackfn.call(thisArg || theArray, theArray[idx], idx, theArray) === -1) break;\n }\n }\n}\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nvar $d813f4522b40a37e$export$590567be997858b6 = (0, $b347daff6f5f8dc1$export$7ce2e0314415f079);\n\n\n\nvar $d491d25af4ac425c$var$_arrSlice = (0, $b347daff6f5f8dc1$export$f3f471c81a14426)[0, $b347daff6f5f8dc1$export$ddd00fe728e19670];\nvar $d491d25af4ac425c$var$_throwMissingFunction = function(funcName, thisArg) {\n (0, $44a1c24c0e411039$export$3f7738bd7dcba681)(\"'\" + (0, $d813f4522b40a37e$export$590567be997858b6)(funcName) + \"' not defined for \" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(thisArg));\n};\nvar $d491d25af4ac425c$export$fe708dcfc359f940 = function(funcName) {\n return function(thisArg) {\n return thisArg[funcName].apply(thisArg, $d491d25af4ac425c$var$_arrSlice.call(arguments, 1));\n };\n};\nvar $d491d25af4ac425c$export$34d1cd0b62238dad = function(funcName, clsProto) {\n var clsFn = clsProto && clsProto[funcName];\n return function(thisArg) {\n var theFunc = thisArg && thisArg[funcName] || clsFn;\n if (theFunc) return theFunc.apply(thisArg, $d491d25af4ac425c$var$_arrSlice.call(arguments, 1));\n $d491d25af4ac425c$var$_throwMissingFunction(funcName, thisArg);\n };\n};\nvar $d491d25af4ac425c$export$e4412260893e0ee4 = function(funcName, clsProto, polyFunc) {\n var clsFn = clsProto && clsProto[funcName];\n return function(thisArg) {\n var theFunc = thisArg && thisArg[funcName] || clsFn;\n if (theFunc || polyFunc) {\n var theArgs = arguments;\n return (theFunc || polyFunc).apply(thisArg, theFunc ? $d491d25af4ac425c$var$_arrSlice.call(theArgs, 1) : theArgs);\n }\n $d491d25af4ac425c$var$_throwMissingFunction(funcName, thisArg);\n };\n};\nfunction $d491d25af4ac425c$export$b9deaf03e58c2bf5(propName) {\n return function(thisArg) {\n return thisArg[propName];\n };\n}\n\n\nvar $a96d4958027d6f85$export$9f3b3ffa84393d30 = (0, $d491d25af4ac425c$export$34d1cd0b62238dad)((0, $b347daff6f5f8dc1$export$b2c0731cca6bbbd0), (0, $b347daff6f5f8dc1$export$f3f471c81a14426));\nvar $a96d4958027d6f85$export$ef8741fcdb4b04c8 = (0, $d491d25af4ac425c$export$34d1cd0b62238dad)((0, $b347daff6f5f8dc1$export$ecb956a5faeb2d4a), (0, $b347daff6f5f8dc1$export$f3f471c81a14426));\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /**\r\n * Return the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.\r\n *\r\n * To offer protection against timing attacks and fingerprinting, the precision of dateNow()\r\n * might get rounded depending on browser settings. In Firefox, the privacy.reduceTimerPrecision\r\n * preference is enabled by default and defaults to 20µs in Firefox 59; in 60 it will be 2ms.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @returns A Number representing the milliseconds elapsed since the UNIX epoch.\r\n * @example\r\n * ```ts\r\n * let now = utcNow();\r\n * ```\r\n */ function $628cad25a0769458$export$a56f095995763cca() {\n return (Date.now || $628cad25a0769458$export$dc8a201911902710)();\n}\nfunction $628cad25a0769458$export$dc8a201911902710() {\n return new Date().getTime();\n}\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\nvar $824d7bc9d9e48f68$var$_perf;\nfunction $824d7bc9d9e48f68$export$581add2462e763c2() {\n return !!$824d7bc9d9e48f68$export$28a0276e10aa78d7();\n}\nfunction $824d7bc9d9e48f68$export$28a0276e10aa78d7() {\n (!$824d7bc9d9e48f68$var$_perf || !$824d7bc9d9e48f68$var$_perf.b && (0, $d8ec17546a34ef88$export$2d4a6284764f647f) && (0, $d8ec17546a34ef88$export$2d4a6284764f647f).lzy) && ($824d7bc9d9e48f68$var$_perf = (0, $3d5fcb60a9467a45$export$45fd08e1bc14fe1c)(\"performance\"));\n return $824d7bc9d9e48f68$var$_perf.v;\n}\nfunction $824d7bc9d9e48f68$export$ba2b1ec760f018ed() {\n var perf = $824d7bc9d9e48f68$export$28a0276e10aa78d7();\n if (perf && perf.now) return perf.now();\n return (0, $628cad25a0769458$export$a56f095995763cca)();\n}\nfunction $824d7bc9d9e48f68$export$1ea91570c695dfb2(startTime) {\n return $824d7bc9d9e48f68$export$ba2b1ec760f018ed() - startTime;\n}\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nvar $317394647a739f1b$export$e411eeaf23dccbe8 = (0, $b347daff6f5f8dc1$export$dbb682be7aa6edc2).min;\nvar $317394647a739f1b$export$2ca8010d037f830f = (0, $b347daff6f5f8dc1$export$dbb682be7aa6edc2).max;\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\nvar $f0b39daabf48e63b$export$aaf2ac896f62f2c3 = (0, $d491d25af4ac425c$export$34d1cd0b62238dad)((0, $b347daff6f5f8dc1$export$ddd00fe728e19670), (0, $b347daff6f5f8dc1$export$a31bd47275edb702));\n\n\nvar $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87 = (0, $d491d25af4ac425c$export$34d1cd0b62238dad)(\"substring\", (0, $b347daff6f5f8dc1$export$a31bd47275edb702));\nvar $c3f3bf8012a4b2d4$export$25b2a9bb66b0078d = (0, $d491d25af4ac425c$export$e4412260893e0ee4)(\"substr\", (0, $b347daff6f5f8dc1$export$a31bd47275edb702), $c3f3bf8012a4b2d4$export$5e0a36ccb324041a);\nfunction $c3f3bf8012a4b2d4$export$5e0a36ccb324041a(value, start, length) {\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(value)) (0, $44a1c24c0e411039$export$3f7738bd7dcba681)(\"'polyStrSubstr called with invalid \" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(value));\n if (length < 0) return 0, $b347daff6f5f8dc1$export$ccb33e29d92c9a58;\n // If start is omitted or undefined, its treated as zero\n start = start || 0;\n if (start < 0) start = (0, $317394647a739f1b$export$2ca8010d037f830f)(start + value[0, $b347daff6f5f8dc1$export$5f32d5745d700b0e], 0);\n if ((0, $533f826bbc418791$export$fce6876652108ab)(length)) return (0, $f0b39daabf48e63b$export$aaf2ac896f62f2c3)(value, start);\n return (0, $f0b39daabf48e63b$export$aaf2ac896f62f2c3)(value, start, start + length);\n}\nfunction $c3f3bf8012a4b2d4$export$a1120f14ec6f7ada(value, count) {\n return $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87(value, 0, count);\n}\nfunction $c3f3bf8012a4b2d4$export$9fa3d612c59f0874(value, count) {\n var len = value[0, $b347daff6f5f8dc1$export$5f32d5745d700b0e];\n if (count <= 0) return 0, $b347daff6f5f8dc1$export$ccb33e29d92c9a58;\n return len > count ? $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87(value, len - count) : value;\n}\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\n\nfunction $5df3266279dc0b26$var$_createTrimFn(exp) {\n return function _doTrim(value) {\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(value)) (0, $44a1c24c0e411039$export$3f7738bd7dcba681)(\"strTrim called [\" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(value) + \"]\");\n if (value && value.replace) value = value.replace(exp, (0, $b347daff6f5f8dc1$export$ccb33e29d92c9a58));\n return value;\n };\n}\nvar $5df3266279dc0b26$export$f662cd8e6ce31dc2 = $5df3266279dc0b26$var$_createTrimFn(/^\\s+|(?=\\s)\\s+$/g);\nvar $5df3266279dc0b26$export$bb2565d3c45fa8e8 = $5df3266279dc0b26$var$_createTrimFn(/^\\s+/g);\nvar $5df3266279dc0b26$export$78c6fe435b4cfdc5 = $5df3266279dc0b26$var$_createTrimFn(/(?=\\s)\\s+$/g);\n\n\nvar $f67365b40c49b6c1$export$ef0e11c5f5f351f7 = (0, $d491d25af4ac425c$export$e4412260893e0ee4)(\"trim\", (0, $b347daff6f5f8dc1$export$a31bd47275edb702), (0, $5df3266279dc0b26$export$f662cd8e6ce31dc2));\nvar $f67365b40c49b6c1$export$cc516ea7d6f0e796 = (0, $d491d25af4ac425c$export$e4412260893e0ee4)(\"trimStart\", (0, $b347daff6f5f8dc1$export$a31bd47275edb702), (0, $5df3266279dc0b26$export$bb2565d3c45fa8e8));\nvar $f67365b40c49b6c1$export$54a8ea2dce045d2d = $f67365b40c49b6c1$export$cc516ea7d6f0e796;\nvar $f67365b40c49b6c1$export$2f86eefb8e93fce1 = (0, $d491d25af4ac425c$export$e4412260893e0ee4)(\"trimEnd\", (0, $b347daff6f5f8dc1$export$a31bd47275edb702), (0, $5df3266279dc0b26$export$78c6fe435b4cfdc5));\nvar $f67365b40c49b6c1$export$9c947579c164a1bf = $f67365b40c49b6c1$export$2f86eefb8e93fce1;\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nvar $1ae5573ce493bccc$export$e4eaee9e01d9baaa = \"toLowerCase\"; // Count: 9\nvar $1ae5573ce493bccc$export$9d71a37f0770d87f = \"blkVal\"; // Count: 5\nvar $1ae5573ce493bccc$export$6eae51590aaea43 = \"length\"; // Count: 42\nvar $1ae5573ce493bccc$export$9e4bb115c58de388 = \"rdOnly\"; // Count: 4\nvar $1ae5573ce493bccc$export$6c2b24c6eee14c46 = \"notify\"; // Count: 4\nvar $1ae5573ce493bccc$export$667d3cd09d258d38 = \"warnToConsole\"; // Count: 4\nvar $1ae5573ce493bccc$export$6c078c21a0c6c1ce = \"throwInternal\"; // Count: 5\nvar $1ae5573ce493bccc$export$24caac6d68ff1537 = \"setDf\"; // Count: 6\nvar $1ae5573ce493bccc$export$fc59eec8d77f3766 = \"watch\"; // Count: 9\nvar $1ae5573ce493bccc$export$e6a243fe757439f9 = \"logger\"; // Count: 21\nvar $1ae5573ce493bccc$export$2f85ca6962b15ff8 = \"apply\"; // Count: 7\nvar $1ae5573ce493bccc$export$a0a330e7fa1e278c = \"push\"; // Count: 31\nvar $1ae5573ce493bccc$export$84020a2e4fe863b0 = \"splice\"; // Count: 8\nvar $1ae5573ce493bccc$export$d17a699c20d379ac = \"hdlr\"; // Count: 6\nvar $1ae5573ce493bccc$export$bd01c5e3f12db01c = \"cancel\"; // Count: 5\nvar $1ae5573ce493bccc$export$65cd33bb52d04675 = \"initialize\"; // Count: 4\nvar $1ae5573ce493bccc$export$f001befbf8417151 = \"identifier\"; // Count: 8\nvar $1ae5573ce493bccc$export$2e2716e9c35a66a8 = \"isInitialized\"; // Count: 10\nvar $1ae5573ce493bccc$export$37717a508eca6e2d = \"getPlugin\"; // Count: 6\nvar $1ae5573ce493bccc$export$538c138266a38409 = \"pollInternalLogs\"; // Count: 2\nvar $1ae5573ce493bccc$export$9734b0a24bf02e93 = \"name\"; // Count: 11\nvar $1ae5573ce493bccc$export$7b5ba5854159c1f0 = \"time\"; // Count: 6\nvar $1ae5573ce493bccc$export$5c220169317cd6de = \"processNext\"; // Count: 15\nvar $1ae5573ce493bccc$export$a08d24db8e8aa3f3 = \"getProcessTelContext\"; // Count: 2\nvar $1ae5573ce493bccc$export$3a09068de032bb32 = \"getNotifyMgr\"; // Count: 5\nvar $1ae5573ce493bccc$export$5c8bcfab4f42ca62 = \"addNotificationListener\"; // Count: 4\nvar $1ae5573ce493bccc$export$861144ba9c13be60 = \"removeNotificationListener\"; // Count: 4\nvar $1ae5573ce493bccc$export$c9b1609f2b84393a = \"enabled\"; // Count: 6\nvar $1ae5573ce493bccc$export$8d1c48dba7ad83a = \"stopPollingInternalLogs\"; // Count: 2\nvar $1ae5573ce493bccc$export$7eb85b5cba77a43d = \"unload\"; // Count: 9\nvar $1ae5573ce493bccc$export$8693bdba21bfca93 = \"onComplete\"; // Count: 5\nvar $1ae5573ce493bccc$export$568c4302d11f2b22 = \"version\"; // Count: 6\nvar $1ae5573ce493bccc$export$e53d8cae4d527530 = \"loggingLevelConsole\"; // Count: 2\nvar $1ae5573ce493bccc$export$1e6514b499ba4d34 = \"createNew\"; // Count: 7\nvar $1ae5573ce493bccc$export$7176fb2a7d11927e = \"teardown\"; // Count: 9\nvar $1ae5573ce493bccc$export$2cc5b49df2eed261 = \"messageId\"; // Count: 4\nvar $1ae5573ce493bccc$export$923606b70907833e = \"message\"; // Count: 6\nvar $1ae5573ce493bccc$export$d8114c9e990204cb = \"isAsync\"; // Count: 6\nvar $1ae5573ce493bccc$export$c7ff2c36e5c78421 = \"diagLog\"; // Count: 10\nvar $1ae5573ce493bccc$export$458d234b616d0745 = \"_doTeardown\"; // Count: 4\nvar $1ae5573ce493bccc$export$c9f4bebf02f459de = \"update\"; // Count: 6\nvar $1ae5573ce493bccc$export$36754a48de7fd714 = \"getNext\"; // Count: 12\nvar $1ae5573ce493bccc$export$55d672a1dc4d50c1 = \"setNextPlugin\"; // Count: 5\nvar $1ae5573ce493bccc$export$2e850152cb3355e2 = \"userAgent\"; // Count: 5\nvar $1ae5573ce493bccc$export$b889f1d4cb07c706 = \"split\"; // Count: 5\nvar $1ae5573ce493bccc$export$aa192ee35fac3196 = \"nodeType\"; // Count: 3\nvar $1ae5573ce493bccc$export$ef9ef3ed86c4485 = \"replace\"; // Count: 8\nvar $1ae5573ce493bccc$export$6a3333b2109fff2a = \"logInternalMessage\"; // Count: 2\nvar $1ae5573ce493bccc$export$8fdcd26070ec159 = \"type\"; // Count: 14\nvar $1ae5573ce493bccc$export$b353fcbe1ae31450 = \"handler\"; // Count: 5\nvar $1ae5573ce493bccc$export$3a89026537e5dfec = \"isChildEvt\"; // Count: 3\nvar $1ae5573ce493bccc$export$c405fd80acb80a5b = \"getCtx\"; // Count: 6\nvar $1ae5573ce493bccc$export$2ec27a3df8fa4130 = \"setCtx\"; // Count: 10\nvar $1ae5573ce493bccc$export$b6736e780b133181 = \"complete\"; // Count: 3\nvar $1ae5573ce493bccc$export$a5eb52c53bba8560 = \"traceId\"; // Count: 5\nvar $1ae5573ce493bccc$export$c105b94efa183847 = \"spanId\"; // Count: 5\nvar $1ae5573ce493bccc$export$4e92e4b92b41ba2d = \"traceFlags\"; // Count: 6\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // ###################################################################################################################################################\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\n// ###################################################################################################################################################\nvar $9fe4a5d5204a4cff$export$a43287864529b8fd = undefined;\nvar $9fe4a5d5204a4cff$export$5e8607ab26634759 = \"\";\nvar $9fe4a5d5204a4cff$export$829012af4b2055a2 = \"channels\";\nvar $9fe4a5d5204a4cff$export$3094ace9cd82ff99 = \"core\";\nvar $9fe4a5d5204a4cff$export$1cf3476332da55b3 = \"createPerfMgr\";\nvar $9fe4a5d5204a4cff$export$49e9417944569ae8 = \"disabled\";\nvar $9fe4a5d5204a4cff$export$ffb2356587263734 = \"extensionConfig\";\nvar $9fe4a5d5204a4cff$export$a077ce616a1ab4ee = \"extensions\";\nvar $9fe4a5d5204a4cff$export$820a3bce4a265606 = \"processTelemetry\";\nvar $9fe4a5d5204a4cff$export$58efcc07763b37be = \"priority\";\nvar $9fe4a5d5204a4cff$export$bb3c4bc1b1175d3d = \"eventsSent\";\nvar $9fe4a5d5204a4cff$export$bacb5b2f4c1081b9 = \"eventsDiscarded\";\nvar $9fe4a5d5204a4cff$export$d75e063cb88a1c25 = \"eventsSendRequest\";\nvar $9fe4a5d5204a4cff$export$5d265841733c97c3 = \"perfEvent\";\nvar $9fe4a5d5204a4cff$export$f8b08c7de64edfbf = \"getPerfMgr\";\nvar $9fe4a5d5204a4cff$export$8f3e5386cefa231e = \"domain\";\nvar $9fe4a5d5204a4cff$export$bdba10701e0ccff3 = \"path\";\nvar $9fe4a5d5204a4cff$export$80c7dcdabc53a7db = \"Not dynamic - \";\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\nvar $0194d45a55d79548$export$7c0888b0c4641088 = (0, $d491d25af4ac425c$export$34d1cd0b62238dad)((0, $b347daff6f5f8dc1$export$b2c0731cca6bbbd0), (0, $b347daff6f5f8dc1$export$a31bd47275edb702));\nvar $0194d45a55d79548$export$107c6a87f2040ede = (0, $d491d25af4ac425c$export$34d1cd0b62238dad)((0, $b347daff6f5f8dc1$export$ecb956a5faeb2d4a), (0, $b347daff6f5f8dc1$export$a31bd47275edb702));\n\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2023 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nvar $e9133230f0eaf267$export$4b40e215736a9426 = (0, $d491d25af4ac425c$export$fe708dcfc359f940)(\"call\");\n\n\n\n\n\n\n// Use to cache the result of Object.cont\nvar $a339b44c6e62d324$var$_fnToString;\nvar $a339b44c6e62d324$var$_objCtrFnString;\nvar $a339b44c6e62d324$var$_gblWindow;\nfunction $a339b44c6e62d324$export$53b83ca8eaab0383(value) {\n if (!value || typeof value !== (0, $b347daff6f5f8dc1$export$8b8a958a7f6f130c)) return false;\n if (!$a339b44c6e62d324$var$_gblWindow) // Lazily cache the current global window value and default it to \"true\" (so we bypass this check in the future)\n $a339b44c6e62d324$var$_gblWindow = (0, $3d5fcb60a9467a45$export$fef62134eea24008)() ? (0, $3d5fcb60a9467a45$export$38b2d434cce3ea22)() : true;\n var result = false;\n if (value !== $a339b44c6e62d324$var$_gblWindow) {\n if (!$a339b44c6e62d324$var$_objCtrFnString) {\n // Lazily caching what the runtime reports as the object function constructor (as a string)\n // Using an current function lookup to find what this runtime calls a \"native\" function\n $a339b44c6e62d324$var$_fnToString = Function[0, $b347daff6f5f8dc1$export$4ddd10988dd20ff4].toString;\n $a339b44c6e62d324$var$_objCtrFnString = (0, $e9133230f0eaf267$export$4b40e215736a9426)($a339b44c6e62d324$var$_fnToString, (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d));\n }\n try {\n var proto = (0, $36a077d9f4439b69$export$743454acee35f1d4)(value);\n // No prototype so looks like an object created with Object.create(null)\n result = !proto;\n if (!result) {\n if ((0, $78c14fe71626d827$export$d76937f5d45b7158)(proto, (0, $b347daff6f5f8dc1$export$943e078395581e44))) proto = proto[0, $b347daff6f5f8dc1$export$943e078395581e44];\n result = proto && typeof proto === (0, $b347daff6f5f8dc1$export$601fe16600f10158) && $a339b44c6e62d324$var$_fnToString.call(proto) === $a339b44c6e62d324$var$_objCtrFnString;\n }\n } catch (ex) {\n // Something went wrong, so it's not an object we are playing with\n }\n }\n return result;\n}\n\n\n\n\n// RESTRICT and AVOID circular dependencies you should not import other contained modules or export the contents of this file directly\n// Added to help with minification\nvar $0b747974b0bb3563$var$strGetPrototypeOf = \"getPrototypeOf\";\nvar $0b747974b0bb3563$var$rCamelCase = /-([a-z])/g;\nvar $0b747974b0bb3563$var$rNormalizeInvalid = /([^\\w\\d_$])/g;\nvar $0b747974b0bb3563$var$rLeadingNumeric = /^(\\d+[\\w\\d_$])/;\nvar $0b747974b0bb3563$export$821e81707b1677f9 = Object[$0b747974b0bb3563$var$strGetPrototypeOf];\nfunction $0b747974b0bb3563$export$e7321bf46d18757f(value) {\n return !(0, $533f826bbc418791$export$fce6876652108ab)(value);\n}\nfunction $0b747974b0bb3563$export$71fc1ee3e76bc1fe(value) {\n return !(0, $533f826bbc418791$export$bedb7023a7733221)(value);\n}\nfunction $0b747974b0bb3563$export$f60443f194e40bc2(name) {\n var value = name;\n if (value && (0, $533f826bbc418791$export$844ec244b1367d54)(value)) {\n // CamelCase everything after the \"-\" and remove the dash\n value = value[0, $1ae5573ce493bccc$export$ef9ef3ed86c4485 /* @min:%2ereplace */ ]($0b747974b0bb3563$var$rCamelCase, function(_all, letter) {\n return letter.toUpperCase();\n });\n value = value[0, $1ae5573ce493bccc$export$ef9ef3ed86c4485 /* @min:%2ereplace */ ]($0b747974b0bb3563$var$rNormalizeInvalid, \"_\");\n value = value[0, $1ae5573ce493bccc$export$ef9ef3ed86c4485 /* @min:%2ereplace */ ]($0b747974b0bb3563$var$rLeadingNumeric, function(_all, match) {\n return \"_\" + match;\n });\n }\n return value;\n}\nfunction $0b747974b0bb3563$export$3185d777c612e61f(value, search) {\n if (value && search) return (0, $0194d45a55d79548$export$7c0888b0c4641088)(value, search) !== -1;\n return false;\n}\nfunction $0b747974b0bb3563$export$dfaaa8705752128f(date) {\n return date && date.toISOString() || \"\";\n}\nvar $0b747974b0bb3563$export$7e32b29e1cb162e1 = (0, $36a077d9f4439b69$export$a15782d21797da4c);\nfunction $0b747974b0bb3563$export$39c4487b36c98fec(object) {\n if ((0, $533f826bbc418791$export$e6127cc7fe7395c3)(object)) return object[0, $1ae5573ce493bccc$export$9734b0a24bf02e93 /* @min:%2ename */ ];\n return 0, $9fe4a5d5204a4cff$export$5e8607ab26634759;\n}\nfunction $0b747974b0bb3563$export$80746c6bc6142fc8(target, field, value, valChk, srcChk) {\n var theValue = value;\n if (target) {\n theValue = target[field];\n if (theValue !== value && (!srcChk || srcChk(theValue)) && (!valChk || valChk(value))) {\n theValue = value;\n target[field] = theValue;\n }\n }\n return theValue;\n}\nfunction $0b747974b0bb3563$export$51417ccc212471e(target, field, defValue) {\n var theValue;\n if (target) {\n theValue = target[field];\n if (!theValue && (0, $533f826bbc418791$export$bedb7023a7733221)(theValue)) {\n // Supports having the default as null\n theValue = !(0, $533f826bbc418791$export$fce6876652108ab)(defValue) ? defValue : {};\n target[field] = theValue;\n }\n } else // Expanded for performance so we only check defValue if required\n theValue = !(0, $533f826bbc418791$export$fce6876652108ab)(defValue) ? defValue : {};\n return theValue;\n}\nfunction $0b747974b0bb3563$var$_createProxyFunction(source, funcName) {\n var srcFunc = null;\n var src = null;\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(source)) srcFunc = source;\n else src = source;\n return function() {\n // Capture the original arguments passed to the method\n var originalArguments = arguments;\n if (srcFunc) src = srcFunc();\n if (src) return src[funcName][0, $1ae5573ce493bccc$export$2f85ca6962b15ff8 /* @min:%2eapply */ ](src, originalArguments);\n };\n}\nfunction $0b747974b0bb3563$export$21c1f632458708da(target, source, chkSet) {\n if (target && source && (0, $533f826bbc418791$export$a6cdc56e425d0d0a)(target) && (0, $533f826bbc418791$export$a6cdc56e425d0d0a)(source)) {\n var _loop_1 = function(field) {\n if ((0, $533f826bbc418791$export$844ec244b1367d54)(field)) {\n var value = source[field];\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(value)) {\n if (!chkSet || chkSet(field, true, source, target)) // Create a proxy function rather than just copying the (possible) prototype to the new object as an instance function\n target[field] = $0b747974b0bb3563$var$_createProxyFunction(source, field);\n } else if (!chkSet || chkSet(field, false, source, target)) {\n if ((0, $08325aa6d8565cc0$export$34e6b98f73578a9c)(target, field)) // Remove any previous instance property\n delete target[field];\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(target, field, {\n g: function() {\n return source[field];\n },\n s: function(theValue) {\n source[field] = theValue;\n }\n });\n }\n }\n };\n // effectively apply/proxy full source to the target instance\n for(var field in source)_loop_1(field);\n }\n return target;\n}\nfunction $0b747974b0bb3563$export$5dd8d245f6f94a18(target, name, source, theFunc, overwriteTarget) {\n if (target && name && source) {\n if (overwriteTarget !== false || (0, $533f826bbc418791$export$fce6876652108ab)(target[name])) target[name] = $0b747974b0bb3563$var$_createProxyFunction(source, theFunc);\n }\n}\nfunction $0b747974b0bb3563$export$94f4c7fb7e7d8dc7(target, source, functionsToProxy, overwriteTarget) {\n if (target && source && (0, $533f826bbc418791$export$a6cdc56e425d0d0a)(target) && (0, $533f826bbc418791$export$43bee75e5e14138e)(functionsToProxy)) (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(functionsToProxy, function(theFuncName) {\n if ((0, $533f826bbc418791$export$844ec244b1367d54)(theFuncName)) $0b747974b0bb3563$export$5dd8d245f6f94a18(target, theFuncName, source, theFuncName, overwriteTarget);\n });\n return target;\n}\nfunction $0b747974b0bb3563$export$f0facb5bce2741f0(defaults) {\n return /** @class */ function() {\n function class_1() {\n var _this = this;\n if (defaults) (0, $45e528077703ac0c$export$aa0705d5774c95d1)(defaults, function(field, value) {\n _this[field] = value;\n });\n }\n return class_1;\n }();\n}\nfunction $0b747974b0bb3563$export$3e03fa3fc3e422d7(theObject) {\n // V8 Optimization to cause the JIT compiler to create a new optimized object for looking up the own properties\n // primarily for object with <= 19 properties for >= 20 the effect is reduced or non-existent\n if (theObject && (0, $36a077d9f4439b69$export$afe328edc487dcfe)) theObject = (0, $67b827af57eed1eb$export$9ec954dd81c90a5d)((0, $36a077d9f4439b69$export$afe328edc487dcfe)({}, theObject));\n return theObject;\n}\nfunction $0b747974b0bb3563$export$a7f7e50f928053df(obj1, obj2, obj3, obj4, obj5, obj6) {\n // Variables\n var theArgs = arguments;\n var extended = theArgs[0] || {};\n var argLen = theArgs[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ];\n var deep = false;\n var idx = 1;\n // Check for \"Deep\" flag\n if (argLen > 0 && (0, $533f826bbc418791$export$f9ce7b637dfbe238)(extended)) {\n deep = extended;\n extended = theArgs[idx] || {};\n idx++;\n }\n // Handle case when target is a string or something (possible in deep copy)\n if (!(0, $533f826bbc418791$export$a6cdc56e425d0d0a)(extended)) extended = {};\n // Loop through each remaining object and conduct a merge\n for(; idx < argLen; idx++){\n var arg = theArgs[idx];\n var isArgArray = (0, $533f826bbc418791$export$43bee75e5e14138e)(arg);\n var isArgObj = (0, $533f826bbc418791$export$a6cdc56e425d0d0a)(arg);\n for(var prop in arg){\n var propOk = isArgArray && prop in arg || isArgObj && (0, $08325aa6d8565cc0$export$34e6b98f73578a9c)(arg, prop);\n if (!propOk) continue;\n var newValue = arg[prop];\n var isNewArray = void 0;\n // If deep merge and property is an object, merge properties\n if (deep && newValue && ((isNewArray = (0, $533f826bbc418791$export$43bee75e5e14138e)(newValue)) || (0, $a339b44c6e62d324$export$53b83ca8eaab0383)(newValue))) {\n // Grab the current value of the extended object\n var clone = extended[prop];\n if (isNewArray) {\n if (!(0, $533f826bbc418791$export$43bee75e5e14138e)(clone)) // We can't \"merge\" an array with a non-array so overwrite the original\n clone = [];\n } else if (!(0, $a339b44c6e62d324$export$53b83ca8eaab0383)(clone)) // We can't \"merge\" an object with a non-object\n clone = {};\n // Never move the original objects always clone them\n newValue = $0b747974b0bb3563$export$a7f7e50f928053df(deep, clone, newValue);\n }\n // Assign the new (or previous) value (unless undefined)\n if (newValue !== undefined) extended[prop] = newValue;\n }\n }\n return extended;\n}\nvar $0b747974b0bb3563$export$590567be997858b6 = (0, $d813f4522b40a37e$export$590567be997858b6);\n\n\n\n\"use strict\";\n/**\r\n * This file exists to hold environment utilities that are required to check and\r\n * validate the current operating environment. Unless otherwise required, please\r\n * only use defined methods (functions) in this class so that users of these\r\n * functions/properties only need to include those that are used within their own modules.\r\n */ var $0c599844349363c4$var$strDocumentMode = \"documentMode\";\nvar $0c599844349363c4$var$strLocation = \"location\";\nvar $0c599844349363c4$var$strConsole = \"console\";\nvar $0c599844349363c4$var$strPerformance = \"performance\";\nvar $0c599844349363c4$var$strJSON = \"JSON\";\nvar $0c599844349363c4$var$strCrypto = \"crypto\";\nvar $0c599844349363c4$var$strMsCrypto = \"msCrypto\";\nvar $0c599844349363c4$var$strReactNative = \"ReactNative\";\nvar $0c599844349363c4$var$strMsie = \"msie\";\nvar $0c599844349363c4$var$strTrident = \"trident/\";\nvar $0c599844349363c4$var$strXMLHttpRequest = \"XMLHttpRequest\";\nvar $0c599844349363c4$var$_isTrident = null;\nvar $0c599844349363c4$var$_navUserAgentCheck = null;\nvar $0c599844349363c4$var$_enableMocks = false;\nvar $0c599844349363c4$var$_useXDomainRequest = null;\nvar $0c599844349363c4$var$_beaconsSupported = null;\nfunction $0c599844349363c4$var$_hasProperty(theClass, property) {\n var supported = false;\n if (theClass) {\n try {\n supported = property in theClass;\n if (!supported) {\n var proto = theClass[0, $67b827af57eed1eb$export$ecddaaeb55ecf049];\n if (proto) supported = property in proto;\n }\n } catch (e) {\n // Do Nothing\n }\n if (!supported) try {\n var tmp = new theClass();\n supported = !(0, $533f826bbc418791$export$fce6876652108ab)(tmp[property]);\n } catch (e) {\n // Do Nothing\n }\n }\n return supported;\n}\nfunction $0c599844349363c4$export$6b8934f3c937d22f(enabled) {\n $0c599844349363c4$var$_enableMocks = enabled;\n}\nfunction $0c599844349363c4$export$e7fd20fad3cf4b5f(checkForMock) {\n if (checkForMock && $0c599844349363c4$var$_enableMocks) {\n var mockLocation = (0, $3d5fcb60a9467a45$export$3df6e51375017edd)(\"__mockLocation\");\n if (mockLocation) return mockLocation;\n }\n if (typeof location === (0, $67b827af57eed1eb$export$127e9c2439c2ee16) && location) return location;\n return (0, $3d5fcb60a9467a45$export$3df6e51375017edd)($0c599844349363c4$var$strLocation);\n}\nfunction $0c599844349363c4$export$bbe488cec1edd401() {\n if (typeof console !== (0, $67b827af57eed1eb$export$9b7d2d86cf58b987)) return console;\n return (0, $3d5fcb60a9467a45$export$3df6e51375017edd)($0c599844349363c4$var$strConsole);\n}\nfunction $0c599844349363c4$export$a2856ab6913b9fff() {\n return Boolean(typeof JSON === (0, $67b827af57eed1eb$export$127e9c2439c2ee16) && JSON || (0, $3d5fcb60a9467a45$export$3df6e51375017edd)($0c599844349363c4$var$strJSON) !== null);\n}\nfunction $0c599844349363c4$export$d047a7c56db64af4() {\n if ($0c599844349363c4$export$a2856ab6913b9fff()) return JSON || (0, $3d5fcb60a9467a45$export$3df6e51375017edd)($0c599844349363c4$var$strJSON);\n return null;\n}\nfunction $0c599844349363c4$export$e003cc239f955cb6() {\n return (0, $3d5fcb60a9467a45$export$3df6e51375017edd)($0c599844349363c4$var$strCrypto);\n}\nfunction $0c599844349363c4$export$6bc5093edbd2ea6() {\n return (0, $3d5fcb60a9467a45$export$3df6e51375017edd)($0c599844349363c4$var$strMsCrypto);\n}\nfunction $0c599844349363c4$export$f7a1e23e542d38e3() {\n // If running in React Native, navigator.product will be populated\n var nav = (0, $3d5fcb60a9467a45$export$a56241c767c1d89f)();\n if (nav && nav.product) return nav.product === $0c599844349363c4$var$strReactNative;\n return false;\n}\nfunction $0c599844349363c4$export$7e7b1a9668aaed8() {\n var nav = (0, $3d5fcb60a9467a45$export$a56241c767c1d89f)();\n if (nav && (nav[0, $1ae5573ce493bccc$export$2e850152cb3355e2 /* @min:%2euserAgent */ ] !== $0c599844349363c4$var$_navUserAgentCheck || $0c599844349363c4$var$_isTrident === null)) {\n // Added to support test mocking of the user agent\n $0c599844349363c4$var$_navUserAgentCheck = nav[0, $1ae5573ce493bccc$export$2e850152cb3355e2 /* @min:%2euserAgent */ ];\n var userAgent = ($0c599844349363c4$var$_navUserAgentCheck || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759))[0, $1ae5573ce493bccc$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]();\n $0c599844349363c4$var$_isTrident = (0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, $0c599844349363c4$var$strMsie) || (0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, $0c599844349363c4$var$strTrident);\n }\n return $0c599844349363c4$var$_isTrident;\n}\nfunction $0c599844349363c4$export$eb7ff627fa81c42e(userAgentStr) {\n if (userAgentStr === void 0) userAgentStr = null;\n if (!userAgentStr) {\n var navigator_1 = (0, $3d5fcb60a9467a45$export$a56241c767c1d89f)() || {};\n userAgentStr = navigator_1 ? (navigator_1.userAgent || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759))[0, $1ae5573ce493bccc$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]() : (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n }\n var ua = (userAgentStr || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759))[0, $1ae5573ce493bccc$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]();\n // Also check for documentMode in case X-UA-Compatible meta tag was included in HTML.\n if ((0, $0b747974b0bb3563$export$3185d777c612e61f)(ua, $0c599844349363c4$var$strMsie)) {\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)() || {};\n return Math.max(parseInt(ua[0, $1ae5573ce493bccc$export$b889f1d4cb07c706 /* @min:%2esplit */ ]($0c599844349363c4$var$strMsie)[1]), doc[$0c599844349363c4$var$strDocumentMode] || 0);\n } else if ((0, $0b747974b0bb3563$export$3185d777c612e61f)(ua, $0c599844349363c4$var$strTrident)) {\n var tridentVer = parseInt(ua[0, $1ae5573ce493bccc$export$b889f1d4cb07c706 /* @min:%2esplit */ ]($0c599844349363c4$var$strTrident)[1]);\n if (tridentVer) return tridentVer + 4;\n }\n return null;\n}\nfunction $0c599844349363c4$export$95df08bae54cb4df(userAgentStr) {\n if (!userAgentStr || !(0, $533f826bbc418791$export$844ec244b1367d54)(userAgentStr)) {\n var navigator_2 = (0, $3d5fcb60a9467a45$export$a56241c767c1d89f)() || {};\n userAgentStr = navigator_2 ? (navigator_2.userAgent || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759))[0, $1ae5573ce493bccc$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]() : (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n }\n var ua = (userAgentStr || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759))[0, $1ae5573ce493bccc$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]();\n return (0, $0194d45a55d79548$export$7c0888b0c4641088)(ua, \"safari\") >= 0;\n}\nfunction $0c599844349363c4$export$cf496c79c05967a0() {\n if ($0c599844349363c4$var$_beaconsSupported === null) $0c599844349363c4$var$_beaconsSupported = (0, $3d5fcb60a9467a45$export$bd82d106260417bf)() && Boolean((0, $3d5fcb60a9467a45$export$a56241c767c1d89f)().sendBeacon);\n return $0c599844349363c4$var$_beaconsSupported;\n}\nfunction $0c599844349363c4$export$f8c1c61350d9749(withKeepAlive) {\n var isSupported = false;\n try {\n isSupported = !!(0, $3d5fcb60a9467a45$export$3df6e51375017edd)(\"fetch\");\n var request = (0, $3d5fcb60a9467a45$export$3df6e51375017edd)(\"Request\");\n if (isSupported && withKeepAlive && request) isSupported = $0c599844349363c4$var$_hasProperty(request, \"keepalive\");\n } catch (e) {\n // Just Swallow any failure during availability checks\n }\n return isSupported;\n}\nfunction $0c599844349363c4$export$b9f2bc09e5ac0fa5() {\n if ($0c599844349363c4$var$_useXDomainRequest === null) {\n $0c599844349363c4$var$_useXDomainRequest = typeof XDomainRequest !== (0, $67b827af57eed1eb$export$9b7d2d86cf58b987);\n if ($0c599844349363c4$var$_useXDomainRequest && $0c599844349363c4$export$cfeac9aa070f0108()) $0c599844349363c4$var$_useXDomainRequest = $0c599844349363c4$var$_useXDomainRequest && !$0c599844349363c4$var$_hasProperty((0, $3d5fcb60a9467a45$export$3df6e51375017edd)($0c599844349363c4$var$strXMLHttpRequest), \"withCredentials\");\n }\n return $0c599844349363c4$var$_useXDomainRequest;\n}\nfunction $0c599844349363c4$export$cfeac9aa070f0108() {\n var isSupported = false;\n try {\n var xmlHttpRequest = (0, $3d5fcb60a9467a45$export$3df6e51375017edd)($0c599844349363c4$var$strXMLHttpRequest);\n isSupported = !!xmlHttpRequest;\n } catch (e) {\n // Just Swallow any failure during availability checks\n }\n return isSupported;\n}\nfunction $0c599844349363c4$var$_getNamedValue(values, name) {\n if (values) for(var i = 0; i < values[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ]; i++){\n var value = values[i];\n if (value[0, $1ae5573ce493bccc$export$9734b0a24bf02e93 /* @min:%2ename */ ]) {\n if (value[0, $1ae5573ce493bccc$export$9734b0a24bf02e93 /* @min:%2ename */ ] === name) return value;\n }\n }\n return {};\n}\nfunction $0c599844349363c4$export$cdb9869d6805c74f(name) {\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n if (doc && name) // Look for a meta-tag\n return $0c599844349363c4$var$_getNamedValue(doc.querySelectorAll(\"meta\"), name).content;\n return null;\n}\nfunction $0c599844349363c4$export$a25efeeb107534e6(name) {\n var value;\n var perf = (0, $824d7bc9d9e48f68$export$28a0276e10aa78d7)();\n if (perf) {\n // Try looking for a server-timing header\n var navPerf = perf.getEntriesByType(\"navigation\") || [];\n value = $0c599844349363c4$var$_getNamedValue((navPerf[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0 ? navPerf[0] : {}).serverTiming, name).description;\n }\n return value;\n}\n\n\n\nvar $dd28c90c4d15de9c$var$UInt32Mask = 0x100000000;\nvar $dd28c90c4d15de9c$var$MaxUInt32 = 0xffffffff;\nvar $dd28c90c4d15de9c$var$SEED1 = 123456789;\nvar $dd28c90c4d15de9c$var$SEED2 = 987654321;\n// MWC based Random generator (for IE)\nvar $dd28c90c4d15de9c$var$_mwcSeeded = false;\nvar $dd28c90c4d15de9c$var$_mwcW = $dd28c90c4d15de9c$var$SEED1;\nvar $dd28c90c4d15de9c$var$_mwcZ = $dd28c90c4d15de9c$var$SEED2;\n// Takes any integer\nfunction $dd28c90c4d15de9c$var$_mwcSeed(seedValue) {\n if (seedValue < 0) // Make sure we end up with a positive number and not -ve one.\n seedValue >>>= 0;\n $dd28c90c4d15de9c$var$_mwcW = $dd28c90c4d15de9c$var$SEED1 + seedValue & $dd28c90c4d15de9c$var$MaxUInt32;\n $dd28c90c4d15de9c$var$_mwcZ = $dd28c90c4d15de9c$var$SEED2 - seedValue & $dd28c90c4d15de9c$var$MaxUInt32;\n $dd28c90c4d15de9c$var$_mwcSeeded = true;\n}\nfunction $dd28c90c4d15de9c$var$_autoSeedMwc() {\n // Simple initialization using default Math.random() - So we inherit any entropy from the browser\n // and bitwise XOR with the current milliseconds\n try {\n var now = (0, $628cad25a0769458$export$a56f095995763cca)() & 0x7fffffff;\n $dd28c90c4d15de9c$var$_mwcSeed((Math.random() * $dd28c90c4d15de9c$var$UInt32Mask ^ now) + now);\n } catch (e) {\n // Don't crash if something goes wrong\n }\n}\nfunction $dd28c90c4d15de9c$export$b2cfcb5c32671fa4(maxValue) {\n if (maxValue > 0) return Math.floor($dd28c90c4d15de9c$export$aec042b223b6f5f9() / $dd28c90c4d15de9c$var$MaxUInt32 * (maxValue + 1)) >>> 0;\n return 0;\n}\nfunction $dd28c90c4d15de9c$export$aec042b223b6f5f9(signed) {\n var value = 0;\n var c = (0, $0c599844349363c4$export$e003cc239f955cb6)() || (0, $0c599844349363c4$export$6bc5093edbd2ea6)();\n if (c && c.getRandomValues) // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\n value = c.getRandomValues(new Uint32Array(1))[0] & $dd28c90c4d15de9c$var$MaxUInt32;\n if (value === 0 && (0, $0c599844349363c4$export$7e7b1a9668aaed8)()) {\n // For IE 6, 7, 8 (especially on XP) Math.random is not very random\n if (!$dd28c90c4d15de9c$var$_mwcSeeded) // Set the seed for the Mwc algorithm\n $dd28c90c4d15de9c$var$_autoSeedMwc();\n // Don't use Math.random for IE\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\n value = $dd28c90c4d15de9c$export$3ffb74f7babdd68f() & $dd28c90c4d15de9c$var$MaxUInt32;\n }\n if (value === 0) // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\n value = Math.floor($dd28c90c4d15de9c$var$UInt32Mask * Math.random() | 0);\n if (!signed) // Make sure we end up with a positive number and not -ve one.\n value >>>= 0;\n return value;\n}\nfunction $dd28c90c4d15de9c$export$195aff7adbfe974f(value) {\n if (!value) $dd28c90c4d15de9c$var$_autoSeedMwc();\n else $dd28c90c4d15de9c$var$_mwcSeed(value);\n}\nfunction $dd28c90c4d15de9c$export$3ffb74f7babdd68f(signed) {\n $dd28c90c4d15de9c$var$_mwcZ = 36969 * ($dd28c90c4d15de9c$var$_mwcZ & 0xFFFF) + ($dd28c90c4d15de9c$var$_mwcZ >> 16) & $dd28c90c4d15de9c$var$MaxUInt32;\n $dd28c90c4d15de9c$var$_mwcW = 18000 * ($dd28c90c4d15de9c$var$_mwcW & 0xFFFF) + ($dd28c90c4d15de9c$var$_mwcW >> 16) & $dd28c90c4d15de9c$var$MaxUInt32;\n var value = ($dd28c90c4d15de9c$var$_mwcZ << 16) + ($dd28c90c4d15de9c$var$_mwcW & 0xFFFF) >>> 0 & $dd28c90c4d15de9c$var$MaxUInt32 | 0;\n if (!signed) // Make sure we end up with a positive number and not -ve one.\n value >>>= 0;\n return value;\n}\nfunction $dd28c90c4d15de9c$export$9ffd10a3fbdc175b(maxLength) {\n if (maxLength === void 0) maxLength = 22;\n var base64chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n // Start with an initial random number, consuming the value in reverse byte order\n var number = $dd28c90c4d15de9c$export$aec042b223b6f5f9() >>> 0; // Make sure it's a +ve number\n var chars = 0;\n var result = (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n while(result[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] < maxLength){\n chars++;\n result += base64chars.charAt(number & 0x3F);\n number >>>= 6; // Zero fill with right shift\n if (chars === 5) {\n // 5 base64 characters === 30 bits so we don't have enough bits for another base64 char\n // So add on another 30 bits and make sure it's +ve\n number = ($dd28c90c4d15de9c$export$aec042b223b6f5f9() << 2 & 0xFFFFFFFF | number & 0x03) >>> 0;\n chars = 0; // We need to reset the number every 5 chars (30 bits)\n }\n }\n return result;\n}\n\n\n\"use strict\";\nvar $945e40d4195d77bb$export$3bac393b8225adab = (0, $67b827af57eed1eb$export$9b7d2d86cf58b987);\nfunction $945e40d4195d77bb$export$665eeb3ced5fba0b() {\n var uuid = $945e40d4195d77bb$export$58d1fad45f39d957();\n return (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(uuid, 0, 8) + \"-\" + (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(uuid, 8, 12) + \"-\" + (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(uuid, 12, 16) + \"-\" + (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(uuid, 16, 20) + \"-\" + (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(uuid, 20);\n}\nfunction $945e40d4195d77bb$export$5222b9460f3ddbec(value, search) {\n if (value && search) {\n var len = value[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ];\n var start = len - search[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ];\n return (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(value, start >= 0 ? start : 0, len) === search;\n }\n return false;\n}\nfunction $945e40d4195d77bb$export$58d1fad45f39d957() {\n var hexValues = [\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\",\n \"f\"\n ];\n // rfc4122 version 4 UUID without dashes and with lowercase letters\n var oct = (0, $9fe4a5d5204a4cff$export$5e8607ab26634759), tmp;\n for(var a = 0; a < 4; a++){\n tmp = (0, $dd28c90c4d15de9c$export$aec042b223b6f5f9)();\n oct += hexValues[tmp & 0xF] + hexValues[tmp >> 4 & 0xF] + hexValues[tmp >> 8 & 0xF] + hexValues[tmp >> 12 & 0xF] + hexValues[tmp >> 16 & 0xF] + hexValues[tmp >> 20 & 0xF] + hexValues[tmp >> 24 & 0xF] + hexValues[tmp >> 28 & 0xF];\n }\n // \"Set the two most significant bits (bits 6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively\"\n var clockSequenceHi = hexValues[8 + ((0, $dd28c90c4d15de9c$export$aec042b223b6f5f9)() & 0x03) | 0];\n return (0, $c3f3bf8012a4b2d4$export$25b2a9bb66b0078d)(oct, 0, 8) + (0, $c3f3bf8012a4b2d4$export$25b2a9bb66b0078d)(oct, 9, 4) + \"4\" + (0, $c3f3bf8012a4b2d4$export$25b2a9bb66b0078d)(oct, 13, 3) + clockSequenceHi + (0, $c3f3bf8012a4b2d4$export$25b2a9bb66b0078d)(oct, 16, 3) + (0, $c3f3bf8012a4b2d4$export$25b2a9bb66b0078d)(oct, 19, 12);\n}\n\n\n\n\n// using {0,16} for leading and trailing whitespace just to constrain the possible runtime of a random string\nvar $6f47dad7a26666b5$var$TRACE_PARENT_REGEX = /^([\\da-f]{2})-([\\da-f]{32})-([\\da-f]{16})-([\\da-f]{2})(-[^\\s]{1,64})?$/i;\nvar $6f47dad7a26666b5$var$DEFAULT_VERSION = \"00\";\nvar $6f47dad7a26666b5$var$INVALID_VERSION = \"ff\";\nvar $6f47dad7a26666b5$var$INVALID_TRACE_ID = \"00000000000000000000000000000000\";\nvar $6f47dad7a26666b5$var$INVALID_SPAN_ID = \"0000000000000000\";\nvar $6f47dad7a26666b5$var$SAMPLED_FLAG = 0x01;\nfunction $6f47dad7a26666b5$var$_isValid(value, len, invalidValue) {\n if (value && value[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] === len && value !== invalidValue) return !!value.match(/^[\\da-f]*$/i);\n return false;\n}\nfunction $6f47dad7a26666b5$var$_formatValue(value, len, defValue) {\n if ($6f47dad7a26666b5$var$_isValid(value, len)) return value;\n return defValue;\n}\nfunction $6f47dad7a26666b5$var$_formatFlags(value) {\n if (isNaN(value) || value < 0 || value > 255) value = 0x01;\n var result = value.toString(16);\n while(result[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] < 2)result = \"0\" + result;\n return result;\n}\nfunction $6f47dad7a26666b5$export$2f21fe23413fe96b(traceId, spanId, flags, version) {\n var _a;\n return _a = {}, _a[0, $1ae5573ce493bccc$export$568c4302d11f2b22 /* @min:version */ ] = $6f47dad7a26666b5$var$_isValid(version, 2, $6f47dad7a26666b5$var$INVALID_VERSION) ? version : $6f47dad7a26666b5$var$DEFAULT_VERSION, _a[0, $1ae5573ce493bccc$export$a5eb52c53bba8560 /* @min:traceId */ ] = $6f47dad7a26666b5$export$29dd34cf1269f6da(traceId) ? traceId : (0, $945e40d4195d77bb$export$58d1fad45f39d957)(), _a[0, $1ae5573ce493bccc$export$c105b94efa183847 /* @min:spanId */ ] = $6f47dad7a26666b5$export$8e51c6d8f0586aff(spanId) ? spanId : (0, $c3f3bf8012a4b2d4$export$a1120f14ec6f7ada)((0, $945e40d4195d77bb$export$58d1fad45f39d957)(), 16), _a.traceFlags = flags >= 0 && flags <= 0xFF ? flags : 1, _a;\n}\nfunction $6f47dad7a26666b5$export$f4d87f8901a93f5d(value) {\n var _a;\n if (!value) // Don't pass a null/undefined or empty string\n return null;\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(value)) // The value may have been encoded on the page into an array so handle this automatically\n value = value[0] || \"\";\n if (!value || !(0, $533f826bbc418791$export$844ec244b1367d54)(value) || value[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 8192) // limit potential processing based on total length\n return null;\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n var match = $6f47dad7a26666b5$var$TRACE_PARENT_REGEX.exec((0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)(value));\n if (!match || // No match\n match[1] === $6f47dad7a26666b5$var$INVALID_VERSION || // version ff is forbidden\n match[2] === $6f47dad7a26666b5$var$INVALID_TRACE_ID || // All zeros is considered to be invalid\n match[3] === $6f47dad7a26666b5$var$INVALID_SPAN_ID) return null;\n return _a = {\n version: (match[1] || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759))[0, $1ae5573ce493bccc$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ](),\n traceId: (match[2] || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759))[0, $1ae5573ce493bccc$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ](),\n spanId: (match[3] || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759))[0, $1ae5573ce493bccc$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]()\n }, _a[0, $1ae5573ce493bccc$export$4e92e4b92b41ba2d /* @min:traceFlags */ ] = parseInt(match[4], 16), _a;\n}\nfunction $6f47dad7a26666b5$export$29dd34cf1269f6da(value) {\n return $6f47dad7a26666b5$var$_isValid(value, 32, $6f47dad7a26666b5$var$INVALID_TRACE_ID);\n}\nfunction $6f47dad7a26666b5$export$8e51c6d8f0586aff(value) {\n return $6f47dad7a26666b5$var$_isValid(value, 16, $6f47dad7a26666b5$var$INVALID_SPAN_ID);\n}\nfunction $6f47dad7a26666b5$export$a210ed246a03bbf(value) {\n if (!value || !$6f47dad7a26666b5$var$_isValid(value[0, $1ae5573ce493bccc$export$568c4302d11f2b22 /* @min:%2eversion */ ], 2, $6f47dad7a26666b5$var$INVALID_VERSION) || !$6f47dad7a26666b5$var$_isValid(value[0, $1ae5573ce493bccc$export$a5eb52c53bba8560 /* @min:%2etraceId */ ], 32, $6f47dad7a26666b5$var$INVALID_TRACE_ID) || !$6f47dad7a26666b5$var$_isValid(value[0, $1ae5573ce493bccc$export$c105b94efa183847 /* @min:%2espanId */ ], 16, $6f47dad7a26666b5$var$INVALID_SPAN_ID) || !$6f47dad7a26666b5$var$_isValid($6f47dad7a26666b5$var$_formatFlags(value[0, $1ae5573ce493bccc$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ]), 2)) // Each known field must contain a valid value\n return false;\n return true;\n}\nfunction $6f47dad7a26666b5$export$8577d514cd55191e(value) {\n if ($6f47dad7a26666b5$export$a210ed246a03bbf(value)) return (value[0, $1ae5573ce493bccc$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ] & $6f47dad7a26666b5$var$SAMPLED_FLAG) === $6f47dad7a26666b5$var$SAMPLED_FLAG;\n return false;\n}\nfunction $6f47dad7a26666b5$export$55f8c39d2c902d0d(value) {\n if (value) {\n // Special Note: This only supports formatting as version 00, future versions should encode any known supported version\n // So parsing a future version will populate the correct version value but reformatting will reduce it to version 00.\n var flags = $6f47dad7a26666b5$var$_formatFlags(value[0, $1ae5573ce493bccc$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ]);\n if (!$6f47dad7a26666b5$var$_isValid(flags, 2)) flags = \"01\";\n var version = value[0, $1ae5573ce493bccc$export$568c4302d11f2b22 /* @min:%2eversion */ ] || $6f47dad7a26666b5$var$DEFAULT_VERSION;\n if (version !== \"00\" && version !== \"ff\") // Reduce version to \"00\"\n version = $6f47dad7a26666b5$var$DEFAULT_VERSION;\n // Format as version 00\n return \"\".concat(version.toLowerCase(), \"-\").concat($6f47dad7a26666b5$var$_formatValue(value.traceId, 32, $6f47dad7a26666b5$var$INVALID_TRACE_ID).toLowerCase(), \"-\").concat($6f47dad7a26666b5$var$_formatValue(value.spanId, 16, $6f47dad7a26666b5$var$INVALID_SPAN_ID).toLowerCase(), \"-\").concat(flags.toLowerCase());\n }\n return \"\";\n}\nfunction $6f47dad7a26666b5$export$2a00dfdbe257ef74() {\n var name = \"traceparent\";\n var traceParent = $6f47dad7a26666b5$export$f4d87f8901a93f5d((0, $0c599844349363c4$export$cdb9869d6805c74f)(name));\n if (!traceParent) traceParent = $6f47dad7a26666b5$export$f4d87f8901a93f5d((0, $0c599844349363c4$export$a25efeeb107534e6)(name));\n return traceParent;\n}\n\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /**\r\n * This is an internal property used to cause internal (reporting) requests to be ignored from reporting\r\n * additional telemetry, to handle polyfil implementations ALL urls used with a disabled request will\r\n * also be ignored for future requests even when this property is not provided.\r\n * Tagging as Ignore as this is an internal value and is not expected to be used outside of the SDK\r\n * @ignore\r\n */ var $71dfba5ea0640485$export$7c6abff2f2bdd9c0 = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\nvar $71dfba5ea0640485$export$dc288b6444e20c04 = \"sampleRate\";\nvar $71dfba5ea0640485$export$ea8a69bf327def66 = \"ProcessLegacy\";\nvar $71dfba5ea0640485$export$8343e6f32f5246de = \"http.method\";\nvar $71dfba5ea0640485$export$5c9ec0fce655ebcf = \"https://dc.services.visualstudio.com\";\nvar $71dfba5ea0640485$export$e6c0f3431c6cd728 = \"/v2/track\";\nvar $71dfba5ea0640485$export$4003f5e1672d759 = \"not_specified\";\nvar $71dfba5ea0640485$export$7d566319b90dbb26 = \"iKey\";\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nfunction $51d848565ca908fc$export$8557db26cff37a74(values, keyType, valueType, completeFn) {\n var theMap = {};\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(values, function(key, value) {\n theMap[key] = keyType ? value : key;\n theMap[value] = valueType ? value : key;\n });\n return completeFn(theMap);\n}\n\n\n\n\nfunction $1a927735c653b0c3$export$37b2eedf6b7b231a(values) {\n return (0, $51d848565ca908fc$export$8557db26cff37a74)(values, 1 /* eMapValues.Value */ , 0 /* eMapValues.Key */ , (0, $36a077d9f4439b69$export$a15782d21797da4c));\n}\nfunction $1a927735c653b0c3$export$db29bd6ce1af3f68(values) {\n return (0, $51d848565ca908fc$export$8557db26cff37a74)(values, 0 /* eMapValues.Key */ , 0 /* eMapValues.Key */ , (0, $36a077d9f4439b69$export$a15782d21797da4c));\n}\nfunction $1a927735c653b0c3$export$dbf89c68f5157b55(values) {\n return (0, $51d848565ca908fc$export$8557db26cff37a74)(values, 1 /* eMapValues.Value */ , 1 /* eMapValues.Value */ , (0, $36a077d9f4439b69$export$a15782d21797da4c));\n}\nfunction $1a927735c653b0c3$export$4cf8c4bb9ca98f0b(values) {\n var mapClass = {};\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(values, function(key, value) {\n mapClass[key] = value[1];\n mapClass[value[0]] = value[1];\n });\n return (0, $36a077d9f4439b69$export$a15782d21797da4c)(mapClass);\n}\nfunction $1a927735c653b0c3$export$a6025b6424227e7e(values) {\n return $1a927735c653b0c3$export$4cf8c4bb9ca98f0b(values);\n}\n\n\nvar $4c75282440d4ddf3$export$fd52abd0b2703048 = (0, $1a927735c653b0c3$export$37b2eedf6b7b231a);\nvar $4c75282440d4ddf3$export$8980fe7abaa99712 = (0, $1a927735c653b0c3$export$a6025b6424227e7e);\n\n\nvar $78a4729d55fca66a$export$e499e02a1fe05177 = (0, $4c75282440d4ddf3$export$8980fe7abaa99712)({\n requestContextHeader: [\n 0 /* eRequestHeaders.requestContextHeader */ ,\n \"Request-Context\"\n ],\n requestContextTargetKey: [\n 1 /* eRequestHeaders.requestContextTargetKey */ ,\n \"appId\"\n ],\n requestContextAppIdFormat: [\n 2 /* eRequestHeaders.requestContextAppIdFormat */ ,\n \"appId=cid-v1:\"\n ],\n requestIdHeader: [\n 3 /* eRequestHeaders.requestIdHeader */ ,\n \"Request-Id\"\n ],\n traceParentHeader: [\n 4 /* eRequestHeaders.traceParentHeader */ ,\n \"traceparent\"\n ],\n traceStateHeader: [\n 5 /* eRequestHeaders.traceStateHeader */ ,\n \"tracestate\"\n ],\n sdkContextHeader: [\n 6 /* eRequestHeaders.sdkContextHeader */ ,\n \"Sdk-Context\"\n ],\n sdkContextHeaderAppIdRequest: [\n 7 /* eRequestHeaders.sdkContextHeaderAppIdRequest */ ,\n \"appId\"\n ],\n requestContextHeaderLowerCase: [\n 8 /* eRequestHeaders.requestContextHeaderLowerCase */ ,\n \"request-context\"\n ]\n});\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\nvar $8a2d104e2647a310$var$version = \"3.0.2\";\nvar $8a2d104e2647a310$var$instanceName = \".\" + (0, $dd28c90c4d15de9c$export$9ffd10a3fbdc175b)(6);\nvar $8a2d104e2647a310$var$_dataUid = 0;\n// Accepts only:\n// - Node\n// - Node.ELEMENT_NODE\n// - Node.DOCUMENT_NODE\n// - Object\n// - Any\nfunction $8a2d104e2647a310$var$_canAcceptData(target) {\n return target[0, $1ae5573ce493bccc$export$aa192ee35fac3196 /* @min:%2enodeType */ ] === 1 || target[0, $1ae5573ce493bccc$export$aa192ee35fac3196 /* @min:%2enodeType */ ] === 9 || !+target[0, $1ae5573ce493bccc$export$aa192ee35fac3196 /* @min:%2enodeType */ ];\n}\nfunction $8a2d104e2647a310$var$_getCache(data, target) {\n var theCache = target[data.id];\n if (!theCache) {\n theCache = {};\n try {\n if ($8a2d104e2647a310$var$_canAcceptData(target)) (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(target, data.id, {\n e: false,\n v: theCache\n });\n } catch (e) {\n // Not all environments allow extending all objects, so just ignore the cache in those cases\n }\n }\n return theCache;\n}\nfunction $8a2d104e2647a310$export$eb4a6badb18ead04(name, includeVersion) {\n if (includeVersion === void 0) includeVersion = false;\n return (0, $0b747974b0bb3563$export$f60443f194e40bc2)(name + $8a2d104e2647a310$var$_dataUid++ + (includeVersion ? \".\" + $8a2d104e2647a310$var$version : (0, $9fe4a5d5204a4cff$export$5e8607ab26634759)) + $8a2d104e2647a310$var$instanceName);\n}\nfunction $8a2d104e2647a310$export$b95c3438408d78aa(name) {\n var data = {\n id: $8a2d104e2647a310$export$eb4a6badb18ead04(\"_aiData-\" + (name || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759)) + \".\" + $8a2d104e2647a310$var$version),\n accept: function(target) {\n return $8a2d104e2647a310$var$_canAcceptData(target);\n },\n get: function(target, name, defValue, addDefault) {\n var theCache = target[data.id];\n if (!theCache) {\n if (addDefault) {\n // Side effect is adds the cache\n theCache = $8a2d104e2647a310$var$_getCache(data, target);\n theCache[(0, $0b747974b0bb3563$export$f60443f194e40bc2)(name)] = defValue;\n }\n return defValue;\n }\n return theCache[(0, $0b747974b0bb3563$export$f60443f194e40bc2)(name)];\n },\n kill: function(target, name) {\n if (target && target[name]) try {\n delete target[name];\n } catch (e) {\n // Just cleaning up, so if this fails -- ignore\n }\n }\n };\n return data;\n}\n\n\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\nfunction $2b347a3380a9d5e1$var$_isConfigDefaults(value) {\n return value && (0, $533f826bbc418791$export$a6cdc56e425d0d0a)(value) && (value.isVal || value.fb || (0, $08325aa6d8565cc0$export$34e6b98f73578a9c)(value, \"v\") || (0, $08325aa6d8565cc0$export$34e6b98f73578a9c)(value, \"mrg\") || (0, $08325aa6d8565cc0$export$34e6b98f73578a9c)(value, \"ref\") || value.set);\n}\nfunction $2b347a3380a9d5e1$var$_getDefault(dynamicHandler, theConfig, cfgDefaults) {\n var defValue;\n var isDefaultValid = cfgDefaults.dfVal || (0, $533f826bbc418791$export$4e62c701997796c1);\n // There is a fallback config key so try and grab that first\n if (theConfig && cfgDefaults.fb) {\n var fallbacks = cfgDefaults.fb;\n if (!(0, $533f826bbc418791$export$43bee75e5e14138e)(fallbacks)) fallbacks = [\n fallbacks\n ];\n for(var lp = 0; lp < fallbacks[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ]; lp++){\n var fallback = fallbacks[lp];\n var fbValue = theConfig[fallback];\n if (isDefaultValid(fbValue)) defValue = fbValue;\n else if (dynamicHandler) {\n // Needed to ensure that the fallback value (and potentially) new field is also dynamic even if null/undefined\n fbValue = dynamicHandler.cfg[fallback];\n if (isDefaultValid(fbValue)) defValue = fbValue;\n // Needed to ensure that the fallback value (and potentially) new field is also dynamic even if null/undefined\n dynamicHandler.set(dynamicHandler.cfg, (0, $d813f4522b40a37e$export$590567be997858b6)(fallback), fbValue);\n }\n if (isDefaultValid(defValue)) break;\n }\n }\n // If the value is still not defined and we have a default value then use that\n if (!isDefaultValid(defValue) && isDefaultValid(cfgDefaults.v)) defValue = cfgDefaults.v;\n return defValue;\n}\n/**\r\n * Recursively resolve the default value\r\n * @param dynamicHandler\r\n * @param theConfig\r\n * @param cfgDefaults\r\n * @returns\r\n */ function $2b347a3380a9d5e1$var$_resolveDefaultValue(dynamicHandler, theConfig, cfgDefaults) {\n var theValue = cfgDefaults;\n if (cfgDefaults && $2b347a3380a9d5e1$var$_isConfigDefaults(cfgDefaults)) theValue = $2b347a3380a9d5e1$var$_getDefault(dynamicHandler, theConfig, cfgDefaults);\n if (theValue) {\n if ($2b347a3380a9d5e1$var$_isConfigDefaults(theValue)) theValue = $2b347a3380a9d5e1$var$_resolveDefaultValue(dynamicHandler, theConfig, theValue);\n var newValue_1;\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(theValue)) {\n newValue_1 = [];\n newValue_1[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] = theValue[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ];\n } else if ((0, $a339b44c6e62d324$export$53b83ca8eaab0383)(theValue)) newValue_1 = {};\n if (newValue_1) {\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(theValue, function(key, value) {\n if (value && $2b347a3380a9d5e1$var$_isConfigDefaults(value)) value = $2b347a3380a9d5e1$var$_resolveDefaultValue(dynamicHandler, theConfig, value);\n newValue_1[key] = value;\n });\n theValue = newValue_1;\n }\n }\n return theValue;\n}\nfunction $2b347a3380a9d5e1$export$f11b7d3a4617b9e9(dynamicHandler, theConfig, name, defaultValue) {\n // Resolve the initial config value from the provided value or use the defined default\n var isValid;\n var setFn;\n var defValue;\n var cfgDefaults = defaultValue;\n var mergeDf;\n var reference;\n var readOnly;\n var blkDynamicValue;\n if ($2b347a3380a9d5e1$var$_isConfigDefaults(cfgDefaults)) {\n // looks like a IConfigDefault\n isValid = cfgDefaults.isVal;\n setFn = cfgDefaults.set;\n readOnly = cfgDefaults[0, $1ae5573ce493bccc$export$9e4bb115c58de388 /* @min:%2erdOnly */ ];\n blkDynamicValue = cfgDefaults[0, $1ae5573ce493bccc$export$9d71a37f0770d87f /* @min:%2eblkVal */ ];\n mergeDf = cfgDefaults.mrg;\n reference = cfgDefaults.ref;\n if (!reference && (0, $533f826bbc418791$export$fce6876652108ab)(reference)) reference = !!mergeDf;\n defValue = $2b347a3380a9d5e1$var$_getDefault(dynamicHandler, theConfig, cfgDefaults);\n } else defValue = defaultValue;\n if (blkDynamicValue) // Mark the property so that any value assigned will be blocked from conversion, we need to do this\n // before assigning or fetching the value to ensure it's not converted\n dynamicHandler[0, $1ae5573ce493bccc$export$9d71a37f0770d87f /* @min:%2eblkVal */ ](theConfig, name);\n // Set the value to the default value;\n var theValue;\n var usingDefault = true;\n var cfgValue = theConfig[name];\n // try and get and user provided values\n if (cfgValue || !(0, $533f826bbc418791$export$bedb7023a7733221)(cfgValue)) {\n // Use the defined theConfig[name] value\n theValue = cfgValue;\n usingDefault = false;\n // The values are different and we have a special default value check, which is used to\n // override config values like empty strings to continue using the default\n if (isValid && theValue !== defValue && !isValid(theValue)) {\n theValue = defValue;\n usingDefault = true;\n }\n if (setFn) {\n theValue = setFn(theValue, defValue, theConfig);\n usingDefault = theValue === defValue;\n }\n }\n if (!usingDefault) {\n if ((0, $a339b44c6e62d324$export$53b83ca8eaab0383)(theValue) || (0, $533f826bbc418791$export$43bee75e5e14138e)(defValue)) // we are using the user supplied value and it's an object\n {\n if (mergeDf && defValue && ((0, $a339b44c6e62d324$export$53b83ca8eaab0383)(defValue) || (0, $533f826bbc418791$export$43bee75e5e14138e)(defValue))) // Resolve/apply the defaults\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(defValue, function(dfName, dfValue) {\n // Sets the value and makes it dynamic (if it doesn't already exist)\n $2b347a3380a9d5e1$export$f11b7d3a4617b9e9(dynamicHandler, theValue, dfName, dfValue);\n });\n }\n } else if (defValue) // Just resolve the default\n theValue = $2b347a3380a9d5e1$var$_resolveDefaultValue(dynamicHandler, theConfig, defValue);\n else theValue = defValue;\n // if (theValue && usingDefault && (isPlainObject(theValue) || isArray(theValue))) {\n // theValue = _cfgDeepCopy(theValue);\n // }\n // Needed to ensure that the (potentially) new field is dynamic even if null/undefined\n dynamicHandler.set(theConfig, name, theValue);\n if (reference) dynamicHandler.ref(theConfig, name);\n if (readOnly) dynamicHandler[0, $1ae5573ce493bccc$export$9e4bb115c58de388 /* @min:%2erdOnly */ ](theConfig, name);\n}\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nvar $49e650e29acde80b$export$aad005cc63185e9e = (0, $1a927735c653b0c3$export$db29bd6ce1af3f68)({\n asyncIterator: 0 /* WellKnownSymbols.asyncIterator */ ,\n hasInstance: 1 /* WellKnownSymbols.hasInstance */ ,\n isConcatSpreadable: 2 /* WellKnownSymbols.isConcatSpreadable */ ,\n iterator: 3 /* WellKnownSymbols.iterator */ ,\n match: 4 /* WellKnownSymbols.match */ ,\n matchAll: 5 /* WellKnownSymbols.matchAll */ ,\n replace: 6 /* WellKnownSymbols.replace */ ,\n search: 7 /* WellKnownSymbols.search */ ,\n species: 8 /* WellKnownSymbols.species */ ,\n split: 9 /* WellKnownSymbols.split */ ,\n toPrimitive: 10 /* WellKnownSymbols.toPrimitive */ ,\n toStringTag: 11 /* WellKnownSymbols.toStringTag */ ,\n unscopables: 12 /* WellKnownSymbols.unscopables */ \n});\n\n\n\n\n\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\n\n\n\n\nvar $a8afde6386ad83e8$export$da061769d961e150 = (0, $d491d25af4ac425c$export$e4412260893e0ee4)(\"startsWith\", (0, $b347daff6f5f8dc1$export$a31bd47275edb702), $a8afde6386ad83e8$export$4385daccb55bb3a3);\nfunction $a8afde6386ad83e8$export$4385daccb55bb3a3(value, searchString, position) {\n if (!(0, $533f826bbc418791$export$844ec244b1367d54)(value)) (0, $44a1c24c0e411039$export$3f7738bd7dcba681)(\"'\" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(value) + \"' is not a string\");\n var searchValue = (0, $533f826bbc418791$export$844ec244b1367d54)(searchString) ? searchString : (0, $d813f4522b40a37e$export$590567be997858b6)(searchString);\n var chkLen = searchValue[0, $b347daff6f5f8dc1$export$5f32d5745d700b0e];\n var pos = position > 0 ? position : 0;\n return (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(value, pos, pos + chkLen) === searchValue;\n}\n\n\nvar $f26b93b472d141b0$var$_polySymbols;\nfunction $f26b93b472d141b0$var$_globalSymbolRegistry() {\n if (!$f26b93b472d141b0$var$_polySymbols) {\n var gblCfg = (0, $6b9be1171d21f18a$export$8a1a74f726f2b336)();\n $f26b93b472d141b0$var$_polySymbols = gblCfg.gblSym = gblCfg.gblSym || {\n k: {},\n s: {}\n };\n }\n return $f26b93b472d141b0$var$_polySymbols;\n}\nvar $f26b93b472d141b0$var$_wellKnownSymbolCache = {};\nfunction $f26b93b472d141b0$export$1e4b0b24415108a8(description) {\n var theSymbol = {\n description: (0, $d813f4522b40a37e$export$590567be997858b6)(description),\n toString: function() {\n return (0, $b347daff6f5f8dc1$export$27c95a7104c1f7aa) + \"(\" + description + \")\";\n }\n };\n // Tag the symbol so we know it a polyfill\n theSymbol[0, $b347daff6f5f8dc1$export$e674ec9e2c0d330e] = true;\n return theSymbol;\n}\nfunction $f26b93b472d141b0$export$c35d76cf82622c51(key) {\n var registry = $f26b93b472d141b0$var$_globalSymbolRegistry();\n if (!(0, $08325aa6d8565cc0$export$34e6b98f73578a9c)(registry, key)) {\n var newSymbol = $f26b93b472d141b0$export$1e4b0b24415108a8(key);\n registry.k[key] = newSymbol;\n registry.s[newSymbol] = (0, $d813f4522b40a37e$export$590567be997858b6)(key);\n }\n return registry.k[key];\n}\nfunction $f26b93b472d141b0$export$205212be62415f78(sym) {\n if (!sym || !sym.toString || !(0, $a8afde6386ad83e8$export$da061769d961e150)(sym.toString(), (0, $b347daff6f5f8dc1$export$27c95a7104c1f7aa))) (0, $44a1c24c0e411039$export$3f7738bd7dcba681)(sym + \" is not a symbol\");\n return $f26b93b472d141b0$var$_globalSymbolRegistry().s[sym];\n}\nfunction $f26b93b472d141b0$export$b9abc24179dacbc5(name) {\n var result;\n var knownName = (0, $49e650e29acde80b$export$aad005cc63185e9e)[name];\n if (knownName) result = $f26b93b472d141b0$var$_wellKnownSymbolCache[knownName] = $f26b93b472d141b0$var$_wellKnownSymbolCache[knownName] || $f26b93b472d141b0$export$1e4b0b24415108a8((0, $b347daff6f5f8dc1$export$27c95a7104c1f7aa) + \".\" + knownName);\n return result;\n}\n\n\n\n\n\n\n\nvar $3ab078397ef07bc3$var$_symbol;\nvar $3ab078397ef07bc3$var$_symbolFor;\nvar $3ab078397ef07bc3$var$_symbolKeyFor;\nfunction $3ab078397ef07bc3$var$_getSymbolValue(name) {\n return (0, $f07ca4f3c96b6502$export$c6675fd9042172d2)(function() {\n return $3ab078397ef07bc3$var$_symbol.v ? $3ab078397ef07bc3$var$_symbol[name] : (0, $b347daff6f5f8dc1$export$375c5ccc31575c19);\n }, (0, $b347daff6f5f8dc1$export$375c5ccc31575c19));\n}\nvar $3ab078397ef07bc3$export$a244864fd9645c7f = (0, $533f826bbc418791$export$baab46d9fe4a4eef)(\"symbol\");\nfunction $3ab078397ef07bc3$export$1e6e45ea4c3f892c() {\n return !!$3ab078397ef07bc3$export$57af67db727bc7c7();\n}\nfunction $3ab078397ef07bc3$export$57af67db727bc7c7() {\n var resetCache = !$3ab078397ef07bc3$var$_symbol || (0, $d8ec17546a34ef88$export$2d4a6284764f647f) && (0, $d8ec17546a34ef88$export$2d4a6284764f647f).lzy && !$3ab078397ef07bc3$var$_symbol.b;\n resetCache && ($3ab078397ef07bc3$var$_symbol = (0, $3d5fcb60a9467a45$export$45fd08e1bc14fe1c)((0, $b347daff6f5f8dc1$export$27c95a7104c1f7aa)));\n (!$3ab078397ef07bc3$var$_symbolFor || resetCache) && ($3ab078397ef07bc3$var$_symbolFor = $3ab078397ef07bc3$var$_getSymbolValue(\"for\"));\n (!$3ab078397ef07bc3$var$_symbolKeyFor || resetCache) && ($3ab078397ef07bc3$var$_symbolKeyFor = $3ab078397ef07bc3$var$_getSymbolValue(\"keyFor\"));\n return $3ab078397ef07bc3$var$_symbol.v;\n}\nfunction $3ab078397ef07bc3$export$3a9aefdadea26115(name, noPoly) {\n var knownName = (0, $49e650e29acde80b$export$aad005cc63185e9e)[name];\n // Cause lazy symbol to get initialized\n (!$3ab078397ef07bc3$var$_symbol || (0, $d8ec17546a34ef88$export$2d4a6284764f647f).lzy && !$3ab078397ef07bc3$var$_symbol.b) && $3ab078397ef07bc3$export$57af67db727bc7c7();\n return $3ab078397ef07bc3$var$_symbol.v ? $3ab078397ef07bc3$var$_symbol.v[knownName || name] : !noPoly ? (0, $f26b93b472d141b0$export$b9abc24179dacbc5)(name) : (0, $b347daff6f5f8dc1$export$375c5ccc31575c19);\n}\nfunction $3ab078397ef07bc3$export$70503d621eee7e7b(description, noPoly) {\n // Cause lazy _symbol to get initialized\n (!$3ab078397ef07bc3$var$_symbol || (0, $d8ec17546a34ef88$export$2d4a6284764f647f).lzy && !$3ab078397ef07bc3$var$_symbol.b) && $3ab078397ef07bc3$export$57af67db727bc7c7();\n return $3ab078397ef07bc3$var$_symbol.v ? $3ab078397ef07bc3$var$_symbol.v(description) : !noPoly ? (0, $f26b93b472d141b0$export$1e4b0b24415108a8)(description) : (0, $b347daff6f5f8dc1$export$38c7ba05d207d137);\n}\nfunction $3ab078397ef07bc3$export$4d0ba04d25a41f31(key) {\n // Cause lazy symbol to get initialized\n (!$3ab078397ef07bc3$var$_symbolFor || (0, $d8ec17546a34ef88$export$2d4a6284764f647f).lzy && !$3ab078397ef07bc3$var$_symbol.b) && $3ab078397ef07bc3$export$57af67db727bc7c7();\n return ($3ab078397ef07bc3$var$_symbolFor.v || (0, $f26b93b472d141b0$export$c35d76cf82622c51))(key);\n}\nfunction $3ab078397ef07bc3$export$5cc35ecfe266eba7(sym) {\n // Cause lazy symbol to get initialized\n (!$3ab078397ef07bc3$var$_symbolKeyFor || (0, $d8ec17546a34ef88$export$2d4a6284764f647f).lzy && !$3ab078397ef07bc3$var$_symbol.b) && $3ab078397ef07bc3$export$57af67db727bc7c7();\n return ($3ab078397ef07bc3$var$_symbolKeyFor.v || (0, $f26b93b472d141b0$export$205212be62415f78))(sym);\n}\n\n\n\nvar $36be0cb20f115b6f$export$3af51e1f665d1d72 = (0, $3ab078397ef07bc3$export$4d0ba04d25a41f31)(\"[[ai_dynCfg_1]]\");\n/**\r\n * @internal\r\n * @ignore\r\n * The symbol to tag objects / arrays with if they should not be converted\r\n */ var $36be0cb20f115b6f$var$BLOCK_DYNAMIC = (0, $3ab078397ef07bc3$export$4d0ba04d25a41f31)(\"[[ai_blkDynCfg_1]]\");\n/**\r\n * @internal\r\n * @ignore\r\n * The symbol to tag objects to indicate that when included into the configuration that\r\n * they should be converted into a trackable dynamic object.\r\n */ var $36be0cb20f115b6f$var$FORCE_DYNAMIC = (0, $3ab078397ef07bc3$export$4d0ba04d25a41f31)(\"[[ai_frcDynCfg_1]]\");\nfunction $36be0cb20f115b6f$export$36c4765ffcb8ffc1(source) {\n if (source) {\n var target_1;\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(source)) {\n target_1 = [];\n target_1[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] = source[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ];\n } else if ((0, $a339b44c6e62d324$export$53b83ca8eaab0383)(source)) target_1 = {};\n if (target_1) {\n // Copying index values by property name as the extensionConfig can be an array or object\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(source, function(key, value) {\n // Perform a deep copy of the object\n target_1[key] = $36be0cb20f115b6f$export$36c4765ffcb8ffc1(value);\n });\n return target_1;\n }\n }\n return source;\n}\nfunction $36be0cb20f115b6f$export$ebfc7adde882cbe6(value) {\n if (value) {\n var handler = value[$36be0cb20f115b6f$export$3af51e1f665d1d72] || value;\n if (handler.cfg && (handler.cfg === value || handler.cfg[$36be0cb20f115b6f$export$3af51e1f665d1d72] === handler)) return handler;\n }\n return null;\n}\nfunction $36be0cb20f115b6f$export$9ab6a1069e1e797e(value) {\n if (value && ((0, $a339b44c6e62d324$export$53b83ca8eaab0383)(value) || (0, $533f826bbc418791$export$43bee75e5e14138e)(value))) try {\n value[$36be0cb20f115b6f$var$BLOCK_DYNAMIC] = true;\n } catch (e) {\n // Don't throw for this case as it's an ask only\n }\n return value;\n}\nfunction $36be0cb20f115b6f$export$89d2831ef182f832(value) {\n if (value) try {\n value[$36be0cb20f115b6f$var$FORCE_DYNAMIC] = true;\n } catch (e) {\n // Don't throw for this case as it's an ask only\n }\n return value;\n}\nfunction $36be0cb20f115b6f$export$d4b814eca8f802e7(getFunc, state, value) {\n var result = false;\n // Object must exist and be truthy\n if (value && !getFunc[state.blkVal]) {\n // Tagged as always convert\n result = value[$36be0cb20f115b6f$var$FORCE_DYNAMIC];\n // Check that it's not explicitly tagged as blocked\n if (!result && !value[$36be0cb20f115b6f$var$BLOCK_DYNAMIC]) // Only convert plain objects or arrays by default\n result = (0, $a339b44c6e62d324$export$53b83ca8eaab0383)(value) || (0, $533f826bbc418791$export$43bee75e5e14138e)(value);\n }\n return result;\n}\nfunction $36be0cb20f115b6f$export$e2aa058b2c3c7959(message) {\n (0, $44a1c24c0e411039$export$3f7738bd7dcba681)(\"InvalidAccess:\" + message);\n}\n\n\nvar $b2527bd3661c8e9e$var$arrayMethodsToPatch = [\n \"push\",\n \"pop\",\n \"shift\",\n \"unshift\",\n \"splice\"\n];\nvar $b2527bd3661c8e9e$export$6103ab389f3208de = function(logger, name, desc, e) {\n logger && logger[0, $1ae5573ce493bccc$export$6c078c21a0c6c1ce /* @min:%2ethrowInternal */ ](3 /* eLoggingSeverity.DEBUG */ , 108 /* _eInternalMessageId.DynamicConfigException */ , \"\".concat(desc, \" [\").concat(name, \"] failed - \") + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e));\n};\nfunction $b2527bd3661c8e9e$var$_patchArray(state, target, name) {\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(target)) // Monkey Patch the methods that might change the array\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)($b2527bd3661c8e9e$var$arrayMethodsToPatch, function(method) {\n var orgMethod = target[method];\n target[method] = function() {\n var args = [];\n for(var _i = 0; _i < arguments.length; _i++)args[_i] = arguments[_i];\n var result = orgMethod[0, $1ae5573ce493bccc$export$2f85ca6962b15ff8 /* @min:%2eapply */ ](this, args);\n // items may be added, removed or moved so need to make some new dynamic properties\n $b2527bd3661c8e9e$export$f24b4ed0a40d3d27(state, target, name, \"Patching\");\n return result;\n };\n });\n}\nfunction $b2527bd3661c8e9e$var$_getOwnPropGetter(target, name) {\n var propDesc = (0, $a1ed021ceb472abb$export$1bd5e8b059facbe9)(target, name);\n return propDesc && propDesc.get;\n}\nfunction $b2527bd3661c8e9e$var$_createDynamicProperty(state, theConfig, name, value) {\n // Does not appear to be dynamic so lets make it so\n var detail = {\n n: name,\n h: [],\n trk: function(handler) {\n if (handler && handler.fn) {\n if ((0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(detail.h, handler) === -1) // Add this handler to the collection that should be notified when the value changes\n detail.h[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](handler);\n state.trk(handler, detail);\n }\n },\n clr: function(handler) {\n var idx = (0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(detail.h, handler);\n if (idx !== -1) detail.h[0, $1ae5573ce493bccc$export$84020a2e4fe863b0 /* @min:%2esplice */ ](idx, 1);\n }\n };\n // Flag to optimize lookup response time by avoiding additional function calls\n var checkDynamic = true;\n var isObjectOrArray = false;\n function _getProperty() {\n if (checkDynamic) {\n isObjectOrArray = isObjectOrArray || (0, $36be0cb20f115b6f$export$d4b814eca8f802e7)(_getProperty, state, value);\n // Make sure that if it's an object that we make it dynamic\n if (value && !value[0, $36be0cb20f115b6f$export$3af51e1f665d1d72] && isObjectOrArray) // It doesn't look like it's already dynamic so lets make sure it's converted the object into a dynamic Config as well\n value = $b2527bd3661c8e9e$export$f24b4ed0a40d3d27(state, value, name, \"Converting\");\n // If it needed to be converted it now has been\n checkDynamic = false;\n }\n // If there is an active handler then add it to the tracking set of handlers\n var activeHandler = state.act;\n if (activeHandler) detail.trk(activeHandler);\n return value;\n }\n // Tag this getter as our dynamic property and provide shortcut for notifying a change\n _getProperty[state.prop] = {\n chng: function() {\n state.add(detail);\n }\n };\n function _setProperty(newValue) {\n if (value !== newValue) {\n if (!!_getProperty[state.ro] && !state.upd) // field is marked as readonly so return false\n (0, $36be0cb20f115b6f$export$e2aa058b2c3c7959)(\"[\" + name + \"] is read-only:\" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(theConfig));\n if (checkDynamic) {\n isObjectOrArray = isObjectOrArray || (0, $36be0cb20f115b6f$export$d4b814eca8f802e7)(_getProperty, state, value);\n checkDynamic = false;\n }\n // The value must be a plain object or an array to enforce the reference (in-place updates)\n var isReferenced = isObjectOrArray && _getProperty[state.rf];\n if (isObjectOrArray) {\n // We are about to replace a plain object or an array\n if (isReferenced) {\n // Reassign the properties from the current value to the same properties from the newValue\n // This will set properties not in the newValue to undefined\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(value, function(key) {\n value[key] = newValue ? newValue[key] : (0, $9fe4a5d5204a4cff$export$a43287864529b8fd);\n });\n // Now assign / re-assign value with all of the keys from newValue\n try {\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(newValue, function(key, theValue) {\n $b2527bd3661c8e9e$export$7d85a661fa08a14d(state, value, key, theValue);\n });\n // Now drop newValue so when we assign value later it keeps the existing reference\n newValue = value;\n } catch (e) {\n // Unable to convert to dynamic property so just leave as non-dynamic\n $b2527bd3661c8e9e$export$6103ab389f3208de((state.hdlr || {})[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ], name, \"Assigning\", e);\n // Mark as not an object or array so we don't try and do this again\n isObjectOrArray = false;\n }\n } else if (value && value[0, $36be0cb20f115b6f$export$3af51e1f665d1d72]) // As we are replacing the value, if it's already dynamic then we need to notify the listeners\n // for every property it has already\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(value, function(key) {\n // Check if the value is dynamic\n var getter = $b2527bd3661c8e9e$var$_getOwnPropGetter(value, key);\n if (getter) {\n // And if it is tell it's listeners that the value has changed\n var valueState = getter[state.prop];\n valueState && valueState.chng();\n }\n });\n }\n if (newValue !== value) {\n var newIsObjectOrArray = newValue && (0, $36be0cb20f115b6f$export$d4b814eca8f802e7)(_getProperty, state, newValue);\n if (!isReferenced && newIsObjectOrArray) // As the newValue is an object/array lets preemptively make it dynamic\n newValue = $b2527bd3661c8e9e$export$f24b4ed0a40d3d27(state, newValue, name, \"Converting\");\n // Now assign the internal \"value\" to the newValue\n value = newValue;\n isObjectOrArray = newIsObjectOrArray;\n }\n // Cause any listeners to be scheduled for notification\n state.add(detail);\n }\n }\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(theConfig, detail.n, {\n g: _getProperty,\n s: _setProperty\n });\n}\nfunction $b2527bd3661c8e9e$export$7d85a661fa08a14d(state, target, name, value) {\n if (target) {\n // To be a dynamic property it needs to have a get function\n var getter = $b2527bd3661c8e9e$var$_getOwnPropGetter(target, name);\n var isDynamic = getter && !!getter[state.prop];\n if (!isDynamic) $b2527bd3661c8e9e$var$_createDynamicProperty(state, target, name, value);\n else // Looks like it's already dynamic just assign the new value\n target[name] = value;\n }\n return target;\n}\nfunction $b2527bd3661c8e9e$export$945b6f6a011a9f7a(state, target, name, flags) {\n if (target) {\n // To be a dynamic property it needs to have a get function\n var getter = $b2527bd3661c8e9e$var$_getOwnPropGetter(target, name);\n var isDynamic = getter && !!getter[state.prop];\n var inPlace = flags && flags[0 /* _eSetDynamicPropertyFlags.inPlace */ ];\n var rdOnly = flags && flags[1 /* _eSetDynamicPropertyFlags.readOnly */ ];\n var blkProp = flags && flags[2 /* _eSetDynamicPropertyFlags.blockDynamicProperty */ ];\n if (!isDynamic) {\n if (blkProp) try {\n // Attempt to mark the target as blocked from conversion\n (0, $36be0cb20f115b6f$export$9ab6a1069e1e797e)(target);\n } catch (e) {\n $b2527bd3661c8e9e$export$6103ab389f3208de((state.hdlr || {})[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ], name, \"Blocking\", e);\n }\n try {\n // Make sure it's dynamic so that we can tag the property as per the state\n $b2527bd3661c8e9e$export$7d85a661fa08a14d(state, target, name, target[name]);\n getter = $b2527bd3661c8e9e$var$_getOwnPropGetter(target, name);\n } catch (e) {\n // Unable to convert to dynamic property so just leave as non-dynamic\n $b2527bd3661c8e9e$export$6103ab389f3208de((state.hdlr || {})[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ], name, \"State\", e);\n }\n }\n // Assign the optional flags if true\n if (inPlace) getter[state.rf] = inPlace;\n if (rdOnly) getter[state.ro] = rdOnly;\n if (blkProp) getter[state.blkVal] = true;\n }\n return target;\n}\nfunction $b2527bd3661c8e9e$export$f24b4ed0a40d3d27(state, target, name, desc) {\n try {\n // Assign target with new value properties (converting into dynamic properties in the process)\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(target, function(key, value) {\n // Assign and/or make the property dynamic\n $b2527bd3661c8e9e$export$7d85a661fa08a14d(state, target, key, value);\n });\n if (!target[0, $36be0cb20f115b6f$export$3af51e1f665d1d72]) {\n // Link the config back to the dynamic config details\n (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(target, (0, $36be0cb20f115b6f$export$3af51e1f665d1d72), {\n get: function() {\n return state[0, $1ae5573ce493bccc$export$d17a699c20d379ac /* @min:%2ehdlr */ ];\n }\n });\n $b2527bd3661c8e9e$var$_patchArray(state, target, name);\n }\n } catch (e) {\n // Unable to convert to dynamic property so just leave as non-dynamic\n $b2527bd3661c8e9e$export$6103ab389f3208de((state.hdlr || {})[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ], name, desc, e);\n }\n return target;\n}\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\nvar $46728a52dfc641a6$export$1bea104a0e2567f0 = (0, $d491d25af4ac425c$export$34d1cd0b62238dad)((0, $b347daff6f5f8dc1$export$ddd00fe728e19670), (0, $b347daff6f5f8dc1$export$f3f471c81a14426));\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2023 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nvar $d88e50d36d3d9760$export$2801572b9d3736b5 = (0, $d491d25af4ac425c$export$fe708dcfc359f940)(\"apply\");\n\n\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\nvar $de882ae8157e9b9b$var$REF = \"ref\";\nvar $de882ae8157e9b9b$var$UNREF = \"un\" + $de882ae8157e9b9b$var$REF;\nvar $de882ae8157e9b9b$var$HAS_REF = \"hasRef\";\nvar $de882ae8157e9b9b$var$ENABLED = \"enabled\";\nfunction $de882ae8157e9b9b$export$bf688d278153f393(startTimer, refreshFn, cancelFn) {\n var _a;\n var ref = true;\n var timerId = startTimer ? refreshFn((0, $b347daff6f5f8dc1$export$38c7ba05d207d137)) : (0, $b347daff6f5f8dc1$export$38c7ba05d207d137);\n var theTimerHandler;\n var _unref = function() {\n ref = false;\n timerId && timerId[$de882ae8157e9b9b$var$UNREF] && timerId[$de882ae8157e9b9b$var$UNREF]();\n return theTimerHandler;\n };\n var _ref = function() {\n ref = true;\n timerId && timerId[$de882ae8157e9b9b$var$REF] && timerId[$de882ae8157e9b9b$var$REF]();\n return theTimerHandler;\n };\n var _hasRef = function() {\n if (timerId && timerId[$de882ae8157e9b9b$var$HAS_REF]) return timerId[$de882ae8157e9b9b$var$HAS_REF]();\n return ref;\n };\n var _refresh = function() {\n timerId = refreshFn(timerId);\n if (!ref) _unref();\n return theTimerHandler;\n };\n var _cancel = function() {\n timerId && cancelFn(timerId);\n timerId = (0, $b347daff6f5f8dc1$export$38c7ba05d207d137);\n };\n var _setEnabled = function(value) {\n !value && timerId && _cancel();\n value && !timerId && _refresh();\n };\n theTimerHandler = (_a = {\n cancel: _cancel,\n refresh: _refresh\n }, _a[$de882ae8157e9b9b$var$HAS_REF] = _hasRef, _a[$de882ae8157e9b9b$var$REF] = _ref, _a[$de882ae8157e9b9b$var$UNREF] = _unref, _a[$de882ae8157e9b9b$var$ENABLED] = false, _a);\n (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(theTimerHandler, $de882ae8157e9b9b$var$ENABLED, {\n get: function() {\n return !!timerId;\n },\n set: _setEnabled\n });\n return {\n h: theTimerHandler,\n dn: function() {\n timerId = (0, $b347daff6f5f8dc1$export$38c7ba05d207d137);\n }\n };\n}\n\n\nfunction $d03b12effd00bf96$var$_createTimeoutWith(self, startTimer, overrideFn, theArgs) {\n var isArr = (0, $533f826bbc418791$export$43bee75e5e14138e)(overrideFn);\n var len = isArr ? overrideFn.length : 0;\n var setFn = (len > 0 ? overrideFn[0] : !isArr ? overrideFn : (0, $b347daff6f5f8dc1$export$375c5ccc31575c19)) || setTimeout;\n var clearFn = (len > 1 ? overrideFn[1] : (0, $b347daff6f5f8dc1$export$375c5ccc31575c19)) || clearTimeout;\n var timerFn = theArgs[0];\n theArgs[0] = function() {\n handler.dn();\n (0, $d88e50d36d3d9760$export$2801572b9d3736b5)(timerFn, self, (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments));\n };\n var handler = (0, $de882ae8157e9b9b$export$bf688d278153f393)(startTimer, function(timerId) {\n if (timerId) {\n if (timerId.refresh) {\n timerId.refresh();\n return timerId;\n }\n (0, $d88e50d36d3d9760$export$2801572b9d3736b5)(clearFn, self, [\n timerId\n ]);\n }\n return (0, $d88e50d36d3d9760$export$2801572b9d3736b5)(setFn, self, theArgs);\n }, function(timerId) {\n (0, $d88e50d36d3d9760$export$2801572b9d3736b5)(clearFn, self, [\n timerId\n ]);\n });\n return handler.h;\n}\nfunction $d03b12effd00bf96$export$5f4d6617421d489b(callback, timeout) {\n return $d03b12effd00bf96$var$_createTimeoutWith(this, true, (0, $b347daff6f5f8dc1$export$375c5ccc31575c19), (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments));\n}\nfunction $d03b12effd00bf96$export$9e7e48cc39f2a8d3(overrideFn, callback, timeout) {\n return $d03b12effd00bf96$var$_createTimeoutWith(this, true, overrideFn, (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments, 1));\n}\nfunction $d03b12effd00bf96$export$6eae7cf7a129a986(callback, timeout) {\n return $d03b12effd00bf96$var$_createTimeoutWith(this, false, (0, $b347daff6f5f8dc1$export$375c5ccc31575c19), (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments));\n}\nfunction $d03b12effd00bf96$export$320dbce2ee83dc77(overrideFn, callback, timeout) {\n return $d03b12effd00bf96$var$_createTimeoutWith(this, false, overrideFn, (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments, 1));\n}\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\n\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\nvar $6037ad71549710c7$var$_isProtoArray;\nfunction $6037ad71549710c7$export$97268f64d317ba65(obj, proto) {\n var fn = (0, $b347daff6f5f8dc1$export$9ec954dd81c90a5d)[\"setPrototypeOf\"] || // tslint:disable-next-line: only-arrow-functions\n function(d, b) {\n !$6037ad71549710c7$var$_isProtoArray && ($6037ad71549710c7$var$_isProtoArray = (0, $d8ec17546a34ef88$export$db98eae15987454c)(function() {\n var _a;\n return (_a = {}, _a[0, $b347daff6f5f8dc1$export$bac6e64dee11e7fb] = [], _a) instanceof Array;\n }));\n $6037ad71549710c7$var$_isProtoArray.v ? d[0, $b347daff6f5f8dc1$export$bac6e64dee11e7fb] = b : (0, $45e528077703ac0c$export$aa0705d5774c95d1)(b, function(key, value) {\n return d[key] = value;\n });\n };\n return fn(obj, proto);\n}\n\n\n/**\r\n * @internal\r\n * @ignore\r\n */ var $0cd2c3ce211547d0$var$_createCustomError = function(name, d, b) {\n $0cd2c3ce211547d0$var$_safeDefineName(d, name);\n d = (0, $6037ad71549710c7$export$97268f64d317ba65)(d, b);\n function __() {\n this.constructor = d;\n $0cd2c3ce211547d0$var$_safeDefineName(this, name);\n }\n d[0, $b347daff6f5f8dc1$export$4ddd10988dd20ff4] = b === (0, $b347daff6f5f8dc1$export$38c7ba05d207d137) ? (0, $f80c2443c3b8028d$export$c09f2411a4ae511b)(b) : (__[0, $b347daff6f5f8dc1$export$4ddd10988dd20ff4] = b[0, $b347daff6f5f8dc1$export$4ddd10988dd20ff4], new __());\n return d;\n};\nvar $0cd2c3ce211547d0$var$_safeSetName = function(baseClass, name) {\n try {\n name && (baseClass[0, $b347daff6f5f8dc1$export$3c5e605ca7ade9f2] = name);\n //name && (baseClass[PROTOTYPE][NAME] = name);\n } catch (e) {\n // Do nothing\n }\n};\nvar $0cd2c3ce211547d0$var$_safeDefineName = function(target, name) {\n try {\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(target, (0, $b347daff6f5f8dc1$export$3c5e605ca7ade9f2), {\n v: name,\n c: true,\n e: false\n });\n } catch (e) {\n // Do nothing\n }\n};\nfunction $0cd2c3ce211547d0$export$435492119a21bab3(name, constructCb, errorBase) {\n var theBaseClass = errorBase || Error;\n var orgName = theBaseClass[0, $b347daff6f5f8dc1$export$4ddd10988dd20ff4][0, $b347daff6f5f8dc1$export$3c5e605ca7ade9f2];\n var captureFn = Error.captureStackTrace;\n return $0cd2c3ce211547d0$var$_createCustomError(name, function() {\n var _this = this;\n try {\n $0cd2c3ce211547d0$var$_safeSetName(theBaseClass, name);\n var _self = (0, $d88e50d36d3d9760$export$2801572b9d3736b5)(theBaseClass, _this, (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments)) || _this;\n if (_self !== _this) {\n // Looks like runtime error constructor reset the prototype chain, so restore it\n var orgProto = (0, $36a077d9f4439b69$export$743454acee35f1d4)(_this);\n if (orgProto !== (0, $36a077d9f4439b69$export$743454acee35f1d4)(_self)) (0, $6037ad71549710c7$export$97268f64d317ba65)(_self, orgProto);\n }\n // Make sure we only capture our stack details\n captureFn && captureFn(_self, _this[0, $b347daff6f5f8dc1$export$943e078395581e44]);\n // Run the provided construction function\n constructCb && constructCb(_self, arguments);\n return _self;\n } finally{\n $0cd2c3ce211547d0$var$_safeSetName(theBaseClass, orgName);\n }\n }, theBaseClass);\n}\n/**\r\n * @internal\r\n * @ignore\r\n */ var $0cd2c3ce211547d0$var$_unsupportedError;\nfunction $0cd2c3ce211547d0$export$6523a1bd3b6e3128(message) {\n if (!$0cd2c3ce211547d0$var$_unsupportedError) // Lazily create the class\n $0cd2c3ce211547d0$var$_unsupportedError = $0cd2c3ce211547d0$export$435492119a21bab3(\"UnsupportedError\");\n throw new $0cd2c3ce211547d0$var$_unsupportedError(message);\n}\n\n\n\nvar $6d79a478fc63a9ca$var$aggregationErrorType;\nfunction $6d79a478fc63a9ca$export$a2765bc4230e591f(message, sourceErrors) {\n if (!$6d79a478fc63a9ca$var$aggregationErrorType) $6d79a478fc63a9ca$var$aggregationErrorType = (0, $0cd2c3ce211547d0$export$435492119a21bab3)(\"AggregationError\", function(self, args) {\n if (args[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 1) // Save the provided errors\n self.errors = args[1];\n });\n var theMessage = message || \"One or more errors occurred.\";\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(sourceErrors, function(srcError, idx) {\n theMessage += \"\\n\".concat(idx, \" > \").concat((0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(srcError));\n });\n throw new $6d79a478fc63a9ca$var$aggregationErrorType(theMessage, sourceErrors || []);\n}\n\n\n\nvar $83c3e1b1398a495d$var$symPrefix = \"[[ai_\";\nvar $83c3e1b1398a495d$var$symPostfix = \"]]\";\nfunction $83c3e1b1398a495d$export$8b125ae28a27d4c(cfgHandler) {\n var _a;\n var dynamicPropertySymbol = (0, $3ab078397ef07bc3$export$70503d621eee7e7b)($83c3e1b1398a495d$var$symPrefix + \"get\" + cfgHandler.uid + $83c3e1b1398a495d$var$symPostfix);\n var dynamicPropertyReadOnly = (0, $3ab078397ef07bc3$export$70503d621eee7e7b)($83c3e1b1398a495d$var$symPrefix + \"ro\" + cfgHandler.uid + $83c3e1b1398a495d$var$symPostfix);\n var dynamicPropertyReferenced = (0, $3ab078397ef07bc3$export$70503d621eee7e7b)($83c3e1b1398a495d$var$symPrefix + \"rf\" + cfgHandler.uid + $83c3e1b1398a495d$var$symPostfix);\n var dynamicPropertyBlockValue = (0, $3ab078397ef07bc3$export$70503d621eee7e7b)($83c3e1b1398a495d$var$symPrefix + \"blkVal\" + cfgHandler.uid + $83c3e1b1398a495d$var$symPostfix);\n var dynamicPropertyDetail = (0, $3ab078397ef07bc3$export$70503d621eee7e7b)($83c3e1b1398a495d$var$symPrefix + \"dtl\" + cfgHandler.uid + $83c3e1b1398a495d$var$symPostfix);\n var _waitingHandlers = null;\n var _watcherTimer = null;\n var theState;\n function _useHandler(activeHandler, callback) {\n var prevWatcher = theState.act;\n try {\n theState.act = activeHandler;\n if (activeHandler && activeHandler[dynamicPropertyDetail]) {\n // Clear out the previously tracked details for this handler, so that access are re-evaluated\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(activeHandler[dynamicPropertyDetail], function(detail) {\n detail.clr(activeHandler);\n });\n activeHandler[dynamicPropertyDetail] = [];\n }\n callback({\n cfg: cfgHandler.cfg,\n set: cfgHandler.set.bind(cfgHandler),\n setDf: cfgHandler[0, $1ae5573ce493bccc$export$24caac6d68ff1537 /* @min:%2esetDf */ ].bind(cfgHandler),\n ref: cfgHandler.ref.bind(cfgHandler),\n rdOnly: cfgHandler[0, $1ae5573ce493bccc$export$9e4bb115c58de388 /* @min:%2erdOnly */ ].bind(cfgHandler)\n });\n } catch (e) {\n var logger = cfgHandler[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ];\n if (logger) // Don't let one individual failure break everyone\n logger[0, $1ae5573ce493bccc$export$6c078c21a0c6c1ce /* @min:%2ethrowInternal */ ](1 /* eLoggingSeverity.CRITICAL */ , 107 /* _eInternalMessageId.ConfigWatcherException */ , (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e));\n // Re-throw the exception so that any true \"error\" is reported back to the called\n throw e;\n } finally{\n theState.act = prevWatcher || null;\n }\n }\n function _notifyWatchers() {\n if (_waitingHandlers) {\n var notifyHandlers = _waitingHandlers;\n _waitingHandlers = null;\n // Stop any timer as we are running them now anyway\n _watcherTimer && _watcherTimer[0, $1ae5573ce493bccc$export$bd01c5e3f12db01c /* @min:%2ecancel */ ]();\n _watcherTimer = null;\n var watcherFailures_1 = [];\n // Now run the handlers\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(notifyHandlers, function(handler) {\n if (handler) {\n if (handler[dynamicPropertyDetail]) {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(handler[dynamicPropertyDetail], function(detail) {\n // Clear out this handler from previously tracked details, so that access are re-evaluated\n detail.clr(handler);\n });\n handler[dynamicPropertyDetail] = null;\n }\n // The handler may have self removed as part of another handler so re-check\n if (handler.fn) try {\n _useHandler(handler, handler.fn);\n } catch (e) {\n // Don't let a single failing watcher cause other watches to fail\n watcherFailures_1[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](e);\n }\n }\n });\n // During notification we may have had additional updates -- so notify those updates as well\n if (_waitingHandlers) try {\n _notifyWatchers();\n } catch (e) {\n watcherFailures_1[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](e);\n }\n if (watcherFailures_1[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) (0, $6d79a478fc63a9ca$export$a2765bc4230e591f)(\"Watcher error(s): \", watcherFailures_1);\n }\n }\n function _addWatcher(detail) {\n if (detail && detail.h[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n if (!_waitingHandlers) _waitingHandlers = [];\n if (!_watcherTimer) _watcherTimer = (0, $d03b12effd00bf96$export$5f4d6617421d489b)(function() {\n _watcherTimer = null;\n _notifyWatchers();\n }, 0);\n // Add all of the handlers for this detail (if not already present) - using normal for-loop for performance\n for(var idx = 0; idx < detail.h[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ]; idx++){\n var handler = detail.h[idx];\n // Add this handler to the collection of handlers to re-execute\n if (handler && (0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(_waitingHandlers, handler) === -1) _waitingHandlers[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](handler);\n }\n }\n }\n function _trackHandler(handler, detail) {\n if (handler) {\n var details = handler[dynamicPropertyDetail] = handler[dynamicPropertyDetail] || [];\n if ((0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(details, detail) === -1) // If this detail is not already listed as tracked then add it so that we re-evaluate it's usage\n details[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](detail);\n }\n }\n theState = (_a = {\n prop: dynamicPropertySymbol,\n ro: dynamicPropertyReadOnly,\n rf: dynamicPropertyReferenced\n }, _a[0, $1ae5573ce493bccc$export$9d71a37f0770d87f /* @min:blkVal */ ] = dynamicPropertyBlockValue, _a[0, $1ae5573ce493bccc$export$d17a699c20d379ac /* @min:hdlr */ ] = cfgHandler, _a.add = _addWatcher, _a[0, $1ae5573ce493bccc$export$6c2b24c6eee14c46 /* @min:notify */ ] = _notifyWatchers, _a.use = _useHandler, _a.trk = _trackHandler, _a);\n return theState;\n}\n\n\n\n/**\r\n * Identifies a function which will be re-called whenever any of it's accessed configuration values\r\n * change.\r\n * @param configHandler - The callback that will be called for the initial request and then whenever any\r\n * accessed configuration changes are identified.\r\n */ function $acb30f9e62dc5705$var$_createAndUseHandler(state, configHandler) {\n var handler = {\n fn: configHandler,\n rm: function() {\n // Clear all references to the handler so it can be garbage collected\n // This will also cause this handler to never get called and eventually removed\n handler.fn = null;\n state = null;\n configHandler = null;\n }\n };\n state.use(handler, configHandler);\n return handler;\n}\n/**\r\n * Creates the dynamic config handler and associates with the target config as the root object\r\n * @param target - The config that you want to be root of the dynamic config\r\n * @param inPlace - Should the passed config be converted in-place or a new proxy returned\r\n * @returns The existing dynamic handler or a new instance with the provided config values\r\n */ function $acb30f9e62dc5705$var$_createDynamicHandler(logger, target, inPlace) {\n var _a;\n var dynamicHandler = (0, $36be0cb20f115b6f$export$ebfc7adde882cbe6)(target);\n if (dynamicHandler) // The passed config is already dynamic so return it's tracker\n return dynamicHandler;\n var uid = (0, $8a2d104e2647a310$export$eb4a6badb18ead04)(\"dyncfg\", true);\n var newTarget = target && inPlace !== false ? target : (0, $36be0cb20f115b6f$export$36c4765ffcb8ffc1)(target);\n var theState;\n function _notifyWatchers() {\n theState[0, $1ae5573ce493bccc$export$6c2b24c6eee14c46 /* @min:%2enotify */ ]();\n }\n function _setValue(target, name, value) {\n try {\n target = (0, $b2527bd3661c8e9e$export$7d85a661fa08a14d)(theState, target, name, value);\n } catch (e) {\n // Unable to convert to dynamic property so just leave as non-dynamic\n (0, $b2527bd3661c8e9e$export$6103ab389f3208de)(logger, name, \"Setting value\", e);\n }\n return target[name];\n }\n function _watch(configHandler) {\n return $acb30f9e62dc5705$var$_createAndUseHandler(theState, configHandler);\n }\n function _block(configHandler, allowUpdate) {\n theState.use(null, function(details) {\n var prevUpd = theState.upd;\n try {\n if (!(0, $533f826bbc418791$export$fce6876652108ab)(allowUpdate)) theState.upd = allowUpdate;\n configHandler(details);\n } finally{\n theState.upd = prevUpd;\n }\n });\n }\n function _ref(target, name) {\n var _a;\n // Make sure it's dynamic and mark as referenced with it's current value\n return (0, $b2527bd3661c8e9e$export$945b6f6a011a9f7a)(theState, target, name, (_a = {}, _a[0 /* _eSetDynamicPropertyFlags.inPlace */ ] = true, _a))[name];\n }\n function _rdOnly(target, name) {\n var _a;\n // Make sure it's dynamic and mark as readonly with it's current value\n return (0, $b2527bd3661c8e9e$export$945b6f6a011a9f7a)(theState, target, name, (_a = {}, _a[1 /* _eSetDynamicPropertyFlags.readOnly */ ] = true, _a))[name];\n }\n function _blkPropValue(target, name) {\n var _a;\n // Make sure it's dynamic and mark as readonly with it's current value\n return (0, $b2527bd3661c8e9e$export$945b6f6a011a9f7a)(theState, target, name, (_a = {}, _a[2 /* _eSetDynamicPropertyFlags.blockDynamicProperty */ ] = true, _a))[name];\n }\n function _applyDefaults(theConfig, defaultValues) {\n if (defaultValues) // Resolve/apply the defaults\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(defaultValues, function(name, value) {\n // Sets the value and makes it dynamic (if it doesn't already exist)\n (0, $2b347a3380a9d5e1$export$f11b7d3a4617b9e9)(cfgHandler, theConfig, name, value);\n });\n return theConfig;\n }\n var cfgHandler = (_a = {\n uid: null,\n cfg: newTarget\n }, _a[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:logger */ ] = logger, _a[0, $1ae5573ce493bccc$export$6c2b24c6eee14c46 /* @min:notify */ ] = _notifyWatchers, _a.set = _setValue, _a[0, $1ae5573ce493bccc$export$24caac6d68ff1537 /* @min:setDf */ ] = _applyDefaults, _a[0, $1ae5573ce493bccc$export$fc59eec8d77f3766 /* @min:watch */ ] = _watch, _a.ref = _ref, _a[0, $1ae5573ce493bccc$export$9e4bb115c58de388 /* @min:rdOnly */ ] = _rdOnly, _a[0, $1ae5573ce493bccc$export$9d71a37f0770d87f /* @min:blkVal */ ] = _blkPropValue, _a._block = _block, _a);\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(cfgHandler, \"uid\", {\n c: false,\n e: false,\n w: false,\n v: uid\n });\n theState = (0, $83c3e1b1398a495d$export$8b125ae28a27d4c)(cfgHandler);\n // Setup tracking for all defined default keys\n (0, $b2527bd3661c8e9e$export$f24b4ed0a40d3d27)(theState, newTarget, \"config\", \"Creating\");\n return cfgHandler;\n}\n/**\r\n * Log an invalid access message to the console\r\n * @param message\r\n */ function $acb30f9e62dc5705$var$_logInvalidAccess(logger, message) {\n if (logger) {\n logger[0, $1ae5573ce493bccc$export$667d3cd09d258d38 /* @min:%2ewarnToConsole */ ](message);\n logger[0, $1ae5573ce493bccc$export$6c078c21a0c6c1ce /* @min:%2ethrowInternal */ ](2 /* eLoggingSeverity.WARNING */ , 108 /* _eInternalMessageId.DynamicConfigException */ , message);\n } else // We don't have a logger so just throw an exception\n (0, $36be0cb20f115b6f$export$e2aa058b2c3c7959)(message);\n}\nfunction $acb30f9e62dc5705$export$3a9e9180c14487fd(config, defaultConfig, logger, inPlace) {\n var dynamicHandler = $acb30f9e62dc5705$var$_createDynamicHandler(logger, config || {}, inPlace);\n if (defaultConfig) dynamicHandler[0, $1ae5573ce493bccc$export$24caac6d68ff1537 /* @min:%2esetDf */ ](dynamicHandler.cfg, defaultConfig);\n return dynamicHandler;\n}\nfunction $acb30f9e62dc5705$export$454a433e4deb244f(config, configHandler, logger) {\n var handler = config[0, $36be0cb20f115b6f$export$3af51e1f665d1d72] || config;\n if (handler.cfg && (handler.cfg === config || handler.cfg[0, $36be0cb20f115b6f$export$3af51e1f665d1d72] === handler)) return handler[0, $1ae5573ce493bccc$export$fc59eec8d77f3766 /* @min:%2ewatch */ ](configHandler);\n $acb30f9e62dc5705$var$_logInvalidAccess(logger, (0, $9fe4a5d5204a4cff$export$80c7dcdabc53a7db) + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(config));\n return $acb30f9e62dc5705$export$3a9e9180c14487fd(config, null, logger)[0, $1ae5573ce493bccc$export$fc59eec8d77f3766 /* @min:%2ewatch */ ](configHandler);\n}\n\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\nvar $12f08319fee74ea0$var$listenerFuncs = [\n (0, $9fe4a5d5204a4cff$export$bb3c4bc1b1175d3d),\n (0, $9fe4a5d5204a4cff$export$bacb5b2f4c1081b9),\n (0, $9fe4a5d5204a4cff$export$d75e063cb88a1c25),\n (0, $9fe4a5d5204a4cff$export$5d265841733c97c3)\n];\nvar $12f08319fee74ea0$var$_aiNamespace = null;\nvar $12f08319fee74ea0$var$_debugListener;\nfunction $12f08319fee74ea0$var$_listenerProxyFunc(name, config) {\n return function() {\n var args = arguments;\n var dbgExt = $12f08319fee74ea0$export$a0b1f407ae6b45dc(config);\n if (dbgExt) {\n var listener = dbgExt.listener;\n if (listener && listener[name]) listener[name][0, $1ae5573ce493bccc$export$2f85ca6962b15ff8 /* @min:%2eapply */ ](listener, args);\n }\n };\n}\nfunction $12f08319fee74ea0$var$_getExtensionNamespace() {\n // Cache the lookup of the global namespace object\n var target = (0, $3d5fcb60a9467a45$export$3df6e51375017edd)(\"Microsoft\");\n if (target) $12f08319fee74ea0$var$_aiNamespace = target[\"ApplicationInsights\"];\n return $12f08319fee74ea0$var$_aiNamespace;\n}\nfunction $12f08319fee74ea0$export$a0b1f407ae6b45dc(config) {\n var ns = $12f08319fee74ea0$var$_aiNamespace;\n if (!ns && config.disableDbgExt !== true) ns = $12f08319fee74ea0$var$_aiNamespace || $12f08319fee74ea0$var$_getExtensionNamespace();\n return ns ? ns[\"ChromeDbgExt\"] : null;\n}\nfunction $12f08319fee74ea0$export$dae5ac50a0df0f5f(config) {\n if (!$12f08319fee74ea0$var$_debugListener) {\n $12f08319fee74ea0$var$_debugListener = {};\n for(var lp = 0; lp < $12f08319fee74ea0$var$listenerFuncs[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ]; lp++)$12f08319fee74ea0$var$_debugListener[$12f08319fee74ea0$var$listenerFuncs[lp]] = $12f08319fee74ea0$var$_listenerProxyFunc($12f08319fee74ea0$var$listenerFuncs[lp], config);\n }\n return $12f08319fee74ea0$var$_debugListener;\n}\n\n\n\n\n\"use strict\";\nvar $cc2aaaebf96ac6a7$var$_a;\nvar $cc2aaaebf96ac6a7$var$STR_WARN_TO_CONSOLE = \"warnToConsole\";\n/**\r\n * For user non actionable traces use AI Internal prefix.\r\n */ var $cc2aaaebf96ac6a7$var$AiNonUserActionablePrefix = \"AI (Internal): \";\n/**\r\n * Prefix of the traces in portal.\r\n */ var $cc2aaaebf96ac6a7$var$AiUserActionablePrefix = \"AI: \";\n/**\r\n * Session storage key for the prefix for the key indicating message type already logged\r\n */ var $cc2aaaebf96ac6a7$var$AIInternalMessagePrefix = \"AITR_\";\nvar $cc2aaaebf96ac6a7$var$defaultValues = {\n loggingLevelConsole: 0,\n loggingLevelTelemetry: 1,\n maxMessageLimit: 25,\n enableDebug: false\n};\nvar $cc2aaaebf96ac6a7$var$_logFuncs = ($cc2aaaebf96ac6a7$var$_a = {}, $cc2aaaebf96ac6a7$var$_a[0 /* eLoggingSeverity.DISABLED */ ] = null, $cc2aaaebf96ac6a7$var$_a[1 /* eLoggingSeverity.CRITICAL */ ] = \"errorToConsole\", $cc2aaaebf96ac6a7$var$_a[2 /* eLoggingSeverity.WARNING */ ] = $cc2aaaebf96ac6a7$var$STR_WARN_TO_CONSOLE, $cc2aaaebf96ac6a7$var$_a[3 /* eLoggingSeverity.DEBUG */ ] = \"debugToConsole\", $cc2aaaebf96ac6a7$var$_a);\nfunction $cc2aaaebf96ac6a7$var$_sanitizeDiagnosticText(text) {\n if (text) return '\"' + text[0, $1ae5573ce493bccc$export$ef9ef3ed86c4485 /* @min:%2ereplace */ ](/\\\"/g, (0, $9fe4a5d5204a4cff$export$5e8607ab26634759)) + '\"';\n return 0, $9fe4a5d5204a4cff$export$5e8607ab26634759;\n}\nfunction $cc2aaaebf96ac6a7$var$_logToConsole(func, message) {\n var theConsole = (0, $0c599844349363c4$export$bbe488cec1edd401)();\n if (!!theConsole) {\n var logFunc = \"log\";\n if (theConsole[func]) logFunc = func;\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(theConsole[logFunc])) theConsole[logFunc](message);\n }\n}\nvar $cc2aaaebf96ac6a7$export$70ef838ed08aad47 = /** @class */ function() {\n function _InternalLogMessage(msgId, msg, isUserAct, properties) {\n if (isUserAct === void 0) isUserAct = false;\n var _self = this;\n _self[0, $1ae5573ce493bccc$export$2cc5b49df2eed261 /* @min:%2emessageId */ ] = msgId;\n _self[0, $1ae5573ce493bccc$export$923606b70907833e /* @min:%2emessage */ ] = (isUserAct ? $cc2aaaebf96ac6a7$var$AiUserActionablePrefix : $cc2aaaebf96ac6a7$var$AiNonUserActionablePrefix) + msgId;\n var strProps = (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n if ((0, $0c599844349363c4$export$a2856ab6913b9fff)()) strProps = (0, $0c599844349363c4$export$d047a7c56db64af4)().stringify(properties);\n var diagnosticText = (msg ? \" message:\" + $cc2aaaebf96ac6a7$var$_sanitizeDiagnosticText(msg) : (0, $9fe4a5d5204a4cff$export$5e8607ab26634759)) + (properties ? \" props:\" + $cc2aaaebf96ac6a7$var$_sanitizeDiagnosticText(strProps) : (0, $9fe4a5d5204a4cff$export$5e8607ab26634759));\n _self[0, $1ae5573ce493bccc$export$923606b70907833e /* @min:%2emessage */ ] += diagnosticText;\n }\n _InternalLogMessage.dataType = \"MessageData\";\n return _InternalLogMessage;\n}();\nfunction $cc2aaaebf96ac6a7$export$5102d32ea1d740a(core, config) {\n return (core || {})[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ] || new $cc2aaaebf96ac6a7$export$4f80edb2e10dc14c(config);\n}\nvar $cc2aaaebf96ac6a7$export$4f80edb2e10dc14c = /** @class */ function() {\n function DiagnosticLogger(config) {\n this.identifier = \"DiagnosticLogger\";\n /**\r\n * The internal logging queue\r\n */ this.queue = [];\n /**\r\n * Count of internal messages sent\r\n */ var _messageCount = 0;\n /**\r\n * Holds information about what message types were already logged to console or sent to server.\r\n */ var _messageLogged = {};\n var _loggingLevelConsole;\n var _loggingLevelTelemetry;\n var _maxInternalMessageLimit;\n var _enableDebug;\n var _unloadHandler;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(DiagnosticLogger, this, function(_self) {\n _unloadHandler = _setDefaultsFromConfig(config || {});\n _self.consoleLoggingLevel = function() {\n return _loggingLevelConsole;\n };\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity - {LoggingSeverity} - The severity of the log message\r\n * @param message - {_InternalLogMessage} - The log message.\r\n */ _self[0, $1ae5573ce493bccc$export$6c078c21a0c6c1ce /* @min:%2ethrowInternal */ ] = function(severity, msgId, msg, properties, isUserAct) {\n if (isUserAct === void 0) isUserAct = false;\n var message = new $cc2aaaebf96ac6a7$export$70ef838ed08aad47(msgId, msg, isUserAct, properties);\n if (_enableDebug) throw (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(message);\n else {\n // Get the logging function and fallback to warnToConsole of for some reason errorToConsole doesn't exist\n var logFunc = $cc2aaaebf96ac6a7$var$_logFuncs[severity] || $cc2aaaebf96ac6a7$var$STR_WARN_TO_CONSOLE;\n if (!(0, $533f826bbc418791$export$fce6876652108ab)(message[0, $1ae5573ce493bccc$export$923606b70907833e /* @min:%2emessage */ ])) {\n if (isUserAct) {\n // check if this message type was already logged to console for this page view and if so, don't log it again\n var messageKey = +message[0, $1ae5573ce493bccc$export$2cc5b49df2eed261 /* @min:%2emessageId */ ];\n if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {\n _self[logFunc](message[0, $1ae5573ce493bccc$export$923606b70907833e /* @min:%2emessage */ ]);\n _messageLogged[messageKey] = true;\n }\n } else // Only log traces if the console Logging Level is >= the throwInternal severity level\n if (_loggingLevelConsole >= severity) _self[logFunc](message[0, $1ae5573ce493bccc$export$923606b70907833e /* @min:%2emessage */ ]);\n _logInternalMessage(severity, message);\n } else _debugExtMsg(\"throw\" + (severity === 1 /* eLoggingSeverity.CRITICAL */ ? \"Critical\" : \"Warning\"), message);\n }\n };\n _self.debugToConsole = function(message) {\n $cc2aaaebf96ac6a7$var$_logToConsole(\"debug\", message);\n _debugExtMsg(\"warning\", message);\n };\n _self[0, $1ae5573ce493bccc$export$667d3cd09d258d38 /* @min:%2ewarnToConsole */ ] = function(message) {\n $cc2aaaebf96ac6a7$var$_logToConsole(\"warn\", message);\n _debugExtMsg(\"warning\", message);\n };\n _self.errorToConsole = function(message) {\n $cc2aaaebf96ac6a7$var$_logToConsole(\"error\", message);\n _debugExtMsg(\"error\", message);\n };\n _self.resetInternalMessageCount = function() {\n _messageCount = 0;\n _messageLogged = {};\n };\n _self[0, $1ae5573ce493bccc$export$6a3333b2109fff2a /* @min:%2elogInternalMessage */ ] = _logInternalMessage;\n _self[0, $1ae5573ce493bccc$export$7eb85b5cba77a43d /* @min:%2eunload */ ] = function(isAsync) {\n _unloadHandler && _unloadHandler.rm();\n _unloadHandler = null;\n };\n function _logInternalMessage(severity, message) {\n if (_areInternalMessagesThrottled()) return;\n // check if this message type was already logged for this session and if so, don't log it again\n var logMessage = true;\n var messageKey = $cc2aaaebf96ac6a7$var$AIInternalMessagePrefix + message[0, $1ae5573ce493bccc$export$2cc5b49df2eed261 /* @min:%2emessageId */ ];\n // if the session storage is not available, limit to only one message type per page view\n if (_messageLogged[messageKey]) logMessage = false;\n else _messageLogged[messageKey] = true;\n if (logMessage) {\n // Push the event in the internal queue\n if (severity <= _loggingLevelTelemetry) {\n _self.queue[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](message);\n _messageCount++;\n _debugExtMsg(severity === 1 /* eLoggingSeverity.CRITICAL */ ? \"error\" : \"warn\", message);\n }\n // When throttle limit reached, send a special event\n if (_messageCount === _maxInternalMessageLimit) {\n var throttleLimitMessage = \"Internal events throttle limit per PageView reached for this app.\";\n var throttleMessage = new $cc2aaaebf96ac6a7$export$70ef838ed08aad47(23 /* _eInternalMessageId.MessageLimitPerPVExceeded */ , throttleLimitMessage, false);\n _self.queue[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](throttleMessage);\n if (severity === 1 /* eLoggingSeverity.CRITICAL */ ) _self.errorToConsole(throttleLimitMessage);\n else _self[0, $1ae5573ce493bccc$export$667d3cd09d258d38 /* @min:%2ewarnToConsole */ ](throttleLimitMessage);\n }\n }\n }\n function _setDefaultsFromConfig(config) {\n // make sure the config is dynamic\n return (0, $acb30f9e62dc5705$export$454a433e4deb244f)((0, $acb30f9e62dc5705$export$3a9e9180c14487fd)(config, $cc2aaaebf96ac6a7$var$defaultValues, _self).cfg, function(details) {\n var config = details.cfg;\n _loggingLevelConsole = config[0, $1ae5573ce493bccc$export$e53d8cae4d527530 /* @min:%2eloggingLevelConsole */ ];\n _loggingLevelTelemetry = config.loggingLevelTelemetry;\n _maxInternalMessageLimit = config.maxMessageLimit;\n _enableDebug = config.enableDebug;\n });\n }\n function _areInternalMessagesThrottled() {\n return _messageCount >= _maxInternalMessageLimit;\n }\n function _debugExtMsg(name, data) {\n var dbgExt = (0, $12f08319fee74ea0$export$a0b1f407ae6b45dc)(config || {});\n if (dbgExt && dbgExt[0, $1ae5573ce493bccc$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ]) dbgExt[0, $1ae5573ce493bccc$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](name, data);\n }\n });\n }\n // Removed Stub for DiagnosticLogger.prototype.consoleLoggingLevel.\n // Removed Stub for DiagnosticLogger.prototype.throwInternal.\n // Removed Stub for DiagnosticLogger.prototype.debugToConsole.\n // Removed Stub for DiagnosticLogger.prototype.warnToConsole.\n // Removed Stub for DiagnosticLogger.prototype.errorToConsole.\n // Removed Stub for DiagnosticLogger.prototype.resetInternalMessageCount.\n // Removed Stub for DiagnosticLogger.prototype.logInternalMessage.\n // Removed Stub for DiagnosticLogger.prototype.unload.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n DiagnosticLogger.__ieDyn = 1;\n return DiagnosticLogger;\n}();\nfunction $cc2aaaebf96ac6a7$var$_getLogger(logger) {\n return logger || new $cc2aaaebf96ac6a7$export$4f80edb2e10dc14c();\n}\nfunction $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4(logger, severity, msgId, msg, properties, isUserAct) {\n if (isUserAct === void 0) isUserAct = false;\n $cc2aaaebf96ac6a7$var$_getLogger(logger)[0, $1ae5573ce493bccc$export$6c078c21a0c6c1ce /* @min:%2ethrowInternal */ ](severity, msgId, msg, properties, isUserAct);\n}\nfunction $cc2aaaebf96ac6a7$export$25fb4cb97863f0a8(logger, message) {\n $cc2aaaebf96ac6a7$var$_getLogger(logger)[0, $1ae5573ce493bccc$export$667d3cd09d258d38 /* @min:%2ewarnToConsole */ ](message);\n}\nfunction $cc2aaaebf96ac6a7$export$e15fbe42d9bc9d3d(logger, severity, message) {\n $cc2aaaebf96ac6a7$var$_getLogger(logger)[0, $1ae5573ce493bccc$export$6a3333b2109fff2a /* @min:%2elogInternalMessage */ ](severity, message);\n}\n\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nvar $db8f3a1d23da96b1$export$b889f1d4cb07c706 = \"split\"; // Count: 6\nvar $db8f3a1d23da96b1$export$6eae51590aaea43 = \"length\"; // Count: 41\nvar $db8f3a1d23da96b1$export$e4eaee9e01d9baaa = \"toLowerCase\"; // Count: 6\nvar $db8f3a1d23da96b1$export$3960f2eafedb8f1 = \"ingestionendpoint\"; // Count: 4\nvar $db8f3a1d23da96b1$export$e2818d11505fa034 = \"toString\"; // Count: 9\nvar $db8f3a1d23da96b1$export$596e0e0dc14a1e9b = \"removeItem\"; // Count: 3\nvar $db8f3a1d23da96b1$export$9734b0a24bf02e93 = \"name\"; // Count: 11\nvar $db8f3a1d23da96b1$export$923606b70907833e = \"message\"; // Count: 10\nvar $db8f3a1d23da96b1$export$e9679ef501b0d1 = \"count\"; // Count: 8\nvar $db8f3a1d23da96b1$export$89a9ed6e0f1c703a = \"preTriggerDate\"; // Count: 4\nvar $db8f3a1d23da96b1$export$bf48f5cc9167f468 = \"disabled\"; // Count: 3\nvar $db8f3a1d23da96b1$export$67d4e5d95e63e1b3 = \"interval\"; // Count: 3\nvar $db8f3a1d23da96b1$export$ffc8d7f1d37c54ec = \"daysOfMonth\"; // Count: 3\nvar $db8f3a1d23da96b1$export$abbddaba4ad71f38 = \"date\"; // Count: 5\nvar $db8f3a1d23da96b1$export$44cd8e854cee592d = \"getUTCDate\"; // Count: 3\nvar $db8f3a1d23da96b1$export$a318a8141fc98747 = \"stringify\"; // Count: 4\nvar $db8f3a1d23da96b1$export$34ec22d747521ad = \"pathname\"; // Count: 4\nvar $db8f3a1d23da96b1$export$89ce3552c03e8ec9 = \"correlationHeaderExcludePatterns\"; // Count: 2\nvar $db8f3a1d23da96b1$export$e298802ab42a3b7f = \"extensionConfig\"; // Count: 4\nvar $db8f3a1d23da96b1$export$967696d490ed5a4a = \"exceptions\"; // Count: 6\nvar $db8f3a1d23da96b1$export$4b848bcab7cafe5d = \"parsedStack\"; // Count: 13\nvar $db8f3a1d23da96b1$export$14814e6f9bf337b4 = \"properties\"; // Count: 9\nvar $db8f3a1d23da96b1$export$32fc64677eb5b7a2 = \"measurements\"; // Count: 9\nvar $db8f3a1d23da96b1$export$59a1581bc81a9aae = \"sizeInBytes\"; // Count: 11\nvar $db8f3a1d23da96b1$export$6008dba8ea08a587 = \"typeName\"; // Count: 11\nvar $db8f3a1d23da96b1$export$2675b0014c60aa10 = \"severityLevel\"; // Count: 5\nvar $db8f3a1d23da96b1$export$5bc84cbcfe97e161 = \"problemGroup\"; // Count: 3\nvar $db8f3a1d23da96b1$export$880f71e9a894c474 = \"isManual\"; // Count: 3\nvar $db8f3a1d23da96b1$export$aadef743ee7d1db8 = \"CreateFromInterface\"; // Count: 2\nvar $db8f3a1d23da96b1$export$7e3ee7b01672f321 = \"assembly\"; // Count: 7\nvar $db8f3a1d23da96b1$export$b1b7551538b2085 = \"hasFullStack\"; // Count: 6\nvar $db8f3a1d23da96b1$export$25f3022e0cda8855 = \"level\"; // Count: 5\nvar $db8f3a1d23da96b1$export$47d30bd816d62bdc = \"method\"; // Count: 7\nvar $db8f3a1d23da96b1$export$8ea03ef8a4bcfeeb = \"fileName\"; // Count: 6\nvar $db8f3a1d23da96b1$export$138215f6c1f0eedf = \"line\"; // Count: 6\nvar $db8f3a1d23da96b1$export$aa395e58f404db90 = \"duration\"; // Count: 4\nvar $db8f3a1d23da96b1$export$e046465ee502552 = \"receivedResponse\"; // Count: 2\n\n\nfunction $8c3059962bb1d83c$export$1e3742b0a5fad0e9(logger, key, map) {\n var origLength = key[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ];\n var field = $8c3059962bb1d83c$export$100c3b44eeb2bd0b(logger, key);\n // validation truncated the length. We need to add uniqueness\n if (field[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] !== origLength) {\n var i = 0;\n var uniqueField = field;\n while(map[uniqueField] !== undefined){\n i++;\n uniqueField = (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(field, 0, 147) + $8c3059962bb1d83c$export$d924cb9df01a6484(i);\n }\n field = uniqueField;\n }\n return field;\n}\nfunction $8c3059962bb1d83c$export$100c3b44eeb2bd0b(logger, name) {\n var nameTrunc;\n if (name) {\n // Remove any leading or trailing whitespace\n name = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)((0, $d813f4522b40a37e$export$590567be997858b6)(name));\n // truncate the string to 150 chars\n if (name[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 150 /* DataSanitizerValues.MAX_NAME_LENGTH */ ) {\n nameTrunc = (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(name, 0, 150 /* DataSanitizerValues.MAX_NAME_LENGTH */ );\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 57 /* _eInternalMessageId.NameTooLong */ , \"name is too long. It has been truncated to 150 characters.\", {\n name: name\n }, true);\n }\n }\n return nameTrunc || name;\n}\nfunction $8c3059962bb1d83c$export$4e25b1d4bcd67eb8(logger, value, maxLength) {\n if (maxLength === void 0) maxLength = 1024 /* DataSanitizerValues.MAX_STRING_LENGTH */ ;\n var valueTrunc;\n if (value) {\n maxLength = maxLength ? maxLength : 1024 /* DataSanitizerValues.MAX_STRING_LENGTH */ ; // in case default parameters dont work\n value = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)((0, $d813f4522b40a37e$export$590567be997858b6)(value));\n if (value[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > maxLength) {\n valueTrunc = (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(value, 0, maxLength);\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 61 /* _eInternalMessageId.StringValueTooLong */ , \"string value is too long. It has been truncated to \" + maxLength + \" characters.\", {\n value: value\n }, true);\n }\n }\n return valueTrunc || value;\n}\nfunction $8c3059962bb1d83c$export$356146502a9f860c(logger, url) {\n return $8c3059962bb1d83c$export$8860beb3484248f1(logger, url, 2048 /* DataSanitizerValues.MAX_URL_LENGTH */ , 66 /* _eInternalMessageId.UrlTooLong */ );\n}\nfunction $8c3059962bb1d83c$export$dff84a9939b48dc0(logger, message) {\n var messageTrunc;\n if (message) {\n if (message[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 32768 /* DataSanitizerValues.MAX_MESSAGE_LENGTH */ ) {\n messageTrunc = (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(message, 0, 32768 /* DataSanitizerValues.MAX_MESSAGE_LENGTH */ );\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 56 /* _eInternalMessageId.MessageTruncated */ , \"message is too long, it has been truncated to 32768 characters.\", {\n message: message\n }, true);\n }\n }\n return messageTrunc || message;\n}\nfunction $8c3059962bb1d83c$export$e47d8a961052f8bc(logger, exception) {\n var exceptionTrunc;\n if (exception) {\n // Make surte its a string\n var value = \"\" + exception;\n if (value[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 32768 /* DataSanitizerValues.MAX_EXCEPTION_LENGTH */ ) {\n exceptionTrunc = (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(value, 0, 32768 /* DataSanitizerValues.MAX_EXCEPTION_LENGTH */ );\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 52 /* _eInternalMessageId.ExceptionTruncated */ , \"exception is too long, it has been truncated to 32768 characters.\", {\n exception: exception\n }, true);\n }\n }\n return exceptionTrunc || exception;\n}\nfunction $8c3059962bb1d83c$export$efba9e468fe3b2cf(logger, properties) {\n if (properties) {\n var tempProps_1 = {};\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(properties, function(prop, value) {\n if ((0, $533f826bbc418791$export$a6cdc56e425d0d0a)(value) && (0, $0c599844349363c4$export$a2856ab6913b9fff)()) // Stringify any part C properties\n try {\n value = (0, $0c599844349363c4$export$d047a7c56db64af4)()[0, $db8f3a1d23da96b1$export$a318a8141fc98747 /* @min:%2estringify */ ](value);\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 49 /* _eInternalMessageId.CannotSerializeObjectNonSerializable */ , \"custom property is not valid\", {\n exception: e\n }, true);\n }\n value = $8c3059962bb1d83c$export$4e25b1d4bcd67eb8(logger, value, 8192 /* DataSanitizerValues.MAX_PROPERTY_LENGTH */ );\n prop = $8c3059962bb1d83c$export$1e3742b0a5fad0e9(logger, prop, tempProps_1);\n tempProps_1[prop] = value;\n });\n properties = tempProps_1;\n }\n return properties;\n}\nfunction $8c3059962bb1d83c$export$3f0e10abe91e800b(logger, measurements) {\n if (measurements) {\n var tempMeasurements_1 = {};\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(measurements, function(measure, value) {\n measure = $8c3059962bb1d83c$export$1e3742b0a5fad0e9(logger, measure, tempMeasurements_1);\n tempMeasurements_1[measure] = value;\n });\n measurements = tempMeasurements_1;\n }\n return measurements;\n}\nfunction $8c3059962bb1d83c$export$808d3905d3d31f01(logger, id) {\n return id ? $8c3059962bb1d83c$export$8860beb3484248f1(logger, id, 128 /* DataSanitizerValues.MAX_ID_LENGTH */ , 69 /* _eInternalMessageId.IdTooLong */ )[0, $db8f3a1d23da96b1$export$e2818d11505fa034 /* @min:%2etoString */ ]() : id;\n}\nfunction $8c3059962bb1d83c$export$8860beb3484248f1(logger, input, maxLength, _msgId) {\n var inputTrunc;\n if (input) {\n input = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)((0, $d813f4522b40a37e$export$590567be997858b6)(input));\n if (input[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > maxLength) {\n inputTrunc = (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(input, 0, maxLength);\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , _msgId, \"input is too long, it has been truncated to \" + maxLength + \" characters.\", {\n data: input\n }, true);\n }\n }\n return inputTrunc || input;\n}\nfunction $8c3059962bb1d83c$export$d924cb9df01a6484(num) {\n var s = \"00\" + num;\n return (0, $c3f3bf8012a4b2d4$export$25b2a9bb66b0078d)(s, s[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] - 3);\n}\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\nvar $8ef642882a9aa00a$var$_document = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)() || {};\nvar $8ef642882a9aa00a$var$_htmlAnchorIdx = 0;\n// Use an array of temporary values as it's possible for multiple calls to parseUrl() will be called with different URLs\n// Using a cache size of 5 for now as it current depth usage is at least 2, so adding a minor buffer to handle future updates\nvar $8ef642882a9aa00a$var$_htmlAnchorElement = [\n null,\n null,\n null,\n null,\n null\n];\nfunction $8ef642882a9aa00a$export$7121b8cb971a9df2(url) {\n var anchorIdx = $8ef642882a9aa00a$var$_htmlAnchorIdx;\n var anchorCache = $8ef642882a9aa00a$var$_htmlAnchorElement;\n var tempAnchor = anchorCache[anchorIdx];\n if (!$8ef642882a9aa00a$var$_document.createElement) // Always create the temp instance if createElement is not available\n tempAnchor = {\n host: $8ef642882a9aa00a$export$ff1d1b7a9bae98f(url, true)\n };\n else if (!anchorCache[anchorIdx]) // Create and cache the unattached anchor instance\n tempAnchor = anchorCache[anchorIdx] = $8ef642882a9aa00a$var$_document.createElement(\"a\");\n tempAnchor.href = url;\n // Move the cache index forward\n anchorIdx++;\n if (anchorIdx >= anchorCache[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ]) anchorIdx = 0;\n $8ef642882a9aa00a$var$_htmlAnchorIdx = anchorIdx;\n return tempAnchor;\n}\nfunction $8ef642882a9aa00a$export$a98678973ebe2123(url) {\n var result;\n var a = $8ef642882a9aa00a$export$7121b8cb971a9df2(url);\n if (a) result = a.href;\n return result;\n}\nfunction $8ef642882a9aa00a$export$d19e0ccf7100cfb3(url) {\n var result;\n var a = $8ef642882a9aa00a$export$7121b8cb971a9df2(url);\n if (a) result = a[0, $db8f3a1d23da96b1$export$34ec22d747521ad /* @min:%2epathname */ ];\n return result;\n}\nfunction $8ef642882a9aa00a$export$b959f3bc0a239498(method, absoluteUrl) {\n if (method) return method.toUpperCase() + \" \" + absoluteUrl;\n return absoluteUrl;\n}\nfunction $8ef642882a9aa00a$export$ff1d1b7a9bae98f(url, inclPort) {\n var fullHost = $8ef642882a9aa00a$export$eac70d47569302de(url, inclPort) || \"\";\n if (fullHost) {\n var match = fullHost.match(/(www\\d{0,5}\\.)?([^\\/:]{1,256})(:\\d{1,20})?/i);\n if (match != null && match[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 3 && (0, $533f826bbc418791$export$844ec244b1367d54)(match[2]) && match[2][0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) return match[2] + (match[3] || \"\");\n }\n return fullHost;\n}\nfunction $8ef642882a9aa00a$export$eac70d47569302de(url, inclPort) {\n var result = null;\n if (url) {\n var match = url.match(/(\\w{1,150}):\\/\\/([^\\/:]{1,256})(:\\d{1,20})?/i);\n if (match != null && match[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 2 && (0, $533f826bbc418791$export$844ec244b1367d54)(match[2]) && match[2][0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n result = match[2] || \"\";\n if (inclPort && match[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 2) {\n var protocol = (match[1] || \"\")[0, $db8f3a1d23da96b1$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]();\n var port = match[3] || \"\";\n // IE includes the standard port so pass it off if it's the same as the protocol\n if (protocol === \"http\" && port === \":80\") port = \"\";\n else if (protocol === \"https\" && port === \":443\") port = \"\";\n result += port;\n }\n }\n }\n return result;\n}\n\n\n\n// listing only non-geo specific locations\nvar $d98b699aeccdabc6$var$_internalEndpoints = [\n (0, $71dfba5ea0640485$export$5c9ec0fce655ebcf) + (0, $71dfba5ea0640485$export$e6c0f3431c6cd728),\n \"https://breeze.aimon.applicationinsights.io\" + (0, $71dfba5ea0640485$export$e6c0f3431c6cd728),\n \"https://dc-int.services.visualstudio.com\" + (0, $71dfba5ea0640485$export$e6c0f3431c6cd728)\n];\nvar $d98b699aeccdabc6$var$_correlationIdPrefix = \"cid-v1:\";\nfunction $d98b699aeccdabc6$export$edade5317663baa4(endpointUrl) {\n return (0, $a96d4958027d6f85$export$9f3b3ffa84393d30)($d98b699aeccdabc6$var$_internalEndpoints, endpointUrl[0, $db8f3a1d23da96b1$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]()) !== -1;\n}\nfunction $d98b699aeccdabc6$export$11cd7bb42a058181(prefix) {\n $d98b699aeccdabc6$var$_correlationIdPrefix = prefix;\n}\nfunction $d98b699aeccdabc6$export$34b74e57304d137() {\n return $d98b699aeccdabc6$var$_correlationIdPrefix;\n}\nfunction $d98b699aeccdabc6$export$a62d10d7f896c08c(config, requestUrl, currentHost) {\n if (!requestUrl || config && config.disableCorrelationHeaders) return false;\n if (config && config[0, $db8f3a1d23da96b1$export$89ce3552c03e8ec9 /* @min:%2ecorrelationHeaderExcludePatterns */ ]) for(var i = 0; i < config.correlationHeaderExcludePatterns[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ]; i++){\n if (config[0, $db8f3a1d23da96b1$export$89ce3552c03e8ec9 /* @min:%2ecorrelationHeaderExcludePatterns */ ][i].test(requestUrl)) return false;\n }\n var requestHost = (0, $8ef642882a9aa00a$export$7121b8cb971a9df2)(requestUrl).host[0, $db8f3a1d23da96b1$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]();\n if (requestHost && ((0, $0194d45a55d79548$export$7c0888b0c4641088)(requestHost, \":443\") !== -1 || (0, $0194d45a55d79548$export$7c0888b0c4641088)(requestHost, \":80\") !== -1)) // [Bug #1260] IE can include the port even for http and https URLs so if present\n // try and parse it to remove if it matches the default protocol port\n requestHost = ((0, $8ef642882a9aa00a$export$eac70d47569302de)(requestUrl, true) || \"\")[0, $db8f3a1d23da96b1$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]();\n if ((!config || !config.enableCorsCorrelation) && requestHost && requestHost !== currentHost) return false;\n var includedDomains = config && config.correlationHeaderDomains;\n if (includedDomains) {\n var matchExists_1;\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(includedDomains, function(domain) {\n var regex = new RegExp(domain.toLowerCase().replace(/\\\\/g, \"\\\\\\\\\").replace(/\\./g, \"\\\\.\").replace(/\\*/g, \".*\"));\n matchExists_1 = matchExists_1 || regex.test(requestHost);\n });\n if (!matchExists_1) return false;\n }\n var excludedDomains = config && config.correlationHeaderExcludedDomains;\n if (!excludedDomains || excludedDomains[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] === 0) return true;\n for(var i = 0; i < excludedDomains[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ]; i++){\n var regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\\\\/g, \"\\\\\\\\\").replace(/\\./g, \"\\\\.\").replace(/\\*/g, \".*\"));\n if (regex.test(requestHost)) return false;\n }\n // if we don't know anything about the requestHost, require the user to use included/excludedDomains.\n // Previously we always returned false for a falsy requestHost\n return requestHost && requestHost[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 0;\n}\nfunction $d98b699aeccdabc6$export$dbaf37203f788583(responseHeader) {\n if (responseHeader) {\n var correlationId = $d98b699aeccdabc6$export$23620a0eaa22fb00(responseHeader, (0, $78a4729d55fca66a$export$e499e02a1fe05177)[1 /* eRequestHeaders.requestContextTargetKey */ ]);\n if (correlationId && correlationId !== $d98b699aeccdabc6$var$_correlationIdPrefix) return correlationId;\n }\n}\nfunction $d98b699aeccdabc6$export$23620a0eaa22fb00(responseHeader, key) {\n if (responseHeader) {\n var keyValues = responseHeader[0, $db8f3a1d23da96b1$export$b889f1d4cb07c706 /* @min:%2esplit */ ](\",\");\n for(var i = 0; i < keyValues[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ]; ++i){\n var keyValue = keyValues[i][0, $db8f3a1d23da96b1$export$b889f1d4cb07c706 /* @min:%2esplit */ ](\"=\");\n if (keyValue[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] === 2 && keyValue[0] === key) return keyValue[1];\n }\n }\n}\nfunction $d98b699aeccdabc6$export$92b0aba7cb1d0e30(logger, absoluteUrl, method, commandName) {\n var target, name = commandName, data = commandName;\n if (absoluteUrl && absoluteUrl[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n var parsedUrl = (0, $8ef642882a9aa00a$export$7121b8cb971a9df2)(absoluteUrl);\n target = parsedUrl.host;\n if (!name) {\n if (parsedUrl[0, $db8f3a1d23da96b1$export$34ec22d747521ad /* @min:%2epathname */ ] != null) {\n var pathName = parsedUrl.pathname[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] === 0 ? \"/\" : parsedUrl[0, $db8f3a1d23da96b1$export$34ec22d747521ad /* @min:%2epathname */ ];\n if (pathName.charAt(0) !== \"/\") pathName = \"/\" + pathName;\n data = parsedUrl[0, $db8f3a1d23da96b1$export$34ec22d747521ad /* @min:%2epathname */ ];\n name = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, method ? method + \" \" + pathName : pathName);\n } else name = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, absoluteUrl);\n }\n } else {\n target = commandName;\n name = commandName;\n }\n return {\n target: target,\n name: name,\n data: data\n };\n}\nfunction $d98b699aeccdabc6$export$30a447e32c58a836() {\n // returns the window or webworker performance object\n var perf = (0, $824d7bc9d9e48f68$export$28a0276e10aa78d7)();\n if (perf && perf.now && perf.timing) {\n var now = perf.now() + perf.timing.navigationStart;\n // Known issue with IE where this calculation can be negative, so if it is then ignore and fallback\n if (now > 0) return now;\n }\n return (0, $628cad25a0769458$export$a56f095995763cca)();\n}\nfunction $d98b699aeccdabc6$export$bfc7deb7f4f00987(start, end) {\n var result = null;\n if (start !== 0 && end !== 0 && !(0, $533f826bbc418791$export$bedb7023a7733221)(start) && !(0, $533f826bbc418791$export$bedb7023a7733221)(end)) result = end - start;\n return result;\n}\nfunction $d98b699aeccdabc6$export$847d5dabba5fabb9(telemetryTrace, parentCtx) {\n var trace = telemetryTrace || {};\n return {\n getName: function() {\n return trace[0, $db8f3a1d23da96b1$export$9734b0a24bf02e93 /* @min:%2ename */ ];\n },\n setName: function(newValue) {\n parentCtx && parentCtx.setName(newValue);\n trace[0, $db8f3a1d23da96b1$export$9734b0a24bf02e93 /* @min:%2ename */ ] = newValue;\n },\n getTraceId: function() {\n return trace.traceID;\n },\n setTraceId: function(newValue) {\n parentCtx && parentCtx.setTraceId(newValue);\n if ((0, $6f47dad7a26666b5$export$29dd34cf1269f6da)(newValue)) trace.traceID = newValue;\n },\n getSpanId: function() {\n return trace.parentID;\n },\n setSpanId: function(newValue) {\n parentCtx && parentCtx.setSpanId(newValue);\n if ((0, $6f47dad7a26666b5$export$8e51c6d8f0586aff)(newValue)) trace.parentID = newValue;\n },\n getTraceFlags: function() {\n return trace.traceFlags;\n },\n setTraceFlags: function(newTraceFlags) {\n parentCtx && parentCtx.setTraceFlags(newTraceFlags);\n trace.traceFlags = newTraceFlags;\n }\n };\n}\n\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\nvar $63cf4b7ad6b789c0$export$a16e2b23dbd5466c = (0, $d491d25af4ac425c$export$34d1cd0b62238dad)(\"reduce\", (0, $b347daff6f5f8dc1$export$f3f471c81a14426));\n\n\n\n\nvar $41f84b9a47a38dfe$var$_FIELDS_SEPARATOR = \";\";\nvar $41f84b9a47a38dfe$var$_FIELD_KEY_VALUE_SEPARATOR = \"=\";\nfunction $41f84b9a47a38dfe$export$6369f286b474466d(connectionString) {\n if (!connectionString) return {};\n var kvPairs = connectionString[0, $db8f3a1d23da96b1$export$b889f1d4cb07c706 /* @min:%2esplit */ ]($41f84b9a47a38dfe$var$_FIELDS_SEPARATOR);\n var result = (0, $63cf4b7ad6b789c0$export$a16e2b23dbd5466c)(kvPairs, function(fields, kv) {\n var kvParts = kv[0, $db8f3a1d23da96b1$export$b889f1d4cb07c706 /* @min:%2esplit */ ]($41f84b9a47a38dfe$var$_FIELD_KEY_VALUE_SEPARATOR);\n if (kvParts[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] === 2) {\n var key = kvParts[0][0, $db8f3a1d23da96b1$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]();\n var value = kvParts[1];\n fields[key] = value;\n }\n return fields;\n }, {});\n if ((0, $36a077d9f4439b69$export$f7628dc18f4211e5)(result)[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n // this is a valid connection string, so parse the results\n if (result.endpointsuffix) {\n // use endpoint suffix where overrides are not provided\n var locationPrefix = result.location ? result.location + \".\" : \"\";\n result[0, $db8f3a1d23da96b1$export$3960f2eafedb8f1 /* @min:%2eingestionendpoint */ ] = result[0, $db8f3a1d23da96b1$export$3960f2eafedb8f1 /* @min:%2eingestionendpoint */ ] || \"https://\" + locationPrefix + \"dc.\" + result.endpointsuffix;\n }\n // apply the default endpoints\n result[0, $db8f3a1d23da96b1$export$3960f2eafedb8f1 /* @min:%2eingestionendpoint */ ] = result[0, $db8f3a1d23da96b1$export$3960f2eafedb8f1 /* @min:%2eingestionendpoint */ ] || (0, $71dfba5ea0640485$export$5c9ec0fce655ebcf);\n }\n return result;\n}\nvar $41f84b9a47a38dfe$export$9fc8be9be2105769 = {\n parse: $41f84b9a47a38dfe$export$6369f286b474466d\n};\n\n\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\nvar $a383874e4b463649$export$4e2d65a9843399df = /** @class */ function() {\n /**\r\n * Constructs a new instance of telemetry data.\r\n */ function Envelope(logger, data, name) {\n var _this = this;\n var _self = this;\n _self.ver = 1;\n _self.sampleRate = 100.0;\n _self.tags = {};\n _self[0, $db8f3a1d23da96b1$export$9734b0a24bf02e93 /* @min:%2ename */ ] = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, name) || (0, $71dfba5ea0640485$export$4003f5e1672d759);\n _self.data = data;\n _self.time = (0, $0b747974b0bb3563$export$dfaaa8705752128f)(new Date());\n _self.aiDataContract = {\n time: 1 /* FieldType.Required */ ,\n iKey: 1 /* FieldType.Required */ ,\n name: 1 /* FieldType.Required */ ,\n sampleRate: function() {\n return _this.sampleRate === 100 ? 4 /* FieldType.Hidden */ : 1 /* FieldType.Required */ ;\n },\n tags: 1 /* FieldType.Required */ ,\n data: 1 /* FieldType.Required */ \n };\n }\n return Envelope;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\nvar $9bdc8b7e7935e83a$export$d61e24a684f9e51 = /** @class */ function() {\n /**\r\n * Constructs a new instance of the EventTelemetry object\r\n */ function Event(logger, name, properties, measurements) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */ ,\n name: 1 /* FieldType.Required */ ,\n properties: 0 /* FieldType.Default */ ,\n measurements: 0 /* FieldType.Default */ \n };\n var _self = this;\n _self.ver = 2;\n _self[0, $db8f3a1d23da96b1$export$9734b0a24bf02e93 /* @min:%2ename */ ] = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, name) || (0, $71dfba5ea0640485$export$4003f5e1672d759);\n _self[0, $db8f3a1d23da96b1$export$14814e6f9bf337b4 /* @min:%2eproperties */ ] = (0, $8c3059962bb1d83c$export$efba9e468fe3b2cf)(logger, properties);\n _self[0, $db8f3a1d23da96b1$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] = (0, $8c3059962bb1d83c$export$3f0e10abe91e800b)(logger, measurements);\n }\n Event.envelopeType = \"Microsoft.ApplicationInsights.{0}.Event\";\n Event.dataType = \"EventData\";\n return Event;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\nvar $7ce500be4896551d$export$76f1a28030e24fa6 = (0, $d491d25af4ac425c$export$34d1cd0b62238dad)(\"map\", (0, $b347daff6f5f8dc1$export$f3f471c81a14426));\n\n\n\n\n\n\nvar $1e8d24b24fb574aa$var$NoMethod = \"\";\nvar $1e8d24b24fb574aa$var$strError = \"error\";\nvar $1e8d24b24fb574aa$var$strStack = \"stack\";\nvar $1e8d24b24fb574aa$var$strStackDetails = \"stackDetails\";\nvar $1e8d24b24fb574aa$var$strErrorSrc = \"errorSrc\";\nvar $1e8d24b24fb574aa$var$strMessage = \"message\";\nvar $1e8d24b24fb574aa$var$strDescription = \"description\";\nfunction $1e8d24b24fb574aa$var$_stringify(value, convertToString) {\n var result = value;\n if (result && !(0, $533f826bbc418791$export$844ec244b1367d54)(result)) {\n if (JSON && JSON[0, $db8f3a1d23da96b1$export$a318a8141fc98747 /* @min:%2estringify */ ]) {\n result = JSON[0, $db8f3a1d23da96b1$export$a318a8141fc98747 /* @min:%2estringify */ ](value);\n if (convertToString && (!result || result === \"{}\")) {\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(value[0, $db8f3a1d23da96b1$export$e2818d11505fa034 /* @min:%2etoString */ ])) result = value[0, $db8f3a1d23da96b1$export$e2818d11505fa034 /* @min:%2etoString */ ]();\n else result = \"\" + value;\n }\n } else result = \"\" + value + \" - (Missing JSON.stringify)\";\n }\n return result || \"\";\n}\nfunction $1e8d24b24fb574aa$var$_formatMessage(theEvent, errorType) {\n var evtMessage = theEvent;\n if (theEvent) {\n if (evtMessage && !(0, $533f826bbc418791$export$844ec244b1367d54)(evtMessage)) evtMessage = theEvent[$1e8d24b24fb574aa$var$strMessage] || theEvent[$1e8d24b24fb574aa$var$strDescription] || evtMessage;\n // Make sure the message is a string\n if (evtMessage && !(0, $533f826bbc418791$export$844ec244b1367d54)(evtMessage)) // tslint:disable-next-line: prefer-conditional-expression\n evtMessage = $1e8d24b24fb574aa$var$_stringify(evtMessage, true);\n if (theEvent[\"filename\"]) // Looks like an event object with filename\n evtMessage = evtMessage + \" @\" + (theEvent[\"filename\"] || \"\") + \":\" + (theEvent[\"lineno\"] || \"?\") + \":\" + (theEvent[\"colno\"] || \"?\");\n }\n // Automatically add the error type to the message if it does already appear to be present\n if (errorType && errorType !== \"String\" && errorType !== \"Object\" && errorType !== \"Error\" && (0, $0194d45a55d79548$export$7c0888b0c4641088)(evtMessage || \"\", errorType) === -1) evtMessage = errorType + \": \" + evtMessage;\n return evtMessage || \"\";\n}\nfunction $1e8d24b24fb574aa$var$_isExceptionDetailsInternal(value) {\n try {\n if ((0, $533f826bbc418791$export$a6cdc56e425d0d0a)(value)) return \"hasFullStack\" in value && \"typeName\" in value;\n } catch (e) {\n // This can happen with some native browser objects, but should not happen for the type we are checking for\n }\n return false;\n}\nfunction $1e8d24b24fb574aa$var$_isExceptionInternal(value) {\n try {\n if ((0, $533f826bbc418791$export$a6cdc56e425d0d0a)(value)) return \"ver\" in value && \"exceptions\" in value && \"properties\" in value;\n } catch (e) {\n // This can happen with some native browser objects, but should not happen for the type we are checking for\n }\n return false;\n}\nfunction $1e8d24b24fb574aa$var$_isStackDetails(details) {\n return details && details.src && (0, $533f826bbc418791$export$844ec244b1367d54)(details.src) && details.obj && (0, $533f826bbc418791$export$43bee75e5e14138e)(details.obj);\n}\nfunction $1e8d24b24fb574aa$var$_convertStackObj(errorStack) {\n var src = errorStack || \"\";\n if (!(0, $533f826bbc418791$export$844ec244b1367d54)(src)) {\n if ((0, $533f826bbc418791$export$844ec244b1367d54)(src[$1e8d24b24fb574aa$var$strStack])) src = src[$1e8d24b24fb574aa$var$strStack];\n else src = \"\" + src;\n }\n var items = src[0, $db8f3a1d23da96b1$export$b889f1d4cb07c706 /* @min:%2esplit */ ](\"\\n\");\n return {\n src: src,\n obj: items\n };\n}\nfunction $1e8d24b24fb574aa$var$_getOperaStack(errorMessage) {\n var stack = [];\n var lines = errorMessage[0, $db8f3a1d23da96b1$export$b889f1d4cb07c706 /* @min:%2esplit */ ](\"\\n\");\n for(var lp = 0; lp < lines[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ]; lp++){\n var entry = lines[lp];\n if (lines[lp + 1]) {\n entry += \"@\" + lines[lp + 1];\n lp++;\n }\n stack.push(entry);\n }\n return {\n src: errorMessage,\n obj: stack\n };\n}\nfunction $1e8d24b24fb574aa$var$_getStackFromErrorObj(errorObj) {\n var details = null;\n if (errorObj) try {\n /* Using bracket notation is support older browsers (IE 7/8 -- dont remember the version) that throw when using dot\r\n notation for undefined objects and we don't want to loose the error from being reported */ if (errorObj[$1e8d24b24fb574aa$var$strStack]) // Chrome/Firefox\n details = $1e8d24b24fb574aa$var$_convertStackObj(errorObj[$1e8d24b24fb574aa$var$strStack]);\n else if (errorObj[$1e8d24b24fb574aa$var$strError] && errorObj[$1e8d24b24fb574aa$var$strError][$1e8d24b24fb574aa$var$strStack]) // Edge error event provides the stack and error object\n details = $1e8d24b24fb574aa$var$_convertStackObj(errorObj[$1e8d24b24fb574aa$var$strError][$1e8d24b24fb574aa$var$strStack]);\n else if (errorObj[\"exception\"] && errorObj.exception[$1e8d24b24fb574aa$var$strStack]) details = $1e8d24b24fb574aa$var$_convertStackObj(errorObj.exception[$1e8d24b24fb574aa$var$strStack]);\n else if ($1e8d24b24fb574aa$var$_isStackDetails(errorObj)) details = errorObj;\n else if ($1e8d24b24fb574aa$var$_isStackDetails(errorObj[$1e8d24b24fb574aa$var$strStackDetails])) details = errorObj[$1e8d24b24fb574aa$var$strStackDetails];\n else if (window && window[\"opera\"] && errorObj[$1e8d24b24fb574aa$var$strMessage]) // Opera\n details = $1e8d24b24fb574aa$var$_getOperaStack(errorObj[0, $db8f3a1d23da96b1$export$923606b70907833e /* @min:%2emessage */ ]);\n else if (errorObj[\"reason\"] && errorObj.reason[$1e8d24b24fb574aa$var$strStack]) // UnhandledPromiseRejection\n details = $1e8d24b24fb574aa$var$_convertStackObj(errorObj.reason[$1e8d24b24fb574aa$var$strStack]);\n else if ((0, $533f826bbc418791$export$844ec244b1367d54)(errorObj)) details = $1e8d24b24fb574aa$var$_convertStackObj(errorObj);\n else {\n var evtMessage = errorObj[$1e8d24b24fb574aa$var$strMessage] || errorObj[$1e8d24b24fb574aa$var$strDescription] || \"\";\n if ((0, $533f826bbc418791$export$844ec244b1367d54)(errorObj[$1e8d24b24fb574aa$var$strErrorSrc])) {\n if (evtMessage) evtMessage += \"\\n\";\n evtMessage += \" from \" + errorObj[$1e8d24b24fb574aa$var$strErrorSrc];\n }\n if (evtMessage) details = $1e8d24b24fb574aa$var$_convertStackObj(evtMessage);\n }\n } catch (e) {\n // something unexpected happened so to avoid failing to report any error lets swallow the exception\n // and fallback to the callee/caller method\n details = $1e8d24b24fb574aa$var$_convertStackObj(e);\n }\n return details || {\n src: \"\",\n obj: null\n };\n}\nfunction $1e8d24b24fb574aa$var$_formatStackTrace(stackDetails) {\n var stack = \"\";\n if (stackDetails) {\n if (stackDetails.obj) (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(stackDetails.obj, function(entry) {\n stack += entry + \"\\n\";\n });\n else stack = stackDetails.src || \"\";\n }\n return stack;\n}\nfunction $1e8d24b24fb574aa$var$_parseStack(stack) {\n var parsedStack;\n var frames = stack.obj;\n if (frames && frames[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n parsedStack = [];\n var level_1 = 0;\n var totalSizeInBytes_1 = 0;\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(frames, function(frame) {\n var theFrame = frame[0, $db8f3a1d23da96b1$export$e2818d11505fa034 /* @min:%2etoString */ ]();\n if ($1e8d24b24fb574aa$export$b9d0519a34c90616.regex.test(theFrame)) {\n var parsedFrame = new $1e8d24b24fb574aa$export$b9d0519a34c90616(theFrame, level_1++);\n totalSizeInBytes_1 += parsedFrame[0, $db8f3a1d23da96b1$export$59a1581bc81a9aae /* @min:%2esizeInBytes */ ];\n parsedStack.push(parsedFrame);\n }\n });\n // DP Constraint - exception parsed stack must be < 32KB\n // remove frames from the middle to meet the threshold\n var exceptionParsedStackThreshold = 32768;\n if (totalSizeInBytes_1 > exceptionParsedStackThreshold) {\n var left = 0;\n var right = parsedStack[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] - 1;\n var size = 0;\n var acceptedLeft = left;\n var acceptedRight = right;\n while(left < right){\n // check size\n var lSize = parsedStack[left][0, $db8f3a1d23da96b1$export$59a1581bc81a9aae /* @min:%2esizeInBytes */ ];\n var rSize = parsedStack[right][0, $db8f3a1d23da96b1$export$59a1581bc81a9aae /* @min:%2esizeInBytes */ ];\n size += lSize + rSize;\n if (size > exceptionParsedStackThreshold) {\n // remove extra frames from the middle\n var howMany = acceptedRight - acceptedLeft + 1;\n parsedStack.splice(acceptedLeft, howMany);\n break;\n }\n // update pointers\n acceptedLeft = left;\n acceptedRight = right;\n left++;\n right--;\n }\n }\n }\n return parsedStack;\n}\nfunction $1e8d24b24fb574aa$var$_getErrorType(errorType) {\n // Gets the Error Type by passing the constructor (used to get the true type of native error object).\n var typeName = \"\";\n if (errorType) {\n typeName = errorType.typeName || errorType[0, $db8f3a1d23da96b1$export$9734b0a24bf02e93 /* @min:%2ename */ ] || \"\";\n if (!typeName) try {\n var funcNameRegex = /function (.{1,200})\\(/;\n var results = funcNameRegex.exec(errorType.constructor[0, $db8f3a1d23da96b1$export$e2818d11505fa034 /* @min:%2etoString */ ]());\n typeName = results && results[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 1 ? results[1] : \"\";\n } catch (e) {\n // eslint-disable-next-line no-empty -- Ignoring any failures as nothing we can do\n }\n }\n return typeName;\n}\nfunction $1e8d24b24fb574aa$export$7eb96e918bb60d21(errorObj) {\n if (errorObj) try {\n if (!(0, $533f826bbc418791$export$844ec244b1367d54)(errorObj)) {\n var errorType = $1e8d24b24fb574aa$var$_getErrorType(errorObj);\n var result = $1e8d24b24fb574aa$var$_stringify(errorObj, false);\n if (!result || result === \"{}\") {\n if (errorObj[$1e8d24b24fb574aa$var$strError]) {\n // Looks like an MS Error Event\n errorObj = errorObj[$1e8d24b24fb574aa$var$strError];\n errorType = $1e8d24b24fb574aa$var$_getErrorType(errorObj);\n }\n result = $1e8d24b24fb574aa$var$_stringify(errorObj, true);\n }\n if ((0, $0194d45a55d79548$export$7c0888b0c4641088)(result, errorType) !== 0 && errorType !== \"String\") return errorType + \":\" + result;\n return result;\n }\n } catch (e) {\n // eslint-disable-next-line no-empty -- Ignoring any failures as nothing we can do\n }\n // Fallback to just letting the object format itself into a string\n return \"\" + (errorObj || \"\");\n}\nvar $1e8d24b24fb574aa$export$e2f174de097e0bcd = /** @class */ function() {\n /**\r\n * Constructs a new instance of the ExceptionTelemetry object\r\n */ function Exception(logger, exception, properties, measurements, severityLevel, id) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */ ,\n exceptions: 1 /* FieldType.Required */ ,\n severityLevel: 0 /* FieldType.Default */ ,\n properties: 0 /* FieldType.Default */ ,\n measurements: 0 /* FieldType.Default */ \n };\n var _self = this;\n _self.ver = 2; // TODO: handle the CS\"4.0\" ==> breeze 2 conversion in a better way\n if (!$1e8d24b24fb574aa$var$_isExceptionInternal(exception)) {\n if (!properties) properties = {};\n _self[0, $db8f3a1d23da96b1$export$967696d490ed5a4a /* @min:%2eexceptions */ ] = [\n new $1e8d24b24fb574aa$export$39152eac9dc76c5e(logger, exception, properties)\n ];\n _self[0, $db8f3a1d23da96b1$export$14814e6f9bf337b4 /* @min:%2eproperties */ ] = (0, $8c3059962bb1d83c$export$efba9e468fe3b2cf)(logger, properties);\n _self[0, $db8f3a1d23da96b1$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] = (0, $8c3059962bb1d83c$export$3f0e10abe91e800b)(logger, measurements);\n if (severityLevel) _self[0, $db8f3a1d23da96b1$export$2675b0014c60aa10 /* @min:%2eseverityLevel */ ] = severityLevel;\n if (id) _self.id = id;\n } else {\n _self[0, $db8f3a1d23da96b1$export$967696d490ed5a4a /* @min:%2eexceptions */ ] = exception[0, $db8f3a1d23da96b1$export$967696d490ed5a4a /* @min:%2eexceptions */ ] || [];\n _self[0, $db8f3a1d23da96b1$export$14814e6f9bf337b4 /* @min:%2eproperties */ ] = exception[0, $db8f3a1d23da96b1$export$14814e6f9bf337b4 /* @min:%2eproperties */ ];\n _self[0, $db8f3a1d23da96b1$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] = exception[0, $db8f3a1d23da96b1$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ];\n if (exception[0, $db8f3a1d23da96b1$export$2675b0014c60aa10 /* @min:%2eseverityLevel */ ]) _self[0, $db8f3a1d23da96b1$export$2675b0014c60aa10 /* @min:%2eseverityLevel */ ] = exception[0, $db8f3a1d23da96b1$export$2675b0014c60aa10 /* @min:%2eseverityLevel */ ];\n if (exception.id) _self.id = exception.id;\n if (exception[0, $db8f3a1d23da96b1$export$5bc84cbcfe97e161 /* @min:%2eproblemGroup */ ]) _self[0, $db8f3a1d23da96b1$export$5bc84cbcfe97e161 /* @min:%2eproblemGroup */ ] = exception[0, $db8f3a1d23da96b1$export$5bc84cbcfe97e161 /* @min:%2eproblemGroup */ ];\n // bool/int types, use isNullOrUndefined\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(exception[0, $db8f3a1d23da96b1$export$880f71e9a894c474 /* @min:%2eisManual */ ])) _self[0, $db8f3a1d23da96b1$export$880f71e9a894c474 /* @min:%2eisManual */ ] = exception[0, $db8f3a1d23da96b1$export$880f71e9a894c474 /* @min:%2eisManual */ ];\n }\n }\n Exception.CreateAutoException = function(message, url, lineNumber, columnNumber, error, evt, stack, errorSrc) {\n var _a;\n var errorType = $1e8d24b24fb574aa$var$_getErrorType(error || evt || message);\n return _a = {}, _a[0, $db8f3a1d23da96b1$export$923606b70907833e /* @min:message */ ] = $1e8d24b24fb574aa$var$_formatMessage(message, errorType), _a.url = url, _a.lineNumber = lineNumber, _a.columnNumber = columnNumber, _a.error = $1e8d24b24fb574aa$export$7eb96e918bb60d21(error || evt || message), _a.evt = $1e8d24b24fb574aa$export$7eb96e918bb60d21(evt || message), _a[0, $db8f3a1d23da96b1$export$6008dba8ea08a587 /* @min:typeName */ ] = errorType, _a.stackDetails = $1e8d24b24fb574aa$var$_getStackFromErrorObj(stack || error || evt), _a.errorSrc = errorSrc, _a;\n };\n Exception.CreateFromInterface = function(logger, exception, properties, measurements) {\n var exceptions = exception[0, $db8f3a1d23da96b1$export$967696d490ed5a4a /* @min:%2eexceptions */ ] && (0, $7ce500be4896551d$export$76f1a28030e24fa6)(exception[0, $db8f3a1d23da96b1$export$967696d490ed5a4a /* @min:%2eexceptions */ ], function(ex) {\n return $1e8d24b24fb574aa$export$39152eac9dc76c5e[0, $db8f3a1d23da96b1$export$aadef743ee7d1db8 /* @min:%2eCreateFromInterface */ ](logger, ex);\n });\n var exceptionData = new Exception(logger, (0, $2a74b38b87b38cda$export$b3cf7a802e578501)((0, $2a74b38b87b38cda$export$b3cf7a802e578501)({}, exception), {\n exceptions: exceptions\n }), properties, measurements);\n return exceptionData;\n };\n Exception.prototype.toInterface = function() {\n var _a;\n var _b = this, exceptions = _b.exceptions, properties = _b.properties, measurements = _b.measurements, severityLevel = _b.severityLevel, problemGroup = _b.problemGroup, id = _b.id, isManual = _b.isManual;\n var exceptionDetailsInterface = exceptions instanceof Array && (0, $7ce500be4896551d$export$76f1a28030e24fa6)(exceptions, function(exception) {\n return exception.toInterface();\n }) || undefined;\n return _a = {\n ver: \"4.0\"\n }, _a[0, $db8f3a1d23da96b1$export$967696d490ed5a4a /* @min:exceptions */ ] = exceptionDetailsInterface, _a.severityLevel = severityLevel, _a.properties = properties, _a.measurements = measurements, _a.problemGroup = problemGroup, _a.id = id, _a.isManual = isManual, _a;\n };\n /**\r\n * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.\r\n */ Exception.CreateSimpleException = function(message, typeName, assembly, fileName, details, line) {\n var _a;\n return {\n exceptions: [\n (_a = {}, _a[0, $db8f3a1d23da96b1$export$b1b7551538b2085 /* @min:hasFullStack */ ] = true, _a.message = message, _a.stack = details, _a.typeName = typeName, _a)\n ]\n };\n };\n Exception.envelopeType = \"Microsoft.ApplicationInsights.{0}.Exception\";\n Exception.dataType = \"ExceptionData\";\n Exception.formatError = $1e8d24b24fb574aa$export$7eb96e918bb60d21;\n return Exception;\n}();\nvar $1e8d24b24fb574aa$export$39152eac9dc76c5e = /** @class */ function() {\n function _ExceptionDetails(logger, exception, properties) {\n this.aiDataContract = {\n id: 0 /* FieldType.Default */ ,\n outerId: 0 /* FieldType.Default */ ,\n typeName: 1 /* FieldType.Required */ ,\n message: 1 /* FieldType.Required */ ,\n hasFullStack: 0 /* FieldType.Default */ ,\n stack: 0 /* FieldType.Default */ ,\n parsedStack: 2 /* FieldType.Array */ \n };\n var _self = this;\n if (!$1e8d24b24fb574aa$var$_isExceptionDetailsInternal(exception)) {\n var error = exception;\n var evt = error && error.evt;\n if (!(0, $533f826bbc418791$export$e6127cc7fe7395c3)(error)) error = error[$1e8d24b24fb574aa$var$strError] || evt || error;\n _self[0, $db8f3a1d23da96b1$export$6008dba8ea08a587 /* @min:%2etypeName */ ] = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, $1e8d24b24fb574aa$var$_getErrorType(error)) || (0, $71dfba5ea0640485$export$4003f5e1672d759);\n _self[0, $db8f3a1d23da96b1$export$923606b70907833e /* @min:%2emessage */ ] = (0, $8c3059962bb1d83c$export$dff84a9939b48dc0)(logger, $1e8d24b24fb574aa$var$_formatMessage(exception || error, _self[0, $db8f3a1d23da96b1$export$6008dba8ea08a587 /* @min:%2etypeName */ ])) || (0, $71dfba5ea0640485$export$4003f5e1672d759);\n var stack = exception[$1e8d24b24fb574aa$var$strStackDetails] || $1e8d24b24fb574aa$var$_getStackFromErrorObj(exception);\n _self[0, $db8f3a1d23da96b1$export$4b848bcab7cafe5d /* @min:%2eparsedStack */ ] = $1e8d24b24fb574aa$var$_parseStack(stack);\n // after parsedStack is inited, iterate over each frame object, sanitize its assembly field\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(_self[0, $db8f3a1d23da96b1$export$4b848bcab7cafe5d /* @min:%2eparsedStack */ ])) (0, $7ce500be4896551d$export$76f1a28030e24fa6)(_self[0, $db8f3a1d23da96b1$export$4b848bcab7cafe5d /* @min:%2eparsedStack */ ], function(frame) {\n return frame[0, $db8f3a1d23da96b1$export$7e3ee7b01672f321 /* @min:%2eassembly */ ] = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, frame[0, $db8f3a1d23da96b1$export$7e3ee7b01672f321 /* @min:%2eassembly */ ]);\n });\n _self[$1e8d24b24fb574aa$var$strStack] = (0, $8c3059962bb1d83c$export$e47d8a961052f8bc)(logger, $1e8d24b24fb574aa$var$_formatStackTrace(stack));\n _self.hasFullStack = (0, $533f826bbc418791$export$43bee75e5e14138e)(_self.parsedStack) && _self.parsedStack[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] > 0;\n if (properties) properties[0, $db8f3a1d23da96b1$export$6008dba8ea08a587 /* @min:%2etypeName */ ] = properties[0, $db8f3a1d23da96b1$export$6008dba8ea08a587 /* @min:%2etypeName */ ] || _self[0, $db8f3a1d23da96b1$export$6008dba8ea08a587 /* @min:%2etypeName */ ];\n } else {\n _self[0, $db8f3a1d23da96b1$export$6008dba8ea08a587 /* @min:%2etypeName */ ] = exception[0, $db8f3a1d23da96b1$export$6008dba8ea08a587 /* @min:%2etypeName */ ];\n _self[0, $db8f3a1d23da96b1$export$923606b70907833e /* @min:%2emessage */ ] = exception[0, $db8f3a1d23da96b1$export$923606b70907833e /* @min:%2emessage */ ];\n _self[$1e8d24b24fb574aa$var$strStack] = exception[$1e8d24b24fb574aa$var$strStack];\n _self[0, $db8f3a1d23da96b1$export$4b848bcab7cafe5d /* @min:%2eparsedStack */ ] = exception[0, $db8f3a1d23da96b1$export$4b848bcab7cafe5d /* @min:%2eparsedStack */ ] || [];\n _self[0, $db8f3a1d23da96b1$export$b1b7551538b2085 /* @min:%2ehasFullStack */ ] = exception[0, $db8f3a1d23da96b1$export$b1b7551538b2085 /* @min:%2ehasFullStack */ ];\n }\n }\n _ExceptionDetails.prototype.toInterface = function() {\n var _a;\n var _self = this;\n var parsedStack = _self[0, $db8f3a1d23da96b1$export$4b848bcab7cafe5d /* @min:%2eparsedStack */ ] instanceof Array && (0, $7ce500be4896551d$export$76f1a28030e24fa6)(_self[0, $db8f3a1d23da96b1$export$4b848bcab7cafe5d /* @min:%2eparsedStack */ ], function(frame) {\n return frame.toInterface();\n });\n var exceptionDetailsInterface = (_a = {\n id: _self.id,\n outerId: _self.outerId,\n typeName: _self[0, $db8f3a1d23da96b1$export$6008dba8ea08a587 /* @min:%2etypeName */ ],\n message: _self[0, $db8f3a1d23da96b1$export$923606b70907833e /* @min:%2emessage */ ],\n hasFullStack: _self[0, $db8f3a1d23da96b1$export$b1b7551538b2085 /* @min:%2ehasFullStack */ ],\n stack: _self[$1e8d24b24fb574aa$var$strStack]\n }, _a[0, $db8f3a1d23da96b1$export$4b848bcab7cafe5d /* @min:parsedStack */ ] = parsedStack || undefined, _a);\n return exceptionDetailsInterface;\n };\n _ExceptionDetails.CreateFromInterface = function(logger, exception) {\n var parsedStack = exception[0, $db8f3a1d23da96b1$export$4b848bcab7cafe5d /* @min:%2eparsedStack */ ] instanceof Array && (0, $7ce500be4896551d$export$76f1a28030e24fa6)(exception[0, $db8f3a1d23da96b1$export$4b848bcab7cafe5d /* @min:%2eparsedStack */ ], function(frame) {\n return $1e8d24b24fb574aa$export$b9d0519a34c90616[0, $db8f3a1d23da96b1$export$aadef743ee7d1db8 /* @min:%2eCreateFromInterface */ ](frame);\n }) || exception[0, $db8f3a1d23da96b1$export$4b848bcab7cafe5d /* @min:%2eparsedStack */ ];\n var exceptionDetails = new _ExceptionDetails(logger, (0, $2a74b38b87b38cda$export$b3cf7a802e578501)((0, $2a74b38b87b38cda$export$b3cf7a802e578501)({}, exception), {\n parsedStack: parsedStack\n }));\n return exceptionDetails;\n };\n return _ExceptionDetails;\n}();\nvar $1e8d24b24fb574aa$export$b9d0519a34c90616 = /** @class */ function() {\n function _StackFrame(sourceFrame, level) {\n this.aiDataContract = {\n level: 1 /* FieldType.Required */ ,\n method: 1 /* FieldType.Required */ ,\n assembly: 0 /* FieldType.Default */ ,\n fileName: 0 /* FieldType.Default */ ,\n line: 0 /* FieldType.Default */ \n };\n var _self = this;\n _self[0, $db8f3a1d23da96b1$export$59a1581bc81a9aae /* @min:%2esizeInBytes */ ] = 0;\n // Not converting this to isString() as typescript uses this logic to \"understand\" the different\n // types for the 2 different code paths\n if (typeof sourceFrame === \"string\") {\n var frame = sourceFrame;\n _self[0, $db8f3a1d23da96b1$export$25f3022e0cda8855 /* @min:%2elevel */ ] = level;\n _self[0, $db8f3a1d23da96b1$export$47d30bd816d62bdc /* @min:%2emethod */ ] = $1e8d24b24fb574aa$var$NoMethod;\n _self[0, $db8f3a1d23da96b1$export$7e3ee7b01672f321 /* @min:%2eassembly */ ] = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)(frame);\n _self[0, $db8f3a1d23da96b1$export$8ea03ef8a4bcfeeb /* @min:%2efileName */ ] = \"\";\n _self[0, $db8f3a1d23da96b1$export$138215f6c1f0eedf /* @min:%2eline */ ] = 0;\n var matches = frame.match(_StackFrame.regex);\n if (matches && matches[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] >= 5) {\n _self[0, $db8f3a1d23da96b1$export$47d30bd816d62bdc /* @min:%2emethod */ ] = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)(matches[2]) || _self[0, $db8f3a1d23da96b1$export$47d30bd816d62bdc /* @min:%2emethod */ ];\n _self[0, $db8f3a1d23da96b1$export$8ea03ef8a4bcfeeb /* @min:%2efileName */ ] = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)(matches[4]);\n _self[0, $db8f3a1d23da96b1$export$138215f6c1f0eedf /* @min:%2eline */ ] = parseInt(matches[5]) || 0;\n }\n } else {\n _self[0, $db8f3a1d23da96b1$export$25f3022e0cda8855 /* @min:%2elevel */ ] = sourceFrame[0, $db8f3a1d23da96b1$export$25f3022e0cda8855 /* @min:%2elevel */ ];\n _self[0, $db8f3a1d23da96b1$export$47d30bd816d62bdc /* @min:%2emethod */ ] = sourceFrame[0, $db8f3a1d23da96b1$export$47d30bd816d62bdc /* @min:%2emethod */ ];\n _self[0, $db8f3a1d23da96b1$export$7e3ee7b01672f321 /* @min:%2eassembly */ ] = sourceFrame[0, $db8f3a1d23da96b1$export$7e3ee7b01672f321 /* @min:%2eassembly */ ];\n _self[0, $db8f3a1d23da96b1$export$8ea03ef8a4bcfeeb /* @min:%2efileName */ ] = sourceFrame[0, $db8f3a1d23da96b1$export$8ea03ef8a4bcfeeb /* @min:%2efileName */ ];\n _self[0, $db8f3a1d23da96b1$export$138215f6c1f0eedf /* @min:%2eline */ ] = sourceFrame[0, $db8f3a1d23da96b1$export$138215f6c1f0eedf /* @min:%2eline */ ];\n _self[0, $db8f3a1d23da96b1$export$59a1581bc81a9aae /* @min:%2esizeInBytes */ ] = 0;\n }\n _self.sizeInBytes += _self.method[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ];\n _self.sizeInBytes += _self.fileName[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ];\n _self.sizeInBytes += _self.assembly[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ];\n // todo: these might need to be removed depending on how the back-end settles on their size calculation\n _self[0, $db8f3a1d23da96b1$export$59a1581bc81a9aae /* @min:%2esizeInBytes */ ] += _StackFrame.baseSize;\n _self.sizeInBytes += _self.level.toString()[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ];\n _self.sizeInBytes += _self.line.toString()[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ];\n }\n _StackFrame.CreateFromInterface = function(frame) {\n return new _StackFrame(frame, null);\n };\n _StackFrame.prototype.toInterface = function() {\n var _self = this;\n return {\n level: _self[0, $db8f3a1d23da96b1$export$25f3022e0cda8855 /* @min:%2elevel */ ],\n method: _self[0, $db8f3a1d23da96b1$export$47d30bd816d62bdc /* @min:%2emethod */ ],\n assembly: _self[0, $db8f3a1d23da96b1$export$7e3ee7b01672f321 /* @min:%2eassembly */ ],\n fileName: _self[0, $db8f3a1d23da96b1$export$8ea03ef8a4bcfeeb /* @min:%2efileName */ ],\n line: _self[0, $db8f3a1d23da96b1$export$138215f6c1f0eedf /* @min:%2eline */ ]\n };\n };\n // regex to match stack frames from ie/chrome/ff\n // methodName=$2, fileName=$4, lineNo=$5, column=$6\n _StackFrame.regex = /^([\\s]+at)?[\\s]{0,50}([^\\@\\()]+?)[\\s]{0,50}(\\@|\\()([^\\(\\n]+):([0-9]+):([0-9]+)(\\)?)$/;\n _StackFrame.baseSize = 58; // '{\"method\":\"\",\"level\":,\"assembly\":\"\",\"fileName\":\"\",\"line\":}'.length\n return _StackFrame;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ var $5048f48c42282ced$export$7e0232b0f089a6b8 = /** @class */ function() {\n function DataPoint() {\n /**\r\n * The data contract for serializing this object.\r\n */ this.aiDataContract = {\n name: 1 /* FieldType.Required */ ,\n kind: 0 /* FieldType.Default */ ,\n value: 1 /* FieldType.Required */ ,\n count: 0 /* FieldType.Default */ ,\n min: 0 /* FieldType.Default */ ,\n max: 0 /* FieldType.Default */ ,\n stdDev: 0 /* FieldType.Default */ \n };\n /**\r\n * Metric type. Single measurement or the aggregated value.\r\n */ this.kind = 0 /* DataPointType.Measurement */ ;\n }\n return DataPoint;\n}();\n\n\n\nvar $659de0afdff509f2$export$efdd3e096bc27746 = /** @class */ function() {\n /**\r\n * Constructs a new instance of the MetricTelemetry object\r\n */ function Metric(logger, name, value, count, min, max, stdDev, properties, measurements) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */ ,\n metrics: 1 /* FieldType.Required */ ,\n properties: 0 /* FieldType.Default */ \n };\n var _self = this;\n _self.ver = 2;\n var dataPoint = new (0, $5048f48c42282ced$export$7e0232b0f089a6b8)();\n dataPoint[0, $db8f3a1d23da96b1$export$e9679ef501b0d1 /* @min:%2ecount */ ] = count > 0 ? count : undefined;\n dataPoint.max = isNaN(max) || max === null ? undefined : max;\n dataPoint.min = isNaN(min) || min === null ? undefined : min;\n dataPoint[0, $db8f3a1d23da96b1$export$9734b0a24bf02e93 /* @min:%2ename */ ] = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, name) || (0, $71dfba5ea0640485$export$4003f5e1672d759);\n dataPoint.value = value;\n dataPoint.stdDev = isNaN(stdDev) || stdDev === null ? undefined : stdDev;\n _self.metrics = [\n dataPoint\n ];\n _self[0, $db8f3a1d23da96b1$export$14814e6f9bf337b4 /* @min:%2eproperties */ ] = (0, $8c3059962bb1d83c$export$efba9e468fe3b2cf)(logger, properties);\n _self[0, $db8f3a1d23da96b1$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] = (0, $8c3059962bb1d83c$export$3f0e10abe91e800b)(logger, measurements);\n }\n Metric.envelopeType = \"Microsoft.ApplicationInsights.{0}.Metric\";\n Metric.dataType = \"MetricData\";\n return Metric;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\nvar $8ce53fcb9c1dc1db$var$strEmpty = \"\";\nfunction $8ce53fcb9c1dc1db$export$4e47185aa280358c(str, defaultValue) {\n if (defaultValue === void 0) defaultValue = false;\n if (str === undefined || str === null) return defaultValue;\n return str.toString()[0, $db8f3a1d23da96b1$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]() === \"true\";\n}\nfunction $8ce53fcb9c1dc1db$export$4460ed97e7c4a927(totalms) {\n if (isNaN(totalms) || totalms < 0) totalms = 0;\n totalms = Math.round(totalms);\n var ms = $8ce53fcb9c1dc1db$var$strEmpty + totalms % 1000;\n var sec = $8ce53fcb9c1dc1db$var$strEmpty + Math.floor(totalms / 1000) % 60;\n var min = $8ce53fcb9c1dc1db$var$strEmpty + Math.floor(totalms / 60000) % 60;\n var hour = $8ce53fcb9c1dc1db$var$strEmpty + Math.floor(totalms / 3600000) % 24;\n var days = Math.floor(totalms / 86400000);\n ms = ms[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] === 1 ? \"00\" + ms : ms[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] === 2 ? \"0\" + ms : ms;\n sec = sec[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] < 2 ? \"0\" + sec : sec;\n min = min[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] < 2 ? \"0\" + min : min;\n hour = hour[0, $db8f3a1d23da96b1$export$6eae51590aaea43 /* @min:%2elength */ ] < 2 ? \"0\" + hour : hour;\n return (days > 0 ? days + \".\" : $8ce53fcb9c1dc1db$var$strEmpty) + hour + \":\" + min + \":\" + sec + \".\" + ms;\n}\nfunction $8ce53fcb9c1dc1db$export$80a37ba429dff231(extensions, identifier) {\n var extension = null;\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(extensions, function(value) {\n if (value.identifier === identifier) {\n extension = value;\n return -1;\n }\n });\n return extension;\n}\nfunction $8ce53fcb9c1dc1db$export$8c465f5f14327ccd(message, url, lineNumber, columnNumber, error) {\n return !error && (0, $533f826bbc418791$export$844ec244b1367d54)(message) && (message === \"Script error.\" || message === \"Script error\");\n}\n\n\n\n\nvar $5c5f40703ef3d51c$export$12c0fdede1c6bc6c = /** @class */ function() {\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */ function PageView(logger, name, url, durationMs, properties, measurements, id) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */ ,\n name: 0 /* FieldType.Default */ ,\n url: 0 /* FieldType.Default */ ,\n duration: 0 /* FieldType.Default */ ,\n properties: 0 /* FieldType.Default */ ,\n measurements: 0 /* FieldType.Default */ ,\n id: 0 /* FieldType.Default */ \n };\n var _self = this;\n _self.ver = 2;\n _self.id = (0, $8c3059962bb1d83c$export$808d3905d3d31f01)(logger, id);\n _self.url = (0, $8c3059962bb1d83c$export$356146502a9f860c)(logger, url);\n _self[0, $db8f3a1d23da96b1$export$9734b0a24bf02e93 /* @min:%2ename */ ] = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, name) || (0, $71dfba5ea0640485$export$4003f5e1672d759);\n if (!isNaN(durationMs)) _self[0, $db8f3a1d23da96b1$export$aa395e58f404db90 /* @min:%2eduration */ ] = (0, $8ce53fcb9c1dc1db$export$4460ed97e7c4a927)(durationMs);\n _self[0, $db8f3a1d23da96b1$export$14814e6f9bf337b4 /* @min:%2eproperties */ ] = (0, $8c3059962bb1d83c$export$efba9e468fe3b2cf)(logger, properties);\n _self[0, $db8f3a1d23da96b1$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] = (0, $8c3059962bb1d83c$export$3f0e10abe91e800b)(logger, measurements);\n }\n PageView.envelopeType = \"Microsoft.ApplicationInsights.{0}.Pageview\";\n PageView.dataType = \"PageviewData\";\n return PageView;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\nvar $0dd1de134f090c69$export$a7b48490930dbffa = /** @class */ function() {\n /**\r\n * Constructs a new instance of the RemoteDependencyData object\r\n */ function RemoteDependencyData(logger, id, absoluteUrl, commandName, value, success, resultCode, method, requestAPI, correlationContext, properties, measurements) {\n if (requestAPI === void 0) requestAPI = \"Ajax\";\n this.aiDataContract = {\n id: 1 /* FieldType.Required */ ,\n ver: 1 /* FieldType.Required */ ,\n name: 0 /* FieldType.Default */ ,\n resultCode: 0 /* FieldType.Default */ ,\n duration: 0 /* FieldType.Default */ ,\n success: 0 /* FieldType.Default */ ,\n data: 0 /* FieldType.Default */ ,\n target: 0 /* FieldType.Default */ ,\n type: 0 /* FieldType.Default */ ,\n properties: 0 /* FieldType.Default */ ,\n measurements: 0 /* FieldType.Default */ ,\n kind: 0 /* FieldType.Default */ ,\n value: 0 /* FieldType.Default */ ,\n count: 0 /* FieldType.Default */ ,\n min: 0 /* FieldType.Default */ ,\n max: 0 /* FieldType.Default */ ,\n stdDev: 0 /* FieldType.Default */ ,\n dependencyKind: 0 /* FieldType.Default */ ,\n dependencySource: 0 /* FieldType.Default */ ,\n commandName: 0 /* FieldType.Default */ ,\n dependencyTypeName: 0 /* FieldType.Default */ \n };\n var _self = this;\n _self.ver = 2;\n _self.id = id;\n _self[0, $db8f3a1d23da96b1$export$aa395e58f404db90 /* @min:%2eduration */ ] = (0, $8ce53fcb9c1dc1db$export$4460ed97e7c4a927)(value);\n _self.success = success;\n _self.resultCode = resultCode + \"\";\n _self.type = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, requestAPI);\n var dependencyFields = (0, $d98b699aeccdabc6$export$92b0aba7cb1d0e30)(logger, absoluteUrl, method, commandName);\n _self.data = (0, $8c3059962bb1d83c$export$356146502a9f860c)(logger, commandName) || dependencyFields.data; // get a value from hosturl if commandName not available\n _self.target = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, dependencyFields.target);\n if (correlationContext) _self.target = \"\".concat(_self.target, \" | \").concat(correlationContext);\n _self[0, $db8f3a1d23da96b1$export$9734b0a24bf02e93 /* @min:%2ename */ ] = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, dependencyFields[0, $db8f3a1d23da96b1$export$9734b0a24bf02e93 /* @min:%2ename */ ]);\n _self[0, $db8f3a1d23da96b1$export$14814e6f9bf337b4 /* @min:%2eproperties */ ] = (0, $8c3059962bb1d83c$export$efba9e468fe3b2cf)(logger, properties);\n _self[0, $db8f3a1d23da96b1$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] = (0, $8c3059962bb1d83c$export$3f0e10abe91e800b)(logger, measurements);\n }\n RemoteDependencyData.envelopeType = \"Microsoft.ApplicationInsights.{0}.RemoteDependency\";\n RemoteDependencyData.dataType = \"RemoteDependencyData\";\n return RemoteDependencyData;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\nvar $16adbdbcb0ae9015$export$78e1bea9036f120f = /** @class */ function() {\n /**\r\n * Constructs a new instance of the TraceTelemetry object\r\n */ function Trace(logger, message, severityLevel, properties, measurements) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */ ,\n message: 1 /* FieldType.Required */ ,\n severityLevel: 0 /* FieldType.Default */ ,\n properties: 0 /* FieldType.Default */ \n };\n var _self = this;\n _self.ver = 2;\n message = message || (0, $71dfba5ea0640485$export$4003f5e1672d759);\n _self[0, $db8f3a1d23da96b1$export$923606b70907833e /* @min:%2emessage */ ] = (0, $8c3059962bb1d83c$export$dff84a9939b48dc0)(logger, message);\n _self[0, $db8f3a1d23da96b1$export$14814e6f9bf337b4 /* @min:%2eproperties */ ] = (0, $8c3059962bb1d83c$export$efba9e468fe3b2cf)(logger, properties);\n _self[0, $db8f3a1d23da96b1$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] = (0, $8c3059962bb1d83c$export$3f0e10abe91e800b)(logger, measurements);\n if (severityLevel) _self[0, $db8f3a1d23da96b1$export$2675b0014c60aa10 /* @min:%2eseverityLevel */ ] = severityLevel;\n }\n Trace.envelopeType = \"Microsoft.ApplicationInsights.{0}.Message\";\n Trace.dataType = \"MessageData\";\n return Trace;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\nvar $27d410d508f4b32f$export$709aae57ec681346 = /** @class */ function() {\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */ function PageViewPerformance(logger, name, url, unused, properties, measurements, cs4BaseData) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */ ,\n name: 0 /* FieldType.Default */ ,\n url: 0 /* FieldType.Default */ ,\n duration: 0 /* FieldType.Default */ ,\n perfTotal: 0 /* FieldType.Default */ ,\n networkConnect: 0 /* FieldType.Default */ ,\n sentRequest: 0 /* FieldType.Default */ ,\n receivedResponse: 0 /* FieldType.Default */ ,\n domProcessing: 0 /* FieldType.Default */ ,\n properties: 0 /* FieldType.Default */ ,\n measurements: 0 /* FieldType.Default */ \n };\n var _self = this;\n _self.ver = 2;\n _self.url = (0, $8c3059962bb1d83c$export$356146502a9f860c)(logger, url);\n _self[0, $db8f3a1d23da96b1$export$9734b0a24bf02e93 /* @min:%2ename */ ] = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, name) || (0, $71dfba5ea0640485$export$4003f5e1672d759);\n _self[0, $db8f3a1d23da96b1$export$14814e6f9bf337b4 /* @min:%2eproperties */ ] = (0, $8c3059962bb1d83c$export$efba9e468fe3b2cf)(logger, properties);\n _self[0, $db8f3a1d23da96b1$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] = (0, $8c3059962bb1d83c$export$3f0e10abe91e800b)(logger, measurements);\n if (cs4BaseData) {\n _self.domProcessing = cs4BaseData.domProcessing;\n _self[0, $db8f3a1d23da96b1$export$aa395e58f404db90 /* @min:%2eduration */ ] = cs4BaseData[0, $db8f3a1d23da96b1$export$aa395e58f404db90 /* @min:%2eduration */ ];\n _self.networkConnect = cs4BaseData.networkConnect;\n _self.perfTotal = cs4BaseData.perfTotal;\n _self[0, $db8f3a1d23da96b1$export$e046465ee502552 /* @min:%2ereceivedResponse */ ] = cs4BaseData[0, $db8f3a1d23da96b1$export$e046465ee502552 /* @min:%2ereceivedResponse */ ];\n _self.sentRequest = cs4BaseData.sentRequest;\n }\n }\n PageViewPerformance.envelopeType = \"Microsoft.ApplicationInsights.{0}.PageviewPerformance\";\n PageViewPerformance.dataType = \"PageviewPerformanceData\";\n return PageViewPerformance;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ var $74e0f4254782bad9$export$2d0294657ab35f1b = /** @class */ function() {\n /**\r\n * Constructs a new instance of telemetry data.\r\n */ function Data(baseType, data) {\n /**\r\n * The data contract for serializing this object.\r\n */ this.aiDataContract = {\n baseType: 1 /* FieldType.Required */ ,\n baseData: 1 /* FieldType.Required */ \n };\n this.baseType = baseType;\n this.baseData = data;\n }\n return Data;\n}();\n\n\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\nfunction $d1bdc0f4cef94745$var$_aiNameFunc(baseName) {\n var aiName = \"ai.\" + baseName + \".\";\n return function(name) {\n return aiName + name;\n };\n}\nvar $d1bdc0f4cef94745$var$_aiApplication = $d1bdc0f4cef94745$var$_aiNameFunc(\"application\");\nvar $d1bdc0f4cef94745$var$_aiDevice = $d1bdc0f4cef94745$var$_aiNameFunc(\"device\");\nvar $d1bdc0f4cef94745$var$_aiLocation = $d1bdc0f4cef94745$var$_aiNameFunc(\"location\");\nvar $d1bdc0f4cef94745$var$_aiOperation = $d1bdc0f4cef94745$var$_aiNameFunc(\"operation\");\nvar $d1bdc0f4cef94745$var$_aiSession = $d1bdc0f4cef94745$var$_aiNameFunc(\"session\");\nvar $d1bdc0f4cef94745$var$_aiUser = $d1bdc0f4cef94745$var$_aiNameFunc(\"user\");\nvar $d1bdc0f4cef94745$var$_aiCloud = $d1bdc0f4cef94745$var$_aiNameFunc(\"cloud\");\nvar $d1bdc0f4cef94745$var$_aiInternal = $d1bdc0f4cef94745$var$_aiNameFunc(\"internal\");\nvar $d1bdc0f4cef94745$export$8e2bcdf18620784a = /** @class */ function(_super) {\n (0, $2a74b38b87b38cda$export$1f9c32e3fbfb8e62)(ContextTagKeys, _super);\n function ContextTagKeys() {\n return _super.call(this) || this;\n }\n return ContextTagKeys;\n}((0, $0b747974b0bb3563$export$f0facb5bce2741f0)({\n applicationVersion: $d1bdc0f4cef94745$var$_aiApplication(\"ver\"),\n applicationBuild: $d1bdc0f4cef94745$var$_aiApplication(\"build\"),\n applicationTypeId: $d1bdc0f4cef94745$var$_aiApplication(\"typeId\"),\n applicationId: $d1bdc0f4cef94745$var$_aiApplication(\"applicationId\"),\n applicationLayer: $d1bdc0f4cef94745$var$_aiApplication(\"layer\"),\n deviceId: $d1bdc0f4cef94745$var$_aiDevice(\"id\"),\n deviceIp: $d1bdc0f4cef94745$var$_aiDevice(\"ip\"),\n deviceLanguage: $d1bdc0f4cef94745$var$_aiDevice(\"language\"),\n deviceLocale: $d1bdc0f4cef94745$var$_aiDevice(\"locale\"),\n deviceModel: $d1bdc0f4cef94745$var$_aiDevice(\"model\"),\n deviceFriendlyName: $d1bdc0f4cef94745$var$_aiDevice(\"friendlyName\"),\n deviceNetwork: $d1bdc0f4cef94745$var$_aiDevice(\"network\"),\n deviceNetworkName: $d1bdc0f4cef94745$var$_aiDevice(\"networkName\"),\n deviceOEMName: $d1bdc0f4cef94745$var$_aiDevice(\"oemName\"),\n deviceOS: $d1bdc0f4cef94745$var$_aiDevice(\"os\"),\n deviceOSVersion: $d1bdc0f4cef94745$var$_aiDevice(\"osVersion\"),\n deviceRoleInstance: $d1bdc0f4cef94745$var$_aiDevice(\"roleInstance\"),\n deviceRoleName: $d1bdc0f4cef94745$var$_aiDevice(\"roleName\"),\n deviceScreenResolution: $d1bdc0f4cef94745$var$_aiDevice(\"screenResolution\"),\n deviceType: $d1bdc0f4cef94745$var$_aiDevice(\"type\"),\n deviceMachineName: $d1bdc0f4cef94745$var$_aiDevice(\"machineName\"),\n deviceVMName: $d1bdc0f4cef94745$var$_aiDevice(\"vmName\"),\n deviceBrowser: $d1bdc0f4cef94745$var$_aiDevice(\"browser\"),\n deviceBrowserVersion: $d1bdc0f4cef94745$var$_aiDevice(\"browserVersion\"),\n locationIp: $d1bdc0f4cef94745$var$_aiLocation(\"ip\"),\n locationCountry: $d1bdc0f4cef94745$var$_aiLocation(\"country\"),\n locationProvince: $d1bdc0f4cef94745$var$_aiLocation(\"province\"),\n locationCity: $d1bdc0f4cef94745$var$_aiLocation(\"city\"),\n operationId: $d1bdc0f4cef94745$var$_aiOperation(\"id\"),\n operationName: $d1bdc0f4cef94745$var$_aiOperation(\"name\"),\n operationParentId: $d1bdc0f4cef94745$var$_aiOperation(\"parentId\"),\n operationRootId: $d1bdc0f4cef94745$var$_aiOperation(\"rootId\"),\n operationSyntheticSource: $d1bdc0f4cef94745$var$_aiOperation(\"syntheticSource\"),\n operationCorrelationVector: $d1bdc0f4cef94745$var$_aiOperation(\"correlationVector\"),\n sessionId: $d1bdc0f4cef94745$var$_aiSession(\"id\"),\n sessionIsFirst: $d1bdc0f4cef94745$var$_aiSession(\"isFirst\"),\n sessionIsNew: $d1bdc0f4cef94745$var$_aiSession(\"isNew\"),\n userAccountAcquisitionDate: $d1bdc0f4cef94745$var$_aiUser(\"accountAcquisitionDate\"),\n userAccountId: $d1bdc0f4cef94745$var$_aiUser(\"accountId\"),\n userAgent: $d1bdc0f4cef94745$var$_aiUser(\"userAgent\"),\n userId: $d1bdc0f4cef94745$var$_aiUser(\"id\"),\n userStoreRegion: $d1bdc0f4cef94745$var$_aiUser(\"storeRegion\"),\n userAuthUserId: $d1bdc0f4cef94745$var$_aiUser(\"authUserId\"),\n userAnonymousUserAcquisitionDate: $d1bdc0f4cef94745$var$_aiUser(\"anonUserAcquisitionDate\"),\n userAuthenticatedUserAcquisitionDate: $d1bdc0f4cef94745$var$_aiUser(\"authUserAcquisitionDate\"),\n cloudName: $d1bdc0f4cef94745$var$_aiCloud(\"name\"),\n cloudRole: $d1bdc0f4cef94745$var$_aiCloud(\"role\"),\n cloudRoleVer: $d1bdc0f4cef94745$var$_aiCloud(\"roleVer\"),\n cloudRoleInstance: $d1bdc0f4cef94745$var$_aiCloud(\"roleInstance\"),\n cloudEnvironment: $d1bdc0f4cef94745$var$_aiCloud(\"environment\"),\n cloudLocation: $d1bdc0f4cef94745$var$_aiCloud(\"location\"),\n cloudDeploymentUnit: $d1bdc0f4cef94745$var$_aiCloud(\"deploymentUnit\"),\n internalNodeName: $d1bdc0f4cef94745$var$_aiInternal(\"nodeName\"),\n internalSdkVersion: $d1bdc0f4cef94745$var$_aiInternal(\"sdkVersion\"),\n internalAgentVersion: $d1bdc0f4cef94745$var$_aiInternal(\"agentVersion\"),\n internalSnippet: $d1bdc0f4cef94745$var$_aiInternal(\"snippet\"),\n internalSdkSrc: $d1bdc0f4cef94745$var$_aiInternal(\"sdkSrc\")\n}));\n\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\nfunction $932e93a8e5adf75c$export$2dc41327de8d98f1(item, baseType, envelopeName, logger, customProperties, systemProperties) {\n var _a;\n envelopeName = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, envelopeName) || (0, $71dfba5ea0640485$export$4003f5e1672d759);\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(item) || (0, $533f826bbc418791$export$bedb7023a7733221)(baseType) || (0, $533f826bbc418791$export$bedb7023a7733221)(envelopeName)) (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)(\"Input doesn't contain all required fields\");\n var iKey = \"\";\n if (item[0, $71dfba5ea0640485$export$7d566319b90dbb26]) {\n iKey = item[0, $71dfba5ea0640485$export$7d566319b90dbb26];\n delete item[0, $71dfba5ea0640485$export$7d566319b90dbb26];\n }\n var telemetryItem = (_a = {}, _a[0, $db8f3a1d23da96b1$export$9734b0a24bf02e93 /* @min:name */ ] = envelopeName, _a.time = (0, $0b747974b0bb3563$export$dfaaa8705752128f)(new Date()), _a.iKey = iKey, _a.ext = systemProperties ? systemProperties : {}, _a.tags = [], _a.data = {}, _a.baseType = baseType, _a.baseData = item // Part B\n , _a);\n // Part C\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(customProperties)) (0, $45e528077703ac0c$export$aa0705d5774c95d1)(customProperties, function(prop, value) {\n telemetryItem.data[prop] = value;\n });\n return telemetryItem;\n}\nvar $932e93a8e5adf75c$export$7af32501561f3b4a = /** @class */ function() {\n function TelemetryItemCreator() {}\n /**\r\n * Create a telemetry item that the 1DS channel understands\r\n * @param item - domain specific properties; part B\r\n * @param baseType - telemetry item type. ie PageViewData\r\n * @param envelopeName - name of the envelope. ie Microsoft.ApplicationInsights..PageView\r\n * @param customProperties - user defined custom properties; part C\r\n * @param systemProperties - system properties that are added to the context; part A\r\n * @returns ITelemetryItem that is sent to channel\r\n */ TelemetryItemCreator.create = $932e93a8e5adf75c$export$2dc41327de8d98f1;\n return TelemetryItemCreator;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \nvar $1185376df44832bd$export$152f4bb29f8263d0 = {\n UserExt: \"user\",\n DeviceExt: \"device\",\n TraceExt: \"trace\",\n WebExt: \"web\",\n AppExt: \"app\",\n OSExt: \"os\",\n SessionExt: \"ses\",\n SDKExt: \"sdk\"\n};\nvar $1185376df44832bd$export$ebc7727f2a4272f6 = new (0, $d1bdc0f4cef94745$export$8e2bcdf18620784a)();\n\n\n\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \nfunction $b5e9c029fdfb79a5$export$58aa8b47bf337bc8(eventName) {\n var event = null;\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(Event)) event = new Event(eventName);\n else {\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n if (doc && doc.createEvent) {\n event = doc.createEvent(\"Event\");\n event.initEvent(eventName, true, true);\n }\n }\n return event;\n}\n\n\n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n/*\n * Application Insights JavaScript SDK - Common, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \nvar $524c8ecd2c7c151d$export$d5f3ec63cad061d9 = (0, $4c75282440d4ddf3$export$fd52abd0b2703048)({\n LocalStorage: 0 /* eStorageType.LocalStorage */ ,\n SessionStorage: 1 /* eStorageType.SessionStorage */ \n});\nvar $524c8ecd2c7c151d$export$29bb472f6d62625c = (0, $4c75282440d4ddf3$export$fd52abd0b2703048)({\n AI: 0 /* eDistributedTracingModes.AI */ ,\n AI_AND_W3C: 1 /* eDistributedTracingModes.AI_AND_W3C */ ,\n W3C: 2 /* eDistributedTracingModes.W3C */ \n});\n\n\n\nvar $8e03bdff803b84be$var$_canUseLocalStorage = undefined;\nvar $8e03bdff803b84be$var$_canUseSessionStorage = undefined;\n/**\r\n * Gets the localStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */ function $8e03bdff803b84be$var$_getLocalStorageObject() {\n if ($8e03bdff803b84be$export$f28746933126d63f()) return $8e03bdff803b84be$var$_getVerifiedStorageObject((0, $524c8ecd2c7c151d$export$d5f3ec63cad061d9).LocalStorage);\n return null;\n}\n/**\r\n * Tests storage object (localStorage or sessionStorage) to verify that it is usable\r\n * More details here: https://mathiasbynens.be/notes/localstorage-pattern\r\n * @param storageType - Type of storage\r\n * @return {Storage} Returns storage object verified that it is usable\r\n */ function $8e03bdff803b84be$var$_getVerifiedStorageObject(storageType) {\n try {\n if ((0, $533f826bbc418791$export$bedb7023a7733221)((0, $3d5fcb60a9467a45$export$a4e55266d2135a7f)())) return null;\n var uid = (new Date)[0, $db8f3a1d23da96b1$export$e2818d11505fa034 /* @min:%2etoString */ ]();\n var storage = (0, $3d5fcb60a9467a45$export$3df6e51375017edd)(storageType === (0, $524c8ecd2c7c151d$export$d5f3ec63cad061d9).LocalStorage ? \"localStorage\" : \"sessionStorage\");\n storage.setItem(uid, uid);\n var fail = storage.getItem(uid) !== uid;\n storage[0, $db8f3a1d23da96b1$export$596e0e0dc14a1e9b /* @min:%2eremoveItem */ ](uid);\n if (!fail) return storage;\n } catch (exception) {\n // eslint-disable-next-line no-empty\n }\n return null;\n}\n/**\r\n * Gets the sessionStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */ function $8e03bdff803b84be$var$_getSessionStorageObject() {\n if ($8e03bdff803b84be$export$c81985c4209bac26()) return $8e03bdff803b84be$var$_getVerifiedStorageObject((0, $524c8ecd2c7c151d$export$d5f3ec63cad061d9).SessionStorage);\n return null;\n}\nfunction $8e03bdff803b84be$export$53ddd0ab7db9403() {\n $8e03bdff803b84be$var$_canUseLocalStorage = false;\n $8e03bdff803b84be$var$_canUseSessionStorage = false;\n}\nfunction $8e03bdff803b84be$export$f08cf9bcd292b981() {\n $8e03bdff803b84be$var$_canUseLocalStorage = $8e03bdff803b84be$export$f28746933126d63f(true);\n $8e03bdff803b84be$var$_canUseSessionStorage = $8e03bdff803b84be$export$c81985c4209bac26(true);\n}\nfunction $8e03bdff803b84be$export$f28746933126d63f(reset) {\n if (reset || $8e03bdff803b84be$var$_canUseLocalStorage === undefined) $8e03bdff803b84be$var$_canUseLocalStorage = !!$8e03bdff803b84be$var$_getVerifiedStorageObject((0, $524c8ecd2c7c151d$export$d5f3ec63cad061d9).LocalStorage);\n return $8e03bdff803b84be$var$_canUseLocalStorage;\n}\nfunction $8e03bdff803b84be$export$c3876355f131c85c(logger, name) {\n var storage = $8e03bdff803b84be$var$_getLocalStorageObject();\n if (storage !== null) try {\n return storage.getItem(name);\n } catch (e) {\n $8e03bdff803b84be$var$_canUseLocalStorage = false;\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 1 /* _eInternalMessageId.BrowserCannotReadLocalStorage */ , \"Browser failed read of local storage. \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n return null;\n}\nfunction $8e03bdff803b84be$export$631bce20500dc098(logger, name, data) {\n var storage = $8e03bdff803b84be$var$_getLocalStorageObject();\n if (storage !== null) try {\n storage.setItem(name, data);\n return true;\n } catch (e) {\n $8e03bdff803b84be$var$_canUseLocalStorage = false;\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 3 /* _eInternalMessageId.BrowserCannotWriteLocalStorage */ , \"Browser failed write to local storage. \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n return false;\n}\nfunction $8e03bdff803b84be$export$63137c65c2cc6743(logger, name) {\n var storage = $8e03bdff803b84be$var$_getLocalStorageObject();\n if (storage !== null) try {\n storage[0, $db8f3a1d23da96b1$export$596e0e0dc14a1e9b /* @min:%2eremoveItem */ ](name);\n return true;\n } catch (e) {\n $8e03bdff803b84be$var$_canUseLocalStorage = false;\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 5 /* _eInternalMessageId.BrowserFailedRemovalFromLocalStorage */ , \"Browser failed removal of local storage item. \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n return false;\n}\nfunction $8e03bdff803b84be$export$c81985c4209bac26(reset) {\n if (reset || $8e03bdff803b84be$var$_canUseSessionStorage === undefined) $8e03bdff803b84be$var$_canUseSessionStorage = !!$8e03bdff803b84be$var$_getVerifiedStorageObject((0, $524c8ecd2c7c151d$export$d5f3ec63cad061d9).SessionStorage);\n return $8e03bdff803b84be$var$_canUseSessionStorage;\n}\nfunction $8e03bdff803b84be$export$42f95336fa01d38e() {\n var keys = [];\n if ($8e03bdff803b84be$export$c81985c4209bac26()) (0, $45e528077703ac0c$export$aa0705d5774c95d1)((0, $3d5fcb60a9467a45$export$3df6e51375017edd)(\"sessionStorage\"), function(key) {\n keys.push(key);\n });\n return keys;\n}\nfunction $8e03bdff803b84be$export$a398bd2f40e2eb6e(logger, name) {\n var storage = $8e03bdff803b84be$var$_getSessionStorageObject();\n if (storage !== null) try {\n return storage.getItem(name);\n } catch (e) {\n $8e03bdff803b84be$var$_canUseSessionStorage = false;\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 2 /* _eInternalMessageId.BrowserCannotReadSessionStorage */ , \"Browser failed read of session storage. \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n return null;\n}\nfunction $8e03bdff803b84be$export$21abea3a85fee3f5(logger, name, data) {\n var storage = $8e03bdff803b84be$var$_getSessionStorageObject();\n if (storage !== null) try {\n storage.setItem(name, data);\n return true;\n } catch (e) {\n $8e03bdff803b84be$var$_canUseSessionStorage = false;\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 4 /* _eInternalMessageId.BrowserCannotWriteSessionStorage */ , \"Browser failed write to session storage. \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n return false;\n}\nfunction $8e03bdff803b84be$export$9f411b4ea05fb92a(logger, name) {\n var storage = $8e03bdff803b84be$var$_getSessionStorageObject();\n if (storage !== null) try {\n storage[0, $db8f3a1d23da96b1$export$596e0e0dc14a1e9b /* @min:%2eremoveItem */ ](name);\n return true;\n } catch (e) {\n $8e03bdff803b84be$var$_canUseSessionStorage = false;\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 6 /* _eInternalMessageId.BrowserFailedRemovalFromSessionStorage */ , \"Browser failed removal of session storage item. \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n return false;\n}\n\n\n\nvar $ca7353bd9238d340$export$2268e69a6d93b7cc = \"AppInsightsPropertiesPlugin\";\nvar $ca7353bd9238d340$export$a714a094d3058c99 = \"AppInsightsChannelPlugin\";\nvar $ca7353bd9238d340$export$862d858b0002f352 = \"ApplicationInsightsAnalytics\";\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\nvar $28deccfc004f252b$var$strExecutionContextKey = \"ctx\";\nvar $28deccfc004f252b$var$strParentContextKey = \"ParentContextKey\";\nvar $28deccfc004f252b$var$strChildrenContextKey = \"ChildrenContextKey\";\nvar $28deccfc004f252b$var$_defaultPerfManager = null;\nvar $28deccfc004f252b$export$e3556d2ce46cdae0 = /** @class */ function() {\n function PerfEvent(name, payloadDetails, isAsync) {\n var _self = this;\n _self.start = (0, $628cad25a0769458$export$a56f095995763cca)();\n _self[0, $1ae5573ce493bccc$export$9734b0a24bf02e93 /* @min:%2ename */ ] = name;\n _self[0, $1ae5573ce493bccc$export$d8114c9e990204cb /* @min:%2eisAsync */ ] = isAsync;\n _self[0, $1ae5573ce493bccc$export$3a89026537e5dfec /* @min:%2eisChildEvt */ ] = function() {\n return false;\n };\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(payloadDetails)) {\n // Create an accessor to minimize the potential performance impact of executing the payloadDetails callback\n var theDetails_1;\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"payload\", {\n g: function() {\n // Delay the execution of the payloadDetails until needed\n if (!theDetails_1 && (0, $533f826bbc418791$export$f6e2535fb5126e54)(payloadDetails)) {\n theDetails_1 = payloadDetails();\n // clear it out now so the referenced objects can be garbage collected\n payloadDetails = null;\n }\n return theDetails_1;\n }\n });\n }\n _self[0, $1ae5573ce493bccc$export$c405fd80acb80a5b /* @min:%2egetCtx */ ] = function(key) {\n if (key) {\n // The parent and child links are located directly on the object (for better viewing in the DebugPlugin)\n if (key === PerfEvent[$28deccfc004f252b$var$strParentContextKey] || key === PerfEvent[$28deccfc004f252b$var$strChildrenContextKey]) return _self[key];\n return (_self[$28deccfc004f252b$var$strExecutionContextKey] || {})[key];\n }\n return null;\n };\n _self[0, $1ae5573ce493bccc$export$2ec27a3df8fa4130 /* @min:%2esetCtx */ ] = function(key, value) {\n if (key) {\n // Put the parent and child links directly on the object (for better viewing in the DebugPlugin)\n if (key === PerfEvent[$28deccfc004f252b$var$strParentContextKey]) {\n // Simple assumption, if we are setting a parent then we must be a child\n if (!_self[key]) _self[0, $1ae5573ce493bccc$export$3a89026537e5dfec /* @min:%2eisChildEvt */ ] = function() {\n return true;\n };\n _self[key] = value;\n } else if (key === PerfEvent[$28deccfc004f252b$var$strChildrenContextKey]) _self[key] = value;\n else {\n var ctx = _self[$28deccfc004f252b$var$strExecutionContextKey] = _self[$28deccfc004f252b$var$strExecutionContextKey] || {};\n ctx[key] = value;\n }\n }\n };\n _self[0, $1ae5573ce493bccc$export$b6736e780b133181 /* @min:%2ecomplete */ ] = function() {\n var childTime = 0;\n var childEvts = _self[0, $1ae5573ce493bccc$export$c405fd80acb80a5b /* @min:%2egetCtx */ ](PerfEvent[$28deccfc004f252b$var$strChildrenContextKey]);\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(childEvts)) for(var lp = 0; lp < childEvts[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ]; lp++){\n var childEvt = childEvts[lp];\n if (childEvt) childTime += childEvt[0, $1ae5573ce493bccc$export$7b5ba5854159c1f0 /* @min:%2etime */ ];\n }\n _self[0, $1ae5573ce493bccc$export$7b5ba5854159c1f0 /* @min:%2etime */ ] = (0, $628cad25a0769458$export$a56f095995763cca)() - _self.start;\n _self.exTime = _self[0, $1ae5573ce493bccc$export$7b5ba5854159c1f0 /* @min:%2etime */ ] - childTime;\n _self[0, $1ae5573ce493bccc$export$b6736e780b133181 /* @min:%2ecomplete */ ] = function() {};\n };\n }\n PerfEvent.ParentContextKey = \"parent\";\n PerfEvent.ChildrenContextKey = \"childEvts\";\n return PerfEvent;\n}();\nvar $28deccfc004f252b$export$cbeb6df2e8e9b5ae = /** @class */ function() {\n function PerfManager(manager) {\n /**\r\n * General bucket used for execution context set and retrieved via setCtx() and getCtx.\r\n * Defined as private so it can be visualized via the DebugPlugin\r\n */ this.ctx = {};\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(PerfManager, this, function(_self) {\n _self.create = function(src, payloadDetails, isAsync) {\n // TODO (@MSNev): at some point we will want to add additional configuration to \"select\" which events to instrument\n // for now this is just a simple do everything.\n return new $28deccfc004f252b$export$e3556d2ce46cdae0(src, payloadDetails, isAsync);\n };\n _self.fire = function(perfEvent) {\n if (perfEvent) {\n perfEvent[0, $1ae5573ce493bccc$export$b6736e780b133181 /* @min:%2ecomplete */ ]();\n if (manager && (0, $533f826bbc418791$export$f6e2535fb5126e54)(manager[0, $9fe4a5d5204a4cff$export$5d265841733c97c3 /* @min:%2eperfEvent */ ])) manager[0, $9fe4a5d5204a4cff$export$5d265841733c97c3 /* @min:%2eperfEvent */ ](perfEvent);\n }\n };\n _self[0, $1ae5573ce493bccc$export$2ec27a3df8fa4130 /* @min:%2esetCtx */ ] = function(key, value) {\n if (key) {\n var ctx = _self[$28deccfc004f252b$var$strExecutionContextKey] = _self[$28deccfc004f252b$var$strExecutionContextKey] || {};\n ctx[key] = value;\n }\n };\n _self[0, $1ae5573ce493bccc$export$c405fd80acb80a5b /* @min:%2egetCtx */ ] = function(key) {\n return (_self[$28deccfc004f252b$var$strExecutionContextKey] || {})[key];\n };\n });\n }\n // Removed Stub for PerfManager.prototype.create.\n // Removed Stub for PerfManager.prototype.fire.\n // Removed Stub for PerfManager.prototype.setCtx.\n // Removed Stub for PerfManager.prototype.getCtx.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n PerfManager.__ieDyn = 1;\n return PerfManager;\n}();\nvar $28deccfc004f252b$var$doPerfActiveKey = \"CoreUtils.doPerf\";\nfunction $28deccfc004f252b$export$c6fbeb260600c482(mgrSource, getSource, func, details, isAsync) {\n if (mgrSource) {\n var perfMgr = mgrSource;\n if (perfMgr[0, $9fe4a5d5204a4cff$export$f8b08c7de64edfbf]) // Looks like a perf manager provider object\n perfMgr = perfMgr[0, $9fe4a5d5204a4cff$export$f8b08c7de64edfbf]();\n if (perfMgr) {\n var perfEvt = void 0;\n var currentActive = perfMgr[0, $1ae5573ce493bccc$export$c405fd80acb80a5b /* @min:%2egetCtx */ ]($28deccfc004f252b$var$doPerfActiveKey);\n try {\n perfEvt = perfMgr.create(getSource(), details, isAsync);\n if (perfEvt) {\n if (currentActive && perfEvt[0, $1ae5573ce493bccc$export$2ec27a3df8fa4130 /* @min:%2esetCtx */ ]) {\n perfEvt[0, $1ae5573ce493bccc$export$2ec27a3df8fa4130 /* @min:%2esetCtx */ ]($28deccfc004f252b$export$e3556d2ce46cdae0[$28deccfc004f252b$var$strParentContextKey], currentActive);\n if (currentActive[0, $1ae5573ce493bccc$export$c405fd80acb80a5b /* @min:%2egetCtx */ ] && currentActive[0, $1ae5573ce493bccc$export$2ec27a3df8fa4130 /* @min:%2esetCtx */ ]) {\n var children = currentActive[0, $1ae5573ce493bccc$export$c405fd80acb80a5b /* @min:%2egetCtx */ ]($28deccfc004f252b$export$e3556d2ce46cdae0[$28deccfc004f252b$var$strChildrenContextKey]);\n if (!children) {\n children = [];\n currentActive[0, $1ae5573ce493bccc$export$2ec27a3df8fa4130 /* @min:%2esetCtx */ ]($28deccfc004f252b$export$e3556d2ce46cdae0[$28deccfc004f252b$var$strChildrenContextKey], children);\n }\n children[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](perfEvt);\n }\n }\n // Set this event as the active event now\n perfMgr[0, $1ae5573ce493bccc$export$2ec27a3df8fa4130 /* @min:%2esetCtx */ ]($28deccfc004f252b$var$doPerfActiveKey, perfEvt);\n return func(perfEvt);\n }\n } catch (ex) {\n if (perfEvt && perfEvt[0, $1ae5573ce493bccc$export$2ec27a3df8fa4130 /* @min:%2esetCtx */ ]) perfEvt[0, $1ae5573ce493bccc$export$2ec27a3df8fa4130 /* @min:%2esetCtx */ ](\"exception\", ex);\n } finally{\n // fire the perf event\n if (perfEvt) perfMgr.fire(perfEvt);\n // Reset the active event to the previous value\n perfMgr[0, $1ae5573ce493bccc$export$2ec27a3df8fa4130 /* @min:%2esetCtx */ ]($28deccfc004f252b$var$doPerfActiveKey, currentActive);\n }\n }\n }\n return func();\n}\nfunction $28deccfc004f252b$export$1e94af82fd6977f1(perfManager) {\n $28deccfc004f252b$var$_defaultPerfManager = perfManager;\n}\nfunction $28deccfc004f252b$export$6cdbf3f34ace6568() {\n return $28deccfc004f252b$var$_defaultPerfManager;\n}\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\n\"use strict\";\nvar $757da337740268ac$var$pluginStateData = (0, $8a2d104e2647a310$export$b95c3438408d78aa)(\"plugin\");\nfunction $757da337740268ac$export$37cfaecb9b4b1b3b(plugin) {\n return $757da337740268ac$var$pluginStateData.get(plugin, \"state\", {}, true);\n}\nfunction $757da337740268ac$export$be211df7b1eeb33e(processContext, extensions) {\n // Set the next plugin and identified the uninitialized plugins\n var initPlugins = [];\n var lastPlugin = null;\n var proxy = processContext[0, $1ae5573ce493bccc$export$36754a48de7fd714 /* @min:%2egetNext */ ]();\n var pluginState;\n while(proxy){\n var thePlugin = proxy[0, $1ae5573ce493bccc$export$37717a508eca6e2d /* @min:%2egetPlugin */ ]();\n if (thePlugin) {\n if (lastPlugin && lastPlugin[0, $1ae5573ce493bccc$export$55d672a1dc4d50c1 /* @min:%2esetNextPlugin */ ] && thePlugin[0, $9fe4a5d5204a4cff$export$820a3bce4a265606 /* @min:%2eprocessTelemetry */ ]) // Set this plugin as the next for the previous one\n lastPlugin[0, $1ae5573ce493bccc$export$55d672a1dc4d50c1 /* @min:%2esetNextPlugin */ ](thePlugin);\n pluginState = $757da337740268ac$export$37cfaecb9b4b1b3b(thePlugin);\n var isInitialized = !!pluginState[0, $1ae5573ce493bccc$export$2e2716e9c35a66a8 /* @min:%2eisInitialized */ ];\n if (thePlugin[0, $1ae5573ce493bccc$export$2e2716e9c35a66a8 /* @min:%2eisInitialized */ ]) isInitialized = thePlugin[0, $1ae5573ce493bccc$export$2e2716e9c35a66a8 /* @min:%2eisInitialized */ ]();\n if (!isInitialized) initPlugins[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](thePlugin);\n lastPlugin = thePlugin;\n proxy = proxy[0, $1ae5573ce493bccc$export$36754a48de7fd714 /* @min:%2egetNext */ ]();\n }\n }\n // Now initialize the plugins\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(initPlugins, function(thePlugin) {\n var core = processContext[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ]();\n thePlugin[0, $1ae5573ce493bccc$export$65cd33bb52d04675 /* @min:%2einitialize */ ](processContext.getCfg(), core, extensions, processContext[0, $1ae5573ce493bccc$export$36754a48de7fd714 /* @min:%2egetNext */ ]());\n pluginState = $757da337740268ac$export$37cfaecb9b4b1b3b(thePlugin);\n // Only add the core to the state if the plugin didn't set it (doesn't extend from BaseTelemetryPlugin)\n if (!thePlugin[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99] && !pluginState[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99]) pluginState[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99] = core;\n pluginState[0, $1ae5573ce493bccc$export$2e2716e9c35a66a8 /* @min:%2eisInitialized */ ] = true;\n delete pluginState[0, $1ae5573ce493bccc$export$7176fb2a7d11927e /* @min:%2eteardown */ ];\n });\n}\nfunction $757da337740268ac$export$478771939b7b39a2(plugins) {\n // Sort by priority\n return plugins.sort(function(extA, extB) {\n var result = 0;\n if (extB) {\n var bHasProcess = extB[0, $9fe4a5d5204a4cff$export$820a3bce4a265606];\n if (extA[0, $9fe4a5d5204a4cff$export$820a3bce4a265606]) result = bHasProcess ? extA[0, $9fe4a5d5204a4cff$export$58efcc07763b37be] - extB[0, $9fe4a5d5204a4cff$export$58efcc07763b37be] : 1;\n else if (bHasProcess) result = -1;\n } else result = extA ? 1 : -1;\n return result;\n });\n// sort complete\n}\nfunction $757da337740268ac$export$24978f1b175640d9(components, unloadCtx, unloadState, asyncCallback) {\n var idx = 0;\n function _doUnload() {\n while(idx < components[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ]){\n var component = components[idx++];\n if (component) {\n var func = component._doUnload || component[0, $1ae5573ce493bccc$export$458d234b616d0745 /* @min:%2e_doTeardown */ ];\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(func)) {\n if (func.call(component, unloadCtx, unloadState, _doUnload) === true) return true;\n }\n }\n }\n }\n return _doUnload();\n}\nfunction $757da337740268ac$export$10fa4480433f402c(parentCtx) {\n var trace = {};\n return {\n getName: function() {\n return trace[0, $1ae5573ce493bccc$export$9734b0a24bf02e93 /* @min:%2ename */ ];\n },\n setName: function(newValue) {\n parentCtx && parentCtx.setName(newValue);\n trace[0, $1ae5573ce493bccc$export$9734b0a24bf02e93 /* @min:%2ename */ ] = newValue;\n },\n getTraceId: function() {\n return trace[0, $1ae5573ce493bccc$export$a5eb52c53bba8560 /* @min:%2etraceId */ ];\n },\n setTraceId: function(newValue) {\n parentCtx && parentCtx.setTraceId(newValue);\n if ((0, $6f47dad7a26666b5$export$29dd34cf1269f6da)(newValue)) trace[0, $1ae5573ce493bccc$export$a5eb52c53bba8560 /* @min:%2etraceId */ ] = newValue;\n },\n getSpanId: function() {\n return trace[0, $1ae5573ce493bccc$export$c105b94efa183847 /* @min:%2espanId */ ];\n },\n setSpanId: function(newValue) {\n parentCtx && parentCtx.setSpanId(newValue);\n if ((0, $6f47dad7a26666b5$export$8e51c6d8f0586aff)(newValue)) trace[0, $1ae5573ce493bccc$export$c105b94efa183847 /* @min:%2espanId */ ] = newValue;\n },\n getTraceFlags: function() {\n return trace[0, $1ae5573ce493bccc$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ];\n },\n setTraceFlags: function(newTraceFlags) {\n parentCtx && parentCtx.setTraceFlags(newTraceFlags);\n trace[0, $1ae5573ce493bccc$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ] = newTraceFlags;\n }\n };\n}\n\n\n\"use strict\";\nvar $bc7124acb0f73e64$var$strTelemetryPluginChain = \"TelemetryPluginChain\";\nvar $bc7124acb0f73e64$var$strHasRunFlags = \"_hasRun\";\nvar $bc7124acb0f73e64$var$strGetTelCtx = \"_getTelCtx\";\nvar $bc7124acb0f73e64$var$_chainId = 0;\nfunction $bc7124acb0f73e64$var$_getNextProxyStart(proxy, core, startAt) {\n while(proxy){\n if (proxy[0, $1ae5573ce493bccc$export$37717a508eca6e2d /* @min:%2egetPlugin */ ]() === startAt) return proxy;\n proxy = proxy[0, $1ae5573ce493bccc$export$36754a48de7fd714 /* @min:%2egetNext */ ]();\n }\n // This wasn't found in the existing chain so create an isolated one with just this plugin\n return $bc7124acb0f73e64$export$107e639207cdf742([\n startAt\n ], core.config || {}, core);\n}\n/**\r\n * @ignore\r\n * @param telemetryChain\r\n * @param dynamicHandler\r\n * @param core\r\n * @param startAt - Identifies the next plugin to execute, if null there is no \"next\" plugin and if undefined it should assume the start of the chain\r\n * @returns\r\n */ function $bc7124acb0f73e64$var$_createInternalContext(telemetryChain, dynamicHandler, core, startAt) {\n // We have a special case where we want to start execution from this specific plugin\n // or we simply reuse the existing telemetry plugin chain (normal execution case)\n var _nextProxy = null; // By Default set as no next plugin\n var _onComplete = [];\n if (!dynamicHandler) dynamicHandler = (0, $acb30f9e62dc5705$export$3a9e9180c14487fd)({}, null, core[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ]);\n if (startAt !== null) // There is no next element (null) vs not defined (undefined) so use the full chain\n _nextProxy = startAt ? $bc7124acb0f73e64$var$_getNextProxyStart(telemetryChain, core, startAt) : telemetryChain;\n var context = {\n _next: _moveNext,\n ctx: {\n core: function() {\n return core;\n },\n diagLog: function() {\n return (0, $cc2aaaebf96ac6a7$export$5102d32ea1d740a)(core, dynamicHandler.cfg);\n },\n getCfg: function() {\n return dynamicHandler.cfg;\n },\n getExtCfg: _resolveExtCfg,\n getConfig: _getConfig,\n hasNext: function() {\n return !!_nextProxy;\n },\n getNext: function() {\n return _nextProxy;\n },\n setNext: function(nextPlugin) {\n _nextProxy = nextPlugin;\n },\n iterate: _iterateChain,\n onComplete: _addOnComplete\n }\n };\n function _addOnComplete(onComplete, that) {\n var args = [];\n for(var _i = 2; _i < arguments.length; _i++)args[_i - 2] = arguments[_i];\n if (onComplete) _onComplete[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ]({\n func: onComplete,\n self: !(0, $533f826bbc418791$export$fce6876652108ab)(that) ? that : context.ctx,\n args: args\n });\n }\n function _moveNext() {\n var nextProxy = _nextProxy;\n // Automatically move to the next plugin\n _nextProxy = nextProxy ? nextProxy[0, $1ae5573ce493bccc$export$36754a48de7fd714 /* @min:%2egetNext */ ]() : null;\n if (!nextProxy) {\n var onComplete = _onComplete;\n if (onComplete && onComplete[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(onComplete, function(completeDetails) {\n try {\n completeDetails.func.call(completeDetails.self, completeDetails.args);\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(core[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ], 2 /* eLoggingSeverity.WARNING */ , 73 /* _eInternalMessageId.PluginException */ , \"Unexpected Exception during onComplete - \" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e));\n }\n });\n _onComplete = [];\n }\n }\n return nextProxy;\n }\n function _getExtCfg(identifier, createIfMissing) {\n var idCfg = null;\n var cfg = dynamicHandler.cfg;\n if (cfg && identifier) {\n var extCfg = cfg[0, $9fe4a5d5204a4cff$export$ffb2356587263734 /* @min:%2eextensionConfig */ ];\n if (!extCfg && createIfMissing) extCfg = {};\n // Always set the value so that the property always exists\n cfg[0, $9fe4a5d5204a4cff$export$ffb2356587263734] = extCfg; // Note: it is valid for the \"value\" to be undefined\n // Calling `ref()` has a side effect of causing the referenced property to become dynamic (if not already)\n extCfg = dynamicHandler.ref(cfg, (0, $9fe4a5d5204a4cff$export$ffb2356587263734));\n if (extCfg) {\n idCfg = extCfg[identifier];\n if (!idCfg && createIfMissing) idCfg = {};\n // Always set the value so that the property always exists\n extCfg[identifier] = idCfg; // Note: it is valid for the \"value\" to be undefined\n // Calling `ref()` has a side effect of causing the referenced property to become dynamic (if not already)\n idCfg = dynamicHandler.ref(extCfg, identifier);\n }\n }\n return idCfg;\n }\n function _resolveExtCfg(identifier, defaultValues) {\n var newConfig = _getExtCfg(identifier, true);\n if (defaultValues) // Enumerate over the defaultValues and if not already populated attempt to\n // find a value from the root config or use the default value\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(defaultValues, function(field, defaultValue) {\n // for each unspecified field, set the default value\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(newConfig[field])) {\n var cfgValue = dynamicHandler.cfg[field];\n if (cfgValue || !(0, $533f826bbc418791$export$bedb7023a7733221)(cfgValue)) newConfig[field] = cfgValue;\n }\n (0, $2b347a3380a9d5e1$export$f11b7d3a4617b9e9)(dynamicHandler, newConfig, field, defaultValue);\n });\n return dynamicHandler[0, $1ae5573ce493bccc$export$24caac6d68ff1537 /* @min:%2esetDf */ ](newConfig, defaultValues);\n }\n function _getConfig(identifier, field, defaultValue) {\n if (defaultValue === void 0) defaultValue = false;\n var theValue;\n var extConfig = _getExtCfg(identifier, false);\n var rootConfig = dynamicHandler.cfg;\n if (extConfig && (extConfig[field] || !(0, $533f826bbc418791$export$bedb7023a7733221)(extConfig[field]))) theValue = extConfig[field];\n else if (rootConfig[field] || !(0, $533f826bbc418791$export$bedb7023a7733221)(rootConfig[field])) theValue = rootConfig[field];\n return theValue || !(0, $533f826bbc418791$export$bedb7023a7733221)(theValue) ? theValue : defaultValue;\n }\n function _iterateChain(cb) {\n // Keep processing until we reach the end of the chain\n var nextPlugin;\n while(!!(nextPlugin = context._next())){\n var plugin = nextPlugin[0, $1ae5573ce493bccc$export$37717a508eca6e2d /* @min:%2egetPlugin */ ]();\n if (plugin) // callback with the current on\n cb(plugin);\n }\n }\n return context;\n}\nfunction $bc7124acb0f73e64$export$ca98f11e981bcfd6(telemetryChain, cfg, core, startAt) {\n var config = (0, $acb30f9e62dc5705$export$3a9e9180c14487fd)(cfg);\n var internalContext = $bc7124acb0f73e64$var$_createInternalContext(telemetryChain, config, core, startAt);\n var context = internalContext.ctx;\n function _processNext(env) {\n var nextPlugin = internalContext._next();\n if (nextPlugin) // Run the next plugin which will call \"processNext()\"\n nextPlugin[0, $9fe4a5d5204a4cff$export$820a3bce4a265606 /* @min:%2eprocessTelemetry */ ](env, context);\n return !nextPlugin;\n }\n function _createNew(plugins, startAt) {\n if (plugins === void 0) plugins = null;\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(plugins)) plugins = $bc7124acb0f73e64$export$107e639207cdf742(plugins, config.cfg, core, startAt);\n return $bc7124acb0f73e64$export$ca98f11e981bcfd6(plugins || context[0, $1ae5573ce493bccc$export$36754a48de7fd714 /* @min:%2egetNext */ ](), config.cfg, core, startAt);\n }\n context[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ] = _processNext;\n context[0, $1ae5573ce493bccc$export$1e6514b499ba4d34 /* @min:%2ecreateNew */ ] = _createNew;\n return context;\n}\nfunction $bc7124acb0f73e64$export$91bbbd4999751948(telemetryChain, core, startAt) {\n var config = (0, $acb30f9e62dc5705$export$3a9e9180c14487fd)(core.config);\n var internalContext = $bc7124acb0f73e64$var$_createInternalContext(telemetryChain, config, core, startAt);\n var context = internalContext.ctx;\n function _processNext(unloadState) {\n var nextPlugin = internalContext._next();\n nextPlugin && nextPlugin[0, $1ae5573ce493bccc$export$7eb85b5cba77a43d /* @min:%2eunload */ ](context, unloadState);\n return !nextPlugin;\n }\n function _createNew(plugins, startAt) {\n if (plugins === void 0) plugins = null;\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(plugins)) plugins = $bc7124acb0f73e64$export$107e639207cdf742(plugins, config.cfg, core, startAt);\n return $bc7124acb0f73e64$export$91bbbd4999751948(plugins || context[0, $1ae5573ce493bccc$export$36754a48de7fd714 /* @min:%2egetNext */ ](), core, startAt);\n }\n context[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ] = _processNext;\n context[0, $1ae5573ce493bccc$export$1e6514b499ba4d34 /* @min:%2ecreateNew */ ] = _createNew;\n return context;\n}\nfunction $bc7124acb0f73e64$export$e4c32b40c4fbf98a(telemetryChain, core, startAt) {\n var config = (0, $acb30f9e62dc5705$export$3a9e9180c14487fd)(core.config);\n var internalContext = $bc7124acb0f73e64$var$_createInternalContext(telemetryChain, config, core, startAt);\n var context = internalContext.ctx;\n function _processNext(updateState) {\n return context.iterate(function(plugin) {\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(plugin[0, $1ae5573ce493bccc$export$c9f4bebf02f459de /* @min:%2eupdate */ ])) plugin[0, $1ae5573ce493bccc$export$c9f4bebf02f459de /* @min:%2eupdate */ ](context, updateState);\n });\n }\n function _createNew(plugins, startAt) {\n if (plugins === void 0) plugins = null;\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(plugins)) plugins = $bc7124acb0f73e64$export$107e639207cdf742(plugins, config.cfg, core, startAt);\n return $bc7124acb0f73e64$export$e4c32b40c4fbf98a(plugins || context[0, $1ae5573ce493bccc$export$36754a48de7fd714 /* @min:%2egetNext */ ](), core, startAt);\n }\n context[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ] = _processNext;\n context[0, $1ae5573ce493bccc$export$1e6514b499ba4d34 /* @min:%2ecreateNew */ ] = _createNew;\n return context;\n}\nfunction $bc7124acb0f73e64$export$107e639207cdf742(plugins, config, core, startAt) {\n var firstProxy = null;\n var add = startAt ? false : true;\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(plugins) && plugins[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n // Create the proxies and wire up the next plugin chain\n var lastProxy_1 = null;\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(plugins, function(thePlugin) {\n if (!add && startAt === thePlugin) add = true;\n if (add && thePlugin && (0, $533f826bbc418791$export$f6e2535fb5126e54)(thePlugin[0, $9fe4a5d5204a4cff$export$820a3bce4a265606 /* @min:%2eprocessTelemetry */ ])) {\n // Only add plugins that are processors\n var newProxy = $bc7124acb0f73e64$export$7f7b955927f4ae5e(thePlugin, config, core);\n if (!firstProxy) firstProxy = newProxy;\n if (lastProxy_1) // Set this new proxy as the next for the previous one\n lastProxy_1._setNext(newProxy);\n lastProxy_1 = newProxy;\n }\n });\n }\n if (startAt && !firstProxy) // Special case where the \"startAt\" was not in the original list of plugins\n return $bc7124acb0f73e64$export$107e639207cdf742([\n startAt\n ], config, core);\n return firstProxy;\n}\nfunction $bc7124acb0f73e64$export$7f7b955927f4ae5e(plugin, config, core) {\n var nextProxy = null;\n var hasProcessTelemetry = (0, $533f826bbc418791$export$f6e2535fb5126e54)(plugin[0, $9fe4a5d5204a4cff$export$820a3bce4a265606 /* @min:%2eprocessTelemetry */ ]);\n var hasSetNext = (0, $533f826bbc418791$export$f6e2535fb5126e54)(plugin[0, $1ae5573ce493bccc$export$55d672a1dc4d50c1 /* @min:%2esetNextPlugin */ ]);\n var chainId;\n if (plugin) chainId = plugin[0, $1ae5573ce493bccc$export$f001befbf8417151 /* @min:%2eidentifier */ ] + \"-\" + plugin[0, $9fe4a5d5204a4cff$export$58efcc07763b37be /* @min:%2epriority */ ] + \"-\" + $bc7124acb0f73e64$var$_chainId++;\n else chainId = \"Unknown-0-\" + $bc7124acb0f73e64$var$_chainId++;\n var proxyChain = {\n getPlugin: function() {\n return plugin;\n },\n getNext: function() {\n return nextProxy;\n },\n processTelemetry: _processTelemetry,\n unload: _unloadPlugin,\n update: _updatePlugin,\n _id: chainId,\n _setNext: function(nextPlugin) {\n nextProxy = nextPlugin;\n }\n };\n function _getTelCtx() {\n var itemCtx;\n // Looks like a plugin didn't pass the (optional) context, so create a new one\n if (plugin && (0, $533f826bbc418791$export$f6e2535fb5126e54)(plugin[$bc7124acb0f73e64$var$strGetTelCtx])) // This plugin extends from the BaseTelemetryPlugin so lets use it\n itemCtx = plugin[$bc7124acb0f73e64$var$strGetTelCtx]();\n if (!itemCtx) // Create a temporary one\n itemCtx = $bc7124acb0f73e64$export$ca98f11e981bcfd6(proxyChain, config, core);\n return itemCtx;\n }\n function _processChain(itemCtx, processPluginFn, name, details, isAsync) {\n var hasRun = false;\n var identifier = plugin ? plugin[0, $1ae5573ce493bccc$export$f001befbf8417151 /* @min:%2eidentifier */ ] : $bc7124acb0f73e64$var$strTelemetryPluginChain;\n var hasRunContext = itemCtx[$bc7124acb0f73e64$var$strHasRunFlags];\n if (!hasRunContext) // Assign and populate\n hasRunContext = itemCtx[$bc7124acb0f73e64$var$strHasRunFlags] = {};\n // Ensure that we keep the context in sync\n itemCtx.setNext(nextProxy);\n if (plugin) (0, $28deccfc004f252b$export$c6fbeb260600c482)(itemCtx[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ](), function() {\n return identifier + \":\" + name;\n }, function() {\n // Mark this component as having run\n hasRunContext[chainId] = true;\n try {\n // Set a flag on the next plugin so we know if it was attempted to be executed\n var nextId = nextProxy ? nextProxy._id : (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n if (nextId) hasRunContext[nextId] = false;\n hasRun = processPluginFn(itemCtx);\n } catch (error) {\n var hasNextRun = nextProxy ? hasRunContext[nextProxy._id] : true;\n if (hasNextRun) // The next plugin after us has already run so set this one as complete\n hasRun = true;\n if (!nextProxy || !hasNextRun) // Either we have no next plugin or the current one did not attempt to call the next plugin\n // Which means the current one is the root of the failure so log/report this failure\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(itemCtx[0, $1ae5573ce493bccc$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 1 /* eLoggingSeverity.CRITICAL */ , 73 /* _eInternalMessageId.PluginException */ , \"Plugin [\" + identifier + \"] failed during \" + name + \" - \" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(error) + \", run flags: \" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(hasRunContext));\n }\n }, details, isAsync);\n return hasRun;\n }\n function _processTelemetry(env, itemCtx) {\n itemCtx = itemCtx || _getTelCtx();\n function _callProcessTelemetry(itemCtx) {\n if (!plugin || !hasProcessTelemetry) return false;\n var pluginState = (0, $757da337740268ac$export$37cfaecb9b4b1b3b)(plugin);\n if (pluginState[0, $1ae5573ce493bccc$export$7176fb2a7d11927e /* @min:%2eteardown */ ] || pluginState[0, $9fe4a5d5204a4cff$export$49e9417944569ae8]) return false;\n // Ensure that we keep the context in sync (for processNext()), just in case a plugin\n // doesn't calls processTelemetry() instead of itemContext.processNext() or some\n // other form of error occurred\n if (hasSetNext) // Backward compatibility setting the next plugin on the instance\n plugin[0, $1ae5573ce493bccc$export$55d672a1dc4d50c1 /* @min:%2esetNextPlugin */ ](nextProxy);\n plugin[0, $9fe4a5d5204a4cff$export$820a3bce4a265606 /* @min:%2eprocessTelemetry */ ](env, itemCtx);\n // Process Telemetry is expected to call itemCtx.processNext() or nextPlugin.processTelemetry()\n return true;\n }\n if (!_processChain(itemCtx, _callProcessTelemetry, \"processTelemetry\", function() {\n return {\n item: env\n };\n }, !env.sync)) // The underlying plugin is either not defined, not enabled or does not have a processTelemetry implementation\n // so we still want the next plugin to be executed.\n itemCtx[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ](env);\n }\n function _unloadPlugin(unloadCtx, unloadState) {\n function _callTeardown() {\n // Setting default of hasRun as false so the proxyProcessFn() is called as teardown() doesn't have to exist or call unloadNext().\n var hasRun = false;\n if (plugin) {\n var pluginState = (0, $757da337740268ac$export$37cfaecb9b4b1b3b)(plugin);\n var pluginCore = plugin[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99] || pluginState[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ];\n // Only teardown the plugin if it was initialized by the current core (i.e. It's not a shared plugin)\n if (plugin && (!pluginCore || pluginCore === unloadCtx.core()) && !pluginState[0, $1ae5573ce493bccc$export$7176fb2a7d11927e /* @min:%2eteardown */ ]) {\n // Handle plugins that don't extend from the BaseTelemetryPlugin\n pluginState[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ] = null;\n pluginState[0, $1ae5573ce493bccc$export$7176fb2a7d11927e /* @min:%2eteardown */ ] = true;\n pluginState[0, $1ae5573ce493bccc$export$2e2716e9c35a66a8 /* @min:%2eisInitialized */ ] = false;\n if (plugin[0, $1ae5573ce493bccc$export$7176fb2a7d11927e /* @min:%2eteardown */ ] && plugin[0, $1ae5573ce493bccc$export$7176fb2a7d11927e /* @min:%2eteardown */ ](unloadCtx, unloadState) === true) // plugin told us that it was going to (or has) call unloadCtx.processNext()\n hasRun = true;\n }\n }\n return hasRun;\n }\n if (!_processChain(unloadCtx, _callTeardown, \"unload\", function() {}, unloadState[0, $1ae5573ce493bccc$export$d8114c9e990204cb /* @min:%2eisAsync */ ])) // Only called if we hasRun was not true\n unloadCtx[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ](unloadState);\n }\n function _updatePlugin(updateCtx, updateState) {\n function _callUpdate() {\n // Setting default of hasRun as false so the proxyProcessFn() is called as teardown() doesn't have to exist or call unloadNext().\n var hasRun = false;\n if (plugin) {\n var pluginState = (0, $757da337740268ac$export$37cfaecb9b4b1b3b)(plugin);\n var pluginCore = plugin[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99] || pluginState[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ];\n // Only update the plugin if it was initialized by the current core (i.e. It's not a shared plugin)\n if (plugin && (!pluginCore || pluginCore === updateCtx.core()) && !pluginState[0, $1ae5573ce493bccc$export$7176fb2a7d11927e /* @min:%2eteardown */ ]) {\n if (plugin[0, $1ae5573ce493bccc$export$c9f4bebf02f459de /* @min:%2eupdate */ ] && plugin[0, $1ae5573ce493bccc$export$c9f4bebf02f459de /* @min:%2eupdate */ ](updateCtx, updateState) === true) // plugin told us that it was going to (or has) call unloadCtx.processNext()\n hasRun = true;\n }\n }\n return hasRun;\n }\n if (!_processChain(updateCtx, _callUpdate, \"update\", function() {}, false)) // Only called if we hasRun was not true\n updateCtx[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ](updateState);\n }\n return (0, $36a077d9f4439b69$export$5da24d7703175bc5)(proxyChain);\n}\n/**\r\n * This class will be removed!\r\n * @deprecated use createProcessTelemetryContext() instead\r\n */ var $bc7124acb0f73e64$export$7c2ac74a00234af1 = /** @class */ function() {\n /**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n */ function ProcessTelemetryContext(pluginChain, config, core, startAt) {\n var _self = this;\n var context = $bc7124acb0f73e64$export$ca98f11e981bcfd6(pluginChain, config, core, startAt);\n // Proxy all functions of the context to this object\n (0, $0b747974b0bb3563$export$94f4c7fb7e7d8dc7)(_self, context, (0, $36a077d9f4439b69$export$f7628dc18f4211e5)(context));\n }\n return ProcessTelemetryContext;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\nfunction $d13bf4befeee29ad$export$1dd1604aeaf8cfed() {\n var handlers = [];\n function _addHandler(handler) {\n if (handler) handlers[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](handler);\n }\n function _runHandlers(unloadCtx, unloadState) {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(handlers, function(handler) {\n try {\n handler(unloadCtx, unloadState);\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(unloadCtx[0, $1ae5573ce493bccc$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 2 /* eLoggingSeverity.WARNING */ , 73 /* _eInternalMessageId.PluginException */ , \"Unexpected error calling unload handler - \" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e));\n }\n });\n handlers = [];\n }\n return {\n add: _addHandler,\n run: _runHandlers\n };\n}\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\nfunction $9d91a18754d7a062$export$50db6e277db66ea0(value) {\n return !!value && (0, $533f826bbc418791$export$f6e2535fb5126e54)(value.next);\n}\nfunction $9d91a18754d7a062$export$9652023d9040757(value) {\n return !(0, $533f826bbc418791$export$3388cdee8977b866)(value) && (0, $533f826bbc418791$export$f6e2535fb5126e54)(value[(0, $3ab078397ef07bc3$export$3a9aefdadea26115)(3 /* WellKnownSymbols.iterator */ )]);\n}\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\n\nvar $4f88a205a18f32bb$var$_iterSymbol;\nfunction $4f88a205a18f32bb$export$1180a64ad833b902(iter, callbackfn, thisArg) {\n if (iter) {\n if (!(0, $9d91a18754d7a062$export$50db6e277db66ea0)(iter)) {\n !$4f88a205a18f32bb$var$_iterSymbol && ($4f88a205a18f32bb$var$_iterSymbol = (0, $d8ec17546a34ef88$export$db98eae15987454c)(function() {\n return (0, $3ab078397ef07bc3$export$3a9aefdadea26115)(3 /* WellKnownSymbols.iterator */ );\n }));\n iter = iter[$4f88a205a18f32bb$var$_iterSymbol.v] ? iter[$4f88a205a18f32bb$var$_iterSymbol.v]() : null;\n }\n if ((0, $9d91a18754d7a062$export$50db6e277db66ea0)(iter)) {\n var err = void 0;\n var iterResult = void 0;\n try {\n var count = 0;\n while(!(iterResult = iter.next())[0, $b347daff6f5f8dc1$export$71efb3495f6084f2]){\n if (callbackfn.call(thisArg || iter, iterResult[0, $b347daff6f5f8dc1$export$764bd63f4c2043a2], count, iter) === -1) break;\n count++;\n }\n } catch (failed) {\n err = {\n e: failed\n };\n if (iter.throw) {\n iterResult = null;\n iter.throw(err);\n }\n } finally{\n try {\n if (iterResult && !iterResult[0, $b347daff6f5f8dc1$export$71efb3495f6084f2]) iter.return && iter.return(iterResult);\n } finally{\n if (err) // eslint-disable-next-line no-unsafe-finally\n throw err.e;\n }\n }\n }\n }\n}\n\n\n\nfunction $54343718a076ab6e$export$69c7b96f216fdf7b(target, elms) {\n if (!(0, $533f826bbc418791$export$fce6876652108ab)(elms) && target) {\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(elms)) // This is not just \"target.push(elms)\" but becomes effectively \"target.push(elms[0], elms[1], ...)\"\n (0, $d88e50d36d3d9760$export$2801572b9d3736b5)(target.push, target, elms);\n else if ((0, $9d91a18754d7a062$export$50db6e277db66ea0)(elms) || (0, $9d91a18754d7a062$export$9652023d9040757)(elms)) (0, $4f88a205a18f32bb$export$1180a64ad833b902)(elms, function(elm) {\n target.push(elm);\n });\n else target.push(elms);\n }\n return target;\n}\n\n\n\nfunction $efe9376777343289$export$31fa167f9d342989() {\n var _hooks = [];\n function _doUnload(logger) {\n var oldHooks = _hooks;\n _hooks = [];\n // Remove all registered unload hooks\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(oldHooks, function(fn) {\n // allow either rm or remove callback function\n try {\n (fn.rm || fn.remove).call(fn);\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 73 /* _eInternalMessageId.PluginException */ , \"Unloading:\" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e));\n }\n });\n }\n function _addHook(hooks) {\n if (hooks) (0, $54343718a076ab6e$export$69c7b96f216fdf7b)(_hooks, hooks);\n }\n return {\n run: _doUnload,\n add: _addHook\n };\n}\n\n\n\"use strict\";\nvar $b61d51369f8191a4$var$_a;\nvar $b61d51369f8191a4$var$strGetPlugin = \"getPlugin\";\nvar $b61d51369f8191a4$var$defaultValues = ($b61d51369f8191a4$var$_a = {}, $b61d51369f8191a4$var$_a[0, $9fe4a5d5204a4cff$export$ffb2356587263734] = {\n isVal: (0, $0b747974b0bb3563$export$71fc1ee3e76bc1fe),\n v: {}\n}, $b61d51369f8191a4$var$_a);\n/**\r\n * BaseTelemetryPlugin provides a basic implementation of the ITelemetryPlugin interface so that plugins\r\n * can avoid implementation the same set of boiler plate code as well as provide a base\r\n * implementation so that new default implementations can be added without breaking all plugins.\r\n */ var $b61d51369f8191a4$export$64a11c2f90e6766c = /** @class */ function() {\n function BaseTelemetryPlugin() {\n var _self = this; // Setting _self here as it's used outside of the dynamicProto as well\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\n var _isinitialized;\n var _rootCtx; // Used as the root context, holding the current config and initialized core\n var _nextPlugin; // Used for backward compatibility where plugins don't call the main pipeline\n var _unloadHandlerContainer;\n var _hookContainer;\n _initDefaults();\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(BaseTelemetryPlugin, _self, function(_self) {\n _self[0, $1ae5573ce493bccc$export$65cd33bb52d04675 /* @min:%2einitialize */ ] = function(config, core, extensions, pluginChain) {\n _setDefaults(config, core, pluginChain);\n _isinitialized = true;\n };\n _self[0, $1ae5573ce493bccc$export$7176fb2a7d11927e /* @min:%2eteardown */ ] = function(unloadCtx, unloadState) {\n var _a;\n // If this plugin has already been torn down (not operational) or is not initialized (core is not set)\n // or the core being used for unload was not the same core used for initialization.\n var core = _self[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ];\n if (!core || unloadCtx && core !== unloadCtx[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ]()) // Do Nothing as either the plugin is not initialized or was not initialized by the current core\n return;\n var result;\n var unloadDone = false;\n var theUnloadCtx = unloadCtx || (0, $bc7124acb0f73e64$export$91bbbd4999751948)(null, core, _nextPlugin && _nextPlugin[$b61d51369f8191a4$var$strGetPlugin] ? _nextPlugin[$b61d51369f8191a4$var$strGetPlugin]() : _nextPlugin);\n var theUnloadState = unloadState || (_a = {\n reason: 0 /* TelemetryUnloadReason.ManualTeardown */ \n }, _a[0, $1ae5573ce493bccc$export$d8114c9e990204cb /* @min:isAsync */ ] = false, _a);\n function _unloadCallback() {\n if (!unloadDone) {\n unloadDone = true;\n _unloadHandlerContainer.run(theUnloadCtx, unloadState);\n _hookContainer.run(theUnloadCtx[0, $1ae5573ce493bccc$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ]());\n if (result === true) theUnloadCtx[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ](theUnloadState);\n _initDefaults();\n }\n }\n if (!_self[0, $1ae5573ce493bccc$export$458d234b616d0745 /* @min:%2e_doTeardown */ ] || _self[0, $1ae5573ce493bccc$export$458d234b616d0745 /* @min:%2e_doTeardown */ ](theUnloadCtx, theUnloadState, _unloadCallback) !== true) _unloadCallback();\n else // Tell the caller that we will be calling processNext()\n result = true;\n return result;\n };\n _self[0, $1ae5573ce493bccc$export$c9f4bebf02f459de /* @min:%2eupdate */ ] = function(updateCtx, updateState) {\n // If this plugin has already been torn down (not operational) or is not initialized (core is not set)\n // or the core being used for unload was not the same core used for initialization.\n var core = _self[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ];\n if (!core || updateCtx && core !== updateCtx[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ]()) // Do Nothing\n return;\n var result;\n var updateDone = false;\n var theUpdateCtx = updateCtx || (0, $bc7124acb0f73e64$export$e4c32b40c4fbf98a)(null, core, _nextPlugin && _nextPlugin[$b61d51369f8191a4$var$strGetPlugin] ? _nextPlugin[$b61d51369f8191a4$var$strGetPlugin]() : _nextPlugin);\n var theUpdateState = updateState || {\n reason: 0 /* TelemetryUpdateReason.Unknown */ \n };\n function _updateCallback() {\n if (!updateDone) {\n updateDone = true;\n _setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx[0, $1ae5573ce493bccc$export$36754a48de7fd714 /* @min:%2egetNext */ ]());\n }\n }\n if (!_self._doUpdate || _self._doUpdate(theUpdateCtx, theUpdateState, _updateCallback) !== true) _updateCallback();\n else result = true;\n return result;\n };\n (0, $0b747974b0bb3563$export$5dd8d245f6f94a18)(_self, \"_addUnloadCb\", function() {\n return _unloadHandlerContainer;\n }, \"add\");\n (0, $0b747974b0bb3563$export$5dd8d245f6f94a18)(_self, \"_addHook\", function() {\n return _hookContainer;\n }, \"add\");\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"_unloadHooks\", {\n g: function() {\n return _hookContainer;\n }\n });\n });\n // These are added after the dynamicProto so that are not moved to the prototype\n _self[0, $1ae5573ce493bccc$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ] = function(itemCtx) {\n return _getTelCtx(itemCtx)[0, $1ae5573ce493bccc$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ]();\n };\n _self[0, $1ae5573ce493bccc$export$2e2716e9c35a66a8 /* @min:%2eisInitialized */ ] = function() {\n return _isinitialized;\n };\n _self.setInitialized = function(isInitialized) {\n _isinitialized = isInitialized;\n };\n // _self.getNextPlugin = () => DO NOT IMPLEMENT\n // Sub-classes of this base class *should* not be relying on this value and instead\n // should use processNext() function. If you require access to the plugin use the\n // IProcessTelemetryContext.getNext().getPlugin() while in the pipeline, Note getNext() may return null.\n _self[0, $1ae5573ce493bccc$export$55d672a1dc4d50c1 /* @min:%2esetNextPlugin */ ] = function(next) {\n _nextPlugin = next;\n };\n _self[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ] = function(env, itemCtx) {\n if (itemCtx) // Normal core execution sequence\n itemCtx[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ](env);\n else if (_nextPlugin && (0, $533f826bbc418791$export$f6e2535fb5126e54)(_nextPlugin[0, $9fe4a5d5204a4cff$export$820a3bce4a265606 /* @min:%2eprocessTelemetry */ ])) // Looks like backward compatibility or out of band processing. And as it looks\n // like a ITelemetryPlugin or ITelemetryPluginChain, just call processTelemetry\n _nextPlugin[0, $9fe4a5d5204a4cff$export$820a3bce4a265606 /* @min:%2eprocessTelemetry */ ](env, null);\n };\n _self._getTelCtx = _getTelCtx;\n function _getTelCtx(currentCtx) {\n if (currentCtx === void 0) currentCtx = null;\n var itemCtx = currentCtx;\n if (!itemCtx) {\n var rootCtx = _rootCtx || (0, $bc7124acb0f73e64$export$ca98f11e981bcfd6)(null, {}, _self[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ]);\n // tslint:disable-next-line: prefer-conditional-expression\n if (_nextPlugin && _nextPlugin[$b61d51369f8191a4$var$strGetPlugin]) // Looks like a chain object\n itemCtx = rootCtx[0, $1ae5573ce493bccc$export$1e6514b499ba4d34 /* @min:%2ecreateNew */ ](null, _nextPlugin[$b61d51369f8191a4$var$strGetPlugin]);\n else itemCtx = rootCtx[0, $1ae5573ce493bccc$export$1e6514b499ba4d34 /* @min:%2ecreateNew */ ](null, _nextPlugin);\n }\n return itemCtx;\n }\n function _setDefaults(config, core, pluginChain) {\n // Make sure the extensionConfig exists and the config is dynamic\n (0, $acb30f9e62dc5705$export$3a9e9180c14487fd)(config, $b61d51369f8191a4$var$defaultValues, (0, $cc2aaaebf96ac6a7$export$5102d32ea1d740a)(core));\n if (!pluginChain && core) // Get the first plugin from the core\n pluginChain = core[0, $1ae5573ce493bccc$export$a08d24db8e8aa3f3 /* @min:%2egetProcessTelContext */ ]()[0, $1ae5573ce493bccc$export$36754a48de7fd714 /* @min:%2egetNext */ ]();\n var nextPlugin = _nextPlugin;\n if (_nextPlugin && _nextPlugin[$b61d51369f8191a4$var$strGetPlugin]) // If it looks like a proxy/chain then get the plugin\n nextPlugin = _nextPlugin[$b61d51369f8191a4$var$strGetPlugin]();\n // Support legacy plugins where core was defined as a property\n _self[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ] = core;\n _rootCtx = (0, $bc7124acb0f73e64$export$ca98f11e981bcfd6)(pluginChain, config, core, nextPlugin);\n }\n function _initDefaults() {\n _isinitialized = false;\n _self[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ] = null;\n _rootCtx = null;\n _nextPlugin = null;\n _hookContainer = (0, $efe9376777343289$export$31fa167f9d342989)();\n _unloadHandlerContainer = (0, $d13bf4befeee29ad$export$1dd1604aeaf8cfed)();\n }\n }\n // Removed Stub for BaseTelemetryPlugin.prototype.initialize.\n // Removed Stub for BaseTelemetryPlugin.prototype.teardown.\n // Removed Stub for BaseTelemetryPlugin.prototype.update.\n // Removed Stub for BaseTelemetryPlugin.prototype._addUnloadCb.\n // Removed Stub for BaseTelemetryPlugin.prototype._addHook.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n BaseTelemetryPlugin.__ieDyn = 1;\n return BaseTelemetryPlugin;\n}();\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n/**\r\n * @internal\r\n * @ignore\r\n * @param str\r\n * @param defaultValue\r\n * @returns\r\n */ function $61c4d9dd4226f64e$var$_stringToBoolOrDefault(theValue, defaultValue, theConfig) {\n if (!theValue && (0, $533f826bbc418791$export$bedb7023a7733221)(theValue)) return defaultValue;\n if ((0, $533f826bbc418791$export$f9ce7b637dfbe238)(theValue)) return theValue;\n return (0, $d813f4522b40a37e$export$590567be997858b6)(theValue)[0, $1ae5573ce493bccc$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]() === \"true\";\n}\nfunction $61c4d9dd4226f64e$export$5d17fe34e1e248ba(defaultValue) {\n return {\n mrg: true,\n v: defaultValue\n };\n}\nfunction $61c4d9dd4226f64e$export$e86b712d02676c90(setter, defaultValue) {\n return {\n set: setter,\n v: defaultValue\n };\n}\nfunction $61c4d9dd4226f64e$export$d0884590a6a82e6c(validator, defaultValue, fallBackName) {\n return {\n fb: fallBackName,\n isVal: validator,\n v: defaultValue\n };\n}\nfunction $61c4d9dd4226f64e$export$bad0d7bace730ae(defaultValue, fallBackName) {\n return {\n fb: fallBackName,\n set: $61c4d9dd4226f64e$var$_stringToBoolOrDefault,\n v: !!defaultValue\n };\n}\nfunction $61c4d9dd4226f64e$export$4308728f2256db2f(defaultValue) {\n return {\n isVal: (0, $533f826bbc418791$export$f6e2535fb5126e54),\n v: defaultValue || null\n };\n}\nfunction $61c4d9dd4226f64e$export$75965e1022d5969a(defaultValue) {\n return {\n isVal: (0, $533f826bbc418791$export$844ec244b1367d54),\n v: (0, $d813f4522b40a37e$export$590567be997858b6)(defaultValue || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759))\n };\n}\nfunction $61c4d9dd4226f64e$export$4ebeffd29cffbfb(defaultValue) {\n var _a;\n return _a = {}, _a[0, $1ae5573ce493bccc$export$9d71a37f0770d87f /* @min:blkVal */ ] = true, _a.v = defaultValue, _a;\n}\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n// Added to help with minfication\nvar $12cc003c7fb5ccde$var$strOnPrefix = \"on\";\nvar $12cc003c7fb5ccde$var$strAttachEvent = \"attachEvent\";\nvar $12cc003c7fb5ccde$var$strAddEventHelper = \"addEventListener\";\nvar $12cc003c7fb5ccde$var$strDetachEvent = \"detachEvent\";\nvar $12cc003c7fb5ccde$var$strRemoveEventListener = \"removeEventListener\";\nvar $12cc003c7fb5ccde$var$strEvents = \"events\";\nvar $12cc003c7fb5ccde$var$strVisibilityChangeEvt = \"visibilitychange\";\nvar $12cc003c7fb5ccde$var$strPageHide = \"pagehide\";\nvar $12cc003c7fb5ccde$var$strPageShow = \"pageshow\";\nvar $12cc003c7fb5ccde$var$strUnload = \"unload\";\nvar $12cc003c7fb5ccde$var$strBeforeUnload = \"beforeunload\";\nvar $12cc003c7fb5ccde$var$strPageHideNamespace = (0, $8a2d104e2647a310$export$eb4a6badb18ead04)(\"aiEvtPageHide\");\nvar $12cc003c7fb5ccde$var$strPageShowNamespace = (0, $8a2d104e2647a310$export$eb4a6badb18ead04)(\"aiEvtPageShow\");\nvar $12cc003c7fb5ccde$var$rRemoveEmptyNs = /\\.[\\.]+/g;\nvar $12cc003c7fb5ccde$var$rRemoveTrailingEmptyNs = /[\\.]+$/;\nvar $12cc003c7fb5ccde$var$_guid = 1;\nvar $12cc003c7fb5ccde$var$elmNodeData = (0, $8a2d104e2647a310$export$b95c3438408d78aa)(\"events\");\nvar $12cc003c7fb5ccde$var$eventNamespace = /^([^.]*)(?:\\.(.+)|)/;\nfunction $12cc003c7fb5ccde$var$_normalizeNamespace(name) {\n if (name && name[0, $1ae5573ce493bccc$export$ef9ef3ed86c4485 /* @min:%2ereplace */ ]) return name[0, $1ae5573ce493bccc$export$ef9ef3ed86c4485 /* @min:%2ereplace */ ](/^[\\s\\.]+|(?=[\\s\\.])[\\.\\s]+$/g, (0, $9fe4a5d5204a4cff$export$5e8607ab26634759));\n return name;\n}\nfunction $12cc003c7fb5ccde$var$_getEvtNamespace(eventName, evtNamespace) {\n var _a;\n if (evtNamespace) {\n var theNamespace_1 = (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(evtNamespace)) {\n theNamespace_1 = (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(evtNamespace, function(name) {\n name = $12cc003c7fb5ccde$var$_normalizeNamespace(name);\n if (name) {\n if (name[0] !== \".\") name = \".\" + name;\n theNamespace_1 += name;\n }\n });\n } else theNamespace_1 = $12cc003c7fb5ccde$var$_normalizeNamespace(evtNamespace);\n if (theNamespace_1) {\n if (theNamespace_1[0] !== \".\") theNamespace_1 = \".\" + theNamespace_1;\n // We may only have the namespace and not an eventName\n eventName = (eventName || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759)) + theNamespace_1;\n }\n }\n var parsedEvent = $12cc003c7fb5ccde$var$eventNamespace.exec(eventName || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759)) || [];\n return _a = {}, _a[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:type */ ] = parsedEvent[1], _a.ns = (parsedEvent[2] || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759)).replace($12cc003c7fb5ccde$var$rRemoveEmptyNs, \".\").replace($12cc003c7fb5ccde$var$rRemoveTrailingEmptyNs, (0, $9fe4a5d5204a4cff$export$5e8607ab26634759))[0, $1ae5573ce493bccc$export$b889f1d4cb07c706 /* @min:%2esplit */ ](\".\").sort().join(\".\"), _a;\n}\nfunction $12cc003c7fb5ccde$export$e2bcc16f65e2a5d2(target, eventName, evtNamespace) {\n var theEvents = [];\n var eventCache = $12cc003c7fb5ccde$var$elmNodeData.get(target, $12cc003c7fb5ccde$var$strEvents, {}, false);\n var evtName = $12cc003c7fb5ccde$var$_getEvtNamespace(eventName, evtNamespace);\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(eventCache, function(evtType, registeredEvents) {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(registeredEvents, function(value) {\n var _a;\n if (!evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ] || evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ] === value.evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ]) {\n if (!evtName.ns || evtName.ns === evtName.ns) theEvents[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ]((_a = {}, _a[0, $1ae5573ce493bccc$export$9734b0a24bf02e93 /* @min:name */ ] = value.evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ] + (value.evtName.ns ? \".\" + value.evtName.ns : (0, $9fe4a5d5204a4cff$export$5e8607ab26634759)), _a.handler = value[0, $1ae5573ce493bccc$export$b353fcbe1ae31450 /* @min:%2ehandler */ ], _a));\n }\n });\n });\n return theEvents;\n}\n// Exported for internal unit testing only\nfunction $12cc003c7fb5ccde$var$_getRegisteredEvents(target, evtName, addDefault) {\n if (addDefault === void 0) addDefault = true;\n var aiEvts = $12cc003c7fb5ccde$var$elmNodeData.get(target, $12cc003c7fb5ccde$var$strEvents, {}, addDefault);\n var registeredEvents = aiEvts[evtName];\n if (!registeredEvents) registeredEvents = aiEvts[evtName] = [];\n return registeredEvents;\n}\nfunction $12cc003c7fb5ccde$var$_doDetach(obj, evtName, handlerRef, useCapture) {\n if (obj && evtName && evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ]) {\n if (obj[$12cc003c7fb5ccde$var$strRemoveEventListener]) obj[$12cc003c7fb5ccde$var$strRemoveEventListener](evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ], handlerRef, useCapture);\n else if (obj[$12cc003c7fb5ccde$var$strDetachEvent]) obj[$12cc003c7fb5ccde$var$strDetachEvent]($12cc003c7fb5ccde$var$strOnPrefix + evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ], handlerRef);\n }\n}\nfunction $12cc003c7fb5ccde$var$_doAttach(obj, evtName, handlerRef, useCapture) {\n var result = false;\n if (obj && evtName && evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ] && handlerRef) {\n if (obj[$12cc003c7fb5ccde$var$strAddEventHelper]) {\n // all browsers except IE before version 9\n obj[$12cc003c7fb5ccde$var$strAddEventHelper](evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ], handlerRef, useCapture);\n result = true;\n } else if (obj[$12cc003c7fb5ccde$var$strAttachEvent]) {\n // IE before version 9\n obj[$12cc003c7fb5ccde$var$strAttachEvent]($12cc003c7fb5ccde$var$strOnPrefix + evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ], handlerRef);\n result = true;\n }\n }\n return result;\n}\nfunction $12cc003c7fb5ccde$var$_doUnregister(target, events, evtName, unRegFn) {\n var idx = events[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ];\n while(idx--){\n var theEvent = events[idx];\n if (theEvent) {\n if (!evtName.ns || evtName.ns === theEvent.evtName.ns) {\n if (!unRegFn || unRegFn(theEvent)) {\n $12cc003c7fb5ccde$var$_doDetach(target, theEvent.evtName, theEvent[0, $1ae5573ce493bccc$export$b353fcbe1ae31450 /* @min:%2ehandler */ ], theEvent.capture);\n // Remove the registered event\n events[0, $1ae5573ce493bccc$export$84020a2e4fe863b0 /* @min:%2esplice */ ](idx, 1);\n }\n }\n }\n }\n}\nfunction $12cc003c7fb5ccde$var$_unregisterEvents(target, evtName, unRegFn) {\n if (evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ]) $12cc003c7fb5ccde$var$_doUnregister(target, $12cc003c7fb5ccde$var$_getRegisteredEvents(target, evtName[0, $1ae5573ce493bccc$export$8fdcd26070ec159 /* @min:%2etype */ ]), evtName, unRegFn);\n else {\n var eventCache = $12cc003c7fb5ccde$var$elmNodeData.get(target, $12cc003c7fb5ccde$var$strEvents, {});\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(eventCache, function(evtType, events) {\n $12cc003c7fb5ccde$var$_doUnregister(target, events, evtName, unRegFn);\n });\n // Cleanup\n if ((0, $36a077d9f4439b69$export$f7628dc18f4211e5)(eventCache)[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] === 0) $12cc003c7fb5ccde$var$elmNodeData.kill(target, $12cc003c7fb5ccde$var$strEvents);\n }\n}\nfunction $12cc003c7fb5ccde$export$3f37a50e0edde3be(theNamespace, namespaces) {\n var newNamespaces;\n if (namespaces) {\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(namespaces)) newNamespaces = [\n theNamespace\n ].concat(namespaces);\n else newNamespaces = [\n theNamespace,\n namespaces\n ];\n // resort the namespaces so they are always in order\n newNamespaces = $12cc003c7fb5ccde$var$_getEvtNamespace(\"xx\", newNamespaces).ns[0, $1ae5573ce493bccc$export$b889f1d4cb07c706 /* @min:%2esplit */ ](\".\");\n } else newNamespaces = theNamespace;\n return newNamespaces;\n}\nfunction $12cc003c7fb5ccde$export$324ab159353a60a9(target, eventName, handlerRef, evtNamespace, useCapture) {\n var _a;\n if (useCapture === void 0) useCapture = false;\n var result = false;\n if (target) try {\n var evtName = $12cc003c7fb5ccde$var$_getEvtNamespace(eventName, evtNamespace);\n result = $12cc003c7fb5ccde$var$_doAttach(target, evtName, handlerRef, useCapture);\n if (result && $12cc003c7fb5ccde$var$elmNodeData.accept(target)) {\n var registeredEvent = (_a = {\n guid: $12cc003c7fb5ccde$var$_guid++,\n evtName: evtName\n }, _a[0, $1ae5573ce493bccc$export$b353fcbe1ae31450 /* @min:handler */ ] = handlerRef, _a.capture = useCapture, _a);\n $12cc003c7fb5ccde$var$_getRegisteredEvents(target, evtName.type)[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](registeredEvent);\n }\n } catch (e) {\n // Just Ignore any error so that we don't break any execution path\n }\n return result;\n}\nfunction $12cc003c7fb5ccde$export$51dedceb7c784eff(target, eventName, handlerRef, evtNamespace, useCapture) {\n if (useCapture === void 0) useCapture = false;\n if (target) try {\n var evtName_1 = $12cc003c7fb5ccde$var$_getEvtNamespace(eventName, evtNamespace);\n var found_1 = false;\n $12cc003c7fb5ccde$var$_unregisterEvents(target, evtName_1, function(regEvent) {\n if (evtName_1.ns && !handlerRef || regEvent[0, $1ae5573ce493bccc$export$b353fcbe1ae31450 /* @min:%2ehandler */ ] === handlerRef) {\n found_1 = true;\n return true;\n }\n return false;\n });\n if (!found_1) // fallback to try and remove as requested\n $12cc003c7fb5ccde$var$_doDetach(target, evtName_1, handlerRef, useCapture);\n } catch (e) {\n // Just Ignore any error so that we don't break any execution path\n }\n}\nfunction $12cc003c7fb5ccde$export$c7861dcba2385fcd(obj, eventNameWithoutOn, handlerRef, useCapture) {\n if (useCapture === void 0) useCapture = false;\n return $12cc003c7fb5ccde$export$324ab159353a60a9(obj, eventNameWithoutOn, handlerRef, null, useCapture);\n}\nfunction $12cc003c7fb5ccde$export$647f6b935c1d6b6(obj, eventNameWithoutOn, handlerRef, useCapture) {\n if (useCapture === void 0) useCapture = false;\n $12cc003c7fb5ccde$export$51dedceb7c784eff(obj, eventNameWithoutOn, handlerRef, null, useCapture);\n}\nfunction $12cc003c7fb5ccde$export$3b37be979ee3303a(eventName, callback, evtNamespace) {\n var result = false;\n var w = (0, $3d5fcb60a9467a45$export$38b2d434cce3ea22)();\n if (w) {\n result = $12cc003c7fb5ccde$export$324ab159353a60a9(w, eventName, callback, evtNamespace);\n result = $12cc003c7fb5ccde$export$324ab159353a60a9(w[\"body\"], eventName, callback, evtNamespace) || result;\n }\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n if (doc) result = $12cc003c7fb5ccde$export$324ab159353a60a9(doc, eventName, callback, evtNamespace) || result;\n return result;\n}\nfunction $12cc003c7fb5ccde$export$546f5991fce5bf06(eventName, callback, evtNamespace) {\n var w = (0, $3d5fcb60a9467a45$export$38b2d434cce3ea22)();\n if (w) {\n $12cc003c7fb5ccde$export$51dedceb7c784eff(w, eventName, callback, evtNamespace);\n $12cc003c7fb5ccde$export$51dedceb7c784eff(w[\"body\"], eventName, callback, evtNamespace);\n }\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n if (doc) $12cc003c7fb5ccde$export$51dedceb7c784eff(doc, eventName, callback, evtNamespace);\n}\n/**\r\n * Bind the listener to the array of events\r\n * @param events - An string array of event names to bind the listener to\r\n * @param listener - The event callback to call when the event is triggered\r\n * @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */ function $12cc003c7fb5ccde$var$_addEventListeners(events, listener, excludeEvents, evtNamespace) {\n var added = false;\n if (listener && events && events[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(events, function(name) {\n if (name) {\n if (!excludeEvents || (0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(excludeEvents, name) === -1) added = $12cc003c7fb5ccde$export$3b37be979ee3303a(name, listener, evtNamespace) || added;\n }\n });\n return added;\n}\nfunction $12cc003c7fb5ccde$export$40a4ed63e5cb7043(events, listener, excludeEvents, evtNamespace) {\n var added = false;\n if (listener && events && (0, $533f826bbc418791$export$43bee75e5e14138e)(events)) {\n added = $12cc003c7fb5ccde$var$_addEventListeners(events, listener, excludeEvents, evtNamespace);\n if (!added && excludeEvents && excludeEvents[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) // Failed to add any listeners and we excluded some, so just attempt to add the excluded events\n added = $12cc003c7fb5ccde$var$_addEventListeners(events, listener, null, evtNamespace);\n }\n return added;\n}\nfunction $12cc003c7fb5ccde$export$8c7b13b21690651d(events, listener, evtNamespace) {\n if (events && (0, $533f826bbc418791$export$43bee75e5e14138e)(events)) (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(events, function(name) {\n if (name) $12cc003c7fb5ccde$export$546f5991fce5bf06(name, listener, evtNamespace);\n });\n}\nfunction $12cc003c7fb5ccde$export$f16ce149aca77fdd(listener, excludeEvents, evtNamespace) {\n // Hook the unload event for the document, window and body to ensure that the client events are flushed to the server\n // As just hooking the window does not always fire (on chrome) for page navigation's.\n return $12cc003c7fb5ccde$export$40a4ed63e5cb7043([\n $12cc003c7fb5ccde$var$strBeforeUnload,\n $12cc003c7fb5ccde$var$strUnload,\n $12cc003c7fb5ccde$var$strPageHide\n ], listener, excludeEvents, evtNamespace);\n}\nfunction $12cc003c7fb5ccde$export$272dc813b0b2654c(listener, evtNamespace) {\n $12cc003c7fb5ccde$export$8c7b13b21690651d([\n $12cc003c7fb5ccde$var$strBeforeUnload,\n $12cc003c7fb5ccde$var$strUnload,\n $12cc003c7fb5ccde$var$strPageHide\n ], listener, evtNamespace);\n}\nfunction $12cc003c7fb5ccde$export$46744aee53e5e558(listener, excludeEvents, evtNamespace) {\n function _handlePageVisibility(evt) {\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n if (listener && doc && doc.visibilityState === \"hidden\") listener(evt);\n }\n // add the unique page show namespace to any provided namespace so we can only remove the ones added by \"pagehide\"\n var newNamespaces = $12cc003c7fb5ccde$export$3f37a50e0edde3be($12cc003c7fb5ccde$var$strPageHideNamespace, evtNamespace);\n var pageUnloadAdded = $12cc003c7fb5ccde$var$_addEventListeners([\n $12cc003c7fb5ccde$var$strPageHide\n ], listener, excludeEvents, newNamespaces);\n if (!excludeEvents || (0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(excludeEvents, $12cc003c7fb5ccde$var$strVisibilityChangeEvt) === -1) pageUnloadAdded = $12cc003c7fb5ccde$var$_addEventListeners([\n $12cc003c7fb5ccde$var$strVisibilityChangeEvt\n ], _handlePageVisibility, excludeEvents, newNamespaces) || pageUnloadAdded;\n if (!pageUnloadAdded && excludeEvents) // Failed to add any listeners and we where requested to exclude some, so just call again without excluding anything\n pageUnloadAdded = $12cc003c7fb5ccde$export$46744aee53e5e558(listener, null, evtNamespace);\n return pageUnloadAdded;\n}\nfunction $12cc003c7fb5ccde$export$6aca6ee3a147169f(listener, evtNamespace) {\n // add the unique page show namespace to any provided namespace so we only remove the ones added by \"pagehide\"\n var newNamespaces = $12cc003c7fb5ccde$export$3f37a50e0edde3be($12cc003c7fb5ccde$var$strPageHideNamespace, evtNamespace);\n $12cc003c7fb5ccde$export$8c7b13b21690651d([\n $12cc003c7fb5ccde$var$strPageHide\n ], listener, newNamespaces);\n $12cc003c7fb5ccde$export$8c7b13b21690651d([\n $12cc003c7fb5ccde$var$strVisibilityChangeEvt\n ], null, newNamespaces);\n}\nfunction $12cc003c7fb5ccde$export$cce4a6563c734c0(listener, excludeEvents, evtNamespace) {\n function _handlePageVisibility(evt) {\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n if (listener && doc && doc.visibilityState === \"visible\") listener(evt);\n }\n // add the unique page show namespace to any provided namespace so we can only remove the ones added by \"pageshow\"\n var newNamespaces = $12cc003c7fb5ccde$export$3f37a50e0edde3be($12cc003c7fb5ccde$var$strPageShowNamespace, evtNamespace);\n var pageShowAdded = $12cc003c7fb5ccde$var$_addEventListeners([\n $12cc003c7fb5ccde$var$strPageShow\n ], listener, excludeEvents, newNamespaces);\n pageShowAdded = $12cc003c7fb5ccde$var$_addEventListeners([\n $12cc003c7fb5ccde$var$strVisibilityChangeEvt\n ], _handlePageVisibility, excludeEvents, newNamespaces) || pageShowAdded;\n if (!pageShowAdded && excludeEvents) // Failed to add any listeners and we where requested to exclude some, so just call again without excluding anything\n pageShowAdded = $12cc003c7fb5ccde$export$cce4a6563c734c0(listener, null, evtNamespace);\n return pageShowAdded;\n}\nfunction $12cc003c7fb5ccde$export$c49093a8bd06690f(listener, evtNamespace) {\n // add the unique page show namespace to any provided namespace so we only remove the ones added by \"pageshow\"\n var newNamespaces = $12cc003c7fb5ccde$export$3f37a50e0edde3be($12cc003c7fb5ccde$var$strPageShowNamespace, evtNamespace);\n $12cc003c7fb5ccde$export$8c7b13b21690651d([\n $12cc003c7fb5ccde$var$strPageShow\n ], listener, newNamespaces);\n $12cc003c7fb5ccde$export$8c7b13b21690651d([\n $12cc003c7fb5ccde$var$strVisibilityChangeEvt\n ], null, newNamespaces);\n}\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\nvar $963b9811c2275531$var$aiInstrumentHooks = \"_aiHooks\";\nvar $963b9811c2275531$var$cbNames = [\n \"req\",\n \"rsp\",\n \"hkErr\",\n \"fnErr\"\n];\n/** @ignore */ function $963b9811c2275531$var$_arrLoop(arr, fn) {\n if (arr) for(var lp = 0; lp < arr[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ]; lp++){\n if (fn(arr[lp], lp)) break;\n }\n}\n/** @ignore */ function $963b9811c2275531$var$_doCallbacks(hooks, callDetails, cbArgs, hookCtx, type) {\n if (type >= 0 /* CallbackType.Request */ && type <= 2 /* CallbackType.HookError */ ) $963b9811c2275531$var$_arrLoop(hooks, function(hook, idx) {\n var cbks = hook.cbks;\n var cb = cbks[$963b9811c2275531$var$cbNames[type]];\n if (cb) {\n // Set the specific hook context implementation using a lazy creation pattern\n callDetails.ctx = function() {\n var ctx = hookCtx[idx] = hookCtx[idx] || {};\n return ctx;\n };\n try {\n cb[0, $1ae5573ce493bccc$export$2f85ca6962b15ff8 /* @min:%2eapply */ ](callDetails.inst, cbArgs);\n } catch (err) {\n var orgEx = callDetails.err;\n try {\n // Report Hook error via the callback\n var hookErrorCb = cbks[$963b9811c2275531$var$cbNames[2 /* CallbackType.HookError */ ]];\n if (hookErrorCb) {\n callDetails.err = err;\n hookErrorCb[0, $1ae5573ce493bccc$export$2f85ca6962b15ff8 /* @min:%2eapply */ ](callDetails.inst, cbArgs);\n }\n } catch (e) {\n // Not much we can do here -- swallowing the exception to avoid crashing the hosting app\n } finally{\n // restore the original exception (if any)\n callDetails.err = orgEx;\n }\n }\n }\n });\n}\n/** @ignore */ function $963b9811c2275531$var$_createFunctionHook(aiHook) {\n // Define a temporary method that queues-up a the real method call\n return function() {\n var _a;\n var funcThis = this;\n // Capture the original arguments passed to the method\n var orgArgs = arguments;\n var hooks = aiHook.h;\n var funcArgs = (_a = {}, _a[0, $1ae5573ce493bccc$export$9734b0a24bf02e93 /* @min:name */ ] = aiHook.n, _a.inst = funcThis, _a.ctx = null, _a.set = _replaceArg, _a);\n var hookCtx = [];\n var cbArgs = _createArgs([\n funcArgs\n ], orgArgs);\n funcArgs.evt = (0, $3d5fcb60a9467a45$export$3df6e51375017edd)(\"event\");\n function _createArgs(target, theArgs) {\n $963b9811c2275531$var$_arrLoop(theArgs, function(arg) {\n target[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](arg);\n });\n return target;\n }\n function _replaceArg(idx, value) {\n orgArgs = _createArgs([], orgArgs);\n orgArgs[idx] = value;\n cbArgs = _createArgs([\n funcArgs\n ], orgArgs);\n }\n // Call the pre-request hooks\n $963b9811c2275531$var$_doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 0 /* CallbackType.Request */ );\n // Call the original function was called\n var theFunc = aiHook.f;\n if (theFunc) try {\n funcArgs.rslt = theFunc[0, $1ae5573ce493bccc$export$2f85ca6962b15ff8 /* @min:%2eapply */ ](funcThis, orgArgs);\n } catch (err) {\n // Report the request callback\n funcArgs.err = err;\n $963b9811c2275531$var$_doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 3 /* CallbackType.FunctionError */ );\n // rethrow the original exception so anyone listening for it can catch the exception\n throw err;\n }\n // Call the post-request hooks\n $963b9811c2275531$var$_doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 1 /* CallbackType.Response */ );\n return funcArgs.rslt;\n };\n}\n/** @ignore */ function $963b9811c2275531$var$_getOwner(target, name, checkPrototype, checkParentProto) {\n var owner = null;\n if (target) {\n if ((0, $78c14fe71626d827$export$d76937f5d45b7158)(target, name)) owner = target;\n else if (checkPrototype) owner = $963b9811c2275531$var$_getOwner((0, $0b747974b0bb3563$export$821e81707b1677f9)(target), name, checkParentProto, false);\n }\n return owner;\n}\nfunction $963b9811c2275531$export$6b32104a5f4313f6(target, funcName, callbacks) {\n if (target) return $963b9811c2275531$export$152e6c4c396a57a(target[0, $67b827af57eed1eb$export$ecddaaeb55ecf049], funcName, callbacks, false);\n return null;\n}\nfunction $963b9811c2275531$export$aaa214566a8b50d(target, funcNames, callbacks) {\n if (target) return $963b9811c2275531$export$3bccad25f6aafea4(target[0, $67b827af57eed1eb$export$ecddaaeb55ecf049], funcNames, callbacks, false);\n return null;\n}\nfunction $963b9811c2275531$var$_createInstrumentHook(owner, funcName, fn, callbacks) {\n var aiHook = fn && fn[$963b9811c2275531$var$aiInstrumentHooks];\n if (!aiHook) {\n // Only hook the function once\n aiHook = {\n i: 0,\n n: funcName,\n f: fn,\n h: []\n };\n // Override (hook) the original function\n var newFunc = $963b9811c2275531$var$_createFunctionHook(aiHook);\n newFunc[$963b9811c2275531$var$aiInstrumentHooks] = aiHook; // Tag and store the function hooks\n owner[funcName] = newFunc;\n }\n var theHook = {\n // tslint:disable:object-literal-shorthand\n id: aiHook.i,\n cbks: callbacks,\n rm: function() {\n // DO NOT Use () => { shorthand for the function as the this gets replaced\n // with the outer this and not the this for theHook instance.\n var id = this.id;\n $963b9811c2275531$var$_arrLoop(aiHook.h, function(hook, idx) {\n if (hook.id === id) {\n aiHook.h[0, $1ae5573ce493bccc$export$84020a2e4fe863b0 /* @min:%2esplice */ ](idx, 1);\n return 1;\n }\n });\n }\n };\n aiHook.i++;\n aiHook.h[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](theHook);\n return theHook;\n}\nfunction $963b9811c2275531$export$152e6c4c396a57a(target, funcName, callbacks, checkPrototype, checkParentProto) {\n if (checkPrototype === void 0) checkPrototype = true;\n if (target && funcName && callbacks) {\n var owner = $963b9811c2275531$var$_getOwner(target, funcName, checkPrototype, checkParentProto);\n if (owner) {\n var fn = owner[funcName];\n if (typeof fn === (0, $67b827af57eed1eb$export$327014e6dfd5ba11)) return $963b9811c2275531$var$_createInstrumentHook(owner, funcName, fn, callbacks);\n }\n }\n return null;\n}\nfunction $963b9811c2275531$export$3bccad25f6aafea4(target, funcNames, callbacks, checkPrototype, checkParentProto) {\n if (checkPrototype === void 0) checkPrototype = true;\n var hooks = null;\n $963b9811c2275531$var$_arrLoop(funcNames, function(funcName) {\n var hook = $963b9811c2275531$export$152e6c4c396a57a(target, funcName, callbacks, checkPrototype, checkParentProto);\n if (hook) {\n if (!hooks) hooks = [];\n hooks[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](hook);\n }\n });\n return hooks;\n}\nfunction $963b9811c2275531$export$b96f6cbe9b035430(target, evtName, callbacks, checkPrototype, checkParentProto) {\n if (target && evtName && callbacks) {\n var owner = $963b9811c2275531$var$_getOwner(target, evtName, checkPrototype, checkParentProto) || target;\n if (owner) return $963b9811c2275531$var$_createInstrumentHook(owner, evtName, owner[evtName], callbacks);\n }\n return null;\n}\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\n\n\n\n\nvar $2b52e71bd2d7d7f0$export$5222b9460f3ddbec = (0, $d491d25af4ac425c$export$e4412260893e0ee4)(\"endsWith\", (0, $b347daff6f5f8dc1$export$a31bd47275edb702), $2b52e71bd2d7d7f0$export$fe3b71ba5ba4a9ec);\nfunction $2b52e71bd2d7d7f0$export$fe3b71ba5ba4a9ec(value, searchString, length) {\n if (!(0, $533f826bbc418791$export$844ec244b1367d54)(value)) (0, $44a1c24c0e411039$export$3f7738bd7dcba681)(\"'\" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(value) + \"' is not a string\");\n var searchValue = (0, $533f826bbc418791$export$844ec244b1367d54)(searchString) ? searchString : (0, $d813f4522b40a37e$export$590567be997858b6)(searchString);\n var chkLen = searchValue[0, $b347daff6f5f8dc1$export$5f32d5745d700b0e];\n var len = value[0, $b347daff6f5f8dc1$export$5f32d5745d700b0e];\n var end = !(0, $533f826bbc418791$export$fce6876652108ab)(length) && length < len ? length : len;\n return (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(value, end - chkLen, end) === searchValue;\n}\n\n\n\n\n\n\n\n\n\nvar $d751d7cd1b1c5598$var$_a, $d751d7cd1b1c5598$var$_b;\nvar $d751d7cd1b1c5598$var$strToGMTString = \"toGMTString\";\nvar $d751d7cd1b1c5598$var$strToUTCString = \"toUTCString\";\nvar $d751d7cd1b1c5598$var$strCookie = \"cookie\";\nvar $d751d7cd1b1c5598$var$strExpires = \"expires\";\nvar $d751d7cd1b1c5598$var$strIsCookieUseDisabled = \"isCookieUseDisabled\";\nvar $d751d7cd1b1c5598$var$strDisableCookiesUsage = \"disableCookiesUsage\";\nvar $d751d7cd1b1c5598$var$strConfigCookieMgr = \"_ckMgr\";\nvar $d751d7cd1b1c5598$var$_supportsCookies = null;\nvar $d751d7cd1b1c5598$var$_allowUaSameSite = null;\nvar $d751d7cd1b1c5598$var$_parsedCookieValue = null;\nvar $d751d7cd1b1c5598$var$_doc;\nvar $d751d7cd1b1c5598$var$_cookieCache = {};\nvar $d751d7cd1b1c5598$var$_globalCookieConfig = {};\n// // `isCookieUseDisabled` is deprecated, so explicitly casting as a key of IConfiguration to avoid typing error\n// // when both isCookieUseDisabled and disableCookiesUsage are used disableCookiesUsage will take precedent, which is\n// // why its listed first\n/**\r\n * Set the supported dynamic config values as undefined (or an empty object) so that\r\n * any listeners will be informed of any changes.\r\n * Explicitly NOT including the deprecated `isCookieUseDisabled` as we don't want to support\r\n * the v1 deprecated field as dynamic for updates\r\n */ var $d751d7cd1b1c5598$var$rootDefaultConfig = ($d751d7cd1b1c5598$var$_a = {\n cookieCfg: (0, $61c4d9dd4226f64e$export$5d17fe34e1e248ba)(($d751d7cd1b1c5598$var$_b = {}, $d751d7cd1b1c5598$var$_b[0, $9fe4a5d5204a4cff$export$8f3e5386cefa231e] = {\n fb: \"cookieDomain\",\n dfVal: (0, $0b747974b0bb3563$export$71fc1ee3e76bc1fe)\n }, $d751d7cd1b1c5598$var$_b.path = {\n fb: \"cookiePath\",\n dfVal: (0, $0b747974b0bb3563$export$71fc1ee3e76bc1fe)\n }, $d751d7cd1b1c5598$var$_b.enabled = (0, $9fe4a5d5204a4cff$export$a43287864529b8fd), $d751d7cd1b1c5598$var$_b.ignoreCookies = (0, $9fe4a5d5204a4cff$export$a43287864529b8fd), $d751d7cd1b1c5598$var$_b.blockedCookies = (0, $9fe4a5d5204a4cff$export$a43287864529b8fd), $d751d7cd1b1c5598$var$_b)),\n cookieDomain: (0, $9fe4a5d5204a4cff$export$a43287864529b8fd),\n cookiePath: (0, $9fe4a5d5204a4cff$export$a43287864529b8fd)\n}, $d751d7cd1b1c5598$var$_a[$d751d7cd1b1c5598$var$strDisableCookiesUsage] = (0, $9fe4a5d5204a4cff$export$a43287864529b8fd), $d751d7cd1b1c5598$var$_a);\nfunction $d751d7cd1b1c5598$var$_getDoc() {\n !$d751d7cd1b1c5598$var$_doc && ($d751d7cd1b1c5598$var$_doc = (0, $d8ec17546a34ef88$export$db98eae15987454c)(function() {\n return (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n }));\n}\n/**\r\n * @ignore\r\n * DO NOT USE or export from the module, this is exposed as public to support backward compatibility of previous static utility methods only.\r\n * If you want to manager cookies either use the ICookieMgr available from the core instance via getCookieMgr() or create\r\n * your own instance of the CookieMgr and use that.\r\n * Using this directly for enabling / disabling cookie handling will not only affect your usage but EVERY user of cookies.\r\n * Example, if you are using a shared component that is also using Application Insights you will affect their cookie handling.\r\n * @param logger - The DiagnosticLogger to use for reporting errors.\r\n */ function $d751d7cd1b1c5598$var$_gblCookieMgr(config, logger) {\n // Stash the global instance against the BaseCookieMgr class\n var inst = $d751d7cd1b1c5598$export$2ae082191ac44e5a[$d751d7cd1b1c5598$var$strConfigCookieMgr] || $d751d7cd1b1c5598$var$_globalCookieConfig[$d751d7cd1b1c5598$var$strConfigCookieMgr];\n if (!inst) {\n // Note: not using the getSetValue() helper as that would require always creating a temporary cookieMgr\n // that ultimately is never used\n inst = $d751d7cd1b1c5598$export$2ae082191ac44e5a[$d751d7cd1b1c5598$var$strConfigCookieMgr] = $d751d7cd1b1c5598$export$2ae082191ac44e5a(config, logger);\n $d751d7cd1b1c5598$var$_globalCookieConfig[$d751d7cd1b1c5598$var$strConfigCookieMgr] = inst;\n }\n return inst;\n}\nfunction $d751d7cd1b1c5598$var$_isMgrEnabled(cookieMgr) {\n if (cookieMgr) return cookieMgr.isEnabled();\n return true;\n}\nfunction $d751d7cd1b1c5598$var$_isIgnoredCookie(cookieMgrCfg, name) {\n if (name && cookieMgrCfg && (0, $533f826bbc418791$export$43bee75e5e14138e)(cookieMgrCfg.ignoreCookies)) return (0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(cookieMgrCfg.ignoreCookies, name) !== -1;\n return false;\n}\nfunction $d751d7cd1b1c5598$var$_isBlockedCookie(cookieMgrCfg, name) {\n if (name && cookieMgrCfg && (0, $533f826bbc418791$export$43bee75e5e14138e)(cookieMgrCfg.blockedCookies)) {\n if ((0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(cookieMgrCfg.blockedCookies, name) !== -1) return true;\n }\n return $d751d7cd1b1c5598$var$_isIgnoredCookie(cookieMgrCfg, name);\n}\nfunction $d751d7cd1b1c5598$var$_isCfgEnabled(rootConfig, cookieMgrConfig) {\n var isCfgEnabled = cookieMgrConfig[0, $1ae5573ce493bccc$export$c9b1609f2b84393a /* @min:%2eenabled */ ];\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(isCfgEnabled)) {\n // Set the enabled from the provided setting or the legacy root values\n var cookieEnabled = void 0;\n // This field is deprecated and dynamic updates will not be fully supported\n if (!(0, $533f826bbc418791$export$fce6876652108ab)(rootConfig[$d751d7cd1b1c5598$var$strIsCookieUseDisabled])) cookieEnabled = !rootConfig[$d751d7cd1b1c5598$var$strIsCookieUseDisabled];\n // If this value is defined it takes precedent over the above\n if (!(0, $533f826bbc418791$export$fce6876652108ab)(rootConfig[$d751d7cd1b1c5598$var$strDisableCookiesUsage])) cookieEnabled = !rootConfig[$d751d7cd1b1c5598$var$strDisableCookiesUsage];\n // Not setting the cookieMgrConfig.enabled as that will update (set) the global dynamic config\n // So future \"updates\" then may not be as expected\n isCfgEnabled = cookieEnabled;\n }\n return isCfgEnabled;\n}\nfunction $d751d7cd1b1c5598$export$76c0b273586c25c7(core, config) {\n var cookieMgr;\n if (core) // Always returns an instance\n cookieMgr = core.getCookieMgr();\n else if (config) {\n var cookieCfg = config.cookieCfg;\n if (cookieCfg && cookieCfg[$d751d7cd1b1c5598$var$strConfigCookieMgr]) cookieMgr = cookieCfg[$d751d7cd1b1c5598$var$strConfigCookieMgr];\n else cookieMgr = $d751d7cd1b1c5598$export$2ae082191ac44e5a(config);\n }\n if (!cookieMgr) // Get or initialize the default global (legacy) cookie manager if we couldn't find one\n cookieMgr = $d751d7cd1b1c5598$var$_gblCookieMgr(config, (core || {})[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ]);\n return cookieMgr;\n}\nfunction $d751d7cd1b1c5598$export$2ae082191ac44e5a(rootConfig, logger) {\n var _a;\n var cookieMgrConfig;\n var _path;\n var _domain;\n var unloadHandler;\n // Explicitly checking against false, so that setting to undefined will === true\n var _enabled;\n var _getCookieFn;\n var _setCookieFn;\n var _delCookieFn;\n // Make sure the root config is dynamic as it may be the global config\n rootConfig = (0, $acb30f9e62dc5705$export$3a9e9180c14487fd)(rootConfig || $d751d7cd1b1c5598$var$_globalCookieConfig, null, logger).cfg;\n // Will get recalled if the referenced configuration is changed\n unloadHandler = (0, $acb30f9e62dc5705$export$454a433e4deb244f)(rootConfig, function(details) {\n // Make sure the root config has all of the the defaults to the root config to ensure they are dynamic\n details[0, $1ae5573ce493bccc$export$24caac6d68ff1537 /* @min:%2esetDf */ ](details.cfg, $d751d7cd1b1c5598$var$rootDefaultConfig);\n // Create and apply the defaults to the cookieCfg element\n cookieMgrConfig = details.ref(details.cfg, \"cookieCfg\"); // details.setDf(details.cfg.cookieCfg, defaultConfig);\n _path = cookieMgrConfig[0, $9fe4a5d5204a4cff$export$bdba10701e0ccff3 /* @min:%2epath */ ] || \"/\";\n _domain = cookieMgrConfig[0, $9fe4a5d5204a4cff$export$8f3e5386cefa231e /* @min:%2edomain */ ];\n // Explicitly checking against false, so that setting to undefined will === true\n _enabled = $d751d7cd1b1c5598$var$_isCfgEnabled(rootConfig, cookieMgrConfig) !== false;\n _getCookieFn = cookieMgrConfig.getCookie || $d751d7cd1b1c5598$var$_getCookieValue;\n _setCookieFn = cookieMgrConfig.setCookie || $d751d7cd1b1c5598$var$_setCookieValue;\n _delCookieFn = cookieMgrConfig.delCookie || $d751d7cd1b1c5598$var$_setCookieValue;\n }, logger);\n var cookieMgr = (_a = {\n isEnabled: function() {\n var enabled = $d751d7cd1b1c5598$var$_isCfgEnabled(rootConfig, cookieMgrConfig) !== false && _enabled && $d751d7cd1b1c5598$export$25d06da9c29ef62a(logger);\n // Using an indirect lookup for any global cookie manager to support tree shaking for SDK's\n // that don't use the \"applicationinsights-core\" version of the default cookie function\n var gblManager = $d751d7cd1b1c5598$var$_globalCookieConfig[$d751d7cd1b1c5598$var$strConfigCookieMgr];\n if (enabled && gblManager && cookieMgr !== gblManager) // Make sure the GlobalCookie Manager instance (if not this instance) is also enabled.\n // As the global (deprecated) functions may have been called (for backward compatibility)\n enabled = $d751d7cd1b1c5598$var$_isMgrEnabled(gblManager);\n return enabled;\n },\n setEnabled: function(value) {\n // Explicitly checking against false, so that setting to undefined will === true\n _enabled = value !== false;\n cookieMgrConfig[0, $1ae5573ce493bccc$export$c9b1609f2b84393a /* @min:%2eenabled */ ] = value;\n },\n set: function(name, value, maxAgeSec, domain, path) {\n var result = false;\n if ($d751d7cd1b1c5598$var$_isMgrEnabled(cookieMgr) && !$d751d7cd1b1c5598$var$_isBlockedCookie(cookieMgrConfig, name)) {\n var values = {};\n var theValue = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)(value || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759));\n var idx = (0, $0194d45a55d79548$export$7c0888b0c4641088)(theValue, \";\");\n if (idx !== -1) {\n theValue = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)((0, $c3f3bf8012a4b2d4$export$a1120f14ec6f7ada)(value, idx));\n values = $d751d7cd1b1c5598$var$_extractParts((0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(value, idx + 1));\n }\n // Only update domain if not already present (isUndefined) and the value is truthy (not null, undefined or empty string)\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(values, (0, $9fe4a5d5204a4cff$export$8f3e5386cefa231e), domain || _domain, (0, $533f826bbc418791$export$8f9cae6546f97a9f), (0, $533f826bbc418791$export$fce6876652108ab));\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(maxAgeSec)) {\n var _isIE = (0, $0c599844349363c4$export$7e7b1a9668aaed8)();\n if ((0, $533f826bbc418791$export$fce6876652108ab)(values[$d751d7cd1b1c5598$var$strExpires])) {\n var nowMs = (0, $628cad25a0769458$export$a56f095995763cca)();\n // Only add expires if not already present\n var expireMs = nowMs + maxAgeSec * 1000;\n // Sanity check, if zero or -ve then ignore\n if (expireMs > 0) {\n var expiry = new Date();\n expiry.setTime(expireMs);\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(values, $d751d7cd1b1c5598$var$strExpires, $d751d7cd1b1c5598$var$_formatDate(expiry, !_isIE ? $d751d7cd1b1c5598$var$strToUTCString : $d751d7cd1b1c5598$var$strToGMTString) || $d751d7cd1b1c5598$var$_formatDate(expiry, _isIE ? $d751d7cd1b1c5598$var$strToGMTString : $d751d7cd1b1c5598$var$strToUTCString) || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759), (0, $533f826bbc418791$export$8f9cae6546f97a9f));\n }\n }\n if (!_isIE) // Only replace if not already present\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(values, \"max-age\", (0, $9fe4a5d5204a4cff$export$5e8607ab26634759) + maxAgeSec, null, (0, $533f826bbc418791$export$fce6876652108ab));\n }\n var location_1 = (0, $0c599844349363c4$export$e7fd20fad3cf4b5f)();\n if (location_1 && location_1.protocol === \"https:\") {\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(values, \"secure\", null, null, (0, $533f826bbc418791$export$fce6876652108ab));\n // Only set same site if not also secure\n if ($d751d7cd1b1c5598$var$_allowUaSameSite === null) $d751d7cd1b1c5598$var$_allowUaSameSite = !$d751d7cd1b1c5598$export$e44499c7a8a6a268(((0, $3d5fcb60a9467a45$export$a56241c767c1d89f)() || {})[0, $1ae5573ce493bccc$export$2e850152cb3355e2 /* @min:%2euserAgent */ ]);\n if ($d751d7cd1b1c5598$var$_allowUaSameSite) (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(values, \"SameSite\", \"None\", null, (0, $533f826bbc418791$export$fce6876652108ab));\n }\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(values, (0, $9fe4a5d5204a4cff$export$bdba10701e0ccff3), path || _path, null, (0, $533f826bbc418791$export$fce6876652108ab));\n //let setCookieFn = cookieMgrConfig.setCookie || _setCookieValue;\n _setCookieFn(name, $d751d7cd1b1c5598$var$_formatCookieValue(theValue, values));\n result = true;\n }\n return result;\n },\n get: function(name) {\n var value = (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n if ($d751d7cd1b1c5598$var$_isMgrEnabled(cookieMgr) && !$d751d7cd1b1c5598$var$_isIgnoredCookie(cookieMgrConfig, name)) value = _getCookieFn(name);\n return value;\n },\n del: function(name, path) {\n var result = false;\n if ($d751d7cd1b1c5598$var$_isMgrEnabled(cookieMgr)) // Only remove the cookie if the manager and cookie support has not been disabled\n result = cookieMgr.purge(name, path);\n return result;\n },\n purge: function(name, path) {\n var _a;\n var result = false;\n if ($d751d7cd1b1c5598$export$25d06da9c29ef62a(logger)) {\n // Setting the expiration date in the past immediately removes the cookie\n var values = (_a = {}, _a[0, $9fe4a5d5204a4cff$export$bdba10701e0ccff3] = path ? path : \"/\", _a[$d751d7cd1b1c5598$var$strExpires] = \"Thu, 01 Jan 1970 00:00:01 GMT\", _a);\n if (!(0, $0c599844349363c4$export$7e7b1a9668aaed8)()) // Set max age to expire now\n values[\"max-age\"] = \"0\";\n // let delCookie = cookieMgrConfig.delCookie || _setCookieValue;\n _delCookieFn(name, $d751d7cd1b1c5598$var$_formatCookieValue((0, $9fe4a5d5204a4cff$export$5e8607ab26634759), values));\n result = true;\n }\n return result;\n }\n }, _a[0, $1ae5573ce493bccc$export$7eb85b5cba77a43d /* @min:unload */ ] = function(isAsync) {\n unloadHandler && unloadHandler.rm();\n unloadHandler = null;\n }, _a);\n // Associated this cookie manager with the config\n cookieMgr[$d751d7cd1b1c5598$var$strConfigCookieMgr] = cookieMgr;\n return cookieMgr;\n}\nfunction $d751d7cd1b1c5598$export$25d06da9c29ef62a(logger) {\n if ($d751d7cd1b1c5598$var$_supportsCookies === null) {\n $d751d7cd1b1c5598$var$_supportsCookies = false;\n !$d751d7cd1b1c5598$var$_doc && $d751d7cd1b1c5598$var$_getDoc();\n try {\n var doc = $d751d7cd1b1c5598$var$_doc.v || {};\n $d751d7cd1b1c5598$var$_supportsCookies = doc[$d751d7cd1b1c5598$var$strCookie] !== undefined;\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 68 /* _eInternalMessageId.CannotAccessCookie */ , \"Cannot access document.cookie - \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n }\n return $d751d7cd1b1c5598$var$_supportsCookies;\n}\nfunction $d751d7cd1b1c5598$var$_extractParts(theValue) {\n var values = {};\n if (theValue && theValue[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ]) {\n var parts = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)(theValue)[0, $1ae5573ce493bccc$export$b889f1d4cb07c706 /* @min:%2esplit */ ](\";\");\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(parts, function(thePart) {\n thePart = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)(thePart || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759));\n if (thePart) {\n var idx = (0, $0194d45a55d79548$export$7c0888b0c4641088)(thePart, \"=\");\n if (idx === -1) values[thePart] = null;\n else values[(0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)((0, $c3f3bf8012a4b2d4$export$a1120f14ec6f7ada)(thePart, idx))] = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)((0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(thePart, idx + 1));\n }\n });\n }\n return values;\n}\nfunction $d751d7cd1b1c5598$var$_formatDate(theDate, func) {\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(theDate[func])) return theDate[func]();\n return null;\n}\nfunction $d751d7cd1b1c5598$var$_formatCookieValue(value, values) {\n var cookieValue = value || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(values, function(name, theValue) {\n cookieValue += \"; \" + name + (!(0, $533f826bbc418791$export$bedb7023a7733221)(theValue) ? \"=\" + theValue : (0, $9fe4a5d5204a4cff$export$5e8607ab26634759));\n });\n return cookieValue;\n}\nfunction $d751d7cd1b1c5598$var$_getCookieValue(name) {\n var cookieValue = (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n !$d751d7cd1b1c5598$var$_doc && $d751d7cd1b1c5598$var$_getDoc();\n if ($d751d7cd1b1c5598$var$_doc.v) {\n var theCookie = $d751d7cd1b1c5598$var$_doc.v[$d751d7cd1b1c5598$var$strCookie] || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n if ($d751d7cd1b1c5598$var$_parsedCookieValue !== theCookie) {\n $d751d7cd1b1c5598$var$_cookieCache = $d751d7cd1b1c5598$var$_extractParts(theCookie);\n $d751d7cd1b1c5598$var$_parsedCookieValue = theCookie;\n }\n cookieValue = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)($d751d7cd1b1c5598$var$_cookieCache[name] || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759));\n }\n return cookieValue;\n}\nfunction $d751d7cd1b1c5598$var$_setCookieValue(name, cookieValue) {\n !$d751d7cd1b1c5598$var$_doc && $d751d7cd1b1c5598$var$_getDoc();\n if ($d751d7cd1b1c5598$var$_doc.v) $d751d7cd1b1c5598$var$_doc.v[$d751d7cd1b1c5598$var$strCookie] = name + \"=\" + cookieValue;\n}\nfunction $d751d7cd1b1c5598$export$e44499c7a8a6a268(userAgent) {\n if (!(0, $533f826bbc418791$export$844ec244b1367d54)(userAgent)) return false;\n // Cover all iOS based browsers here. This includes:\n // - Safari on iOS 12 for iPhone, iPod Touch, iPad\n // - WkWebview on iOS 12 for iPhone, iPod Touch, iPad\n // - Chrome on iOS 12 for iPhone, iPod Touch, iPad\n // All of which are broken by SameSite=None, because they use the iOS networking stack\n if ((0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"CPU iPhone OS 12\") || (0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"iPad; CPU OS 12\")) return true;\n // Cover Mac OS X based browsers that use the Mac OS networking stack. This includes:\n // - Safari on Mac OS X\n // This does not include:\n // - Internal browser on Mac OS X\n // - Chrome on Mac OS X\n // - Chromium on Mac OS X\n // Because they do not use the Mac OS networking stack.\n if ((0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"Macintosh; Intel Mac OS X 10_14\") && (0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"Version/\") && (0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"Safari\")) return true;\n // Cover Mac OS X internal browsers that use the Mac OS networking stack. This includes:\n // - Internal browser on Mac OS X\n // This does not include:\n // - Safari on Mac OS X\n // - Chrome on Mac OS X\n // - Chromium on Mac OS X\n // Because they do not use the Mac OS networking stack.\n if ((0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"Macintosh; Intel Mac OS X 10_14\") && (0, $2b52e71bd2d7d7f0$export$5222b9460f3ddbec)(userAgent, \"AppleWebKit/605.1.15 (KHTML, like Gecko)\")) return true;\n // Cover Chrome 50-69, because some versions are broken by SameSite=None, and none in this range require it.\n // Note: this covers some pre-Chromium Edge versions, but pre-Chromim Edge does not require SameSite=None, so this is fine.\n // Note: this regex applies to Windows, Mac OS X, and Linux, deliberately.\n if ((0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"Chrome/5\") || (0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"Chrome/6\")) return true;\n // Unreal Engine runs Chromium 59, but does not advertise as Chrome until 4.23. Treat versions of Unreal\n // that don't specify their Chrome version as lacking support for SameSite=None.\n if ((0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"UnrealEngine\") && !(0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"Chrome\")) return true;\n // UCBrowser < 12.13.2 ignores Set-Cookie headers with SameSite=None\n // NB: this rule isn't complete - you need regex to make a complete rule.\n // See: https://www.chromium.org/updates/same-site/incompatible-clients\n if ((0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"UCBrowser/12\") || (0, $0b747974b0bb3563$export$3185d777c612e61f)(userAgent, \"UCBrowser/11\")) return true;\n return false;\n}\n\n\n\n/*\n * Application Insights JavaScript SDK - Web Analytics, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nvar $9acc3b97657eaaf0$export$e2818d11505fa034 = \"toString\"; // Count: 4\nvar $9acc3b97657eaaf0$export$f357d96937d91514 = \"isStorageUseDisabled\"; // Count: 3\nvar $9acc3b97657eaaf0$export$3b3afe26ca0e015c = \"_addHook\"; // Count: 6\nvar $9acc3b97657eaaf0$export$f9ae8d0acf86503e = \"core\"; // Count: 7\nvar $9acc3b97657eaaf0$export$9e16762ab4f2648 = \"dataType\"; // Count: 8\nvar $9acc3b97657eaaf0$export$2672d4f7ccc80348 = \"envelopeType\"; // Count: 7\nvar $9acc3b97657eaaf0$export$c7ff2c36e5c78421 = \"diagLog\"; // Count: 13\nvar $9acc3b97657eaaf0$export$548634e98b3af9c4 = \"track\"; // Count: 7\nvar $9acc3b97657eaaf0$export$ab1a8669316b7a02 = \"trackPageView\"; // Count: 4\nvar $9acc3b97657eaaf0$export$5b63a890d51a5194 = \"trackPreviousPageVisit\"; // Count: 3\nvar $9acc3b97657eaaf0$export$e4d43b697816aae1 = \"sendPageViewInternal\"; // Count: 7\nvar $9acc3b97657eaaf0$export$fe3039bd0e70dd3f = \"sendPageViewPerformanceInternal\"; // Count: 3\nvar $9acc3b97657eaaf0$export$20270e2265c2a185 = \"populatePageViewPerformanceEvent\"; // Count: 3\nvar $9acc3b97657eaaf0$export$8d0bd9d006f3ecea = \"href\"; // Count: 6\nvar $9acc3b97657eaaf0$export$5414b86ab837cb07 = \"sendExceptionInternal\"; // Count: 2\nvar $9acc3b97657eaaf0$export$4852fd87b68a6e1f = \"exception\"; // Count: 3\nvar $9acc3b97657eaaf0$export$ff0a0f80c43edd37 = \"error\"; // Count: 5\nvar $9acc3b97657eaaf0$export$31fe7bcf0f7c83e8 = \"_onerror\"; // Count: 3\nvar $9acc3b97657eaaf0$export$d190ee0b6bfe36d8 = \"errorSrc\"; // Count: 3\nvar $9acc3b97657eaaf0$export$4d19a8ea486d5967 = \"lineNumber\"; // Count: 5\nvar $9acc3b97657eaaf0$export$91a182df12726bcd = \"columnNumber\"; // Count: 5\nvar $9acc3b97657eaaf0$export$923606b70907833e = \"message\"; // Count: 4\nvar $9acc3b97657eaaf0$export$3dedbd38aa3b0c11 = \"CreateAutoException\"; // Count: 3\nvar $9acc3b97657eaaf0$export$935b759388157821 = \"addTelemetryInitializer\"; // Count: 4\nvar $9acc3b97657eaaf0$export$c653a2fea2d8252a = \"overridePageViewDuration\"; // Count: 2\nvar $9acc3b97657eaaf0$export$aa395e58f404db90 = \"duration\"; // Count: 10\nvar $9acc3b97657eaaf0$export$e4892641d6ea1b45 = \"autoTrackPageVisitTime\"; // Count: 2\nvar $9acc3b97657eaaf0$export$204917ab19f7a461 = \"isBrowserLinkTrackingEnabled\"; // Count: 2\nvar $9acc3b97657eaaf0$export$6eae51590aaea43 = \"length\"; // Count: 5\nvar $9acc3b97657eaaf0$export$6390687f17a52950 = \"enableAutoRouteTracking\"; // Count: 2\nvar $9acc3b97657eaaf0$export$72fe3f7aecc0d015 = \"enableUnhandledPromiseRejectionTracking\"; // Count: 2\nvar $9acc3b97657eaaf0$export$527cc291f0159d2a = \"autoUnhandledPromiseInstrumented\"; // Count: 3\nvar $9acc3b97657eaaf0$export$379c72358869fe15 = \"isPerformanceTimingSupported\"; // Count: 2\nvar $9acc3b97657eaaf0$export$f80d3e3d3d24d8e2 = \"getPerformanceTiming\"; // Count: 2\nvar $9acc3b97657eaaf0$export$f8670e269dbf7411 = \"navigationStart\"; // Count: 4\nvar $9acc3b97657eaaf0$export$7d974758a7a955a6 = \"shouldCollectDuration\"; // Count: 3\nvar $9acc3b97657eaaf0$export$2e020f7b1a6ecc9d = \"isPerformanceTimingDataReady\"; // Count: 2\nvar $9acc3b97657eaaf0$export$96ba0dffa6c93bb1 = \"getEntriesByType\"; // Count: 3\nvar $9acc3b97657eaaf0$export$efd7bea2390142dc = \"responseStart\"; // Count: 5\nvar $9acc3b97657eaaf0$export$2a979904ebe4c805 = \"requestStart\"; // Count: 3\nvar $9acc3b97657eaaf0$export$3e2743adb5050880 = \"loadEventEnd\"; // Count: 4\nvar $9acc3b97657eaaf0$export$cb472b94f03785cf = \"responseEnd\"; // Count: 5\nvar $9acc3b97657eaaf0$export$ade5c25ec120f74e = \"connectEnd\"; // Count: 4\nvar $9acc3b97657eaaf0$export$204c1f54732d882 = \"pageVisitStartTime\"; // Count: 2\n\n\n/*\n * Application Insights JavaScript SDK - Web Analytics, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\n/**\r\n * Class encapsulates sending page views and page view performance telemetry.\r\n */ var $6e4263cfc9177d6e$export$5bb8d6768724bf86 = /** @class */ function() {\n function PageViewManager(appInsights, overridePageViewDuration, core, pageViewPerformanceManager) {\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(PageViewManager, this, function(_self) {\n var queueTimer = null;\n var itemQueue = [];\n var pageViewPerformanceSent = false;\n var _logger;\n if (core) _logger = core.logger;\n function _flushChannels(isAsync) {\n if (core) core.flush(isAsync, function() {\n // Event flushed, callback added to prevent promise creation\n });\n }\n function _startTimer() {\n if (!queueTimer) queueTimer = (0, $d03b12effd00bf96$export$5f4d6617421d489b)(function() {\n queueTimer = null;\n var allItems = itemQueue.slice(0);\n var doFlush = false;\n itemQueue = [];\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(allItems, function(item) {\n if (!item()) // Not processed so rescheduled\n itemQueue.push(item);\n else doFlush = true;\n });\n if (itemQueue[0, $9acc3b97657eaaf0$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) _startTimer();\n if (doFlush) // We process at least one item so flush the queue\n _flushChannels(true);\n }, 100);\n }\n function _addQueue(cb) {\n itemQueue.push(cb);\n _startTimer();\n }\n _self[0, $9acc3b97657eaaf0$export$ab1a8669316b7a02 /* @min:%2etrackPageView */ ] = function(pageView, customProperties) {\n var name = pageView.name;\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(name) || typeof name !== \"string\") {\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n name = pageView.name = doc && doc.title || \"\";\n }\n var uri = pageView.uri;\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(uri) || typeof uri !== \"string\") {\n var location_1 = (0, $0c599844349363c4$export$e7fd20fad3cf4b5f)();\n uri = pageView.uri = location_1 && location_1[0, $9acc3b97657eaaf0$export$8d0bd9d006f3ecea /* @min:%2ehref */ ] || \"\";\n }\n // case 1a. if performance timing is not supported by the browser, send the page view telemetry with the duration provided by the user. If the user\n // do not provide the duration, set duration to undefined\n // Also this is case 4\n if (!pageViewPerformanceManager[0, $9acc3b97657eaaf0$export$379c72358869fe15 /* @min:%2eisPerformanceTimingSupported */ ]()) {\n appInsights[0, $9acc3b97657eaaf0$export$e4d43b697816aae1 /* @min:%2esendPageViewInternal */ ](pageView, customProperties);\n _flushChannels(true);\n if (!(0, $3d5fcb60a9467a45$export$97b87b8868ff7a3c)()) // no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_logger, 2 /* eLoggingSeverity.WARNING */ , 25 /* _eInternalMessageId.NavigationTimingNotSupported */ , \"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.\");\n return;\n }\n var pageViewSent = false;\n var customDuration;\n // if the performance timing is supported by the browser, calculate the custom duration\n var start = pageViewPerformanceManager[0, $9acc3b97657eaaf0$export$f80d3e3d3d24d8e2 /* @min:%2egetPerformanceTiming */ ]()[0, $9acc3b97657eaaf0$export$f8670e269dbf7411 /* @min:%2enavigationStart */ ];\n if (start > 0) {\n customDuration = (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(start, +new Date);\n if (!pageViewPerformanceManager[0, $9acc3b97657eaaf0$export$7d974758a7a955a6 /* @min:%2eshouldCollectDuration */ ](customDuration)) customDuration = undefined;\n }\n // if the user has provided duration, send a page view telemetry with the provided duration. Otherwise, if\n // overridePageViewDuration is set to true, send a page view telemetry with the custom duration calculated earlier\n var duration;\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(customProperties) && !(0, $533f826bbc418791$export$bedb7023a7733221)(customProperties[0, $9acc3b97657eaaf0$export$aa395e58f404db90 /* @min:%2eduration */ ])) duration = customProperties[0, $9acc3b97657eaaf0$export$aa395e58f404db90 /* @min:%2eduration */ ];\n if (overridePageViewDuration || !isNaN(duration)) {\n if (isNaN(duration)) {\n // case 3\n if (!customProperties) customProperties = {};\n customProperties[0, $9acc3b97657eaaf0$export$aa395e58f404db90 /* @min:%2eduration */ ] = customDuration;\n }\n // case 2\n appInsights[0, $9acc3b97657eaaf0$export$e4d43b697816aae1 /* @min:%2esendPageViewInternal */ ](pageView, customProperties);\n _flushChannels(true);\n pageViewSent = true;\n }\n // now try to send the page view performance telemetry\n var maxDurationLimit = 60000;\n if (!customProperties) customProperties = {};\n // Queue the event for processing\n _addQueue(function() {\n var processed = false;\n try {\n if (pageViewPerformanceManager[0, $9acc3b97657eaaf0$export$2e020f7b1a6ecc9d /* @min:%2eisPerformanceTimingDataReady */ ]()) {\n processed = true;\n var pageViewPerformance = {\n name: name,\n uri: uri\n };\n pageViewPerformanceManager[0, $9acc3b97657eaaf0$export$20270e2265c2a185 /* @min:%2epopulatePageViewPerformanceEvent */ ](pageViewPerformance);\n if (!pageViewPerformance.isValid && !pageViewSent) {\n // If navigation timing gives invalid numbers, then go back to \"override page view duration\" mode.\n // That's the best value we can get that makes sense.\n customProperties[0, $9acc3b97657eaaf0$export$aa395e58f404db90 /* @min:%2eduration */ ] = customDuration;\n appInsights[0, $9acc3b97657eaaf0$export$e4d43b697816aae1 /* @min:%2esendPageViewInternal */ ](pageView, customProperties);\n } else {\n if (!pageViewSent) {\n customProperties[0, $9acc3b97657eaaf0$export$aa395e58f404db90 /* @min:%2eduration */ ] = pageViewPerformance.durationMs;\n appInsights[0, $9acc3b97657eaaf0$export$e4d43b697816aae1 /* @min:%2esendPageViewInternal */ ](pageView, customProperties);\n }\n if (!pageViewPerformanceSent) {\n appInsights[0, $9acc3b97657eaaf0$export$fe3039bd0e70dd3f /* @min:%2esendPageViewPerformanceInternal */ ](pageViewPerformance, customProperties);\n pageViewPerformanceSent = true;\n }\n }\n } else if (start > 0 && (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(start, +new Date) > maxDurationLimit) {\n // if performance timings are not ready but we exceeded the maximum duration limit, just log a page view telemetry\n // with the maximum duration limit. Otherwise, keep waiting until performance timings are ready\n processed = true;\n if (!pageViewSent) {\n customProperties[0, $9acc3b97657eaaf0$export$aa395e58f404db90 /* @min:%2eduration */ ] = maxDurationLimit;\n appInsights[0, $9acc3b97657eaaf0$export$e4d43b697816aae1 /* @min:%2esendPageViewInternal */ ](pageView, customProperties);\n }\n }\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_logger, 1 /* eLoggingSeverity.CRITICAL */ , 38 /* _eInternalMessageId.TrackPVFailedCalc */ , \"trackPageView failed on page load calculation: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n return processed;\n });\n };\n _self.teardown = function(unloadCtx, unloadState) {\n if (queueTimer) {\n clearInterval(queueTimer);\n queueTimer = null;\n var allItems = itemQueue.slice(0);\n var doFlush_1 = false;\n itemQueue = [];\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(allItems, function(item) {\n if (item()) doFlush_1 = true;\n });\n }\n };\n });\n }\n // Removed Stub for PageViewManager.prototype.trackPageView.\n // Removed Stub for PageViewManager.prototype.teardown.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n PageViewManager.__ieDyn = 1;\n return PageViewManager;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Web Analytics, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\nvar $14a28652d5a6e87a$var$MAX_DURATION_ALLOWED = 3600000; // 1h\nvar $14a28652d5a6e87a$var$botAgentNames = [\n \"googlebot\",\n \"adsbot-google\",\n \"apis-google\",\n \"mediapartners-google\"\n];\nfunction $14a28652d5a6e87a$var$_isPerformanceTimingSupported() {\n var perf = (0, $824d7bc9d9e48f68$export$28a0276e10aa78d7)();\n return perf && !!perf.timing;\n}\nfunction $14a28652d5a6e87a$var$_isPerformanceNavigationTimingSupported() {\n var perf = (0, $824d7bc9d9e48f68$export$28a0276e10aa78d7)();\n return perf && perf.getEntriesByType && perf.getEntriesByType(\"navigation\")[0, $9acc3b97657eaaf0$export$6eae51590aaea43 /* @min:%2elength */ ] > 0;\n}\nfunction $14a28652d5a6e87a$var$_isPerformanceTimingDataReady() {\n var perf = (0, $824d7bc9d9e48f68$export$28a0276e10aa78d7)();\n var timing = perf ? perf.timing : 0;\n return timing && timing.domainLookupStart > 0 && timing[0, $9acc3b97657eaaf0$export$f8670e269dbf7411 /* @min:%2enavigationStart */ ] > 0 && timing[0, $9acc3b97657eaaf0$export$efd7bea2390142dc /* @min:%2eresponseStart */ ] > 0 && timing[0, $9acc3b97657eaaf0$export$2a979904ebe4c805 /* @min:%2erequestStart */ ] > 0 && timing[0, $9acc3b97657eaaf0$export$3e2743adb5050880 /* @min:%2eloadEventEnd */ ] > 0 && timing[0, $9acc3b97657eaaf0$export$cb472b94f03785cf /* @min:%2eresponseEnd */ ] > 0 && timing[0, $9acc3b97657eaaf0$export$ade5c25ec120f74e /* @min:%2econnectEnd */ ] > 0 && timing.domLoading > 0;\n}\nfunction $14a28652d5a6e87a$var$_getPerformanceTiming() {\n if ($14a28652d5a6e87a$var$_isPerformanceTimingSupported()) return (0, $824d7bc9d9e48f68$export$28a0276e10aa78d7)().timing;\n return null;\n}\nfunction $14a28652d5a6e87a$var$_getPerformanceNavigationTiming() {\n if ($14a28652d5a6e87a$var$_isPerformanceNavigationTimingSupported()) return (0, $824d7bc9d9e48f68$export$28a0276e10aa78d7)()[0, $9acc3b97657eaaf0$export$96ba0dffa6c93bb1 /* @min:%2egetEntriesByType */ ](\"navigation\")[0];\n return null;\n}\n/**\r\n* This method tells if given durations should be excluded from collection.\r\n*/ function $14a28652d5a6e87a$var$_shouldCollectDuration() {\n var durations = [];\n for(var _i = 0; _i < arguments.length; _i++)durations[_i] = arguments[_i];\n var _navigator = (0, $3d5fcb60a9467a45$export$a56241c767c1d89f)() || {};\n // a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en\n var userAgent = _navigator.userAgent;\n var isGoogleBot = false;\n if (userAgent) for(var i = 0; i < $14a28652d5a6e87a$var$botAgentNames[0, $9acc3b97657eaaf0$export$6eae51590aaea43 /* @min:%2elength */ ]; i++)isGoogleBot = isGoogleBot || (0, $0194d45a55d79548$export$7c0888b0c4641088)(userAgent.toLowerCase(), $14a28652d5a6e87a$var$botAgentNames[i]) !== -1;\n if (isGoogleBot) // Don't report durations for GoogleBot, it is returning invalid values in performance.timing API.\n return false;\n else // for other page views, don't report if it's outside of a reasonable range\n for(var i = 0; i < durations[0, $9acc3b97657eaaf0$export$6eae51590aaea43 /* @min:%2elength */ ]; i++){\n if (durations[i] < 0 || durations[i] >= $14a28652d5a6e87a$var$MAX_DURATION_ALLOWED) return false;\n }\n return true;\n}\n/**\r\n * Class encapsulates sending page view performance telemetry.\r\n */ var $14a28652d5a6e87a$export$da80ef98bc1bafa6 = /** @class */ function() {\n function PageViewPerformanceManager(core) {\n var _logger = (0, $cc2aaaebf96ac6a7$export$5102d32ea1d740a)(core);\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(PageViewPerformanceManager, this, function(_self) {\n _self[0, $9acc3b97657eaaf0$export$20270e2265c2a185 /* @min:%2epopulatePageViewPerformanceEvent */ ] = function(pageViewPerformance) {\n pageViewPerformance.isValid = false;\n /*\r\n * http://www.w3.org/TR/navigation-timing/#processing-model\r\n * |-navigationStart\r\n * | |-connectEnd\r\n * | ||-requestStart\r\n * | || |-responseStart\r\n * | || | |-responseEnd\r\n * | || | |\r\n * | || | | |-loadEventEnd\r\n * |---network---||---request---|---response---|---dom---|\r\n * |--------------------------total----------------------|\r\n *\r\n * total = The difference between the load event of the current document is completed and the first recorded timestamp of the performance entry : https://developer.mozilla.org/en-US/docs/Web/Performance/Navigation_and_resource_timings#duration\r\n * network = Redirect time + App Cache + DNS lookup time + TCP connection time\r\n * request = Request time : https://developer.mozilla.org/en-US/docs/Web/Performance/Navigation_and_resource_timings#request_time\r\n * response = Response time\r\n * dom = Document load time : https://html.spec.whatwg.org/multipage/dom.html#document-load-timing-info\r\n * = Document processing time : https://developers.google.com/web/fundamentals/performance/navigation-and-resource-timing/#document_processing\r\n * + Loading time : https://developers.google.com/web/fundamentals/performance/navigation-and-resource-timing/#loading\r\n */ var navigationTiming = $14a28652d5a6e87a$var$_getPerformanceNavigationTiming();\n var timing = $14a28652d5a6e87a$var$_getPerformanceTiming();\n var total = 0;\n var network = 0;\n var request = 0;\n var response = 0;\n var dom = 0;\n if (navigationTiming || timing) {\n if (navigationTiming) {\n total = navigationTiming[0, $9acc3b97657eaaf0$export$aa395e58f404db90 /* @min:%2eduration */ ];\n /**\r\n * support both cases:\r\n * - startTime is always zero: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming\r\n * - for older browsers where the startTime is not zero\r\n */ network = navigationTiming.startTime === 0 ? navigationTiming[0, $9acc3b97657eaaf0$export$ade5c25ec120f74e /* @min:%2econnectEnd */ ] : (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(navigationTiming.startTime, navigationTiming[0, $9acc3b97657eaaf0$export$ade5c25ec120f74e /* @min:%2econnectEnd */ ]);\n request = (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(navigationTiming.requestStart, navigationTiming[0, $9acc3b97657eaaf0$export$efd7bea2390142dc /* @min:%2eresponseStart */ ]);\n response = (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(navigationTiming[0, $9acc3b97657eaaf0$export$efd7bea2390142dc /* @min:%2eresponseStart */ ], navigationTiming[0, $9acc3b97657eaaf0$export$cb472b94f03785cf /* @min:%2eresponseEnd */ ]);\n dom = (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(navigationTiming.responseEnd, navigationTiming[0, $9acc3b97657eaaf0$export$3e2743adb5050880 /* @min:%2eloadEventEnd */ ]);\n } else {\n total = (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(timing[0, $9acc3b97657eaaf0$export$f8670e269dbf7411 /* @min:%2enavigationStart */ ], timing[0, $9acc3b97657eaaf0$export$3e2743adb5050880 /* @min:%2eloadEventEnd */ ]);\n network = (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(timing[0, $9acc3b97657eaaf0$export$f8670e269dbf7411 /* @min:%2enavigationStart */ ], timing[0, $9acc3b97657eaaf0$export$ade5c25ec120f74e /* @min:%2econnectEnd */ ]);\n request = (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(timing.requestStart, timing[0, $9acc3b97657eaaf0$export$efd7bea2390142dc /* @min:%2eresponseStart */ ]);\n response = (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(timing[0, $9acc3b97657eaaf0$export$efd7bea2390142dc /* @min:%2eresponseStart */ ], timing[0, $9acc3b97657eaaf0$export$cb472b94f03785cf /* @min:%2eresponseEnd */ ]);\n dom = (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(timing.responseEnd, timing[0, $9acc3b97657eaaf0$export$3e2743adb5050880 /* @min:%2eloadEventEnd */ ]);\n }\n if (total === 0) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_logger, 2 /* eLoggingSeverity.WARNING */ , 10 /* _eInternalMessageId.ErrorPVCalc */ , \"error calculating page view performance.\", {\n total: total,\n network: network,\n request: request,\n response: response,\n dom: dom\n });\n else if (!_self[0, $9acc3b97657eaaf0$export$7d974758a7a955a6 /* @min:%2eshouldCollectDuration */ ](total, network, request, response, dom)) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_logger, 2 /* eLoggingSeverity.WARNING */ , 45 /* _eInternalMessageId.InvalidDurationValue */ , \"Invalid page load duration value. Browser perf data won't be sent.\", {\n total: total,\n network: network,\n request: request,\n response: response,\n dom: dom\n });\n else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) // some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT\n // in this case, don't report client performance from this page\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_logger, 2 /* eLoggingSeverity.WARNING */ , 8 /* _eInternalMessageId.ClientPerformanceMathError */ , \"client performance math error.\", {\n total: total,\n network: network,\n request: request,\n response: response,\n dom: dom\n });\n else {\n pageViewPerformance.durationMs = total;\n // // convert to timespans\n pageViewPerformance.perfTotal = pageViewPerformance[0, $9acc3b97657eaaf0$export$aa395e58f404db90 /* @min:%2eduration */ ] = (0, $8ce53fcb9c1dc1db$export$4460ed97e7c4a927)(total);\n pageViewPerformance.networkConnect = (0, $8ce53fcb9c1dc1db$export$4460ed97e7c4a927)(network);\n pageViewPerformance.sentRequest = (0, $8ce53fcb9c1dc1db$export$4460ed97e7c4a927)(request);\n pageViewPerformance.receivedResponse = (0, $8ce53fcb9c1dc1db$export$4460ed97e7c4a927)(response);\n pageViewPerformance.domProcessing = (0, $8ce53fcb9c1dc1db$export$4460ed97e7c4a927)(dom);\n pageViewPerformance.isValid = true;\n }\n }\n };\n _self[0, $9acc3b97657eaaf0$export$f80d3e3d3d24d8e2 /* @min:%2egetPerformanceTiming */ ] = $14a28652d5a6e87a$var$_getPerformanceTiming;\n _self[0, $9acc3b97657eaaf0$export$379c72358869fe15 /* @min:%2eisPerformanceTimingSupported */ ] = $14a28652d5a6e87a$var$_isPerformanceTimingSupported;\n _self[0, $9acc3b97657eaaf0$export$2e020f7b1a6ecc9d /* @min:%2eisPerformanceTimingDataReady */ ] = $14a28652d5a6e87a$var$_isPerformanceTimingDataReady;\n _self[0, $9acc3b97657eaaf0$export$7d974758a7a955a6 /* @min:%2eshouldCollectDuration */ ] = $14a28652d5a6e87a$var$_shouldCollectDuration;\n });\n }\n // Removed Stub for PageViewPerformanceManager.prototype.populatePageViewPerformanceEvent.\n // Removed Stub for PageViewPerformanceManager.prototype.getPerformanceTiming.\n // Removed Stub for PageViewPerformanceManager.prototype.isPerformanceTimingSupported.\n // Removed Stub for PageViewPerformanceManager.prototype.isPerformanceTimingDataReady.\n // Removed Stub for PageViewPerformanceManager.prototype.shouldCollectDuration.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n PageViewPerformanceManager.__ieDyn = 1;\n return PageViewPerformanceManager;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Web Analytics, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\n/**\r\n * Used to track page visit durations\r\n */ var $55f799186175501d$export$f6fdd81afb2fe76 = /** @class */ function() {\n /**\r\n * Creates a new instance of PageVisitTimeManager\r\n * @param pageVisitTimeTrackingHandler - Delegate that will be called to send telemetry data to AI (when trackPreviousPageVisit is called)\r\n * @returns {}\r\n */ function PageVisitTimeManager(logger, pageVisitTimeTrackingHandler) {\n var prevPageVisitDataKeyName = \"prevPageVisitData\";\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(PageVisitTimeManager, this, function(_self) {\n _self[0, $9acc3b97657eaaf0$export$5b63a890d51a5194 /* @min:%2etrackPreviousPageVisit */ ] = function(currentPageName, currentPageUrl) {\n try {\n // Restart timer for new page view\n var prevPageVisitTimeData = restartPageVisitTimer(currentPageName, currentPageUrl);\n // If there was a page already being timed, track the visit time for it now.\n if (prevPageVisitTimeData) pageVisitTimeTrackingHandler(prevPageVisitTimeData.pageName, prevPageVisitTimeData.pageUrl, prevPageVisitTimeData.pageVisitTime);\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$25fb4cb97863f0a8)(logger, \"Auto track page visit time failed, metric will not be collected: \" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e));\n }\n };\n /**\r\n * Stops timing of current page (if exists) and starts timing for duration of visit to pageName\r\n * @param pageName - Name of page to begin timing visit duration\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from last call to start or restart, if exists. Null if not.\r\n */ function restartPageVisitTimer(pageName, pageUrl) {\n var prevPageVisitData = null;\n try {\n prevPageVisitData = stopPageVisitTimer();\n if ((0, $8e03bdff803b84be$export$c81985c4209bac26)()) {\n if ((0, $8e03bdff803b84be$export$a398bd2f40e2eb6e)(logger, prevPageVisitDataKeyName) != null) (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)(\"Cannot call startPageVisit consecutively without first calling stopPageVisit\");\n var currPageVisitDataStr = (0, $0c599844349363c4$export$d047a7c56db64af4)().stringify(new $55f799186175501d$export$513202441432a369(pageName, pageUrl));\n (0, $8e03bdff803b84be$export$21abea3a85fee3f5)(logger, prevPageVisitDataKeyName, currPageVisitDataStr);\n }\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$25fb4cb97863f0a8)(logger, \"Call to restart failed: \" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e));\n prevPageVisitData = null;\n }\n return prevPageVisitData;\n }\n /**\r\n * Stops timing of current page, if exists.\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from call to start, if exists. Null if not.\r\n */ function stopPageVisitTimer() {\n var prevPageVisitData = null;\n try {\n if ((0, $8e03bdff803b84be$export$c81985c4209bac26)()) {\n // Define end time of page's visit\n var pageVisitEndTime = (0, $628cad25a0769458$export$a56f095995763cca)();\n // Try to retrieve page name and start time from session storage\n var pageVisitDataJsonStr = (0, $8e03bdff803b84be$export$a398bd2f40e2eb6e)(logger, prevPageVisitDataKeyName);\n if (pageVisitDataJsonStr && (0, $0c599844349363c4$export$a2856ab6913b9fff)()) {\n // if previous page data exists, set end time of visit\n prevPageVisitData = (0, $0c599844349363c4$export$d047a7c56db64af4)().parse(pageVisitDataJsonStr);\n prevPageVisitData.pageVisitTime = pageVisitEndTime - prevPageVisitData[0, $9acc3b97657eaaf0$export$204c1f54732d882 /* @min:%2epageVisitStartTime */ ];\n // Remove data from storage since we already used it\n (0, $8e03bdff803b84be$export$9f411b4ea05fb92a)(logger, prevPageVisitDataKeyName);\n }\n }\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$25fb4cb97863f0a8)(logger, \"Stop page visit timer failed: \" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e));\n prevPageVisitData = null;\n }\n return prevPageVisitData;\n }\n // For backward compatibility\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"_logger\", {\n g: function() {\n return logger;\n }\n });\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"pageVisitTimeTrackingHandler\", {\n g: function() {\n return pageVisitTimeTrackingHandler;\n }\n });\n });\n }\n // Removed Stub for PageVisitTimeManager.prototype.trackPreviousPageVisit.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n PageVisitTimeManager.__ieDyn = 1;\n return PageVisitTimeManager;\n}();\nvar $55f799186175501d$export$513202441432a369 = /** @class */ function() {\n function PageVisitData(pageName, pageUrl) {\n this[0, $9acc3b97657eaaf0$export$204c1f54732d882 /* @min:%2epageVisitStartTime */ ] = (0, $628cad25a0769458$export$a56f095995763cca)();\n this.pageName = pageName;\n this.pageUrl = pageUrl;\n }\n return PageVisitData;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Web Analytics, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n/**\r\n * Used to record timed events and page views.\r\n */ var $6610fcdfc52ae3ca$export$ef1e5872612852d1 = /** @class */ function() {\n function Timing(logger, name) {\n var _self = this;\n var _events = {};\n _self.start = function(name) {\n if (typeof _events[name] !== \"undefined\") (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 62 /* _eInternalMessageId.StartCalledMoreThanOnce */ , \"start was called more than once for this event without calling stop.\", {\n name: name,\n key: name\n }, true);\n _events[name] = +new Date;\n };\n _self.stop = function(name, url, properties, measurements) {\n var start = _events[name];\n if (isNaN(start)) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 63 /* _eInternalMessageId.StopCalledWithoutStart */ , \"stop was called without a corresponding start.\", {\n name: name,\n key: name\n }, true);\n else {\n var end = +new Date;\n var duration = (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(start, end);\n _self.action(name, url, duration, properties, measurements);\n }\n delete _events[name];\n _events[name] = undefined;\n };\n }\n return Timing;\n}();\n\n\nvar $826a9f6c1286ca27$var$_a;\nvar $826a9f6c1286ca27$var$strEvent = \"event\";\nfunction $826a9f6c1286ca27$var$_dispatchEvent(target, evnt) {\n if (target && target.dispatchEvent && evnt) target.dispatchEvent(evnt);\n}\nfunction $826a9f6c1286ca27$var$_getReason(error) {\n if (error && error.reason) {\n var reason = error.reason;\n if (!(0, $533f826bbc418791$export$844ec244b1367d54)(reason) && (0, $533f826bbc418791$export$f6e2535fb5126e54)(reason[0, $9acc3b97657eaaf0$export$e2818d11505fa034 /* @min:%2etoString */ ])) return reason[0, $9acc3b97657eaaf0$export$e2818d11505fa034 /* @min:%2etoString */ ]();\n return (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(reason);\n }\n // Pass the original object down which will eventually get evaluated for any message or description\n return error || \"\";\n}\nvar $826a9f6c1286ca27$var$MinMilliSeconds = 60000;\nvar $826a9f6c1286ca27$var$defaultValues = (0, $36a077d9f4439b69$export$a15782d21797da4c)(($826a9f6c1286ca27$var$_a = {\n sessionRenewalMs: (0, $61c4d9dd4226f64e$export$e86b712d02676c90)($826a9f6c1286ca27$var$_chkConfigMilliseconds, 1800000),\n sessionExpirationMs: (0, $61c4d9dd4226f64e$export$e86b712d02676c90)($826a9f6c1286ca27$var$_chkConfigMilliseconds, 86400000),\n disableExceptionTracking: (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)()\n}, $826a9f6c1286ca27$var$_a[0, $9acc3b97657eaaf0$export$e4892641d6ea1b45 /* @min:autoTrackPageVisitTime */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $826a9f6c1286ca27$var$_a[0, $9acc3b97657eaaf0$export$c653a2fea2d8252a /* @min:overridePageViewDuration */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $826a9f6c1286ca27$var$_a[0, $9acc3b97657eaaf0$export$72fe3f7aecc0d015 /* @min:enableUnhandledPromiseRejectionTracking */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $826a9f6c1286ca27$var$_a[0, $9acc3b97657eaaf0$export$527cc291f0159d2a /* @min:autoUnhandledPromiseInstrumented */ ] = false, $826a9f6c1286ca27$var$_a.samplingPercentage = (0, $61c4d9dd4226f64e$export$d0884590a6a82e6c)($826a9f6c1286ca27$var$_chkSampling, 100), $826a9f6c1286ca27$var$_a[0, $9acc3b97657eaaf0$export$f357d96937d91514 /* @min:isStorageUseDisabled */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $826a9f6c1286ca27$var$_a[0, $9acc3b97657eaaf0$export$204917ab19f7a461 /* @min:isBrowserLinkTrackingEnabled */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $826a9f6c1286ca27$var$_a[0, $9acc3b97657eaaf0$export$6390687f17a52950 /* @min:enableAutoRouteTracking */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $826a9f6c1286ca27$var$_a.namePrefix = (0, $61c4d9dd4226f64e$export$75965e1022d5969a)(), $826a9f6c1286ca27$var$_a.enableDebug = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $826a9f6c1286ca27$var$_a.disableFlushOnBeforeUnload = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $826a9f6c1286ca27$var$_a.disableFlushOnUnload = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(false, \"disableFlushOnBeforeUnload\"), $826a9f6c1286ca27$var$_a));\nfunction $826a9f6c1286ca27$var$_chkConfigMilliseconds(value, defValue) {\n value = value || defValue;\n if (value < $826a9f6c1286ca27$var$MinMilliSeconds) value = $826a9f6c1286ca27$var$MinMilliSeconds;\n return +value;\n}\nfunction $826a9f6c1286ca27$var$_chkSampling(value) {\n return !isNaN(value) && value > 0 && value <= 100;\n}\nfunction $826a9f6c1286ca27$var$_updateStorageUsage(extConfig) {\n // Not resetting the storage usage as someone may have manually called utlDisableStorage, so this will only\n // reset based if the configuration option is provided\n if (!(0, $533f826bbc418791$export$fce6876652108ab)(extConfig[0, $9acc3b97657eaaf0$export$f357d96937d91514 /* @min:%2eisStorageUseDisabled */ ])) {\n if (extConfig[0, $9acc3b97657eaaf0$export$f357d96937d91514 /* @min:%2eisStorageUseDisabled */ ]) (0, $8e03bdff803b84be$export$53ddd0ab7db9403)();\n else (0, $8e03bdff803b84be$export$f08cf9bcd292b981)();\n }\n}\nvar $826a9f6c1286ca27$export$ca681bfeb2cf0fca = /** @class */ function(_super) {\n (0, $2a74b38b87b38cda$export$1f9c32e3fbfb8e62)(AnalyticsPlugin, _super);\n function AnalyticsPlugin() {\n var _this = _super.call(this) || this;\n _this.identifier = (0, $ca7353bd9238d340$export$862d858b0002f352); // do not change name or priority\n _this.priority = 180; // take from reserved priority range 100- 200\n _this.autoRoutePVDelay = 500; // ms; Time to wait after a route change before triggering a pageview to allow DOM changes to take place\n var _eventTracking;\n var _pageTracking;\n var _pageViewManager;\n var _pageViewPerformanceManager;\n var _pageVisitTimeManager;\n var _preInitTelemetryInitializers;\n var _isBrowserLinkTrackingEnabled;\n var _browserLinkInitializerAdded;\n var _enableAutoRouteTracking;\n var _historyListenerAdded;\n var _disableExceptionTracking;\n var _autoExceptionInstrumented;\n var _enableUnhandledPromiseRejectionTracking;\n var _autoUnhandledPromiseInstrumented;\n var _extConfig;\n var _autoTrackPageVisitTime;\n // Counts number of trackAjax invocations.\n // By default we only monitor X ajax call per view to avoid too much load.\n // Default value is set in config.\n // This counter keeps increasing even after the limit is reached.\n var _trackAjaxAttempts = 0;\n // array with max length of 2 that store current url and previous url for SPA page route change trackPageview use.\n var _prevUri; // Assigned in the constructor\n var _currUri;\n var _evtNamespace;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(AnalyticsPlugin, _this, function(_self, _base) {\n var _addHook = _base[0, $9acc3b97657eaaf0$export$3b3afe26ca0e015c /* @min:%2e_addHook */ ];\n _initDefaults();\n _self.getCookieMgr = function() {\n return (0, $d751d7cd1b1c5598$export$76c0b273586c25c7)(_self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ]);\n };\n _self.processTelemetry = function(env, itemCtx) {\n _self.processNext(env, itemCtx);\n };\n _self.trackEvent = function(event, customProperties) {\n try {\n var telemetryItem = (0, $932e93a8e5adf75c$export$2dc41327de8d98f1)(event, (0, $9bdc8b7e7935e83a$export$d61e24a684f9e51)[0, $9acc3b97657eaaf0$export$9e16762ab4f2648 /* @min:%2edataType */ ], (0, $9bdc8b7e7935e83a$export$d61e24a684f9e51)[0, $9acc3b97657eaaf0$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], _self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), customProperties);\n _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ][0, $9acc3b97657eaaf0$export$548634e98b3af9c4 /* @min:%2etrack */ ](telemetryItem);\n } catch (e) {\n _throwInternal(2 /* eLoggingSeverity.WARNING */ , 39 /* _eInternalMessageId.TrackTraceFailed */ , \"trackTrace failed, trace will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n };\n /**\r\n * Start timing an extended event. Call `stopTrackEvent` to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */ _self.startTrackEvent = function(name) {\n try {\n _eventTracking.start(name);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */ , 29 /* _eInternalMessageId.StartTrackEventFailed */ , \"startTrackEvent failed, event will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n };\n /**\r\n * Log an extended event that you started timing with `startTrackEvent`.\r\n * @param name The string you used to identify this event in `startTrackEvent`.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */ _self.stopTrackEvent = function(name, properties, measurements) {\n try {\n _eventTracking.stop(name, undefined, properties, measurements);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */ , 30 /* _eInternalMessageId.StopTrackEventFailed */ , \"stopTrackEvent failed, event will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n };\n /**\r\n * @description Log a diagnostic message\r\n * @param trace\r\n * @param ICustomProperties.\r\n * @memberof ApplicationInsights\r\n */ _self.trackTrace = function(trace, customProperties) {\n try {\n var telemetryItem = (0, $932e93a8e5adf75c$export$2dc41327de8d98f1)(trace, (0, $16adbdbcb0ae9015$export$78e1bea9036f120f)[0, $9acc3b97657eaaf0$export$9e16762ab4f2648 /* @min:%2edataType */ ], (0, $16adbdbcb0ae9015$export$78e1bea9036f120f)[0, $9acc3b97657eaaf0$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], _self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), customProperties);\n _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ][0, $9acc3b97657eaaf0$export$548634e98b3af9c4 /* @min:%2etrack */ ](telemetryItem);\n } catch (e) {\n _throwInternal(2 /* eLoggingSeverity.WARNING */ , 39 /* _eInternalMessageId.TrackTraceFailed */ , \"trackTrace failed, trace will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n };\n /**\r\n * @description Log a numeric value that is not associated with a specific event. Typically\r\n * used to send regular reports of performance indicators. To send single measurement, just\r\n * use the name and average fields of {@link IMetricTelemetry}. If you take measurements\r\n * frequently, you can reduce the telemetry bandwidth by aggregating multiple measurements\r\n * and sending the resulting average at intervals\r\n * @param metric - input object argument. Only name and average are mandatory.\r\n * @param } customProperties additional data used to filter metrics in the\r\n * portal. Defaults to empty.\r\n * @memberof ApplicationInsights\r\n */ _self.trackMetric = function(metric, customProperties) {\n try {\n var telemetryItem = (0, $932e93a8e5adf75c$export$2dc41327de8d98f1)(metric, (0, $659de0afdff509f2$export$efdd3e096bc27746)[0, $9acc3b97657eaaf0$export$9e16762ab4f2648 /* @min:%2edataType */ ], (0, $659de0afdff509f2$export$efdd3e096bc27746)[0, $9acc3b97657eaaf0$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], _self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), customProperties);\n _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ][0, $9acc3b97657eaaf0$export$548634e98b3af9c4 /* @min:%2etrack */ ](telemetryItem);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */ , 36 /* _eInternalMessageId.TrackMetricFailed */ , \"trackMetric failed, metric will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n };\n /**\r\n * Logs that a page or other item was viewed.\r\n * @param IPageViewTelemetry - The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param customProperties - Additional data used to filter events and metrics. Defaults to empty.\r\n * If a user wants to provide duration for pageLoad, it'll have to be in pageView.properties.duration\r\n */ _self[0, $9acc3b97657eaaf0$export$ab1a8669316b7a02 /* @min:%2etrackPageView */ ] = function(pageView, customProperties) {\n try {\n var inPv = pageView || {};\n _pageViewManager[0, $9acc3b97657eaaf0$export$ab1a8669316b7a02 /* @min:%2etrackPageView */ ](inPv, (0, $2a74b38b87b38cda$export$b3cf7a802e578501)((0, $2a74b38b87b38cda$export$b3cf7a802e578501)((0, $2a74b38b87b38cda$export$b3cf7a802e578501)({}, inPv.properties), inPv.measurements), customProperties));\n if (_autoTrackPageVisitTime) _pageVisitTimeManager[0, $9acc3b97657eaaf0$export$5b63a890d51a5194 /* @min:%2etrackPreviousPageVisit */ ](inPv.name, inPv.uri);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */ , 37 /* _eInternalMessageId.TrackPVFailed */ , \"trackPageView failed, page view will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n };\n /**\r\n * Create a page view telemetry item and send it to the SDK pipeline through the core.track API\r\n * @param pageView - Page view item to be sent\r\n * @param properties - Custom properties (Part C) that a user can add to the telemetry item\r\n * @param systemProperties - System level properties (Part A) that a user can add to the telemetry item\r\n */ _self[0, $9acc3b97657eaaf0$export$e4d43b697816aae1 /* @min:%2esendPageViewInternal */ ] = function(pageView, properties, systemProperties) {\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n if (doc) pageView.refUri = pageView.refUri === undefined ? doc.referrer : pageView.refUri;\n var telemetryItem = (0, $932e93a8e5adf75c$export$2dc41327de8d98f1)(pageView, (0, $5c5f40703ef3d51c$export$12c0fdede1c6bc6c)[0, $9acc3b97657eaaf0$export$9e16762ab4f2648 /* @min:%2edataType */ ], (0, $5c5f40703ef3d51c$export$12c0fdede1c6bc6c)[0, $9acc3b97657eaaf0$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], _self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), properties, systemProperties);\n _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ][0, $9acc3b97657eaaf0$export$548634e98b3af9c4 /* @min:%2etrack */ ](telemetryItem);\n // reset ajaxes counter\n _trackAjaxAttempts = 0;\n };\n /**\r\n * @ignore INTERNAL ONLY\r\n * @param pageViewPerformance\r\n * @param properties\r\n */ _self[0, $9acc3b97657eaaf0$export$fe3039bd0e70dd3f /* @min:%2esendPageViewPerformanceInternal */ ] = function(pageViewPerformance, properties, systemProperties) {\n var telemetryItem = (0, $932e93a8e5adf75c$export$2dc41327de8d98f1)(pageViewPerformance, (0, $27d410d508f4b32f$export$709aae57ec681346)[0, $9acc3b97657eaaf0$export$9e16762ab4f2648 /* @min:%2edataType */ ], (0, $27d410d508f4b32f$export$709aae57ec681346)[0, $9acc3b97657eaaf0$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], _self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), properties, systemProperties);\n _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ][0, $9acc3b97657eaaf0$export$548634e98b3af9c4 /* @min:%2etrack */ ](telemetryItem);\n };\n /**\r\n * Send browser performance metrics.\r\n * @param pageViewPerformance\r\n * @param customProperties\r\n */ _self.trackPageViewPerformance = function(pageViewPerformance, customProperties) {\n var inPvp = pageViewPerformance || {};\n try {\n _pageViewPerformanceManager[0, $9acc3b97657eaaf0$export$20270e2265c2a185 /* @min:%2epopulatePageViewPerformanceEvent */ ](inPvp);\n _self[0, $9acc3b97657eaaf0$export$fe3039bd0e70dd3f /* @min:%2esendPageViewPerformanceInternal */ ](inPvp, customProperties);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */ , 37 /* _eInternalMessageId.TrackPVFailed */ , \"trackPageViewPerformance failed, page view will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n };\n /**\r\n * Starts the timer for tracking a page load time. Use this instead of `trackPageView` if you want to control when the page view timer starts and stops,\r\n * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call `stopTrackPage` to log the end of the page view\r\n * and send the event.\r\n * @param name - A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */ _self.startTrackPage = function(name) {\n try {\n if (typeof name !== \"string\") {\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n name = doc && doc.title || \"\";\n }\n _pageTracking.start(name);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */ , 31 /* _eInternalMessageId.StartTrackFailed */ , \"startTrackPage failed, page view may not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n };\n /**\r\n * Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements.\r\n * The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`.\r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */ _self.stopTrackPage = function(name, url, properties, measurement) {\n try {\n if (typeof name !== \"string\") {\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n name = doc && doc.title || \"\";\n }\n if (typeof url !== \"string\") {\n var loc = (0, $0c599844349363c4$export$e7fd20fad3cf4b5f)();\n url = loc && loc[0, $9acc3b97657eaaf0$export$8d0bd9d006f3ecea /* @min:%2ehref */ ] || \"\";\n }\n _pageTracking.stop(name, url, properties, measurement);\n if (_autoTrackPageVisitTime) _pageVisitTimeManager[0, $9acc3b97657eaaf0$export$5b63a890d51a5194 /* @min:%2etrackPreviousPageVisit */ ](name, url);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */ , 32 /* _eInternalMessageId.StopTrackFailed */ , \"stopTrackPage failed, page view will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n };\n /**\r\n * @ignore INTERNAL ONLY\r\n * @param exception\r\n * @param properties\r\n * @param systemProperties\r\n */ _self[0, $9acc3b97657eaaf0$export$5414b86ab837cb07 /* @min:%2esendExceptionInternal */ ] = function(exception, customProperties, systemProperties) {\n // Adding additional edge cases to handle\n // - Not passing anything (null / undefined)\n var theError = exception && (exception[0, $9acc3b97657eaaf0$export$4852fd87b68a6e1f /* @min:%2eexception */ ] || exception[0, $9acc3b97657eaaf0$export$ff0a0f80c43edd37 /* @min:%2eerror */ ]) || // - Handle someone calling trackException based of v1 API where the exception was the Error\n (0, $533f826bbc418791$export$e6127cc7fe7395c3)(exception) && exception || // - Handles no error being defined and instead of creating a new Error() instance attempt to map so any stacktrace\n // is preserved and does not list ApplicationInsights code as the source\n {\n name: exception && typeof exception,\n message: exception || (0, $71dfba5ea0640485$export$4003f5e1672d759)\n };\n // If no exception object was passed assign to an empty object to avoid internal exceptions\n exception = exception || {};\n var exceptionPartB = new (0, $1e8d24b24fb574aa$export$e2f174de097e0bcd)(_self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), theError, exception.properties || customProperties, exception.measurements, exception.severityLevel, exception.id).toInterface();\n var telemetryItem = (0, $932e93a8e5adf75c$export$2dc41327de8d98f1)(exceptionPartB, (0, $1e8d24b24fb574aa$export$e2f174de097e0bcd)[0, $9acc3b97657eaaf0$export$9e16762ab4f2648 /* @min:%2edataType */ ], (0, $1e8d24b24fb574aa$export$e2f174de097e0bcd)[0, $9acc3b97657eaaf0$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], _self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), customProperties, systemProperties);\n _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ][0, $9acc3b97657eaaf0$export$548634e98b3af9c4 /* @min:%2etrack */ ](telemetryItem);\n };\n /**\r\n * Log an exception you have caught.\r\n *\r\n * @param exception - Object which contains exception to be sent\r\n * @param } customProperties Additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n *\r\n * Any property of type double will be considered a measurement, and will be treated by Application Insights as a metric.\r\n * @memberof ApplicationInsights\r\n */ _self.trackException = function(exception, customProperties) {\n if (exception && !exception[0, $9acc3b97657eaaf0$export$4852fd87b68a6e1f /* @min:%2eexception */ ] && exception[0, $9acc3b97657eaaf0$export$ff0a0f80c43edd37 /* @min:%2eerror */ ]) exception[0, $9acc3b97657eaaf0$export$4852fd87b68a6e1f /* @min:%2eexception */ ] = exception[0, $9acc3b97657eaaf0$export$ff0a0f80c43edd37 /* @min:%2eerror */ ];\n try {\n _self[0, $9acc3b97657eaaf0$export$5414b86ab837cb07 /* @min:%2esendExceptionInternal */ ](exception, customProperties);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */ , 35 /* _eInternalMessageId.TrackExceptionFailed */ , \"trackException failed, exception will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n };\n /**\r\n * @description Custom error handler for Application Insights Analytics\r\n * @param exception\r\n * @memberof ApplicationInsights\r\n */ _self[0, $9acc3b97657eaaf0$export$31fe7bcf0f7c83e8 /* @min:%2e_onerror */ ] = function(exception) {\n var error = exception && exception[0, $9acc3b97657eaaf0$export$ff0a0f80c43edd37 /* @min:%2eerror */ ];\n var evt = exception && exception.evt;\n try {\n if (!evt) {\n var _window = (0, $3d5fcb60a9467a45$export$38b2d434cce3ea22)();\n if (_window) evt = _window[$826a9f6c1286ca27$var$strEvent];\n }\n var url = exception && exception.url || ((0, $3d5fcb60a9467a45$export$f65ca476c09acec0)() || {}).URL;\n // If no error source is provided assume the default window.onerror handler\n var errorSrc = exception[0, $9acc3b97657eaaf0$export$d190ee0b6bfe36d8 /* @min:%2eerrorSrc */ ] || \"window.onerror@\" + url + \":\" + (exception[0, $9acc3b97657eaaf0$export$4d19a8ea486d5967 /* @min:%2elineNumber */ ] || 0) + \":\" + (exception[0, $9acc3b97657eaaf0$export$91a182df12726bcd /* @min:%2ecolumnNumber */ ] || 0);\n var properties = {\n errorSrc: errorSrc,\n url: url,\n lineNumber: exception[0, $9acc3b97657eaaf0$export$4d19a8ea486d5967 /* @min:%2elineNumber */ ] || 0,\n columnNumber: exception[0, $9acc3b97657eaaf0$export$91a182df12726bcd /* @min:%2ecolumnNumber */ ] || 0,\n message: exception[0, $9acc3b97657eaaf0$export$923606b70907833e /* @min:%2emessage */ ]\n };\n if ((0, $8ce53fcb9c1dc1db$export$8c465f5f14327ccd)(exception.message, exception.url, exception.lineNumber, exception.columnNumber, exception[0, $9acc3b97657eaaf0$export$ff0a0f80c43edd37 /* @min:%2eerror */ ])) _sendCORSException((0, $1e8d24b24fb574aa$export$e2f174de097e0bcd)[0, $9acc3b97657eaaf0$export$3dedbd38aa3b0c11 /* @min:%2eCreateAutoException */ ](\"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.\", url, exception[0, $9acc3b97657eaaf0$export$4d19a8ea486d5967 /* @min:%2elineNumber */ ] || 0, exception[0, $9acc3b97657eaaf0$export$91a182df12726bcd /* @min:%2ecolumnNumber */ ] || 0, error, evt, null, errorSrc), properties);\n else {\n if (!exception[0, $9acc3b97657eaaf0$export$d190ee0b6bfe36d8 /* @min:%2eerrorSrc */ ]) exception[0, $9acc3b97657eaaf0$export$d190ee0b6bfe36d8 /* @min:%2eerrorSrc */ ] = errorSrc;\n _self.trackException({\n exception: exception,\n severityLevel: 3 /* eSeverityLevel.Error */ \n }, properties);\n }\n } catch (e) {\n var errorString = error ? error.name + \", \" + error[0, $9acc3b97657eaaf0$export$923606b70907833e /* @min:%2emessage */ ] : \"null\";\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */ , 11 /* _eInternalMessageId.ExceptionWhileLoggingError */ , \"_onError threw exception while logging error, error will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e),\n errorString: errorString\n });\n }\n };\n _self[0, $9acc3b97657eaaf0$export$935b759388157821 /* @min:%2eaddTelemetryInitializer */ ] = function(telemetryInitializer) {\n if (_self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ]) // Just add to the core\n return _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ][0, $9acc3b97657eaaf0$export$935b759388157821 /* @min:%2eaddTelemetryInitializer */ ](telemetryInitializer);\n // Handle \"pre-initialization\" telemetry initializers (for backward compatibility)\n if (!_preInitTelemetryInitializers) _preInitTelemetryInitializers = [];\n _preInitTelemetryInitializers.push(telemetryInitializer);\n };\n _self.initialize = function(config, core, extensions, pluginChain) {\n if (_self.isInitialized()) return;\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(core)) (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)(\"Error initializing\");\n _base.initialize(config, core, extensions, pluginChain);\n try {\n _evtNamespace = (0, $12cc003c7fb5ccde$export$3f37a50e0edde3be)((0, $8a2d104e2647a310$export$eb4a6badb18ead04)(_self.identifier), core.evtNamespace && core.evtNamespace());\n if (_preInitTelemetryInitializers) {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_preInitTelemetryInitializers, function(initializer) {\n core[0, $9acc3b97657eaaf0$export$935b759388157821 /* @min:%2eaddTelemetryInitializer */ ](initializer);\n });\n _preInitTelemetryInitializers = null;\n }\n _populateDefaults(config);\n _pageViewPerformanceManager = new (0, $14a28652d5a6e87a$export$da80ef98bc1bafa6)(_self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ]);\n _pageViewManager = new (0, $6e4263cfc9177d6e$export$5bb8d6768724bf86)(_self, _extConfig.overridePageViewDuration, _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ], _pageViewPerformanceManager);\n _pageVisitTimeManager = new (0, $55f799186175501d$export$f6fdd81afb2fe76)(_self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), function(pageName, pageUrl, pageVisitTime) {\n return trackPageVisitTime(pageName, pageUrl, pageVisitTime);\n });\n _eventTracking = new (0, $6610fcdfc52ae3ca$export$ef1e5872612852d1)(_self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), \"trackEvent\");\n _eventTracking.action = function(name, url, duration, properties, measurements) {\n if (!properties) properties = {};\n if (!measurements) measurements = {};\n properties.duration = duration[0, $9acc3b97657eaaf0$export$e2818d11505fa034 /* @min:%2etoString */ ]();\n _self.trackEvent({\n name: name,\n properties: properties,\n measurements: measurements\n });\n };\n // initialize page view timing\n _pageTracking = new (0, $6610fcdfc52ae3ca$export$ef1e5872612852d1)(_self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), \"trackPageView\");\n _pageTracking.action = function(name, url, duration, properties, measurements) {\n // duration must be a custom property in order for the collector to extract it\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(properties)) properties = {};\n properties.duration = duration[0, $9acc3b97657eaaf0$export$e2818d11505fa034 /* @min:%2etoString */ ]();\n var pageViewItem = {\n name: name,\n uri: url,\n properties: properties,\n measurements: measurements\n };\n _self[0, $9acc3b97657eaaf0$export$e4d43b697816aae1 /* @min:%2esendPageViewInternal */ ](pageViewItem, properties);\n };\n if ((0, $3d5fcb60a9467a45$export$fef62134eea24008)()) {\n _updateExceptionTracking();\n _updateLocationChange();\n }\n } catch (e) {\n // resetting the initialized state because of failure\n _self.setInitialized(false);\n throw e;\n }\n };\n _self._doTeardown = function(unloadCtx, unloadState) {\n _pageViewManager && _pageViewManager.teardown(unloadCtx, unloadState);\n // Just register to remove all events associated with this namespace\n (0, $12cc003c7fb5ccde$export$51dedceb7c784eff)(window, null, null, _evtNamespace);\n _initDefaults();\n };\n function _populateDefaults(config) {\n var identifier = _self.identifier;\n var core = _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ];\n _self[0, $9acc3b97657eaaf0$export$3b3afe26ca0e015c /* @min:%2e_addHook */ ]((0, $acb30f9e62dc5705$export$454a433e4deb244f)(config, function() {\n var ctx = (0, $bc7124acb0f73e64$export$ca98f11e981bcfd6)(null, config, core);\n _extConfig = ctx.getExtCfg(identifier, $826a9f6c1286ca27$var$defaultValues);\n _autoTrackPageVisitTime = _extConfig[0, $9acc3b97657eaaf0$export$e4892641d6ea1b45 /* @min:%2eautoTrackPageVisitTime */ ];\n $826a9f6c1286ca27$var$_updateStorageUsage(_extConfig);\n // _updateBrowserLinkTracking\n _isBrowserLinkTrackingEnabled = _extConfig[0, $9acc3b97657eaaf0$export$204917ab19f7a461 /* @min:%2eisBrowserLinkTrackingEnabled */ ];\n _addDefaultTelemetryInitializers();\n }));\n }\n /**\r\n * Log a page visit time\r\n * @param pageName Name of page\r\n * @param pageVisitDuration Duration of visit to the page in milliseconds\r\n */ function trackPageVisitTime(pageName, pageUrl, pageVisitTime) {\n var properties = {\n PageName: pageName,\n PageUrl: pageUrl\n };\n _self.trackMetric({\n name: \"PageVisitTime\",\n average: pageVisitTime,\n max: pageVisitTime,\n min: pageVisitTime,\n sampleCount: 1\n }, properties);\n }\n function _addDefaultTelemetryInitializers() {\n if (!_browserLinkInitializerAdded && _isBrowserLinkTrackingEnabled) {\n var browserLinkPaths_1 = [\n \"/browserLinkSignalR/\",\n \"/__browserLink/\"\n ];\n var dropBrowserLinkRequests = function(envelope) {\n if (_isBrowserLinkTrackingEnabled && envelope.baseType === (0, $0dd1de134f090c69$export$a7b48490930dbffa)[0, $9acc3b97657eaaf0$export$9e16762ab4f2648 /* @min:%2edataType */ ]) {\n var remoteData = envelope.baseData;\n if (remoteData) for(var i = 0; i < browserLinkPaths_1[0, $9acc3b97657eaaf0$export$6eae51590aaea43 /* @min:%2elength */ ]; i++){\n if (remoteData.target && (0, $0194d45a55d79548$export$7c0888b0c4641088)(remoteData.target, browserLinkPaths_1[i]) >= 0) return false;\n }\n }\n return true;\n };\n _self[0, $9acc3b97657eaaf0$export$3b3afe26ca0e015c /* @min:%2e_addHook */ ](_self[0, $9acc3b97657eaaf0$export$935b759388157821 /* @min:%2eaddTelemetryInitializer */ ](dropBrowserLinkRequests));\n _browserLinkInitializerAdded = true;\n }\n }\n function _sendCORSException(exception, properties) {\n var telemetryItem = (0, $932e93a8e5adf75c$export$2dc41327de8d98f1)(exception, (0, $1e8d24b24fb574aa$export$e2f174de097e0bcd)[0, $9acc3b97657eaaf0$export$9e16762ab4f2648 /* @min:%2edataType */ ], (0, $1e8d24b24fb574aa$export$e2f174de097e0bcd)[0, $9acc3b97657eaaf0$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], _self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), properties);\n _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ][0, $9acc3b97657eaaf0$export$548634e98b3af9c4 /* @min:%2etrack */ ](telemetryItem);\n }\n function _updateExceptionTracking() {\n var _window = (0, $3d5fcb60a9467a45$export$38b2d434cce3ea22)();\n var locn = (0, $0c599844349363c4$export$e7fd20fad3cf4b5f)(true);\n _self[0, $9acc3b97657eaaf0$export$3b3afe26ca0e015c /* @min:%2e_addHook */ ]((0, $acb30f9e62dc5705$export$454a433e4deb244f)(_extConfig, function() {\n _disableExceptionTracking = _extConfig.disableExceptionTracking;\n if (!_disableExceptionTracking && !_autoExceptionInstrumented && !_extConfig.autoExceptionInstrumented) {\n // We want to enable exception auto collection and it has not been done so yet\n _addHook((0, $963b9811c2275531$export$b96f6cbe9b035430)(_window, \"onerror\", {\n ns: _evtNamespace,\n rsp: function(callDetails, message, url, lineNumber, columnNumber, error) {\n if (!_disableExceptionTracking && callDetails.rslt !== true) _self[0, $9acc3b97657eaaf0$export$31fe7bcf0f7c83e8 /* @min:%2e_onerror */ ]((0, $1e8d24b24fb574aa$export$e2f174de097e0bcd)[0, $9acc3b97657eaaf0$export$3dedbd38aa3b0c11 /* @min:%2eCreateAutoException */ ](message, url, lineNumber, columnNumber, error, callDetails.evt));\n }\n }, false));\n _autoExceptionInstrumented = true;\n }\n }));\n _addUnhandledPromiseRejectionTracking(_window, locn);\n }\n function _updateLocationChange() {\n var win = (0, $3d5fcb60a9467a45$export$38b2d434cce3ea22)();\n var locn = (0, $0c599844349363c4$export$e7fd20fad3cf4b5f)(true);\n _self[0, $9acc3b97657eaaf0$export$3b3afe26ca0e015c /* @min:%2e_addHook */ ]((0, $acb30f9e62dc5705$export$454a433e4deb244f)(_extConfig, function() {\n _enableAutoRouteTracking = _extConfig[0, $9acc3b97657eaaf0$export$6390687f17a52950 /* @min:%2eenableAutoRouteTracking */ ] === true;\n /**\r\n * Create a custom \"locationchange\" event which is triggered each time the history object is changed\r\n */ if (win && _enableAutoRouteTracking && !_historyListenerAdded && (0, $3d5fcb60a9467a45$export$b79afd6d47f11781)()) {\n var _history = (0, $3d5fcb60a9467a45$export$f9582a3c130d9538)();\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(_history.pushState) && (0, $533f826bbc418791$export$f6e2535fb5126e54)(_history.replaceState) && typeof Event !== (0, $67b827af57eed1eb$export$9b7d2d86cf58b987)) _addHistoryListener(win, _history, locn);\n }\n }));\n }\n function _getDistributedTraceCtx() {\n var distributedTraceCtx = null;\n if (_self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ] && _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ].getTraceCtx) distributedTraceCtx = _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ].getTraceCtx(false);\n if (!distributedTraceCtx) {\n // Fallback when using an older Core and PropertiesPlugin\n var properties = _self[0, $9acc3b97657eaaf0$export$f9ae8d0acf86503e /* @min:%2ecore */ ].getPlugin((0, $ca7353bd9238d340$export$2268e69a6d93b7cc));\n if (properties) {\n var context = properties.plugin.context;\n if (context) distributedTraceCtx = (0, $d98b699aeccdabc6$export$847d5dabba5fabb9)(context.telemetryTrace);\n }\n }\n return distributedTraceCtx;\n }\n /**\r\n * Create a custom \"locationchange\" event which is triggered each time the history object is changed\r\n */ function _addHistoryListener(win, history, locn) {\n if (_historyListenerAdded) return;\n // Name Prefix is only referenced during the initial initialization and cannot be changed afterwards\n var namePrefix = _extConfig.namePrefix || \"\";\n function _popstateHandler() {\n if (_enableAutoRouteTracking) $826a9f6c1286ca27$var$_dispatchEvent(win, (0, $b5e9c029fdfb79a5$export$58aa8b47bf337bc8)(namePrefix + \"locationchange\"));\n }\n function _locationChangeHandler() {\n // We always track the changes (if the handler is installed) to handle the feature being disabled between location changes\n if (_currUri) {\n _prevUri = _currUri;\n _currUri = locn && locn[0, $9acc3b97657eaaf0$export$8d0bd9d006f3ecea /* @min:%2ehref */ ] || \"\";\n } else _currUri = locn && locn[0, $9acc3b97657eaaf0$export$8d0bd9d006f3ecea /* @min:%2ehref */ ] || \"\";\n if (_enableAutoRouteTracking) {\n var distributedTraceCtx = _getDistributedTraceCtx();\n if (distributedTraceCtx) {\n distributedTraceCtx.setTraceId((0, $945e40d4195d77bb$export$58d1fad45f39d957)());\n var traceLocationName = \"_unknown_\";\n if (locn && locn.pathname) traceLocationName = locn.pathname + (locn.hash || \"\");\n // This populates the ai.operation.name which has a maximum size of 1024 so we need to sanitize it\n distributedTraceCtx.setName((0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(_self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), traceLocationName));\n }\n (0, $d03b12effd00bf96$export$5f4d6617421d489b)((function(uri) {\n // todo: override start time so that it is not affected by autoRoutePVDelay\n _self[0, $9acc3b97657eaaf0$export$ab1a8669316b7a02 /* @min:%2etrackPageView */ ]({\n refUri: uri,\n properties: {\n duration: 0\n }\n }); // SPA route change loading durations are undefined, so send 0\n }).bind(_self, _prevUri), _self.autoRoutePVDelay);\n }\n }\n _addHook((0, $963b9811c2275531$export$b96f6cbe9b035430)(history, \"pushState\", {\n ns: _evtNamespace,\n rsp: function() {\n if (_enableAutoRouteTracking) {\n $826a9f6c1286ca27$var$_dispatchEvent(win, (0, $b5e9c029fdfb79a5$export$58aa8b47bf337bc8)(namePrefix + \"pushState\"));\n $826a9f6c1286ca27$var$_dispatchEvent(win, (0, $b5e9c029fdfb79a5$export$58aa8b47bf337bc8)(namePrefix + \"locationchange\"));\n }\n }\n }, true));\n _addHook((0, $963b9811c2275531$export$b96f6cbe9b035430)(history, \"replaceState\", {\n ns: _evtNamespace,\n rsp: function() {\n if (_enableAutoRouteTracking) {\n $826a9f6c1286ca27$var$_dispatchEvent(win, (0, $b5e9c029fdfb79a5$export$58aa8b47bf337bc8)(namePrefix + \"replaceState\"));\n $826a9f6c1286ca27$var$_dispatchEvent(win, (0, $b5e9c029fdfb79a5$export$58aa8b47bf337bc8)(namePrefix + \"locationchange\"));\n }\n }\n }, true));\n (0, $12cc003c7fb5ccde$export$324ab159353a60a9)(win, namePrefix + \"popstate\", _popstateHandler, _evtNamespace);\n (0, $12cc003c7fb5ccde$export$324ab159353a60a9)(win, namePrefix + \"locationchange\", _locationChangeHandler, _evtNamespace);\n _historyListenerAdded = true;\n }\n function _addUnhandledPromiseRejectionTracking(_window, _location) {\n _self[0, $9acc3b97657eaaf0$export$3b3afe26ca0e015c /* @min:%2e_addHook */ ]((0, $acb30f9e62dc5705$export$454a433e4deb244f)(_extConfig, function() {\n _enableUnhandledPromiseRejectionTracking = _extConfig[0, $9acc3b97657eaaf0$export$72fe3f7aecc0d015 /* @min:%2eenableUnhandledPromiseRejectionTracking */ ] === true;\n _autoExceptionInstrumented = _autoExceptionInstrumented || _extConfig[0, $9acc3b97657eaaf0$export$527cc291f0159d2a /* @min:%2eautoUnhandledPromiseInstrumented */ ];\n if (_enableUnhandledPromiseRejectionTracking && !_autoUnhandledPromiseInstrumented) {\n // We want to enable exception auto collection and it has not been done so yet\n _addHook((0, $963b9811c2275531$export$b96f6cbe9b035430)(_window, \"onunhandledrejection\", {\n ns: _evtNamespace,\n rsp: function(callDetails, error) {\n if (_enableUnhandledPromiseRejectionTracking && callDetails.rslt !== true) _self[0, $9acc3b97657eaaf0$export$31fe7bcf0f7c83e8 /* @min:%2e_onerror */ ]((0, $1e8d24b24fb574aa$export$e2f174de097e0bcd)[0, $9acc3b97657eaaf0$export$3dedbd38aa3b0c11 /* @min:%2eCreateAutoException */ ]($826a9f6c1286ca27$var$_getReason(error), _location ? _location[0, $9acc3b97657eaaf0$export$8d0bd9d006f3ecea /* @min:%2ehref */ ] : \"\", 0, 0, error, callDetails.evt));\n }\n }, false));\n _extConfig[0, $9acc3b97657eaaf0$export$527cc291f0159d2a /* @min:%2eautoUnhandledPromiseInstrumented */ ] = _autoUnhandledPromiseInstrumented = true;\n }\n }));\n }\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity - {eLoggingSeverity} - The severity of the log message\r\n * @param msgId - {_eInternalLogMessage} - The log message.\r\n */ function _throwInternal(severity, msgId, msg, properties, isUserAct) {\n _self[0, $9acc3b97657eaaf0$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ]().throwInternal(severity, msgId, msg, properties, isUserAct);\n }\n function _initDefaults() {\n _eventTracking = null;\n _pageTracking = null;\n _pageViewManager = null;\n _pageViewPerformanceManager = null;\n _pageVisitTimeManager = null;\n _preInitTelemetryInitializers = null;\n _isBrowserLinkTrackingEnabled = false;\n _browserLinkInitializerAdded = false;\n _enableAutoRouteTracking = false;\n _historyListenerAdded = false;\n _disableExceptionTracking = false;\n _autoExceptionInstrumented = false;\n _enableUnhandledPromiseRejectionTracking = false;\n _autoUnhandledPromiseInstrumented = false;\n _autoTrackPageVisitTime = false;\n // Counts number of trackAjax invocations.\n // By default we only monitor X ajax call per view to avoid too much load.\n // Default value is set in config.\n // This counter keeps increasing even after the limit is reached.\n _trackAjaxAttempts = 0;\n // array with max length of 2 that store current url and previous url for SPA page route change trackPageview use.\n var location = (0, $0c599844349363c4$export$e7fd20fad3cf4b5f)(true);\n _prevUri = location && location[0, $9acc3b97657eaaf0$export$8d0bd9d006f3ecea /* @min:%2ehref */ ] || \"\";\n _currUri = null;\n _evtNamespace = null;\n _extConfig = null;\n // Define _self.config\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"config\", {\n g: function() {\n return _extConfig;\n }\n });\n }\n // For backward compatibility\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"_pageViewManager\", {\n g: function() {\n return _pageViewManager;\n }\n });\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"_pageViewPerformanceManager\", {\n g: function() {\n return _pageViewPerformanceManager;\n }\n });\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"_pageVisitTimeManager\", {\n g: function() {\n return _pageVisitTimeManager;\n }\n });\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"_evtNamespace\", {\n g: function() {\n return \".\" + _evtNamespace;\n }\n });\n });\n return _this;\n }\n // Removed Stub for AnalyticsPlugin.prototype.getCookieMgr.\n // Removed Stub for AnalyticsPlugin.prototype.processTelemetry.\n // Removed Stub for AnalyticsPlugin.prototype.trackEvent.\n // Removed Stub for AnalyticsPlugin.prototype.startTrackEvent.\n // Removed Stub for AnalyticsPlugin.prototype.stopTrackEvent.\n // Removed Stub for AnalyticsPlugin.prototype.trackTrace.\n // Removed Stub for AnalyticsPlugin.prototype.trackMetric.\n // Removed Stub for AnalyticsPlugin.prototype.trackPageView.\n // Removed Stub for AnalyticsPlugin.prototype.sendPageViewInternal.\n // Removed Stub for AnalyticsPlugin.prototype.sendPageViewPerformanceInternal.\n // Removed Stub for AnalyticsPlugin.prototype.trackPageViewPerformance.\n // Removed Stub for AnalyticsPlugin.prototype.startTrackPage.\n // Removed Stub for AnalyticsPlugin.prototype.stopTrackPage.\n // Removed Stub for AnalyticsPlugin.prototype.sendExceptionInternal.\n // Removed Stub for AnalyticsPlugin.prototype.trackException.\n // Removed Stub for AnalyticsPlugin.prototype._onerror.\n // Removed Stub for AnalyticsPlugin.prototype.addTelemetryInitializer.\n // Removed Stub for AnalyticsPlugin.prototype.initialize.\n AnalyticsPlugin.Version = \"3.0.2\"; // Not currently used anywhere\n return AnalyticsPlugin;\n}((0, $b61d51369f8191a4$export$64a11c2f90e6766c));\n\n\n/*\n * Application Insights JavaScript SDK - Channel, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nfunction $a99c2448b4d73401$export$856fe465480fa77a(value, cb) {\n return $a99c2448b4d73401$export$96acbd3e4fcaef01(value, function(value) {\n cb && cb({\n value: value,\n rejected: false\n });\n }, function(reason) {\n cb && cb({\n rejected: true,\n reason: reason\n });\n });\n}\nfunction $a99c2448b4d73401$export$96acbd3e4fcaef01(value, resolveFn, rejectFn, finallyFn) {\n var result = value;\n if ((0, $533f826bbc418791$export$ae936b9d47e5870e)(value)) {\n if (resolveFn || rejectFn) result = value.then(resolveFn, rejectFn);\n } else resolveFn && resolveFn(value);\n if (finallyFn) result = $a99c2448b4d73401$export$8a7042cf3f497261(result, finallyFn);\n return result;\n}\nfunction $a99c2448b4d73401$export$8a7042cf3f497261(value, finallyFn) {\n var result = value;\n if (finallyFn) {\n if ((0, $533f826bbc418791$export$ae936b9d47e5870e)(value)) {\n if (value.finally) result = value.finally(finallyFn);\n else // Simulate finally if not available\n result = value.then(function(value) {\n finallyFn();\n return value;\n }, function(reason) {\n finallyFn();\n throw reason;\n });\n } else finallyFn();\n }\n return result;\n}\n\n\n/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nvar $9f9d8893ee48294d$var$_debugState;\nvar $9f9d8893ee48294d$var$_debugResult;\nvar $9f9d8893ee48294d$var$_debugHandled;\nvar $9f9d8893ee48294d$export$5b878ab00d3f2b4 = false;\nvar $9f9d8893ee48294d$var$_theLogger = null;\nfunction $9f9d8893ee48294d$export$b51733f9a2116765(id, message) {\n//#ifdef DEBUG\n//#:(!DEBUG) if (_theLogger) {\n//#:(!DEBUG) _theLogger(id, message);\n//#:(!DEBUG) }\n//#endif\n}\nfunction $9f9d8893ee48294d$export$8727038be1f3be06(thePromise, stateFn, resultFn, handledFn) {\n // While the IPromise implementations provide a `state` property, keeping the `[[PromiseState]]`\n // as native promises also have a non-enumerable property of the same name\n $9f9d8893ee48294d$var$_debugState = $9f9d8893ee48294d$var$_debugState || {\n toString: function() {\n return \"[[PromiseState]]\";\n }\n };\n $9f9d8893ee48294d$var$_debugResult = $9f9d8893ee48294d$var$_debugResult || {\n toString: function() {\n return \"[[PromiseResult]]\";\n }\n };\n $9f9d8893ee48294d$var$_debugHandled = $9f9d8893ee48294d$var$_debugHandled || {\n toString: function() {\n return \"[[PromiseIsHandled]]\";\n }\n };\n (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(thePromise, $9f9d8893ee48294d$var$_debugState, {\n get: stateFn\n });\n (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(thePromise, $9f9d8893ee48294d$var$_debugResult, {\n get: resultFn\n });\n (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(thePromise, $9f9d8893ee48294d$var$_debugHandled, {\n get: handledFn\n });\n}\nfunction $9f9d8893ee48294d$export$8e8a3d6691d8254(enabled, logger) {\n $9f9d8893ee48294d$export$5b878ab00d3f2b4 = enabled;\n $9f9d8893ee48294d$var$_theLogger = logger;\n}\n\n\n/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /**\r\n * @ignore -- Don't include in the generated documentation\r\n * @internal\r\n */ var $896661fc40700b02$export$61c67cf036cd42e2 = [\n \"pending\",\n \"resolving\",\n \"resolved\",\n \"rejected\"\n];\n\n\n/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \nvar $62835fabb9e36d10$var$DISPATCH_EVENT = \"dispatchEvent\";\nvar $62835fabb9e36d10$var$_hasInitEvent;\nfunction $62835fabb9e36d10$export$e3bf03cc76d2c0a1(target, evtName, populateEvent, useNewEvent) {\n var doc = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n !$62835fabb9e36d10$var$_hasInitEvent && ($62835fabb9e36d10$var$_hasInitEvent = (0, $f07ca4f3c96b6502$export$c6675fd9042172d2)(function() {\n var evt;\n if (doc && doc.createEvent) evt = doc.createEvent(\"Event\");\n return !!evt && evt.initEvent;\n }, null));\n var theEvt = $62835fabb9e36d10$var$_hasInitEvent.v ? doc.createEvent(\"Event\") : useNewEvent ? new Event(evtName) : {};\n populateEvent && populateEvent(theEvt);\n if ($62835fabb9e36d10$var$_hasInitEvent.v) theEvt.initEvent(evtName, false, true);\n if (theEvt && target[$62835fabb9e36d10$var$DISPATCH_EVENT]) target[$62835fabb9e36d10$var$DISPATCH_EVENT](theEvt);\n else {\n var handler = target[\"on\" + evtName];\n if (handler) handler(theEvt);\n else {\n var theConsole = (0, $3d5fcb60a9467a45$export$3df6e51375017edd)(\"console\");\n theConsole && (theConsole[\"error\"] || theConsole[\"log\"])(evtName, (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(theEvt));\n }\n }\n}\n\n\n/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2023 Nevware21\r\n * Licensed under the MIT license.\r\n */ var $f66d8c7e331f9ecc$export$b50db53b804b62d = \"Promise\";\n\n\n\nvar $d9a1248df50a1c7f$var$NODE_UNHANDLED_REJECTION = \"unhandledRejection\";\nvar $d9a1248df50a1c7f$var$UNHANDLED_REJECTION = $d9a1248df50a1c7f$var$NODE_UNHANDLED_REJECTION.toLowerCase();\nvar $d9a1248df50a1c7f$var$_currentPromiseId = [];\nvar $d9a1248df50a1c7f$var$_uniquePromiseId = 0;\nvar $d9a1248df50a1c7f$var$_unhandledRejectionTimeout = 10;\nvar $d9a1248df50a1c7f$var$_hasPromiseRejectionEvent;\nfunction $d9a1248df50a1c7f$var$dumpFnObj(value) {\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(value)) return value.toString();\n return (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(value);\n}\nfunction $d9a1248df50a1c7f$export$21e4c442dc33ad2f(newPromise, processor, executor) {\n var additionalArgs = (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments, 3);\n var _state = 0 /* ePromiseState.Pending */ ;\n var _hasResolved = false;\n var _settledValue;\n var _queue = [];\n var _id = $d9a1248df50a1c7f$var$_uniquePromiseId++;\n var _parentId = $d9a1248df50a1c7f$var$_currentPromiseId.length > 0 ? $d9a1248df50a1c7f$var$_currentPromiseId[$d9a1248df50a1c7f$var$_currentPromiseId.length - 1] : undefined;\n var _handled = false;\n var _unHandledRejectionHandler = null;\n var _thePromise;\n !$d9a1248df50a1c7f$var$_hasPromiseRejectionEvent && ($d9a1248df50a1c7f$var$_hasPromiseRejectionEvent = (0, $3d5fcb60a9467a45$export$45fd08e1bc14fe1c)((0, $f66d8c7e331f9ecc$export$b50db53b804b62d) + \"RejectionEvent\"));\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n var _then = function(onResolved, onRejected) {\n try {\n $d9a1248df50a1c7f$var$_currentPromiseId.push(_id);\n _handled = true;\n _unHandledRejectionHandler && _unHandledRejectionHandler.cancel();\n _unHandledRejectionHandler = null;\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"then(\" + dumpFnObj(onResolved)+ \", \" + dumpFnObj(onResolved) + \")\");\n //#endif\n var thenPromise = newPromise(function(resolve, reject) {\n // Queue the new promise returned to be resolved or rejected\n // when this promise settles.\n _queue.push(function() {\n // https://tc39.es/ecma262/#sec-newpromisereactionjob\n //let value: any;\n try {\n // First call the onFulfilled or onRejected handler, on the settled value\n // of this promise. If the corresponding `handler` does not exist, simply\n // pass through the settled value.\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"Handling settled value \" + dumpFnObj(_settledValue));\n //#endif\n var handler = _state === 2 /* ePromiseState.Resolved */ ? onResolved : onRejected;\n var value = (0, $533f826bbc418791$export$fce6876652108ab)(handler) ? _settledValue : (0, $533f826bbc418791$export$f6e2535fb5126e54)(handler) ? handler(_settledValue) : handler;\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"Handling Result \" + dumpFnObj(value));\n //#endif\n if ((0, $533f826bbc418791$export$ae936b9d47e5870e)(value)) // The called handlers returned a new promise, so the chained promise\n // will follow the state of this promise.\n value.then(resolve, reject);\n else if (handler) // If we have a handler then chained promises are always \"resolved\" with the result returned\n resolve(value);\n else if (_state === 3 /* ePromiseState.Rejected */ ) // If this promise is rejected then the chained promise should be rejected\n // with either the settled value of this promise or the return value of the handler.\n reject(value);\n else // If this promise is fulfilled, then the chained promise is also fulfilled\n // with either the settled value of this promise or the return value of the handler.\n resolve(value);\n } catch (e) {\n reject(e);\n }\n });\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"Added to Queue \" + _queue.length);\n //#endif\n // If this promise is already settled, then immediately process the callback we\n // just added to the queue.\n if (_hasResolved) _processQueue();\n }, additionalArgs);\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"Created -> \" + thenPromise.toString());\n //#endif\n return thenPromise;\n } finally{\n $d9a1248df50a1c7f$var$_currentPromiseId.pop();\n }\n };\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\n var _catch = function(onRejected) {\n // Reuse then onRejected to support rejection\n return _then(undefined, onRejected);\n };\n // https://tc39.es/ecma262/#sec-promise.prototype.finally\n var _finally = function(onFinally) {\n var thenFinally = onFinally;\n var catchFinally = onFinally;\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(onFinally)) {\n thenFinally = function(value) {\n onFinally && onFinally();\n return value;\n };\n catchFinally = function(reason) {\n onFinally && onFinally();\n throw reason;\n };\n }\n return _then(thenFinally, catchFinally);\n };\n var _strState = function() {\n return (0, $896661fc40700b02$export$61c67cf036cd42e2)[_state];\n };\n var _processQueue = function() {\n if (_queue.length > 0) {\n // The onFulfilled and onRejected handlers must be called asynchronously. Thus,\n // we make a copy of the queue and work on it once the current call stack unwinds.\n var pending = _queue.slice();\n _queue = [];\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"Processing queue \" + pending.length);\n //#endif\n _handled = true;\n processor(pending);\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"Processing done\");\n //#endif\n _unHandledRejectionHandler && _unHandledRejectionHandler.cancel();\n _unHandledRejectionHandler = null;\n }\n };\n var _createSettleIfFn = function(newState, allowState) {\n return function(theValue) {\n if (_state === allowState) {\n if (newState === 2 /* ePromiseState.Resolved */ && (0, $533f826bbc418791$export$ae936b9d47e5870e)(theValue)) {\n _state = 1 /* ePromiseState.Resolving */ ;\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"Resolving\");\n //#endif\n theValue.then(_createSettleIfFn(2 /* ePromiseState.Resolved */ , 1 /* ePromiseState.Resolving */ ), _createSettleIfFn(3 /* ePromiseState.Rejected */ , 1 /* ePromiseState.Resolving */ ));\n return;\n }\n _state = newState;\n _hasResolved = true;\n _settledValue = theValue;\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), _strState());\n //#endif\n _processQueue();\n if (!_handled && newState === 3 /* ePromiseState.Rejected */ && !_unHandledRejectionHandler) _unHandledRejectionHandler = (0, $d03b12effd00bf96$export$5f4d6617421d489b)(_notifyUnhandledRejection, $d9a1248df50a1c7f$var$_unhandledRejectionTimeout);\n }\n };\n };\n var _notifyUnhandledRejection = function() {\n if (!_handled) {\n if ((0, $3d5fcb60a9467a45$export$8ee0fc9ee280b4ee)()) //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"Emitting \" + NODE_UNHANDLED_REJECTION);\n //#endif\n $b364f2cd2faf3e98$exports.emit($d9a1248df50a1c7f$var$NODE_UNHANDLED_REJECTION, _settledValue, _thePromise);\n else {\n var gbl = (0, $3d5fcb60a9467a45$export$38b2d434cce3ea22)() || (0, $3d5fcb60a9467a45$export$a4e55266d2135a7f)();\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"Emitting \" + UNHANDLED_REJECTION);\n //#endif\n (0, $62835fabb9e36d10$export$e3bf03cc76d2c0a1)(gbl, $d9a1248df50a1c7f$var$UNHANDLED_REJECTION, function(theEvt) {\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(theEvt, \"promise\", {\n g: function() {\n return _thePromise;\n }\n });\n theEvt.reason = _settledValue;\n return theEvt;\n }, !!$d9a1248df50a1c7f$var$_hasPromiseRejectionEvent.v);\n }\n }\n };\n _thePromise = {\n then: _then,\n \"catch\": _catch,\n finally: _finally\n };\n (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(_thePromise, \"state\", {\n get: _strState\n });\n if (0, $9f9d8893ee48294d$export$5b878ab00d3f2b4) // eslint-disable-next-line brace-style\n (0, $9f9d8893ee48294d$export$8727038be1f3be06)(_thePromise, _strState, function() {\n return (0, $533f826bbc418791$export$3cbb80dec8953997)(_settledValue);\n }, function() {\n return _handled;\n });\n if ((0, $3ab078397ef07bc3$export$1e6e45ea4c3f892c)()) _thePromise[(0, $3ab078397ef07bc3$export$3a9aefdadea26115)(11 /* WellKnownSymbols.toStringTag */ )] = \"IPromise\";\n var _toString = function() {\n return \"IPromise\" + ((0, $9f9d8893ee48294d$export$5b878ab00d3f2b4) ? \"[\" + _id + (!(0, $533f826bbc418791$export$fce6876652108ab)(_parentId) ? \":\" + _parentId : \"\") + \"]\" : \"\") + \" \" + _strState() + (_hasResolved ? \" - \" + $d9a1248df50a1c7f$var$dumpFnObj(_settledValue) : \"\");\n };\n _thePromise.toString = _toString;\n (function _initialize() {\n if (!(0, $533f826bbc418791$export$f6e2535fb5126e54)(executor)) (0, $44a1c24c0e411039$export$3f7738bd7dcba681)((0, $f66d8c7e331f9ecc$export$b50db53b804b62d) + \": executor is not a function - \" + $d9a1248df50a1c7f$var$dumpFnObj(executor));\n var _rejectFn = _createSettleIfFn(3 /* ePromiseState.Rejected */ , 0 /* ePromiseState.Pending */ );\n try {\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"Executing\");\n //#endif\n executor.call(_thePromise, _createSettleIfFn(2 /* ePromiseState.Resolved */ , 0 /* ePromiseState.Pending */ ), _rejectFn);\n } catch (e) {\n _rejectFn(e);\n }\n })();\n //#ifdef DEBUG\n //#:(!DEBUG) _debugLog(_toString(), \"Returning\");\n //#endif\n return _thePromise;\n}\nfunction $d9a1248df50a1c7f$export$2e2d787d49b332bf(newPromise) {\n return function(input) {\n var additionalArgs = (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments, 1);\n return newPromise(function(resolve, reject) {\n try {\n var values_1 = [];\n var pending_1 = 1; // Prefix to 1 so we finish iterating over all of the input promises first\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(input, function(item, idx) {\n if (item) {\n pending_1++;\n (0, $a99c2448b4d73401$export$96acbd3e4fcaef01)(item, function(value) {\n // Set the result values\n values_1[idx] = value;\n if (--pending_1 === 0) resolve(values_1);\n }, reject);\n }\n });\n // Now decrement the pending so that we finish correctly\n pending_1--;\n if (pending_1 === 0) // All promises were either resolved or where not a promise\n resolve(values_1);\n } catch (e) {\n reject(e);\n }\n }, additionalArgs);\n };\n}\nfunction $d9a1248df50a1c7f$export$4ea99934313e7d98(newPromise) {\n return function(value) {\n var additionalArgs = (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments, 1);\n if ((0, $533f826bbc418791$export$ae936b9d47e5870e)(value)) return value;\n return newPromise(function(resolve) {\n resolve(value);\n }, additionalArgs);\n };\n}\nfunction $d9a1248df50a1c7f$export$71a67f20b06fc70e(newPromise) {\n return function(reason) {\n var additionalArgs = (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments, 1);\n return newPromise(function(_resolve, reject) {\n reject(reason);\n }, additionalArgs);\n };\n}\n\n\n/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ /*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\n\n\nvar $657fe58c1330d658$var$_hasIdleCallback;\nvar $657fe58c1330d658$var$_defaultIdleTimeout = 100;\nvar $657fe58c1330d658$var$_maxExecutionTime = 50;\nfunction $657fe58c1330d658$export$b9301f2c5b7c2533() {\n !$657fe58c1330d658$var$_hasIdleCallback && ($657fe58c1330d658$var$_hasIdleCallback = (0, $f07ca4f3c96b6502$export$c6675fd9042172d2)(function() {\n return (0, $533f826bbc418791$export$4e62c701997796c1)(requestIdleCallback);\n }, false));\n return !!($657fe58c1330d658$var$_hasIdleCallback.v ? requestIdleCallback : false);\n}\nfunction $657fe58c1330d658$export$b588248e012cdf5c(timeout) {\n $657fe58c1330d658$var$_defaultIdleTimeout = timeout;\n}\nfunction $657fe58c1330d658$export$b062c6607588fb47(maxTime) {\n $657fe58c1330d658$var$_maxExecutionTime = maxTime;\n}\nfunction $657fe58c1330d658$export$553e359f3bef3995(callback, options) {\n function _createDeadline(timedOut) {\n var startTime = (0, $824d7bc9d9e48f68$export$ba2b1ec760f018ed)();\n return {\n didTimeout: timedOut,\n timeRemaining: function() {\n return $657fe58c1330d658$var$_maxExecutionTime - (0, $824d7bc9d9e48f68$export$1ea91570c695dfb2)(startTime);\n }\n };\n }\n if ($657fe58c1330d658$export$b9301f2c5b7c2533()) {\n var handler_1 = (0, $de882ae8157e9b9b$export$bf688d278153f393)(true, function(idleId) {\n idleId && cancelIdleCallback(idleId);\n return requestIdleCallback(function(deadline) {\n handler_1.dn();\n callback(deadline || _createDeadline(false));\n }, options);\n }, function(idleId) {\n cancelIdleCallback(idleId);\n });\n return handler_1.h;\n }\n var timeout = (options || {}).timeout;\n if ((0, $533f826bbc418791$export$fce6876652108ab)(timeout)) timeout = $657fe58c1330d658$var$_defaultIdleTimeout;\n return (0, $d03b12effd00bf96$export$5f4d6617421d489b)(function() {\n callback(_createDeadline(true));\n }, timeout);\n}\n\n\nvar $f5e6aa96df7c2079$var$_processPendingItems = function(pending) {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(pending, function(fn) {\n try {\n fn();\n } catch (e) {\n // Don't let 1 failing handler break all others\n // TODO: Add some form of error reporting (i.e. Call any registered JS error handler so the error is reported)\n }\n });\n};\nfunction $f5e6aa96df7c2079$export$b1d1b246da82fff7() {\n return $f5e6aa96df7c2079$var$_processPendingItems;\n}\nfunction $f5e6aa96df7c2079$export$96972de3caafb39c(timeout) {\n var callbackTimeout = (0, $533f826bbc418791$export$7e4aa119212bc614)(timeout) ? timeout : 0;\n return function(pending) {\n (0, $d03b12effd00bf96$export$5f4d6617421d489b)(function() {\n $f5e6aa96df7c2079$var$_processPendingItems(pending);\n }, callbackTimeout);\n };\n}\nfunction $f5e6aa96df7c2079$export$c55fbffc6a3672ed(timeout) {\n var options;\n if (timeout >= 0) options = {\n timeout: +timeout\n };\n return function(pending) {\n (0, $657fe58c1330d658$export$553e359f3bef3995)(function(deadline) {\n $f5e6aa96df7c2079$var$_processPendingItems(pending);\n }, options);\n };\n}\n\n\nfunction $635d6d63c46ba6e7$export$74d26603c0c38da8(executor, timeout) {\n return (0, $d9a1248df50a1c7f$export$21e4c442dc33ad2f)($635d6d63c46ba6e7$export$74d26603c0c38da8, (0, $f5e6aa96df7c2079$export$96972de3caafb39c)(timeout), executor, timeout);\n}\nvar $635d6d63c46ba6e7$export$1735e21d720f8bc0 = (0, $d9a1248df50a1c7f$export$2e2d787d49b332bf)($635d6d63c46ba6e7$export$74d26603c0c38da8);\nvar $635d6d63c46ba6e7$export$f2163a387efd1843 = (0, $d9a1248df50a1c7f$export$4ea99934313e7d98)($635d6d63c46ba6e7$export$74d26603c0c38da8);\nvar $635d6d63c46ba6e7$export$adb3940d4617f918 = (0, $d9a1248df50a1c7f$export$71a67f20b06fc70e)($635d6d63c46ba6e7$export$74d26603c0c38da8);\n\n\n\n\n\n\nvar $4ec0308f22f7433a$var$_isPromiseSupported;\nfunction $4ec0308f22f7433a$export$7edeaca5327f34ec(executor, timeout) {\n !$4ec0308f22f7433a$var$_isPromiseSupported && ($4ec0308f22f7433a$var$_isPromiseSupported = (0, $3d5fcb60a9467a45$export$45fd08e1bc14fe1c)((0, $f66d8c7e331f9ecc$export$b50db53b804b62d)));\n var PrmCls = $4ec0308f22f7433a$var$_isPromiseSupported.v;\n if (!PrmCls) return (0, $635d6d63c46ba6e7$export$74d26603c0c38da8)(executor);\n if (!(0, $533f826bbc418791$export$f6e2535fb5126e54)(executor)) (0, $44a1c24c0e411039$export$3f7738bd7dcba681)((0, $f66d8c7e331f9ecc$export$b50db53b804b62d) + \": executor is not a function - \" + (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(executor));\n var _state = 0 /* ePromiseState.Pending */ ;\n function _strState() {\n return (0, $896661fc40700b02$export$61c67cf036cd42e2)[_state];\n }\n var thePromise = new PrmCls(function(resolve, reject) {\n function _resolve(value) {\n _state = 2 /* ePromiseState.Resolved */ ;\n resolve(value);\n }\n function _reject(reason) {\n _state = 3 /* ePromiseState.Rejected */ ;\n reject(reason);\n }\n executor(_resolve, _reject);\n });\n (0, $d212d948d25f959a$export$8b8fd4dfd45f6b81)(thePromise, \"state\", {\n get: _strState\n });\n return thePromise;\n}\nvar $4ec0308f22f7433a$export$9eb857118f5fb9d3 = (0, $d9a1248df50a1c7f$export$2e2d787d49b332bf)($4ec0308f22f7433a$export$7edeaca5327f34ec);\nvar $4ec0308f22f7433a$export$c6f7d656137b22c7 = (0, $d9a1248df50a1c7f$export$4ea99934313e7d98)($4ec0308f22f7433a$export$7edeaca5327f34ec);\nvar $4ec0308f22f7433a$export$ff6e17a8cb47ba93 = (0, $d9a1248df50a1c7f$export$71a67f20b06fc70e)($4ec0308f22f7433a$export$7edeaca5327f34ec);\n\n\nvar $911d39c591a62618$var$_promiseCreator;\nfunction $911d39c591a62618$export$c6c514c2f7329b79(creator) {\n $911d39c591a62618$var$_promiseCreator = creator ? (0, $d8ec17546a34ef88$export$db98eae15987454c)(function() {\n return creator;\n }) : null;\n}\nfunction $911d39c591a62618$export$5a1eb20c68656e88(executor, timeout) {\n !$911d39c591a62618$var$_promiseCreator && ($911d39c591a62618$var$_promiseCreator = (0, $d8ec17546a34ef88$export$db98eae15987454c)(function() {\n return 0, $4ec0308f22f7433a$export$7edeaca5327f34ec;\n }));\n return $911d39c591a62618$var$_promiseCreator.v.call(this, executor, timeout);\n}\nvar $911d39c591a62618$export$1ed2fd8fe9f5c6 = (0, $d9a1248df50a1c7f$export$2e2d787d49b332bf)($911d39c591a62618$export$5a1eb20c68656e88);\nvar $911d39c591a62618$export$c6056e052f93dbce = (0, $d9a1248df50a1c7f$export$4ea99934313e7d98)($911d39c591a62618$export$5a1eb20c68656e88);\nvar $911d39c591a62618$export$d22877ef6074ba31 = (0, $d9a1248df50a1c7f$export$71a67f20b06fc70e)($911d39c591a62618$export$5a1eb20c68656e88);\n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\nvar $d70982046c7dc734$export$f0d11c074a923179 = (0, $d491d25af4ac425c$export$b9deaf03e58c2bf5)((0, $b347daff6f5f8dc1$export$5f32d5745d700b0e));\n\n\n\nfunction $2cb93c1cbddb67ab$export$86347c3dd68c03f6(target, isAsync) {\n if (target && target[0, $1ae5573ce493bccc$export$7eb85b5cba77a43d /* @min:%2eunload */ ]) return target[0, $1ae5573ce493bccc$export$7eb85b5cba77a43d /* @min:%2eunload */ ](isAsync);\n}\nfunction $2cb93c1cbddb67ab$export$bc81824d13c51ef3(targets, isAsync, done) {\n var result;\n if (!done) result = (0, $911d39c591a62618$export$5a1eb20c68656e88)(function(resolved) {\n done = resolved;\n });\n if (targets && (0, $d70982046c7dc734$export$f0d11c074a923179)(targets) > 0) (0, $a99c2448b4d73401$export$856fe465480fa77a)($2cb93c1cbddb67ab$export$86347c3dd68c03f6(targets[0], isAsync), function() {\n $2cb93c1cbddb67ab$export$bc81824d13c51ef3((0, $46728a52dfc641a6$export$1bea104a0e2567f0)(targets, 1), isAsync, done);\n });\n else done();\n return result;\n}\n\n\n\n\n/*\n * Application Insights JavaScript SDK - Channel, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n/*\n * Application Insights JavaScript SDK - Channel, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // ###################################################################################################################################################\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\n// ###################################################################################################################################################\n// Generally you should only put values that are used more than 2 times and then only if not already exposed as a constant (such as SdkCoreNames)\n// as when using \"short\" named values from here they will be will be minified smaller than the SdkCoreNames[eSdkCoreNames.xxxx] value.\nvar $c0ca326fc9479ec0$export$be41298b7716c698 = \"duration\";\n\n\n/*\n * Application Insights JavaScript SDK - Channel, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nvar $e5f8715adea0dc31$export$d0f526aa8043f6d7 = \"tags\"; // Count: 17\nvar $e5f8715adea0dc31$export$f393dda3e1c87f59 = \"deviceType\"; // Count: 3\nvar $e5f8715adea0dc31$export$2f5ff0b46814907e = \"data\"; // Count: 13\nvar $e5f8715adea0dc31$export$9734b0a24bf02e93 = \"name\"; // Count: 8\nvar $e5f8715adea0dc31$export$a5eb52c53bba8560 = \"traceID\"; // Count: 5\nvar $e5f8715adea0dc31$export$6eae51590aaea43 = \"length\"; // Count: 36\nvar $e5f8715adea0dc31$export$a318a8141fc98747 = \"stringify\"; // Count: 5\nvar $e5f8715adea0dc31$export$32fc64677eb5b7a2 = \"measurements\"; // Count: 7\nvar $e5f8715adea0dc31$export$9e16762ab4f2648 = \"dataType\"; // Count: 10\nvar $e5f8715adea0dc31$export$2672d4f7ccc80348 = \"envelopeType\"; // Count: 7\nvar $e5f8715adea0dc31$export$e2818d11505fa034 = \"toString\"; // Count: 7\nvar $e5f8715adea0dc31$export$a9130fdcd11ec7ef = \"onLine\"; // Count: 4\nvar $e5f8715adea0dc31$export$704cf8098f85ad0f = \"isOnline\"; // Count: 3\nvar $e5f8715adea0dc31$export$7768b9624b4c70a6 = \"_get\"; // Count: 5\nvar $e5f8715adea0dc31$export$4aae77f3ba3c48b4 = \"enqueue\"; // Count: 7\nvar $e5f8715adea0dc31$export$e9679ef501b0d1 = \"count\"; // Count: 6\nvar $e5f8715adea0dc31$export$c8dd872dc774fa7c = \"eventsLimitInMem\"; // Count: 2\nvar $e5f8715adea0dc31$export$a0a330e7fa1e278c = \"push\"; // Count: 6\nvar $e5f8715adea0dc31$export$b18aabdfc0aaf6b = \"emitLineDelimitedJson\"; // Count: 3\nvar $e5f8715adea0dc31$export$5eeb73fac03da74a = \"clear\"; // Count: 7\nvar $e5f8715adea0dc31$export$a5da323a4da829fc = \"batchPayloads\"; // Count: 5\nvar $e5f8715adea0dc31$export$1e6514b499ba4d34 = \"createNew\"; // Count: 3\nvar $e5f8715adea0dc31$export$52e50651d87300e3 = \"markAsSent\"; // Count: 7\nvar $e5f8715adea0dc31$export$13da1b5a005ef035 = \"clearSent\"; // Count: 5\nvar $e5f8715adea0dc31$export$4637bcb72c509e60 = \"bufferOverride\"; // Count: 3\nvar $e5f8715adea0dc31$export$63ab2dad6d8a60ed = \"BUFFER_KEY\"; // Count: 5\nvar $e5f8715adea0dc31$export$d03f333763905c89 = \"SENT_BUFFER_KEY\"; // Count: 8\nvar $e5f8715adea0dc31$export$20d3a25105cda3b1 = \"MAX_BUFFER_SIZE\"; // Count: 5\nvar $e5f8715adea0dc31$export$df21ab0de9057cc4 = \"triggerSend\"; // Count: 5\nvar $e5f8715adea0dc31$export$c7ff2c36e5c78421 = \"diagLog\"; // Count: 16\nvar $e5f8715adea0dc31$export$e5390b88ba6f1b04 = \"_sender\"; // Count: 5\nvar $e5f8715adea0dc31$export$dbe59923e879fdc5 = \"customHeaders\"; // Count: 3\nvar $e5f8715adea0dc31$export$803d432e48ba5ceb = \"maxBatchSizeInBytes\"; // Count: 2\nvar $e5f8715adea0dc31$export$6b8e1dc9b77f253c = \"onunloadDisableBeacon\"; // Count: 2\nvar $e5f8715adea0dc31$export$f5629284a6f7ec3d = \"isBeaconApiDisabled\"; // Count: 3\nvar $e5f8715adea0dc31$export$782dd40ba58c3597 = \"enableSessionStorageBuffer\"; // Count: 2\nvar $e5f8715adea0dc31$export$3f8a6394c5f7e7be = \"_buffer\"; // Count: 11\nvar $e5f8715adea0dc31$export$81cfd43387c8dbcc = \"instrumentationKey\"; // Count: 2\nvar $e5f8715adea0dc31$export$85f018eb7798fb52 = \"disableXhr\"; // Count: 5\nvar $e5f8715adea0dc31$export$d1f891e9714d3108 = \"onunloadDisableFetch\"; // Count: 2\nvar $e5f8715adea0dc31$export$12df46deb7379c67 = \"convertUndefined\"; // Count: 2\nvar $e5f8715adea0dc31$export$983774f06380e463 = \"maxBatchInterval\"; // Count: 2\nvar $e5f8715adea0dc31$export$aa558e99f83347cf = \"baseType\"; // Count: 4\nvar $e5f8715adea0dc31$export$c2afe23fa18f9dff = \"sampleRate\"; // Count: 4\nvar $e5f8715adea0dc31$export$9b55da9813cf231b = \"_xhrReadyStateChange\"; // Count: 2\nvar $e5f8715adea0dc31$export$fd0c91d4da43d71b = \"_onError\"; // Count: 11\nvar $e5f8715adea0dc31$export$689c49d56ac33585 = \"_onPartialSuccess\"; // Count: 3\nvar $e5f8715adea0dc31$export$82a109ffee49e423 = \"_onSuccess\"; // Count: 6\nvar $e5f8715adea0dc31$export$fb8523c8667e286a = \"itemsAccepted\"; // Count: 5\nvar $e5f8715adea0dc31$export$746df81af2cb9d94 = \"itemsReceived\"; // Count: 6\nvar $e5f8715adea0dc31$export$84ecd29f369f5b1d = \"setRequestHeader\"; // Count: 3\nvar $e5f8715adea0dc31$export$298b8388870fcfe9 = \"eventsSendRequest\"; // Count: 2\nvar $e5f8715adea0dc31$export$2c3af30a5c45aa6e = \"getSamplingScore\"; // Count: 2\nvar $e5f8715adea0dc31$export$d676f8c50f371355 = \"getHashCodeScore\"; // Count: 4\n\n\n// these two constants are used to filter out properties not needed when trying to extract custom properties and measurements from the incoming payload\nvar $0b044846db0c77e8$var$strBaseType = \"baseType\";\nvar $0b044846db0c77e8$var$strBaseData = \"baseData\";\nvar $0b044846db0c77e8$var$strProperties = \"properties\";\nvar $0b044846db0c77e8$var$strTrue = \"true\";\nfunction $0b044846db0c77e8$var$_setValueIf(target, field, value) {\n return (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(target, field, value, (0, $533f826bbc418791$export$8f9cae6546f97a9f));\n}\n/*\r\n * Maps Part A data from CS 4.0\r\n */ function $0b044846db0c77e8$var$_extractPartAExtensions(logger, item, env) {\n // todo: switch to keys from common in this method\n var envTags = env[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ] = env[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ] || {};\n var itmExt = item.ext = item.ext || {};\n var itmTags = item[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ] = item[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ] || [];\n var extUser = itmExt.user;\n if (extUser) {\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).userAuthUserId, extUser.authId);\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).userId, extUser.id || extUser.localId);\n }\n var extApp = itmExt.app;\n if (extApp) $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).sessionId, extApp.sesId);\n var extDevice = itmExt.device;\n if (extDevice) {\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).deviceId, extDevice.id || extDevice.localId);\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6)[0, $e5f8715adea0dc31$export$f393dda3e1c87f59 /* @min:%2edeviceType */ ], extDevice.deviceClass);\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).deviceIp, extDevice.ip);\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).deviceModel, extDevice.model);\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6)[0, $e5f8715adea0dc31$export$f393dda3e1c87f59 /* @min:%2edeviceType */ ], extDevice[0, $e5f8715adea0dc31$export$f393dda3e1c87f59 /* @min:%2edeviceType */ ]);\n }\n var web = item.ext.web;\n if (web) {\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).deviceLanguage, web.browserLang);\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).deviceBrowserVersion, web.browserVer);\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).deviceBrowser, web.browser);\n var envData = env[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ] = env[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ] || {};\n var envBaseData = envData[$0b044846db0c77e8$var$strBaseData] = envData[$0b044846db0c77e8$var$strBaseData] || {};\n var envProps = envBaseData[$0b044846db0c77e8$var$strProperties] = envBaseData[$0b044846db0c77e8$var$strProperties] || {};\n $0b044846db0c77e8$var$_setValueIf(envProps, \"domain\", web.domain);\n $0b044846db0c77e8$var$_setValueIf(envProps, \"isManual\", web.isManual ? $0b044846db0c77e8$var$strTrue : null);\n $0b044846db0c77e8$var$_setValueIf(envProps, \"screenRes\", web.screenRes);\n $0b044846db0c77e8$var$_setValueIf(envProps, \"userConsent\", web.userConsent ? $0b044846db0c77e8$var$strTrue : null);\n }\n var extOs = itmExt.os;\n if (extOs) $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).deviceOS, extOs[0, $e5f8715adea0dc31$export$9734b0a24bf02e93 /* @min:%2ename */ ]);\n // No support for mapping Trace.traceState to 2.0 as it is currently empty\n var extTrace = itmExt.trace;\n if (extTrace) {\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).operationParentId, extTrace.parentID);\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).operationName, (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, extTrace[0, $e5f8715adea0dc31$export$9734b0a24bf02e93 /* @min:%2ename */ ]));\n $0b044846db0c77e8$var$_setValueIf(envTags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).operationId, extTrace[0, $e5f8715adea0dc31$export$a5eb52c53bba8560 /* @min:%2etraceID */ ]);\n }\n // Sample 4.0 schema\n // {\n // \"time\" : \"2018-09-05T22:51:22.4936Z\",\n // \"name\" : \"MetricWithNamespace\",\n // \"iKey\" : \"ABC-5a4cbd20-e601-4ef5-a3c6-5d6577e4398e\",\n // \"ext\": { \"cloud\": {\n // \"role\": \"WATSON3\",\n // \"roleInstance\": \"CO4AEAP00000260\"\n // },\n // \"device\": {}, \"correlation\": {} },\n // \"tags\": [\n // { \"amazon.region\" : \"east2\" },\n // { \"os.expid\" : \"wp:02df239\" }\n // ]\n // }\n var tgs = {};\n // deals with tags.push({object})\n for(var i = itmTags[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] - 1; i >= 0; i--){\n var tg = itmTags[i];\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(tg, function(key, value) {\n tgs[key] = value;\n });\n itmTags.splice(i, 1);\n }\n // deals with tags[key]=value (and handles hasOwnProperty)\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(itmTags, function(tg, value) {\n tgs[tg] = value;\n });\n var theTags = (0, $2a74b38b87b38cda$export$b3cf7a802e578501)((0, $2a74b38b87b38cda$export$b3cf7a802e578501)({}, envTags), tgs);\n if (!theTags[(0, $1185376df44832bd$export$ebc7727f2a4272f6).internalSdkVersion]) // Append a version in case it is not already set\n theTags[(0, $1185376df44832bd$export$ebc7727f2a4272f6).internalSdkVersion] = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, \"javascript:\".concat($0b044846db0c77e8$export$3f11c9a3e644970c.Version), 64);\n env[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ] = (0, $0b747974b0bb3563$export$3e03fa3fc3e422d7)(theTags);\n}\nfunction $0b044846db0c77e8$var$_extractPropsAndMeasurements(data, properties, measurements) {\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(data)) (0, $45e528077703ac0c$export$aa0705d5774c95d1)(data, function(key, value) {\n if ((0, $533f826bbc418791$export$7e4aa119212bc614)(value)) measurements[key] = value;\n else if ((0, $533f826bbc418791$export$844ec244b1367d54)(value)) properties[key] = value;\n else if ((0, $0c599844349363c4$export$a2856ab6913b9fff)()) properties[key] = (0, $0c599844349363c4$export$d047a7c56db64af4)()[0, $e5f8715adea0dc31$export$a318a8141fc98747 /* @min:%2estringify */ ](value);\n });\n}\nfunction $0b044846db0c77e8$var$_convertPropsUndefinedToCustomDefinedValue(properties, customUndefinedValue) {\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(properties)) (0, $45e528077703ac0c$export$aa0705d5774c95d1)(properties, function(key, value) {\n properties[key] = value || customUndefinedValue;\n });\n}\n// TODO: Do we want this to take logger as arg or use this._logger as nonstatic?\nfunction $0b044846db0c77e8$var$_createEnvelope(logger, envelopeType, telemetryItem, data) {\n var envelope = new (0, $a383874e4b463649$export$4e2d65a9843399df)(logger, data, envelopeType);\n $0b044846db0c77e8$var$_setValueIf(envelope, \"sampleRate\", telemetryItem[0, $71dfba5ea0640485$export$dc288b6444e20c04]);\n if ((telemetryItem[$0b044846db0c77e8$var$strBaseData] || {}).startTime) envelope.time = (0, $0b747974b0bb3563$export$dfaaa8705752128f)(telemetryItem[$0b044846db0c77e8$var$strBaseData].startTime);\n envelope.iKey = telemetryItem.iKey;\n var iKeyNoDashes = telemetryItem.iKey.replace(/-/g, \"\");\n envelope[0, $e5f8715adea0dc31$export$9734b0a24bf02e93 /* @min:%2ename */ ] = envelope[0, $e5f8715adea0dc31$export$9734b0a24bf02e93 /* @min:%2ename */ ].replace(\"{0}\", iKeyNoDashes);\n // extract all extensions from ctx\n $0b044846db0c77e8$var$_extractPartAExtensions(logger, telemetryItem, envelope);\n // loop through the envelope tags (extension of Part A) and pick out the ones that should go in outgoing envelope tags\n telemetryItem[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ] = telemetryItem[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ] || [];\n return (0, $0b747974b0bb3563$export$3e03fa3fc3e422d7)(envelope);\n}\nfunction $0b044846db0c77e8$var$EnvelopeCreatorInit(logger, telemetryItem) {\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(telemetryItem[$0b044846db0c77e8$var$strBaseData])) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 1 /* eLoggingSeverity.CRITICAL */ , 46 /* _eInternalMessageId.TelemetryEnvelopeInvalid */ , \"telemetryItem.baseData cannot be null.\");\n}\nvar $0b044846db0c77e8$export$3f11c9a3e644970c = {\n Version: \"3.0.2\"\n};\nfunction $0b044846db0c77e8$export$74e603a08a7deabe(logger, telemetryItem, customUndefinedValue) {\n $0b044846db0c77e8$var$EnvelopeCreatorInit(logger, telemetryItem);\n var customMeasurements = telemetryItem[$0b044846db0c77e8$var$strBaseData][0, $e5f8715adea0dc31$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] || {};\n var customProperties = telemetryItem[$0b044846db0c77e8$var$strBaseData][$0b044846db0c77e8$var$strProperties] || {};\n $0b044846db0c77e8$var$_extractPropsAndMeasurements(telemetryItem[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ], customProperties, customMeasurements);\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(customUndefinedValue)) $0b044846db0c77e8$var$_convertPropsUndefinedToCustomDefinedValue(customProperties, customUndefinedValue);\n var bd = telemetryItem[$0b044846db0c77e8$var$strBaseData];\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(bd)) {\n (0, $cc2aaaebf96ac6a7$export$25fb4cb97863f0a8)(logger, \"Invalid input for dependency data\");\n return null;\n }\n var method = bd[$0b044846db0c77e8$var$strProperties] && bd[$0b044846db0c77e8$var$strProperties][0, $71dfba5ea0640485$export$8343e6f32f5246de] ? bd[$0b044846db0c77e8$var$strProperties][0, $71dfba5ea0640485$export$8343e6f32f5246de] : \"GET\";\n var remoteDepData = new (0, $0dd1de134f090c69$export$a7b48490930dbffa)(logger, bd.id, bd.target, bd[0, $e5f8715adea0dc31$export$9734b0a24bf02e93 /* @min:%2ename */ ], bd[0, $c0ca326fc9479ec0$export$be41298b7716c698 /* @min:%2eduration */ ], bd.success, bd.responseCode, method, bd.type, bd.correlationContext, customProperties, customMeasurements);\n var data = new (0, $74e0f4254782bad9$export$2d0294657ab35f1b)((0, $0dd1de134f090c69$export$a7b48490930dbffa)[0, $e5f8715adea0dc31$export$9e16762ab4f2648 /* @min:%2edataType */ ], remoteDepData);\n return $0b044846db0c77e8$var$_createEnvelope(logger, (0, $0dd1de134f090c69$export$a7b48490930dbffa)[0, $e5f8715adea0dc31$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], telemetryItem, data);\n}\nfunction $0b044846db0c77e8$export$b74153364c2066d1(logger, telemetryItem, customUndefinedValue) {\n $0b044846db0c77e8$var$EnvelopeCreatorInit(logger, telemetryItem);\n var customProperties = {};\n var customMeasurements = {};\n if (telemetryItem[$0b044846db0c77e8$var$strBaseType] !== (0, $9bdc8b7e7935e83a$export$d61e24a684f9e51)[0, $e5f8715adea0dc31$export$9e16762ab4f2648 /* @min:%2edataType */ ]) customProperties[\"baseTypeSource\"] = telemetryItem[$0b044846db0c77e8$var$strBaseType]; // save the passed in base type as a property\n if (telemetryItem[$0b044846db0c77e8$var$strBaseType] === (0, $9bdc8b7e7935e83a$export$d61e24a684f9e51)[0, $e5f8715adea0dc31$export$9e16762ab4f2648 /* @min:%2edataType */ ]) {\n customProperties = telemetryItem[$0b044846db0c77e8$var$strBaseData][$0b044846db0c77e8$var$strProperties] || {};\n customMeasurements = telemetryItem[$0b044846db0c77e8$var$strBaseData][0, $e5f8715adea0dc31$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] || {};\n } else if (telemetryItem[$0b044846db0c77e8$var$strBaseData]) $0b044846db0c77e8$var$_extractPropsAndMeasurements(telemetryItem[$0b044846db0c77e8$var$strBaseData], customProperties, customMeasurements);\n // Extract root level properties from part C telemetryItem.data\n $0b044846db0c77e8$var$_extractPropsAndMeasurements(telemetryItem[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ], customProperties, customMeasurements);\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(customUndefinedValue)) $0b044846db0c77e8$var$_convertPropsUndefinedToCustomDefinedValue(customProperties, customUndefinedValue);\n var eventName = telemetryItem[$0b044846db0c77e8$var$strBaseData][0, $e5f8715adea0dc31$export$9734b0a24bf02e93 /* @min:%2ename */ ];\n var eventData = new (0, $9bdc8b7e7935e83a$export$d61e24a684f9e51)(logger, eventName, customProperties, customMeasurements);\n var data = new (0, $74e0f4254782bad9$export$2d0294657ab35f1b)((0, $9bdc8b7e7935e83a$export$d61e24a684f9e51)[0, $e5f8715adea0dc31$export$9e16762ab4f2648 /* @min:%2edataType */ ], eventData);\n return $0b044846db0c77e8$var$_createEnvelope(logger, (0, $9bdc8b7e7935e83a$export$d61e24a684f9e51)[0, $e5f8715adea0dc31$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], telemetryItem, data);\n}\nfunction $0b044846db0c77e8$export$eca78b65eeb356ed(logger, telemetryItem, customUndefinedValue) {\n $0b044846db0c77e8$var$EnvelopeCreatorInit(logger, telemetryItem);\n // Extract root level properties from part C telemetryItem.data\n var customMeasurements = telemetryItem[$0b044846db0c77e8$var$strBaseData][0, $e5f8715adea0dc31$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] || {};\n var customProperties = telemetryItem[$0b044846db0c77e8$var$strBaseData][$0b044846db0c77e8$var$strProperties] || {};\n $0b044846db0c77e8$var$_extractPropsAndMeasurements(telemetryItem[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ], customProperties, customMeasurements);\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(customUndefinedValue)) $0b044846db0c77e8$var$_convertPropsUndefinedToCustomDefinedValue(customProperties, customUndefinedValue);\n var bd = telemetryItem[$0b044846db0c77e8$var$strBaseData];\n var exData = (0, $1e8d24b24fb574aa$export$e2f174de097e0bcd).CreateFromInterface(logger, bd, customProperties, customMeasurements);\n var data = new (0, $74e0f4254782bad9$export$2d0294657ab35f1b)((0, $1e8d24b24fb574aa$export$e2f174de097e0bcd)[0, $e5f8715adea0dc31$export$9e16762ab4f2648 /* @min:%2edataType */ ], exData);\n return $0b044846db0c77e8$var$_createEnvelope(logger, (0, $1e8d24b24fb574aa$export$e2f174de097e0bcd)[0, $e5f8715adea0dc31$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], telemetryItem, data);\n}\nfunction $0b044846db0c77e8$export$bb5bee4039a2e495(logger, telemetryItem, customUndefinedValue) {\n $0b044846db0c77e8$var$EnvelopeCreatorInit(logger, telemetryItem);\n var baseData = telemetryItem[$0b044846db0c77e8$var$strBaseData];\n var props = baseData[$0b044846db0c77e8$var$strProperties] || {};\n var measurements = baseData[0, $e5f8715adea0dc31$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] || {};\n $0b044846db0c77e8$var$_extractPropsAndMeasurements(telemetryItem[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ], props, measurements);\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(customUndefinedValue)) $0b044846db0c77e8$var$_convertPropsUndefinedToCustomDefinedValue(props, customUndefinedValue);\n var baseMetricData = new (0, $659de0afdff509f2$export$efdd3e096bc27746)(logger, baseData[0, $e5f8715adea0dc31$export$9734b0a24bf02e93 /* @min:%2ename */ ], baseData.average, baseData.sampleCount, baseData.min, baseData.max, baseData.stdDev, props, measurements);\n var data = new (0, $74e0f4254782bad9$export$2d0294657ab35f1b)((0, $659de0afdff509f2$export$efdd3e096bc27746)[0, $e5f8715adea0dc31$export$9e16762ab4f2648 /* @min:%2edataType */ ], baseMetricData);\n return $0b044846db0c77e8$var$_createEnvelope(logger, (0, $659de0afdff509f2$export$efdd3e096bc27746)[0, $e5f8715adea0dc31$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], telemetryItem, data);\n}\nfunction $0b044846db0c77e8$export$edbb8a2c6529947a(logger, telemetryItem, customUndefinedValue) {\n $0b044846db0c77e8$var$EnvelopeCreatorInit(logger, telemetryItem);\n // Since duration is not part of the domain properties in Common Schema, extract it from part C\n var duration;\n var baseData = telemetryItem[$0b044846db0c77e8$var$strBaseData];\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(baseData) && !(0, $533f826bbc418791$export$bedb7023a7733221)(baseData[$0b044846db0c77e8$var$strProperties]) && !(0, $533f826bbc418791$export$bedb7023a7733221)(baseData[$0b044846db0c77e8$var$strProperties][0, $c0ca326fc9479ec0$export$be41298b7716c698])) {\n duration = baseData[$0b044846db0c77e8$var$strProperties][0, $c0ca326fc9479ec0$export$be41298b7716c698];\n delete baseData[$0b044846db0c77e8$var$strProperties][0, $c0ca326fc9479ec0$export$be41298b7716c698];\n } else if (!(0, $533f826bbc418791$export$bedb7023a7733221)(telemetryItem[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ]) && !(0, $533f826bbc418791$export$bedb7023a7733221)(telemetryItem[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ][0, $c0ca326fc9479ec0$export$be41298b7716c698])) {\n duration = telemetryItem[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ][0, $c0ca326fc9479ec0$export$be41298b7716c698];\n delete telemetryItem[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ][0, $c0ca326fc9479ec0$export$be41298b7716c698];\n }\n var bd = telemetryItem[$0b044846db0c77e8$var$strBaseData];\n // special case: pageview.id is grabbed from current operation id. Analytics plugin is decoupled from properties plugin, so this is done here instead. This can be made a default telemetry intializer instead if needed to be decoupled from channel\n var currentContextId;\n if (((telemetryItem.ext || {}).trace || {})[0, $e5f8715adea0dc31$export$a5eb52c53bba8560 /* @min:%2etraceID */ ]) currentContextId = telemetryItem.ext.trace[0, $e5f8715adea0dc31$export$a5eb52c53bba8560 /* @min:%2etraceID */ ];\n var id = bd.id || currentContextId;\n var name = bd[0, $e5f8715adea0dc31$export$9734b0a24bf02e93 /* @min:%2ename */ ];\n var url = bd.uri;\n var properties = bd[$0b044846db0c77e8$var$strProperties] || {};\n var measurements = bd[0, $e5f8715adea0dc31$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] || {};\n // refUri is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(bd.refUri)) properties[\"refUri\"] = bd.refUri;\n // pageType is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(bd.pageType)) properties[\"pageType\"] = bd.pageType;\n // isLoggedIn is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(bd.isLoggedIn)) properties[\"isLoggedIn\"] = bd.isLoggedIn[0, $e5f8715adea0dc31$export$e2818d11505fa034 /* @min:%2etoString */ ]();\n // pageTags is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(bd[$0b044846db0c77e8$var$strProperties])) {\n var pageTags = bd[$0b044846db0c77e8$var$strProperties];\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(pageTags, function(key, value) {\n properties[key] = value;\n });\n }\n $0b044846db0c77e8$var$_extractPropsAndMeasurements(telemetryItem[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ], properties, measurements);\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(customUndefinedValue)) $0b044846db0c77e8$var$_convertPropsUndefinedToCustomDefinedValue(properties, customUndefinedValue);\n var pageViewData = new (0, $5c5f40703ef3d51c$export$12c0fdede1c6bc6c)(logger, name, url, duration, properties, measurements, id);\n var data = new (0, $74e0f4254782bad9$export$2d0294657ab35f1b)((0, $5c5f40703ef3d51c$export$12c0fdede1c6bc6c)[0, $e5f8715adea0dc31$export$9e16762ab4f2648 /* @min:%2edataType */ ], pageViewData);\n return $0b044846db0c77e8$var$_createEnvelope(logger, (0, $5c5f40703ef3d51c$export$12c0fdede1c6bc6c)[0, $e5f8715adea0dc31$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], telemetryItem, data);\n}\nfunction $0b044846db0c77e8$export$bb801863268e7049(logger, telemetryItem, customUndefinedValue) {\n $0b044846db0c77e8$var$EnvelopeCreatorInit(logger, telemetryItem);\n var bd = telemetryItem[$0b044846db0c77e8$var$strBaseData];\n var name = bd[0, $e5f8715adea0dc31$export$9734b0a24bf02e93 /* @min:%2ename */ ];\n var url = bd.uri || bd.url;\n var properties = bd[$0b044846db0c77e8$var$strProperties] || {};\n var measurements = bd[0, $e5f8715adea0dc31$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] || {};\n $0b044846db0c77e8$var$_extractPropsAndMeasurements(telemetryItem[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ], properties, measurements);\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(customUndefinedValue)) $0b044846db0c77e8$var$_convertPropsUndefinedToCustomDefinedValue(properties, customUndefinedValue);\n var baseData = new (0, $27d410d508f4b32f$export$709aae57ec681346)(logger, name, url, undefined, properties, measurements, bd);\n var data = new (0, $74e0f4254782bad9$export$2d0294657ab35f1b)((0, $27d410d508f4b32f$export$709aae57ec681346)[0, $e5f8715adea0dc31$export$9e16762ab4f2648 /* @min:%2edataType */ ], baseData);\n return $0b044846db0c77e8$var$_createEnvelope(logger, (0, $27d410d508f4b32f$export$709aae57ec681346)[0, $e5f8715adea0dc31$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], telemetryItem, data);\n}\nfunction $0b044846db0c77e8$export$bc9e843f2eb8a61c(logger, telemetryItem, customUndefinedValue) {\n $0b044846db0c77e8$var$EnvelopeCreatorInit(logger, telemetryItem);\n var message = telemetryItem[$0b044846db0c77e8$var$strBaseData].message;\n var severityLevel = telemetryItem[$0b044846db0c77e8$var$strBaseData].severityLevel;\n var props = telemetryItem[$0b044846db0c77e8$var$strBaseData][$0b044846db0c77e8$var$strProperties] || {};\n var measurements = telemetryItem[$0b044846db0c77e8$var$strBaseData][0, $e5f8715adea0dc31$export$32fc64677eb5b7a2 /* @min:%2emeasurements */ ] || {};\n $0b044846db0c77e8$var$_extractPropsAndMeasurements(telemetryItem[0, $e5f8715adea0dc31$export$2f5ff0b46814907e /* @min:%2edata */ ], props, measurements);\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(customUndefinedValue)) $0b044846db0c77e8$var$_convertPropsUndefinedToCustomDefinedValue(props, customUndefinedValue);\n var baseData = new (0, $16adbdbcb0ae9015$export$78e1bea9036f120f)(logger, message, severityLevel, props, measurements);\n var data = new (0, $74e0f4254782bad9$export$2d0294657ab35f1b)((0, $16adbdbcb0ae9015$export$78e1bea9036f120f)[0, $e5f8715adea0dc31$export$9e16762ab4f2648 /* @min:%2edataType */ ], baseData);\n return $0b044846db0c77e8$var$_createEnvelope(logger, (0, $16adbdbcb0ae9015$export$78e1bea9036f120f)[0, $e5f8715adea0dc31$export$2672d4f7ccc80348 /* @min:%2eenvelopeType */ ], telemetryItem, data);\n}\n\n\n/*\n * Application Insights JavaScript SDK - Channel, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\nfunction $9f852541a61ca36f$var$_disableEvents(target, evtNamespace) {\n (0, $12cc003c7fb5ccde$export$51dedceb7c784eff)(target, null, null, evtNamespace);\n}\nfunction $9f852541a61ca36f$export$798b7fe42d5e3d06(parentEvtNamespace) {\n var _a;\n var _document = (0, $3d5fcb60a9467a45$export$f65ca476c09acec0)();\n var _navigator = (0, $3d5fcb60a9467a45$export$a56241c767c1d89f)(); // Gets the window.navigator or workerNavigator depending on the global\n var _isListening = false;\n var _onlineStatus = true;\n var _evtNamespace = (0, $12cc003c7fb5ccde$export$3f37a50e0edde3be)((0, $8a2d104e2647a310$export$eb4a6badb18ead04)(\"OfflineListener\"), parentEvtNamespace);\n try {\n if (_enableEvents((0, $3d5fcb60a9467a45$export$38b2d434cce3ea22)())) _isListening = true;\n if (_document) {\n // Also attach to the document.body or document\n var target = _document.body || _document;\n if (target.ononline) {\n if (_enableEvents(target)) _isListening = true;\n }\n }\n if (_isListening) // We are listening to events so lets set the current status rather than assuming we are online #1538\n {\n if (_navigator && !(0, $533f826bbc418791$export$bedb7023a7733221)(_navigator[0, $e5f8715adea0dc31$export$a9130fdcd11ec7ef /* @min:%2eonLine */ ])) _onlineStatus = _navigator[0, $e5f8715adea0dc31$export$a9130fdcd11ec7ef /* @min:%2eonLine */ ];\n }\n } catch (e) {\n // this makes react-native less angry\n _isListening = false;\n }\n function _enableEvents(target) {\n var enabled = false;\n if (target) {\n enabled = (0, $12cc003c7fb5ccde$export$324ab159353a60a9)(target, \"online\", _setOnline, _evtNamespace);\n if (enabled) (0, $12cc003c7fb5ccde$export$324ab159353a60a9)(target, \"offline\", _setOffline, _evtNamespace);\n }\n return enabled;\n }\n function _setOnline() {\n _onlineStatus = true;\n }\n function _setOffline() {\n _onlineStatus = false;\n }\n function _isOnline() {\n var result = true;\n if (_isListening) result = _onlineStatus;\n else if (_navigator && !(0, $533f826bbc418791$export$bedb7023a7733221)(_navigator[0, $e5f8715adea0dc31$export$a9130fdcd11ec7ef /* @min:%2eonLine */ ])) result = _navigator[0, $e5f8715adea0dc31$export$a9130fdcd11ec7ef /* @min:%2eonLine */ ];\n return result;\n }\n function _unload() {\n var win = (0, $3d5fcb60a9467a45$export$38b2d434cce3ea22)();\n if (win && _isListening) {\n $9f852541a61ca36f$var$_disableEvents(win, _evtNamespace);\n if (_document) {\n // Also attach to the document.body or document\n var target = _document.body || _document;\n if (!(0, $533f826bbc418791$export$fce6876652108ab)(target.ononline)) $9f852541a61ca36f$var$_disableEvents(target, _evtNamespace);\n }\n _isListening = false;\n }\n }\n return _a = {}, _a[0, $e5f8715adea0dc31$export$704cf8098f85ad0f /* @min:isOnline */ ] = _isOnline, _a.isListening = function() {\n return _isListening;\n }, _a.unload = _unload, _a;\n}\n\n\n/*\n * Application Insights JavaScript SDK - Channel, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\nvar $633f36e5bb6b03ff$var$BaseSendBuffer = /** @class */ function() {\n function BaseSendBuffer(logger, config) {\n var _buffer = [];\n var _bufferFullMessageSent = false;\n this[0, $e5f8715adea0dc31$export$7768b9624b4c70a6 /* @min:%2e_get */ ] = function() {\n return _buffer;\n };\n this._set = function(buffer) {\n _buffer = buffer;\n return _buffer;\n };\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(BaseSendBuffer, this, function(_self) {\n _self[0, $e5f8715adea0dc31$export$4aae77f3ba3c48b4 /* @min:%2eenqueue */ ] = function(payload) {\n if (_self[0, $e5f8715adea0dc31$export$e9679ef501b0d1 /* @min:%2ecount */ ]() >= config[0, $e5f8715adea0dc31$export$c8dd872dc774fa7c /* @min:%2eeventsLimitInMem */ ]) {\n // sent internal log only once per page view\n if (!_bufferFullMessageSent) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 105 /* _eInternalMessageId.InMemoryStorageBufferFull */ , \"Maximum in-memory buffer size reached: \" + _self[0, $e5f8715adea0dc31$export$e9679ef501b0d1 /* @min:%2ecount */ ](), true);\n _bufferFullMessageSent = true;\n }\n return;\n }\n _buffer[0, $e5f8715adea0dc31$export$a0a330e7fa1e278c /* @min:%2epush */ ](payload);\n };\n _self[0, $e5f8715adea0dc31$export$e9679ef501b0d1 /* @min:%2ecount */ ] = function() {\n return _buffer[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ];\n };\n _self.size = function() {\n var size = _buffer[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ];\n for(var lp = 0; lp < _buffer[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ]; lp++)size += _buffer[lp][0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ];\n if (!config[0, $e5f8715adea0dc31$export$b18aabdfc0aaf6b /* @min:%2eemitLineDelimitedJson */ ]) size += 2;\n return size;\n };\n _self[0, $e5f8715adea0dc31$export$5eeb73fac03da74a /* @min:%2eclear */ ] = function() {\n _buffer = [];\n _bufferFullMessageSent = false;\n };\n _self.getItems = function() {\n return _buffer.slice(0);\n };\n _self[0, $e5f8715adea0dc31$export$a5da323a4da829fc /* @min:%2ebatchPayloads */ ] = function(payload) {\n if (payload && payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n var batch = config[0, $e5f8715adea0dc31$export$b18aabdfc0aaf6b /* @min:%2eemitLineDelimitedJson */ ] ? payload.join(\"\\n\") : \"[\" + payload.join(\",\") + \"]\";\n return batch;\n }\n return null;\n };\n _self[0, $e5f8715adea0dc31$export$1e6514b499ba4d34 /* @min:%2ecreateNew */ ] = function(newLogger, newConfig, canUseSessionStorage) {\n var items = _buffer.slice(0);\n newLogger = newLogger || logger;\n newConfig = newConfig || {};\n var newBuffer = !!canUseSessionStorage ? new $633f36e5bb6b03ff$export$dcb776947c16915f(newLogger, newConfig) : new $633f36e5bb6b03ff$export$d706e5fd60d36d56(newLogger, newConfig);\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(items, function(payload) {\n newBuffer[0, $e5f8715adea0dc31$export$4aae77f3ba3c48b4 /* @min:%2eenqueue */ ](payload);\n });\n return newBuffer;\n };\n });\n }\n // Removed Stub for BaseSendBuffer.prototype.enqueue.\n // Removed Stub for BaseSendBuffer.prototype.count.\n // Removed Stub for BaseSendBuffer.prototype.size.\n // Removed Stub for BaseSendBuffer.prototype.clear.\n // Removed Stub for BaseSendBuffer.prototype.getItems.\n // Removed Stub for BaseSendBuffer.prototype.batchPayloads.\n // Removed Stub for BaseSendBuffer.prototype.createNew.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n BaseSendBuffer.__ieDyn = 1;\n return BaseSendBuffer;\n}();\n/*\r\n * An array based send buffer.\r\n */ var $633f36e5bb6b03ff$export$d706e5fd60d36d56 = /** @class */ function(_super) {\n (0, $2a74b38b87b38cda$export$1f9c32e3fbfb8e62)(ArraySendBuffer, _super);\n function ArraySendBuffer(logger, config) {\n var _this = _super.call(this, logger, config) || this;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(ArraySendBuffer, _this, function(_self, _base) {\n _self[0, $e5f8715adea0dc31$export$52e50651d87300e3 /* @min:%2emarkAsSent */ ] = function(payload) {\n _base[0, $e5f8715adea0dc31$export$5eeb73fac03da74a /* @min:%2eclear */ ]();\n };\n _self[0, $e5f8715adea0dc31$export$13da1b5a005ef035 /* @min:%2eclearSent */ ] = function(payload) {\n // not supported\n };\n });\n return _this;\n }\n // Removed Stub for ArraySendBuffer.prototype.markAsSent.\n // Removed Stub for ArraySendBuffer.prototype.clearSent.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n ArraySendBuffer.__ieDyn = 1;\n return ArraySendBuffer;\n}($633f36e5bb6b03ff$var$BaseSendBuffer);\n/*\r\n * Session storage buffer holds a copy of all unsent items in the browser session storage.\r\n */ var $633f36e5bb6b03ff$export$dcb776947c16915f = /** @class */ function(_super) {\n (0, $2a74b38b87b38cda$export$1f9c32e3fbfb8e62)(SessionStorageSendBuffer, _super);\n function SessionStorageSendBuffer(logger, config) {\n var _this = _super.call(this, logger, config) || this;\n var _bufferFullMessageSent = false;\n //Note: should not use config.namePrefix directly, because it will always refers to the latest namePrefix\n var _namePrefix = config === null || config === void 0 ? void 0 : config.namePrefix;\n var _a = config[0, $e5f8715adea0dc31$export$4637bcb72c509e60 /* @min:%2ebufferOverride */ ] || {\n getItem: (0, $8e03bdff803b84be$export$a398bd2f40e2eb6e),\n setItem: (0, $8e03bdff803b84be$export$21abea3a85fee3f5)\n }, getItem = _a.getItem, setItem = _a.setItem;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(SessionStorageSendBuffer, _this, function(_self, _base) {\n var bufferItems = _getBuffer(SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$63ab2dad6d8a60ed /* @min:%2eBUFFER_KEY */ ]);\n var notDeliveredItems = _getBuffer(SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$d03f333763905c89 /* @min:%2eSENT_BUFFER_KEY */ ]);\n var buffer = _self._set(bufferItems.concat(notDeliveredItems));\n // If the buffer has too many items, drop items from the end.\n if (buffer[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] > SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$20d3a25105cda3b1 /* @min:%2eMAX_BUFFER_SIZE */ ]) buffer[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] = SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$20d3a25105cda3b1 /* @min:%2eMAX_BUFFER_SIZE */ ];\n _setBuffer(SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$d03f333763905c89 /* @min:%2eSENT_BUFFER_KEY */ ], []);\n _setBuffer(SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$63ab2dad6d8a60ed /* @min:%2eBUFFER_KEY */ ], buffer);\n _self[0, $e5f8715adea0dc31$export$4aae77f3ba3c48b4 /* @min:%2eenqueue */ ] = function(payload) {\n if (_self[0, $e5f8715adea0dc31$export$e9679ef501b0d1 /* @min:%2ecount */ ]() >= SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$20d3a25105cda3b1 /* @min:%2eMAX_BUFFER_SIZE */ ]) {\n // sent internal log only once per page view\n if (!_bufferFullMessageSent) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 67 /* _eInternalMessageId.SessionStorageBufferFull */ , \"Maximum buffer size reached: \" + _self[0, $e5f8715adea0dc31$export$e9679ef501b0d1 /* @min:%2ecount */ ](), true);\n _bufferFullMessageSent = true;\n }\n return;\n }\n _base[0, $e5f8715adea0dc31$export$4aae77f3ba3c48b4 /* @min:%2eenqueue */ ](payload);\n _setBuffer(SessionStorageSendBuffer.BUFFER_KEY, _self[0, $e5f8715adea0dc31$export$7768b9624b4c70a6 /* @min:%2e_get */ ]());\n };\n _self[0, $e5f8715adea0dc31$export$5eeb73fac03da74a /* @min:%2eclear */ ] = function() {\n _base[0, $e5f8715adea0dc31$export$5eeb73fac03da74a /* @min:%2eclear */ ]();\n _setBuffer(SessionStorageSendBuffer.BUFFER_KEY, _self[0, $e5f8715adea0dc31$export$7768b9624b4c70a6 /* @min:%2e_get */ ]());\n _setBuffer(SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$d03f333763905c89 /* @min:%2eSENT_BUFFER_KEY */ ], []);\n _bufferFullMessageSent = false;\n };\n _self[0, $e5f8715adea0dc31$export$52e50651d87300e3 /* @min:%2emarkAsSent */ ] = function(payload) {\n _setBuffer(SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$63ab2dad6d8a60ed /* @min:%2eBUFFER_KEY */ ], _self._set(_removePayloadsFromBuffer(payload, _self[0, $e5f8715adea0dc31$export$7768b9624b4c70a6 /* @min:%2e_get */ ]())));\n var sentElements = _getBuffer(SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$d03f333763905c89 /* @min:%2eSENT_BUFFER_KEY */ ]);\n if (sentElements instanceof Array && payload instanceof Array) {\n sentElements = sentElements.concat(payload);\n if (sentElements[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] > SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$20d3a25105cda3b1 /* @min:%2eMAX_BUFFER_SIZE */ ]) {\n // We send telemetry normally. If the SENT_BUFFER is too big we don't add new elements\n // until we receive a response from the backend and the buffer has free space again (see clearSent method)\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 1 /* eLoggingSeverity.CRITICAL */ , 67 /* _eInternalMessageId.SessionStorageBufferFull */ , \"Sent buffer reached its maximum size: \" + sentElements[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ], true);\n sentElements[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] = SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$20d3a25105cda3b1 /* @min:%2eMAX_BUFFER_SIZE */ ];\n }\n _setBuffer(SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$d03f333763905c89 /* @min:%2eSENT_BUFFER_KEY */ ], sentElements);\n }\n };\n _self[0, $e5f8715adea0dc31$export$13da1b5a005ef035 /* @min:%2eclearSent */ ] = function(payload) {\n var sentElements = _getBuffer(SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$d03f333763905c89 /* @min:%2eSENT_BUFFER_KEY */ ]);\n sentElements = _removePayloadsFromBuffer(payload, sentElements);\n _setBuffer(SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$d03f333763905c89 /* @min:%2eSENT_BUFFER_KEY */ ], sentElements);\n };\n _self[0, $e5f8715adea0dc31$export$1e6514b499ba4d34 /* @min:%2ecreateNew */ ] = function(newLogger, newConfig, canUseSessionStorage) {\n canUseSessionStorage = !!canUseSessionStorage;\n var unsentItems = _self[0, $e5f8715adea0dc31$export$7768b9624b4c70a6 /* @min:%2e_get */ ]().slice(0);\n var sentItems = _getBuffer(SessionStorageSendBuffer[0, $e5f8715adea0dc31$export$d03f333763905c89 /* @min:%2eSENT_BUFFER_KEY */ ]).slice(0);\n newLogger = newLogger || logger;\n newConfig = newConfig || {};\n // to make sure that we do not send duplicated payloads when it is switched back to previous one\n _self[0, $e5f8715adea0dc31$export$5eeb73fac03da74a /* @min:%2eclear */ ]();\n var newBuffer = canUseSessionStorage ? new SessionStorageSendBuffer(newLogger, newConfig) : new $633f36e5bb6b03ff$export$d706e5fd60d36d56(newLogger, newConfig);\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(unsentItems, function(payload) {\n newBuffer[0, $e5f8715adea0dc31$export$4aae77f3ba3c48b4 /* @min:%2eenqueue */ ](payload);\n });\n if (canUseSessionStorage) // arr buffer will clear all payloads if markAsSent() is called\n newBuffer[0, $e5f8715adea0dc31$export$52e50651d87300e3 /* @min:%2emarkAsSent */ ](sentItems);\n return newBuffer;\n };\n function _removePayloadsFromBuffer(payloads, buffer) {\n var remaining = [];\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(buffer, function(value) {\n if (!(0, $533f826bbc418791$export$f6e2535fb5126e54)(value) && (0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(payloads, value) === -1) remaining[0, $e5f8715adea0dc31$export$a0a330e7fa1e278c /* @min:%2epush */ ](value);\n });\n return remaining;\n }\n function _getBuffer(key) {\n var prefixedKey = key;\n try {\n prefixedKey = _namePrefix ? _namePrefix + \"_\" + prefixedKey : prefixedKey;\n var bufferJson = getItem(logger, prefixedKey);\n if (bufferJson) {\n var buffer_1 = (0, $0c599844349363c4$export$d047a7c56db64af4)().parse(bufferJson);\n if ((0, $533f826bbc418791$export$844ec244b1367d54)(buffer_1)) // When using some version prototype.js the stringify / parse cycle does not decode array's correctly\n buffer_1 = (0, $0c599844349363c4$export$d047a7c56db64af4)().parse(buffer_1);\n if (buffer_1 && (0, $533f826bbc418791$export$43bee75e5e14138e)(buffer_1)) return buffer_1;\n }\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 1 /* eLoggingSeverity.CRITICAL */ , 42 /* _eInternalMessageId.FailedToRestoreStorageBuffer */ , \" storage key: \" + prefixedKey + \", \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n return [];\n }\n function _setBuffer(key, buffer) {\n var prefixedKey = key;\n try {\n prefixedKey = _namePrefix ? _namePrefix + \"_\" + prefixedKey : prefixedKey;\n var bufferJson = JSON[0, $e5f8715adea0dc31$export$a318a8141fc98747 /* @min:%2estringify */ ](buffer);\n setItem(logger, prefixedKey, bufferJson);\n } catch (e) {\n // if there was an error, clear the buffer\n // telemetry is stored in the _buffer array so we won't loose any items\n setItem(logger, prefixedKey, JSON[0, $e5f8715adea0dc31$export$a318a8141fc98747 /* @min:%2estringify */ ]([]));\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 41 /* _eInternalMessageId.FailedToSetStorageBuffer */ , \" storage key: \" + prefixedKey + \", \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e) + \". Buffer cleared\", {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n }\n });\n return _this;\n }\n // Removed Stub for SessionStorageSendBuffer.prototype.enqueue.\n // Removed Stub for SessionStorageSendBuffer.prototype.clear.\n // Removed Stub for SessionStorageSendBuffer.prototype.markAsSent.\n // Removed Stub for SessionStorageSendBuffer.prototype.clearSent.\n // Removed Stub for SessionStorageSendBuffer.prototype.createNew.\n SessionStorageSendBuffer.BUFFER_KEY = \"AI_buffer\";\n SessionStorageSendBuffer.SENT_BUFFER_KEY = \"AI_sentBuffer\";\n // Maximum number of payloads stored in the buffer. If the buffer is full, new elements will be dropped.\n SessionStorageSendBuffer.MAX_BUFFER_SIZE = 2000;\n return SessionStorageSendBuffer;\n}($633f36e5bb6b03ff$var$BaseSendBuffer);\n\n\n/*\n * Application Insights JavaScript SDK - Channel, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\nvar $2c9268977b2520db$export$ef852775387a0be7 = /** @class */ function() {\n function Serializer(logger) {\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(Serializer, this, function(_self) {\n /**\r\n * Serializes the current object to a JSON string.\r\n */ _self.serialize = function(input) {\n var output = _serializeObject(input, \"root\");\n try {\n return (0, $0c599844349363c4$export$d047a7c56db64af4)()[0, $e5f8715adea0dc31$export$a318a8141fc98747 /* @min:%2estringify */ ](output);\n } catch (e) {\n // if serialization fails return an empty string\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 1 /* eLoggingSeverity.CRITICAL */ , 48 /* _eInternalMessageId.CannotSerializeObject */ , e && (0, $533f826bbc418791$export$f6e2535fb5126e54)(e[0, $e5f8715adea0dc31$export$e2818d11505fa034 /* @min:%2etoString */ ]) ? e[0, $e5f8715adea0dc31$export$e2818d11505fa034 /* @min:%2etoString */ ]() : \"Error serializing object\", null, true);\n }\n };\n function _serializeObject(source, name) {\n var circularReferenceCheck = \"__aiCircularRefCheck\";\n var output = {};\n if (!source) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 1 /* eLoggingSeverity.CRITICAL */ , 48 /* _eInternalMessageId.CannotSerializeObject */ , \"cannot serialize object because it is null or undefined\", {\n name: name\n }, true);\n return output;\n }\n if (source[circularReferenceCheck]) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 50 /* _eInternalMessageId.CircularReferenceDetected */ , \"Circular reference detected while serializing object\", {\n name: name\n }, true);\n return output;\n }\n if (!source.aiDataContract) {\n // special case for measurements/properties/tags\n if (name === \"measurements\") output = _serializeStringMap(source, \"number\", name);\n else if (name === \"properties\") output = _serializeStringMap(source, \"string\", name);\n else if (name === \"tags\") output = _serializeStringMap(source, \"string\", name);\n else if ((0, $533f826bbc418791$export$43bee75e5e14138e)(source)) output = _serializeArray(source, name);\n else {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 49 /* _eInternalMessageId.CannotSerializeObjectNonSerializable */ , \"Attempting to serialize an object which does not implement ISerializable\", {\n name: name\n }, true);\n try {\n // verify that the object can be stringified\n (0, $0c599844349363c4$export$d047a7c56db64af4)()[0, $e5f8715adea0dc31$export$a318a8141fc98747 /* @min:%2estringify */ ](source);\n output = source;\n } catch (e) {\n // if serialization fails return an empty string\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 1 /* eLoggingSeverity.CRITICAL */ , 48 /* _eInternalMessageId.CannotSerializeObject */ , e && (0, $533f826bbc418791$export$f6e2535fb5126e54)(e[0, $e5f8715adea0dc31$export$e2818d11505fa034 /* @min:%2etoString */ ]) ? e[0, $e5f8715adea0dc31$export$e2818d11505fa034 /* @min:%2etoString */ ]() : \"Error serializing object\", null, true);\n }\n }\n return output;\n }\n source[circularReferenceCheck] = true;\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(source.aiDataContract, function(field, contract) {\n var isRequired = (0, $533f826bbc418791$export$f6e2535fb5126e54)(contract) ? contract() & 1 /* FieldType.Required */ : contract & 1 /* FieldType.Required */ ;\n var isHidden = (0, $533f826bbc418791$export$f6e2535fb5126e54)(contract) ? contract() & 4 /* FieldType.Hidden */ : contract & 4 /* FieldType.Hidden */ ;\n var isArray = contract & 2 /* FieldType.Array */ ;\n var isPresent = source[field] !== undefined;\n var isObj = (0, $533f826bbc418791$export$a6cdc56e425d0d0a)(source[field]) && source[field] !== null;\n if (isRequired && !isPresent && !isArray) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 1 /* eLoggingSeverity.CRITICAL */ , 24 /* _eInternalMessageId.MissingRequiredFieldSpecification */ , \"Missing required field specification. The field is required but not present on source\", {\n field: field,\n name: name\n });\n else if (!isHidden) {\n var value = void 0;\n if (isObj) {\n if (isArray) // special case; recurse on each object in the source array\n value = _serializeArray(source[field], field);\n else // recurse on the source object in this field\n value = _serializeObject(source[field], field);\n } else // assign the source field to the output even if undefined or required\n value = source[field];\n // only emit this field if the value is defined\n if (value !== undefined) output[field] = value;\n }\n });\n delete source[circularReferenceCheck];\n return output;\n }\n function _serializeArray(sources, name) {\n var output;\n if (!!sources) {\n if (!(0, $533f826bbc418791$export$43bee75e5e14138e)(sources)) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 1 /* eLoggingSeverity.CRITICAL */ , 54 /* _eInternalMessageId.ItemNotInArray */ , \"This field was specified as an array in the contract but the item is not an array.\\r\\n\", {\n name: name\n }, true);\n else {\n output = [];\n for(var i = 0; i < sources[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ]; i++){\n var source = sources[i];\n var item = _serializeObject(source, name + \"[\" + i + \"]\");\n output[0, $e5f8715adea0dc31$export$a0a330e7fa1e278c /* @min:%2epush */ ](item);\n }\n }\n }\n return output;\n }\n function _serializeStringMap(map, expectedType, name) {\n var output;\n if (map) {\n output = {};\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(map, function(field, value) {\n if (expectedType === \"string\") {\n if (value === undefined) output[field] = \"undefined\";\n else if (value === null) output[field] = \"null\";\n else if (!value[0, $e5f8715adea0dc31$export$e2818d11505fa034 /* @min:%2etoString */ ]) output[field] = \"invalid field: toString() is not defined.\";\n else output[field] = value[0, $e5f8715adea0dc31$export$e2818d11505fa034 /* @min:%2etoString */ ]();\n } else if (expectedType === \"number\") {\n if (value === undefined) output[field] = \"undefined\";\n else if (value === null) output[field] = \"null\";\n else {\n var num = parseFloat(value);\n if (isNaN(num)) output[field] = \"NaN\";\n else output[field] = num;\n }\n } else {\n output[field] = \"invalid field: \" + name + \" is of unknown type.\";\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 1 /* eLoggingSeverity.CRITICAL */ , output[field], null, true);\n }\n });\n }\n return output;\n }\n });\n }\n // Removed Stub for Serializer.prototype.serialize.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n Serializer.__ieDyn = 1;\n return Serializer;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Channel, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n/*\n * Application Insights JavaScript SDK - Channel, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n/*\n * Application Insights JavaScript SDK - Channel, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n// (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution\nvar $7d0a42f949c72b34$var$MIN_INPUT_LENGTH = 8;\nvar $7d0a42f949c72b34$export$e2bdf7ff70742e42 = /** @class */ function() {\n function HashCodeScoreGenerator() {}\n HashCodeScoreGenerator.prototype.getHashCodeScore = function(key) {\n var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;\n return score * 100;\n };\n HashCodeScoreGenerator.prototype.getHashCode = function(input) {\n if (input === \"\") return 0;\n while(input[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] < $7d0a42f949c72b34$var$MIN_INPUT_LENGTH)input = input.concat(input);\n // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function\n var hash = 5381;\n for(var i = 0; i < input[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ]; ++i){\n hash = (hash << 5) + hash + input.charCodeAt(i);\n // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)\n // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.\n hash = hash & hash;\n }\n return Math.abs(hash);\n };\n // We're using 32 bit math, hence max value is (2^31 - 1)\n HashCodeScoreGenerator.INT_MAX_VALUE = 2147483647;\n return HashCodeScoreGenerator;\n}();\n\n\nvar $a511b226057b3229$export$4526db980ad5b8a1 = /** @class */ function() {\n function SamplingScoreGenerator() {\n var _self = this;\n var hashCodeGenerator = new (0, $7d0a42f949c72b34$export$e2bdf7ff70742e42)();\n var keys = new (0, $d1bdc0f4cef94745$export$8e2bcdf18620784a)();\n _self[0, $e5f8715adea0dc31$export$2c3af30a5c45aa6e /* @min:%2egetSamplingScore */ ] = function(item) {\n var score = 0;\n if (item[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ] && item[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ][keys.userId]) score = hashCodeGenerator.getHashCodeScore(item[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ][keys.userId]);\n else if (item.ext && item.ext.user && item.ext.user.id) score = hashCodeGenerator[0, $e5f8715adea0dc31$export$d676f8c50f371355 /* @min:%2egetHashCodeScore */ ](item.ext.user.id);\n else if (item[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ] && item[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ][keys.operationId]) score = hashCodeGenerator.getHashCodeScore(item[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ][keys.operationId]);\n else if (item.ext && item.ext.telemetryTrace && item.ext.telemetryTrace[0, $e5f8715adea0dc31$export$a5eb52c53bba8560 /* @min:%2etraceID */ ]) score = hashCodeGenerator.getHashCodeScore(item.ext.telemetryTrace[0, $e5f8715adea0dc31$export$a5eb52c53bba8560 /* @min:%2etraceID */ ]);\n else // tslint:disable-next-line:insecure-random\n score = Math.random() * 100;\n return score;\n };\n }\n return SamplingScoreGenerator;\n}();\n\n\nvar $9c8a4bf222316b8c$export$21a3eccb8a1780eb = /** @class */ function() {\n function Sample(sampleRate, logger) {\n // We're using 32 bit math, hence max value is (2^31 - 1)\n this.INT_MAX_VALUE = 2147483647;\n var _logger = logger || (0, $cc2aaaebf96ac6a7$export$5102d32ea1d740a)(null);\n if (sampleRate > 100 || sampleRate < 0) {\n _logger.throwInternal(2 /* eLoggingSeverity.WARNING */ , 58 /* _eInternalMessageId.SampleRateOutOfRange */ , \"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.\", {\n samplingRate: sampleRate\n }, true);\n sampleRate = 100;\n }\n this[0, $e5f8715adea0dc31$export$c2afe23fa18f9dff /* @min:%2esampleRate */ ] = sampleRate;\n this.samplingScoreGenerator = new (0, $a511b226057b3229$export$4526db980ad5b8a1)();\n }\n /**\r\n * Determines if an envelope is sampled in (i.e. will be sent) or not (i.e. will be dropped).\r\n */ Sample.prototype.isSampledIn = function(envelope) {\n var samplingPercentage = this[0, $e5f8715adea0dc31$export$c2afe23fa18f9dff /* @min:%2esampleRate */ ]; // 0 - 100\n var isSampledIn = false;\n if (samplingPercentage === null || samplingPercentage === undefined || samplingPercentage >= 100) return true;\n else if (envelope.baseType === (0, $659de0afdff509f2$export$efdd3e096bc27746)[0, $e5f8715adea0dc31$export$9e16762ab4f2648 /* @min:%2edataType */ ]) // exclude MetricData telemetry from sampling\n return true;\n isSampledIn = this.samplingScoreGenerator[0, $e5f8715adea0dc31$export$2c3af30a5c45aa6e /* @min:%2egetSamplingScore */ ](envelope) < samplingPercentage;\n return isSampledIn;\n };\n return Sample;\n}();\n\n\n\nvar $de50c0f740c66740$var$_a, $de50c0f740c66740$var$_b;\nvar $de50c0f740c66740$var$UNDEFINED_VALUE = undefined;\nvar $de50c0f740c66740$var$FetchSyncRequestSizeLimitBytes = 65000; // approx 64kb (the current Edge, Firefox and Chrome max limit)\nfunction $de50c0f740c66740$var$_getResponseText(xhr) {\n try {\n return xhr.responseText;\n } catch (e) {\n // Best effort, as XHR may throw while XDR wont so just ignore\n }\n return null;\n}\nvar $de50c0f740c66740$var$defaultAppInsightsChannelConfig = (0, $36a077d9f4439b69$export$a15782d21797da4c)(($de50c0f740c66740$var$_a = {\n // Use the default value (handles empty string in the configuration)\n endpointUrl: (0, $61c4d9dd4226f64e$export$d0884590a6a82e6c)((0, $533f826bbc418791$export$8f9cae6546f97a9f), (0, $71dfba5ea0640485$export$5c9ec0fce655ebcf) + (0, $71dfba5ea0640485$export$e6c0f3431c6cd728))\n}, $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$b18aabdfc0aaf6b /* @min:emitLineDelimitedJson */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$983774f06380e463 /* @min:maxBatchInterval */ ] = 15000, $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$803d432e48ba5ceb /* @min:maxBatchSizeInBytes */ ] = 102400, $de50c0f740c66740$var$_a.disableTelemetry = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$782dd40ba58c3597 /* @min:enableSessionStorageBuffer */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(true), $de50c0f740c66740$var$_a.isRetryDisabled = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$f5629284a6f7ec3d /* @min:isBeaconApiDisabled */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(true), $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$85f018eb7798fb52 /* @min:disableXhr */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$d1f891e9714d3108 /* @min:onunloadDisableFetch */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$6b8e1dc9b77f253c /* @min:onunloadDisableBeacon */ ] = (0, $61c4d9dd4226f64e$export$bad0d7bace730ae)(), $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$81cfd43387c8dbcc /* @min:instrumentationKey */ ] = $de50c0f740c66740$var$UNDEFINED_VALUE, $de50c0f740c66740$var$_a.namePrefix = $de50c0f740c66740$var$UNDEFINED_VALUE, $de50c0f740c66740$var$_a.samplingPercentage = (0, $61c4d9dd4226f64e$export$d0884590a6a82e6c)($de50c0f740c66740$var$_chkSampling, 100), $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$dbe59923e879fdc5 /* @min:customHeaders */ ] = $de50c0f740c66740$var$UNDEFINED_VALUE, $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$12df46deb7379c67 /* @min:convertUndefined */ ] = $de50c0f740c66740$var$UNDEFINED_VALUE, $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$c8dd872dc774fa7c /* @min:eventsLimitInMem */ ] = 10000, $de50c0f740c66740$var$_a[0, $e5f8715adea0dc31$export$4637bcb72c509e60 /* @min:bufferOverride */ ] = false, $de50c0f740c66740$var$_a));\nfunction $de50c0f740c66740$var$_chkSampling(value) {\n return !isNaN(value) && value > 0 && value <= 100;\n}\nvar $de50c0f740c66740$var$EnvelopeTypeCreator = ($de50c0f740c66740$var$_b = {}, $de50c0f740c66740$var$_b[(0, $9bdc8b7e7935e83a$export$d61e24a684f9e51).dataType] = (0, $0b044846db0c77e8$export$b74153364c2066d1), $de50c0f740c66740$var$_b[(0, $16adbdbcb0ae9015$export$78e1bea9036f120f).dataType] = (0, $0b044846db0c77e8$export$bc9e843f2eb8a61c), $de50c0f740c66740$var$_b[(0, $5c5f40703ef3d51c$export$12c0fdede1c6bc6c).dataType] = (0, $0b044846db0c77e8$export$edbb8a2c6529947a), $de50c0f740c66740$var$_b[(0, $27d410d508f4b32f$export$709aae57ec681346).dataType] = (0, $0b044846db0c77e8$export$bb801863268e7049), $de50c0f740c66740$var$_b[(0, $1e8d24b24fb574aa$export$e2f174de097e0bcd).dataType] = (0, $0b044846db0c77e8$export$eca78b65eeb356ed), $de50c0f740c66740$var$_b[(0, $659de0afdff509f2$export$efdd3e096bc27746).dataType] = (0, $0b044846db0c77e8$export$bb5bee4039a2e495), $de50c0f740c66740$var$_b[(0, $0dd1de134f090c69$export$a7b48490930dbffa).dataType] = (0, $0b044846db0c77e8$export$74e603a08a7deabe), $de50c0f740c66740$var$_b);\nvar $de50c0f740c66740$export$c5a96f3e01fb6582 = /** @class */ function(_super) {\n (0, $2a74b38b87b38cda$export$1f9c32e3fbfb8e62)(Sender, _super);\n function Sender() {\n var _this = _super.call(this) || this;\n _this.priority = 1001;\n _this.identifier = (0, $ca7353bd9238d340$export$a714a094d3058c99);\n // Don't set the defaults here, set them in the _initDefaults() as this is also called during unload\n var _consecutiveErrors; // How many times in a row a retryable error condition has occurred.\n var _retryAt; // The time to retry at in milliseconds from 1970/01/01 (this makes the timer calculation easy).\n var _lastSend; // The time of the last send operation.\n var _paused; // Flag indicating that the sending should be paused\n var _timeoutHandle; // Handle to the timer for delayed sending of batches of data.\n var _serializer;\n var _stamp_specific_redirects;\n var _headers;\n var _syncFetchPayload = 0; // Keep track of the outstanding sync fetch payload total (as sync fetch has limits)\n var _fallbackSender; // The sender to use if the payload size is too large\n var _syncUnloadSender; // The identified sender to use for the synchronous unload stage\n var _offlineListener;\n var _evtNamespace;\n var _endpointUrl;\n var _orgEndpointUrl;\n var _maxBatchSizeInBytes;\n var _beaconSupported;\n var _customHeaders;\n var _disableTelemetry;\n var _instrumentationKey;\n var _convertUndefined;\n var _isRetryDisabled;\n var _maxBatchInterval;\n var _sessionStorageUsed;\n var _bufferOverrideUsed;\n var _namePrefix;\n var _enableSendPromise;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(Sender, _this, function(_self, _base) {\n _initDefaults();\n _self.pause = function() {\n _clearScheduledTimer();\n _paused = true;\n };\n _self.resume = function() {\n if (_paused) {\n _paused = false;\n _retryAt = null;\n // flush if we have exceeded the max-size already\n _checkMaxSize();\n _setupTimer();\n }\n };\n _self.flush = function(isAsync, callBack, sendReason) {\n if (isAsync === void 0) isAsync = true;\n if (!_paused) {\n // Clear the normal schedule timer as we are going to try and flush ASAP\n _clearScheduledTimer();\n try {\n return _self[0, $e5f8715adea0dc31$export$df21ab0de9057cc4 /* @min:%2etriggerSend */ ](isAsync, null, sendReason || 1 /* SendRequestReason.ManualFlush */ );\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 1 /* eLoggingSeverity.CRITICAL */ , 22 /* _eInternalMessageId.FlushFailed */ , \"flush failed, telemetry will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n }\n };\n _self.onunloadFlush = function() {\n if (!_paused) {\n if (_beaconSupported) try {\n return _self[0, $e5f8715adea0dc31$export$df21ab0de9057cc4 /* @min:%2etriggerSend */ ](true, _doUnloadSend, 2 /* SendRequestReason.Unload */ );\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 1 /* eLoggingSeverity.CRITICAL */ , 20 /* _eInternalMessageId.FailedToSendQueuedTelemetry */ , \"failed to flush with beacon sender on page unload, telemetry will not be collected: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n else _self.flush(false);\n }\n };\n _self.addHeader = function(name, value) {\n _headers[name] = value;\n };\n _self.initialize = function(config, core, extensions, pluginChain) {\n if (_self.isInitialized()) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 1 /* eLoggingSeverity.CRITICAL */ , 28 /* _eInternalMessageId.SenderNotInitialized */ , \"Sender is already initialized\");\n _base.initialize(config, core, extensions, pluginChain);\n var identifier = _self.identifier;\n _serializer = new (0, $2c9268977b2520db$export$ef852775387a0be7)(core.logger);\n _consecutiveErrors = 0;\n _retryAt = null;\n _lastSend = 0;\n _self[0, $e5f8715adea0dc31$export$e5390b88ba6f1b04 /* @min:%2e_sender */ ] = null;\n _stamp_specific_redirects = 0;\n var diagLog = _self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ]();\n _evtNamespace = (0, $12cc003c7fb5ccde$export$3f37a50e0edde3be)((0, $8a2d104e2647a310$export$eb4a6badb18ead04)(\"Sender\"), core.evtNamespace && core.evtNamespace());\n _offlineListener = (0, $9f852541a61ca36f$export$798b7fe42d5e3d06)(_evtNamespace);\n // This function will be re-called whenever any referenced configuration is changed\n _self._addHook((0, $acb30f9e62dc5705$export$454a433e4deb244f)(config, function(details) {\n var config = details.cfg;\n var ctx = (0, $bc7124acb0f73e64$export$ca98f11e981bcfd6)(null, config, core);\n var senderConfig = ctx.getExtCfg(identifier, $de50c0f740c66740$var$defaultAppInsightsChannelConfig);\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"_senderConfig\", {\n g: function() {\n return senderConfig;\n }\n });\n // Only update the endpoint if the original config !== the current config\n // This is so any redirect endpointUrl is not overwritten\n if (_orgEndpointUrl !== senderConfig.endpointUrl) {\n _orgEndpointUrl;\n _endpointUrl = _orgEndpointUrl = senderConfig.endpointUrl;\n }\n if (_customHeaders && _customHeaders !== senderConfig[0, $e5f8715adea0dc31$export$dbe59923e879fdc5 /* @min:%2ecustomHeaders */ ]) // Removing any previously defined custom headers as they have changed\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_customHeaders, function(customHeader) {\n delete _headers[customHeader.header];\n });\n _maxBatchSizeInBytes = senderConfig[0, $e5f8715adea0dc31$export$803d432e48ba5ceb /* @min:%2emaxBatchSizeInBytes */ ];\n _beaconSupported = (senderConfig[0, $e5f8715adea0dc31$export$6b8e1dc9b77f253c /* @min:%2eonunloadDisableBeacon */ ] === false || senderConfig[0, $e5f8715adea0dc31$export$f5629284a6f7ec3d /* @min:%2eisBeaconApiDisabled */ ] === false) && (0, $0c599844349363c4$export$cf496c79c05967a0)();\n var bufferOverride = senderConfig[0, $e5f8715adea0dc31$export$4637bcb72c509e60 /* @min:%2ebufferOverride */ ];\n var canUseSessionStorage = !!senderConfig[0, $e5f8715adea0dc31$export$782dd40ba58c3597 /* @min:%2eenableSessionStorageBuffer */ ] && (!!bufferOverride || (0, $8e03bdff803b84be$export$c81985c4209bac26)());\n var namePrefix = senderConfig.namePrefix;\n //Note: emitLineDelimitedJson and eventsLimitInMem is directly accessed via config in senderBuffer\n //Therefore, if canUseSessionStorage is not changed, we do not need to re initialize a new one\n var shouldUpdate = canUseSessionStorage !== _sessionStorageUsed || canUseSessionStorage && _namePrefix !== namePrefix // prefixName is only used in session storage\n || canUseSessionStorage && _bufferOverrideUsed !== bufferOverride;\n if (_self[0, $e5f8715adea0dc31$export$3f8a6394c5f7e7be /* @min:%2e_buffer */ ]) {\n // case1 (Pre and Now enableSessionStorageBuffer settings are same)\n // if namePrefix changes, transfer current buffer to new buffer\n // else no action needed\n //case2 (Pre and Now enableSessionStorageBuffer settings are changed)\n // transfer current buffer to new buffer\n if (shouldUpdate) try {\n _self._buffer = _self._buffer[0, $e5f8715adea0dc31$export$1e6514b499ba4d34 /* @min:%2ecreateNew */ ](diagLog, senderConfig, canUseSessionStorage);\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 1 /* eLoggingSeverity.CRITICAL */ , 12 /* _eInternalMessageId.FailedAddingTelemetryToBuffer */ , \"failed to transfer telemetry to different buffer storage, telemetry will be lost: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n _checkMaxSize();\n } else _self[0, $e5f8715adea0dc31$export$3f8a6394c5f7e7be /* @min:%2e_buffer */ ] = canUseSessionStorage ? new (0, $633f36e5bb6b03ff$export$dcb776947c16915f)(diagLog, senderConfig) : new (0, $633f36e5bb6b03ff$export$d706e5fd60d36d56)(diagLog, senderConfig);\n _namePrefix = namePrefix;\n _sessionStorageUsed = canUseSessionStorage;\n _bufferOverrideUsed = bufferOverride;\n _self._sample = new (0, $9c8a4bf222316b8c$export$21a3eccb8a1780eb)(senderConfig.samplingPercentage, diagLog);\n _instrumentationKey = senderConfig[0, $e5f8715adea0dc31$export$81cfd43387c8dbcc /* @min:%2einstrumentationKey */ ];\n if (!_validateInstrumentationKey(_instrumentationKey, config)) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(diagLog, 1 /* eLoggingSeverity.CRITICAL */ , 100 /* _eInternalMessageId.InvalidInstrumentationKey */ , \"Invalid Instrumentation key \" + _instrumentationKey);\n _customHeaders = senderConfig[0, $e5f8715adea0dc31$export$dbe59923e879fdc5 /* @min:%2ecustomHeaders */ ];\n if (!(0, $d98b699aeccdabc6$export$edade5317663baa4)(_endpointUrl) && _customHeaders && _customHeaders[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_customHeaders, function(customHeader) {\n _this.addHeader(customHeader.header, customHeader.value);\n });\n else _customHeaders = null;\n _enableSendPromise = senderConfig.enableSendPromise;\n var sendPostFunc = null;\n if (!senderConfig[0, $e5f8715adea0dc31$export$85f018eb7798fb52 /* @min:%2edisableXhr */ ] && (0, $0c599844349363c4$export$b9f2bc09e5ac0fa5)()) sendPostFunc = _xdrSender; // IE 8 and 9\n else if (!senderConfig[0, $e5f8715adea0dc31$export$85f018eb7798fb52 /* @min:%2edisableXhr */ ] && (0, $0c599844349363c4$export$cfeac9aa070f0108)()) sendPostFunc = _xhrSender;\n if (!sendPostFunc && (0, $0c599844349363c4$export$f8c1c61350d9749)()) sendPostFunc = _fetchSender;\n // always fallback to XHR\n _fallbackSender = sendPostFunc || _xhrSender;\n if (!senderConfig[0, $e5f8715adea0dc31$export$f5629284a6f7ec3d /* @min:%2eisBeaconApiDisabled */ ] && (0, $0c599844349363c4$export$cf496c79c05967a0)()) // Config is set to always used beacon sending\n sendPostFunc = _beaconSender;\n _self[0, $e5f8715adea0dc31$export$e5390b88ba6f1b04 /* @min:%2e_sender */ ] = sendPostFunc || _xhrSender;\n if (!senderConfig[0, $e5f8715adea0dc31$export$d1f891e9714d3108 /* @min:%2eonunloadDisableFetch */ ] && (0, $0c599844349363c4$export$f8c1c61350d9749)(true)) // Try and use the fetch with keepalive\n _syncUnloadSender = _fetchKeepAliveSender;\n else if ((0, $0c599844349363c4$export$cf496c79c05967a0)()) // Try and use sendBeacon\n _syncUnloadSender = _beaconSender;\n else if (!senderConfig[0, $e5f8715adea0dc31$export$85f018eb7798fb52 /* @min:%2edisableXhr */ ] && (0, $0c599844349363c4$export$b9f2bc09e5ac0fa5)()) _syncUnloadSender = _xdrSender; // IE 8 and 9\n else if (!senderConfig[0, $e5f8715adea0dc31$export$85f018eb7798fb52 /* @min:%2edisableXhr */ ] && (0, $0c599844349363c4$export$cfeac9aa070f0108)()) _syncUnloadSender = _xhrSender;\n else _syncUnloadSender = _fallbackSender;\n _disableTelemetry = senderConfig.disableTelemetry;\n _convertUndefined = senderConfig[0, $e5f8715adea0dc31$export$12df46deb7379c67 /* @min:%2econvertUndefined */ ] || $de50c0f740c66740$var$UNDEFINED_VALUE;\n _isRetryDisabled = senderConfig.isRetryDisabled;\n _maxBatchInterval = senderConfig[0, $e5f8715adea0dc31$export$983774f06380e463 /* @min:%2emaxBatchInterval */ ];\n }));\n };\n _self.processTelemetry = function(telemetryItem, itemCtx) {\n itemCtx = _self._getTelCtx(itemCtx);\n var diagLogger = itemCtx[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ]();\n try {\n // if master off switch is set, don't send any data\n if (_disableTelemetry) // Do not send/save data\n return;\n // validate input\n if (!telemetryItem) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(diagLogger, 1 /* eLoggingSeverity.CRITICAL */ , 7 /* _eInternalMessageId.CannotSendEmptyTelemetry */ , \"Cannot send empty telemetry\");\n return;\n }\n // validate event\n if (telemetryItem.baseData && !telemetryItem[0, $e5f8715adea0dc31$export$aa558e99f83347cf /* @min:%2ebaseType */ ]) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(diagLogger, 1 /* eLoggingSeverity.CRITICAL */ , 70 /* _eInternalMessageId.InvalidEvent */ , \"Cannot send telemetry without baseData and baseType\");\n return;\n }\n if (!telemetryItem[0, $e5f8715adea0dc31$export$aa558e99f83347cf /* @min:%2ebaseType */ ]) // Default\n telemetryItem[0, $e5f8715adea0dc31$export$aa558e99f83347cf /* @min:%2ebaseType */ ] = \"EventData\";\n // ensure a sender was constructed\n if (!_self[0, $e5f8715adea0dc31$export$e5390b88ba6f1b04 /* @min:%2e_sender */ ]) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(diagLogger, 1 /* eLoggingSeverity.CRITICAL */ , 28 /* _eInternalMessageId.SenderNotInitialized */ , \"Sender was not initialized\");\n return;\n }\n // check if this item should be sampled in, else add sampleRate tag\n if (!_isSampledIn(telemetryItem)) {\n // Item is sampled out, do not send it\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(diagLogger, 2 /* eLoggingSeverity.WARNING */ , 33 /* _eInternalMessageId.TelemetrySampledAndNotSent */ , \"Telemetry item was sampled out and not sent\", {\n SampleRate: _self._sample[0, $e5f8715adea0dc31$export$c2afe23fa18f9dff /* @min:%2esampleRate */ ]\n });\n return;\n } else telemetryItem[0, $71dfba5ea0640485$export$dc288b6444e20c04] = _self._sample[0, $e5f8715adea0dc31$export$c2afe23fa18f9dff /* @min:%2esampleRate */ ];\n // construct an envelope that Application Insights endpoint can understand\n // if ikey of telemetry is provided and not empty, envelope will use this iKey instead of senderConfig iKey\n var defaultEnvelopeIkey = telemetryItem.iKey || _instrumentationKey;\n var aiEnvelope_1 = Sender.constructEnvelope(telemetryItem, defaultEnvelopeIkey, diagLogger, _convertUndefined);\n if (!aiEnvelope_1) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(diagLogger, 1 /* eLoggingSeverity.CRITICAL */ , 47 /* _eInternalMessageId.CreateEnvelopeError */ , \"Unable to create an AppInsights envelope\");\n return;\n }\n var doNotSendItem_1 = false;\n // this is for running in legacy mode, where customer may already have a custom initializer present\n if (telemetryItem[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ] && telemetryItem[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ][0, $71dfba5ea0640485$export$ea8a69bf327def66]) {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(telemetryItem[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ][0, $71dfba5ea0640485$export$ea8a69bf327def66], function(callBack) {\n try {\n if (callBack && callBack(aiEnvelope_1) === false) {\n doNotSendItem_1 = true;\n (0, $cc2aaaebf96ac6a7$export$25fb4cb97863f0a8)(diagLogger, \"Telemetry processor check returns false\");\n }\n } catch (e) {\n // log error but dont stop executing rest of the telemetry initializers\n // doNotSendItem = true;\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(diagLogger, 1 /* eLoggingSeverity.CRITICAL */ , 64 /* _eInternalMessageId.TelemetryInitializerFailed */ , \"One of telemetry initializers failed, telemetry item will not be sent: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n }, true);\n }\n });\n delete telemetryItem[0, $e5f8715adea0dc31$export$d0f526aa8043f6d7 /* @min:%2etags */ ][0, $71dfba5ea0640485$export$ea8a69bf327def66];\n }\n if (doNotSendItem_1) return; // do not send, no need to execute next plugin\n // check if the incoming payload is too large, truncate if necessary\n var payload = _serializer.serialize(aiEnvelope_1);\n // flush if we would exceed the max-size limit by adding this item\n var buffer = _self[0, $e5f8715adea0dc31$export$3f8a6394c5f7e7be /* @min:%2e_buffer */ ];\n _checkMaxSize(payload);\n // enqueue the payload\n buffer[0, $e5f8715adea0dc31$export$4aae77f3ba3c48b4 /* @min:%2eenqueue */ ](payload);\n // ensure an invocation timeout is set\n _setupTimer();\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(diagLogger, 2 /* eLoggingSeverity.WARNING */ , 12 /* _eInternalMessageId.FailedAddingTelemetryToBuffer */ , \"Failed adding telemetry to the sender's buffer, some telemetry will be lost: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n // hand off the telemetry item to the next plugin\n _self.processNext(telemetryItem, itemCtx);\n };\n /**\r\n * xhr state changes\r\n */ _self[0, $e5f8715adea0dc31$export$9b55da9813cf231b /* @min:%2e_xhrReadyStateChange */ ] = function(xhr, payload, countOfItemsInPayload) {\n if (xhr.readyState === 4) _checkResponsStatus(xhr.status, payload, xhr.responseURL, countOfItemsInPayload, _formatErrorMessageXhr(xhr), $de50c0f740c66740$var$_getResponseText(xhr) || xhr.response);\n };\n /**\r\n * Immediately send buffered data\r\n * @param async - {boolean} - Indicates if the events should be sent asynchronously\r\n * @param forcedSender - {SenderFunction} - Indicates the forcedSender, undefined if not passed\r\n */ _self[0, $e5f8715adea0dc31$export$df21ab0de9057cc4 /* @min:%2etriggerSend */ ] = function(async, forcedSender, sendReason) {\n if (async === void 0) async = true;\n var result;\n if (!_paused) try {\n var buffer = _self[0, $e5f8715adea0dc31$export$3f8a6394c5f7e7be /* @min:%2e_buffer */ ];\n // Send data only if disableTelemetry is false\n if (!_disableTelemetry) {\n if (buffer[0, $e5f8715adea0dc31$export$e9679ef501b0d1 /* @min:%2ecount */ ]() > 0) {\n var payload = buffer.getItems();\n _notifySendRequest(sendReason || 0 /* SendRequestReason.Undefined */ , async);\n // invoke send\n if (forcedSender) result = forcedSender.call(_self, payload, async);\n else result = _self[0, $e5f8715adea0dc31$export$e5390b88ba6f1b04 /* @min:%2e_sender */ ](payload, async);\n }\n // update lastSend time to enable throttling\n _lastSend = +new Date;\n } else buffer[0, $e5f8715adea0dc31$export$5eeb73fac03da74a /* @min:%2eclear */ ]();\n _clearScheduledTimer();\n } catch (e) {\n /* Ignore this error for IE under v10 */ var ieVer = (0, $0c599844349363c4$export$eb7ff627fa81c42e)();\n if (!ieVer || ieVer > 9) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 1 /* eLoggingSeverity.CRITICAL */ , 40 /* _eInternalMessageId.TransmissionFailed */ , \"Telemetry transmission failed, some telemetry will be lost: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n return result;\n };\n _self._doTeardown = function(unloadCtx, unloadState) {\n _self.onunloadFlush();\n (0, $2cb93c1cbddb67ab$export$86347c3dd68c03f6)(_offlineListener, false);\n _initDefaults();\n };\n /**\r\n * error handler\r\n */ _self[0, $e5f8715adea0dc31$export$fd0c91d4da43d71b /* @min:%2e_onError */ ] = function(payload, message, event) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 2 /* eLoggingSeverity.WARNING */ , 26 /* _eInternalMessageId.OnError */ , \"Failed to send telemetry.\", {\n message: message\n });\n _self._buffer && _self._buffer[0, $e5f8715adea0dc31$export$13da1b5a005ef035 /* @min:%2eclearSent */ ](payload);\n };\n /**\r\n * partial success handler\r\n */ _self[0, $e5f8715adea0dc31$export$689c49d56ac33585 /* @min:%2e_onPartialSuccess */ ] = function(payload, results) {\n var failed = [];\n var retry = [];\n // Iterate through the reversed array of errors so that splicing doesn't have invalid indexes after the first item.\n var errors = results.errors.reverse();\n for(var _i = 0, errors_1 = errors; _i < errors_1.length; _i++){\n var error = errors_1[_i];\n var extracted = payload.splice(error.index, 1)[0];\n if (_isRetriable(error.statusCode)) retry[0, $e5f8715adea0dc31$export$a0a330e7fa1e278c /* @min:%2epush */ ](extracted);\n else // All other errors, including: 402 (Monthly quota exceeded) and 439 (Too many requests and refresh cache).\n failed[0, $e5f8715adea0dc31$export$a0a330e7fa1e278c /* @min:%2epush */ ](extracted);\n }\n if (payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) _self[0, $e5f8715adea0dc31$export$82a109ffee49e423 /* @min:%2e_onSuccess */ ](payload, results[0, $e5f8715adea0dc31$export$fb8523c8667e286a /* @min:%2eitemsAccepted */ ]);\n if (failed[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) _self[0, $e5f8715adea0dc31$export$fd0c91d4da43d71b /* @min:%2e_onError */ ](failed, _formatErrorMessageXhr(null, [\n \"partial success\",\n results[0, $e5f8715adea0dc31$export$fb8523c8667e286a /* @min:%2eitemsAccepted */ ],\n \"of\",\n results.itemsReceived\n ].join(\" \")));\n if (retry[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n _resendPayload(retry);\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 2 /* eLoggingSeverity.WARNING */ , 40 /* _eInternalMessageId.TransmissionFailed */ , \"Partial success. Delivered: \" + payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] + \", Failed: \" + failed[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] + \". Will retry to send \" + retry[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] + \" our of \" + results[0, $e5f8715adea0dc31$export$746df81af2cb9d94 /* @min:%2eitemsReceived */ ] + \" items\");\n }\n };\n /**\r\n * success handler\r\n */ _self[0, $e5f8715adea0dc31$export$82a109ffee49e423 /* @min:%2e_onSuccess */ ] = function(payload, countOfItemsInPayload) {\n _self._buffer && _self._buffer[0, $e5f8715adea0dc31$export$13da1b5a005ef035 /* @min:%2eclearSent */ ](payload);\n };\n /**\r\n * xdr state changes\r\n */ _self._xdrOnLoad = function(xdr, payload) {\n var responseText = $de50c0f740c66740$var$_getResponseText(xdr);\n if (xdr && (responseText + \"\" === \"200\" || responseText === \"\")) {\n _consecutiveErrors = 0;\n _self[0, $e5f8715adea0dc31$export$82a109ffee49e423 /* @min:%2e_onSuccess */ ](payload, 0);\n } else {\n var results = _parseResponse(responseText);\n if (results && results.itemsReceived && results.itemsReceived > results[0, $e5f8715adea0dc31$export$fb8523c8667e286a /* @min:%2eitemsAccepted */ ] && !_isRetryDisabled) _self[0, $e5f8715adea0dc31$export$689c49d56ac33585 /* @min:%2e_onPartialSuccess */ ](payload, results);\n else _self[0, $e5f8715adea0dc31$export$fd0c91d4da43d71b /* @min:%2e_onError */ ](payload, _formatErrorMessageXdr(xdr));\n }\n };\n function _isSampledIn(envelope) {\n return _self._sample.isSampledIn(envelope);\n }\n function _checkMaxSize(incomingPayload) {\n var incomingSize = incomingPayload ? incomingPayload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] : 0;\n if (_self[0, $e5f8715adea0dc31$export$3f8a6394c5f7e7be /* @min:%2e_buffer */ ].size() + incomingSize > _maxBatchSizeInBytes) {\n if (!_offlineListener || _offlineListener[0, $e5f8715adea0dc31$export$704cf8098f85ad0f /* @min:%2eisOnline */ ]()) _self[0, $e5f8715adea0dc31$export$df21ab0de9057cc4 /* @min:%2etriggerSend */ ](true, null, 10 /* SendRequestReason.MaxBatchSize */ );\n return true;\n }\n return false;\n }\n function _checkResponsStatus(status, payload, responseUrl, countOfItemsInPayload, errorMessage, res) {\n var response = null;\n if (!_self._appId) {\n response = _parseResponse(res);\n if (response && response.appId) _self._appId = response.appId;\n }\n if ((status < 200 || status >= 300) && status !== 0) {\n // Update End Point url if permanent redirect or moved permanently\n // Updates the end point url before retry\n if (status === 301 || status === 307 || status === 308) {\n if (!_checkAndUpdateEndPointUrl(responseUrl)) {\n _self[0, $e5f8715adea0dc31$export$fd0c91d4da43d71b /* @min:%2e_onError */ ](payload, errorMessage);\n return;\n }\n }\n if (!_isRetryDisabled && _isRetriable(status)) {\n _resendPayload(payload);\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 2 /* eLoggingSeverity.WARNING */ , 40 /* _eInternalMessageId.TransmissionFailed */ , \". Response code \" + status + \". Will retry to send \" + payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] + \" items.\");\n } else _self[0, $e5f8715adea0dc31$export$fd0c91d4da43d71b /* @min:%2e_onError */ ](payload, errorMessage);\n } else if (_offlineListener && !_offlineListener[0, $e5f8715adea0dc31$export$704cf8098f85ad0f /* @min:%2eisOnline */ ]()) // Note: Don't check for status == 0, since adblock gives this code\n {\n if (!_isRetryDisabled) {\n var offlineBackOffMultiplier = 10; // arbritrary number\n _resendPayload(payload, offlineBackOffMultiplier);\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 2 /* eLoggingSeverity.WARNING */ , 40 /* _eInternalMessageId.TransmissionFailed */ , \". Offline - Response Code: \".concat(status, \". Offline status: \").concat(!_offlineListener.isOnline(), \". Will retry to send \").concat(payload.length, \" items.\"));\n }\n } else {\n // check if the xhr's responseURL or fetch's response.url is same as endpoint url\n // TODO after 10 redirects force send telemetry with 'redirect=false' as query parameter.\n _checkAndUpdateEndPointUrl(responseUrl);\n if (status === 206) {\n if (!response) response = _parseResponse(res);\n if (response && !_isRetryDisabled) _self[0, $e5f8715adea0dc31$export$689c49d56ac33585 /* @min:%2e_onPartialSuccess */ ](payload, response);\n else _self[0, $e5f8715adea0dc31$export$fd0c91d4da43d71b /* @min:%2e_onError */ ](payload, errorMessage);\n } else {\n _consecutiveErrors = 0;\n _self[0, $e5f8715adea0dc31$export$82a109ffee49e423 /* @min:%2e_onSuccess */ ](payload, countOfItemsInPayload);\n }\n }\n }\n function _checkAndUpdateEndPointUrl(responseUrl) {\n // Maximum stamp specific redirects allowed(uncomment this when breeze is ready with not allowing redirects feature)\n if (_stamp_specific_redirects >= 10) // _self._senderConfig.endpointUrl = () => Sender._getDefaultAppInsightsChannelConfig().endpointUrl()+\"/?redirect=false\";\n // _stamp_specific_redirects = 0;\n return false;\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(responseUrl) && responseUrl !== \"\") {\n if (responseUrl !== _endpointUrl) {\n _endpointUrl = responseUrl;\n ++_stamp_specific_redirects;\n return true;\n }\n }\n return false;\n }\n function _doUnloadSend(payload, isAsync) {\n if (_syncUnloadSender) // We are unloading so always call the sender with sync set to false\n _syncUnloadSender(payload, false);\n else // Fallback to the previous beacon Sender (which causes a CORB warning on chrome now)\n _beaconSender(payload, isAsync);\n }\n function _doBeaconSend(payload) {\n var nav = (0, $3d5fcb60a9467a45$export$a56241c767c1d89f)();\n var buffer = _self[0, $e5f8715adea0dc31$export$3f8a6394c5f7e7be /* @min:%2e_buffer */ ];\n var url = _endpointUrl;\n var batch = _self._buffer[0, $e5f8715adea0dc31$export$a5da323a4da829fc /* @min:%2ebatchPayloads */ ](payload);\n // Chrome only allows CORS-safelisted values for the sendBeacon data argument\n // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283\n var plainTextBatch = new Blob([\n batch\n ], {\n type: \"text/plain;charset=UTF-8\"\n });\n // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\n var queued = nav.sendBeacon(url, plainTextBatch);\n if (queued) {\n buffer[0, $e5f8715adea0dc31$export$52e50651d87300e3 /* @min:%2emarkAsSent */ ](payload);\n // no response from beaconSender, clear buffer\n _self._onSuccess(payload, payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ]);\n }\n return queued;\n }\n /**\r\n * Send Beacon API request\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param isAsync - {boolean} - not used\r\n * Note: Beacon API does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */ function _beaconSender(payload, isAsync) {\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(payload) && payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\n {\n if (!_doBeaconSend(payload)) {\n // Failed to send entire payload so try and split data and try to send as much events as possible\n var droppedPayload = [];\n for(var lp = 0; lp < payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ]; lp++){\n var thePayload = payload[lp];\n if (!_doBeaconSend([\n thePayload\n ])) // Can't send anymore, so split the batch and drop the rest\n droppedPayload[0, $e5f8715adea0dc31$export$a0a330e7fa1e278c /* @min:%2epush */ ](thePayload);\n }\n if (droppedPayload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n _fallbackSender && _fallbackSender(droppedPayload, true);\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 2 /* eLoggingSeverity.WARNING */ , 40 /* _eInternalMessageId.TransmissionFailed */ , \". Failed to send telemetry with Beacon API, retried with normal sender.\");\n }\n }\n }\n }\n /**\r\n * Send XMLHttpRequest\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param isAsync - {boolean} - Indicates if the request should be sent asynchronously\r\n */ function _xhrSender(payload, isAsync) {\n var thePromise;\n var resolveFunc;\n var rejectFunc;\n var xhr = new XMLHttpRequest();\n var endPointUrl = _endpointUrl;\n try {\n xhr[0, $71dfba5ea0640485$export$7c6abff2f2bdd9c0] = true;\n } catch (e) {\n // If the environment has locked down the XMLHttpRequest (preventExtensions and/or freeze), this would\n // cause the request to fail and we no telemetry would be sent\n }\n xhr.open(\"POST\", endPointUrl, isAsync);\n xhr[0, $e5f8715adea0dc31$export$84ecd29f369f5b1d /* @min:%2esetRequestHeader */ ](\"Content-type\", \"application/json\");\n // append Sdk-Context request header only in case of breeze endpoint\n if ((0, $d98b699aeccdabc6$export$edade5317663baa4)(endPointUrl)) xhr[0, $e5f8715adea0dc31$export$84ecd29f369f5b1d /* @min:%2esetRequestHeader */ ]((0, $78a4729d55fca66a$export$e499e02a1fe05177)[6 /* eRequestHeaders.sdkContextHeader */ ], (0, $78a4729d55fca66a$export$e499e02a1fe05177)[7 /* eRequestHeaders.sdkContextHeaderAppIdRequest */ ]);\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)((0, $36a077d9f4439b69$export$f7628dc18f4211e5)(_headers), function(headerName) {\n xhr[0, $e5f8715adea0dc31$export$84ecd29f369f5b1d /* @min:%2esetRequestHeader */ ](headerName, _headers[headerName]);\n });\n xhr.onreadystatechange = function() {\n _self._xhrReadyStateChange(xhr, payload, payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ]);\n if (xhr.readyState === 4) resolveFunc && resolveFunc(true);\n };\n xhr.onerror = function(event) {\n _self[0, $e5f8715adea0dc31$export$fd0c91d4da43d71b /* @min:%2e_onError */ ](payload, _formatErrorMessageXhr(xhr), event);\n rejectFunc && rejectFunc(event);\n };\n if (isAsync && _enableSendPromise) thePromise = (0, $911d39c591a62618$export$5a1eb20c68656e88)(function(resolve, reject) {\n resolveFunc = resolve;\n rejectFunc = reject;\n });\n // compose an array of payloads\n var batch = _self._buffer[0, $e5f8715adea0dc31$export$a5da323a4da829fc /* @min:%2ebatchPayloads */ ](payload);\n xhr.send(batch);\n _self._buffer[0, $e5f8715adea0dc31$export$52e50651d87300e3 /* @min:%2emarkAsSent */ ](payload);\n return thePromise;\n }\n function _fetchKeepAliveSender(payload, isAsync) {\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(payload)) {\n var payloadSize = payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ];\n for(var lp = 0; lp < payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ]; lp++)payloadSize += payload[lp][0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ];\n if (_syncFetchPayload + payloadSize <= $de50c0f740c66740$var$FetchSyncRequestSizeLimitBytes) _doFetchSender(payload, false);\n else if ((0, $0c599844349363c4$export$cf496c79c05967a0)()) // Fallback to beacon sender as we at least get told which events can't be scheduled\n _beaconSender(payload, isAsync);\n else {\n // Payload is going to be too big so just try and send via XHR\n _fallbackSender && _fallbackSender(payload, true);\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 2 /* eLoggingSeverity.WARNING */ , 40 /* _eInternalMessageId.TransmissionFailed */ , \". Failed to send telemetry with Beacon API, retried with xhrSender.\");\n }\n }\n }\n /**\r\n * Send fetch API request\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param isAsync - {boolean} - not used\r\n */ function _fetchSender(payload, isAsync) {\n return _doFetchSender(payload, true);\n }\n /**\r\n * Send fetch API request\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param isAsync - {boolean} - For fetch this identifies whether we are \"unloading\" (false) or a normal request\r\n */ function _doFetchSender(payload, isAsync) {\n var _a;\n var endPointUrl = _endpointUrl;\n var batch = _self._buffer[0, $e5f8715adea0dc31$export$a5da323a4da829fc /* @min:%2ebatchPayloads */ ](payload);\n var plainTextBatch = new Blob([\n batch\n ], {\n type: \"application/json\"\n });\n var thePromise;\n var resolveFunc;\n var rejectFunc;\n var requestHeaders = new Headers();\n var batchLength = batch[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ];\n var ignoreResponse = false;\n var responseHandled = false;\n // append Sdk-Context request header only in case of breeze endpoint\n if ((0, $d98b699aeccdabc6$export$edade5317663baa4)(endPointUrl)) requestHeaders.append((0, $78a4729d55fca66a$export$e499e02a1fe05177)[6 /* eRequestHeaders.sdkContextHeader */ ], (0, $78a4729d55fca66a$export$e499e02a1fe05177)[7 /* eRequestHeaders.sdkContextHeaderAppIdRequest */ ]);\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)((0, $36a077d9f4439b69$export$f7628dc18f4211e5)(_headers), function(headerName) {\n requestHeaders.append(headerName, _headers[headerName]);\n });\n var init = (_a = {\n method: \"POST\",\n headers: requestHeaders,\n body: plainTextBatch\n }, _a[0, $71dfba5ea0640485$export$7c6abff2f2bdd9c0] = true // Mark so we don't attempt to track this request\n , _a);\n if (!isAsync) {\n init.keepalive = true;\n // As a sync request (during unload), it is unlikely that we will get a chance to process the response so\n // just like beacon send assume that the events have been accepted and processed\n ignoreResponse = true;\n _syncFetchPayload += batchLength;\n }\n var request = new Request(endPointUrl, init);\n try {\n // Also try and tag the request (just in case the value in init is not copied over)\n request[0, $71dfba5ea0640485$export$7c6abff2f2bdd9c0] = true;\n } catch (e) {\n // If the environment has locked down the XMLHttpRequest (preventExtensions and/or freeze), this would\n // cause the request to fail and we no telemetry would be sent\n }\n _self._buffer[0, $e5f8715adea0dc31$export$52e50651d87300e3 /* @min:%2emarkAsSent */ ](payload);\n if (isAsync && _enableSendPromise) thePromise = (0, $911d39c591a62618$export$5a1eb20c68656e88)(function(resolve, reject) {\n resolveFunc = resolve;\n rejectFunc = reject;\n });\n try {\n (0, $a99c2448b4d73401$export$856fe465480fa77a)(fetch(request), function(result) {\n if (!isAsync) {\n _syncFetchPayload -= batchLength;\n batchLength = 0;\n }\n if (!responseHandled) {\n responseHandled = true;\n if (!result.rejected) {\n var response_1 = result.value;\n /**\r\n * The Promise returned from fetch() won’t reject on HTTP error status even if the response is an HTTP 404 or 500.\r\n * Instead, it will resolve normally (with ok status set to false), and it will only reject on network failure\r\n * or if anything prevented the request from completing.\r\n */ if (!response_1.ok) {\n _self[0, $e5f8715adea0dc31$export$fd0c91d4da43d71b /* @min:%2e_onError */ ](payload, response_1.statusText);\n resolveFunc && resolveFunc(false);\n } else (0, $a99c2448b4d73401$export$856fe465480fa77a)(response_1.text(), function(resp) {\n _checkResponsStatus(response_1.status, payload, response_1.url, payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ], response_1.statusText, resp.value || \"\");\n resolveFunc && resolveFunc(true);\n });\n } else {\n _self[0, $e5f8715adea0dc31$export$fd0c91d4da43d71b /* @min:%2e_onError */ ](payload, result.reason && result.reason.message);\n rejectFunc && rejectFunc(result.reason);\n }\n }\n });\n } catch (e) {\n if (!responseHandled) {\n _self[0, $e5f8715adea0dc31$export$fd0c91d4da43d71b /* @min:%2e_onError */ ](payload, (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e));\n rejectFunc && rejectFunc(e);\n }\n }\n if (ignoreResponse && !responseHandled) {\n // Assume success during unload processing as we most likely won't get the response\n responseHandled = true;\n _self._onSuccess(payload, payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ]);\n resolveFunc && resolveFunc(true);\n }\n return thePromise;\n }\n /**\r\n * Parses the response from the backend.\r\n * @param response - XMLHttpRequest or XDomainRequest response\r\n */ function _parseResponse(response) {\n try {\n if (response && response !== \"\") {\n var result = (0, $0c599844349363c4$export$d047a7c56db64af4)().parse(response);\n if (result && result.itemsReceived && result.itemsReceived >= result[0, $e5f8715adea0dc31$export$fb8523c8667e286a /* @min:%2eitemsAccepted */ ] && result.itemsReceived - result.itemsAccepted === result.errors[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ]) return result;\n }\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 1 /* eLoggingSeverity.CRITICAL */ , 43 /* _eInternalMessageId.InvalidBackendResponse */ , \"Cannot parse the response. \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n response: response\n });\n }\n return null;\n }\n /**\r\n * Resend payload. Adds payload back to the send buffer and setup a send timer (with exponential backoff).\r\n * @param payload\r\n */ function _resendPayload(payload, linearFactor) {\n if (linearFactor === void 0) linearFactor = 1;\n if (!payload || payload[0, $e5f8715adea0dc31$export$6eae51590aaea43 /* @min:%2elength */ ] === 0) return;\n var buffer = _self[0, $e5f8715adea0dc31$export$3f8a6394c5f7e7be /* @min:%2e_buffer */ ];\n buffer[0, $e5f8715adea0dc31$export$13da1b5a005ef035 /* @min:%2eclearSent */ ](payload);\n _consecutiveErrors++;\n for(var _i = 0, payload_1 = payload; _i < payload_1.length; _i++){\n var item = payload_1[_i];\n buffer[0, $e5f8715adea0dc31$export$4aae77f3ba3c48b4 /* @min:%2eenqueue */ ](item);\n }\n // setup timer\n _setRetryTime(linearFactor);\n _setupTimer();\n }\n /**\r\n * Calculates the time to wait before retrying in case of an error based on\r\n * http://en.wikipedia.org/wiki/Exponential_backoff\r\n */ function _setRetryTime(linearFactor) {\n var SlotDelayInSeconds = 10;\n var delayInSeconds;\n if (_consecutiveErrors <= 1) delayInSeconds = SlotDelayInSeconds;\n else {\n var backOffSlot = (Math.pow(2, _consecutiveErrors) - 1) / 2;\n // tslint:disable-next-line:insecure-random\n var backOffDelay = Math.floor(Math.random() * backOffSlot * SlotDelayInSeconds) + 1;\n backOffDelay = linearFactor * backOffDelay;\n delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds);\n }\n // TODO: Log the backoff time like the C# version does.\n var retryAfterTimeSpan = (0, $628cad25a0769458$export$a56f095995763cca)() + delayInSeconds * 1000;\n // TODO: Log the retry at time like the C# version does.\n _retryAt = retryAfterTimeSpan;\n }\n /**\r\n * Sets up the timer which triggers actually sending the data.\r\n */ function _setupTimer() {\n if (!_timeoutHandle && !_paused) {\n var retryInterval = _retryAt ? Math.max(0, _retryAt - (0, $628cad25a0769458$export$a56f095995763cca)()) : 0;\n var timerValue = Math.max(_maxBatchInterval, retryInterval);\n _timeoutHandle = (0, $d03b12effd00bf96$export$5f4d6617421d489b)(function() {\n _timeoutHandle = null;\n _self[0, $e5f8715adea0dc31$export$df21ab0de9057cc4 /* @min:%2etriggerSend */ ](true, null, 1 /* SendRequestReason.NormalSchedule */ );\n }, timerValue);\n }\n }\n function _clearScheduledTimer() {\n _timeoutHandle && _timeoutHandle.cancel();\n _timeoutHandle = null;\n _retryAt = null;\n }\n /**\r\n * Checks if the SDK should resend the payload after receiving this status code from the backend.\r\n * @param statusCode\r\n */ function _isRetriable(statusCode) {\n return statusCode === 401 // Unauthorized\n || statusCode === 403 // Forbidden\n || statusCode === 408 // Timeout\n || statusCode === 429 // Too many requests.\n || statusCode === 500 // Internal server error.\n || statusCode === 502 // Bad Gateway.\n || statusCode === 503 // Service unavailable.\n || statusCode === 504; // Gateway timeout.\n }\n function _formatErrorMessageXhr(xhr, message) {\n if (xhr) return \"XMLHttpRequest,Status:\" + xhr.status + \",Response:\" + $de50c0f740c66740$var$_getResponseText(xhr) || xhr.response || \"\";\n return message;\n }\n /**\r\n * Send XDomainRequest\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param isAsync - {boolean} - Indicates if the request should be sent asynchronously\r\n *\r\n * Note: XDomainRequest does not support sync requests. This 'isAsync' parameter is added\r\n * to maintain consistency with the xhrSender's contract\r\n * Note: XDomainRequest does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */ function _xdrSender(payload, isAsync) {\n var buffer = _self[0, $e5f8715adea0dc31$export$3f8a6394c5f7e7be /* @min:%2e_buffer */ ];\n var _window = (0, $3d5fcb60a9467a45$export$38b2d434cce3ea22)();\n var xdr = new XDomainRequest();\n // NOTE: xdr may send previous retry payload to new endpoint since we are not able to check response URL\n xdr.onload = function() {\n return _self._xdrOnLoad(xdr, payload);\n };\n xdr.onerror = function(event) {\n return _self[0, $e5f8715adea0dc31$export$fd0c91d4da43d71b /* @min:%2e_onError */ ](payload, _formatErrorMessageXdr(xdr), event);\n };\n // XDomainRequest requires the same protocol as the hosting page.\n // If the protocol doesn't match, we can't send the telemetry :(.\n var hostingProtocol = _window && _window.location && _window.location.protocol || \"\";\n if (_endpointUrl.lastIndexOf(hostingProtocol, 0) !== 0) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 2 /* eLoggingSeverity.WARNING */ , 40 /* _eInternalMessageId.TransmissionFailed */ , \". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.\");\n buffer[0, $e5f8715adea0dc31$export$5eeb73fac03da74a /* @min:%2eclear */ ]();\n return;\n }\n var endpointUrl = _endpointUrl.replace(/^(https?:)/, \"\");\n xdr.open(\"POST\", endpointUrl);\n // compose an array of payloads\n var batch = buffer[0, $e5f8715adea0dc31$export$a5da323a4da829fc /* @min:%2ebatchPayloads */ ](payload);\n xdr.send(batch);\n buffer[0, $e5f8715adea0dc31$export$52e50651d87300e3 /* @min:%2emarkAsSent */ ](payload);\n }\n function _formatErrorMessageXdr(xdr, message) {\n if (xdr) return \"XDomainRequest,Response:\" + $de50c0f740c66740$var$_getResponseText(xdr);\n return message;\n }\n // Using function lookups for backward compatibility as the getNotifyMgr() did not exist until after v2.5.6\n function _getNotifyMgr() {\n var func = \"getNotifyMgr\";\n if (_self.core[func]) return _self.core[func]();\n // using _self.core['_notificationManager'] for backward compatibility\n return _self.core[\"_notificationManager\"];\n }\n function _notifySendRequest(sendRequest, isAsync) {\n var manager = _getNotifyMgr();\n if (manager && manager[0, $e5f8715adea0dc31$export$298b8388870fcfe9 /* @min:%2eeventsSendRequest */ ]) try {\n manager[0, $e5f8715adea0dc31$export$298b8388870fcfe9 /* @min:%2eeventsSendRequest */ ](sendRequest, isAsync);\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_self[0, $e5f8715adea0dc31$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ](), 1 /* eLoggingSeverity.CRITICAL */ , 74 /* _eInternalMessageId.NotificationException */ , \"send request notification failed: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n }\n /**\r\n * Validate UUID Format\r\n * Specs taken from https://tools.ietf.org/html/rfc4122 and breeze repo\r\n */ function _validateInstrumentationKey(instrumentationKey, config) {\n var disableValidation = config.disableInstrumentationKeyValidation;\n var disableIKeyValidationFlag = (0, $533f826bbc418791$export$bedb7023a7733221)(disableValidation) ? false : disableValidation;\n if (disableIKeyValidationFlag) return true;\n var UUID_Regex = \"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$\";\n var regexp = new RegExp(UUID_Regex);\n return regexp.test(instrumentationKey);\n }\n function _initDefaults() {\n _self[0, $e5f8715adea0dc31$export$e5390b88ba6f1b04 /* @min:%2e_sender */ ] = null;\n _self[0, $e5f8715adea0dc31$export$3f8a6394c5f7e7be /* @min:%2e_buffer */ ] = null;\n _self._appId = null;\n _self._sample = null;\n _headers = {};\n _offlineListener = null;\n _consecutiveErrors = 0;\n _retryAt = null;\n _lastSend = null;\n _paused = false;\n _timeoutHandle = null;\n _serializer = null;\n _stamp_specific_redirects = 0;\n _syncFetchPayload = 0;\n _fallbackSender = null;\n _syncUnloadSender = null;\n _evtNamespace = null;\n _endpointUrl = null;\n _orgEndpointUrl = null;\n _maxBatchSizeInBytes = 0;\n _beaconSupported = false;\n _customHeaders = null;\n _disableTelemetry = false;\n _instrumentationKey = null;\n _convertUndefined = $de50c0f740c66740$var$UNDEFINED_VALUE;\n _isRetryDisabled = false;\n _sessionStorageUsed = null;\n _namePrefix = $de50c0f740c66740$var$UNDEFINED_VALUE;\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"_senderConfig\", {\n g: function() {\n return (0, $0b747974b0bb3563$export$a7f7e50f928053df)({}, $de50c0f740c66740$var$defaultAppInsightsChannelConfig);\n }\n });\n }\n });\n return _this;\n }\n Sender.constructEnvelope = function(orig, iKey, logger, convertUndefined) {\n var envelope;\n if (iKey !== orig.iKey && !(0, $533f826bbc418791$export$bedb7023a7733221)(iKey)) envelope = (0, $2a74b38b87b38cda$export$b3cf7a802e578501)((0, $2a74b38b87b38cda$export$b3cf7a802e578501)({}, orig), {\n iKey: iKey\n });\n else envelope = orig;\n var creator = $de50c0f740c66740$var$EnvelopeTypeCreator[envelope.baseType] || (0, $0b044846db0c77e8$export$b74153364c2066d1);\n return creator(logger, envelope, convertUndefined);\n };\n // Removed Stub for Sender.prototype.pause.\n // Removed Stub for Sender.prototype.resume.\n // Removed Stub for Sender.prototype.flush.\n // Removed Stub for Sender.prototype.onunloadFlush.\n // Removed Stub for Sender.prototype.initialize.\n // Removed Stub for Sender.prototype.processTelemetry.\n // Removed Stub for Sender.prototype._xhrReadyStateChange.\n // Removed Stub for Sender.prototype.triggerSend.\n // Removed Stub for Sender.prototype._onError.\n // Removed Stub for Sender.prototype._onPartialSuccess.\n // Removed Stub for Sender.prototype._onSuccess.\n // Removed Stub for Sender.prototype._xdrOnLoad.\n // Removed Stub for Sender.prototype.addHeader.\n return Sender;\n}((0, $b61d51369f8191a4$export$64a11c2f90e6766c));\n\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */ \n\n\n\n\n\n/**\r\n * @internal\r\n * @ignore\r\n * Generic Object deep copy handler which creates a new plain object and copies enumerable properties from\r\n * the source to the new target plain object. The source object does not have to be a plain object.\r\n * @param details - The details object for the current property being copied\r\n * @returns true if the handler processed the field.\r\n */ var $eab8f97afa7948b4$var$_defaultDeepCopyHandler = function(details) {\n // Make sure we at least copy plain objects\n details.value && $eab8f97afa7948b4$export$7d1ebb7d4f033054(details);\n // Always return true so that the iteration completes\n return true;\n};\n/**\r\n * @internal\r\n * @ignore\r\n * The ordered default deep copy handlers\r\n */ var $eab8f97afa7948b4$var$defaultDeepCopyHandlers = [\n $eab8f97afa7948b4$export$cc4db57f4a8fbdc7,\n $eab8f97afa7948b4$export$7d1ebb7d4f033054,\n $eab8f97afa7948b4$export$56ca4b82c6e32658,\n $eab8f97afa7948b4$export$2b6207be55b7460b\n];\n/**\r\n * @internal\r\n * @ignore\r\n * Helper function used for detecting and handling recursive properties\r\n * @param visitMap - The current map of objects that have been visited\r\n * @param source - The value (object) to be copied\r\n * @param newPath - The new access path from the origin to the current property\r\n * @param cb - The callback function to call if the current object has not already been processed.\r\n * @returns The new deep copied property, may be incomplete as the object is recursive and is still in the process of being copied\r\n */ function $eab8f97afa7948b4$var$_getSetVisited(visitMap, source, newPath, cb) {\n var theEntry;\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(visitMap, function(entry) {\n if (entry.k === source) {\n theEntry = entry;\n return -1;\n }\n });\n if (!theEntry) {\n // Add the target to the visit map so that deep nested objects refer to the single instance\n // Even if we have not finished processing it yet.\n theEntry = {\n k: source,\n v: source\n };\n visitMap.push(theEntry);\n // Now call the copy callback so that it populates the target\n cb(theEntry);\n }\n return theEntry.v;\n}\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper which performs the recursive deep copy\r\n * @param visitMap - The current map of objects that have been visited\r\n * @param value - The value being copied\r\n * @param ctx - The current copy context\r\n * @param key - [Optional] the current `key` for the value from the source object\r\n * @returns The new deep copied instance of the value.\r\n */ function $eab8f97afa7948b4$var$_deepCopy(visitMap, value, ctx, key) {\n var userHandler = ctx.handler;\n var newPath = ctx.path ? key ? ctx.path.concat(key) : ctx.path : [];\n var newCtx = {\n handler: ctx.handler,\n src: ctx.src,\n path: newPath\n };\n var theType = typeof value;\n var isPlain = false;\n var isPrim = false;\n if (value && theType === (0, $b347daff6f5f8dc1$export$8b8a958a7f6f130c)) isPlain = (0, $a339b44c6e62d324$export$53b83ca8eaab0383)(value);\n else isPrim = value === (0, $b347daff6f5f8dc1$export$38c7ba05d207d137) || (0, $533f826bbc418791$export$1f3b27a0956fac0e)(theType);\n var details = {\n type: theType,\n isPrim: isPrim,\n isPlain: isPlain,\n value: value,\n result: value,\n path: newPath,\n origin: ctx.src,\n copy: function(source, newKey) {\n return $eab8f97afa7948b4$var$_deepCopy(visitMap, source, newKey ? newCtx : ctx, newKey);\n },\n copyTo: function(target, source) {\n return $eab8f97afa7948b4$var$_copyProps(visitMap, target, source, newCtx);\n }\n };\n if (!details.isPrim) return $eab8f97afa7948b4$var$_getSetVisited(visitMap, value, newPath, function(newEntry) {\n // Use an accessor to set the new value onto the new entry\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(details, \"result\", {\n g: function() {\n return newEntry.v;\n },\n s: function(newValue) {\n newEntry.v = newValue;\n }\n });\n var idx = 0;\n var handler = userHandler;\n while(!(0, $e9133230f0eaf267$export$4b40e215736a9426)(handler || (idx < $eab8f97afa7948b4$var$defaultDeepCopyHandlers.length ? $eab8f97afa7948b4$var$defaultDeepCopyHandlers[idx++] : $eab8f97afa7948b4$var$_defaultDeepCopyHandler), ctx, details))handler = (0, $b347daff6f5f8dc1$export$38c7ba05d207d137);\n });\n // Allow the user handler to override the provided value\n if (userHandler && (0, $e9133230f0eaf267$export$4b40e215736a9426)(userHandler, ctx, details)) return details.result;\n return value;\n}\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper to copy all of the enumerable properties from the source object to the new target object\r\n * @param visitMap - The current map of objects that have been visited\r\n * @param target - The target object to copy the properties to.\r\n * @param source - The source object to copy the properties from.\r\n * @param ctx - The current deep copy context\r\n * @returns The populated target object\r\n */ function $eab8f97afa7948b4$var$_copyProps(visitMap, target, source, ctx) {\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(source)) // Copy all properties (not just own properties)\n for(var key in source)// Perform a deep copy of the object\n target[key] = $eab8f97afa7948b4$var$_deepCopy(visitMap, source[key], ctx, key);\n return target;\n}\nfunction $eab8f97afa7948b4$export$eee89407658fa201(target, source, handler) {\n var ctx = {\n handler: handler,\n src: source,\n path: []\n };\n return $eab8f97afa7948b4$var$_copyProps([], target, source, ctx);\n}\nfunction $eab8f97afa7948b4$export$ee1b2e0d6501c954(source, handler) {\n var ctx = {\n handler: handler,\n src: source\n };\n return $eab8f97afa7948b4$var$_deepCopy([], source, ctx);\n}\nfunction $eab8f97afa7948b4$export$cc4db57f4a8fbdc7(details) {\n var value = details.value;\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(value)) {\n // Assign the \"result\" value before performing any additional deep Copying, so any recursive object get a reference to this instance\n var target = details.result = [];\n target.length = value.length;\n // Copying all properties as arrays can contain non-indexed based properties\n details.copyTo(target, value);\n return true;\n }\n return false;\n}\nfunction $eab8f97afa7948b4$export$2b6207be55b7460b(details) {\n var value = details.value;\n if ((0, $533f826bbc418791$export$871608497c498473)(value)) {\n details.result = new Date(value.getTime());\n return true;\n }\n return false;\n}\nfunction $eab8f97afa7948b4$export$56ca4b82c6e32658(details) {\n if (details.type === (0, $b347daff6f5f8dc1$export$601fe16600f10158)) return true;\n return false;\n}\nfunction $eab8f97afa7948b4$export$7d1ebb7d4f033054(details) {\n var value = details.value;\n if (value && details.isPlain) {\n // Assign the \"result\" value before performing any additional deep Copying, so any recursive object get a reference to this instance\n var target = details.result = {};\n details.copyTo(target, value);\n return true;\n }\n return false;\n}\n\n\n/**\r\n * @internal\r\n * @ignore\r\n */ function $9042921d36c971e1$var$_doExtend(target, theArgs) {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(theArgs, function(theArg) {\n (0, $eab8f97afa7948b4$export$eee89407658fa201)(target, theArg);\n });\n return target;\n}\nfunction $9042921d36c971e1$export$54e9fb29908872fa(target, obj1, obj2, obj3, obj4, obj5, obj6) {\n return $9042921d36c971e1$var$_doExtend((0, $eab8f97afa7948b4$export$ee1b2e0d6501c954)(target) || {}, (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments));\n}\nfunction $9042921d36c971e1$export$a7f7e50f928053df(target, obj1, obj2, obj3, obj4, obj5, obj6) {\n return $9042921d36c971e1$var$_doExtend(target || {}, (0, $46728a52dfc641a6$export$1bea104a0e2567f0)(arguments));\n}\n\n\n\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ var $f66a763d1ac581a5$export$a1373ad9f192f374 = 500;\n\n\n\n\n\n\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\n\nvar $21e0e68428bc90cf$var$defaultValues = {\n perfEvtsSendAll: false\n};\nfunction $21e0e68428bc90cf$var$_runListeners(listeners, name, isAsync, callback) {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(listeners, function(listener) {\n if (listener && listener[name]) {\n if (isAsync) (0, $d03b12effd00bf96$export$5f4d6617421d489b)(function() {\n return callback(listener);\n }, 0);\n else try {\n callback(listener);\n } catch (e) {\n // Catch errors to ensure we don't block sending the requests\n }\n }\n });\n}\n/**\r\n * Class to manage sending notifications to all the listeners.\r\n */ var $21e0e68428bc90cf$export$dfa1f14b6290f8c5 = /** @class */ function() {\n function NotificationManager(config) {\n this.listeners = [];\n var perfEvtsSendAll;\n var unloadHandler;\n var _listeners = [];\n var cfgHandler = (0, $acb30f9e62dc5705$export$3a9e9180c14487fd)(config, $21e0e68428bc90cf$var$defaultValues);\n unloadHandler = cfgHandler[0, $1ae5573ce493bccc$export$fc59eec8d77f3766 /* @min:%2ewatch */ ](function(details) {\n perfEvtsSendAll = !!details.cfg.perfEvtsSendAll;\n });\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(NotificationManager, this, function(_self) {\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"listeners\", {\n g: function() {\n return _listeners;\n }\n });\n _self[0, $1ae5573ce493bccc$export$5c8bcfab4f42ca62 /* @min:%2eaddNotificationListener */ ] = function(listener) {\n _listeners[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](listener);\n };\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - AWTNotificationListener to remove.\r\n */ _self[0, $1ae5573ce493bccc$export$861144ba9c13be60 /* @min:%2eremoveNotificationListener */ ] = function(listener) {\n var index = (0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(_listeners, listener);\n while(index > -1){\n _listeners[0, $1ae5573ce493bccc$export$84020a2e4fe863b0 /* @min:%2esplice */ ](index, 1);\n index = (0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(_listeners, listener);\n }\n };\n /**\r\n * Notification for events sent.\r\n * @param events - The array of events that have been sent.\r\n */ _self[0, $9fe4a5d5204a4cff$export$bb3c4bc1b1175d3d /* @min:%2eeventsSent */ ] = function(events) {\n $21e0e68428bc90cf$var$_runListeners(_listeners, (0, $9fe4a5d5204a4cff$export$bb3c4bc1b1175d3d), true, function(listener) {\n listener[0, $9fe4a5d5204a4cff$export$bb3c4bc1b1175d3d /* @min:%2eeventsSent */ ](events);\n });\n };\n /**\r\n * Notification for events being discarded.\r\n * @param events - The array of events that have been discarded by the SDK.\r\n * @param reason - The reason for which the SDK discarded the events. The EventsDiscardedReason\r\n * constant should be used to check the different values.\r\n */ _self[0, $9fe4a5d5204a4cff$export$bacb5b2f4c1081b9 /* @min:%2eeventsDiscarded */ ] = function(events, reason) {\n $21e0e68428bc90cf$var$_runListeners(_listeners, (0, $9fe4a5d5204a4cff$export$bacb5b2f4c1081b9), true, function(listener) {\n listener[0, $9fe4a5d5204a4cff$export$bacb5b2f4c1081b9 /* @min:%2eeventsDiscarded */ ](events, reason);\n });\n };\n /**\r\n * [Optional] A function called when the events have been requested to be sent to the sever.\r\n * @param sendReason - The reason why the event batch is being sent.\r\n * @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.\r\n */ _self[0, $9fe4a5d5204a4cff$export$d75e063cb88a1c25 /* @min:%2eeventsSendRequest */ ] = function(sendReason, isAsync) {\n $21e0e68428bc90cf$var$_runListeners(_listeners, (0, $9fe4a5d5204a4cff$export$d75e063cb88a1c25), isAsync, function(listener) {\n listener[0, $9fe4a5d5204a4cff$export$d75e063cb88a1c25 /* @min:%2eeventsSendRequest */ ](sendReason, isAsync);\n });\n };\n _self[0, $9fe4a5d5204a4cff$export$5d265841733c97c3 /* @min:%2eperfEvent */ ] = function(perfEvent) {\n if (perfEvent) // Send all events or only parent events\n {\n if (perfEvtsSendAll || !perfEvent[0, $1ae5573ce493bccc$export$3a89026537e5dfec /* @min:%2eisChildEvt */ ]()) $21e0e68428bc90cf$var$_runListeners(_listeners, (0, $9fe4a5d5204a4cff$export$5d265841733c97c3), false, function(listener) {\n if (perfEvent[0, $1ae5573ce493bccc$export$d8114c9e990204cb /* @min:%2eisAsync */ ]) (0, $d03b12effd00bf96$export$5f4d6617421d489b)(function() {\n return listener[0, $9fe4a5d5204a4cff$export$5d265841733c97c3 /* @min:%2eperfEvent */ ](perfEvent);\n }, 0);\n else listener[0, $9fe4a5d5204a4cff$export$5d265841733c97c3 /* @min:%2eperfEvent */ ](perfEvent);\n });\n }\n };\n _self[0, $1ae5573ce493bccc$export$7eb85b5cba77a43d /* @min:%2eunload */ ] = function(isAsync) {\n var _finishUnload = function() {\n unloadHandler && unloadHandler.rm();\n unloadHandler = null;\n _listeners = [];\n };\n var waiting;\n $21e0e68428bc90cf$var$_runListeners(_listeners, \"unload\", false, function(listener) {\n var asyncUnload = listener[0, $1ae5573ce493bccc$export$7eb85b5cba77a43d /* @min:%2eunload */ ](isAsync);\n if (asyncUnload) {\n if (!waiting) waiting = [];\n waiting[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](asyncUnload);\n }\n });\n if (waiting) return (0, $911d39c591a62618$export$5a1eb20c68656e88)(function(resolve) {\n return (0, $a99c2448b4d73401$export$856fe465480fa77a)((0, $911d39c591a62618$export$1ed2fd8fe9f5c6)(waiting), function() {\n _finishUnload();\n resolve();\n });\n });\n else _finishUnload();\n };\n });\n }\n // Removed Stub for NotificationManager.prototype.addNotificationListener.\n // Removed Stub for NotificationManager.prototype.removeNotificationListener.\n // Removed Stub for NotificationManager.prototype.eventsSent.\n // Removed Stub for NotificationManager.prototype.eventsDiscarded.\n // Removed Stub for NotificationManager.prototype.eventsSendRequest.\n // Removed Stub for NotificationManager.prototype.perfEvent.\n // Removed Stub for NotificationManager.prototype.unload.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n NotificationManager.__ieDyn = 1;\n return NotificationManager;\n}();\n\n\n\n\n\n/*\n * Application Insights JavaScript SDK - Core, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // \n// \n\n\n\n\n\n\n\n\nfunction $4d4645ee8836015f$var$_addInitializer(_initializers, id, telemetryInitializer) {\n var theInitializer = {\n id: id,\n fn: telemetryInitializer\n };\n (0, $54343718a076ab6e$export$69c7b96f216fdf7b)(_initializers, theInitializer);\n var handler = {\n remove: function() {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_initializers, function(initializer, idx) {\n if (initializer.id === theInitializer.id) {\n _initializers[0, $1ae5573ce493bccc$export$84020a2e4fe863b0 /* @min:%2esplice */ ](idx, 1);\n return -1;\n }\n });\n }\n };\n return handler;\n}\nfunction $4d4645ee8836015f$var$_runInitializers(_initializers, item, logger) {\n var doNotSendItem = false;\n var telemetryInitializersCount = _initializers[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ];\n for(var i = 0; i < telemetryInitializersCount; ++i){\n var telemetryInitializer = _initializers[i];\n if (telemetryInitializer) try {\n if (telemetryInitializer.fn[0, $1ae5573ce493bccc$export$2f85ca6962b15ff8 /* @min:%2eapply */ ](null, [\n item\n ]) === false) {\n doNotSendItem = true;\n break;\n }\n } catch (e) {\n // log error but dont stop executing rest of the telemetry initializers\n // doNotSendItem = true;\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 64 /* _eInternalMessageId.TelemetryInitializerFailed */ , \"Telemetry initializer failed: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n }, true);\n }\n }\n return !doNotSendItem;\n}\nvar $4d4645ee8836015f$export$5da7f32cc3b89dc1 = /** @class */ function(_super) {\n (0, $2a74b38b87b38cda$export$1f9c32e3fbfb8e62)(TelemetryInitializerPlugin, _super);\n function TelemetryInitializerPlugin() {\n var _this = _super.call(this) || this;\n _this.identifier = \"TelemetryInitializerPlugin\";\n _this.priority = 199;\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\n var _id;\n var _initializers;\n _initDefaults();\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(TelemetryInitializerPlugin, _this, function(_self, _base) {\n _self.addTelemetryInitializer = function(telemetryInitializer) {\n return $4d4645ee8836015f$var$_addInitializer(_initializers, _id++, telemetryInitializer);\n };\n _self[0, $9fe4a5d5204a4cff$export$820a3bce4a265606 /* @min:%2eprocessTelemetry */ ] = function(item, itemCtx) {\n if ($4d4645ee8836015f$var$_runInitializers(_initializers, item, itemCtx ? itemCtx[0, $1ae5573ce493bccc$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ]() : _self[0, $1ae5573ce493bccc$export$c7ff2c36e5c78421 /* @min:%2ediagLog */ ]())) _self[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ](item, itemCtx);\n };\n _self[0, $1ae5573ce493bccc$export$458d234b616d0745 /* @min:%2e_doTeardown */ ] = function() {\n _initDefaults();\n };\n });\n function _initDefaults() {\n _id = 0;\n _initializers = [];\n }\n return _this;\n }\n // Removed Stub for TelemetryInitializerPlugin.prototype.addTelemetryInitializer.\n // Removed Stub for TelemetryInitializerPlugin.prototype.processTelemetry.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n TelemetryInitializerPlugin.__ieDyn = 1;\n return TelemetryInitializerPlugin;\n}((0, $b61d51369f8191a4$export$64a11c2f90e6766c));\n\n\n\n\n\"use strict\";\nvar $e5177bba49076348$var$_a;\nvar $e5177bba49076348$var$strValidationError = \"Plugins must provide initialize method\";\nvar $e5177bba49076348$var$strNotificationManager = \"_notificationManager\";\nvar $e5177bba49076348$var$strSdkUnloadingError = \"SDK is still unloading...\";\nvar $e5177bba49076348$var$strSdkNotInitialized = \"SDK is not initialized\";\n// const strPluginUnloadFailed = \"Failed to unload plugin\";\n/**\r\n * The default settings for the config.\r\n * WE MUST include all defaults here to ensure that the config is created with all of the properties\r\n * defined as dynamic.\r\n */ var $e5177bba49076348$var$defaultConfig = (0, $36a077d9f4439b69$export$a15782d21797da4c)(($e5177bba49076348$var$_a = {\n cookieCfg: {}\n}, $e5177bba49076348$var$_a[0, $9fe4a5d5204a4cff$export$a077ce616a1ab4ee] = {\n rdOnly: true,\n ref: true,\n v: []\n}, $e5177bba49076348$var$_a[0, $9fe4a5d5204a4cff$export$829012af4b2055a2] = {\n rdOnly: true,\n ref: true,\n v: []\n}, $e5177bba49076348$var$_a[0, $9fe4a5d5204a4cff$export$ffb2356587263734] = {\n ref: true,\n v: {}\n}, $e5177bba49076348$var$_a[0, $9fe4a5d5204a4cff$export$1cf3476332da55b3] = (0, $9fe4a5d5204a4cff$export$a43287864529b8fd), $e5177bba49076348$var$_a.loggingLevelConsole = 0 /* eLoggingSeverity.DISABLED */ , $e5177bba49076348$var$_a.diagnosticLogInterval = (0, $9fe4a5d5204a4cff$export$a43287864529b8fd), $e5177bba49076348$var$_a));\n/**\r\n * Helper to create the default performance manager\r\n * @param core\r\n * @param notificationMgr\r\n */ function $e5177bba49076348$var$_createPerfManager(core, notificationMgr) {\n return new (0, $28deccfc004f252b$export$cbeb6df2e8e9b5ae)(notificationMgr);\n}\nfunction $e5177bba49076348$var$_validateExtensions(logger, channelPriority, allExtensions) {\n var _a;\n // Concat all available extensions\n var coreExtensions = [];\n var channels = [];\n // Check if any two extensions have the same priority, then warn to console\n // And extract the local extensions from the\n var extPriorities = {};\n // Extension validation\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(allExtensions, function(ext) {\n // Check for ext.initialize\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(ext) || (0, $533f826bbc418791$export$bedb7023a7733221)(ext[0, $1ae5573ce493bccc$export$65cd33bb52d04675 /* @min:%2einitialize */ ])) (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)($e5177bba49076348$var$strValidationError);\n var extPriority = ext[0, $9fe4a5d5204a4cff$export$58efcc07763b37be /* @min:%2epriority */ ];\n var identifier = ext[0, $1ae5573ce493bccc$export$f001befbf8417151 /* @min:%2eidentifier */ ];\n if (ext && extPriority) {\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(extPriorities[extPriority])) (0, $cc2aaaebf96ac6a7$export$25fb4cb97863f0a8)(logger, \"Two extensions have same priority #\" + extPriority + \" - \" + extPriorities[extPriority] + \", \" + identifier);\n else // set a value\n extPriorities[extPriority] = identifier;\n }\n // Split extensions to core and channels\n if (!extPriority || extPriority < channelPriority) // Add to core extension that will be managed by AppInsightsCore\n coreExtensions[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](ext);\n else channels[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](ext);\n });\n return _a = {}, _a[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:core */ ] = coreExtensions, _a[0, $9fe4a5d5204a4cff$export$829012af4b2055a2 /* @min:channels */ ] = channels, _a;\n}\nfunction $e5177bba49076348$var$_isPluginPresent(thePlugin, plugins) {\n var exists = false;\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(plugins, function(plugin) {\n if (plugin === thePlugin) {\n exists = true;\n return -1;\n }\n });\n return exists;\n}\nfunction $e5177bba49076348$var$_deepMergeConfig(details, target, newValues, merge) {\n // Lets assign the new values to the existing config\n if (newValues) (0, $45e528077703ac0c$export$aa0705d5774c95d1)(newValues, function(key, value) {\n if (merge) {\n if ((0, $a339b44c6e62d324$export$53b83ca8eaab0383)(value) && (0, $a339b44c6e62d324$export$53b83ca8eaab0383)(target[key])) // The target is an object and it has a value\n $e5177bba49076348$var$_deepMergeConfig(details, target[key], value, merge);\n }\n if (merge && (0, $a339b44c6e62d324$export$53b83ca8eaab0383)(value) && (0, $a339b44c6e62d324$export$53b83ca8eaab0383)(target[key])) // The target is an object and it has a value\n $e5177bba49076348$var$_deepMergeConfig(details, target[key], value, merge);\n else // Just Assign (replace) and/or make the property dynamic\n details.set(target, key, value);\n });\n}\nfunction $e5177bba49076348$var$_findWatcher(listeners, newWatcher) {\n var theListener = null;\n var idx = -1;\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(listeners, function(listener, lp) {\n if (listener.w === newWatcher) {\n theListener = listener;\n idx = lp;\n return -1;\n }\n });\n return {\n i: idx,\n l: theListener\n };\n}\nfunction $e5177bba49076348$var$_addDelayedCfgListener(listeners, newWatcher) {\n var theListener = $e5177bba49076348$var$_findWatcher(listeners, newWatcher).l;\n if (!theListener) {\n theListener = {\n w: newWatcher,\n rm: function() {\n var fnd = $e5177bba49076348$var$_findWatcher(listeners, newWatcher);\n if (fnd.i !== -1) listeners[0, $1ae5573ce493bccc$export$84020a2e4fe863b0 /* @min:%2esplice */ ](fnd.i, 1);\n }\n };\n listeners[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](theListener);\n }\n return theListener;\n}\nfunction $e5177bba49076348$var$_registerDelayedCfgListener(config, listeners, logger) {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(listeners, function(listener) {\n var unloadHdl = (0, $acb30f9e62dc5705$export$454a433e4deb244f)(config, listener.w, logger);\n delete listener.w; // Clear the listener reference so it will get garbage collected.\n // replace the remove function\n listener.rm = function() {\n unloadHdl.rm();\n };\n });\n}\nvar $e5177bba49076348$export$e7ac25a6828d23bf = /** @class */ function() {\n function AppInsightsCore() {\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\n var _configHandler;\n var _isInitialized;\n var _logger;\n var _eventQueue;\n var _notificationManager;\n var _perfManager;\n var _cfgPerfManager;\n var _cookieManager;\n var _pluginChain;\n var _configExtensions;\n var _channelConfig;\n var _channels;\n var _isUnloading;\n var _telemetryInitializerPlugin;\n var _internalLogsEventName;\n var _evtNamespace;\n var _unloadHandlers;\n var _hookContainer;\n var _debugListener;\n var _traceCtx;\n var _instrumentationKey;\n var _cfgListeners;\n var _extensions;\n var _pluginVersionStringArr;\n var _pluginVersionString;\n /**\r\n * Internal log poller\r\n */ var _internalLogPoller;\n var _internalLogPollerListening;\n var _forceStopInternalLogPoller;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(AppInsightsCore, this, function(_self) {\n // Set the default values (also called during teardown)\n _initDefaults();\n // Special internal method to allow the unit tests and DebugPlugin to hook embedded objects\n _self[\"_getDbgPlgTargets\"] = function() {\n return [\n _extensions\n ];\n };\n _self[0, $1ae5573ce493bccc$export$2e2716e9c35a66a8 /* @min:%2eisInitialized */ ] = function() {\n return _isInitialized;\n };\n // Creating the self.initialize = ()\n _self[0, $1ae5573ce493bccc$export$65cd33bb52d04675 /* @min:%2einitialize */ ] = function(config, extensions, logger, notificationManager) {\n if (_isUnloading) (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)($e5177bba49076348$var$strSdkUnloadingError);\n // Make sure core is only initialized once\n if (_self[0, $1ae5573ce493bccc$export$2e2716e9c35a66a8 /* @min:%2eisInitialized */ ]()) (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)(\"Core cannot be initialized more than once\");\n _configHandler = (0, $acb30f9e62dc5705$export$3a9e9180c14487fd)(config, $e5177bba49076348$var$defaultConfig, logger || _self[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ], false);\n // Re-assigning the local config property so we don't have any references to the passed value and it can be garbage collected\n config = _configHandler.cfg;\n // This will be \"re-run\" if the referenced config properties are changed\n _addUnloadHook(_configHandler[0, $1ae5573ce493bccc$export$fc59eec8d77f3766 /* @min:%2ewatch */ ](function(details) {\n _instrumentationKey = details.cfg.instrumentationKey;\n // Mark the extensionConfig and all first level keys as referenced\n // This is so that calls to getExtCfg() will always return the same object\n // Even when a user may \"re-assign\" the plugin properties (or it's unloaded/reloaded)\n var extCfg = details.ref(details.cfg, (0, $9fe4a5d5204a4cff$export$ffb2356587263734));\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(extCfg, function(key) {\n details.ref(extCfg, key);\n });\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(_instrumentationKey)) (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)(\"Please provide instrumentation key\");\n }));\n _notificationManager = notificationManager;\n _initDebugListener();\n _initPerfManager();\n _self[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ] = logger;\n var cfgExtensions = config[0, $9fe4a5d5204a4cff$export$a077ce616a1ab4ee /* @min:%2eextensions */ ];\n // Extension validation\n _configExtensions = [];\n _configExtensions[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ].apply(_configExtensions, (0, $2a74b38b87b38cda$export$643fbb7023bc1942)((0, $2a74b38b87b38cda$export$643fbb7023bc1942)([], extensions, false), cfgExtensions, false));\n _channelConfig = config[0, $9fe4a5d5204a4cff$export$829012af4b2055a2 /* @min:%2echannels */ ];\n _initPluginChain(null);\n if (!_channels || _channels[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] === 0) (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)(\"No \" + (0, $9fe4a5d5204a4cff$export$829012af4b2055a2) + \" available\");\n if (_channelConfig && _channelConfig[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 1) {\n var teeController = _self[0, $1ae5573ce493bccc$export$37717a508eca6e2d /* @min:%2egetPlugin */ ](\"TeeChannelController\");\n if (!teeController || !teeController.plugin) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_logger, 1 /* eLoggingSeverity.CRITICAL */ , 28 /* _eInternalMessageId.SenderNotInitialized */ , \"TeeChannel required\");\n }\n $e5177bba49076348$var$_registerDelayedCfgListener(config, _cfgListeners, _logger);\n _cfgListeners = null;\n _isInitialized = true;\n _self.releaseQueue();\n _self[0, $1ae5573ce493bccc$export$538c138266a38409 /* @min:%2epollInternalLogs */ ]();\n };\n _self.getChannels = function() {\n var controls = [];\n if (_channels) (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_channels, function(channel) {\n controls[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](channel);\n });\n return (0, $36a077d9f4439b69$export$5da24d7703175bc5)(controls);\n };\n _self.track = function(telemetryItem) {\n (0, $28deccfc004f252b$export$c6fbeb260600c482)(_self[0, $9fe4a5d5204a4cff$export$f8b08c7de64edfbf /* @min:%2egetPerfMgr */ ](), function() {\n return \"AppInsightsCore:track\";\n }, function() {\n if (telemetryItem === null) {\n _notifyInvalidEvent(telemetryItem);\n // throw error\n (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)(\"Invalid telemetry item\");\n }\n // do basic validation before sending it through the pipeline\n if (!telemetryItem[0, $1ae5573ce493bccc$export$9734b0a24bf02e93 /* @min:%2ename */ ] && (0, $533f826bbc418791$export$bedb7023a7733221)(telemetryItem[0, $1ae5573ce493bccc$export$9734b0a24bf02e93 /* @min:%2ename */ ])) {\n _notifyInvalidEvent(telemetryItem);\n (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)(\"telemetry name required\");\n }\n // setup default iKey if not passed in\n telemetryItem.iKey = telemetryItem.iKey || _instrumentationKey;\n // add default timestamp if not passed in\n telemetryItem[0, $1ae5573ce493bccc$export$7b5ba5854159c1f0 /* @min:%2etime */ ] = telemetryItem[0, $1ae5573ce493bccc$export$7b5ba5854159c1f0 /* @min:%2etime */ ] || (0, $0b747974b0bb3563$export$dfaaa8705752128f)(new Date());\n // Common Schema 4.0\n telemetryItem.ver = telemetryItem.ver || \"4.0\";\n if (!_isUnloading && _self[0, $1ae5573ce493bccc$export$2e2716e9c35a66a8 /* @min:%2eisInitialized */ ]()) // Process the telemetry plugin chain\n _createTelCtx()[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ](telemetryItem);\n else // Queue events until all extensions are initialized\n _eventQueue[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](telemetryItem);\n }, function() {\n return {\n item: telemetryItem\n };\n }, !telemetryItem.sync);\n };\n _self[0, $1ae5573ce493bccc$export$a08d24db8e8aa3f3 /* @min:%2egetProcessTelContext */ ] = _createTelCtx;\n _self[0, $1ae5573ce493bccc$export$3a09068de032bb32 /* @min:%2egetNotifyMgr */ ] = function() {\n if (!_notificationManager) {\n _notificationManager = new (0, $21e0e68428bc90cf$export$dfa1f14b6290f8c5)(_configHandler.cfg);\n // For backward compatibility only\n _self[$e5177bba49076348$var$strNotificationManager] = _notificationManager;\n }\n return _notificationManager;\n };\n /**\r\n * Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.\r\n * The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be\r\n * called.\r\n * @param listener - An INotificationListener object.\r\n */ _self[0, $1ae5573ce493bccc$export$5c8bcfab4f42ca62 /* @min:%2eaddNotificationListener */ ] = function(listener) {\n _self[0, $1ae5573ce493bccc$export$3a09068de032bb32 /* @min:%2egetNotifyMgr */ ]()[0, $1ae5573ce493bccc$export$5c8bcfab4f42ca62 /* @min:%2eaddNotificationListener */ ](listener);\n };\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - INotificationListener to remove.\r\n */ _self[0, $1ae5573ce493bccc$export$861144ba9c13be60 /* @min:%2eremoveNotificationListener */ ] = function(listener) {\n if (_notificationManager) _notificationManager[0, $1ae5573ce493bccc$export$861144ba9c13be60 /* @min:%2eremoveNotificationListener */ ](listener);\n };\n _self.getCookieMgr = function() {\n if (!_cookieManager) _cookieManager = (0, $d751d7cd1b1c5598$export$2ae082191ac44e5a)(_configHandler.cfg, _self[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ]);\n return _cookieManager;\n };\n _self.setCookieMgr = function(cookieMgr) {\n if (_cookieManager !== cookieMgr) {\n (0, $2cb93c1cbddb67ab$export$86347c3dd68c03f6)(_cookieManager, false);\n _cookieManager = cookieMgr;\n }\n };\n _self[0, $9fe4a5d5204a4cff$export$f8b08c7de64edfbf /* @min:%2egetPerfMgr */ ] = function() {\n if (!_perfManager && !_cfgPerfManager) _addUnloadHook(_configHandler[0, $1ae5573ce493bccc$export$fc59eec8d77f3766 /* @min:%2ewatch */ ](function(details) {\n if (details.cfg.enablePerfMgr) {\n var createPerfMgr = details.cfg[0, $9fe4a5d5204a4cff$export$1cf3476332da55b3 /* @min:%2ecreatePerfMgr */ ];\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(createPerfMgr)) _cfgPerfManager = createPerfMgr(_self, _self[0, $1ae5573ce493bccc$export$3a09068de032bb32 /* @min:%2egetNotifyMgr */ ]());\n }\n }));\n return _perfManager || _cfgPerfManager || (0, $28deccfc004f252b$export$6cdbf3f34ace6568)();\n };\n _self.setPerfMgr = function(perfMgr) {\n _perfManager = perfMgr;\n };\n _self.eventCnt = function() {\n return _eventQueue[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ];\n };\n _self.releaseQueue = function() {\n if (_isInitialized && _eventQueue[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n var eventQueue = _eventQueue;\n _eventQueue = [];\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(eventQueue, function(event) {\n _createTelCtx()[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ](event);\n });\n }\n };\n _self[0, $1ae5573ce493bccc$export$538c138266a38409 /* @min:%2epollInternalLogs */ ] = function(eventName) {\n _internalLogsEventName = eventName || null;\n _forceStopInternalLogPoller = false;\n _internalLogPoller && _internalLogPoller[0, $1ae5573ce493bccc$export$bd01c5e3f12db01c /* @min:%2ecancel */ ]();\n return _startLogPoller(true);\n };\n function _startLogPoller(alwaysStart) {\n if ((!_internalLogPoller || !_internalLogPoller[0, $1ae5573ce493bccc$export$c9b1609f2b84393a /* @min:%2eenabled */ ]) && !_forceStopInternalLogPoller) {\n var shouldStart = alwaysStart || _logger && _logger.queue[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0;\n if (shouldStart) {\n if (!_internalLogPollerListening) {\n _internalLogPollerListening = true;\n // listen for any configuration changes so that changes to the\n // interval will cause the timer to be re-initialized\n _addUnloadHook(_configHandler[0, $1ae5573ce493bccc$export$fc59eec8d77f3766 /* @min:%2ewatch */ ](function(details) {\n var interval = details.cfg.diagnosticLogInterval;\n if (!interval || !(interval > 0)) interval = 10000;\n var isRunning = false;\n if (_internalLogPoller) {\n // It was already created so remember it's running and cancel\n isRunning = _internalLogPoller[0, $1ae5573ce493bccc$export$c9b1609f2b84393a /* @min:%2eenabled */ ];\n _internalLogPoller[0, $1ae5573ce493bccc$export$bd01c5e3f12db01c /* @min:%2ecancel */ ]();\n }\n // Create / reconfigure\n _internalLogPoller = (0, $d03b12effd00bf96$export$6eae7cf7a129a986)(_flushInternalLogs, interval);\n _internalLogPoller.unref();\n // Restart if previously running\n _internalLogPoller[0, $1ae5573ce493bccc$export$c9b1609f2b84393a /* @min:%2eenabled */ ] = isRunning;\n }));\n }\n _internalLogPoller[0, $1ae5573ce493bccc$export$c9b1609f2b84393a /* @min:%2eenabled */ ] = true;\n }\n }\n return _internalLogPoller;\n }\n _self[0, $1ae5573ce493bccc$export$8d1c48dba7ad83a /* @min:%2estopPollingInternalLogs */ ] = function() {\n _forceStopInternalLogPoller = true;\n _internalLogPoller && _internalLogPoller[0, $1ae5573ce493bccc$export$bd01c5e3f12db01c /* @min:%2ecancel */ ]();\n _flushInternalLogs();\n };\n // Add addTelemetryInitializer\n (0, $0b747974b0bb3563$export$94f4c7fb7e7d8dc7)(_self, function() {\n return _telemetryInitializerPlugin;\n }, [\n \"addTelemetryInitializer\"\n ]);\n _self[0, $1ae5573ce493bccc$export$7eb85b5cba77a43d /* @min:%2eunload */ ] = function(isAsync, unloadComplete, cbTimeout) {\n var _a;\n if (isAsync === void 0) isAsync = true;\n if (!_isInitialized) // The SDK is not initialized\n (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)($e5177bba49076348$var$strSdkNotInitialized);\n // Check if the SDK still unloading so throw\n if (_isUnloading) // The SDK is already unloading\n (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)($e5177bba49076348$var$strSdkUnloadingError);\n var unloadState = (_a = {\n reason: 50 /* TelemetryUnloadReason.SdkUnload */ \n }, _a[0, $1ae5573ce493bccc$export$d8114c9e990204cb /* @min:isAsync */ ] = isAsync, _a.flushComplete = false, _a);\n var result;\n if (isAsync && !unloadComplete) result = (0, $911d39c591a62618$export$5a1eb20c68656e88)(function(resolve) {\n // Set the callback to the promise resolve callback\n unloadComplete = resolve;\n });\n var processUnloadCtx = (0, $bc7124acb0f73e64$export$91bbbd4999751948)(_getPluginChain(), _self);\n processUnloadCtx[0, $1ae5573ce493bccc$export$8693bdba21bfca93 /* @min:%2eonComplete */ ](function() {\n _hookContainer.run(_self[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ]);\n // Run any \"unload\" functions for the _cookieManager, _notificationManager and _logger\n (0, $2cb93c1cbddb67ab$export$bc81824d13c51ef3)([\n _cookieManager,\n _notificationManager,\n _logger\n ], isAsync, function() {\n _initDefaults();\n unloadComplete && unloadComplete(unloadState);\n });\n }, _self);\n function _doUnload(flushComplete) {\n unloadState.flushComplete = flushComplete;\n _isUnloading = true;\n // Run all of the unload handlers first (before unloading the plugins)\n _unloadHandlers.run(processUnloadCtx, unloadState);\n // Stop polling the internal logs\n _self[0, $1ae5573ce493bccc$export$8d1c48dba7ad83a /* @min:%2estopPollingInternalLogs */ ]();\n // Start unloading the components, from this point onwards the SDK should be considered to be in an unstable state\n processUnloadCtx[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ](unloadState);\n }\n _flushInternalLogs();\n if (!_flushChannels(isAsync, _doUnload, 6 /* SendRequestReason.SdkUnload */ , cbTimeout)) _doUnload(false);\n return result;\n };\n _self[0, $1ae5573ce493bccc$export$37717a508eca6e2d /* @min:%2egetPlugin */ ] = _getPlugin;\n _self.addPlugin = function(plugin, replaceExisting, isAsync, addCb) {\n if (!plugin) {\n addCb && addCb(false);\n _logOrThrowError($e5177bba49076348$var$strValidationError);\n return;\n }\n var existingPlugin = _getPlugin(plugin[0, $1ae5573ce493bccc$export$f001befbf8417151 /* @min:%2eidentifier */ ]);\n if (existingPlugin && !replaceExisting) {\n addCb && addCb(false);\n _logOrThrowError(\"Plugin [\" + plugin[0, $1ae5573ce493bccc$export$f001befbf8417151 /* @min:%2eidentifier */ ] + \"] is already loaded!\");\n return;\n }\n var updateState = {\n reason: 16 /* TelemetryUpdateReason.PluginAdded */ \n };\n function _addPlugin(removed) {\n _configExtensions[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](plugin);\n updateState.added = [\n plugin\n ];\n // Re-Initialize the plugin chain\n _initPluginChain(updateState);\n addCb && addCb(true);\n }\n if (existingPlugin) {\n var removedPlugins_1 = [\n existingPlugin.plugin\n ];\n var unloadState = {\n reason: 2 /* TelemetryUnloadReason.PluginReplace */ ,\n isAsync: !!isAsync\n };\n _removePlugins(removedPlugins_1, unloadState, function(removed) {\n if (!removed) // Previous plugin was successfully removed or was not installed\n addCb && addCb(false);\n else {\n updateState.removed = removedPlugins_1;\n updateState.reason |= 32 /* TelemetryUpdateReason.PluginRemoved */ ;\n _addPlugin(true);\n }\n });\n } else _addPlugin(false);\n };\n _self.updateCfg = function(newConfig, mergeExisting) {\n if (mergeExisting === void 0) mergeExisting = true;\n var updateState;\n if (_self[0, $1ae5573ce493bccc$export$2e2716e9c35a66a8 /* @min:%2eisInitialized */ ]()) {\n updateState = {\n reason: 1 /* TelemetryUpdateReason.ConfigurationChanged */ ,\n cfg: _configHandler.cfg,\n oldCfg: (0, $9042921d36c971e1$export$54e9fb29908872fa)({}, _configHandler.cfg),\n newConfig: (0, $9042921d36c971e1$export$54e9fb29908872fa)({}, newConfig),\n merge: mergeExisting\n };\n newConfig = updateState.newConfig;\n var cfg = _configHandler.cfg;\n // replace the immutable (if initialized) values\n // We don't currently allow updating the extensions and channels via the update config\n // So overwriting any user provided values to reuse the existing values\n newConfig[0, $9fe4a5d5204a4cff$export$a077ce616a1ab4ee /* @min:%2eextensions */ ] = cfg[0, $9fe4a5d5204a4cff$export$a077ce616a1ab4ee /* @min:%2eextensions */ ];\n newConfig[0, $9fe4a5d5204a4cff$export$829012af4b2055a2 /* @min:%2echannels */ ] = cfg[0, $9fe4a5d5204a4cff$export$829012af4b2055a2 /* @min:%2echannels */ ];\n }\n // Explicitly blocking any previous config watchers so that they don't get called because\n // of this bulk update (Probably not necessary)\n _configHandler._block(function(details) {\n // Lets assign the new values to the existing config either overwriting or re-assigning\n var theConfig = details.cfg;\n $e5177bba49076348$var$_deepMergeConfig(details, theConfig, newConfig, mergeExisting);\n if (!mergeExisting) // Remove (unassign) the values \"missing\" from the newConfig and also not in the default config\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(theConfig, function(key) {\n if (!(0, $08325aa6d8565cc0$export$34e6b98f73578a9c)(newConfig, key)) // Set the value to undefined\n details.set(theConfig, key, (0, $9fe4a5d5204a4cff$export$a43287864529b8fd));\n });\n // Apply defaults to the new config\n details[0, $1ae5573ce493bccc$export$24caac6d68ff1537 /* @min:%2esetDf */ ](theConfig, $e5177bba49076348$var$defaultConfig);\n }, true);\n // Now execute all of the listeners (synchronously) so they update their values immediately\n _configHandler[0, $1ae5573ce493bccc$export$6c2b24c6eee14c46 /* @min:%2enotify */ ]();\n if (updateState) _doUpdate(updateState);\n };\n _self.evtNamespace = function() {\n return _evtNamespace;\n };\n _self.flush = _flushChannels;\n _self.getTraceCtx = function(createNew) {\n if (!_traceCtx) _traceCtx = (0, $757da337740268ac$export$10fa4480433f402c)();\n return _traceCtx;\n };\n _self.setTraceCtx = function(traceCtx) {\n _traceCtx = traceCtx || null;\n };\n _self.addUnloadHook = _addUnloadHook;\n // Create the addUnloadCb\n (0, $0b747974b0bb3563$export$5dd8d245f6f94a18)(_self, \"addUnloadCb\", function() {\n return _unloadHandlers;\n }, \"add\");\n _self.onCfgChange = function(handler) {\n var unloadHook;\n if (!_isInitialized) unloadHook = $e5177bba49076348$var$_addDelayedCfgListener(_cfgListeners, handler);\n else unloadHook = (0, $acb30f9e62dc5705$export$454a433e4deb244f)(_configHandler.cfg, handler, _self[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ]);\n return {\n rm: function() {\n unloadHook.rm();\n }\n };\n };\n _self.getWParam = function() {\n return (0, $3d5fcb60a9467a45$export$c4372eca9c56fe99)() || !!_configHandler.cfg.enableWParam ? 0 : -1;\n };\n function _setPluginVersions() {\n var thePlugins = {};\n _pluginVersionStringArr = [];\n var _addPluginVersions = function(plugins) {\n if (plugins) (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(plugins, function(plugin) {\n if (plugin[0, $1ae5573ce493bccc$export$f001befbf8417151 /* @min:%2eidentifier */ ] && plugin[0, $1ae5573ce493bccc$export$568c4302d11f2b22 /* @min:%2eversion */ ] && !thePlugins[plugin.identifier]) {\n var ver = plugin[0, $1ae5573ce493bccc$export$f001befbf8417151 /* @min:%2eidentifier */ ] + \"=\" + plugin[0, $1ae5573ce493bccc$export$568c4302d11f2b22 /* @min:%2eversion */ ];\n _pluginVersionStringArr[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](ver);\n thePlugins[plugin.identifier] = plugin;\n }\n });\n };\n _addPluginVersions(_channels);\n if (_channelConfig) (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_channelConfig, function(channels) {\n _addPluginVersions(channels);\n });\n _addPluginVersions(_configExtensions);\n }\n function _initDefaults() {\n _isInitialized = false;\n // Use a default logger so initialization errors are not dropped on the floor with full logging\n _configHandler = (0, $acb30f9e62dc5705$export$3a9e9180c14487fd)({}, $e5177bba49076348$var$defaultConfig, _self[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ]);\n // Set the logging level to critical so that any critical initialization failures are displayed on the console\n _configHandler.cfg[0, $1ae5573ce493bccc$export$e53d8cae4d527530 /* @min:%2eloggingLevelConsole */ ] = 1 /* eLoggingSeverity.CRITICAL */ ;\n // Define _self.config\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"config\", {\n g: function() {\n return _configHandler.cfg;\n },\n s: function(newValue) {\n _self.updateCfg(newValue, false);\n }\n });\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"pluginVersionStringArr\", {\n g: function() {\n if (!_pluginVersionStringArr) _setPluginVersions();\n return _pluginVersionStringArr;\n }\n });\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"pluginVersionString\", {\n g: function() {\n if (!_pluginVersionString) {\n if (!_pluginVersionStringArr) _setPluginVersions();\n _pluginVersionString = _pluginVersionStringArr.join(\";\");\n }\n return _pluginVersionString || (0, $9fe4a5d5204a4cff$export$5e8607ab26634759);\n }\n });\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"logger\", {\n g: function() {\n if (!_logger) {\n _logger = new (0, $cc2aaaebf96ac6a7$export$4f80edb2e10dc14c)(_configHandler.cfg);\n _configHandler[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ] = _logger;\n }\n return _logger;\n },\n s: function(newLogger) {\n _configHandler[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ] = newLogger;\n if (_logger !== newLogger) {\n (0, $2cb93c1cbddb67ab$export$86347c3dd68c03f6)(_logger, false);\n _logger = newLogger;\n }\n }\n });\n _self[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ] = new (0, $cc2aaaebf96ac6a7$export$4f80edb2e10dc14c)(_configHandler.cfg);\n _extensions = [];\n var cfgExtensions = _self.config[0, $9fe4a5d5204a4cff$export$a077ce616a1ab4ee /* @min:%2eextensions */ ] || [];\n cfgExtensions.splice(0, cfgExtensions[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ]);\n (0, $54343718a076ab6e$export$69c7b96f216fdf7b)(cfgExtensions, _extensions);\n _telemetryInitializerPlugin = new (0, $4d4645ee8836015f$export$5da7f32cc3b89dc1)();\n _eventQueue = [];\n (0, $2cb93c1cbddb67ab$export$86347c3dd68c03f6)(_notificationManager, false);\n _notificationManager = null;\n _perfManager = null;\n _cfgPerfManager = null;\n (0, $2cb93c1cbddb67ab$export$86347c3dd68c03f6)(_cookieManager, false);\n _cookieManager = null;\n _pluginChain = null;\n _configExtensions = [];\n _channelConfig = null;\n _channels = null;\n _isUnloading = false;\n _internalLogsEventName = null;\n _evtNamespace = (0, $8a2d104e2647a310$export$eb4a6badb18ead04)(\"AIBaseCore\", true);\n _unloadHandlers = (0, $d13bf4befeee29ad$export$1dd1604aeaf8cfed)();\n _traceCtx = null;\n _instrumentationKey = null;\n _hookContainer = (0, $efe9376777343289$export$31fa167f9d342989)();\n _cfgListeners = [];\n _pluginVersionString = null;\n _pluginVersionStringArr = null;\n _forceStopInternalLogPoller = false;\n }\n function _createTelCtx() {\n var theCtx = (0, $bc7124acb0f73e64$export$ca98f11e981bcfd6)(_getPluginChain(), _configHandler.cfg, _self);\n theCtx[0, $1ae5573ce493bccc$export$8693bdba21bfca93 /* @min:%2eonComplete */ ](_startLogPoller);\n return theCtx;\n }\n // Initialize or Re-initialize the plugins\n function _initPluginChain(updateState) {\n // Extension validation\n var theExtensions = $e5177bba49076348$var$_validateExtensions(_self[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ], (0, $f66a763d1ac581a5$export$a1373ad9f192f374), _configExtensions);\n _pluginChain = null;\n _pluginVersionString = null;\n _pluginVersionStringArr = null;\n // Get the primary channel queue and include as part of the normal extensions\n _channels = (_channelConfig || [])[0] || [];\n // Add any channels provided in the extensions and sort them\n _channels = (0, $757da337740268ac$export$478771939b7b39a2)((0, $54343718a076ab6e$export$69c7b96f216fdf7b)(_channels, theExtensions[0, $9fe4a5d5204a4cff$export$829012af4b2055a2 /* @min:%2echannels */ ]));\n // Create an array of all extensions, including the _channels\n var allExtensions = (0, $54343718a076ab6e$export$69c7b96f216fdf7b)((0, $757da337740268ac$export$478771939b7b39a2)(theExtensions[0, $9fe4a5d5204a4cff$export$3094ace9cd82ff99 /* @min:%2ecore */ ]), _channels);\n // Required to allow plugins to call core.getPlugin() during their own initialization\n _extensions = (0, $36a077d9f4439b69$export$5da24d7703175bc5)(allExtensions);\n // This has a side effect of adding the extensions passed during initialization\n // into the config.extensions, so you can see all of the extensions loaded.\n // This will also get updated by the addPlugin() and remove plugin code.\n var cfgExtensions = _self.config[0, $9fe4a5d5204a4cff$export$a077ce616a1ab4ee /* @min:%2eextensions */ ] || [];\n cfgExtensions.splice(0, cfgExtensions[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ]);\n (0, $54343718a076ab6e$export$69c7b96f216fdf7b)(cfgExtensions, _extensions);\n var rootCtx = _createTelCtx();\n // Initializing the channels first\n if (_channels && _channels[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) (0, $757da337740268ac$export$be211df7b1eeb33e)(rootCtx[0, $1ae5573ce493bccc$export$1e6514b499ba4d34 /* @min:%2ecreateNew */ ](_channels), allExtensions);\n // Now initialize the normal extensions (explicitly not including the _channels as this can cause duplicate initialization)\n (0, $757da337740268ac$export$be211df7b1eeb33e)(rootCtx, allExtensions);\n if (updateState) _doUpdate(updateState);\n }\n function _getPlugin(pluginIdentifier) {\n var theExt = null;\n var thePlugin = null;\n var channelHosts = [];\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_extensions, function(ext) {\n if (ext[0, $1ae5573ce493bccc$export$f001befbf8417151 /* @min:%2eidentifier */ ] === pluginIdentifier && ext !== _telemetryInitializerPlugin) {\n thePlugin = ext;\n return -1;\n }\n if (ext.getChannel) channelHosts[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](ext);\n });\n if (!thePlugin && channelHosts[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(channelHosts, function(host) {\n thePlugin = host.getChannel(pluginIdentifier);\n if (!thePlugin) return -1;\n });\n if (thePlugin) theExt = {\n plugin: thePlugin,\n setEnabled: function(enabled) {\n (0, $757da337740268ac$export$37cfaecb9b4b1b3b)(thePlugin)[0, $9fe4a5d5204a4cff$export$49e9417944569ae8] = !enabled;\n },\n isEnabled: function() {\n var pluginState = (0, $757da337740268ac$export$37cfaecb9b4b1b3b)(thePlugin);\n return !pluginState[0, $1ae5573ce493bccc$export$7176fb2a7d11927e /* @min:%2eteardown */ ] && !pluginState[0, $9fe4a5d5204a4cff$export$49e9417944569ae8];\n },\n remove: function(isAsync, removeCb) {\n var _a;\n if (isAsync === void 0) isAsync = true;\n var pluginsToRemove = [\n thePlugin\n ];\n var unloadState = (_a = {\n reason: 1 /* TelemetryUnloadReason.PluginUnload */ \n }, _a[0, $1ae5573ce493bccc$export$d8114c9e990204cb /* @min:isAsync */ ] = isAsync, _a);\n _removePlugins(pluginsToRemove, unloadState, function(removed) {\n if (removed) // Re-Initialize the plugin chain\n _initPluginChain({\n reason: 32 /* TelemetryUpdateReason.PluginRemoved */ ,\n removed: pluginsToRemove\n });\n removeCb && removeCb(removed);\n });\n }\n };\n return theExt;\n }\n function _getPluginChain() {\n if (!_pluginChain) {\n // copy the collection of extensions\n var extensions = (_extensions || []).slice();\n // During add / remove this may get called again, so don't read if already present\n if ((0, $a96d4958027d6f85$export$9f3b3ffa84393d30)(extensions, _telemetryInitializerPlugin) === -1) extensions[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](_telemetryInitializerPlugin);\n _pluginChain = (0, $bc7124acb0f73e64$export$107e639207cdf742)((0, $757da337740268ac$export$478771939b7b39a2)(extensions), _configHandler.cfg, _self);\n }\n return _pluginChain;\n }\n function _removePlugins(thePlugins, unloadState, removeComplete) {\n if (thePlugins && thePlugins[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n var unloadChain = (0, $bc7124acb0f73e64$export$107e639207cdf742)(thePlugins, _configHandler.cfg, _self);\n var unloadCtx = (0, $bc7124acb0f73e64$export$91bbbd4999751948)(unloadChain, _self);\n unloadCtx[0, $1ae5573ce493bccc$export$8693bdba21bfca93 /* @min:%2eonComplete */ ](function() {\n var removed = false;\n // Remove the listed config extensions\n var newConfigExtensions = [];\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_configExtensions, function(plugin, idx) {\n if (!$e5177bba49076348$var$_isPluginPresent(plugin, thePlugins)) newConfigExtensions[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](plugin);\n else removed = true;\n });\n _configExtensions = newConfigExtensions;\n _pluginVersionString = null;\n _pluginVersionStringArr = null;\n // Re-Create the channel config\n var newChannelConfig = [];\n if (_channelConfig) {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_channelConfig, function(queue, idx) {\n var newQueue = [];\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(queue, function(channel) {\n if (!$e5177bba49076348$var$_isPluginPresent(channel, thePlugins)) newQueue[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](channel);\n else removed = true;\n });\n newChannelConfig[0, $1ae5573ce493bccc$export$a0a330e7fa1e278c /* @min:%2epush */ ](newQueue);\n });\n _channelConfig = newChannelConfig;\n }\n removeComplete && removeComplete(removed);\n _startLogPoller();\n });\n unloadCtx[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ](unloadState);\n } else removeComplete(false);\n }\n function _flushInternalLogs() {\n if (_logger && _logger.queue) {\n var queue = _logger.queue.slice(0);\n _logger.queue[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] = 0;\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(queue, function(logMessage) {\n var _a;\n var item = (_a = {}, _a[0, $1ae5573ce493bccc$export$9734b0a24bf02e93 /* @min:name */ ] = _internalLogsEventName ? _internalLogsEventName : \"InternalMessageId: \" + logMessage[0, $1ae5573ce493bccc$export$2cc5b49df2eed261 /* @min:%2emessageId */ ], _a.iKey = _instrumentationKey, _a[0, $1ae5573ce493bccc$export$7b5ba5854159c1f0 /* @min:time */ ] = (0, $0b747974b0bb3563$export$dfaaa8705752128f)(new Date()), _a.baseType = (0, $cc2aaaebf96ac6a7$export$70ef838ed08aad47).dataType, _a.baseData = {\n message: logMessage[0, $1ae5573ce493bccc$export$923606b70907833e /* @min:%2emessage */ ]\n }, _a);\n _self.track(item);\n });\n }\n }\n function _flushChannels(isAsync, callBack, sendReason, cbTimeout) {\n // Setting waiting to one so that we don't call the callBack until we finish iterating\n var waiting = 1;\n var doneIterating = false;\n var cbTimer = null;\n cbTimeout = cbTimeout || 5000;\n function doCallback() {\n waiting--;\n if (doneIterating && waiting === 0) {\n cbTimer && cbTimer[0, $1ae5573ce493bccc$export$bd01c5e3f12db01c /* @min:%2ecancel */ ]();\n cbTimer = null;\n callBack && callBack(doneIterating);\n callBack = null;\n }\n }\n if (_channels && _channels[0, $1ae5573ce493bccc$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n var flushCtx = _createTelCtx()[0, $1ae5573ce493bccc$export$1e6514b499ba4d34 /* @min:%2ecreateNew */ ](_channels);\n flushCtx.iterate(function(plugin) {\n if (plugin.flush) {\n waiting++;\n var handled_1 = false;\n // Not all channels will call this callback for every scenario\n if (!plugin.flush(isAsync, function() {\n handled_1 = true;\n doCallback();\n }, sendReason)) {\n if (!handled_1) {\n // If any channel doesn't return true and it didn't call the callback, then we should assume that the callback\n // will never be called, so use a timeout to allow the channel(s) some time to \"finish\" before triggering any\n // followup function (such as unloading)\n if (isAsync && cbTimer == null) cbTimer = (0, $d03b12effd00bf96$export$5f4d6617421d489b)(function() {\n cbTimer = null;\n doCallback();\n }, cbTimeout);\n else doCallback();\n }\n }\n }\n });\n }\n doneIterating = true;\n doCallback();\n return true;\n }\n function _initDebugListener() {\n // Lazily ensure that the notification manager is created\n !_notificationManager && _self[0, $1ae5573ce493bccc$export$3a09068de032bb32 /* @min:%2egetNotifyMgr */ ]();\n // Will get recalled if any referenced config values are changed\n _addUnloadHook(_configHandler[0, $1ae5573ce493bccc$export$fc59eec8d77f3766 /* @min:%2ewatch */ ](function(details) {\n var disableDbgExt = details.cfg.disableDbgExt;\n if (disableDbgExt === true && _debugListener) {\n // Remove any previously loaded debug listener\n _notificationManager[0, $1ae5573ce493bccc$export$861144ba9c13be60 /* @min:%2eremoveNotificationListener */ ](_debugListener);\n _debugListener = null;\n }\n if (_notificationManager && !_debugListener && disableDbgExt !== true) {\n _debugListener = (0, $12f08319fee74ea0$export$dae5ac50a0df0f5f)(details.cfg);\n _notificationManager[0, $1ae5573ce493bccc$export$5c8bcfab4f42ca62 /* @min:%2eaddNotificationListener */ ](_debugListener);\n }\n }));\n }\n function _initPerfManager() {\n // Will get recalled if any referenced config values are changed\n _addUnloadHook(_configHandler[0, $1ae5573ce493bccc$export$fc59eec8d77f3766 /* @min:%2ewatch */ ](function(details) {\n var enablePerfMgr = details.cfg.enablePerfMgr;\n if (!enablePerfMgr && _cfgPerfManager) // Remove any existing config based performance manager\n _cfgPerfManager = null;\n if (enablePerfMgr) // Set the performance manager creation function if not defined\n (0, $0b747974b0bb3563$export$51417ccc212471e)(details.cfg, (0, $9fe4a5d5204a4cff$export$1cf3476332da55b3), $e5177bba49076348$var$_createPerfManager);\n }));\n }\n function _doUpdate(updateState) {\n var updateCtx = (0, $bc7124acb0f73e64$export$e4c32b40c4fbf98a)(_getPluginChain(), _self);\n updateCtx[0, $1ae5573ce493bccc$export$8693bdba21bfca93 /* @min:%2eonComplete */ ](_startLogPoller);\n if (!_self._updateHook || _self._updateHook(updateCtx, updateState) !== true) updateCtx[0, $1ae5573ce493bccc$export$5c220169317cd6de /* @min:%2eprocessNext */ ](updateState);\n }\n function _logOrThrowError(message) {\n var logger = _self[0, $1ae5573ce493bccc$export$e6a243fe757439f9 /* @min:%2elogger */ ];\n if (logger) {\n // there should always be a logger\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(logger, 2 /* eLoggingSeverity.WARNING */ , 73 /* _eInternalMessageId.PluginException */ , message);\n _startLogPoller();\n } else (0, $44a1c24c0e411039$export$8bf7aba4a9e09055)(message);\n }\n function _notifyInvalidEvent(telemetryItem) {\n var manager = _self[0, $1ae5573ce493bccc$export$3a09068de032bb32 /* @min:%2egetNotifyMgr */ ]();\n if (manager) manager[0, $9fe4a5d5204a4cff$export$bacb5b2f4c1081b9 /* @min:%2eeventsDiscarded */ ]([\n telemetryItem\n ], 2 /* eEventsDiscardedReason.InvalidEvent */ );\n }\n function _addUnloadHook(hooks) {\n _hookContainer.add(hooks);\n }\n });\n }\n // Removed Stub for AppInsightsCore.prototype.initialize.\n // Removed Stub for AppInsightsCore.prototype.getChannels.\n // Removed Stub for AppInsightsCore.prototype.track.\n // Removed Stub for AppInsightsCore.prototype.getProcessTelContext.\n // Removed Stub for AppInsightsCore.prototype.getNotifyMgr.\n // Removed Stub for AppInsightsCore.prototype.addNotificationListener.\n // Removed Stub for AppInsightsCore.prototype.removeNotificationListener.\n // Removed Stub for AppInsightsCore.prototype.getCookieMgr.\n // Removed Stub for AppInsightsCore.prototype.setCookieMgr.\n // Removed Stub for AppInsightsCore.prototype.getPerfMgr.\n // Removed Stub for AppInsightsCore.prototype.setPerfMgr.\n // Removed Stub for AppInsightsCore.prototype.eventCnt.\n // Removed Stub for AppInsightsCore.prototype.pollInternalLogs.\n // Removed Stub for AppInsightsCore.prototype.stopPollingInternalLogs.\n // Removed Stub for AppInsightsCore.prototype.addTelemetryInitializer.\n // Removed Stub for AppInsightsCore.prototype.unload.\n // Removed Stub for AppInsightsCore.prototype.getPlugin.\n // Removed Stub for AppInsightsCore.prototype.addPlugin.\n // Removed Stub for AppInsightsCore.prototype.updateCfg.\n // Removed Stub for AppInsightsCore.prototype.evtNamespace.\n // Removed Stub for AppInsightsCore.prototype.addUnloadCb.\n // Removed Stub for AppInsightsCore.prototype.flush.\n // Removed Stub for AppInsightsCore.prototype.getTraceCtx.\n // Removed Stub for AppInsightsCore.prototype.setTraceCtx.\n // Removed Stub for AppInsightsCore.prototype.addUnloadHook.\n // Removed Stub for AppInsightsCore.prototype.onCfgChange.\n // Removed Stub for AppInsightsCore.prototype.releaseQueue.\n // Removed Stub for AppInsightsCore.prototype._updateHook.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n AppInsightsCore.__ieDyn = 1;\n return AppInsightsCore;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Dependencies Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\n/*\n * Application Insights JavaScript SDK - Dependencies Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // ###################################################################################################################################################\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\n// ###################################################################################################################################################\n// Generally you should only put values that are used more than 2 times and then only if not already exposed as a constant (such as SdkCoreNames)\n// as when using \"short\" named values from here they will be will be minified smaller than the SdkCoreNames[eSdkCoreNames.xxxx] value.\nvar $072e43366110cd19$export$be41298b7716c698 = \"duration\";\nvar $072e43366110cd19$export$400e70f2a2ecb5aa = \"properties\";\n\n\n/*\n * Application Insights JavaScript SDK - Dependencies Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nvar $785f2f8595bbd489$export$8ff033ecd75b66c3 = \"requestUrl\"; // Count: 12\nvar $785f2f8595bbd489$export$25a34734290022f3 = \"inst\"; // Count: 5\nvar $785f2f8595bbd489$export$6eae51590aaea43 = \"length\"; // Count: 10\nvar $785f2f8595bbd489$export$a5eb52c53bba8560 = \"traceID\"; // Count: 9\nvar $785f2f8595bbd489$export$c105b94efa183847 = \"spanID\"; // Count: 8\nvar $785f2f8595bbd489$export$4e92e4b92b41ba2d = \"traceFlags\"; // Count: 13\nvar $785f2f8595bbd489$export$fdcd48959e13aba7 = \"context\"; // Count: 7\nvar $785f2f8595bbd489$export$fcf18cee9ee41961 = \"aborted\"; // Count: 7\nvar $785f2f8595bbd489$export$f8d9e07631527156 = \"traceId\"; // Count: 5\nvar $785f2f8595bbd489$export$e39be82dc519c4ae = \"spanId\"; // Count: 5\nvar $785f2f8595bbd489$export$3b3afe26ca0e015c = \"_addHook\"; // Count: 4\nvar $785f2f8595bbd489$export$f9ae8d0acf86503e = \"core\"; // Count: 8\nvar $785f2f8595bbd489$export$ec2c4b7da1ef8dd0 = \"includeCorrelationHeaders\"; // Count: 4\nvar $785f2f8595bbd489$export$de5be3709039b9b0 = \"getAbsoluteUrl\"; // Count: 3\nvar $785f2f8595bbd489$export$829ed22a43b4aada = \"headers\"; // Count: 6\nvar $785f2f8595bbd489$export$b58618e731cdb301 = \"requestHeaders\"; // Count: 13\nvar $785f2f8595bbd489$export$84ecd29f369f5b1d = \"setRequestHeader\"; // Count: 3\nvar $785f2f8595bbd489$export$2aa2820bfe761f5b = \"trackDependencyDataInternal\"; // Count: 2\nvar $785f2f8595bbd489$export$69cac26425c8ea23 = \"startTime\"; // Count: 6\nvar $785f2f8595bbd489$export$e4eaee9e01d9baaa = \"toLowerCase\"; // Count: 6\nvar $785f2f8595bbd489$export$abc5bbd8bd54996a = \"enableRequestHeaderTracking\"; // Count: 3\nvar $785f2f8595bbd489$export$928b837287a09b1f = \"enableAjaxErrorStatusText\"; // Count: 2\nvar $785f2f8595bbd489$export$a2e6a87e51acdf74 = \"enableAjaxPerfTracking\"; // Count: 2\nvar $785f2f8595bbd489$export$8e8c994d518b7819 = \"maxAjaxCallsPerView\"; // Count: 2\nvar $785f2f8595bbd489$export$e4bbd5d3fe5db54b = \"excludeRequestFromAutoTrackingPatterns\"; // Count: 2\nvar $785f2f8595bbd489$export$e9d1b90025f35753 = \"addRequestContext\"; // Count: 2\nvar $785f2f8595bbd489$export$1b35c99ae5c93631 = \"disableAjaxTracking\"; // Count: 3\nvar $785f2f8595bbd489$export$990dec05286abf9b = \"ajaxPerfLookupDelay\"; // Count: 2\nvar $785f2f8595bbd489$export$391aca270631e029 = \"disableFetchTracking\"; // Count: 2\nvar $785f2f8595bbd489$export$21cd44ec55cfc0f9 = \"enableResponseHeaderTracking\"; // Count: 2\nvar $785f2f8595bbd489$export$f8d169088a01f6f2 = \"status\"; // Count: 11\nvar $785f2f8595bbd489$export$e44f43b238a0c7f0 = \"statusText\"; // Count: 9\nvar $785f2f8595bbd489$export$422ea83a60e3414b = \"headerMap\"; // Count: 8\nvar $785f2f8595bbd489$export$9984940f44bb6769 = \"openDone\"; // Count: 3\nvar $785f2f8595bbd489$export$ebd7b63f645a373e = \"sendDone\"; // Count: 3\nvar $785f2f8595bbd489$export$b3507d39ae3f3e22 = \"requestSentTime\"; // Count: 9\nvar $785f2f8595bbd489$export$dda6370f5a5c9f36 = \"abortDone\"; // Count: 3\nvar $785f2f8595bbd489$export$90dab0fe9b2b7158 = \"getTraceId\"; // Count: 3\nvar $785f2f8595bbd489$export$1fd22cf8d803736f = \"getTraceFlags\"; // Count: 3\nvar $785f2f8595bbd489$export$47d30bd816d62bdc = \"method\"; // Count: 8\nvar $785f2f8595bbd489$export$cce28811c9041832 = \"errorStatusText\"; // Count: 3\nvar $785f2f8595bbd489$export$99588eb1c78d46e0 = \"stateChangeAttached\"; // Count: 2\nvar $785f2f8595bbd489$export$d9f76b3afffa4e88 = \"responseText\"; // Count: 6\nvar $785f2f8595bbd489$export$e52fa892d403cac3 = \"responseFinishedTime\"; // Count: 7\nvar $785f2f8595bbd489$export$e31aceb60e1b3a1a = \"CreateTrackItem\"; // Count: 3\nvar $785f2f8595bbd489$export$71a9f4a2e496846d = \"response\"; // Count: 4\nvar $785f2f8595bbd489$export$121ad73699ff0814 = \"getAllResponseHeaders\"; // Count: 2\nvar $785f2f8595bbd489$export$e2e640c31408a88f = \"getPartAProps\"; // Count: 3\nvar $785f2f8595bbd489$export$9e85e7b326182790 = \"perfMark\"; // Count: 4\nvar $785f2f8595bbd489$export$9734b0a24bf02e93 = \"name\"; // Count: 6\nvar $785f2f8595bbd489$export$6bec4987b5d3526c = \"perfTiming\"; // Count: 3\nvar $785f2f8595bbd489$export$4852fd87b68a6e1f = \"exception\"; // Count: 5\nvar $785f2f8595bbd489$export$c9bea9d79dd8e37a = \"ajaxDiagnosticsMessage\"; // Count: 3\nvar $785f2f8595bbd489$export$c4a9b5c39c7409f7 = \"correlationContext\"; // Count: 3\nvar $785f2f8595bbd489$export$7820e90f0eaab413 = \"ajaxTotalDuration\"; // Count: 3\nvar $785f2f8595bbd489$export$c050ff25390a2bce = \"eventTraceCtx\"; // Count: 3\n\n\n/*\n * Application Insights JavaScript SDK - Dependencies Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\n/** @ignore */ function $9a2f7734ba2f502d$var$_calcPerfDuration(resourceEntry, start, end) {\n var result = 0;\n var from = resourceEntry[start];\n var to = resourceEntry[end];\n if (from && to) result = (0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(from, to);\n return result;\n}\n/** @ignore */ function $9a2f7734ba2f502d$var$_setPerfDuration(props, name, resourceEntry, start, end) {\n var result = 0;\n var value = $9a2f7734ba2f502d$var$_calcPerfDuration(resourceEntry, start, end);\n if (value) result = $9a2f7734ba2f502d$var$_setPerfValue(props, name, (0, $8ce53fcb9c1dc1db$export$4460ed97e7c4a927)(value));\n return result;\n}\n/** @ignore */ function $9a2f7734ba2f502d$var$_setPerfValue(props, name, value) {\n var strPerf = \"ajaxPerf\";\n var result = 0;\n if (props && name && value) {\n var perfData = props[strPerf] = props[strPerf] || {};\n perfData[name] = value;\n result = 1;\n }\n return result;\n}\n/** @ignore */ function $9a2f7734ba2f502d$var$_populatePerfData(ajaxData, dependency) {\n /*\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API\r\n * | -startTime\r\n * | -redirectStart\r\n * | | -redirectEnd\r\n * | | | -fetchStart\r\n * | | | | -domainLookupStart\r\n * | | | | |- domainLookupEnd\r\n * | | | | | | -connectStart\r\n * | | | | | | | -secureConnectionStart\r\n * | | | | | | | | -connectEnd\r\n * | | | | | | | | | -requestStart\r\n * | | | | | | | | | | | -responseStart\r\n * | | | | | | | | | | | | | -responseEnd\r\n * +------------+-+---+----------------+-+--+--------+-+-----------+-+------------+-+\r\n * |--redirect--| |---|--domainLookup--| |--connect--| |--request--| |--response--| |\r\n * |-------------------networkConnect----------------|\r\n * | |---------sentRequest--------|\r\n * |------------------------------------perfTotal-----------------------------------|\r\n */ var resourceEntry = ajaxData[0, $785f2f8595bbd489$export$6bec4987b5d3526c /* @min:%2eperfTiming */ ];\n var props = dependency[0, $072e43366110cd19$export$400e70f2a2ecb5aa /* @min:%2eproperties */ ] || {};\n var propsSet = 0;\n var strName = \"name\";\n var strStart = \"Start\";\n var strEnd = \"End\";\n var strDomainLookup = \"domainLookup\";\n var strConnect = \"connect\";\n var strRedirect = \"redirect\";\n var strRequest = \"request\";\n var strResponse = \"response\";\n var strStartTime = \"startTime\";\n var strDomainLookupStart = strDomainLookup + strStart;\n var strDomainLookupEnd = strDomainLookup + strEnd;\n var strConnectStart = strConnect + strStart;\n var strConnectEnd = strConnect + strEnd;\n var strRequestStart = strRequest + strStart;\n var strRequestEnd = strRequest + strEnd;\n var strResponseStart = strResponse + strStart;\n var strResponseEnd = strResponse + strEnd;\n var strRedirectStart = strRedirect + strStart;\n var strRedirectEnd = strRedirect = strEnd;\n var strTransferSize = \"transferSize\";\n var strEncodedBodySize = \"encodedBodySize\";\n var strDecodedBodySize = \"decodedBodySize\";\n var strServerTiming = \"serverTiming\";\n if (resourceEntry) {\n // redirect\n propsSet |= $9a2f7734ba2f502d$var$_setPerfDuration(props, strRedirect, resourceEntry, strRedirectStart, strRedirectEnd);\n // domainLookup\n propsSet |= $9a2f7734ba2f502d$var$_setPerfDuration(props, strDomainLookup, resourceEntry, strDomainLookupStart, strDomainLookupEnd);\n // connect\n propsSet |= $9a2f7734ba2f502d$var$_setPerfDuration(props, strConnect, resourceEntry, strConnectStart, strConnectEnd);\n // request\n propsSet |= $9a2f7734ba2f502d$var$_setPerfDuration(props, strRequest, resourceEntry, strRequestStart, strRequestEnd);\n // response\n propsSet |= $9a2f7734ba2f502d$var$_setPerfDuration(props, strResponse, resourceEntry, strResponseStart, strResponseEnd);\n // Network connection time\n propsSet |= $9a2f7734ba2f502d$var$_setPerfDuration(props, \"networkConnect\", resourceEntry, strStartTime, strConnectEnd);\n // Sent Request\n propsSet |= $9a2f7734ba2f502d$var$_setPerfDuration(props, \"sentRequest\", resourceEntry, strRequestStart, strResponseEnd);\n // PerfTotal / Duration\n var duration = resourceEntry[0, $072e43366110cd19$export$be41298b7716c698 /* @min:%2eduration */ ];\n if (!duration) duration = $9a2f7734ba2f502d$var$_calcPerfDuration(resourceEntry, strStartTime, strResponseEnd) || 0;\n propsSet |= $9a2f7734ba2f502d$var$_setPerfValue(props, (0, $072e43366110cd19$export$be41298b7716c698), duration);\n propsSet |= $9a2f7734ba2f502d$var$_setPerfValue(props, \"perfTotal\", duration);\n var serverTiming = resourceEntry[strServerTiming];\n if (serverTiming) {\n var server_1 = {};\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(serverTiming, function(value, idx) {\n var name = (0, $0b747974b0bb3563$export$f60443f194e40bc2)(value[strName] || \"\" + idx);\n var newValue = server_1[name] || {};\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(value, function(key, val) {\n if (key !== strName && (0, $533f826bbc418791$export$844ec244b1367d54)(val) || (0, $533f826bbc418791$export$7e4aa119212bc614)(val)) {\n if (newValue[key]) val = newValue[key] + \";\" + val;\n if (val || !(0, $533f826bbc418791$export$844ec244b1367d54)(val)) // Only set the value if it has a value and it's not an empty string\n newValue[key] = val;\n }\n });\n server_1[name] = newValue;\n });\n propsSet |= $9a2f7734ba2f502d$var$_setPerfValue(props, strServerTiming, server_1);\n }\n propsSet |= $9a2f7734ba2f502d$var$_setPerfValue(props, strTransferSize, resourceEntry[strTransferSize]);\n propsSet |= $9a2f7734ba2f502d$var$_setPerfValue(props, strEncodedBodySize, resourceEntry[strEncodedBodySize]);\n propsSet |= $9a2f7734ba2f502d$var$_setPerfValue(props, strDecodedBodySize, resourceEntry[strDecodedBodySize]);\n } else if (ajaxData[0, $785f2f8595bbd489$export$9e85e7b326182790 /* @min:%2eperfMark */ ]) propsSet |= $9a2f7734ba2f502d$var$_setPerfValue(props, \"missing\", ajaxData.perfAttempts);\n if (propsSet) dependency[0, $072e43366110cd19$export$400e70f2a2ecb5aa /* @min:%2eproperties */ ] = props;\n}\nvar $9a2f7734ba2f502d$export$79f098456caec6e7 = /** @class */ function() {\n function XHRMonitoringState() {\n var self = this;\n self[0, $785f2f8595bbd489$export$9984940f44bb6769 /* @min:%2eopenDone */ ] = false;\n self.setRequestHeaderDone = false;\n self[0, $785f2f8595bbd489$export$ebd7b63f645a373e /* @min:%2esendDone */ ] = false;\n self[0, $785f2f8595bbd489$export$dda6370f5a5c9f36 /* @min:%2eabortDone */ ] = false;\n // True, if onreadyStateChangeCallback function attached to xhr, otherwise false\n self[0, $785f2f8595bbd489$export$99588eb1c78d46e0 /* @min:%2estateChangeAttached */ ] = false;\n }\n return XHRMonitoringState;\n}();\nvar $9a2f7734ba2f502d$export$3391d178758cbbb1 = /** @class */ function() {\n function ajaxRecord(traceId, spanId, logger, traceCtx) {\n var _a;\n var self = this;\n var _logger = logger;\n var strResponseText = \"responseText\";\n // Assigning the initial/default values within the constructor to avoid typescript from creating a bunch of\n // this.XXXX = null\n self[0, $785f2f8595bbd489$export$9e85e7b326182790 /* @min:%2eperfMark */ ] = null;\n self.completed = false;\n self.requestHeadersSize = null;\n self[0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ] = null;\n self.responseReceivingDuration = null;\n self.callbackDuration = null;\n self[0, $785f2f8595bbd489$export$7820e90f0eaab413 /* @min:%2eajaxTotalDuration */ ] = null;\n self[0, $785f2f8595bbd489$export$fcf18cee9ee41961 /* @min:%2eaborted */ ] = 0;\n self.pageUrl = null;\n self[0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ] = null;\n self.requestSize = 0;\n self[0, $785f2f8595bbd489$export$47d30bd816d62bdc /* @min:%2emethod */ ] = null;\n self[0, $785f2f8595bbd489$export$f8d169088a01f6f2 /* @min:%2estatus */ ] = null;\n self[0, $785f2f8595bbd489$export$b3507d39ae3f3e22 /* @min:%2erequestSentTime */ ] = null;\n self.responseStartedTime = null;\n self[0, $785f2f8595bbd489$export$e52fa892d403cac3 /* @min:%2eresponseFinishedTime */ ] = null;\n self.callbackFinishedTime = null;\n self.endTime = null;\n self.xhrMonitoringState = new $9a2f7734ba2f502d$export$79f098456caec6e7();\n self.clientFailure = 0;\n self[0, $785f2f8595bbd489$export$a5eb52c53bba8560 /* @min:%2etraceID */ ] = traceId;\n self[0, $785f2f8595bbd489$export$c105b94efa183847 /* @min:%2espanID */ ] = spanId;\n self[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ] = traceCtx === null || traceCtx === void 0 ? void 0 : traceCtx.getTraceFlags();\n if (traceCtx) self[0, $785f2f8595bbd489$export$c050ff25390a2bce /* @min:%2eeventTraceCtx */ ] = (_a = {}, _a[0, $785f2f8595bbd489$export$f8d9e07631527156 /* @min:traceId */ ] = traceCtx[0, $785f2f8595bbd489$export$90dab0fe9b2b7158 /* @min:%2egetTraceId */ ](), _a[0, $785f2f8595bbd489$export$e39be82dc519c4ae /* @min:spanId */ ] = traceCtx.getSpanId(), _a[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:traceFlags */ ] = traceCtx[0, $785f2f8595bbd489$export$1fd22cf8d803736f /* @min:%2egetTraceFlags */ ](), _a);\n else self[0, $785f2f8595bbd489$export$c050ff25390a2bce /* @min:%2eeventTraceCtx */ ] = null;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(ajaxRecord, self, function(self) {\n self.getAbsoluteUrl = function() {\n return self[0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ] ? (0, $8ef642882a9aa00a$export$a98678973ebe2123)(self[0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ]) : null;\n };\n self.getPathName = function() {\n return self[0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ] ? (0, $8c3059962bb1d83c$export$356146502a9f860c)(_logger, (0, $8ef642882a9aa00a$export$b959f3bc0a239498)(self[0, $785f2f8595bbd489$export$47d30bd816d62bdc /* @min:%2emethod */ ], self[0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ])) : null;\n };\n self[0, $785f2f8595bbd489$export$e31aceb60e1b3a1a /* @min:%2eCreateTrackItem */ ] = function(ajaxType, enableRequestHeaderTracking, getResponse) {\n var _a;\n // round to 3 decimal points\n self.ajaxTotalDuration = Math.round((0, $d98b699aeccdabc6$export$bfc7deb7f4f00987)(self.requestSentTime, self.responseFinishedTime) * 1000) / 1000;\n if (self[0, $785f2f8595bbd489$export$7820e90f0eaab413 /* @min:%2eajaxTotalDuration */ ] < 0) return null;\n var dependency = (_a = {\n id: \"|\" + self[0, $785f2f8595bbd489$export$a5eb52c53bba8560 /* @min:%2etraceID */ ] + \".\" + self[0, $785f2f8595bbd489$export$c105b94efa183847 /* @min:%2espanID */ ],\n target: self[0, $785f2f8595bbd489$export$de5be3709039b9b0 /* @min:%2egetAbsoluteUrl */ ]()\n }, _a[0, $785f2f8595bbd489$export$9734b0a24bf02e93 /* @min:name */ ] = self.getPathName(), _a.type = ajaxType, _a[0, $785f2f8595bbd489$export$69cac26425c8ea23 /* @min:startTime */ ] = null, _a.duration = self[0, $785f2f8595bbd489$export$7820e90f0eaab413 /* @min:%2eajaxTotalDuration */ ], _a.success = +self[0, $785f2f8595bbd489$export$f8d169088a01f6f2 /* @min:%2estatus */ ] >= 200 && +self[0, $785f2f8595bbd489$export$f8d169088a01f6f2 /* @min:%2estatus */ ] < 400, _a.responseCode = +self[0, $785f2f8595bbd489$export$f8d169088a01f6f2 /* @min:%2estatus */ ], _a[0, $072e43366110cd19$export$400e70f2a2ecb5aa] = {\n HttpMethod: self[0, $785f2f8595bbd489$export$47d30bd816d62bdc /* @min:%2emethod */ ]\n }, _a);\n var props = dependency[0, $072e43366110cd19$export$400e70f2a2ecb5aa];\n if (self[0, $785f2f8595bbd489$export$fcf18cee9ee41961 /* @min:%2eaborted */ ]) props[0, $785f2f8595bbd489$export$fcf18cee9ee41961 /* @min:%2eaborted */ ] = true;\n if (self[0, $785f2f8595bbd489$export$b3507d39ae3f3e22 /* @min:%2erequestSentTime */ ]) {\n // Set the correct dependency start time\n dependency[0, $785f2f8595bbd489$export$69cac26425c8ea23 /* @min:%2estartTime */ ] = new Date();\n dependency[0, $785f2f8595bbd489$export$69cac26425c8ea23 /* @min:%2estartTime */ ].setTime(self[0, $785f2f8595bbd489$export$b3507d39ae3f3e22 /* @min:%2erequestSentTime */ ]);\n }\n // Add Ajax perf details if available\n $9a2f7734ba2f502d$var$_populatePerfData(self, dependency);\n if (enableRequestHeaderTracking) {\n if ((0, $36a077d9f4439b69$export$f7628dc18f4211e5)(self.requestHeaders)[0, $785f2f8595bbd489$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) props[0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ] = self[0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ];\n }\n if (getResponse) {\n var response = getResponse();\n if (response) {\n // enrich dependency target with correlation context from the server\n var correlationContext = response[0, $785f2f8595bbd489$export$c4a9b5c39c7409f7 /* @min:%2ecorrelationContext */ ];\n if (correlationContext) dependency.correlationContext = /* dependency.target + \" | \" + */ correlationContext;\n if (response[0, $785f2f8595bbd489$export$422ea83a60e3414b /* @min:%2eheaderMap */ ]) {\n if ((0, $36a077d9f4439b69$export$f7628dc18f4211e5)(response.headerMap)[0, $785f2f8595bbd489$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) props.responseHeaders = response[0, $785f2f8595bbd489$export$422ea83a60e3414b /* @min:%2eheaderMap */ ];\n }\n if (self[0, $785f2f8595bbd489$export$cce28811c9041832 /* @min:%2eerrorStatusText */ ]) {\n if (self[0, $785f2f8595bbd489$export$f8d169088a01f6f2 /* @min:%2estatus */ ] >= 400) {\n var responseType = response.type;\n if (responseType === \"\" || responseType === \"text\") props.responseText = response.responseText ? response[0, $785f2f8595bbd489$export$e44f43b238a0c7f0 /* @min:%2estatusText */ ] + \" - \" + response[strResponseText] : response[0, $785f2f8595bbd489$export$e44f43b238a0c7f0 /* @min:%2estatusText */ ];\n if (responseType === \"json\") props.responseText = response.response ? response[0, $785f2f8595bbd489$export$e44f43b238a0c7f0 /* @min:%2estatusText */ ] + \" - \" + JSON.stringify(response[0, $785f2f8595bbd489$export$71a9f4a2e496846d /* @min:%2eresponse */ ]) : response[0, $785f2f8595bbd489$export$e44f43b238a0c7f0 /* @min:%2estatusText */ ];\n } else if (self[0, $785f2f8595bbd489$export$f8d169088a01f6f2 /* @min:%2estatus */ ] === 0) props.responseText = response[0, $785f2f8595bbd489$export$e44f43b238a0c7f0 /* @min:%2estatusText */ ] || \"\";\n }\n }\n }\n return dependency;\n };\n self[0, $785f2f8595bbd489$export$e2e640c31408a88f /* @min:%2egetPartAProps */ ] = function() {\n var _a;\n var partA = null;\n var traceCtx = self[0, $785f2f8595bbd489$export$c050ff25390a2bce /* @min:%2eeventTraceCtx */ ];\n if (traceCtx && (traceCtx[0, $785f2f8595bbd489$export$f8d9e07631527156 /* @min:%2etraceId */ ] || traceCtx[0, $785f2f8595bbd489$export$e39be82dc519c4ae /* @min:%2espanId */ ])) {\n partA = {};\n var traceExt = partA[(0, $1185376df44832bd$export$152f4bb29f8263d0).TraceExt] = (_a = {}, _a[0, $785f2f8595bbd489$export$a5eb52c53bba8560 /* @min:traceID */ ] = traceCtx[0, $785f2f8595bbd489$export$f8d9e07631527156 /* @min:%2etraceId */ ], _a.parentID = traceCtx[0, $785f2f8595bbd489$export$e39be82dc519c4ae /* @min:%2espanId */ ], _a);\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(traceCtx[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ])) traceExt[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ] = traceCtx[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ];\n }\n return partA;\n };\n });\n }\n // Removed Stub for ajaxRecord.prototype.getAbsoluteUrl.\n // Removed Stub for ajaxRecord.prototype.getPathName.\n // Removed Stub for ajaxRecord.prototype.CreateTrackItem.\n // Removed Stub for ajaxRecord.prototype.getPartAProps.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n ajaxRecord.__ieDyn = 1;\n return ajaxRecord;\n}();\n\n\nvar $2569abef053897bd$var$_a;\nvar $2569abef053897bd$var$AJAX_MONITOR_PREFIX = \"ai.ajxmn.\";\nvar $2569abef053897bd$var$strDiagLog = \"diagLog\";\nvar $2569abef053897bd$var$strAjaxData = \"ajaxData\";\nvar $2569abef053897bd$var$STR_FETCH = \"fetch\";\nvar $2569abef053897bd$var$ERROR_HEADER = \"Failed to monitor XMLHttpRequest\";\nvar $2569abef053897bd$var$ERROR_PREFIX = \", monitoring data for this ajax call \";\nvar $2569abef053897bd$var$ERROR_POSTFIX = $2569abef053897bd$var$ERROR_PREFIX + \"may be incorrect.\";\nvar $2569abef053897bd$var$ERROR_NOT_SENT = $2569abef053897bd$var$ERROR_PREFIX + \"won't be sent.\";\nvar $2569abef053897bd$var$CORRELATION_HEADER_ERROR = \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\";\nvar $2569abef053897bd$var$CUSTOM_REQUEST_CONTEXT_ERROR = \"Failed to add custom defined request context as configured call back may missing a null check.\";\nvar $2569abef053897bd$var$FAILED_TO_CALCULATE_DURATION_ERROR = \"Failed to calculate the duration of the \";\n// Using a global value so that to handle same iKey with multiple app insights instances (mostly for testing)\nvar $2569abef053897bd$var$_markCount = 0;\n/** @Ignore */ function $2569abef053897bd$var$_supportsFetch() {\n var _global = (0, $3d5fcb60a9467a45$export$a4e55266d2135a7f)();\n if (!_global || (0, $533f826bbc418791$export$bedb7023a7733221)(_global.Request) || (0, $533f826bbc418791$export$bedb7023a7733221)(_global.Request[0, $67b827af57eed1eb$export$ecddaaeb55ecf049]) || (0, $533f826bbc418791$export$bedb7023a7733221)(_global[$2569abef053897bd$var$STR_FETCH])) return null;\n return _global[$2569abef053897bd$var$STR_FETCH];\n}\n/**\r\n * Determines whether ajax monitoring can be enabled on this document\r\n * @returns True if Ajax monitoring is supported on this page, otherwise false\r\n * @ignore\r\n */ function $2569abef053897bd$var$_supportsAjaxMonitoring(ajaxMonitorInstance) {\n var _a;\n var result = false;\n if ((0, $0c599844349363c4$export$cfeac9aa070f0108)()) {\n var proto = XMLHttpRequest[0, $67b827af57eed1eb$export$ecddaaeb55ecf049];\n result = !(0, $533f826bbc418791$export$bedb7023a7733221)(proto) && !(0, $533f826bbc418791$export$bedb7023a7733221)(proto.open) && // eslint-disable-line security/detect-non-literal-fs-filename -- false positive\n !(0, $533f826bbc418791$export$bedb7023a7733221)(proto.send) && !(0, $533f826bbc418791$export$bedb7023a7733221)(proto.abort);\n }\n var ieVer = (0, $0c599844349363c4$export$eb7ff627fa81c42e)();\n if (ieVer && ieVer < 9) result = false;\n if (result) // Disable if the XmlHttpRequest can't be extended or hooked\n try {\n var xhr = new XMLHttpRequest();\n xhr[$2569abef053897bd$var$strAjaxData] = {};\n // Check that we can update the prototype\n var theOpen = XMLHttpRequest[0, $67b827af57eed1eb$export$ecddaaeb55ecf049].open;\n XMLHttpRequest[0, $67b827af57eed1eb$export$ecddaaeb55ecf049].open = theOpen;\n } catch (e) {\n // We can't decorate the xhr object so disable monitoring\n result = false;\n $2569abef053897bd$var$_throwInternalCritical(ajaxMonitorInstance, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */ , \"Failed to enable XMLHttpRequest monitoring, extension is not supported\", (_a = {}, _a[0, $785f2f8595bbd489$export$4852fd87b68a6e1f /* @min:exception */ ] = (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e), _a));\n }\n return result;\n}\n/** @Ignore */ function $2569abef053897bd$var$_getFailedAjaxDiagnosticsMessage(xhr) {\n var result = \"\";\n try {\n if (xhr && xhr[$2569abef053897bd$var$strAjaxData] && xhr[$2569abef053897bd$var$strAjaxData][0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ]) result += \"(url: '\" + xhr[$2569abef053897bd$var$strAjaxData][0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ] + \"')\";\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return result;\n}\n/** @ignore */ function $2569abef053897bd$var$_throwInternalCritical(ajaxMonitorInstance, msgId, message, properties, isUserAct) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(ajaxMonitorInstance[$2569abef053897bd$var$strDiagLog](), 1 /* eLoggingSeverity.CRITICAL */ , msgId, message, properties, isUserAct);\n}\n/** @ignore */ function $2569abef053897bd$var$_throwInternalWarning(ajaxMonitorInstance, msgId, message, properties, isUserAct) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(ajaxMonitorInstance[$2569abef053897bd$var$strDiagLog](), 2 /* eLoggingSeverity.WARNING */ , msgId, message, properties, isUserAct);\n}\n/** @Ignore */ function $2569abef053897bd$var$_createErrorCallbackFunc(ajaxMonitorInstance, internalMessage, message) {\n // tslint:disable-next-line\n return function(args) {\n var _a;\n $2569abef053897bd$var$_throwInternalCritical(ajaxMonitorInstance, internalMessage, message, (_a = {\n ajaxDiagnosticsMessage: $2569abef053897bd$var$_getFailedAjaxDiagnosticsMessage(args[0, $785f2f8595bbd489$export$25a34734290022f3 /* @min:%2einst */ ])\n }, _a[0, $785f2f8595bbd489$export$4852fd87b68a6e1f /* @min:exception */ ] = (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(args.err), _a));\n };\n}\nfunction $2569abef053897bd$var$_indexOf(value, match) {\n if (value && match) return (0, $0194d45a55d79548$export$7c0888b0c4641088)(value, match);\n return -1;\n}\nfunction $2569abef053897bd$var$_addHandler(container, id, theFunc) {\n var theHandler = {\n id: id,\n fn: theFunc\n };\n container.push(theHandler);\n return {\n remove: function() {\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(container, function(initializer, idx) {\n if (initializer.id === theHandler.id) {\n container.splice(idx, 1);\n return -1;\n }\n });\n }\n };\n}\nfunction $2569abef053897bd$var$_processDependencyContainer(core, container, details, message) {\n var result = true;\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(container, function(theFunc, idx) {\n try {\n if (theFunc.fn.call(null, details) === false) result = false;\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(core && core.logger, 1 /* eLoggingSeverity.CRITICAL */ , 64 /* _eInternalMessageId.TelemetryInitializerFailed */ , \"Dependency \" + message + \" [#\" + idx + \"] failed: \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n }, true);\n }\n });\n return result;\n}\nfunction $2569abef053897bd$var$_processDependencyListeners(listeners, core, ajaxData, xhr, input, init) {\n var _a;\n var initializersCount = listeners[0, $785f2f8595bbd489$export$6eae51590aaea43 /* @min:%2elength */ ];\n if (initializersCount > 0) {\n var details = (_a = {}, _a[0, $785f2f8595bbd489$export$f9ae8d0acf86503e /* @min:core */ ] = core, _a.xhr = xhr, _a.input = input, _a.init = init, _a.traceId = ajaxData[0, $785f2f8595bbd489$export$a5eb52c53bba8560 /* @min:%2etraceID */ ], _a.spanId = ajaxData[0, $785f2f8595bbd489$export$c105b94efa183847 /* @min:%2espanID */ ], _a.traceFlags = ajaxData[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ], _a.context = ajaxData[0, $785f2f8595bbd489$export$fdcd48959e13aba7 /* @min:%2econtext */ ] || {}, _a.aborted = !!ajaxData[0, $785f2f8595bbd489$export$fcf18cee9ee41961 /* @min:%2eaborted */ ], _a);\n $2569abef053897bd$var$_processDependencyContainer(core, listeners, details, \"listener\");\n ajaxData[0, $785f2f8595bbd489$export$a5eb52c53bba8560 /* @min:%2etraceID */ ] = details[0, $785f2f8595bbd489$export$f8d9e07631527156 /* @min:%2etraceId */ ];\n ajaxData[0, $785f2f8595bbd489$export$c105b94efa183847 /* @min:%2espanID */ ] = details[0, $785f2f8595bbd489$export$e39be82dc519c4ae /* @min:%2espanId */ ];\n ajaxData[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ] = details[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ];\n ajaxData[0, $785f2f8595bbd489$export$fdcd48959e13aba7 /* @min:%2econtext */ ] = details[0, $785f2f8595bbd489$export$fdcd48959e13aba7 /* @min:%2econtext */ ];\n }\n}\nvar $2569abef053897bd$var$BLOB_CORE = \"*.blob.core.\";\nvar $2569abef053897bd$export$ae1f7dcb3278b8bb = (0, $36a077d9f4439b69$export$5da24d7703175bc5)([\n $2569abef053897bd$var$BLOB_CORE + \"windows.net\",\n $2569abef053897bd$var$BLOB_CORE + \"chinacloudapi.cn\",\n $2569abef053897bd$var$BLOB_CORE + \"cloudapi.de\",\n $2569abef053897bd$var$BLOB_CORE + \"usgovcloudapi.net\"\n]);\nvar $2569abef053897bd$var$_internalExcludeEndpoints = [\n /https:\\/\\/[^\\/]*(\\.pipe\\.aria|aria\\.pipe|events\\.data|collector\\.azure)\\.[^\\/]+\\/(OneCollector\\/1|Collector\\/3)\\.0/i\n];\nvar $2569abef053897bd$var$_defaultConfig = (0, $36a077d9f4439b69$export$5da24d7703175bc5)(($2569abef053897bd$var$_a = {}, $2569abef053897bd$var$_a[0, $785f2f8595bbd489$export$8e8c994d518b7819 /* @min:maxAjaxCallsPerView */ ] = 500, $2569abef053897bd$var$_a[0, $785f2f8595bbd489$export$1b35c99ae5c93631 /* @min:disableAjaxTracking */ ] = false, $2569abef053897bd$var$_a[0, $785f2f8595bbd489$export$391aca270631e029 /* @min:disableFetchTracking */ ] = false, $2569abef053897bd$var$_a[0, $785f2f8595bbd489$export$e4bbd5d3fe5db54b /* @min:excludeRequestFromAutoTrackingPatterns */ ] = undefined, $2569abef053897bd$var$_a.disableCorrelationHeaders = false, $2569abef053897bd$var$_a.distributedTracingMode = 1 /* eDistributedTracingModes.AI_AND_W3C */ , $2569abef053897bd$var$_a.correlationHeaderExcludedDomains = $2569abef053897bd$export$ae1f7dcb3278b8bb, $2569abef053897bd$var$_a.correlationHeaderDomains = undefined, $2569abef053897bd$var$_a.correlationHeaderExcludePatterns = undefined, $2569abef053897bd$var$_a.appId = undefined, $2569abef053897bd$var$_a.enableCorsCorrelation = false, $2569abef053897bd$var$_a[0, $785f2f8595bbd489$export$abc5bbd8bd54996a /* @min:enableRequestHeaderTracking */ ] = false, $2569abef053897bd$var$_a[0, $785f2f8595bbd489$export$21cd44ec55cfc0f9 /* @min:enableResponseHeaderTracking */ ] = false, $2569abef053897bd$var$_a[0, $785f2f8595bbd489$export$928b837287a09b1f /* @min:enableAjaxErrorStatusText */ ] = false, $2569abef053897bd$var$_a[0, $785f2f8595bbd489$export$a2e6a87e51acdf74 /* @min:enableAjaxPerfTracking */ ] = false, $2569abef053897bd$var$_a.maxAjaxPerfLookupAttempts = 3, $2569abef053897bd$var$_a[0, $785f2f8595bbd489$export$990dec05286abf9b /* @min:ajaxPerfLookupDelay */ ] = 25, $2569abef053897bd$var$_a.ignoreHeaders = [\n \"Authorization\",\n \"X-API-Key\",\n \"WWW-Authenticate\"\n], $2569abef053897bd$var$_a[0, $785f2f8595bbd489$export$e9d1b90025f35753 /* @min:addRequestContext */ ] = undefined, $2569abef053897bd$var$_a.addIntEndpoints = true, $2569abef053897bd$var$_a));\nvar $2569abef053897bd$export$d9a50c4d1eb2475f = /** @class */ function(_super) {\n (0, $2a74b38b87b38cda$export$1f9c32e3fbfb8e62)(AjaxMonitor, _super);\n function AjaxMonitor() {\n var _this = _super.call(this) || this;\n _this.identifier = AjaxMonitor.identifier;\n _this.priority = 120;\n var _fetchInitialized; // fetch monitoring initialized\n var _xhrInitialized; // XHR monitoring initialized\n var _currentWindowHost;\n var _extensionConfig;\n var _enableRequestHeaderTracking;\n var _enableAjaxErrorStatusText;\n var _trackAjaxAttempts;\n var _context;\n var _isUsingW3CHeaders;\n var _isUsingAIHeaders;\n var _markPrefix;\n var _enableAjaxPerfTracking;\n var _maxAjaxCallsPerView;\n var _enableResponseHeaderTracking;\n var _disabledUrls;\n var _disableAjaxTracking;\n var _disableFetchTracking;\n var _excludeRequestFromAutoTrackingPatterns;\n var _addRequestContext;\n var _evtNamespace;\n var _dependencyHandlerId;\n var _dependencyListeners;\n var _dependencyInitializers;\n var _ignoreHeaders;\n var _maxAjaxPerfLookupAttempts;\n var _ajaxPerfLookupDelay;\n var _distributedTracingMode;\n var _appId;\n var _polyfillInitialized;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(AjaxMonitor, _this, function(_self, _base) {\n var _addHook = _base[0, $785f2f8595bbd489$export$3b3afe26ca0e015c /* @min:%2e_addHook */ ];\n _initDefaults();\n _self.initialize = function(config, core, extensions, pluginChain) {\n if (!_self.isInitialized()) {\n _base.initialize(config, core, extensions, pluginChain);\n _evtNamespace = (0, $12cc003c7fb5ccde$export$3f37a50e0edde3be)((0, $8a2d104e2647a310$export$eb4a6badb18ead04)(\"ajax\"), core && core.evtNamespace && core.evtNamespace());\n _populateDefaults(config);\n _instrumentXhr();\n _instrumentFetch();\n _populateContext();\n }\n };\n _self._doTeardown = function() {\n _initDefaults();\n };\n _self.trackDependencyData = function(dependency, properties) {\n _reportDependencyInternal(_dependencyInitializers, _self[0, $785f2f8595bbd489$export$f9ae8d0acf86503e /* @min:%2ecore */ ], null, dependency, properties);\n };\n _self[0, $785f2f8595bbd489$export$ec2c4b7da1ef8dd0 /* @min:%2eincludeCorrelationHeaders */ ] = function(ajaxData, input, init, xhr) {\n // Test Hook to allow the overriding of the location host\n var currentWindowHost = _self[\"_currentWindowHost\"] || _currentWindowHost;\n $2569abef053897bd$var$_processDependencyListeners(_dependencyListeners, _self[0, $785f2f8595bbd489$export$f9ae8d0acf86503e /* @min:%2ecore */ ], ajaxData, xhr, input, init);\n if (input) {\n if ((0, $d98b699aeccdabc6$export$a62d10d7f896c08c)(_extensionConfig, ajaxData[0, $785f2f8595bbd489$export$de5be3709039b9b0 /* @min:%2egetAbsoluteUrl */ ](), currentWindowHost)) {\n if (!init) init = {};\n // init headers override original request headers\n // so, if they exist use only them, otherwise use request's because they should have been applied in the first place\n // not using original request headers will result in them being lost\n var headers = new Headers(init[0, $785f2f8595bbd489$export$829ed22a43b4aada /* @min:%2eheaders */ ] || (input instanceof Request ? input[0, $785f2f8595bbd489$export$829ed22a43b4aada /* @min:%2eheaders */ ] || {} : {}));\n if (_isUsingAIHeaders) {\n var id = \"|\" + ajaxData[0, $785f2f8595bbd489$export$a5eb52c53bba8560 /* @min:%2etraceID */ ] + \".\" + ajaxData[0, $785f2f8595bbd489$export$c105b94efa183847 /* @min:%2espanID */ ];\n headers.set((0, $78a4729d55fca66a$export$e499e02a1fe05177)[3 /* eRequestHeaders.requestIdHeader */ ], id);\n if (_enableRequestHeaderTracking) ajaxData[0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ][(0, $78a4729d55fca66a$export$e499e02a1fe05177)[3 /* eRequestHeaders.requestIdHeader */ ]] = id;\n }\n var appId = _appId || _context && _context.appId();\n if (appId) {\n headers.set((0, $78a4729d55fca66a$export$e499e02a1fe05177)[0 /* eRequestHeaders.requestContextHeader */ ], (0, $78a4729d55fca66a$export$e499e02a1fe05177)[2 /* eRequestHeaders.requestContextAppIdFormat */ ] + appId);\n if (_enableRequestHeaderTracking) ajaxData[0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ][(0, $78a4729d55fca66a$export$e499e02a1fe05177)[0 /* eRequestHeaders.requestContextHeader */ ]] = (0, $78a4729d55fca66a$export$e499e02a1fe05177)[2 /* eRequestHeaders.requestContextAppIdFormat */ ] + appId;\n }\n if (_isUsingW3CHeaders) {\n var traceFlags = ajaxData[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ];\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(traceFlags)) traceFlags = 0x01;\n var traceParent = (0, $6f47dad7a26666b5$export$55f8c39d2c902d0d)((0, $6f47dad7a26666b5$export$2f21fe23413fe96b)(ajaxData[0, $785f2f8595bbd489$export$a5eb52c53bba8560 /* @min:%2etraceID */ ], ajaxData[0, $785f2f8595bbd489$export$c105b94efa183847 /* @min:%2espanID */ ], traceFlags));\n headers.set((0, $78a4729d55fca66a$export$e499e02a1fe05177)[4 /* eRequestHeaders.traceParentHeader */ ], traceParent);\n if (_enableRequestHeaderTracking) ajaxData[0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ][(0, $78a4729d55fca66a$export$e499e02a1fe05177)[4 /* eRequestHeaders.traceParentHeader */ ]] = traceParent;\n }\n init[0, $785f2f8595bbd489$export$829ed22a43b4aada /* @min:%2eheaders */ ] = headers;\n }\n return init;\n } else if (xhr) {\n if ((0, $d98b699aeccdabc6$export$a62d10d7f896c08c)(_extensionConfig, ajaxData[0, $785f2f8595bbd489$export$de5be3709039b9b0 /* @min:%2egetAbsoluteUrl */ ](), currentWindowHost)) {\n if (_isUsingAIHeaders) {\n var id = \"|\" + ajaxData[0, $785f2f8595bbd489$export$a5eb52c53bba8560 /* @min:%2etraceID */ ] + \".\" + ajaxData[0, $785f2f8595bbd489$export$c105b94efa183847 /* @min:%2espanID */ ];\n xhr[0, $785f2f8595bbd489$export$84ecd29f369f5b1d /* @min:%2esetRequestHeader */ ]((0, $78a4729d55fca66a$export$e499e02a1fe05177)[3 /* eRequestHeaders.requestIdHeader */ ], id);\n if (_enableRequestHeaderTracking) ajaxData[0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ][(0, $78a4729d55fca66a$export$e499e02a1fe05177)[3 /* eRequestHeaders.requestIdHeader */ ]] = id;\n }\n var appId = _appId || _context && _context.appId();\n if (appId) {\n xhr[0, $785f2f8595bbd489$export$84ecd29f369f5b1d /* @min:%2esetRequestHeader */ ]((0, $78a4729d55fca66a$export$e499e02a1fe05177)[0 /* eRequestHeaders.requestContextHeader */ ], (0, $78a4729d55fca66a$export$e499e02a1fe05177)[2 /* eRequestHeaders.requestContextAppIdFormat */ ] + appId);\n if (_enableRequestHeaderTracking) ajaxData[0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ][(0, $78a4729d55fca66a$export$e499e02a1fe05177)[0 /* eRequestHeaders.requestContextHeader */ ]] = (0, $78a4729d55fca66a$export$e499e02a1fe05177)[2 /* eRequestHeaders.requestContextAppIdFormat */ ] + appId;\n }\n if (_isUsingW3CHeaders) {\n var traceFlags = ajaxData[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ];\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(traceFlags)) traceFlags = 0x01;\n var traceParent = (0, $6f47dad7a26666b5$export$55f8c39d2c902d0d)((0, $6f47dad7a26666b5$export$2f21fe23413fe96b)(ajaxData[0, $785f2f8595bbd489$export$a5eb52c53bba8560 /* @min:%2etraceID */ ], ajaxData[0, $785f2f8595bbd489$export$c105b94efa183847 /* @min:%2espanID */ ], traceFlags));\n xhr[0, $785f2f8595bbd489$export$84ecd29f369f5b1d /* @min:%2esetRequestHeader */ ]((0, $78a4729d55fca66a$export$e499e02a1fe05177)[4 /* eRequestHeaders.traceParentHeader */ ], traceParent);\n if (_enableRequestHeaderTracking) ajaxData[0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ][(0, $78a4729d55fca66a$export$e499e02a1fe05177)[4 /* eRequestHeaders.traceParentHeader */ ]] = traceParent;\n }\n }\n return xhr;\n }\n return undefined;\n };\n _self[0, $785f2f8595bbd489$export$2aa2820bfe761f5b /* @min:%2etrackDependencyDataInternal */ ] = function(dependency, properties, systemProperties) {\n if (_maxAjaxCallsPerView === -1 || _trackAjaxAttempts < _maxAjaxCallsPerView) {\n // Hack since expected format in w3c mode is |abc.def.\n // Non-w3c format is |abc.def\n // @todo Remove if better solution is available, e.g. handle in portal\n if ((_distributedTracingMode === 2 /* eDistributedTracingModes.W3C */ || _distributedTracingMode === 1 /* eDistributedTracingModes.AI_AND_W3C */ ) && typeof dependency.id === \"string\" && dependency.id[dependency.id[0, $785f2f8595bbd489$export$6eae51590aaea43 /* @min:%2elength */ ] - 1] !== \".\") dependency.id += \".\";\n if ((0, $533f826bbc418791$export$bedb7023a7733221)(dependency[0, $785f2f8595bbd489$export$69cac26425c8ea23 /* @min:%2estartTime */ ])) dependency[0, $785f2f8595bbd489$export$69cac26425c8ea23 /* @min:%2estartTime */ ] = new Date();\n var item = (0, $932e93a8e5adf75c$export$2dc41327de8d98f1)(dependency, (0, $0dd1de134f090c69$export$a7b48490930dbffa).dataType, (0, $0dd1de134f090c69$export$a7b48490930dbffa).envelopeType, _self[$2569abef053897bd$var$strDiagLog](), properties, systemProperties);\n _self[0, $785f2f8595bbd489$export$f9ae8d0acf86503e /* @min:%2ecore */ ].track(item);\n } else if (_trackAjaxAttempts === _maxAjaxCallsPerView) $2569abef053897bd$var$_throwInternalCritical(_self, 55 /* _eInternalMessageId.MaxAjaxPerPVExceeded */ , \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\", true);\n ++_trackAjaxAttempts;\n };\n _self.addDependencyListener = function(dependencyListener) {\n return $2569abef053897bd$var$_addHandler(_dependencyListeners, _dependencyHandlerId++, dependencyListener);\n };\n _self.addDependencyInitializer = function(dependencyInitializer) {\n return $2569abef053897bd$var$_addHandler(_dependencyInitializers, _dependencyHandlerId++, dependencyInitializer);\n };\n function _initDefaults() {\n var location = (0, $0c599844349363c4$export$e7fd20fad3cf4b5f)();\n _fetchInitialized = false; // fetch monitoring initialized\n _xhrInitialized = false; // XHR monitoring initialized\n _polyfillInitialized = false; // polyfill monitoring initialized\n _currentWindowHost = location && location.host && location.host[0, $785f2f8595bbd489$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]();\n _extensionConfig = null;\n _enableRequestHeaderTracking = false;\n _enableAjaxErrorStatusText = false;\n _trackAjaxAttempts = 0;\n _context = null;\n _isUsingW3CHeaders = false;\n _isUsingAIHeaders = false;\n _markPrefix = null;\n _enableAjaxPerfTracking = false;\n _maxAjaxCallsPerView = 0;\n _enableResponseHeaderTracking = false;\n _disabledUrls = {};\n _disableAjaxTracking = false;\n _disableFetchTracking = false;\n _excludeRequestFromAutoTrackingPatterns = null;\n _addRequestContext = null;\n _evtNamespace = null;\n _dependencyHandlerId = 0;\n _dependencyListeners = [];\n _dependencyInitializers = [];\n _ignoreHeaders = null;\n _maxAjaxPerfLookupAttempts = 1;\n _ajaxPerfLookupDelay = 1;\n _distributedTracingMode = 1 /* eDistributedTracingModes.AI_AND_W3C */ ;\n _appId = null;\n }\n function _populateDefaults(config) {\n _self[0, $785f2f8595bbd489$export$3b3afe26ca0e015c /* @min:%2e_addHook */ ]((0, $acb30f9e62dc5705$export$454a433e4deb244f)(config, function(details) {\n var config = details.cfg;\n var ctx = (0, $bc7124acb0f73e64$export$ca98f11e981bcfd6)(null, config, _self[0, $785f2f8595bbd489$export$f9ae8d0acf86503e /* @min:%2ecore */ ]);\n _extensionConfig = ctx.getExtCfg(AjaxMonitor.identifier, $2569abef053897bd$var$_defaultConfig);\n _distributedTracingMode = _extensionConfig.distributedTracingMode;\n _enableRequestHeaderTracking = _extensionConfig[0, $785f2f8595bbd489$export$abc5bbd8bd54996a /* @min:%2eenableRequestHeaderTracking */ ];\n _enableAjaxErrorStatusText = _extensionConfig[0, $785f2f8595bbd489$export$928b837287a09b1f /* @min:%2eenableAjaxErrorStatusText */ ];\n _enableAjaxPerfTracking = _extensionConfig[0, $785f2f8595bbd489$export$a2e6a87e51acdf74 /* @min:%2eenableAjaxPerfTracking */ ];\n _maxAjaxCallsPerView = _extensionConfig[0, $785f2f8595bbd489$export$8e8c994d518b7819 /* @min:%2emaxAjaxCallsPerView */ ];\n _excludeRequestFromAutoTrackingPatterns = [].concat(_extensionConfig[0, $785f2f8595bbd489$export$e4bbd5d3fe5db54b /* @min:%2eexcludeRequestFromAutoTrackingPatterns */ ] || [], _extensionConfig.addIntEndpoints !== false ? $2569abef053897bd$var$_internalExcludeEndpoints : []);\n _addRequestContext = _extensionConfig[0, $785f2f8595bbd489$export$e9d1b90025f35753 /* @min:%2eaddRequestContext */ ];\n _isUsingAIHeaders = _distributedTracingMode === 0 /* eDistributedTracingModes.AI */ || _distributedTracingMode === 1 /* eDistributedTracingModes.AI_AND_W3C */ ;\n _isUsingW3CHeaders = _distributedTracingMode === 1 /* eDistributedTracingModes.AI_AND_W3C */ || _distributedTracingMode === 2 /* eDistributedTracingModes.W3C */ ;\n if (_enableAjaxPerfTracking) {\n var iKey = config.instrumentationKey || \"unkwn\";\n if (iKey[0, $785f2f8595bbd489$export$6eae51590aaea43 /* @min:%2elength */ ] > 5) _markPrefix = $2569abef053897bd$var$AJAX_MONITOR_PREFIX + (0, $c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87)(iKey, iKey[0, $785f2f8595bbd489$export$6eae51590aaea43 /* @min:%2elength */ ] - 5) + \".\";\n else _markPrefix = $2569abef053897bd$var$AJAX_MONITOR_PREFIX + iKey + \".\";\n }\n _disableAjaxTracking = !!_extensionConfig[0, $785f2f8595bbd489$export$1b35c99ae5c93631 /* @min:%2edisableAjaxTracking */ ];\n _maxAjaxPerfLookupAttempts = _extensionConfig.maxAjaxPerfLookupAttempts;\n _ajaxPerfLookupDelay = _extensionConfig[0, $785f2f8595bbd489$export$990dec05286abf9b /* @min:%2eajaxPerfLookupDelay */ ];\n _ignoreHeaders = _extensionConfig.ignoreHeaders;\n _appId = _extensionConfig.appId;\n }));\n }\n function _populateContext() {\n var propExt = _self[0, $785f2f8595bbd489$export$f9ae8d0acf86503e /* @min:%2ecore */ ].getPlugin((0, $ca7353bd9238d340$export$2268e69a6d93b7cc));\n if (propExt) _context = propExt.plugin[0, $785f2f8595bbd489$export$fdcd48959e13aba7 /* @min:%2econtext */ ]; // we could move IPropertiesPlugin to common as well\n }\n // discard the header if it's defined as ignoreHeaders in ICorrelationConfig\n function _canIncludeHeaders(header) {\n var rlt = true;\n if (header || _ignoreHeaders) (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_ignoreHeaders, function(key) {\n if (key[0, $785f2f8595bbd489$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]() === header[0, $785f2f8595bbd489$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]()) {\n rlt = false;\n return -1;\n }\n });\n return rlt;\n }\n // Fetch Stuff\n function _instrumentFetch() {\n var fetch = $2569abef053897bd$var$_supportsFetch();\n if (!fetch) return;\n var global = (0, $3d5fcb60a9467a45$export$a4e55266d2135a7f)();\n var isPolyfill = fetch.polyfill;\n _self[0, $785f2f8595bbd489$export$3b3afe26ca0e015c /* @min:%2e_addHook */ ]((0, $acb30f9e62dc5705$export$454a433e4deb244f)(_extensionConfig, function() {\n _disableFetchTracking = !!_extensionConfig[0, $785f2f8595bbd489$export$391aca270631e029 /* @min:%2edisableFetchTracking */ ];\n _enableResponseHeaderTracking = _extensionConfig[0, $785f2f8595bbd489$export$21cd44ec55cfc0f9 /* @min:%2eenableResponseHeaderTracking */ ];\n if (!_disableFetchTracking && !_fetchInitialized) {\n _addHook((0, $963b9811c2275531$export$152e6c4c396a57a)(global, $2569abef053897bd$var$STR_FETCH, {\n ns: _evtNamespace,\n // Add request hook\n req: function(callDetails, input, init) {\n var fetchData;\n if (!_disableFetchTracking && _fetchInitialized && !_isDisabledRequest(null, input, init) && // If we have a polyfil and XHR instrumented then let XHR report otherwise we get duplicates\n !(isPolyfill && _xhrInitialized)) {\n var ctx = callDetails.ctx();\n fetchData = _createFetchRecord(input, init);\n var newInit = _self[0, $785f2f8595bbd489$export$ec2c4b7da1ef8dd0 /* @min:%2eincludeCorrelationHeaders */ ](fetchData, input, init);\n if (newInit !== init) callDetails.set(1, newInit);\n ctx.data = fetchData;\n }\n },\n rsp: function(callDetails, input) {\n if (!_disableFetchTracking) {\n var fetchData_1 = callDetails.ctx().data;\n if (fetchData_1) // Replace the result with the new promise from this code\n callDetails.rslt = callDetails.rslt.then(function(response) {\n _reportFetchMetrics(callDetails, (response || {})[0, $785f2f8595bbd489$export$f8d169088a01f6f2 /* @min:%2estatus */ ], input, response, fetchData_1, function() {\n var _a;\n var ajaxResponse = (_a = {\n statusText: (response || {})[0, $785f2f8595bbd489$export$e44f43b238a0c7f0 /* @min:%2estatusText */ ]\n }, _a[0, $785f2f8595bbd489$export$422ea83a60e3414b /* @min:headerMap */ ] = null, _a[0, $785f2f8595bbd489$export$c4a9b5c39c7409f7 /* @min:correlationContext */ ] = _getFetchCorrelationContext(response), _a);\n if (_enableResponseHeaderTracking && response) {\n var responseHeaderMap_1 = {};\n response.headers.forEach(function(value, name) {\n if (_canIncludeHeaders(name)) responseHeaderMap_1[name] = value;\n });\n ajaxResponse[0, $785f2f8595bbd489$export$422ea83a60e3414b /* @min:%2eheaderMap */ ] = responseHeaderMap_1;\n }\n return ajaxResponse;\n });\n return response;\n }).catch(function(reason) {\n _reportFetchMetrics(callDetails, 0, input, null, fetchData_1, null, {\n error: reason.message || (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(reason)\n });\n throw reason;\n });\n }\n },\n // Create an error callback to report any hook errors\n hkErr: $2569abef053897bd$var$_createErrorCallbackFunc(_self, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */ , \"Failed to monitor Window.fetch\" + $2569abef053897bd$var$ERROR_POSTFIX)\n }, true, (0, $3d5fcb60a9467a45$export$97b87b8868ff7a3c)()));\n _fetchInitialized = true;\n } else if (isPolyfill && !_polyfillInitialized) {\n // If fetch is a polyfill we need to capture the request to ensure that we correctly track\n // disabled request URLS (i.e. internal urls) to ensure we don't end up in a constant loop\n // of reporting ourselves, for example React Native uses a polyfill for fetch\n // Note: Polyfill implementations that don't support the \"polyfill\" tag are not supported\n // the workaround is to add a polyfill property to your fetch implementation before initializing\n // App Insights\n _addHook((0, $963b9811c2275531$export$152e6c4c396a57a)(global, $2569abef053897bd$var$STR_FETCH, {\n ns: _evtNamespace,\n req: function(callDetails, input, init) {\n // Just call so that we record any disabled URL\n _isDisabledRequest(null, input, init);\n }\n }));\n _polyfillInitialized = true;\n }\n }));\n if (isPolyfill) // retag the instrumented fetch with the same polyfill settings this is mostly for testing\n // But also supports multiple App Insights usages\n global[$2569abef053897bd$var$STR_FETCH].polyfill = isPolyfill;\n }\n function _hookProto(target, funcName, callbacks) {\n _addHook((0, $963b9811c2275531$export$6b32104a5f4313f6)(target, funcName, callbacks));\n }\n function _instrumentXhr() {\n if (!$2569abef053897bd$var$_supportsAjaxMonitoring(_self)) return;\n _self[0, $785f2f8595bbd489$export$3b3afe26ca0e015c /* @min:%2e_addHook */ ]((0, $acb30f9e62dc5705$export$454a433e4deb244f)(_extensionConfig, function() {\n _disableAjaxTracking = !!_extensionConfig[0, $785f2f8595bbd489$export$1b35c99ae5c93631 /* @min:%2edisableAjaxTracking */ ];\n _enableRequestHeaderTracking = _extensionConfig[0, $785f2f8595bbd489$export$abc5bbd8bd54996a /* @min:%2eenableRequestHeaderTracking */ ];\n if (!_disableAjaxTracking && !_xhrInitialized) {\n // Instrument open\n _hookProto(XMLHttpRequest, \"open\", {\n ns: _evtNamespace,\n req: function(args, method, url, async) {\n if (!_disableAjaxTracking) {\n var xhr = args[0, $785f2f8595bbd489$export$25a34734290022f3 /* @min:%2einst */ ];\n var ajaxData = xhr[$2569abef053897bd$var$strAjaxData];\n if (!_isDisabledRequest(xhr, url) && _isMonitoredXhrInstance(xhr, true)) {\n if (!ajaxData || !ajaxData.xhrMonitoringState[0, $785f2f8595bbd489$export$9984940f44bb6769 /* @min:%2eopenDone */ ]) // Only create a single ajaxData (even when multiple AI instances are running)\n _openHandler(xhr, method, url, async);\n // always attach to the on ready state change (required for handling multiple instances)\n _attachToOnReadyStateChange(xhr);\n }\n }\n },\n hkErr: $2569abef053897bd$var$_createErrorCallbackFunc(_self, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */ , $2569abef053897bd$var$ERROR_HEADER + \".open\" + $2569abef053897bd$var$ERROR_POSTFIX)\n });\n // Instrument send\n _hookProto(XMLHttpRequest, \"send\", {\n ns: _evtNamespace,\n req: function(args, context) {\n if (!_disableAjaxTracking) {\n var xhr = args[0, $785f2f8595bbd489$export$25a34734290022f3 /* @min:%2einst */ ];\n var ajaxData = xhr[$2569abef053897bd$var$strAjaxData];\n if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState[0, $785f2f8595bbd489$export$ebd7b63f645a373e /* @min:%2esendDone */ ]) {\n _createMarkId(\"xhr\", ajaxData);\n ajaxData[0, $785f2f8595bbd489$export$b3507d39ae3f3e22 /* @min:%2erequestSentTime */ ] = (0, $d98b699aeccdabc6$export$30a447e32c58a836)();\n _self[0, $785f2f8595bbd489$export$ec2c4b7da1ef8dd0 /* @min:%2eincludeCorrelationHeaders */ ](ajaxData, undefined, undefined, xhr);\n ajaxData.xhrMonitoringState[0, $785f2f8595bbd489$export$ebd7b63f645a373e /* @min:%2esendDone */ ] = true;\n }\n }\n },\n hkErr: $2569abef053897bd$var$_createErrorCallbackFunc(_self, 17 /* _eInternalMessageId.FailedMonitorAjaxSend */ , $2569abef053897bd$var$ERROR_HEADER + $2569abef053897bd$var$ERROR_POSTFIX)\n });\n // Instrument abort\n _hookProto(XMLHttpRequest, \"abort\", {\n ns: _evtNamespace,\n req: function(args) {\n if (!_disableAjaxTracking) {\n var xhr = args[0, $785f2f8595bbd489$export$25a34734290022f3 /* @min:%2einst */ ];\n var ajaxData = xhr[$2569abef053897bd$var$strAjaxData];\n if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState[0, $785f2f8595bbd489$export$dda6370f5a5c9f36 /* @min:%2eabortDone */ ]) {\n ajaxData[0, $785f2f8595bbd489$export$fcf18cee9ee41961 /* @min:%2eaborted */ ] = 1;\n ajaxData.xhrMonitoringState[0, $785f2f8595bbd489$export$dda6370f5a5c9f36 /* @min:%2eabortDone */ ] = true;\n }\n }\n },\n hkErr: $2569abef053897bd$var$_createErrorCallbackFunc(_self, 13 /* _eInternalMessageId.FailedMonitorAjaxAbort */ , $2569abef053897bd$var$ERROR_HEADER + \".abort\" + $2569abef053897bd$var$ERROR_POSTFIX)\n });\n // Instrument setRequestHeader\n _hookProto(XMLHttpRequest, \"setRequestHeader\", {\n ns: _evtNamespace,\n req: function(args, header, value) {\n if (!_disableAjaxTracking && _enableRequestHeaderTracking) {\n var xhr = args[0, $785f2f8595bbd489$export$25a34734290022f3 /* @min:%2einst */ ];\n if (_isMonitoredXhrInstance(xhr) && _canIncludeHeaders(header)) xhr[$2569abef053897bd$var$strAjaxData][0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ][header] = value;\n }\n },\n hkErr: $2569abef053897bd$var$_createErrorCallbackFunc(_self, 71 /* _eInternalMessageId.FailedMonitorAjaxSetRequestHeader */ , $2569abef053897bd$var$ERROR_HEADER + \".setRequestHeader\" + $2569abef053897bd$var$ERROR_POSTFIX)\n });\n _xhrInitialized = true;\n }\n }));\n }\n function _isDisabledRequest(xhr, request, init) {\n var isDisabled = false;\n var theUrl = ((!(0, $533f826bbc418791$export$844ec244b1367d54)(request) ? (request || {}).url || \"\" : request) || \"\")[0, $785f2f8595bbd489$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ]();\n // check excludeRequestFromAutoTrackingPatterns before stripping off any query string\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_excludeRequestFromAutoTrackingPatterns, function(regex) {\n var theRegex = regex;\n if ((0, $533f826bbc418791$export$844ec244b1367d54)(regex)) theRegex = new RegExp(regex);\n if (!isDisabled) isDisabled = theRegex.test(theUrl);\n });\n // if request url matches with exclude regex pattern, return true and no need to check for headers\n if (isDisabled) return isDisabled;\n var idx = $2569abef053897bd$var$_indexOf(theUrl, \"?\");\n var idx2 = $2569abef053897bd$var$_indexOf(theUrl, \"#\");\n if (idx === -1 || idx2 !== -1 && idx2 < idx) idx = idx2;\n if (idx !== -1) // Strip off any Query string\n theUrl = theUrl.substring(0, idx);\n // check that this instance is not not used by ajax call performed inside client side monitoring to send data to collector\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(xhr)) // Look on the XMLHttpRequest of the URL string value\n isDisabled = xhr[0, $71dfba5ea0640485$export$7c6abff2f2bdd9c0] === true || theUrl[0, $71dfba5ea0640485$export$7c6abff2f2bdd9c0] === true;\n else if (!(0, $533f826bbc418791$export$bedb7023a7733221)(request)) // Look for DisabledPropertyName in either Request or RequestInit\n isDisabled = (typeof request === \"object\" ? request[0, $71dfba5ea0640485$export$7c6abff2f2bdd9c0] === true : false) || (init ? init[0, $71dfba5ea0640485$export$7c6abff2f2bdd9c0] === true : false);\n // Also add extra check just in case the XHR or fetch objects where not decorated with the DisableProperty due to sealing or freezing\n if (!isDisabled && theUrl && (0, $d98b699aeccdabc6$export$edade5317663baa4)(theUrl)) isDisabled = true;\n if (isDisabled) // Add the disabled url if not present\n {\n if (!_disabledUrls[theUrl]) _disabledUrls[theUrl] = 1;\n } else // Check to see if the url is listed as disabled\n if (_disabledUrls[theUrl]) isDisabled = true;\n return isDisabled;\n }\n /// Verifies that particalar instance of XMLHttpRequest needs to be monitored\n /// Optional parameter. True if ajaxData must be excluded from verification\n /// True if instance needs to be monitored, otherwise false\n function _isMonitoredXhrInstance(xhr, excludeAjaxDataValidation) {\n var ajaxValidation = true;\n var initialized = _xhrInitialized;\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(xhr)) ajaxValidation = excludeAjaxDataValidation === true || !(0, $533f826bbc418791$export$bedb7023a7733221)(xhr[$2569abef053897bd$var$strAjaxData]);\n // checking to see that all interested functions on xhr were instrumented\n return initialized && ajaxValidation;\n }\n function _getDistributedTraceCtx() {\n var distributedTraceCtx = null;\n if (_self[0, $785f2f8595bbd489$export$f9ae8d0acf86503e /* @min:%2ecore */ ] && _self[0, $785f2f8595bbd489$export$f9ae8d0acf86503e /* @min:%2ecore */ ].getTraceCtx) distributedTraceCtx = _self[0, $785f2f8595bbd489$export$f9ae8d0acf86503e /* @min:%2ecore */ ].getTraceCtx(false);\n // Fall back\n if (!distributedTraceCtx && _context && _context.telemetryTrace) distributedTraceCtx = (0, $d98b699aeccdabc6$export$847d5dabba5fabb9)(_context.telemetryTrace);\n return distributedTraceCtx;\n }\n function _openHandler(xhr, method, url, async) {\n var _a;\n var distributedTraceCtx = _getDistributedTraceCtx();\n var traceID = distributedTraceCtx && distributedTraceCtx[0, $785f2f8595bbd489$export$90dab0fe9b2b7158 /* @min:%2egetTraceId */ ]() || (0, $945e40d4195d77bb$export$58d1fad45f39d957)();\n var spanID = (0, $c3f3bf8012a4b2d4$export$25b2a9bb66b0078d)((0, $945e40d4195d77bb$export$58d1fad45f39d957)(), 0, 16);\n var ajaxData = new (0, $9a2f7734ba2f502d$export$3391d178758cbbb1)(traceID, spanID, _self[$2569abef053897bd$var$strDiagLog](), (_a = _self.core) === null || _a === void 0 ? void 0 : _a.getTraceCtx());\n ajaxData[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ] = distributedTraceCtx && distributedTraceCtx[0, $785f2f8595bbd489$export$1fd22cf8d803736f /* @min:%2egetTraceFlags */ ]();\n ajaxData[0, $785f2f8595bbd489$export$47d30bd816d62bdc /* @min:%2emethod */ ] = method;\n ajaxData[0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ] = url;\n ajaxData.xhrMonitoringState[0, $785f2f8595bbd489$export$9984940f44bb6769 /* @min:%2eopenDone */ ] = true;\n ajaxData[0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ] = {};\n ajaxData.async = async;\n ajaxData[0, $785f2f8595bbd489$export$cce28811c9041832 /* @min:%2eerrorStatusText */ ] = _enableAjaxErrorStatusText;\n xhr[$2569abef053897bd$var$strAjaxData] = ajaxData;\n }\n function _attachToOnReadyStateChange(xhr) {\n xhr[$2569abef053897bd$var$strAjaxData].xhrMonitoringState[0, $785f2f8595bbd489$export$99588eb1c78d46e0 /* @min:%2estateChangeAttached */ ] = (0, $12cc003c7fb5ccde$export$324ab159353a60a9)(xhr, \"readystatechange\", function() {\n var _a;\n try {\n if (xhr && xhr.readyState === 4 && _isMonitoredXhrInstance(xhr)) _onAjaxComplete(xhr);\n } catch (e) {\n var exceptionText = (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e);\n // ignore messages with c00c023f, as this a known IE9 XHR abort issue\n if (!exceptionText || $2569abef053897bd$var$_indexOf(exceptionText[0, $785f2f8595bbd489$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ](), \"c00c023f\") === -1) $2569abef053897bd$var$_throwInternalCritical(_self, 16 /* _eInternalMessageId.FailedMonitorAjaxRSC */ , $2569abef053897bd$var$ERROR_HEADER + \" 'readystatechange' event handler\" + $2569abef053897bd$var$ERROR_POSTFIX, (_a = {}, _a[0, $785f2f8595bbd489$export$c9bea9d79dd8e37a /* @min:ajaxDiagnosticsMessage */ ] = $2569abef053897bd$var$_getFailedAjaxDiagnosticsMessage(xhr), _a[0, $785f2f8595bbd489$export$4852fd87b68a6e1f /* @min:exception */ ] = exceptionText, _a));\n }\n }, _evtNamespace);\n }\n function _getResponseText(xhr) {\n try {\n var responseType = xhr.responseType;\n if (responseType === \"\" || responseType === \"text\") // As per the specification responseText is only valid if the type is an empty string or \"text\"\n return xhr[0, $785f2f8595bbd489$export$d9f76b3afffa4e88 /* @min:%2eresponseText */ ];\n } catch (e) {\n // This shouldn't happen because of the above check -- but just in case, so just ignore\n }\n return null;\n }\n function _onAjaxComplete(xhr) {\n var ajaxData = xhr[$2569abef053897bd$var$strAjaxData];\n ajaxData[0, $785f2f8595bbd489$export$e52fa892d403cac3 /* @min:%2eresponseFinishedTime */ ] = (0, $d98b699aeccdabc6$export$30a447e32c58a836)();\n ajaxData[0, $785f2f8595bbd489$export$f8d169088a01f6f2 /* @min:%2estatus */ ] = xhr[0, $785f2f8595bbd489$export$f8d169088a01f6f2 /* @min:%2estatus */ ];\n function _reportXhrError(e, failedProps) {\n var errorProps = failedProps || {};\n errorProps[\"ajaxDiagnosticsMessage\"] = $2569abef053897bd$var$_getFailedAjaxDiagnosticsMessage(xhr);\n if (e) errorProps[\"exception\"] = (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e);\n $2569abef053897bd$var$_throwInternalWarning(_self, 14 /* _eInternalMessageId.FailedMonitorAjaxDur */ , $2569abef053897bd$var$FAILED_TO_CALCULATE_DURATION_ERROR + \"ajax call\" + $2569abef053897bd$var$ERROR_NOT_SENT, errorProps);\n }\n _findPerfResourceEntry(\"xmlhttprequest\", ajaxData, function() {\n try {\n var dependency = ajaxData[0, $785f2f8595bbd489$export$e31aceb60e1b3a1a /* @min:%2eCreateTrackItem */ ](\"Ajax\", _enableRequestHeaderTracking, function() {\n var _a;\n var ajaxResponse = (_a = {\n statusText: xhr[0, $785f2f8595bbd489$export$e44f43b238a0c7f0 /* @min:%2estatusText */ ]\n }, _a[0, $785f2f8595bbd489$export$422ea83a60e3414b /* @min:headerMap */ ] = null, _a[0, $785f2f8595bbd489$export$c4a9b5c39c7409f7 /* @min:correlationContext */ ] = _getAjaxCorrelationContext(xhr), _a.type = xhr.responseType, _a[0, $785f2f8595bbd489$export$d9f76b3afffa4e88 /* @min:responseText */ ] = _getResponseText(xhr), _a.response = xhr[0, $785f2f8595bbd489$export$71a9f4a2e496846d /* @min:%2eresponse */ ], _a);\n if (_enableResponseHeaderTracking) {\n var headers = xhr[0, $785f2f8595bbd489$export$121ad73699ff0814 /* @min:%2egetAllResponseHeaders */ ]();\n if (headers) {\n // xhr.getAllResponseHeaders() method returns all the response headers, separated by CRLF, as a string or null\n // the regex converts the header string into an array of individual headers\n var arr = (0, $f67365b40c49b6c1$export$ef0e11c5f5f351f7)(headers).split(/[\\r\\n]+/);\n var responseHeaderMap_2 = {};\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(arr, function(line) {\n var parts = line.split(\": \");\n var header = parts.shift();\n var value = parts.join(\": \");\n if (_canIncludeHeaders(header)) responseHeaderMap_2[header] = value;\n });\n ajaxResponse[0, $785f2f8595bbd489$export$422ea83a60e3414b /* @min:%2eheaderMap */ ] = responseHeaderMap_2;\n }\n }\n return ajaxResponse;\n });\n var properties = void 0;\n try {\n if (!!_addRequestContext) properties = _addRequestContext({\n status: xhr[0, $785f2f8595bbd489$export$f8d169088a01f6f2 /* @min:%2estatus */ ],\n xhr: xhr\n });\n } catch (e) {\n $2569abef053897bd$var$_throwInternalWarning(_self, 104 /* _eInternalMessageId.FailedAddingCustomDefinedRequestContext */ , $2569abef053897bd$var$CUSTOM_REQUEST_CONTEXT_ERROR);\n }\n if (dependency) {\n if (properties !== undefined) dependency[0, $072e43366110cd19$export$400e70f2a2ecb5aa /* @min:%2eproperties */ ] = (0, $2a74b38b87b38cda$export$b3cf7a802e578501)((0, $2a74b38b87b38cda$export$b3cf7a802e578501)({}, dependency.properties), properties);\n var sysProperties = ajaxData[0, $785f2f8595bbd489$export$e2e640c31408a88f /* @min:%2egetPartAProps */ ]();\n _reportDependencyInternal(_dependencyInitializers, _self[0, $785f2f8595bbd489$export$f9ae8d0acf86503e /* @min:%2ecore */ ], ajaxData, dependency, null, sysProperties);\n } else _reportXhrError(null, {\n requestSentTime: ajaxData[0, $785f2f8595bbd489$export$b3507d39ae3f3e22 /* @min:%2erequestSentTime */ ],\n responseFinishedTime: ajaxData[0, $785f2f8595bbd489$export$e52fa892d403cac3 /* @min:%2eresponseFinishedTime */ ]\n });\n } finally{\n // cleanup telemetry data\n try {\n xhr[$2569abef053897bd$var$strAjaxData] = null;\n } catch (e) {\n // May throw in environments that prevent extension or freeze xhr\n }\n }\n }, function(e) {\n _reportXhrError(e, null);\n });\n }\n function _getAjaxCorrelationContext(xhr) {\n var _a;\n try {\n var responseHeadersString = xhr[0, $785f2f8595bbd489$export$121ad73699ff0814 /* @min:%2egetAllResponseHeaders */ ]();\n if (responseHeadersString !== null) {\n var index = $2569abef053897bd$var$_indexOf(responseHeadersString[0, $785f2f8595bbd489$export$e4eaee9e01d9baaa /* @min:%2etoLowerCase */ ](), (0, $78a4729d55fca66a$export$e499e02a1fe05177)[8 /* eRequestHeaders.requestContextHeaderLowerCase */ ]);\n if (index !== -1) {\n var responseHeader = xhr.getResponseHeader((0, $78a4729d55fca66a$export$e499e02a1fe05177)[0 /* eRequestHeaders.requestContextHeader */ ]);\n return (0, $d98b699aeccdabc6$export$dbaf37203f788583)(responseHeader);\n }\n }\n } catch (e) {\n $2569abef053897bd$var$_throwInternalWarning(_self, 18 /* _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader */ , $2569abef053897bd$var$CORRELATION_HEADER_ERROR, (_a = {}, _a[0, $785f2f8595bbd489$export$c9bea9d79dd8e37a /* @min:ajaxDiagnosticsMessage */ ] = $2569abef053897bd$var$_getFailedAjaxDiagnosticsMessage(xhr), _a[0, $785f2f8595bbd489$export$4852fd87b68a6e1f /* @min:exception */ ] = (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e), _a));\n }\n }\n function _createMarkId(type, ajaxData) {\n if (ajaxData[0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ] && _markPrefix && _enableAjaxPerfTracking) {\n var performance_1 = (0, $824d7bc9d9e48f68$export$28a0276e10aa78d7)();\n if (performance_1 && (0, $533f826bbc418791$export$f6e2535fb5126e54)(performance_1.mark)) {\n $2569abef053897bd$var$_markCount++;\n var markId = _markPrefix + type + \"#\" + $2569abef053897bd$var$_markCount;\n performance_1.mark(markId);\n var entries = performance_1.getEntriesByName(markId);\n if (entries && entries[0, $785f2f8595bbd489$export$6eae51590aaea43 /* @min:%2elength */ ] === 1) ajaxData[0, $785f2f8595bbd489$export$9e85e7b326182790 /* @min:%2eperfMark */ ] = entries[0];\n }\n }\n }\n function _findPerfResourceEntry(initiatorType, ajaxData, trackCallback, reportError) {\n var perfMark = ajaxData[0, $785f2f8595bbd489$export$9e85e7b326182790 /* @min:%2eperfMark */ ];\n var performance = (0, $824d7bc9d9e48f68$export$28a0276e10aa78d7)();\n var maxAttempts = _maxAjaxPerfLookupAttempts;\n var retryDelay = _ajaxPerfLookupDelay;\n var requestUrl = ajaxData[0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ];\n var attempt = 0;\n (function locateResourceTiming() {\n try {\n if (performance && perfMark) {\n attempt++;\n var perfTiming = null;\n var entries = performance.getEntries();\n for(var lp = entries[0, $785f2f8595bbd489$export$6eae51590aaea43 /* @min:%2elength */ ] - 1; lp >= 0; lp--){\n var entry = entries[lp];\n if (entry) {\n if (entry.entryType === \"resource\") {\n if (entry.initiatorType === initiatorType && ($2569abef053897bd$var$_indexOf(entry[0, $785f2f8595bbd489$export$9734b0a24bf02e93 /* @min:%2ename */ ], requestUrl) !== -1 || $2569abef053897bd$var$_indexOf(requestUrl, entry[0, $785f2f8595bbd489$export$9734b0a24bf02e93 /* @min:%2ename */ ]) !== -1)) perfTiming = entry;\n } else if (entry.entryType === \"mark\" && entry[0, $785f2f8595bbd489$export$9734b0a24bf02e93 /* @min:%2ename */ ] === perfMark[0, $785f2f8595bbd489$export$9734b0a24bf02e93 /* @min:%2ename */ ]) {\n // We hit the start event\n ajaxData[0, $785f2f8595bbd489$export$6bec4987b5d3526c /* @min:%2eperfTiming */ ] = perfTiming;\n break;\n }\n if (entry[0, $785f2f8595bbd489$export$69cac26425c8ea23 /* @min:%2estartTime */ ] < perfMark[0, $785f2f8595bbd489$export$69cac26425c8ea23 /* @min:%2estartTime */ ] - 1000) break;\n }\n }\n }\n if (!perfMark || // - we don't have a perfMark or\n ajaxData[0, $785f2f8595bbd489$export$6bec4987b5d3526c /* @min:%2eperfTiming */ ] || // - we have not found the perf entry or\n attempt >= maxAttempts || // - we have tried too many attempts or\n ajaxData.async === false) {\n if (perfMark && (0, $533f826bbc418791$export$f6e2535fb5126e54)(performance.clearMarks)) // Remove the mark so we don't fill up the performance resources too much\n performance.clearMarks(perfMark[0, $785f2f8595bbd489$export$9734b0a24bf02e93 /* @min:%2ename */ ]);\n ajaxData.perfAttempts = attempt;\n // just continue and report the track event\n trackCallback();\n } else // We need to wait for the browser to populate the window.performance entry\n // This needs to be at least 1ms as waiting <= 1 (on firefox) is not enough time for fetch or xhr,\n // this is a scheduling issue for the browser implementation\n (0, $d03b12effd00bf96$export$5f4d6617421d489b)(locateResourceTiming, retryDelay);\n } catch (e) {\n reportError(e);\n }\n })();\n }\n function _createFetchRecord(input, init) {\n var _a;\n var distributedTraceCtx = _getDistributedTraceCtx();\n var traceID = distributedTraceCtx && distributedTraceCtx[0, $785f2f8595bbd489$export$90dab0fe9b2b7158 /* @min:%2egetTraceId */ ]() || (0, $945e40d4195d77bb$export$58d1fad45f39d957)();\n var spanID = (0, $c3f3bf8012a4b2d4$export$25b2a9bb66b0078d)((0, $945e40d4195d77bb$export$58d1fad45f39d957)(), 0, 16);\n var ajaxData = new (0, $9a2f7734ba2f502d$export$3391d178758cbbb1)(traceID, spanID, _self[$2569abef053897bd$var$strDiagLog](), (_a = _self.core) === null || _a === void 0 ? void 0 : _a.getTraceCtx());\n ajaxData[0, $785f2f8595bbd489$export$4e92e4b92b41ba2d /* @min:%2etraceFlags */ ] = distributedTraceCtx && distributedTraceCtx[0, $785f2f8595bbd489$export$1fd22cf8d803736f /* @min:%2egetTraceFlags */ ]();\n ajaxData[0, $785f2f8595bbd489$export$b3507d39ae3f3e22 /* @min:%2erequestSentTime */ ] = (0, $d98b699aeccdabc6$export$30a447e32c58a836)();\n ajaxData[0, $785f2f8595bbd489$export$cce28811c9041832 /* @min:%2eerrorStatusText */ ] = _enableAjaxErrorStatusText;\n if (input instanceof Request) ajaxData[0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ] = input ? input.url : \"\";\n else ajaxData[0, $785f2f8595bbd489$export$8ff033ecd75b66c3 /* @min:%2erequestUrl */ ] = input;\n var method = \"GET\";\n if (init && init[0, $785f2f8595bbd489$export$47d30bd816d62bdc /* @min:%2emethod */ ]) method = init[0, $785f2f8595bbd489$export$47d30bd816d62bdc /* @min:%2emethod */ ];\n else if (input && input instanceof Request) method = input[0, $785f2f8595bbd489$export$47d30bd816d62bdc /* @min:%2emethod */ ];\n ajaxData[0, $785f2f8595bbd489$export$47d30bd816d62bdc /* @min:%2emethod */ ] = method;\n var requestHeaders = {};\n if (_enableRequestHeaderTracking) {\n var headers = new Headers((init ? init[0, $785f2f8595bbd489$export$829ed22a43b4aada /* @min:%2eheaders */ ] : 0) || (input instanceof Request ? input[0, $785f2f8595bbd489$export$829ed22a43b4aada /* @min:%2eheaders */ ] || {} : {}));\n headers.forEach(function(value, key) {\n if (_canIncludeHeaders(key)) requestHeaders[key] = value;\n });\n }\n ajaxData[0, $785f2f8595bbd489$export$b58618e731cdb301 /* @min:%2erequestHeaders */ ] = requestHeaders;\n _createMarkId($2569abef053897bd$var$STR_FETCH, ajaxData);\n return ajaxData;\n }\n function _getFailedFetchDiagnosticsMessage(input) {\n var result = \"\";\n try {\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(input)) {\n if (typeof input === \"string\") result += \"(url: '\".concat(input, \"')\");\n else result += \"(url: '\".concat(input.url, \"')\");\n }\n } catch (e) {\n $2569abef053897bd$var$_throwInternalCritical(_self, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */ , \"Failed to grab failed fetch diagnostics message\", {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n return result;\n }\n function _reportFetchMetrics(callDetails, status, input, response, ajaxData, getResponse, properties) {\n if (!ajaxData) return;\n function _reportFetchError(msgId, e, failedProps) {\n var errorProps = failedProps || {};\n errorProps[\"fetchDiagnosticsMessage\"] = _getFailedFetchDiagnosticsMessage(input);\n if (e) errorProps[\"exception\"] = (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e);\n $2569abef053897bd$var$_throwInternalWarning(_self, msgId, $2569abef053897bd$var$FAILED_TO_CALCULATE_DURATION_ERROR + \"fetch call\" + $2569abef053897bd$var$ERROR_NOT_SENT, errorProps);\n }\n ajaxData[0, $785f2f8595bbd489$export$e52fa892d403cac3 /* @min:%2eresponseFinishedTime */ ] = (0, $d98b699aeccdabc6$export$30a447e32c58a836)();\n ajaxData[0, $785f2f8595bbd489$export$f8d169088a01f6f2 /* @min:%2estatus */ ] = status;\n _findPerfResourceEntry($2569abef053897bd$var$STR_FETCH, ajaxData, function() {\n var dependency = ajaxData[0, $785f2f8595bbd489$export$e31aceb60e1b3a1a /* @min:%2eCreateTrackItem */ ](\"Fetch\", _enableRequestHeaderTracking, getResponse);\n var properties;\n try {\n if (!!_addRequestContext) properties = _addRequestContext({\n status: status,\n request: input,\n response: response\n });\n } catch (e) {\n $2569abef053897bd$var$_throwInternalWarning(_self, 104 /* _eInternalMessageId.FailedAddingCustomDefinedRequestContext */ , $2569abef053897bd$var$CUSTOM_REQUEST_CONTEXT_ERROR);\n }\n if (dependency) {\n if (properties !== undefined) dependency[0, $072e43366110cd19$export$400e70f2a2ecb5aa /* @min:%2eproperties */ ] = (0, $2a74b38b87b38cda$export$b3cf7a802e578501)((0, $2a74b38b87b38cda$export$b3cf7a802e578501)({}, dependency.properties), properties);\n var sysProperties = ajaxData[0, $785f2f8595bbd489$export$e2e640c31408a88f /* @min:%2egetPartAProps */ ]();\n _reportDependencyInternal(_dependencyInitializers, _self[0, $785f2f8595bbd489$export$f9ae8d0acf86503e /* @min:%2ecore */ ], ajaxData, dependency, null, sysProperties);\n } else _reportFetchError(14 /* _eInternalMessageId.FailedMonitorAjaxDur */ , null, {\n requestSentTime: ajaxData[0, $785f2f8595bbd489$export$b3507d39ae3f3e22 /* @min:%2erequestSentTime */ ],\n responseFinishedTime: ajaxData[0, $785f2f8595bbd489$export$e52fa892d403cac3 /* @min:%2eresponseFinishedTime */ ]\n });\n }, function(e) {\n _reportFetchError(18 /* _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader */ , e, null);\n });\n }\n function _getFetchCorrelationContext(response) {\n var _a;\n if (response && response[0, $785f2f8595bbd489$export$829ed22a43b4aada /* @min:%2eheaders */ ]) try {\n var responseHeader = response[0, $785f2f8595bbd489$export$829ed22a43b4aada /* @min:%2eheaders */ ].get((0, $78a4729d55fca66a$export$e499e02a1fe05177)[0 /* eRequestHeaders.requestContextHeader */ ]);\n return (0, $d98b699aeccdabc6$export$dbaf37203f788583)(responseHeader);\n } catch (e) {\n $2569abef053897bd$var$_throwInternalWarning(_self, 18 /* _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader */ , $2569abef053897bd$var$CORRELATION_HEADER_ERROR, (_a = {\n fetchDiagnosticsMessage: _getFailedFetchDiagnosticsMessage(response)\n }, _a[0, $785f2f8595bbd489$export$4852fd87b68a6e1f /* @min:exception */ ] = (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e), _a));\n }\n }\n function _reportDependencyInternal(initializers, core, ajaxData, dependency, properties, systemProperties) {\n var _a;\n var result = true;\n var initializersCount = initializers[0, $785f2f8595bbd489$export$6eae51590aaea43 /* @min:%2elength */ ];\n if (initializersCount > 0) {\n var details = (_a = {\n item: dependency\n }, _a[0, $072e43366110cd19$export$400e70f2a2ecb5aa /* @min:properties */ ] = properties, _a.sysProperties = systemProperties, _a.context = ajaxData ? ajaxData[0, $785f2f8595bbd489$export$fdcd48959e13aba7 /* @min:%2econtext */ ] : null, _a.aborted = ajaxData ? !!ajaxData[0, $785f2f8595bbd489$export$fcf18cee9ee41961 /* @min:%2eaborted */ ] : false, _a);\n result = $2569abef053897bd$var$_processDependencyContainer(core, initializers, details, \"initializer\");\n }\n if (result) _self[0, $785f2f8595bbd489$export$2aa2820bfe761f5b /* @min:%2etrackDependencyDataInternal */ ](dependency, properties, systemProperties);\n }\n });\n return _this;\n }\n // Removed Stub for AjaxMonitor.prototype.initialize.\n AjaxMonitor.prototype.processTelemetry = function(item, itemCtx) {\n this.processNext(item, itemCtx);\n };\n // Removed Stub for AjaxMonitor.prototype.trackDependencyData.\n // Removed Stub for AjaxMonitor.prototype.includeCorrelationHeaders.\n // Removed Stub for AjaxMonitor.prototype.addDependencyListener.\n /**\r\n * Add an dependency telemetry initializer callback function to allow populating additional properties or drop the request.\r\n * It is called after the dependency call has completed and any available performance details are available. A dependency\r\n * initializer is similar to the TelemetryInitializer function but it allows you to block the reporting of the dependency\r\n * request so that it doesn't count against the `maxAjaxCallsPerView`.\r\n * @param dependencyInitializer - The Dependency Telemetry Initializer function\r\n * @returns - A IDependencyInitializerHandler to enable the initializer to be removed\r\n */ AjaxMonitor.prototype.addDependencyInitializer = function(dependencyInitializer) {\n return null;\n };\n // Removed Stub for AjaxMonitor.prototype.trackDependencyDataInternal.\n AjaxMonitor.identifier = \"AjaxDependencyPlugin\";\n return AjaxMonitor;\n}((0, $b61d51369f8191a4$export$64a11c2f90e6766c));\n\n\n/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /**\r\n* PropertiesPlugin.ts\r\n* @copyright Microsoft 2018\r\n*/ \n\n\n\n\n/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ /**\r\n* TelemetryContext.ts\r\n* @copyright Microsoft 2018\r\n*/ \n\n\n/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ var $8da6cf2fd8f2255d$export$16975c34e60e1e61 = /** @class */ function() {\n function Application() {}\n return Application;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ var $4af86dbfa3092e80$export$8215d14a63d9fb10 = /** @class */ function() {\n /**\r\n * Constructs a new instance of the Device class\r\n */ function Device() {\n // don't attempt to fingerprint browsers\n this.id = \"browser\";\n // Device type is a dimension in our data platform\n // Setting it to 'Browser' allows to separate client and server dependencies/exceptions\n this.deviceClass = \"Browser\";\n }\n return Device;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \nvar $40e2a879f9bef5dc$var$Version = \"3.0.2\";\nvar $40e2a879f9bef5dc$export$81742925a72ee8f2 = /** @class */ function() {\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */ function Internal(config, unloadHookContainer) {\n var _this = this;\n var unloadHook = (0, $acb30f9e62dc5705$export$454a433e4deb244f)(config, function() {\n var prefix = config.sdkExtension;\n _this.sdkVersion = (prefix ? prefix + \"_\" : \"\") + \"javascript:\" + $40e2a879f9bef5dc$var$Version;\n });\n unloadHookContainer && unloadHookContainer.add(unloadHook);\n }\n return Internal;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ var $767b8cd94041adba$export$18a2be9195644f38 = /** @class */ function() {\n function Location() {}\n return Location;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nvar $f9279bf813e6e5d7$export$1c39d669bde62767 = \"sessionManager\"; // Count: 3\nvar $f9279bf813e6e5d7$export$c9f4bebf02f459de = \"update\"; // Count: 4\nvar $f9279bf813e6e5d7$export$52b1fe3e70f4c699 = \"isUserCookieSet\"; // Count: 4\nvar $f9279bf813e6e5d7$export$e8019acdc6dfe227 = \"isNewUser\"; // Count: 4\nvar $f9279bf813e6e5d7$export$2d15b9b0e9d1daaa = \"getTraceCtx\"; // Count: 3\nvar $f9279bf813e6e5d7$export$805965d0d38cc4a5 = \"telemetryTrace\"; // Count: 3\nvar $f9279bf813e6e5d7$export$585a4eb45f8043ec = \"applySessionContext\"; // Count: 2\nvar $f9279bf813e6e5d7$export$5c833c29ed72a760 = \"applyApplicationContext\"; // Count: 2\nvar $f9279bf813e6e5d7$export$f3448cce94ee4935 = \"applyDeviceContext\"; // Count: 2\nvar $f9279bf813e6e5d7$export$a6c599a5c1ab6761 = \"applyOperationContext\"; // Count: 2\nvar $f9279bf813e6e5d7$export$5090ada1085f4557 = \"applyUserContext\"; // Count: 2\nvar $f9279bf813e6e5d7$export$dddc87038d37bcef = \"applyOperatingSystemContxt\"; // Count: 2\nvar $f9279bf813e6e5d7$export$4768decfd4f15bcf = \"applyLocationContext\"; // Count: 2\nvar $f9279bf813e6e5d7$export$348ac062a116e27c = \"applyInternalContext\"; // Count: 2\nvar $f9279bf813e6e5d7$export$f251a1587d4aac90 = \"accountId\"; // Count: 7\nvar $f9279bf813e6e5d7$export$3af04f76fec134a = \"getSessionId\"; // Count: 4\nvar $f9279bf813e6e5d7$export$6d013a7bc2da53c1 = \"namePrefix\"; // Count: 3\nvar $f9279bf813e6e5d7$export$d2109757a25c372a = \"sessionCookiePostfix\"; // Count: 2\nvar $f9279bf813e6e5d7$export$f3af58106bbab288 = \"userCookiePostfix\"; // Count: 2\nvar $f9279bf813e6e5d7$export$5c90c36f2382a0ff = \"idLength\"; // Count: 4\nvar $f9279bf813e6e5d7$export$d4e11a6879dac67b = \"getNewId\"; // Count: 3\nvar $f9279bf813e6e5d7$export$6eae51590aaea43 = \"length\"; // Count: 4\nvar $f9279bf813e6e5d7$export$4d608086992f55c7 = \"automaticSession\"; // Count: 5\nvar $f9279bf813e6e5d7$export$574ff42e0e7ce0c = \"authenticatedId\"; // Count: 6\nvar $f9279bf813e6e5d7$export$8c9471ee03377604 = \"acquisitionDate\"; // Count: 5\nvar $f9279bf813e6e5d7$export$7254663b30b11264 = \"renewalDate\"; // Count: 4\nvar $f9279bf813e6e5d7$export$9876e756459769d6 = \"join\"; // Count: 5\nvar $f9279bf813e6e5d7$export$57599fb6aa598bd4 = \"cookieSeparator\"; // Count: 5\nvar $f9279bf813e6e5d7$export$7bdc84f949b24ffd = \"authUserCookieName\"; // Count: 3\n\n\nvar $b3a76197ac0f306d$var$SESSION_COOKIE_NAME = \"ai_session\";\nvar $b3a76197ac0f306d$var$ACQUISITION_SPAN = 86400000; // 24 hours in ms\nvar $b3a76197ac0f306d$var$RENEWAL_SPAN = 1800000; // 30 minutes in ms\nvar $b3a76197ac0f306d$var$COOKIE_UPDATE_INTERVAL = 60000; // 1 minute in ms\nvar $b3a76197ac0f306d$export$1fb4852a55678982 = /** @class */ function() {\n function Session() {}\n return Session;\n}();\nvar $b3a76197ac0f306d$export$9a3efd42578d1f11 = /** @class */ function() {\n function _SessionManager(config, core, unloadHookContainer) {\n var self = this;\n var _storageNamePrefix;\n var _cookieUpdatedTimestamp;\n var _logger = (0, $cc2aaaebf96ac6a7$export$5102d32ea1d740a)(core);\n var _cookieManager = (0, $d751d7cd1b1c5598$export$76c0b273586c25c7)(core);\n var _sessionExpirationMs;\n var _sessionRenewalMs;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(_SessionManager, self, function(_self) {\n if (!config) config = {};\n var unloadHook = (0, $acb30f9e62dc5705$export$454a433e4deb244f)(config, function(details) {\n _sessionExpirationMs = config.sessionExpirationMs || $b3a76197ac0f306d$var$ACQUISITION_SPAN;\n _sessionRenewalMs = config.sessionRenewalMs || $b3a76197ac0f306d$var$RENEWAL_SPAN;\n // sessionCookiePostfix takes the preference if it is configured, otherwise takes namePrefix if configured.\n var sessionCookiePostfix = config.sessionCookiePostfix || config[0, $f9279bf813e6e5d7$export$6d013a7bc2da53c1 /* @min:%2enamePrefix */ ] || \"\";\n _storageNamePrefix = $b3a76197ac0f306d$var$SESSION_COOKIE_NAME + sessionCookiePostfix;\n });\n unloadHookContainer && unloadHookContainer.add(unloadHook);\n _self[0, $f9279bf813e6e5d7$export$4d608086992f55c7 /* @min:%2eautomaticSession */ ] = new $b3a76197ac0f306d$export$1fb4852a55678982();\n _self[0, $f9279bf813e6e5d7$export$c9f4bebf02f459de /* @min:%2eupdate */ ] = function() {\n // Always using Date getTime() as there is a bug in older IE instances that causes the performance timings to have the hi-bit set eg 0x800000000 causing\n // the number to be incorrect.\n var nowMs = (0, $628cad25a0769458$export$a56f095995763cca)();\n var isExpired = false;\n var session = _self[0, $f9279bf813e6e5d7$export$4d608086992f55c7 /* @min:%2eautomaticSession */ ];\n if (!session.id) isExpired = !_initializeAutomaticSession(session, nowMs);\n if (!isExpired && _sessionExpirationMs > 0) {\n var timeSinceAcqMs = nowMs - session[0, $f9279bf813e6e5d7$export$8c9471ee03377604 /* @min:%2eacquisitionDate */ ];\n var timeSinceRenewalMs = nowMs - session[0, $f9279bf813e6e5d7$export$7254663b30b11264 /* @min:%2erenewalDate */ ];\n isExpired = timeSinceAcqMs < 0 || timeSinceRenewalMs < 0; // expired if the acquisition or last renewal are in the future\n isExpired = isExpired || timeSinceAcqMs > _sessionExpirationMs; // expired if the time since acquisition is more than session Expiration\n isExpired = isExpired || timeSinceRenewalMs > _sessionRenewalMs; // expired if the time since last renewal is more than renewal period\n }\n // renew if acquisitionSpan or renewalSpan has elapsed\n if (isExpired) // update automaticSession so session state has correct id\n _renew(nowMs);\n else // do not update the cookie more often than cookieUpdateInterval\n if (!_cookieUpdatedTimestamp || nowMs - _cookieUpdatedTimestamp > $b3a76197ac0f306d$var$COOKIE_UPDATE_INTERVAL) _setCookie(session, nowMs);\n };\n /**\r\n * Record the current state of the automatic session and store it in our cookie string format\r\n * into the browser's local storage. This is used to restore the session data when the cookie\r\n * expires.\r\n */ _self.backup = function() {\n var session = _self[0, $f9279bf813e6e5d7$export$4d608086992f55c7 /* @min:%2eautomaticSession */ ];\n _setStorage(session.id, session[0, $f9279bf813e6e5d7$export$8c9471ee03377604 /* @min:%2eacquisitionDate */ ], session[0, $f9279bf813e6e5d7$export$7254663b30b11264 /* @min:%2erenewalDate */ ]);\n };\n /**\r\n * Use config.namePrefix + ai_session cookie data or local storage data (when the cookie is unavailable) to\r\n * initialize the automatic session.\r\n * @returns true if values set otherwise false\r\n */ function _initializeAutomaticSession(session, now) {\n var isValid = false;\n var cookieValue = _cookieManager.get(_storageNamePrefix);\n if (cookieValue && (0, $533f826bbc418791$export$f6e2535fb5126e54)(cookieValue.split)) isValid = _initializeAutomaticSessionWithData(session, cookieValue);\n else {\n // There's no cookie, but we might have session data in local storage\n // This can happen if the session expired or the user actively deleted the cookie\n // We only want to recover data if the cookie is missing from expiry. We should respect the user's wishes if the cookie was deleted actively.\n // The User class handles this for us and deletes our local storage object if the persistent user cookie was removed.\n var storageValue = (0, $8e03bdff803b84be$export$c3876355f131c85c)(_logger, _storageNamePrefix);\n if (storageValue) isValid = _initializeAutomaticSessionWithData(session, storageValue);\n }\n return isValid || !!session.id;\n }\n /**\r\n * Extract id, acquisitionDate, and renewalDate from an ai_session payload string and\r\n * use this data to initialize automaticSession.\r\n *\r\n * @param sessionData - The string stored in an ai_session cookie or local storage backup\r\n * @returns true if values set otherwise false\r\n */ function _initializeAutomaticSessionWithData(session, sessionData) {\n var isValid = false;\n var sessionReset = \", session will be reset\";\n var tokens = sessionData.split(\"|\");\n if (tokens[0, $f9279bf813e6e5d7$export$6eae51590aaea43 /* @min:%2elength */ ] >= 2) try {\n var acqMs = +tokens[1] || 0;\n var renewalMs = +tokens[2] || 0;\n if (isNaN(acqMs) || acqMs <= 0) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_logger, 2 /* eLoggingSeverity.WARNING */ , 27 /* _eInternalMessageId.SessionRenewalDateIsZero */ , \"AI session acquisition date is 0\" + sessionReset);\n else if (isNaN(renewalMs) || renewalMs <= 0) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_logger, 2 /* eLoggingSeverity.WARNING */ , 27 /* _eInternalMessageId.SessionRenewalDateIsZero */ , \"AI session renewal date is 0\" + sessionReset);\n else if (tokens[0]) {\n // Everything looks valid so set the values\n session.id = tokens[0];\n session[0, $f9279bf813e6e5d7$export$8c9471ee03377604 /* @min:%2eacquisitionDate */ ] = acqMs;\n session[0, $f9279bf813e6e5d7$export$7254663b30b11264 /* @min:%2erenewalDate */ ] = renewalMs;\n isValid = true;\n }\n } catch (e) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_logger, 1 /* eLoggingSeverity.CRITICAL */ , 9 /* _eInternalMessageId.ErrorParsingAISessionCookie */ , \"Error parsing ai_session value [\" + (sessionData || \"\") + \"]\" + sessionReset + \" - \" + (0, $0b747974b0bb3563$export$39c4487b36c98fec)(e), {\n exception: (0, $386f00e3a193a7da$export$21fce7cbd4dc679f)(e)\n });\n }\n return isValid;\n }\n function _renew(nowMs) {\n var getNewId = config[0, $f9279bf813e6e5d7$export$d4e11a6879dac67b /* @min:%2egetNewId */ ] || (0, $dd28c90c4d15de9c$export$9ffd10a3fbdc175b);\n _self.automaticSession.id = getNewId(config[0, $f9279bf813e6e5d7$export$5c90c36f2382a0ff /* @min:%2eidLength */ ] || 22);\n _self[0, $f9279bf813e6e5d7$export$4d608086992f55c7 /* @min:%2eautomaticSession */ ][0, $f9279bf813e6e5d7$export$8c9471ee03377604 /* @min:%2eacquisitionDate */ ] = nowMs;\n _setCookie(_self[0, $f9279bf813e6e5d7$export$4d608086992f55c7 /* @min:%2eautomaticSession */ ], nowMs);\n // If this browser does not support local storage, fire an internal log to keep track of it at this point\n if (!(0, $8e03bdff803b84be$export$f28746933126d63f)()) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_logger, 2 /* eLoggingSeverity.WARNING */ , 0 /* _eInternalMessageId.BrowserDoesNotSupportLocalStorage */ , \"Browser does not support local storage. Session durations will be inaccurate.\");\n }\n function _setCookie(session, nowMs) {\n var acq = session[0, $f9279bf813e6e5d7$export$8c9471ee03377604 /* @min:%2eacquisitionDate */ ];\n session[0, $f9279bf813e6e5d7$export$7254663b30b11264 /* @min:%2erenewalDate */ ] = nowMs;\n var renewalPeriodMs = _sessionRenewalMs;\n // Set cookie to expire after the session expiry time passes or the session renewal deadline, whichever is sooner\n // Expiring the cookie will cause the session to expire even if the user isn't on the page\n var acqTimeLeftMs = acq + _sessionExpirationMs - nowMs;\n var cookie = [\n session.id,\n acq,\n nowMs\n ];\n var maxAgeSec = 0;\n if (acqTimeLeftMs < renewalPeriodMs) maxAgeSec = acqTimeLeftMs / 1000;\n else maxAgeSec = renewalPeriodMs / 1000;\n var cookieDomain = config.cookieDomain || null;\n // if sessionExpirationMs is set to 0, it means the expiry is set to 0 for this session cookie\n // A cookie with 0 expiry in the session cookie will never expire for that browser session. If the browser is closed the cookie expires.\n // Depending on the browser, another instance does not inherit this cookie, however, another tab will\n _cookieManager.set(_storageNamePrefix, cookie[0, $f9279bf813e6e5d7$export$9876e756459769d6 /* @min:%2ejoin */ ](\"|\"), _sessionExpirationMs > 0 ? maxAgeSec : null, cookieDomain);\n _cookieUpdatedTimestamp = nowMs;\n }\n function _setStorage(guid, acq, renewal) {\n // Keep data in local storage to retain the last session id, allowing us to cleanly end the session when it expires\n // Browsers that don't support local storage won't be able to end sessions cleanly from the client\n // The server will notice this and end the sessions itself, with loss of accurate session duration\n (0, $8e03bdff803b84be$export$631bce20500dc098)(_logger, _storageNamePrefix, [\n guid,\n acq,\n renewal\n ][0, $f9279bf813e6e5d7$export$9876e756459769d6 /* @min:%2ejoin */ ](\"|\"));\n }\n });\n }\n // Removed Stub for _SessionManager.prototype.update.\n // Removed Stub for _SessionManager.prototype.backup.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n _SessionManager.__ieDyn = 1;\n return _SessionManager;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\nvar $39a36e687e3ece23$export$d65492b1f626b9ec = /** @class */ function() {\n function TelemetryTrace(id, parentId, name, logger) {\n var _self = this;\n _self.traceID = id || (0, $945e40d4195d77bb$export$58d1fad45f39d957)();\n _self.parentID = parentId;\n var location = (0, $0c599844349363c4$export$e7fd20fad3cf4b5f)();\n if (!name && location && location.pathname) name = location.pathname;\n _self.name = (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, name);\n }\n return TelemetryTrace;\n}();\n\n\n/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ \n\n\n\n\nfunction $0ad45f65976bc29a$var$_validateUserInput(id) {\n // Validate:\n // 1. Id is a non-empty string.\n // 2. It does not contain special characters for cookies.\n if (typeof id !== \"string\" || !id || id.match(/,|;|=| |\\|/)) return false;\n return true;\n}\nvar $0ad45f65976bc29a$export$1f44aaf2ec115b54 = /** @class */ function() {\n function User(config, core, unloadHookContainer) {\n /**\r\n * A flag indicating whether this represents a new user\r\n */ this.isNewUser = false;\n /**\r\n * A flag indicating whether the user cookie has been set\r\n */ this.isUserCookieSet = false;\n var _logger = (0, $cc2aaaebf96ac6a7$export$5102d32ea1d740a)(core);\n var _cookieManager = (0, $d751d7cd1b1c5598$export$76c0b273586c25c7)(core);\n var _storageNamePrefix;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(User, this, function(_self) {\n // Define _self.config\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"config\", {\n g: function() {\n return config;\n }\n });\n var unloadHook = (0, $acb30f9e62dc5705$export$454a433e4deb244f)(config, function() {\n var userCookiePostfix = config[0, $f9279bf813e6e5d7$export$f3af58106bbab288 /* @min:%2euserCookiePostfix */ ] || \"\";\n _storageNamePrefix = User.userCookieName + userCookiePostfix;\n // get userId or create new one if none exists\n var cookie = _cookieManager.get(_storageNamePrefix);\n if (cookie) {\n _self[0, $f9279bf813e6e5d7$export$e8019acdc6dfe227 /* @min:%2eisNewUser */ ] = false;\n var params = cookie.split(User[0, $f9279bf813e6e5d7$export$57599fb6aa598bd4 /* @min:%2ecookieSeparator */ ]);\n if (params[0, $f9279bf813e6e5d7$export$6eae51590aaea43 /* @min:%2elength */ ] > 0) {\n _self.id = params[0];\n // we already have a cookie\n _self[0, $f9279bf813e6e5d7$export$52b1fe3e70f4c699 /* @min:%2eisUserCookieSet */ ] = !!_self.id;\n }\n }\n if (!_self.id) {\n _self.id = _generateNewId();\n var newCookie = _generateNewCookie(_self.id);\n _setUserCookie(newCookie[0, $f9279bf813e6e5d7$export$9876e756459769d6 /* @min:%2ejoin */ ](User[0, $f9279bf813e6e5d7$export$57599fb6aa598bd4 /* @min:%2ecookieSeparator */ ]));\n // If we have an config.namePrefix() + ai_session in local storage this means the user actively removed our cookies.\n // We should respect their wishes and clear ourselves from local storage\n var name_1 = (config[0, $f9279bf813e6e5d7$export$6d013a7bc2da53c1 /* @min:%2enamePrefix */ ] || \"\") + \"ai_session\";\n (0, $8e03bdff803b84be$export$63137c65c2cc6743)(_logger, name_1);\n }\n // We still take the account id from the ctor param for backward compatibility.\n // But if the the customer set the accountId through the newer setAuthenticatedUserContext API, we will override it.\n _self[0, $f9279bf813e6e5d7$export$f251a1587d4aac90 /* @min:%2eaccountId */ ] = config[0, $f9279bf813e6e5d7$export$f251a1587d4aac90 /* @min:%2eaccountId */ ] || undefined;\n // Get the auth user id and account id from the cookie if exists\n // Cookie is in the pattern: |\n var authCookie = _cookieManager.get(User[0, $f9279bf813e6e5d7$export$7bdc84f949b24ffd /* @min:%2eauthUserCookieName */ ]);\n if (authCookie) {\n authCookie = decodeURI(authCookie);\n var authCookieString = authCookie.split(User[0, $f9279bf813e6e5d7$export$57599fb6aa598bd4 /* @min:%2ecookieSeparator */ ]);\n if (authCookieString[0]) _self[0, $f9279bf813e6e5d7$export$574ff42e0e7ce0c /* @min:%2eauthenticatedId */ ] = authCookieString[0];\n if (authCookieString[0, $f9279bf813e6e5d7$export$6eae51590aaea43 /* @min:%2elength */ ] > 1 && authCookieString[1]) _self[0, $f9279bf813e6e5d7$export$f251a1587d4aac90 /* @min:%2eaccountId */ ] = authCookieString[1];\n }\n });\n unloadHookContainer && unloadHookContainer.add(unloadHook);\n function _generateNewId() {\n var theConfig = config || {};\n var getNewId = theConfig[0, $f9279bf813e6e5d7$export$d4e11a6879dac67b /* @min:%2egetNewId */ ] || (0, $dd28c90c4d15de9c$export$9ffd10a3fbdc175b);\n var id = getNewId(theConfig[0, $f9279bf813e6e5d7$export$5c90c36f2382a0ff /* @min:%2eidLength */ ] ? config[0, $f9279bf813e6e5d7$export$5c90c36f2382a0ff /* @min:%2eidLength */ ] : 22);\n return id;\n }\n function _generateNewCookie(userId) {\n var acqStr = (0, $0b747974b0bb3563$export$dfaaa8705752128f)(new Date());\n _self.accountAcquisitionDate = acqStr;\n _self[0, $f9279bf813e6e5d7$export$e8019acdc6dfe227 /* @min:%2eisNewUser */ ] = true;\n var newCookie = [\n userId,\n acqStr\n ];\n return newCookie;\n }\n function _setUserCookie(cookie) {\n // without expiration, cookies expire at the end of the session\n // set it to 365 days from now\n // 365 * 24 * 60 * 60 = 31536000\n var oneYear = 31536000;\n _self[0, $f9279bf813e6e5d7$export$52b1fe3e70f4c699 /* @min:%2eisUserCookieSet */ ] = _cookieManager.set(_storageNamePrefix, cookie, oneYear);\n }\n _self.setAuthenticatedUserContext = function(authenticatedUserId, accountId, storeInCookie) {\n if (storeInCookie === void 0) storeInCookie = false;\n // Validate inputs to ensure no cookie control characters.\n var isInvalidInput = !$0ad45f65976bc29a$var$_validateUserInput(authenticatedUserId) || accountId && !$0ad45f65976bc29a$var$_validateUserInput(accountId);\n if (isInvalidInput) {\n (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_logger, 2 /* eLoggingSeverity.WARNING */ , 60 /* _eInternalMessageId.SetAuthContextFailedAccountName */ , \"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\", true);\n return;\n }\n // Create cookie string.\n _self[0, $f9279bf813e6e5d7$export$574ff42e0e7ce0c /* @min:%2eauthenticatedId */ ] = authenticatedUserId;\n var authCookie = _self[0, $f9279bf813e6e5d7$export$574ff42e0e7ce0c /* @min:%2eauthenticatedId */ ];\n if (accountId) {\n _self[0, $f9279bf813e6e5d7$export$f251a1587d4aac90 /* @min:%2eaccountId */ ] = accountId;\n authCookie = [\n _self[0, $f9279bf813e6e5d7$export$574ff42e0e7ce0c /* @min:%2eauthenticatedId */ ],\n _self.accountId\n ][0, $f9279bf813e6e5d7$export$9876e756459769d6 /* @min:%2ejoin */ ](User[0, $f9279bf813e6e5d7$export$57599fb6aa598bd4 /* @min:%2ecookieSeparator */ ]);\n }\n if (storeInCookie) // Set the cookie. No expiration date because this is a session cookie (expires when browser closed).\n // Encoding the cookie to handle unexpected unicode characters.\n _cookieManager.set(User[0, $f9279bf813e6e5d7$export$7bdc84f949b24ffd /* @min:%2eauthUserCookieName */ ], encodeURI(authCookie));\n };\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n * @returns {}\r\n */ _self.clearAuthenticatedUserContext = function() {\n _self[0, $f9279bf813e6e5d7$export$574ff42e0e7ce0c /* @min:%2eauthenticatedId */ ] = null;\n _self[0, $f9279bf813e6e5d7$export$f251a1587d4aac90 /* @min:%2eaccountId */ ] = null;\n _cookieManager.del(User[0, $f9279bf813e6e5d7$export$7bdc84f949b24ffd /* @min:%2eauthUserCookieName */ ]);\n };\n _self[0, $f9279bf813e6e5d7$export$c9f4bebf02f459de /* @min:%2eupdate */ ] = function(userId) {\n // Optimizations to avoid setting and processing the cookie when not needed\n if (_self.id !== userId || !_self[0, $f9279bf813e6e5d7$export$52b1fe3e70f4c699 /* @min:%2eisUserCookieSet */ ]) {\n var user_id = userId ? userId : _generateNewId();\n var user_cookie = _generateNewCookie(user_id);\n _setUserCookie(user_cookie[0, $f9279bf813e6e5d7$export$9876e756459769d6 /* @min:%2ejoin */ ](User[0, $f9279bf813e6e5d7$export$57599fb6aa598bd4 /* @min:%2ecookieSeparator */ ]));\n }\n };\n });\n }\n // Removed Stub for User.prototype.setAuthenticatedUserContext.\n // Removed Stub for User.prototype.clearAuthenticatedUserContext.\n // Removed Stub for User.prototype.update.\n User.cookieSeparator = \"|\";\n User.userCookieName = \"ai_user\";\n User.authUserCookieName = \"ai_authUser\";\n return User;\n}();\n\n\n\nvar $c7c00a0692573aa9$var$strExt = \"ext\";\nvar $c7c00a0692573aa9$var$strTags = \"tags\";\nfunction $c7c00a0692573aa9$var$_removeEmpty(target, name) {\n if (target && target[name] && (0, $36a077d9f4439b69$export$f7628dc18f4211e5)(target[name])[0, $f9279bf813e6e5d7$export$6eae51590aaea43 /* @min:%2elength */ ] === 0) delete target[name];\n}\nfunction $c7c00a0692573aa9$var$_nullResult() {\n return null;\n}\nvar $c7c00a0692573aa9$export$7b6b7bc4acb29126 = /** @class */ function() {\n function TelemetryContext(core, defaultConfig, previousTraceCtx, unloadHookContainer) {\n var _this = this;\n var logger = core.logger;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(TelemetryContext, this, function(_self) {\n _self.appId = $c7c00a0692573aa9$var$_nullResult;\n _self[0, $f9279bf813e6e5d7$export$3af04f76fec134a /* @min:%2egetSessionId */ ] = $c7c00a0692573aa9$var$_nullResult;\n _self.application = new (0, $8da6cf2fd8f2255d$export$16975c34e60e1e61)();\n _self.internal = new (0, $40e2a879f9bef5dc$export$81742925a72ee8f2)(defaultConfig, unloadHookContainer);\n if ((0, $3d5fcb60a9467a45$export$fef62134eea24008)()) {\n _self[0, $f9279bf813e6e5d7$export$1c39d669bde62767 /* @min:%2esessionManager */ ] = new (0, $b3a76197ac0f306d$export$9a3efd42578d1f11)(defaultConfig, core, unloadHookContainer);\n _self.device = new (0, $4af86dbfa3092e80$export$8215d14a63d9fb10)();\n _self.location = new (0, $767b8cd94041adba$export$18a2be9195644f38)();\n _self.user = new (0, $0ad45f65976bc29a$export$1f44aaf2ec115b54)(defaultConfig, core, unloadHookContainer);\n var traceId = void 0;\n var parentId = void 0;\n var name_1;\n if (previousTraceCtx) {\n traceId = previousTraceCtx.getTraceId();\n parentId = previousTraceCtx.getSpanId();\n name_1 = previousTraceCtx.getName();\n }\n _self[0, $f9279bf813e6e5d7$export$805965d0d38cc4a5 /* @min:%2etelemetryTrace */ ] = new (0, $39a36e687e3ece23$export$d65492b1f626b9ec)(traceId, parentId, name_1, logger);\n _self.session = new (0, $b3a76197ac0f306d$export$1fb4852a55678982)();\n }\n _self[0, $f9279bf813e6e5d7$export$3af04f76fec134a /* @min:%2egetSessionId */ ] = function() {\n var session = _self.session;\n var sesId = null;\n // If customer set session info, apply their context; otherwise apply context automatically generated\n if (session && (0, $533f826bbc418791$export$844ec244b1367d54)(session.id)) sesId = session.id;\n else {\n // Gets the automatic session if it exists or an empty object\n var autoSession = (_self[0, $f9279bf813e6e5d7$export$1c39d669bde62767 /* @min:%2esessionManager */ ] || {})[0, $f9279bf813e6e5d7$export$4d608086992f55c7 /* @min:%2eautomaticSession */ ];\n sesId = autoSession && (0, $533f826bbc418791$export$844ec244b1367d54)(autoSession.id) ? autoSession.id : null;\n }\n return sesId;\n };\n _self[0, $f9279bf813e6e5d7$export$585a4eb45f8043ec /* @min:%2eapplySessionContext */ ] = function(evt, itemCtx) {\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)((0, $0b747974b0bb3563$export$51417ccc212471e)(evt.ext, (0, $1185376df44832bd$export$152f4bb29f8263d0).AppExt), \"sesId\", _self[0, $f9279bf813e6e5d7$export$3af04f76fec134a /* @min:%2egetSessionId */ ](), (0, $533f826bbc418791$export$844ec244b1367d54));\n };\n _self[0, $f9279bf813e6e5d7$export$dddc87038d37bcef /* @min:%2eapplyOperatingSystemContxt */ ] = function(evt, itemCtx) {\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(evt.ext, (0, $1185376df44832bd$export$152f4bb29f8263d0).OSExt, _self.os);\n };\n _self[0, $f9279bf813e6e5d7$export$5c833c29ed72a760 /* @min:%2eapplyApplicationContext */ ] = function(evt, itemCtx) {\n var application = _self.application;\n if (application) {\n // evt.ext.app\n var tags = (0, $0b747974b0bb3563$export$51417ccc212471e)(evt, $c7c00a0692573aa9$var$strTags);\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(tags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).applicationVersion, application.ver, (0, $533f826bbc418791$export$844ec244b1367d54));\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(tags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).applicationBuild, application.build, (0, $533f826bbc418791$export$844ec244b1367d54));\n }\n };\n _self[0, $f9279bf813e6e5d7$export$f3448cce94ee4935 /* @min:%2eapplyDeviceContext */ ] = function(evt, itemCtx) {\n var device = _self.device;\n if (device) {\n // evt.ext.device\n var extDevice = (0, $0b747974b0bb3563$export$51417ccc212471e)((0, $0b747974b0bb3563$export$51417ccc212471e)(evt, $c7c00a0692573aa9$var$strExt), (0, $1185376df44832bd$export$152f4bb29f8263d0).DeviceExt);\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(extDevice, \"localId\", device.id, (0, $533f826bbc418791$export$844ec244b1367d54));\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(extDevice, \"ip\", device.ip, (0, $533f826bbc418791$export$844ec244b1367d54));\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(extDevice, \"model\", device.model, (0, $533f826bbc418791$export$844ec244b1367d54));\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(extDevice, \"deviceClass\", device.deviceClass, (0, $533f826bbc418791$export$844ec244b1367d54));\n }\n };\n _self[0, $f9279bf813e6e5d7$export$348ac062a116e27c /* @min:%2eapplyInternalContext */ ] = function(evt, itemCtx) {\n var internal = _self.internal;\n if (internal) {\n var tags = (0, $0b747974b0bb3563$export$51417ccc212471e)(evt, $c7c00a0692573aa9$var$strTags);\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(tags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).internalAgentVersion, internal.agentVersion, (0, $533f826bbc418791$export$844ec244b1367d54)); // not mapped in CS 4.0\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(tags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).internalSdkVersion, (0, $8c3059962bb1d83c$export$4e25b1d4bcd67eb8)(logger, internal.sdkVersion, 64), (0, $533f826bbc418791$export$844ec244b1367d54));\n if (evt.baseType === (0, $cc2aaaebf96ac6a7$export$70ef838ed08aad47).dataType || evt.baseType === (0, $5c5f40703ef3d51c$export$12c0fdede1c6bc6c).dataType) {\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(tags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).internalSnippet, internal.snippetVer, (0, $533f826bbc418791$export$844ec244b1367d54));\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(tags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).internalSdkSrc, internal.sdkSrc, (0, $533f826bbc418791$export$844ec244b1367d54));\n }\n }\n };\n _self[0, $f9279bf813e6e5d7$export$4768decfd4f15bcf /* @min:%2eapplyLocationContext */ ] = function(evt, itemCtx) {\n var location = _this.location;\n if (location) (0, $0b747974b0bb3563$export$80746c6bc6142fc8)((0, $0b747974b0bb3563$export$51417ccc212471e)(evt, $c7c00a0692573aa9$var$strTags, []), (0, $1185376df44832bd$export$ebc7727f2a4272f6).locationIp, location.ip, (0, $533f826bbc418791$export$844ec244b1367d54));\n };\n _self[0, $f9279bf813e6e5d7$export$a6c599a5c1ab6761 /* @min:%2eapplyOperationContext */ ] = function(evt, itemCtx) {\n var telemetryTrace = _self[0, $f9279bf813e6e5d7$export$805965d0d38cc4a5 /* @min:%2etelemetryTrace */ ];\n if (telemetryTrace) {\n var extTrace = (0, $0b747974b0bb3563$export$51417ccc212471e)((0, $0b747974b0bb3563$export$51417ccc212471e)(evt, $c7c00a0692573aa9$var$strExt), (0, $1185376df44832bd$export$152f4bb29f8263d0).TraceExt, {\n traceID: undefined,\n parentID: undefined\n });\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(extTrace, \"traceID\", telemetryTrace.traceID, (0, $533f826bbc418791$export$844ec244b1367d54), (0, $533f826bbc418791$export$bedb7023a7733221));\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(extTrace, \"name\", telemetryTrace.name, (0, $533f826bbc418791$export$844ec244b1367d54), (0, $533f826bbc418791$export$bedb7023a7733221));\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(extTrace, \"parentID\", telemetryTrace.parentID, (0, $533f826bbc418791$export$844ec244b1367d54), (0, $533f826bbc418791$export$bedb7023a7733221));\n }\n };\n _self.applyWebContext = function(evt, itemCtx) {\n var web = _this.web;\n if (web) (0, $0b747974b0bb3563$export$80746c6bc6142fc8)((0, $0b747974b0bb3563$export$51417ccc212471e)(evt, $c7c00a0692573aa9$var$strExt), (0, $1185376df44832bd$export$152f4bb29f8263d0).WebExt, web);\n };\n _self[0, $f9279bf813e6e5d7$export$5090ada1085f4557 /* @min:%2eapplyUserContext */ ] = function(evt, itemCtx) {\n var user = _self.user;\n if (user) {\n var tags = (0, $0b747974b0bb3563$export$51417ccc212471e)(evt, $c7c00a0692573aa9$var$strTags, []);\n // stays in tags\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(tags, (0, $1185376df44832bd$export$ebc7727f2a4272f6).userAccountId, user[0, $f9279bf813e6e5d7$export$f251a1587d4aac90 /* @min:%2eaccountId */ ], (0, $533f826bbc418791$export$844ec244b1367d54));\n // CS 4.0\n var extUser = (0, $0b747974b0bb3563$export$51417ccc212471e)((0, $0b747974b0bb3563$export$51417ccc212471e)(evt, $c7c00a0692573aa9$var$strExt), (0, $1185376df44832bd$export$152f4bb29f8263d0).UserExt);\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(extUser, \"id\", user.id, (0, $533f826bbc418791$export$844ec244b1367d54));\n (0, $0b747974b0bb3563$export$80746c6bc6142fc8)(extUser, \"authId\", user[0, $f9279bf813e6e5d7$export$574ff42e0e7ce0c /* @min:%2eauthenticatedId */ ], (0, $533f826bbc418791$export$844ec244b1367d54));\n }\n };\n _self.cleanUp = function(evt, itemCtx) {\n var ext = evt.ext;\n if (ext) {\n $c7c00a0692573aa9$var$_removeEmpty(ext, (0, $1185376df44832bd$export$152f4bb29f8263d0).DeviceExt);\n $c7c00a0692573aa9$var$_removeEmpty(ext, (0, $1185376df44832bd$export$152f4bb29f8263d0).UserExt);\n $c7c00a0692573aa9$var$_removeEmpty(ext, (0, $1185376df44832bd$export$152f4bb29f8263d0).WebExt);\n $c7c00a0692573aa9$var$_removeEmpty(ext, (0, $1185376df44832bd$export$152f4bb29f8263d0).OSExt);\n $c7c00a0692573aa9$var$_removeEmpty(ext, (0, $1185376df44832bd$export$152f4bb29f8263d0).AppExt);\n $c7c00a0692573aa9$var$_removeEmpty(ext, (0, $1185376df44832bd$export$152f4bb29f8263d0).TraceExt);\n }\n };\n });\n }\n // Removed Stub for TelemetryContext.prototype.applySessionContext.\n // Removed Stub for TelemetryContext.prototype.applyOperatingSystemContxt.\n // Removed Stub for TelemetryContext.prototype.applyApplicationContext.\n // Removed Stub for TelemetryContext.prototype.applyDeviceContext.\n // Removed Stub for TelemetryContext.prototype.applyInternalContext.\n // Removed Stub for TelemetryContext.prototype.applyLocationContext.\n // Removed Stub for TelemetryContext.prototype.applyOperationContext.\n // Removed Stub for TelemetryContext.prototype.applyWebContext.\n // Removed Stub for TelemetryContext.prototype.applyUserContext.\n // Removed Stub for TelemetryContext.prototype.cleanUp.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n TelemetryContext.__ieDyn = 1;\n return TelemetryContext;\n}();\n\n\n\nvar $374e174ea903f978$var$_a;\nvar $374e174ea903f978$var$undefString;\nvar $374e174ea903f978$var$nullValue = null;\nvar $374e174ea903f978$var$_defaultConfig = (0, $36a077d9f4439b69$export$a15782d21797da4c)(($374e174ea903f978$var$_a = {}, $374e174ea903f978$var$_a[0, $f9279bf813e6e5d7$export$f251a1587d4aac90 /* @min:accountId */ ] = $374e174ea903f978$var$nullValue, $374e174ea903f978$var$_a.sessionRenewalMs = 1800000, $374e174ea903f978$var$_a.samplingPercentage = 100, $374e174ea903f978$var$_a.sessionExpirationMs = 86400000, $374e174ea903f978$var$_a.cookieDomain = $374e174ea903f978$var$nullValue, $374e174ea903f978$var$_a.sdkExtension = $374e174ea903f978$var$nullValue, $374e174ea903f978$var$_a.isBrowserLinkTrackingEnabled = false, $374e174ea903f978$var$_a.appId = $374e174ea903f978$var$nullValue, $374e174ea903f978$var$_a[0, $f9279bf813e6e5d7$export$3af04f76fec134a /* @min:getSessionId */ ] = $374e174ea903f978$var$nullValue, $374e174ea903f978$var$_a[0, $f9279bf813e6e5d7$export$6d013a7bc2da53c1 /* @min:namePrefix */ ] = $374e174ea903f978$var$undefString, $374e174ea903f978$var$_a[0, $f9279bf813e6e5d7$export$d2109757a25c372a /* @min:sessionCookiePostfix */ ] = $374e174ea903f978$var$undefString, $374e174ea903f978$var$_a[0, $f9279bf813e6e5d7$export$f3af58106bbab288 /* @min:userCookiePostfix */ ] = $374e174ea903f978$var$undefString, $374e174ea903f978$var$_a[0, $f9279bf813e6e5d7$export$5c90c36f2382a0ff /* @min:idLength */ ] = 22, $374e174ea903f978$var$_a[0, $f9279bf813e6e5d7$export$d4e11a6879dac67b /* @min:getNewId */ ] = $374e174ea903f978$var$nullValue, $374e174ea903f978$var$_a));\nvar $374e174ea903f978$var$PropertiesPlugin = /** @class */ function(_super) {\n (0, $2a74b38b87b38cda$export$1f9c32e3fbfb8e62)(PropertiesPlugin, _super);\n function PropertiesPlugin() {\n var _this = _super.call(this) || this;\n _this.priority = 110;\n _this.identifier = (0, $ca7353bd9238d340$export$2268e69a6d93b7cc);\n var _extensionConfig;\n var _distributedTraceCtx;\n var _previousTraceCtx;\n var _context;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(PropertiesPlugin, _this, function(_self, _base) {\n _initDefaults();\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"context\", {\n g: function() {\n return _context;\n }\n });\n _self.initialize = function(config, core, extensions, pluginChain) {\n _base.initialize(config, core, extensions, pluginChain);\n _populateDefaults(config);\n };\n /**\r\n * Add Part A fields to the event\r\n * @param event - The event that needs to be processed\r\n */ _self.processTelemetry = function(event, itemCtx) {\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(event)) {\n itemCtx = _self._getTelCtx(itemCtx);\n // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\n if (event.name === (0, $5c5f40703ef3d51c$export$12c0fdede1c6bc6c).envelopeType) itemCtx.diagLog().resetInternalMessageCount();\n var theContext = _context || {};\n if (theContext.session) // If customer did not provide custom session id update the session manager\n {\n if (typeof _context.session.id !== \"string\" && theContext[0, $f9279bf813e6e5d7$export$1c39d669bde62767 /* @min:%2esessionManager */ ]) theContext[0, $f9279bf813e6e5d7$export$1c39d669bde62767 /* @min:%2esessionManager */ ][0, $f9279bf813e6e5d7$export$c9f4bebf02f459de /* @min:%2eupdate */ ]();\n }\n var userCtx = theContext.user;\n if (userCtx && !userCtx[0, $f9279bf813e6e5d7$export$52b1fe3e70f4c699 /* @min:%2eisUserCookieSet */ ]) userCtx[0, $f9279bf813e6e5d7$export$c9f4bebf02f459de /* @min:%2eupdate */ ](theContext.user.id);\n _processTelemetryInternal(event, itemCtx);\n if (userCtx && userCtx[0, $f9279bf813e6e5d7$export$e8019acdc6dfe227 /* @min:%2eisNewUser */ ]) {\n userCtx[0, $f9279bf813e6e5d7$export$e8019acdc6dfe227 /* @min:%2eisNewUser */ ] = false;\n var message = new (0, $cc2aaaebf96ac6a7$export$70ef838ed08aad47)(72 /* _eInternalMessageId.SendBrowserInfoOnUserInit */ , ((0, $3d5fcb60a9467a45$export$a56241c767c1d89f)() || {}).userAgent || \"\");\n (0, $cc2aaaebf96ac6a7$export$e15fbe42d9bc9d3d)(itemCtx.diagLog(), 1 /* eLoggingSeverity.CRITICAL */ , message);\n }\n _self.processNext(event, itemCtx);\n }\n };\n _self._doTeardown = function(unloadCtx, unloadState) {\n var core = (unloadCtx || {}).core();\n if (core && core[0, $f9279bf813e6e5d7$export$2d15b9b0e9d1daaa /* @min:%2egetTraceCtx */ ]) {\n var traceCtx = core[0, $f9279bf813e6e5d7$export$2d15b9b0e9d1daaa /* @min:%2egetTraceCtx */ ](false);\n if (traceCtx === _distributedTraceCtx) core.setTraceCtx(_previousTraceCtx);\n }\n _initDefaults();\n };\n function _initDefaults() {\n _extensionConfig = null;\n _distributedTraceCtx = null;\n _previousTraceCtx = null;\n _context = null;\n }\n function _populateDefaults(config) {\n var identifier = _self.identifier;\n var core = _self.core;\n // This function will be re-called whenever any referenced configuration is changed\n _self._addHook((0, $acb30f9e62dc5705$export$454a433e4deb244f)(config, function() {\n var ctx = (0, $bc7124acb0f73e64$export$ca98f11e981bcfd6)(null, config, core);\n _extensionConfig = ctx.getExtCfg(identifier, $374e174ea903f978$var$_defaultConfig);\n // Test hook to allow accessing the internal values -- explicitly not defined as an available property on the class\n _self[\"_extConfig\"] = _extensionConfig;\n }));\n // This is outside of the onConfigChange as we don't want to update (replace) these values whenever a referenced config item changes\n _previousTraceCtx = core[0, $f9279bf813e6e5d7$export$2d15b9b0e9d1daaa /* @min:%2egetTraceCtx */ ](false);\n _context = new (0, $c7c00a0692573aa9$export$7b6b7bc4acb29126)(core, _extensionConfig, _previousTraceCtx, _self._unloadHooks);\n _distributedTraceCtx = (0, $d98b699aeccdabc6$export$847d5dabba5fabb9)(_self.context[0, $f9279bf813e6e5d7$export$805965d0d38cc4a5 /* @min:%2etelemetryTrace */ ], _previousTraceCtx);\n core.setTraceCtx(_distributedTraceCtx);\n _self.context.appId = function() {\n var breezeChannel = core.getPlugin((0, $ca7353bd9238d340$export$a714a094d3058c99));\n return breezeChannel ? breezeChannel.plugin[\"_appId\"] : null;\n };\n }\n function _processTelemetryInternal(evt, itemCtx) {\n // Set Part A fields\n (0, $0b747974b0bb3563$export$51417ccc212471e)(evt, \"tags\", []);\n (0, $0b747974b0bb3563$export$51417ccc212471e)(evt, \"ext\", {});\n var ctx = _self.context;\n ctx[0, $f9279bf813e6e5d7$export$585a4eb45f8043ec /* @min:%2eapplySessionContext */ ](evt, itemCtx);\n ctx[0, $f9279bf813e6e5d7$export$5c833c29ed72a760 /* @min:%2eapplyApplicationContext */ ](evt, itemCtx);\n ctx[0, $f9279bf813e6e5d7$export$f3448cce94ee4935 /* @min:%2eapplyDeviceContext */ ](evt, itemCtx);\n ctx[0, $f9279bf813e6e5d7$export$a6c599a5c1ab6761 /* @min:%2eapplyOperationContext */ ](evt, itemCtx);\n ctx[0, $f9279bf813e6e5d7$export$5090ada1085f4557 /* @min:%2eapplyUserContext */ ](evt, itemCtx);\n ctx[0, $f9279bf813e6e5d7$export$dddc87038d37bcef /* @min:%2eapplyOperatingSystemContxt */ ](evt, itemCtx);\n ctx.applyWebContext(evt, itemCtx);\n ctx[0, $f9279bf813e6e5d7$export$4768decfd4f15bcf /* @min:%2eapplyLocationContext */ ](evt, itemCtx); // legacy tags\n ctx[0, $f9279bf813e6e5d7$export$348ac062a116e27c /* @min:%2eapplyInternalContext */ ](evt, itemCtx); // legacy tags\n ctx.cleanUp(evt, itemCtx);\n }\n });\n return _this;\n }\n // Removed Stub for PropertiesPlugin.prototype.initialize.\n // Removed Stub for PropertiesPlugin.prototype.processTelemetry.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n PropertiesPlugin.__ieDyn = 1;\n return PropertiesPlugin;\n}((0, $b61d51369f8191a4$export$64a11c2f90e6766c));\nvar $374e174ea903f978$export$2e2bcd8739ae039 = $374e174ea903f978$var$PropertiesPlugin;\n\n\n\n\n/*\n * Application Insights JavaScript SDK - Web, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // ###################################################################################################################################################\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\n// ###################################################################################################################################################\n// Generally you should only put values that are used more than 2 times and then only if not already exposed as a constant (such as SdkCoreNames)\n// as when using \"short\" named values from here they will be will be minified smaller than the SdkCoreNames[eSdkCoreNames.xxxx] value.\nvar $07885e4968a136ac$var$_AUTHENTICATED_USER_CONTEXT = \"AuthenticatedUserContext\";\nvar $07885e4968a136ac$var$_TRACK = \"track\";\nvar $07885e4968a136ac$export$5e8607ab26634759 = \"\";\nvar $07885e4968a136ac$export$c40a95bd1f19a04a = \"snippet\";\nvar $07885e4968a136ac$export$da4182b670dc48ff = \"getCookieMgr\";\nvar $07885e4968a136ac$export$4dff843ac2d49cae = \"startTrackPage\";\nvar $07885e4968a136ac$export$83ac403ed0121674 = \"stopTrackPage\";\nvar $07885e4968a136ac$export$36b97ab40aae74fe = \"flush\";\nvar $07885e4968a136ac$export$5ac4d387b85102 = \"startTrackEvent\";\nvar $07885e4968a136ac$export$7895813056375cb = \"stopTrackEvent\";\nvar $07885e4968a136ac$export$40f0bd7f5212655f = \"addTelemetryInitializer\";\nvar $07885e4968a136ac$export$98706f009830c697 = $07885e4968a136ac$export$40f0bd7f5212655f + \"s\";\nvar $07885e4968a136ac$export$6030ed320bde556b = \"pollInternalLogs\";\nvar $07885e4968a136ac$export$59cf80c2878d98fc = \"getPlugin\";\nvar $07885e4968a136ac$export$657de6e6c53d3d4b = \"evtNamespace\";\nvar $07885e4968a136ac$export$2a937c908483aaba = $07885e4968a136ac$var$_TRACK + \"Event\";\nvar $07885e4968a136ac$export$6a76308d410f3214 = $07885e4968a136ac$var$_TRACK + \"Trace\";\nvar $07885e4968a136ac$export$f73efacb9b6b9a35 = $07885e4968a136ac$var$_TRACK + \"Metric\";\nvar $07885e4968a136ac$export$96dcb75b34c1a4 = $07885e4968a136ac$var$_TRACK + \"PageView\";\nvar $07885e4968a136ac$export$5a8b50b634878942 = $07885e4968a136ac$var$_TRACK + \"Exception\";\nvar $07885e4968a136ac$export$ab9c6dcf6c4e2bbc = $07885e4968a136ac$var$_TRACK + \"DependencyData\";\nvar $07885e4968a136ac$export$94666ce386bd4f64 = \"set\" + $07885e4968a136ac$var$_AUTHENTICATED_USER_CONTEXT;\nvar $07885e4968a136ac$export$f920535c288b298f = \"clear\" + $07885e4968a136ac$var$_AUTHENTICATED_USER_CONTEXT;\n\n\n/*\n * Application Insights JavaScript SDK - Web, 3.0.2\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */ // @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nvar $5f4895b2bf2489f4$export$568c4302d11f2b22 = \"version\"; // Count: 6\nvar $5f4895b2bf2489f4$export$a1c208448cc1b3be = \"queue\"; // Count: 6\nvar $5f4895b2bf2489f4$export$1160203e21ea532 = \"connectionString\"; // Count: 4\nvar $5f4895b2bf2489f4$export$bfa1c9e5dcf1e78 = \"endpointUrl\"; // Count: 3\nvar $5f4895b2bf2489f4$export$81cfd43387c8dbcc = \"instrumentationKey\"; // Count: 3\nvar $5f4895b2bf2489f4$export$c0d9014f1d64bf51 = \"disableIkeyDeprecationMessage\"; // Count: 2\nvar $5f4895b2bf2489f4$export$f30bfb116278d530 = \"onunloadFlush\"; // Count: 6\nvar $5f4895b2bf2489f4$export$fdcd48959e13aba7 = \"context\"; // Count: 5\nvar $5f4895b2bf2489f4$export$1005ab001db54adc = \"addHousekeepingBeforeUnload\"; // Count: 2\nvar $5f4895b2bf2489f4$export$e8d1780b2404d6a2 = \"updateSnippetDefinitions\"; // Count: 2\n\n\n\"use strict\";\nvar $a7828c8fd42bf560$var$_a;\nvar $a7828c8fd42bf560$var$_internalSdkSrc;\n// This is an exclude list of properties that should not be updated during initialization\n// They include a combination of private and internal property names\nvar $a7828c8fd42bf560$var$_ignoreUpdateSnippetProperties = [\n (0, $07885e4968a136ac$export$c40a95bd1f19a04a),\n \"dependencies\",\n \"properties\",\n \"_snippetVersion\",\n \"appInsightsNew\",\n \"getSKUDefaults\"\n];\nvar $a7828c8fd42bf560$var$UNDEFINED_VALUE = undefined;\n// We need to include all properties that we only reference that we want to be dynamically updatable here\n// So they are converted even when not specified in the passed configuration\nvar $a7828c8fd42bf560$var$defaultConfigValues = ($a7828c8fd42bf560$var$_a = {}, $a7828c8fd42bf560$var$_a[0, $5f4895b2bf2489f4$export$1160203e21ea532 /* @min:connectionString */ ] = $a7828c8fd42bf560$var$UNDEFINED_VALUE, $a7828c8fd42bf560$var$_a[0, $5f4895b2bf2489f4$export$bfa1c9e5dcf1e78 /* @min:endpointUrl */ ] = $a7828c8fd42bf560$var$UNDEFINED_VALUE, $a7828c8fd42bf560$var$_a[0, $5f4895b2bf2489f4$export$81cfd43387c8dbcc /* @min:instrumentationKey */ ] = $a7828c8fd42bf560$var$UNDEFINED_VALUE, $a7828c8fd42bf560$var$_a.diagnosticLogInterval = (0, $61c4d9dd4226f64e$export$d0884590a6a82e6c)($a7828c8fd42bf560$var$_chkDiagLevel, 10000), $a7828c8fd42bf560$var$_a);\nfunction $a7828c8fd42bf560$var$_chkDiagLevel(value) {\n // Make sure we have a value > 0\n return value && value > 0;\n}\n/**\r\n * Application Insights API\r\n * @class Initialization\r\n * @implements {IApplicationInsights}\r\n */ var $a7828c8fd42bf560$export$e8021799dbedb971 = /** @class */ function() {\n function AppInsightsSku(snippet) {\n var _this = this;\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\n var dependencies;\n var properties;\n var _sender;\n var _snippetVersion;\n var _evtNamespace;\n var _houseKeepingNamespace;\n var _core;\n var _config;\n var _analyticsPlugin;\n (0, $c9b63384299a3252$export$2e2bcd8739ae039)(AppInsightsSku, this, function(_self) {\n _initDefaults();\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"config\", {\n g: function() {\n return _config;\n }\n });\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)([\n \"pluginVersionStringArr\",\n \"pluginVersionString\"\n ], function(key) {\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, key, {\n g: function() {\n if (_core) return _core[key];\n return null;\n }\n });\n });\n // initialize the queue and config in case they are undefined\n _snippetVersion = \"\" + (snippet.sv || snippet[0, $5f4895b2bf2489f4$export$568c4302d11f2b22 /* @min:%2eversion */ ] || \"\");\n snippet[0, $5f4895b2bf2489f4$export$a1c208448cc1b3be /* @min:%2equeue */ ] = snippet[0, $5f4895b2bf2489f4$export$a1c208448cc1b3be /* @min:%2equeue */ ] || [];\n snippet[0, $5f4895b2bf2489f4$export$568c4302d11f2b22 /* @min:%2eversion */ ] = snippet[0, $5f4895b2bf2489f4$export$568c4302d11f2b22 /* @min:%2eversion */ ] || 2.0; // Default to new version\n var cfgHandler = (0, $acb30f9e62dc5705$export$3a9e9180c14487fd)(snippet.config || {}, $a7828c8fd42bf560$var$defaultConfigValues);\n _config = cfgHandler.cfg;\n _analyticsPlugin = new (0, $826a9f6c1286ca27$export$ca681bfeb2cf0fca)();\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"appInsights\", {\n g: function() {\n return _analyticsPlugin;\n }\n });\n properties = new (0, $374e174ea903f978$export$2e2bcd8739ae039)();\n dependencies = new (0, $2569abef053897bd$export$d9a50c4d1eb2475f)();\n _sender = new (0, $de50c0f740c66740$export$c5a96f3e01fb6582)();\n _core = new (0, $e5177bba49076348$export$e7ac25a6828d23bf)();\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"core\", {\n g: function() {\n return _core;\n }\n });\n // Will get recalled if any referenced values are changed\n _addUnloadHook((0, $acb30f9e62dc5705$export$454a433e4deb244f)(cfgHandler, function() {\n if (_config[0, $5f4895b2bf2489f4$export$1160203e21ea532 /* @min:%2econnectionString */ ]) {\n var cs = (0, $41f84b9a47a38dfe$export$6369f286b474466d)(_config[0, $5f4895b2bf2489f4$export$1160203e21ea532 /* @min:%2econnectionString */ ]);\n var ingest = cs.ingestionendpoint;\n _config[0, $5f4895b2bf2489f4$export$bfa1c9e5dcf1e78 /* @min:%2eendpointUrl */ ] = ingest ? ingest + (0, $71dfba5ea0640485$export$e6c0f3431c6cd728) : _config[0, $5f4895b2bf2489f4$export$bfa1c9e5dcf1e78 /* @min:%2eendpointUrl */ ]; // only add /v2/track when from connectionstring\n _config[0, $5f4895b2bf2489f4$export$81cfd43387c8dbcc /* @min:%2einstrumentationKey */ ] = cs.instrumentationkey || _config[0, $5f4895b2bf2489f4$export$81cfd43387c8dbcc /* @min:%2einstrumentationKey */ ];\n }\n }));\n // Outside of the onConfigChange as we only want to do this once\n var isErrMessageDisabled = (0, $533f826bbc418791$export$bedb7023a7733221)(_config[0, $5f4895b2bf2489f4$export$c0d9014f1d64bf51 /* @min:%2edisableIkeyDeprecationMessage */ ]) ? true : _config[0, $5f4895b2bf2489f4$export$c0d9014f1d64bf51 /* @min:%2edisableIkeyDeprecationMessage */ ];\n if (!_config[0, $5f4895b2bf2489f4$export$1160203e21ea532 /* @min:%2econnectionString */ ] && !isErrMessageDisabled) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(_core.logger, 1 /* eLoggingSeverity.CRITICAL */ , 106 /* _eInternalMessageId.InstrumentationKeyDeprecation */ , \"Instrumentation key support will end soon, see aka.ms/IkeyMigrate\");\n _self[0, $07885e4968a136ac$export$c40a95bd1f19a04a /* @min:%2esnippet */ ] = snippet;\n _self[0, $07885e4968a136ac$export$36b97ab40aae74fe /* @min:%2eflush */ ] = function(async, callBack) {\n if (async === void 0) async = true;\n var result;\n (0, $28deccfc004f252b$export$c6fbeb260600c482)(_core, function() {\n return \"AISKU.flush\";\n }, function() {\n if (async && !callBack) result = (0, $911d39c591a62618$export$5a1eb20c68656e88)(function(resolve) {\n callBack = resolve;\n });\n var waiting = 1;\n var flushDone = function() {\n waiting--;\n if (waiting === 0) callBack();\n };\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_core.getChannels(), function(channel) {\n if (channel) {\n waiting++;\n channel[0, $07885e4968a136ac$export$36b97ab40aae74fe /* @min:%2eflush */ ](async, flushDone);\n }\n });\n // decrement the initial \"waiting\"\n flushDone();\n }, null, async);\n return result;\n };\n _self[0, $5f4895b2bf2489f4$export$f30bfb116278d530 /* @min:%2eonunloadFlush */ ] = function(async) {\n if (async === void 0) async = true;\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(_core.getChannels(), function(channel) {\n if (channel[0, $5f4895b2bf2489f4$export$f30bfb116278d530 /* @min:%2eonunloadFlush */ ]) channel[0, $5f4895b2bf2489f4$export$f30bfb116278d530 /* @min:%2eonunloadFlush */ ]();\n else channel[0, $07885e4968a136ac$export$36b97ab40aae74fe /* @min:%2eflush */ ](async);\n });\n };\n _self.loadAppInsights = function(legacyMode, logger, notificationManager) {\n if (legacyMode === void 0) legacyMode = false;\n if (legacyMode) (0, $0cd2c3ce211547d0$export$6523a1bd3b6e3128)(\"Legacy Mode is no longer supported\");\n function _updateSnippetProperties(snippet) {\n if (snippet) {\n var snippetVer = \"\";\n if (!(0, $533f826bbc418791$export$bedb7023a7733221)(_snippetVersion)) snippetVer += _snippetVersion;\n if (_self[0, $5f4895b2bf2489f4$export$fdcd48959e13aba7 /* @min:%2econtext */ ] && _self[0, $5f4895b2bf2489f4$export$fdcd48959e13aba7 /* @min:%2econtext */ ].internal) _self[0, $5f4895b2bf2489f4$export$fdcd48959e13aba7 /* @min:%2econtext */ ].internal.snippetVer = snippetVer || \"-\";\n // apply updated properties to the global instance (snippet)\n (0, $45e528077703ac0c$export$aa0705d5774c95d1)(_self, function(field, value) {\n if ((0, $533f826bbc418791$export$844ec244b1367d54)(field) && !(0, $533f826bbc418791$export$f6e2535fb5126e54)(value) && field && field[0] !== \"_\" && // Don't copy \"internal\" values\n (0, $a96d4958027d6f85$export$9f3b3ffa84393d30)($a7828c8fd42bf560$var$_ignoreUpdateSnippetProperties, field) === -1) {\n if (snippet[field] !== value) snippet[field] = value;\n }\n });\n }\n }\n (0, $28deccfc004f252b$export$c6fbeb260600c482)(_self.core, function() {\n return \"AISKU.loadAppInsights\";\n }, function() {\n // initialize core\n _core.initialize(_config, [\n _sender,\n properties,\n dependencies,\n _analyticsPlugin\n ], logger, notificationManager);\n (0, $d212d948d25f959a$export$d0d2ebf910ad6e2)(_self, \"context\", {\n g: function() {\n return properties[0, $5f4895b2bf2489f4$export$fdcd48959e13aba7 /* @min:%2econtext */ ];\n }\n });\n var sdkSrc = $a7828c8fd42bf560$export$62f75e89e888afb6();\n if (sdkSrc && _self[0, $5f4895b2bf2489f4$export$fdcd48959e13aba7 /* @min:%2econtext */ ]) _self[0, $5f4895b2bf2489f4$export$fdcd48959e13aba7 /* @min:%2econtext */ ].internal.sdkSrc = sdkSrc;\n _updateSnippetProperties(_self[0, $07885e4968a136ac$export$c40a95bd1f19a04a /* @min:%2esnippet */ ]);\n // Empty queue of all api calls logged prior to sdk download\n _self.emptyQueue();\n _self[0, $07885e4968a136ac$export$6030ed320bde556b /* @min:%2epollInternalLogs */ ]();\n _self[0, $5f4895b2bf2489f4$export$1005ab001db54adc /* @min:%2eaddHousekeepingBeforeUnload */ ](_self);\n });\n return _self;\n };\n _self[0, $5f4895b2bf2489f4$export$e8d1780b2404d6a2 /* @min:%2eupdateSnippetDefinitions */ ] = function(snippet) {\n // apply full appInsights to the global instance\n // Note: This must be called before loadAppInsights is called\n (0, $0b747974b0bb3563$export$21c1f632458708da)(snippet, _self, function(name) {\n // Not excluding names prefixed with \"_\" as we need to proxy some functions like _onError\n return name && (0, $a96d4958027d6f85$export$9f3b3ffa84393d30)($a7828c8fd42bf560$var$_ignoreUpdateSnippetProperties, name) === -1;\n });\n };\n _self.emptyQueue = function() {\n // call functions that were queued before the main script was loaded\n try {\n if ((0, $533f826bbc418791$export$43bee75e5e14138e)(_self.snippet[0, $5f4895b2bf2489f4$export$a1c208448cc1b3be /* @min:%2equeue */ ])) {\n // note: do not check length in the for-loop conditional in case something goes wrong and the stub methods are not overridden.\n var length_1 = _self.snippet[0, $5f4895b2bf2489f4$export$a1c208448cc1b3be /* @min:%2equeue */ ].length;\n for(var i = 0; i < length_1; i++){\n var call = _self.snippet[0, $5f4895b2bf2489f4$export$a1c208448cc1b3be /* @min:%2equeue */ ][i];\n call();\n }\n _self.snippet[0, $5f4895b2bf2489f4$export$a1c208448cc1b3be /* @min:%2equeue */ ] = undefined;\n delete _self.snippet[0, $5f4895b2bf2489f4$export$a1c208448cc1b3be /* @min:%2equeue */ ];\n }\n } catch (exception) {\n var properties_1 = {};\n if (exception && (0, $533f826bbc418791$export$f6e2535fb5126e54)(exception.toString)) properties_1.exception = exception.toString();\n // need from core\n // Microsoft.ApplicationInsights._InternalLogging.throwInternal(\n // eLoggingSeverity.WARNING,\n // _eInternalMessageId.FailedToSendQueuedTelemetry,\n // \"Failed to send queued telemetry\",\n // properties);\n }\n };\n _self[0, $5f4895b2bf2489f4$export$1005ab001db54adc /* @min:%2eaddHousekeepingBeforeUnload */ ] = function(appInsightsInstance) {\n // Add callback to push events when the user navigates away\n if ((0, $3d5fcb60a9467a45$export$fef62134eea24008)() || (0, $3d5fcb60a9467a45$export$c4372eca9c56fe99)()) {\n var performHousekeeping_1 = function() {\n // Adds the ability to flush all data before the page unloads.\n // Note: This approach tries to push a sync request with all the pending events onbeforeunload.\n // Firefox does not respect this.Other browsers DO push out the call with < 100% hit rate.\n // Telemetry here will help us analyze how effective this approach is.\n // Another approach would be to make this call sync with a acceptable timeout to reduce the\n // impact on user experience.\n // appInsightsInstance.context._sender.triggerSend();\n appInsightsInstance[0, $5f4895b2bf2489f4$export$f30bfb116278d530 /* @min:%2eonunloadFlush */ ](false);\n // Back up the current session to local storage\n // This lets us close expired sessions after the cookies themselves expire\n if ((0, $533f826bbc418791$export$f6e2535fb5126e54)(_self.core[0, $07885e4968a136ac$export$59cf80c2878d98fc /* @min:%2egetPlugin */ ])) {\n var loadedPlugin = _this.core[0, $07885e4968a136ac$export$59cf80c2878d98fc /* @min:%2egetPlugin */ ]((0, $ca7353bd9238d340$export$2268e69a6d93b7cc));\n if (loadedPlugin) {\n var propertiesPlugin = loadedPlugin.plugin;\n if (propertiesPlugin && propertiesPlugin[0, $5f4895b2bf2489f4$export$fdcd48959e13aba7 /* @min:%2econtext */ ] && propertiesPlugin[0, $5f4895b2bf2489f4$export$fdcd48959e13aba7 /* @min:%2econtext */ ]._sessionManager) propertiesPlugin[0, $5f4895b2bf2489f4$export$fdcd48959e13aba7 /* @min:%2econtext */ ]._sessionManager.backup();\n }\n }\n };\n var added_1 = false;\n var analyticsPlugin_1 = appInsightsInstance.appInsights;\n var theConfig_1 = analyticsPlugin_1.config;\n if (!_houseKeepingNamespace) _houseKeepingNamespace = (0, $12cc003c7fb5ccde$export$3f37a50e0edde3be)(_evtNamespace, _core[0, $07885e4968a136ac$export$657de6e6c53d3d4b /* @min:%2eevtNamespace */ ] && _core[0, $07885e4968a136ac$export$657de6e6c53d3d4b /* @min:%2eevtNamespace */ ]());\n // Will be recalled if any referenced config properties change\n _addUnloadHook((0, $acb30f9e62dc5705$export$454a433e4deb244f)(_config, function() {\n // As we could get recalled, remove any previously registered event handlers first\n _removePageEventHandlers();\n var excludePageUnloadEvents = theConfig_1.disablePageUnloadEvents;\n if (!theConfig_1.disableFlushOnBeforeUnload) {\n // Hook the unload event for the document, window and body to ensure that the client events are flushed to the server\n // As just hooking the window does not always fire (on chrome) for page navigation's.\n if ((0, $12cc003c7fb5ccde$export$f16ce149aca77fdd)(performHousekeeping_1, excludePageUnloadEvents, _houseKeepingNamespace)) added_1 = true;\n // We also need to hook the pagehide and visibilitychange events as not all versions of Safari support load/unload events.\n if ((0, $12cc003c7fb5ccde$export$46744aee53e5e558)(performHousekeeping_1, excludePageUnloadEvents, _houseKeepingNamespace)) added_1 = true;\n // A reactNative app may not have a window and therefore the beforeunload/pagehide events -- so don't\n // log the failure in this case\n if (!added_1 && !(0, $0c599844349363c4$export$f7a1e23e542d38e3)()) (0, $cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4)(analyticsPlugin_1.core.logger, 1 /* eLoggingSeverity.CRITICAL */ , 19 /* _eInternalMessageId.FailedToAddHandlerForOnBeforeUnload */ , \"Could not add handler for beforeunload and pagehide\");\n }\n if (!added_1 && !theConfig_1.disableFlushOnUnload) // If we didn't add the normal set then attempt to add the pagehide and visibilitychange only\n (0, $12cc003c7fb5ccde$export$46744aee53e5e558)(performHousekeeping_1, excludePageUnloadEvents, _houseKeepingNamespace);\n }));\n }\n };\n _self.getSender = function() {\n return _sender;\n };\n _self.unload = function(isAsync, unloadComplete, cbTimeout) {\n var unloadDone = false;\n var result;\n if (isAsync && !unloadComplete) result = (0, $911d39c591a62618$export$5a1eb20c68656e88)(function(resolve) {\n // Set the callback to the promise resolve callback\n unloadComplete = resolve;\n });\n function _unloadCallback(unloadState) {\n if (!unloadDone) {\n unloadDone = true;\n _initDefaults();\n unloadComplete && unloadComplete(unloadState);\n }\n }\n _self[0, $5f4895b2bf2489f4$export$f30bfb116278d530 /* @min:%2eonunloadFlush */ ](isAsync);\n _removePageEventHandlers();\n _core.unload && _core.unload(isAsync, _unloadCallback, cbTimeout);\n return result;\n };\n (0, $0b747974b0bb3563$export$94f4c7fb7e7d8dc7)(_self, _analyticsPlugin, [\n (0, $07885e4968a136ac$export$da4182b670dc48ff),\n (0, $07885e4968a136ac$export$2a937c908483aaba),\n (0, $07885e4968a136ac$export$96dcb75b34c1a4),\n \"trackPageViewPerformance\",\n (0, $07885e4968a136ac$export$5a8b50b634878942),\n \"_onerror\",\n (0, $07885e4968a136ac$export$6a76308d410f3214),\n (0, $07885e4968a136ac$export$f73efacb9b6b9a35),\n (0, $07885e4968a136ac$export$4dff843ac2d49cae),\n (0, $07885e4968a136ac$export$83ac403ed0121674),\n (0, $07885e4968a136ac$export$5ac4d387b85102),\n (0, $07885e4968a136ac$export$7895813056375cb)\n ]);\n (0, $0b747974b0bb3563$export$94f4c7fb7e7d8dc7)(_self, _getCurrentDependencies, [\n (0, $07885e4968a136ac$export$ab9c6dcf6c4e2bbc),\n \"addDependencyListener\",\n \"addDependencyInitializer\"\n ]);\n (0, $0b747974b0bb3563$export$94f4c7fb7e7d8dc7)(_self, _core, [\n (0, $07885e4968a136ac$export$40f0bd7f5212655f),\n (0, $07885e4968a136ac$export$6030ed320bde556b),\n \"stopPollingInternalLogs\",\n (0, $07885e4968a136ac$export$59cf80c2878d98fc),\n \"addPlugin\",\n (0, $07885e4968a136ac$export$657de6e6c53d3d4b),\n \"addUnloadCb\",\n \"getTraceCtx\",\n \"updateCfg\",\n \"onCfgChange\"\n ]);\n (0, $0b747974b0bb3563$export$94f4c7fb7e7d8dc7)(_self, function() {\n var context = properties[0, $5f4895b2bf2489f4$export$fdcd48959e13aba7 /* @min:%2econtext */ ];\n return context ? context.user : null;\n }, [\n (0, $07885e4968a136ac$export$94666ce386bd4f64),\n (0, $07885e4968a136ac$export$f920535c288b298f)\n ]);\n // Using a function to support the dynamic adding / removal of plugins, so this will always return the current value\n function _getCurrentDependencies() {\n return dependencies;\n }\n function _initDefaults() {\n _evtNamespace = (0, $8a2d104e2647a310$export$eb4a6badb18ead04)(\"AISKU\");\n _houseKeepingNamespace = null;\n dependencies = null;\n properties = null;\n _sender = null;\n _snippetVersion = null;\n }\n function _removePageEventHandlers() {\n // Remove any registered event handlers\n if (_houseKeepingNamespace) {\n (0, $12cc003c7fb5ccde$export$272dc813b0b2654c)(null, _houseKeepingNamespace);\n (0, $12cc003c7fb5ccde$export$6aca6ee3a147169f)(null, _houseKeepingNamespace);\n }\n }\n function _addUnloadHook(hooks) {\n _core.addUnloadHook(hooks);\n }\n });\n }\n // Analytics Plugin\n // Removed Stub for AppInsightsSku.prototype.getCookieMgr.\n // Removed Stub for AppInsightsSku.prototype.trackEvent.\n // Removed Stub for AppInsightsSku.prototype.trackPageView.\n // Removed Stub for AppInsightsSku.prototype.trackPageViewPerformance.\n // Removed Stub for AppInsightsSku.prototype.trackException.\n // Removed Stub for AppInsightsSku.prototype._onerror.\n // Removed Stub for AppInsightsSku.prototype.trackTrace.\n // Removed Stub for AppInsightsSku.prototype.trackMetric.\n // Removed Stub for AppInsightsSku.prototype.startTrackPage.\n // Removed Stub for AppInsightsSku.prototype.stopTrackPage.\n // Removed Stub for AppInsightsSku.prototype.startTrackEvent.\n // Removed Stub for AppInsightsSku.prototype.stopTrackEvent.\n // Removed Stub for AppInsightsSku.prototype.addTelemetryInitializer.\n // Properties Plugin\n // Removed Stub for AppInsightsSku.prototype.setAuthenticatedUserContext.\n // Removed Stub for AppInsightsSku.prototype.clearAuthenticatedUserContext.\n // Dependencies Plugin\n // Removed Stub for AppInsightsSku.prototype.trackDependencyData.\n // Misc\n // Removed Stub for AppInsightsSku.prototype.flush.\n // Removed Stub for AppInsightsSku.prototype.onunloadFlush.\n // Removed Stub for AppInsightsSku.prototype.loadAppInsights.\n // Removed Stub for AppInsightsSku.prototype.updateSnippetDefinitions.\n // Removed Stub for AppInsightsSku.prototype.emptyQueue.\n // Removed Stub for AppInsightsSku.prototype.pollInternalLogs.\n // Removed Stub for AppInsightsSku.prototype.stopPollingInternalLogs.\n // Removed Stub for AppInsightsSku.prototype.addHousekeepingBeforeUnload.\n // Removed Stub for AppInsightsSku.prototype.getSender.\n // Removed Stub for AppInsightsSku.prototype.unload.\n // Removed Stub for AppInsightsSku.prototype.getPlugin.\n // Removed Stub for AppInsightsSku.prototype.addPlugin.\n // Removed Stub for AppInsightsSku.prototype.updateCfg.\n // Removed Stub for AppInsightsSku.prototype.evtNamespace.\n // Removed Stub for AppInsightsSku.prototype.addUnloadCb.\n // Removed Stub for AppInsightsSku.prototype.addDependencyListener.\n /**\r\n * Add an dependency telemetry initializer callback function to allow populating additional properties or drop the request.\r\n * It is called after the dependency call has completed and any available performance details are available. A dependency\r\n * initializer is similar to the TelemetryInitializer function but it allows you to block the reporting of the dependency\r\n * request so that it doesn't count against the `maxAjaxCallsPerView`.\r\n * @param dependencyInitializer - The Dependency Telemetry Initializer function\r\n * @returns - A IDependencyInitializerHandler to enable the initializer to be removed\r\n */ AppInsightsSku.prototype.addDependencyInitializer = function(dependencyInitializer) {\n return null;\n };\n // Removed Stub for AppInsightsSku.prototype.getTraceCtx.\n // Removed Stub for AppInsightsSku.prototype.onCfgChange.\n return AppInsightsSku;\n}();\nfunction $a7828c8fd42bf560$export$62f75e89e888afb6() {\n if ($a7828c8fd42bf560$var$_internalSdkSrc) // Use the cached value\n return $a7828c8fd42bf560$var$_internalSdkSrc;\n var sdkSrc = null;\n var isModule = false;\n var cdns = [\n \"://js.monitor.azure.com/\",\n \"://az416426.vo.msecnd.net/\"\n ];\n try {\n // Try and determine whether the sdk is being loaded from the CDN\n // currentScript is only valid during initial processing\n var scrpt = (document || {}).currentScript;\n if (scrpt) sdkSrc = scrpt.src;\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n if (sdkSrc) {\n try {\n var url_1 = sdkSrc.toLowerCase();\n if (url_1) {\n var src_1 = \"\";\n (0, $f6bb085f8cf12216$export$e2e5bcdbdc49c586)(cdns, function(value, idx) {\n if ((0, $0194d45a55d79548$export$7c0888b0c4641088)(url_1, value) !== -1) {\n src_1 = \"cdn\" + (idx + 1);\n if ((0, $0194d45a55d79548$export$7c0888b0c4641088)(url_1, \"/scripts/\") === -1) {\n if ((0, $0194d45a55d79548$export$7c0888b0c4641088)(url_1, \"/next/\") !== -1) src_1 += \"-next\";\n else if ((0, $0194d45a55d79548$export$7c0888b0c4641088)(url_1, \"/beta/\") !== -1) src_1 += \"-beta\";\n }\n $a7828c8fd42bf560$var$_internalSdkSrc = src_1 + (isModule ? \".mod\" : \"\");\n return -1;\n }\n });\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n // Cache the found value so we don't have to look it up again\n $a7828c8fd42bf560$var$_internalSdkSrc = sdkSrc;\n }\n return $a7828c8fd42bf560$var$_internalSdkSrc;\n}\n\n\nconst $a1e7c06e675ca002$var$getCookieValue = (name)=>document.cookie.match(\"(^|;)\\\\s*\" + name + \"\\\\s*=\\\\s*([^;]+)\")?.pop() || \"\";\nconst $a1e7c06e675ca002$var$aiConnectionString = decodeURIComponent($a1e7c06e675ca002$var$getCookieValue(\"ai_connectionString\"));\nif ($a1e7c06e675ca002$var$aiConnectionString) {\n window.appInsights = new (0, $a7828c8fd42bf560$export$e8021799dbedb971)({\n config: {\n connectionString: $a1e7c06e675ca002$var$aiConnectionString,\n disableInstrumentationKeyValidation: true\n }\n });\n window.appInsights.loadAppInsights();\n window.appInsights.trackPageView(); // Manually call trackPageView to establish the current user/session/pageview \n}\n\n})();\n//# sourceMappingURL=ai.js.map\n","import { ApplicationInsights } from '@microsoft/applicationinsights-web'\n\nconst getCookieValue = (name) => (\n document.cookie.match('(^|;)\\\\s*' + name + '\\\\s*=\\\\s*([^;]+)')?.pop() || ''\n)\n\nconst aiConnectionString = decodeURIComponent(getCookieValue('ai_connectionString'));\n\nif (aiConnectionString) {\n window.appInsights = new ApplicationInsights({\n config: {\n connectionString: aiConnectionString,\n disableInstrumentationKeyValidation: true\n }\n });\n\n window.appInsights.loadAppInsights();\n window.appInsights.trackPageView(); // Manually call trackPageView to establish the current user/session/pageview \n}","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nvar _a;\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { AnalyticsPlugin } from \"@microsoft/applicationinsights-analytics-js\";\r\nimport { Sender } from \"@microsoft/applicationinsights-channel-js\";\r\nimport { DEFAULT_BREEZE_PATH, PropertiesPluginIdentifier, parseConnectionString } from \"@microsoft/applicationinsights-common\";\r\nimport { AppInsightsCore, _throwInternal, addPageHideEventListener, addPageUnloadEventListener, cfgDfValidate, createDynamicConfig, createUniqueNamespace, doPerf, hasDocument, hasWindow, isArray, isFunction, isNullOrUndefined, isReactNative, isString, mergeEvtNamespace, onConfigChange, proxyAssign, proxyFunctions, removePageHideEventListener, removePageUnloadEventListener } from \"@microsoft/applicationinsights-core-js\";\r\nimport { AjaxPlugin as DependenciesPlugin } from \"@microsoft/applicationinsights-dependencies-js\";\r\nimport { PropertiesPlugin } from \"@microsoft/applicationinsights-properties-js\";\r\nimport { createPromise } from \"@nevware21/ts-async\";\r\nimport { arrForEach, arrIndexOf, objDefine, objForEachKey, strIndexOf, throwUnsupported } from \"@nevware21/ts-utils\";\r\nimport { STR_ADD_TELEMETRY_INITIALIZER, STR_CLEAR_AUTHENTICATED_USER_CONTEXT, STR_EVT_NAMESPACE, STR_FLUSH, STR_GET_COOKIE_MGR, STR_GET_PLUGIN, STR_POLL_INTERNAL_LOGS, STR_SET_AUTHENTICATED_USER_CONTEXT, STR_SNIPPET, STR_START_TRACK_EVENT, STR_START_TRACK_PAGE, STR_STOP_TRACK_EVENT, STR_STOP_TRACK_PAGE, STR_TRACK_DEPENDENCY_DATA, STR_TRACK_EVENT, STR_TRACK_EXCEPTION, STR_TRACK_METRIC, STR_TRACK_PAGE_VIEW, STR_TRACK_TRACE } from \"./InternalConstants\";\r\nimport { _DYN_ADD_HOUSEKEEPING_BEF1, _DYN_CONNECTION_STRING, _DYN_CONTEXT, _DYN_DISABLE_IKEY_DEPRECA0, _DYN_ENDPOINT_URL, _DYN_INSTRUMENTATION_KEY, _DYN_ONUNLOAD_FLUSH, _DYN_QUEUE, _DYN_UPDATE_SNIPPET_DEFIN2, _DYN_VERSION } from \"./__DynamicConstants\";\r\nvar _internalSdkSrc;\r\n// This is an exclude list of properties that should not be updated during initialization\r\n// They include a combination of private and internal property names\r\nvar _ignoreUpdateSnippetProperties = [\r\n STR_SNIPPET, \"dependencies\", \"properties\", \"_snippetVersion\", \"appInsightsNew\", \"getSKUDefaults\"\r\n];\r\nvar UNDEFINED_VALUE = undefined;\r\n// We need to include all properties that we only reference that we want to be dynamically updatable here\r\n// So they are converted even when not specified in the passed configuration\r\nvar defaultConfigValues = (_a = {},\r\n _a[_DYN_CONNECTION_STRING /* @min:connectionString */] = UNDEFINED_VALUE,\r\n _a[_DYN_ENDPOINT_URL /* @min:endpointUrl */] = UNDEFINED_VALUE,\r\n _a[_DYN_INSTRUMENTATION_KEY /* @min:instrumentationKey */] = UNDEFINED_VALUE,\r\n _a.diagnosticLogInterval = cfgDfValidate(_chkDiagLevel, 10000),\r\n _a);\r\nfunction _chkDiagLevel(value) {\r\n // Make sure we have a value > 0\r\n return value && value > 0;\r\n}\r\n/**\r\n * Application Insights API\r\n * @class Initialization\r\n * @implements {IApplicationInsights}\r\n */\r\nvar AppInsightsSku = /** @class */ (function () {\r\n function AppInsightsSku(snippet) {\r\n var _this = this;\r\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\r\n var dependencies;\r\n var properties;\r\n var _sender;\r\n var _snippetVersion;\r\n var _evtNamespace;\r\n var _houseKeepingNamespace;\r\n var _core;\r\n var _config;\r\n var _analyticsPlugin;\r\n dynamicProto(AppInsightsSku, this, function (_self) {\r\n _initDefaults();\r\n objDefine(_self, \"config\", {\r\n g: function () {\r\n return _config;\r\n }\r\n });\r\n arrForEach([\"pluginVersionStringArr\", \"pluginVersionString\"], function (key) {\r\n objDefine(_self, key, {\r\n g: function () {\r\n if (_core) {\r\n return _core[key];\r\n }\r\n return null;\r\n }\r\n });\r\n });\r\n // initialize the queue and config in case they are undefined\r\n _snippetVersion = \"\" + (snippet.sv || snippet[_DYN_VERSION /* @min:%2eversion */] || \"\");\r\n snippet[_DYN_QUEUE /* @min:%2equeue */] = snippet[_DYN_QUEUE /* @min:%2equeue */] || [];\r\n snippet[_DYN_VERSION /* @min:%2eversion */] = snippet[_DYN_VERSION /* @min:%2eversion */] || 2.0; // Default to new version\r\n var cfgHandler = createDynamicConfig(snippet.config || {}, defaultConfigValues);\r\n _config = cfgHandler.cfg;\r\n _analyticsPlugin = new AnalyticsPlugin();\r\n objDefine(_self, \"appInsights\", {\r\n g: function () {\r\n return _analyticsPlugin;\r\n }\r\n });\r\n properties = new PropertiesPlugin();\r\n dependencies = new DependenciesPlugin();\r\n _sender = new Sender();\r\n _core = new AppInsightsCore();\r\n objDefine(_self, \"core\", {\r\n g: function () {\r\n return _core;\r\n }\r\n });\r\n // Will get recalled if any referenced values are changed\r\n _addUnloadHook(onConfigChange(cfgHandler, function () {\r\n if (_config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */]) {\r\n var cs = parseConnectionString(_config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */]);\r\n var ingest = cs.ingestionendpoint;\r\n _config[_DYN_ENDPOINT_URL /* @min:%2eendpointUrl */] = ingest ? (ingest + DEFAULT_BREEZE_PATH) : _config[_DYN_ENDPOINT_URL /* @min:%2eendpointUrl */]; // only add /v2/track when from connectionstring\r\n _config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */] = cs.instrumentationkey || _config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */];\r\n }\r\n }));\r\n // Outside of the onConfigChange as we only want to do this once\r\n var isErrMessageDisabled = isNullOrUndefined(_config[_DYN_DISABLE_IKEY_DEPRECA0 /* @min:%2edisableIkeyDeprecationMessage */]) ? true : _config[_DYN_DISABLE_IKEY_DEPRECA0 /* @min:%2edisableIkeyDeprecationMessage */];\r\n if (!_config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */] && !isErrMessageDisabled) {\r\n _throwInternal(_core.logger, 1 /* eLoggingSeverity.CRITICAL */, 106 /* _eInternalMessageId.InstrumentationKeyDeprecation */, \"Instrumentation key support will end soon, see aka.ms/IkeyMigrate\");\r\n }\r\n _self[STR_SNIPPET /* @min:%2esnippet */] = snippet;\r\n _self[STR_FLUSH /* @min:%2eflush */] = function (async, callBack) {\r\n if (async === void 0) { async = true; }\r\n var result;\r\n doPerf(_core, function () { return \"AISKU.flush\"; }, function () {\r\n if (async && !callBack) {\r\n result = createPromise(function (resolve) {\r\n callBack = resolve;\r\n });\r\n }\r\n var waiting = 1;\r\n var flushDone = function () {\r\n waiting--;\r\n if (waiting === 0) {\r\n callBack();\r\n }\r\n };\r\n arrForEach(_core.getChannels(), function (channel) {\r\n if (channel) {\r\n waiting++;\r\n channel[STR_FLUSH /* @min:%2eflush */](async, flushDone);\r\n }\r\n });\r\n // decrement the initial \"waiting\"\r\n flushDone();\r\n }, null, async);\r\n return result;\r\n };\r\n _self[_DYN_ONUNLOAD_FLUSH /* @min:%2eonunloadFlush */] = function (async) {\r\n if (async === void 0) { async = true; }\r\n arrForEach(_core.getChannels(), function (channel) {\r\n if (channel[_DYN_ONUNLOAD_FLUSH /* @min:%2eonunloadFlush */]) {\r\n channel[_DYN_ONUNLOAD_FLUSH /* @min:%2eonunloadFlush */]();\r\n }\r\n else {\r\n channel[STR_FLUSH /* @min:%2eflush */](async);\r\n }\r\n });\r\n };\r\n _self.loadAppInsights = function (legacyMode, logger, notificationManager) {\r\n if (legacyMode === void 0) { legacyMode = false; }\r\n if (legacyMode) {\r\n throwUnsupported(\"Legacy Mode is no longer supported\");\r\n }\r\n function _updateSnippetProperties(snippet) {\r\n if (snippet) {\r\n var snippetVer = \"\";\r\n if (!isNullOrUndefined(_snippetVersion)) {\r\n snippetVer += _snippetVersion;\r\n }\r\n if (_self[_DYN_CONTEXT /* @min:%2econtext */] && _self[_DYN_CONTEXT /* @min:%2econtext */].internal) {\r\n _self[_DYN_CONTEXT /* @min:%2econtext */].internal.snippetVer = snippetVer || \"-\";\r\n }\r\n // apply updated properties to the global instance (snippet)\r\n objForEachKey(_self, function (field, value) {\r\n if (isString(field) &&\r\n !isFunction(value) &&\r\n field && field[0] !== \"_\" && // Don't copy \"internal\" values\r\n arrIndexOf(_ignoreUpdateSnippetProperties, field) === -1) {\r\n if (snippet[field] !== value) {\r\n snippet[field] = value;\r\n }\r\n }\r\n });\r\n }\r\n }\r\n doPerf(_self.core, function () { return \"AISKU.loadAppInsights\"; }, function () {\r\n // initialize core\r\n _core.initialize(_config, [_sender, properties, dependencies, _analyticsPlugin], logger, notificationManager);\r\n objDefine(_self, \"context\", {\r\n g: function () { return properties[_DYN_CONTEXT /* @min:%2econtext */]; }\r\n });\r\n var sdkSrc = _findSdkSourceFile();\r\n if (sdkSrc && _self[_DYN_CONTEXT /* @min:%2econtext */]) {\r\n _self[_DYN_CONTEXT /* @min:%2econtext */].internal.sdkSrc = sdkSrc;\r\n }\r\n _updateSnippetProperties(_self[STR_SNIPPET /* @min:%2esnippet */]);\r\n // Empty queue of all api calls logged prior to sdk download\r\n _self.emptyQueue();\r\n _self[STR_POLL_INTERNAL_LOGS /* @min:%2epollInternalLogs */]();\r\n _self[_DYN_ADD_HOUSEKEEPING_BEF1 /* @min:%2eaddHousekeepingBeforeUnload */](_self);\r\n });\r\n return _self;\r\n };\r\n _self[_DYN_UPDATE_SNIPPET_DEFIN2 /* @min:%2eupdateSnippetDefinitions */] = function (snippet) {\r\n // apply full appInsights to the global instance\r\n // Note: This must be called before loadAppInsights is called\r\n proxyAssign(snippet, _self, function (name) {\r\n // Not excluding names prefixed with \"_\" as we need to proxy some functions like _onError\r\n return name && arrIndexOf(_ignoreUpdateSnippetProperties, name) === -1;\r\n });\r\n };\r\n _self.emptyQueue = function () {\r\n // call functions that were queued before the main script was loaded\r\n try {\r\n if (isArray(_self.snippet[_DYN_QUEUE /* @min:%2equeue */])) {\r\n // note: do not check length in the for-loop conditional in case something goes wrong and the stub methods are not overridden.\r\n var length_1 = _self.snippet[_DYN_QUEUE /* @min:%2equeue */].length;\r\n for (var i = 0; i < length_1; i++) {\r\n var call = _self.snippet[_DYN_QUEUE /* @min:%2equeue */][i];\r\n call();\r\n }\r\n _self.snippet[_DYN_QUEUE /* @min:%2equeue */] = undefined;\r\n delete _self.snippet[_DYN_QUEUE /* @min:%2equeue */];\r\n }\r\n }\r\n catch (exception) {\r\n var properties_1 = {};\r\n if (exception && isFunction(exception.toString)) {\r\n properties_1.exception = exception.toString();\r\n }\r\n // need from core\r\n // Microsoft.ApplicationInsights._InternalLogging.throwInternal(\r\n // eLoggingSeverity.WARNING,\r\n // _eInternalMessageId.FailedToSendQueuedTelemetry,\r\n // \"Failed to send queued telemetry\",\r\n // properties);\r\n }\r\n };\r\n _self[_DYN_ADD_HOUSEKEEPING_BEF1 /* @min:%2eaddHousekeepingBeforeUnload */] = function (appInsightsInstance) {\r\n // Add callback to push events when the user navigates away\r\n if (hasWindow() || hasDocument()) {\r\n var performHousekeeping_1 = function () {\r\n // Adds the ability to flush all data before the page unloads.\r\n // Note: This approach tries to push a sync request with all the pending events onbeforeunload.\r\n // Firefox does not respect this.Other browsers DO push out the call with < 100% hit rate.\r\n // Telemetry here will help us analyze how effective this approach is.\r\n // Another approach would be to make this call sync with a acceptable timeout to reduce the\r\n // impact on user experience.\r\n // appInsightsInstance.context._sender.triggerSend();\r\n appInsightsInstance[_DYN_ONUNLOAD_FLUSH /* @min:%2eonunloadFlush */](false);\r\n // Back up the current session to local storage\r\n // This lets us close expired sessions after the cookies themselves expire\r\n if (isFunction(_self.core[STR_GET_PLUGIN /* @min:%2egetPlugin */])) {\r\n var loadedPlugin = _this.core[STR_GET_PLUGIN /* @min:%2egetPlugin */](PropertiesPluginIdentifier);\r\n if (loadedPlugin) {\r\n var propertiesPlugin = loadedPlugin.plugin;\r\n if (propertiesPlugin && propertiesPlugin[_DYN_CONTEXT /* @min:%2econtext */] && propertiesPlugin[_DYN_CONTEXT /* @min:%2econtext */]._sessionManager) {\r\n propertiesPlugin[_DYN_CONTEXT /* @min:%2econtext */]._sessionManager.backup();\r\n }\r\n }\r\n }\r\n };\r\n var added_1 = false;\r\n var analyticsPlugin_1 = appInsightsInstance.appInsights;\r\n var theConfig_1 = analyticsPlugin_1.config;\r\n if (!_houseKeepingNamespace) {\r\n _houseKeepingNamespace = mergeEvtNamespace(_evtNamespace, _core[STR_EVT_NAMESPACE /* @min:%2eevtNamespace */] && _core[STR_EVT_NAMESPACE /* @min:%2eevtNamespace */]());\r\n }\r\n // Will be recalled if any referenced config properties change\r\n _addUnloadHook(onConfigChange(_config, function () {\r\n // As we could get recalled, remove any previously registered event handlers first\r\n _removePageEventHandlers();\r\n var excludePageUnloadEvents = theConfig_1.disablePageUnloadEvents;\r\n if (!theConfig_1.disableFlushOnBeforeUnload) {\r\n // Hook the unload event for the document, window and body to ensure that the client events are flushed to the server\r\n // As just hooking the window does not always fire (on chrome) for page navigation's.\r\n if (addPageUnloadEventListener(performHousekeeping_1, excludePageUnloadEvents, _houseKeepingNamespace)) {\r\n added_1 = true;\r\n }\r\n // We also need to hook the pagehide and visibilitychange events as not all versions of Safari support load/unload events.\r\n if (addPageHideEventListener(performHousekeeping_1, excludePageUnloadEvents, _houseKeepingNamespace)) {\r\n added_1 = true;\r\n }\r\n // A reactNative app may not have a window and therefore the beforeunload/pagehide events -- so don't\r\n // log the failure in this case\r\n if (!added_1 && !isReactNative()) {\r\n _throwInternal(analyticsPlugin_1.core.logger, 1 /* eLoggingSeverity.CRITICAL */, 19 /* _eInternalMessageId.FailedToAddHandlerForOnBeforeUnload */, \"Could not add handler for beforeunload and pagehide\");\r\n }\r\n }\r\n if (!added_1 && !theConfig_1.disableFlushOnUnload) {\r\n // If we didn't add the normal set then attempt to add the pagehide and visibilitychange only\r\n addPageHideEventListener(performHousekeeping_1, excludePageUnloadEvents, _houseKeepingNamespace);\r\n }\r\n }));\r\n }\r\n };\r\n _self.getSender = function () {\r\n return _sender;\r\n };\r\n _self.unload = function (isAsync, unloadComplete, cbTimeout) {\r\n var unloadDone = false;\r\n var result;\r\n if (isAsync && !unloadComplete) {\r\n result = createPromise(function (resolve) {\r\n // Set the callback to the promise resolve callback\r\n unloadComplete = resolve;\r\n });\r\n }\r\n function _unloadCallback(unloadState) {\r\n if (!unloadDone) {\r\n unloadDone = true;\r\n _initDefaults();\r\n unloadComplete && unloadComplete(unloadState);\r\n }\r\n }\r\n _self[_DYN_ONUNLOAD_FLUSH /* @min:%2eonunloadFlush */](isAsync);\r\n _removePageEventHandlers();\r\n _core.unload && _core.unload(isAsync, _unloadCallback, cbTimeout);\r\n return result;\r\n };\r\n proxyFunctions(_self, _analyticsPlugin, [\r\n STR_GET_COOKIE_MGR,\r\n STR_TRACK_EVENT,\r\n STR_TRACK_PAGE_VIEW,\r\n \"trackPageViewPerformance\",\r\n STR_TRACK_EXCEPTION,\r\n \"_onerror\",\r\n STR_TRACK_TRACE,\r\n STR_TRACK_METRIC,\r\n STR_START_TRACK_PAGE,\r\n STR_STOP_TRACK_PAGE,\r\n STR_START_TRACK_EVENT,\r\n STR_STOP_TRACK_EVENT\r\n ]);\r\n proxyFunctions(_self, _getCurrentDependencies, [\r\n STR_TRACK_DEPENDENCY_DATA,\r\n \"addDependencyListener\",\r\n \"addDependencyInitializer\"\r\n ]);\r\n proxyFunctions(_self, _core, [\r\n STR_ADD_TELEMETRY_INITIALIZER,\r\n STR_POLL_INTERNAL_LOGS,\r\n \"stopPollingInternalLogs\",\r\n STR_GET_PLUGIN,\r\n \"addPlugin\",\r\n STR_EVT_NAMESPACE,\r\n \"addUnloadCb\",\r\n \"getTraceCtx\",\r\n \"updateCfg\",\r\n \"onCfgChange\"\r\n ]);\r\n proxyFunctions(_self, function () {\r\n var context = properties[_DYN_CONTEXT /* @min:%2econtext */];\r\n return context ? context.user : null;\r\n }, [\r\n STR_SET_AUTHENTICATED_USER_CONTEXT,\r\n STR_CLEAR_AUTHENTICATED_USER_CONTEXT\r\n ]);\r\n // Using a function to support the dynamic adding / removal of plugins, so this will always return the current value\r\n function _getCurrentDependencies() {\r\n return dependencies;\r\n }\r\n function _initDefaults() {\r\n _evtNamespace = createUniqueNamespace(\"AISKU\");\r\n _houseKeepingNamespace = null;\r\n dependencies = null;\r\n properties = null;\r\n _sender = null;\r\n _snippetVersion = null;\r\n }\r\n function _removePageEventHandlers() {\r\n // Remove any registered event handlers\r\n if (_houseKeepingNamespace) {\r\n removePageUnloadEventListener(null, _houseKeepingNamespace);\r\n removePageHideEventListener(null, _houseKeepingNamespace);\r\n }\r\n }\r\n function _addUnloadHook(hooks) {\r\n _core.addUnloadHook(hooks);\r\n }\r\n });\r\n }\r\n // Analytics Plugin\r\n /**\r\n * Get the current cookie manager for this instance\r\n */\r\n AppInsightsSku.prototype.getCookieMgr = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Log a user action or other occurrence.\r\n * @param event\r\n * @param [customProperties]\r\n * @memberof Initialization\r\n */\r\n AppInsightsSku.prototype.trackEvent = function (event, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Logs that a page, or similar container was displayed to the user.\r\n * @param pageView\r\n * @memberof Initialization\r\n */\r\n AppInsightsSku.prototype.trackPageView = function (pageView) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Log a bag of performance information via the customProperties field.\r\n * @param pageViewPerformance\r\n * @memberof Initialization\r\n */\r\n AppInsightsSku.prototype.trackPageViewPerformance = function (pageViewPerformance) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Log an exception that you have caught.\r\n * @param exception\r\n * @param } customProperties Additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @memberof Initialization\r\n */\r\n AppInsightsSku.prototype.trackException = function (exception, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Manually send uncaught exception telemetry. This method is automatically triggered\r\n * on a window.onerror event.\r\n * @param exception\r\n * @memberof Initialization\r\n */\r\n AppInsightsSku.prototype._onerror = function (exception) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Log a diagnostic scenario such entering or leaving a function.\r\n * @param trace\r\n * @param [customProperties]\r\n * @memberof Initialization\r\n */\r\n AppInsightsSku.prototype.trackTrace = function (trace, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Log a numeric value that is not associated with a specific event. Typically used\r\n * to send regular reports of performance indicators.\r\n *\r\n * To send a single measurement, just use the `name` and `average` fields\r\n * of {@link IMetricTelemetry}.\r\n *\r\n * If you take measurements frequently, you can reduce the telemetry bandwidth by\r\n * aggregating multiple measurements and sending the resulting average and modifying\r\n * the `sampleCount` field of {@link IMetricTelemetry}.\r\n * @param metric - input object argument. Only `name` and `average` are mandatory.\r\n * @param [customProperties]\r\n * @memberof Initialization\r\n */\r\n AppInsightsSku.prototype.trackMetric = function (metric, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Starts the timer for tracking a page load time. Use this instead of `trackPageView` if you want to control when the page view timer starts and stops,\r\n * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call `stopTrackPage` to log the end of the page view\r\n * and send the event.\r\n * @param name - A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n AppInsightsSku.prototype.startTrackPage = function (name) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements.\r\n * The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`.\r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n AppInsightsSku.prototype.stopTrackPage = function (name, url, customProperties, measurements) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AppInsightsSku.prototype.startTrackEvent = function (name) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Log an extended event that you started timing with `startTrackEvent`.\r\n * @param name The string you used to identify this event in `startTrackEvent`.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n AppInsightsSku.prototype.stopTrackEvent = function (name, properties, measurements) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AppInsightsSku.prototype.addTelemetryInitializer = function (telemetryInitializer) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n // Properties Plugin\r\n /**\r\n * Set the authenticated user id and the account id. Used for identifying a specific signed-in user. Parameters must not contain whitespace or ,;=|\r\n *\r\n * The method will only set the `authenticatedUserId` and `accountId` in the current page view. To set them for the whole session, you should set `storeInCookie = true`\r\n * @param authenticatedUserId\r\n * @param [accountId]\r\n * @param [storeInCookie=false]\r\n */\r\n AppInsightsSku.prototype.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) {\r\n if (storeInCookie === void 0) { storeInCookie = false; }\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Clears the authenticated user id and account id. The associated cookie is cleared, if present.\r\n */\r\n AppInsightsSku.prototype.clearAuthenticatedUserContext = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n // Dependencies Plugin\r\n /**\r\n * Log a dependency call (e.g. ajax)\r\n * @param dependency\r\n * @memberof Initialization\r\n */\r\n AppInsightsSku.prototype.trackDependencyData = function (dependency) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n // Misc\r\n /**\r\n * Attempt to flush data immediately; If executing asynchronously (the default) and\r\n * you DO NOT pass a callback function then a [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * will be returned which will resolve once the flush is complete. The actual implementation of the `IPromise`\r\n * will be a native Promise (if supported) or the default as supplied by [ts-async library](https://github.com/nevware21/ts-async)\r\n * @param async - send data asynchronously when true\r\n * @param callBack - if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called.\r\n * If the caller doesn't return true the caller should assume that it may never be called.\r\n * @returns - If a callback is provided `true` to indicate that callback will be called after the flush is complete otherwise the caller\r\n * should assume that any provided callback will never be called, Nothing or if occurring asynchronously a\r\n * [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html) which will be resolved once the unload is complete,\r\n * the [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html) will only be returned when no callback is provided\r\n * and async is true.\r\n */\r\n AppInsightsSku.prototype.flush = function (async, callBack) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Manually trigger an immediate send of all telemetry still in the buffer using beacon Sender.\r\n * Fall back to xhr sender if beacon is not supported.\r\n * @param [async=true]\r\n * @memberof Initialization\r\n */\r\n AppInsightsSku.prototype.onunloadFlush = function (async) {\r\n if (async === void 0) { async = true; }\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Initialize this instance of ApplicationInsights\r\n * @returns {IApplicationInsights}\r\n * @memberof Initialization\r\n * @param legacyMode - MUST always be false, it is no longer supported from v3.x onwards\r\n */\r\n AppInsightsSku.prototype.loadAppInsights = function (legacyMode, logger, notificationManager) {\r\n if (legacyMode === void 0) { legacyMode = false; }\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Overwrite the lazy loaded fields of global window snippet to contain the\r\n * actual initialized API methods\r\n * @param snippet\r\n * @memberof Initialization\r\n */\r\n AppInsightsSku.prototype.updateSnippetDefinitions = function (snippet) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Call any functions that were queued before the main script was loaded\r\n * @memberof Initialization\r\n */\r\n AppInsightsSku.prototype.emptyQueue = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AppInsightsSku.prototype.pollInternalLogs = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AppInsightsSku.prototype.stopPollingInternalLogs = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AppInsightsSku.prototype.addHousekeepingBeforeUnload = function (appInsightsInstance) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AppInsightsSku.prototype.getSender = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered\r\n * to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous\r\n * unload call return `true` stating that all plugins reported that they also unloaded, the recommended\r\n * approach is to create a new instance and initialize that instance.\r\n * This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable\r\n * to successfully remove any global references or they may just be completing the unload process asynchronously.\r\n * If you pass isAsync as true and do not provide\r\n * If you pass isAsync as `true` (also the default) and DO NOT pass a callback function then an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * will be returned which will resolve once the unload is complete. The actual implementation of the `IPromise`\r\n * will be a native Promise (if supported) or the default as supplied by [ts-async library](https://github.com/nevware21/ts-async)\r\n * @param isAsync - Can the unload be performed asynchronously (default)\r\n * @param unloadComplete - An optional callback that will be called once the unload has completed\r\n * @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the\r\n * unload. Defaults to 5 seconds.\r\n * @return Nothing or if occurring asynchronously a [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * which will be resolved once the unload is complete, the [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * will only be returned when no callback is provided and isAsync is true\r\n */\r\n AppInsightsSku.prototype.unload = function (isAsync, unloadComplete, cbTimeout) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n AppInsightsSku.prototype.getPlugin = function (pluginIdentifier) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Add a new plugin to the installation\r\n * @param plugin - The new plugin to add\r\n * @param replaceExisting - should any existing plugin be replaced, default is false\r\n * @param doAsync - Should the add be performed asynchronously\r\n * @param addCb - [Optional] callback to call after the plugin has been added\r\n */\r\n AppInsightsSku.prototype.addPlugin = function (plugin, replaceExisting, doAsync, addCb) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Update the configuration used and broadcast the changes to all loaded plugins\r\n * @param newConfig - The new configuration is apply\r\n * @param mergeExisting - Should the new configuration merge with the existing or just replace it. Default is to merge.\r\n */\r\n AppInsightsSku.prototype.updateCfg = function (newConfig, mergeExisting) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Returns the unique event namespace that should be used\r\n */\r\n AppInsightsSku.prototype.evtNamespace = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Add an unload handler that will be called when the SDK is being unloaded\r\n * @param handler - the handler\r\n */\r\n AppInsightsSku.prototype.addUnloadCb = function (handler) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Add an ajax listener which is called just prior to the request being sent and before the correlation headers are added, to allow you\r\n * to access the headers and modify the values used to generate the distributed tracing correlation headers. (added in v2.8.4)\r\n * @param dependencyListener - The Telemetry Initializer function\r\n * @returns - A IDependencyListenerHandler to enable the initializer to be removed\r\n */\r\n AppInsightsSku.prototype.addDependencyListener = function (dependencyListener) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Add an dependency telemetry initializer callback function to allow populating additional properties or drop the request.\r\n * It is called after the dependency call has completed and any available performance details are available. A dependency\r\n * initializer is similar to the TelemetryInitializer function but it allows you to block the reporting of the dependency\r\n * request so that it doesn't count against the `maxAjaxCallsPerView`.\r\n * @param dependencyInitializer - The Dependency Telemetry Initializer function\r\n * @returns - A IDependencyInitializerHandler to enable the initializer to be removed\r\n */\r\n AppInsightsSku.prototype.addDependencyInitializer = function (dependencyInitializer) {\r\n return null;\r\n };\r\n /**\r\n * Gets the current distributed trace context for this instance if available\r\n */\r\n AppInsightsSku.prototype.getTraceCtx = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Watches and tracks changes for accesses to the current config, and if the accessed config changes the\r\n * handler will be recalled.\r\n * @param handler\r\n * @returns A watcher handler instance that can be used to remove itself when being unloaded\r\n */\r\n AppInsightsSku.prototype.onCfgChange = function (handler) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n return AppInsightsSku;\r\n}());\r\nexport { AppInsightsSku };\r\n// tslint:disable-next-line\r\nexport function _findSdkSourceFile() {\r\n if (_internalSdkSrc) {\r\n // Use the cached value\r\n return _internalSdkSrc;\r\n }\r\n var sdkSrc = null;\r\n var isModule = false;\r\n var cdns = [\r\n \"://js.monitor.azure.com/\",\r\n \"://az416426.vo.msecnd.net/\"\r\n ];\r\n try {\r\n // Try and determine whether the sdk is being loaded from the CDN\r\n // currentScript is only valid during initial processing\r\n var scrpt = (document || {}).currentScript;\r\n if (scrpt) {\r\n sdkSrc = scrpt.src;\r\n // } else {\r\n // // We need to update to at least typescript 2.9 for this to work :-(\r\n // // Leaving as a stub for now so after we upgrade this breadcrumb is available\r\n // let meta = import.meta;\r\n // sdkSrc = (meta || {}).url;\r\n // isModule = true;\r\n }\r\n }\r\n catch (e) {\r\n // eslint-disable-next-line no-empty\r\n }\r\n if (sdkSrc) {\r\n try {\r\n var url_1 = sdkSrc.toLowerCase();\r\n if (url_1) {\r\n var src_1 = \"\";\r\n arrForEach(cdns, function (value, idx) {\r\n if (strIndexOf(url_1, value) !== -1) {\r\n src_1 = \"cdn\" + (idx + 1);\r\n if (strIndexOf(url_1, \"/scripts/\") === -1) {\r\n if (strIndexOf(url_1, \"/next/\") !== -1) {\r\n src_1 += \"-next\";\r\n }\r\n else if (strIndexOf(url_1, \"/beta/\") !== -1) {\r\n src_1 += \"-beta\";\r\n }\r\n }\r\n _internalSdkSrc = src_1 + (isModule ? \".mod\" : \"\");\r\n return -1;\r\n }\r\n });\r\n }\r\n }\r\n catch (e) {\r\n // eslint-disable-next-line no-empty\r\n }\r\n // Cache the found value so we don't have to look it up again\r\n _internalSdkSrc = sdkSrc;\r\n }\r\n return _internalSdkSrc;\r\n}\r\n//# sourceMappingURL=AISku.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar _a;\r\nimport { getGlobal, objHasOwnProperty, throwTypeError } from \"@nevware21/ts-utils\";\r\n;\r\nvar UNDEFINED = \"undefined\";\r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\r\nvar Constructor = 'constructor';\r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\r\nvar Prototype = 'prototype';\r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\r\nvar strFunction = 'function';\r\n/**\r\n * Used to define the name of the instance function lookup table\r\n * @ignore\r\n */\r\nvar DynInstFuncTable = '_dynInstFuncs';\r\n/**\r\n * Name used to tag the dynamic prototype function\r\n * @ignore\r\n */\r\nvar DynProxyTag = '_isDynProxy';\r\n/**\r\n * Name added to a prototype to define the dynamic prototype \"class\" name used to lookup the function table\r\n * @ignore\r\n */\r\nvar DynClassName = '_dynClass';\r\n/**\r\n * Prefix added to the classname to avoid any name clashes with other instance level properties\r\n * @ignore\r\n */\r\nvar DynClassNamePrefix = '_dynCls$';\r\n/**\r\n * A tag which is used to check if we have already to attempted to set the instance function if one is not present\r\n * @ignore\r\n */\r\nvar DynInstChkTag = '_dynInstChk';\r\n/**\r\n * A tag which is used to check if we are allows to try and set an instance function is one is not present. Using the same\r\n * tag name as the function level but a different const name for readability only.\r\n */\r\nvar DynAllowInstChkTag = DynInstChkTag;\r\n/**\r\n * The global (imported) instances where the global performance options are stored\r\n */\r\nvar DynProtoDefaultOptions = '_dfOpts';\r\n/**\r\n * Value used as the name of a class when it cannot be determined\r\n * @ignore\r\n */\r\nvar UnknownValue = '_unknown_';\r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\r\nvar str__Proto = \"__proto__\";\r\n/**\r\n * The polyfill version of __proto__ so that it doesn't cause issues for anyone not expecting it to exist\r\n */\r\nvar DynProtoBaseProto = \"_dyn\" + str__Proto;\r\n/**\r\n * Runtime Global holder for dynamicProto settings\r\n */\r\nvar DynProtoGlobalSettings = \"__dynProto$Gbl\";\r\n/**\r\n * Track the current prototype for IE8 as you can't look back to get the prototype\r\n */\r\nvar DynProtoCurrent = \"_dynInstProto\";\r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\r\nvar strUseBaseInst = 'useBaseInst';\r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\r\nvar strSetInstFuncs = 'setInstFuncs';\r\nvar Obj = Object;\r\n/**\r\n * Pre-lookup to check if we are running on a modern browser (i.e. not IE8)\r\n * @ignore\r\n */\r\nvar _objGetPrototypeOf = Obj[\"getPrototypeOf\"];\r\n/**\r\n * Pre-lookup to check for the existence of this function\r\n */\r\nvar _objGetOwnProps = Obj[\"getOwnPropertyNames\"];\r\n// Since 1.1.7 moving these to the runtime global to work around mixed version and module issues\r\n// See Issue https://github.com/microsoft/DynamicProto-JS/issues/57 for details\r\nvar _gbl = getGlobal();\r\nvar _gblInst = _gbl[DynProtoGlobalSettings] || (_gbl[DynProtoGlobalSettings] = {\r\n o: (_a = {},\r\n _a[strSetInstFuncs] = true,\r\n _a[strUseBaseInst] = true,\r\n _a),\r\n n: 1000 // Start new global index @ 1000 so we \"fix\" some cases when mixed with 1.1.6 or earlier\r\n});\r\n/**\r\n * Helper used to check whether the target is an Object prototype or Array prototype\r\n * @ignore\r\n */\r\nfunction _isObjectOrArrayPrototype(target) {\r\n return target && (target === Obj[Prototype] || target === Array[Prototype]);\r\n}\r\n/**\r\n * Helper used to check whether the target is an Object prototype, Array prototype or Function prototype\r\n * @ignore\r\n */\r\nfunction _isObjectArrayOrFunctionPrototype(target) {\r\n return _isObjectOrArrayPrototype(target) || target === Function[Prototype];\r\n}\r\n/**\r\n * Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.\r\n * @ignore\r\n */\r\nfunction _getObjProto(target) {\r\n var newProto;\r\n if (target) {\r\n // This method doesn't exist in older browsers (e.g. IE8)\r\n if (_objGetPrototypeOf) {\r\n return _objGetPrototypeOf(target);\r\n }\r\n var curProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);\r\n // Using the pre-calculated value as IE8 doesn't support looking up the prototype of a prototype and thus fails for more than 1 base class\r\n newProto = target[DynProtoBaseProto] || curProto;\r\n if (!objHasOwnProperty(target, DynProtoBaseProto)) {\r\n // As this prototype doesn't have this property then this is from an inherited class so newProto is the base to return so save it\r\n // so we can look it up value (which for a multiple hierarchy dynamicProto will be the base class)\r\n delete target[DynProtoCurrent]; // Delete any current value allocated to this instance so we pick up the value from prototype hierarchy\r\n newProto = target[DynProtoBaseProto] = target[DynProtoCurrent] || target[DynProtoBaseProto];\r\n target[DynProtoCurrent] = curProto;\r\n }\r\n }\r\n return newProto;\r\n}\r\n/**\r\n * Helper to get the properties of an object, including none enumerable ones as functions on a prototype in ES6\r\n * are not enumerable.\r\n * @param target\r\n */\r\nfunction _forEachProp(target, func) {\r\n var props = [];\r\n if (_objGetOwnProps) {\r\n props = _objGetOwnProps(target);\r\n }\r\n else {\r\n for (var name_1 in target) {\r\n if (typeof name_1 === \"string\" && objHasOwnProperty(target, name_1)) {\r\n props.push(name_1);\r\n }\r\n }\r\n }\r\n if (props && props.length > 0) {\r\n for (var lp = 0; lp < props.length; lp++) {\r\n func(props[lp]);\r\n }\r\n }\r\n}\r\n/**\r\n * Helper function to check whether the provided function name is a potential candidate for dynamic\r\n * callback and prototype generation.\r\n * @param target The target object, may be a prototype or class object\r\n * @param funcName The function name\r\n * @param skipOwn Skips the check for own property\r\n * @ignore\r\n */\r\nfunction _isDynamicCandidate(target, funcName, skipOwn) {\r\n return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || objHasOwnProperty(target, funcName)));\r\n}\r\n/**\r\n * Helper to throw a TypeError exception\r\n * @param message the message\r\n * @ignore\r\n */\r\nfunction _throwTypeError(message) {\r\n throwTypeError(\"DynamicProto: \" + message);\r\n}\r\n/**\r\n * Returns a collection of the instance functions that are defined directly on the thisTarget object, it does\r\n * not return any inherited functions\r\n * @param thisTarget The object to get the instance functions from\r\n * @ignore\r\n */\r\nfunction _getInstanceFuncs(thisTarget) {\r\n // Get the base proto\r\n var instFuncs = {};\r\n // Save any existing instance functions\r\n _forEachProp(thisTarget, function (name) {\r\n // Don't include any dynamic prototype instances - as we only want the real functions\r\n if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {\r\n // Create an instance callback for passing the base function to the caller\r\n instFuncs[name] = thisTarget[name];\r\n }\r\n });\r\n return instFuncs;\r\n}\r\n/**\r\n * Returns whether the value is included in the array\r\n * @param values The array of values\r\n * @param value The value\r\n */\r\nfunction _hasVisited(values, value) {\r\n for (var lp = values.length - 1; lp >= 0; lp--) {\r\n if (values[lp] === value) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n/**\r\n * Returns an object that contains callback functions for all \"base/super\" functions, this is used to \"save\"\r\n * enabling calling super.xxx() functions without requiring that the base \"class\" has defined a prototype references\r\n * @param target The current instance\r\n * @ignore\r\n */\r\nfunction _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {\r\n function _instFuncProxy(target, funcHost, funcName) {\r\n var theFunc = funcHost[funcName];\r\n if (theFunc[DynProxyTag] && useBaseInst) {\r\n // grab and reuse the hosted looking function (if available) otherwise the original passed function\r\n var instFuncTable = target[DynInstFuncTable] || {};\r\n if (instFuncTable[DynAllowInstChkTag] !== false) {\r\n theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;\r\n }\r\n }\r\n return function () {\r\n // eslint-disable-next-line prefer-rest-params\r\n return theFunc.apply(target, arguments);\r\n };\r\n }\r\n // Start creating a new baseFuncs by creating proxies for the instance functions (as they may get replaced)\r\n var baseFuncs = {};\r\n _forEachProp(instFuncs, function (name) {\r\n // Create an instance callback for passing the base function to the caller\r\n baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);\r\n });\r\n // Get the base prototype functions\r\n var baseProto = _getObjProto(classProto);\r\n var visited = [];\r\n // Don't include base object functions for Object, Array or Function\r\n while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {\r\n // look for prototype functions\r\n _forEachProp(baseProto, function (name) {\r\n // Don't include any dynamic prototype instances - as we only want the real functions\r\n // For IE 7/8 the prototype lookup doesn't provide the full chain so we need to bypass the \r\n // hasOwnProperty check we get all of the methods, main difference is that IE7/8 doesn't return\r\n // the Object prototype methods while bypassing the check\r\n if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {\r\n // Create an instance callback for passing the base function to the caller\r\n baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);\r\n }\r\n });\r\n // We need to find all possible functions that might be overloaded by walking the entire prototype chain\r\n // This avoids the caller from needing to check whether it's direct base class implements the function or not\r\n // by walking the entire chain it simplifies the usage and issues from upgrading any of the base classes.\r\n visited.push(baseProto);\r\n baseProto = _getObjProto(baseProto);\r\n }\r\n return baseFuncs;\r\n}\r\nfunction _getInstFunc(target, funcName, proto, currentDynProtoProxy) {\r\n var instFunc = null;\r\n // We need to check whether the class name is defined directly on this prototype otherwise\r\n // it will walk the proto chain and return any parent proto classname.\r\n if (target && objHasOwnProperty(proto, DynClassName)) {\r\n var instFuncTable = target[DynInstFuncTable] || {};\r\n instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];\r\n if (!instFunc) {\r\n // Avoid stack overflow from recursive calling the same function\r\n _throwTypeError(\"Missing [\" + funcName + \"] \" + strFunction);\r\n }\r\n // We have the instance function, lets check it we can speed up further calls\r\n // by adding the instance function back directly on the instance (avoiding the dynamic func lookup)\r\n if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {\r\n // If the instance already has an instance function we can't replace it\r\n var canAddInst = !objHasOwnProperty(target, funcName);\r\n // Get current prototype\r\n var objProto = _getObjProto(target);\r\n var visited = [];\r\n // Lookup the function starting at the top (instance level prototype) and traverse down, if the first matching function\r\n // if nothing is found or if the first hit is a dynamic proto instance then we can safely add an instance shortcut\r\n while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {\r\n var protoFunc = objProto[funcName];\r\n if (protoFunc) {\r\n canAddInst = (protoFunc === currentDynProtoProxy);\r\n break;\r\n }\r\n // We need to find all possible initial functions to ensure that we don't bypass a valid override function\r\n visited.push(objProto);\r\n objProto = _getObjProto(objProto);\r\n }\r\n try {\r\n if (canAddInst) {\r\n // This instance doesn't have an instance func and the class hierarchy does have a higher level prototype version\r\n // so it's safe to directly assign for any subsequent calls (for better performance)\r\n target[funcName] = instFunc;\r\n }\r\n // Block further attempts to set the instance function for any\r\n instFunc[DynInstChkTag] = 1;\r\n }\r\n catch (e) {\r\n // Don't crash if the object is readonly or the runtime doesn't allow changing this\r\n // And set a flag so we don't try again for any function\r\n instFuncTable[DynAllowInstChkTag] = false;\r\n }\r\n }\r\n }\r\n return instFunc;\r\n}\r\nfunction _getProtoFunc(funcName, proto, currentDynProtoProxy) {\r\n var protoFunc = proto[funcName];\r\n // Check that the prototype function is not a self reference -- try to avoid stack overflow!\r\n if (protoFunc === currentDynProtoProxy) {\r\n // It is so lookup the base prototype\r\n protoFunc = _getObjProto(proto)[funcName];\r\n }\r\n if (typeof protoFunc !== strFunction) {\r\n _throwTypeError(\"[\" + funcName + \"] is not a \" + strFunction);\r\n }\r\n return protoFunc;\r\n}\r\n/**\r\n * Add the required dynamic prototype methods to the the class prototype\r\n * @param proto - The class prototype\r\n * @param className - The instance classname\r\n * @param target - The target instance\r\n * @param baseInstFuncs - The base instance functions\r\n * @param setInstanceFunc - Flag to allow prototype function to reset the instance function if one does not exist\r\n * @ignore\r\n */\r\nfunction _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {\r\n function _createDynamicPrototype(proto, funcName) {\r\n var dynProtoProxy = function () {\r\n // Use the instance or prototype function\r\n var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);\r\n // eslint-disable-next-line prefer-rest-params\r\n return instFunc.apply(this, arguments);\r\n };\r\n // Tag this function as a proxy to support replacing dynamic proxy elements (primary use case is for unit testing\r\n // via which can dynamically replace the prototype function reference)\r\n dynProtoProxy[DynProxyTag] = 1;\r\n return dynProtoProxy;\r\n }\r\n if (!_isObjectOrArrayPrototype(proto)) {\r\n var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};\r\n var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || {}); // fetch and assign if as it may not exist yet\r\n // Set whether we are allow to lookup instances, if someone has set to false then do not re-enable\r\n if (instFuncTable[DynAllowInstChkTag] !== false) {\r\n instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;\r\n }\r\n _forEachProp(target, function (name) {\r\n // Only add overridden functions\r\n if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {\r\n // Save the instance Function to the lookup table and remove it from the instance as it's not a dynamic proto function\r\n instFuncs_1[name] = target[name];\r\n delete target[name];\r\n // Add a dynamic proto if one doesn't exist or if a prototype function exists and it's not a dynamic one\r\n if (!objHasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {\r\n proto[name] = _createDynamicPrototype(proto, name);\r\n }\r\n }\r\n });\r\n }\r\n}\r\n/**\r\n * Checks whether the passed prototype object appears to be correct by walking the prototype hierarchy of the instance\r\n * @param classProto The class prototype instance\r\n * @param thisTarget The current instance that will be checked whether the passed prototype instance is in the hierarchy\r\n * @ignore\r\n */\r\nfunction _checkPrototype(classProto, thisTarget) {\r\n // This method doesn't existing in older browsers (e.g. IE8)\r\n if (_objGetPrototypeOf) {\r\n // As this is primarily a coding time check, don't bother checking if running in IE8 or lower\r\n var visited = [];\r\n var thisProto = _getObjProto(thisTarget);\r\n while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {\r\n if (thisProto === classProto) {\r\n return true;\r\n }\r\n // This avoids the caller from needing to check whether it's direct base class implements the function or not\r\n // by walking the entire chain it simplifies the usage and issues from upgrading any of the base classes.\r\n visited.push(thisProto);\r\n thisProto = _getObjProto(thisProto);\r\n }\r\n return false;\r\n }\r\n // If objGetPrototypeOf doesn't exist then just assume everything is ok.\r\n return true;\r\n}\r\n/**\r\n * Gets the current prototype name using the ES6 name if available otherwise falling back to a use unknown as the name.\r\n * It's not critical for this to return a name, it's used to decorate the generated unique name for easier debugging only.\r\n * @param target\r\n * @param unknownValue\r\n * @ignore\r\n */\r\nfunction _getObjName(target, unknownValue) {\r\n if (objHasOwnProperty(target, Prototype)) {\r\n // Look like a prototype\r\n return target.name || unknownValue || UnknownValue;\r\n }\r\n return (((target || {})[Constructor]) || {}).name || unknownValue || UnknownValue;\r\n}\r\n/**\r\n * Helper function when creating dynamic (inline) functions for classes, this helper performs the following tasks :-\r\n * - Saves references to all defined base class functions\r\n * - Calls the delegateFunc with the current target (this) and a base object reference that can be used to call all \"super\" functions.\r\n * - Will populate the class prototype for all overridden functions to support class extension that call the prototype instance.\r\n * Callers should use this helper when declaring all function within the constructor of a class, as mentioned above the delegateFunc is\r\n * passed both the target \"this\" and an object that can be used to call any base (super) functions, using this based object in place of\r\n * super.XXX() (which gets expanded to _super.prototype.XXX()) provides a better minification outcome and also ensures the correct \"this\"\r\n * context is maintained as TypeScript creates incorrect references using super.XXXX() for dynamically defined functions i.e. Functions\r\n * defined in the constructor or some other function (rather than declared as complete typescript functions).\r\n * ### Usage\r\n * ```typescript\r\n * import dynamicProto from \"@microsoft/dynamicproto-js\";\r\n * class ExampleClass extends BaseClass {\r\n * constructor() {\r\n * dynamicProto(ExampleClass, this, (_self, base) => {\r\n * // This will define a function that will be converted to a prototype function\r\n * _self.newFunc = () => {\r\n * // Access any \"this\" instance property\r\n * if (_self.someProperty) {\r\n * ...\r\n * }\r\n * }\r\n * // This will define a function that will be converted to a prototype function\r\n * _self.myFunction = () => {\r\n * // Access any \"this\" instance property\r\n * if (_self.someProperty) {\r\n * // Call the base version of the function that we are overriding\r\n * base.myFunction();\r\n * }\r\n * ...\r\n * }\r\n * _self.initialize = () => {\r\n * ...\r\n * }\r\n * // Warnings: While the following will work as _self is simply a reference to\r\n * // this, if anyone overrides myFunction() the overridden will be called first\r\n * // as the normal JavaScript method resolution will occur and the defined\r\n * // _self.initialize() function is actually gets removed from the instance and\r\n * // a proxy prototype version is created to reference the created method.\r\n * _self.initialize();\r\n * });\r\n * }\r\n * }\r\n * ```\r\n * @typeparam DPType This is the generic type of the class, used to keep intellisense valid\r\n * @typeparam DPCls The type that contains the prototype of the current class\r\n * @param theClass - This is the current class instance which contains the prototype for the current class\r\n * @param target - The current \"this\" (target) reference, when the class has been extended this.prototype will not be the 'theClass' value.\r\n * @param delegateFunc - The callback function (closure) that will create the dynamic function\r\n * @param options - Additional options to configure how the dynamic prototype operates\r\n */\r\nexport default function dynamicProto(theClass, target, delegateFunc, options) {\r\n // Make sure that the passed theClass argument looks correct\r\n if (!objHasOwnProperty(theClass, Prototype)) {\r\n _throwTypeError(\"theClass is an invalid class definition.\");\r\n }\r\n // Quick check to make sure that the passed theClass argument looks correct (this is a common copy/paste error)\r\n var classProto = theClass[Prototype];\r\n if (!_checkPrototype(classProto, target)) {\r\n _throwTypeError(\"[\" + _getObjName(theClass) + \"] not in hierarchy of [\" + _getObjName(target) + \"]\");\r\n }\r\n var className = null;\r\n if (objHasOwnProperty(classProto, DynClassName)) {\r\n // Only grab the class name if it's defined on this prototype (i.e. don't walk the prototype chain)\r\n className = classProto[DynClassName];\r\n }\r\n else {\r\n // As not all browser support name on the prototype creating a unique dynamic one if we have not already\r\n // assigned one, so we can use a simple string as the lookup rather than an object for the dynamic instance\r\n // function table lookup.\r\n className = DynClassNamePrefix + _getObjName(theClass, \"_\") + \"$\" + _gblInst.n;\r\n _gblInst.n++;\r\n classProto[DynClassName] = className;\r\n }\r\n var perfOptions = dynamicProto[DynProtoDefaultOptions];\r\n var useBaseInst = !!perfOptions[strUseBaseInst];\r\n if (useBaseInst && options && options[strUseBaseInst] !== undefined) {\r\n useBaseInst = !!options[strUseBaseInst];\r\n }\r\n // Get the current instance functions\r\n var instFuncs = _getInstanceFuncs(target);\r\n // Get all of the functions for any base instance (before they are potentially overridden)\r\n var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);\r\n // Execute the delegate passing in both the current target \"this\" and \"base\" function references\r\n // Note casting the same type as we don't actually have the base class here and this will provide some intellisense support\r\n delegateFunc(target, baseFuncs);\r\n // Don't allow setting instance functions for older IE instances\r\n var setInstanceFunc = !!_objGetPrototypeOf && !!perfOptions[strSetInstFuncs];\r\n if (setInstanceFunc && options) {\r\n setInstanceFunc = !!options[strSetInstFuncs];\r\n }\r\n // Populate the Prototype for any overridden instance functions\r\n _populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);\r\n}\r\n/**\r\n * Exposes the default global options to allow global configuration, if the global values are disabled these will override\r\n * any passed values. This is primarily exposed to support unit-testing without the need for individual classes to expose\r\n * their internal usage of dynamic proto.\r\n */\r\ndynamicProto[DynProtoDefaultOptions] = _gblInst.o;\r\n//# sourceMappingURL=DynamicProto.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { getGlobal, objHasOwnProperty, throwTypeError } from \"@nevware21/ts-utils\";\r\n\r\ninterface DynamicGlobalSettings {\r\n /**\r\n * Stores the global options which will also be exposed on the runtime global\r\n */\r\n o: IDynamicProtoOpts,\r\n\r\n /**\r\n * Internal Global used to generate a unique dynamic class name, every new class will increase this value\r\n * @ignore\r\n */ \r\n n: number\r\n};\r\n\r\nconst UNDEFINED = \"undefined\";\r\n\r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */ \r\nconst Constructor = 'constructor';\r\n\r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */ \r\nconst Prototype = 'prototype';\r\n \r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\r\nconst strFunction = 'function';\r\n\r\n/**\r\n * Used to define the name of the instance function lookup table\r\n * @ignore\r\n */ \r\nconst DynInstFuncTable = '_dynInstFuncs';\r\n \r\n/**\r\n * Name used to tag the dynamic prototype function\r\n * @ignore\r\n */ \r\nconst DynProxyTag = '_isDynProxy';\r\n \r\n/**\r\n * Name added to a prototype to define the dynamic prototype \"class\" name used to lookup the function table\r\n * @ignore\r\n */ \r\nconst DynClassName = '_dynClass';\r\n \r\n/**\r\n * Prefix added to the classname to avoid any name clashes with other instance level properties\r\n * @ignore\r\n */ \r\nconst DynClassNamePrefix = '_dynCls$';\r\n \r\n/**\r\n * A tag which is used to check if we have already to attempted to set the instance function if one is not present\r\n * @ignore\r\n */\r\nconst DynInstChkTag = '_dynInstChk';\r\n \r\n/**\r\n * A tag which is used to check if we are allows to try and set an instance function is one is not present. Using the same \r\n * tag name as the function level but a different const name for readability only.\r\n */\r\nconst DynAllowInstChkTag = DynInstChkTag;\r\n \r\n/**\r\n * The global (imported) instances where the global performance options are stored\r\n */\r\nconst DynProtoDefaultOptions = '_dfOpts';\r\n \r\n/**\r\n * Value used as the name of a class when it cannot be determined\r\n * @ignore\r\n */ \r\nconst UnknownValue = '_unknown_';\r\n \r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\r\nconst str__Proto = \"__proto__\";\r\n \r\n/**\r\n * The polyfill version of __proto__ so that it doesn't cause issues for anyone not expecting it to exist\r\n */\r\nconst DynProtoBaseProto = \"_dyn\" + str__Proto;\r\n\r\n/**\r\n * Runtime Global holder for dynamicProto settings\r\n */\r\nconst DynProtoGlobalSettings = \"__dynProto$Gbl\";\r\n\r\n/**\r\n * Track the current prototype for IE8 as you can't look back to get the prototype\r\n */\r\nconst DynProtoCurrent = \"_dynInstProto\";\r\n \r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\r\nconst strUseBaseInst = 'useBaseInst';\r\n \r\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\r\nconst strSetInstFuncs = 'setInstFuncs';\r\n \r\nconst Obj = Object;\r\n\r\n/**\r\n * Pre-lookup to check if we are running on a modern browser (i.e. not IE8)\r\n * @ignore\r\n */\r\nlet _objGetPrototypeOf = Obj[\"getPrototypeOf\"];\r\n\r\n/**\r\n * Pre-lookup to check for the existence of this function\r\n */\r\nlet _objGetOwnProps = Obj[\"getOwnPropertyNames\"];\r\n\r\n// Since 1.1.7 moving these to the runtime global to work around mixed version and module issues\r\n// See Issue https://github.com/microsoft/DynamicProto-JS/issues/57 for details\r\nlet _gbl = getGlobal();\r\nlet _gblInst: DynamicGlobalSettings = _gbl[DynProtoGlobalSettings] || (_gbl[DynProtoGlobalSettings] = {\r\n o: {\r\n [strSetInstFuncs]: true,\r\n [strUseBaseInst]: true\r\n },\r\n n: 1000 // Start new global index @ 1000 so we \"fix\" some cases when mixed with 1.1.6 or earlier\r\n});\r\n\r\n/**\r\n * Helper used to check whether the target is an Object prototype or Array prototype\r\n * @ignore\r\n */ \r\nfunction _isObjectOrArrayPrototype(target:any) {\r\n return target && (target === Obj[Prototype] || target === Array[Prototype]);\r\n}\r\n\r\n/**\r\n * Helper used to check whether the target is an Object prototype, Array prototype or Function prototype\r\n * @ignore\r\n */ \r\nfunction _isObjectArrayOrFunctionPrototype(target:any)\r\n{\r\n return _isObjectOrArrayPrototype(target) || target === Function[Prototype];\r\n}\r\n\r\n/**\r\n * Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.\r\n * @ignore\r\n */ \r\nfunction _getObjProto(target:any) {\r\n let newProto;\r\n\r\n if (target) {\r\n // This method doesn't exist in older browsers (e.g. IE8)\r\n if (_objGetPrototypeOf) {\r\n return _objGetPrototypeOf(target);\r\n }\r\n\r\n let curProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);\r\n\r\n // Using the pre-calculated value as IE8 doesn't support looking up the prototype of a prototype and thus fails for more than 1 base class\r\n newProto = target[DynProtoBaseProto] || curProto;\r\n if (!objHasOwnProperty(target, DynProtoBaseProto)) {\r\n // As this prototype doesn't have this property then this is from an inherited class so newProto is the base to return so save it\r\n // so we can look it up value (which for a multiple hierarchy dynamicProto will be the base class)\r\n delete target[DynProtoCurrent]; // Delete any current value allocated to this instance so we pick up the value from prototype hierarchy\r\n newProto = target[DynProtoBaseProto] = target[DynProtoCurrent] || target[DynProtoBaseProto];\r\n target[DynProtoCurrent] = curProto;\r\n }\r\n }\r\n\r\n return newProto;\r\n}\r\n\r\n/**\r\n * Helper to get the properties of an object, including none enumerable ones as functions on a prototype in ES6\r\n * are not enumerable.\r\n * @param target \r\n */\r\nfunction _forEachProp(target: any, func: (name: string) => void) {\r\n let props: string[] = [];\r\n if (_objGetOwnProps) {\r\n props = _objGetOwnProps(target);\r\n } else {\r\n for (let name in target) {\r\n if (typeof name === \"string\" && objHasOwnProperty(target, name)) {\r\n props.push(name);\r\n }\r\n }\r\n }\r\n\r\n if (props && props.length > 0) {\r\n for (let lp = 0; lp < props.length; lp++) {\r\n func(props[lp]);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Helper function to check whether the provided function name is a potential candidate for dynamic\r\n * callback and prototype generation.\r\n * @param target The target object, may be a prototype or class object\r\n * @param funcName The function name\r\n * @param skipOwn Skips the check for own property\r\n * @ignore\r\n */\r\nfunction _isDynamicCandidate(target:any, funcName:string, skipOwn:boolean) {\r\n return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || objHasOwnProperty(target, funcName)));\r\n}\r\n\r\n/**\r\n * Helper to throw a TypeError exception\r\n * @param message the message\r\n * @ignore\r\n */\r\nfunction _throwTypeError(message:string) {\r\n throwTypeError(\"DynamicProto: \" + message);\r\n}\r\n\r\n/**\r\n * Returns a collection of the instance functions that are defined directly on the thisTarget object, it does \r\n * not return any inherited functions\r\n * @param thisTarget The object to get the instance functions from\r\n * @ignore\r\n */\r\nfunction _getInstanceFuncs(thisTarget:any): any {\r\n // Get the base proto\r\n var instFuncs = {};\r\n\r\n // Save any existing instance functions\r\n _forEachProp(thisTarget, (name) => {\r\n // Don't include any dynamic prototype instances - as we only want the real functions\r\n if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {\r\n // Create an instance callback for passing the base function to the caller\r\n instFuncs[name] = thisTarget[name];\r\n }\r\n });\r\n\r\n return instFuncs;\r\n}\r\n\r\n/**\r\n * Returns whether the value is included in the array\r\n * @param values The array of values\r\n * @param value The value\r\n */\r\nfunction _hasVisited(values:any[], value:any) {\r\n for (let lp = values.length - 1; lp >= 0; lp--) {\r\n if (values[lp] === value) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Returns an object that contains callback functions for all \"base/super\" functions, this is used to \"save\"\r\n * enabling calling super.xxx() functions without requiring that the base \"class\" has defined a prototype references\r\n * @param target The current instance\r\n * @ignore\r\n */\r\nfunction _getBaseFuncs(classProto:any, thisTarget:any, instFuncs:any, useBaseInst:boolean): any {\r\n function _instFuncProxy(target:any, funcHost: any, funcName: string) {\r\n let theFunc = funcHost[funcName];\r\n if (theFunc[DynProxyTag] && useBaseInst) {\r\n // grab and reuse the hosted looking function (if available) otherwise the original passed function\r\n let instFuncTable = target[DynInstFuncTable] || {};\r\n if (instFuncTable[DynAllowInstChkTag] !== false) {\r\n theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;\r\n }\r\n }\r\n\r\n return function() {\r\n // eslint-disable-next-line prefer-rest-params\r\n return theFunc.apply(target, arguments);\r\n };\r\n }\r\n\r\n // Start creating a new baseFuncs by creating proxies for the instance functions (as they may get replaced)\r\n var baseFuncs = {};\r\n _forEachProp(instFuncs, (name) => {\r\n // Create an instance callback for passing the base function to the caller\r\n baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);\r\n });\r\n \r\n // Get the base prototype functions\r\n var baseProto = _getObjProto(classProto);\r\n let visited:any[] = [];\r\n\r\n // Don't include base object functions for Object, Array or Function\r\n while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {\r\n // look for prototype functions\r\n _forEachProp(baseProto, (name) => {\r\n // Don't include any dynamic prototype instances - as we only want the real functions\r\n // For IE 7/8 the prototype lookup doesn't provide the full chain so we need to bypass the \r\n // hasOwnProperty check we get all of the methods, main difference is that IE7/8 doesn't return\r\n // the Object prototype methods while bypassing the check\r\n if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {\r\n // Create an instance callback for passing the base function to the caller\r\n baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);\r\n }\r\n });\r\n\r\n // We need to find all possible functions that might be overloaded by walking the entire prototype chain\r\n // This avoids the caller from needing to check whether it's direct base class implements the function or not\r\n // by walking the entire chain it simplifies the usage and issues from upgrading any of the base classes.\r\n visited.push(baseProto);\r\n baseProto = _getObjProto(baseProto);\r\n }\r\n\r\n return baseFuncs;\r\n}\r\n\r\nfunction _getInstFunc(target: any, funcName: string, proto: any, currentDynProtoProxy: any) {\r\n let instFunc = null;\r\n\r\n // We need to check whether the class name is defined directly on this prototype otherwise\r\n // it will walk the proto chain and return any parent proto classname.\r\n if (target && objHasOwnProperty(proto, DynClassName)) {\r\n\r\n let instFuncTable = target[DynInstFuncTable] || {};\r\n instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];\r\n\r\n if (!instFunc) {\r\n // Avoid stack overflow from recursive calling the same function\r\n _throwTypeError(\"Missing [\" + funcName + \"] \" + strFunction);\r\n }\r\n\r\n // We have the instance function, lets check it we can speed up further calls\r\n // by adding the instance function back directly on the instance (avoiding the dynamic func lookup)\r\n if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {\r\n // If the instance already has an instance function we can't replace it\r\n let canAddInst = !objHasOwnProperty(target, funcName);\r\n\r\n // Get current prototype\r\n let objProto = _getObjProto(target);\r\n let visited:any[] = [];\r\n\r\n // Lookup the function starting at the top (instance level prototype) and traverse down, if the first matching function\r\n // if nothing is found or if the first hit is a dynamic proto instance then we can safely add an instance shortcut\r\n while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {\r\n let protoFunc = objProto[funcName];\r\n if (protoFunc) {\r\n canAddInst = (protoFunc === currentDynProtoProxy);\r\n break;\r\n }\r\n\r\n // We need to find all possible initial functions to ensure that we don't bypass a valid override function\r\n visited.push(objProto);\r\n objProto = _getObjProto(objProto);\r\n }\r\n\r\n try {\r\n if (canAddInst) {\r\n // This instance doesn't have an instance func and the class hierarchy does have a higher level prototype version\r\n // so it's safe to directly assign for any subsequent calls (for better performance)\r\n target[funcName] = instFunc;\r\n }\r\n\r\n // Block further attempts to set the instance function for any\r\n instFunc[DynInstChkTag] = 1;\r\n } catch (e) {\r\n // Don't crash if the object is readonly or the runtime doesn't allow changing this\r\n // And set a flag so we don't try again for any function\r\n instFuncTable[DynAllowInstChkTag] = false;\r\n }\r\n }\r\n }\r\n\r\n return instFunc;\r\n}\r\n\r\nfunction _getProtoFunc(funcName: string, proto: any, currentDynProtoProxy: any) {\r\n let protoFunc = proto[funcName];\r\n\r\n // Check that the prototype function is not a self reference -- try to avoid stack overflow!\r\n if (protoFunc === currentDynProtoProxy) {\r\n // It is so lookup the base prototype\r\n protoFunc = _getObjProto(proto)[funcName];\r\n }\r\n\r\n if (typeof protoFunc !== strFunction) {\r\n _throwTypeError(\"[\" + funcName + \"] is not a \" + strFunction);\r\n }\r\n\r\n return protoFunc;\r\n}\r\n\r\n/**\r\n * Add the required dynamic prototype methods to the the class prototype\r\n * @param proto - The class prototype\r\n * @param className - The instance classname \r\n * @param target - The target instance\r\n * @param baseInstFuncs - The base instance functions\r\n * @param setInstanceFunc - Flag to allow prototype function to reset the instance function if one does not exist\r\n * @ignore\r\n */\r\nfunction _populatePrototype(proto:any, className:string, target:any, baseInstFuncs:any, setInstanceFunc:boolean) {\r\n function _createDynamicPrototype(proto:any, funcName:string) {\r\n let dynProtoProxy = function() {\r\n // Use the instance or prototype function\r\n let instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);\r\n // eslint-disable-next-line prefer-rest-params\r\n return instFunc.apply(this, arguments);\r\n };\r\n \r\n // Tag this function as a proxy to support replacing dynamic proxy elements (primary use case is for unit testing\r\n // via which can dynamically replace the prototype function reference)\r\n (dynProtoProxy as any)[DynProxyTag] = 1;\r\n return dynProtoProxy;\r\n }\r\n \r\n if (!_isObjectOrArrayPrototype(proto)) {\r\n let instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};\r\n let instFuncs = instFuncTable[className] = (instFuncTable[className] || {}); // fetch and assign if as it may not exist yet\r\n\r\n // Set whether we are allow to lookup instances, if someone has set to false then do not re-enable\r\n if (instFuncTable[DynAllowInstChkTag] !== false) {\r\n instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;\r\n }\r\n\r\n _forEachProp(target, (name) => {\r\n // Only add overridden functions\r\n if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name] ) {\r\n // Save the instance Function to the lookup table and remove it from the instance as it's not a dynamic proto function\r\n instFuncs[name] = target[name];\r\n delete target[name];\r\n \r\n // Add a dynamic proto if one doesn't exist or if a prototype function exists and it's not a dynamic one\r\n if (!objHasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {\r\n proto[name] = _createDynamicPrototype(proto, name);\r\n }\r\n }\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Checks whether the passed prototype object appears to be correct by walking the prototype hierarchy of the instance\r\n * @param classProto The class prototype instance\r\n * @param thisTarget The current instance that will be checked whether the passed prototype instance is in the hierarchy\r\n * @ignore\r\n */\r\nfunction _checkPrototype(classProto:any, thisTarget:any) {\r\n // This method doesn't existing in older browsers (e.g. IE8)\r\n if (_objGetPrototypeOf) {\r\n // As this is primarily a coding time check, don't bother checking if running in IE8 or lower\r\n let visited:any[] = [];\r\n let thisProto = _getObjProto(thisTarget);\r\n while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {\r\n if (thisProto === classProto) {\r\n return true;\r\n }\r\n\r\n // This avoids the caller from needing to check whether it's direct base class implements the function or not\r\n // by walking the entire chain it simplifies the usage and issues from upgrading any of the base classes.\r\n visited.push(thisProto);\r\n thisProto = _getObjProto(thisProto);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n // If objGetPrototypeOf doesn't exist then just assume everything is ok.\r\n return true;\r\n}\r\n\r\n/**\r\n * Gets the current prototype name using the ES6 name if available otherwise falling back to a use unknown as the name.\r\n * It's not critical for this to return a name, it's used to decorate the generated unique name for easier debugging only.\r\n * @param target \r\n * @param unknownValue \r\n * @ignore\r\n */\r\nfunction _getObjName(target:any, unknownValue?:string) {\r\n if (objHasOwnProperty(target, Prototype)) {\r\n // Look like a prototype\r\n return target.name || unknownValue || UnknownValue\r\n }\r\n\r\n return (((target || {})[Constructor]) || {}).name || unknownValue || UnknownValue;\r\n}\r\n\r\n/**\r\n * Interface to define additional configuration options to control how the dynamic prototype functions operate.\r\n */\r\nexport interface IDynamicProtoOpts {\r\n\r\n /**\r\n * Should the dynamic prototype attempt to set an instance function for instances that do not already have an\r\n * function of the same name or have been extended by a class with a (non-dynamic proto) prototype function.\r\n */\r\n setInstFuncs: boolean,\r\n\r\n /**\r\n * When looking for base (super) functions if it finds a dynamic proto instances can it use the instance functions\r\n * and bypass the prototype lookups. Defaults to true.\r\n */\r\n useBaseInst?: boolean\r\n}\r\n\r\n/**\r\n * The delegate signature for the function used as the callback for dynamicProto() \r\n * @typeparam DPType This is the generic type of the class, used to keep intellisense valid for the proxy instance, even \r\n * though it is only a proxy that only contains the functions \r\n * @param theTarget This is the real \"this\" of the current target object\r\n * @param baseFuncProxy The is a proxy object which ONLY contains this function that existed on the \"this\" instance before\r\n * calling dynamicProto, it does NOT contain properties of this. This is basically equivalent to using the \"super\" keyword.\r\n */\r\nexport type DynamicProtoDelegate = (theTarget:DPType, baseFuncProxy?:DPType) => void;\r\n\r\n/**\r\n * Helper function when creating dynamic (inline) functions for classes, this helper performs the following tasks :-\r\n * - Saves references to all defined base class functions\r\n * - Calls the delegateFunc with the current target (this) and a base object reference that can be used to call all \"super\" functions.\r\n * - Will populate the class prototype for all overridden functions to support class extension that call the prototype instance.\r\n * Callers should use this helper when declaring all function within the constructor of a class, as mentioned above the delegateFunc is \r\n * passed both the target \"this\" and an object that can be used to call any base (super) functions, using this based object in place of\r\n * super.XXX() (which gets expanded to _super.prototype.XXX()) provides a better minification outcome and also ensures the correct \"this\"\r\n * context is maintained as TypeScript creates incorrect references using super.XXXX() for dynamically defined functions i.e. Functions\r\n * defined in the constructor or some other function (rather than declared as complete typescript functions).\r\n * ### Usage\r\n * ```typescript\r\n * import dynamicProto from \"@microsoft/dynamicproto-js\";\r\n * class ExampleClass extends BaseClass {\r\n * constructor() {\r\n * dynamicProto(ExampleClass, this, (_self, base) => {\r\n * // This will define a function that will be converted to a prototype function\r\n * _self.newFunc = () => {\r\n * // Access any \"this\" instance property \r\n * if (_self.someProperty) {\r\n * ...\r\n * }\r\n * }\r\n * // This will define a function that will be converted to a prototype function\r\n * _self.myFunction = () => {\r\n * // Access any \"this\" instance property\r\n * if (_self.someProperty) {\r\n * // Call the base version of the function that we are overriding\r\n * base.myFunction();\r\n * }\r\n * ...\r\n * }\r\n * _self.initialize = () => {\r\n * ...\r\n * }\r\n * // Warnings: While the following will work as _self is simply a reference to\r\n * // this, if anyone overrides myFunction() the overridden will be called first\r\n * // as the normal JavaScript method resolution will occur and the defined\r\n * // _self.initialize() function is actually gets removed from the instance and\r\n * // a proxy prototype version is created to reference the created method.\r\n * _self.initialize();\r\n * });\r\n * }\r\n * }\r\n * ```\r\n * @typeparam DPType This is the generic type of the class, used to keep intellisense valid\r\n * @typeparam DPCls The type that contains the prototype of the current class\r\n * @param theClass - This is the current class instance which contains the prototype for the current class\r\n * @param target - The current \"this\" (target) reference, when the class has been extended this.prototype will not be the 'theClass' value.\r\n * @param delegateFunc - The callback function (closure) that will create the dynamic function\r\n * @param options - Additional options to configure how the dynamic prototype operates\r\n */\r\nexport default function dynamicProto(theClass:DPCls, target:DPType, delegateFunc: DynamicProtoDelegate, options?:IDynamicProtoOpts): void {\r\n // Make sure that the passed theClass argument looks correct\r\n if (!objHasOwnProperty(theClass, Prototype)) {\r\n _throwTypeError(\"theClass is an invalid class definition.\");\r\n }\r\n\r\n // Quick check to make sure that the passed theClass argument looks correct (this is a common copy/paste error)\r\n let classProto = theClass[Prototype];\r\n if (!_checkPrototype(classProto, target)) {\r\n _throwTypeError(\"[\" + _getObjName(theClass) + \"] not in hierarchy of [\" + _getObjName(target) + \"]\");\r\n }\r\n\r\n let className = null;\r\n if (objHasOwnProperty(classProto, DynClassName)) {\r\n // Only grab the class name if it's defined on this prototype (i.e. don't walk the prototype chain)\r\n className = classProto[DynClassName];\r\n } else {\r\n // As not all browser support name on the prototype creating a unique dynamic one if we have not already\r\n // assigned one, so we can use a simple string as the lookup rather than an object for the dynamic instance\r\n // function table lookup.\r\n className = DynClassNamePrefix + _getObjName(theClass, \"_\") + \"$\" + _gblInst.n ;\r\n _gblInst.n++;\r\n classProto[DynClassName] = className;\r\n }\r\n\r\n let perfOptions = dynamicProto[DynProtoDefaultOptions];\r\n let useBaseInst = !!perfOptions[strUseBaseInst];\r\n if (useBaseInst && options && options[strUseBaseInst] !== undefined) {\r\n useBaseInst = !!options[strUseBaseInst];\r\n }\r\n\r\n // Get the current instance functions\r\n let instFuncs = _getInstanceFuncs(target);\r\n\r\n // Get all of the functions for any base instance (before they are potentially overridden)\r\n let baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);\r\n\r\n // Execute the delegate passing in both the current target \"this\" and \"base\" function references\r\n // Note casting the same type as we don't actually have the base class here and this will provide some intellisense support\r\n delegateFunc(target, baseFuncs as DPType);\r\n\r\n // Don't allow setting instance functions for older IE instances\r\n let setInstanceFunc = !!_objGetPrototypeOf && !!perfOptions[strSetInstFuncs];\r\n if (setInstanceFunc && options) {\r\n setInstanceFunc = !!options[strSetInstFuncs];\r\n }\r\n\r\n // Populate the Prototype for any overridden instance functions\r\n _populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);\r\n}\r\n\r\n/**\r\n * Exposes the default global options to allow global configuration, if the global values are disabled these will override\r\n * any passed values. This is primarily exposed to support unit-testing without the need for individual classes to expose\r\n * their internal usage of dynamic proto.\r\n */\r\ndynamicProto[DynProtoDefaultOptions] = _gblInst.o;\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { NULL_VALUE, UNDEF_VALUE } from \"../internal/constants\";\r\nimport { _getGlobalValue } from \"../internal/global\";\r\nimport { safeGetLazy } from \"./safe_lazy\";\r\nimport { _globalLazyTestHooks } from \"./lazy\";\r\nvar WINDOW = \"window\";\r\nvar _cachedGlobal;\r\nvar _cachedWindow;\r\nvar _cachedDocument;\r\nvar _cachedNavigator;\r\nvar _cachedHistory;\r\nvar _isWebWorker;\r\nvar _isNode;\r\n/**\r\n * Create and return an readonly {@link ILazyValue} instance which will cache and return the named global\r\n * value if available, will return `null` if the named global object is not available or if the runtime\r\n * throws an exception when attempting to access the global object.\r\n * Unlike {@link getInst} the value is cached after the first access, so if the global value changes after\r\n * the initial fetch the original cached value is still returned.\r\n * @since 0.9.5\r\n * @group Environment\r\n * @group Lazy\r\n * @group Safe\r\n * @param name The name of the global object to get.\r\n * @returns A new readonly {@link ILazyValue} instance which will lazily attempt to return the globally\r\n * available named instance.\r\n * @example\r\n * ```ts\r\n * // This does not cause the evaluation to occur\r\n * window.myGlobal = \"Hello\";\r\n * let cachedValue = lazySafeGetInst(\"myGlobal\");\r\n * // cachedValue.v === \"Hello\"\r\n *\r\n * window.myGlobal = \"Darkness\";\r\n * // cachedValue.v === \"Hello\"\r\n *\r\n * let promiseCls = lazySafeGetInst(\"Promise\");\r\n * // null if Promise is not supported in the runtime\r\n * // otherwise the Promise class.\r\n * ```\r\n */\r\nexport var lazySafeGetInst = function (name) { return safeGetLazy(function () { return getInst(name) || UNDEF_VALUE; }, UNDEF_VALUE); };\r\n/**\r\n * Returns the current global scope object, for a normal web page this will be the current\r\n * window, for a Web Worker this will be current worker global scope via \"self\". The internal\r\n * implementation returns the first available instance object in the following order\r\n * - globalThis (New standard)\r\n * - self (Will return the current window instance for supported browsers)\r\n * - window (fallback for older browser implementations)\r\n * - global (NodeJS standard)\r\n * - (When all else fails)\r\n * While the return type is a Window for the normal case, not all environments will support all\r\n * of the properties or functions. And this caches the lookup of the global as in some environments\r\n * this can be an expensive operation.\r\n * @group Environment\r\n * @param useCached - [Optional] used for testing to bypass the cached lookup, when `true` this will\r\n * cause the cached global to be reset.\r\n */\r\nexport var getGlobal = function (useCached) {\r\n (!_cachedGlobal || useCached === false || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedGlobal.b)) && (_cachedGlobal = safeGetLazy(_getGlobalValue, NULL_VALUE));\r\n return _cachedGlobal.v;\r\n};\r\n/**\r\n * Return the named global object if available, will return null if the object is not available.\r\n * @group Environment\r\n * @param name The globally named object\r\n * @param useCached - [Optional] used for testing to bypass the cached lookup, when `true` this will\r\n * cause the cached global to be reset.\r\n * @example\r\n * ```ts\r\n * // This does not cause the evaluation to occur\r\n * window.myGlobal = \"Hello\";\r\n * let cachedValue = getInst(\"myGlobal\");\r\n * // cachedValue === \"Hello\"\r\n *\r\n * window.myGlobal = \"Darkness\";\r\n * // getInst(\"myGlobal\") === \"Darkness\"\r\n *\r\n * let promiseCls = getInst(\"Promise\");\r\n * // May throw if the global is not supported by the runtime\r\n * // otherwise the Promise class.\r\n * ```\r\n */\r\nexport var getInst = function (name, useCached) {\r\n var gbl = (!_cachedGlobal || useCached === false) ? getGlobal(useCached) : _cachedGlobal.v;\r\n if (gbl && gbl[name]) {\r\n return gbl[name];\r\n }\r\n // Test workaround, for environments where .window (when global == window) doesn't return the base window\r\n if (name === WINDOW && _cachedWindow) {\r\n // tslint:disable-next-line: no-angle-bracket-type-assertion\r\n return _cachedWindow.v;\r\n }\r\n return NULL_VALUE;\r\n};\r\n/**\r\n * Identify whether the runtime contains a `document` object\r\n * @group Environment\r\n * @returns - True if a `document` exists\r\n */\r\nexport var hasDocument = function () { return !!getDocument(); };\r\n/**\r\n * Return the global `document` instance.\r\n * @group Environment\r\n * @returns\r\n */\r\nexport var getDocument = function () {\r\n (!_cachedDocument || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedDocument.b)) && (_cachedDocument = lazySafeGetInst(\"document\"));\r\n return _cachedDocument.v;\r\n};\r\n/**\r\n * Identify whether the runtime contains a `window` object\r\n * @group Environment\r\n * @returns\r\n */\r\nexport var hasWindow = function () { return !!getWindow(); };\r\n/**\r\n * Return the global `window` instance.\r\n * @group Environment\r\n * @returns\r\n */\r\nexport var getWindow = function () {\r\n (!_cachedWindow || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedWindow.b)) && (_cachedWindow = lazySafeGetInst(WINDOW));\r\n return _cachedWindow.v;\r\n};\r\n/**\r\n * Identify whether the runtimne contains a `navigator` object\r\n * @group Environment\r\n * @returns\r\n */\r\nexport var hasNavigator = function () { return !!getNavigator(); };\r\n/**\r\n * Returns the global `navigator` instance\r\n * @group Environment\r\n * @returns\r\n */\r\nexport var getNavigator = function () {\r\n (!_cachedNavigator || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedNavigator.b)) && (_cachedNavigator = lazySafeGetInst(\"navigator\"));\r\n return _cachedNavigator.v;\r\n};\r\n/**\r\n * Identifies whether the runtime contains a `history` object\r\n * @group Environment\r\n * @returns\r\n */\r\nexport var hasHistory = function () { return !!getHistory(); };\r\n/**\r\n * Returns the global `history` instance\r\n * @group Environment\r\n * @returns\r\n */\r\nexport var getHistory = function () {\r\n (!_cachedHistory || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedHistory.b)) && (_cachedHistory = lazySafeGetInst(\"history\"));\r\n return _cachedHistory.v;\r\n};\r\n/**\r\n * Simple method to determine if we are running in a node environment\r\n * @group Environment\r\n * @returns True if you are\r\n */\r\nexport var isNode = function () {\r\n !_isNode && (_isNode = safeGetLazy(function () { return !!(process && (process.versions || {}).node); }, false));\r\n return _isNode.v;\r\n};\r\n/**\r\n * Helper to identify if you are running as a Dedicated, Shared or Service worker\r\n * @group Environment\r\n * @returns True if the environment you are in looks like a Web Worker\r\n */\r\nexport var isWebWorker = function () {\r\n !_isWebWorker && (_isWebWorker = safeGetLazy(function () { return !!(self && self instanceof WorkerGlobalScope); }, false));\r\n return _isWebWorker.v;\r\n};\r\n//# sourceMappingURL=environment.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { NULL_VALUE, UNDEF_VALUE } from \"../internal/constants\";\r\nimport { _getGlobalValue } from \"../internal/global\";\r\nimport { safeGetLazy } from \"./safe_lazy\";\r\nimport { ILazyValue, _globalLazyTestHooks } from \"./lazy\";\r\n\r\nconst WINDOW = \"window\";\r\n\r\ndeclare let WorkerGlobalScope: any;\r\ndeclare let self: any;\r\n\r\nlet _cachedGlobal: ILazyValue;\r\n\r\nlet _cachedWindow: ILazyValue;\r\nlet _cachedDocument: ILazyValue;\r\nlet _cachedNavigator: ILazyValue;\r\nlet _cachedHistory: ILazyValue;\r\nlet _isWebWorker: ILazyValue;\r\nlet _isNode: ILazyValue;\r\n\r\n/**\r\n * Create and return an readonly {@link ILazyValue} instance which will cache and return the named global\r\n * value if available, will return `null` if the named global object is not available or if the runtime\r\n * throws an exception when attempting to access the global object.\r\n * Unlike {@link getInst} the value is cached after the first access, so if the global value changes after\r\n * the initial fetch the original cached value is still returned.\r\n * @since 0.9.5\r\n * @group Environment\r\n * @group Lazy\r\n * @group Safe\r\n * @param name The name of the global object to get.\r\n * @returns A new readonly {@link ILazyValue} instance which will lazily attempt to return the globally\r\n * available named instance.\r\n * @example\r\n * ```ts\r\n * // This does not cause the evaluation to occur\r\n * window.myGlobal = \"Hello\";\r\n * let cachedValue = lazySafeGetInst(\"myGlobal\");\r\n * // cachedValue.v === \"Hello\"\r\n *\r\n * window.myGlobal = \"Darkness\";\r\n * // cachedValue.v === \"Hello\"\r\n *\r\n * let promiseCls = lazySafeGetInst(\"Promise\");\r\n * // null if Promise is not supported in the runtime\r\n * // otherwise the Promise class.\r\n * ```\r\n */\r\nexport const lazySafeGetInst = (name: string) : ILazyValue => safeGetLazy(() => getInst(name) || UNDEF_VALUE, UNDEF_VALUE);\r\n\r\n/**\r\n * Returns the current global scope object, for a normal web page this will be the current\r\n * window, for a Web Worker this will be current worker global scope via \"self\". The internal\r\n * implementation returns the first available instance object in the following order\r\n * - globalThis (New standard)\r\n * - self (Will return the current window instance for supported browsers)\r\n * - window (fallback for older browser implementations)\r\n * - global (NodeJS standard)\r\n * - (When all else fails)\r\n * While the return type is a Window for the normal case, not all environments will support all\r\n * of the properties or functions. And this caches the lookup of the global as in some environments\r\n * this can be an expensive operation.\r\n * @group Environment\r\n * @param useCached - [Optional] used for testing to bypass the cached lookup, when `true` this will\r\n * cause the cached global to be reset.\r\n */\r\nexport const getGlobal = (useCached?: boolean): Window => {\r\n (!_cachedGlobal || useCached === false || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedGlobal.b)) && (_cachedGlobal = safeGetLazy(_getGlobalValue, NULL_VALUE));\r\n\r\n return _cachedGlobal.v;\r\n};\r\n\r\n/**\r\n * Return the named global object if available, will return null if the object is not available.\r\n * @group Environment\r\n * @param name The globally named object\r\n * @param useCached - [Optional] used for testing to bypass the cached lookup, when `true` this will\r\n * cause the cached global to be reset.\r\n * @example\r\n * ```ts\r\n * // This does not cause the evaluation to occur\r\n * window.myGlobal = \"Hello\";\r\n * let cachedValue = getInst(\"myGlobal\");\r\n * // cachedValue === \"Hello\"\r\n *\r\n * window.myGlobal = \"Darkness\";\r\n * // getInst(\"myGlobal\") === \"Darkness\"\r\n *\r\n * let promiseCls = getInst(\"Promise\");\r\n * // May throw if the global is not supported by the runtime\r\n * // otherwise the Promise class.\r\n * ```\r\n */\r\nexport const getInst = (name: string, useCached?: boolean): T => {\r\n const gbl = (!_cachedGlobal || useCached === false) ? getGlobal(useCached) : _cachedGlobal.v;\r\n if (gbl && gbl[name]) {\r\n return gbl[name] as T;\r\n }\r\n\r\n // Test workaround, for environments where .window (when global == window) doesn't return the base window\r\n if (name === WINDOW && _cachedWindow) {\r\n // tslint:disable-next-line: no-angle-bracket-type-assertion\r\n return _cachedWindow.v as T;\r\n }\r\n\r\n return NULL_VALUE;\r\n};\r\n\r\n/**\r\n * Identify whether the runtime contains a `document` object\r\n * @group Environment\r\n * @returns - True if a `document` exists\r\n */\r\nexport const hasDocument = (): boolean => !!getDocument();\r\n\r\n/**\r\n * Return the global `document` instance.\r\n * @group Environment\r\n * @returns\r\n */\r\nexport const getDocument = (): Document => {\r\n (!_cachedDocument || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedDocument.b)) && (_cachedDocument = lazySafeGetInst(\"document\"));\r\n\r\n return _cachedDocument.v;\r\n};\r\n\r\n/**\r\n * Identify whether the runtime contains a `window` object\r\n * @group Environment\r\n * @returns\r\n */\r\nexport const hasWindow = (): boolean => !!getWindow();\r\n\r\n/**\r\n * Return the global `window` instance.\r\n * @group Environment\r\n * @returns\r\n */\r\nexport const getWindow = (): Window => {\r\n (!_cachedWindow || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedWindow.b)) && (_cachedWindow = lazySafeGetInst(WINDOW));\r\n\r\n return _cachedWindow.v;\r\n};\r\n\r\n/**\r\n * Identify whether the runtimne contains a `navigator` object\r\n * @group Environment\r\n * @returns\r\n */\r\nexport const hasNavigator = (): boolean => !!getNavigator();\r\n\r\n/**\r\n * Returns the global `navigator` instance\r\n * @group Environment\r\n * @returns\r\n */\r\nexport const getNavigator = (): Navigator => {\r\n (!_cachedNavigator || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedNavigator.b)) && (_cachedNavigator = lazySafeGetInst(\"navigator\"));\r\n\r\n return _cachedNavigator.v;\r\n}\r\n\r\n/**\r\n * Identifies whether the runtime contains a `history` object\r\n * @group Environment\r\n * @returns\r\n */\r\nexport const hasHistory = (): boolean => !!getHistory();\r\n\r\n/**\r\n * Returns the global `history` instance\r\n * @group Environment\r\n * @returns\r\n */\r\nexport const getHistory = (): History | null => {\r\n (!_cachedHistory || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedHistory.b)) && (_cachedHistory = lazySafeGetInst(\"history\"));\r\n\r\n return _cachedHistory.v;\r\n};\r\n\r\n/**\r\n * Simple method to determine if we are running in a node environment\r\n * @group Environment\r\n * @returns True if you are\r\n */\r\nexport const isNode = (): boolean => {\r\n !_isNode && (_isNode = safeGetLazy(() => !!(process && (process.versions||{}).node), false))\r\n\r\n return _isNode.v;\r\n};\r\n\r\n/**\r\n * Helper to identify if you are running as a Dedicated, Shared or Service worker\r\n * @group Environment\r\n * @returns True if the environment you are in looks like a Web Worker\r\n */\r\nexport const isWebWorker = (): boolean => {\r\n !_isWebWorker && (_isWebWorker = safeGetLazy(() => !!(self && self instanceof WorkerGlobalScope), false));\r\n\r\n return _isWebWorker.v;\r\n};\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n// These constants are currently NOT exported directly, we may export them later associated with a frozen namespace (maybe)\r\n// For now do NOT expect that we will export these values.\r\nexport var UNDEF_VALUE = undefined;\r\nexport var NULL_VALUE = null;\r\nexport var EMPTY = \"\";\r\nexport var BOOLEAN = \"boolean\";\r\nexport var FUNCTION = \"function\";\r\nexport var NUMBER = \"number\";\r\nexport var OBJECT = \"object\";\r\nexport var PROTOTYPE = \"prototype\";\r\nexport var __PROTO__ = \"__proto__\";\r\nexport var STRING = \"string\";\r\nexport var UNDEFINED = \"undefined\";\r\nexport var CONSTRUCTOR = \"constructor\";\r\nexport var SYMBOL = \"Symbol\";\r\nexport var POLYFILL_TAG = \"_polyfill\";\r\nexport var INDEX_OF = \"indexOf\";\r\nexport var LAST_INDEX_OF = \"lastIndexOf\";\r\nexport var LENGTH = \"length\";\r\nexport var DONE = \"done\";\r\nexport var VALUE = \"value\";\r\nexport var NAME = \"name\";\r\nexport var SLICE = \"slice\";\r\n/**\r\n * @ignore\r\n */\r\nexport var ObjClass = Object;\r\n/**\r\n * @ignore\r\n */\r\nexport var ObjProto = ObjClass[PROTOTYPE];\r\n/**\r\n * @ignore\r\n */\r\nexport var StrCls = String;\r\n/**\r\n * @ignore\r\n */\r\nexport var StrProto = StrCls[PROTOTYPE];\r\n/**\r\n * @ignore\r\n */\r\nexport var MathCls = Math;\r\n/**\r\n * @ignore\r\n */\r\nexport var ArrCls = Array;\r\n/**\r\n * @ignore\r\n */\r\nexport var ArrProto = ArrCls[PROTOTYPE];\r\n//# sourceMappingURL=constants.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\n// These constants are currently NOT exported directly, we may export them later associated with a frozen namespace (maybe)\r\n// For now do NOT expect that we will export these values.\r\n\r\nexport const UNDEF_VALUE: undefined = undefined;\r\nexport const NULL_VALUE: null = null;\r\n\r\nexport const EMPTY = \"\";\r\nexport const BOOLEAN = \"boolean\";\r\nexport const FUNCTION = \"function\";\r\nexport const NUMBER = \"number\";\r\nexport const OBJECT = \"object\";\r\nexport const PROTOTYPE = \"prototype\";\r\nexport const __PROTO__ = \"__proto__\";\r\nexport const STRING = \"string\";\r\nexport const UNDEFINED = \"undefined\";\r\nexport const CONSTRUCTOR = \"constructor\";\r\nexport const SYMBOL = \"Symbol\";\r\nexport const POLYFILL_TAG = \"_polyfill\";\r\nexport const INDEX_OF = \"indexOf\";\r\nexport const LAST_INDEX_OF = \"lastIndexOf\";\r\nexport const LENGTH = \"length\";\r\nexport const DONE = \"done\";\r\nexport const VALUE = \"value\";\r\nexport const NAME = \"name\";\r\nexport const SLICE = \"slice\";\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const ObjClass = Object;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const ObjProto = ObjClass[PROTOTYPE];\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const StrCls = String;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const StrProto = StrCls[PROTOTYPE];\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const MathCls = Math;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const ArrCls = Array;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const ArrProto = ArrCls[PROTOTYPE];","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { UNDEFINED } from \"./constants\";\r\nvar GLOBAL_CONFIG_KEY = \"__tsUtils$gblCfg\";\r\nvar _globalCfg;\r\n/**\r\n * @internal\r\n * @ignore\r\n * Helper to get the current global value\r\n * @returns\r\n */\r\nexport function _getGlobalValue() {\r\n var result;\r\n if (typeof globalThis !== UNDEFINED) {\r\n result = globalThis;\r\n }\r\n if (!result && typeof self !== UNDEFINED) {\r\n result = self;\r\n }\r\n if (!result && typeof window !== UNDEFINED) {\r\n result = window;\r\n }\r\n if (!result && typeof global !== UNDEFINED) {\r\n result = global;\r\n }\r\n return result;\r\n}\r\n/**\r\n * @internal\r\n * @ignore\r\n * Gets/Sets the named value from the global config store, this is used to share configuration across\r\n * multiple modules. Primarily used for poly symbol and test hooks.\r\n * @returns The globally registered value.\r\n */\r\nexport function _getGlobalConfig() {\r\n if (!_globalCfg) {\r\n var gbl = _getGlobalValue() || {};\r\n _globalCfg = gbl[GLOBAL_CONFIG_KEY] = gbl[GLOBAL_CONFIG_KEY] || {};\r\n }\r\n return _globalCfg;\r\n}\r\n//# sourceMappingURL=global.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { UNDEFINED } from \"./constants\";\r\n\r\nconst GLOBAL_CONFIG_KEY = \"__tsUtils$gblCfg\";\r\n\r\ndeclare let globalThis: Window;\r\ndeclare let global: Window;\r\ndeclare let self: any;\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal interface for holding the global polyfill symbols\r\n */\r\nexport interface _GlobalPolySymbols {\r\n k: { [key: string ]: symbol },\r\n s: { [sym: symbol ]: string },\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal interface for defining global test hooks\r\n */\r\nexport interface _GlobalTestHooks {\r\n lzy?: boolean;\r\n}\r\n\r\nexport interface TsUtilsGlobalConfig extends _GlobalTestHooks {\r\n gblSym?: _GlobalPolySymbols,\r\n}\r\n\r\nlet _globalCfg: { [key: string ]: any };\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Helper to get the current global value\r\n * @returns\r\n */\r\nexport function _getGlobalValue(): Window {\r\n let result: Window;\r\n if (typeof globalThis !== UNDEFINED) {\r\n result = globalThis;\r\n }\r\n\r\n if (!result && typeof self !== UNDEFINED) {\r\n result = self;\r\n }\r\n\r\n if (!result && typeof window !== UNDEFINED) {\r\n result = window;\r\n }\r\n\r\n if (!result && typeof global !== UNDEFINED) {\r\n result = global;\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Gets/Sets the named value from the global config store, this is used to share configuration across\r\n * multiple modules. Primarily used for poly symbol and test hooks.\r\n * @returns The globally registered value.\r\n */\r\nexport function _getGlobalConfig(): TsUtilsGlobalConfig {\r\n if (!_globalCfg) {\r\n let gbl = _getGlobalValue() || {};\r\n _globalCfg = gbl[GLOBAL_CONFIG_KEY] = gbl[GLOBAL_CONFIG_KEY] || {};\r\n }\r\n\r\n return _globalCfg;\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { getLazy } from \"./lazy\";\r\nimport { safeGet } from \"./safe_get\";\r\n/**\r\n * Create and return an readonly {@link ILazyValue} instance which will cache and return the value returned\r\n * by the callback function. The callback function will only be called once, multiple access of the value\r\n * does not cause re-execution of the callback as the result from the first call is cached internally.\r\n * If the callback throws the default value will be returned.\r\n * @since 0.9.5\r\n * @group Lazy\r\n * @group Safe\r\n * @param cb - The callback function to fetch the value to be lazily evaluated and cached\r\n * @param defValue - The default value to return when an exception is thrown\r\n * @returns A new readonly {@link ILazyValue} instance which wraps the callback and will be used to cache\r\n * the result of the callback\r\n * @example\r\n * ```ts\r\n * // This does not cause the evaluation to occur\r\n * let cachedValue = safeGetLazy(() => callSomeExpensiveFunctionWhichMightThrow(), \"someDefaultValue\");\r\n * let theValue;\r\n *\r\n * // Just checking if there is an object still does not cause the evaluation\r\n * if (cachedValue) {\r\n * // This will cause the evaluation to occur and the result will be cached\r\n * theValue = cachedValue.v;\r\n * }\r\n *\r\n * // Accessing the value again will not cause the re-evaluation to occur, it will just return the same\r\n * // result value again.\r\n * theValue === cachedValue.v; // true\r\n *\r\n * ```\r\n */\r\nexport function safeGetLazy(cb, defValue) {\r\n return getLazy(function () { return safeGet(cb, defValue); });\r\n}\r\n//# sourceMappingURL=safe_lazy.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { getLazy, ILazyValue } from \"./lazy\";\r\nimport { safeGet } from \"./safe_get\";\r\n\r\n/**\r\n * Create and return an readonly {@link ILazyValue} instance which will cache and return the value returned\r\n * by the callback function. The callback function will only be called once, multiple access of the value\r\n * does not cause re-execution of the callback as the result from the first call is cached internally.\r\n * If the callback throws the default value will be returned.\r\n * @since 0.9.5\r\n * @group Lazy\r\n * @group Safe\r\n * @param cb - The callback function to fetch the value to be lazily evaluated and cached\r\n * @param defValue - The default value to return when an exception is thrown\r\n * @returns A new readonly {@link ILazyValue} instance which wraps the callback and will be used to cache\r\n * the result of the callback\r\n * @example\r\n * ```ts\r\n * // This does not cause the evaluation to occur\r\n * let cachedValue = safeGetLazy(() => callSomeExpensiveFunctionWhichMightThrow(), \"someDefaultValue\");\r\n * let theValue;\r\n *\r\n * // Just checking if there is an object still does not cause the evaluation\r\n * if (cachedValue) {\r\n * // This will cause the evaluation to occur and the result will be cached\r\n * theValue = cachedValue.v;\r\n * }\r\n *\r\n * // Accessing the value again will not cause the re-evaluation to occur, it will just return the same\r\n * // result value again.\r\n * theValue === cachedValue.v; // true\r\n *\r\n * ```\r\n */\r\nexport function safeGetLazy(cb: () => T, defValue: T): ILazyValue {\r\n return getLazy(() => safeGet(cb, defValue));\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { NULL_VALUE } from \"../internal/constants\";\r\nimport { _getGlobalConfig } from \"../internal/global\";\r\nimport { objDefineProp } from \"../object/define\";\r\n/**\r\n * @internal\r\n * Internal flag which is set by the public {@link setBypassLazyCache}, should not be externally exported\r\n */\r\nexport var _globalLazyTestHooks;\r\nvar _fetchLazyTestHooks = function () {\r\n _globalLazyTestHooks = _getGlobalConfig();\r\n _fetchLazyTestHooks = NULL_VALUE;\r\n};\r\n/**\r\n * Create and return an readonly {@link ILazyValue} instance which will cache and return the value returned\r\n * by the callback function. The callback function will only be called once, multiple access of the value\r\n * does not cause re-execution of the callback as the result from the first call is cached internally.\r\n * @since 0.4.5\r\n * @group Lazy\r\n * @param cb - The callback function to fetch the value to be lazily evaluated and cached\r\n * @returns A new readonly {@link ILazyValue} instance which wraps the callback and will be used to cache\r\n * the result of the callback\r\n * @example\r\n * ```ts\r\n * // This does not cause the evaluation to occur\r\n * let cachedValue = getLazy(() => callSomeExpensiveFunction());\r\n * let theValue;\r\n *\r\n * // Just checking if there is an object still does not cause the evaluation\r\n * if (cachedValue) {\r\n * // This will cause the evaluation to occur and the result will be cached\r\n * theValue = cachedValue.v;\r\n * }\r\n *\r\n * // Accessing the value again will not cause the re-evaluation to occur, it will just return the same\r\n * // result value again.\r\n * theValue === cachedValue.v; // true\r\n *\r\n * ```\r\n */\r\nexport function getLazy(cb) {\r\n var lazyValue = {};\r\n _fetchLazyTestHooks && _fetchLazyTestHooks();\r\n lazyValue.b = _globalLazyTestHooks.lzy;\r\n objDefineProp(lazyValue, \"v\", {\r\n configurable: true,\r\n get: function () {\r\n var result = cb();\r\n if (!_globalLazyTestHooks.lzy) {\r\n // Just replace the value\r\n objDefineProp(lazyValue, \"v\", {\r\n value: result\r\n });\r\n if (lazyValue.b) {\r\n delete lazyValue.b;\r\n }\r\n }\r\n if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {\r\n lazyValue.b = _globalLazyTestHooks.lzy;\r\n }\r\n return result;\r\n }\r\n });\r\n return lazyValue;\r\n}\r\n/**\r\n * Test Hook function used to cause the internal caching of objects to be bypassed, this should never\r\n * be enabled for production as it has additional performance impact caused by the repetitive creation\r\n * of the lazy wrappers.\r\n * @group Lazy\r\n * @since 0.5.0\r\n * @param newValue - When `true` will cause all new lazy implementations to bypass the cached lookup.\r\n */\r\nexport function setBypassLazyCache(newValue) {\r\n _fetchLazyTestHooks && _fetchLazyTestHooks();\r\n _globalLazyTestHooks.lzy = newValue;\r\n}\r\n/**\r\n * Create and return a writable {@link ILazyValue} instance which will cache and return the value returned\r\n * by the callback function. The callback function will only be called once, multiple access of the value\r\n * does not cause re-execution of the callback as the result from the first call is cached internally. The\r\n * value may be set as many times as required, if the callback has not been called when you set the value\r\n * it will never get called.\r\n * @since 0.9.4\r\n * @group Lazy\r\n * @param cb - The callback function to fetch the value to be lazily evaluated and cached\r\n * @returns A new writable {@link ILazyValue} instance which wraps the callback and will be used to cache\r\n * the result of the callback\r\n * @example\r\n * ```ts\r\n * // This does not cause the evaluation to occur\r\n * let cachedValue = getWritableLazy(() => callSomeExpensiveFunction());\r\n * let theValue;\r\n *\r\n * // Just checking if there is an object still does not cause the evaluation\r\n * if (cachedValue) {\r\n * // This will cause the evaluation to occur and the result will be cached\r\n * theValue = cachedValue.v;\r\n * }\r\n *\r\n * // Accessing the value again will not cause the re-evaluation to occur, it will just return the same\r\n * // result value again.\r\n * theValue === cachedValue.v; // true\r\n *\r\n * // Setting the value\r\n * let cachedValue = getWritableLazy(() => callSomeExpensiveFunction());\r\n * let theValue = \"new Value\";\r\n *\r\n * // Just checking if there is an object still does not cause the evaluation\r\n * if (cachedValue) {\r\n * // This will set the value to be set explicitly and the callback\r\n * // will now never occur and the result will be cached\r\n * cachedValue.v = theValue;\r\n * }\r\n *\r\n * // Accessing the value again will cause the previously set value to be returned.\r\n * theValue === cachedValue.v; // true\r\n * ```\r\n */\r\nexport function getWritableLazy(cb) {\r\n var lazyValue = {};\r\n _fetchLazyTestHooks && _fetchLazyTestHooks();\r\n lazyValue.b = _globalLazyTestHooks.lzy;\r\n var _setValue = function (newValue) {\r\n // Just replace the value\r\n objDefineProp(lazyValue, \"v\", {\r\n value: newValue,\r\n writable: true\r\n });\r\n if (lazyValue.b) {\r\n delete lazyValue.b;\r\n }\r\n };\r\n objDefineProp(lazyValue, \"v\", {\r\n configurable: true,\r\n get: function () {\r\n var result = cb();\r\n if (!_globalLazyTestHooks.lzy) {\r\n // Just replace the value\r\n _setValue(result);\r\n }\r\n if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {\r\n lazyValue.b = _globalLazyTestHooks.lzy;\r\n }\r\n return result;\r\n },\r\n set: _setValue\r\n });\r\n return lazyValue;\r\n}\r\n//# sourceMappingURL=lazy.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { NULL_VALUE } from \"../internal/constants\";\r\nimport { _GlobalTestHooks, _getGlobalConfig } from \"../internal/global\";\r\nimport { objDefineProp } from \"../object/define\";\r\n\r\n/**\r\n * @internal\r\n * Internal flag which is set by the public {@link setBypassLazyCache}, should not be externally exported\r\n */\r\nexport let _globalLazyTestHooks: _GlobalTestHooks;\r\n\r\nlet _fetchLazyTestHooks = function() {\r\n _globalLazyTestHooks = _getGlobalConfig();\r\n _fetchLazyTestHooks = NULL_VALUE;\r\n}\r\n\r\n/**\r\n * Interface of the object returned by the {@link getLazy} instance\r\n * @since 0.4.5\r\n * @group Lazy\r\n */\r\nexport interface ILazyValue {\r\n /**\r\n * Returns the current cached value from the lazy lookup, if the callback function has not yet occurred\r\n * accessing the value will cause the lazy evaluation to occur and the result will be returned.\r\n */\r\n v: T,\r\n\r\n /**\r\n * Identifies if this instance is bypassing the internal caching mechanism which is used for testing\r\n */\r\n b?: boolean\r\n}\r\n\r\n/**\r\n * Create and return an readonly {@link ILazyValue} instance which will cache and return the value returned\r\n * by the callback function. The callback function will only be called once, multiple access of the value\r\n * does not cause re-execution of the callback as the result from the first call is cached internally.\r\n * @since 0.4.5\r\n * @group Lazy\r\n * @param cb - The callback function to fetch the value to be lazily evaluated and cached\r\n * @returns A new readonly {@link ILazyValue} instance which wraps the callback and will be used to cache\r\n * the result of the callback\r\n * @example\r\n * ```ts\r\n * // This does not cause the evaluation to occur\r\n * let cachedValue = getLazy(() => callSomeExpensiveFunction());\r\n * let theValue;\r\n *\r\n * // Just checking if there is an object still does not cause the evaluation\r\n * if (cachedValue) {\r\n * // This will cause the evaluation to occur and the result will be cached\r\n * theValue = cachedValue.v;\r\n * }\r\n *\r\n * // Accessing the value again will not cause the re-evaluation to occur, it will just return the same\r\n * // result value again.\r\n * theValue === cachedValue.v; // true\r\n *\r\n * ```\r\n */\r\nexport function getLazy(cb: () => T): ILazyValue {\r\n let lazyValue = { } as ILazyValue;\r\n _fetchLazyTestHooks && _fetchLazyTestHooks();\r\n lazyValue.b = _globalLazyTestHooks.lzy;\r\n\r\n objDefineProp(lazyValue, \"v\", {\r\n configurable: true,\r\n get: function () {\r\n let result = cb();\r\n if (!_globalLazyTestHooks.lzy) {\r\n // Just replace the value\r\n objDefineProp(lazyValue, \"v\", {\r\n value: result\r\n });\r\n\r\n if (lazyValue.b) {\r\n delete lazyValue.b;\r\n }\r\n }\r\n \r\n if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {\r\n lazyValue.b = _globalLazyTestHooks.lzy;\r\n }\r\n\r\n return result;\r\n }\r\n });\r\n\r\n return lazyValue;\r\n}\r\n\r\n/**\r\n * Test Hook function used to cause the internal caching of objects to be bypassed, this should never\r\n * be enabled for production as it has additional performance impact caused by the repetitive creation\r\n * of the lazy wrappers.\r\n * @group Lazy\r\n * @since 0.5.0\r\n * @param newValue - When `true` will cause all new lazy implementations to bypass the cached lookup.\r\n */\r\nexport function setBypassLazyCache(newValue: boolean) {\r\n _fetchLazyTestHooks && _fetchLazyTestHooks();\r\n _globalLazyTestHooks.lzy = newValue;\r\n}\r\n\r\n/**\r\n * Create and return a writable {@link ILazyValue} instance which will cache and return the value returned\r\n * by the callback function. The callback function will only be called once, multiple access of the value\r\n * does not cause re-execution of the callback as the result from the first call is cached internally. The\r\n * value may be set as many times as required, if the callback has not been called when you set the value\r\n * it will never get called.\r\n * @since 0.9.4\r\n * @group Lazy\r\n * @param cb - The callback function to fetch the value to be lazily evaluated and cached\r\n * @returns A new writable {@link ILazyValue} instance which wraps the callback and will be used to cache\r\n * the result of the callback\r\n * @example\r\n * ```ts\r\n * // This does not cause the evaluation to occur\r\n * let cachedValue = getWritableLazy(() => callSomeExpensiveFunction());\r\n * let theValue;\r\n *\r\n * // Just checking if there is an object still does not cause the evaluation\r\n * if (cachedValue) {\r\n * // This will cause the evaluation to occur and the result will be cached\r\n * theValue = cachedValue.v;\r\n * }\r\n *\r\n * // Accessing the value again will not cause the re-evaluation to occur, it will just return the same\r\n * // result value again.\r\n * theValue === cachedValue.v; // true\r\n *\r\n * // Setting the value\r\n * let cachedValue = getWritableLazy(() => callSomeExpensiveFunction());\r\n * let theValue = \"new Value\";\r\n *\r\n * // Just checking if there is an object still does not cause the evaluation\r\n * if (cachedValue) {\r\n * // This will set the value to be set explicitly and the callback\r\n * // will now never occur and the result will be cached\r\n * cachedValue.v = theValue;\r\n * }\r\n *\r\n * // Accessing the value again will cause the previously set value to be returned.\r\n * theValue === cachedValue.v; // true\r\n * ```\r\n */\r\nexport function getWritableLazy(cb: () => T): ILazyValue {\r\n let lazyValue = { } as ILazyValue;\r\n _fetchLazyTestHooks && _fetchLazyTestHooks();\r\n lazyValue.b = _globalLazyTestHooks.lzy;\r\n\r\n let _setValue = (newValue: T) => {\r\n // Just replace the value\r\n objDefineProp(lazyValue, \"v\", {\r\n value: newValue,\r\n writable: true\r\n });\r\n\r\n if (lazyValue.b) {\r\n delete lazyValue.b;\r\n }\r\n };\r\n\r\n objDefineProp(lazyValue, \"v\", {\r\n configurable: true,\r\n get: function () {\r\n let result = cb();\r\n if (!_globalLazyTestHooks.lzy) {\r\n // Just replace the value\r\n _setValue(result);\r\n }\r\n \r\n if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {\r\n lazyValue.b = _globalLazyTestHooks.lzy;\r\n }\r\n\r\n return result;\r\n },\r\n set: _setValue\r\n });\r\n\r\n return lazyValue;\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { ObjClass, VALUE } from \"../internal/constants\";\r\nimport { isFunction, isUndefined } from \"../helpers/base\";\r\nimport { objForEachKey } from \"./for_each_key\";\r\nimport { objGetOwnPropertyDescriptor } from \"./get_own_prop_desc\";\r\n/**\r\n * @internal\r\n * @ignore\r\n * Mapping from ObjDefinePropDescriptor key to PropertyDescriptor key\r\n */\r\nvar propMap = {\r\n e: \"enumerable\",\r\n c: \"configurable\",\r\n v: VALUE,\r\n w: \"writable\",\r\n g: \"get\",\r\n s: \"set\"\r\n};\r\n/**\r\n * @internal\r\n * @ignore\r\n * Helper to convert ObjDefinePropDescriptor into PropertyDescriptor\r\n * @param value - The prop descriptor to convert\r\n * @returns\r\n */\r\nfunction _createProp(value) {\r\n var prop = {};\r\n prop[propMap[\"c\"]] = true;\r\n prop[propMap[\"e\"]] = true;\r\n if (value.l) {\r\n // Asign a getter function to return the value when requested\r\n prop.get = function () { return value.l.v; };\r\n // If it has a setter then expose it as well\r\n var desc = objGetOwnPropertyDescriptor(value.l, \"v\");\r\n if (desc && desc.set) {\r\n prop.set = function (newValue) {\r\n value.l.v = newValue;\r\n };\r\n }\r\n }\r\n objForEachKey(value, function (key, value) {\r\n prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;\r\n });\r\n return prop;\r\n}\r\n/**\r\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\r\n * This is a wrapper for [Object.defineProperty](https://developer.mozilla.org/en-US/docs/web/javascript/reference/global_objects/object/defineproperty)\r\n *\r\n * This method allows a precise addition to or modification of a property on an object. Normal property addition through\r\n * assignment creates properties which show up during property enumeration (for...in loop or objKeys method), whose\r\n * values may be changed, and which may be deleted. This method allows these extra details to be changed from their\r\n * defaults. By default, properties added using objDefineProp() are not writable, not enumerable, and not configurable.\r\n *\r\n * Property descriptors present in objects come in two main flavors: data descriptors and accessor descriptors. A data\r\n * descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property\r\n * described by a getter-setter pair of functions. A descriptor must be one of these two flavors; it cannot be both.\r\n *\r\n * This is an alias for Object.defineProperty\r\n * @group Object\r\n * @param target - The object on which to define the property.\r\n * @param key - The name or Symbol of the property to be defined or modified.\r\n * @param descriptor - The descriptor for the property being defined or modified.\r\n */\r\nexport var objDefineProp = ObjClass[\"defineProperty\"];\r\n/**\r\n * The objDefineProperties() method defines new or modifies existing properties directly on an object, returning the object.\r\n * This is a wrapper for [Object.defineProperties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties)\r\n * @since 0.6.0\r\n * @group Object\r\n * @param target - The object on which to define or modify properties.\r\n * @param props - An object whose keys represent the names of properties to be defined or modified and whose values are\r\n * objects describing those properties. Each value in props must be either a data descriptor or an accessor descriptor;\r\n * it cannot be both (see {@link ObjDefinePropDescriptorMap} for more details).\r\n * @returns\r\n */\r\nexport var objDefineProperties = ObjClass[\"defineProperties\"];\r\n/**\r\n * Try to define a get object property accessor for the target object, if a function is past as the value this will\r\n * be assumed to be a getter function and NOT the value.\r\n * @deprecated It is recommended that you use {@link objDefine} instead {@link objDefineGet} or {@link objDefineAccessors}\r\n * as it provides a deterministic way for identifying whether the value is a value or a function rather than wrapping any\r\n * function value in another function.\r\n * @group Object\r\n * @param target - The object on which to define the property.\r\n * @param key - The name of the property to be defined or modified\r\n * @param value - The value or a function that returns the value\r\n * @param configurable - Can the value be changed, defaults to true.\r\n * @param enumerable - Should this get property be enumerable, defaults to true.\r\n * @returns The object that was passed to the function\r\n */\r\nexport function objDefineGet(target, key, value, configurable, enumerable) {\r\n var _a;\r\n return objDefineProp(target, key, _createProp((_a = {\r\n e: enumerable,\r\n c: configurable\r\n },\r\n _a[isFunction(value) ? \"g\" : \"v\"] = value,\r\n _a)));\r\n}\r\n/**\r\n * Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with\r\n * existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded\r\n * and executed in an ES3 container, providing basic IE8 compatibility.\r\n * @deprecated It is recommended that you use {@link objDefine} instead {@link objDefineAccessors} as this internally creates\r\n * the {@link ObjDefinePropDescriptor} definition based on your provided arguments. And only using a minimum set of functions\r\n * reduces your overall bundle size.\r\n * @group Object\r\n * @param target - The object on which to define the property.\r\n * @param prop - The name of the property to be defined or modified.\r\n * @param getProp - The getter function to wire against the getter.\r\n * @param setProp - The setter function to wire against the setter.\r\n * @param configurable - Can the value be changed, defaults to true\r\n * @param enumerable - Should this get property be enumerable, defaults to true.\r\n * @returns The object that was passed to the function\r\n */\r\nexport function objDefineAccessors(target, prop, getProp, setProp, configurable, enumerable) {\r\n var desc = {\r\n e: enumerable,\r\n c: configurable\r\n };\r\n if (getProp) {\r\n desc.g = getProp;\r\n }\r\n if (setProp) {\r\n desc.s = setProp;\r\n }\r\n return objDefineProp(target, prop, _createProp(desc));\r\n}\r\n/**\r\n * The objDefine() method defines a new or modifies an existing single property accessors for the target object based\r\n * on the configuration defined for the propDesc argument of type {@link ObjDefinePropDescriptor}. This will call\r\n * {@link objDefineProp} after creating the required PropertyDescriptor populating defaults for the propDesc values.\r\n * Note, the default values (true) for `configurable` and `enumerable` are different from the defaults provided by objDefineProp.\r\n * @since 0.6.0\r\n * @group Object\r\n * @param target - The object on which to define the property.\r\n * @param key - The name of the property to be defined or modified\r\n * @param propDesc - An object which defines the Property Descriptor mappings for the mapping.\r\n * @returns The target object.\r\n */\r\nexport function objDefine(target, key, propDesc) {\r\n return objDefineProp(target, key, _createProp(propDesc));\r\n}\r\n/**\r\n * The objDefineProps() method defines new or modifies existing properties directly for the target object using the keys\r\n * and configuration from the propDescMap argument. This will call {@link objDefineProperties} after creating the required\r\n * PropertyDescriptorMap from the propDescMap values.\r\n * Note, the default values (true) for `configurable` and `enumerable` are different from the defaults provided by objDefineProperties.\r\n * @since 0.6.0\r\n * @group Object\r\n * @param target - The object on which to define or modify properties.\r\n * @param propDescMap - An object whose keys represent the names of properties to be defined or modified and whose values are\r\n * objects describing those properties. Each value in props must be either a data descriptor or an accessor descriptor;\r\n * it cannot be both (see {@link ObjDefinePropDescriptorMap} for more details).\r\n * @returns The target object.\r\n */\r\nexport function objDefineProps(target, propDescMap) {\r\n var props = {};\r\n objForEachKey(propDescMap, function (key, value) {\r\n props[key] = _createProp(value);\r\n });\r\n return objDefineProperties(target, props);\r\n}\r\n//# sourceMappingURL=define.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ObjClass, VALUE } from \"../internal/constants\";\r\nimport { isFunction, isUndefined } from \"../helpers/base\";\r\nimport { objForEachKey } from \"./for_each_key\";\r\nimport { ILazyValue } from \"../helpers/lazy\";\r\nimport { objGetOwnPropertyDescriptor } from \"./get_own_prop_desc\";\r\n\r\n/**\r\n * Definition of the Property Descriptor mappings for the objDefine functions.\r\n * If a descriptor has neither of value, writable, get and set keys, it is treated as a data descriptor.\r\n * If a descriptor has both [value or writable] and [get or set] keys, an exception is thrown.\r\n * Bear in mind that these attributes are not necessarily the descriptor's own properties. Inherited\r\n * properties will be considered as well. In order to ensure these defaults are preserved, you might\r\n * freeze existing objects in the descriptor object's prototype chain upfront, specify all options\r\n * explicitly, or point to null with {@link objCreate}(null).\r\n * @since 0.6.0\r\n * @group Object\r\n */\r\nexport interface ObjDefinePropDescriptor {\r\n /**\r\n * Identifies if this property should be configurable (true) when this value is set to false,\r\n * - the type of this property cannot be changed between data property and accessor property, and\r\n * - the property may not be deleted, and\r\n * - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with writable: true,\r\n * the value can be changed, and writable can be changed to false).\r\n * Defaults to true.\r\n */\r\n c?: boolean;\r\n\r\n /**\r\n * Identifies if this property will be visible during enumeration of the properties on the corresponding object.\r\n * Defaults to true.\r\n */\r\n e?: boolean;\r\n\r\n /**\r\n * __data descriptor__\r\n * The value associated with the property. Can be any valid JavaScript value (number, object, function, etc.).\r\n * Defaults to undefined.\r\n */\r\n v?: V;\r\n\r\n /**\r\n * A Lazy value instance which will be used to return the value, this will be wrapped in a getter function.\r\n * @since 0.9.4\r\n */\r\n l?: ILazyValue;\r\n\r\n /**\r\n * true if the value associated with the property may be changed with an assignment operator. Defaults to false.\r\n */\r\n w?: boolean;\r\n\r\n /**\r\n * A function which serves as a getter for the property, or undefined if there is no getter. When the property\r\n * is accessed, this function is called without arguments and with this set to the object through which the\r\n * property is accessed (this may not be the object on which the property is defined due to inheritance). The\r\n * return value will be used as the value of the property. Defaults to undefined.\r\n */\r\n g?(): V;\r\n\r\n /**\r\n * A function which serves as a setter for the property, or undefined if there is no setter. When the property\r\n * is assigned, this function is called with one argument (the value being assigned to the property) and with\r\n * this set to the object through which the property is assigned. Defaults to undefined.\r\n * @param value\r\n */\r\n s?(value: V): void;\r\n}\r\n\r\n/**\r\n * An object whose keys represent the names of properties to be defined or modified and whose values are objects\r\n * describing those properties. Each value in props must be either a data descriptor or an accessor descriptor;\r\n * it cannot be both (see {@link ObjDefinePropDescriptor} for more details).\r\n * @since 0.6.0\r\n * @group Object\r\n */\r\nexport type ObjDefinePropDescriptorMap = {\r\n [key: PropertyKey]: ObjDefinePropDescriptor\r\n};\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Mapping from ObjDefinePropDescriptor key to PropertyDescriptor key\r\n */\r\nconst propMap: { [key in keyof ObjDefinePropDescriptor]: keyof PropertyDescriptor } = {\r\n e: \"enumerable\",\r\n c: \"configurable\",\r\n v: VALUE,\r\n w: \"writable\",\r\n g: \"get\",\r\n s: \"set\"\r\n};\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Helper to convert ObjDefinePropDescriptor into PropertyDescriptor\r\n * @param value - The prop descriptor to convert\r\n * @returns\r\n */\r\nfunction _createProp(value: ObjDefinePropDescriptor): PropertyDescriptor {\r\n let prop: PropertyDescriptor = {};\r\n prop[propMap[\"c\"]] = true;\r\n prop[propMap[\"e\"]] = true;\r\n\r\n if (value.l) {\r\n // Asign a getter function to return the value when requested\r\n prop.get = () => value.l.v;\r\n\r\n // If it has a setter then expose it as well\r\n let desc = objGetOwnPropertyDescriptor(value.l, \"v\");\r\n if (desc && desc.set) {\r\n prop.set = (newValue: any) => {\r\n value.l.v = newValue;\r\n }\r\n }\r\n }\r\n\r\n objForEachKey(value, (key, value) => {\r\n prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;\r\n });\r\n\r\n return prop;\r\n}\r\n\r\n/**\r\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\r\n * This is a wrapper for [Object.defineProperty](https://developer.mozilla.org/en-US/docs/web/javascript/reference/global_objects/object/defineproperty)\r\n *\r\n * This method allows a precise addition to or modification of a property on an object. Normal property addition through\r\n * assignment creates properties which show up during property enumeration (for...in loop or objKeys method), whose\r\n * values may be changed, and which may be deleted. This method allows these extra details to be changed from their\r\n * defaults. By default, properties added using objDefineProp() are not writable, not enumerable, and not configurable.\r\n *\r\n * Property descriptors present in objects come in two main flavors: data descriptors and accessor descriptors. A data\r\n * descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property\r\n * described by a getter-setter pair of functions. A descriptor must be one of these two flavors; it cannot be both.\r\n *\r\n * This is an alias for Object.defineProperty\r\n * @group Object\r\n * @param target - The object on which to define the property.\r\n * @param key - The name or Symbol of the property to be defined or modified.\r\n * @param descriptor - The descriptor for the property being defined or modified.\r\n */\r\nexport const objDefineProp: (target: T, key: PropertyKey, descriptor: PropertyDescriptor & ThisType) => T = ObjClass[\"defineProperty\"];\r\n\r\n/**\r\n * The objDefineProperties() method defines new or modifies existing properties directly on an object, returning the object.\r\n * This is a wrapper for [Object.defineProperties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties)\r\n * @since 0.6.0\r\n * @group Object\r\n * @param target - The object on which to define or modify properties.\r\n * @param props - An object whose keys represent the names of properties to be defined or modified and whose values are\r\n * objects describing those properties. Each value in props must be either a data descriptor or an accessor descriptor;\r\n * it cannot be both (see {@link ObjDefinePropDescriptorMap} for more details).\r\n * @returns\r\n */\r\nexport const objDefineProperties: (target: T, props: PropertyDescriptorMap & ThisType) => T = ObjClass[\"defineProperties\"];\r\n\r\n/**\r\n * Try to define a get object property accessor for the target object, if a function is past as the value this will\r\n * be assumed to be a getter function and NOT the value.\r\n * @deprecated It is recommended that you use {@link objDefine} instead {@link objDefineGet} or {@link objDefineAccessors}\r\n * as it provides a deterministic way for identifying whether the value is a value or a function rather than wrapping any\r\n * function value in another function.\r\n * @group Object\r\n * @param target - The object on which to define the property.\r\n * @param key - The name of the property to be defined or modified\r\n * @param value - The value or a function that returns the value\r\n * @param configurable - Can the value be changed, defaults to true.\r\n * @param enumerable - Should this get property be enumerable, defaults to true.\r\n * @returns The object that was passed to the function\r\n */\r\nexport function objDefineGet(target: T, key: PropertyKey, value: (() => V) | V, configurable?: boolean, enumerable?: boolean): T {\r\n return objDefineProp(target, key, _createProp({\r\n e: enumerable,\r\n c: configurable,\r\n [isFunction(value) ? \"g\" : \"v\"]: value\r\n }));\r\n}\r\n\r\n/**\r\n * Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with\r\n * existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded\r\n * and executed in an ES3 container, providing basic IE8 compatibility.\r\n * @deprecated It is recommended that you use {@link objDefine} instead {@link objDefineAccessors} as this internally creates\r\n * the {@link ObjDefinePropDescriptor} definition based on your provided arguments. And only using a minimum set of functions\r\n * reduces your overall bundle size.\r\n * @group Object\r\n * @param target - The object on which to define the property.\r\n * @param prop - The name of the property to be defined or modified.\r\n * @param getProp - The getter function to wire against the getter.\r\n * @param setProp - The setter function to wire against the setter.\r\n * @param configurable - Can the value be changed, defaults to true\r\n * @param enumerable - Should this get property be enumerable, defaults to true.\r\n * @returns The object that was passed to the function\r\n */\r\nexport function objDefineAccessors(target: T, prop: PropertyKey, getProp?: (() => V) | null, setProp?: ((v: V) => void) | null, configurable?: boolean, enumerable?: boolean): T {\r\n let desc: ObjDefinePropDescriptor = {\r\n e: enumerable,\r\n c: configurable\r\n };\r\n\r\n if (getProp) {\r\n desc.g = getProp;\r\n }\r\n\r\n if (setProp) {\r\n desc.s = setProp;\r\n }\r\n \r\n return objDefineProp(target, prop, _createProp(desc));\r\n}\r\n\r\n/**\r\n * The objDefine() method defines a new or modifies an existing single property accessors for the target object based\r\n * on the configuration defined for the propDesc argument of type {@link ObjDefinePropDescriptor}. This will call\r\n * {@link objDefineProp} after creating the required PropertyDescriptor populating defaults for the propDesc values.\r\n * Note, the default values (true) for `configurable` and `enumerable` are different from the defaults provided by objDefineProp.\r\n * @since 0.6.0\r\n * @group Object\r\n * @param target - The object on which to define the property.\r\n * @param key - The name of the property to be defined or modified\r\n * @param propDesc - An object which defines the Property Descriptor mappings for the mapping.\r\n * @returns The target object.\r\n */\r\nexport function objDefine(target: T, key: keyof T, propDesc: ObjDefinePropDescriptor): T {\r\n return objDefineProp(target, key, _createProp(propDesc));\r\n}\r\n\r\n/**\r\n * The objDefineProps() method defines new or modifies existing properties directly for the target object using the keys\r\n * and configuration from the propDescMap argument. This will call {@link objDefineProperties} after creating the required\r\n * PropertyDescriptorMap from the propDescMap values.\r\n * Note, the default values (true) for `configurable` and `enumerable` are different from the defaults provided by objDefineProperties.\r\n * @since 0.6.0\r\n * @group Object\r\n * @param target - The object on which to define or modify properties.\r\n * @param propDescMap - An object whose keys represent the names of properties to be defined or modified and whose values are\r\n * objects describing those properties. Each value in props must be either a data descriptor or an accessor descriptor;\r\n * it cannot be both (see {@link ObjDefinePropDescriptorMap} for more details).\r\n * @returns The target object.\r\n */\r\nexport function objDefineProps(target: T, propDescMap: ObjDefinePropDescriptorMap) {\r\n let props: PropertyDescriptorMap = {};\r\n\r\n objForEachKey(propDescMap, (key, value: ObjDefinePropDescriptor) => {\r\n props[key] = _createProp(value);\r\n });\r\n\r\n return objDefineProperties(target, props);\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { ArrCls, BOOLEAN, FUNCTION, NULL_VALUE, NUMBER, OBJECT, ObjProto, STRING, UNDEFINED, UNDEF_VALUE } from \"../internal/constants\";\r\nimport { safeGet } from \"./safe_get\";\r\nvar PRIMITIVE_TYPES = [STRING, NUMBER, BOOLEAN, UNDEFINED, \"symbol\", \"bigint\"];\r\n/**\r\n * @ignore\r\n * @internal\r\n * Create and returns a function that will return `true` if the argument passed\r\n * to it matches the provided type.\r\n * @param theType - The type to match against the `typeof value`\r\n * @returns A function which takes a single argument and returns a boolean\r\n */\r\nexport function _createIs(theType) {\r\n return function (value) {\r\n return typeof value === theType;\r\n };\r\n}\r\n/**\r\n * @ignore\r\n * @internal\r\n * Create and returns a function that will return `true` if the argument passed\r\n * to it matches the object type specified based on {@link objToString}.\r\n * @param - The object name to match for the `objToString(value)`\r\n * @returns A function which takes a single argument and returns a boolean\r\n */\r\nexport function _createObjIs(theName) {\r\n var theType = \"[object \" + theName + \"]\";\r\n return function (value) {\r\n return !!(value && objToString(value) === theType);\r\n };\r\n}\r\n/**\r\n * The `objToString()` method returns a string representing the object. This explicitly\r\n * always calls the `Object.prototype.toString()` method.\r\n *\r\n * An object's toString() method is most commonly invoked when that object undergoes:\r\n * - explicit type conversion to a string (for example, String(myObject))\r\n * - implicit type coercion into a string (for example, myObject + \"hello world\")\r\n *\r\n * @group Object\r\n * @param value - The object to be converted into a string\r\n * @returns A string representation of the object\r\n * @example\r\n * ```ts\r\n * objToString(new Date()); // [object Date]\r\n * objToString(new String()); // [object String]\r\n *\r\n * // Math has its Symbol.toStringTag\r\n * objToString(Math); // [object Math]\r\n *\r\n * objToString(undefined); // [object Undefined]\r\n * objToString(null); // [object Null]\r\n * ```\r\n */\r\nexport function objToString(value) {\r\n return ObjProto.toString.call(value);\r\n}\r\n/**\r\n * Validate if the provided value object is of the expected type\r\n * @group Type Identity\r\n * @param value - The value to check\r\n * @param theType - The expected type name as a string\r\n * @returns `true` if the value matches the provided type\r\n */\r\nexport function isTypeof(value, theType) {\r\n return typeof value === theType;\r\n}\r\n/**\r\n * Checks if the provided value is undefined or contains the string value \"undefined\",\r\n * if you want to consider the string value as undefined see {@link isStrictUndefined}\r\n * @group Type Identity\r\n * @group Value Check\r\n * @param value - The value to check\r\n * @returns true if the value is undefined or \"undefined\", otherwise false\r\n * @example\r\n * ```ts\r\n * isUndefined(undefined); // true\r\n * isUndefined(\"undefined\"); // true\r\n *\r\n * isUndefined(null); // false\r\n * isUndefined(\"null\"); // false\r\n * isUndefined(\"1\"); // false\r\n * isUndefined(\"aa\"); // false\r\n * isUndefined(new Date()); // false\r\n * isUndefined(1); // false\r\n * isUndefined(\"\"); // false\r\n * isUndefined(_dummyFunction); // false\r\n * isUndefined([]); // false\r\n * isUndefined(new Array(1)); // false\r\n * isUndefined(true); // false\r\n * isUndefined(false); // false\r\n * isUndefined(\"true\"); // false\r\n * isUndefined(\"false\"); // false\r\n * isUndefined(new Boolean(true)); // false\r\n * isUndefined(new Boolean(false)); // false\r\n * isUndefined(new Boolean(\"true\")); // false\r\n * isUndefined(new Boolean(\"false\")); // false\r\n * isUndefined(Boolean(true)); // false\r\n * isUndefined(Boolean(false)); // false\r\n * isUndefined(Boolean(\"true\")); // false\r\n * isUndefined(Boolean(\"false\")); // false\r\n * isUndefined(new RegExp(\"\")); // false\r\n * isUndefined(new ArrayBuffer(0)); // false\r\n * isUndefined(new Error(\"Test Error\"));// false\r\n * isUndefined(new TypeError(\"Test TypeError\")); // false\r\n * isUndefined(new TestError(\"Test TestError\")); // false\r\n * isUndefined(_dummyError()); // false\r\n * isUndefined(Promise.reject()); // false\r\n * isUndefined(Promise.resolve()); // false\r\n * isUndefined(new Promise(() => {})); // false\r\n * isUndefined(_simplePromise()); // false\r\n * isUndefined(_simplePromiseLike()); // false\r\n * isUndefined(Object.create(null)); // false\r\n * isUndefined(polyObjCreate(null)); // false\r\n * ```\r\n */\r\nexport function isUndefined(value) {\r\n return typeof value === UNDEFINED || value === UNDEFINED;\r\n}\r\n/**\r\n * Checks if the provided value is undefined, a string value of \"undefined\" is NOT considered\r\n * to be undefined.\r\n * @group Type Identity\r\n * @group Value Check\r\n * @param value - The value to check\r\n * @returns true if the typeof value === UNDEFINED\r\n * @example\r\n * ```ts\r\n * isStrictUndefined(undefined); // true\r\n *\r\n * isStrictUndefined(null); // false\r\n * isStrictUndefined(\"null\"); // false\r\n * isStrictUndefined(\"undefined\"); // false\r\n * isStrictUndefined(\"1\"); // false\r\n * isStrictUndefined(\"aa\"); // false\r\n * isStrictUndefined(new Date()); // false\r\n * isStrictUndefined(0); // false\r\n * isStrictUndefined(1); // false\r\n * isStrictUndefined(\"\"); // false\r\n * ```\r\n */\r\nexport function isStrictUndefined(arg) {\r\n return !isDefined(arg);\r\n}\r\n/**\r\n * Checks if the provided value is null, undefined or contains the string value of \"undefined\".\r\n * @group Type Identity\r\n * @group Value Check\r\n * @param value - The value to check\r\n * @returns `true` if the value is `null` or `undefined`\r\n * @example\r\n * ```ts\r\n * isNullOrUndefined(null); // true\r\n * isNullOrUndefined(undefined); // true\r\n * isNullOrUndefined(\"undefined\"); // true\r\n *\r\n * let value = null;\r\n * isNullOrUndefined(value); // true\r\n * let value = undefined;\r\n * isNullOrUndefined(value); // true\r\n *\r\n * isNullOrUndefined(\"\"); // false\r\n * isNullOrUndefined(0); // false\r\n * isNullOrUndefined(new Date()); // false\r\n * isNullOrUndefined(true); // false\r\n * isNullOrUndefined(false); // false\r\n * ```\r\n */\r\nexport function isNullOrUndefined(value) {\r\n return value === NULL_VALUE || isUndefined(value);\r\n}\r\n/**\r\n * Checks if the provided value is null, undefined only, a string value of \"undefined\" is NOT considered\r\n * to be undefined.\r\n * @group Type Identity\r\n * @group Value Check\r\n * @param value - The value to check\r\n * @returns\r\n * @example\r\n * ```ts\r\n * isStrictNullOrUndefined(null); // true\r\n * isStrictNullOrUndefined(undefined); // true\r\n * isStrictNullOrUndefined(\"undefined\"); // false\r\n *\r\n * let value = null;\r\n * isStrictNullOrUndefined(value); // true\r\n * let value = undefined;\r\n * isStrictNullOrUndefined(value); // true\r\n *\r\n * isStrictNullOrUndefined(\"\"); // false\r\n * isStrictNullOrUndefined(0); // false\r\n * isStrictNullOrUndefined(new Date()); // false\r\n * isStrictNullOrUndefined(true); // false\r\n * isStrictNullOrUndefined(false); // false\r\n * ```\r\n */\r\nexport function isStrictNullOrUndefined(value) {\r\n return value === NULL_VALUE || !isDefined(value);\r\n}\r\n/**\r\n * Checks if the passed value is defined, which means it has any value and is not undefined.\r\n * A string value of \"undefined\" is considered to be defined.\r\n * @group Value Check\r\n * @param arg - The value to check\r\n * @returns true if arg has a value (is not === undefined)\r\n * @example\r\n * ```ts\r\n * isDefined(null); // false\r\n * isDefined(undefined); // false\r\n * isDefined(\"undefined\"); // true\r\n *\r\n * let value = null;\r\n * isDefined(value); // false\r\n * let value = undefined;\r\n * isDefined(value); // false\r\n *\r\n * isDefined(\"\"); // true\r\n * isDefined(0); // true\r\n * isDefined(new Date()); // true\r\n * isDefined(true); // true\r\n * isDefined(false); // true\r\n * ```\r\n */\r\nexport function isDefined(arg) {\r\n return !!arg || arg !== UNDEF_VALUE;\r\n}\r\n/**\r\n * Identifies whether the provided value is a JavaScript [primitive](https://developer.mozilla.org/en-US/docs/Glossary/Primitive)\r\n * which is when is it not an object and has no methods or properties. There are 7 primitive data types:\r\n * - string\r\n * - number\r\n * - bigint\r\n * - boolean\r\n * - undefined\r\n * - null\r\n * - symbol\r\n *\r\n * Most of the time, a primitive value is represented directly at the lowest level of the language implementation.\r\n *\r\n * All primitives are immutable; that is, they cannot be altered. It is important not to confuse a primitive itself\r\n * with a variable assigned a primitive value. The variable may be reassigned to a new value, but the existing value\r\n * can not be changed in the ways that objects, arrays, and functions can be altered. The language does not offer\r\n * utilities to mutate primitive values.\r\n * @since 0.4.4\r\n * @group Type Identity\r\n * @param value - The value to check whether it's a primitive value\r\n * @example\r\n * ```ts\r\n * isPrimitive(null); // true\r\n * isPrimitive(undefined); // true\r\n * isPrimitive(\"null\"); // true\r\n * isPrimitive(\"undefined\"); // true\r\n * isPrimitive(\"1\"); // true\r\n * isPrimitive(\"aa\"); // true\r\n * isPrimitive(1); // true\r\n * isPrimitive(Number(2)); // true\r\n * isPrimitive(\"\"); // true\r\n * isPrimitive(String(\"\")); // true\r\n * isPrimitive(true); // true\r\n * isPrimitive(false); // true\r\n * isPrimitive(\"true\"); // true\r\n * isPrimitive(\"false\"); // true\r\n * isPrimitive(BigInt(42)); // true\r\n * isPrimitive(Symbol.for(\"Hello\")); // true\r\n *\r\n * isPrimitive(new String(\"aa\")); // false\r\n * isPrimitive(new Date()); // false\r\n * isPrimitive(_dummyFunction); // false\r\n * isPrimitive([]); // false\r\n * isPrimitive(new Array(1)); // false\r\n * isPrimitive(new Boolean(true)); // false\r\n * isPrimitive(new Boolean(false)); // false\r\n * isPrimitive(new Boolean(\"true\")); // false\r\n * isPrimitive(new Boolean(\"false\")); // false\r\n * ```\r\n */\r\nexport var isPrimitive = function (value) {\r\n return value === NULL_VALUE || isPrimitiveType(typeof value);\r\n};\r\n/**\r\n * Identifies whether the provided value is a JavaScript [primitive](https://developer.mozilla.org/en-US/docs/Glossary/Primitive)\r\n * which is when is it not an object and has no methods or properties. There are 6 primitive data types:\r\n * - string\r\n * - number\r\n * - bigint\r\n * - boolean\r\n * - undefined\r\n * - symbol\r\n *\r\n * Most of the time, a primitive value is represented directly at the lowest level of the language implementation.\r\n *\r\n * All primitives are immutable; that is, they cannot be altered. It is important not to confuse a primitive itself\r\n * with a variable assigned a primitive value. The variable may be reassigned to a new value, but the existing value\r\n * can not be changed in the ways that objects, arrays, and functions can be altered. The language does not offer\r\n * utilities to mutate primitive values.\r\n * @since 0.9.6\r\n * @group Type Identity\r\n * @param theType - The type as a string value to be checked whther it's a primitive type, this should be the value\r\n * returned from `typeof value`.\r\n * @example\r\n * ```ts\r\n * isPrimitiveType(null); // false\r\n * isPrimitiveType(undefined); // false\r\n * isPrimitiveType(\"null\"); // false\r\n * isPrimitiveType(\"undefined\"); // false\r\n * isPrimitiveType(\"1\"); // false\r\n * isPrimitiveType(\"aa\"); // false\r\n * isPrimitiveType(1); // false\r\n * isPrimitiveType(Number(2)); // false\r\n * isPrimitiveType(\"\"); // false\r\n * isPrimitiveType(String(\"\")); // false\r\n * isPrimitiveType(true); // false\r\n * isPrimitiveType(false); // false\r\n * isPrimitiveType(\"true\"); // false\r\n * isPrimitiveType(\"false\"); // false\r\n * isPrimitiveType(BigInt(42)); // false\r\n * isPrimitiveType(Symbol.for(\"Hello\")); // false\r\n *\r\n * isPrimitiveType(\"string\"); // true\r\n * isPrimitiveType(\"number\"); // true\r\n * isPrimitiveType(\"boolean\"); // true\r\n * isPrimitiveType(\"undefined\"); // true\r\n * isPrimitiveType(\"symbol\"); // true\r\n * isPrimitiveType(\"bigint\"); // true\r\n * ```\r\n */\r\nexport var isPrimitiveType = function (theType) {\r\n return theType !== OBJECT && PRIMITIVE_TYPES.indexOf(theType) !== -1;\r\n};\r\n/**\r\n * Checks to see if the past value is a string value\r\n * @group Type Identity\r\n * @group String\r\n * @param value - The value to check\r\n * @returns\r\n * @example\r\n * ```ts\r\n * isString(\"\"); // true\r\n * isString(\"null\"); // true\r\n * isString(\"undefined\"); // true\r\n * isString(String(\"\")); // true\r\n *\r\n * isString(null); // false\r\n * isString(undefined); // false\r\n * isString(0); // false\r\n * ```\r\n */\r\nexport var isString = _createIs(STRING);\r\n/**\r\n * Checks to see if the past value is a function value\r\n * @group Type Identity\r\n * @param value - The value to check\r\n * @returns\r\n * @example\r\n * ```ts\r\n * function myFunction() { }\r\n * isFunction(null); // false\r\n * isFunction(undefined); // false\r\n * isFunction(\"null\"); // false\r\n * isFunction(\"undefined\"); // false\r\n * isFunction(\"1\"); // false\r\n * isFunction(\"aa\"); // false\r\n * isFunction(new Date()); // false\r\n * isFunction(1); // false\r\n * isFunction(\"\"); // false\r\n * isFunction(myFunction); // true\r\n * isFunction([]); // false\r\n * isFunction(new Array(1)); // false\r\n * ```\r\n */\r\nexport var isFunction = _createIs(FUNCTION);\r\n/**\r\n * Checks to see if the past value is an object value\r\n * @group Type Identity\r\n * @group Object\r\n * @typeParam T - The object type, defaults to any\r\n * @param value - The value to check\r\n * @returns\r\n */\r\nexport function isObject(value) {\r\n if (!value && isNullOrUndefined(value)) {\r\n return false;\r\n }\r\n return !!value && typeof value === OBJECT;\r\n}\r\n/**\r\n * Checks if the type of value is an Array.\r\n *\r\n * @group Type Identity\r\n * @group Array\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a Array, false otherwise.\r\n * @example\r\n * ```ts\r\n * import { isArray, isObject } from \"@nevware21/ts-utils\";\r\n *\r\n * function performAction(value: any) {\r\n * if (isArray(value) || isObject(value)) {\r\n * // Do something\r\n * } else {\r\n * // Do something else\r\n * }\r\n * }\r\n * ```\r\n */\r\nexport var isArray = ArrCls.isArray;\r\n/**\r\n * Check if an object is of type Date\r\n * @group Type Identity\r\n * @example\r\n * ```ts\r\n * import { isDate } from \"@nevware21/ts-utils\";\r\n *\r\n * let _theDate = null;\r\n *\r\n * function getSetDate(newDate?: any) {\r\n * _theDate = isDate(newDate) ? newDate : new Date();\r\n *\r\n * return _theDate;\r\n * }\r\n * ```\r\n */\r\nexport var isDate = _createObjIs(\"Date\");\r\n/**\r\n * Checks if the type of value is a number.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a number, false otherwise.\r\n */\r\nexport var isNumber = _createIs(NUMBER);\r\n/**\r\n * Checks if the type of value is a boolean.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a boolean, false otherwise.\r\n */\r\nexport var isBoolean = _createIs(BOOLEAN);\r\n/**\r\n * Determines if a value is a regular expression object.\r\n * @group Type Identity\r\n * @param {*} value Reference to check.\r\n * @returns {boolean} True if `value` is a `RegExp`.\r\n */\r\nexport var isRegExp = _createObjIs(\"RegExp\");\r\n/**\r\n * Checks if the type of value is a File object.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a File, false otherwise.\r\n */\r\nexport var isFile = _createObjIs(\"File\");\r\n/**\r\n * Checks if the type of value is a FormData object.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a FormData, false otherwise.\r\n */\r\nexport var isFormData = _createObjIs(\"FormData\");\r\n/**\r\n * Checks if the type of value is a Blob object.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a Blob, false otherwise.\r\n */\r\nexport var isBlob = _createObjIs(\"Blob\");\r\n/**\r\n * Checks if the type of value is a ArrayBuffer object.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a ArrayBuffer, false otherwise.\r\n */\r\nexport var isArrayBuffer = _createObjIs(\"ArrayBuffer\");\r\n/**\r\n * Checks if the type of value is a Error object.\r\n * @group Type Identity\r\n * @group Error\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a Error, false otherwise.\r\n */\r\nexport var isError = _createObjIs(\"Error\");\r\n/**\r\n * Checks if the type of value is a PromiseLike instance (contains a then function).\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a PromiseLike, false otherwise.\r\n */\r\nexport function isPromiseLike(value) {\r\n return !!value && isFunction(value.then);\r\n}\r\n/**\r\n * Checks if the type of value is a PromiseLike instance (contains a then function).\r\n * This is an alias for {@link isPromiseLike}.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a PromiseLike, false otherwise.\r\n */\r\nexport var isThenable = isPromiseLike;\r\n/**\r\n * Checks if the type of value is a Promise instance (contains then and catch functions).\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a Promise, false otherwise.\r\n */\r\nexport function isPromise(value) {\r\n return isPromiseLike(value) && isFunction(value.catch);\r\n}\r\n/**\r\n * Checks if the type of value does not evaluate to true value, handling some special\r\n * case usages of Boolean(true/false) and new Boolean(true/false).\r\n * @group Value Check\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is not truthy, false otherwise.\r\n */\r\nexport function isNotTruthy(value) {\r\n return !value || !safeGet(function () { return (value && (0 + value)); }, value);\r\n}\r\n/**\r\n * Checks if the type of value evaluates to true value, handling some special\r\n * case usages of Boolean(true/false) and new Boolean(true/false).\r\n * @group Value Check\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is not truthy, false otherwise.\r\n */\r\nexport function isTruthy(value) {\r\n // Objects created with no prototype (Object.create(null)) cannot be converted to primitives\r\n // Which causes this code to throw, additionally just using !! also fails for Boolean objects\r\n // !!(new Boolean(false)) evaluates to true\r\n return !(!value || safeGet(function () { return !(value && (0 + value)); }, !value));\r\n //return !(!value || !(value && (0 + value)));\r\n}\r\n//# sourceMappingURL=base.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ArrCls, BOOLEAN, FUNCTION, NULL_VALUE, NUMBER, OBJECT, ObjProto, STRING, UNDEFINED, UNDEF_VALUE } from \"../internal/constants\";\r\nimport { safeGet } from \"./safe_get\";\r\n\r\nconst PRIMITIVE_TYPES = [ STRING, NUMBER, BOOLEAN, UNDEFINED, \"symbol\", \"bigint\" ];\r\n\r\n/**\r\n * @ignore\r\n * @internal\r\n * Create and returns a function that will return `true` if the argument passed\r\n * to it matches the provided type.\r\n * @param theType - The type to match against the `typeof value`\r\n * @returns A function which takes a single argument and returns a boolean\r\n */\r\nexport function _createIs(theType: string): (value: any) => value is T {\r\n return function (value: any): value is T {\r\n return typeof value === theType;\r\n }\r\n}\r\n\r\n/**\r\n * @ignore\r\n * @internal\r\n * Create and returns a function that will return `true` if the argument passed\r\n * to it matches the object type specified based on {@link objToString}.\r\n * @param - The object name to match for the `objToString(value)`\r\n * @returns A function which takes a single argument and returns a boolean\r\n */\r\nexport function _createObjIs(theName: string): (value: any) => value is T {\r\n const theType = \"[object \" + theName + \"]\";\r\n return function (value: any): value is T {\r\n return !!(value && objToString(value) === theType);\r\n }\r\n}\r\n\r\n/**\r\n * The `objToString()` method returns a string representing the object. This explicitly\r\n * always calls the `Object.prototype.toString()` method.\r\n *\r\n * An object's toString() method is most commonly invoked when that object undergoes:\r\n * - explicit type conversion to a string (for example, String(myObject))\r\n * - implicit type coercion into a string (for example, myObject + \"hello world\")\r\n *\r\n * @group Object\r\n * @param value - The object to be converted into a string\r\n * @returns A string representation of the object\r\n * @example\r\n * ```ts\r\n * objToString(new Date()); // [object Date]\r\n * objToString(new String()); // [object String]\r\n *\r\n * // Math has its Symbol.toStringTag\r\n * objToString(Math); // [object Math]\r\n *\r\n * objToString(undefined); // [object Undefined]\r\n * objToString(null); // [object Null]\r\n * ```\r\n */\r\nexport function objToString(value: any): string {\r\n return ObjProto.toString.call(value);\r\n}\r\n\r\n/**\r\n * Validate if the provided value object is of the expected type\r\n * @group Type Identity\r\n * @param value - The value to check\r\n * @param theType - The expected type name as a string\r\n * @returns `true` if the value matches the provided type\r\n */\r\nexport function isTypeof(value: any, theType: string): boolean {\r\n return typeof value === theType;\r\n}\r\n\r\n/**\r\n * Checks if the provided value is undefined or contains the string value \"undefined\",\r\n * if you want to consider the string value as undefined see {@link isStrictUndefined}\r\n * @group Type Identity\r\n * @group Value Check\r\n * @param value - The value to check\r\n * @returns true if the value is undefined or \"undefined\", otherwise false\r\n * @example\r\n * ```ts\r\n * isUndefined(undefined); // true\r\n * isUndefined(\"undefined\"); // true\r\n *\r\n * isUndefined(null); // false\r\n * isUndefined(\"null\"); // false\r\n * isUndefined(\"1\"); // false\r\n * isUndefined(\"aa\"); // false\r\n * isUndefined(new Date()); // false\r\n * isUndefined(1); // false\r\n * isUndefined(\"\"); // false\r\n * isUndefined(_dummyFunction); // false\r\n * isUndefined([]); // false\r\n * isUndefined(new Array(1)); // false\r\n * isUndefined(true); // false\r\n * isUndefined(false); // false\r\n * isUndefined(\"true\"); // false\r\n * isUndefined(\"false\"); // false\r\n * isUndefined(new Boolean(true)); // false\r\n * isUndefined(new Boolean(false)); // false\r\n * isUndefined(new Boolean(\"true\")); // false\r\n * isUndefined(new Boolean(\"false\")); // false\r\n * isUndefined(Boolean(true)); // false\r\n * isUndefined(Boolean(false)); // false\r\n * isUndefined(Boolean(\"true\")); // false\r\n * isUndefined(Boolean(\"false\")); // false\r\n * isUndefined(new RegExp(\"\")); // false\r\n * isUndefined(new ArrayBuffer(0)); // false\r\n * isUndefined(new Error(\"Test Error\"));// false\r\n * isUndefined(new TypeError(\"Test TypeError\")); // false\r\n * isUndefined(new TestError(\"Test TestError\")); // false\r\n * isUndefined(_dummyError()); // false\r\n * isUndefined(Promise.reject()); // false\r\n * isUndefined(Promise.resolve()); // false\r\n * isUndefined(new Promise(() => {})); // false\r\n * isUndefined(_simplePromise()); // false\r\n * isUndefined(_simplePromiseLike()); // false\r\n * isUndefined(Object.create(null)); // false\r\n * isUndefined(polyObjCreate(null)); // false\r\n * ```\r\n */\r\nexport function isUndefined(value: any) {\r\n return typeof value === UNDEFINED || value === UNDEFINED;\r\n}\r\n\r\n/**\r\n * Checks if the provided value is undefined, a string value of \"undefined\" is NOT considered\r\n * to be undefined.\r\n * @group Type Identity\r\n * @group Value Check\r\n * @param value - The value to check\r\n * @returns true if the typeof value === UNDEFINED\r\n * @example\r\n * ```ts\r\n * isStrictUndefined(undefined); // true\r\n *\r\n * isStrictUndefined(null); // false\r\n * isStrictUndefined(\"null\"); // false\r\n * isStrictUndefined(\"undefined\"); // false\r\n * isStrictUndefined(\"1\"); // false\r\n * isStrictUndefined(\"aa\"); // false\r\n * isStrictUndefined(new Date()); // false\r\n * isStrictUndefined(0); // false\r\n * isStrictUndefined(1); // false\r\n * isStrictUndefined(\"\"); // false\r\n * ```\r\n */\r\nexport function isStrictUndefined(arg: any): arg is undefined {\r\n return !isDefined(arg);\r\n}\r\n\r\n/**\r\n * Checks if the provided value is null, undefined or contains the string value of \"undefined\".\r\n * @group Type Identity\r\n * @group Value Check\r\n * @param value - The value to check\r\n * @returns `true` if the value is `null` or `undefined`\r\n * @example\r\n * ```ts\r\n * isNullOrUndefined(null); // true\r\n * isNullOrUndefined(undefined); // true\r\n * isNullOrUndefined(\"undefined\"); // true\r\n *\r\n * let value = null;\r\n * isNullOrUndefined(value); // true\r\n * let value = undefined;\r\n * isNullOrUndefined(value); // true\r\n *\r\n * isNullOrUndefined(\"\"); // false\r\n * isNullOrUndefined(0); // false\r\n * isNullOrUndefined(new Date()); // false\r\n * isNullOrUndefined(true); // false\r\n * isNullOrUndefined(false); // false\r\n * ```\r\n */\r\nexport function isNullOrUndefined(value: any): boolean {\r\n return value === NULL_VALUE || isUndefined(value);\r\n}\r\n\r\n/**\r\n * Checks if the provided value is null, undefined only, a string value of \"undefined\" is NOT considered\r\n * to be undefined.\r\n * @group Type Identity\r\n * @group Value Check\r\n * @param value - The value to check\r\n * @returns\r\n * @example\r\n * ```ts\r\n * isStrictNullOrUndefined(null); // true\r\n * isStrictNullOrUndefined(undefined); // true\r\n * isStrictNullOrUndefined(\"undefined\"); // false\r\n *\r\n * let value = null;\r\n * isStrictNullOrUndefined(value); // true\r\n * let value = undefined;\r\n * isStrictNullOrUndefined(value); // true\r\n *\r\n * isStrictNullOrUndefined(\"\"); // false\r\n * isStrictNullOrUndefined(0); // false\r\n * isStrictNullOrUndefined(new Date()); // false\r\n * isStrictNullOrUndefined(true); // false\r\n * isStrictNullOrUndefined(false); // false\r\n * ```\r\n */\r\nexport function isStrictNullOrUndefined(value: any): boolean {\r\n return value === NULL_VALUE || !isDefined(value);\r\n}\r\n\r\n/**\r\n * Checks if the passed value is defined, which means it has any value and is not undefined.\r\n * A string value of \"undefined\" is considered to be defined.\r\n * @group Value Check\r\n * @param arg - The value to check\r\n * @returns true if arg has a value (is not === undefined)\r\n * @example\r\n * ```ts\r\n * isDefined(null); // false\r\n * isDefined(undefined); // false\r\n * isDefined(\"undefined\"); // true\r\n *\r\n * let value = null;\r\n * isDefined(value); // false\r\n * let value = undefined;\r\n * isDefined(value); // false\r\n *\r\n * isDefined(\"\"); // true\r\n * isDefined(0); // true\r\n * isDefined(new Date()); // true\r\n * isDefined(true); // true\r\n * isDefined(false); // true\r\n * ```\r\n */\r\nexport function isDefined(arg: any): boolean {\r\n return !!arg || arg !== UNDEF_VALUE;\r\n}\r\n\r\n/**\r\n * Identifies whether the provided value is a JavaScript [primitive](https://developer.mozilla.org/en-US/docs/Glossary/Primitive)\r\n * which is when is it not an object and has no methods or properties. There are 7 primitive data types:\r\n * - string\r\n * - number\r\n * - bigint\r\n * - boolean\r\n * - undefined\r\n * - null\r\n * - symbol\r\n *\r\n * Most of the time, a primitive value is represented directly at the lowest level of the language implementation.\r\n *\r\n * All primitives are immutable; that is, they cannot be altered. It is important not to confuse a primitive itself\r\n * with a variable assigned a primitive value. The variable may be reassigned to a new value, but the existing value\r\n * can not be changed in the ways that objects, arrays, and functions can be altered. The language does not offer\r\n * utilities to mutate primitive values.\r\n * @since 0.4.4\r\n * @group Type Identity\r\n * @param value - The value to check whether it's a primitive value\r\n * @example\r\n * ```ts\r\n * isPrimitive(null); // true\r\n * isPrimitive(undefined); // true\r\n * isPrimitive(\"null\"); // true\r\n * isPrimitive(\"undefined\"); // true\r\n * isPrimitive(\"1\"); // true\r\n * isPrimitive(\"aa\"); // true\r\n * isPrimitive(1); // true\r\n * isPrimitive(Number(2)); // true\r\n * isPrimitive(\"\"); // true\r\n * isPrimitive(String(\"\")); // true\r\n * isPrimitive(true); // true\r\n * isPrimitive(false); // true\r\n * isPrimitive(\"true\"); // true\r\n * isPrimitive(\"false\"); // true\r\n * isPrimitive(BigInt(42)); // true\r\n * isPrimitive(Symbol.for(\"Hello\")); // true\r\n *\r\n * isPrimitive(new String(\"aa\")); // false\r\n * isPrimitive(new Date()); // false\r\n * isPrimitive(_dummyFunction); // false\r\n * isPrimitive([]); // false\r\n * isPrimitive(new Array(1)); // false\r\n * isPrimitive(new Boolean(true)); // false\r\n * isPrimitive(new Boolean(false)); // false\r\n * isPrimitive(new Boolean(\"true\")); // false\r\n * isPrimitive(new Boolean(\"false\")); // false\r\n * ```\r\n */\r\nexport const isPrimitive = (value: any): value is string | number | bigint | boolean | undefined | symbol | null => {\r\n return value === NULL_VALUE || isPrimitiveType(typeof value);\r\n};\r\n\r\n/**\r\n * Identifies whether the provided value is a JavaScript [primitive](https://developer.mozilla.org/en-US/docs/Glossary/Primitive)\r\n * which is when is it not an object and has no methods or properties. There are 6 primitive data types:\r\n * - string\r\n * - number\r\n * - bigint\r\n * - boolean\r\n * - undefined\r\n * - symbol\r\n *\r\n * Most of the time, a primitive value is represented directly at the lowest level of the language implementation.\r\n *\r\n * All primitives are immutable; that is, they cannot be altered. It is important not to confuse a primitive itself\r\n * with a variable assigned a primitive value. The variable may be reassigned to a new value, but the existing value\r\n * can not be changed in the ways that objects, arrays, and functions can be altered. The language does not offer\r\n * utilities to mutate primitive values.\r\n * @since 0.9.6\r\n * @group Type Identity\r\n * @param theType - The type as a string value to be checked whther it's a primitive type, this should be the value\r\n * returned from `typeof value`.\r\n * @example\r\n * ```ts\r\n * isPrimitiveType(null); // false\r\n * isPrimitiveType(undefined); // false\r\n * isPrimitiveType(\"null\"); // false\r\n * isPrimitiveType(\"undefined\"); // false\r\n * isPrimitiveType(\"1\"); // false\r\n * isPrimitiveType(\"aa\"); // false\r\n * isPrimitiveType(1); // false\r\n * isPrimitiveType(Number(2)); // false\r\n * isPrimitiveType(\"\"); // false\r\n * isPrimitiveType(String(\"\")); // false\r\n * isPrimitiveType(true); // false\r\n * isPrimitiveType(false); // false\r\n * isPrimitiveType(\"true\"); // false\r\n * isPrimitiveType(\"false\"); // false\r\n * isPrimitiveType(BigInt(42)); // false\r\n * isPrimitiveType(Symbol.for(\"Hello\")); // false\r\n *\r\n * isPrimitiveType(\"string\"); // true\r\n * isPrimitiveType(\"number\"); // true\r\n * isPrimitiveType(\"boolean\"); // true\r\n * isPrimitiveType(\"undefined\"); // true\r\n * isPrimitiveType(\"symbol\"); // true\r\n * isPrimitiveType(\"bigint\"); // true\r\n * ```\r\n */\r\nexport const isPrimitiveType = (theType: string): boolean => {\r\n return theType !== OBJECT && PRIMITIVE_TYPES.indexOf(theType) !== -1;\r\n};\r\n\r\n/**\r\n * Checks to see if the past value is a string value\r\n * @group Type Identity\r\n * @group String\r\n * @param value - The value to check\r\n * @returns\r\n * @example\r\n * ```ts\r\n * isString(\"\"); // true\r\n * isString(\"null\"); // true\r\n * isString(\"undefined\"); // true\r\n * isString(String(\"\")); // true\r\n *\r\n * isString(null); // false\r\n * isString(undefined); // false\r\n * isString(0); // false\r\n * ```\r\n */\r\nexport const isString: (value: any) => value is string = _createIs(STRING);\r\n\r\n/**\r\n * Checks to see if the past value is a function value\r\n * @group Type Identity\r\n * @param value - The value to check\r\n * @returns\r\n * @example\r\n * ```ts\r\n * function myFunction() { }\r\n * isFunction(null); // false\r\n * isFunction(undefined); // false\r\n * isFunction(\"null\"); // false\r\n * isFunction(\"undefined\"); // false\r\n * isFunction(\"1\"); // false\r\n * isFunction(\"aa\"); // false\r\n * isFunction(new Date()); // false\r\n * isFunction(1); // false\r\n * isFunction(\"\"); // false\r\n * isFunction(myFunction); // true\r\n * isFunction([]); // false\r\n * isFunction(new Array(1)); // false\r\n * ```\r\n */\r\nexport const isFunction: (value: any) => value is Function = _createIs(FUNCTION);\r\n\r\n/**\r\n * Checks to see if the past value is an object value\r\n * @group Type Identity\r\n * @group Object\r\n * @typeParam T - The object type, defaults to any\r\n * @param value - The value to check\r\n * @returns\r\n */\r\nexport function isObject(value: T): value is T {\r\n if (!value && isNullOrUndefined(value)) {\r\n return false;\r\n }\r\n\r\n return !!value && typeof value === OBJECT;\r\n}\r\n\r\n/**\r\n * Checks if the type of value is an Array.\r\n *\r\n * @group Type Identity\r\n * @group Array\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a Array, false otherwise.\r\n * @example\r\n * ```ts\r\n * import { isArray, isObject } from \"@nevware21/ts-utils\";\r\n *\r\n * function performAction(value: any) {\r\n * if (isArray(value) || isObject(value)) {\r\n * // Do something\r\n * } else {\r\n * // Do something else\r\n * }\r\n * }\r\n * ```\r\n */\r\nexport const isArray: (arg: any) => arg is Array = ArrCls.isArray;\r\n\r\n/**\r\n * Check if an object is of type Date\r\n * @group Type Identity\r\n * @example\r\n * ```ts\r\n * import { isDate } from \"@nevware21/ts-utils\";\r\n *\r\n * let _theDate = null;\r\n *\r\n * function getSetDate(newDate?: any) {\r\n * _theDate = isDate(newDate) ? newDate : new Date();\r\n *\r\n * return _theDate;\r\n * }\r\n * ```\r\n */\r\nexport const isDate: (value: any) => value is Date = _createObjIs(\"Date\");\r\n\r\n/**\r\n * Checks if the type of value is a number.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a number, false otherwise.\r\n */\r\nexport const isNumber: (value: any) => value is number = _createIs(NUMBER);\r\n\r\n/**\r\n * Checks if the type of value is a boolean.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a boolean, false otherwise.\r\n */\r\nexport const isBoolean: (value: any) => value is boolean = _createIs(BOOLEAN);\r\n\r\n/**\r\n * Determines if a value is a regular expression object.\r\n * @group Type Identity\r\n * @param {*} value Reference to check.\r\n * @returns {boolean} True if `value` is a `RegExp`.\r\n */\r\nexport const isRegExp: (value: any) => value is RegExp = _createObjIs(\"RegExp\");\r\n\r\n/**\r\n * Checks if the type of value is a File object.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a File, false otherwise.\r\n */\r\nexport const isFile: (value: any) => value is File = _createObjIs(\"File\");\r\n\r\n/**\r\n * Checks if the type of value is a FormData object.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a FormData, false otherwise.\r\n */\r\nexport const isFormData: (value: any) => value is FormData = _createObjIs(\"FormData\");\r\n\r\n/**\r\n * Checks if the type of value is a Blob object.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a Blob, false otherwise.\r\n */\r\nexport const isBlob: (value: any) => value is Blob = _createObjIs(\"Blob\");\r\n\r\n/**\r\n * Checks if the type of value is a ArrayBuffer object.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a ArrayBuffer, false otherwise.\r\n */\r\nexport const isArrayBuffer: (value: any) => value is ArrayBuffer = _createObjIs(\"ArrayBuffer\");\r\n\r\n/**\r\n * Checks if the type of value is a Error object.\r\n * @group Type Identity\r\n * @group Error\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a Error, false otherwise.\r\n */\r\nexport const isError: (value: any) => value is Error = _createObjIs(\"Error\");\r\n\r\n/**\r\n * Checks if the type of value is a PromiseLike instance (contains a then function).\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a PromiseLike, false otherwise.\r\n */\r\nexport function isPromiseLike(value: any): value is PromiseLike {\r\n return !!value && isFunction(value.then);\r\n}\r\n\r\n/**\r\n * Checks if the type of value is a PromiseLike instance (contains a then function).\r\n * This is an alias for {@link isPromiseLike}.\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a PromiseLike, false otherwise.\r\n */\r\nexport const isThenable: (value: any) => value is PromiseLike = isPromiseLike;\r\n\r\n/**\r\n * Checks if the type of value is a Promise instance (contains then and catch functions).\r\n * @group Type Identity\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a Promise, false otherwise.\r\n */\r\nexport function isPromise(value: any): value is Promise {\r\n return isPromiseLike(value) && isFunction((value as any).catch);\r\n}\r\n\r\n/**\r\n * Checks if the type of value does not evaluate to true value, handling some special\r\n * case usages of Boolean(true/false) and new Boolean(true/false).\r\n * @group Value Check\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is not truthy, false otherwise.\r\n */\r\nexport function isNotTruthy(value: any) {\r\n return !value || !safeGet(() => (value && (0 + value)), value);\r\n}\r\n\r\n/**\r\n * Checks if the type of value evaluates to true value, handling some special\r\n * case usages of Boolean(true/false) and new Boolean(true/false).\r\n * @group Value Check\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is not truthy, false otherwise.\r\n */\r\nexport function isTruthy(value: any) {\r\n // Objects created with no prototype (Object.create(null)) cannot be converted to primitives\r\n // Which causes this code to throw, additionally just using !! also fails for Boolean objects\r\n // !!(new Boolean(false)) evaluates to true\r\n return !(!value || safeGet(() => !(value && (0 + value)), !value));\r\n //return !(!value || !(value && (0 + value)));\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n/**\r\n * Function to safely execute a callback function, if the function throws the provided default\r\n * value will be returned.\r\n * @since 0.9.5\r\n * @group Safe\r\n * @param cb - Callback function be wrapped with an exception\r\n * @param defValue - The default value to return when an exception is thrown\r\n * @returns The result of the callback function or the default if an exception occurred calling the callback\r\n * function.\r\n * @example\r\n * ```ts\r\n * let theExpression = \"{ invalid: json value\";\r\n *\r\n * let result = safeGet(() => {\r\n * return JSON.parse(theExpression);\r\n * }, {});\r\n *\r\n * // result === {};\r\n * ```\r\n */\r\nexport function safeGet(cb, defValue) {\r\n var result = defValue;\r\n try {\r\n result = cb();\r\n }\r\n catch (e) {\r\n // Do nothing\r\n }\r\n return result;\r\n}\r\n//# sourceMappingURL=safe_get.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\n/**\r\n * Function to safely execute a callback function, if the function throws the provided default\r\n * value will be returned.\r\n * @since 0.9.5\r\n * @group Safe\r\n * @param cb - Callback function be wrapped with an exception\r\n * @param defValue - The default value to return when an exception is thrown\r\n * @returns The result of the callback function or the default if an exception occurred calling the callback\r\n * function.\r\n * @example\r\n * ```ts\r\n * let theExpression = \"{ invalid: json value\";\r\n *\r\n * let result = safeGet(() => {\r\n * return JSON.parse(theExpression);\r\n * }, {});\r\n *\r\n * // result === {};\r\n * ```\r\n */\r\nexport function safeGet(cb: () => T, defValue: T): T {\r\n let result = defValue;\r\n try {\r\n result = cb();\r\n } catch (e) {\r\n // Do nothing\r\n }\r\n\r\n return result;\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { isObject } from \"../helpers/base\";\r\nimport { objHasOwn } from \"./has_own\";\r\n/**\r\n * Calls the provided `callbackFn` function once for each key in an object. This is equivelent to `arrForEach(Object.keys(theObject), callbackFn)` or\r\n * if not using the array helper `Object.keys(theObject).forEach(callbackFn)` except that this helper avoid creating a temporary of the object\r\n * keys before iterating over them and like the `arrForEach` helper you CAN stop or break the iteration by returning -1 from the `callbackFn` function.\r\n * @group Object\r\n * @typeParam T - The object type\r\n * @param callbackfn A function that accepts up to two arguments, the key name and the current value of the property represented by the key.\r\n * @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, null or undefined\r\n * the object will be used as the this value.\r\n * @example\r\n * ```ts\r\n * function performAction(target: T, source: any) {\r\n * if (!isNullOrUndefined(source)) {\r\n * objForEachKey(source, (key, value) => {\r\n * // Set the target with a reference to the same value with the same name\r\n * target[key] = value;\r\n * });\r\n * }\r\n *\r\n * return target;\r\n * }\r\n * ```\r\n */\r\nexport function objForEachKey(theObject, callbackfn, thisArg) {\r\n if (theObject && isObject(theObject)) {\r\n for (var prop in theObject) {\r\n if (objHasOwn(theObject, prop)) {\r\n if (callbackfn.call(thisArg || theObject, prop, theObject[prop]) === -1) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n//# sourceMappingURL=for_each_key.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { isObject } from \"../helpers/base\";\r\nimport { objHasOwn } from \"./has_own\";\r\n\r\n/**\r\n * Calls the provided `callbackFn` function once for each key in an object. This is equivelent to `arrForEach(Object.keys(theObject), callbackFn)` or\r\n * if not using the array helper `Object.keys(theObject).forEach(callbackFn)` except that this helper avoid creating a temporary of the object\r\n * keys before iterating over them and like the `arrForEach` helper you CAN stop or break the iteration by returning -1 from the `callbackFn` function.\r\n * @group Object\r\n * @typeParam T - The object type\r\n * @param callbackfn A function that accepts up to two arguments, the key name and the current value of the property represented by the key.\r\n * @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, null or undefined\r\n * the object will be used as the this value.\r\n * @example\r\n * ```ts\r\n * function performAction(target: T, source: any) {\r\n * if (!isNullOrUndefined(source)) {\r\n * objForEachKey(source, (key, value) => {\r\n * // Set the target with a reference to the same value with the same name\r\n * target[key] = value;\r\n * });\r\n * }\r\n *\r\n * return target;\r\n * }\r\n * ```\r\n */\r\nexport function objForEachKey(theObject: T, callbackfn: (key: string, value: T[keyof T]) => void | number, thisArg?: any): void {\r\n if (theObject && isObject(theObject)) {\r\n for (const prop in theObject) {\r\n if (objHasOwn(theObject, prop)) {\r\n if (callbackfn.call(thisArg || theObject, prop, theObject[prop]) === -1) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { ObjClass } from \"../internal/constants\";\r\nimport { objGetOwnPropertyDescriptor } from \"./get_own_prop_desc\";\r\nimport { objHasOwnProperty } from \"./has_own_prop\";\r\n/**\r\n * The objHasOwn() method returns a boolean indicating whether the object\r\n * has the specified property as its own property (as opposed to inheriting it).\r\n * If the property is inherited, or does not exist, the method returns false.\r\n *\r\n * The objHasOwn() method returns true if the specified property is a direct property\r\n * of the object — even if the property value is null or undefined. The method returns\r\n * false if the property is inherited, or has not been declared at all. Unlike the in operator,\r\n * this method does not check for the specified property in the object's prototype chain.\r\n *\r\n * It is recommended over {@link objHasOwnProperty} () because it works for objects created using\r\n * objCreate(null) and with objects that have overridden the inherited hasOwnProperty() method.\r\n * While it is possible to workaround these problems by calling Object.prototype.hasOwnProperty()\r\n * on an external object, Object.hasOwn() is more intuitive.\r\n *\r\n * @since 0.4.3\r\n * @group Object\r\n * @param obj - The object being evaluated\r\n * @param prop - The String or Symbol of the property to test\r\n * @returns `true` if the object has the specified property as own property; otherwise `false`\r\n * @example\r\n * ```ts\r\n * let example = {};\r\n * objHasOwn(example, 'prop'); // false\r\n *\r\n * example.prop = 'exists';\r\n * objHasOwn(example, 'prop'); // true - 'prop' has been defined\r\n *\r\n * example.prop = null;\r\n * objHasOwn(example, 'prop'); // true - own property exists with value of null\r\n *\r\n * example.prop = undefined;\r\n * objHasOwn(example, 'prop'); // true - own property exists with value of undefined\r\n * ```\r\n */\r\nexport var objHasOwn = ObjClass[\"hasOwn\"] || polyObjHasOwn;\r\n/**\r\n * The polyObjHasOwn() method is a polyfill for {@link objHasOwn} when the native\r\n * [Object.hasOwnreturns](https://caniuse.com/?search=hasOwn) is not supported, it returns a\r\n * boolean indicating whether the object has the specified property as its own property (as\r\n * opposed to inheriting it). If the property is inherited, or does not exist, the method\r\n * returns false.\r\n *\r\n * The objHasOwn() method returns true if the specified property is a direct property\r\n * of the object — even if the property value is null or undefined. The method returns\r\n * false if the property is inherited, or has not been declared at all. Unlike the in operator,\r\n * this method does not check for the specified property in the object's prototype chain.\r\n *\r\n * It is recommended over objHasOwnProperty() because it works for objects created using\r\n * objCreate(null) and with objects that have overridden the inherited hasOwnProperty() method.\r\n * While it is possible to workaround these problems by calling Object.prototype.hasOwnProperty()\r\n * on an external object, Object.hasOwn() is more intuitive.\r\n *\r\n * @since 0.4.3\r\n * @group Object\r\n * @group Polyfill\r\n * @param obj - The object being evaluated\r\n * @param prop - The String or Symbol of the property to test\r\n * @returns `true` if the object has the specified property as own property; otherwise `false`\r\n * @example\r\n * ```ts\r\n * let example = {};\r\n * polyObjHasOwn(example, 'prop'); // false\r\n *\r\n * example.prop = 'exists';\r\n * polyObjHasOwn(example, 'prop'); // true - 'prop' has been defined\r\n *\r\n * example.prop = null;\r\n * polyObjHasOwn(example, 'prop'); // true - own property exists with value of null\r\n *\r\n * example.prop = undefined;\r\n * polyObjHasOwn(example, 'prop'); // true - own property exists with value of undefined\r\n * ```\r\n */\r\nexport function polyObjHasOwn(obj, prop) {\r\n return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);\r\n}\r\n//# sourceMappingURL=has_own.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ObjClass } from \"../internal/constants\";\r\nimport { objGetOwnPropertyDescriptor } from \"./get_own_prop_desc\";\r\nimport { objHasOwnProperty } from \"./has_own_prop\";\r\n\r\n/**\r\n * The objHasOwn() method returns a boolean indicating whether the object\r\n * has the specified property as its own property (as opposed to inheriting it).\r\n * If the property is inherited, or does not exist, the method returns false.\r\n *\r\n * The objHasOwn() method returns true if the specified property is a direct property\r\n * of the object — even if the property value is null or undefined. The method returns\r\n * false if the property is inherited, or has not been declared at all. Unlike the in operator,\r\n * this method does not check for the specified property in the object's prototype chain.\r\n *\r\n * It is recommended over {@link objHasOwnProperty} () because it works for objects created using\r\n * objCreate(null) and with objects that have overridden the inherited hasOwnProperty() method.\r\n * While it is possible to workaround these problems by calling Object.prototype.hasOwnProperty()\r\n * on an external object, Object.hasOwn() is more intuitive.\r\n *\r\n * @since 0.4.3\r\n * @group Object\r\n * @param obj - The object being evaluated\r\n * @param prop - The String or Symbol of the property to test\r\n * @returns `true` if the object has the specified property as own property; otherwise `false`\r\n * @example\r\n * ```ts\r\n * let example = {};\r\n * objHasOwn(example, 'prop'); // false\r\n *\r\n * example.prop = 'exists';\r\n * objHasOwn(example, 'prop'); // true - 'prop' has been defined\r\n *\r\n * example.prop = null;\r\n * objHasOwn(example, 'prop'); // true - own property exists with value of null\r\n *\r\n * example.prop = undefined;\r\n * objHasOwn(example, 'prop'); // true - own property exists with value of undefined\r\n * ```\r\n */\r\nexport const objHasOwn: (obj: T, prop: PropertyKey) => boolean = (ObjClass as any)[\"hasOwn\"] || polyObjHasOwn;\r\n\r\n/**\r\n * The polyObjHasOwn() method is a polyfill for {@link objHasOwn} when the native\r\n * [Object.hasOwnreturns](https://caniuse.com/?search=hasOwn) is not supported, it returns a\r\n * boolean indicating whether the object has the specified property as its own property (as\r\n * opposed to inheriting it). If the property is inherited, or does not exist, the method\r\n * returns false.\r\n *\r\n * The objHasOwn() method returns true if the specified property is a direct property\r\n * of the object — even if the property value is null or undefined. The method returns\r\n * false if the property is inherited, or has not been declared at all. Unlike the in operator,\r\n * this method does not check for the specified property in the object's prototype chain.\r\n *\r\n * It is recommended over objHasOwnProperty() because it works for objects created using\r\n * objCreate(null) and with objects that have overridden the inherited hasOwnProperty() method.\r\n * While it is possible to workaround these problems by calling Object.prototype.hasOwnProperty()\r\n * on an external object, Object.hasOwn() is more intuitive.\r\n *\r\n * @since 0.4.3\r\n * @group Object\r\n * @group Polyfill\r\n * @param obj - The object being evaluated\r\n * @param prop - The String or Symbol of the property to test\r\n * @returns `true` if the object has the specified property as own property; otherwise `false`\r\n * @example\r\n * ```ts\r\n * let example = {};\r\n * polyObjHasOwn(example, 'prop'); // false\r\n *\r\n * example.prop = 'exists';\r\n * polyObjHasOwn(example, 'prop'); // true - 'prop' has been defined\r\n *\r\n * example.prop = null;\r\n * polyObjHasOwn(example, 'prop'); // true - own property exists with value of null\r\n *\r\n * example.prop = undefined;\r\n * polyObjHasOwn(example, 'prop'); // true - own property exists with value of undefined\r\n * ```\r\n */\r\nexport function polyObjHasOwn(obj: T, prop: PropertyKey): boolean {\r\n return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop)\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { ObjClass } from \"../internal/constants\";\r\n/**\r\n * The objGetOwnPropertyDescriptor() method returns an object describing the configuration of a specific property on\r\n * a given object (that is, one directly present on an object and not in the object's prototype chain). The object\r\n * returned is mutable but mutating it has no effect on the original property's configuration.\r\n * @since 0.4.3\r\n * @group Object\r\n * @param target - Object that contains the property.\r\n * @param prop - Name of the property.\r\n * @returns A property descriptor of the given property if it exists on the object, otherwise undefined.\r\n *\r\n * @example\r\n * ```ts\r\n * o = {};\r\n * objDefineProp(o, 'qux', {\r\n * value: 8675309,\r\n * writable: false,\r\n * enumerable: false\r\n * });\r\n * d = objGetOwnPropertyDescriptor(o, 'qux');\r\n * // d is {\r\n * // value: 8675309,\r\n * // writable: false,\r\n * // enumerable: false,\r\n * // configurable: false\r\n * // }\r\n *\r\n * objGetOwnPropertyDescriptor('foo', 0);\r\n * // TypeError: \"foo\" is not an object // ES5 code\r\n *\r\n * objGetOwnPropertyDescriptor('foo', 0);\r\n * // Object returned by ES2015 code: {\r\n * // configurable: false,\r\n * // enumerable: true,\r\n * // value: \"f\",\r\n * // writable: false\r\n * // }\r\n * ```\r\n * Note: In ES5, if the first argument to this method is not an object (a primitive), then it will cause a TypeError. In ES2015, a non-object first argument will be coerced to an object at first.\r\n */\r\nexport var objGetOwnPropertyDescriptor = ObjClass.getOwnPropertyDescriptor;\r\n//# sourceMappingURL=get_own_prop_desc.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ObjClass } from \"../internal/constants\";\r\n\r\n/**\r\n * The objGetOwnPropertyDescriptor() method returns an object describing the configuration of a specific property on\r\n * a given object (that is, one directly present on an object and not in the object's prototype chain). The object\r\n * returned is mutable but mutating it has no effect on the original property's configuration.\r\n * @since 0.4.3\r\n * @group Object\r\n * @param target - Object that contains the property.\r\n * @param prop - Name of the property.\r\n * @returns A property descriptor of the given property if it exists on the object, otherwise undefined.\r\n *\r\n * @example\r\n * ```ts\r\n * o = {};\r\n * objDefineProp(o, 'qux', {\r\n * value: 8675309,\r\n * writable: false,\r\n * enumerable: false\r\n * });\r\n * d = objGetOwnPropertyDescriptor(o, 'qux');\r\n * // d is {\r\n * // value: 8675309,\r\n * // writable: false,\r\n * // enumerable: false,\r\n * // configurable: false\r\n * // }\r\n *\r\n * objGetOwnPropertyDescriptor('foo', 0);\r\n * // TypeError: \"foo\" is not an object // ES5 code\r\n *\r\n * objGetOwnPropertyDescriptor('foo', 0);\r\n * // Object returned by ES2015 code: {\r\n * // configurable: false,\r\n * // enumerable: true,\r\n * // value: \"f\",\r\n * // writable: false\r\n * // }\r\n * ```\r\n * Note: In ES5, if the first argument to this method is not an object (a primitive), then it will cause a TypeError. In ES2015, a non-object first argument will be coerced to an object at first.\r\n */\r\nexport const objGetOwnPropertyDescriptor: (target: any, prop: PropertyKey) => PropertyDescriptor | undefined = ObjClass.getOwnPropertyDescriptor;","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { ObjProto } from \"../internal/constants\";\r\n/**\r\n * The objHasOwnProperty() method returns a boolean indicating whether the object\r\n * has the specified property as its own property (as opposed to inheriting it).\r\n *\r\n * The objHasOwnProperty() method returns true if the specified property is a direct\r\n * property of the object — even if the value is null or undefined. The method returns\r\n * false if the property is inherited, or has not been declared at all. Unlike the in\r\n * operator, this method does not check for the specified property in the object's\r\n * prototype chain.\r\n *\r\n * The method can be called on most JavaScript objects, because most objects descend\r\n * from Object, and hence inherit its methods. For example Array is an Object, so you\r\n * can use objHasOwnProperty() method to check whether an index exists:\r\n * @group Object\r\n * @param obj - The object being evaluated\r\n * @param prop - The String or Symbol of the property to test\r\n * @returns `true` if the object has the specified property as own property; otherwise `false`\r\n * @example\r\n * ```ts\r\n * let example = {};\r\n * objHasOwnProperty(example, 'prop'); // false\r\n *\r\n * example.prop = 'exists';\r\n * objHasOwnProperty(example, 'prop'); // true - 'prop' has been defined\r\n *\r\n * example.prop = null;\r\n * objHasOwnProperty(example, 'prop'); // true - own property exists with value of null\r\n *\r\n * example.prop = undefined;\r\n * objHasOwnProperty(example, 'prop'); // true - own property exists with value of undefined\r\n * ```\r\n */\r\nexport function objHasOwnProperty(obj, prop) {\r\n return obj && ObjProto.hasOwnProperty.call(obj, prop);\r\n}\r\n//# sourceMappingURL=has_own_prop.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ObjProto } from \"../internal/constants\";\r\n\r\n/**\r\n * The objHasOwnProperty() method returns a boolean indicating whether the object\r\n * has the specified property as its own property (as opposed to inheriting it).\r\n *\r\n * The objHasOwnProperty() method returns true if the specified property is a direct\r\n * property of the object — even if the value is null or undefined. The method returns\r\n * false if the property is inherited, or has not been declared at all. Unlike the in\r\n * operator, this method does not check for the specified property in the object's\r\n * prototype chain.\r\n *\r\n * The method can be called on most JavaScript objects, because most objects descend\r\n * from Object, and hence inherit its methods. For example Array is an Object, so you\r\n * can use objHasOwnProperty() method to check whether an index exists:\r\n * @group Object\r\n * @param obj - The object being evaluated\r\n * @param prop - The String or Symbol of the property to test\r\n * @returns `true` if the object has the specified property as own property; otherwise `false`\r\n * @example\r\n * ```ts\r\n * let example = {};\r\n * objHasOwnProperty(example, 'prop'); // false\r\n *\r\n * example.prop = 'exists';\r\n * objHasOwnProperty(example, 'prop'); // true - 'prop' has been defined\r\n *\r\n * example.prop = null;\r\n * objHasOwnProperty(example, 'prop'); // true - own property exists with value of null\r\n *\r\n * example.prop = undefined;\r\n * objHasOwnProperty(example, 'prop'); // true - own property exists with value of undefined\r\n * ```\r\n */\r\nexport function objHasOwnProperty(obj: T, prop: PropertyKey): boolean {\r\n return obj && ObjProto.hasOwnProperty.call(obj, prop);\r\n}\r\n","\"use strict\";","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n/**\r\n * Throw an error exception with the specified optional message\r\n * @group Error\r\n * @param message\r\n */\r\nexport function throwError(message) {\r\n throw new Error(message);\r\n}\r\n/**\r\n * Throw a type error with the specified optional message\r\n * @group Error\r\n * @param message\r\n */\r\nexport function throwTypeError(message) {\r\n throw new TypeError(message);\r\n}\r\n/**\r\n * Throw a RangeError with the specified optional message\r\n * @group Error\r\n * @param message\r\n */\r\nexport function throwRangeError(message) {\r\n throw new RangeError(message);\r\n}\r\n//# sourceMappingURL=throw.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\n/**\r\n * Throw an error exception with the specified optional message\r\n * @group Error\r\n * @param message\r\n */\r\nexport function throwError(message?: string): never {\r\n throw new Error(message);\r\n}\r\n\r\n/**\r\n * Throw a type error with the specified optional message\r\n * @group Error\r\n * @param message\r\n */\r\nexport function throwTypeError(message?: string): never {\r\n throw new TypeError(message);\r\n}\r\n\r\n/**\r\n * Throw a RangeError with the specified optional message\r\n * @group Error\r\n * @param message\r\n */\r\nexport function throwRangeError(message?: string): never {\r\n throw new RangeError(message);\r\n}","/**\r\n* ApplicationInsights.ts\r\n* @copyright Microsoft 2018\r\n*/\r\nvar _a;\r\nimport { __assign, __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { AnalyticsPluginIdentifier, Event as EventTelemetry, Exception, Metric, PageView, PageViewPerformance, PropertiesPluginIdentifier, RemoteDependencyData, Trace, createDistributedTraceContextFromTrace, createDomEvent, createTelemetryItem, dataSanitizeString, isCrossOriginError, strNotSpecified, utlDisableStorage, utlEnableStorage } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, InstrumentEvent, arrForEach, cfgDfBoolean, cfgDfSet, cfgDfString, cfgDfValidate, createProcessTelemetryContext, createUniqueNamespace, dumpObj, eventOff, eventOn, generateW3CId, getDocument, getExceptionName, getHistory, getLocation, getWindow, hasHistory, hasWindow, isFunction, isNullOrUndefined, isString, isUndefined, mergeEvtNamespace, onConfigChange, safeGetCookieMgr, strUndefined, throwError } from \"@microsoft/applicationinsights-core-js\";\r\nimport { isError, objDeepFreeze, objDefine, scheduleTimeout, strIndexOf } from \"@nevware21/ts-utils\";\r\nimport { _DYN_ADD_TELEMETRY_INITIA7, _DYN_AUTO_TRACK_PAGE_VISI9, _DYN_AUTO_UNHANDLED_PROMI13, _DYN_COLUMN_NUMBER, _DYN_CORE, _DYN_DATA_TYPE, _DYN_DIAG_LOG, _DYN_ENABLE_AUTO_ROUTE_TR11, _DYN_ENABLE_UNHANDLED_PRO12, _DYN_ENVELOPE_TYPE, _DYN_ERROR, _DYN_ERROR_SRC, _DYN_EXCEPTION, _DYN_HREF, _DYN_IS_BROWSER_LINK_TRAC10, _DYN_IS_STORAGE_USE_DISAB0, _DYN_LENGTH, _DYN_LINE_NUMBER, _DYN_MESSAGE, _DYN_OVERRIDE_PAGE_VIEW_D8, _DYN_POPULATE_PAGE_VIEW_P4, _DYN_SEND_EXCEPTION_INTER5, _DYN_SEND_PAGE_VIEW_INTER2, _DYN_SEND_PAGE_VIEW_PERFO3, _DYN_TO_STRING, _DYN_TRACK, _DYN_TRACK_PAGE_VIEW, _DYN_TRACK_PREVIOUS_PAGE_1, _DYN__ADD_HOOK, _DYN__CREATE_AUTO_EXCEPTI6, _DYN__ONERROR } from \"../__DynamicConstants\";\r\nimport { PageViewManager } from \"./Telemetry/PageViewManager\";\r\nimport { PageViewPerformanceManager } from \"./Telemetry/PageViewPerformanceManager\";\r\nimport { PageVisitTimeManager } from \"./Telemetry/PageVisitTimeManager\";\r\nimport { Timing } from \"./Timing\";\r\nvar strEvent = \"event\";\r\nfunction _dispatchEvent(target, evnt) {\r\n if (target && target.dispatchEvent && evnt) {\r\n target.dispatchEvent(evnt);\r\n }\r\n}\r\nfunction _getReason(error) {\r\n if (error && error.reason) {\r\n var reason = error.reason;\r\n if (!isString(reason) && isFunction(reason[_DYN_TO_STRING /* @min:%2etoString */])) {\r\n return reason[_DYN_TO_STRING /* @min:%2etoString */]();\r\n }\r\n return dumpObj(reason);\r\n }\r\n // Pass the original object down which will eventually get evaluated for any message or description\r\n return error || \"\";\r\n}\r\nvar MinMilliSeconds = 60000;\r\nvar defaultValues = objDeepFreeze((_a = {\r\n sessionRenewalMs: cfgDfSet(_chkConfigMilliseconds, 30 * 60 * 1000),\r\n sessionExpirationMs: cfgDfSet(_chkConfigMilliseconds, 24 * 60 * 60 * 1000),\r\n disableExceptionTracking: cfgDfBoolean()\r\n },\r\n _a[_DYN_AUTO_TRACK_PAGE_VISI9 /* @min:autoTrackPageVisitTime */] = cfgDfBoolean(),\r\n _a[_DYN_OVERRIDE_PAGE_VIEW_D8 /* @min:overridePageViewDuration */] = cfgDfBoolean(),\r\n _a[_DYN_ENABLE_UNHANDLED_PRO12 /* @min:enableUnhandledPromiseRejectionTracking */] = cfgDfBoolean(),\r\n _a[_DYN_AUTO_UNHANDLED_PROMI13 /* @min:autoUnhandledPromiseInstrumented */] = false,\r\n _a.samplingPercentage = cfgDfValidate(_chkSampling, 100),\r\n _a[_DYN_IS_STORAGE_USE_DISAB0 /* @min:isStorageUseDisabled */] = cfgDfBoolean(),\r\n _a[_DYN_IS_BROWSER_LINK_TRAC10 /* @min:isBrowserLinkTrackingEnabled */] = cfgDfBoolean(),\r\n _a[_DYN_ENABLE_AUTO_ROUTE_TR11 /* @min:enableAutoRouteTracking */] = cfgDfBoolean(),\r\n _a.namePrefix = cfgDfString(),\r\n _a.enableDebug = cfgDfBoolean(),\r\n _a.disableFlushOnBeforeUnload = cfgDfBoolean(),\r\n _a.disableFlushOnUnload = cfgDfBoolean(false, \"disableFlushOnBeforeUnload\"),\r\n _a));\r\nfunction _chkConfigMilliseconds(value, defValue) {\r\n value = value || defValue;\r\n if (value < MinMilliSeconds) {\r\n value = MinMilliSeconds;\r\n }\r\n return +value;\r\n}\r\nfunction _chkSampling(value) {\r\n return !isNaN(value) && value > 0 && value <= 100;\r\n}\r\nfunction _updateStorageUsage(extConfig) {\r\n // Not resetting the storage usage as someone may have manually called utlDisableStorage, so this will only\r\n // reset based if the configuration option is provided\r\n if (!isUndefined(extConfig[_DYN_IS_STORAGE_USE_DISAB0 /* @min:%2eisStorageUseDisabled */])) {\r\n if (extConfig[_DYN_IS_STORAGE_USE_DISAB0 /* @min:%2eisStorageUseDisabled */]) {\r\n utlDisableStorage();\r\n }\r\n else {\r\n utlEnableStorage();\r\n }\r\n }\r\n}\r\nvar AnalyticsPlugin = /** @class */ (function (_super) {\r\n __extends(AnalyticsPlugin, _super);\r\n function AnalyticsPlugin() {\r\n var _this = _super.call(this) || this;\r\n _this.identifier = AnalyticsPluginIdentifier; // do not change name or priority\r\n _this.priority = 180; // take from reserved priority range 100- 200\r\n _this.autoRoutePVDelay = 500; // ms; Time to wait after a route change before triggering a pageview to allow DOM changes to take place\r\n var _eventTracking;\r\n var _pageTracking;\r\n var _pageViewManager;\r\n var _pageViewPerformanceManager;\r\n var _pageVisitTimeManager;\r\n var _preInitTelemetryInitializers;\r\n var _isBrowserLinkTrackingEnabled;\r\n var _browserLinkInitializerAdded;\r\n var _enableAutoRouteTracking;\r\n var _historyListenerAdded;\r\n var _disableExceptionTracking;\r\n var _autoExceptionInstrumented;\r\n var _enableUnhandledPromiseRejectionTracking;\r\n var _autoUnhandledPromiseInstrumented;\r\n var _extConfig;\r\n var _autoTrackPageVisitTime;\r\n // Counts number of trackAjax invocations.\r\n // By default we only monitor X ajax call per view to avoid too much load.\r\n // Default value is set in config.\r\n // This counter keeps increasing even after the limit is reached.\r\n var _trackAjaxAttempts = 0;\r\n // array with max length of 2 that store current url and previous url for SPA page route change trackPageview use.\r\n var _prevUri; // Assigned in the constructor\r\n var _currUri;\r\n var _evtNamespace;\r\n dynamicProto(AnalyticsPlugin, _this, function (_self, _base) {\r\n var _addHook = _base[_DYN__ADD_HOOK /* @min:%2e_addHook */];\r\n _initDefaults();\r\n _self.getCookieMgr = function () {\r\n return safeGetCookieMgr(_self[_DYN_CORE /* @min:%2ecore */]);\r\n };\r\n _self.processTelemetry = function (env, itemCtx) {\r\n _self.processNext(env, itemCtx);\r\n };\r\n _self.trackEvent = function (event, customProperties) {\r\n try {\r\n var telemetryItem = createTelemetryItem(event, EventTelemetry[_DYN_DATA_TYPE /* @min:%2edataType */], EventTelemetry[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);\r\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\r\n }\r\n catch (e) {\r\n _throwInternal(2 /* eLoggingSeverity.WARNING */, 39 /* _eInternalMessageId.TrackTraceFailed */, \"trackTrace failed, trace will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n /**\r\n * Start timing an extended event. Call `stopTrackEvent` to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\r\n _self.startTrackEvent = function (name) {\r\n try {\r\n _eventTracking.start(name);\r\n }\r\n catch (e) {\r\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 29 /* _eInternalMessageId.StartTrackEventFailed */, \"startTrackEvent failed, event will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n /**\r\n * Log an extended event that you started timing with `startTrackEvent`.\r\n * @param name The string you used to identify this event in `startTrackEvent`.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n _self.stopTrackEvent = function (name, properties, measurements) {\r\n try {\r\n _eventTracking.stop(name, undefined, properties, measurements);\r\n }\r\n catch (e) {\r\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 30 /* _eInternalMessageId.StopTrackEventFailed */, \"stopTrackEvent failed, event will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n /**\r\n * @description Log a diagnostic message\r\n * @param trace\r\n * @param ICustomProperties.\r\n * @memberof ApplicationInsights\r\n */\r\n _self.trackTrace = function (trace, customProperties) {\r\n try {\r\n var telemetryItem = createTelemetryItem(trace, Trace[_DYN_DATA_TYPE /* @min:%2edataType */], Trace[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);\r\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\r\n }\r\n catch (e) {\r\n _throwInternal(2 /* eLoggingSeverity.WARNING */, 39 /* _eInternalMessageId.TrackTraceFailed */, \"trackTrace failed, trace will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n /**\r\n * @description Log a numeric value that is not associated with a specific event. Typically\r\n * used to send regular reports of performance indicators. To send single measurement, just\r\n * use the name and average fields of {@link IMetricTelemetry}. If you take measurements\r\n * frequently, you can reduce the telemetry bandwidth by aggregating multiple measurements\r\n * and sending the resulting average at intervals\r\n * @param metric - input object argument. Only name and average are mandatory.\r\n * @param } customProperties additional data used to filter metrics in the\r\n * portal. Defaults to empty.\r\n * @memberof ApplicationInsights\r\n */\r\n _self.trackMetric = function (metric, customProperties) {\r\n try {\r\n var telemetryItem = createTelemetryItem(metric, Metric[_DYN_DATA_TYPE /* @min:%2edataType */], Metric[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);\r\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\r\n }\r\n catch (e) {\r\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 36 /* _eInternalMessageId.TrackMetricFailed */, \"trackMetric failed, metric will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n /**\r\n * Logs that a page or other item was viewed.\r\n * @param IPageViewTelemetry - The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param customProperties - Additional data used to filter events and metrics. Defaults to empty.\r\n * If a user wants to provide duration for pageLoad, it'll have to be in pageView.properties.duration\r\n */\r\n _self[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */] = function (pageView, customProperties) {\r\n try {\r\n var inPv = pageView || {};\r\n _pageViewManager[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */](inPv, __assign(__assign(__assign({}, inPv.properties), inPv.measurements), customProperties));\r\n if (_autoTrackPageVisitTime) {\r\n _pageVisitTimeManager[_DYN_TRACK_PREVIOUS_PAGE_1 /* @min:%2etrackPreviousPageVisit */](inPv.name, inPv.uri);\r\n }\r\n }\r\n catch (e) {\r\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 37 /* _eInternalMessageId.TrackPVFailed */, \"trackPageView failed, page view will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n /**\r\n * Create a page view telemetry item and send it to the SDK pipeline through the core.track API\r\n * @param pageView - Page view item to be sent\r\n * @param properties - Custom properties (Part C) that a user can add to the telemetry item\r\n * @param systemProperties - System level properties (Part A) that a user can add to the telemetry item\r\n */\r\n _self[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */] = function (pageView, properties, systemProperties) {\r\n var doc = getDocument();\r\n if (doc) {\r\n pageView.refUri = pageView.refUri === undefined ? doc.referrer : pageView.refUri;\r\n }\r\n var telemetryItem = createTelemetryItem(pageView, PageView[_DYN_DATA_TYPE /* @min:%2edataType */], PageView[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties, systemProperties);\r\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\r\n // reset ajaxes counter\r\n _trackAjaxAttempts = 0;\r\n };\r\n /**\r\n * @ignore INTERNAL ONLY\r\n * @param pageViewPerformance\r\n * @param properties\r\n */\r\n _self[_DYN_SEND_PAGE_VIEW_PERFO3 /* @min:%2esendPageViewPerformanceInternal */] = function (pageViewPerformance, properties, systemProperties) {\r\n var telemetryItem = createTelemetryItem(pageViewPerformance, PageViewPerformance[_DYN_DATA_TYPE /* @min:%2edataType */], PageViewPerformance[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties, systemProperties);\r\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\r\n };\r\n /**\r\n * Send browser performance metrics.\r\n * @param pageViewPerformance\r\n * @param customProperties\r\n */\r\n _self.trackPageViewPerformance = function (pageViewPerformance, customProperties) {\r\n var inPvp = pageViewPerformance || {};\r\n try {\r\n _pageViewPerformanceManager[_DYN_POPULATE_PAGE_VIEW_P4 /* @min:%2epopulatePageViewPerformanceEvent */](inPvp);\r\n _self[_DYN_SEND_PAGE_VIEW_PERFO3 /* @min:%2esendPageViewPerformanceInternal */](inPvp, customProperties);\r\n }\r\n catch (e) {\r\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 37 /* _eInternalMessageId.TrackPVFailed */, \"trackPageViewPerformance failed, page view will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n /**\r\n * Starts the timer for tracking a page load time. Use this instead of `trackPageView` if you want to control when the page view timer starts and stops,\r\n * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call `stopTrackPage` to log the end of the page view\r\n * and send the event.\r\n * @param name - A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n _self.startTrackPage = function (name) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n var doc = getDocument();\r\n name = doc && doc.title || \"\";\r\n }\r\n _pageTracking.start(name);\r\n }\r\n catch (e) {\r\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 31 /* _eInternalMessageId.StartTrackFailed */, \"startTrackPage failed, page view may not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n /**\r\n * Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements.\r\n * The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`.\r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n _self.stopTrackPage = function (name, url, properties, measurement) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n var doc = getDocument();\r\n name = doc && doc.title || \"\";\r\n }\r\n if (typeof url !== \"string\") {\r\n var loc = getLocation();\r\n url = loc && loc[_DYN_HREF /* @min:%2ehref */] || \"\";\r\n }\r\n _pageTracking.stop(name, url, properties, measurement);\r\n if (_autoTrackPageVisitTime) {\r\n _pageVisitTimeManager[_DYN_TRACK_PREVIOUS_PAGE_1 /* @min:%2etrackPreviousPageVisit */](name, url);\r\n }\r\n }\r\n catch (e) {\r\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 32 /* _eInternalMessageId.StopTrackFailed */, \"stopTrackPage failed, page view will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n /**\r\n * @ignore INTERNAL ONLY\r\n * @param exception\r\n * @param properties\r\n * @param systemProperties\r\n */\r\n _self[_DYN_SEND_EXCEPTION_INTER5 /* @min:%2esendExceptionInternal */] = function (exception, customProperties, systemProperties) {\r\n // Adding additional edge cases to handle\r\n // - Not passing anything (null / undefined)\r\n var theError = (exception && (exception[_DYN_EXCEPTION /* @min:%2eexception */] || exception[_DYN_ERROR /* @min:%2eerror */])) ||\r\n // - Handle someone calling trackException based of v1 API where the exception was the Error\r\n isError(exception) && exception ||\r\n // - Handles no error being defined and instead of creating a new Error() instance attempt to map so any stacktrace\r\n // is preserved and does not list ApplicationInsights code as the source\r\n { name: (exception && typeof exception), message: exception || strNotSpecified };\r\n // If no exception object was passed assign to an empty object to avoid internal exceptions\r\n exception = exception || {};\r\n var exceptionPartB = new Exception(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), theError, exception.properties || customProperties, exception.measurements, exception.severityLevel, exception.id).toInterface();\r\n var telemetryItem = createTelemetryItem(exceptionPartB, Exception[_DYN_DATA_TYPE /* @min:%2edataType */], Exception[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties, systemProperties);\r\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\r\n };\r\n /**\r\n * Log an exception you have caught.\r\n *\r\n * @param exception - Object which contains exception to be sent\r\n * @param } customProperties Additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n *\r\n * Any property of type double will be considered a measurement, and will be treated by Application Insights as a metric.\r\n * @memberof ApplicationInsights\r\n */\r\n _self.trackException = function (exception, customProperties) {\r\n if (exception && !exception[_DYN_EXCEPTION /* @min:%2eexception */] && exception[_DYN_ERROR /* @min:%2eerror */]) {\r\n exception[_DYN_EXCEPTION /* @min:%2eexception */] = exception[_DYN_ERROR /* @min:%2eerror */];\r\n }\r\n try {\r\n _self[_DYN_SEND_EXCEPTION_INTER5 /* @min:%2esendExceptionInternal */](exception, customProperties);\r\n }\r\n catch (e) {\r\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 35 /* _eInternalMessageId.TrackExceptionFailed */, \"trackException failed, exception will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n /**\r\n * @description Custom error handler for Application Insights Analytics\r\n * @param exception\r\n * @memberof ApplicationInsights\r\n */\r\n _self[_DYN__ONERROR /* @min:%2e_onerror */] = function (exception) {\r\n var error = exception && exception[_DYN_ERROR /* @min:%2eerror */];\r\n var evt = exception && exception.evt;\r\n try {\r\n if (!evt) {\r\n var _window = getWindow();\r\n if (_window) {\r\n evt = _window[strEvent];\r\n }\r\n }\r\n var url = (exception && exception.url) || (getDocument() || {}).URL;\r\n // If no error source is provided assume the default window.onerror handler\r\n var errorSrc = exception[_DYN_ERROR_SRC /* @min:%2eerrorSrc */] || \"window.onerror@\" + url + \":\" + (exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0) + \":\" + (exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0);\r\n var properties = {\r\n errorSrc: errorSrc,\r\n url: url,\r\n lineNumber: exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0,\r\n columnNumber: exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0,\r\n message: exception[_DYN_MESSAGE /* @min:%2emessage */]\r\n };\r\n if (isCrossOriginError(exception.message, exception.url, exception.lineNumber, exception.columnNumber, exception[_DYN_ERROR /* @min:%2eerror */])) {\r\n _sendCORSException(Exception[_DYN__CREATE_AUTO_EXCEPTI6 /* @min:%2eCreateAutoException */](\"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.\", url, exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0, exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0, error, evt, null, errorSrc), properties);\r\n }\r\n else {\r\n if (!exception[_DYN_ERROR_SRC /* @min:%2eerrorSrc */]) {\r\n exception[_DYN_ERROR_SRC /* @min:%2eerrorSrc */] = errorSrc;\r\n }\r\n _self.trackException({ exception: exception, severityLevel: 3 /* eSeverityLevel.Error */ }, properties);\r\n }\r\n }\r\n catch (e) {\r\n var errorString = error ? (error.name + \", \" + error[_DYN_MESSAGE /* @min:%2emessage */]) : \"null\";\r\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 11 /* _eInternalMessageId.ExceptionWhileLoggingError */, \"_onError threw exception while logging error, error will not be collected: \"\r\n + getExceptionName(e), { exception: dumpObj(e), errorString: errorString });\r\n }\r\n };\r\n _self[_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */] = function (telemetryInitializer) {\r\n if (_self[_DYN_CORE /* @min:%2ecore */]) {\r\n // Just add to the core\r\n return _self[_DYN_CORE /* @min:%2ecore */][_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */](telemetryInitializer);\r\n }\r\n // Handle \"pre-initialization\" telemetry initializers (for backward compatibility)\r\n if (!_preInitTelemetryInitializers) {\r\n _preInitTelemetryInitializers = [];\r\n }\r\n _preInitTelemetryInitializers.push(telemetryInitializer);\r\n };\r\n _self.initialize = function (config, core, extensions, pluginChain) {\r\n if (_self.isInitialized()) {\r\n return;\r\n }\r\n if (isNullOrUndefined(core)) {\r\n throwError(\"Error initializing\");\r\n }\r\n _base.initialize(config, core, extensions, pluginChain);\r\n try {\r\n _evtNamespace = mergeEvtNamespace(createUniqueNamespace(_self.identifier), core.evtNamespace && core.evtNamespace());\r\n if (_preInitTelemetryInitializers) {\r\n arrForEach(_preInitTelemetryInitializers, function (initializer) {\r\n core[_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */](initializer);\r\n });\r\n _preInitTelemetryInitializers = null;\r\n }\r\n _populateDefaults(config);\r\n _pageViewPerformanceManager = new PageViewPerformanceManager(_self[_DYN_CORE /* @min:%2ecore */]);\r\n _pageViewManager = new PageViewManager(_self, _extConfig.overridePageViewDuration, _self[_DYN_CORE /* @min:%2ecore */], _pageViewPerformanceManager);\r\n _pageVisitTimeManager = new PageVisitTimeManager(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), function (pageName, pageUrl, pageVisitTime) { return trackPageVisitTime(pageName, pageUrl, pageVisitTime); });\r\n _eventTracking = new Timing(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), \"trackEvent\");\r\n _eventTracking.action =\r\n function (name, url, duration, properties, measurements) {\r\n if (!properties) {\r\n properties = {};\r\n }\r\n if (!measurements) {\r\n measurements = {};\r\n }\r\n properties.duration = duration[_DYN_TO_STRING /* @min:%2etoString */]();\r\n _self.trackEvent({ name: name, properties: properties, measurements: measurements });\r\n };\r\n // initialize page view timing\r\n _pageTracking = new Timing(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), \"trackPageView\");\r\n _pageTracking.action = function (name, url, duration, properties, measurements) {\r\n // duration must be a custom property in order for the collector to extract it\r\n if (isNullOrUndefined(properties)) {\r\n properties = {};\r\n }\r\n properties.duration = duration[_DYN_TO_STRING /* @min:%2etoString */]();\r\n var pageViewItem = {\r\n name: name,\r\n uri: url,\r\n properties: properties,\r\n measurements: measurements\r\n };\r\n _self[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageViewItem, properties);\r\n };\r\n if (hasWindow()) {\r\n _updateExceptionTracking();\r\n _updateLocationChange();\r\n }\r\n }\r\n catch (e) {\r\n // resetting the initialized state because of failure\r\n _self.setInitialized(false);\r\n throw e;\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState) {\r\n _pageViewManager && _pageViewManager.teardown(unloadCtx, unloadState);\r\n // Just register to remove all events associated with this namespace\r\n eventOff(window, null, null, _evtNamespace);\r\n _initDefaults();\r\n };\r\n function _populateDefaults(config) {\r\n var identifier = _self.identifier;\r\n var core = _self[_DYN_CORE /* @min:%2ecore */];\r\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(config, function () {\r\n var ctx = createProcessTelemetryContext(null, config, core);\r\n _extConfig = ctx.getExtCfg(identifier, defaultValues);\r\n _autoTrackPageVisitTime = _extConfig[_DYN_AUTO_TRACK_PAGE_VISI9 /* @min:%2eautoTrackPageVisitTime */];\r\n _updateStorageUsage(_extConfig);\r\n // _updateBrowserLinkTracking\r\n _isBrowserLinkTrackingEnabled = _extConfig[_DYN_IS_BROWSER_LINK_TRAC10 /* @min:%2eisBrowserLinkTrackingEnabled */];\r\n _addDefaultTelemetryInitializers();\r\n }));\r\n }\r\n /**\r\n * Log a page visit time\r\n * @param pageName Name of page\r\n * @param pageVisitDuration Duration of visit to the page in milliseconds\r\n */\r\n function trackPageVisitTime(pageName, pageUrl, pageVisitTime) {\r\n var properties = { PageName: pageName, PageUrl: pageUrl };\r\n _self.trackMetric({\r\n name: \"PageVisitTime\",\r\n average: pageVisitTime,\r\n max: pageVisitTime,\r\n min: pageVisitTime,\r\n sampleCount: 1\r\n }, properties);\r\n }\r\n function _addDefaultTelemetryInitializers() {\r\n if (!_browserLinkInitializerAdded && _isBrowserLinkTrackingEnabled) {\r\n var browserLinkPaths_1 = [\"/browserLinkSignalR/\", \"/__browserLink/\"];\r\n var dropBrowserLinkRequests = function (envelope) {\r\n if (_isBrowserLinkTrackingEnabled && envelope.baseType === RemoteDependencyData[_DYN_DATA_TYPE /* @min:%2edataType */]) {\r\n var remoteData = envelope.baseData;\r\n if (remoteData) {\r\n for (var i = 0; i < browserLinkPaths_1[_DYN_LENGTH /* @min:%2elength */]; i++) {\r\n if (remoteData.target && strIndexOf(remoteData.target, browserLinkPaths_1[i]) >= 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n };\r\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](_self[_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */](dropBrowserLinkRequests));\r\n _browserLinkInitializerAdded = true;\r\n }\r\n }\r\n function _sendCORSException(exception, properties) {\r\n var telemetryItem = createTelemetryItem(exception, Exception[_DYN_DATA_TYPE /* @min:%2edataType */], Exception[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties);\r\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\r\n }\r\n function _updateExceptionTracking() {\r\n var _window = getWindow();\r\n var locn = getLocation(true);\r\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extConfig, function () {\r\n _disableExceptionTracking = _extConfig.disableExceptionTracking;\r\n if (!_disableExceptionTracking && !_autoExceptionInstrumented && !_extConfig.autoExceptionInstrumented) {\r\n // We want to enable exception auto collection and it has not been done so yet\r\n _addHook(InstrumentEvent(_window, \"onerror\", {\r\n ns: _evtNamespace,\r\n rsp: function (callDetails, message, url, lineNumber, columnNumber, error) {\r\n if (!_disableExceptionTracking && callDetails.rslt !== true) {\r\n _self[_DYN__ONERROR /* @min:%2e_onerror */](Exception[_DYN__CREATE_AUTO_EXCEPTI6 /* @min:%2eCreateAutoException */](message, url, lineNumber, columnNumber, error, callDetails.evt));\r\n }\r\n }\r\n }, false));\r\n _autoExceptionInstrumented = true;\r\n }\r\n }));\r\n _addUnhandledPromiseRejectionTracking(_window, locn);\r\n }\r\n function _updateLocationChange() {\r\n var win = getWindow();\r\n var locn = getLocation(true);\r\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extConfig, function () {\r\n _enableAutoRouteTracking = _extConfig[_DYN_ENABLE_AUTO_ROUTE_TR11 /* @min:%2eenableAutoRouteTracking */] === true;\r\n /**\r\n * Create a custom \"locationchange\" event which is triggered each time the history object is changed\r\n */\r\n if (win && _enableAutoRouteTracking && !_historyListenerAdded && hasHistory()) {\r\n var _history = getHistory();\r\n if (isFunction(_history.pushState) && isFunction(_history.replaceState) && typeof Event !== strUndefined) {\r\n _addHistoryListener(win, _history, locn);\r\n }\r\n }\r\n }));\r\n }\r\n function _getDistributedTraceCtx() {\r\n var distributedTraceCtx = null;\r\n if (_self[_DYN_CORE /* @min:%2ecore */] && _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx) {\r\n distributedTraceCtx = _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx(false);\r\n }\r\n if (!distributedTraceCtx) {\r\n // Fallback when using an older Core and PropertiesPlugin\r\n var properties = _self[_DYN_CORE /* @min:%2ecore */].getPlugin(PropertiesPluginIdentifier);\r\n if (properties) {\r\n var context = properties.plugin.context;\r\n if (context) {\r\n distributedTraceCtx = createDistributedTraceContextFromTrace(context.telemetryTrace);\r\n }\r\n }\r\n }\r\n return distributedTraceCtx;\r\n }\r\n /**\r\n * Create a custom \"locationchange\" event which is triggered each time the history object is changed\r\n */\r\n function _addHistoryListener(win, history, locn) {\r\n if (_historyListenerAdded) {\r\n return;\r\n }\r\n // Name Prefix is only referenced during the initial initialization and cannot be changed afterwards\r\n var namePrefix = _extConfig.namePrefix || \"\";\r\n function _popstateHandler() {\r\n if (_enableAutoRouteTracking) {\r\n _dispatchEvent(win, createDomEvent(namePrefix + \"locationchange\"));\r\n }\r\n }\r\n function _locationChangeHandler() {\r\n // We always track the changes (if the handler is installed) to handle the feature being disabled between location changes\r\n if (_currUri) {\r\n _prevUri = _currUri;\r\n _currUri = locn && locn[_DYN_HREF /* @min:%2ehref */] || \"\";\r\n }\r\n else {\r\n _currUri = locn && locn[_DYN_HREF /* @min:%2ehref */] || \"\";\r\n }\r\n if (_enableAutoRouteTracking) {\r\n var distributedTraceCtx = _getDistributedTraceCtx();\r\n if (distributedTraceCtx) {\r\n distributedTraceCtx.setTraceId(generateW3CId());\r\n var traceLocationName = \"_unknown_\";\r\n if (locn && locn.pathname) {\r\n traceLocationName = locn.pathname + (locn.hash || \"\");\r\n }\r\n // This populates the ai.operation.name which has a maximum size of 1024 so we need to sanitize it\r\n distributedTraceCtx.setName(dataSanitizeString(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), traceLocationName));\r\n }\r\n scheduleTimeout((function (uri) {\r\n // todo: override start time so that it is not affected by autoRoutePVDelay\r\n _self[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */]({ refUri: uri, properties: { duration: 0 } }); // SPA route change loading durations are undefined, so send 0\r\n }).bind(_self, _prevUri), _self.autoRoutePVDelay);\r\n }\r\n }\r\n _addHook(InstrumentEvent(history, \"pushState\", {\r\n ns: _evtNamespace,\r\n rsp: function () {\r\n if (_enableAutoRouteTracking) {\r\n _dispatchEvent(win, createDomEvent(namePrefix + \"pushState\"));\r\n _dispatchEvent(win, createDomEvent(namePrefix + \"locationchange\"));\r\n }\r\n }\r\n }, true));\r\n _addHook(InstrumentEvent(history, \"replaceState\", {\r\n ns: _evtNamespace,\r\n rsp: function () {\r\n if (_enableAutoRouteTracking) {\r\n _dispatchEvent(win, createDomEvent(namePrefix + \"replaceState\"));\r\n _dispatchEvent(win, createDomEvent(namePrefix + \"locationchange\"));\r\n }\r\n }\r\n }, true));\r\n eventOn(win, namePrefix + \"popstate\", _popstateHandler, _evtNamespace);\r\n eventOn(win, namePrefix + \"locationchange\", _locationChangeHandler, _evtNamespace);\r\n _historyListenerAdded = true;\r\n }\r\n function _addUnhandledPromiseRejectionTracking(_window, _location) {\r\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extConfig, function () {\r\n _enableUnhandledPromiseRejectionTracking = _extConfig[_DYN_ENABLE_UNHANDLED_PRO12 /* @min:%2eenableUnhandledPromiseRejectionTracking */] === true;\r\n _autoExceptionInstrumented = _autoExceptionInstrumented || _extConfig[_DYN_AUTO_UNHANDLED_PROMI13 /* @min:%2eautoUnhandledPromiseInstrumented */];\r\n if (_enableUnhandledPromiseRejectionTracking && !_autoUnhandledPromiseInstrumented) {\r\n // We want to enable exception auto collection and it has not been done so yet\r\n _addHook(InstrumentEvent(_window, \"onunhandledrejection\", {\r\n ns: _evtNamespace,\r\n rsp: function (callDetails, error) {\r\n if (_enableUnhandledPromiseRejectionTracking && callDetails.rslt !== true) { // handled could be typeof function\r\n _self[_DYN__ONERROR /* @min:%2e_onerror */](Exception[_DYN__CREATE_AUTO_EXCEPTI6 /* @min:%2eCreateAutoException */](_getReason(error), _location ? _location[_DYN_HREF /* @min:%2ehref */] : \"\", 0, 0, error, callDetails.evt));\r\n }\r\n }\r\n }, false));\r\n _extConfig[_DYN_AUTO_UNHANDLED_PROMI13 /* @min:%2eautoUnhandledPromiseInstrumented */] = _autoUnhandledPromiseInstrumented = true;\r\n }\r\n }));\r\n }\r\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity - {eLoggingSeverity} - The severity of the log message\r\n * @param msgId - {_eInternalLogMessage} - The log message.\r\n */\r\n function _throwInternal(severity, msgId, msg, properties, isUserAct) {\r\n _self[_DYN_DIAG_LOG /* @min:%2ediagLog */]().throwInternal(severity, msgId, msg, properties, isUserAct);\r\n }\r\n function _initDefaults() {\r\n _eventTracking = null;\r\n _pageTracking = null;\r\n _pageViewManager = null;\r\n _pageViewPerformanceManager = null;\r\n _pageVisitTimeManager = null;\r\n _preInitTelemetryInitializers = null;\r\n _isBrowserLinkTrackingEnabled = false;\r\n _browserLinkInitializerAdded = false;\r\n _enableAutoRouteTracking = false;\r\n _historyListenerAdded = false;\r\n _disableExceptionTracking = false;\r\n _autoExceptionInstrumented = false;\r\n _enableUnhandledPromiseRejectionTracking = false;\r\n _autoUnhandledPromiseInstrumented = false;\r\n _autoTrackPageVisitTime = false;\r\n // Counts number of trackAjax invocations.\r\n // By default we only monitor X ajax call per view to avoid too much load.\r\n // Default value is set in config.\r\n // This counter keeps increasing even after the limit is reached.\r\n _trackAjaxAttempts = 0;\r\n // array with max length of 2 that store current url and previous url for SPA page route change trackPageview use.\r\n var location = getLocation(true);\r\n _prevUri = location && location[_DYN_HREF /* @min:%2ehref */] || \"\";\r\n _currUri = null;\r\n _evtNamespace = null;\r\n _extConfig = null;\r\n // Define _self.config\r\n objDefine(_self, \"config\", {\r\n g: function () { return _extConfig; }\r\n });\r\n }\r\n // For backward compatibility\r\n objDefine(_self, \"_pageViewManager\", { g: function () { return _pageViewManager; } });\r\n objDefine(_self, \"_pageViewPerformanceManager\", { g: function () { return _pageViewPerformanceManager; } });\r\n objDefine(_self, \"_pageVisitTimeManager\", { g: function () { return _pageVisitTimeManager; } });\r\n objDefine(_self, \"_evtNamespace\", { g: function () { return \".\" + _evtNamespace; } });\r\n });\r\n return _this;\r\n }\r\n /**\r\n * Get the current cookie manager for this instance\r\n */\r\n AnalyticsPlugin.prototype.getCookieMgr = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n AnalyticsPlugin.prototype.processTelemetry = function (env, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AnalyticsPlugin.prototype.trackEvent = function (event, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Start timing an extended event. Call `stopTrackEvent` to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\r\n AnalyticsPlugin.prototype.startTrackEvent = function (name) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Log an extended event that you started timing with `startTrackEvent`.\r\n * @param name The string you used to identify this event in `startTrackEvent`.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n AnalyticsPlugin.prototype.stopTrackEvent = function (name, properties, measurements) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * @description Log a diagnostic message\r\n * @param trace\r\n * @param ICustomProperties.\r\n * @memberof ApplicationInsights\r\n */\r\n AnalyticsPlugin.prototype.trackTrace = function (trace, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * @description Log a numeric value that is not associated with a specific event. Typically\r\n * used to send regular reports of performance indicators. To send single measurement, just\r\n * use the name and average fields of {@link IMetricTelemetry}. If you take measurements\r\n * frequently, you can reduce the telemetry bandwidth by aggregating multiple measurements\r\n * and sending the resulting average at intervals\r\n * @param metric - input object argument. Only name and average are mandatory.\r\n * @param } customProperties additional data used to filter metrics in the\r\n * portal. Defaults to empty.\r\n * @memberof ApplicationInsights\r\n */\r\n AnalyticsPlugin.prototype.trackMetric = function (metric, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Logs that a page or other item was viewed.\r\n * @param IPageViewTelemetry - The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param customProperties - Additional data used to filter events and metrics. Defaults to empty.\r\n * If a user wants to provide duration for pageLoad, it'll have to be in pageView.properties.duration\r\n */\r\n AnalyticsPlugin.prototype.trackPageView = function (pageView, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Create a page view telemetry item and send it to the SDK pipeline through the core.track API\r\n * @param pageView - Page view item to be sent\r\n * @param properties - Custom properties (Part C) that a user can add to the telemetry item\r\n * @param systemProperties - System level properties (Part A) that a user can add to the telemetry item\r\n */\r\n AnalyticsPlugin.prototype.sendPageViewInternal = function (pageView, properties, systemProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * @ignore INTERNAL ONLY\r\n * @param pageViewPerformance\r\n * @param properties\r\n */\r\n AnalyticsPlugin.prototype.sendPageViewPerformanceInternal = function (pageViewPerformance, properties, systemProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Send browser performance metrics.\r\n * @param pageViewPerformance\r\n * @param customProperties\r\n */\r\n AnalyticsPlugin.prototype.trackPageViewPerformance = function (pageViewPerformance, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Starts the timer for tracking a page load time. Use this instead of `trackPageView` if you want to control when the page view timer starts and stops,\r\n * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call `stopTrackPage` to log the end of the page view\r\n * and send the event.\r\n * @param name - A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n AnalyticsPlugin.prototype.startTrackPage = function (name) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements.\r\n * The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`.\r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\r\n AnalyticsPlugin.prototype.stopTrackPage = function (name, url, properties, measurement) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * @ignore INTERNAL ONLY\r\n * @param exception\r\n * @param properties\r\n * @param systemProperties\r\n */\r\n AnalyticsPlugin.prototype.sendExceptionInternal = function (exception, customProperties, systemProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Log an exception you have caught.\r\n *\r\n * @param exception - Object which contains exception to be sent\r\n * @param } customProperties Additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n *\r\n * Any property of type double will be considered a measurement, and will be treated by Application Insights as a metric.\r\n * @memberof ApplicationInsights\r\n */\r\n AnalyticsPlugin.prototype.trackException = function (exception, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * @description Custom error handler for Application Insights Analytics\r\n * @param exception\r\n * @memberof ApplicationInsights\r\n */\r\n AnalyticsPlugin.prototype._onerror = function (exception) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AnalyticsPlugin.prototype.addTelemetryInitializer = function (telemetryInitializer) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n AnalyticsPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AnalyticsPlugin.Version = '3.0.2'; // Not currently used anywhere\r\n return AnalyticsPlugin;\r\n}(BaseTelemetryPlugin));\r\nexport { AnalyticsPlugin };\r\n//# sourceMappingURL=AnalyticsPlugin.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { getGlobal, objAssign, objCreate, objDefineProp, objHasOwnProperty, throwTypeError } from \"@nevware21/ts-utils\";\r\nimport { ObjClass, ObjProto, strDefault, strShimFunction, strShimPrototype } from \"./Constants\";\r\n// Most of these functions have been directly shamelessly \"lifted\" from the https://github.com/@microsoft/tslib and\r\n// modified to be ES5 compatible and applying several minification and tree-shaking techniques so that Application Insights\r\n// can successfully use TypeScript \"importHelpers\" which imports tslib during compilation but it will use these at runtime\r\n// Which is also why all of the functions have not been included as Application Insights currently doesn't use or require\r\n// them.\r\nexport var SymbolObj = (getGlobal() || {})[\"Symbol\"];\r\nexport var ReflectObj = (getGlobal() || {})[\"Reflect\"];\r\nexport var __hasReflect = !!ReflectObj;\r\nvar strDecorate = \"decorate\";\r\nvar strMetadata = \"metadata\";\r\nvar strGetOwnPropertySymbols = \"getOwnPropertySymbols\";\r\nvar strIterator = \"iterator\";\r\nvar strHasOwnProperty = \"hasOwnProperty\";\r\nexport var __objAssignFnImpl = function (t) {\r\n // tslint:disable-next-line: ban-comma-operator\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) {\r\n if (ObjProto[strHasOwnProperty].call(s, p)) {\r\n t[p] = s[p];\r\n }\r\n }\r\n }\r\n return t;\r\n};\r\nexport var __assignFn = objAssign || __objAssignFnImpl;\r\n// tslint:disable-next-line: only-arrow-functions\r\nvar extendStaticsFn = function (d, b) {\r\n extendStaticsFn = ObjClass[\"setPrototypeOf\"] ||\r\n // tslint:disable-next-line: only-arrow-functions\r\n ({ __proto__: [] } instanceof Array && function (d, b) {\r\n d.__proto__ = b;\r\n }) ||\r\n // tslint:disable-next-line: only-arrow-functions\r\n function (d, b) {\r\n for (var p in b) {\r\n if (b[strHasOwnProperty](p)) {\r\n d[p] = b[p];\r\n }\r\n }\r\n };\r\n return extendStaticsFn(d, b);\r\n};\r\nexport function __extendsFn(d, b) {\r\n if (typeof b !== strShimFunction && b !== null) {\r\n throwTypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n }\r\n extendStaticsFn(d, b);\r\n function __() {\r\n this.constructor = d;\r\n }\r\n // tslint:disable-next-line: ban-comma-operator\r\n d[strShimPrototype] = b === null ? objCreate(b) : (__[strShimPrototype] = b[strShimPrototype], new __());\r\n}\r\nexport function __restFn(s, e) {\r\n var t = {};\r\n for (var k in s) {\r\n if (objHasOwnProperty(s, k) && e.indexOf(k) < 0) {\r\n t[k] = s[k];\r\n }\r\n }\r\n if (s != null && typeof ObjClass[strGetOwnPropertySymbols] === strShimFunction) {\r\n for (var i = 0, p = ObjClass[strGetOwnPropertySymbols](s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && ObjProto[\"propertyIsEnumerable\"].call(s, p[i])) {\r\n t[p[i]] = s[p[i]];\r\n }\r\n }\r\n }\r\n return t;\r\n}\r\nexport function __decorateFn(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = ObjClass[\"getOwnPropertyDescriptor\"](target, key) : desc, d;\r\n if (__hasReflect && typeof ReflectObj[strDecorate] === strShimFunction) {\r\n r = ReflectObj[strDecorate](decorators, target, key, desc);\r\n }\r\n else {\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n // eslint-disable-next-line no-cond-assign\r\n if (d = decorators[i]) {\r\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n }\r\n }\r\n }\r\n // tslint:disable-next-line:ban-comma-operator\r\n return c > 3 && r && objDefineProp(target, key, r), r;\r\n}\r\nexport function __paramFn(paramIndex, decorator) {\r\n return function (target, key) {\r\n decorator(target, key, paramIndex);\r\n };\r\n}\r\nexport function __metadataFn(metadataKey, metadataValue) {\r\n if (__hasReflect && ReflectObj[strMetadata] === strShimFunction) {\r\n return ReflectObj[strMetadata](metadataKey, metadataValue);\r\n }\r\n}\r\nexport function __exportStarFn(m, o) {\r\n for (var p in m) {\r\n if (p !== strDefault && !objHasOwnProperty(o, p)) {\r\n __createBindingFn(o, m, p);\r\n }\r\n }\r\n}\r\nexport function __createBindingFn(o, m, k, k2) {\r\n if (k2 === undefined) {\r\n k2 = k;\r\n }\r\n if (!!objDefineProp) {\r\n objDefineProp(o, k2, {\r\n enumerable: true,\r\n get: function () {\r\n return m[k];\r\n }\r\n });\r\n }\r\n else {\r\n o[k2] = m[k];\r\n }\r\n}\r\nexport function __valuesFn(o) {\r\n var s = typeof SymbolObj === strShimFunction && SymbolObj[strIterator], m = s && o[s], i = 0;\r\n if (m) {\r\n return m.call(o);\r\n }\r\n if (o && typeof o.length === \"number\") {\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) {\r\n o = void 0;\r\n }\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n }\r\n throwTypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\nexport function __readFn(o, n) {\r\n var m = typeof SymbolObj === strShimFunction && o[SymbolObj[strIterator]];\r\n if (!m) {\r\n return o;\r\n }\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\r\n ar.push(r.value);\r\n }\r\n }\r\n catch (error) {\r\n e = {\r\n error: error\r\n };\r\n }\r\n finally {\r\n try {\r\n // tslint:disable-next-line:no-conditional-assignment\r\n if (r && !r.done && (m = i[\"return\"])) {\r\n m.call(i);\r\n }\r\n }\r\n finally {\r\n if (e) {\r\n // eslint-disable-next-line no-unsafe-finally\r\n throw e.error;\r\n }\r\n }\r\n }\r\n return ar;\r\n}\r\n/** @deprecated */\r\nexport function __spreadArraysFn() {\r\n var theArgs = arguments;\r\n // Calculate new total size\r\n for (var s = 0, i = 0, il = theArgs.length; i < il; i++) {\r\n s += theArgs[i].length;\r\n }\r\n // Create new full array\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\r\n for (var a = theArgs[i], j = 0, jl = a.length; j < jl; j++, k++) {\r\n r[k] = a[j];\r\n }\r\n }\r\n return r;\r\n}\r\nexport function __spreadArrayFn(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) {\r\n to[j] = from[i];\r\n }\r\n return to;\r\n}\r\nexport function __makeTemplateObjectFn(cooked, raw) {\r\n if (objDefineProp) {\r\n objDefineProp(cooked, \"raw\", { value: raw });\r\n }\r\n else {\r\n cooked.raw = raw;\r\n }\r\n return cooked;\r\n}\r\nexport function __importStarFn(mod) {\r\n if (mod && mod.__esModule) {\r\n return mod;\r\n }\r\n var result = {};\r\n if (mod != null) {\r\n for (var k in mod) {\r\n if (k !== strDefault && Object.prototype.hasOwnProperty.call(mod, k)) {\r\n __createBindingFn(result, mod, k);\r\n }\r\n }\r\n }\r\n // Set default module\r\n if (!!objDefineProp) {\r\n objDefineProp(result, strDefault, { enumerable: true, value: mod });\r\n }\r\n else {\r\n result[strDefault] = mod;\r\n }\r\n return result;\r\n}\r\nexport function __importDefaultFn(mod) {\r\n return (mod && mod.__esModule) ? mod : { strDefault: mod };\r\n}\r\n//# sourceMappingURL=TsLibShims.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { getGlobal, objAssign, objCreate, objDefineProp, objHasOwnProperty, throwTypeError } from \"@nevware21/ts-utils\";\r\nimport {\r\n ObjClass, ObjProto,\r\n strDefault, strShimFunction, strShimPrototype\r\n} from \"./Constants\";\r\n\r\n// Most of these functions have been directly shamelessly \"lifted\" from the https://github.com/@microsoft/tslib and\r\n// modified to be ES5 compatible and applying several minification and tree-shaking techniques so that Application Insights\r\n// can successfully use TypeScript \"importHelpers\" which imports tslib during compilation but it will use these at runtime\r\n// Which is also why all of the functions have not been included as Application Insights currently doesn't use or require\r\n// them.\r\n\r\nexport const SymbolObj = (getGlobal()||{})[\"Symbol\"];\r\nexport const ReflectObj = (getGlobal()||{})[\"Reflect\"];\r\nexport const __hasReflect = !!ReflectObj;\r\n\r\nconst strDecorate = \"decorate\";\r\nconst strMetadata = \"metadata\";\r\nconst strGetOwnPropertySymbols = \"getOwnPropertySymbols\";\r\nconst strIterator = \"iterator\";\r\nconst strHasOwnProperty = \"hasOwnProperty\";\r\n\r\nexport declare type ObjAssignFunc = (t: any, ...sources:any[]) => any;\r\n\r\nexport var __objAssignFnImpl: ObjAssignFunc = function(t: any): any {\r\n // tslint:disable-next-line: ban-comma-operator\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) {\r\n if (ObjProto[strHasOwnProperty].call(s, p)) {\r\n (t as any)[p] = s[p];\r\n }\r\n }\r\n }\r\n return t;\r\n};\r\n\r\nexport var __assignFn: ObjAssignFunc = objAssign || __objAssignFnImpl;\r\n\r\n// tslint:disable-next-line: only-arrow-functions\r\nvar extendStaticsFn = function(d: any, b: any): any {\r\n extendStaticsFn = ObjClass[\"setPrototypeOf\"] ||\r\n // tslint:disable-next-line: only-arrow-functions\r\n ({ __proto__: [] } instanceof Array && function (d: any, b: any) {\r\n d.__proto__ = b;\r\n }) ||\r\n // tslint:disable-next-line: only-arrow-functions\r\n function (d: any, b: any) {\r\n for (var p in b) {\r\n if (b[strHasOwnProperty](p)) {\r\n d[p] = b[p];\r\n }\r\n }\r\n };\r\n return extendStaticsFn(d, b);\r\n};\r\n\r\nexport function __extendsFn(d: any, b: any) {\r\n if (typeof b !== strShimFunction && b !== null) {\r\n throwTypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n }\r\n extendStaticsFn(d, b);\r\n function __(this: any) {\r\n this.constructor = d;\r\n }\r\n // tslint:disable-next-line: ban-comma-operator\r\n d[strShimPrototype] = b === null ? objCreate(b) : (__[strShimPrototype] = b[strShimPrototype], new (__ as any)());\r\n}\r\n\r\nexport function __restFn(s: any, e: any) {\r\n var t = {};\r\n for (var k in s) {\r\n if (objHasOwnProperty(s, k) && e.indexOf(k) < 0) {\r\n t[k] = s[k];\r\n }\r\n }\r\n if (s != null && typeof ObjClass[strGetOwnPropertySymbols] === strShimFunction) {\r\n for (var i = 0, p = ObjClass[strGetOwnPropertySymbols](s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && ObjProto[\"propertyIsEnumerable\"].call(s, p[i])) {\r\n t[p[i]] = s[p[i]];\r\n }\r\n }\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorateFn(decorators: any, target: any, key: any, desc: any) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = ObjClass[\"getOwnPropertyDescriptor\"](target, key) : desc, d;\r\n if (__hasReflect && typeof ReflectObj[strDecorate] === strShimFunction) {\r\n r = ReflectObj[strDecorate](decorators, target, key, desc);\r\n } else {\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n // eslint-disable-next-line no-cond-assign\r\n if (d = decorators[i]) {\r\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n }\r\n }\r\n }\r\n\r\n // tslint:disable-next-line:ban-comma-operator\r\n return c > 3 && r && objDefineProp(target, key, r), r;\r\n}\r\n\r\nexport function __paramFn(paramIndex: number, decorator: Function) {\r\n return function (target: any, key: any) {\r\n decorator(target, key, paramIndex);\r\n }\r\n}\r\n\r\nexport function __metadataFn(metadataKey: any, metadataValue: any) {\r\n if (__hasReflect && ReflectObj[strMetadata] === strShimFunction) {\r\n return ReflectObj[strMetadata](metadataKey, metadataValue);\r\n }\r\n}\r\n\r\nexport function __exportStarFn(m: any, o: any) {\r\n for (var p in m) {\r\n if (p !== strDefault && !objHasOwnProperty(o, p)) {\r\n __createBindingFn(o, m, p);\r\n }\r\n }\r\n}\r\n\r\nexport function __createBindingFn(o: any, m: any, k: any, k2?: any) {\r\n if (k2 === undefined) {\r\n k2 = k;\r\n }\r\n \r\n if (!!objDefineProp) {\r\n objDefineProp(o, k2, {\r\n enumerable: true,\r\n get() {\r\n return m[k];\r\n }\r\n });\r\n } else {\r\n o[k2] = m[k];\r\n }\r\n}\r\n\r\nexport function __valuesFn(o: any) {\r\n var s = typeof SymbolObj === strShimFunction && SymbolObj[strIterator], m = s && o[s], i = 0;\r\n if (m) {\r\n return m.call(o);\r\n }\r\n\r\n if (o && typeof o.length === \"number\") {\r\n return {\r\n next () {\r\n if (o && i >= o.length) {\r\n o = void 0;\r\n }\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n }\r\n\r\n throwTypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __readFn(o: any, n: any) {\r\n var m = typeof SymbolObj === strShimFunction && o[SymbolObj[strIterator]];\r\n if (!m) {\r\n return o;\r\n }\r\n\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\r\n ar.push(r.value);\r\n }\r\n } catch (error) {\r\n e = {\r\n error\r\n };\r\n } finally {\r\n try {\r\n // tslint:disable-next-line:no-conditional-assignment\r\n if (r && !r.done && (m = i[\"return\"])) {\r\n m.call(i);\r\n }\r\n } finally {\r\n if (e) {\r\n // eslint-disable-next-line no-unsafe-finally\r\n throw e.error;\r\n }\r\n }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArraysFn() {\r\n var theArgs = arguments;\r\n // Calculate new total size\r\n for (var s = 0, i = 0, il = theArgs.length; i < il; i++) {\r\n s += theArgs[i].length;\r\n }\r\n\r\n // Create new full array\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\r\n for (var a = theArgs[i], j = 0, jl = a.length; j < jl; j++, k++) {\r\n r[k] = a[j];\r\n }\r\n }\r\n\r\n return r;\r\n}\r\n\r\nexport function __spreadArrayFn(to: any, from: any) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) {\r\n to[j] = from[i];\r\n }\r\n\r\n return to;\r\n}\r\n\r\nexport function __makeTemplateObjectFn(cooked: any, raw: any) {\r\n if (objDefineProp) {\r\n objDefineProp(cooked, \"raw\", { value: raw });\r\n } else {\r\n cooked.raw = raw;\r\n }\r\n\r\n return cooked;\r\n}\r\n\r\nexport function __importStarFn(mod: any) {\r\n if (mod && mod.__esModule) {\r\n return mod;\r\n }\r\n\r\n var result = {};\r\n if (mod != null) {\r\n for (var k in mod) {\r\n if (k !== strDefault && Object.prototype.hasOwnProperty.call(mod, k)) {\r\n __createBindingFn(result, mod, k);\r\n }\r\n }\r\n }\r\n\r\n // Set default module\r\n if (!!objDefineProp) {\r\n objDefineProp( result, strDefault, { enumerable: true, value: mod });\r\n } else {\r\n result[strDefault] = mod;\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function __importDefaultFn(mod:any) {\r\n return (mod && mod.__esModule) ? mod : { strDefault: mod };\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { NULL_VALUE, ObjClass, __PROTO__ } from \"../internal/constants\";\r\nimport { isArray, isObject } from \"../helpers/base\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { objForEachKey } from \"./for_each_key\";\r\nimport { polyObjEntries, polyObjValues } from \"../polyfills/object\";\r\nvar _objFreeze = ObjClass[\"freeze\"];\r\nvar _doNothing = function (value) { return value; };\r\nvar _getProto = function (value) { return value[__PROTO__] || NULL_VALUE; };\r\n/**\r\n * The `objAssign()` method copies all enumerable own properties from one or more source objects\r\n * to a target object. It returns the modified target object.\r\n *\r\n * Properties in the target object are overwritten by properties in the sources if they have the\r\n * same key. Later sources' properties overwrite earlier ones.\r\n *\r\n * The objAssign() method only copies enumerable and own properties from a source object to a\r\n * target object. It uses `Get` on the source and `Set` on the target, so it will invoke\r\n * [getters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) and\r\n * [setters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set).\r\n * Therefore it assigns properties, versus copying or defining new properties. This may make it\r\n * unsuitable for merging new properties into a prototype if the merge sources contain getters.\r\n *\r\n * For copying property definitions (including their enumerability) into prototypes, use\r\n * {@link objGetOwnPropertyDescriptor} and {@link objDefineProp} instead.\r\n *\r\n * Both String and Symbol properties are copied.\r\n *\r\n * In case of an error, for example if a property is non-writable, a TypeError is raised, and\r\n * the target object is changed if any properties are added before the error is raised.\r\n * @group Object\r\n * @example\r\n * ```ts\r\n * const obj = { a: 1 };\r\n * const copy = objAssign({}, obj);\r\n * console.log(copy); // { a: 1 }\r\n *\r\n * const o1 = { a: 1 };\r\n * const o2 = { b: 2 };\r\n * const o3 = { c: 3 };\r\n *\r\n * const obj = objAssign(o1, o2, o3);\r\n * console.log(obj); // { a: 1, b: 2, c: 3 }\r\n * console.log(o1); // { a: 1, b: 2, c: 3 }, target object itself is changed.\r\n * ```\r\n */\r\nexport var objAssign = ObjClass[\"assign\"];\r\n/**\r\n * The `objKeys()` method returns an array of a given object's own enumerable property names, iterated in\r\n * the same order that a normal loop would.\r\n *\r\n * objKeys() returns an array whose elements are strings corresponding to the enumerable properties found\r\n * directly upon object. The ordering of the properties is the same as that given by looping over the\r\n * properties of the object manually.\r\n * @group Object\r\n * @param value - The object to obtain a copy of the keys from\r\n * @returns An array of the properties names for the value object.\r\n * @example\r\n * ```ts\r\n * // simple array\r\n * const arr = ['a', 'b', 'c'];\r\n * console.log(objKeys(arr)); // console: ['0', '1', '2']\r\n *\r\n * // array-like object\r\n * const obj = { 0: 'a', 1: 'b', 2: 'c' };\r\n * console.log(objKeys(obj)); // console: ['0', '1', '2']\r\n *\r\n * // array-like object with random key ordering\r\n * const anObj = { 100: 'a', 2: 'b', 7: 'c' };\r\n * console.log(objKeys(anObj)); // console: ['2', '7', '100']\r\n *\r\n * // getFoo is a property which isn't enumerable\r\n * const myObj = objCreate({}, {\r\n * getFoo: {\r\n * value() { return this.foo; }\r\n * }\r\n * });\r\n * myObj.foo = 1;\r\n * console.log(objKeys(myObj)); // console: ['foo']\r\n * ```\r\n */\r\nexport function objKeys(value) {\r\n if (!isObject(value) || value === NULL_VALUE) {\r\n throwTypeError(\"objKeys called on non-object\");\r\n }\r\n return ObjClass.keys(value);\r\n}\r\n/**\r\n * Perform a deep freeze on the object and all of it's contained values / properties by recursively calling\r\n * `objFreeze()` on all enumerable properties of the object and on each property returned.\r\n * @group Object\r\n * @param value - the object to be completly frozen.\r\n * @returns The originally passed in object.\r\n */\r\nexport function objDeepFreeze(value) {\r\n if (_objFreeze) {\r\n objForEachKey(value, function (key, value) {\r\n if (isArray(value) || isObject(value)) {\r\n _objFreeze(value);\r\n }\r\n });\r\n }\r\n return objFreeze(value);\r\n}\r\n/**\r\n * The `objFreeze()` method freezes an object. A frozen object can no longer be changed; freezing an object\r\n * prevents new properties from being added to it, existing properties from being removed, prevents changing the\r\n * enumerability, configurability, or writability of existing properties, and prevents the values of existing\r\n * properties from being changed. In addition, freezing an object also prevents its prototype from being changed.\r\n * `objFreeze()` returns the same object that was passed in.\r\n *\r\n * Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail,\r\n * either silently or by throwing a TypeError exception (most commonly, but not exclusively, when in strict mode).\r\n *\r\n * For data properties of a frozen object, values cannot be changed, the writable and configurable attributes are\r\n * set to false. Accessor properties (getters and setters) work the same (and still give the illusion that you are\r\n * changing the value). Note that values that are objects can still be modified, unless they are also frozen. As\r\n * an object, an array can be frozen; after doing so, its elements cannot be altered and no elements can be added\r\n * to or removed from the array.\r\n *\r\n * `objFreeze()` returns the same object that was passed into the function. It does not create a frozen copy.\r\n * @group Object\r\n * @param value - The object to freeze.\r\n * @returns The object that was passed to the function.\r\n */\r\nexport var objFreeze = _objFreeze || _doNothing;\r\n/**\r\n * The `objSeal()` method seals an object, preventing new properties from being added to it and marking all\r\n * existing properties as non-configurable. Values of present properties can still be changed as long as they\r\n * are writable.\r\n * @group Object\r\n * @param value - The object which should be sealed.\r\n * @returns The object being sealed.\r\n */\r\nexport var objSeal = ObjClass[\"seal\"] || _doNothing;\r\n/**\r\n * The objGetPrototypeOf() method returns the prototype (i.e. the value of the internal `Prototype` property)\r\n * of the specified value.\r\n * @since 0.4.4\r\n * @group Object\r\n * @param value - The object whose prototype is to be returned, which may be null.\r\n */\r\nexport var objGetPrototypeOf = ObjClass[\"getPrototypeOf\"] || _getProto;\r\n/**\r\n * Returns an array of key/values of the enumerable properties of an object\r\n * @since 0.9.7\r\n * @group Object\r\n * @group ArrayLike\r\n * @param value Object that contains the properties and methods.\r\n * @example\r\n * ```ts\r\n * objEntries({ Hello: \"Darkness\", my: \"old\", friend: \".\" });\r\n * // [ [ \"Hello\", \"Darkness\" ], [ \"my\", \"old\"], [ \"friend\", \".\" ] ]\r\n *\r\n * // Array-like object\r\n * objEntries({ 0: \"a\", 1: \"b\", 2: \"c\" }));\r\n * // [ ['0', 'a'], ['1', 'b'], ['2', 'c'] ]\r\n *\r\n * // Array-like object with random key ordering\r\n * objEntries({ 100: \"a\", 2: \"b\", 7: \"c\" });\r\n * // [ ['2', 'b'], ['7', 'c'], ['100', 'a'] ]*\r\n * ```\r\n */\r\nexport var objEntries = ObjClass.entries || polyObjEntries;\r\n/**\r\n * The objValues() returns an array whose elements are values of enumerable string-keyed properties found\r\n * directly upon object. This is the same as iterating with a for...in loop, except that a for...in loop\r\n * enumerates properties in the prototype chain as well. The order of the array returned by objValues()\r\n * is the same as that provided by a for...in loop.\r\n *\r\n * If you need the property keys, use objKeys() instead. If you need both the property keys and values, use objEntries() instead.\r\n * @since 0.9.7\r\n * @group Object\r\n * @group ArrayLike\r\n * @param value - The object that contains the properties and methods.\r\n * @returns An array containing the given object's own enumerable string-keyed property values.\r\n * @example\r\n * ```ts\r\n * objValues({ Hello: \"Darkness\", my: \"old\", friend: \".\" });\r\n * // [ \"Darkness\", \"old\", \".\" ]\r\n *\r\n * // Array-like object\r\n * objValues({ 0: \"a\", 1: \"b\", 2: \"c\" }));\r\n * // [ 'a', 'b', 'c']\r\n *\r\n * // Array-like object with random key ordering\r\n * objValues({ 100: \"a\", 2: \"b\", 7: \"c\" });\r\n * // [ 'b', 'c', 'a']\r\n * ```\r\n */\r\nexport var objValues = ObjClass.values || polyObjValues;\r\n//# sourceMappingURL=object.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { NULL_VALUE, ObjClass, __PROTO__ } from \"../internal/constants\";\r\nimport { isArray, isObject } from \"../helpers/base\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { objForEachKey } from \"./for_each_key\";\r\nimport { polyObjEntries, polyObjValues } from \"../polyfills/object\";\r\n\r\nconst _objFreeze = ObjClass[\"freeze\"];\r\nconst _doNothing = (value: T) => value;\r\nconst _getProto = (value: any) => value[__PROTO__] || NULL_VALUE;\r\n\r\n/**\r\n * The `objAssign()` method copies all enumerable own properties from one or more source objects\r\n * to a target object. It returns the modified target object.\r\n *\r\n * Properties in the target object are overwritten by properties in the sources if they have the\r\n * same key. Later sources' properties overwrite earlier ones.\r\n *\r\n * The objAssign() method only copies enumerable and own properties from a source object to a\r\n * target object. It uses `Get` on the source and `Set` on the target, so it will invoke\r\n * [getters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) and\r\n * [setters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set).\r\n * Therefore it assigns properties, versus copying or defining new properties. This may make it\r\n * unsuitable for merging new properties into a prototype if the merge sources contain getters.\r\n *\r\n * For copying property definitions (including their enumerability) into prototypes, use\r\n * {@link objGetOwnPropertyDescriptor} and {@link objDefineProp} instead.\r\n *\r\n * Both String and Symbol properties are copied.\r\n *\r\n * In case of an error, for example if a property is non-writable, a TypeError is raised, and\r\n * the target object is changed if any properties are added before the error is raised.\r\n * @group Object\r\n * @example\r\n * ```ts\r\n * const obj = { a: 1 };\r\n * const copy = objAssign({}, obj);\r\n * console.log(copy); // { a: 1 }\r\n *\r\n * const o1 = { a: 1 };\r\n * const o2 = { b: 2 };\r\n * const o3 = { c: 3 };\r\n *\r\n * const obj = objAssign(o1, o2, o3);\r\n * console.log(obj); // { a: 1, b: 2, c: 3 }\r\n * console.log(o1); // { a: 1, b: 2, c: 3 }, target object itself is changed.\r\n * ```\r\n */\r\nexport const objAssign = ObjClass[\"assign\"];\r\n\r\n/**\r\n * The `objKeys()` method returns an array of a given object's own enumerable property names, iterated in\r\n * the same order that a normal loop would.\r\n *\r\n * objKeys() returns an array whose elements are strings corresponding to the enumerable properties found\r\n * directly upon object. The ordering of the properties is the same as that given by looping over the\r\n * properties of the object manually.\r\n * @group Object\r\n * @param value - The object to obtain a copy of the keys from\r\n * @returns An array of the properties names for the value object.\r\n * @example\r\n * ```ts\r\n * // simple array\r\n * const arr = ['a', 'b', 'c'];\r\n * console.log(objKeys(arr)); // console: ['0', '1', '2']\r\n *\r\n * // array-like object\r\n * const obj = { 0: 'a', 1: 'b', 2: 'c' };\r\n * console.log(objKeys(obj)); // console: ['0', '1', '2']\r\n *\r\n * // array-like object with random key ordering\r\n * const anObj = { 100: 'a', 2: 'b', 7: 'c' };\r\n * console.log(objKeys(anObj)); // console: ['2', '7', '100']\r\n *\r\n * // getFoo is a property which isn't enumerable\r\n * const myObj = objCreate({}, {\r\n * getFoo: {\r\n * value() { return this.foo; }\r\n * }\r\n * });\r\n * myObj.foo = 1;\r\n * console.log(objKeys(myObj)); // console: ['foo']\r\n * ```\r\n */\r\nexport function objKeys(value: any): string[] {\r\n if (!isObject(value) || value === NULL_VALUE) {\r\n throwTypeError(\"objKeys called on non-object\");\r\n }\r\n\r\n return ObjClass.keys(value);\r\n}\r\n\r\n/**\r\n * Perform a deep freeze on the object and all of it's contained values / properties by recursively calling\r\n * `objFreeze()` on all enumerable properties of the object and on each property returned.\r\n * @group Object\r\n * @param value - the object to be completly frozen.\r\n * @returns The originally passed in object.\r\n */\r\nexport function objDeepFreeze(value: T): T {\r\n if (_objFreeze) {\r\n objForEachKey(value, (key, value) => {\r\n if (isArray(value) || isObject(value)) {\r\n _objFreeze(value);\r\n }\r\n });\r\n }\r\n\r\n return objFreeze(value);\r\n}\r\n\r\n/**\r\n * The `objFreeze()` method freezes an object. A frozen object can no longer be changed; freezing an object\r\n * prevents new properties from being added to it, existing properties from being removed, prevents changing the\r\n * enumerability, configurability, or writability of existing properties, and prevents the values of existing\r\n * properties from being changed. In addition, freezing an object also prevents its prototype from being changed.\r\n * `objFreeze()` returns the same object that was passed in.\r\n *\r\n * Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail,\r\n * either silently or by throwing a TypeError exception (most commonly, but not exclusively, when in strict mode).\r\n *\r\n * For data properties of a frozen object, values cannot be changed, the writable and configurable attributes are\r\n * set to false. Accessor properties (getters and setters) work the same (and still give the illusion that you are\r\n * changing the value). Note that values that are objects can still be modified, unless they are also frozen. As\r\n * an object, an array can be frozen; after doing so, its elements cannot be altered and no elements can be added\r\n * to or removed from the array.\r\n *\r\n * `objFreeze()` returns the same object that was passed into the function. It does not create a frozen copy.\r\n * @group Object\r\n * @param value - The object to freeze.\r\n * @returns The object that was passed to the function.\r\n */\r\nexport const objFreeze: (value: T) => T = _objFreeze || _doNothing;\r\n\r\n/**\r\n * The `objSeal()` method seals an object, preventing new properties from being added to it and marking all\r\n * existing properties as non-configurable. Values of present properties can still be changed as long as they\r\n * are writable.\r\n * @group Object\r\n * @param value - The object which should be sealed.\r\n * @returns The object being sealed.\r\n */\r\nexport const objSeal: (value: T) => T = ObjClass[\"seal\"] || _doNothing;\r\n\r\n/**\r\n * The objGetPrototypeOf() method returns the prototype (i.e. the value of the internal `Prototype` property)\r\n * of the specified value.\r\n * @since 0.4.4\r\n * @group Object\r\n * @param value - The object whose prototype is to be returned, which may be null.\r\n */\r\nexport const objGetPrototypeOf: (value: any) => any = ObjClass[\"getPrototypeOf\"] || _getProto;\r\n\r\n/**\r\n * Returns an array of key/values of the enumerable properties of an object\r\n * @since 0.9.7\r\n * @group Object\r\n * @group ArrayLike\r\n * @param value Object that contains the properties and methods.\r\n * @example\r\n * ```ts\r\n * objEntries({ Hello: \"Darkness\", my: \"old\", friend: \".\" });\r\n * // [ [ \"Hello\", \"Darkness\" ], [ \"my\", \"old\"], [ \"friend\", \".\" ] ]\r\n *\r\n * // Array-like object\r\n * objEntries({ 0: \"a\", 1: \"b\", 2: \"c\" }));\r\n * // [ ['0', 'a'], ['1', 'b'], ['2', 'c'] ]\r\n *\r\n * // Array-like object with random key ordering\r\n * objEntries({ 100: \"a\", 2: \"b\", 7: \"c\" });\r\n * // [ ['2', 'b'], ['7', 'c'], ['100', 'a'] ]*\r\n * ```\r\n */\r\nexport const objEntries: (value: {} | { [s: string]: T } | ArrayLike) => [string, T][] = ObjClass.entries || polyObjEntries;\r\n\r\n/**\r\n * The objValues() returns an array whose elements are values of enumerable string-keyed properties found\r\n * directly upon object. This is the same as iterating with a for...in loop, except that a for...in loop\r\n * enumerates properties in the prototype chain as well. The order of the array returned by objValues()\r\n * is the same as that provided by a for...in loop.\r\n *\r\n * If you need the property keys, use objKeys() instead. If you need both the property keys and values, use objEntries() instead.\r\n * @since 0.9.7\r\n * @group Object\r\n * @group ArrayLike\r\n * @param value - The object that contains the properties and methods.\r\n * @returns An array containing the given object's own enumerable string-keyed property values.\r\n * @example\r\n * ```ts\r\n * objValues({ Hello: \"Darkness\", my: \"old\", friend: \".\" });\r\n * // [ \"Darkness\", \"old\", \".\" ]\r\n *\r\n * // Array-like object\r\n * objValues({ 0: \"a\", 1: \"b\", 2: \"c\" }));\r\n * // [ 'a', 'b', 'c']\r\n *\r\n * // Array-like object with random key ordering\r\n * objValues({ 100: \"a\", 2: \"b\", 7: \"c\" });\r\n * // [ 'b', 'c', 'a']\r\n * ```\r\n */\r\nexport const objValues: (value: {} | { [s: string]: T } | ArrayLike) => T[] = ObjClass.values || polyObjValues;\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { isObject } from \"../helpers/base\";\r\nimport { NULL_VALUE } from \"../internal/constants\";\r\nimport { objForEachKey } from \"../object/for_each_key\";\r\nimport { objHasOwn } from \"../object/has_own\";\r\n/**\r\n * Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers\r\n * that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.\r\n * Note: For consistency this will not use the Object.keys implementation if it exists as this would cause a testing requirement to test with and without the implementations\r\n * @group Polyfill\r\n * @group Object\r\n * @param obj Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.\r\n */\r\nexport function polyObjKeys(obj) {\r\n if (!isObject(obj) || obj === NULL_VALUE) {\r\n throw new TypeError(\"polyObjKeys called on non-object\");\r\n }\r\n var result = [];\r\n for (var prop in obj) {\r\n if (objHasOwn(obj, prop)) {\r\n result.push(prop);\r\n }\r\n }\r\n return result;\r\n}\r\n/**\r\n * Returns an array of key/values of the enumerable properties of an object\r\n * @since 0.9.7\r\n * @group Polyfill\r\n * @group Object\r\n * @group ArrayLike\r\n * @param value Object that contains the properties and methods.\r\n * @example\r\n * ```ts\r\n * polyObjEntries({ Hello: \"Darkness\", my: \"old\", friend: \".\" });\r\n * // [ [ \"Hello\", \"Darkness\" ], [ \"my\", \"old\"], [ \"friend\", \".\" ] ]\r\n *\r\n * // Array-like object\r\n * polyObjEntries({ 0: \"a\", 1: \"b\", 2: \"c\" }));\r\n * // [ ['0', 'a'], ['1', 'b'], ['2', 'c'] ]\r\n *\r\n * // Array-like object with random key ordering\r\n * polyObjEntries({ 100: \"a\", 2: \"b\", 7: \"c\" });\r\n * // [ ['2', 'b'], ['7', 'c'], ['100', 'a'] ]*\r\n * ```\r\n */\r\nexport function polyObjEntries(value) {\r\n var result = [];\r\n objForEachKey(value, function (key, value) {\r\n result.push([key, value]);\r\n });\r\n return result;\r\n}\r\n/**\r\n * Returns an array of key/values of the enumerable properties of an object\r\n * @since 0.9.7\r\n * @group Polyfill\r\n * @group Object\r\n * @group ArrayLike\r\n * @param value Object that contains the properties and methods.\r\n * @example\r\n * ```ts\r\n * polyObjValues({ Hello: \"Darkness\", my: \"old\", friend: \".\" });\r\n * // [ \"Darkness\", \"old\", \".\" ]\r\n *\r\n * // Array-like object\r\n * polyObjValues({ 0: \"a\", 1: \"b\", 2: \"c\" }));\r\n * // [ 'a', 'b', 'c']\r\n *\r\n * // Array-like object with random key ordering\r\n * polyObjValues({ 100: \"a\", 2: \"b\", 7: \"c\" });\r\n * // [ 'b', 'c', 'a']\r\n * ```\r\n */\r\nexport function polyObjValues(value) {\r\n var result = [];\r\n objForEachKey(value, function (key, value) {\r\n result.push(value);\r\n });\r\n return result;\r\n}\r\n//# sourceMappingURL=object.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { isObject } from \"../helpers/base\";\r\nimport { NULL_VALUE } from \"../internal/constants\";\r\nimport { objForEachKey } from \"../object/for_each_key\";\r\nimport { objHasOwn } from \"../object/has_own\";\r\n\r\n/**\r\n * Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers\r\n * that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.\r\n * Note: For consistency this will not use the Object.keys implementation if it exists as this would cause a testing requirement to test with and without the implementations\r\n * @group Polyfill\r\n * @group Object\r\n * @param obj Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.\r\n */\r\nexport function polyObjKeys(obj: any): string[] {\r\n if (!isObject(obj) || obj === NULL_VALUE) {\r\n throw new TypeError(\"polyObjKeys called on non-object\");\r\n }\r\n\r\n const result: string[] = [];\r\n for (const prop in obj) {\r\n if (objHasOwn(obj, prop)) {\r\n result.push(prop);\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Returns an array of key/values of the enumerable properties of an object\r\n * @since 0.9.7\r\n * @group Polyfill\r\n * @group Object\r\n * @group ArrayLike\r\n * @param value Object that contains the properties and methods.\r\n * @example\r\n * ```ts\r\n * polyObjEntries({ Hello: \"Darkness\", my: \"old\", friend: \".\" });\r\n * // [ [ \"Hello\", \"Darkness\" ], [ \"my\", \"old\"], [ \"friend\", \".\" ] ]\r\n *\r\n * // Array-like object\r\n * polyObjEntries({ 0: \"a\", 1: \"b\", 2: \"c\" }));\r\n * // [ ['0', 'a'], ['1', 'b'], ['2', 'c'] ]\r\n *\r\n * // Array-like object with random key ordering\r\n * polyObjEntries({ 100: \"a\", 2: \"b\", 7: \"c\" });\r\n * // [ ['2', 'b'], ['7', 'c'], ['100', 'a'] ]*\r\n * ```\r\n */\r\nexport function polyObjEntries(value: {} | { [s: string]: T } | ArrayLike): [string, T][] {\r\n let result: [string, T][] = [];\r\n\r\n objForEachKey(value, (key, value) => {\r\n result.push([key, value]);\r\n });\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Returns an array of key/values of the enumerable properties of an object\r\n * @since 0.9.7\r\n * @group Polyfill\r\n * @group Object\r\n * @group ArrayLike\r\n * @param value Object that contains the properties and methods.\r\n * @example\r\n * ```ts\r\n * polyObjValues({ Hello: \"Darkness\", my: \"old\", friend: \".\" });\r\n * // [ \"Darkness\", \"old\", \".\" ]\r\n *\r\n * // Array-like object\r\n * polyObjValues({ 0: \"a\", 1: \"b\", 2: \"c\" }));\r\n * // [ 'a', 'b', 'c']\r\n *\r\n * // Array-like object with random key ordering\r\n * polyObjValues({ 100: \"a\", 2: \"b\", 7: \"c\" });\r\n * // [ 'b', 'c', 'a']\r\n * ```\r\n */\r\nexport function polyObjValues(value: {} | { [s: string]: T } | ArrayLike): T[] {\r\n let result: T[] = [];\r\n\r\n objForEachKey(value, (key, value) => {\r\n result.push(value);\r\n });\r\n\r\n return result;\r\n}","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { FUNCTION, ObjClass, OBJECT, PROTOTYPE } from \"../internal/constants\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nvar _objCreate = ObjClass[\"create\"];\r\n/**\r\n * Creates an object that has the specified prototype, and that optionally contains specified properties. This helper exists to avoid adding a polyfil\r\n * for older browsers that do not define Object.create eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.\r\n * Note: For consistency this will not use the Object.create implementation if it exists as this would cause a testing requirement to test with and without the implementations\r\n * @group Object\r\n * @param obj Object to use as a prototype. May be null\r\n */\r\nexport var objCreate = _objCreate || polyObjCreate;\r\n/**\r\n * Creates an object that has the specified prototype, and that optionally contains specified properties. This helper exists to avoid adding a polyfil\r\n * for older browsers that do not define Object.create eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.\r\n * Note: For consistency this will not use the Object.create implementation if it exists as this would cause a testing requirement to test with and without the implementations\r\n * @group Polyfill\r\n * @group Object\r\n * @param obj Object to use as a prototype. May be null\r\n */\r\nexport function polyObjCreate(obj) {\r\n if (!obj) {\r\n return {};\r\n }\r\n var type = typeof obj;\r\n if (type !== OBJECT && type !== FUNCTION) {\r\n throw new TypeError(\"Prototype must be an Object or function: \" + dumpObj(obj));\r\n }\r\n function tempFunc() { }\r\n tempFunc[PROTOTYPE] = obj;\r\n return new tempFunc();\r\n}\r\n//# sourceMappingURL=create.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { FUNCTION, ObjClass, OBJECT, PROTOTYPE } from \"../internal/constants\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\n\r\nconst _objCreate = ObjClass[\"create\"];\r\n\r\n/**\r\n * Creates an object that has the specified prototype, and that optionally contains specified properties. This helper exists to avoid adding a polyfil\r\n * for older browsers that do not define Object.create eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.\r\n * Note: For consistency this will not use the Object.create implementation if it exists as this would cause a testing requirement to test with and without the implementations\r\n * @group Object\r\n * @param obj Object to use as a prototype. May be null\r\n */\r\nexport const objCreate = _objCreate || polyObjCreate;\r\n\r\n/**\r\n * Creates an object that has the specified prototype, and that optionally contains specified properties. This helper exists to avoid adding a polyfil\r\n * for older browsers that do not define Object.create eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.\r\n * Note: For consistency this will not use the Object.create implementation if it exists as this would cause a testing requirement to test with and without the implementations\r\n * @group Polyfill\r\n * @group Object\r\n * @param obj Object to use as a prototype. May be null\r\n */\r\nexport function polyObjCreate(obj: any): any {\r\n if (!obj) {\r\n return {};\r\n }\r\n\r\n let type = typeof obj;\r\n if (type !== OBJECT && type !== FUNCTION) {\r\n throw new TypeError(\"Prototype must be an Object or function: \" + dumpObj(obj));\r\n }\r\n\r\n function tempFunc() {}\r\n tempFunc[PROTOTYPE] = obj;\r\n\r\n return new (tempFunc as any)();\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { EMPTY, NULL_VALUE, UNDEF_VALUE } from \"../internal/constants\";\r\nimport { isError, isNumber, objToString } from \"./base\";\r\n/**\r\n * Returns string representation of an object suitable for diagnostics logging.\r\n * @group Error\r\n * @group Diagnostic\r\n * @param object - The object to be converted to a diagnostic string value\r\n * @param format - Identifies whether the JSON value should be formated\r\n * - `true` - Format with 4 spaces\r\n * - 'number' - The number of spaces to format with\r\n * - `false` (or not Truthy) - Do not format\r\n */\r\nexport function dumpObj(object, format) {\r\n var propertyValueDump = EMPTY;\r\n if (isError(object)) {\r\n propertyValueDump = \"{ stack: '\" + object.stack + \"', message: '\" + object.message + \"', name: '\" + object.name + \"'\";\r\n }\r\n else {\r\n try {\r\n propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? (isNumber(format) ? format : 4) : UNDEF_VALUE);\r\n }\r\n catch (e) {\r\n // Unable to convert object (probably circular)\r\n propertyValueDump = \" - \" + dumpObj(e, format);\r\n }\r\n }\r\n return objToString(object) + \": \" + propertyValueDump;\r\n}\r\n//# sourceMappingURL=diagnostics.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { EMPTY, NULL_VALUE, UNDEF_VALUE } from \"../internal/constants\";\r\nimport { isError, isNumber, objToString } from \"./base\";\r\n\r\n/**\r\n * Returns string representation of an object suitable for diagnostics logging.\r\n * @group Error\r\n * @group Diagnostic\r\n * @param object - The object to be converted to a diagnostic string value\r\n * @param format - Identifies whether the JSON value should be formated\r\n * - `true` - Format with 4 spaces\r\n * - 'number' - The number of spaces to format with\r\n * - `false` (or not Truthy) - Do not format\r\n */\r\nexport function dumpObj(object: any, format?: boolean | number): string {\r\n let propertyValueDump = EMPTY;\r\n if (isError(object)) {\r\n propertyValueDump = \"{ stack: '\" + object.stack + \"', message: '\" + object.message + \"', name: '\" + object.name + \"'\";\r\n } else {\r\n try {\r\n propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? (isNumber(format) ? format : 4) : UNDEF_VALUE);\r\n } catch(e) {\r\n // Unable to convert object (probably circular)\r\n propertyValueDump = \" - \" + dumpObj(e, format);\r\n }\r\n }\r\n\r\n return objToString(object) + \": \" + propertyValueDump;\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport var strShimFunction = \"function\";\r\nexport var strShimObject = \"object\";\r\nexport var strShimUndefined = \"undefined\";\r\nexport var strShimPrototype = \"prototype\";\r\nexport var strDefault = \"default\";\r\nexport var ObjClass = Object;\r\nexport var ObjProto = ObjClass[strShimPrototype];\r\n//# sourceMappingURL=Constants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nexport const strShimFunction = \"function\";\r\nexport const strShimObject = \"object\";\r\nexport const strShimUndefined = \"undefined\";\r\nexport const strShimPrototype = \"prototype\";\r\nexport const strDefault = \"default\";\r\n\r\nexport const ObjClass = Object;\r\nexport const ObjProto = ObjClass[strShimPrototype];\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the\r\nexport { correlationIdSetPrefix, correlationIdGetPrefix, correlationIdCanIncludeCorrelationHeader, correlationIdGetCorrelationContext, correlationIdGetCorrelationContextValue, dateTimeUtilsNow, dateTimeUtilsDuration, isInternalApplicationInsightsEndpoint, createDistributedTraceContextFromTrace } from \"./Util\";\r\nexport { ThrottleMgr } from \"./ThrottleMgr\";\r\nexport { parseConnectionString, ConnectionStringParser } from \"./ConnectionStringParser\";\r\nexport { RequestHeaders } from \"./RequestResponseHeaders\";\r\nexport { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, DEFAULT_BREEZE_PATH, strNotSpecified } from \"./Constants\";\r\nexport { Envelope } from \"./Telemetry/Common/Envelope\";\r\nexport { Event } from \"./Telemetry/Event\";\r\nexport { Exception } from \"./Telemetry/Exception\";\r\nexport { Metric } from \"./Telemetry/Metric\";\r\nexport { PageView } from \"./Telemetry/PageView\";\r\nexport { RemoteDependencyData } from \"./Telemetry/RemoteDependencyData\";\r\nexport { Trace } from \"./Telemetry/Trace\";\r\nexport { PageViewPerformance } from \"./Telemetry/PageViewPerformance\";\r\nexport { Data } from \"./Telemetry/Common/Data\";\r\nexport { SeverityLevel } from \"./Interfaces/Contracts/SeverityLevel\";\r\nexport { ConfigurationManager } from \"./Interfaces/IConfig\";\r\nexport { ContextTagKeys } from \"./Interfaces/Contracts/ContextTagKeys\";\r\nexport { dataSanitizeKeyAndAddUniqueness, dataSanitizeKey, dataSanitizeString, dataSanitizeUrl, dataSanitizeMessage, dataSanitizeException, dataSanitizeProperties, dataSanitizeMeasurements, dataSanitizeId, dataSanitizeInput, dsPadNumber } from \"./Telemetry/Common/DataSanitizer\";\r\nexport { TelemetryItemCreator, createTelemetryItem } from \"./TelemetryItemCreator\";\r\nexport { CtxTagKeys, Extensions } from \"./Interfaces/PartAExtensions\";\r\nexport { DistributedTracingModes } from \"./Enums\";\r\nexport { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from \"./HelperFuncs\";\r\nexport { isBeaconsSupported as isBeaconApiSupported, createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from \"@microsoft/applicationinsights-core-js\";\r\nexport { createDomEvent } from \"./DomHelperFuncs\";\r\nexport { utlDisableStorage, utlEnableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage } from \"./StorageHelperFuncs\";\r\nexport { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from \"./UrlHelperFuncs\";\r\nexport var PropertiesPluginIdentifier = \"AppInsightsPropertiesPlugin\";\r\nexport var BreezeChannelIdentifier = \"AppInsightsChannelPlugin\";\r\nexport var AnalyticsPluginIdentifier = \"ApplicationInsightsAnalytics\";\r\n//# sourceMappingURL=applicationinsights-common.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrForEach, arrIndexOf, dateNow, getPerformance, isNullOrUndefined, isValidSpanId, isValidTraceId } from \"@microsoft/applicationinsights-core-js\";\r\nimport { strIndexOf } from \"@nevware21/ts-utils\";\r\nimport { DEFAULT_BREEZE_ENDPOINT, DEFAULT_BREEZE_PATH } from \"./Constants\";\r\nimport { RequestHeaders } from \"./RequestResponseHeaders\";\r\nimport { dataSanitizeString } from \"./Telemetry/Common/DataSanitizer\";\r\nimport { urlParseFullHost, urlParseUrl } from \"./UrlHelperFuncs\";\r\nimport { _DYN_CORRELATION_HEADER_E0, _DYN_LENGTH, _DYN_NAME, _DYN_PATHNAME, _DYN_SPLIT, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\r\n// listing only non-geo specific locations\r\nvar _internalEndpoints = [\r\n DEFAULT_BREEZE_ENDPOINT + DEFAULT_BREEZE_PATH,\r\n \"https://breeze.aimon.applicationinsights.io\" + DEFAULT_BREEZE_PATH,\r\n \"https://dc-int.services.visualstudio.com\" + DEFAULT_BREEZE_PATH\r\n];\r\nvar _correlationIdPrefix = \"cid-v1:\";\r\nexport function isInternalApplicationInsightsEndpoint(endpointUrl) {\r\n return arrIndexOf(_internalEndpoints, endpointUrl[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]()) !== -1;\r\n}\r\nexport function correlationIdSetPrefix(prefix) {\r\n _correlationIdPrefix = prefix;\r\n}\r\nexport function correlationIdGetPrefix() {\r\n return _correlationIdPrefix;\r\n}\r\n/**\r\n * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers.\r\n * Headers are always included if the current domain matches the request domain. If they do not match (CORS),\r\n * they are regex-ed across correlationHeaderDomains and correlationHeaderExcludedDomains to determine if headers are included.\r\n * Some environments don't give information on currentHost via window.location.host (e.g. Cordova). In these cases, the user must\r\n * manually supply domains to include correlation headers on. Else, no headers will be included at all.\r\n */\r\nexport function correlationIdCanIncludeCorrelationHeader(config, requestUrl, currentHost) {\r\n if (!requestUrl || (config && config.disableCorrelationHeaders)) {\r\n return false;\r\n }\r\n if (config && config[_DYN_CORRELATION_HEADER_E0 /* @min:%2ecorrelationHeaderExcludePatterns */]) {\r\n for (var i = 0; i < config.correlationHeaderExcludePatterns[_DYN_LENGTH /* @min:%2elength */]; i++) {\r\n if (config[_DYN_CORRELATION_HEADER_E0 /* @min:%2ecorrelationHeaderExcludePatterns */][i].test(requestUrl)) {\r\n return false;\r\n }\r\n }\r\n }\r\n var requestHost = urlParseUrl(requestUrl).host[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n if (requestHost && (strIndexOf(requestHost, \":443\") !== -1 || strIndexOf(requestHost, \":80\") !== -1)) {\r\n // [Bug #1260] IE can include the port even for http and https URLs so if present\r\n // try and parse it to remove if it matches the default protocol port\r\n requestHost = (urlParseFullHost(requestUrl, true) || \"\")[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n }\r\n if ((!config || !config.enableCorsCorrelation) && (requestHost && requestHost !== currentHost)) {\r\n return false;\r\n }\r\n var includedDomains = config && config.correlationHeaderDomains;\r\n if (includedDomains) {\r\n var matchExists_1;\r\n arrForEach(includedDomains, function (domain) {\r\n var regex = new RegExp(domain.toLowerCase().replace(/\\\\/g, \"\\\\\\\\\").replace(/\\./g, \"\\\\.\").replace(/\\*/g, \".*\"));\r\n matchExists_1 = matchExists_1 || regex.test(requestHost);\r\n });\r\n if (!matchExists_1) {\r\n return false;\r\n }\r\n }\r\n var excludedDomains = config && config.correlationHeaderExcludedDomains;\r\n if (!excludedDomains || excludedDomains[_DYN_LENGTH /* @min:%2elength */] === 0) {\r\n return true;\r\n }\r\n for (var i = 0; i < excludedDomains[_DYN_LENGTH /* @min:%2elength */]; i++) {\r\n var regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\\\\/g, \"\\\\\\\\\").replace(/\\./g, \"\\\\.\").replace(/\\*/g, \".*\"));\r\n if (regex.test(requestHost)) {\r\n return false;\r\n }\r\n }\r\n // if we don't know anything about the requestHost, require the user to use included/excludedDomains.\r\n // Previously we always returned false for a falsy requestHost\r\n return requestHost && requestHost[_DYN_LENGTH /* @min:%2elength */] > 0;\r\n}\r\n/**\r\n * Combines target appId and target role name from response header.\r\n */\r\nexport function correlationIdGetCorrelationContext(responseHeader) {\r\n if (responseHeader) {\r\n var correlationId = correlationIdGetCorrelationContextValue(responseHeader, RequestHeaders[1 /* eRequestHeaders.requestContextTargetKey */]);\r\n if (correlationId && correlationId !== _correlationIdPrefix) {\r\n return correlationId;\r\n }\r\n }\r\n}\r\n/**\r\n * Gets key from correlation response header\r\n */\r\nexport function correlationIdGetCorrelationContextValue(responseHeader, key) {\r\n if (responseHeader) {\r\n var keyValues = responseHeader[_DYN_SPLIT /* @min:%2esplit */](\",\");\r\n for (var i = 0; i < keyValues[_DYN_LENGTH /* @min:%2elength */]; ++i) {\r\n var keyValue = keyValues[i][_DYN_SPLIT /* @min:%2esplit */](\"=\");\r\n if (keyValue[_DYN_LENGTH /* @min:%2elength */] === 2 && keyValue[0] === key) {\r\n return keyValue[1];\r\n }\r\n }\r\n }\r\n}\r\nexport function AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName) {\r\n var target, name = commandName, data = commandName;\r\n if (absoluteUrl && absoluteUrl[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n var parsedUrl = urlParseUrl(absoluteUrl);\r\n target = parsedUrl.host;\r\n if (!name) {\r\n if (parsedUrl[_DYN_PATHNAME /* @min:%2epathname */] != null) {\r\n var pathName = (parsedUrl.pathname[_DYN_LENGTH /* @min:%2elength */] === 0) ? \"/\" : parsedUrl[_DYN_PATHNAME /* @min:%2epathname */];\r\n if (pathName.charAt(0) !== \"/\") {\r\n pathName = \"/\" + pathName;\r\n }\r\n data = parsedUrl[_DYN_PATHNAME /* @min:%2epathname */];\r\n name = dataSanitizeString(logger, method ? method + \" \" + pathName : pathName);\r\n }\r\n else {\r\n name = dataSanitizeString(logger, absoluteUrl);\r\n }\r\n }\r\n }\r\n else {\r\n target = commandName;\r\n name = commandName;\r\n }\r\n return {\r\n target: target,\r\n name: name,\r\n data: data\r\n };\r\n}\r\nexport function dateTimeUtilsNow() {\r\n // returns the window or webworker performance object\r\n var perf = getPerformance();\r\n if (perf && perf.now && perf.timing) {\r\n var now = perf.now() + perf.timing.navigationStart;\r\n // Known issue with IE where this calculation can be negative, so if it is then ignore and fallback\r\n if (now > 0) {\r\n return now;\r\n }\r\n }\r\n return dateNow();\r\n}\r\nexport function dateTimeUtilsDuration(start, end) {\r\n var result = null;\r\n if (start !== 0 && end !== 0 && !isNullOrUndefined(start) && !isNullOrUndefined(end)) {\r\n result = end - start;\r\n }\r\n return result;\r\n}\r\n/**\r\n * Creates a IDistributedTraceContext from an optional telemetryTrace\r\n * @param telemetryTrace - The telemetryTrace instance that is being wrapped\r\n * @param parentCtx - An optional parent distributed trace instance, almost always undefined as this scenario is only used in the case of multiple property handlers.\r\n * @returns A new IDistributedTraceContext instance that is backed by the telemetryTrace or temporary object\r\n */\r\nexport function createDistributedTraceContextFromTrace(telemetryTrace, parentCtx) {\r\n var trace = telemetryTrace || {};\r\n return {\r\n getName: function () {\r\n return trace[_DYN_NAME /* @min:%2ename */];\r\n },\r\n setName: function (newValue) {\r\n parentCtx && parentCtx.setName(newValue);\r\n trace[_DYN_NAME /* @min:%2ename */] = newValue;\r\n },\r\n getTraceId: function () {\r\n return trace.traceID;\r\n },\r\n setTraceId: function (newValue) {\r\n parentCtx && parentCtx.setTraceId(newValue);\r\n if (isValidTraceId(newValue)) {\r\n trace.traceID = newValue;\r\n }\r\n },\r\n getSpanId: function () {\r\n return trace.parentID;\r\n },\r\n setSpanId: function (newValue) {\r\n parentCtx && parentCtx.setSpanId(newValue);\r\n if (isValidSpanId(newValue)) {\r\n trace.parentID = newValue;\r\n }\r\n },\r\n getTraceFlags: function () {\r\n return trace.traceFlags;\r\n },\r\n setTraceFlags: function (newTraceFlags) {\r\n parentCtx && parentCtx.setTraceFlags(newTraceFlags);\r\n trace.traceFlags = newTraceFlags;\r\n }\r\n };\r\n}\r\n//# sourceMappingURL=Util.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { LENGTH } from \"../internal/constants\";\r\n/**\r\n * Calls the provided `callbackFn` function once for each element in an array in ascending index order. It is not invoked for index properties\r\n * that have been deleted or are uninitialized. And unlike the ES6 forEach() you CAN stop or break the iteration by returning -1 from the\r\n * `callbackFn` function.\r\n *\r\n * The range (number of elements) processed by arrForEach() is set before the first call to the `callbackFn`. Any elements added beyond the range\r\n * or elements which as assigned to indexes already processed will not be visited by the `callbackFn`.\r\n * @group Array\r\n * @group ArrayLike\r\n * @typeParam T - Identifies the element type of the array\r\n * @param theArray - The array or array like object of elements to be searched.\r\n * @param callbackfn A `synchronous` function that accepts up to three arguments. arrForEach calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, null or undefined\r\n * the array will be used as the this value.\r\n * @remarks\r\n * arrForEach expects a `synchronous` function.\r\n * arrForEach does not wait for promises. Make sure you are aware of the implications while using promises (or async functions) as forEach callback.\r\n * @example\r\n * ```ts\r\n * const items = ['item1', 'item2', 'item3'];\r\n * const copyItems = [];\r\n *\r\n * // before using for loop\r\n * for (let i = 0; i < items.length; i++) {\r\n * copyItems.push(items[i]);\r\n * }\r\n *\r\n * // before using forEach()\r\n * items.forEach((item) => {\r\n * copyItems.push(item);\r\n * });\r\n *\r\n * // after\r\n * arrForEach(items, (item) => {\r\n * copyItems.push(item);\r\n * // May return -1 to abort the iteration\r\n * });\r\n *\r\n * // Also supports input as an array like object\r\n * const items = { length: 3, 0: 'item1', 1: 'item2', 2: 'item3' };\r\n * ```\r\n */\r\nexport function arrForEach(theArray, callbackfn, thisArg) {\r\n if (theArray) {\r\n var len = theArray[LENGTH] >>> 0;\r\n for (var idx = 0; idx < len; idx++) {\r\n if (idx in theArray) {\r\n if (callbackfn.call(thisArg || theArray, theArray[idx], idx, theArray) === -1) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n//# sourceMappingURL=forEach.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { LENGTH } from \"../internal/constants\";\r\n\r\n/**\r\n * Calls the provided `callbackFn` function once for each element in an array in ascending index order. It is not invoked for index properties\r\n * that have been deleted or are uninitialized. And unlike the ES6 forEach() you CAN stop or break the iteration by returning -1 from the\r\n * `callbackFn` function.\r\n *\r\n * The range (number of elements) processed by arrForEach() is set before the first call to the `callbackFn`. Any elements added beyond the range\r\n * or elements which as assigned to indexes already processed will not be visited by the `callbackFn`.\r\n * @group Array\r\n * @group ArrayLike\r\n * @typeParam T - Identifies the element type of the array\r\n * @param theArray - The array or array like object of elements to be searched.\r\n * @param callbackfn A `synchronous` function that accepts up to three arguments. arrForEach calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, null or undefined\r\n * the array will be used as the this value.\r\n * @remarks\r\n * arrForEach expects a `synchronous` function.\r\n * arrForEach does not wait for promises. Make sure you are aware of the implications while using promises (or async functions) as forEach callback.\r\n * @example\r\n * ```ts\r\n * const items = ['item1', 'item2', 'item3'];\r\n * const copyItems = [];\r\n *\r\n * // before using for loop\r\n * for (let i = 0; i < items.length; i++) {\r\n * copyItems.push(items[i]);\r\n * }\r\n *\r\n * // before using forEach()\r\n * items.forEach((item) => {\r\n * copyItems.push(item);\r\n * });\r\n *\r\n * // after\r\n * arrForEach(items, (item) => {\r\n * copyItems.push(item);\r\n * // May return -1 to abort the iteration\r\n * });\r\n *\r\n * // Also supports input as an array like object\r\n * const items = { length: 3, 0: 'item1', 1: 'item2', 2: 'item3' };\r\n * ```\r\n */\r\nexport function arrForEach(theArray: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => void | number, thisArg?: any): void {\r\n if (theArray) {\r\n const len = theArray[LENGTH] >>> 0;\r\n for (let idx = 0; idx < len; idx++) {\r\n if (idx in theArray) {\r\n if (callbackfn.call(thisArg || theArray, theArray[idx], idx, theArray) === -1) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { ArrProto, INDEX_OF, LAST_INDEX_OF } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\n/**\r\n * The arrIndexOf() method returns the first index at which a given element can be found in the array,\r\n * or -1 if it is not present.\r\n * `arrIndexOf()` compares searchElement to elements of the Array using strict equality (the same\r\n * method used by the === or triple-equals operator).\r\n * @group Array\r\n * @group ArrayLike\r\n * @typeParam T - Identifies the type of array elements\r\n * @param theArray - The array or array like object of elements to be searched.\r\n * @param searchElement - The element to locate in the array.\r\n * @param fromIndex - The index to start the search at. If the index is greater than or equal to\r\n * the array's length, -1 is returned, which means the array will not be searched. If the provided\r\n * index value is a negative number, it is taken as the offset from the end of the array.\r\n * Note: if the provided index is negative, the array is still searched from front to back. If the\r\n * provided index is 0, then the whole array will be searched. Default: 0 (entire array is searched).\r\n * @return The first index of the element in the array; -1 if not found.\r\n * @example\r\n * ```ts\r\n * const array = [2, 9, 9];\r\n * arrIndexOf(array, 2); // 0\r\n * arrIndexOf(array, 7); // -1\r\n * arrIndexOf(array, 9, 2); // 2\r\n * arrIndexOf(array, 2, -1); // -1\r\n * arrIndexOf(array, 2, -3); // 0\r\n *\r\n * let indices: number[] = [];\r\n * const array = ['a', 'b', 'a', 'c', 'a', 'd'];\r\n * const element = 'a';\r\n * let idx = arrIndexOf(array, element);\r\n * while (idx !== -1) {\r\n * indices.push(idx);\r\n * idx = arrIndexOf(array, element, idx + 1);\r\n * }\r\n * console.log(indices);\r\n * // [0, 2, 4]\r\n *\r\n * function updateVegetablesCollection (veggies, veggie) {\r\n * if (arrIndexOf(veggies, veggie) === -1) {\r\n * veggies.push(veggie);\r\n * console.log('New veggies collection is : ' + veggies);\r\n * } else {\r\n * console.log(veggie + ' already exists in the veggies collection.');\r\n * }\r\n * }\r\n *\r\n * let veggies = ['potato', 'tomato', 'chillies', 'green-pepper'];\r\n *\r\n * updateVegetablesCollection(veggies, 'spinach');\r\n * // New veggies collection is : potato,tomato,chillies,green-pepper,spinach\r\n * updateVegetablesCollection(veggies, 'spinach');\r\n * // spinach already exists in the veggies collection.\r\n *\r\n * // Array Like\r\n * let arrayLike = {\r\n * length: 3,\r\n * 0: \"potato\",\r\n * 1: \"tomato\",\r\n * 2: \"chillies\",\r\n * 3: \"green-pepper\" // Not checked as index is > length\r\n * };\r\n *\r\n * arrIndexOf(arrayLike, \"potato\"); // 0\r\n * arrIndexOf(arrayLike, \"tomato\"); // 1\r\n * arrIndexOf(arrayLike, \"chillies\"); 2\r\n * arrIndexOf(arrayLike, \"green-pepper\"); // -1\r\n * ```\r\n */\r\nexport var arrIndexOf = _unwrapFunction(INDEX_OF, ArrProto);\r\n/**\r\n * The arrLastIndexOf() method returns the last index at which a given element can be found in the array,\r\n * or -1 if it is not present.\r\n * `arrLastIndexOf()` compares searchElement to elements of the Array using strict equality (the same\r\n * method used by the === or triple-equals operator). [NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN)\r\n * values are never compared as equal, so arrLastIndexOf() always returns -1 when searchElement is NaN.\r\n *\r\n * The arrLastIndexOf() method skips empty slots in sparse arrays.\r\n *\r\n * The arrLastIndexOf() method is generic. It only expects the this value to have a length property and integer-keyed properties.\r\n *\r\n * @since 0.8.0\r\n * @group Array\r\n * @group ArrayLike\r\n * @typeParam T - Identifies the type of array elements\r\n * @param theArray - The array or array like object of elements to be searched.\r\n * @param searchElement - The element to locate in the array.\r\n * @param fromIndex - Zero-based index at which to start searching backwards, converted to an integer.\r\n * - Negative index counts back from the end of the array — if fromIndex < 0, fromIndex + array.length is used.\r\n * - If fromIndex < -array.length, the array is not searched and -1 is returned. You can think of it conceptually\r\n * as starting at a nonexistent position before the beginning of the array and going backwards from there. There\r\n * are no array elements on the way, so searchElement is never found.\r\n * - If fromIndex >= array.length or fromIndex is omitted, array.length - 1 is used, causing the entire array to\r\n * be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\r\n * @return The first index of the element in the array; -1 if not found.\r\n * @example\r\n * ```ts\r\n * const numbers = [2, 5, 9, 2];\r\n * arrLastIndexOf(numbers, 2); // 3\r\n * arrLastIndexOf(numbers, 7); // -1\r\n * arrLastIndexOf(numbers, 2, 3); // 3\r\n * arrLastIndexOf(numbers, 2, 2); // 0\r\n * arrLastIndexOf(numbers, 2, -2); // 0\r\n * arrLastIndexOf(numbers, 2, -1); // 3\r\n *\r\n * let indices: number[] = [];\r\n * const array = [\"a\", \"b\", \"a\", \"c\", \"a\", \"d\"];\r\n * const element = \"a\";\r\n * let idx = arrLastIndexOf(array, element);\r\n * while (idx !== -1) {\r\n * indices.push(idx);\r\n * idx = arrLastIndexOf(array, element, idx ? idx - 1 : -(array.length + 1));\r\n * }\r\n * console.log(indices);\r\n * // [4, 2, 0]\r\n *\r\n * function updateVegetablesCollection (veggies, veggie) {\r\n * if (arrLastIndexOf(veggies, veggie) === -1) {\r\n * veggies.push(veggie);\r\n * console.log('New veggies collection is : ' + veggies);\r\n * } else {\r\n * console.log(veggie + ' already exists in the veggies collection.');\r\n * }\r\n * }\r\n *\r\n * let veggies = ['potato', 'tomato', 'chillies', 'green-pepper'];\r\n *\r\n * updateVegetablesCollection(veggies, 'spinach');\r\n * // New veggies collection is : potato,tomato,chillies,green-pepper,spinach\r\n * updateVegetablesCollection(veggies, 'spinach');\r\n * // spinach already exists in the veggies collection.\r\n *\r\n * // Array Like\r\n * let arrayLike = {\r\n * length: 3,\r\n * 0: \"potato\",\r\n * 1: \"tomato\",\r\n * 2: \"chillies\",\r\n * 3: \"green-pepper\" // Not checked as index is > length\r\n * };\r\n *\r\n * arrLastIndexOf(arrayLike, \"potato\"); // 0\r\n * arrLastIndexOf(arrayLike, \"tomato\"); // 1\r\n * arrLastIndexOf(arrayLike, \"chillies\"); 2\r\n * arrLastIndexOf(arrayLike, \"green-pepper\"); // -1\r\n * ```\r\n */\r\nexport var arrLastIndexOf = _unwrapFunction(LAST_INDEX_OF, ArrProto);\r\n//# sourceMappingURL=indexOf.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ArrProto, INDEX_OF, LAST_INDEX_OF } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\n\r\n/**\r\n * The arrIndexOf() method returns the first index at which a given element can be found in the array,\r\n * or -1 if it is not present.\r\n * `arrIndexOf()` compares searchElement to elements of the Array using strict equality (the same\r\n * method used by the === or triple-equals operator).\r\n * @group Array\r\n * @group ArrayLike\r\n * @typeParam T - Identifies the type of array elements\r\n * @param theArray - The array or array like object of elements to be searched.\r\n * @param searchElement - The element to locate in the array.\r\n * @param fromIndex - The index to start the search at. If the index is greater than or equal to\r\n * the array's length, -1 is returned, which means the array will not be searched. If the provided\r\n * index value is a negative number, it is taken as the offset from the end of the array.\r\n * Note: if the provided index is negative, the array is still searched from front to back. If the\r\n * provided index is 0, then the whole array will be searched. Default: 0 (entire array is searched).\r\n * @return The first index of the element in the array; -1 if not found.\r\n * @example\r\n * ```ts\r\n * const array = [2, 9, 9];\r\n * arrIndexOf(array, 2); // 0\r\n * arrIndexOf(array, 7); // -1\r\n * arrIndexOf(array, 9, 2); // 2\r\n * arrIndexOf(array, 2, -1); // -1\r\n * arrIndexOf(array, 2, -3); // 0\r\n *\r\n * let indices: number[] = [];\r\n * const array = ['a', 'b', 'a', 'c', 'a', 'd'];\r\n * const element = 'a';\r\n * let idx = arrIndexOf(array, element);\r\n * while (idx !== -1) {\r\n * indices.push(idx);\r\n * idx = arrIndexOf(array, element, idx + 1);\r\n * }\r\n * console.log(indices);\r\n * // [0, 2, 4]\r\n *\r\n * function updateVegetablesCollection (veggies, veggie) {\r\n * if (arrIndexOf(veggies, veggie) === -1) {\r\n * veggies.push(veggie);\r\n * console.log('New veggies collection is : ' + veggies);\r\n * } else {\r\n * console.log(veggie + ' already exists in the veggies collection.');\r\n * }\r\n * }\r\n *\r\n * let veggies = ['potato', 'tomato', 'chillies', 'green-pepper'];\r\n *\r\n * updateVegetablesCollection(veggies, 'spinach');\r\n * // New veggies collection is : potato,tomato,chillies,green-pepper,spinach\r\n * updateVegetablesCollection(veggies, 'spinach');\r\n * // spinach already exists in the veggies collection.\r\n *\r\n * // Array Like\r\n * let arrayLike = {\r\n * length: 3,\r\n * 0: \"potato\",\r\n * 1: \"tomato\",\r\n * 2: \"chillies\",\r\n * 3: \"green-pepper\" // Not checked as index is > length\r\n * };\r\n *\r\n * arrIndexOf(arrayLike, \"potato\"); // 0\r\n * arrIndexOf(arrayLike, \"tomato\"); // 1\r\n * arrIndexOf(arrayLike, \"chillies\"); 2\r\n * arrIndexOf(arrayLike, \"green-pepper\"); // -1\r\n * ```\r\n */\r\nexport const arrIndexOf: (theArray: ArrayLike, searchElement: T, fromIndex?: number) => number = _unwrapFunction(INDEX_OF, ArrProto);\r\n\r\n/**\r\n * The arrLastIndexOf() method returns the last index at which a given element can be found in the array,\r\n * or -1 if it is not present.\r\n * `arrLastIndexOf()` compares searchElement to elements of the Array using strict equality (the same\r\n * method used by the === or triple-equals operator). [NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN)\r\n * values are never compared as equal, so arrLastIndexOf() always returns -1 when searchElement is NaN.\r\n *\r\n * The arrLastIndexOf() method skips empty slots in sparse arrays.\r\n *\r\n * The arrLastIndexOf() method is generic. It only expects the this value to have a length property and integer-keyed properties.\r\n *\r\n * @since 0.8.0\r\n * @group Array\r\n * @group ArrayLike\r\n * @typeParam T - Identifies the type of array elements\r\n * @param theArray - The array or array like object of elements to be searched.\r\n * @param searchElement - The element to locate in the array.\r\n * @param fromIndex - Zero-based index at which to start searching backwards, converted to an integer.\r\n * - Negative index counts back from the end of the array — if fromIndex < 0, fromIndex + array.length is used.\r\n * - If fromIndex < -array.length, the array is not searched and -1 is returned. You can think of it conceptually\r\n * as starting at a nonexistent position before the beginning of the array and going backwards from there. There\r\n * are no array elements on the way, so searchElement is never found.\r\n * - If fromIndex >= array.length or fromIndex is omitted, array.length - 1 is used, causing the entire array to\r\n * be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\r\n * @return The first index of the element in the array; -1 if not found.\r\n * @example\r\n * ```ts\r\n * const numbers = [2, 5, 9, 2];\r\n * arrLastIndexOf(numbers, 2); // 3\r\n * arrLastIndexOf(numbers, 7); // -1\r\n * arrLastIndexOf(numbers, 2, 3); // 3\r\n * arrLastIndexOf(numbers, 2, 2); // 0\r\n * arrLastIndexOf(numbers, 2, -2); // 0\r\n * arrLastIndexOf(numbers, 2, -1); // 3\r\n *\r\n * let indices: number[] = [];\r\n * const array = [\"a\", \"b\", \"a\", \"c\", \"a\", \"d\"];\r\n * const element = \"a\";\r\n * let idx = arrLastIndexOf(array, element);\r\n * while (idx !== -1) {\r\n * indices.push(idx);\r\n * idx = arrLastIndexOf(array, element, idx ? idx - 1 : -(array.length + 1));\r\n * }\r\n * console.log(indices);\r\n * // [4, 2, 0]\r\n *\r\n * function updateVegetablesCollection (veggies, veggie) {\r\n * if (arrLastIndexOf(veggies, veggie) === -1) {\r\n * veggies.push(veggie);\r\n * console.log('New veggies collection is : ' + veggies);\r\n * } else {\r\n * console.log(veggie + ' already exists in the veggies collection.');\r\n * }\r\n * }\r\n *\r\n * let veggies = ['potato', 'tomato', 'chillies', 'green-pepper'];\r\n *\r\n * updateVegetablesCollection(veggies, 'spinach');\r\n * // New veggies collection is : potato,tomato,chillies,green-pepper,spinach\r\n * updateVegetablesCollection(veggies, 'spinach');\r\n * // spinach already exists in the veggies collection.\r\n *\r\n * // Array Like\r\n * let arrayLike = {\r\n * length: 3,\r\n * 0: \"potato\",\r\n * 1: \"tomato\",\r\n * 2: \"chillies\",\r\n * 3: \"green-pepper\" // Not checked as index is > length\r\n * };\r\n *\r\n * arrLastIndexOf(arrayLike, \"potato\"); // 0\r\n * arrLastIndexOf(arrayLike, \"tomato\"); // 1\r\n * arrLastIndexOf(arrayLike, \"chillies\"); 2\r\n * arrLastIndexOf(arrayLike, \"green-pepper\"); // -1\r\n * ```\r\n */\r\nexport const arrLastIndexOf: (theArray: ArrayLike, searchElement: T, fromIndex?: number) => number = _unwrapFunction(LAST_INDEX_OF, ArrProto);","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { asString } from \"../string/as_string\";\r\nimport { ArrProto, SLICE } from \"./constants\";\r\nvar _arrSlice = ArrProto[SLICE];\r\nvar _throwMissingFunction = function (funcName, thisArg) {\r\n throwTypeError(\"'\" + asString(funcName) + \"' not defined for \" + dumpObj(thisArg));\r\n};\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper to run the named function on the passed first argument, this does not support polyfill\r\n * or prototype fallback, so the function must exist on the provided first argument.\r\n * If the first argument is null, undefined or the function does not exist an exception will be thrown\r\n * by the runtime\r\n * @param funcName - The function name to call on the first argument passed to the wrapped function\r\n * @returns A function which will call the funcName against the first passed argument and pass on the remaining arguments\r\n */\r\nexport var _unwrapInstFunction = function (funcName) {\r\n return function (thisArg) {\r\n return thisArg[funcName].apply(thisArg, _arrSlice.call(arguments, 1));\r\n };\r\n};\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper to convert an expanded function back into an instance `this` function call\r\n * @param funcName - The function name to call on the first argument passed to the wrapped function\r\n * @param clsProto - The Class or class prototype to fallback to if the instance doesn't have the function.\r\n * @returns A function which will call the funcName against the first passed argument and pass on the remaining arguments\r\n */\r\nexport var _unwrapFunction = function (funcName, clsProto) {\r\n var clsFn = clsProto && clsProto[funcName];\r\n return function (thisArg) {\r\n var theFunc = (thisArg && thisArg[funcName]) || clsFn;\r\n if (theFunc) {\r\n return theFunc.apply(thisArg, _arrSlice.call(arguments, 1));\r\n }\r\n _throwMissingFunction(funcName, thisArg);\r\n };\r\n};\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper to convert an expanded function back into an instance `this` function call\r\n * @param funcName - The function name to call on the first argument passed to the wrapped function\r\n * @param clsProto - The Class or class prototype to fallback to if the instance doesn't have the function.\r\n * @param polyFunc - The function to call if not available on the thisArg, act like the polyfill\r\n * @returns A function which will call the funcName against the first passed argument and pass on the remaining arguments\r\n */\r\nexport var _unwrapFunctionWithPoly = function (funcName, clsProto, polyFunc) {\r\n var clsFn = clsProto && clsProto[funcName];\r\n return function (thisArg) {\r\n var theFunc = (thisArg && thisArg[funcName]) || clsFn;\r\n if (theFunc || polyFunc) {\r\n var theArgs = arguments;\r\n return (theFunc || polyFunc).apply(thisArg, theFunc ? _arrSlice.call(theArgs, 1) : theArgs);\r\n }\r\n _throwMissingFunction(funcName, thisArg);\r\n };\r\n};\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper to lookup and return the named property from the first argument (which becomes the this)\r\n *\r\n * @since 0.4.2\r\n * @typeParam T - The type of the object which contains the propName\r\n * @param propName - The property name\r\n * @returns The value of the property\r\n */\r\nexport function _unwrapProp(propName) {\r\n return function (thisArg) {\r\n return thisArg[propName];\r\n };\r\n}\r\n//# sourceMappingURL=unwrapFunction.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { asString } from \"../string/as_string\";\r\nimport { ArrProto, SLICE } from \"./constants\";\r\n\r\nconst _arrSlice = ArrProto[SLICE];\r\n\r\nconst _throwMissingFunction = (funcName: keyof T, thisArg: T): never => {\r\n throwTypeError(\"'\" + asString(funcName) + \"' not defined for \" + dumpObj(thisArg));\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper to run the named function on the passed first argument, this does not support polyfill\r\n * or prototype fallback, so the function must exist on the provided first argument.\r\n * If the first argument is null, undefined or the function does not exist an exception will be thrown\r\n * by the runtime\r\n * @param funcName - The function name to call on the first argument passed to the wrapped function\r\n * @returns A function which will call the funcName against the first passed argument and pass on the remaining arguments\r\n */\r\nexport const _unwrapInstFunction = (funcName: keyof T) => {\r\n return function(thisArg: any): R {\r\n return (thisArg[funcName] as Function).apply(thisArg, _arrSlice.call(arguments, 1));\r\n };\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper to convert an expanded function back into an instance `this` function call\r\n * @param funcName - The function name to call on the first argument passed to the wrapped function\r\n * @param clsProto - The Class or class prototype to fallback to if the instance doesn't have the function.\r\n * @returns A function which will call the funcName against the first passed argument and pass on the remaining arguments\r\n */\r\nexport const _unwrapFunction = (funcName: keyof T, clsProto: T) => {\r\n let clsFn = clsProto && clsProto[funcName];\r\n\r\n return function(thisArg: any): R {\r\n let theFunc = (thisArg && thisArg[funcName]) || clsFn;\r\n if (theFunc) {\r\n return (theFunc as Function).apply(thisArg, _arrSlice.call(arguments, 1));\r\n }\r\n\r\n _throwMissingFunction(funcName, thisArg);\r\n };\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper to convert an expanded function back into an instance `this` function call\r\n * @param funcName - The function name to call on the first argument passed to the wrapped function\r\n * @param clsProto - The Class or class prototype to fallback to if the instance doesn't have the function.\r\n * @param polyFunc - The function to call if not available on the thisArg, act like the polyfill\r\n * @returns A function which will call the funcName against the first passed argument and pass on the remaining arguments\r\n */\r\nexport const _unwrapFunctionWithPoly = any>(funcName: keyof T, clsProto: T, polyFunc: P) => {\r\n let clsFn = clsProto && clsProto[funcName];\r\n\r\n return function(thisArg: any): ReturnType

{\r\n let theFunc = (thisArg && thisArg[funcName]) || clsFn;\r\n if (theFunc || polyFunc) {\r\n let theArgs = arguments;\r\n return ((theFunc || polyFunc) as Function).apply(thisArg, theFunc ? _arrSlice.call(theArgs, 1) : theArgs);\r\n }\r\n\r\n _throwMissingFunction(funcName, thisArg);\r\n };\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper to lookup and return the named property from the first argument (which becomes the this)\r\n *\r\n * @since 0.4.2\r\n * @typeParam T - The type of the object which contains the propName\r\n * @param propName - The property name\r\n * @returns The value of the property\r\n */\r\nexport function _unwrapProp(propName: keyof T) {\r\n return function (thisArg: T) {\r\n return thisArg[propName];\r\n };\r\n}","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { StrCls } from \"../internal/constants\";\r\n/**\r\n * The asString() method returns a string representing the value by\r\n * explicitly using `String(`value`)`.\r\n *\r\n * @since 0.4.3\r\n * @group String\r\n * @group Conversion\r\n * @group Value\r\n * @param value - The value to get a string representation of\r\n * @example\r\n * ```ts\r\n * const arr = [ 1, 2, 3];\r\n * asString(arr); // \"1,2,3\"\r\n * asString(null); // \"null\"\r\n * asString(undefined); // \"undefined\"\r\n * asString(42); // \"42\"\r\n * asString(Symbol.for(\"Hello\")); // \"Symbol(Hello)\"\r\n * ```\r\n */\r\nexport var asString = StrCls;\r\n//# sourceMappingURL=as_string.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { StrCls } from \"../internal/constants\";\r\n\r\n/**\r\n * The asString() method returns a string representing the value by\r\n * explicitly using `String(`value`)`.\r\n *\r\n * @since 0.4.3\r\n * @group String\r\n * @group Conversion\r\n * @group Value\r\n * @param value - The value to get a string representation of\r\n * @example\r\n * ```ts\r\n * const arr = [ 1, 2, 3];\r\n * asString(arr); // \"1,2,3\"\r\n * asString(null); // \"null\"\r\n * asString(undefined); // \"undefined\"\r\n * asString(42); // \"42\"\r\n * asString(Symbol.for(\"Hello\")); // \"Symbol(Hello)\"\r\n * ```\r\n */\r\nexport const asString: (value: any) => string = StrCls;\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n/**\r\n * Return the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.\r\n *\r\n * To offer protection against timing attacks and fingerprinting, the precision of dateNow()\r\n * might get rounded depending on browser settings. In Firefox, the privacy.reduceTimerPrecision\r\n * preference is enabled by default and defaults to 20µs in Firefox 59; in 60 it will be 2ms.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @returns A Number representing the milliseconds elapsed since the UNIX epoch.\r\n * @example\r\n * ```ts\r\n * let now = utcNow();\r\n * ```\r\n */\r\nexport function utcNow() {\r\n return (Date.now || polyUtcNow)();\r\n}\r\n/**\r\n * Polyfill fallback to return the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.\r\n *\r\n * To offer protection against timing attacks and fingerprinting, the precision of dateNow()\r\n * might get rounded depending on browser settings. In Firefox, the privacy.reduceTimerPrecision\r\n * preference is enabled by default and defaults to 20µs in Firefox 59; in 60 it will be 2ms.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n * @group Polyfill\r\n *\r\n * @returns A Number representing the milliseconds elapsed since the UNIX epoch.\r\n * @example\r\n * ```ts\r\n * let now = polyUtcNow();\r\n * ```\r\n*/\r\nexport function polyUtcNow() {\r\n return new Date().getTime();\r\n}\r\n//# sourceMappingURL=date.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\n/**\r\n * Return the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.\r\n *\r\n * To offer protection against timing attacks and fingerprinting, the precision of dateNow()\r\n * might get rounded depending on browser settings. In Firefox, the privacy.reduceTimerPrecision\r\n * preference is enabled by default and defaults to 20µs in Firefox 59; in 60 it will be 2ms.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @returns A Number representing the milliseconds elapsed since the UNIX epoch.\r\n * @example\r\n * ```ts\r\n * let now = utcNow();\r\n * ```\r\n */\r\nexport function utcNow() {\r\n return (Date.now || polyUtcNow)();\r\n}\r\n\r\n/**\r\n * Polyfill fallback to return the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.\r\n *\r\n * To offer protection against timing attacks and fingerprinting, the precision of dateNow()\r\n * might get rounded depending on browser settings. In Firefox, the privacy.reduceTimerPrecision\r\n * preference is enabled by default and defaults to 20µs in Firefox 59; in 60 it will be 2ms.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n * @group Polyfill\r\n *\r\n * @returns A Number representing the milliseconds elapsed since the UNIX epoch.\r\n * @example\r\n * ```ts\r\n * let now = polyUtcNow();\r\n * ```\r\n*/\r\nexport function polyUtcNow() {\r\n return new Date().getTime();\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { utcNow } from \"./date\";\r\nimport { lazySafeGetInst } from \"./environment\";\r\nimport { _globalLazyTestHooks } from \"./lazy\";\r\nvar _perf;\r\n/**\r\n * Identify whether the runtimne contains a `performance` object\r\n *\r\n * @since 0.4.4\r\n * @group Environment\r\n * @returns\r\n */\r\nexport function hasPerformance() {\r\n return !!getPerformance();\r\n}\r\n/**\r\n * Returns the global `performance` Object if available, which can be used to\r\n * gather performance information about the current document. It serves as the\r\n * point of exposure for the Performance Timeline API, the High Resolution Time\r\n * API, the Navigation Timing API, the User Timing API, and the Resource Timing API.\r\n *\r\n * @since 0.4.4\r\n * @group Environment\r\n * @returns The global performance object if available.\r\n */\r\nexport function getPerformance() {\r\n (!_perf || (!_perf.b && _globalLazyTestHooks && _globalLazyTestHooks.lzy)) && (_perf = lazySafeGetInst(\"performance\"));\r\n return _perf.v;\r\n}\r\n/**\r\n * Returns the number of milliseconds that has elapsed since the time origin, if\r\n * the runtime does not support the `performance` API it will fallback to return\r\n * the number of milliseconds since the unix epoch.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @returns The number of milliseconds as a `DOMHighResTimeStamp` double value or\r\n * an integer depending on the runtime.\r\n * @example\r\n * ```ts\r\n * let now = perfNow();\r\n * ```\r\n */\r\nexport function perfNow() {\r\n var perf = getPerformance();\r\n if (perf && perf.now) {\r\n return perf.now();\r\n }\r\n return utcNow();\r\n}\r\n/**\r\n * Return the number of milliseconds that have elapsed since the provided `startTime`\r\n * the `startTime` MUST be obtained from {@link perfNow} to ensure the correct elapsed\r\n * value is returned.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @param startTime - The startTime obtained from `perfNow`\r\n * @returns The number of milliseconds that have elapsed since the startTime.\r\n * @example\r\n * ```ts\r\n * let start = perfNow();\r\n * // Do some work\r\n * let totalTime = elapsedTime(start);\r\n * ```\r\n */\r\nexport function elapsedTime(startTime) {\r\n return perfNow() - startTime;\r\n}\r\n//# sourceMappingURL=perf.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { utcNow } from \"./date\";\r\nimport { lazySafeGetInst } from \"./environment\";\r\nimport { ILazyValue, _globalLazyTestHooks } from \"./lazy\";\r\n\r\nlet _perf: ILazyValue\r\n\r\n/**\r\n * Identify whether the runtimne contains a `performance` object\r\n *\r\n * @since 0.4.4\r\n * @group Environment\r\n * @returns\r\n */\r\nexport function hasPerformance(): boolean {\r\n return !!getPerformance();\r\n}\r\n\r\n/**\r\n * Returns the global `performance` Object if available, which can be used to\r\n * gather performance information about the current document. It serves as the\r\n * point of exposure for the Performance Timeline API, the High Resolution Time\r\n * API, the Navigation Timing API, the User Timing API, and the Resource Timing API.\r\n *\r\n * @since 0.4.4\r\n * @group Environment\r\n * @returns The global performance object if available.\r\n */\r\nexport function getPerformance(): Performance {\r\n (!_perf || (!_perf.b && _globalLazyTestHooks && _globalLazyTestHooks.lzy)) && (_perf = lazySafeGetInst(\"performance\"));\r\n return _perf.v;\r\n}\r\n\r\n/**\r\n * Returns the number of milliseconds that has elapsed since the time origin, if\r\n * the runtime does not support the `performance` API it will fallback to return\r\n * the number of milliseconds since the unix epoch.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @returns The number of milliseconds as a `DOMHighResTimeStamp` double value or\r\n * an integer depending on the runtime.\r\n * @example\r\n * ```ts\r\n * let now = perfNow();\r\n * ```\r\n */\r\nexport function perfNow(): number {\r\n let perf = getPerformance();\r\n if (perf && perf.now) {\r\n return perf.now();\r\n }\r\n\r\n return utcNow();\r\n}\r\n\r\n/**\r\n * Return the number of milliseconds that have elapsed since the provided `startTime`\r\n * the `startTime` MUST be obtained from {@link perfNow} to ensure the correct elapsed\r\n * value is returned.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @param startTime - The startTime obtained from `perfNow`\r\n * @returns The number of milliseconds that have elapsed since the startTime.\r\n * @example\r\n * ```ts\r\n * let start = perfNow();\r\n * // Do some work\r\n * let totalTime = elapsedTime(start);\r\n * ```\r\n */\r\nexport function elapsedTime(startTime: number): number {\r\n return perfNow() - startTime;\r\n}","import { isArray, isString, strLeft, strTrim } from \"@nevware21/ts-utils\";\r\nimport { _DYN_LENGTH, _DYN_SPAN_ID, _DYN_TO_LOWER_CASE, _DYN_TRACE_FLAGS, _DYN_TRACE_ID, _DYN_VERSION } from \"../__DynamicConstants\";\r\nimport { generateW3CId } from \"./CoreUtils\";\r\nimport { findMetaTag, findNamedServerTiming } from \"./EnvUtils\";\r\nimport { STR_EMPTY } from \"./InternalConstants\";\r\n// using {0,16} for leading and trailing whitespace just to constrain the possible runtime of a random string\r\nvar TRACE_PARENT_REGEX = /^([\\da-f]{2})-([\\da-f]{32})-([\\da-f]{16})-([\\da-f]{2})(-[^\\s]{1,64})?$/i;\r\nvar DEFAULT_VERSION = \"00\";\r\nvar INVALID_VERSION = \"ff\";\r\nvar INVALID_TRACE_ID = \"00000000000000000000000000000000\";\r\nvar INVALID_SPAN_ID = \"0000000000000000\";\r\nvar SAMPLED_FLAG = 0x01;\r\nfunction _isValid(value, len, invalidValue) {\r\n if (value && value[_DYN_LENGTH /* @min:%2elength */] === len && value !== invalidValue) {\r\n return !!value.match(/^[\\da-f]*$/i);\r\n }\r\n return false;\r\n}\r\nfunction _formatValue(value, len, defValue) {\r\n if (_isValid(value, len)) {\r\n return value;\r\n }\r\n return defValue;\r\n}\r\nfunction _formatFlags(value) {\r\n if (isNaN(value) || value < 0 || value > 255) {\r\n value = 0x01;\r\n }\r\n var result = value.toString(16);\r\n while (result[_DYN_LENGTH /* @min:%2elength */] < 2) {\r\n result = \"0\" + result;\r\n }\r\n return result;\r\n}\r\n/**\r\n * Create a new ITraceParent instance using the provided values.\r\n * @param traceId - The traceId to use, when invalid a new random W3C id will be generated.\r\n * @param spanId - The parent/span id to use, a new random value will be generated if it is invalid.\r\n * @param flags - The traceFlags to use, defaults to zero (0) if not supplied or invalid\r\n * @param version - The version to used, defaults to version \"01\" if not supplied or invalid.\r\n * @returns\r\n */\r\nexport function createTraceParent(traceId, spanId, flags, version) {\r\n var _a;\r\n return _a = {},\r\n _a[_DYN_VERSION /* @min:version */] = _isValid(version, 2, INVALID_VERSION) ? version : DEFAULT_VERSION,\r\n _a[_DYN_TRACE_ID /* @min:traceId */] = isValidTraceId(traceId) ? traceId : generateW3CId(),\r\n _a[_DYN_SPAN_ID /* @min:spanId */] = isValidSpanId(spanId) ? spanId : strLeft(generateW3CId(), 16),\r\n _a.traceFlags = flags >= 0 && flags <= 0xFF ? flags : 1,\r\n _a;\r\n}\r\n/**\r\n * Attempt to parse the provided string as a W3C TraceParent header value (https://www.w3.org/TR/trace-context/#traceparent-header)\r\n *\r\n * @param value\r\n * @returns\r\n */\r\nexport function parseTraceParent(value) {\r\n var _a;\r\n if (!value) {\r\n // Don't pass a null/undefined or empty string\r\n return null;\r\n }\r\n if (isArray(value)) {\r\n // The value may have been encoded on the page into an array so handle this automatically\r\n value = value[0] || \"\";\r\n }\r\n if (!value || !isString(value) || value[_DYN_LENGTH /* @min:%2elength */] > 8192) {\r\n // limit potential processing based on total length\r\n return null;\r\n }\r\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\r\n var match = TRACE_PARENT_REGEX.exec(strTrim(value));\r\n if (!match || // No match\r\n match[1] === INVALID_VERSION || // version ff is forbidden\r\n match[2] === INVALID_TRACE_ID || // All zeros is considered to be invalid\r\n match[3] === INVALID_SPAN_ID) { // All zeros is considered to be invalid\r\n return null;\r\n }\r\n return _a = {\r\n version: (match[1] || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */](),\r\n traceId: (match[2] || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */](),\r\n spanId: (match[3] || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]()\r\n },\r\n _a[_DYN_TRACE_FLAGS /* @min:traceFlags */] = parseInt(match[4], 16),\r\n _a;\r\n}\r\n/**\r\n * Is the provided W3c Trace Id a valid string representation, it must be a 32-character string\r\n * of lowercase hexadecimal characters for example, 4bf92f3577b34da6a3ce929d0e0e4736.\r\n * If all characters as zero (00000000000000000000000000000000) it will be considered an invalid value.\r\n * @param value - The W3c trace Id to be validated\r\n * @returns true if valid otherwise false\r\n */\r\nexport function isValidTraceId(value) {\r\n return _isValid(value, 32, INVALID_TRACE_ID);\r\n}\r\n/**\r\n * Is the provided W3c span id (aka. parent id) a valid string representation, it must be a 16-character\r\n * string of lowercase hexadecimal characters, for example, 00f067aa0ba902b7.\r\n * If all characters are zero (0000000000000000) this is considered an invalid value.\r\n * @param value - The W3c span id to be validated\r\n * @returns true if valid otherwise false\r\n */\r\nexport function isValidSpanId(value) {\r\n return _isValid(value, 16, INVALID_SPAN_ID);\r\n}\r\n/**\r\n * Validates that the provided ITraceParent instance conforms to the currently supported specifications\r\n * @param value\r\n * @returns\r\n */\r\nexport function isValidTraceParent(value) {\r\n if (!value ||\r\n !_isValid(value[_DYN_VERSION /* @min:%2eversion */], 2, INVALID_VERSION) ||\r\n !_isValid(value[_DYN_TRACE_ID /* @min:%2etraceId */], 32, INVALID_TRACE_ID) ||\r\n !_isValid(value[_DYN_SPAN_ID /* @min:%2espanId */], 16, INVALID_SPAN_ID) ||\r\n !_isValid(_formatFlags(value[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */]), 2)) {\r\n // Each known field must contain a valid value\r\n return false;\r\n }\r\n return true;\r\n}\r\n/**\r\n * Is the parsed traceParent indicating that the trace is currently sampled.\r\n * @param value - The parsed traceParent value\r\n * @returns\r\n */\r\nexport function isSampledFlag(value) {\r\n if (isValidTraceParent(value)) {\r\n return (value[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] & SAMPLED_FLAG) === SAMPLED_FLAG;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Format the ITraceParent value as a string using the supported and know version formats.\r\n * So even if the passed traceParent is a later version the string value returned from this\r\n * function will convert it to only the known version formats.\r\n * This currently only supports version \"00\" and invalid \"ff\"\r\n * @param value - The parsed traceParent value\r\n * @returns\r\n */\r\nexport function formatTraceParent(value) {\r\n if (value) {\r\n // Special Note: This only supports formatting as version 00, future versions should encode any known supported version\r\n // So parsing a future version will populate the correct version value but reformatting will reduce it to version 00.\r\n var flags = _formatFlags(value[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */]);\r\n if (!_isValid(flags, 2)) {\r\n flags = \"01\";\r\n }\r\n var version = value[_DYN_VERSION /* @min:%2eversion */] || DEFAULT_VERSION;\r\n if (version !== \"00\" && version !== \"ff\") {\r\n // Reduce version to \"00\"\r\n version = DEFAULT_VERSION;\r\n }\r\n // Format as version 00\r\n return \"\".concat(version.toLowerCase(), \"-\").concat(_formatValue(value.traceId, 32, INVALID_TRACE_ID).toLowerCase(), \"-\").concat(_formatValue(value.spanId, 16, INVALID_SPAN_ID).toLowerCase(), \"-\").concat(flags.toLowerCase());\r\n }\r\n return \"\";\r\n}\r\n/**\r\n * Helper function to fetch the passed traceparent from the page, looking for it as a meta-tag or a Server-Timing header.\r\n * @returns\r\n */\r\nexport function findW3cTraceParent() {\r\n var name = \"traceparent\";\r\n var traceParent = parseTraceParent(findMetaTag(name));\r\n if (!traceParent) {\r\n traceParent = parseTraceParent(findNamedServerTiming(name));\r\n }\r\n return traceParent;\r\n}\r\n//# sourceMappingURL=W3cTraceParent.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { isNullOrUndefined, isUndefined } from \"../helpers/base\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { EMPTY, LENGTH, StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunction, _unwrapFunctionWithPoly } from \"../internal/unwrapFunction\";\r\nimport { mathMax } from \"../math/min_max\";\r\nimport { strSlice } from \"./slice\";\r\n/**\r\n * The `strSubstring()` method returns the part of the string between the start and end indexes, or to the end of the string.\r\n *\r\n * `strSubstring()` extracts characters from indexStart up to but not including indexEnd. In particular:\r\n * - If `indexEnd` is omitted, strSubstring() extracts characters to the end of the string.\r\n * - If `indexStart` is equal to indexEnd, strSubstring() returns an empty string.\r\n * - If `indexStart` is greater than indexEnd, then the effect of strSubstring() is as if the two arguments were swapped; see example below.\r\n *\r\n * Any argument value that is less than 0 or greater than `value.length` is treated as if it were 0 and `value.length`, respectively.\r\n *\r\n * Any argument value that is NaN is treated as if it were 0.\r\n * @group String\r\n * @param value - The string value to return the substring from.\r\n * @param indexStart - The index of the first character to include in the returned substring.\r\n * @param indexEnd - The index of the first character to exclude from the returned substring.\r\n * @return A new string containing the specified part of the given string\r\n * @example\r\n * ```ts\r\n * const anyString = 'Nevware21';\r\n * // Displays 'N'\r\n * console.log(strSubstring(anyString, 0, 1));\r\n * console.log(strSubstring(anyString, 1, 0));\r\n *\r\n * // Displays 'Nevwar'\r\n * console.log(strSubstring(anyString, 0, 6));\r\n *\r\n * // Displays 'are21'\r\n * console.log(strSubstring(anyString, 4));\r\n *\r\n * // Displays 'are'\r\n * console.log(strSubstring(anyString, 4, 7));\r\n *\r\n * // Displays '21'\r\n * console.log(strSubstring(anyString, 7, 4));\r\n *\r\n * // Displays 'Nevware'\r\n * console.log(strSubstring(anyString, 0, 7));\r\n *\r\n * // Displays 'Nevware21'\r\n * console.log(strSubstring(anyString, 0, 10));\r\n * ```\r\n */\r\nexport var strSubstring = _unwrapFunction(\"substring\", StrProto);\r\n/**\r\n * The strSubstr() method returns a portion of the string, starting at the specified index and extending for a given\r\n * number of characters afterwards.\r\n *\r\n * @since 0.4.2\r\n * @group String\r\n * @param value - The string value to return the substring from.\r\n * @param start - The index of the first character to include in the returned substring.\r\n * @param length - The number of characters to extract.\r\n * @returns A new string containing the specified part of the given string.\r\n */\r\nexport var strSubstr = _unwrapFunctionWithPoly(\"substr\", StrProto, polyStrSubstr);\r\n/**\r\n * The polyStrSubstr() method returns a portion of the string, starting at the specified index and extending for a given\r\n * number of characters afterwards.\r\n *\r\n * @since 0.4.2\r\n * @group String\r\n * @group Polyfill\r\n * @param value - The string value to return the substring from.\r\n * @param start - The index of the first character to include in the returned substring.\r\n * @param length - The number of characters to extract.\r\n * @returns A new string containing the specified part of the given string.\r\n */\r\nexport function polyStrSubstr(value, start, length) {\r\n if (isNullOrUndefined(value)) {\r\n throwTypeError(\"'polyStrSubstr called with invalid \" + dumpObj(value));\r\n }\r\n if (length < 0) {\r\n return EMPTY;\r\n }\r\n // If start is omitted or undefined, its treated as zero\r\n start = start || 0;\r\n if (start < 0) {\r\n start = mathMax(start + value[LENGTH], 0);\r\n }\r\n if (isUndefined(length)) {\r\n return strSlice(value, start);\r\n }\r\n return strSlice(value, start, start + length);\r\n}\r\n/**\r\n * Returns a substring of the string starting from the left.\r\n *\r\n * `strLeft()` extracts the number of characters from left of the string up to the count. In particular:\r\n * - If `count` is less than zero, strLeft() returns an empty string.\r\n * - If `count` is less than `value.length', strLeft() returns a new string with the `count` number of characters from the left of the string.\r\n * - If `count` is greater than `value.length`, then the value original value is returned.\r\n *\r\n * Any argument value that is NaN is treated as if it were 0.\r\n *\r\n * @since 0.4.2\r\n * @group String\r\n * @param value - The string value to return the substring from.\r\n * @param count - The number of characters to extract\r\n * @returns The substring based on the count number of characters from the right\r\n * @example\r\n * ```ts\r\n * strLeft(\"Nevware21\", -1); // \"\"\r\n * strLeft(\"Nevware21\", 0); // \"\"\r\n * strLeft(\"Nevware21\", 1); // \"N\"\r\n * strLeft(\"Nevware21\", 3); // \"Nev\"\r\n * strLeft(\"Nevware21\", 21); // \"Nevware21\"\r\n * ```\r\n */\r\nexport function strLeft(value, count) {\r\n return strSubstring(value, 0, count);\r\n}\r\n/**\r\n * Returns a substring of the string starting from the right.\r\n *\r\n * `strRight()` extracts the number of characters from right of the string up to the count. In particular:\r\n * - If `count` is less than zero, strRight() returns an empty string.\r\n * - If `count` is less than `value.length', strRight() returns a new string with the `count` number of characters from the right of the string.\r\n * - If `count` is greater than `value.length`, then the value original value is returned.\r\n *\r\n * Any argument value that is NaN is treated as if it were 0.\r\n *\r\n * @since 0.4.2\r\n * @group String\r\n * @param value - The string value to return the substring from.\r\n * @param count - The number of characters to extract\r\n * @returns The substring based on the count number of characters from the right\r\n * @example\r\n * ```ts\r\n * strRight(\"Nevware21\", -1); // \"\"\r\n * strRight(\"Nevware21\", 0); // \"\"\r\n * strRight(\"Nevware21\", 1); // \"1\"\r\n * strRight(\"Nevware21\", 3); // \"e21\"\r\n * strRight(\"Nevware21\", 21); // \"Nevware21\"\r\n * ```\r\n */\r\nexport function strRight(value, count) {\r\n var len = value[LENGTH];\r\n if (count <= 0) {\r\n return EMPTY;\r\n }\r\n return len > count ? strSubstring(value, len - count) : value;\r\n}\r\n//# sourceMappingURL=substring.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { isNullOrUndefined, isUndefined } from \"../helpers/base\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { EMPTY, LENGTH, StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunction, _unwrapFunctionWithPoly } from \"../internal/unwrapFunction\";\r\nimport { mathMax } from \"../math/min_max\";\r\nimport { strSlice } from \"./slice\";\r\n\r\n/**\r\n * The `strSubstring()` method returns the part of the string between the start and end indexes, or to the end of the string.\r\n *\r\n * `strSubstring()` extracts characters from indexStart up to but not including indexEnd. In particular:\r\n * - If `indexEnd` is omitted, strSubstring() extracts characters to the end of the string.\r\n * - If `indexStart` is equal to indexEnd, strSubstring() returns an empty string.\r\n * - If `indexStart` is greater than indexEnd, then the effect of strSubstring() is as if the two arguments were swapped; see example below.\r\n *\r\n * Any argument value that is less than 0 or greater than `value.length` is treated as if it were 0 and `value.length`, respectively.\r\n *\r\n * Any argument value that is NaN is treated as if it were 0.\r\n * @group String\r\n * @param value - The string value to return the substring from.\r\n * @param indexStart - The index of the first character to include in the returned substring.\r\n * @param indexEnd - The index of the first character to exclude from the returned substring.\r\n * @return A new string containing the specified part of the given string\r\n * @example\r\n * ```ts\r\n * const anyString = 'Nevware21';\r\n * // Displays 'N'\r\n * console.log(strSubstring(anyString, 0, 1));\r\n * console.log(strSubstring(anyString, 1, 0));\r\n *\r\n * // Displays 'Nevwar'\r\n * console.log(strSubstring(anyString, 0, 6));\r\n *\r\n * // Displays 'are21'\r\n * console.log(strSubstring(anyString, 4));\r\n *\r\n * // Displays 'are'\r\n * console.log(strSubstring(anyString, 4, 7));\r\n *\r\n * // Displays '21'\r\n * console.log(strSubstring(anyString, 7, 4));\r\n *\r\n * // Displays 'Nevware'\r\n * console.log(strSubstring(anyString, 0, 7));\r\n *\r\n * // Displays 'Nevware21'\r\n * console.log(strSubstring(anyString, 0, 10));\r\n * ```\r\n */\r\nexport const strSubstring: (value: string, indexStart: number, indexEnd?: number) => string = _unwrapFunction(\"substring\", StrProto);\r\n\r\n/**\r\n * The strSubstr() method returns a portion of the string, starting at the specified index and extending for a given\r\n * number of characters afterwards.\r\n *\r\n * @since 0.4.2\r\n * @group String\r\n * @param value - The string value to return the substring from.\r\n * @param start - The index of the first character to include in the returned substring.\r\n * @param length - The number of characters to extract.\r\n * @returns A new string containing the specified part of the given string.\r\n */\r\nexport const strSubstr: (value: string, indexStart: number, indexEnd?: number) => string = _unwrapFunctionWithPoly(\"substr\", StrProto, polyStrSubstr);\r\n\r\n/**\r\n * The polyStrSubstr() method returns a portion of the string, starting at the specified index and extending for a given\r\n * number of characters afterwards.\r\n *\r\n * @since 0.4.2\r\n * @group String\r\n * @group Polyfill\r\n * @param value - The string value to return the substring from.\r\n * @param start - The index of the first character to include in the returned substring.\r\n * @param length - The number of characters to extract.\r\n * @returns A new string containing the specified part of the given string.\r\n */\r\nexport function polyStrSubstr(value: string, start: number, length?: number): string {\r\n if (isNullOrUndefined(value)) {\r\n throwTypeError(\"'polyStrSubstr called with invalid \" + dumpObj(value));\r\n }\r\n\r\n if (length < 0) {\r\n return EMPTY;\r\n }\r\n\r\n // If start is omitted or undefined, its treated as zero\r\n start = start || 0;\r\n\r\n if (start < 0) {\r\n start = mathMax(start + value[LENGTH], 0);\r\n }\r\n\r\n if (isUndefined(length)) {\r\n return strSlice(value, start);\r\n }\r\n\r\n return strSlice(value, start, start + length);\r\n}\r\n\r\n/**\r\n * Returns a substring of the string starting from the left.\r\n *\r\n * `strLeft()` extracts the number of characters from left of the string up to the count. In particular:\r\n * - If `count` is less than zero, strLeft() returns an empty string.\r\n * - If `count` is less than `value.length', strLeft() returns a new string with the `count` number of characters from the left of the string.\r\n * - If `count` is greater than `value.length`, then the value original value is returned.\r\n *\r\n * Any argument value that is NaN is treated as if it were 0.\r\n *\r\n * @since 0.4.2\r\n * @group String\r\n * @param value - The string value to return the substring from.\r\n * @param count - The number of characters to extract\r\n * @returns The substring based on the count number of characters from the right\r\n * @example\r\n * ```ts\r\n * strLeft(\"Nevware21\", -1); // \"\"\r\n * strLeft(\"Nevware21\", 0); // \"\"\r\n * strLeft(\"Nevware21\", 1); // \"N\"\r\n * strLeft(\"Nevware21\", 3); // \"Nev\"\r\n * strLeft(\"Nevware21\", 21); // \"Nevware21\"\r\n * ```\r\n */\r\nexport function strLeft(value: string, count: number): string {\r\n return strSubstring(value, 0, count);\r\n}\r\n\r\n/**\r\n * Returns a substring of the string starting from the right.\r\n *\r\n * `strRight()` extracts the number of characters from right of the string up to the count. In particular:\r\n * - If `count` is less than zero, strRight() returns an empty string.\r\n * - If `count` is less than `value.length', strRight() returns a new string with the `count` number of characters from the right of the string.\r\n * - If `count` is greater than `value.length`, then the value original value is returned.\r\n *\r\n * Any argument value that is NaN is treated as if it were 0.\r\n *\r\n * @since 0.4.2\r\n * @group String\r\n * @param value - The string value to return the substring from.\r\n * @param count - The number of characters to extract\r\n * @returns The substring based on the count number of characters from the right\r\n * @example\r\n * ```ts\r\n * strRight(\"Nevware21\", -1); // \"\"\r\n * strRight(\"Nevware21\", 0); // \"\"\r\n * strRight(\"Nevware21\", 1); // \"1\"\r\n * strRight(\"Nevware21\", 3); // \"e21\"\r\n * strRight(\"Nevware21\", 21); // \"Nevware21\"\r\n * ```\r\n */\r\nexport function strRight(value: string, count: number): string {\r\n let len = value[LENGTH];\r\n if (count <= 0) {\r\n return EMPTY;\r\n }\r\n\r\n return len > count ? strSubstring(value, len - count) : value;\r\n}","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { MathCls } from \"../internal/constants\";\r\n/**\r\n * The mathMin() function returns the lowest-valued number passed into it, or NaN if any\r\n * parameter isn't a number and can't be converted into one.\r\n *\r\n * If no arguments are given, the result is Infinity.\r\n *\r\n * If at least one of arguments cannot be converted to a number, the result is NaN.\r\n *\r\n * @since 0.4.2\r\n * @group Math\r\n * @param values - Zero or more numbers among which the lowest value will be selected and returned.\r\n * @returns The smallest of the given numbers. If any one or more of the parameters cannot\r\n * be converted into a number, NaN is returned. The result is Infinity if no parameters are provided.\r\n * @example\r\n * ```ts\r\n * const x = 10, y = -20;\r\n * const z = Math.min(x, y); // -20\r\n * ```\r\n */\r\nexport var mathMin = MathCls.min;\r\n/**\r\n * The `mathMax()` function returns the largest of the zero or more numbers given as input\r\n * parameters, or NaN if any parameter isn't a number and can't be converted into one.\r\n *\r\n * If no arguments are given, the result is -Infinity.\r\n *\r\n * If at least one of arguments cannot be converted to a number, the result is NaN.\r\n *\r\n * @since 0.4.2\r\n * @group Math\r\n * @param values - Zero or more numbers among which the largest value will be selected and returned.\r\n * @returns The largest of the given numbers. If any one or more of the parameters cannot be\r\n * converted into a number, NaN is returned. The result is -Infinity if no parameters are provided.\r\n * @example\r\n * ```ts\r\n * mathMax(10, 20); // 20\r\n * mathMax(-10, -20); // -10\r\n * mathMax(-10, 20); // 20\r\n * ```\r\n */\r\nexport var mathMax = MathCls.max;\r\n//# sourceMappingURL=min_max.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { MathCls } from \"../internal/constants\";\r\n\r\n/**\r\n * The mathMin() function returns the lowest-valued number passed into it, or NaN if any\r\n * parameter isn't a number and can't be converted into one.\r\n *\r\n * If no arguments are given, the result is Infinity.\r\n *\r\n * If at least one of arguments cannot be converted to a number, the result is NaN.\r\n *\r\n * @since 0.4.2\r\n * @group Math\r\n * @param values - Zero or more numbers among which the lowest value will be selected and returned.\r\n * @returns The smallest of the given numbers. If any one or more of the parameters cannot\r\n * be converted into a number, NaN is returned. The result is Infinity if no parameters are provided.\r\n * @example\r\n * ```ts\r\n * const x = 10, y = -20;\r\n * const z = Math.min(x, y); // -20\r\n * ```\r\n */\r\nexport const mathMin: (...values: number[]) => number = MathCls.min;\r\n\r\n/**\r\n * The `mathMax()` function returns the largest of the zero or more numbers given as input\r\n * parameters, or NaN if any parameter isn't a number and can't be converted into one.\r\n *\r\n * If no arguments are given, the result is -Infinity.\r\n *\r\n * If at least one of arguments cannot be converted to a number, the result is NaN.\r\n *\r\n * @since 0.4.2\r\n * @group Math\r\n * @param values - Zero or more numbers among which the largest value will be selected and returned.\r\n * @returns The largest of the given numbers. If any one or more of the parameters cannot be\r\n * converted into a number, NaN is returned. The result is -Infinity if no parameters are provided.\r\n * @example\r\n * ```ts\r\n * mathMax(10, 20); // 20\r\n * mathMax(-10, -20); // -10\r\n * mathMax(-10, 20); // 20\r\n * ```\r\n */\r\nexport const mathMax: (...values: number[]) => number = MathCls.max;\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { SLICE, StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\n/**\r\n * The `strSlice()` method extracts a section of a string and returns it as a new string, without\r\n * modifying the original string.\r\n * `strSlice()` extracts the text from one string and returns a new string. Changes to the text in one\r\n * string do not affect the other string.\r\n * `strSlice()` extracts up to but not including endIndex. str.slice(1, 4) extracts the second character\r\n * through the fourth character (characters indexed 1, 2, and 3).\r\n * As an example, strSlice(2, -1) extracts the third character through the second to last character\r\n * in the string.\r\n * @group String\r\n * @param value - The value to haveextract a number\r\n * @param beginIndex - The zero-based index at which to begin extraction.\r\n * If `beginIndex` is negative, `strSlice()` begins extraction from `value.length + beginIndex`.\r\n * (E.g. `strSlice(\"test\", -2)` returns \"st\")\r\n * If `beginIndex` is omitted, undefined, or cannot be converted to a number (using Number(`beginIndex`)),\r\n * strSlice() begins extraction from the beginning of the string. (E.g. `strSlice(\"test\")` returns \"test\")\r\n * If `beginIndex` is greater than or equal to `value.length`, an empty string is returned.\r\n * (E.g. `strSlice(\"test\", 4)` returns \"\")\r\n * @param endIndex - The index of the first character to exclude from the returned substring.\r\n * If `endIndex` is omitted, undefined, or cannot be converted to a number (using Number(`endIndex`))\r\n * strSlice() extracts to the end of the string. (E.g. `strSlice(\"test\", 2)` returns \"st\")\r\n * If `endIndex` is greater than `value.length`, strSlice() also extracts to the end of the string.\r\n * (E.g. strSlice(\"test\", 2, 10)` returns \"st\")\r\n * If `endIndex` is negative, `strSlice()` treats it as `value.length + endIndex`. (E.g, if `endIndex`\r\n * is -2, it is treated as `value.length - 2` and `strSlice(\"test\", 1, -2)` returns \"e\") .\r\n * If `endIndex` represents a position that is before the one represented by startIndex, `strSlice()`\r\n * returns \"\". (E.g `strSlice(\"test\", 2, -10)`, strSlice(\"test\", -1, -2)` or `strSlice(\"test\", 3, 2)`).\r\n * @returns A new string containing the extracted section of the string.\r\n */\r\nexport var strSlice = _unwrapFunction(SLICE, StrProto);\r\n//# sourceMappingURL=slice.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { SLICE, StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\n\r\n/**\r\n * The `strSlice()` method extracts a section of a string and returns it as a new string, without\r\n * modifying the original string.\r\n * `strSlice()` extracts the text from one string and returns a new string. Changes to the text in one\r\n * string do not affect the other string.\r\n * `strSlice()` extracts up to but not including endIndex. str.slice(1, 4) extracts the second character\r\n * through the fourth character (characters indexed 1, 2, and 3).\r\n * As an example, strSlice(2, -1) extracts the third character through the second to last character\r\n * in the string.\r\n * @group String\r\n * @param value - The value to haveextract a number\r\n * @param beginIndex - The zero-based index at which to begin extraction.\r\n * If `beginIndex` is negative, `strSlice()` begins extraction from `value.length + beginIndex`.\r\n * (E.g. `strSlice(\"test\", -2)` returns \"st\")\r\n * If `beginIndex` is omitted, undefined, or cannot be converted to a number (using Number(`beginIndex`)),\r\n * strSlice() begins extraction from the beginning of the string. (E.g. `strSlice(\"test\")` returns \"test\")\r\n * If `beginIndex` is greater than or equal to `value.length`, an empty string is returned.\r\n * (E.g. `strSlice(\"test\", 4)` returns \"\")\r\n * @param endIndex - The index of the first character to exclude from the returned substring.\r\n * If `endIndex` is omitted, undefined, or cannot be converted to a number (using Number(`endIndex`))\r\n * strSlice() extracts to the end of the string. (E.g. `strSlice(\"test\", 2)` returns \"st\")\r\n * If `endIndex` is greater than `value.length`, strSlice() also extracts to the end of the string.\r\n * (E.g. strSlice(\"test\", 2, 10)` returns \"st\")\r\n * If `endIndex` is negative, `strSlice()` treats it as `value.length + endIndex`. (E.g, if `endIndex`\r\n * is -2, it is treated as `value.length - 2` and `strSlice(\"test\", 1, -2)` returns \"e\") .\r\n * If `endIndex` represents a position that is before the one represented by startIndex, `strSlice()`\r\n * returns \"\". (E.g `strSlice(\"test\", 2, -10)`, strSlice(\"test\", -1, -2)` or `strSlice(\"test\", 3, 2)`).\r\n * @returns A new string containing the extracted section of the string.\r\n */\r\nexport const strSlice: (value: string, beginIndex: number, endIndex?: number) => string = _unwrapFunction(SLICE, StrProto);\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunctionWithPoly } from \"../internal/unwrapFunction\";\r\nimport { polyStrTrim, polyStrTrimEnd, polyStrTrimStart } from \"../polyfills/trim\";\r\n/**\r\n * The trim() method removes whitespace from both ends of a string and returns a new string,\r\n * without modifying the original string. Whitespace in this context is all the whitespace\r\n * characters (space, tab, no-break space, etc.) and all the line terminator characters\r\n * (LF, CR, etc.).\r\n * @group String\r\n * @param value - The string value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from both its beginning and end.\r\n * If neither the beginning or end of str has any whitespace, a new string is still returned (essentially\r\n * a copy of str), with no exception being thrown.\r\n * To return a new string with whitespace trimmed from just one end, use `strTrimStart()` or `strTrimEnd()`.\r\n */\r\nexport var strTrim = _unwrapFunctionWithPoly(\"trim\", StrProto, polyStrTrim);\r\n/**\r\n * The `strTrimStart()` method removes whitespace from the beginning of a string.\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its beginning (left side).\r\n * If the beginning of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport var strTrimStart = _unwrapFunctionWithPoly(\"trimStart\", StrProto, polyStrTrimStart);\r\n/**\r\n * Alias for `strTrimStart()` method removes whitespace from the beginning of a string.\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its beginning (left side).\r\n * If the beginning of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport var strTrimLeft = strTrimStart;\r\n/**\r\n * The `strTrimEnd()` method removes whitespace from the end of a string.\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its end (right side).\r\n * If the end of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport var strTrimEnd = _unwrapFunctionWithPoly(\"trimEnd\", StrProto, polyStrTrimEnd);\r\n/**\r\n * Alias for `strTrimEnd()` method removes whitespace from the end of a string.\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its end (right side).\r\n * If the end of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport var strTrimRight = strTrimEnd;\r\n//# sourceMappingURL=trim.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunctionWithPoly } from \"../internal/unwrapFunction\";\r\nimport { polyStrTrim, polyStrTrimEnd, polyStrTrimStart } from \"../polyfills/trim\";\r\n\r\n/**\r\n * The trim() method removes whitespace from both ends of a string and returns a new string,\r\n * without modifying the original string. Whitespace in this context is all the whitespace\r\n * characters (space, tab, no-break space, etc.) and all the line terminator characters\r\n * (LF, CR, etc.).\r\n * @group String\r\n * @param value - The string value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from both its beginning and end.\r\n * If neither the beginning or end of str has any whitespace, a new string is still returned (essentially\r\n * a copy of str), with no exception being thrown.\r\n * To return a new string with whitespace trimmed from just one end, use `strTrimStart()` or `strTrimEnd()`.\r\n */\r\nexport const strTrim: (value: string) => string = _unwrapFunctionWithPoly(\"trim\", StrProto, polyStrTrim);\r\n\r\n/**\r\n * The `strTrimStart()` method removes whitespace from the beginning of a string.\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its beginning (left side).\r\n * If the beginning of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport const strTrimStart: (value: string) => string = _unwrapFunctionWithPoly(\"trimStart\", StrProto, polyStrTrimStart);\r\n\r\n/**\r\n * Alias for `strTrimStart()` method removes whitespace from the beginning of a string.\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its beginning (left side).\r\n * If the beginning of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport const strTrimLeft = strTrimStart;\r\n\r\n/**\r\n * The `strTrimEnd()` method removes whitespace from the end of a string.\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its end (right side).\r\n * If the end of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport const strTrimEnd: (value: string) => string = _unwrapFunctionWithPoly(\"trimEnd\", StrProto, polyStrTrimEnd);\r\n\r\n/**\r\n * Alias for `strTrimEnd()` method removes whitespace from the end of a string.\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its end (right side).\r\n * If the end of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport const strTrimRight = strTrimEnd;\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { isNullOrUndefined } from \"../helpers/base\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { EMPTY } from \"../internal/constants\";\r\nfunction _createTrimFn(exp) {\r\n return function _doTrim(value) {\r\n if (isNullOrUndefined(value)) {\r\n throwTypeError(\"strTrim called [\" + dumpObj(value) + \"]\");\r\n }\r\n if (value && value.replace) {\r\n value = value.replace(exp, EMPTY);\r\n }\r\n return value;\r\n };\r\n}\r\n/**\r\n * The trim() method removes whitespace from both ends of a string and returns a new string,\r\n * without modifying the original string. Whitespace in this context is all the whitespace\r\n * characters (space, tab, no-break space, etc.) and all the line terminator characters\r\n * (LF, CR, etc.).\r\n * @group Polyfill\r\n * @group String\r\n * @param value - The string value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from both its beginning and end.\r\n * If neither the beginning or end of str has any whitespace, a new string is still returned (essentially\r\n * a copy of str), with no exception being thrown.\r\n * To return a new string with whitespace trimmed from just one end, use `strTrimStart()` or `strTrimEnd()`.\r\n */\r\nexport var polyStrTrim = _createTrimFn(/^\\s+|(?=\\s)\\s+$/g);\r\n/**\r\n * The `polyStrTrimStart()` method removes whitespace from the beginning of a string.\r\n * @group Polyfill\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its beginning (left side).\r\n * If the beginning of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport var polyStrTrimStart = _createTrimFn(/^\\s+/g);\r\n/**\r\n * The `polyStrTrimEnd()` method removes whitespace from the end of a string.\r\n * @group Polyfill\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its end (right side).\r\n * If the end of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport var polyStrTrimEnd = _createTrimFn(/(?=\\s)\\s+$/g);\r\n//# sourceMappingURL=trim.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { isNullOrUndefined } from \"../helpers/base\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { EMPTY } from \"../internal/constants\";\r\n\r\nfunction _createTrimFn(exp: RegExp): (value: string) => string {\r\n return function _doTrim(value: string): string {\r\n if (isNullOrUndefined(value)) {\r\n throwTypeError(\"strTrim called [\" + dumpObj(value) + \"]\")\r\n }\r\n \r\n if (value && value.replace) {\r\n value = value.replace(exp, EMPTY);\r\n }\r\n \r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * The trim() method removes whitespace from both ends of a string and returns a new string,\r\n * without modifying the original string. Whitespace in this context is all the whitespace\r\n * characters (space, tab, no-break space, etc.) and all the line terminator characters\r\n * (LF, CR, etc.).\r\n * @group Polyfill\r\n * @group String\r\n * @param value - The string value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from both its beginning and end.\r\n * If neither the beginning or end of str has any whitespace, a new string is still returned (essentially\r\n * a copy of str), with no exception being thrown.\r\n * To return a new string with whitespace trimmed from just one end, use `strTrimStart()` or `strTrimEnd()`.\r\n */\r\nexport const polyStrTrim = _createTrimFn(/^\\s+|(?=\\s)\\s+$/g);\r\n\r\n/**\r\n * The `polyStrTrimStart()` method removes whitespace from the beginning of a string.\r\n * @group Polyfill\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its beginning (left side).\r\n * If the beginning of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport const polyStrTrimStart = _createTrimFn(/^\\s+/g);\r\n \r\n/**\r\n * The `polyStrTrimEnd()` method removes whitespace from the end of a string.\r\n * @group Polyfill\r\n * @group String\r\n * @param value - The value to be trimmed.\r\n * @returns A new string representing str stripped of whitespace from its end (right side).\r\n * If the end of str has no whitespace, a new string is still returned (essentially a copy of str),\r\n * with no exception being thrown.\r\n */\r\nexport const polyStrTrimEnd = _createTrimFn(/(?=\\s)\\s+$/g);\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_TO_LOWER_CASE = \"toLowerCase\"; // Count: 9\r\nexport var _DYN_BLK_VAL = \"blkVal\"; // Count: 5\r\nexport var _DYN_LENGTH = \"length\"; // Count: 42\r\nexport var _DYN_RD_ONLY = \"rdOnly\"; // Count: 4\r\nexport var _DYN_NOTIFY = \"notify\"; // Count: 4\r\nexport var _DYN_WARN_TO_CONSOLE = \"warnToConsole\"; // Count: 4\r\nexport var _DYN_THROW_INTERNAL = \"throwInternal\"; // Count: 5\r\nexport var _DYN_SET_DF = \"setDf\"; // Count: 6\r\nexport var _DYN_WATCH = \"watch\"; // Count: 9\r\nexport var _DYN_LOGGER = \"logger\"; // Count: 21\r\nexport var _DYN_APPLY = \"apply\"; // Count: 7\r\nexport var _DYN_PUSH = \"push\"; // Count: 31\r\nexport var _DYN_SPLICE = \"splice\"; // Count: 8\r\nexport var _DYN_HDLR = \"hdlr\"; // Count: 6\r\nexport var _DYN_CANCEL = \"cancel\"; // Count: 5\r\nexport var _DYN_INITIALIZE = \"initialize\"; // Count: 4\r\nexport var _DYN_IDENTIFIER = \"identifier\"; // Count: 8\r\nexport var _DYN_IS_INITIALIZED = \"isInitialized\"; // Count: 10\r\nexport var _DYN_GET_PLUGIN = \"getPlugin\"; // Count: 6\r\nexport var _DYN_POLL_INTERNAL_LOGS = \"pollInternalLogs\"; // Count: 2\r\nexport var _DYN_NAME = \"name\"; // Count: 11\r\nexport var _DYN_TIME = \"time\"; // Count: 6\r\nexport var _DYN_PROCESS_NEXT = \"processNext\"; // Count: 15\r\nexport var _DYN_GET_PROCESS_TEL_CONT0 = \"getProcessTelContext\"; // Count: 2\r\nexport var _DYN_GET_NOTIFY_MGR = \"getNotifyMgr\"; // Count: 5\r\nexport var _DYN_ADD_NOTIFICATION_LIS1 = \"addNotificationListener\"; // Count: 4\r\nexport var _DYN_REMOVE_NOTIFICATION_2 = \"removeNotificationListener\"; // Count: 4\r\nexport var _DYN_ENABLED = \"enabled\"; // Count: 6\r\nexport var _DYN_STOP_POLLING_INTERNA3 = \"stopPollingInternalLogs\"; // Count: 2\r\nexport var _DYN_UNLOAD = \"unload\"; // Count: 9\r\nexport var _DYN_ON_COMPLETE = \"onComplete\"; // Count: 5\r\nexport var _DYN_VERSION = \"version\"; // Count: 6\r\nexport var _DYN_LOGGING_LEVEL_CONSOL4 = \"loggingLevelConsole\"; // Count: 2\r\nexport var _DYN_CREATE_NEW = \"createNew\"; // Count: 7\r\nexport var _DYN_TEARDOWN = \"teardown\"; // Count: 9\r\nexport var _DYN_MESSAGE_ID = \"messageId\"; // Count: 4\r\nexport var _DYN_MESSAGE = \"message\"; // Count: 6\r\nexport var _DYN_IS_ASYNC = \"isAsync\"; // Count: 6\r\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 10\r\nexport var _DYN__DO_TEARDOWN = \"_doTeardown\"; // Count: 4\r\nexport var _DYN_UPDATE = \"update\"; // Count: 6\r\nexport var _DYN_GET_NEXT = \"getNext\"; // Count: 12\r\nexport var _DYN_SET_NEXT_PLUGIN = \"setNextPlugin\"; // Count: 5\r\nexport var _DYN_USER_AGENT = \"userAgent\"; // Count: 5\r\nexport var _DYN_SPLIT = \"split\"; // Count: 5\r\nexport var _DYN_NODE_TYPE = \"nodeType\"; // Count: 3\r\nexport var _DYN_REPLACE = \"replace\"; // Count: 8\r\nexport var _DYN_LOG_INTERNAL_MESSAGE = \"logInternalMessage\"; // Count: 2\r\nexport var _DYN_TYPE = \"type\"; // Count: 14\r\nexport var _DYN_HANDLER = \"handler\"; // Count: 5\r\nexport var _DYN_IS_CHILD_EVT = \"isChildEvt\"; // Count: 3\r\nexport var _DYN_GET_CTX = \"getCtx\"; // Count: 6\r\nexport var _DYN_SET_CTX = \"setCtx\"; // Count: 10\r\nexport var _DYN_COMPLETE = \"complete\"; // Count: 3\r\nexport var _DYN_TRACE_ID = \"traceId\"; // Count: 5\r\nexport var _DYN_SPAN_ID = \"spanId\"; // Count: 5\r\nexport var _DYN_TRACE_FLAGS = \"traceFlags\"; // Count: 6\r\n//# sourceMappingURL=__DynamicConstants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nimport { strShimUndefined } from \"@microsoft/applicationinsights-shims\";\r\nimport { strSubstr, strSubstring } from \"@nevware21/ts-utils\";\r\nimport { _DYN_LENGTH } from \"../__DynamicConstants\";\r\nimport { STR_EMPTY } from \"./InternalConstants\";\r\nimport { random32 } from \"./RandomHelper\";\r\n// Added to help with minfication\r\nexport var Undefined = strShimUndefined;\r\nexport function newGuid() {\r\n var uuid = generateW3CId();\r\n return strSubstring(uuid, 0, 8) + \"-\" + strSubstring(uuid, 8, 12) + \"-\" + strSubstring(uuid, 12, 16) + \"-\" + strSubstring(uuid, 16, 20) + \"-\" + strSubstring(uuid, 20);\r\n}\r\n/**\r\n * The strEndsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.\r\n * @param value - The value to check whether it ends with the search value.\r\n * @param search - The characters to be searched for at the end of the value.\r\n * @returns true if the given search value is found at the end of the string, otherwise false.\r\n */\r\nexport function strEndsWith(value, search) {\r\n if (value && search) {\r\n var len = value[_DYN_LENGTH /* @min:%2elength */];\r\n var start = len - search[_DYN_LENGTH /* @min:%2elength */];\r\n return strSubstring(value, start >= 0 ? start : 0, len) === search;\r\n }\r\n return false;\r\n}\r\n/**\r\n * generate W3C trace id\r\n */\r\nexport function generateW3CId() {\r\n var hexValues = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n // rfc4122 version 4 UUID without dashes and with lowercase letters\r\n var oct = STR_EMPTY, tmp;\r\n for (var a = 0; a < 4; a++) {\r\n tmp = random32();\r\n oct +=\r\n hexValues[tmp & 0xF] +\r\n hexValues[tmp >> 4 & 0xF] +\r\n hexValues[tmp >> 8 & 0xF] +\r\n hexValues[tmp >> 12 & 0xF] +\r\n hexValues[tmp >> 16 & 0xF] +\r\n hexValues[tmp >> 20 & 0xF] +\r\n hexValues[tmp >> 24 & 0xF] +\r\n hexValues[tmp >> 28 & 0xF];\r\n }\r\n // \"Set the two most significant bits (bits 6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively\"\r\n var clockSequenceHi = hexValues[8 + (random32() & 0x03) | 0];\r\n return strSubstr(oct, 0, 8) + strSubstr(oct, 9, 4) + \"4\" + strSubstr(oct, 13, 3) + clockSequenceHi + strSubstr(oct, 16, 3) + strSubstr(oct, 19, 12);\r\n}\r\n//# sourceMappingURL=CoreUtils.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// ###################################################################################################################################################\r\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\r\n// ###################################################################################################################################################\r\nexport var UNDEFINED_VALUE = undefined;\r\nexport var STR_EMPTY = \"\";\r\nexport var STR_CHANNELS = \"channels\";\r\nexport var STR_CORE = \"core\";\r\nexport var STR_CREATE_PERF_MGR = \"createPerfMgr\";\r\nexport var STR_DISABLED = \"disabled\";\r\nexport var STR_EXTENSION_CONFIG = \"extensionConfig\";\r\nexport var STR_EXTENSIONS = \"extensions\";\r\nexport var STR_PROCESS_TELEMETRY = \"processTelemetry\";\r\nexport var STR_PRIORITY = \"priority\";\r\nexport var STR_EVENTS_SENT = \"eventsSent\";\r\nexport var STR_EVENTS_DISCARDED = \"eventsDiscarded\";\r\nexport var STR_EVENTS_SEND_REQUEST = \"eventsSendRequest\";\r\nexport var STR_PERF_EVENT = \"perfEvent\";\r\nexport var STR_GET_PERF_MGR = \"getPerfMgr\";\r\nexport var STR_DOMAIN = \"domain\";\r\nexport var STR_PATH = \"path\";\r\nexport var STR_NOT_DYNAMIC_ERROR = \"Not dynamic - \";\r\n//# sourceMappingURL=InternalConstants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { utcNow } from \"@nevware21/ts-utils\";\r\nimport { _DYN_LENGTH } from \"../__DynamicConstants\";\r\nimport { getCrypto, getMsCrypto, isIE } from \"./EnvUtils\";\r\nimport { STR_EMPTY } from \"./InternalConstants\";\r\nvar UInt32Mask = 0x100000000;\r\nvar MaxUInt32 = 0xffffffff;\r\nvar SEED1 = 123456789;\r\nvar SEED2 = 987654321;\r\n// MWC based Random generator (for IE)\r\nvar _mwcSeeded = false;\r\nvar _mwcW = SEED1;\r\nvar _mwcZ = SEED2;\r\n// Takes any integer\r\nfunction _mwcSeed(seedValue) {\r\n if (seedValue < 0) {\r\n // Make sure we end up with a positive number and not -ve one.\r\n seedValue >>>= 0;\r\n }\r\n _mwcW = (SEED1 + seedValue) & MaxUInt32;\r\n _mwcZ = (SEED2 - seedValue) & MaxUInt32;\r\n _mwcSeeded = true;\r\n}\r\nfunction _autoSeedMwc() {\r\n // Simple initialization using default Math.random() - So we inherit any entropy from the browser\r\n // and bitwise XOR with the current milliseconds\r\n try {\r\n var now = utcNow() & 0x7fffffff;\r\n _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);\r\n }\r\n catch (e) {\r\n // Don't crash if something goes wrong\r\n }\r\n}\r\n/**\r\n * Generate a random value between 0 and maxValue, max value should be limited to a 32-bit maximum.\r\n * So maxValue(16) will produce a number from 0..16 (range of 17)\r\n * @param maxValue\r\n */\r\nexport function randomValue(maxValue) {\r\n if (maxValue > 0) {\r\n return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;\r\n }\r\n return 0;\r\n}\r\n/**\r\n * generate a random 32-bit number (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), defaults un-unsigned.\r\n * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)\r\n */\r\nexport function random32(signed) {\r\n var value = 0;\r\n var c = getCrypto() || getMsCrypto();\r\n if (c && c.getRandomValues) {\r\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\r\n value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;\r\n }\r\n if (value === 0 && isIE()) {\r\n // For IE 6, 7, 8 (especially on XP) Math.random is not very random\r\n if (!_mwcSeeded) {\r\n // Set the seed for the Mwc algorithm\r\n _autoSeedMwc();\r\n }\r\n // Don't use Math.random for IE\r\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\r\n value = mwcRandom32() & MaxUInt32;\r\n }\r\n if (value === 0) {\r\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\r\n value = Math.floor((UInt32Mask * Math.random()) | 0);\r\n }\r\n if (!signed) {\r\n // Make sure we end up with a positive number and not -ve one.\r\n value >>>= 0;\r\n }\r\n return value;\r\n}\r\n/**\r\n * Seed the MWC random number generator with the specified seed or a random value\r\n * @param value - optional the number to used as the seed, if undefined, null or zero a random value will be chosen\r\n */\r\nexport function mwcRandomSeed(value) {\r\n if (!value) {\r\n _autoSeedMwc();\r\n }\r\n else {\r\n _mwcSeed(value);\r\n }\r\n}\r\n/**\r\n * Generate a random 32-bit number between (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), using MWC (Multiply with carry)\r\n * instead of Math.random() defaults to un-signed.\r\n * Used as a replacement random generator for IE to avoid issues with older IE instances.\r\n * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)\r\n */\r\nexport function mwcRandom32(signed) {\r\n _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;\r\n _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;\r\n var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;\r\n if (!signed) {\r\n // Make sure we end up with a positive number and not -ve one.\r\n value >>>= 0;\r\n }\r\n return value;\r\n}\r\n/**\r\n * Generate random base64 id string.\r\n * The default length is 22 which is 132-bits so almost the same as a GUID but as base64 (the previous default was 5)\r\n * @param maxLength - Optional value to specify the length of the id to be generated, defaults to 22\r\n */\r\nexport function newId(maxLength) {\r\n if (maxLength === void 0) { maxLength = 22; }\r\n var base64chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\r\n // Start with an initial random number, consuming the value in reverse byte order\r\n var number = random32() >>> 0; // Make sure it's a +ve number\r\n var chars = 0;\r\n var result = STR_EMPTY;\r\n while (result[_DYN_LENGTH /* @min:%2elength */] < maxLength) {\r\n chars++;\r\n result += base64chars.charAt(number & 0x3F);\r\n number >>>= 6; // Zero fill with right shift\r\n if (chars === 5) {\r\n // 5 base64 characters === 30 bits so we don't have enough bits for another base64 char\r\n // So add on another 30 bits and make sure it's +ve\r\n number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;\r\n chars = 0; // We need to reset the number every 5 chars (30 bits)\r\n }\r\n }\r\n return result;\r\n}\r\n//# sourceMappingURL=RandomHelper.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nimport { strShimObject, strShimPrototype, strShimUndefined } from \"@microsoft/applicationinsights-shims\";\r\nimport { getDocument, getInst, getNavigator, getPerformance, hasNavigator, isString, isUndefined, strIndexOf } from \"@nevware21/ts-utils\";\r\nimport { _DYN_LENGTH, _DYN_NAME, _DYN_SPLIT, _DYN_TO_LOWER_CASE, _DYN_USER_AGENT } from \"../__DynamicConstants\";\r\nimport { strContains } from \"./HelperFuncs\";\r\nimport { STR_EMPTY } from \"./InternalConstants\";\r\n/**\r\n * This file exists to hold environment utilities that are required to check and\r\n * validate the current operating environment. Unless otherwise required, please\r\n * only use defined methods (functions) in this class so that users of these\r\n * functions/properties only need to include those that are used within their own modules.\r\n */\r\nvar strDocumentMode = \"documentMode\";\r\nvar strLocation = \"location\";\r\nvar strConsole = \"console\";\r\nvar strPerformance = \"performance\";\r\nvar strJSON = \"JSON\";\r\nvar strCrypto = \"crypto\";\r\nvar strMsCrypto = \"msCrypto\";\r\nvar strReactNative = \"ReactNative\";\r\nvar strMsie = \"msie\";\r\nvar strTrident = \"trident/\";\r\nvar strXMLHttpRequest = \"XMLHttpRequest\";\r\nvar _isTrident = null;\r\nvar _navUserAgentCheck = null;\r\nvar _enableMocks = false;\r\nvar _useXDomainRequest = null;\r\nvar _beaconsSupported = null;\r\nfunction _hasProperty(theClass, property) {\r\n var supported = false;\r\n if (theClass) {\r\n try {\r\n supported = property in theClass;\r\n if (!supported) {\r\n var proto = theClass[strShimPrototype];\r\n if (proto) {\r\n supported = property in proto;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n // Do Nothing\r\n }\r\n if (!supported) {\r\n try {\r\n var tmp = new theClass();\r\n supported = !isUndefined(tmp[property]);\r\n }\r\n catch (e) {\r\n // Do Nothing\r\n }\r\n }\r\n }\r\n return supported;\r\n}\r\n/**\r\n * Enable the lookup of test mock objects if requested\r\n * @param enabled\r\n */\r\nexport function setEnableEnvMocks(enabled) {\r\n _enableMocks = enabled;\r\n}\r\n/**\r\n * Returns the global location object if it is present otherwise null.\r\n * This helper is used to access the location object without causing an exception\r\n * \"Uncaught ReferenceError: location is not defined\"\r\n */\r\nexport function getLocation(checkForMock) {\r\n if (checkForMock && _enableMocks) {\r\n var mockLocation = getInst(\"__mockLocation\");\r\n if (mockLocation) {\r\n return mockLocation;\r\n }\r\n }\r\n if (typeof location === strShimObject && location) {\r\n return location;\r\n }\r\n return getInst(strLocation);\r\n}\r\n/**\r\n * Returns the global console object\r\n */\r\nexport function getConsole() {\r\n if (typeof console !== strShimUndefined) {\r\n return console;\r\n }\r\n return getInst(strConsole);\r\n}\r\n/**\r\n * Checks if JSON object is available, this is required as we support the API running without a\r\n * window /document (eg. Node server, electron webworkers) and if we attempt to assign a history\r\n * object to a local variable or pass as an argument an \"Uncaught ReferenceError: JSON is not defined\"\r\n * exception will be thrown.\r\n * Defined as a function to support lazy / late binding environments.\r\n */\r\nexport function hasJSON() {\r\n return Boolean((typeof JSON === strShimObject && JSON) || getInst(strJSON) !== null);\r\n}\r\n/**\r\n * Returns the global JSON object if it is present otherwise null.\r\n * This helper is used to access the JSON object without causing an exception\r\n * \"Uncaught ReferenceError: JSON is not defined\"\r\n */\r\nexport function getJSON() {\r\n if (hasJSON()) {\r\n return JSON || getInst(strJSON);\r\n }\r\n return null;\r\n}\r\n/**\r\n * Returns the crypto object if it is present otherwise null.\r\n * This helper is used to access the crypto object from the current\r\n * global instance which could be window or globalThis for a web worker\r\n */\r\nexport function getCrypto() {\r\n return getInst(strCrypto);\r\n}\r\n/**\r\n * Returns the crypto object if it is present otherwise null.\r\n * This helper is used to access the crypto object from the current\r\n * global instance which could be window or globalThis for a web worker\r\n */\r\nexport function getMsCrypto() {\r\n return getInst(strMsCrypto);\r\n}\r\n/**\r\n * Returns whether the environment is reporting that we are running in a React Native Environment\r\n */\r\nexport function isReactNative() {\r\n // If running in React Native, navigator.product will be populated\r\n var nav = getNavigator();\r\n if (nav && nav.product) {\r\n return nav.product === strReactNative;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Identifies whether the current environment appears to be IE\r\n */\r\nexport function isIE() {\r\n var nav = getNavigator();\r\n if (nav && (nav[_DYN_USER_AGENT /* @min:%2euserAgent */] !== _navUserAgentCheck || _isTrident === null)) {\r\n // Added to support test mocking of the user agent\r\n _navUserAgentCheck = nav[_DYN_USER_AGENT /* @min:%2euserAgent */];\r\n var userAgent = (_navUserAgentCheck || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n _isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));\r\n }\r\n return _isTrident;\r\n}\r\n/**\r\n * Gets IE version returning the document emulation mode if we are running on IE, or null otherwise\r\n */\r\nexport function getIEVersion(userAgentStr) {\r\n if (userAgentStr === void 0) { userAgentStr = null; }\r\n if (!userAgentStr) {\r\n var navigator_1 = getNavigator() || {};\r\n userAgentStr = navigator_1 ? (navigator_1.userAgent || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() : STR_EMPTY;\r\n }\r\n var ua = (userAgentStr || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n // Also check for documentMode in case X-UA-Compatible meta tag was included in HTML.\r\n if (strContains(ua, strMsie)) {\r\n var doc = getDocument() || {};\r\n return Math.max(parseInt(ua[_DYN_SPLIT /* @min:%2esplit */](strMsie)[1]), (doc[strDocumentMode] || 0));\r\n }\r\n else if (strContains(ua, strTrident)) {\r\n var tridentVer = parseInt(ua[_DYN_SPLIT /* @min:%2esplit */](strTrident)[1]);\r\n if (tridentVer) {\r\n return tridentVer + 4;\r\n }\r\n }\r\n return null;\r\n}\r\nexport function isSafari(userAgentStr) {\r\n if (!userAgentStr || !isString(userAgentStr)) {\r\n var navigator_2 = getNavigator() || {};\r\n userAgentStr = navigator_2 ? (navigator_2.userAgent || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() : STR_EMPTY;\r\n }\r\n var ua = (userAgentStr || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n return (strIndexOf(ua, \"safari\") >= 0);\r\n}\r\n/**\r\n * Checks if HTML5 Beacons are supported in the current environment.\r\n * @returns True if supported, false otherwise.\r\n */\r\nexport function isBeaconsSupported() {\r\n if (_beaconsSupported === null) {\r\n _beaconsSupported = hasNavigator() && Boolean(getNavigator().sendBeacon);\r\n }\r\n return _beaconsSupported;\r\n}\r\n/**\r\n * Checks if the Fetch API is supported in the current environment.\r\n * @param withKeepAlive - [Optional] If True, check if fetch is available and it supports the keepalive feature, otherwise only check if fetch is supported\r\n * @returns True if supported, otherwise false\r\n */\r\nexport function isFetchSupported(withKeepAlive) {\r\n var isSupported = false;\r\n try {\r\n isSupported = !!getInst(\"fetch\");\r\n var request = getInst(\"Request\");\r\n if (isSupported && withKeepAlive && request) {\r\n isSupported = _hasProperty(request, \"keepalive\");\r\n }\r\n }\r\n catch (e) {\r\n // Just Swallow any failure during availability checks\r\n }\r\n return isSupported;\r\n}\r\nexport function useXDomainRequest() {\r\n if (_useXDomainRequest === null) {\r\n _useXDomainRequest = (typeof XDomainRequest !== strShimUndefined);\r\n if (_useXDomainRequest && isXhrSupported()) {\r\n _useXDomainRequest = _useXDomainRequest && !_hasProperty(getInst(strXMLHttpRequest), \"withCredentials\");\r\n }\r\n }\r\n return _useXDomainRequest;\r\n}\r\n/**\r\n * Checks if XMLHttpRequest is supported\r\n * @returns True if supported, otherwise false\r\n */\r\nexport function isXhrSupported() {\r\n var isSupported = false;\r\n try {\r\n var xmlHttpRequest = getInst(strXMLHttpRequest);\r\n isSupported = !!xmlHttpRequest;\r\n }\r\n catch (e) {\r\n // Just Swallow any failure during availability checks\r\n }\r\n return isSupported;\r\n}\r\nfunction _getNamedValue(values, name) {\r\n if (values) {\r\n for (var i = 0; i < values[_DYN_LENGTH /* @min:%2elength */]; i++) {\r\n var value = values[i];\r\n if (value[_DYN_NAME /* @min:%2ename */]) {\r\n if (value[_DYN_NAME /* @min:%2ename */] === name) {\r\n return value;\r\n }\r\n }\r\n }\r\n }\r\n return {};\r\n}\r\n/**\r\n * Helper function to fetch the named meta-tag from the page.\r\n * @param name\r\n */\r\nexport function findMetaTag(name) {\r\n var doc = getDocument();\r\n if (doc && name) {\r\n // Look for a meta-tag\r\n return _getNamedValue(doc.querySelectorAll(\"meta\"), name).content;\r\n }\r\n return null;\r\n}\r\n/**\r\n * Helper function to fetch the named server timing value from the page response (first navigation event).\r\n * @param name\r\n */\r\nexport function findNamedServerTiming(name) {\r\n var value;\r\n var perf = getPerformance();\r\n if (perf) {\r\n // Try looking for a server-timing header\r\n var navPerf = perf.getEntriesByType(\"navigation\") || [];\r\n value = _getNamedValue((navPerf[_DYN_LENGTH /* @min:%2elength */] > 0 ? navPerf[0] : {}).serverTiming, name).description;\r\n }\r\n return value;\r\n}\r\n//# sourceMappingURL=EnvUtils.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { INDEX_OF, LAST_INDEX_OF, StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\n/**\r\n * The `strIndexOf()` method, given two arguments: the string and a substring to search for, searches\r\n * the entire calling string, and returns the index of the first occurrence of the specified substring.\r\n * Given a thrid argument: a number, the method returns the first occurrence of the specified substring\r\n * at an index greater than or equal to the specified number.\r\n * @group String\r\n * @param value - The value to be checked for the seeach string\r\n * @param searchString - The substring to search for in the value\r\n * @param position - The starting position to search from\r\n * @example\r\n * ```ts\r\n * strIndexOf('hello world', '') // returns 0\r\n * strIndexOf('hello world', '', 0) // returns 0\r\n * strIndexOf('hello world', '', 3) // returns 3\r\n * strIndexOf('hello world', '', 8) // returns 8\r\n *\r\n * // However, if the thrid argument is greater than the length of the string\r\n * strIndexOf('hello world', '', 11) // returns 11\r\n * strIndexOf('hello world', '', 13) // returns 11\r\n * strIndexOf('hello world', '', 22) // returns 11\r\n *\r\n * strIndexOf('Blue Whale', 'Blue') // returns 0\r\n * strIndexOf('Blue Whale', 'Blute') // returns -1\r\n * strIndexOf('Blue Whale', 'Whale', 0) // returns 5\r\n * strIndexOf('Blue Whale', 'Whale', 5) // returns 5\r\n * strIndexOf('Blue Whale', 'Whale', 7) // returns -1\r\n * strIndexOf('Blue Whale', '') // returns 0\r\n * strIndexOf('Blue Whale', '', 9) // returns 9\r\n * strIndexOf('Blue Whale', '', 10) // returns 10\r\n * strIndexOf('Blue Whale', '', 11) // returns 10\r\n * ```\r\n */\r\nexport var strIndexOf = _unwrapFunction(INDEX_OF, StrProto);\r\n/**\r\n * The `strLastIndexOf()` method, given two arguments: the string and a substring to search for, searches\r\n * the entire calling string, and returns the index of the last occurrence of the specified substring.\r\n * Given a third argument: a number, the method returns the last occurrence of the specified substring\r\n * at an index less than or equal to the specified number.\r\n * @group String\r\n * @param value - The value to be checked for the seeach string\r\n * @param searchString - The substring to search for in the value\r\n * @param position - The starting position to search from\r\n * @example\r\n * ```ts\r\n * strLastIndexOf('canal', 'a'); // returns 3\r\n * strLastIndexOf('canal', 'a', 2); // returns 1\r\n * strLastIndexOf('canal', 'a', 0); // returns -1\r\n * strLastIndexOf('canal', 'x'); // returns -1\r\n * strLastIndexOf('canal', 'c', -5); // returns 0\r\n * strLastIndexOf('canal', 'c', 0); // returns 0\r\n * strLastIndexOf('canal', ''); // returns 5\r\n * strLastIndexOf('canal', '', 2); // returns 2\r\n * ```\r\n */\r\nexport var strLastIndexOf = _unwrapFunction(LAST_INDEX_OF, StrProto);\r\n//# sourceMappingURL=index_of.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { INDEX_OF, LAST_INDEX_OF, StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\n\r\n/**\r\n * The `strIndexOf()` method, given two arguments: the string and a substring to search for, searches\r\n * the entire calling string, and returns the index of the first occurrence of the specified substring.\r\n * Given a thrid argument: a number, the method returns the first occurrence of the specified substring\r\n * at an index greater than or equal to the specified number.\r\n * @group String\r\n * @param value - The value to be checked for the seeach string\r\n * @param searchString - The substring to search for in the value\r\n * @param position - The starting position to search from\r\n * @example\r\n * ```ts\r\n * strIndexOf('hello world', '') // returns 0\r\n * strIndexOf('hello world', '', 0) // returns 0\r\n * strIndexOf('hello world', '', 3) // returns 3\r\n * strIndexOf('hello world', '', 8) // returns 8\r\n *\r\n * // However, if the thrid argument is greater than the length of the string\r\n * strIndexOf('hello world', '', 11) // returns 11\r\n * strIndexOf('hello world', '', 13) // returns 11\r\n * strIndexOf('hello world', '', 22) // returns 11\r\n *\r\n * strIndexOf('Blue Whale', 'Blue') // returns 0\r\n * strIndexOf('Blue Whale', 'Blute') // returns -1\r\n * strIndexOf('Blue Whale', 'Whale', 0) // returns 5\r\n * strIndexOf('Blue Whale', 'Whale', 5) // returns 5\r\n * strIndexOf('Blue Whale', 'Whale', 7) // returns -1\r\n * strIndexOf('Blue Whale', '') // returns 0\r\n * strIndexOf('Blue Whale', '', 9) // returns 9\r\n * strIndexOf('Blue Whale', '', 10) // returns 10\r\n * strIndexOf('Blue Whale', '', 11) // returns 10\r\n * ```\r\n */\r\nexport const strIndexOf: (value: string, searchString: string, position?: number) => number = _unwrapFunction(INDEX_OF, StrProto);\r\n\r\n/**\r\n * The `strLastIndexOf()` method, given two arguments: the string and a substring to search for, searches\r\n * the entire calling string, and returns the index of the last occurrence of the specified substring.\r\n * Given a third argument: a number, the method returns the last occurrence of the specified substring\r\n * at an index less than or equal to the specified number.\r\n * @group String\r\n * @param value - The value to be checked for the seeach string\r\n * @param searchString - The substring to search for in the value\r\n * @param position - The starting position to search from\r\n * @example\r\n * ```ts\r\n * strLastIndexOf('canal', 'a'); // returns 3\r\n * strLastIndexOf('canal', 'a', 2); // returns 1\r\n * strLastIndexOf('canal', 'a', 0); // returns -1\r\n * strLastIndexOf('canal', 'x'); // returns -1\r\n * strLastIndexOf('canal', 'c', -5); // returns 0\r\n * strLastIndexOf('canal', 'c', 0); // returns 0\r\n * strLastIndexOf('canal', ''); // returns 5\r\n * strLastIndexOf('canal', '', 2); // returns 2\r\n * ```\r\n */\r\nexport const strLastIndexOf: (value: string, searchString: string, position?: number) => number = _unwrapFunction(LAST_INDEX_OF, StrProto);\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { ObjAssign, ObjClass } from \"@microsoft/applicationinsights-shims\";\r\nimport { arrForEach, asString as asString21, isArray, isBoolean, isError, isFunction, isNullOrUndefined, isObject, isPlainObject, isString, isUndefined, objDeepFreeze, objDefine, objForEachKey, objHasOwn, strIndexOf } from \"@nevware21/ts-utils\";\r\nimport { _DYN_APPLY, _DYN_LENGTH, _DYN_NAME, _DYN_REPLACE } from \"../__DynamicConstants\";\r\nimport { STR_EMPTY } from \"./InternalConstants\";\r\n// RESTRICT and AVOID circular dependencies you should not import other contained modules or export the contents of this file directly\r\n// Added to help with minification\r\nvar strGetPrototypeOf = \"getPrototypeOf\";\r\nvar rCamelCase = /-([a-z])/g;\r\nvar rNormalizeInvalid = /([^\\w\\d_$])/g;\r\nvar rLeadingNumeric = /^(\\d+[\\w\\d_$])/;\r\nexport var _getObjProto = Object[strGetPrototypeOf];\r\nexport function isNotUndefined(value) {\r\n return !isUndefined(value);\r\n}\r\nexport function isNotNullOrUndefined(value) {\r\n return !isNullOrUndefined(value);\r\n}\r\n/**\r\n * Validates that the string name conforms to the JS IdentifierName specification and if not\r\n * normalizes the name so that it would. This method does not identify or change any keywords\r\n * meaning that if you pass in a known keyword the same value will be returned.\r\n * This is a simplified version\r\n * @param name - The name to validate\r\n */\r\nexport function normalizeJsName(name) {\r\n var value = name;\r\n if (value && isString(value)) {\r\n // CamelCase everything after the \"-\" and remove the dash\r\n value = value[_DYN_REPLACE /* @min:%2ereplace */](rCamelCase, function (_all, letter) {\r\n return letter.toUpperCase();\r\n });\r\n value = value[_DYN_REPLACE /* @min:%2ereplace */](rNormalizeInvalid, \"_\");\r\n value = value[_DYN_REPLACE /* @min:%2ereplace */](rLeadingNumeric, function (_all, match) {\r\n return \"_\" + match;\r\n });\r\n }\r\n return value;\r\n}\r\n/**\r\n * A simple wrapper (for minification support) to check if the value contains the search string.\r\n * @param value - The string value to check for the existence of the search value\r\n * @param search - The value search within the value\r\n */\r\nexport function strContains(value, search) {\r\n if (value && search) {\r\n return strIndexOf(value, search) !== -1;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Convert a date to I.S.O. format in IE8\r\n */\r\nexport function toISOString(date) {\r\n return date && date.toISOString() || \"\";\r\n}\r\nexport var deepFreeze = objDeepFreeze;\r\n/**\r\n * Returns the name of object if it's an Error. Otherwise, returns empty string.\r\n */\r\nexport function getExceptionName(object) {\r\n if (isError(object)) {\r\n return object[_DYN_NAME /* @min:%2ename */];\r\n }\r\n return STR_EMPTY;\r\n}\r\n/**\r\n * Sets the provided value on the target instance using the field name when the provided chk function returns true, the chk\r\n * function will only be called if the new value is no equal to the original value.\r\n * @param target - The target object\r\n * @param field - The key of the target\r\n * @param value - The value to set\r\n * @param valChk - [Optional] Callback to check the value that if supplied will be called check if the new value can be set\r\n * @param srcChk - [Optional] Callback to check to original value that if supplied will be called if the new value should be set (if allowed)\r\n * @returns The existing or new value, depending what was set\r\n */\r\nexport function setValue(target, field, value, valChk, srcChk) {\r\n var theValue = value;\r\n if (target) {\r\n theValue = target[field];\r\n if (theValue !== value && (!srcChk || srcChk(theValue)) && (!valChk || valChk(value))) {\r\n theValue = value;\r\n target[field] = theValue;\r\n }\r\n }\r\n return theValue;\r\n}\r\n/**\r\n * Returns the current value from the target object if not null or undefined otherwise sets the new value and returns it\r\n * @param target - The target object to return or set the default value\r\n * @param field - The key for the field to set on the target\r\n * @param defValue - [Optional] The value to set if not already present, when not provided a empty object will be added\r\n */\r\nexport function getSetValue(target, field, defValue) {\r\n var theValue;\r\n if (target) {\r\n theValue = target[field];\r\n if (!theValue && isNullOrUndefined(theValue)) {\r\n // Supports having the default as null\r\n theValue = !isUndefined(defValue) ? defValue : {};\r\n target[field] = theValue;\r\n }\r\n }\r\n else {\r\n // Expanded for performance so we only check defValue if required\r\n theValue = !isUndefined(defValue) ? defValue : {};\r\n }\r\n return theValue;\r\n}\r\nfunction _createProxyFunction(source, funcName) {\r\n var srcFunc = null;\r\n var src = null;\r\n if (isFunction(source)) {\r\n srcFunc = source;\r\n }\r\n else {\r\n src = source;\r\n }\r\n return function () {\r\n // Capture the original arguments passed to the method\r\n var originalArguments = arguments;\r\n if (srcFunc) {\r\n src = srcFunc();\r\n }\r\n if (src) {\r\n return src[funcName][_DYN_APPLY /* @min:%2eapply */](src, originalArguments);\r\n }\r\n };\r\n}\r\n/**\r\n * Effectively assigns all enumerable properties (not just own properties) and functions (including inherited prototype) from\r\n * the source object to the target, it attempts to use proxy getters / setters (if possible) and proxy functions to avoid potential\r\n * implementation issues by assigning prototype functions as instance ones\r\n *\r\n * This method is the primary method used to \"update\" the snippet proxy with the ultimate implementations.\r\n *\r\n * Special ES3 Notes:\r\n * Updates (setting) of direct property values on the target or indirectly on the source object WILL NOT WORK PROPERLY, updates to the\r\n * properties of \"referenced\" object will work (target.context.newValue = 10 => will be reflected in the source.context as it's the\r\n * same object). ES3 Failures: assigning target.myProp = 3 -> Won't change source.myProp = 3, likewise the reverse would also fail.\r\n * @param target - The target object to be assigned with the source properties and functions\r\n * @param source - The source object which will be assigned / called by setting / calling the targets proxies\r\n * @param chkSet - An optional callback to determine whether a specific property/function should be proxied\r\n */\r\nexport function proxyAssign(target, source, chkSet) {\r\n if (target && source && isObject(target) && isObject(source)) {\r\n var _loop_1 = function (field) {\r\n if (isString(field)) {\r\n var value = source[field];\r\n if (isFunction(value)) {\r\n if (!chkSet || chkSet(field, true, source, target)) {\r\n // Create a proxy function rather than just copying the (possible) prototype to the new object as an instance function\r\n target[field] = _createProxyFunction(source, field);\r\n }\r\n }\r\n else if (!chkSet || chkSet(field, false, source, target)) {\r\n if (objHasOwn(target, field)) {\r\n // Remove any previous instance property\r\n delete target[field];\r\n }\r\n objDefine(target, field, {\r\n g: function () {\r\n return source[field];\r\n },\r\n s: function (theValue) {\r\n source[field] = theValue;\r\n }\r\n });\r\n }\r\n }\r\n };\r\n // effectively apply/proxy full source to the target instance\r\n for (var field in source) {\r\n _loop_1(field);\r\n }\r\n }\r\n return target;\r\n}\r\n/**\r\n * Creates a proxy function on the target which internally will call the source version with all arguments passed to the target method.\r\n *\r\n * @param target - The target object to be assigned with the source properties and functions\r\n * @param name - The function name that will be added on the target\r\n * @param source - The source object which will be assigned / called by setting / calling the targets proxies\r\n * @param theFunc - The function name on the source that will be proxied on the target\r\n * @param overwriteTarget - If `false` this will not replace any pre-existing name otherwise (the default) it will overwrite any existing name\r\n */\r\nexport function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {\r\n if (target && name && source) {\r\n if (overwriteTarget !== false || isUndefined(target[name])) {\r\n target[name] = _createProxyFunction(source, theFunc);\r\n }\r\n }\r\n}\r\n/**\r\n * Creates proxy functions on the target which internally will call the source version with all arguments passed to the target method.\r\n *\r\n * @param target - The target object to be assigned with the source properties and functions\r\n * @param source - The source object which will be assigned / called by setting / calling the targets proxies\r\n * @param functionsToProxy - An array of function names that will be proxied on the target\r\n * @param overwriteTarget - If false this will not replace any pre-existing name otherwise (the default) it will overwrite any existing name\r\n */\r\nexport function proxyFunctions(target, source, functionsToProxy, overwriteTarget) {\r\n if (target && source && isObject(target) && isArray(functionsToProxy)) {\r\n arrForEach(functionsToProxy, function (theFuncName) {\r\n if (isString(theFuncName)) {\r\n proxyFunctionAs(target, theFuncName, source, theFuncName, overwriteTarget);\r\n }\r\n });\r\n }\r\n return target;\r\n}\r\n/**\r\n * Simpler helper to create a dynamic class that implements the interface and populates the values with the defaults.\r\n * Only instance properties (hasOwnProperty) values are copied from the defaults to the new instance\r\n * @param defaults - Simple helper\r\n */\r\nexport function createClassFromInterface(defaults) {\r\n return /** @class */ (function () {\r\n function class_1() {\r\n var _this = this;\r\n if (defaults) {\r\n objForEachKey(defaults, function (field, value) {\r\n _this[field] = value;\r\n });\r\n }\r\n }\r\n return class_1;\r\n }());\r\n}\r\n/**\r\n * A helper function to assist with JIT performance for objects that have properties added / removed dynamically\r\n * this is primarily for chromium based browsers and has limited effects on Firefox and none of IE. Only call this\r\n * function after you have finished \"updating\" the object, calling this within loops reduces or defeats the benefits.\r\n * This helps when iterating using for..in, objKeys() and objForEach()\r\n * @param theObject - The object to be optimized if possible\r\n */\r\nexport function optimizeObject(theObject) {\r\n // V8 Optimization to cause the JIT compiler to create a new optimized object for looking up the own properties\r\n // primarily for object with <= 19 properties for >= 20 the effect is reduced or non-existent\r\n if (theObject && ObjAssign) {\r\n theObject = ObjClass(ObjAssign({}, theObject));\r\n }\r\n return theObject;\r\n}\r\nexport function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {\r\n // Variables\r\n var theArgs = arguments;\r\n var extended = theArgs[0] || {};\r\n var argLen = theArgs[_DYN_LENGTH /* @min:%2elength */];\r\n var deep = false;\r\n var idx = 1;\r\n // Check for \"Deep\" flag\r\n if (argLen > 0 && isBoolean(extended)) {\r\n deep = extended;\r\n extended = theArgs[idx] || {};\r\n idx++;\r\n }\r\n // Handle case when target is a string or something (possible in deep copy)\r\n if (!isObject(extended)) {\r\n extended = {};\r\n }\r\n // Loop through each remaining object and conduct a merge\r\n for (; idx < argLen; idx++) {\r\n var arg = theArgs[idx];\r\n var isArgArray = isArray(arg);\r\n var isArgObj = isObject(arg);\r\n for (var prop in arg) {\r\n var propOk = (isArgArray && (prop in arg)) || (isArgObj && objHasOwn(arg, prop));\r\n if (!propOk) {\r\n continue;\r\n }\r\n var newValue = arg[prop];\r\n var isNewArray = void 0;\r\n // If deep merge and property is an object, merge properties\r\n if (deep && newValue && ((isNewArray = isArray(newValue)) || isPlainObject(newValue))) {\r\n // Grab the current value of the extended object\r\n var clone = extended[prop];\r\n if (isNewArray) {\r\n if (!isArray(clone)) {\r\n // We can't \"merge\" an array with a non-array so overwrite the original\r\n clone = [];\r\n }\r\n }\r\n else if (!isPlainObject(clone)) {\r\n // We can't \"merge\" an object with a non-object\r\n clone = {};\r\n }\r\n // Never move the original objects always clone them\r\n newValue = objExtend(deep, clone, newValue);\r\n }\r\n // Assign the new (or previous) value (unless undefined)\r\n if (newValue !== undefined) {\r\n extended[prop] = newValue;\r\n }\r\n }\r\n }\r\n return extended;\r\n}\r\nexport var asString = asString21;\r\n//# sourceMappingURL=HelperFuncs.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { fnCall } from \"../funcs/fnCall\";\r\nimport { getWindow, hasWindow } from \"../helpers/environment\";\r\nimport { CONSTRUCTOR, FUNCTION, ObjClass, OBJECT, PROTOTYPE } from \"../internal/constants\";\r\nimport { objHasOwnProperty } from \"./has_own_prop\";\r\nimport { objGetPrototypeOf } from \"./object\";\r\n// Use to cache the result of Object.cont\r\nvar _fnToString;\r\nvar _objCtrFnString;\r\nvar _gblWindow;\r\n/**\r\n * Checks to see if the past value is a plain object (not a class/array) value.\r\n * Object are considered to be \"plain\" if they are created with no prototype `Object.create(null)`\r\n * or by using the Object global (native) function, all other \"objects\" ar\r\n * @since 0.4.4\r\n * @group Type Identity\r\n * @group Object\r\n * @param value - The value to check\r\n * @returns true if `value` is a normal plain object\r\n * @example\r\n * ```ts\r\n * console.log(isPlainObject({ 0: 'a', 1: 'b', 2: 'c' })); // true\r\n * console.log(isPlainObject({ 100: 'a', 2: 'b', 7: 'c' })); // true\r\n * console.log(isPlainObject(objCreate(null))); // true\r\n *\r\n * const myObj = objCreate({}, {\r\n * getFoo: {\r\n * value() { return this.foo; }\r\n * }\r\n * });\r\n * myObj.foo = 1;\r\n * console.log(isPlainObject(myObj)); // true\r\n *\r\n * console.log(isPlainObject(['a', 'b', 'c'])); // false\r\n * console.log(isPlainObject(new Date())); // false\r\n * console.log(isPlainObject(new Error(\"An Error\"))); // false\r\n * console.log(isPlainObject(null)); // false\r\n * console.log(isPlainObject(undefined)); // false\r\n * console.log(isPlainObject(\"null\")); // false\r\n * console.log(isPlainObject(\"undefined\")); // false\r\n * console.log(isPlainObject(\"1\")); // false\r\n * console.log(isPlainObject(\"aa\")); // false\r\n * ```\r\n */\r\nexport function isPlainObject(value) {\r\n if (!value || typeof value !== OBJECT) {\r\n return false;\r\n }\r\n if (!_gblWindow) {\r\n // Lazily cache the current global window value and default it to \"true\" (so we bypass this check in the future)\r\n _gblWindow = hasWindow() ? getWindow() : true;\r\n }\r\n var result = false;\r\n if (value !== _gblWindow) {\r\n if (!_objCtrFnString) {\r\n // Lazily caching what the runtime reports as the object function constructor (as a string)\r\n // Using an current function lookup to find what this runtime calls a \"native\" function\r\n _fnToString = Function[PROTOTYPE].toString;\r\n _objCtrFnString = fnCall(_fnToString, ObjClass);\r\n }\r\n try {\r\n var proto = objGetPrototypeOf(value);\r\n // No prototype so looks like an object created with Object.create(null)\r\n result = !proto;\r\n if (!result) {\r\n if (objHasOwnProperty(proto, CONSTRUCTOR)) {\r\n proto = proto[CONSTRUCTOR];\r\n }\r\n result = proto && typeof proto === FUNCTION && _fnToString.call(proto) === _objCtrFnString;\r\n }\r\n }\r\n catch (ex) {\r\n // Something went wrong, so it's not an object we are playing with\r\n }\r\n }\r\n return result;\r\n}\r\n//# sourceMappingURL=is_plain_object.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { fnCall } from \"../funcs/fnCall\";\r\nimport { getWindow, hasWindow } from \"../helpers/environment\";\r\nimport { CONSTRUCTOR, FUNCTION, ObjClass, OBJECT, PROTOTYPE } from \"../internal/constants\";\r\nimport { objHasOwnProperty } from \"./has_own_prop\";\r\nimport { objGetPrototypeOf } from \"./object\";\r\n\r\n// Use to cache the result of Object.cont\r\nlet _fnToString: () => string;\r\nlet _objCtrFnString: string;\r\nlet _gblWindow: Window;\r\n\r\n/**\r\n * Checks to see if the past value is a plain object (not a class/array) value.\r\n * Object are considered to be \"plain\" if they are created with no prototype `Object.create(null)`\r\n * or by using the Object global (native) function, all other \"objects\" ar\r\n * @since 0.4.4\r\n * @group Type Identity\r\n * @group Object\r\n * @param value - The value to check\r\n * @returns true if `value` is a normal plain object\r\n * @example\r\n * ```ts\r\n * console.log(isPlainObject({ 0: 'a', 1: 'b', 2: 'c' })); // true\r\n * console.log(isPlainObject({ 100: 'a', 2: 'b', 7: 'c' })); // true\r\n * console.log(isPlainObject(objCreate(null))); // true\r\n *\r\n * const myObj = objCreate({}, {\r\n * getFoo: {\r\n * value() { return this.foo; }\r\n * }\r\n * });\r\n * myObj.foo = 1;\r\n * console.log(isPlainObject(myObj)); // true\r\n *\r\n * console.log(isPlainObject(['a', 'b', 'c'])); // false\r\n * console.log(isPlainObject(new Date())); // false\r\n * console.log(isPlainObject(new Error(\"An Error\"))); // false\r\n * console.log(isPlainObject(null)); // false\r\n * console.log(isPlainObject(undefined)); // false\r\n * console.log(isPlainObject(\"null\")); // false\r\n * console.log(isPlainObject(\"undefined\")); // false\r\n * console.log(isPlainObject(\"1\")); // false\r\n * console.log(isPlainObject(\"aa\")); // false\r\n * ```\r\n */\r\nexport function isPlainObject(value: any): value is object {\r\n if (!value || typeof value !== OBJECT) {\r\n return false;\r\n }\r\n\r\n if (!_gblWindow) {\r\n // Lazily cache the current global window value and default it to \"true\" (so we bypass this check in the future)\r\n _gblWindow = hasWindow() ? getWindow() : (true as any);\r\n }\r\n\r\n let result = false;\r\n if (value !== _gblWindow) {\r\n\r\n if (!_objCtrFnString) {\r\n // Lazily caching what the runtime reports as the object function constructor (as a string)\r\n // Using an current function lookup to find what this runtime calls a \"native\" function\r\n _fnToString = Function[PROTOTYPE].toString;\r\n _objCtrFnString = fnCall(_fnToString, ObjClass);\r\n }\r\n\r\n try {\r\n let proto = objGetPrototypeOf(value);\r\n\r\n // No prototype so looks like an object created with Object.create(null)\r\n result = !proto;\r\n if (!result) {\r\n if (objHasOwnProperty(proto, CONSTRUCTOR)) {\r\n proto = proto[CONSTRUCTOR]\r\n }\r\n \r\n result = proto && typeof proto === FUNCTION && _fnToString.call(proto) === _objCtrFnString;\r\n }\r\n } catch (ex) {\r\n // Something went wrong, so it's not an object we are playing with\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2023 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { _unwrapInstFunction } from \"../internal/unwrapFunction\";\r\n/**\r\n * The `fnCall` function calls the function with the given `thisArg` as the `this` value and with\r\n * al of the `_args` provided as it's `arguments.\r\n *\r\n * > This is almost identical to `fnApply`, except that the function arguments are passed to `fnCall`\r\n * individually as a list, while with `fnApply` that are combined into a single array argument.\r\n *\r\n * Normally, when calling a function, the value of `this` inside the function is the object that the\r\n * function was accessed on. With `fnCall()`, you can pass an arbitrary value as the `this` when calling an\r\n * existing function, without first attaching the function to the object as a property. This allows you\r\n * to use methods of one object as generic utility functions.\r\n *\r\n * @since 0.9.8\r\n * @group Function\r\n *\r\n * @param fn - The function to be called\r\n * @param thisArg - The value of `this` provided for the call to `fn`. If the function is not in strict mode,\r\n * `null` and `undefined` will be replaced with the global object, and primitive values will be converted to objects.\r\n * @param _args - The zero or more arguments to be passed to the `fn` function.\r\n * @returns The result of calling the function with the specified `this` value and arguments.\r\n * @example\r\n * ```ts\r\n * // min / max number in an array\r\n * let max = fnCall(Math.max, null, 21, 42, 84, 168, 7, 3);\r\n * // 168\r\n *\r\n * let min = fnCall(Math.min, null, 21, 42, 84, 168, 7, 3);\r\n * // 3\r\n *\r\n * const module1 = {\r\n * prefix: \"Hello\",\r\n * x: 21,\r\n * getX() {\r\n * return this.x;\r\n * },\r\n * log(value: string) {\r\n * return this.prefix + \" \" + value + \" : \" + this.x\r\n * }\r\n * };\r\n *\r\n * // The 'this' parameter of 'getX' is bound to 'module'.\r\n * module1.getX(); // 21\r\n * module1.log(\"Darkness\"); // Hello Darkness : 21\r\n *\r\n * // Create a new function 'boundGetX' with the 'this' parameter bound to 'module'.\r\n * let module2 = {\r\n * prefix: \"my\",\r\n * x: 42\r\n * };\r\n *\r\n * // Call the function of module1 with module2 as it's this\r\n * fnCall(module1.getX, module2); // 42\r\n * fnCall(module1.log, module2, \"friend\"); // my friend : 42\r\n * ```\r\n */\r\nexport var fnCall = _unwrapInstFunction(\"call\");\r\n//# sourceMappingURL=fnCall.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2023 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { _unwrapInstFunction } from \"../internal/unwrapFunction\";\r\n\r\n/**\r\n * The `fnCall` function calls the function with the given `thisArg` as the `this` value and with\r\n * al of the `_args` provided as it's `arguments.\r\n *\r\n * > This is almost identical to `fnApply`, except that the function arguments are passed to `fnCall`\r\n * individually as a list, while with `fnApply` that are combined into a single array argument.\r\n *\r\n * Normally, when calling a function, the value of `this` inside the function is the object that the\r\n * function was accessed on. With `fnCall()`, you can pass an arbitrary value as the `this` when calling an\r\n * existing function, without first attaching the function to the object as a property. This allows you\r\n * to use methods of one object as generic utility functions.\r\n *\r\n * @since 0.9.8\r\n * @group Function\r\n *\r\n * @param fn - The function to be called\r\n * @param thisArg - The value of `this` provided for the call to `fn`. If the function is not in strict mode,\r\n * `null` and `undefined` will be replaced with the global object, and primitive values will be converted to objects.\r\n * @param _args - The zero or more arguments to be passed to the `fn` function.\r\n * @returns The result of calling the function with the specified `this` value and arguments.\r\n * @example\r\n * ```ts\r\n * // min / max number in an array\r\n * let max = fnCall(Math.max, null, 21, 42, 84, 168, 7, 3);\r\n * // 168\r\n *\r\n * let min = fnCall(Math.min, null, 21, 42, 84, 168, 7, 3);\r\n * // 3\r\n *\r\n * const module1 = {\r\n * prefix: \"Hello\",\r\n * x: 21,\r\n * getX() {\r\n * return this.x;\r\n * },\r\n * log(value: string) {\r\n * return this.prefix + \" \" + value + \" : \" + this.x\r\n * }\r\n * };\r\n *\r\n * // The 'this' parameter of 'getX' is bound to 'module'.\r\n * module1.getX(); // 21\r\n * module1.log(\"Darkness\"); // Hello Darkness : 21\r\n *\r\n * // Create a new function 'boundGetX' with the 'this' parameter bound to 'module'.\r\n * let module2 = {\r\n * prefix: \"my\",\r\n * x: 42\r\n * };\r\n *\r\n * // Call the function of module1 with module2 as it's this\r\n * fnCall(module1.getX, module2); // 42\r\n * fnCall(module1.log, module2, \"friend\"); // my friend : 42\r\n * ```\r\n */\r\nexport const fnCall: any, T>(fn: F, thisArg: T, ..._args: any[]) => ReturnType = _unwrapInstFunction(\"call\");\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n/**\r\n * This is an internal property used to cause internal (reporting) requests to be ignored from reporting\r\n * additional telemetry, to handle polyfil implementations ALL urls used with a disabled request will\r\n * also be ignored for future requests even when this property is not provided.\r\n * Tagging as Ignore as this is an internal value and is not expected to be used outside of the SDK\r\n * @ignore\r\n */\r\nexport var DisabledPropertyName = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\r\nexport var SampleRate = \"sampleRate\";\r\nexport var ProcessLegacy = \"ProcessLegacy\";\r\nexport var HttpMethod = \"http.method\";\r\nexport var DEFAULT_BREEZE_ENDPOINT = \"https://dc.services.visualstudio.com\";\r\nexport var DEFAULT_BREEZE_PATH = \"/v2/track\";\r\nexport var strNotSpecified = \"not_specified\";\r\nexport var strIkey = \"iKey\";\r\n//# sourceMappingURL=Constants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { createValueMap } from \"@microsoft/applicationinsights-core-js\";\r\nexport var RequestHeaders = createValueMap({\r\n requestContextHeader: [0 /* eRequestHeaders.requestContextHeader */, \"Request-Context\"],\r\n requestContextTargetKey: [1 /* eRequestHeaders.requestContextTargetKey */, \"appId\"],\r\n requestContextAppIdFormat: [2 /* eRequestHeaders.requestContextAppIdFormat */, \"appId=cid-v1:\"],\r\n requestIdHeader: [3 /* eRequestHeaders.requestIdHeader */, \"Request-Id\"],\r\n traceParentHeader: [4 /* eRequestHeaders.traceParentHeader */, \"traceparent\"],\r\n traceStateHeader: [5 /* eRequestHeaders.traceStateHeader */, \"tracestate\"],\r\n sdkContextHeader: [6 /* eRequestHeaders.sdkContextHeader */, \"Sdk-Context\"],\r\n sdkContextHeaderAppIdRequest: [7 /* eRequestHeaders.sdkContextHeaderAppIdRequest */, \"appId\"],\r\n requestContextHeaderLowerCase: [8 /* eRequestHeaders.requestContextHeaderLowerCase */, \"request-context\"]\r\n});\r\n//# sourceMappingURL=RequestResponseHeaders.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { createEnum, createTypeMap } from \"@nevware21/ts-utils\";\r\n/**\r\n * Create an enum style object which has both the key => value and value => key mappings\r\n * @param values - The values to populate on the new object\r\n * @returns\r\n */\r\nexport var createEnumStyle = createEnum;\r\n/**\r\n * Create a 2 index map that maps an enum's key and value to the defined map value, X[\"key\"] => mapValue and X[0] => mapValue.\r\n * Generic values\r\n * - E = the const enum type (typeof eRequestHeaders);\r\n * - V = Identifies the valid values for the keys, this should include both the enum numeric and string key of the type. The\r\n * resulting \"Value\" of each entry identifies the valid values withing the assignments.\r\n * @param values - The values to populate on the new object\r\n * @returns\r\n */\r\nexport var createValueMap = createTypeMap;\r\n//# sourceMappingURL=EnumHelperFuncs.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { _createKeyValueMap } from \"../internal/map\";\r\nimport { objForEachKey } from \"../object/for_each_key\";\r\nimport { objDeepFreeze } from \"../object/object\";\r\n/**\r\n * Create a TypeScript style enum class which is a mapping that maps from the key -> value and the value -> key.\r\n * This is effectively the same as defining a non-constant enum, but this only repeats the \"Name\" of the enum value once.\r\n * @group Enum\r\n * @example\r\n * ```ts\r\n * const enum Animal {\r\n * Dog = 0,\r\n * Cat = 1,\r\n * Butterfly = 2,\r\n * Bear = 3\r\n * }\r\n * const Animals = createEnum({\r\n * Dog: Animal.Dog,\r\n * Cat: Animal.Cat,\r\n * Butterfly: Animal.Butterfly,\r\n * Bear: Animal.Bear\r\n * });\r\n * // You end up with an object that maps everything to the name\r\n * Animals.Dog === 0; // true\r\n * Animals[0] === \"Dog\"; // true\r\n * Animals[\"Dog\"] === 0; // true\r\n * Animals.Cat === 1; // true\r\n * Animals[1] === \"Cat\"; // true\r\n * Animals[\"Cat\"] === 1; // true\r\n * ```\r\n\r\n * @param values - The values to populate on the new object\r\n * @typeParam E - Identifies the const enum type being mapped\r\n * @returns A new frozen (immutable) object which looks and acts like a TypeScript Enum class.\r\n */\r\nexport function createEnum(values) {\r\n return _createKeyValueMap(values, 1 /* eMapValues.Value */, 0 /* eMapValues.Key */, objDeepFreeze);\r\n}\r\n/**\r\n * Create a map object which contains both the property key and value which both map to the key,\r\n * E[key] => key and E[value] => key.\r\n * @group Enum\r\n * @example\r\n * ```ts\r\n * const enum Animal {\r\n * Dog = 0,\r\n * Cat = 1,\r\n * Butterfly = 2,\r\n * Bear = 3\r\n * }\r\n * const animalMap = createEnumKeyMap({\r\n * Dog: Animal.Dog,\r\n * Cat: Animal.Cat,\r\n * Butterfly: Animal.Butterfly,\r\n * Bear: Animal.Bear\r\n * });\r\n * // You end up with an object that maps everything to the name\r\n * animalMap.Dog === \"Dog\"; // true\r\n * animalMap[0] === \"Dog\"; // true\r\n * animalMap[\"Dog\"] === \"Dog\"; // true\r\n * animalMap.Cat === \"Cat\"; // true\r\n * animalMap[1] === \"Cat\"; // true\r\n * animalMap[\"Cat\"] === \"Cat\"; // true\r\n * // Helper function to always return the \"Name\" of the type of animal\r\n * function getAnimalType(type: string | number | Animal) {\r\n * return animalMap[type];\r\n * }\r\n * ```\r\n * @param values - The values to populate on the new object\r\n * @typeParam E - Identifies the const enum type being mapped\r\n * @returns A new frozen (immutable) object which contains a property for each key and value that returns the value.\r\n */\r\nexport function createEnumKeyMap(values) {\r\n return _createKeyValueMap(values, 0 /* eMapValues.Key */, 0 /* eMapValues.Key */, objDeepFreeze);\r\n}\r\n/**\r\n * Create a map object which contains both the perperty key and value which both map to the resulting value,\r\n * E[key] => value and E[value] => value.\r\n * @group Enum\r\n * @example\r\n * ```ts\r\n * const enum Animal {\r\n * Dog = 0,\r\n * Cat = 1,\r\n * Butterfly = 2,\r\n * Bear = 3\r\n * }\r\n * const animalMap = createEnumValueMap({\r\n * Dog: Animal.Dog,\r\n * Cat: Animal.Cat,\r\n * Butterfly: Animal.Butterfly,\r\n * Bear: Animal.Bear\r\n * });\r\n * // You end up with an object that maps everything to the name\r\n * animalMap.Dog === 0; // true\r\n * animalMap[0] === 0; // true\r\n * animalMap[\"Dog\"] === 0; // true\r\n * animalMap.Cat === 1; // true\r\n * animalMap[1] === 1; // true\r\n * animalMap[\"Cat\"] === 1; // true\r\n *\r\n * // Helper function to always return the \"Name\" of the type of animal\r\n * function getAnimalValue(type: string | number | Animal) {\r\n * return animalMap[type];\r\n * }\r\n * ```\r\n\r\n * @param values - The values to populate on the new object\r\n * @typeParam E - Identifies the const enum type being mapped\r\n * @returns A new frozen (immutable) object which contains a property for each key and value that returns the value.\r\n */\r\nexport function createEnumValueMap(values) {\r\n return _createKeyValueMap(values, 1 /* eMapValues.Value */, 1 /* eMapValues.Value */, objDeepFreeze);\r\n}\r\n/**\r\n * Create a map object which contains both the perperty key and value which both map to the requested\r\n * generic mapValue with a type of V, E[key] => mapValue and E[value] => mapValue.\r\n * @group Enum\r\n * @example\r\n * ```ts\r\n * const enum Animal {\r\n * Dog = 0,\r\n * Cat = 1,\r\n * Butterfly = 2,\r\n * Bear = 3\r\n * };\r\n * // Creates a simple mapping to a string value\r\n * const animalFamilyMap = createValueMap({\r\n * Dog: [ Animal.Dog, \"Canidae\"],\r\n * Cat: [ Animal.Cat, \"Felidae\"],\r\n * Butterfly: [ Animal.Butterfly, \"Papilionidae\"],\r\n * Bear: [ Animal.Bear, \"Ursidae\"]\r\n * });\r\n * // You end up with an object that maps everything to the name\r\n * animalMap.Dog === \"Canidae\"; // true with typeof animalMap.Dog is \"string\"\r\n * animalMap[0] === \"Canidae\"; // true with typeof animalMap[0] is \"string\"\r\n * animalMap[\"Dog\"] === \"Canidae\"; // true with typeof animalMap[\"Dog\"] is \"string\"\r\n * animalMap.Cat === \"Felidae\"; // true with typeof animalMap.Cat is \"string\"\r\n * animalMap[1] === \"Felidae\"; // true with typeof animalMap[1] is \"string\"\r\n * animalMap[\"Cat\"] === \"Felidae\"; // true with typeof animalMap[\"Cat\"] is \"string\"\r\n * ```\r\n * @param values - The values to populate on the new object\r\n * @typeParam E - Identifies the const enum type (eg. typeof Animal);\r\n * @typeParam V - Identifies the type of the mapping `string`; `number`; etc is not restructed to primitive types.\r\n * @returns A new frozen (immutable) object which contains a property for each key and value that returns the defiend mapped value.\r\n */\r\nexport function createSimpleMap(values) {\r\n var mapClass = {};\r\n objForEachKey(values, function (key, value) {\r\n mapClass[key] = value[1];\r\n mapClass[value[0]] = value[1];\r\n });\r\n return objDeepFreeze(mapClass);\r\n}\r\n/**\r\n * Create a strongly types map object which contains both the perperty key and value which both map\r\n * to the requested mapValue,\r\n * E[key] => mapValue and E[value] => mapValue.\r\n * - E = the const enum type (typeof Animal);\r\n * - V = Identifies the valid values for the keys, this should include both the enum numeric and string key of the type. The\r\n * resulting \"Value\" of each entry identifies the valid values withing the assignments.\r\n * @group Enum\r\n * @example\r\n * ```ts\r\n * // Create a strongly types map\r\n * const animalFamilyMap = createTypeMap({\r\n * Dog: [ Animal.Dog, \"Canidae\"],\r\n * Cat: [ Animal.Cat, \"Felidae\"],\r\n * Butterfly: [ Animal.Butterfly, \"Papilionidae\"],\r\n * Bear: [ Animal.Bear, \"Ursidae\"]\r\n * });\r\n * // You end up with a strongly types result for each value\r\n * animalMap.Dog === \"Canidae\"; // true with typeof animalMap.Dog is (const) \"Canidae\"\r\n * animalMap[0] === \"Canidae\"; // true with typeof animalMap[0] is \"Canidae\"\r\n * animalMap[\"Dog\"] === \"Canidae\"; // true with typeof animalMap[\"Dog\"] is \"Canidae\"\r\n * animalMap.Cat === \"Felidae\"; // true with typeof animalMap.Cat is \"Felidae\"\r\n * animalMap[1] === \"Felidae\"; // true with typeof animalMap[1] is \"Felidae\"\r\n * animalMap[\"Cat\"] === \"Felidae\"; // true with typeof animalMap[\"Cat\"] is \"Felidae\"\r\n *\r\n * or using an interface to define the direct string mappings\r\n *\r\n * interface IAnimalFamilyMap {\r\n * Dog: \"Canidae\",\r\n * Cat: \"Felidae\",\r\n * Butterfly: \"Papilionidae\",\r\n * Bear: \"Ursidae\"\r\n * }\r\n *\r\n * // Create a strongly types map\r\n * const animalFamilyMap = createTypeMap({\r\n * Dog: [ Animal.Dog, \"Canidae\"],\r\n * Cat: [ Animal.Cat, \"Felidae\"],\r\n * Butterfly: [ Animal.Butterfly, \"Papilionidae\"],\r\n * Bear: [ Animal.Bear, \"Ursidae\"]\r\n * });\r\n *\r\n * // You also end up with a strongly types result for each value\r\n * animalMap.Dog === \"Canidae\"; // true with typeof animalMap.Dog is (const) \"Canidae\"\r\n * animalMap[0] === \"Canidae\"; // true with typeof animalMap[0] is \"Canidae\"\r\n * animalMap[\"Dog\"] === \"Canidae\"; // true with typeof animalMap[\"Dog\"] is \"Canidae\"\r\n * animalMap.Cat === \"Felidae\"; // true with typeof animalMap.Cat is \"Felidae\"\r\n * animalMap[1] === \"Felidae\"; // true with typeof animalMap[1] is \"Felidae\"\r\n * animalMap[\"Cat\"] === \"Felidae\"; // true with typeof animalMap[\"Cat\"] is \"Felidae\"\r\n * ```\r\n * @param values - The values to populate on the new object\r\n * @typeParam E - Identifies the enum type\r\n * @typeParam T - Identifies the return type that is being created via the mapping.\r\n * @returns A new frozen (immutable) object which contains a property for each key and value that returns the defiend mapped value.\r\n */\r\nexport function createTypeMap(values) {\r\n return createSimpleMap(values);\r\n}\r\n//# sourceMappingURL=enum.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { eMapValues, _createKeyValueMap } from \"../internal/map\";\r\nimport { objForEachKey } from \"../object/for_each_key\";\r\nimport { objDeepFreeze } from \"../object/object\";\r\n\r\n/**\r\n * A type that identifies an enum class generated from a constant enum.\r\n * @group Enum\r\n * @typeParam E - The constant enum type\r\n *\r\n * Returned from {@link createEnum}\r\n */\r\nexport declare type EnumCls = { readonly [key in keyof E extends string | number | symbol ? keyof E : never]: key extends string ? E[key] : key };\r\n\r\n/**\r\n * A type that identifies an object whose property values are generally mapped to the key of the source type.\r\n * @group Enum\r\n * @typeParam E - The source constant enum type which isendifies the keys and values\r\n * @typeParam I - The resulting set of keys from the source type.\r\n *\r\n * Returned from {@link createEnumKeyMap}\r\n */\r\nexport declare type EnumNameMap = { readonly [key in keyof E extends string | number | symbol ? keyof E : never]: key extends string ? key : keyof E } & I;\r\n\r\n/**\r\n * A type that identifies an object whose property values are mapped to the resulting values of the source objects keys.\r\n * @group Enum\r\n * @typeParam E - The source type which identifies the keys.\r\n * @typeParam V - The resulting set of keys from the source type.\r\n *\r\n * Returned from {@link createEnumValueMap}\r\n */\r\nexport declare type EnumValueMap = { readonly [key in keyof E extends string | number | symbol ? keyof E : never]: key extends string ? E[key] : E[key] } & V;\r\n\r\n/**\r\n * A type that maps the keys of E to the type of V.\r\n * @group Enum\r\n * @typeParam E - The type of object that defines the Key (typically a constant enum)\r\n * @typeParam V - The value type, typically `string`, `number` but may also be a complex type.\r\n *\r\n * Returned from {@link createSimpleMap}\r\n */\r\nexport declare type EnumTypeMap = { readonly [key in keyof E extends string ? keyof E : never]: V };\r\n\r\n/**\r\n * Create a TypeScript style enum class which is a mapping that maps from the key -> value and the value -> key.\r\n * This is effectively the same as defining a non-constant enum, but this only repeats the \"Name\" of the enum value once.\r\n * @group Enum\r\n * @example\r\n * ```ts\r\n * const enum Animal {\r\n * Dog = 0,\r\n * Cat = 1,\r\n * Butterfly = 2,\r\n * Bear = 3\r\n * }\r\n * const Animals = createEnum({\r\n * Dog: Animal.Dog,\r\n * Cat: Animal.Cat,\r\n * Butterfly: Animal.Butterfly,\r\n * Bear: Animal.Bear\r\n * });\r\n * // You end up with an object that maps everything to the name\r\n * Animals.Dog === 0; // true\r\n * Animals[0] === \"Dog\"; // true\r\n * Animals[\"Dog\"] === 0; // true\r\n * Animals.Cat === 1; // true\r\n * Animals[1] === \"Cat\"; // true\r\n * Animals[\"Cat\"] === 1; // true\r\n * ```\r\n\r\n * @param values - The values to populate on the new object\r\n * @typeParam E - Identifies the const enum type being mapped\r\n * @returns A new frozen (immutable) object which looks and acts like a TypeScript Enum class.\r\n */\r\nexport function createEnum(values: { [key in keyof E]: E[keyof E] }): EnumCls {\r\n return _createKeyValueMap(values, eMapValues.Value, eMapValues.Key, objDeepFreeze);\r\n}\r\n\r\n/**\r\n * Create a map object which contains both the property key and value which both map to the key,\r\n * E[key] => key and E[value] => key.\r\n * @group Enum\r\n * @example\r\n * ```ts\r\n * const enum Animal {\r\n * Dog = 0,\r\n * Cat = 1,\r\n * Butterfly = 2,\r\n * Bear = 3\r\n * }\r\n * const animalMap = createEnumKeyMap({\r\n * Dog: Animal.Dog,\r\n * Cat: Animal.Cat,\r\n * Butterfly: Animal.Butterfly,\r\n * Bear: Animal.Bear\r\n * });\r\n * // You end up with an object that maps everything to the name\r\n * animalMap.Dog === \"Dog\"; // true\r\n * animalMap[0] === \"Dog\"; // true\r\n * animalMap[\"Dog\"] === \"Dog\"; // true\r\n * animalMap.Cat === \"Cat\"; // true\r\n * animalMap[1] === \"Cat\"; // true\r\n * animalMap[\"Cat\"] === \"Cat\"; // true\r\n * // Helper function to always return the \"Name\" of the type of animal\r\n * function getAnimalType(type: string | number | Animal) {\r\n * return animalMap[type];\r\n * }\r\n * ```\r\n * @param values - The values to populate on the new object\r\n * @typeParam E - Identifies the const enum type being mapped\r\n * @returns A new frozen (immutable) object which contains a property for each key and value that returns the value.\r\n */\r\nexport function createEnumKeyMap(values: { [key in keyof E]: E[keyof E] }): EnumNameMap {\r\n return _createKeyValueMap(values, eMapValues.Key, eMapValues.Key, objDeepFreeze);\r\n}\r\n\r\n/**\r\n * Create a map object which contains both the perperty key and value which both map to the resulting value,\r\n * E[key] => value and E[value] => value.\r\n * @group Enum\r\n * @example\r\n * ```ts\r\n * const enum Animal {\r\n * Dog = 0,\r\n * Cat = 1,\r\n * Butterfly = 2,\r\n * Bear = 3\r\n * }\r\n * const animalMap = createEnumValueMap({\r\n * Dog: Animal.Dog,\r\n * Cat: Animal.Cat,\r\n * Butterfly: Animal.Butterfly,\r\n * Bear: Animal.Bear\r\n * });\r\n * // You end up with an object that maps everything to the name\r\n * animalMap.Dog === 0; // true\r\n * animalMap[0] === 0; // true\r\n * animalMap[\"Dog\"] === 0; // true\r\n * animalMap.Cat === 1; // true\r\n * animalMap[1] === 1; // true\r\n * animalMap[\"Cat\"] === 1; // true\r\n *\r\n * // Helper function to always return the \"Name\" of the type of animal\r\n * function getAnimalValue(type: string | number | Animal) {\r\n * return animalMap[type];\r\n * }\r\n * ```\r\n\r\n * @param values - The values to populate on the new object\r\n * @typeParam E - Identifies the const enum type being mapped\r\n * @returns A new frozen (immutable) object which contains a property for each key and value that returns the value.\r\n */\r\nexport function createEnumValueMap(values: { [key in keyof E]: E[keyof E] }): EnumValueMap {\r\n return _createKeyValueMap(values, eMapValues.Value, eMapValues.Value, objDeepFreeze);\r\n}\r\n\r\n/**\r\n * Create a map object which contains both the perperty key and value which both map to the requested\r\n * generic mapValue with a type of V, E[key] => mapValue and E[value] => mapValue.\r\n * @group Enum\r\n * @example\r\n * ```ts\r\n * const enum Animal {\r\n * Dog = 0,\r\n * Cat = 1,\r\n * Butterfly = 2,\r\n * Bear = 3\r\n * };\r\n * // Creates a simple mapping to a string value\r\n * const animalFamilyMap = createValueMap({\r\n * Dog: [ Animal.Dog, \"Canidae\"],\r\n * Cat: [ Animal.Cat, \"Felidae\"],\r\n * Butterfly: [ Animal.Butterfly, \"Papilionidae\"],\r\n * Bear: [ Animal.Bear, \"Ursidae\"]\r\n * });\r\n * // You end up with an object that maps everything to the name\r\n * animalMap.Dog === \"Canidae\"; // true with typeof animalMap.Dog is \"string\"\r\n * animalMap[0] === \"Canidae\"; // true with typeof animalMap[0] is \"string\"\r\n * animalMap[\"Dog\"] === \"Canidae\"; // true with typeof animalMap[\"Dog\"] is \"string\"\r\n * animalMap.Cat === \"Felidae\"; // true with typeof animalMap.Cat is \"string\"\r\n * animalMap[1] === \"Felidae\"; // true with typeof animalMap[1] is \"string\"\r\n * animalMap[\"Cat\"] === \"Felidae\"; // true with typeof animalMap[\"Cat\"] is \"string\"\r\n * ```\r\n * @param values - The values to populate on the new object\r\n * @typeParam E - Identifies the const enum type (eg. typeof Animal);\r\n * @typeParam V - Identifies the type of the mapping `string`; `number`; etc is not restructed to primitive types.\r\n * @returns A new frozen (immutable) object which contains a property for each key and value that returns the defiend mapped value.\r\n */\r\nexport function createSimpleMap(values: { [key in keyof E]: [ E[keyof E], V] }): EnumTypeMap {\r\n let mapClass: any = {};\r\n objForEachKey(values, (key, value) => {\r\n mapClass[key] = value[1];\r\n mapClass[value[0]] = value[1];\r\n });\r\n\r\n return objDeepFreeze(mapClass);\r\n}\r\n\r\n/**\r\n * Create a strongly types map object which contains both the perperty key and value which both map\r\n * to the requested mapValue,\r\n * E[key] => mapValue and E[value] => mapValue.\r\n * - E = the const enum type (typeof Animal);\r\n * - V = Identifies the valid values for the keys, this should include both the enum numeric and string key of the type. The\r\n * resulting \"Value\" of each entry identifies the valid values withing the assignments.\r\n * @group Enum\r\n * @example\r\n * ```ts\r\n * // Create a strongly types map\r\n * const animalFamilyMap = createTypeMap({\r\n * Dog: [ Animal.Dog, \"Canidae\"],\r\n * Cat: [ Animal.Cat, \"Felidae\"],\r\n * Butterfly: [ Animal.Butterfly, \"Papilionidae\"],\r\n * Bear: [ Animal.Bear, \"Ursidae\"]\r\n * });\r\n * // You end up with a strongly types result for each value\r\n * animalMap.Dog === \"Canidae\"; // true with typeof animalMap.Dog is (const) \"Canidae\"\r\n * animalMap[0] === \"Canidae\"; // true with typeof animalMap[0] is \"Canidae\"\r\n * animalMap[\"Dog\"] === \"Canidae\"; // true with typeof animalMap[\"Dog\"] is \"Canidae\"\r\n * animalMap.Cat === \"Felidae\"; // true with typeof animalMap.Cat is \"Felidae\"\r\n * animalMap[1] === \"Felidae\"; // true with typeof animalMap[1] is \"Felidae\"\r\n * animalMap[\"Cat\"] === \"Felidae\"; // true with typeof animalMap[\"Cat\"] is \"Felidae\"\r\n *\r\n * or using an interface to define the direct string mappings\r\n *\r\n * interface IAnimalFamilyMap {\r\n * Dog: \"Canidae\",\r\n * Cat: \"Felidae\",\r\n * Butterfly: \"Papilionidae\",\r\n * Bear: \"Ursidae\"\r\n * }\r\n *\r\n * // Create a strongly types map\r\n * const animalFamilyMap = createTypeMap({\r\n * Dog: [ Animal.Dog, \"Canidae\"],\r\n * Cat: [ Animal.Cat, \"Felidae\"],\r\n * Butterfly: [ Animal.Butterfly, \"Papilionidae\"],\r\n * Bear: [ Animal.Bear, \"Ursidae\"]\r\n * });\r\n *\r\n * // You also end up with a strongly types result for each value\r\n * animalMap.Dog === \"Canidae\"; // true with typeof animalMap.Dog is (const) \"Canidae\"\r\n * animalMap[0] === \"Canidae\"; // true with typeof animalMap[0] is \"Canidae\"\r\n * animalMap[\"Dog\"] === \"Canidae\"; // true with typeof animalMap[\"Dog\"] is \"Canidae\"\r\n * animalMap.Cat === \"Felidae\"; // true with typeof animalMap.Cat is \"Felidae\"\r\n * animalMap[1] === \"Felidae\"; // true with typeof animalMap[1] is \"Felidae\"\r\n * animalMap[\"Cat\"] === \"Felidae\"; // true with typeof animalMap[\"Cat\"] is \"Felidae\"\r\n * ```\r\n * @param values - The values to populate on the new object\r\n * @typeParam E - Identifies the enum type\r\n * @typeParam T - Identifies the return type that is being created via the mapping.\r\n * @returns A new frozen (immutable) object which contains a property for each key and value that returns the defiend mapped value.\r\n */\r\nexport function createTypeMap(values: { [key in keyof E]: [ E[keyof E], T[keyof T] ] }): T {\r\n return createSimpleMap(values as any) as unknown as T;\r\n}","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { objForEachKey } from \"../object/for_each_key\";\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal Helper function to create a key and value mapped representation of the values\r\n * @param values - The source values\r\n * @param keyType - Identifies the value to populate against the key\r\n * @param valueType - Identifies the value to populate against the value\r\n * @param completeFn - The function to call to complete the map (used to freeze the instance)\r\n * @returns\r\n */\r\nexport function _createKeyValueMap(values, keyType, valueType, completeFn) {\r\n var theMap = {};\r\n objForEachKey(values, function (key, value) {\r\n theMap[key] = keyType ? value : key;\r\n theMap[value] = valueType ? value : key;\r\n });\r\n return completeFn(theMap);\r\n}\r\n//# sourceMappingURL=map.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { objForEachKey } from \"../object/for_each_key\";\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal constant enum used to identify the mapping values for the _createMap function\r\n */\r\nexport const enum eMapValues {\r\n Key = 0,\r\n Value = 1\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal Helper function to create a key and value mapped representation of the values\r\n * @param values - The source values\r\n * @param keyType - Identifies the value to populate against the key\r\n * @param valueType - Identifies the value to populate against the value\r\n * @param completeFn - The function to call to complete the map (used to freeze the instance)\r\n * @returns\r\n */\r\nexport function _createKeyValueMap(values: any, keyType: eMapValues, valueType: eMapValues, completeFn: (value: T) => T) {\r\n let theMap: any = {};\r\n objForEachKey(values, (key, value) => {\r\n theMap[key] = keyType ? value : key;\r\n theMap[value] = valueType ? value : key;\r\n });\r\n\r\n return completeFn(theMap);\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { _throwInternal, getJSON, hasJSON, isObject, objForEachKey, strTrim } from \"@microsoft/applicationinsights-core-js\";\r\nimport { asString, strSubstr, strSubstring } from \"@nevware21/ts-utils\";\r\nimport { _DYN_LENGTH, _DYN_STRINGIFY, _DYN_TO_STRING } from \"../../__DynamicConstants\";\r\nexport function dataSanitizeKeyAndAddUniqueness(logger, key, map) {\r\n var origLength = key[_DYN_LENGTH /* @min:%2elength */];\r\n var field = dataSanitizeKey(logger, key);\r\n // validation truncated the length. We need to add uniqueness\r\n if (field[_DYN_LENGTH /* @min:%2elength */] !== origLength) {\r\n var i = 0;\r\n var uniqueField = field;\r\n while (map[uniqueField] !== undefined) {\r\n i++;\r\n uniqueField = strSubstring(field, 0, 150 /* DataSanitizerValues.MAX_NAME_LENGTH */ - 3) + dsPadNumber(i);\r\n }\r\n field = uniqueField;\r\n }\r\n return field;\r\n}\r\nexport function dataSanitizeKey(logger, name) {\r\n var nameTrunc;\r\n if (name) {\r\n // Remove any leading or trailing whitespace\r\n name = strTrim(asString(name));\r\n // truncate the string to 150 chars\r\n if (name[_DYN_LENGTH /* @min:%2elength */] > 150 /* DataSanitizerValues.MAX_NAME_LENGTH */) {\r\n nameTrunc = strSubstring(name, 0, 150 /* DataSanitizerValues.MAX_NAME_LENGTH */);\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 57 /* _eInternalMessageId.NameTooLong */, \"name is too long. It has been truncated to \" + 150 /* DataSanitizerValues.MAX_NAME_LENGTH */ + \" characters.\", { name: name }, true);\r\n }\r\n }\r\n return nameTrunc || name;\r\n}\r\nexport function dataSanitizeString(logger, value, maxLength) {\r\n if (maxLength === void 0) { maxLength = 1024 /* DataSanitizerValues.MAX_STRING_LENGTH */; }\r\n var valueTrunc;\r\n if (value) {\r\n maxLength = maxLength ? maxLength : 1024 /* DataSanitizerValues.MAX_STRING_LENGTH */; // in case default parameters dont work\r\n value = strTrim(asString(value));\r\n if (value[_DYN_LENGTH /* @min:%2elength */] > maxLength) {\r\n valueTrunc = strSubstring(value, 0, maxLength);\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 61 /* _eInternalMessageId.StringValueTooLong */, \"string value is too long. It has been truncated to \" + maxLength + \" characters.\", { value: value }, true);\r\n }\r\n }\r\n return valueTrunc || value;\r\n}\r\nexport function dataSanitizeUrl(logger, url) {\r\n return dataSanitizeInput(logger, url, 2048 /* DataSanitizerValues.MAX_URL_LENGTH */, 66 /* _eInternalMessageId.UrlTooLong */);\r\n}\r\nexport function dataSanitizeMessage(logger, message) {\r\n var messageTrunc;\r\n if (message) {\r\n if (message[_DYN_LENGTH /* @min:%2elength */] > 32768 /* DataSanitizerValues.MAX_MESSAGE_LENGTH */) {\r\n messageTrunc = strSubstring(message, 0, 32768 /* DataSanitizerValues.MAX_MESSAGE_LENGTH */);\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 56 /* _eInternalMessageId.MessageTruncated */, \"message is too long, it has been truncated to \" + 32768 /* DataSanitizerValues.MAX_MESSAGE_LENGTH */ + \" characters.\", { message: message }, true);\r\n }\r\n }\r\n return messageTrunc || message;\r\n}\r\nexport function dataSanitizeException(logger, exception) {\r\n var exceptionTrunc;\r\n if (exception) {\r\n // Make surte its a string\r\n var value = \"\" + exception;\r\n if (value[_DYN_LENGTH /* @min:%2elength */] > 32768 /* DataSanitizerValues.MAX_EXCEPTION_LENGTH */) {\r\n exceptionTrunc = strSubstring(value, 0, 32768 /* DataSanitizerValues.MAX_EXCEPTION_LENGTH */);\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 52 /* _eInternalMessageId.ExceptionTruncated */, \"exception is too long, it has been truncated to \" + 32768 /* DataSanitizerValues.MAX_EXCEPTION_LENGTH */ + \" characters.\", { exception: exception }, true);\r\n }\r\n }\r\n return exceptionTrunc || exception;\r\n}\r\nexport function dataSanitizeProperties(logger, properties) {\r\n if (properties) {\r\n var tempProps_1 = {};\r\n objForEachKey(properties, function (prop, value) {\r\n if (isObject(value) && hasJSON()) {\r\n // Stringify any part C properties\r\n try {\r\n value = getJSON()[_DYN_STRINGIFY /* @min:%2estringify */](value);\r\n }\r\n catch (e) {\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 49 /* _eInternalMessageId.CannotSerializeObjectNonSerializable */, \"custom property is not valid\", { exception: e }, true);\r\n }\r\n }\r\n value = dataSanitizeString(logger, value, 8192 /* DataSanitizerValues.MAX_PROPERTY_LENGTH */);\r\n prop = dataSanitizeKeyAndAddUniqueness(logger, prop, tempProps_1);\r\n tempProps_1[prop] = value;\r\n });\r\n properties = tempProps_1;\r\n }\r\n return properties;\r\n}\r\nexport function dataSanitizeMeasurements(logger, measurements) {\r\n if (measurements) {\r\n var tempMeasurements_1 = {};\r\n objForEachKey(measurements, function (measure, value) {\r\n measure = dataSanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements_1);\r\n tempMeasurements_1[measure] = value;\r\n });\r\n measurements = tempMeasurements_1;\r\n }\r\n return measurements;\r\n}\r\nexport function dataSanitizeId(logger, id) {\r\n return id ? dataSanitizeInput(logger, id, 128 /* DataSanitizerValues.MAX_ID_LENGTH */, 69 /* _eInternalMessageId.IdTooLong */)[_DYN_TO_STRING /* @min:%2etoString */]() : id;\r\n}\r\nexport function dataSanitizeInput(logger, input, maxLength, _msgId) {\r\n var inputTrunc;\r\n if (input) {\r\n input = strTrim(asString(input));\r\n if (input[_DYN_LENGTH /* @min:%2elength */] > maxLength) {\r\n inputTrunc = strSubstring(input, 0, maxLength);\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, _msgId, \"input is too long, it has been truncated to \" + maxLength + \" characters.\", { data: input }, true);\r\n }\r\n }\r\n return inputTrunc || input;\r\n}\r\nexport function dsPadNumber(num) {\r\n var s = \"00\" + num;\r\n return strSubstr(s, s[_DYN_LENGTH /* @min:%2elength */] - 3);\r\n}\r\n//# sourceMappingURL=DataSanitizer.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nvar _a;\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { dumpObj, isFunction, isUndefined } from \"@nevware21/ts-utils\";\r\nimport { createDynamicConfig, onConfigChange } from \"../Config/DynamicConfig\";\r\nimport { _DYN_DIAG_LOG, _DYN_LOGGER, _DYN_LOGGING_LEVEL_CONSOL4, _DYN_LOG_INTERNAL_MESSAGE, _DYN_MESSAGE, _DYN_MESSAGE_ID, _DYN_PUSH, _DYN_REPLACE, _DYN_THROW_INTERNAL, _DYN_UNLOAD, _DYN_WARN_TO_CONSOLE } from \"../__DynamicConstants\";\r\nimport { getDebugExt } from \"./DbgExtensionUtils\";\r\nimport { getConsole, getJSON, hasJSON } from \"./EnvUtils\";\r\nimport { STR_EMPTY } from \"./InternalConstants\";\r\nvar STR_WARN_TO_CONSOLE = \"warnToConsole\";\r\n/**\r\n * For user non actionable traces use AI Internal prefix.\r\n */\r\nvar AiNonUserActionablePrefix = \"AI (Internal): \";\r\n/**\r\n * Prefix of the traces in portal.\r\n */\r\nvar AiUserActionablePrefix = \"AI: \";\r\n/**\r\n * Session storage key for the prefix for the key indicating message type already logged\r\n */\r\nvar AIInternalMessagePrefix = \"AITR_\";\r\nvar defaultValues = {\r\n loggingLevelConsole: 0,\r\n loggingLevelTelemetry: 1,\r\n maxMessageLimit: 25,\r\n enableDebug: false\r\n};\r\nvar _logFuncs = (_a = {},\r\n _a[0 /* eLoggingSeverity.DISABLED */] = null,\r\n _a[1 /* eLoggingSeverity.CRITICAL */] = \"errorToConsole\",\r\n _a[2 /* eLoggingSeverity.WARNING */] = STR_WARN_TO_CONSOLE,\r\n _a[3 /* eLoggingSeverity.DEBUG */] = \"debugToConsole\",\r\n _a);\r\nfunction _sanitizeDiagnosticText(text) {\r\n if (text) {\r\n return \"\\\"\" + text[_DYN_REPLACE /* @min:%2ereplace */](/\\\"/g, STR_EMPTY) + \"\\\"\";\r\n }\r\n return STR_EMPTY;\r\n}\r\nfunction _logToConsole(func, message) {\r\n var theConsole = getConsole();\r\n if (!!theConsole) {\r\n var logFunc = \"log\";\r\n if (theConsole[func]) {\r\n logFunc = func;\r\n }\r\n if (isFunction(theConsole[logFunc])) {\r\n theConsole[logFunc](message);\r\n }\r\n }\r\n}\r\nvar _InternalLogMessage = /** @class */ (function () {\r\n function _InternalLogMessage(msgId, msg, isUserAct, properties) {\r\n if (isUserAct === void 0) { isUserAct = false; }\r\n var _self = this;\r\n _self[_DYN_MESSAGE_ID /* @min:%2emessageId */] = msgId;\r\n _self[_DYN_MESSAGE /* @min:%2emessage */] =\r\n (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +\r\n msgId;\r\n var strProps = STR_EMPTY;\r\n if (hasJSON()) {\r\n strProps = getJSON().stringify(properties);\r\n }\r\n var diagnosticText = (msg ? \" message:\" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +\r\n (properties ? \" props:\" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);\r\n _self[_DYN_MESSAGE /* @min:%2emessage */] += diagnosticText;\r\n }\r\n _InternalLogMessage.dataType = \"MessageData\";\r\n return _InternalLogMessage;\r\n}());\r\nexport { _InternalLogMessage };\r\nexport function safeGetLogger(core, config) {\r\n return (core || {})[_DYN_LOGGER /* @min:%2elogger */] || new DiagnosticLogger(config);\r\n}\r\nvar DiagnosticLogger = /** @class */ (function () {\r\n function DiagnosticLogger(config) {\r\n this.identifier = \"DiagnosticLogger\";\r\n /**\r\n * The internal logging queue\r\n */\r\n this.queue = [];\r\n /**\r\n * Count of internal messages sent\r\n */\r\n var _messageCount = 0;\r\n /**\r\n * Holds information about what message types were already logged to console or sent to server.\r\n */\r\n var _messageLogged = {};\r\n var _loggingLevelConsole;\r\n var _loggingLevelTelemetry;\r\n var _maxInternalMessageLimit;\r\n var _enableDebug;\r\n var _unloadHandler;\r\n dynamicProto(DiagnosticLogger, this, function (_self) {\r\n _unloadHandler = _setDefaultsFromConfig(config || {});\r\n _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };\r\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity - {LoggingSeverity} - The severity of the log message\r\n * @param message - {_InternalLogMessage} - The log message.\r\n */\r\n _self[_DYN_THROW_INTERNAL /* @min:%2ethrowInternal */] = function (severity, msgId, msg, properties, isUserAct) {\r\n if (isUserAct === void 0) { isUserAct = false; }\r\n var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);\r\n if (_enableDebug) {\r\n throw dumpObj(message);\r\n }\r\n else {\r\n // Get the logging function and fallback to warnToConsole of for some reason errorToConsole doesn't exist\r\n var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;\r\n if (!isUndefined(message[_DYN_MESSAGE /* @min:%2emessage */])) {\r\n if (isUserAct) {\r\n // check if this message type was already logged to console for this page view and if so, don't log it again\r\n var messageKey = +message[_DYN_MESSAGE_ID /* @min:%2emessageId */];\r\n if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {\r\n _self[logFunc](message[_DYN_MESSAGE /* @min:%2emessage */]);\r\n _messageLogged[messageKey] = true;\r\n }\r\n }\r\n else {\r\n // Only log traces if the console Logging Level is >= the throwInternal severity level\r\n if (_loggingLevelConsole >= severity) {\r\n _self[logFunc](message[_DYN_MESSAGE /* @min:%2emessage */]);\r\n }\r\n }\r\n _logInternalMessage(severity, message);\r\n }\r\n else {\r\n _debugExtMsg(\"throw\" + (severity === 1 /* eLoggingSeverity.CRITICAL */ ? \"Critical\" : \"Warning\"), message);\r\n }\r\n }\r\n };\r\n _self.debugToConsole = function (message) {\r\n _logToConsole(\"debug\", message);\r\n _debugExtMsg(\"warning\", message);\r\n };\r\n _self[_DYN_WARN_TO_CONSOLE /* @min:%2ewarnToConsole */] = function (message) {\r\n _logToConsole(\"warn\", message);\r\n _debugExtMsg(\"warning\", message);\r\n };\r\n _self.errorToConsole = function (message) {\r\n _logToConsole(\"error\", message);\r\n _debugExtMsg(\"error\", message);\r\n };\r\n _self.resetInternalMessageCount = function () {\r\n _messageCount = 0;\r\n _messageLogged = {};\r\n };\r\n _self[_DYN_LOG_INTERNAL_MESSAGE /* @min:%2elogInternalMessage */] = _logInternalMessage;\r\n _self[_DYN_UNLOAD /* @min:%2eunload */] = function (isAsync) {\r\n _unloadHandler && _unloadHandler.rm();\r\n _unloadHandler = null;\r\n };\r\n function _logInternalMessage(severity, message) {\r\n if (_areInternalMessagesThrottled()) {\r\n return;\r\n }\r\n // check if this message type was already logged for this session and if so, don't log it again\r\n var logMessage = true;\r\n var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID /* @min:%2emessageId */];\r\n // if the session storage is not available, limit to only one message type per page view\r\n if (_messageLogged[messageKey]) {\r\n logMessage = false;\r\n }\r\n else {\r\n _messageLogged[messageKey] = true;\r\n }\r\n if (logMessage) {\r\n // Push the event in the internal queue\r\n if (severity <= _loggingLevelTelemetry) {\r\n _self.queue[_DYN_PUSH /* @min:%2epush */](message);\r\n _messageCount++;\r\n _debugExtMsg((severity === 1 /* eLoggingSeverity.CRITICAL */ ? \"error\" : \"warn\"), message);\r\n }\r\n // When throttle limit reached, send a special event\r\n if (_messageCount === _maxInternalMessageLimit) {\r\n var throttleLimitMessage = \"Internal events throttle limit per PageView reached for this app.\";\r\n var throttleMessage = new _InternalLogMessage(23 /* _eInternalMessageId.MessageLimitPerPVExceeded */, throttleLimitMessage, false);\r\n _self.queue[_DYN_PUSH /* @min:%2epush */](throttleMessage);\r\n if (severity === 1 /* eLoggingSeverity.CRITICAL */) {\r\n _self.errorToConsole(throttleLimitMessage);\r\n }\r\n else {\r\n _self[_DYN_WARN_TO_CONSOLE /* @min:%2ewarnToConsole */](throttleLimitMessage);\r\n }\r\n }\r\n }\r\n }\r\n function _setDefaultsFromConfig(config) {\r\n // make sure the config is dynamic\r\n return onConfigChange(createDynamicConfig(config, defaultValues, _self).cfg, function (details) {\r\n var config = details.cfg;\r\n _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 /* @min:%2eloggingLevelConsole */];\r\n _loggingLevelTelemetry = config.loggingLevelTelemetry;\r\n _maxInternalMessageLimit = config.maxMessageLimit;\r\n _enableDebug = config.enableDebug;\r\n });\r\n }\r\n function _areInternalMessagesThrottled() {\r\n return _messageCount >= _maxInternalMessageLimit;\r\n }\r\n function _debugExtMsg(name, data) {\r\n var dbgExt = getDebugExt(config || {});\r\n if (dbgExt && dbgExt[_DYN_DIAG_LOG /* @min:%2ediagLog */]) {\r\n dbgExt[_DYN_DIAG_LOG /* @min:%2ediagLog */](name, data);\r\n }\r\n }\r\n });\r\n }\r\n /**\r\n * 0: OFF (default)\r\n * 1: CRITICAL\r\n * 2: >= WARNING\r\n */\r\n DiagnosticLogger.prototype.consoleLoggingLevel = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return 0;\r\n };\r\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity - {LoggingSeverity} - The severity of the log message\r\n * @param message - {_InternalLogMessage} - The log message.\r\n */\r\n DiagnosticLogger.prototype.throwInternal = function (severity, msgId, msg, properties, isUserAct) {\r\n if (isUserAct === void 0) { isUserAct = false; }\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * This will write a debug message to the console if possible\r\n * @param message - {string} - The debug message\r\n */\r\n DiagnosticLogger.prototype.debugToConsole = function (message) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * This will write a warning to the console if possible\r\n * @param message - {string} - The warning message\r\n */\r\n DiagnosticLogger.prototype.warnToConsole = function (message) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * This will write an error to the console if possible\r\n * @param message - {string} - The warning message\r\n */\r\n DiagnosticLogger.prototype.errorToConsole = function (message) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Resets the internal message count\r\n */\r\n DiagnosticLogger.prototype.resetInternalMessageCount = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Logs a message to the internal queue.\r\n * @param severity - {LoggingSeverity} - The severity of the log message\r\n * @param message - {_InternalLogMessage} - The message to log.\r\n */\r\n DiagnosticLogger.prototype.logInternalMessage = function (severity, message) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Unload and remove any state that this IDiagnosticLogger may be holding, this is generally called when the\r\n * owning SDK is being unloaded.\r\n * @param isAsync - Can the unload be performed asynchronously (default)\r\n * @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then\r\n * the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * / Promise to allow any listeners to wait for the operation to complete.\r\n */\r\n DiagnosticLogger.prototype.unload = function (isAsync) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return DiagnosticLogger;\r\n}());\r\nexport { DiagnosticLogger };\r\nfunction _getLogger(logger) {\r\n return (logger || new DiagnosticLogger());\r\n}\r\n/**\r\n * This is a helper method which will call throwInternal on the passed logger, will throw exceptions in\r\n * debug mode or attempt to log the error as a console warning. This helper is provided mostly to better\r\n * support minification as logger.throwInternal() will not compress the publish \"throwInternal\" used throughout\r\n * the code.\r\n * @param logger - The Diagnostic Logger instance to use.\r\n * @param severity - {LoggingSeverity} - The severity of the log message\r\n * @param message - {_InternalLogMessage} - The log message.\r\n */\r\nexport function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {\r\n if (isUserAct === void 0) { isUserAct = false; }\r\n _getLogger(logger)[_DYN_THROW_INTERNAL /* @min:%2ethrowInternal */](severity, msgId, msg, properties, isUserAct);\r\n}\r\n/**\r\n * This is a helper method which will call warnToConsole on the passed logger with the provided message.\r\n * @param logger - The Diagnostic Logger instance to use.\r\n * @param message - {_InternalLogMessage} - The log message.\r\n */\r\nexport function _warnToConsole(logger, message) {\r\n _getLogger(logger)[_DYN_WARN_TO_CONSOLE /* @min:%2ewarnToConsole */](message);\r\n}\r\n/**\r\n * Logs a message to the internal queue.\r\n * @param logger - The Diagnostic Logger instance to use.\r\n * @param severity - {LoggingSeverity} - The severity of the log message\r\n * @param message - {_InternalLogMessage} - The message to log.\r\n */\r\nexport function _logInternalMessage(logger, severity, message) {\r\n _getLogger(logger)[_DYN_LOG_INTERNAL_MESSAGE /* @min:%2elogInternalMessage */](severity, message);\r\n}\r\n//# sourceMappingURL=DiagnosticLogger.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { dumpObj, isUndefined, objDefine, objForEachKey } from \"@nevware21/ts-utils\";\r\nimport { createUniqueNamespace } from \"../JavaScriptSDK/DataCacheHelper\";\r\nimport { STR_NOT_DYNAMIC_ERROR } from \"../JavaScriptSDK/InternalConstants\";\r\nimport { _DYN_BLK_VAL, _DYN_LOGGER, _DYN_NOTIFY, _DYN_RD_ONLY, _DYN_SET_DF, _DYN_THROW_INTERNAL, _DYN_WARN_TO_CONSOLE, _DYN_WATCH } from \"../__DynamicConstants\";\r\nimport { _applyDefaultValue } from \"./ConfigDefaults\";\r\nimport { _makeDynamicObject, _setDynamicProperty, _setDynamicPropertyState, _throwDynamicError } from \"./DynamicProperty\";\r\nimport { _createState } from \"./DynamicState\";\r\nimport { CFG_HANDLER_LINK, _cfgDeepCopy, getDynamicConfigHandler, throwInvalidAccess } from \"./DynamicSupport\";\r\n/**\r\n * Identifies a function which will be re-called whenever any of it's accessed configuration values\r\n * change.\r\n * @param configHandler - The callback that will be called for the initial request and then whenever any\r\n * accessed configuration changes are identified.\r\n */\r\nfunction _createAndUseHandler(state, configHandler) {\r\n var handler = {\r\n fn: configHandler,\r\n rm: function () {\r\n // Clear all references to the handler so it can be garbage collected\r\n // This will also cause this handler to never get called and eventually removed\r\n handler.fn = null;\r\n state = null;\r\n configHandler = null;\r\n }\r\n };\r\n state.use(handler, configHandler);\r\n return handler;\r\n}\r\n/**\r\n * Creates the dynamic config handler and associates with the target config as the root object\r\n * @param target - The config that you want to be root of the dynamic config\r\n * @param inPlace - Should the passed config be converted in-place or a new proxy returned\r\n * @returns The existing dynamic handler or a new instance with the provided config values\r\n */\r\nfunction _createDynamicHandler(logger, target, inPlace) {\r\n var _a;\r\n var dynamicHandler = getDynamicConfigHandler(target);\r\n if (dynamicHandler) {\r\n // The passed config is already dynamic so return it's tracker\r\n return dynamicHandler;\r\n }\r\n var uid = createUniqueNamespace(\"dyncfg\", true);\r\n var newTarget = (target && inPlace !== false) ? target : _cfgDeepCopy(target);\r\n var theState;\r\n function _notifyWatchers() {\r\n theState[_DYN_NOTIFY /* @min:%2enotify */]();\r\n }\r\n function _setValue(target, name, value) {\r\n try {\r\n target = _setDynamicProperty(theState, target, name, value);\r\n }\r\n catch (e) {\r\n // Unable to convert to dynamic property so just leave as non-dynamic\r\n _throwDynamicError(logger, name, \"Setting value\", e);\r\n }\r\n return target[name];\r\n }\r\n function _watch(configHandler) {\r\n return _createAndUseHandler(theState, configHandler);\r\n }\r\n function _block(configHandler, allowUpdate) {\r\n theState.use(null, function (details) {\r\n var prevUpd = theState.upd;\r\n try {\r\n if (!isUndefined(allowUpdate)) {\r\n theState.upd = allowUpdate;\r\n }\r\n configHandler(details);\r\n }\r\n finally {\r\n theState.upd = prevUpd;\r\n }\r\n });\r\n }\r\n function _ref(target, name) {\r\n var _a;\r\n // Make sure it's dynamic and mark as referenced with it's current value\r\n return _setDynamicPropertyState(theState, target, name, (_a = {}, _a[0 /* _eSetDynamicPropertyFlags.inPlace */] = true, _a))[name];\r\n }\r\n function _rdOnly(target, name) {\r\n var _a;\r\n // Make sure it's dynamic and mark as readonly with it's current value\r\n return _setDynamicPropertyState(theState, target, name, (_a = {}, _a[1 /* _eSetDynamicPropertyFlags.readOnly */] = true, _a))[name];\r\n }\r\n function _blkPropValue(target, name) {\r\n var _a;\r\n // Make sure it's dynamic and mark as readonly with it's current value\r\n return _setDynamicPropertyState(theState, target, name, (_a = {}, _a[2 /* _eSetDynamicPropertyFlags.blockDynamicProperty */] = true, _a))[name];\r\n }\r\n function _applyDefaults(theConfig, defaultValues) {\r\n if (defaultValues) {\r\n // Resolve/apply the defaults\r\n objForEachKey(defaultValues, function (name, value) {\r\n // Sets the value and makes it dynamic (if it doesn't already exist)\r\n _applyDefaultValue(cfgHandler, theConfig, name, value);\r\n });\r\n }\r\n return theConfig;\r\n }\r\n var cfgHandler = (_a = {\r\n uid: null,\r\n cfg: newTarget\r\n },\r\n _a[_DYN_LOGGER /* @min:logger */] = logger,\r\n _a[_DYN_NOTIFY /* @min:notify */] = _notifyWatchers,\r\n _a.set = _setValue,\r\n _a[_DYN_SET_DF /* @min:setDf */] = _applyDefaults,\r\n _a[_DYN_WATCH /* @min:watch */] = _watch,\r\n _a.ref = _ref,\r\n _a[_DYN_RD_ONLY /* @min:rdOnly */] = _rdOnly,\r\n _a[_DYN_BLK_VAL /* @min:blkVal */] = _blkPropValue,\r\n _a._block = _block,\r\n _a);\r\n objDefine(cfgHandler, \"uid\", {\r\n c: false,\r\n e: false,\r\n w: false,\r\n v: uid\r\n });\r\n theState = _createState(cfgHandler);\r\n // Setup tracking for all defined default keys\r\n _makeDynamicObject(theState, newTarget, \"config\", \"Creating\");\r\n return cfgHandler;\r\n}\r\n/**\r\n * Log an invalid access message to the console\r\n * @param message\r\n */\r\nfunction _logInvalidAccess(logger, message) {\r\n if (logger) {\r\n logger[_DYN_WARN_TO_CONSOLE /* @min:%2ewarnToConsole */](message);\r\n logger[_DYN_THROW_INTERNAL /* @min:%2ethrowInternal */](2 /* eLoggingSeverity.WARNING */, 108 /* _eInternalMessageId.DynamicConfigException */, message);\r\n }\r\n else {\r\n // We don't have a logger so just throw an exception\r\n throwInvalidAccess(message);\r\n }\r\n}\r\n/**\r\n * Create or return a dynamic version of the passed config, if it is not already dynamic\r\n * @param config - The config to be converted into a dynamic config\r\n * @param defaultConfig - The default values to apply on the config if the properties don't already exist\r\n * @param inPlace - Should the config be converted in-place into a dynamic config or a new instance returned, defaults to true\r\n * @returns The dynamic config handler for the config (whether new or existing)\r\n */\r\nexport function createDynamicConfig(config, defaultConfig, logger, inPlace) {\r\n var dynamicHandler = _createDynamicHandler(logger, config || {}, inPlace);\r\n if (defaultConfig) {\r\n dynamicHandler[_DYN_SET_DF /* @min:%2esetDf */](dynamicHandler.cfg, defaultConfig);\r\n }\r\n return dynamicHandler;\r\n}\r\n/**\r\n * Watch and track changes for accesses to the current config, the provided config MUST already be\r\n * a dynamic config or a child accessed via the dynamic config\r\n * @param config\r\n * @param configHandler\r\n * @param logger - The logger instance to use if there is no existing handler\r\n * @returns A watcher handler instance that can be used to remove itself when being unloaded\r\n * @throws TypeError if the provided config is not a dynamic config instance\r\n */\r\nexport function onConfigChange(config, configHandler, logger) {\r\n var handler = config[CFG_HANDLER_LINK] || config;\r\n if (handler.cfg && (handler.cfg === config || handler.cfg[CFG_HANDLER_LINK] === handler)) {\r\n return handler[_DYN_WATCH /* @min:%2ewatch */](configHandler);\r\n }\r\n _logInvalidAccess(logger, STR_NOT_DYNAMIC_ERROR + dumpObj(config));\r\n return createDynamicConfig(config, null, logger)[_DYN_WATCH /* @min:%2ewatch */](configHandler);\r\n}\r\n//# sourceMappingURL=DynamicConfig.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { objDefine } from \"@nevware21/ts-utils\";\r\nimport { _DYN_NODE_TYPE } from \"../__DynamicConstants\";\r\nimport { normalizeJsName } from \"./HelperFuncs\";\r\nimport { STR_EMPTY } from \"./InternalConstants\";\r\nimport { newId } from \"./RandomHelper\";\r\nvar version = '3.0.2';\r\nvar instanceName = \".\" + newId(6);\r\nvar _dataUid = 0;\r\n// Accepts only:\r\n// - Node\r\n// - Node.ELEMENT_NODE\r\n// - Node.DOCUMENT_NODE\r\n// - Object\r\n// - Any\r\nfunction _canAcceptData(target) {\r\n return target[_DYN_NODE_TYPE /* @min:%2enodeType */] === 1 || target[_DYN_NODE_TYPE /* @min:%2enodeType */] === 9 || !(+target[_DYN_NODE_TYPE /* @min:%2enodeType */]);\r\n}\r\nfunction _getCache(data, target) {\r\n var theCache = target[data.id];\r\n if (!theCache) {\r\n theCache = {};\r\n try {\r\n if (_canAcceptData(target)) {\r\n objDefine(target, data.id, {\r\n e: false,\r\n v: theCache\r\n });\r\n }\r\n }\r\n catch (e) {\r\n // Not all environments allow extending all objects, so just ignore the cache in those cases\r\n }\r\n }\r\n return theCache;\r\n}\r\nexport function createUniqueNamespace(name, includeVersion) {\r\n if (includeVersion === void 0) { includeVersion = false; }\r\n return normalizeJsName(name + (_dataUid++) + (includeVersion ? \".\" + version : STR_EMPTY) + instanceName);\r\n}\r\nexport function createElmNodeData(name) {\r\n var data = {\r\n id: createUniqueNamespace(\"_aiData-\" + (name || STR_EMPTY) + \".\" + version),\r\n accept: function (target) {\r\n return _canAcceptData(target);\r\n },\r\n get: function (target, name, defValue, addDefault) {\r\n var theCache = target[data.id];\r\n if (!theCache) {\r\n if (addDefault) {\r\n // Side effect is adds the cache\r\n theCache = _getCache(data, target);\r\n theCache[normalizeJsName(name)] = defValue;\r\n }\r\n return defValue;\r\n }\r\n return theCache[normalizeJsName(name)];\r\n },\r\n kill: function (target, name) {\r\n if (target && target[name]) {\r\n try {\r\n delete target[name];\r\n }\r\n catch (e) {\r\n // Just cleaning up, so if this fails -- ignore\r\n }\r\n }\r\n }\r\n };\r\n return data;\r\n}\r\n//# sourceMappingURL=DataCacheHelper.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { asString, isArray, isDefined, isNullOrUndefined, isObject, isPlainObject, isUndefined, objForEachKey, objHasOwn } from \"@nevware21/ts-utils\";\r\nimport { _DYN_BLK_VAL, _DYN_LENGTH, _DYN_RD_ONLY } from \"../__DynamicConstants\";\r\nfunction _isConfigDefaults(value) {\r\n return (value && isObject(value) && (value.isVal || value.fb || objHasOwn(value, \"v\") || objHasOwn(value, \"mrg\") || objHasOwn(value, \"ref\") || value.set));\r\n}\r\nfunction _getDefault(dynamicHandler, theConfig, cfgDefaults) {\r\n var defValue;\r\n var isDefaultValid = cfgDefaults.dfVal || isDefined;\r\n // There is a fallback config key so try and grab that first\r\n if (theConfig && cfgDefaults.fb) {\r\n var fallbacks = cfgDefaults.fb;\r\n if (!isArray(fallbacks)) {\r\n fallbacks = [fallbacks];\r\n }\r\n for (var lp = 0; lp < fallbacks[_DYN_LENGTH /* @min:%2elength */]; lp++) {\r\n var fallback = fallbacks[lp];\r\n var fbValue = theConfig[fallback];\r\n if (isDefaultValid(fbValue)) {\r\n defValue = fbValue;\r\n }\r\n else if (dynamicHandler) {\r\n // Needed to ensure that the fallback value (and potentially) new field is also dynamic even if null/undefined\r\n fbValue = dynamicHandler.cfg[fallback];\r\n if (isDefaultValid(fbValue)) {\r\n defValue = fbValue;\r\n }\r\n // Needed to ensure that the fallback value (and potentially) new field is also dynamic even if null/undefined\r\n dynamicHandler.set(dynamicHandler.cfg, asString(fallback), fbValue);\r\n }\r\n if (isDefaultValid(defValue)) {\r\n // We have a valid default so break out of the look\r\n break;\r\n }\r\n }\r\n }\r\n // If the value is still not defined and we have a default value then use that\r\n if (!isDefaultValid(defValue) && isDefaultValid(cfgDefaults.v)) {\r\n defValue = cfgDefaults.v;\r\n }\r\n return defValue;\r\n}\r\n/**\r\n * Recursively resolve the default value\r\n * @param dynamicHandler\r\n * @param theConfig\r\n * @param cfgDefaults\r\n * @returns\r\n */\r\nfunction _resolveDefaultValue(dynamicHandler, theConfig, cfgDefaults) {\r\n var theValue = cfgDefaults;\r\n if (cfgDefaults && _isConfigDefaults(cfgDefaults)) {\r\n theValue = _getDefault(dynamicHandler, theConfig, cfgDefaults);\r\n }\r\n if (theValue) {\r\n if (_isConfigDefaults(theValue)) {\r\n theValue = _resolveDefaultValue(dynamicHandler, theConfig, theValue);\r\n }\r\n var newValue_1;\r\n if (isArray(theValue)) {\r\n newValue_1 = [];\r\n newValue_1[_DYN_LENGTH /* @min:%2elength */] = theValue[_DYN_LENGTH /* @min:%2elength */];\r\n }\r\n else if (isPlainObject(theValue)) {\r\n newValue_1 = {};\r\n }\r\n if (newValue_1) {\r\n objForEachKey(theValue, function (key, value) {\r\n if (value && _isConfigDefaults(value)) {\r\n value = _resolveDefaultValue(dynamicHandler, theConfig, value);\r\n }\r\n newValue_1[key] = value;\r\n });\r\n theValue = newValue_1;\r\n }\r\n }\r\n return theValue;\r\n}\r\n/**\r\n * Applies the default value on the config property and makes sure that it's dynamic\r\n * @param theConfig\r\n * @param name\r\n * @param defaultValue\r\n */\r\nexport function _applyDefaultValue(dynamicHandler, theConfig, name, defaultValue) {\r\n // Resolve the initial config value from the provided value or use the defined default\r\n var isValid;\r\n var setFn;\r\n var defValue;\r\n var cfgDefaults = defaultValue;\r\n var mergeDf;\r\n var reference;\r\n var readOnly;\r\n var blkDynamicValue;\r\n if (_isConfigDefaults(cfgDefaults)) {\r\n // looks like a IConfigDefault\r\n isValid = cfgDefaults.isVal;\r\n setFn = cfgDefaults.set;\r\n readOnly = cfgDefaults[_DYN_RD_ONLY /* @min:%2erdOnly */];\r\n blkDynamicValue = cfgDefaults[_DYN_BLK_VAL /* @min:%2eblkVal */];\r\n mergeDf = cfgDefaults.mrg;\r\n reference = cfgDefaults.ref;\r\n if (!reference && isUndefined(reference)) {\r\n reference = !!mergeDf;\r\n }\r\n defValue = _getDefault(dynamicHandler, theConfig, cfgDefaults);\r\n }\r\n else {\r\n defValue = defaultValue;\r\n }\r\n if (blkDynamicValue) {\r\n // Mark the property so that any value assigned will be blocked from conversion, we need to do this\r\n // before assigning or fetching the value to ensure it's not converted\r\n dynamicHandler[_DYN_BLK_VAL /* @min:%2eblkVal */](theConfig, name);\r\n }\r\n // Set the value to the default value;\r\n var theValue;\r\n var usingDefault = true;\r\n var cfgValue = theConfig[name];\r\n // try and get and user provided values\r\n if (cfgValue || !isNullOrUndefined(cfgValue)) {\r\n // Use the defined theConfig[name] value\r\n theValue = cfgValue;\r\n usingDefault = false;\r\n // The values are different and we have a special default value check, which is used to\r\n // override config values like empty strings to continue using the default\r\n if (isValid && theValue !== defValue && !isValid(theValue)) {\r\n theValue = defValue;\r\n usingDefault = true;\r\n }\r\n if (setFn) {\r\n theValue = setFn(theValue, defValue, theConfig);\r\n usingDefault = theValue === defValue;\r\n }\r\n }\r\n if (!usingDefault) {\r\n if (isPlainObject(theValue) || isArray(defValue)) {\r\n // we are using the user supplied value and it's an object\r\n if (mergeDf && defValue && (isPlainObject(defValue) || isArray(defValue))) {\r\n // Resolve/apply the defaults\r\n objForEachKey(defValue, function (dfName, dfValue) {\r\n // Sets the value and makes it dynamic (if it doesn't already exist)\r\n _applyDefaultValue(dynamicHandler, theValue, dfName, dfValue);\r\n });\r\n }\r\n }\r\n }\r\n else if (defValue) {\r\n // Just resolve the default\r\n theValue = _resolveDefaultValue(dynamicHandler, theConfig, defValue);\r\n }\r\n else {\r\n theValue = defValue;\r\n }\r\n // if (theValue && usingDefault && (isPlainObject(theValue) || isArray(theValue))) {\r\n // theValue = _cfgDeepCopy(theValue);\r\n // }\r\n // Needed to ensure that the (potentially) new field is dynamic even if null/undefined\r\n dynamicHandler.set(theConfig, name, theValue);\r\n if (reference) {\r\n dynamicHandler.ref(theConfig, name);\r\n }\r\n if (readOnly) {\r\n dynamicHandler[_DYN_RD_ONLY /* @min:%2erdOnly */](theConfig, name);\r\n }\r\n}\r\n//# sourceMappingURL=ConfigDefaults.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrForEach, arrIndexOf, dumpObj, isArray, objDefine, objDefineProp, objForEachKey, objGetOwnPropertyDescriptor } from \"@nevware21/ts-utils\";\r\nimport { UNDEFINED_VALUE } from \"../JavaScriptSDK/InternalConstants\";\r\nimport { _DYN_APPLY, _DYN_HDLR, _DYN_LOGGER, _DYN_PUSH, _DYN_SPLICE, _DYN_THROW_INTERNAL } from \"../__DynamicConstants\";\r\nimport { CFG_HANDLER_LINK, _canMakeDynamic, blockDynamicConversion, throwInvalidAccess } from \"./DynamicSupport\";\r\nvar arrayMethodsToPatch = [\r\n \"push\",\r\n \"pop\",\r\n \"shift\",\r\n \"unshift\",\r\n \"splice\"\r\n];\r\nexport var _throwDynamicError = function (logger, name, desc, e) {\r\n logger && logger[_DYN_THROW_INTERNAL /* @min:%2ethrowInternal */](3 /* eLoggingSeverity.DEBUG */, 108 /* _eInternalMessageId.DynamicConfigException */, \"\".concat(desc, \" [\").concat(name, \"] failed - \") + dumpObj(e));\r\n};\r\nfunction _patchArray(state, target, name) {\r\n if (isArray(target)) {\r\n // Monkey Patch the methods that might change the array\r\n arrForEach(arrayMethodsToPatch, function (method) {\r\n var orgMethod = target[method];\r\n target[method] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var result = orgMethod[_DYN_APPLY /* @min:%2eapply */](this, args);\r\n // items may be added, removed or moved so need to make some new dynamic properties\r\n _makeDynamicObject(state, target, name, \"Patching\");\r\n return result;\r\n };\r\n });\r\n }\r\n}\r\nfunction _getOwnPropGetter(target, name) {\r\n var propDesc = objGetOwnPropertyDescriptor(target, name);\r\n return propDesc && propDesc.get;\r\n}\r\nfunction _createDynamicProperty(state, theConfig, name, value) {\r\n // Does not appear to be dynamic so lets make it so\r\n var detail = {\r\n n: name,\r\n h: [],\r\n trk: function (handler) {\r\n if (handler && handler.fn) {\r\n if (arrIndexOf(detail.h, handler) === -1) {\r\n // Add this handler to the collection that should be notified when the value changes\r\n detail.h[_DYN_PUSH /* @min:%2epush */](handler);\r\n }\r\n state.trk(handler, detail);\r\n }\r\n },\r\n clr: function (handler) {\r\n var idx = arrIndexOf(detail.h, handler);\r\n if (idx !== -1) {\r\n detail.h[_DYN_SPLICE /* @min:%2esplice */](idx, 1);\r\n }\r\n }\r\n };\r\n // Flag to optimize lookup response time by avoiding additional function calls\r\n var checkDynamic = true;\r\n var isObjectOrArray = false;\r\n function _getProperty() {\r\n if (checkDynamic) {\r\n isObjectOrArray = isObjectOrArray || _canMakeDynamic(_getProperty, state, value);\r\n // Make sure that if it's an object that we make it dynamic\r\n if (value && !value[CFG_HANDLER_LINK] && isObjectOrArray) {\r\n // It doesn't look like it's already dynamic so lets make sure it's converted the object into a dynamic Config as well\r\n value = _makeDynamicObject(state, value, name, \"Converting\");\r\n }\r\n // If it needed to be converted it now has been\r\n checkDynamic = false;\r\n }\r\n // If there is an active handler then add it to the tracking set of handlers\r\n var activeHandler = state.act;\r\n if (activeHandler) {\r\n detail.trk(activeHandler);\r\n }\r\n return value;\r\n }\r\n // Tag this getter as our dynamic property and provide shortcut for notifying a change\r\n _getProperty[state.prop] = {\r\n chng: function () {\r\n state.add(detail);\r\n }\r\n };\r\n function _setProperty(newValue) {\r\n if (value !== newValue) {\r\n if (!!_getProperty[state.ro] && !state.upd) {\r\n // field is marked as readonly so return false\r\n throwInvalidAccess(\"[\" + name + \"] is read-only:\" + dumpObj(theConfig));\r\n }\r\n if (checkDynamic) {\r\n isObjectOrArray = isObjectOrArray || _canMakeDynamic(_getProperty, state, value);\r\n checkDynamic = false;\r\n }\r\n // The value must be a plain object or an array to enforce the reference (in-place updates)\r\n var isReferenced = isObjectOrArray && _getProperty[state.rf];\r\n if (isObjectOrArray) {\r\n // We are about to replace a plain object or an array\r\n if (isReferenced) {\r\n // Reassign the properties from the current value to the same properties from the newValue\r\n // This will set properties not in the newValue to undefined\r\n objForEachKey(value, function (key) {\r\n value[key] = newValue ? newValue[key] : UNDEFINED_VALUE;\r\n });\r\n // Now assign / re-assign value with all of the keys from newValue\r\n try {\r\n objForEachKey(newValue, function (key, theValue) {\r\n _setDynamicProperty(state, value, key, theValue);\r\n });\r\n // Now drop newValue so when we assign value later it keeps the existing reference\r\n newValue = value;\r\n }\r\n catch (e) {\r\n // Unable to convert to dynamic property so just leave as non-dynamic\r\n _throwDynamicError((state.hdlr || {})[_DYN_LOGGER /* @min:%2elogger */], name, \"Assigning\", e);\r\n // Mark as not an object or array so we don't try and do this again\r\n isObjectOrArray = false;\r\n }\r\n }\r\n else if (value && value[CFG_HANDLER_LINK]) {\r\n // As we are replacing the value, if it's already dynamic then we need to notify the listeners\r\n // for every property it has already\r\n objForEachKey(value, function (key) {\r\n // Check if the value is dynamic\r\n var getter = _getOwnPropGetter(value, key);\r\n if (getter) {\r\n // And if it is tell it's listeners that the value has changed\r\n var valueState = getter[state.prop];\r\n valueState && valueState.chng();\r\n }\r\n });\r\n }\r\n }\r\n if (newValue !== value) {\r\n var newIsObjectOrArray = newValue && _canMakeDynamic(_getProperty, state, newValue);\r\n if (!isReferenced && newIsObjectOrArray) {\r\n // As the newValue is an object/array lets preemptively make it dynamic\r\n newValue = _makeDynamicObject(state, newValue, name, \"Converting\");\r\n }\r\n // Now assign the internal \"value\" to the newValue\r\n value = newValue;\r\n isObjectOrArray = newIsObjectOrArray;\r\n }\r\n // Cause any listeners to be scheduled for notification\r\n state.add(detail);\r\n }\r\n }\r\n objDefine(theConfig, detail.n, { g: _getProperty, s: _setProperty });\r\n}\r\nexport function _setDynamicProperty(state, target, name, value) {\r\n if (target) {\r\n // To be a dynamic property it needs to have a get function\r\n var getter = _getOwnPropGetter(target, name);\r\n var isDynamic = getter && !!getter[state.prop];\r\n if (!isDynamic) {\r\n _createDynamicProperty(state, target, name, value);\r\n }\r\n else {\r\n // Looks like it's already dynamic just assign the new value\r\n target[name] = value;\r\n }\r\n }\r\n return target;\r\n}\r\nexport function _setDynamicPropertyState(state, target, name, flags) {\r\n if (target) {\r\n // To be a dynamic property it needs to have a get function\r\n var getter = _getOwnPropGetter(target, name);\r\n var isDynamic = getter && !!getter[state.prop];\r\n var inPlace = flags && flags[0 /* _eSetDynamicPropertyFlags.inPlace */];\r\n var rdOnly = flags && flags[1 /* _eSetDynamicPropertyFlags.readOnly */];\r\n var blkProp = flags && flags[2 /* _eSetDynamicPropertyFlags.blockDynamicProperty */];\r\n if (!isDynamic) {\r\n if (blkProp) {\r\n try {\r\n // Attempt to mark the target as blocked from conversion\r\n blockDynamicConversion(target);\r\n }\r\n catch (e) {\r\n _throwDynamicError((state.hdlr || {})[_DYN_LOGGER /* @min:%2elogger */], name, \"Blocking\", e);\r\n }\r\n }\r\n try {\r\n // Make sure it's dynamic so that we can tag the property as per the state\r\n _setDynamicProperty(state, target, name, target[name]);\r\n getter = _getOwnPropGetter(target, name);\r\n }\r\n catch (e) {\r\n // Unable to convert to dynamic property so just leave as non-dynamic\r\n _throwDynamicError((state.hdlr || {})[_DYN_LOGGER /* @min:%2elogger */], name, \"State\", e);\r\n }\r\n }\r\n // Assign the optional flags if true\r\n if (inPlace) {\r\n getter[state.rf] = inPlace;\r\n }\r\n if (rdOnly) {\r\n getter[state.ro] = rdOnly;\r\n }\r\n if (blkProp) {\r\n getter[state.blkVal] = true;\r\n }\r\n }\r\n return target;\r\n}\r\nexport function _makeDynamicObject(state, target, name, desc) {\r\n try {\r\n // Assign target with new value properties (converting into dynamic properties in the process)\r\n objForEachKey(target, function (key, value) {\r\n // Assign and/or make the property dynamic\r\n _setDynamicProperty(state, target, key, value);\r\n });\r\n if (!target[CFG_HANDLER_LINK]) {\r\n // Link the config back to the dynamic config details\r\n objDefineProp(target, CFG_HANDLER_LINK, {\r\n get: function () {\r\n return state[_DYN_HDLR /* @min:%2ehdlr */];\r\n }\r\n });\r\n _patchArray(state, target, name);\r\n }\r\n }\r\n catch (e) {\r\n // Unable to convert to dynamic property so just leave as non-dynamic\r\n _throwDynamicError((state.hdlr || {})[_DYN_LOGGER /* @min:%2elogger */], name, desc, e);\r\n }\r\n return target;\r\n}\r\n//# sourceMappingURL=DynamicProperty.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { isArray, isPlainObject, objForEachKey, symbolFor, throwTypeError } from \"@nevware21/ts-utils\";\r\nimport { _DYN_LENGTH } from \"../__DynamicConstants\";\r\n// Using Symbol.for so that if the same symbol was already created it would be returned\r\n// To handle multiple instances using potentially different versions we are not using\r\n// createUniqueNamespace()\r\nexport var CFG_HANDLER_LINK = symbolFor(\"[[ai_dynCfg_1]]\");\r\n/**\r\n * @internal\r\n * @ignore\r\n * The symbol to tag objects / arrays with if they should not be converted\r\n */\r\nvar BLOCK_DYNAMIC = symbolFor(\"[[ai_blkDynCfg_1]]\");\r\n/**\r\n * @internal\r\n * @ignore\r\n * The symbol to tag objects to indicate that when included into the configuration that\r\n * they should be converted into a trackable dynamic object.\r\n */\r\nvar FORCE_DYNAMIC = symbolFor(\"[[ai_frcDynCfg_1]]\");\r\nexport function _cfgDeepCopy(source) {\r\n if (source) {\r\n var target_1;\r\n if (isArray(source)) {\r\n target_1 = [];\r\n target_1[_DYN_LENGTH /* @min:%2elength */] = source[_DYN_LENGTH /* @min:%2elength */];\r\n }\r\n else if (isPlainObject(source)) {\r\n target_1 = {};\r\n }\r\n if (target_1) {\r\n // Copying index values by property name as the extensionConfig can be an array or object\r\n objForEachKey(source, function (key, value) {\r\n // Perform a deep copy of the object\r\n target_1[key] = _cfgDeepCopy(value);\r\n });\r\n return target_1;\r\n }\r\n }\r\n return source;\r\n}\r\n/**\r\n * @internal\r\n * Get the dynamic config handler if the value is already dynamic\r\n * @param value\r\n * @returns\r\n */\r\nexport function getDynamicConfigHandler(value) {\r\n if (value) {\r\n var handler = value[CFG_HANDLER_LINK] || value;\r\n if (handler.cfg && (handler.cfg === value || handler.cfg[CFG_HANDLER_LINK] === handler)) {\r\n return handler;\r\n }\r\n }\r\n return null;\r\n}\r\n/**\r\n * Mark the provided value so that if it's included into the configuration it will NOT have\r\n * its properties converted into a dynamic (reactive) object. If the object is not a plain object\r\n * or an array (ie. a class) this function has not affect as only Objects and Arrays are converted\r\n * into dynamic objects in the dynamic configuration.\r\n *\r\n * When you have tagged a value as both {@link forceDynamicConversion} and blocked force will take precedence.\r\n *\r\n * You should only need to use this function, if you are creating dynamic \"classes\" from objects\r\n * which confirm to the require interface. A common case for this is during unit testing where it's\r\n * easier to create mock extensions.\r\n *\r\n * If `value` is falsy (null / undefined / 0 / empty string etc) it will not be tagged and\r\n * if there is an exception adding the property to the value (because its frozen etc) the\r\n * exception will be swallowed\r\n *\r\n * @example\r\n * ```ts\r\n * // This is a valid \"extension\", but it is technically an object\r\n * // So when included in the config.extensions it WILL be cloned and then\r\n * // converted into a dynamic object, where all of its properties will become\r\n * // get/set object properties and will be tracked. While this WILL still\r\n * // function, when attempt to use a mocking framework on top of this the\r\n * // functions are now technically get accessors which return a function\r\n * // and this can cause some mocking frameworks to fail.\r\n * let mockChannel = {\r\n * pause: () => { },\r\n* resume: () => { },\r\n* teardown: () => { },\r\n* flush: (async: any, callBack: any) => { },\r\n* processTelemetry: (env: any) => { },\r\n* setNextPlugin: (next: any) => { },\r\n* initialize: (config: any, core: any, extensions: any) => { },\r\n* identifier: \"testChannel\",\r\n* priority: 1003\r\n* };\r\n * ```\r\n * @param value - The object that you want to block from being converted into a\r\n * trackable dynamic object\r\n * @returns The original value\r\n */\r\nexport function blockDynamicConversion(value) {\r\n if (value && (isPlainObject(value) || isArray(value))) {\r\n try {\r\n value[BLOCK_DYNAMIC] = true;\r\n }\r\n catch (e) {\r\n // Don't throw for this case as it's an ask only\r\n }\r\n }\r\n return value;\r\n}\r\n/**\r\n * This is the reverse case of {@link blockDynamicConversion} in that this will tag an\r\n * object to indicate that it should always be converted into a dynamic trackable object\r\n * even when not an object or array. So all properties of this object will become\r\n * get / set accessor functions.\r\n *\r\n * When you have tagged a value as both {@link forceDynamicConversion} and blocked force will take precedence.\r\n *\r\n * If `value` is falsy (null / undefined / 0 / empty string etc) it will not be tagged and\r\n * if there is an exception adding the property to the value (because its frozen etc) the\r\n * exception will be swallowed.\r\n * @param value - The object that should be tagged and converted if included into a dynamic\r\n * configuration.\r\n * @returns The original value\r\n */\r\nexport function forceDynamicConversion(value) {\r\n if (value) {\r\n try {\r\n value[FORCE_DYNAMIC] = true;\r\n }\r\n catch (e) {\r\n // Don't throw for this case as it's an ask only\r\n }\r\n }\r\n return value;\r\n}\r\n/**\r\n * @internal\r\n * @ignore\r\n * Helper function to check whether an object can or should be converted into a dynamic\r\n * object.\r\n * @param value - The object to check whether it should be converted\r\n * @returns `true` if the value should be converted otherwise `false`.\r\n */\r\nexport function _canMakeDynamic(getFunc, state, value) {\r\n var result = false;\r\n // Object must exist and be truthy\r\n if (value && !getFunc[state.blkVal]) {\r\n // Tagged as always convert\r\n result = value[FORCE_DYNAMIC];\r\n // Check that it's not explicitly tagged as blocked\r\n if (!result && !value[BLOCK_DYNAMIC]) {\r\n // Only convert plain objects or arrays by default\r\n result = isPlainObject(value) || isArray(value);\r\n }\r\n }\r\n return result;\r\n}\r\n/**\r\n * Throws an invalid access exception\r\n * @param message - The message to include in the exception\r\n */\r\nexport function throwInvalidAccess(message) {\r\n throwTypeError(\"InvalidAccess:\" + message);\r\n}\r\n//# sourceMappingURL=DynamicSupport.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { NULL_VALUE, SYMBOL, UNDEF_VALUE } from \"../internal/constants\";\r\nimport { polyGetKnownSymbol, polyNewSymbol, polySymbolFor, polySymbolKeyFor } from \"../polyfills/symbol\";\r\nimport { _wellKnownSymbolMap } from \"./well_known\";\r\nimport { _createIs } from \"../helpers/base\";\r\nimport { _globalLazyTestHooks } from \"../helpers/lazy\";\r\nimport { safeGetLazy } from \"../helpers/safe_lazy\";\r\nimport { lazySafeGetInst } from \"../helpers/environment\";\r\nvar _symbol;\r\nvar _symbolFor;\r\nvar _symbolKeyFor;\r\nfunction _getSymbolValue(name) {\r\n return safeGetLazy(function () {\r\n return (_symbol.v ? _symbol[name] : UNDEF_VALUE);\r\n }, UNDEF_VALUE);\r\n}\r\n/**\r\n * Checks if the type of value is a symbol.\r\n * @group Symbol\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a symbol, false otherwise.\r\n */\r\nexport var isSymbol = _createIs(\"symbol\");\r\n/**\r\n * Helper to identify whether the runtime support the Symbols either via native or an installed polyfill\r\n * @group Symbol\r\n * @returns true if Symbol's are support otherwise false\r\n */\r\nexport function hasSymbol() {\r\n return !!getSymbol();\r\n}\r\n/**\r\n * If Symbols are supported then attempt to return the named Symbol\r\n * @group Symbol\r\n * @returns The value of the named Symbol (if available)\r\n */\r\nexport function getSymbol() {\r\n var resetCache = !_symbol || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_symbol.b);\r\n resetCache && (_symbol = lazySafeGetInst(SYMBOL));\r\n (!_symbolFor || resetCache) && (_symbolFor = _getSymbolValue(\"for\"));\r\n (!_symbolKeyFor || resetCache) && (_symbolKeyFor = _getSymbolValue(\"keyFor\"));\r\n return _symbol.v;\r\n}\r\n/**\r\n * If Symbols are supported then get the property of the global Symbol, if Symbol's are\r\n * not supported and noPoly is true it returns null. Used to access the well known symbols.\r\n * @group Symbol\r\n * @param name - The property name to return (if it exists) for Symbol\r\n * @param noPoly - Flag indicating whether to return a polyfill if symbols are not supported.\r\n * @returns The value of the property if present\r\n * @example\r\n * ```ts\r\n * // If Symbol is supported in the runtime\r\n * getKnownSymbol(\"toStringTag\") === Symbol.toStringTag; // true\r\n * getKnownSymbol(WellKnownSymbols.toStringTag) === Symbol.toStringTag; // true\r\n * ```\r\n */\r\nexport function getKnownSymbol(name, noPoly) {\r\n var knownName = _wellKnownSymbolMap[name];\r\n // Cause lazy symbol to get initialized\r\n (!_symbol || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();\r\n return _symbol.v ? _symbol.v[knownName || name] : (!noPoly ? polyGetKnownSymbol(name) : UNDEF_VALUE);\r\n}\r\n/**\r\n * Returns a new unique Symbol value. If noPoly is true and symbols are not supported\r\n * then this will return null.\r\n * @group Symbol\r\n * @param description Description of the new Symbol object.\r\n * @param noPoly - Flag indicating whether to return a polyfil if symbols are not supported.\r\n * @returns The new symbol\r\n */\r\nexport function newSymbol(description, noPoly) {\r\n // Cause lazy _symbol to get initialized\r\n (!_symbol || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();\r\n return _symbol.v ? _symbol.v(description) : (!noPoly ? polyNewSymbol(description) : NULL_VALUE);\r\n}\r\n/**\r\n * Returns a Symbol object from the global symbol registry matching the given key if found.\r\n * Otherwise, returns a new symbol with this key. This will always return a polyfill if symbols\r\n * are not supported.\r\n * @group Symbol\r\n * @param key key to search for.\r\n */\r\nexport function symbolFor(key) {\r\n // Cause lazy symbol to get initialized\r\n (!_symbolFor || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();\r\n return (_symbolFor.v || polySymbolFor)(key);\r\n}\r\n/**\r\n * Returns a key from the global symbol registry matching the given Symbol if found.\r\n * Otherwise, returns a undefined. This will always attempt to lookup the polyfill\r\n * implementation if symbols are not supported\r\n * @group Symbol\r\n * @param sym Symbol to find the key for.\r\n */\r\nexport function symbolKeyFor(sym) {\r\n // Cause lazy symbol to get initialized\r\n (!_symbolKeyFor || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();\r\n return (_symbolKeyFor.v || polySymbolKeyFor)(sym);\r\n}\r\n//# sourceMappingURL=symbol.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { NULL_VALUE, SYMBOL, UNDEF_VALUE } from \"../internal/constants\";\r\nimport { polyGetKnownSymbol, polyNewSymbol, polySymbolFor, polySymbolKeyFor } from \"../polyfills/symbol\";\r\nimport { WellKnownSymbols, _wellKnownSymbolMap } from \"./well_known\";\r\nimport { _createIs } from \"../helpers/base\";\r\nimport { ILazyValue, _globalLazyTestHooks } from \"../helpers/lazy\";\r\nimport { safeGetLazy } from \"../helpers/safe_lazy\";\r\nimport { lazySafeGetInst } from \"../helpers/environment\";\r\n\r\nlet _symbol: ILazyValue;\r\nlet _symbolFor: ILazyValue<(key: string) => symbol>;\r\nlet _symbolKeyFor: ILazyValue<(sym: symbol) => string | undefined>;\r\n\r\nfunction _getSymbolValue(name: string): ILazyValue {\r\n return safeGetLazy(function() {\r\n return (_symbol.v ? _symbol[name] : UNDEF_VALUE) as T;\r\n }, UNDEF_VALUE);\r\n}\r\n\r\n/**\r\n * Checks if the type of value is a symbol.\r\n * @group Symbol\r\n * @param {any} value - Value to be checked.\r\n * @return {boolean} True if the value is a symbol, false otherwise.\r\n */\r\nexport const isSymbol: (value: any) => value is symbol = _createIs(\"symbol\");\r\n\r\n/**\r\n * Helper to identify whether the runtime support the Symbols either via native or an installed polyfill\r\n * @group Symbol\r\n * @returns true if Symbol's are support otherwise false\r\n */\r\nexport function hasSymbol(): boolean {\r\n return !!getSymbol();\r\n}\r\n\r\n/**\r\n * If Symbols are supported then attempt to return the named Symbol\r\n * @group Symbol\r\n * @returns The value of the named Symbol (if available)\r\n */\r\nexport function getSymbol(): Symbol {\r\n let resetCache = !_symbol || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_symbol.b);\r\n resetCache && (_symbol = lazySafeGetInst(SYMBOL));\r\n (!_symbolFor || resetCache) && (_symbolFor = _getSymbolValue(\"for\"));\r\n (!_symbolKeyFor || resetCache) && (_symbolKeyFor = _getSymbolValue(\"keyFor\"));\r\n \r\n return _symbol.v;\r\n}\r\n\r\n/**\r\n * If Symbols are supported then get the property of the global Symbol, if Symbol's are\r\n * not supported and noPoly is true it returns null. Used to access the well known symbols.\r\n * @group Symbol\r\n * @param name - The property name to return (if it exists) for Symbol\r\n * @param noPoly - Flag indicating whether to return a polyfill if symbols are not supported.\r\n * @returns The value of the property if present\r\n * @example\r\n * ```ts\r\n * // If Symbol is supported in the runtime\r\n * getKnownSymbol(\"toStringTag\") === Symbol.toStringTag; // true\r\n * getKnownSymbol(WellKnownSymbols.toStringTag) === Symbol.toStringTag; // true\r\n * ```\r\n */\r\nexport function getKnownSymbol(name: string | WellKnownSymbols, noPoly?: boolean): T {\r\n let knownName = _wellKnownSymbolMap[name];\r\n // Cause lazy symbol to get initialized\r\n (!_symbol || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();\r\n\r\n return _symbol.v ? _symbol.v[knownName || name] : (!noPoly ? polyGetKnownSymbol(name) : UNDEF_VALUE);\r\n}\r\n\r\n/**\r\n * Returns a new unique Symbol value. If noPoly is true and symbols are not supported\r\n * then this will return null.\r\n * @group Symbol\r\n * @param description Description of the new Symbol object.\r\n * @param noPoly - Flag indicating whether to return a polyfil if symbols are not supported.\r\n * @returns The new symbol\r\n */\r\nexport function newSymbol(description?: string | number, noPoly?: boolean): symbol {\r\n // Cause lazy _symbol to get initialized\r\n (!_symbol || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();\r\n\r\n return _symbol.v ? (_symbol.v as any)(description) : (!noPoly ? polyNewSymbol(description) : NULL_VALUE);\r\n}\r\n\r\n/**\r\n * Returns a Symbol object from the global symbol registry matching the given key if found.\r\n * Otherwise, returns a new symbol with this key. This will always return a polyfill if symbols\r\n * are not supported.\r\n * @group Symbol\r\n * @param key key to search for.\r\n */\r\nexport function symbolFor(key: string): symbol {\r\n // Cause lazy symbol to get initialized\r\n (!_symbolFor || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();\r\n\r\n return (_symbolFor.v || polySymbolFor)(key);\r\n}\r\n\r\n/**\r\n * Returns a key from the global symbol registry matching the given Symbol if found.\r\n * Otherwise, returns a undefined. This will always attempt to lookup the polyfill\r\n * implementation if symbols are not supported\r\n * @group Symbol\r\n * @param sym Symbol to find the key for.\r\n */\r\nexport function symbolKeyFor(sym: symbol): string | undefined {\r\n // Cause lazy symbol to get initialized\r\n (!_symbolKeyFor || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();\r\n\r\n return (_symbolKeyFor.v || polySymbolKeyFor)(sym);\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { _wellKnownSymbolMap } from \"../symbol/well_known\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { POLYFILL_TAG, SYMBOL } from \"../internal/constants\";\r\nimport { objHasOwn } from \"../object/has_own\";\r\nimport { asString } from \"../string/as_string\";\r\nimport { _getGlobalConfig } from \"../internal/global\";\r\nimport { strStartsWith } from \"../string/starts_with\";\r\nvar _polySymbols;\r\nfunction _globalSymbolRegistry() {\r\n if (!_polySymbols) {\r\n var gblCfg = _getGlobalConfig();\r\n _polySymbols = gblCfg.gblSym = gblCfg.gblSym || { k: {}, s: {} };\r\n }\r\n return _polySymbols;\r\n}\r\nvar _wellKnownSymbolCache = {};\r\n/**\r\n * Returns a new (polyfill) Symbol object for the provided description that's guaranteed to be unique.\r\n * Symbols are often used to add unique property keys to an object that won't collide with keys any\r\n * other code might add to the object, and which are hidden from any mechanisms other code will\r\n * typically use to access the object. That enables a form of weak encapsulation, or a weak form of\r\n * information hiding.\r\n * @group Polyfill\r\n * @group Symbol\r\n * @param description - The description of the symbol\r\n * @returns A new polyfill version of a Symbol object\r\n */\r\nexport function polyNewSymbol(description) {\r\n var theSymbol = {\r\n description: asString(description),\r\n toString: function () { return SYMBOL + \"(\" + description + \")\"; }\r\n };\r\n // Tag the symbol so we know it a polyfill\r\n theSymbol[POLYFILL_TAG] = true;\r\n return theSymbol;\r\n}\r\n/**\r\n * Returns a Symbol object from the global symbol registry matching the given key if found.\r\n * Otherwise, returns a new symbol with this key.\r\n * @group Polyfill\r\n * @group Symbol\r\n * @param key key to search for.\r\n */\r\nexport function polySymbolFor(key) {\r\n var registry = _globalSymbolRegistry();\r\n if (!objHasOwn(registry, key)) {\r\n var newSymbol = polyNewSymbol(key);\r\n registry.k[key] = newSymbol;\r\n registry.s[newSymbol] = asString(key);\r\n }\r\n return registry.k[key];\r\n}\r\n/**\r\n * Returns a key from the global symbol registry matching the given Symbol if found.\r\n * Otherwise, returns a undefined.\r\n * @group Polyfill\r\n * @group Symbol\r\n * @param sym Symbol to find the key for.\r\n */\r\nexport function polySymbolKeyFor(sym) {\r\n if (!sym || !sym.toString || !strStartsWith(sym.toString(), SYMBOL)) {\r\n throwTypeError(sym + \" is not a symbol\");\r\n }\r\n return _globalSymbolRegistry().s[sym];\r\n}\r\n/**\r\n * Returns the polyfill version of a well-known global symbol, this will only return\r\n * known values.\r\n * @example\r\n * ```ts\r\n * // Always returns the polyfill version, even if Symbols are supported in the runtime\r\n * polyGetKnownSymbol(\"toStringTag\") === polyGetKnownSymbol(\"toStringTag\"); // true\r\n * polyGetKnownSymbol(WellKnownSymbols.toStringTag) === polyGetKnownSymbol(\"toStringTag\"); // true\r\n * polyGetKnownSymbol(\"toStringTag\") !== Symbol.toStringTag; // true\r\n * polyGetKnownSymbol(WellKnownSymbols.toStringTag) !== Symbol.toStringTag; // true\r\n * polyGetKnownSymbol(\"toStringTag\") !== polySymbolFor(\"toStringTag\"); // true\r\n * polyGetKnownSymbol(WellKnownSymbols.toStringTag) !== polySymbolFor(\"toStringTag\"); // true\r\n * polyGetKnownSymbol(\"toStringTag\") !== polyNewSymbol(\"toStringTag\"); // true\r\n * polyGetKnownSymbol(WellKnownSymbols.toStringTag) !== polyNewSymbol(\"toStringTag\"); // true\r\n * ```\r\n * @group Polyfill\r\n * @group Symbol\r\n * @param name - The property name to return (if it exists) for Symbol\r\n * @returns The value of the property if present\r\n */\r\nexport function polyGetKnownSymbol(name) {\r\n var result;\r\n var knownName = _wellKnownSymbolMap[name];\r\n if (knownName) {\r\n result = _wellKnownSymbolCache[knownName] = _wellKnownSymbolCache[knownName] || polyNewSymbol(SYMBOL + \".\" + knownName);\r\n }\r\n return result;\r\n}\r\n//# sourceMappingURL=symbol.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { WellKnownSymbols, _wellKnownSymbolMap } from \"../symbol/well_known\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { POLYFILL_TAG, SYMBOL } from \"../internal/constants\";\r\nimport { objHasOwn } from \"../object/has_own\";\r\nimport { asString } from \"../string/as_string\";\r\nimport { _GlobalPolySymbols, _getGlobalConfig } from \"../internal/global\";\r\nimport { strStartsWith } from \"../string/starts_with\";\r\n\r\nlet _polySymbols: _GlobalPolySymbols;\r\n\r\nfunction _globalSymbolRegistry(): _GlobalPolySymbols {\r\n if (!_polySymbols) {\r\n let gblCfg = _getGlobalConfig();\r\n _polySymbols = gblCfg.gblSym = gblCfg.gblSym || { k: {}, s:{} };\r\n }\r\n\r\n return _polySymbols;\r\n}\r\n\r\nlet _wellKnownSymbolCache: { [key in keyof typeof WellKnownSymbols ]: symbol } = {} as any;\r\n\r\n/**\r\n * Returns a new (polyfill) Symbol object for the provided description that's guaranteed to be unique.\r\n * Symbols are often used to add unique property keys to an object that won't collide with keys any\r\n * other code might add to the object, and which are hidden from any mechanisms other code will\r\n * typically use to access the object. That enables a form of weak encapsulation, or a weak form of\r\n * information hiding.\r\n * @group Polyfill\r\n * @group Symbol\r\n * @param description - The description of the symbol\r\n * @returns A new polyfill version of a Symbol object\r\n */\r\nexport function polyNewSymbol(description?: string | number): symbol {\r\n let theSymbol: symbol = {\r\n description: asString(description),\r\n toString: () => SYMBOL + \"(\" + description + \")\"\r\n } as symbol;\r\n\r\n // Tag the symbol so we know it a polyfill\r\n theSymbol[POLYFILL_TAG] = true;\r\n\r\n return theSymbol;\r\n}\r\n\r\n/**\r\n * Returns a Symbol object from the global symbol registry matching the given key if found.\r\n * Otherwise, returns a new symbol with this key.\r\n * @group Polyfill\r\n * @group Symbol\r\n * @param key key to search for.\r\n */\r\nexport function polySymbolFor(key: string): symbol {\r\n let registry = _globalSymbolRegistry();\r\n if (!objHasOwn(registry, key)) {\r\n let newSymbol = polyNewSymbol(key);\r\n registry.k[key] = newSymbol;\r\n registry.s[newSymbol] = asString(key);\r\n }\r\n\r\n return registry.k[key];\r\n}\r\n\r\n/**\r\n * Returns a key from the global symbol registry matching the given Symbol if found.\r\n * Otherwise, returns a undefined.\r\n * @group Polyfill\r\n * @group Symbol\r\n * @param sym Symbol to find the key for.\r\n */\r\nexport function polySymbolKeyFor(sym: symbol): string | undefined {\r\n if (!sym || !sym.toString || !strStartsWith(sym.toString(), SYMBOL)) {\r\n throwTypeError((sym as any) + \" is not a symbol\");\r\n }\r\n\r\n return _globalSymbolRegistry().s[sym];\r\n}\r\n\r\n/**\r\n * Returns the polyfill version of a well-known global symbol, this will only return\r\n * known values.\r\n * @example\r\n * ```ts\r\n * // Always returns the polyfill version, even if Symbols are supported in the runtime\r\n * polyGetKnownSymbol(\"toStringTag\") === polyGetKnownSymbol(\"toStringTag\"); // true\r\n * polyGetKnownSymbol(WellKnownSymbols.toStringTag) === polyGetKnownSymbol(\"toStringTag\"); // true\r\n * polyGetKnownSymbol(\"toStringTag\") !== Symbol.toStringTag; // true\r\n * polyGetKnownSymbol(WellKnownSymbols.toStringTag) !== Symbol.toStringTag; // true\r\n * polyGetKnownSymbol(\"toStringTag\") !== polySymbolFor(\"toStringTag\"); // true\r\n * polyGetKnownSymbol(WellKnownSymbols.toStringTag) !== polySymbolFor(\"toStringTag\"); // true\r\n * polyGetKnownSymbol(\"toStringTag\") !== polyNewSymbol(\"toStringTag\"); // true\r\n * polyGetKnownSymbol(WellKnownSymbols.toStringTag) !== polyNewSymbol(\"toStringTag\"); // true\r\n * ```\r\n * @group Polyfill\r\n * @group Symbol\r\n * @param name - The property name to return (if it exists) for Symbol\r\n * @returns The value of the property if present\r\n */\r\nexport function polyGetKnownSymbol(name: string | WellKnownSymbols): symbol {\r\n let result: symbol;\r\n let knownName = _wellKnownSymbolMap[name];\r\n if (knownName) {\r\n result = _wellKnownSymbolCache[knownName] = _wellKnownSymbolCache[knownName] || polyNewSymbol(SYMBOL + \".\" + knownName);\r\n }\r\n\r\n return result\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { createEnumKeyMap } from \"../helpers/enum\";\r\n/**\r\n * @ignore\r\n * @internal\r\n */\r\nexport var _wellKnownSymbolMap = createEnumKeyMap({\r\n asyncIterator: 0 /* WellKnownSymbols.asyncIterator */,\r\n hasInstance: 1 /* WellKnownSymbols.hasInstance */,\r\n isConcatSpreadable: 2 /* WellKnownSymbols.isConcatSpreadable */,\r\n iterator: 3 /* WellKnownSymbols.iterator */,\r\n match: 4 /* WellKnownSymbols.match */,\r\n matchAll: 5 /* WellKnownSymbols.matchAll */,\r\n replace: 6 /* WellKnownSymbols.replace */,\r\n search: 7 /* WellKnownSymbols.search */,\r\n species: 8 /* WellKnownSymbols.species */,\r\n split: 9 /* WellKnownSymbols.split */,\r\n toPrimitive: 10 /* WellKnownSymbols.toPrimitive */,\r\n toStringTag: 11 /* WellKnownSymbols.toStringTag */,\r\n unscopables: 12 /* WellKnownSymbols.unscopables */\r\n});\r\n//# sourceMappingURL=well_known.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { createEnumKeyMap } from \"../helpers/enum\";\r\n\r\n/**\r\n * Identifies the Symbol static properties which are symbols themselves as a constant\r\n * enum to aid in minification when fetching them from the global symbol implementation.\r\n *\r\n * See: [Well Known Symbols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#well-known_symbols)\r\n * @group Symbol\r\n */\r\nexport const enum WellKnownSymbols {\r\n /**\r\n * The Symbol.asyncIterator symbol is a builtin symbol that is used to access an\r\n * object's @@asyncIterator method. In order for an object to be async iterable,\r\n * it must have a Symbol.asyncIterator key.\r\n *\r\n * See: [Symbol.asyncIterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator)\r\n */\r\n asyncIterator = 0,\r\n\r\n /**\r\n * The Symbol.hasInstance well-known symbol is used to determine if a constructor\r\n * object recognizes an object as its instance. The instanceof operator's behavior\r\n * can be customized by this symbol.\r\n *\r\n * See: [Symbol.hasInstance](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance)\r\n */\r\n hasInstance = 1,\r\n\r\n /**\r\n * The @@isConcatSpreadable symbol (Symbol.isConcatSpreadable) can be defined as an\r\n * own or inherited property and its value is a boolean. It can control behavior for\r\n * arrays and array-like objects:\r\n * - For array objects, the default behavior is to spread (flatten) elements.\r\n * Symbol.isConcatSpreadable can avoid flattening in these cases.\r\n * - For array-like objects, the default behavior is no spreading or flattening.\r\n * Symbol.isConcatSpreadable can force flattening in these cases.\r\n *\r\n * See: [Symbol.isConcatSpreadable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/isConcatSpreadable)\r\n */\r\n isConcatSpreadable = 2,\r\n\r\n /**\r\n * Whenever an object needs to be iterated (such as at the beginning of a for..of loop),\r\n * its @@iterator method is called with no arguments, and the returned iterator is used\r\n * to obtain the values to be iterated.\r\n *\r\n * See: [Symbol.iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/iterator)\r\n */\r\n iterator = 3,\r\n\r\n /**\r\n * This function is also used to identify if objects have the behavior of regular expressions.\r\n * For example, the methods String.prototype.startsWith(), String.prototype.endsWith() and\r\n * String.prototype.includes(), check if their first argument is a regular expression and\r\n * will throw a TypeError if they are. Now, if the match symbol is set to false (or a Falsy\r\n * value), it indicates that the object is not intended to be used as a regular expression object.\r\n *\r\n * See: [Symbol.match](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/match)\r\n */\r\n match = 4,\r\n\r\n /**\r\n * The Symbol.matchAll well-known symbol returns an iterator, that yields matches of the regular\r\n * expression against a string. This function is called by the String.prototype.matchAll() method.\r\n *\r\n * See: [Symbol.matchAll](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/matchAll)\r\n */\r\n matchAll = 5,\r\n\r\n /**\r\n * The Symbol.replace well-known symbol specifies the method that replaces matched substrings\r\n * of a string. This function is called by the String.prototype.replace() method.\r\n *\r\n * For more information, [RegExp.prototype[@@replace]](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace)()\r\n * and [String.prototype.replace](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replace)().\r\n *\r\n * See: [Symbol.replace](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/replace)\r\n */\r\n replace = 6,\r\n\r\n /**\r\n * The Symbol.search well-known symbol specifies the method that returns the index within a\r\n * string that matches the regular expression. This function is called by the\r\n * [String.prototype.search()](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/search)\r\n * method.\r\n *\r\n * For more information, see [RegExp.prototype[@@search]](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search)()\r\n * and [String.prototype.search()](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/search).\r\n *\r\n * See: [Symbol.species](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/species)\r\n */\r\n search = 7,\r\n\r\n /**\r\n * The well-known symbol Symbol.species specifies a function-valued property that the constructor\r\n * function uses to create derived objects.\r\n * See: [Symbol.species](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/species)\r\n */\r\n species = 8,\r\n\r\n /**\r\n * The Symbol.split well-known symbol specifies the method that splits a string at the indices\r\n * that match a regular expression. This function is called by the String.prototype.split() method.\r\n *\r\n * For more information, see [RegExp.prototype[@@split]](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@split)()\r\n * and [String.prototype.split()](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/split).\r\n * See: [Symbol.split](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/split)\r\n */\r\n split = 9,\r\n\r\n /**\r\n * With the help of the Symbol.toPrimitive property (used as a function value), an object can be\r\n * converted to a primitive value. The function is called with a string argument hint, which\r\n * specifies the preferred type of the result primitive value. The hint argument can be one of\r\n * \"number\", \"string\", and \"default\".\r\n *\r\n * See: [Symbol.toPrimitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toPrimitive)\r\n */\r\n toPrimitive = 10,\r\n\r\n /**\r\n * The Symbol.toStringTag well-known symbol is a string valued property that is used in the\r\n * creation of the default string description of an object. It is accessed internally by the\r\n * [Object.prototype.toString](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/toString)()\r\n * method.\r\n *\r\n * See: [Symbol.toStringTag](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)\r\n */\r\n toStringTag = 11,\r\n\r\n /**\r\n * The Symbol.unscopables well-known symbol is used to specify an object value of whose own\r\n * and inherited property names are excluded from the with environment bindings of the associated\r\n * object.\r\n *\r\n * See: [Symbol.unscopables](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables)\r\n */\r\n unscopables = 12\r\n}\r\n\r\n/**\r\n * @ignore\r\n * @internal\r\n */\r\nexport const _wellKnownSymbolMap = createEnumKeyMap({\r\n asyncIterator: WellKnownSymbols.asyncIterator,\r\n hasInstance: WellKnownSymbols.hasInstance,\r\n isConcatSpreadable: WellKnownSymbols.isConcatSpreadable,\r\n iterator: WellKnownSymbols.iterator,\r\n match: WellKnownSymbols.match,\r\n matchAll: WellKnownSymbols.matchAll,\r\n replace: WellKnownSymbols.replace,\r\n search: WellKnownSymbols.search,\r\n species: WellKnownSymbols.species,\r\n split: WellKnownSymbols.split,\r\n toPrimitive: WellKnownSymbols.toPrimitive,\r\n toStringTag: WellKnownSymbols.toStringTag,\r\n unscopables: WellKnownSymbols.unscopables\r\n});\r\n\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { isString } from \"../helpers/base\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { LENGTH, StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunctionWithPoly } from \"../internal/unwrapFunction\";\r\nimport { asString } from \"./as_string\";\r\nimport { strSubstring } from \"./substring\";\r\n/**\r\n * This method lets you determine whether or not a string begins with another string. This method is case-sensitive.\r\n * @group String\r\n * @param value - The value to be checked\r\n * @param searchString - The characters to be searched for at the start of the string\r\n * @param position - [Optional] The position in this string at which to begin searching for `searchString`.\r\n * Defaults to 0\r\n * @returns `true` if the given characters are found at the beginning of the string; otherwise, `false`.\r\n */\r\nexport var strStartsWith = _unwrapFunctionWithPoly(\"startsWith\", StrProto, polyStrStartsWith);\r\n/**\r\n * This method lets you determine whether or not a string begins with another string. This method is case-sensitive.\r\n * @group Polyfill\r\n * @group String\r\n * @param value - The value to be checked\r\n * @param searchString - The characters to be searched for at the start of the string\r\n * @param position - [Optional] The position in this string at which to begin searching for `searchString`.\r\n * Defaults to 0\r\n * @returns `true` if the given characters are found at the beginning of the string; otherwise, `false`.\r\n */\r\nexport function polyStrStartsWith(value, searchString, position) {\r\n if (!isString(value)) {\r\n throwTypeError(\"'\" + dumpObj(value) + \"' is not a string\");\r\n }\r\n var searchValue = isString(searchString) ? searchString : asString(searchString);\r\n var chkLen = searchValue[LENGTH];\r\n var pos = position > 0 ? position : 0;\r\n return strSubstring(value, pos, pos + chkLen) === searchValue;\r\n}\r\n//# sourceMappingURL=starts_with.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { isString } from \"../helpers/base\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { LENGTH, StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunctionWithPoly } from \"../internal/unwrapFunction\";\r\nimport { asString } from \"./as_string\";\r\nimport { strSubstring } from \"./substring\";\r\n\r\n/**\r\n * This method lets you determine whether or not a string begins with another string. This method is case-sensitive.\r\n * @group String\r\n * @param value - The value to be checked\r\n * @param searchString - The characters to be searched for at the start of the string\r\n * @param position - [Optional] The position in this string at which to begin searching for `searchString`.\r\n * Defaults to 0\r\n * @returns `true` if the given characters are found at the beginning of the string; otherwise, `false`.\r\n */\r\nexport const strStartsWith: (value: string, searchString: string, length?: number) => boolean = _unwrapFunctionWithPoly(\"startsWith\", StrProto, polyStrStartsWith);\r\n\r\n/**\r\n * This method lets you determine whether or not a string begins with another string. This method is case-sensitive.\r\n * @group Polyfill\r\n * @group String\r\n * @param value - The value to be checked\r\n * @param searchString - The characters to be searched for at the start of the string\r\n * @param position - [Optional] The position in this string at which to begin searching for `searchString`.\r\n * Defaults to 0\r\n * @returns `true` if the given characters are found at the beginning of the string; otherwise, `false`.\r\n */\r\nexport function polyStrStartsWith(value: string, searchString: string, position?: number): boolean {\r\n if (!isString(value)) {\r\n throwTypeError(\"'\" + dumpObj(value) + \"' is not a string\");\r\n }\r\n let searchValue = isString(searchString) ? searchString : asString(searchString);\r\n let chkLen = searchValue[LENGTH];\r\n let pos = position > 0 ? position : 0;\r\n\r\n return strSubstring(value, pos, pos + chkLen) === searchValue;\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrForEach, arrIndexOf, dumpObj, newSymbol, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { throwAggregationError } from \"../JavaScriptSDK/AggregationError\";\r\nimport { _DYN_BLK_VAL, _DYN_CANCEL, _DYN_HDLR, _DYN_LENGTH, _DYN_LOGGER, _DYN_NOTIFY, _DYN_PUSH, _DYN_RD_ONLY, _DYN_SET_DF, _DYN_THROW_INTERNAL } from \"../__DynamicConstants\";\r\nvar symPrefix = \"[[ai_\";\r\nvar symPostfix = \"]]\";\r\nexport function _createState(cfgHandler) {\r\n var _a;\r\n var dynamicPropertySymbol = newSymbol(symPrefix + \"get\" + cfgHandler.uid + symPostfix);\r\n var dynamicPropertyReadOnly = newSymbol(symPrefix + \"ro\" + cfgHandler.uid + symPostfix);\r\n var dynamicPropertyReferenced = newSymbol(symPrefix + \"rf\" + cfgHandler.uid + symPostfix);\r\n var dynamicPropertyBlockValue = newSymbol(symPrefix + \"blkVal\" + cfgHandler.uid + symPostfix);\r\n var dynamicPropertyDetail = newSymbol(symPrefix + \"dtl\" + cfgHandler.uid + symPostfix);\r\n var _waitingHandlers = null;\r\n var _watcherTimer = null;\r\n var theState;\r\n function _useHandler(activeHandler, callback) {\r\n var prevWatcher = theState.act;\r\n try {\r\n theState.act = activeHandler;\r\n if (activeHandler && activeHandler[dynamicPropertyDetail]) {\r\n // Clear out the previously tracked details for this handler, so that access are re-evaluated\r\n arrForEach(activeHandler[dynamicPropertyDetail], function (detail) {\r\n detail.clr(activeHandler);\r\n });\r\n activeHandler[dynamicPropertyDetail] = [];\r\n }\r\n callback({\r\n cfg: cfgHandler.cfg,\r\n set: cfgHandler.set.bind(cfgHandler),\r\n setDf: cfgHandler[_DYN_SET_DF /* @min:%2esetDf */].bind(cfgHandler),\r\n ref: cfgHandler.ref.bind(cfgHandler),\r\n rdOnly: cfgHandler[_DYN_RD_ONLY /* @min:%2erdOnly */].bind(cfgHandler)\r\n });\r\n }\r\n catch (e) {\r\n var logger = cfgHandler[_DYN_LOGGER /* @min:%2elogger */];\r\n if (logger) {\r\n // Don't let one individual failure break everyone\r\n logger[_DYN_THROW_INTERNAL /* @min:%2ethrowInternal */](1 /* eLoggingSeverity.CRITICAL */, 107 /* _eInternalMessageId.ConfigWatcherException */, dumpObj(e));\r\n }\r\n // Re-throw the exception so that any true \"error\" is reported back to the called\r\n throw e;\r\n }\r\n finally {\r\n theState.act = prevWatcher || null;\r\n }\r\n }\r\n function _notifyWatchers() {\r\n if (_waitingHandlers) {\r\n var notifyHandlers = _waitingHandlers;\r\n _waitingHandlers = null;\r\n // Stop any timer as we are running them now anyway\r\n _watcherTimer && _watcherTimer[_DYN_CANCEL /* @min:%2ecancel */]();\r\n _watcherTimer = null;\r\n var watcherFailures_1 = [];\r\n // Now run the handlers\r\n arrForEach(notifyHandlers, function (handler) {\r\n if (handler) {\r\n if (handler[dynamicPropertyDetail]) {\r\n arrForEach(handler[dynamicPropertyDetail], function (detail) {\r\n // Clear out this handler from previously tracked details, so that access are re-evaluated\r\n detail.clr(handler);\r\n });\r\n handler[dynamicPropertyDetail] = null;\r\n }\r\n // The handler may have self removed as part of another handler so re-check\r\n if (handler.fn) {\r\n try {\r\n _useHandler(handler, handler.fn);\r\n }\r\n catch (e) {\r\n // Don't let a single failing watcher cause other watches to fail\r\n watcherFailures_1[_DYN_PUSH /* @min:%2epush */](e);\r\n }\r\n }\r\n }\r\n });\r\n // During notification we may have had additional updates -- so notify those updates as well\r\n if (_waitingHandlers) {\r\n try {\r\n _notifyWatchers();\r\n }\r\n catch (e) {\r\n watcherFailures_1[_DYN_PUSH /* @min:%2epush */](e);\r\n }\r\n }\r\n if (watcherFailures_1[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n throwAggregationError(\"Watcher error(s): \", watcherFailures_1);\r\n }\r\n }\r\n }\r\n function _addWatcher(detail) {\r\n if (detail && detail.h[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n if (!_waitingHandlers) {\r\n _waitingHandlers = [];\r\n }\r\n if (!_watcherTimer) {\r\n _watcherTimer = scheduleTimeout(function () {\r\n _watcherTimer = null;\r\n _notifyWatchers();\r\n }, 0);\r\n }\r\n // Add all of the handlers for this detail (if not already present) - using normal for-loop for performance\r\n for (var idx = 0; idx < detail.h[_DYN_LENGTH /* @min:%2elength */]; idx++) {\r\n var handler = detail.h[idx];\r\n // Add this handler to the collection of handlers to re-execute\r\n if (handler && arrIndexOf(_waitingHandlers, handler) === -1) {\r\n _waitingHandlers[_DYN_PUSH /* @min:%2epush */](handler);\r\n }\r\n }\r\n }\r\n }\r\n function _trackHandler(handler, detail) {\r\n if (handler) {\r\n var details = handler[dynamicPropertyDetail] = handler[dynamicPropertyDetail] || [];\r\n if (arrIndexOf(details, detail) === -1) {\r\n // If this detail is not already listed as tracked then add it so that we re-evaluate it's usage\r\n details[_DYN_PUSH /* @min:%2epush */](detail);\r\n }\r\n }\r\n }\r\n theState = (_a = {\r\n prop: dynamicPropertySymbol,\r\n ro: dynamicPropertyReadOnly,\r\n rf: dynamicPropertyReferenced\r\n },\r\n _a[_DYN_BLK_VAL /* @min:blkVal */] = dynamicPropertyBlockValue,\r\n _a[_DYN_HDLR /* @min:hdlr */] = cfgHandler,\r\n _a.add = _addWatcher,\r\n _a[_DYN_NOTIFY /* @min:notify */] = _notifyWatchers,\r\n _a.use = _useHandler,\r\n _a.trk = _trackHandler,\r\n _a);\r\n return theState;\r\n}\r\n//# sourceMappingURL=DynamicState.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { arrSlice } from \"../array/slice\";\r\nimport { fnApply } from \"../funcs/fnApply\";\r\nimport { isArray } from \"../helpers/base\";\r\nimport { UNDEF_VALUE } from \"../internal/constants\";\r\nimport { _createTimerHandler } from \"./handler\";\r\nfunction _createTimeoutWith(self, startTimer, overrideFn, theArgs) {\r\n var isArr = isArray(overrideFn);\r\n var len = isArr ? overrideFn.length : 0;\r\n var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;\r\n var clearFn = (len > 1 ? overrideFn[1] : UNDEF_VALUE) || clearTimeout;\r\n var timerFn = theArgs[0];\r\n theArgs[0] = function () {\r\n handler.dn();\r\n fnApply(timerFn, self, arrSlice(arguments));\r\n };\r\n var handler = _createTimerHandler(startTimer, function (timerId) {\r\n if (timerId) {\r\n if (timerId.refresh) {\r\n timerId.refresh();\r\n return timerId;\r\n }\r\n fnApply(clearFn, self, [timerId]);\r\n }\r\n return fnApply(setFn, self, theArgs);\r\n }, function (timerId) {\r\n fnApply(clearFn, self, [timerId]);\r\n });\r\n return handler.h;\r\n}\r\nexport function scheduleTimeout(callback, timeout) {\r\n return _createTimeoutWith(this, true, UNDEF_VALUE, arrSlice(arguments));\r\n}\r\nexport function scheduleTimeoutWith(overrideFn, callback, timeout) {\r\n return _createTimeoutWith(this, true, overrideFn, arrSlice(arguments, 1));\r\n}\r\nexport function createTimeout(callback, timeout) {\r\n return _createTimeoutWith(this, false, UNDEF_VALUE, arrSlice(arguments));\r\n}\r\nexport function createTimeoutWith(overrideFn, callback, timeout) {\r\n return _createTimeoutWith(this, false, overrideFn, arrSlice(arguments, 1));\r\n}\r\n//# sourceMappingURL=timeout.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { arrSlice } from \"../array/slice\";\r\nimport { fnApply } from \"../funcs/fnApply\";\r\nimport { isArray } from \"../helpers/base\";\r\nimport { UNDEF_VALUE } from \"../internal/constants\";\r\nimport { ITimerHandler, _createTimerHandler } from \"./handler\";\r\n\r\nfunction _createTimeoutWith(self: any, startTimer: boolean, overrideFn: TimeoutOverrideFn | TimeoutOverrideFuncs, theArgs: any[]): ITimerHandler {\r\n let isArr = isArray(overrideFn);\r\n let len = isArr ? overrideFn.length : 0;\r\n let setFn: TimeoutOverrideFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;\r\n let clearFn: ClearTimeoutOverrideFn = (len > 1 ? overrideFn[1] : UNDEF_VALUE) || clearTimeout;\r\n\r\n let timerFn = theArgs[0];\r\n theArgs[0] = function () {\r\n handler.dn();\r\n fnApply(timerFn, self, arrSlice(arguments));\r\n };\r\n \r\n let handler = _createTimerHandler(startTimer, (timerId?: any) => {\r\n if (timerId) {\r\n if (timerId.refresh) {\r\n timerId.refresh();\r\n return timerId;\r\n }\r\n\r\n fnApply(clearFn, self, [ timerId ]);\r\n }\r\n\r\n return fnApply(setFn, self, theArgs);\r\n }, function (timerId: any) {\r\n fnApply(clearFn, self, [ timerId ]);\r\n });\r\n\r\n return handler.h;\r\n}\r\n\r\n/**\r\n * The signature of the override timeout function used to create a new timeout instance, it follows the same signature as\r\n * the native `setTimeout` API.\r\n * @since 0.4.4\r\n * @group Timer\r\n * @param callback - A function to be executed after the timer expires.\r\n * @param ms - The time, in milliseconds that the timer should wait before the specified function or code is executed.\r\n * If this parameter is omitted, a value of 0 is used, meaning execute \"immediately\", or more accurately, the next event cycle.\r\n * @param args - Additional arguments which are passed through to the function specified by callback.\r\n * @return The returned timeoutID is a positive integer value which identifies the timer created by the call to setTimeout().\r\n * This value can be passed to clearTimeout() to cancel the timeout.\r\n */\r\nexport type TimeoutOverrideFn = (callback: (...args: TArgs) => void, ms?: number, ...args: TArgs) => number | any;\r\n\r\n/**\r\n * The signatire of the function to override clearing a previous timeout created with the {@link TimeoutOverrideFn}, it will be passed\r\n * the result returned from the {@link TimeoutOverrideFn} call.\r\n * @since 0.4.5\r\n * @group Timer\r\n * @param timeoutId - The value returned from the previous {@link TimeoutOverrideFn}.\r\n */\r\nexport type ClearTimeoutOverrideFn = (timeoutId: number | any) => void;\r\n\r\n/**\r\n * Defines the array signature used to pass the override set and clean functions for creating a timeout.\r\n * The first index [0] is the set function to be used and the second index [1] is the clear function to be used.\r\n * @since 0.4.5\r\n * @group Timer\r\n */\r\nexport type TimeoutOverrideFuncs = [ TimeoutOverrideFn | null, ClearTimeoutOverrideFn | null ];\r\n\r\n/**\r\n * Creates and starts a timer which executes a function or specified piece of code once the timer expires, this is simular\r\n * to using `setTimeout` but provides a return object for cancelling and restarting (refresh) the timer.\r\n *\r\n * The timer may be cancelled (cleared) by calling the `cancel()` function on the returned {@link ITimerHandler}, or\r\n * you can \"reschedule\" and/or \"restart\" the timer by calling the `refresh()` function on the returned {@link ITimerHandler}\r\n * instance\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @param callback - The function to be executed after the timer expires.\r\n * @param timeout - The time, in milliseconds that the timer should wait before the specified\r\n * function or code is executed. If this parameter is omitted, a value of 0 is used, meaning\r\n * execute \"immediately\", or more accurately, the next event cycle.\r\n * @param args - Additional arguments which are passed through to the function specified by `callback`.\r\n * @returns A {@link ITimerHandler} instance which can be used to cancel the timeout.\r\n * @example\r\n * ```ts\r\n * let timeoutCalled = false;\r\n * let theTimeout = scheduleTimeout(() => {\r\n * // This callback will be called after 100ms as this uses setTimeout()\r\n * timeoutCalled = true;\r\n * }, 100);\r\n *\r\n * // Instead of calling clearTimeout() with the returned value from setTimeout() the returned\r\n * // handler instance can be used instead to cancel the timer\r\n * theTimeout.cancel();\r\n * theTimeout.enabled; // false\r\n *\r\n * // You can start the timer via enabled\r\n * theTimeout.enabled = true;\r\n *\r\n * // You can also \"restart\" the timer, whether it has previously triggered not not via the `refresh()`\r\n * theTimeout.refresh();\r\n * ```\r\n */\r\nexport function scheduleTimeout(callback: (...args: A) => void, timeout: number, ...args: A): ITimerHandler;\r\nexport function scheduleTimeout(callback: (...args: A) => void, timeout: number): ITimerHandler {\r\n return _createTimeoutWith(this, true, UNDEF_VALUE, arrSlice(arguments));\r\n}\r\n\r\n/**\r\n * Creates and starts a timer which executes a function or specified piece of code once the timer expires. The overrideFn will be\r\n * used to create the timer, this is simular to using `setTimeout` but provides a return object for cancelling and restarting\r\n * (refresh) the timer.\r\n *\r\n * The timer may be cancelled (cleared) by calling the `cancel()` function on the returned {@link ITimerHandler}, or\r\n * you can \"reschedule\" and/or \"restart\" the timer by calling the `refresh()` function on the returned {@link ITimerHandler}\r\n * instance\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @param overrideFn - setTimeout override function this will be called instead of the `setTimeout`, if the value\r\n * of `overrideFn` is null or undefined it will revert back to the native `setTimeout`. May also be an array with contains\r\n * both the setTimeout and clearTimeout override functions, if either is not provided the default native functions will be used\r\n * @param callback - The function to be executed after the timer expires.\r\n * @param timeout - The time, in milliseconds that the timer should wait before the specified\r\n * function or code is executed. If this parameter is omitted, a value of 0 is used, meaning\r\n * execute \"immediately\", or more accurately, the next event cycle.\r\n * @param args - Additional arguments which are passed through to the function specified by `callback`.\r\n * @returns A {@link ITimerHandler} instance which can be used to cancel the timeout.\r\n * @example\r\n * ```ts\r\n * let timeoutCalled = false;\r\n * // Your own \"setTimeout\" implementation to allow you to perform additional operations or possible wrap\r\n * // the callback to add timings.\r\n * function newSetTimeoutFn(callback: TimeoutOverrideFn) {\r\n * overrideCalled ++;\r\n * return setTimeout(callback, timeout);\r\n * }\r\n *\r\n * let theTimeout = scheduleTimeoutWith(newSetTimeoutFn, () => {\r\n * // This callback will be called after 100ms as this uses setTimeout()\r\n * timeoutCalled = true;\r\n * }, 100);\r\n *\r\n * // Instead of calling clearTimeout() with the returned value from setTimeout() the returned\r\n * // handler instance can be used instead to cancel the timer\r\n * theTimeout.cancel();\r\n * theTimeout.enabled; // false\r\n *\r\n * // You can start the timer via enabled\r\n * theTimeout.enabled = true;\r\n *\r\n * // You can also \"restart\" the timer, whether it has previously triggered not not via the `refresh()`\r\n * theTimeout.refresh();\r\n * ```\r\n * @example\r\n * ```ts\r\n * let timeoutCalled = false;\r\n * // Your own \"setTimeout\" implementation to allow you to perform additional operations or possible wrap\r\n * // the callback to add timings.\r\n * function newSetTimeoutFn(callback: TimeoutOverrideFn) {\r\n * overrideCalled ++;\r\n * return setTimeout(callback, timeout);\r\n * }\r\n *\r\n * // Your own \"clearTimeout\" implementation to allow you to perform additional operations or possible wrap\r\n * // the callback to add timings.\r\n * function newClearTimeoutFn(timeoutId: number) {\r\n * overrideCalled ++;\r\n * return clearTimeout( timeout);\r\n * }\r\n *\r\n * let theTimeout = scheduleTimeoutWith([newSetTimeoutFn, newClearTimeoutFn], () => {\r\n * // This callback will be called after 100ms as this uses setTimeout()\r\n * timeoutCalled = true;\r\n * }, 100);\r\n *\r\n * // Instead of calling clearTimeout() with the returned value from setTimeout() the returned\r\n * // handler instance can be used instead to cancel the timer, internally this will call the newClearTimeoutFn\r\n * theTimeout.cancel();\r\n * theTimeout.enabled; // false\r\n *\r\n * // You can start the timer via enabled\r\n * theTimeout.enabled = true;\r\n *\r\n * // You can also \"restart\" the timer, whether it has previously triggered not not via the `refresh()`\r\n * theTimeout.refresh();\r\n * ```\r\n */\r\nexport function scheduleTimeoutWith(overrideFn: TimeoutOverrideFn | TimeoutOverrideFuncs, callback: (...args: A) => void, timeout: number, ...args: A): ITimerHandler;\r\nexport function scheduleTimeoutWith(overrideFn: TimeoutOverrideFn | TimeoutOverrideFuncs, callback: (...args: A) => void, timeout: number): ITimerHandler {\r\n return _createTimeoutWith(this, true, overrideFn, arrSlice(arguments, 1));\r\n}\r\n\r\n/**\r\n * Creates a non-running (paused) timer which will execute a function or specified piece of code when enabled and the timer expires,\r\n * this is simular to using `scheduleTimeout` but the timer is not enabled (running) and you MUST call `refresh` to start the timer.\r\n *\r\n * The timer may be cancelled (cleared) by calling the `cancel()` function on the returned {@link ITimerHandler}, or\r\n * you can \"reschedule\" and/or \"restart\" the timer by calling the `refresh()` function on the returned {@link ITimerHandler}\r\n * instance\r\n *\r\n * @since 0.7.0\r\n * @group Timer\r\n *\r\n * @param callback - The function to be executed after the timer expires.\r\n * @param timeout - The time, in milliseconds that the timer should wait before the specified\r\n * function or code is executed. If this parameter is omitted, a value of 0 is used, meaning\r\n * execute \"immediately\", or more accurately, the next event cycle.\r\n * @param args - Additional arguments which are passed through to the function specified by `callback`.\r\n * @returns A {@link ITimerHandler} instance which can be used to cancel the timeout.\r\n * @example\r\n * ```ts\r\n * let timeoutCalled = false;\r\n * let theTimeout = createTimeout(() => {\r\n * // This callback will be called after 100ms as this uses setTimeout()\r\n * timeoutCalled = true;\r\n * }, 100);\r\n *\r\n * // As the timer is not started you will need to call \"refresh\" to start the timer\r\n * theTimeout.refresh();\r\n *\r\n * // or set enabled to true\r\n * theTimeout.enabled = true;\r\n * ```\r\n */\r\nexport function createTimeout(callback: (...args: A) => void, timeout: number, ...args: A): ITimerHandler;\r\nexport function createTimeout(callback: (...args: A) => void, timeout: number): ITimerHandler {\r\n return _createTimeoutWith(this, false, UNDEF_VALUE, arrSlice(arguments));\r\n}\r\n\r\n/**\r\n * Creates a non-running (paused) timer which will execute a function or specified piece of code when enabled once the timer expires.\r\n * The overrideFn will be used to create the timer, this is simular to using `scheduleTimeoutWith` but the timer is not enabled (running)\r\n * and you MUST call `refresh` to start the timer.\r\n *\r\n * The timer may be cancelled (cleared) by calling the `cancel()` function on the returned {@link ITimerHandler}, or\r\n * you can \"reschedule\" and/or \"restart\" the timer by calling the `refresh()` function on the returned {@link ITimerHandler}\r\n * instance\r\n *\r\n * @since 0.7.0\r\n * @group Timer\r\n *\r\n * @param overrideFn - setTimeout override function this will be called instead of the `setTimeout`, if the value\r\n * of `overrideFn` is null or undefined it will revert back to the native `setTimeout`. May also be an array with contains\r\n * both the setTimeout and clearTimeout override functions, if either is not provided the default native functions will be used\r\n * @param callback - The function to be executed after the timer expires.\r\n * @param timeout - The time, in milliseconds that the timer should wait before the specified\r\n * function or code is executed. If this parameter is omitted, a value of 0 is used, meaning\r\n * execute \"immediately\", or more accurately, the next event cycle.\r\n * @param args - Additional arguments which are passed through to the function specified by `callback`.\r\n * @returns A {@link ITimerHandler} instance which can be used to cancel the timeout.\r\n * @example\r\n * ```ts\r\n * let timeoutCalled = false;\r\n * // Your own \"setTimeout\" implementation to allow you to perform additional operations or possible wrap\r\n * // the callback to add timings.\r\n * function newSetTimeoutFn(callback: TimeoutOverrideFn) {\r\n * overrideCalled ++;\r\n * return setTimeout(callback, timeout);\r\n * }\r\n *\r\n * let theTimeout = createTimeoutWith(newSetTimeoutFn, () => {\r\n * // This callback will be called after 100ms as this uses setTimeout()\r\n * timeoutCalled = true;\r\n * }, 100);\r\n *\r\n * // As the timer is not started you will need to call \"refresh\" to start the timer\r\n * theTimeout.refresh();\r\n *\r\n * // or set enabled to true\r\n * theTimeout.enabled = true;\r\n * ```\r\n * @example\r\n * ```ts\r\n * let timeoutCalled = false;\r\n * // Your own \"setTimeout\" implementation to allow you to perform additional operations or possible wrap\r\n * // the callback to add timings.\r\n * function newSetTimeoutFn(callback: TimeoutOverrideFn) {\r\n * overrideCalled ++;\r\n * return setTimeout(callback, timeout);\r\n * }\r\n *\r\n * // Your own \"clearTimeout\" implementation to allow you to perform additional operations or possible wrap\r\n * // the callback to add timings.\r\n * function newClearTimeoutFn(timeoutId: number) {\r\n * overrideCalled ++;\r\n * return clearTimeout( timeout);\r\n * }\r\n *\r\n * let theTimeout = createTimeoutWith([newSetTimeoutFn, newClearTimeoutFn], () => {\r\n * // This callback will be called after 100ms as this uses setTimeout()\r\n * timeoutCalled = true;\r\n * }, 100);\r\n *\r\n * // As the timer is not started you will need to call \"refresh\" to start the timer\r\n * theTimeout.refresh();\r\n *\r\n * // or set enabled to true\r\n * theTimeout.enabled = true;\r\n * ```\r\n */\r\nexport function createTimeoutWith(overrideFn: TimeoutOverrideFn | TimeoutOverrideFuncs, callback: (...args: A) => void, timeout: number, ...args: A): ITimerHandler;\r\nexport function createTimeoutWith(overrideFn: TimeoutOverrideFn | TimeoutOverrideFuncs, callback: (...args: A) => void, timeout: number): ITimerHandler {\r\n return _createTimeoutWith(this, false, overrideFn, arrSlice(arguments, 1));\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { ArrProto, SLICE } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\n/**\r\n * The arrSlice() method returns a shallow copy of a portion of an array into a new array object\r\n * selected from start to end (end not included) where start and end represent the index of items\r\n * in that array. The original array will not be modified.\r\n *\r\n * The `arrSlice()` method is a copying method. It does not alter this but instead returns a shallow\r\n * copy that contains some of the same elements as the ones from the original array.\r\n *\r\n * The `arrSlice()` method preserves empty slots. If the sliced portion is sparse, the returned arra\r\n * is sparse as well.\r\n *\r\n * The `arrSlice()` method is generic. It only expects the this value to have a length property and\r\n * integer-keyed properties.\r\n *\r\n * For both start and end, a negative index can be used to indicate an offset from the end of the array.\r\n * For example, -2 refers to the second to last element of the array.\r\n * @since 0.9.3\r\n * @group Array\r\n * @group ArrayLike\r\n * @param start Zero-based index at which to start extraction, converted to an integer.\r\n * - Negative index counts back from the end of the array — if start < 0, start + array.length is used.\r\n * - If start < -array.length or start is omitted, 0 is used.\r\n * - If start >= array.length, nothing is extracted.\r\n * @param end Zero-based index at which to end extraction, converted to an integer. slice() extracts\r\n * up to but not including end.\r\n * - Negative index counts back from the end of the array — if end < 0, end + array.length is used.\r\n * - If end < -array.length, 0 is used.\r\n * - If end >= array.length or end is omitted, array.length is used, causing all elements until the\r\n * end to be extracted.\r\n * - If end is positioned before or at start after normalization, nothing is extracted.\r\n * @example\r\n * ```ts\r\n * const lyrics = [\"Hello\", \"Darkness\", \"my\", \"old\", \"friend.\", \"I've\", \"come\", \"to\", \"talk\" ];\r\n *\r\n * arrSlice(lyrics); // [ \"Hello\", \"Darkness\", \"my\", \"old\", \"friend.\", \"I've\", \"come\", \"to\", \"talk\" ]\r\n * arrSlice(lyrics, 1, 3); // [ \"Darkness\", \"my\" ]\r\n * arrSlicw(lyrics, 2); // [ \"my\", \"old\", \"friend.\", \"I've\", \"come\", \"to\", \"talk\" ]\r\n * arrSlice(lyrics, 2, 4); // [ \"my\", \"old\" ]\r\n * arrSlice(lyrics, 1, 5); // [ \"Darkness\", \"my\", \"old\", \"friend.\" ]\r\n * arrSlice(lyrics, -2); // [ \"to\", \"talk\" ]\r\n * arrSlice(lyrics, 2, -1); // [ \"my\", \"old\", \"friend.\", \"I've\", \"come\", \"to\" ]\r\n * ```\r\n */\r\nexport var arrSlice = _unwrapFunction(SLICE, ArrProto);\r\n//# sourceMappingURL=slice.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ArrProto, SLICE } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\n\r\n/**\r\n * The arrSlice() method returns a shallow copy of a portion of an array into a new array object\r\n * selected from start to end (end not included) where start and end represent the index of items\r\n * in that array. The original array will not be modified.\r\n *\r\n * The `arrSlice()` method is a copying method. It does not alter this but instead returns a shallow\r\n * copy that contains some of the same elements as the ones from the original array.\r\n *\r\n * The `arrSlice()` method preserves empty slots. If the sliced portion is sparse, the returned arra\r\n * is sparse as well.\r\n *\r\n * The `arrSlice()` method is generic. It only expects the this value to have a length property and\r\n * integer-keyed properties.\r\n *\r\n * For both start and end, a negative index can be used to indicate an offset from the end of the array.\r\n * For example, -2 refers to the second to last element of the array.\r\n * @since 0.9.3\r\n * @group Array\r\n * @group ArrayLike\r\n * @param start Zero-based index at which to start extraction, converted to an integer.\r\n * - Negative index counts back from the end of the array — if start < 0, start + array.length is used.\r\n * - If start < -array.length or start is omitted, 0 is used.\r\n * - If start >= array.length, nothing is extracted.\r\n * @param end Zero-based index at which to end extraction, converted to an integer. slice() extracts\r\n * up to but not including end.\r\n * - Negative index counts back from the end of the array — if end < 0, end + array.length is used.\r\n * - If end < -array.length, 0 is used.\r\n * - If end >= array.length or end is omitted, array.length is used, causing all elements until the\r\n * end to be extracted.\r\n * - If end is positioned before or at start after normalization, nothing is extracted.\r\n * @example\r\n * ```ts\r\n * const lyrics = [\"Hello\", \"Darkness\", \"my\", \"old\", \"friend.\", \"I've\", \"come\", \"to\", \"talk\" ];\r\n *\r\n * arrSlice(lyrics); // [ \"Hello\", \"Darkness\", \"my\", \"old\", \"friend.\", \"I've\", \"come\", \"to\", \"talk\" ]\r\n * arrSlice(lyrics, 1, 3); // [ \"Darkness\", \"my\" ]\r\n * arrSlicw(lyrics, 2); // [ \"my\", \"old\", \"friend.\", \"I've\", \"come\", \"to\", \"talk\" ]\r\n * arrSlice(lyrics, 2, 4); // [ \"my\", \"old\" ]\r\n * arrSlice(lyrics, 1, 5); // [ \"Darkness\", \"my\", \"old\", \"friend.\" ]\r\n * arrSlice(lyrics, -2); // [ \"to\", \"talk\" ]\r\n * arrSlice(lyrics, 2, -1); // [ \"my\", \"old\", \"friend.\", \"I've\", \"come\", \"to\" ]\r\n * ```\r\n */\r\nexport const arrSlice: (theArray: ArrayLike, start?: number, end?: number) => T[] = _unwrapFunction(SLICE, ArrProto);\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2023 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { _unwrapInstFunction } from \"../internal/unwrapFunction\";\r\n/**\r\n * The `fnApply` function calls the specified `fn` function with the given `thisArg` as the `this` value,\r\n * and the optional `argArray` arguments provided as an array (or an Array-Like Object).\r\n *\r\n * Normally, when calling a function, the value of `this` inside the function is the object that the\r\n * function was accessed on. With `fnApply()`, you can assign an arbitrary value as this when calling an\r\n * existing function, without first attaching the function to the object as a property. This allows you\r\n * to use methods of one object as generic utility functions.\r\n *\r\n * You can also use any kind of object which is ArrayLike as the second parameter. In practice, this means\r\n * that it needs to have a length property, and integer (\"index\") properties in the range (0..length - 1).\r\n * For example, you could use a NodeList, or a custom object like `{ 'length': 2, '0': 'eat', '1': 'bananas' }`.\r\n * You can also use `arguments`.\r\n *\r\n * @since 0.9.8\r\n * @group Function\r\n *\r\n * @param fn - The function to be called\r\n * @param thisArg - The value of `this` provided for the call to `fn`. If the function is not in strict mode,\r\n * `null` and `undefined` will be replaced with the global object, and primitive values will be converted to objects.\r\n * @param argArray - An array-like object, specifying the arguments with which `fn` should be called, or `null` or\r\n * `undefined` if no arguments should be provided to the function.\r\n * @returns The result of calling the function with the specified `this` value and arguments.\r\n * @example\r\n * ```ts\r\n * // min / max number in an array\r\n * let max = fnApply(Math.max, null, [ 21, 42, 84, 168, 7, 3 ]);\r\n * // 168\r\n *\r\n * let min = fnApply(Math.min, null, [ 21, 42, 84, 168, 7, 3 ]);\r\n * // 3\r\n *\r\n * const module1 = {\r\n * prefix: \"Hello\",\r\n * x: 21,\r\n * getX() {\r\n * return this.x;\r\n * },\r\n * log(value: string) {\r\n * return this.prefix + \" \" + value + \" : \" + this.x\r\n * }\r\n * };\r\n *\r\n * // The 'this' parameter of 'getX' is bound to 'module'.\r\n * module1.getX(); // 21\r\n * module1.log(\"Darkness\"); // Hello Darkness : 21\r\n *\r\n * // Create a new function 'boundGetX' with the 'this' parameter bound to 'module'.\r\n * let module2 = {\r\n * prefix: \"my\",\r\n * x: 42\r\n * };\r\n *\r\n * // Call the function of module1 with module2 as it's this\r\n * fnApply(module1.getX, module2); // 42\r\n * fnApply(module1.log, module2, [ \"friend\" ]); // my friend : 42\r\n * ```\r\n */\r\nexport var fnApply = _unwrapInstFunction(\"apply\");\r\n//# sourceMappingURL=fnApply.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2023 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { _unwrapInstFunction } from \"../internal/unwrapFunction\";\r\n\r\n/**\r\n * The `fnApply` function calls the specified `fn` function with the given `thisArg` as the `this` value,\r\n * and the optional `argArray` arguments provided as an array (or an Array-Like Object).\r\n *\r\n * Normally, when calling a function, the value of `this` inside the function is the object that the\r\n * function was accessed on. With `fnApply()`, you can assign an arbitrary value as this when calling an\r\n * existing function, without first attaching the function to the object as a property. This allows you\r\n * to use methods of one object as generic utility functions.\r\n *\r\n * You can also use any kind of object which is ArrayLike as the second parameter. In practice, this means\r\n * that it needs to have a length property, and integer (\"index\") properties in the range (0..length - 1).\r\n * For example, you could use a NodeList, or a custom object like `{ 'length': 2, '0': 'eat', '1': 'bananas' }`.\r\n * You can also use `arguments`.\r\n *\r\n * @since 0.9.8\r\n * @group Function\r\n *\r\n * @param fn - The function to be called\r\n * @param thisArg - The value of `this` provided for the call to `fn`. If the function is not in strict mode,\r\n * `null` and `undefined` will be replaced with the global object, and primitive values will be converted to objects.\r\n * @param argArray - An array-like object, specifying the arguments with which `fn` should be called, or `null` or\r\n * `undefined` if no arguments should be provided to the function.\r\n * @returns The result of calling the function with the specified `this` value and arguments.\r\n * @example\r\n * ```ts\r\n * // min / max number in an array\r\n * let max = fnApply(Math.max, null, [ 21, 42, 84, 168, 7, 3 ]);\r\n * // 168\r\n *\r\n * let min = fnApply(Math.min, null, [ 21, 42, 84, 168, 7, 3 ]);\r\n * // 3\r\n *\r\n * const module1 = {\r\n * prefix: \"Hello\",\r\n * x: 21,\r\n * getX() {\r\n * return this.x;\r\n * },\r\n * log(value: string) {\r\n * return this.prefix + \" \" + value + \" : \" + this.x\r\n * }\r\n * };\r\n *\r\n * // The 'this' parameter of 'getX' is bound to 'module'.\r\n * module1.getX(); // 21\r\n * module1.log(\"Darkness\"); // Hello Darkness : 21\r\n *\r\n * // Create a new function 'boundGetX' with the 'this' parameter bound to 'module'.\r\n * let module2 = {\r\n * prefix: \"my\",\r\n * x: 42\r\n * };\r\n *\r\n * // Call the function of module1 with module2 as it's this\r\n * fnApply(module1.getX, module2); // 42\r\n * fnApply(module1.log, module2, [ \"friend\" ]); // my friend : 42\r\n * ```\r\n */\r\nexport const fnApply: any, T>(fn: F, thisArg: T, argArray?: ArrayLike) => ReturnType = _unwrapInstFunction(\"apply\");\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { NULL_VALUE } from \"../internal/constants\";\r\nimport { objDefineProp } from \"../object/define\";\r\nvar REF = \"ref\";\r\nvar UNREF = \"un\" + REF;\r\nvar HAS_REF = \"hasRef\";\r\nvar ENABLED = \"enabled\";\r\n/**\r\n * @ignore\r\n * @internal\r\n * Internal function to create and manage an ITimerHandler implementation, the object returned from this function\r\n * it directly used / returned by the pulic functions used to create timers (idle, interval and timeout)\r\n * @param startTimer - Should the timer be started as part of creating the handler\r\n * @param refreshFn - The function used to create/start or refresh the timer\r\n * @param cancelFn - The function used to cancel the timer.\r\n * @returns The new ITimerHandler instance\r\n */\r\nexport function _createTimerHandler(startTimer, refreshFn, cancelFn) {\r\n var _a;\r\n var ref = true;\r\n var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;\r\n var theTimerHandler;\r\n var _unref = function () {\r\n ref = false;\r\n timerId && timerId[UNREF] && timerId[UNREF]();\r\n return theTimerHandler;\r\n };\r\n var _ref = function () {\r\n ref = true;\r\n timerId && timerId[REF] && timerId[REF]();\r\n return theTimerHandler;\r\n };\r\n var _hasRef = function () {\r\n if (timerId && timerId[HAS_REF]) {\r\n return timerId[HAS_REF]();\r\n }\r\n return ref;\r\n };\r\n var _refresh = function () {\r\n timerId = refreshFn(timerId);\r\n if (!ref) {\r\n _unref();\r\n }\r\n return theTimerHandler;\r\n };\r\n var _cancel = function () {\r\n timerId && cancelFn(timerId);\r\n timerId = NULL_VALUE;\r\n };\r\n var _setEnabled = function (value) {\r\n !value && timerId && _cancel();\r\n value && !timerId && _refresh();\r\n };\r\n theTimerHandler = (_a = {\r\n cancel: _cancel,\r\n refresh: _refresh\r\n },\r\n _a[HAS_REF] = _hasRef,\r\n _a[REF] = _ref,\r\n _a[UNREF] = _unref,\r\n _a[ENABLED] = false,\r\n _a);\r\n objDefineProp(theTimerHandler, ENABLED, {\r\n get: function () { return !!timerId; },\r\n set: _setEnabled\r\n });\r\n return {\r\n h: theTimerHandler,\r\n dn: function () {\r\n timerId = NULL_VALUE;\r\n }\r\n };\r\n}\r\n//# sourceMappingURL=handler.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { NULL_VALUE } from \"../internal/constants\";\r\nimport { objDefineProp } from \"../object/define\";\r\n\r\nconst REF = \"ref\";\r\nconst UNREF = \"un\" + REF as \"unref\";\r\nconst HAS_REF = \"hasRef\";\r\nconst ENABLED = \"enabled\";\r\n\r\n/**\r\n * A Timer handler which is returned from {@link scheduleTimeout} which contains functions to\r\n * cancel or restart (refresh) the timeout function.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n */\r\nexport interface ITimerHandler {\r\n /**\r\n * Cancels a timeout that was previously scheduled, after calling this function any previously\r\n * scheduled timer will not execute.\r\n * @example\r\n * ```ts\r\n * let theTimer = scheduleTimeout(...);\r\n * theTimer.cancel();\r\n * ```\r\n */\r\n cancel(): void;\r\n\r\n /**\r\n * Reschedules the timer to call its callback at the previously specified duration\r\n * adjusted to the current time. This is useful for refreshing a timer without allocating\r\n * a new JavaScript object.\r\n *\r\n * Using this on a timer that has already called its callback will reactivate the timer.\r\n * Calling on a timer that has not yet executed will just reschedule the current timer.\r\n * @example\r\n * ```ts\r\n * let theTimer = scheduleTimeout(...);\r\n * // The timer will be restarted (if already executed) or rescheduled (if it has not yet executed)\r\n * theTimer.refresh();\r\n * ```\r\n */\r\n refresh(): ITimerHandler;\r\n\r\n /**\r\n * When called, requests that the event loop not exit so long when the ITimerHandler is active.\r\n * Calling timer.ref() multiple times will have no effect. By default, all ITimerHandler objects\r\n * will create \"ref'ed\" instances, making it normally unnecessary to call timer.ref() unless\r\n * timer.unref() had been called previously.\r\n * @since 0.7.0\r\n * @returns the ITimerHandler instance\r\n * @example\r\n * ```ts\r\n * let theTimer = createTimeout(...);\r\n *\r\n * // Make sure the timer is referenced (the default) so that the runtime (Node) does not terminate\r\n * // if there is a waiting referenced timer.\r\n * theTimer.ref();\r\n * ```\r\n */\r\n ref(): this;\r\n\r\n /**\r\n * When called, the any active ITimerHandler instance will not require the event loop to remain\r\n * active (Node.js). If there is no other activity keeping the event loop running, the process may\r\n * exit before the ITimerHandler instance callback is invoked. Calling timer.unref() multiple times\r\n * will have no effect.\r\n * @since 0.7.0\r\n * @returns the ITimerHandler instance\r\n * @example\r\n * ```ts\r\n * let theTimer = createTimeout(...);\r\n *\r\n * // Unreference the timer so that the runtime (Node) may terminate if nothing else is running.\r\n * theTimer.unref();\r\n * ```\r\n */\r\n unref(): this;\r\n\r\n /**\r\n * If true, any running referenced `ITimerHandler` instance will keep the Node.js event loop active.\r\n * @since 0.7.0\r\n * @example\r\n * ```ts\r\n * let theTimer = createTimeout(...);\r\n *\r\n * // Unreference the timer so that the runtime (Node) may terminate if nothing else is running.\r\n * theTimer.unref();\r\n * let hasRef = theTimer.hasRef(); // false\r\n *\r\n * theTimer.ref();\r\n * hasRef = theTimer.hasRef(); // true\r\n * ```\r\n */\r\n hasRef(): boolean;\r\n\r\n /**\r\n * Gets or Sets a flag indicating if the underlying timer is currently enabled and running.\r\n * Setting the enabled flag to the same as it's current value has no effect, setting to `true`\r\n * when already `true` will not {@link ITimerHandler.refresh | refresh}() the timer.\r\n * And setting to 'false` will {@link ITimerHandler.cancel | cancel}() the timer.\r\n * @since 0.8.1\r\n * @example\r\n * ```ts\r\n * let theTimer = createTimeout(...);\r\n *\r\n * // Check if enabled\r\n * theTimer.enabled; // false\r\n *\r\n * // Start the timer\r\n * theTimer.enabled = true; // Same as calling refresh()\r\n * theTimer.enabled; //true\r\n *\r\n * // Has no effect as it's already running\r\n * theTimer.enabled = true;\r\n *\r\n * // Will refresh / restart the time\r\n * theTimer.refresh()\r\n *\r\n * let theTimer = scheduleTimeout(...);\r\n *\r\n * // Check if enabled\r\n * theTimer.enabled; // true\r\n * ```\r\n */\r\n enabled: boolean;\r\n}\r\n\r\n/**\r\n * @ignore\r\n * @internal\r\n */\r\nexport interface _TimerHandler {\r\n /**\r\n * The public handler to return to the caller\r\n */\r\n h: ITimerHandler,\r\n\r\n /**\r\n * The callback function that should be called when the timer operation\r\n * has completed and will not automatically rescheduled\r\n * @returns\r\n */\r\n dn: () => void\r\n}\r\n\r\n/**\r\n * @ignore\r\n * @internal\r\n * Internal function to create and manage an ITimerHandler implementation, the object returned from this function\r\n * it directly used / returned by the pulic functions used to create timers (idle, interval and timeout)\r\n * @param startTimer - Should the timer be started as part of creating the handler\r\n * @param refreshFn - The function used to create/start or refresh the timer\r\n * @param cancelFn - The function used to cancel the timer.\r\n * @returns The new ITimerHandler instance\r\n */\r\nexport function _createTimerHandler(startTimer: boolean, refreshFn: (timerId: T) => T, cancelFn: (timerId: T) => void): _TimerHandler {\r\n let ref = true;\r\n let timerId: T = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;\r\n let theTimerHandler: ITimerHandler;\r\n\r\n const _unref = () => {\r\n ref = false;\r\n timerId && timerId[UNREF] && timerId[UNREF]();\r\n return theTimerHandler;\r\n };\r\n\r\n const _ref = () => {\r\n ref = true;\r\n timerId && timerId[REF] && timerId[REF]();\r\n return theTimerHandler;\r\n };\r\n\r\n const _hasRef = () => {\r\n if (timerId && timerId[HAS_REF]) {\r\n return timerId[HAS_REF]();\r\n }\r\n return ref;\r\n };\r\n\r\n const _refresh = () => {\r\n timerId = refreshFn(timerId);\r\n if (!ref) {\r\n _unref();\r\n }\r\n\r\n return theTimerHandler;\r\n };\r\n\r\n const _cancel = () => {\r\n timerId && cancelFn(timerId);\r\n timerId = NULL_VALUE;\r\n };\r\n\r\n const _setEnabled = (value: boolean) => {\r\n !value && timerId && _cancel();\r\n value && !timerId && _refresh();\r\n }\r\n\r\n theTimerHandler = {\r\n cancel: _cancel,\r\n refresh: _refresh,\r\n [HAS_REF]: _hasRef,\r\n [REF]: _ref,\r\n [UNREF]: _unref,\r\n [ENABLED]: false\r\n };\r\n\r\n objDefineProp(theTimerHandler, ENABLED, {\r\n get: () => !!timerId,\r\n set: _setEnabled\r\n });\r\n\r\n return {\r\n h: theTimerHandler,\r\n dn: () => {\r\n timerId = NULL_VALUE;\r\n }\r\n };\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrForEach, createCustomError, dumpObj } from \"@nevware21/ts-utils\";\r\nimport { _DYN_LENGTH } from \"../__DynamicConstants\";\r\nvar aggregationErrorType;\r\n/**\r\n * Throws an Aggregation Error which includes all of the errors that led to this error occurring\r\n * @param message - The message describing the aggregation error (the sourceError details are added to this)\r\n * @param sourceErrors - An array of the errors that caused this situation\r\n */\r\nexport function throwAggregationError(message, sourceErrors) {\r\n if (!aggregationErrorType) {\r\n aggregationErrorType = createCustomError(\"AggregationError\", function (self, args) {\r\n if (args[_DYN_LENGTH /* @min:%2elength */] > 1) {\r\n // Save the provided errors\r\n self.errors = args[1];\r\n }\r\n });\r\n }\r\n var theMessage = message || \"One or more errors occurred.\";\r\n arrForEach(sourceErrors, function (srcError, idx) {\r\n theMessage += \"\\n\".concat(idx, \" > \").concat(dumpObj(srcError));\r\n });\r\n throw new aggregationErrorType(theMessage, sourceErrors || []);\r\n}\r\n//# sourceMappingURL=AggregationError.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { arrSlice } from \"../array/slice\";\r\nimport { fnApply } from \"../funcs/fnApply\";\r\nimport { CONSTRUCTOR, NAME, NULL_VALUE, PROTOTYPE } from \"../internal/constants\";\r\nimport { objCreate } from \"../object/create\";\r\nimport { objDefine } from \"../object/define\";\r\nimport { objGetPrototypeOf } from \"../object/object\";\r\nimport { objSetPrototypeOf } from \"../object/set_proto\";\r\n/**\r\n * @internal\r\n * @ignore\r\n */\r\nvar _createCustomError = function (name, d, b) {\r\n _safeDefineName(d, name);\r\n d = objSetPrototypeOf(d, b);\r\n function __() {\r\n this.constructor = d;\r\n _safeDefineName(this, name);\r\n }\r\n d[PROTOTYPE] = b === NULL_VALUE ? objCreate(b) : (__[PROTOTYPE] = b[PROTOTYPE], new __());\r\n return d;\r\n};\r\nvar _safeSetName = function (baseClass, name) {\r\n try {\r\n name && (baseClass[NAME] = name);\r\n //name && (baseClass[PROTOTYPE][NAME] = name);\r\n }\r\n catch (e) {\r\n // Do nothing\r\n }\r\n};\r\nvar _safeDefineName = function (target, name) {\r\n try {\r\n objDefine(target, NAME, { v: name, c: true, e: false });\r\n }\r\n catch (e) {\r\n // Do nothing\r\n }\r\n};\r\n/**\r\n * Create a Custom Error class which may be used to throw custom errors.\r\n * @group Error\r\n * @param name - The name of the Custom Error\r\n * @param constructCb - [Optional] An optional callback function to call when a\r\n * new Customer Error instance is being created.\r\n * @param errorBase - [Optional] (since v0.9.6) The error class to extend for this class, defaults to Error.\r\n * @returns A new Error `class`\r\n * @example\r\n * ```ts\r\n * import { createCustomError, isError } from \"@nevware21/ts-utils\";\r\n *\r\n * // For an error that just contains a message\r\n * let myCustomErrorError = createCustomError(\"MessageError\");\r\n *\r\n * try {\r\n * throw new myCustomErrorError(\"Error Message!\");\r\n * } catch(e) {\r\n * // e.name === MessageError\r\n * // isError(e) === true;\r\n * // Object.prototype.toString.call(e) === \"[object Error]\";\r\n * }\r\n *\r\n * // Or a more complex error object\r\n * interface MyCriticalErrorConstructor extends CustomErrorConstructor {\r\n * new(message: string, file: string, line: number, col: number): MyCriticalError;\r\n * (message: string, file: string, line: number, col: number): MyCriticalError;\r\n * }\r\n *\r\n * interface MyCriticalError extends Error {\r\n * readonly errorId: number;\r\n * readonly args: any[]; // Holds all of the arguments passed during construction\r\n * }\r\n *\r\n * let _totalErrors = 0;\r\n * let myCustomError = createCustomError(\"CriticalError\", (self, args) => {\r\n * _totalErrors++;\r\n * self.errorId = _totalErrors;\r\n * self.args = args;\r\n * });\r\n *\r\n * try {\r\n * throw new myCustomError(\"Not Again!\");\r\n * } catch(e) {\r\n * // e.name === CriticalError\r\n * // isError(e) === true;\r\n * // Object.prototype.toString.call(e) === \"[object Error]\";\r\n * }\r\n *\r\n * // ----------------------------------------------------------\r\n * // Extending another custom error class\r\n * // ----------------------------------------------------------\r\n *\r\n * let AppError = createCustomError(\"ApplicationError\");\r\n * let theAppError = new appError();\r\n *\r\n * isError(theAppError); // true\r\n * theAppError instanceof Error; // true\r\n * theAppError instanceof AppError; // true\r\n *\r\n * let StartupError = createCustomError(\"StartupError\", null, AppError);\r\n * let theStartupError = new StartupError();\r\n *\r\n * isError(theStartupError); // true\r\n * theStartupError instanceof Error; // true\r\n * theStartupError instanceof AppError; // true\r\n * theStartupError instanceof StartupError; // true\r\n * ```\r\n */\r\nexport function createCustomError(name, constructCb, errorBase) {\r\n var theBaseClass = errorBase || Error;\r\n var orgName = theBaseClass[PROTOTYPE][NAME];\r\n var captureFn = Error.captureStackTrace;\r\n return _createCustomError(name, function () {\r\n var _this = this;\r\n try {\r\n _safeSetName(theBaseClass, name);\r\n var _self = fnApply(theBaseClass, _this, arrSlice(arguments)) || _this;\r\n if (_self !== _this) {\r\n // Looks like runtime error constructor reset the prototype chain, so restore it\r\n var orgProto = objGetPrototypeOf(_this);\r\n if (orgProto !== objGetPrototypeOf(_self)) {\r\n objSetPrototypeOf(_self, orgProto);\r\n }\r\n }\r\n // Make sure we only capture our stack details\r\n captureFn && captureFn(_self, _this[CONSTRUCTOR]);\r\n // Run the provided construction function\r\n constructCb && constructCb(_self, arguments);\r\n return _self;\r\n }\r\n finally {\r\n _safeSetName(theBaseClass, orgName);\r\n }\r\n }, theBaseClass);\r\n}\r\n/**\r\n * @internal\r\n * @ignore\r\n */\r\nvar _unsupportedError;\r\n/**\r\n * Throw a custom `UnsupportedError` Error instance with the given message.\r\n * @group Error\r\n * @param message - The message to include in the exception\r\n * @example\r\n * ```ts\r\n * import { throwUnsupported } from \"@nevware21/ts-utils\";\r\n *\r\n * if (!window) {\r\n * throwUnsupported(\"A window is needed for this operation\");\r\n * }\r\n * ```\r\n */\r\nexport function throwUnsupported(message) {\r\n if (!_unsupportedError) {\r\n // Lazily create the class\r\n _unsupportedError = createCustomError(\"UnsupportedError\");\r\n }\r\n throw new _unsupportedError(message);\r\n}\r\n//# sourceMappingURL=customError.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { arrSlice } from \"../array/slice\";\r\nimport { fnApply } from \"../funcs/fnApply\";\r\nimport { CONSTRUCTOR, NAME, NULL_VALUE, PROTOTYPE } from \"../internal/constants\";\r\nimport { objCreate } from \"../object/create\";\r\nimport { objDefine } from \"../object/define\";\r\nimport { objGetPrototypeOf } from \"../object/object\";\r\nimport { objSetPrototypeOf } from \"../object/set_proto\";\r\n\r\n/**\r\n * Defines the definition of the custom error constructor\r\n * Used by: {@link createCustomError}\r\n * @group Error\r\n */\r\nexport interface CustomErrorConstructor extends ErrorConstructor {\r\n new(message?: string): T;\r\n (message?: string): T;\r\n readonly prototype: T;\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n */\r\nconst _createCustomError = (name: string, d: any, b: any): T => {\r\n _safeDefineName(d, name);\r\n d = objSetPrototypeOf(d, b);\r\n function __() {\r\n this.constructor = d;\r\n _safeDefineName(this, name);\r\n }\r\n\r\n d[PROTOTYPE] = b === NULL_VALUE ? objCreate(b) : ((__ as any)[PROTOTYPE] = b[PROTOTYPE], new (__ as any)());\r\n\r\n return d;\r\n};\r\n\r\nconst _safeSetName = (baseClass: any, name: string) => {\r\n try {\r\n name && (baseClass[NAME] = name);\r\n //name && (baseClass[PROTOTYPE][NAME] = name);\r\n } catch(e) {\r\n // Do nothing\r\n }\r\n};\r\n\r\nconst _safeDefineName = (target: any, name: string) => {\r\n try {\r\n objDefine(target, NAME, { v: name, c: true, e: false });\r\n } catch (e) {\r\n // Do nothing\r\n }\r\n};\r\n\r\n/**\r\n * Create a Custom Error class which may be used to throw custom errors.\r\n * @group Error\r\n * @param name - The name of the Custom Error\r\n * @param constructCb - [Optional] An optional callback function to call when a\r\n * new Customer Error instance is being created.\r\n * @param errorBase - [Optional] (since v0.9.6) The error class to extend for this class, defaults to Error.\r\n * @returns A new Error `class`\r\n * @example\r\n * ```ts\r\n * import { createCustomError, isError } from \"@nevware21/ts-utils\";\r\n *\r\n * // For an error that just contains a message\r\n * let myCustomErrorError = createCustomError(\"MessageError\");\r\n *\r\n * try {\r\n * throw new myCustomErrorError(\"Error Message!\");\r\n * } catch(e) {\r\n * // e.name === MessageError\r\n * // isError(e) === true;\r\n * // Object.prototype.toString.call(e) === \"[object Error]\";\r\n * }\r\n *\r\n * // Or a more complex error object\r\n * interface MyCriticalErrorConstructor extends CustomErrorConstructor {\r\n * new(message: string, file: string, line: number, col: number): MyCriticalError;\r\n * (message: string, file: string, line: number, col: number): MyCriticalError;\r\n * }\r\n *\r\n * interface MyCriticalError extends Error {\r\n * readonly errorId: number;\r\n * readonly args: any[]; // Holds all of the arguments passed during construction\r\n * }\r\n *\r\n * let _totalErrors = 0;\r\n * let myCustomError = createCustomError(\"CriticalError\", (self, args) => {\r\n * _totalErrors++;\r\n * self.errorId = _totalErrors;\r\n * self.args = args;\r\n * });\r\n *\r\n * try {\r\n * throw new myCustomError(\"Not Again!\");\r\n * } catch(e) {\r\n * // e.name === CriticalError\r\n * // isError(e) === true;\r\n * // Object.prototype.toString.call(e) === \"[object Error]\";\r\n * }\r\n *\r\n * // ----------------------------------------------------------\r\n * // Extending another custom error class\r\n * // ----------------------------------------------------------\r\n *\r\n * let AppError = createCustomError(\"ApplicationError\");\r\n * let theAppError = new appError();\r\n *\r\n * isError(theAppError); // true\r\n * theAppError instanceof Error; // true\r\n * theAppError instanceof AppError; // true\r\n *\r\n * let StartupError = createCustomError(\"StartupError\", null, AppError);\r\n * let theStartupError = new StartupError();\r\n *\r\n * isError(theStartupError); // true\r\n * theStartupError instanceof Error; // true\r\n * theStartupError instanceof AppError; // true\r\n * theStartupError instanceof StartupError; // true\r\n * ```\r\n */\r\nexport function createCustomError(\r\n name: string,\r\n constructCb?: ((self: any, args: IArguments) => void) | null,\r\n errorBase?: B): T {\r\n\r\n let theBaseClass = errorBase || Error;\r\n let orgName = theBaseClass[PROTOTYPE][NAME];\r\n let captureFn = Error.captureStackTrace;\r\n return _createCustomError(name, function (this: any) {\r\n let _this = this;\r\n try {\r\n _safeSetName(theBaseClass, name);\r\n let _self = fnApply(theBaseClass, _this, arrSlice(arguments)) || _this;\r\n if (_self !== _this) {\r\n // Looks like runtime error constructor reset the prototype chain, so restore it\r\n let orgProto = objGetPrototypeOf(_this);\r\n if (orgProto !== objGetPrototypeOf(_self)) {\r\n objSetPrototypeOf(_self, orgProto);\r\n }\r\n }\r\n\r\n // Make sure we only capture our stack details\r\n captureFn && captureFn(_self, _this[CONSTRUCTOR]);\r\n \r\n // Run the provided construction function\r\n constructCb && constructCb(_self, arguments);\r\n \r\n return _self;\r\n } finally {\r\n _safeSetName(theBaseClass, orgName);\r\n }\r\n }, theBaseClass);\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n */\r\nlet _unsupportedError: CustomErrorConstructor;\r\n\r\n/**\r\n * Throw a custom `UnsupportedError` Error instance with the given message.\r\n * @group Error\r\n * @param message - The message to include in the exception\r\n * @example\r\n * ```ts\r\n * import { throwUnsupported } from \"@nevware21/ts-utils\";\r\n *\r\n * if (!window) {\r\n * throwUnsupported(\"A window is needed for this operation\");\r\n * }\r\n * ```\r\n */\r\nexport function throwUnsupported(message?: string): never {\r\n if (!_unsupportedError) {\r\n // Lazily create the class\r\n _unsupportedError = createCustomError(\"UnsupportedError\");\r\n }\r\n\r\n throw new _unsupportedError(message);\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { getLazy } from \"../helpers/lazy\";\r\nimport { ObjClass, __PROTO__ } from \"../internal/constants\";\r\nimport { objForEachKey } from \"./for_each_key\";\r\nvar _isProtoArray;\r\n/**\r\n * The objSetPrototypeOf() method sets the prototype (i.e., the internal [Prototype] property) of a specified\r\n * object to another object or null.\r\n * @group Object\r\n * @param obj - The object which is to have it's prototype set.\r\n * @param proto - The object's new prototype (an object or null)\r\n * @returns The specified object.\r\n */\r\nexport function objSetPrototypeOf(obj, proto) {\r\n var fn = ObjClass[\"setPrototypeOf\"] ||\r\n // tslint:disable-next-line: only-arrow-functions\r\n function (d, b) {\r\n !_isProtoArray && (_isProtoArray = getLazy(function () {\r\n var _a;\r\n return ((_a = {}, _a[__PROTO__] = [], _a) instanceof Array);\r\n }));\r\n _isProtoArray.v ? d[__PROTO__] = b : objForEachKey(b, function (key, value) { return d[key] = value; });\r\n };\r\n return fn(obj, proto);\r\n}\r\n//# sourceMappingURL=set_proto.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ILazyValue, getLazy } from \"../helpers/lazy\";\r\nimport { ObjClass, __PROTO__ } from \"../internal/constants\";\r\nimport { objForEachKey } from \"./for_each_key\";\r\n\r\nlet _isProtoArray: ILazyValue;\r\n\r\n/**\r\n * The objSetPrototypeOf() method sets the prototype (i.e., the internal [Prototype] property) of a specified\r\n * object to another object or null.\r\n * @group Object\r\n * @param obj - The object which is to have it's prototype set.\r\n * @param proto - The object's new prototype (an object or null)\r\n * @returns The specified object.\r\n */\r\nexport function objSetPrototypeOf(obj: any, proto: object) {\r\n let fn = ObjClass[\"setPrototypeOf\"] ||\r\n // tslint:disable-next-line: only-arrow-functions\r\n function (d: any, b: any) {\r\n !_isProtoArray && (_isProtoArray = getLazy(() => ({ [__PROTO__]: [] } instanceof Array)));\r\n _isProtoArray.v ? d[__PROTO__] = b : objForEachKey(b, (key: any, value: any) => d[key] = value );\r\n };\r\n\r\n return fn(obj, proto);\r\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { getInst } from \"@nevware21/ts-utils\";\r\nimport { _DYN_APPLY, _DYN_LENGTH } from \"../__DynamicConstants\";\r\nimport { STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_EVENTS_SENT, STR_PERF_EVENT } from \"./InternalConstants\";\r\nvar listenerFuncs = [STR_EVENTS_SENT, STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_PERF_EVENT];\r\nvar _aiNamespace = null;\r\nvar _debugListener;\r\nfunction _listenerProxyFunc(name, config) {\r\n return function () {\r\n var args = arguments;\r\n var dbgExt = getDebugExt(config);\r\n if (dbgExt) {\r\n var listener = dbgExt.listener;\r\n if (listener && listener[name]) {\r\n listener[name][_DYN_APPLY /* @min:%2eapply */](listener, args);\r\n }\r\n }\r\n };\r\n}\r\nfunction _getExtensionNamespace() {\r\n // Cache the lookup of the global namespace object\r\n var target = getInst(\"Microsoft\");\r\n if (target) {\r\n _aiNamespace = target[\"ApplicationInsights\"];\r\n }\r\n return _aiNamespace;\r\n}\r\nexport function getDebugExt(config) {\r\n var ns = _aiNamespace;\r\n if (!ns && config.disableDbgExt !== true) {\r\n ns = _aiNamespace || _getExtensionNamespace();\r\n }\r\n return ns ? ns[\"ChromeDbgExt\"] : null;\r\n}\r\nexport function getDebugListener(config) {\r\n if (!_debugListener) {\r\n _debugListener = {};\r\n for (var lp = 0; lp < listenerFuncs[_DYN_LENGTH /* @min:%2elength */]; lp++) {\r\n _debugListener[listenerFuncs[lp]] = _listenerProxyFunc(listenerFuncs[lp], config);\r\n }\r\n }\r\n return _debugListener;\r\n}\r\n//# sourceMappingURL=DbgExtensionUtils.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_SPLIT = \"split\"; // Count: 6\r\nexport var _DYN_LENGTH = \"length\"; // Count: 41\r\nexport var _DYN_TO_LOWER_CASE = \"toLowerCase\"; // Count: 6\r\nexport var _DYN_INGESTIONENDPOINT = \"ingestionendpoint\"; // Count: 4\r\nexport var _DYN_TO_STRING = \"toString\"; // Count: 9\r\nexport var _DYN_REMOVE_ITEM = \"removeItem\"; // Count: 3\r\nexport var _DYN_NAME = \"name\"; // Count: 11\r\nexport var _DYN_MESSAGE = \"message\"; // Count: 10\r\nexport var _DYN_COUNT = \"count\"; // Count: 8\r\nexport var _DYN_PRE_TRIGGER_DATE = \"preTriggerDate\"; // Count: 4\r\nexport var _DYN_DISABLED = \"disabled\"; // Count: 3\r\nexport var _DYN_INTERVAL = \"interval\"; // Count: 3\r\nexport var _DYN_DAYS_OF_MONTH = \"daysOfMonth\"; // Count: 3\r\nexport var _DYN_DATE = \"date\"; // Count: 5\r\nexport var _DYN_GET_UTCDATE = \"getUTCDate\"; // Count: 3\r\nexport var _DYN_STRINGIFY = \"stringify\"; // Count: 4\r\nexport var _DYN_PATHNAME = \"pathname\"; // Count: 4\r\nexport var _DYN_CORRELATION_HEADER_E0 = \"correlationHeaderExcludePatterns\"; // Count: 2\r\nexport var _DYN_EXTENSION_CONFIG = \"extensionConfig\"; // Count: 4\r\nexport var _DYN_EXCEPTIONS = \"exceptions\"; // Count: 6\r\nexport var _DYN_PARSED_STACK = \"parsedStack\"; // Count: 13\r\nexport var _DYN_PROPERTIES = \"properties\"; // Count: 9\r\nexport var _DYN_MEASUREMENTS = \"measurements\"; // Count: 9\r\nexport var _DYN_SIZE_IN_BYTES = \"sizeInBytes\"; // Count: 11\r\nexport var _DYN_TYPE_NAME = \"typeName\"; // Count: 11\r\nexport var _DYN_SEVERITY_LEVEL = \"severityLevel\"; // Count: 5\r\nexport var _DYN_PROBLEM_GROUP = \"problemGroup\"; // Count: 3\r\nexport var _DYN_IS_MANUAL = \"isManual\"; // Count: 3\r\nexport var _DYN__CREATE_FROM_INTERFA1 = \"CreateFromInterface\"; // Count: 2\r\nexport var _DYN_ASSEMBLY = \"assembly\"; // Count: 7\r\nexport var _DYN_HAS_FULL_STACK = \"hasFullStack\"; // Count: 6\r\nexport var _DYN_LEVEL = \"level\"; // Count: 5\r\nexport var _DYN_METHOD = \"method\"; // Count: 7\r\nexport var _DYN_FILE_NAME = \"fileName\"; // Count: 6\r\nexport var _DYN_LINE = \"line\"; // Count: 6\r\nexport var _DYN_DURATION = \"duration\"; // Count: 4\r\nexport var _DYN_RECEIVED_RESPONSE = \"receivedResponse\"; // Count: 2\r\n//# sourceMappingURL=__DynamicConstants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { getDocument, isString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_LENGTH, _DYN_PATHNAME, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\r\nvar _document = getDocument() || {};\r\nvar _htmlAnchorIdx = 0;\r\n// Use an array of temporary values as it's possible for multiple calls to parseUrl() will be called with different URLs\r\n// Using a cache size of 5 for now as it current depth usage is at least 2, so adding a minor buffer to handle future updates\r\nvar _htmlAnchorElement = [null, null, null, null, null];\r\nexport function urlParseUrl(url) {\r\n var anchorIdx = _htmlAnchorIdx;\r\n var anchorCache = _htmlAnchorElement;\r\n var tempAnchor = anchorCache[anchorIdx];\r\n if (!_document.createElement) {\r\n // Always create the temp instance if createElement is not available\r\n tempAnchor = { host: urlParseHost(url, true) };\r\n }\r\n else if (!anchorCache[anchorIdx]) {\r\n // Create and cache the unattached anchor instance\r\n tempAnchor = anchorCache[anchorIdx] = _document.createElement(\"a\");\r\n }\r\n tempAnchor.href = url;\r\n // Move the cache index forward\r\n anchorIdx++;\r\n if (anchorIdx >= anchorCache[_DYN_LENGTH /* @min:%2elength */]) {\r\n anchorIdx = 0;\r\n }\r\n _htmlAnchorIdx = anchorIdx;\r\n return tempAnchor;\r\n}\r\nexport function urlGetAbsoluteUrl(url) {\r\n var result;\r\n var a = urlParseUrl(url);\r\n if (a) {\r\n result = a.href;\r\n }\r\n return result;\r\n}\r\nexport function urlGetPathName(url) {\r\n var result;\r\n var a = urlParseUrl(url);\r\n if (a) {\r\n result = a[_DYN_PATHNAME /* @min:%2epathname */];\r\n }\r\n return result;\r\n}\r\nexport function urlGetCompleteUrl(method, absoluteUrl) {\r\n if (method) {\r\n return method.toUpperCase() + \" \" + absoluteUrl;\r\n }\r\n return absoluteUrl;\r\n}\r\n// Fallback method to grab host from url if document.createElement method is not available\r\nexport function urlParseHost(url, inclPort) {\r\n var fullHost = urlParseFullHost(url, inclPort) || \"\";\r\n if (fullHost) {\r\n var match = fullHost.match(/(www\\d{0,5}\\.)?([^\\/:]{1,256})(:\\d{1,20})?/i);\r\n if (match != null && match[_DYN_LENGTH /* @min:%2elength */] > 3 && isString(match[2]) && match[2][_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n return match[2] + (match[3] || \"\");\r\n }\r\n }\r\n return fullHost;\r\n}\r\nexport function urlParseFullHost(url, inclPort) {\r\n var result = null;\r\n if (url) {\r\n var match = url.match(/(\\w{1,150}):\\/\\/([^\\/:]{1,256})(:\\d{1,20})?/i);\r\n if (match != null && match[_DYN_LENGTH /* @min:%2elength */] > 2 && isString(match[2]) && match[2][_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n result = match[2] || \"\";\r\n if (inclPort && match[_DYN_LENGTH /* @min:%2elength */] > 2) {\r\n var protocol = (match[1] || \"\")[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n var port = match[3] || \"\";\r\n // IE includes the standard port so pass it off if it's the same as the protocol\r\n if (protocol === \"http\" && port === \":80\") {\r\n port = \"\";\r\n }\r\n else if (protocol === \"https\" && port === \":443\") {\r\n port = \"\";\r\n }\r\n result += port;\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\n//# sourceMappingURL=UrlHelperFuncs.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrReduce, objKeys } from \"@microsoft/applicationinsights-core-js\";\r\nimport { DEFAULT_BREEZE_ENDPOINT } from \"./Constants\";\r\nimport { _DYN_INGESTIONENDPOINT, _DYN_LENGTH, _DYN_SPLIT, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\r\nvar _FIELDS_SEPARATOR = \";\";\r\nvar _FIELD_KEY_VALUE_SEPARATOR = \"=\";\r\nexport function parseConnectionString(connectionString) {\r\n if (!connectionString) {\r\n return {};\r\n }\r\n var kvPairs = connectionString[_DYN_SPLIT /* @min:%2esplit */](_FIELDS_SEPARATOR);\r\n var result = arrReduce(kvPairs, function (fields, kv) {\r\n var kvParts = kv[_DYN_SPLIT /* @min:%2esplit */](_FIELD_KEY_VALUE_SEPARATOR);\r\n if (kvParts[_DYN_LENGTH /* @min:%2elength */] === 2) { // only save fields with valid formats\r\n var key = kvParts[0][_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n var value = kvParts[1];\r\n fields[key] = value;\r\n }\r\n return fields;\r\n }, {});\r\n if (objKeys(result)[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n // this is a valid connection string, so parse the results\r\n if (result.endpointsuffix) {\r\n // use endpoint suffix where overrides are not provided\r\n var locationPrefix = result.location ? result.location + \".\" : \"\";\r\n result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] || (\"https://\" + locationPrefix + \"dc.\" + result.endpointsuffix);\r\n }\r\n // apply the default endpoints\r\n result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] || DEFAULT_BREEZE_ENDPOINT;\r\n }\r\n return result;\r\n}\r\nexport var ConnectionStringParser = {\r\n parse: parseConnectionString\r\n};\r\n//# sourceMappingURL=ConnectionStringParser.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { ArrProto } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\n/**\r\n * The arrReduce() method executes a user-supplied \"reducer\" callback function on each element of the array,\r\n * in order, passing in the return value from the calculation on the preceding element. The final result of\r\n * running the reducer across all elements of the array is a single value.\r\n *\r\n * The first time that the callback is run there is no \"return value of the previous calculation\". If supplied,\r\n * an initial value may be used in its place. Otherwise the array element at index 0 is used as the initial\r\n * value and iteration starts from the next element (index 1 instead of index 0).\r\n * @group Array\r\n * @group ArrayLike\r\n * @typeParam T - Identifies the type of array elements\r\n * @param theArray - The array or array like object of elements to be searched.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n * @returns The value that results from running the \"reducer\" callback function to completion over the entire array.\r\n * @example\r\n * ```ts\r\n * const getMax = (a: number, b: number) => Math.max(a, b);\r\n *\r\n * // callback is invoked for each element in the array starting at index 0\r\n * arrReduce([1, 100], getMax, 50); // 100\r\n * arrReduce([ 50], getMax, 10); // 50\r\n *\r\n * // callback is invoked once for element at index 1\r\n * arrReduce([1, 100], getMax); // 100\r\n *\r\n * // callback is not invoked\r\n * arrReduce([ 50], getMax); // 50\r\n * arrReduce([ ], getMax, 1); // 1\r\n *\r\n * arrReduce([ ], getMax); // throws TypeError\r\n *\r\n * // Also supports Array like objects\r\n * arrReduce({ length: 2, 0: 1, 1: 100 }, getMax, 50); // 100\r\n * arrReduce({ length: 1, 0: 50 }, getMax, 10); // 50\r\n *\r\n * // callback is invoked once for element at index 1\r\n * arrReduce({ length: 2, 0: 1, 1: 100 }, getMax); // 100\r\n *\r\n * // callback is not invoked\r\n * arrReduce({ length: 1, 0: 50 }, getMax); // 50\r\n * arrReduce({ length: 0 }, getMax, 1); // 1\r\n * ```\r\n */\r\nexport var arrReduce = _unwrapFunction(\"reduce\", ArrProto);\r\n//# sourceMappingURL=reduce.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ArrProto } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\n\r\n/**\r\n * The `reducer` function called for {@link arrReduce}.\r\n * @group Array\r\n * @group ArrayLike\r\n * @typeParam T - Identifies the type of array elements\r\n * @typeParam R - Identifies the type of the return array elements (defaults to T)\r\n * @param previousValue - The value resulting from the previous call to callbackFn. On first call, initialValue if\r\n * specified, otherwise the value of array[0].\r\n * @param currentValue - The value of the current element. On first call, the value of array[0] if an initialValue\r\n * was specified, otherwise the value of array[1].\r\n * @param currentIndex - The index position of currentValue in the array. On first call, 0 if initialValue was\r\n * specified, otherwise 1.\r\n * @param array -The array being traversed.\r\n */\r\nexport type ArrReduceCallbackFn = (previousValue: T | R, currentValue: T, currentIndex: number, array: T[]) => R;\r\n\r\n/**\r\n * The arrReduce() method executes a user-supplied \"reducer\" callback function on each element of the array,\r\n * in order, passing in the return value from the calculation on the preceding element. The final result of\r\n * running the reducer across all elements of the array is a single value.\r\n *\r\n * The first time that the callback is run there is no \"return value of the previous calculation\". If supplied,\r\n * an initial value may be used in its place. Otherwise the array element at index 0 is used as the initial\r\n * value and iteration starts from the next element (index 1 instead of index 0).\r\n * @group Array\r\n * @group ArrayLike\r\n * @typeParam T - Identifies the type of array elements\r\n * @param theArray - The array or array like object of elements to be searched.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n * @returns The value that results from running the \"reducer\" callback function to completion over the entire array.\r\n * @example\r\n * ```ts\r\n * const getMax = (a: number, b: number) => Math.max(a, b);\r\n *\r\n * // callback is invoked for each element in the array starting at index 0\r\n * arrReduce([1, 100], getMax, 50); // 100\r\n * arrReduce([ 50], getMax, 10); // 50\r\n *\r\n * // callback is invoked once for element at index 1\r\n * arrReduce([1, 100], getMax); // 100\r\n *\r\n * // callback is not invoked\r\n * arrReduce([ 50], getMax); // 50\r\n * arrReduce([ ], getMax, 1); // 1\r\n *\r\n * arrReduce([ ], getMax); // throws TypeError\r\n *\r\n * // Also supports Array like objects\r\n * arrReduce({ length: 2, 0: 1, 1: 100 }, getMax, 50); // 100\r\n * arrReduce({ length: 1, 0: 50 }, getMax, 10); // 50\r\n *\r\n * // callback is invoked once for element at index 1\r\n * arrReduce({ length: 2, 0: 1, 1: 100 }, getMax); // 100\r\n *\r\n * // callback is not invoked\r\n * arrReduce({ length: 1, 0: 50 }, getMax); // 50\r\n * arrReduce({ length: 0 }, getMax, 1); // 1\r\n * ```\r\n */\r\nexport const arrReduce: (theArray: ArrayLike, callbackfn: ArrReduceCallbackFn, initialValue?: T | R) => R = _unwrapFunction(\"reduce\", ArrProto);\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { toISOString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { strNotSpecified } from \"../../Constants\";\r\nimport { _DYN_NAME } from \"../../__DynamicConstants\";\r\nimport { dataSanitizeString } from \"./DataSanitizer\";\r\nvar Envelope = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n function Envelope(logger, data, name) {\r\n var _this = this;\r\n var _self = this;\r\n _self.ver = 1;\r\n _self.sampleRate = 100.0;\r\n _self.tags = {};\r\n _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;\r\n _self.data = data;\r\n _self.time = toISOString(new Date());\r\n _self.aiDataContract = {\r\n time: 1 /* FieldType.Required */,\r\n iKey: 1 /* FieldType.Required */,\r\n name: 1 /* FieldType.Required */,\r\n sampleRate: function () {\r\n return (_this.sampleRate === 100) ? 4 /* FieldType.Hidden */ : 1 /* FieldType.Required */;\r\n },\r\n tags: 1 /* FieldType.Required */,\r\n data: 1 /* FieldType.Required */\r\n };\r\n }\r\n return Envelope;\r\n}());\r\nexport { Envelope };\r\n//# sourceMappingURL=Envelope.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { strNotSpecified } from \"../Constants\";\r\nimport { _DYN_MEASUREMENTS, _DYN_NAME, _DYN_PROPERTIES } from \"../__DynamicConstants\";\r\nimport { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString } from \"./Common/DataSanitizer\";\r\nvar Event = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the EventTelemetry object\r\n */\r\n function Event(logger, name, properties, measurements) {\r\n this.aiDataContract = {\r\n ver: 1 /* FieldType.Required */,\r\n name: 1 /* FieldType.Required */,\r\n properties: 0 /* FieldType.Default */,\r\n measurements: 0 /* FieldType.Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2;\r\n _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;\r\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\r\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\r\n }\r\n Event.envelopeType = \"Microsoft.ApplicationInsights.{0}.Event\";\r\n Event.dataType = \"EventData\";\r\n return Event;\r\n}());\r\nexport { Event };\r\n//# sourceMappingURL=Event.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { __assign } from \"tslib\";\r\nimport { arrForEach, arrMap, isArray, isError, isFunction, isNullOrUndefined, isObject, isString, strTrim } from \"@microsoft/applicationinsights-core-js\";\r\nimport { strIndexOf } from \"@nevware21/ts-utils\";\r\nimport { strNotSpecified } from \"../Constants\";\r\nimport { _DYN_ASSEMBLY, _DYN_EXCEPTIONS, _DYN_FILE_NAME, _DYN_HAS_FULL_STACK, _DYN_IS_MANUAL, _DYN_LENGTH, _DYN_LEVEL, _DYN_LINE, _DYN_MEASUREMENTS, _DYN_MESSAGE, _DYN_METHOD, _DYN_NAME, _DYN_PARSED_STACK, _DYN_PROBLEM_GROUP, _DYN_PROPERTIES, _DYN_SEVERITY_LEVEL, _DYN_SIZE_IN_BYTES, _DYN_SPLIT, _DYN_STRINGIFY, _DYN_TO_STRING, _DYN_TYPE_NAME, _DYN__CREATE_FROM_INTERFA1 } from \"../__DynamicConstants\";\r\nimport { dataSanitizeException, dataSanitizeMeasurements, dataSanitizeMessage, dataSanitizeProperties, dataSanitizeString } from \"./Common/DataSanitizer\";\r\nvar NoMethod = \"\";\r\nvar strError = \"error\";\r\nvar strStack = \"stack\";\r\nvar strStackDetails = \"stackDetails\";\r\nvar strErrorSrc = \"errorSrc\";\r\nvar strMessage = \"message\";\r\nvar strDescription = \"description\";\r\nfunction _stringify(value, convertToString) {\r\n var result = value;\r\n if (result && !isString(result)) {\r\n if (JSON && JSON[_DYN_STRINGIFY /* @min:%2estringify */]) {\r\n result = JSON[_DYN_STRINGIFY /* @min:%2estringify */](value);\r\n if (convertToString && (!result || result === \"{}\")) {\r\n if (isFunction(value[_DYN_TO_STRING /* @min:%2etoString */])) {\r\n result = value[_DYN_TO_STRING /* @min:%2etoString */]();\r\n }\r\n else {\r\n result = \"\" + value;\r\n }\r\n }\r\n }\r\n else {\r\n result = \"\" + value + \" - (Missing JSON.stringify)\";\r\n }\r\n }\r\n return result || \"\";\r\n}\r\nfunction _formatMessage(theEvent, errorType) {\r\n var evtMessage = theEvent;\r\n if (theEvent) {\r\n if (evtMessage && !isString(evtMessage)) {\r\n evtMessage = theEvent[strMessage] || theEvent[strDescription] || evtMessage;\r\n }\r\n // Make sure the message is a string\r\n if (evtMessage && !isString(evtMessage)) {\r\n // tslint:disable-next-line: prefer-conditional-expression\r\n evtMessage = _stringify(evtMessage, true);\r\n }\r\n if (theEvent[\"filename\"]) {\r\n // Looks like an event object with filename\r\n evtMessage = evtMessage + \" @\" + (theEvent[\"filename\"] || \"\") + \":\" + (theEvent[\"lineno\"] || \"?\") + \":\" + (theEvent[\"colno\"] || \"?\");\r\n }\r\n }\r\n // Automatically add the error type to the message if it does already appear to be present\r\n if (errorType && errorType !== \"String\" && errorType !== \"Object\" && errorType !== \"Error\" && strIndexOf(evtMessage || \"\", errorType) === -1) {\r\n evtMessage = errorType + \": \" + evtMessage;\r\n }\r\n return evtMessage || \"\";\r\n}\r\nfunction _isExceptionDetailsInternal(value) {\r\n try {\r\n if (isObject(value)) {\r\n return \"hasFullStack\" in value && \"typeName\" in value;\r\n }\r\n }\r\n catch (e) {\r\n // This can happen with some native browser objects, but should not happen for the type we are checking for\r\n }\r\n return false;\r\n}\r\nfunction _isExceptionInternal(value) {\r\n try {\r\n if (isObject(value)) {\r\n return (\"ver\" in value && \"exceptions\" in value && \"properties\" in value);\r\n }\r\n }\r\n catch (e) {\r\n // This can happen with some native browser objects, but should not happen for the type we are checking for\r\n }\r\n return false;\r\n}\r\nfunction _isStackDetails(details) {\r\n return details && details.src && isString(details.src) && details.obj && isArray(details.obj);\r\n}\r\nfunction _convertStackObj(errorStack) {\r\n var src = errorStack || \"\";\r\n if (!isString(src)) {\r\n if (isString(src[strStack])) {\r\n src = src[strStack];\r\n }\r\n else {\r\n src = \"\" + src;\r\n }\r\n }\r\n var items = src[_DYN_SPLIT /* @min:%2esplit */](\"\\n\");\r\n return {\r\n src: src,\r\n obj: items\r\n };\r\n}\r\nfunction _getOperaStack(errorMessage) {\r\n var stack = [];\r\n var lines = errorMessage[_DYN_SPLIT /* @min:%2esplit */](\"\\n\");\r\n for (var lp = 0; lp < lines[_DYN_LENGTH /* @min:%2elength */]; lp++) {\r\n var entry = lines[lp];\r\n if (lines[lp + 1]) {\r\n entry += \"@\" + lines[lp + 1];\r\n lp++;\r\n }\r\n stack.push(entry);\r\n }\r\n return {\r\n src: errorMessage,\r\n obj: stack\r\n };\r\n}\r\nfunction _getStackFromErrorObj(errorObj) {\r\n var details = null;\r\n if (errorObj) {\r\n try {\r\n /* Using bracket notation is support older browsers (IE 7/8 -- dont remember the version) that throw when using dot\r\n notation for undefined objects and we don't want to loose the error from being reported */\r\n if (errorObj[strStack]) {\r\n // Chrome/Firefox\r\n details = _convertStackObj(errorObj[strStack]);\r\n }\r\n else if (errorObj[strError] && errorObj[strError][strStack]) {\r\n // Edge error event provides the stack and error object\r\n details = _convertStackObj(errorObj[strError][strStack]);\r\n }\r\n else if (errorObj[\"exception\"] && errorObj.exception[strStack]) {\r\n details = _convertStackObj(errorObj.exception[strStack]);\r\n }\r\n else if (_isStackDetails(errorObj)) {\r\n details = errorObj;\r\n }\r\n else if (_isStackDetails(errorObj[strStackDetails])) {\r\n details = errorObj[strStackDetails];\r\n }\r\n else if (window && window[\"opera\"] && errorObj[strMessage]) {\r\n // Opera\r\n details = _getOperaStack(errorObj[_DYN_MESSAGE /* @min:%2emessage */]);\r\n }\r\n else if (errorObj[\"reason\"] && errorObj.reason[strStack]) {\r\n // UnhandledPromiseRejection\r\n details = _convertStackObj(errorObj.reason[strStack]);\r\n }\r\n else if (isString(errorObj)) {\r\n details = _convertStackObj(errorObj);\r\n }\r\n else {\r\n var evtMessage = errorObj[strMessage] || errorObj[strDescription] || \"\";\r\n if (isString(errorObj[strErrorSrc])) {\r\n if (evtMessage) {\r\n evtMessage += \"\\n\";\r\n }\r\n evtMessage += \" from \" + errorObj[strErrorSrc];\r\n }\r\n if (evtMessage) {\r\n details = _convertStackObj(evtMessage);\r\n }\r\n }\r\n }\r\n catch (e) {\r\n // something unexpected happened so to avoid failing to report any error lets swallow the exception\r\n // and fallback to the callee/caller method\r\n details = _convertStackObj(e);\r\n }\r\n }\r\n return details || {\r\n src: \"\",\r\n obj: null\r\n };\r\n}\r\nfunction _formatStackTrace(stackDetails) {\r\n var stack = \"\";\r\n if (stackDetails) {\r\n if (stackDetails.obj) {\r\n arrForEach(stackDetails.obj, function (entry) {\r\n stack += entry + \"\\n\";\r\n });\r\n }\r\n else {\r\n stack = stackDetails.src || \"\";\r\n }\r\n }\r\n return stack;\r\n}\r\nfunction _parseStack(stack) {\r\n var parsedStack;\r\n var frames = stack.obj;\r\n if (frames && frames[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n parsedStack = [];\r\n var level_1 = 0;\r\n var totalSizeInBytes_1 = 0;\r\n arrForEach(frames, function (frame) {\r\n var theFrame = frame[_DYN_TO_STRING /* @min:%2etoString */]();\r\n if (_StackFrame.regex.test(theFrame)) {\r\n var parsedFrame = new _StackFrame(theFrame, level_1++);\r\n totalSizeInBytes_1 += parsedFrame[_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */];\r\n parsedStack.push(parsedFrame);\r\n }\r\n });\r\n // DP Constraint - exception parsed stack must be < 32KB\r\n // remove frames from the middle to meet the threshold\r\n var exceptionParsedStackThreshold = 32 * 1024;\r\n if (totalSizeInBytes_1 > exceptionParsedStackThreshold) {\r\n var left = 0;\r\n var right = parsedStack[_DYN_LENGTH /* @min:%2elength */] - 1;\r\n var size = 0;\r\n var acceptedLeft = left;\r\n var acceptedRight = right;\r\n while (left < right) {\r\n // check size\r\n var lSize = parsedStack[left][_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */];\r\n var rSize = parsedStack[right][_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */];\r\n size += lSize + rSize;\r\n if (size > exceptionParsedStackThreshold) {\r\n // remove extra frames from the middle\r\n var howMany = acceptedRight - acceptedLeft + 1;\r\n parsedStack.splice(acceptedLeft, howMany);\r\n break;\r\n }\r\n // update pointers\r\n acceptedLeft = left;\r\n acceptedRight = right;\r\n left++;\r\n right--;\r\n }\r\n }\r\n }\r\n return parsedStack;\r\n}\r\nfunction _getErrorType(errorType) {\r\n // Gets the Error Type by passing the constructor (used to get the true type of native error object).\r\n var typeName = \"\";\r\n if (errorType) {\r\n typeName = errorType.typeName || errorType[_DYN_NAME /* @min:%2ename */] || \"\";\r\n if (!typeName) {\r\n try {\r\n var funcNameRegex = /function (.{1,200})\\(/;\r\n var results = (funcNameRegex).exec((errorType).constructor[_DYN_TO_STRING /* @min:%2etoString */]());\r\n typeName = (results && results[_DYN_LENGTH /* @min:%2elength */] > 1) ? results[1] : \"\";\r\n }\r\n catch (e) {\r\n // eslint-disable-next-line no-empty -- Ignoring any failures as nothing we can do\r\n }\r\n }\r\n }\r\n return typeName;\r\n}\r\n/**\r\n * Formats the provided errorObj for display and reporting, it may be a String, Object, integer or undefined depending on the browser.\r\n * @param errorObj - The supplied errorObj\r\n */\r\nexport function _formatErrorCode(errorObj) {\r\n if (errorObj) {\r\n try {\r\n if (!isString(errorObj)) {\r\n var errorType = _getErrorType(errorObj);\r\n var result = _stringify(errorObj, false);\r\n if (!result || result === \"{}\") {\r\n if (errorObj[strError]) {\r\n // Looks like an MS Error Event\r\n errorObj = errorObj[strError];\r\n errorType = _getErrorType(errorObj);\r\n }\r\n result = _stringify(errorObj, true);\r\n }\r\n if (strIndexOf(result, errorType) !== 0 && errorType !== \"String\") {\r\n return errorType + \":\" + result;\r\n }\r\n return result;\r\n }\r\n }\r\n catch (e) {\r\n // eslint-disable-next-line no-empty -- Ignoring any failures as nothing we can do\r\n }\r\n }\r\n // Fallback to just letting the object format itself into a string\r\n return \"\" + (errorObj || \"\");\r\n}\r\nvar Exception = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the ExceptionTelemetry object\r\n */\r\n function Exception(logger, exception, properties, measurements, severityLevel, id) {\r\n this.aiDataContract = {\r\n ver: 1 /* FieldType.Required */,\r\n exceptions: 1 /* FieldType.Required */,\r\n severityLevel: 0 /* FieldType.Default */,\r\n properties: 0 /* FieldType.Default */,\r\n measurements: 0 /* FieldType.Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2; // TODO: handle the CS\"4.0\" ==> breeze 2 conversion in a better way\r\n if (!_isExceptionInternal(exception)) {\r\n if (!properties) {\r\n properties = {};\r\n }\r\n _self[_DYN_EXCEPTIONS /* @min:%2eexceptions */] = [new _ExceptionDetails(logger, exception, properties)];\r\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\r\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\r\n if (severityLevel) {\r\n _self[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */] = severityLevel;\r\n }\r\n if (id) {\r\n _self.id = id;\r\n }\r\n }\r\n else {\r\n _self[_DYN_EXCEPTIONS /* @min:%2eexceptions */] = exception[_DYN_EXCEPTIONS /* @min:%2eexceptions */] || [];\r\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = exception[_DYN_PROPERTIES /* @min:%2eproperties */];\r\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = exception[_DYN_MEASUREMENTS /* @min:%2emeasurements */];\r\n if (exception[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */]) {\r\n _self[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */] = exception[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */];\r\n }\r\n if (exception.id) {\r\n _self.id = exception.id;\r\n }\r\n if (exception[_DYN_PROBLEM_GROUP /* @min:%2eproblemGroup */]) {\r\n _self[_DYN_PROBLEM_GROUP /* @min:%2eproblemGroup */] = exception[_DYN_PROBLEM_GROUP /* @min:%2eproblemGroup */];\r\n }\r\n // bool/int types, use isNullOrUndefined\r\n if (!isNullOrUndefined(exception[_DYN_IS_MANUAL /* @min:%2eisManual */])) {\r\n _self[_DYN_IS_MANUAL /* @min:%2eisManual */] = exception[_DYN_IS_MANUAL /* @min:%2eisManual */];\r\n }\r\n }\r\n }\r\n Exception.CreateAutoException = function (message, url, lineNumber, columnNumber, error, evt, stack, errorSrc) {\r\n var _a;\r\n var errorType = _getErrorType(error || evt || message);\r\n return _a = {},\r\n _a[_DYN_MESSAGE /* @min:message */] = _formatMessage(message, errorType),\r\n _a.url = url,\r\n _a.lineNumber = lineNumber,\r\n _a.columnNumber = columnNumber,\r\n _a.error = _formatErrorCode(error || evt || message),\r\n _a.evt = _formatErrorCode(evt || message),\r\n _a[_DYN_TYPE_NAME /* @min:typeName */] = errorType,\r\n _a.stackDetails = _getStackFromErrorObj(stack || error || evt),\r\n _a.errorSrc = errorSrc,\r\n _a;\r\n };\r\n Exception.CreateFromInterface = function (logger, exception, properties, measurements) {\r\n var exceptions = exception[_DYN_EXCEPTIONS /* @min:%2eexceptions */]\r\n && arrMap(exception[_DYN_EXCEPTIONS /* @min:%2eexceptions */], function (ex) { return _ExceptionDetails[_DYN__CREATE_FROM_INTERFA1 /* @min:%2eCreateFromInterface */](logger, ex); });\r\n var exceptionData = new Exception(logger, __assign(__assign({}, exception), { exceptions: exceptions }), properties, measurements);\r\n return exceptionData;\r\n };\r\n Exception.prototype.toInterface = function () {\r\n var _a;\r\n var _b = this, exceptions = _b.exceptions, properties = _b.properties, measurements = _b.measurements, severityLevel = _b.severityLevel, problemGroup = _b.problemGroup, id = _b.id, isManual = _b.isManual;\r\n var exceptionDetailsInterface = exceptions instanceof Array\r\n && arrMap(exceptions, function (exception) { return exception.toInterface(); })\r\n || undefined;\r\n return _a = {\r\n ver: \"4.0\"\r\n },\r\n _a[_DYN_EXCEPTIONS /* @min:exceptions */] = exceptionDetailsInterface,\r\n _a.severityLevel = severityLevel,\r\n _a.properties = properties,\r\n _a.measurements = measurements,\r\n _a.problemGroup = problemGroup,\r\n _a.id = id,\r\n _a.isManual = isManual,\r\n _a;\r\n };\r\n /**\r\n * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.\r\n */\r\n Exception.CreateSimpleException = function (message, typeName, assembly, fileName, details, line) {\r\n var _a;\r\n return {\r\n exceptions: [\r\n (_a = {},\r\n _a[_DYN_HAS_FULL_STACK /* @min:hasFullStack */] = true,\r\n _a.message = message,\r\n _a.stack = details,\r\n _a.typeName = typeName,\r\n _a)\r\n ]\r\n };\r\n };\r\n Exception.envelopeType = \"Microsoft.ApplicationInsights.{0}.Exception\";\r\n Exception.dataType = \"ExceptionData\";\r\n Exception.formatError = _formatErrorCode;\r\n return Exception;\r\n}());\r\nexport { Exception };\r\nvar _ExceptionDetails = /** @class */ (function () {\r\n function _ExceptionDetails(logger, exception, properties) {\r\n this.aiDataContract = {\r\n id: 0 /* FieldType.Default */,\r\n outerId: 0 /* FieldType.Default */,\r\n typeName: 1 /* FieldType.Required */,\r\n message: 1 /* FieldType.Required */,\r\n hasFullStack: 0 /* FieldType.Default */,\r\n stack: 0 /* FieldType.Default */,\r\n parsedStack: 2 /* FieldType.Array */\r\n };\r\n var _self = this;\r\n if (!_isExceptionDetailsInternal(exception)) {\r\n var error = exception;\r\n var evt = error && error.evt;\r\n if (!isError(error)) {\r\n error = error[strError] || evt || error;\r\n }\r\n _self[_DYN_TYPE_NAME /* @min:%2etypeName */] = dataSanitizeString(logger, _getErrorType(error)) || strNotSpecified;\r\n _self[_DYN_MESSAGE /* @min:%2emessage */] = dataSanitizeMessage(logger, _formatMessage(exception || error, _self[_DYN_TYPE_NAME /* @min:%2etypeName */])) || strNotSpecified;\r\n var stack = exception[strStackDetails] || _getStackFromErrorObj(exception);\r\n _self[_DYN_PARSED_STACK /* @min:%2eparsedStack */] = _parseStack(stack);\r\n // after parsedStack is inited, iterate over each frame object, sanitize its assembly field\r\n if (isArray(_self[_DYN_PARSED_STACK /* @min:%2eparsedStack */])) {\r\n arrMap(_self[_DYN_PARSED_STACK /* @min:%2eparsedStack */], function (frame) { return frame[_DYN_ASSEMBLY /* @min:%2eassembly */] = dataSanitizeString(logger, frame[_DYN_ASSEMBLY /* @min:%2eassembly */]); });\r\n }\r\n _self[strStack] = dataSanitizeException(logger, _formatStackTrace(stack));\r\n _self.hasFullStack = isArray(_self.parsedStack) && _self.parsedStack[_DYN_LENGTH /* @min:%2elength */] > 0;\r\n if (properties) {\r\n properties[_DYN_TYPE_NAME /* @min:%2etypeName */] = properties[_DYN_TYPE_NAME /* @min:%2etypeName */] || _self[_DYN_TYPE_NAME /* @min:%2etypeName */];\r\n }\r\n }\r\n else {\r\n _self[_DYN_TYPE_NAME /* @min:%2etypeName */] = exception[_DYN_TYPE_NAME /* @min:%2etypeName */];\r\n _self[_DYN_MESSAGE /* @min:%2emessage */] = exception[_DYN_MESSAGE /* @min:%2emessage */];\r\n _self[strStack] = exception[strStack];\r\n _self[_DYN_PARSED_STACK /* @min:%2eparsedStack */] = exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */] || [];\r\n _self[_DYN_HAS_FULL_STACK /* @min:%2ehasFullStack */] = exception[_DYN_HAS_FULL_STACK /* @min:%2ehasFullStack */];\r\n }\r\n }\r\n _ExceptionDetails.prototype.toInterface = function () {\r\n var _a;\r\n var _self = this;\r\n var parsedStack = _self[_DYN_PARSED_STACK /* @min:%2eparsedStack */] instanceof Array\r\n && arrMap(_self[_DYN_PARSED_STACK /* @min:%2eparsedStack */], function (frame) { return frame.toInterface(); });\r\n var exceptionDetailsInterface = (_a = {\r\n id: _self.id,\r\n outerId: _self.outerId,\r\n typeName: _self[_DYN_TYPE_NAME /* @min:%2etypeName */],\r\n message: _self[_DYN_MESSAGE /* @min:%2emessage */],\r\n hasFullStack: _self[_DYN_HAS_FULL_STACK /* @min:%2ehasFullStack */],\r\n stack: _self[strStack]\r\n },\r\n _a[_DYN_PARSED_STACK /* @min:parsedStack */] = parsedStack || undefined,\r\n _a);\r\n return exceptionDetailsInterface;\r\n };\r\n _ExceptionDetails.CreateFromInterface = function (logger, exception) {\r\n var parsedStack = (exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */] instanceof Array\r\n && arrMap(exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */], function (frame) { return _StackFrame[_DYN__CREATE_FROM_INTERFA1 /* @min:%2eCreateFromInterface */](frame); }))\r\n || exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */];\r\n var exceptionDetails = new _ExceptionDetails(logger, __assign(__assign({}, exception), { parsedStack: parsedStack }));\r\n return exceptionDetails;\r\n };\r\n return _ExceptionDetails;\r\n}());\r\nexport { _ExceptionDetails };\r\nvar _StackFrame = /** @class */ (function () {\r\n function _StackFrame(sourceFrame, level) {\r\n this.aiDataContract = {\r\n level: 1 /* FieldType.Required */,\r\n method: 1 /* FieldType.Required */,\r\n assembly: 0 /* FieldType.Default */,\r\n fileName: 0 /* FieldType.Default */,\r\n line: 0 /* FieldType.Default */\r\n };\r\n var _self = this;\r\n _self[_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */] = 0;\r\n // Not converting this to isString() as typescript uses this logic to \"understand\" the different\r\n // types for the 2 different code paths\r\n if (typeof sourceFrame === \"string\") {\r\n var frame = sourceFrame;\r\n _self[_DYN_LEVEL /* @min:%2elevel */] = level;\r\n _self[_DYN_METHOD /* @min:%2emethod */] = NoMethod;\r\n _self[_DYN_ASSEMBLY /* @min:%2eassembly */] = strTrim(frame);\r\n _self[_DYN_FILE_NAME /* @min:%2efileName */] = \"\";\r\n _self[_DYN_LINE /* @min:%2eline */] = 0;\r\n var matches = frame.match(_StackFrame.regex);\r\n if (matches && matches[_DYN_LENGTH /* @min:%2elength */] >= 5) {\r\n _self[_DYN_METHOD /* @min:%2emethod */] = strTrim(matches[2]) || _self[_DYN_METHOD /* @min:%2emethod */];\r\n _self[_DYN_FILE_NAME /* @min:%2efileName */] = strTrim(matches[4]);\r\n _self[_DYN_LINE /* @min:%2eline */] = parseInt(matches[5]) || 0;\r\n }\r\n }\r\n else {\r\n _self[_DYN_LEVEL /* @min:%2elevel */] = sourceFrame[_DYN_LEVEL /* @min:%2elevel */];\r\n _self[_DYN_METHOD /* @min:%2emethod */] = sourceFrame[_DYN_METHOD /* @min:%2emethod */];\r\n _self[_DYN_ASSEMBLY /* @min:%2eassembly */] = sourceFrame[_DYN_ASSEMBLY /* @min:%2eassembly */];\r\n _self[_DYN_FILE_NAME /* @min:%2efileName */] = sourceFrame[_DYN_FILE_NAME /* @min:%2efileName */];\r\n _self[_DYN_LINE /* @min:%2eline */] = sourceFrame[_DYN_LINE /* @min:%2eline */];\r\n _self[_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */] = 0;\r\n }\r\n _self.sizeInBytes += _self.method[_DYN_LENGTH /* @min:%2elength */];\r\n _self.sizeInBytes += _self.fileName[_DYN_LENGTH /* @min:%2elength */];\r\n _self.sizeInBytes += _self.assembly[_DYN_LENGTH /* @min:%2elength */];\r\n // todo: these might need to be removed depending on how the back-end settles on their size calculation\r\n _self[_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */] += _StackFrame.baseSize;\r\n _self.sizeInBytes += _self.level.toString()[_DYN_LENGTH /* @min:%2elength */];\r\n _self.sizeInBytes += _self.line.toString()[_DYN_LENGTH /* @min:%2elength */];\r\n }\r\n _StackFrame.CreateFromInterface = function (frame) {\r\n return new _StackFrame(frame, null /* level is available in frame interface */);\r\n };\r\n _StackFrame.prototype.toInterface = function () {\r\n var _self = this;\r\n return {\r\n level: _self[_DYN_LEVEL /* @min:%2elevel */],\r\n method: _self[_DYN_METHOD /* @min:%2emethod */],\r\n assembly: _self[_DYN_ASSEMBLY /* @min:%2eassembly */],\r\n fileName: _self[_DYN_FILE_NAME /* @min:%2efileName */],\r\n line: _self[_DYN_LINE /* @min:%2eline */]\r\n };\r\n };\r\n // regex to match stack frames from ie/chrome/ff\r\n // methodName=$2, fileName=$4, lineNo=$5, column=$6\r\n _StackFrame.regex = /^([\\s]+at)?[\\s]{0,50}([^\\@\\()]+?)[\\s]{0,50}(\\@|\\()([^\\(\\n]+):([0-9]+):([0-9]+)(\\)?)$/;\r\n _StackFrame.baseSize = 58; // '{\"method\":\"\",\"level\":,\"assembly\":\"\",\"fileName\":\"\",\"line\":}'.length\r\n return _StackFrame;\r\n}());\r\nexport { _StackFrame };\r\n//# sourceMappingURL=Exception.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { ArrProto } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\n/**\r\n * The arrMap() method creates a new array populated with the results of calling a provided function on every\r\n * element in the calling array.\r\n *\r\n * `arrMap` calls a provided callbackFn function once for each element in an array, in order, and constructs\r\n * a new array from the results. callbackFn is invoked only for indexes of the array which have assigned\r\n * values (including undefined).\r\n *\r\n * It is not called for missing elements of the array; that is:\r\n * - indexes that have never been set;\r\n * - indexes which have been deleted.\r\n *\r\n * @since 0.3.3\r\n * @group Array\r\n * @group ArrayLike\r\n * @typeParam T - Identifies the type of the array elements\r\n * @typeParam R - Identifies the type of the elements returned by the callback function, defaults to T.\r\n * @param theArray - The array or array like object of elements to be searched.\r\n * @param callbackFn - The function that is called for evetn element of `theArray`.\r\n * @param thisArg - The value to use as the `this` when executing the `callbackFn`.\r\n * @example\r\n * ```ts\r\n * const numbers = [1, 4, 9];\r\n * const roots = arrMap(numbers, (num) => Math.sqrt(num));\r\n *\r\n * // roots is now [1, 2, 3]\r\n * // numbers is still [1, 4, 9]\r\n *\r\n * const kvArray = [{ key: 1, value: 10 },\r\n * { key: 2, value: 20 },\r\n * { key: 3, value: 30 }];\r\n *\r\n * const reformattedArray = arrMap(kvArray, ({ key, value}) => ({ [key]: value }));\r\n *\r\n * // reformattedArray is now [{1: 10}, {2: 20}, {3: 30}],\r\n *\r\n * // kvArray is still:\r\n * // [{key: 1, value: 10},\r\n * // {key: 2, value: 20},\r\n * // {key: 3, value: 30}]\r\n *\r\n * // Also supports Array Like objects with same output\r\n * const kvArray = {\r\n * length: 3,\r\n * 0: { key: 1, value: 10 },\r\n * 1: { key: 2, value: 20 },\r\n * 2: { key: 3, value: 30 }\r\n * };\r\n * ```\r\n */\r\nexport var arrMap = _unwrapFunction(\"map\", ArrProto);\r\n//# sourceMappingURL=map.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ArrProto } from \"../internal/constants\";\r\nimport { _unwrapFunction } from \"../internal/unwrapFunction\";\r\nimport { ArrMapCallbackFn } from \"./callbacks\";\r\n\r\n/**\r\n * The arrMap() method creates a new array populated with the results of calling a provided function on every\r\n * element in the calling array.\r\n *\r\n * `arrMap` calls a provided callbackFn function once for each element in an array, in order, and constructs\r\n * a new array from the results. callbackFn is invoked only for indexes of the array which have assigned\r\n * values (including undefined).\r\n *\r\n * It is not called for missing elements of the array; that is:\r\n * - indexes that have never been set;\r\n * - indexes which have been deleted.\r\n *\r\n * @since 0.3.3\r\n * @group Array\r\n * @group ArrayLike\r\n * @typeParam T - Identifies the type of the array elements\r\n * @typeParam R - Identifies the type of the elements returned by the callback function, defaults to T.\r\n * @param theArray - The array or array like object of elements to be searched.\r\n * @param callbackFn - The function that is called for evetn element of `theArray`.\r\n * @param thisArg - The value to use as the `this` when executing the `callbackFn`.\r\n * @example\r\n * ```ts\r\n * const numbers = [1, 4, 9];\r\n * const roots = arrMap(numbers, (num) => Math.sqrt(num));\r\n *\r\n * // roots is now [1, 2, 3]\r\n * // numbers is still [1, 4, 9]\r\n *\r\n * const kvArray = [{ key: 1, value: 10 },\r\n * { key: 2, value: 20 },\r\n * { key: 3, value: 30 }];\r\n *\r\n * const reformattedArray = arrMap(kvArray, ({ key, value}) => ({ [key]: value }));\r\n *\r\n * // reformattedArray is now [{1: 10}, {2: 20}, {3: 30}],\r\n *\r\n * // kvArray is still:\r\n * // [{key: 1, value: 10},\r\n * // {key: 2, value: 20},\r\n * // {key: 3, value: 30}]\r\n *\r\n * // Also supports Array Like objects with same output\r\n * const kvArray = {\r\n * length: 3,\r\n * 0: { key: 1, value: 10 },\r\n * 1: { key: 2, value: 20 },\r\n * 2: { key: 3, value: 30 }\r\n * };\r\n * ```\r\n */\r\nexport const arrMap: (theArray: ArrayLike, callbackFn: ArrMapCallbackFn, thisArg?: any) => R[] = _unwrapFunction(\"map\", ArrProto);\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { strNotSpecified } from \"../Constants\";\r\nimport { _DYN_COUNT, _DYN_MEASUREMENTS, _DYN_NAME, _DYN_PROPERTIES } from \"../__DynamicConstants\";\r\nimport { DataPoint } from \"./Common/DataPoint\";\r\nimport { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString } from \"./Common/DataSanitizer\";\r\nvar Metric = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the MetricTelemetry object\r\n */\r\n function Metric(logger, name, value, count, min, max, stdDev, properties, measurements) {\r\n this.aiDataContract = {\r\n ver: 1 /* FieldType.Required */,\r\n metrics: 1 /* FieldType.Required */,\r\n properties: 0 /* FieldType.Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2;\r\n var dataPoint = new DataPoint();\r\n dataPoint[_DYN_COUNT /* @min:%2ecount */] = count > 0 ? count : undefined;\r\n dataPoint.max = isNaN(max) || max === null ? undefined : max;\r\n dataPoint.min = isNaN(min) || min === null ? undefined : min;\r\n dataPoint[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;\r\n dataPoint.value = value;\r\n dataPoint.stdDev = isNaN(stdDev) || stdDev === null ? undefined : stdDev;\r\n _self.metrics = [dataPoint];\r\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\r\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\r\n }\r\n Metric.envelopeType = \"Microsoft.ApplicationInsights.{0}.Metric\";\r\n Metric.dataType = \"MetricData\";\r\n return Metric;\r\n}());\r\nexport { Metric };\r\n//# sourceMappingURL=Metric.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar DataPoint = /** @class */ (function () {\r\n function DataPoint() {\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n this.aiDataContract = {\r\n name: 1 /* FieldType.Required */,\r\n kind: 0 /* FieldType.Default */,\r\n value: 1 /* FieldType.Required */,\r\n count: 0 /* FieldType.Default */,\r\n min: 0 /* FieldType.Default */,\r\n max: 0 /* FieldType.Default */,\r\n stdDev: 0 /* FieldType.Default */\r\n };\r\n /**\r\n * Metric type. Single measurement or the aggregated value.\r\n */\r\n this.kind = 0 /* DataPointType.Measurement */;\r\n }\r\n return DataPoint;\r\n}());\r\nexport { DataPoint };\r\n//# sourceMappingURL=DataPoint.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { strNotSpecified } from \"../Constants\";\r\nimport { msToTimeSpan } from \"../HelperFuncs\";\r\nimport { _DYN_DURATION, _DYN_MEASUREMENTS, _DYN_NAME, _DYN_PROPERTIES } from \"../__DynamicConstants\";\r\nimport { dataSanitizeId, dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from \"./Common/DataSanitizer\";\r\nvar PageView = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n function PageView(logger, name, url, durationMs, properties, measurements, id) {\r\n this.aiDataContract = {\r\n ver: 1 /* FieldType.Required */,\r\n name: 0 /* FieldType.Default */,\r\n url: 0 /* FieldType.Default */,\r\n duration: 0 /* FieldType.Default */,\r\n properties: 0 /* FieldType.Default */,\r\n measurements: 0 /* FieldType.Default */,\r\n id: 0 /* FieldType.Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2;\r\n _self.id = dataSanitizeId(logger, id);\r\n _self.url = dataSanitizeUrl(logger, url);\r\n _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;\r\n if (!isNaN(durationMs)) {\r\n _self[_DYN_DURATION /* @min:%2eduration */] = msToTimeSpan(durationMs);\r\n }\r\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\r\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\r\n }\r\n PageView.envelopeType = \"Microsoft.ApplicationInsights.{0}.Pageview\";\r\n PageView.dataType = \"PageviewData\";\r\n return PageView;\r\n}());\r\nexport { PageView };\r\n//# sourceMappingURL=PageView.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrForEach, isString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_LENGTH, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\r\nvar strEmpty = \"\";\r\nexport function stringToBoolOrDefault(str, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = false; }\r\n if (str === undefined || str === null) {\r\n return defaultValue;\r\n }\r\n return str.toString()[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() === \"true\";\r\n}\r\n/**\r\n * Convert ms to c# time span format\r\n */\r\nexport function msToTimeSpan(totalms) {\r\n if (isNaN(totalms) || totalms < 0) {\r\n totalms = 0;\r\n }\r\n totalms = Math.round(totalms);\r\n var ms = strEmpty + totalms % 1000;\r\n var sec = strEmpty + Math.floor(totalms / 1000) % 60;\r\n var min = strEmpty + Math.floor(totalms / (1000 * 60)) % 60;\r\n var hour = strEmpty + Math.floor(totalms / (1000 * 60 * 60)) % 24;\r\n var days = Math.floor(totalms / (1000 * 60 * 60 * 24));\r\n ms = ms[_DYN_LENGTH /* @min:%2elength */] === 1 ? \"00\" + ms : ms[_DYN_LENGTH /* @min:%2elength */] === 2 ? \"0\" + ms : ms;\r\n sec = sec[_DYN_LENGTH /* @min:%2elength */] < 2 ? \"0\" + sec : sec;\r\n min = min[_DYN_LENGTH /* @min:%2elength */] < 2 ? \"0\" + min : min;\r\n hour = hour[_DYN_LENGTH /* @min:%2elength */] < 2 ? \"0\" + hour : hour;\r\n return (days > 0 ? days + \".\" : strEmpty) + hour + \":\" + min + \":\" + sec + \".\" + ms;\r\n}\r\nexport function getExtensionByName(extensions, identifier) {\r\n var extension = null;\r\n arrForEach(extensions, function (value) {\r\n if (value.identifier === identifier) {\r\n extension = value;\r\n return -1;\r\n }\r\n });\r\n return extension;\r\n}\r\nexport function isCrossOriginError(message, url, lineNumber, columnNumber, error) {\r\n return !error && isString(message) && (message === \"Script error.\" || message === \"Script error\");\r\n}\r\n//# sourceMappingURL=HelperFuncs.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { msToTimeSpan } from \"../HelperFuncs\";\r\nimport { AjaxHelperParseDependencyPath } from \"../Util\";\r\nimport { _DYN_DURATION, _DYN_MEASUREMENTS, _DYN_NAME, _DYN_PROPERTIES } from \"../__DynamicConstants\";\r\nimport { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from \"./Common/DataSanitizer\";\r\nvar RemoteDependencyData = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the RemoteDependencyData object\r\n */\r\n function RemoteDependencyData(logger, id, absoluteUrl, commandName, value, success, resultCode, method, requestAPI, correlationContext, properties, measurements) {\r\n if (requestAPI === void 0) { requestAPI = \"Ajax\"; }\r\n this.aiDataContract = {\r\n id: 1 /* FieldType.Required */,\r\n ver: 1 /* FieldType.Required */,\r\n name: 0 /* FieldType.Default */,\r\n resultCode: 0 /* FieldType.Default */,\r\n duration: 0 /* FieldType.Default */,\r\n success: 0 /* FieldType.Default */,\r\n data: 0 /* FieldType.Default */,\r\n target: 0 /* FieldType.Default */,\r\n type: 0 /* FieldType.Default */,\r\n properties: 0 /* FieldType.Default */,\r\n measurements: 0 /* FieldType.Default */,\r\n kind: 0 /* FieldType.Default */,\r\n value: 0 /* FieldType.Default */,\r\n count: 0 /* FieldType.Default */,\r\n min: 0 /* FieldType.Default */,\r\n max: 0 /* FieldType.Default */,\r\n stdDev: 0 /* FieldType.Default */,\r\n dependencyKind: 0 /* FieldType.Default */,\r\n dependencySource: 0 /* FieldType.Default */,\r\n commandName: 0 /* FieldType.Default */,\r\n dependencyTypeName: 0 /* FieldType.Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2;\r\n _self.id = id;\r\n _self[_DYN_DURATION /* @min:%2eduration */] = msToTimeSpan(value);\r\n _self.success = success;\r\n _self.resultCode = resultCode + \"\";\r\n _self.type = dataSanitizeString(logger, requestAPI);\r\n var dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);\r\n _self.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data; // get a value from hosturl if commandName not available\r\n _self.target = dataSanitizeString(logger, dependencyFields.target);\r\n if (correlationContext) {\r\n _self.target = \"\".concat(_self.target, \" | \").concat(correlationContext);\r\n }\r\n _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, dependencyFields[_DYN_NAME /* @min:%2ename */]);\r\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\r\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\r\n }\r\n RemoteDependencyData.envelopeType = \"Microsoft.ApplicationInsights.{0}.RemoteDependency\";\r\n RemoteDependencyData.dataType = \"RemoteDependencyData\";\r\n return RemoteDependencyData;\r\n}());\r\nexport { RemoteDependencyData };\r\n//# sourceMappingURL=RemoteDependencyData.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { strNotSpecified } from \"../Constants\";\r\nimport { _DYN_MEASUREMENTS, _DYN_MESSAGE, _DYN_PROPERTIES, _DYN_SEVERITY_LEVEL } from \"../__DynamicConstants\";\r\nimport { dataSanitizeMeasurements, dataSanitizeMessage, dataSanitizeProperties } from \"./Common/DataSanitizer\";\r\nvar Trace = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the TraceTelemetry object\r\n */\r\n function Trace(logger, message, severityLevel, properties, measurements) {\r\n this.aiDataContract = {\r\n ver: 1 /* FieldType.Required */,\r\n message: 1 /* FieldType.Required */,\r\n severityLevel: 0 /* FieldType.Default */,\r\n properties: 0 /* FieldType.Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2;\r\n message = message || strNotSpecified;\r\n _self[_DYN_MESSAGE /* @min:%2emessage */] = dataSanitizeMessage(logger, message);\r\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\r\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\r\n if (severityLevel) {\r\n _self[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */] = severityLevel;\r\n }\r\n }\r\n Trace.envelopeType = \"Microsoft.ApplicationInsights.{0}.Message\";\r\n Trace.dataType = \"MessageData\";\r\n return Trace;\r\n}());\r\nexport { Trace };\r\n//# sourceMappingURL=Trace.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { strNotSpecified } from \"../Constants\";\r\nimport { _DYN_DURATION, _DYN_MEASUREMENTS, _DYN_NAME, _DYN_PROPERTIES, _DYN_RECEIVED_RESPONSE } from \"../__DynamicConstants\";\r\nimport { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from \"./Common/DataSanitizer\";\r\nvar PageViewPerformance = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n function PageViewPerformance(logger, name, url, unused, properties, measurements, cs4BaseData) {\r\n this.aiDataContract = {\r\n ver: 1 /* FieldType.Required */,\r\n name: 0 /* FieldType.Default */,\r\n url: 0 /* FieldType.Default */,\r\n duration: 0 /* FieldType.Default */,\r\n perfTotal: 0 /* FieldType.Default */,\r\n networkConnect: 0 /* FieldType.Default */,\r\n sentRequest: 0 /* FieldType.Default */,\r\n receivedResponse: 0 /* FieldType.Default */,\r\n domProcessing: 0 /* FieldType.Default */,\r\n properties: 0 /* FieldType.Default */,\r\n measurements: 0 /* FieldType.Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2;\r\n _self.url = dataSanitizeUrl(logger, url);\r\n _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;\r\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\r\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\r\n if (cs4BaseData) {\r\n _self.domProcessing = cs4BaseData.domProcessing;\r\n _self[_DYN_DURATION /* @min:%2eduration */] = cs4BaseData[_DYN_DURATION /* @min:%2eduration */];\r\n _self.networkConnect = cs4BaseData.networkConnect;\r\n _self.perfTotal = cs4BaseData.perfTotal;\r\n _self[_DYN_RECEIVED_RESPONSE /* @min:%2ereceivedResponse */] = cs4BaseData[_DYN_RECEIVED_RESPONSE /* @min:%2ereceivedResponse */];\r\n _self.sentRequest = cs4BaseData.sentRequest;\r\n }\r\n }\r\n PageViewPerformance.envelopeType = \"Microsoft.ApplicationInsights.{0}.PageviewPerformance\";\r\n PageViewPerformance.dataType = \"PageviewPerformanceData\";\r\n return PageViewPerformance;\r\n}());\r\nexport { PageViewPerformance };\r\n//# sourceMappingURL=PageViewPerformance.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Data = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n function Data(baseType, data) {\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n this.aiDataContract = {\r\n baseType: 1 /* FieldType.Required */,\r\n baseData: 1 /* FieldType.Required */\r\n };\r\n this.baseType = baseType;\r\n this.baseData = data;\r\n }\r\n return Data;\r\n}());\r\nexport { Data };\r\n//# sourceMappingURL=Data.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { __extends } from \"tslib\";\r\nimport { createClassFromInterface } from \"@microsoft/applicationinsights-core-js\";\r\nfunction _aiNameFunc(baseName) {\r\n var aiName = \"ai.\" + baseName + \".\";\r\n return function (name) {\r\n return aiName + name;\r\n };\r\n}\r\nvar _aiApplication = _aiNameFunc(\"application\");\r\nvar _aiDevice = _aiNameFunc(\"device\");\r\nvar _aiLocation = _aiNameFunc(\"location\");\r\nvar _aiOperation = _aiNameFunc(\"operation\");\r\nvar _aiSession = _aiNameFunc(\"session\");\r\nvar _aiUser = _aiNameFunc(\"user\");\r\nvar _aiCloud = _aiNameFunc(\"cloud\");\r\nvar _aiInternal = _aiNameFunc(\"internal\");\r\nvar ContextTagKeys = /** @class */ (function (_super) {\r\n __extends(ContextTagKeys, _super);\r\n function ContextTagKeys() {\r\n return _super.call(this) || this;\r\n }\r\n return ContextTagKeys;\r\n}(createClassFromInterface({\r\n applicationVersion: _aiApplication(\"ver\"),\r\n applicationBuild: _aiApplication(\"build\"),\r\n applicationTypeId: _aiApplication(\"typeId\"),\r\n applicationId: _aiApplication(\"applicationId\"),\r\n applicationLayer: _aiApplication(\"layer\"),\r\n deviceId: _aiDevice(\"id\"),\r\n deviceIp: _aiDevice(\"ip\"),\r\n deviceLanguage: _aiDevice(\"language\"),\r\n deviceLocale: _aiDevice(\"locale\"),\r\n deviceModel: _aiDevice(\"model\"),\r\n deviceFriendlyName: _aiDevice(\"friendlyName\"),\r\n deviceNetwork: _aiDevice(\"network\"),\r\n deviceNetworkName: _aiDevice(\"networkName\"),\r\n deviceOEMName: _aiDevice(\"oemName\"),\r\n deviceOS: _aiDevice(\"os\"),\r\n deviceOSVersion: _aiDevice(\"osVersion\"),\r\n deviceRoleInstance: _aiDevice(\"roleInstance\"),\r\n deviceRoleName: _aiDevice(\"roleName\"),\r\n deviceScreenResolution: _aiDevice(\"screenResolution\"),\r\n deviceType: _aiDevice(\"type\"),\r\n deviceMachineName: _aiDevice(\"machineName\"),\r\n deviceVMName: _aiDevice(\"vmName\"),\r\n deviceBrowser: _aiDevice(\"browser\"),\r\n deviceBrowserVersion: _aiDevice(\"browserVersion\"),\r\n locationIp: _aiLocation(\"ip\"),\r\n locationCountry: _aiLocation(\"country\"),\r\n locationProvince: _aiLocation(\"province\"),\r\n locationCity: _aiLocation(\"city\"),\r\n operationId: _aiOperation(\"id\"),\r\n operationName: _aiOperation(\"name\"),\r\n operationParentId: _aiOperation(\"parentId\"),\r\n operationRootId: _aiOperation(\"rootId\"),\r\n operationSyntheticSource: _aiOperation(\"syntheticSource\"),\r\n operationCorrelationVector: _aiOperation(\"correlationVector\"),\r\n sessionId: _aiSession(\"id\"),\r\n sessionIsFirst: _aiSession(\"isFirst\"),\r\n sessionIsNew: _aiSession(\"isNew\"),\r\n userAccountAcquisitionDate: _aiUser(\"accountAcquisitionDate\"),\r\n userAccountId: _aiUser(\"accountId\"),\r\n userAgent: _aiUser(\"userAgent\"),\r\n userId: _aiUser(\"id\"),\r\n userStoreRegion: _aiUser(\"storeRegion\"),\r\n userAuthUserId: _aiUser(\"authUserId\"),\r\n userAnonymousUserAcquisitionDate: _aiUser(\"anonUserAcquisitionDate\"),\r\n userAuthenticatedUserAcquisitionDate: _aiUser(\"authUserAcquisitionDate\"),\r\n cloudName: _aiCloud(\"name\"),\r\n cloudRole: _aiCloud(\"role\"),\r\n cloudRoleVer: _aiCloud(\"roleVer\"),\r\n cloudRoleInstance: _aiCloud(\"roleInstance\"),\r\n cloudEnvironment: _aiCloud(\"environment\"),\r\n cloudLocation: _aiCloud(\"location\"),\r\n cloudDeploymentUnit: _aiCloud(\"deploymentUnit\"),\r\n internalNodeName: _aiInternal(\"nodeName\"),\r\n internalSdkVersion: _aiInternal(\"sdkVersion\"),\r\n internalAgentVersion: _aiInternal(\"agentVersion\"),\r\n internalSnippet: _aiInternal(\"snippet\"),\r\n internalSdkSrc: _aiInternal(\"sdkSrc\")\r\n})));\r\nexport { ContextTagKeys };\r\n//# sourceMappingURL=ContextTagKeys.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { isNullOrUndefined, objForEachKey, throwError, toISOString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { strIkey, strNotSpecified } from \"./Constants\";\r\nimport { dataSanitizeString } from \"./Telemetry/Common/DataSanitizer\";\r\nimport { _DYN_NAME } from \"./__DynamicConstants\";\r\n/**\r\n * Create a telemetry item that the 1DS channel understands\r\n * @param item - domain specific properties; part B\r\n * @param baseType - telemetry item type. ie PageViewData\r\n * @param envelopeName - name of the envelope. ie Microsoft.ApplicationInsights..PageView\r\n * @param customProperties - user defined custom properties; part C\r\n * @param systemProperties - system properties that are added to the context; part A\r\n * @returns ITelemetryItem that is sent to channel\r\n */\r\nexport function createTelemetryItem(item, baseType, envelopeName, logger, customProperties, systemProperties) {\r\n var _a;\r\n envelopeName = dataSanitizeString(logger, envelopeName) || strNotSpecified;\r\n if (isNullOrUndefined(item) ||\r\n isNullOrUndefined(baseType) ||\r\n isNullOrUndefined(envelopeName)) {\r\n throwError(\"Input doesn't contain all required fields\");\r\n }\r\n var iKey = \"\";\r\n if (item[strIkey]) {\r\n iKey = item[strIkey];\r\n delete item[strIkey];\r\n }\r\n var telemetryItem = (_a = {},\r\n _a[_DYN_NAME /* @min:name */] = envelopeName,\r\n _a.time = toISOString(new Date()),\r\n _a.iKey = iKey,\r\n _a.ext = systemProperties ? systemProperties : {},\r\n _a.tags = [],\r\n _a.data = {},\r\n _a.baseType = baseType,\r\n _a.baseData = item // Part B\r\n ,\r\n _a);\r\n // Part C\r\n if (!isNullOrUndefined(customProperties)) {\r\n objForEachKey(customProperties, function (prop, value) {\r\n telemetryItem.data[prop] = value;\r\n });\r\n }\r\n return telemetryItem;\r\n}\r\nvar TelemetryItemCreator = /** @class */ (function () {\r\n function TelemetryItemCreator() {\r\n }\r\n /**\r\n * Create a telemetry item that the 1DS channel understands\r\n * @param item - domain specific properties; part B\r\n * @param baseType - telemetry item type. ie PageViewData\r\n * @param envelopeName - name of the envelope. ie Microsoft.ApplicationInsights..PageView\r\n * @param customProperties - user defined custom properties; part C\r\n * @param systemProperties - system properties that are added to the context; part A\r\n * @returns ITelemetryItem that is sent to channel\r\n */\r\n TelemetryItemCreator.create = createTelemetryItem;\r\n return TelemetryItemCreator;\r\n}());\r\nexport { TelemetryItemCreator };\r\n//# sourceMappingURL=TelemetryItemCreator.js.map","import { ContextTagKeys } from \"./Contracts/ContextTagKeys\";\r\nexport var Extensions = {\r\n UserExt: \"user\",\r\n DeviceExt: \"device\",\r\n TraceExt: \"trace\",\r\n WebExt: \"web\",\r\n AppExt: \"app\",\r\n OSExt: \"os\",\r\n SessionExt: \"ses\",\r\n SDKExt: \"sdk\"\r\n};\r\nexport var CtxTagKeys = new ContextTagKeys();\r\n//# sourceMappingURL=PartAExtensions.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { getDocument, isFunction } from \"@microsoft/applicationinsights-core-js\";\r\nexport function createDomEvent(eventName) {\r\n var event = null;\r\n if (isFunction(Event)) { // Use Event constructor when available\r\n event = new Event(eventName);\r\n }\r\n else { // Event has no constructor in IE\r\n var doc = getDocument();\r\n if (doc && doc.createEvent) {\r\n event = doc.createEvent(\"Event\");\r\n event.initEvent(eventName, true, true);\r\n }\r\n }\r\n return event;\r\n}\r\n//# sourceMappingURL=DomHelperFuncs.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { _throwInternal, dumpObj, getExceptionName, getGlobal, getGlobalInst, isNullOrUndefined, objForEachKey } from \"@microsoft/applicationinsights-core-js\";\r\nimport { StorageType } from \"./Enums\";\r\nimport { _DYN_REMOVE_ITEM, _DYN_TO_STRING } from \"./__DynamicConstants\";\r\nvar _canUseLocalStorage = undefined;\r\nvar _canUseSessionStorage = undefined;\r\n/**\r\n * Gets the localStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\nfunction _getLocalStorageObject() {\r\n if (utlCanUseLocalStorage()) {\r\n return _getVerifiedStorageObject(StorageType.LocalStorage);\r\n }\r\n return null;\r\n}\r\n/**\r\n * Tests storage object (localStorage or sessionStorage) to verify that it is usable\r\n * More details here: https://mathiasbynens.be/notes/localstorage-pattern\r\n * @param storageType - Type of storage\r\n * @return {Storage} Returns storage object verified that it is usable\r\n */\r\nfunction _getVerifiedStorageObject(storageType) {\r\n try {\r\n if (isNullOrUndefined(getGlobal())) {\r\n return null;\r\n }\r\n var uid = (new Date)[_DYN_TO_STRING /* @min:%2etoString */]();\r\n var storage = getGlobalInst(storageType === StorageType.LocalStorage ? \"localStorage\" : \"sessionStorage\");\r\n storage.setItem(uid, uid);\r\n var fail = storage.getItem(uid) !== uid;\r\n storage[_DYN_REMOVE_ITEM /* @min:%2eremoveItem */](uid);\r\n if (!fail) {\r\n return storage;\r\n }\r\n }\r\n catch (exception) {\r\n // eslint-disable-next-line no-empty\r\n }\r\n return null;\r\n}\r\n/**\r\n * Gets the sessionStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\nfunction _getSessionStorageObject() {\r\n if (utlCanUseSessionStorage()) {\r\n return _getVerifiedStorageObject(StorageType.SessionStorage);\r\n }\r\n return null;\r\n}\r\n/**\r\n * Disables the global SDK usage of local or session storage if available\r\n */\r\nexport function utlDisableStorage() {\r\n _canUseLocalStorage = false;\r\n _canUseSessionStorage = false;\r\n}\r\n/**\r\n * Re-enables the global SDK usage of local or session storage if available\r\n */\r\nexport function utlEnableStorage() {\r\n _canUseLocalStorage = utlCanUseLocalStorage(true);\r\n _canUseSessionStorage = utlCanUseSessionStorage(true);\r\n}\r\n/**\r\n * Returns whether LocalStorage can be used, if the reset parameter is passed a true this will override\r\n * any previous disable calls.\r\n * @param reset - Should the usage be reset and determined only based on whether LocalStorage is available\r\n */\r\nexport function utlCanUseLocalStorage(reset) {\r\n if (reset || _canUseLocalStorage === undefined) {\r\n _canUseLocalStorage = !!_getVerifiedStorageObject(StorageType.LocalStorage);\r\n }\r\n return _canUseLocalStorage;\r\n}\r\nexport function utlGetLocalStorage(logger, name) {\r\n var storage = _getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n }\r\n catch (e) {\r\n _canUseLocalStorage = false;\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 1 /* _eInternalMessageId.BrowserCannotReadLocalStorage */, \"Browser failed read of local storage. \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n return null;\r\n}\r\nexport function utlSetLocalStorage(logger, name, data) {\r\n var storage = _getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n }\r\n catch (e) {\r\n _canUseLocalStorage = false;\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 3 /* _eInternalMessageId.BrowserCannotWriteLocalStorage */, \"Browser failed write to local storage. \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n return false;\r\n}\r\nexport function utlRemoveStorage(logger, name) {\r\n var storage = _getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage[_DYN_REMOVE_ITEM /* @min:%2eremoveItem */](name);\r\n return true;\r\n }\r\n catch (e) {\r\n _canUseLocalStorage = false;\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 5 /* _eInternalMessageId.BrowserFailedRemovalFromLocalStorage */, \"Browser failed removal of local storage item. \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n return false;\r\n}\r\nexport function utlCanUseSessionStorage(reset) {\r\n if (reset || _canUseSessionStorage === undefined) {\r\n _canUseSessionStorage = !!_getVerifiedStorageObject(StorageType.SessionStorage);\r\n }\r\n return _canUseSessionStorage;\r\n}\r\nexport function utlGetSessionStorageKeys() {\r\n var keys = [];\r\n if (utlCanUseSessionStorage()) {\r\n objForEachKey(getGlobalInst(\"sessionStorage\"), function (key) {\r\n keys.push(key);\r\n });\r\n }\r\n return keys;\r\n}\r\nexport function utlGetSessionStorage(logger, name) {\r\n var storage = _getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n }\r\n catch (e) {\r\n _canUseSessionStorage = false;\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 2 /* _eInternalMessageId.BrowserCannotReadSessionStorage */, \"Browser failed read of session storage. \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n return null;\r\n}\r\nexport function utlSetSessionStorage(logger, name, data) {\r\n var storage = _getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n }\r\n catch (e) {\r\n _canUseSessionStorage = false;\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 4 /* _eInternalMessageId.BrowserCannotWriteSessionStorage */, \"Browser failed write to session storage. \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n return false;\r\n}\r\nexport function utlRemoveSessionStorage(logger, name) {\r\n var storage = _getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage[_DYN_REMOVE_ITEM /* @min:%2eremoveItem */](name);\r\n return true;\r\n }\r\n catch (e) {\r\n _canUseSessionStorage = false;\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 6 /* _eInternalMessageId.BrowserFailedRemovalFromSessionStorage */, \"Browser failed removal of session storage item. \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n return false;\r\n}\r\n//# sourceMappingURL=StorageHelperFuncs.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { createEnumStyle } from \"@microsoft/applicationinsights-core-js\";\r\nexport var StorageType = createEnumStyle({\r\n LocalStorage: 0 /* eStorageType.LocalStorage */,\r\n SessionStorage: 1 /* eStorageType.SessionStorage */\r\n});\r\nexport var DistributedTracingModes = createEnumStyle({\r\n AI: 0 /* eDistributedTracingModes.AI */,\r\n AI_AND_W3C: 1 /* eDistributedTracingModes.AI_AND_W3C */,\r\n W3C: 2 /* eDistributedTracingModes.W3C */\r\n});\r\n//# sourceMappingURL=Enums.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nvar _a;\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { isFunction, objDefine } from \"@nevware21/ts-utils\";\r\nimport { createDynamicConfig } from \"../Config/DynamicConfig\";\r\nimport { _DYN_CREATE_NEW, _DYN_DIAG_LOG, _DYN_GET_NEXT, _DYN_GET_PROCESS_TEL_CONT0, _DYN_INITIALIZE, _DYN_IS_ASYNC, _DYN_IS_INITIALIZED, _DYN_PROCESS_NEXT, _DYN_SET_NEXT_PLUGIN, _DYN_TEARDOWN, _DYN_UPDATE, _DYN__DO_TEARDOWN } from \"../__DynamicConstants\";\r\nimport { safeGetLogger } from \"./DiagnosticLogger\";\r\nimport { isNotNullOrUndefined, proxyFunctionAs } from \"./HelperFuncs\";\r\nimport { STR_CORE, STR_EXTENSION_CONFIG, STR_PROCESS_TELEMETRY } from \"./InternalConstants\";\r\nimport { createProcessTelemetryContext, createProcessTelemetryUnloadContext, createProcessTelemetryUpdateContext } from \"./ProcessTelemetryContext\";\r\nimport { createUnloadHandlerContainer } from \"./UnloadHandlerContainer\";\r\nimport { createUnloadHookContainer } from \"./UnloadHookContainer\";\r\nvar strGetPlugin = \"getPlugin\";\r\nvar defaultValues = (_a = {},\r\n _a[STR_EXTENSION_CONFIG] = { isVal: isNotNullOrUndefined, v: {} },\r\n _a);\r\n/**\r\n * BaseTelemetryPlugin provides a basic implementation of the ITelemetryPlugin interface so that plugins\r\n * can avoid implementation the same set of boiler plate code as well as provide a base\r\n * implementation so that new default implementations can be added without breaking all plugins.\r\n */\r\nvar BaseTelemetryPlugin = /** @class */ (function () {\r\n function BaseTelemetryPlugin() {\r\n var _self = this; // Setting _self here as it's used outside of the dynamicProto as well\r\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\r\n var _isinitialized;\r\n var _rootCtx; // Used as the root context, holding the current config and initialized core\r\n var _nextPlugin; // Used for backward compatibility where plugins don't call the main pipeline\r\n var _unloadHandlerContainer;\r\n var _hookContainer;\r\n _initDefaults();\r\n dynamicProto(BaseTelemetryPlugin, _self, function (_self) {\r\n _self[_DYN_INITIALIZE /* @min:%2einitialize */] = function (config, core, extensions, pluginChain) {\r\n _setDefaults(config, core, pluginChain);\r\n _isinitialized = true;\r\n };\r\n _self[_DYN_TEARDOWN /* @min:%2eteardown */] = function (unloadCtx, unloadState) {\r\n var _a;\r\n // If this plugin has already been torn down (not operational) or is not initialized (core is not set)\r\n // or the core being used for unload was not the same core used for initialization.\r\n var core = _self[STR_CORE /* @min:%2ecore */];\r\n if (!core || (unloadCtx && core !== unloadCtx[STR_CORE /* @min:%2ecore */]())) {\r\n // Do Nothing as either the plugin is not initialized or was not initialized by the current core\r\n return;\r\n }\r\n var result;\r\n var unloadDone = false;\r\n var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);\r\n var theUnloadState = unloadState || (_a = {\r\n reason: 0 /* TelemetryUnloadReason.ManualTeardown */\r\n },\r\n _a[_DYN_IS_ASYNC /* @min:isAsync */] = false,\r\n _a);\r\n function _unloadCallback() {\r\n if (!unloadDone) {\r\n unloadDone = true;\r\n _unloadHandlerContainer.run(theUnloadCtx, unloadState);\r\n _hookContainer.run(theUnloadCtx[_DYN_DIAG_LOG /* @min:%2ediagLog */]());\r\n if (result === true) {\r\n theUnloadCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](theUnloadState);\r\n }\r\n _initDefaults();\r\n }\r\n }\r\n if (!_self[_DYN__DO_TEARDOWN /* @min:%2e_doTeardown */] || _self[_DYN__DO_TEARDOWN /* @min:%2e_doTeardown */](theUnloadCtx, theUnloadState, _unloadCallback) !== true) {\r\n _unloadCallback();\r\n }\r\n else {\r\n // Tell the caller that we will be calling processNext()\r\n result = true;\r\n }\r\n return result;\r\n };\r\n _self[_DYN_UPDATE /* @min:%2eupdate */] = function (updateCtx, updateState) {\r\n // If this plugin has already been torn down (not operational) or is not initialized (core is not set)\r\n // or the core being used for unload was not the same core used for initialization.\r\n var core = _self[STR_CORE /* @min:%2ecore */];\r\n if (!core || (updateCtx && core !== updateCtx[STR_CORE /* @min:%2ecore */]())) {\r\n // Do Nothing\r\n return;\r\n }\r\n var result;\r\n var updateDone = false;\r\n var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);\r\n var theUpdateState = updateState || {\r\n reason: 0 /* TelemetryUpdateReason.Unknown */\r\n };\r\n function _updateCallback() {\r\n if (!updateDone) {\r\n updateDone = true;\r\n _setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx[_DYN_GET_NEXT /* @min:%2egetNext */]());\r\n }\r\n }\r\n if (!_self._doUpdate || _self._doUpdate(theUpdateCtx, theUpdateState, _updateCallback) !== true) {\r\n _updateCallback();\r\n }\r\n else {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n proxyFunctionAs(_self, \"_addUnloadCb\", function () { return _unloadHandlerContainer; }, \"add\");\r\n proxyFunctionAs(_self, \"_addHook\", function () { return _hookContainer; }, \"add\");\r\n objDefine(_self, \"_unloadHooks\", { g: function () { return _hookContainer; } });\r\n });\r\n // These are added after the dynamicProto so that are not moved to the prototype\r\n _self[_DYN_DIAG_LOG /* @min:%2ediagLog */] = function (itemCtx) {\r\n return _getTelCtx(itemCtx)[_DYN_DIAG_LOG /* @min:%2ediagLog */]();\r\n };\r\n _self[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */] = function () {\r\n return _isinitialized;\r\n };\r\n _self.setInitialized = function (isInitialized) {\r\n _isinitialized = isInitialized;\r\n };\r\n // _self.getNextPlugin = () => DO NOT IMPLEMENT\r\n // Sub-classes of this base class *should* not be relying on this value and instead\r\n // should use processNext() function. If you require access to the plugin use the\r\n // IProcessTelemetryContext.getNext().getPlugin() while in the pipeline, Note getNext() may return null.\r\n _self[_DYN_SET_NEXT_PLUGIN /* @min:%2esetNextPlugin */] = function (next) {\r\n _nextPlugin = next;\r\n };\r\n _self[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */] = function (env, itemCtx) {\r\n if (itemCtx) {\r\n // Normal core execution sequence\r\n itemCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](env);\r\n }\r\n else if (_nextPlugin && isFunction(_nextPlugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */])) {\r\n // Looks like backward compatibility or out of band processing. And as it looks\r\n // like a ITelemetryPlugin or ITelemetryPluginChain, just call processTelemetry\r\n _nextPlugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */](env, null);\r\n }\r\n };\r\n _self._getTelCtx = _getTelCtx;\r\n function _getTelCtx(currentCtx) {\r\n if (currentCtx === void 0) { currentCtx = null; }\r\n var itemCtx = currentCtx;\r\n if (!itemCtx) {\r\n var rootCtx = _rootCtx || createProcessTelemetryContext(null, {}, _self[STR_CORE /* @min:%2ecore */]);\r\n // tslint:disable-next-line: prefer-conditional-expression\r\n if (_nextPlugin && _nextPlugin[strGetPlugin]) {\r\n // Looks like a chain object\r\n itemCtx = rootCtx[_DYN_CREATE_NEW /* @min:%2ecreateNew */](null, _nextPlugin[strGetPlugin]);\r\n }\r\n else {\r\n itemCtx = rootCtx[_DYN_CREATE_NEW /* @min:%2ecreateNew */](null, _nextPlugin);\r\n }\r\n }\r\n return itemCtx;\r\n }\r\n function _setDefaults(config, core, pluginChain) {\r\n // Make sure the extensionConfig exists and the config is dynamic\r\n createDynamicConfig(config, defaultValues, safeGetLogger(core));\r\n if (!pluginChain && core) {\r\n // Get the first plugin from the core\r\n pluginChain = core[_DYN_GET_PROCESS_TEL_CONT0 /* @min:%2egetProcessTelContext */]()[_DYN_GET_NEXT /* @min:%2egetNext */]();\r\n }\r\n var nextPlugin = _nextPlugin;\r\n if (_nextPlugin && _nextPlugin[strGetPlugin]) {\r\n // If it looks like a proxy/chain then get the plugin\r\n nextPlugin = _nextPlugin[strGetPlugin]();\r\n }\r\n // Support legacy plugins where core was defined as a property\r\n _self[STR_CORE /* @min:%2ecore */] = core;\r\n _rootCtx = createProcessTelemetryContext(pluginChain, config, core, nextPlugin);\r\n }\r\n function _initDefaults() {\r\n _isinitialized = false;\r\n _self[STR_CORE /* @min:%2ecore */] = null;\r\n _rootCtx = null;\r\n _nextPlugin = null;\r\n _hookContainer = createUnloadHookContainer();\r\n _unloadHandlerContainer = createUnloadHandlerContainer();\r\n }\r\n }\r\n BaseTelemetryPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Tear down the plugin and remove any hooked value, the plugin should be removed so that it is no longer initialized and\r\n * therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further\r\n * processTelemetry calls are ignored and it just calls the processNext() with the provided context.\r\n * @param unloadCtx - This is the context that should be used during unloading.\r\n * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.\r\n * @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.\r\n */\r\n BaseTelemetryPlugin.prototype.teardown = function (unloadCtx, unloadState) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return false;\r\n };\r\n /**\r\n * The the plugin should re-evaluate configuration and update any cached configuration settings.\r\n * @param updateCtx - This is the context that should be used during updating.\r\n * @param updateState - The details / state of the update process, it holds details like the current and previous configuration.\r\n * @returns boolean - true if the plugin has or will call updateCtx.processNext(), this allows the plugin to perform any asynchronous operations.\r\n */\r\n BaseTelemetryPlugin.prototype.update = function (updateCtx, updateState) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Add an unload handler that will be called when the SDK is being unloaded\r\n * @param handler - the handler\r\n */\r\n BaseTelemetryPlugin.prototype._addUnloadCb = function (handler) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Add this hook so that it is automatically removed during unloading\r\n * @param hooks - The single hook or an array of IInstrumentHook objects\r\n */\r\n BaseTelemetryPlugin.prototype._addHook = function (hooks) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return BaseTelemetryPlugin;\r\n}());\r\nexport { BaseTelemetryPlugin };\r\n//# sourceMappingURL=BaseTelemetryPlugin.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nimport { arrForEach, dumpObj, isArray, isFunction, isNullOrUndefined, isUndefined, objForEachKey, objFreeze, objKeys } from \"@nevware21/ts-utils\";\r\nimport { _applyDefaultValue } from \"../Config/ConfigDefaults\";\r\nimport { createDynamicConfig } from \"../Config/DynamicConfig\";\r\nimport { _DYN_CREATE_NEW, _DYN_DIAG_LOG, _DYN_GET_NEXT, _DYN_GET_PLUGIN, _DYN_IDENTIFIER, _DYN_IS_ASYNC, _DYN_IS_INITIALIZED, _DYN_LENGTH, _DYN_LOGGER, _DYN_PROCESS_NEXT, _DYN_PUSH, _DYN_SET_DF, _DYN_SET_NEXT_PLUGIN, _DYN_TEARDOWN, _DYN_UNLOAD, _DYN_UPDATE } from \"../__DynamicConstants\";\r\nimport { _throwInternal, safeGetLogger } from \"./DiagnosticLogger\";\r\nimport { proxyFunctions } from \"./HelperFuncs\";\r\nimport { STR_CORE, STR_DISABLED, STR_EMPTY, STR_EXTENSION_CONFIG, STR_PRIORITY, STR_PROCESS_TELEMETRY } from \"./InternalConstants\";\r\nimport { doPerf } from \"./PerfManager\";\r\nimport { _getPluginState } from \"./TelemetryHelpers\";\r\nvar strTelemetryPluginChain = \"TelemetryPluginChain\";\r\nvar strHasRunFlags = \"_hasRun\";\r\nvar strGetTelCtx = \"_getTelCtx\";\r\nvar _chainId = 0;\r\nfunction _getNextProxyStart(proxy, core, startAt) {\r\n while (proxy) {\r\n if (proxy[_DYN_GET_PLUGIN /* @min:%2egetPlugin */]() === startAt) {\r\n return proxy;\r\n }\r\n proxy = proxy[_DYN_GET_NEXT /* @min:%2egetNext */]();\r\n }\r\n // This wasn't found in the existing chain so create an isolated one with just this plugin\r\n return createTelemetryProxyChain([startAt], core.config || {}, core);\r\n}\r\n/**\r\n * @ignore\r\n * @param telemetryChain\r\n * @param dynamicHandler\r\n * @param core\r\n * @param startAt - Identifies the next plugin to execute, if null there is no \"next\" plugin and if undefined it should assume the start of the chain\r\n * @returns\r\n */\r\nfunction _createInternalContext(telemetryChain, dynamicHandler, core, startAt) {\r\n // We have a special case where we want to start execution from this specific plugin\r\n // or we simply reuse the existing telemetry plugin chain (normal execution case)\r\n var _nextProxy = null; // By Default set as no next plugin\r\n var _onComplete = [];\r\n if (!dynamicHandler) {\r\n dynamicHandler = createDynamicConfig({}, null, core[_DYN_LOGGER /* @min:%2elogger */]);\r\n }\r\n if (startAt !== null) {\r\n // There is no next element (null) vs not defined (undefined) so use the full chain\r\n _nextProxy = startAt ? _getNextProxyStart(telemetryChain, core, startAt) : telemetryChain;\r\n }\r\n var context = {\r\n _next: _moveNext,\r\n ctx: {\r\n core: function () {\r\n return core;\r\n },\r\n diagLog: function () {\r\n return safeGetLogger(core, dynamicHandler.cfg);\r\n },\r\n getCfg: function () {\r\n return dynamicHandler.cfg;\r\n },\r\n getExtCfg: _resolveExtCfg,\r\n getConfig: _getConfig,\r\n hasNext: function () {\r\n return !!_nextProxy;\r\n },\r\n getNext: function () {\r\n return _nextProxy;\r\n },\r\n setNext: function (nextPlugin) {\r\n _nextProxy = nextPlugin;\r\n },\r\n iterate: _iterateChain,\r\n onComplete: _addOnComplete\r\n }\r\n };\r\n function _addOnComplete(onComplete, that) {\r\n var args = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n args[_i - 2] = arguments[_i];\r\n }\r\n if (onComplete) {\r\n _onComplete[_DYN_PUSH /* @min:%2epush */]({\r\n func: onComplete,\r\n self: !isUndefined(that) ? that : context.ctx,\r\n args: args\r\n });\r\n }\r\n }\r\n function _moveNext() {\r\n var nextProxy = _nextProxy;\r\n // Automatically move to the next plugin\r\n _nextProxy = nextProxy ? nextProxy[_DYN_GET_NEXT /* @min:%2egetNext */]() : null;\r\n if (!nextProxy) {\r\n var onComplete = _onComplete;\r\n if (onComplete && onComplete[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n arrForEach(onComplete, function (completeDetails) {\r\n try {\r\n completeDetails.func.call(completeDetails.self, completeDetails.args);\r\n }\r\n catch (e) {\r\n _throwInternal(core[_DYN_LOGGER /* @min:%2elogger */], 2 /* eLoggingSeverity.WARNING */, 73 /* _eInternalMessageId.PluginException */, \"Unexpected Exception during onComplete - \" + dumpObj(e));\r\n }\r\n });\r\n _onComplete = [];\r\n }\r\n }\r\n return nextProxy;\r\n }\r\n function _getExtCfg(identifier, createIfMissing) {\r\n var idCfg = null;\r\n var cfg = dynamicHandler.cfg;\r\n if (cfg && identifier) {\r\n var extCfg = cfg[STR_EXTENSION_CONFIG /* @min:%2eextensionConfig */];\r\n if (!extCfg && createIfMissing) {\r\n extCfg = {};\r\n }\r\n // Always set the value so that the property always exists\r\n cfg[STR_EXTENSION_CONFIG] = extCfg; // Note: it is valid for the \"value\" to be undefined\r\n // Calling `ref()` has a side effect of causing the referenced property to become dynamic (if not already)\r\n extCfg = dynamicHandler.ref(cfg, STR_EXTENSION_CONFIG);\r\n if (extCfg) {\r\n idCfg = extCfg[identifier];\r\n if (!idCfg && createIfMissing) {\r\n idCfg = {};\r\n }\r\n // Always set the value so that the property always exists\r\n extCfg[identifier] = idCfg; // Note: it is valid for the \"value\" to be undefined\r\n // Calling `ref()` has a side effect of causing the referenced property to become dynamic (if not already)\r\n idCfg = dynamicHandler.ref(extCfg, identifier);\r\n }\r\n }\r\n return idCfg;\r\n }\r\n function _resolveExtCfg(identifier, defaultValues) {\r\n var newConfig = _getExtCfg(identifier, true);\r\n if (defaultValues) {\r\n // Enumerate over the defaultValues and if not already populated attempt to\r\n // find a value from the root config or use the default value\r\n objForEachKey(defaultValues, function (field, defaultValue) {\r\n // for each unspecified field, set the default value\r\n if (isNullOrUndefined(newConfig[field])) {\r\n var cfgValue = dynamicHandler.cfg[field];\r\n if (cfgValue || !isNullOrUndefined(cfgValue)) {\r\n newConfig[field] = cfgValue;\r\n }\r\n }\r\n _applyDefaultValue(dynamicHandler, newConfig, field, defaultValue);\r\n });\r\n }\r\n return dynamicHandler[_DYN_SET_DF /* @min:%2esetDf */](newConfig, defaultValues);\r\n }\r\n function _getConfig(identifier, field, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = false; }\r\n var theValue;\r\n var extConfig = _getExtCfg(identifier, false);\r\n var rootConfig = dynamicHandler.cfg;\r\n if (extConfig && (extConfig[field] || !isNullOrUndefined(extConfig[field]))) {\r\n theValue = extConfig[field];\r\n }\r\n else if (rootConfig[field] || !isNullOrUndefined(rootConfig[field])) {\r\n theValue = rootConfig[field];\r\n }\r\n return (theValue || !isNullOrUndefined(theValue)) ? theValue : defaultValue;\r\n }\r\n function _iterateChain(cb) {\r\n // Keep processing until we reach the end of the chain\r\n var nextPlugin;\r\n while (!!(nextPlugin = context._next())) {\r\n var plugin = nextPlugin[_DYN_GET_PLUGIN /* @min:%2egetPlugin */]();\r\n if (plugin) {\r\n // callback with the current on\r\n cb(plugin);\r\n }\r\n }\r\n }\r\n return context;\r\n}\r\n/**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n * @param startAt - Identifies the next plugin to execute, if null there is no \"next\" plugin and if undefined it should assume the start of the chain\r\n */\r\nexport function createProcessTelemetryContext(telemetryChain, cfg, core, startAt) {\r\n var config = createDynamicConfig(cfg);\r\n var internalContext = _createInternalContext(telemetryChain, config, core, startAt);\r\n var context = internalContext.ctx;\r\n function _processNext(env) {\r\n var nextPlugin = internalContext._next();\r\n if (nextPlugin) {\r\n // Run the next plugin which will call \"processNext()\"\r\n nextPlugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */](env, context);\r\n }\r\n return !nextPlugin;\r\n }\r\n function _createNew(plugins, startAt) {\r\n if (plugins === void 0) { plugins = null; }\r\n if (isArray(plugins)) {\r\n plugins = createTelemetryProxyChain(plugins, config.cfg, core, startAt);\r\n }\r\n return createProcessTelemetryContext(plugins || context[_DYN_GET_NEXT /* @min:%2egetNext */](), config.cfg, core, startAt);\r\n }\r\n context[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */] = _processNext;\r\n context[_DYN_CREATE_NEW /* @min:%2ecreateNew */] = _createNew;\r\n return context;\r\n}\r\n/**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain for handling the unloading of the chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n * @param startAt - Identifies the next plugin to execute, if null there is no \"next\" plugin and if undefined it should assume the start of the chain\r\n */\r\nexport function createProcessTelemetryUnloadContext(telemetryChain, core, startAt) {\r\n var config = createDynamicConfig(core.config);\r\n var internalContext = _createInternalContext(telemetryChain, config, core, startAt);\r\n var context = internalContext.ctx;\r\n function _processNext(unloadState) {\r\n var nextPlugin = internalContext._next();\r\n nextPlugin && nextPlugin[_DYN_UNLOAD /* @min:%2eunload */](context, unloadState);\r\n return !nextPlugin;\r\n }\r\n function _createNew(plugins, startAt) {\r\n if (plugins === void 0) { plugins = null; }\r\n if (isArray(plugins)) {\r\n plugins = createTelemetryProxyChain(plugins, config.cfg, core, startAt);\r\n }\r\n return createProcessTelemetryUnloadContext(plugins || context[_DYN_GET_NEXT /* @min:%2egetNext */](), core, startAt);\r\n }\r\n context[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */] = _processNext;\r\n context[_DYN_CREATE_NEW /* @min:%2ecreateNew */] = _createNew;\r\n return context;\r\n}\r\n/**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain for updating the configuration\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n * @param startAt - Identifies the next plugin to execute, if null there is no \"next\" plugin and if undefined it should assume the start of the chain\r\n */\r\nexport function createProcessTelemetryUpdateContext(telemetryChain, core, startAt) {\r\n var config = createDynamicConfig(core.config);\r\n var internalContext = _createInternalContext(telemetryChain, config, core, startAt);\r\n var context = internalContext.ctx;\r\n function _processNext(updateState) {\r\n return context.iterate(function (plugin) {\r\n if (isFunction(plugin[_DYN_UPDATE /* @min:%2eupdate */])) {\r\n plugin[_DYN_UPDATE /* @min:%2eupdate */](context, updateState);\r\n }\r\n });\r\n }\r\n function _createNew(plugins, startAt) {\r\n if (plugins === void 0) { plugins = null; }\r\n if (isArray(plugins)) {\r\n plugins = createTelemetryProxyChain(plugins, config.cfg, core, startAt);\r\n }\r\n return createProcessTelemetryUpdateContext(plugins || context[_DYN_GET_NEXT /* @min:%2egetNext */](), core, startAt);\r\n }\r\n context[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */] = _processNext;\r\n context[_DYN_CREATE_NEW /* @min:%2ecreateNew */] = _createNew;\r\n return context;\r\n}\r\n/**\r\n * Creates an execution chain from the array of plugins\r\n * @param plugins - The array of plugins that will be executed in this order\r\n * @param defItemCtx - The default execution context to use when no telemetry context is passed to processTelemetry(), this\r\n * should be for legacy plugins only. Currently, only used for passing the current core instance and to provide better error\r\n * reporting (hasRun) when errors occur.\r\n */\r\nexport function createTelemetryProxyChain(plugins, config, core, startAt) {\r\n var firstProxy = null;\r\n var add = startAt ? false : true;\r\n if (isArray(plugins) && plugins[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n // Create the proxies and wire up the next plugin chain\r\n var lastProxy_1 = null;\r\n arrForEach(plugins, function (thePlugin) {\r\n if (!add && startAt === thePlugin) {\r\n add = true;\r\n }\r\n if (add && thePlugin && isFunction(thePlugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */])) {\r\n // Only add plugins that are processors\r\n var newProxy = createTelemetryPluginProxy(thePlugin, config, core);\r\n if (!firstProxy) {\r\n firstProxy = newProxy;\r\n }\r\n if (lastProxy_1) {\r\n // Set this new proxy as the next for the previous one\r\n lastProxy_1._setNext(newProxy);\r\n }\r\n lastProxy_1 = newProxy;\r\n }\r\n });\r\n }\r\n if (startAt && !firstProxy) {\r\n // Special case where the \"startAt\" was not in the original list of plugins\r\n return createTelemetryProxyChain([startAt], config, core);\r\n }\r\n return firstProxy;\r\n}\r\n/**\r\n * Create the processing telemetry proxy instance, the proxy is used to abstract the current plugin to allow monitoring and\r\n * execution plugins while passing around the dynamic execution state (IProcessTelemetryContext), the proxy instance no longer\r\n * contains any execution state and can be reused between requests (this was not the case for 2.7.2 and earlier with the\r\n * TelemetryPluginChain class).\r\n * @param plugin - The plugin instance to proxy\r\n * @param config - The default execution context to use when no telemetry context is passed to processTelemetry(), this\r\n * should be for legacy plugins only. Currently, only used for passing the current core instance and to provide better error\r\n * reporting (hasRun) when errors occur.\r\n * @returns\r\n */\r\nexport function createTelemetryPluginProxy(plugin, config, core) {\r\n var nextProxy = null;\r\n var hasProcessTelemetry = isFunction(plugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */]);\r\n var hasSetNext = isFunction(plugin[_DYN_SET_NEXT_PLUGIN /* @min:%2esetNextPlugin */]);\r\n var chainId;\r\n if (plugin) {\r\n chainId = plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */] + \"-\" + plugin[STR_PRIORITY /* @min:%2epriority */] + \"-\" + _chainId++;\r\n }\r\n else {\r\n chainId = \"Unknown-0-\" + _chainId++;\r\n }\r\n var proxyChain = {\r\n getPlugin: function () {\r\n return plugin;\r\n },\r\n getNext: function () {\r\n return nextProxy;\r\n },\r\n processTelemetry: _processTelemetry,\r\n unload: _unloadPlugin,\r\n update: _updatePlugin,\r\n _id: chainId,\r\n _setNext: function (nextPlugin) {\r\n nextProxy = nextPlugin;\r\n }\r\n };\r\n function _getTelCtx() {\r\n var itemCtx;\r\n // Looks like a plugin didn't pass the (optional) context, so create a new one\r\n if (plugin && isFunction(plugin[strGetTelCtx])) {\r\n // This plugin extends from the BaseTelemetryPlugin so lets use it\r\n itemCtx = plugin[strGetTelCtx]();\r\n }\r\n if (!itemCtx) {\r\n // Create a temporary one\r\n itemCtx = createProcessTelemetryContext(proxyChain, config, core);\r\n }\r\n return itemCtx;\r\n }\r\n function _processChain(itemCtx, processPluginFn, name, details, isAsync) {\r\n var hasRun = false;\r\n var identifier = plugin ? plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */] : strTelemetryPluginChain;\r\n var hasRunContext = itemCtx[strHasRunFlags];\r\n if (!hasRunContext) {\r\n // Assign and populate\r\n hasRunContext = itemCtx[strHasRunFlags] = {};\r\n }\r\n // Ensure that we keep the context in sync\r\n itemCtx.setNext(nextProxy);\r\n if (plugin) {\r\n doPerf(itemCtx[STR_CORE /* @min:%2ecore */](), function () { return identifier + \":\" + name; }, function () {\r\n // Mark this component as having run\r\n hasRunContext[chainId] = true;\r\n try {\r\n // Set a flag on the next plugin so we know if it was attempted to be executed\r\n var nextId = nextProxy ? nextProxy._id : STR_EMPTY;\r\n if (nextId) {\r\n hasRunContext[nextId] = false;\r\n }\r\n hasRun = processPluginFn(itemCtx);\r\n }\r\n catch (error) {\r\n var hasNextRun = nextProxy ? hasRunContext[nextProxy._id] : true;\r\n if (hasNextRun) {\r\n // The next plugin after us has already run so set this one as complete\r\n hasRun = true;\r\n }\r\n if (!nextProxy || !hasNextRun) {\r\n // Either we have no next plugin or the current one did not attempt to call the next plugin\r\n // Which means the current one is the root of the failure so log/report this failure\r\n _throwInternal(itemCtx[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 73 /* _eInternalMessageId.PluginException */, \"Plugin [\" + identifier + \"] failed during \" + name + \" - \" + dumpObj(error) + \", run flags: \" + dumpObj(hasRunContext));\r\n }\r\n }\r\n }, details, isAsync);\r\n }\r\n return hasRun;\r\n }\r\n function _processTelemetry(env, itemCtx) {\r\n itemCtx = itemCtx || _getTelCtx();\r\n function _callProcessTelemetry(itemCtx) {\r\n if (!plugin || !hasProcessTelemetry) {\r\n return false;\r\n }\r\n var pluginState = _getPluginState(plugin);\r\n if (pluginState[_DYN_TEARDOWN /* @min:%2eteardown */] || pluginState[STR_DISABLED]) {\r\n return false;\r\n }\r\n // Ensure that we keep the context in sync (for processNext()), just in case a plugin\r\n // doesn't calls processTelemetry() instead of itemContext.processNext() or some\r\n // other form of error occurred\r\n if (hasSetNext) {\r\n // Backward compatibility setting the next plugin on the instance\r\n plugin[_DYN_SET_NEXT_PLUGIN /* @min:%2esetNextPlugin */](nextProxy);\r\n }\r\n plugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */](env, itemCtx);\r\n // Process Telemetry is expected to call itemCtx.processNext() or nextPlugin.processTelemetry()\r\n return true;\r\n }\r\n if (!_processChain(itemCtx, _callProcessTelemetry, \"processTelemetry\", function () { return ({ item: env }); }, !(env.sync))) {\r\n // The underlying plugin is either not defined, not enabled or does not have a processTelemetry implementation\r\n // so we still want the next plugin to be executed.\r\n itemCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](env);\r\n }\r\n }\r\n function _unloadPlugin(unloadCtx, unloadState) {\r\n function _callTeardown() {\r\n // Setting default of hasRun as false so the proxyProcessFn() is called as teardown() doesn't have to exist or call unloadNext().\r\n var hasRun = false;\r\n if (plugin) {\r\n var pluginState = _getPluginState(plugin);\r\n var pluginCore = plugin[STR_CORE] || pluginState[STR_CORE /* @min:%2ecore */];\r\n // Only teardown the plugin if it was initialized by the current core (i.e. It's not a shared plugin)\r\n if (plugin && (!pluginCore || pluginCore === unloadCtx.core()) && !pluginState[_DYN_TEARDOWN /* @min:%2eteardown */]) {\r\n // Handle plugins that don't extend from the BaseTelemetryPlugin\r\n pluginState[STR_CORE /* @min:%2ecore */] = null;\r\n pluginState[_DYN_TEARDOWN /* @min:%2eteardown */] = true;\r\n pluginState[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */] = false;\r\n if (plugin[_DYN_TEARDOWN /* @min:%2eteardown */] && plugin[_DYN_TEARDOWN /* @min:%2eteardown */](unloadCtx, unloadState) === true) {\r\n // plugin told us that it was going to (or has) call unloadCtx.processNext()\r\n hasRun = true;\r\n }\r\n }\r\n }\r\n return hasRun;\r\n }\r\n if (!_processChain(unloadCtx, _callTeardown, \"unload\", function () { }, unloadState[_DYN_IS_ASYNC /* @min:%2eisAsync */])) {\r\n // Only called if we hasRun was not true\r\n unloadCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](unloadState);\r\n }\r\n }\r\n function _updatePlugin(updateCtx, updateState) {\r\n function _callUpdate() {\r\n // Setting default of hasRun as false so the proxyProcessFn() is called as teardown() doesn't have to exist or call unloadNext().\r\n var hasRun = false;\r\n if (plugin) {\r\n var pluginState = _getPluginState(plugin);\r\n var pluginCore = plugin[STR_CORE] || pluginState[STR_CORE /* @min:%2ecore */];\r\n // Only update the plugin if it was initialized by the current core (i.e. It's not a shared plugin)\r\n if (plugin && (!pluginCore || pluginCore === updateCtx.core()) && !pluginState[_DYN_TEARDOWN /* @min:%2eteardown */]) {\r\n if (plugin[_DYN_UPDATE /* @min:%2eupdate */] && plugin[_DYN_UPDATE /* @min:%2eupdate */](updateCtx, updateState) === true) {\r\n // plugin told us that it was going to (or has) call unloadCtx.processNext()\r\n hasRun = true;\r\n }\r\n }\r\n }\r\n return hasRun;\r\n }\r\n if (!_processChain(updateCtx, _callUpdate, \"update\", function () { }, false)) {\r\n // Only called if we hasRun was not true\r\n updateCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](updateState);\r\n }\r\n }\r\n return objFreeze(proxyChain);\r\n}\r\n/**\r\n * This class will be removed!\r\n * @deprecated use createProcessTelemetryContext() instead\r\n */\r\nvar ProcessTelemetryContext = /** @class */ (function () {\r\n /**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n */\r\n function ProcessTelemetryContext(pluginChain, config, core, startAt) {\r\n var _self = this;\r\n var context = createProcessTelemetryContext(pluginChain, config, core, startAt);\r\n // Proxy all functions of the context to this object\r\n proxyFunctions(_self, context, objKeys(context));\r\n }\r\n return ProcessTelemetryContext;\r\n}());\r\nexport { ProcessTelemetryContext };\r\n//# sourceMappingURL=ProcessTelemetryContext.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { isArray, isFunction, objDefine, utcNow } from \"@nevware21/ts-utils\";\r\nimport { _DYN_COMPLETE, _DYN_GET_CTX, _DYN_IS_ASYNC, _DYN_IS_CHILD_EVT, _DYN_LENGTH, _DYN_NAME, _DYN_PUSH, _DYN_SET_CTX, _DYN_TIME } from \"../__DynamicConstants\";\r\nimport { STR_GET_PERF_MGR, STR_PERF_EVENT } from \"./InternalConstants\";\r\nvar strExecutionContextKey = \"ctx\";\r\nvar strParentContextKey = \"ParentContextKey\";\r\nvar strChildrenContextKey = \"ChildrenContextKey\";\r\nvar _defaultPerfManager = null;\r\nvar PerfEvent = /** @class */ (function () {\r\n function PerfEvent(name, payloadDetails, isAsync) {\r\n var _self = this;\r\n _self.start = utcNow();\r\n _self[_DYN_NAME /* @min:%2ename */] = name;\r\n _self[_DYN_IS_ASYNC /* @min:%2eisAsync */] = isAsync;\r\n _self[_DYN_IS_CHILD_EVT /* @min:%2eisChildEvt */] = function () { return false; };\r\n if (isFunction(payloadDetails)) {\r\n // Create an accessor to minimize the potential performance impact of executing the payloadDetails callback\r\n var theDetails_1;\r\n objDefine(_self, \"payload\", {\r\n g: function () {\r\n // Delay the execution of the payloadDetails until needed\r\n if (!theDetails_1 && isFunction(payloadDetails)) {\r\n theDetails_1 = payloadDetails();\r\n // clear it out now so the referenced objects can be garbage collected\r\n payloadDetails = null;\r\n }\r\n return theDetails_1;\r\n }\r\n });\r\n }\r\n _self[_DYN_GET_CTX /* @min:%2egetCtx */] = function (key) {\r\n if (key) {\r\n // The parent and child links are located directly on the object (for better viewing in the DebugPlugin)\r\n if (key === PerfEvent[strParentContextKey] || key === PerfEvent[strChildrenContextKey]) {\r\n return _self[key];\r\n }\r\n return (_self[strExecutionContextKey] || {})[key];\r\n }\r\n return null;\r\n };\r\n _self[_DYN_SET_CTX /* @min:%2esetCtx */] = function (key, value) {\r\n if (key) {\r\n // Put the parent and child links directly on the object (for better viewing in the DebugPlugin)\r\n if (key === PerfEvent[strParentContextKey]) {\r\n // Simple assumption, if we are setting a parent then we must be a child\r\n if (!_self[key]) {\r\n _self[_DYN_IS_CHILD_EVT /* @min:%2eisChildEvt */] = function () { return true; };\r\n }\r\n _self[key] = value;\r\n }\r\n else if (key === PerfEvent[strChildrenContextKey]) {\r\n _self[key] = value;\r\n }\r\n else {\r\n var ctx = _self[strExecutionContextKey] = _self[strExecutionContextKey] || {};\r\n ctx[key] = value;\r\n }\r\n }\r\n };\r\n _self[_DYN_COMPLETE /* @min:%2ecomplete */] = function () {\r\n var childTime = 0;\r\n var childEvts = _self[_DYN_GET_CTX /* @min:%2egetCtx */](PerfEvent[strChildrenContextKey]);\r\n if (isArray(childEvts)) {\r\n for (var lp = 0; lp < childEvts[_DYN_LENGTH /* @min:%2elength */]; lp++) {\r\n var childEvt = childEvts[lp];\r\n if (childEvt) {\r\n childTime += childEvt[_DYN_TIME /* @min:%2etime */];\r\n }\r\n }\r\n }\r\n _self[_DYN_TIME /* @min:%2etime */] = utcNow() - _self.start;\r\n _self.exTime = _self[_DYN_TIME /* @min:%2etime */] - childTime;\r\n _self[_DYN_COMPLETE /* @min:%2ecomplete */] = function () { };\r\n };\r\n }\r\n PerfEvent.ParentContextKey = \"parent\";\r\n PerfEvent.ChildrenContextKey = \"childEvts\";\r\n return PerfEvent;\r\n}());\r\nexport { PerfEvent };\r\nvar PerfManager = /** @class */ (function () {\r\n function PerfManager(manager) {\r\n /**\r\n * General bucket used for execution context set and retrieved via setCtx() and getCtx.\r\n * Defined as private so it can be visualized via the DebugPlugin\r\n */\r\n this.ctx = {};\r\n dynamicProto(PerfManager, this, function (_self) {\r\n _self.create = function (src, payloadDetails, isAsync) {\r\n // TODO (@MSNev): at some point we will want to add additional configuration to \"select\" which events to instrument\r\n // for now this is just a simple do everything.\r\n return new PerfEvent(src, payloadDetails, isAsync);\r\n };\r\n _self.fire = function (perfEvent) {\r\n if (perfEvent) {\r\n perfEvent[_DYN_COMPLETE /* @min:%2ecomplete */]();\r\n if (manager && isFunction(manager[STR_PERF_EVENT /* @min:%2eperfEvent */])) {\r\n manager[STR_PERF_EVENT /* @min:%2eperfEvent */](perfEvent);\r\n }\r\n }\r\n };\r\n _self[_DYN_SET_CTX /* @min:%2esetCtx */] = function (key, value) {\r\n if (key) {\r\n var ctx = _self[strExecutionContextKey] = _self[strExecutionContextKey] || {};\r\n ctx[key] = value;\r\n }\r\n };\r\n _self[_DYN_GET_CTX /* @min:%2egetCtx */] = function (key) {\r\n return (_self[strExecutionContextKey] || {})[key];\r\n };\r\n });\r\n }\r\n /**\r\n * Create a new event and start timing, the manager may return null/undefined to indicate that it does not\r\n * want to monitor this source event.\r\n * @param src - The source name of the event\r\n * @param payloadDetails - An optional callback function to fetch the payload details for the event.\r\n * @param isAsync - Is the event occurring from a async event\r\n */\r\n PerfManager.prototype.create = function (src, payload, isAsync) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Complete the perfEvent and fire any notifications.\r\n * @param perfEvent - Fire the event which will also complete the passed event\r\n */\r\n PerfManager.prototype.fire = function (perfEvent) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Set an execution context value\r\n * @param key - The context key name\r\n * @param value - The value\r\n */\r\n PerfManager.prototype.setCtx = function (key, value) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Get the execution context value\r\n * @param key - The context key\r\n */\r\n PerfManager.prototype.getCtx = function (key) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return PerfManager;\r\n}());\r\nexport { PerfManager };\r\nvar doPerfActiveKey = \"CoreUtils.doPerf\";\r\n/**\r\n * Helper function to wrap a function with a perf event\r\n * @param mgrSource - The Performance Manager or a Performance provider source (may be null)\r\n * @param getSource - The callback to create the source name for the event (if perf monitoring is enabled)\r\n * @param func - The function to call and measure\r\n * @param details - A function to return the payload details\r\n * @param isAsync - Is the event / function being call asynchronously or synchronously\r\n */\r\nexport function doPerf(mgrSource, getSource, func, details, isAsync) {\r\n if (mgrSource) {\r\n var perfMgr = mgrSource;\r\n if (perfMgr[STR_GET_PERF_MGR]) {\r\n // Looks like a perf manager provider object\r\n perfMgr = perfMgr[STR_GET_PERF_MGR]();\r\n }\r\n if (perfMgr) {\r\n var perfEvt = void 0;\r\n var currentActive = perfMgr[_DYN_GET_CTX /* @min:%2egetCtx */](doPerfActiveKey);\r\n try {\r\n perfEvt = perfMgr.create(getSource(), details, isAsync);\r\n if (perfEvt) {\r\n if (currentActive && perfEvt[_DYN_SET_CTX /* @min:%2esetCtx */]) {\r\n perfEvt[_DYN_SET_CTX /* @min:%2esetCtx */](PerfEvent[strParentContextKey], currentActive);\r\n if (currentActive[_DYN_GET_CTX /* @min:%2egetCtx */] && currentActive[_DYN_SET_CTX /* @min:%2esetCtx */]) {\r\n var children = currentActive[_DYN_GET_CTX /* @min:%2egetCtx */](PerfEvent[strChildrenContextKey]);\r\n if (!children) {\r\n children = [];\r\n currentActive[_DYN_SET_CTX /* @min:%2esetCtx */](PerfEvent[strChildrenContextKey], children);\r\n }\r\n children[_DYN_PUSH /* @min:%2epush */](perfEvt);\r\n }\r\n }\r\n // Set this event as the active event now\r\n perfMgr[_DYN_SET_CTX /* @min:%2esetCtx */](doPerfActiveKey, perfEvt);\r\n return func(perfEvt);\r\n }\r\n }\r\n catch (ex) {\r\n if (perfEvt && perfEvt[_DYN_SET_CTX /* @min:%2esetCtx */]) {\r\n perfEvt[_DYN_SET_CTX /* @min:%2esetCtx */](\"exception\", ex);\r\n }\r\n }\r\n finally {\r\n // fire the perf event\r\n if (perfEvt) {\r\n perfMgr.fire(perfEvt);\r\n }\r\n // Reset the active event to the previous value\r\n perfMgr[_DYN_SET_CTX /* @min:%2esetCtx */](doPerfActiveKey, currentActive);\r\n }\r\n }\r\n }\r\n return func();\r\n}\r\n/**\r\n * Set the global performance manager to use when there is no core instance or it has not been initialized yet.\r\n * @param perfManager - The IPerfManager instance to use when no performance manager is supplied.\r\n */\r\nexport function setGblPerfMgr(perfManager) {\r\n _defaultPerfManager = perfManager;\r\n}\r\n/**\r\n * Get the current global performance manager that will be used with no performance manager is supplied.\r\n * @returns - The current default manager\r\n */\r\nexport function getGblPerfMgr() {\r\n return _defaultPerfManager;\r\n}\r\n//# sourceMappingURL=PerfManager.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nimport { arrForEach, isFunction } from \"@nevware21/ts-utils\";\r\nimport { _DYN_GET_NEXT, _DYN_GET_PLUGIN, _DYN_INITIALIZE, _DYN_IS_INITIALIZED, _DYN_LENGTH, _DYN_NAME, _DYN_PUSH, _DYN_SET_NEXT_PLUGIN, _DYN_SPAN_ID, _DYN_TEARDOWN, _DYN_TRACE_FLAGS, _DYN_TRACE_ID, _DYN__DO_TEARDOWN } from \"../__DynamicConstants\";\r\nimport { createElmNodeData } from \"./DataCacheHelper\";\r\nimport { STR_CORE, STR_PRIORITY, STR_PROCESS_TELEMETRY } from \"./InternalConstants\";\r\nimport { isValidSpanId, isValidTraceId } from \"./W3cTraceParent\";\r\nvar pluginStateData = createElmNodeData(\"plugin\");\r\nexport function _getPluginState(plugin) {\r\n return pluginStateData.get(plugin, \"state\", {}, true);\r\n}\r\n/**\r\n * Initialize the queue of plugins\r\n * @param plugins - The array of plugins to initialize and setting of the next plugin\r\n * @param config - The current config for the instance\r\n * @param core - THe current core instance\r\n * @param extensions - The extensions\r\n */\r\nexport function initializePlugins(processContext, extensions) {\r\n // Set the next plugin and identified the uninitialized plugins\r\n var initPlugins = [];\r\n var lastPlugin = null;\r\n var proxy = processContext[_DYN_GET_NEXT /* @min:%2egetNext */]();\r\n var pluginState;\r\n while (proxy) {\r\n var thePlugin = proxy[_DYN_GET_PLUGIN /* @min:%2egetPlugin */]();\r\n if (thePlugin) {\r\n if (lastPlugin && lastPlugin[_DYN_SET_NEXT_PLUGIN /* @min:%2esetNextPlugin */] && thePlugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */]) {\r\n // Set this plugin as the next for the previous one\r\n lastPlugin[_DYN_SET_NEXT_PLUGIN /* @min:%2esetNextPlugin */](thePlugin);\r\n }\r\n pluginState = _getPluginState(thePlugin);\r\n var isInitialized = !!pluginState[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */];\r\n if (thePlugin[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */]) {\r\n isInitialized = thePlugin[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */]();\r\n }\r\n if (!isInitialized) {\r\n initPlugins[_DYN_PUSH /* @min:%2epush */](thePlugin);\r\n }\r\n lastPlugin = thePlugin;\r\n proxy = proxy[_DYN_GET_NEXT /* @min:%2egetNext */]();\r\n }\r\n }\r\n // Now initialize the plugins\r\n arrForEach(initPlugins, function (thePlugin) {\r\n var core = processContext[STR_CORE /* @min:%2ecore */]();\r\n thePlugin[_DYN_INITIALIZE /* @min:%2einitialize */](processContext.getCfg(), core, extensions, processContext[_DYN_GET_NEXT /* @min:%2egetNext */]());\r\n pluginState = _getPluginState(thePlugin);\r\n // Only add the core to the state if the plugin didn't set it (doesn't extend from BaseTelemetryPlugin)\r\n if (!thePlugin[STR_CORE] && !pluginState[STR_CORE]) {\r\n pluginState[STR_CORE] = core;\r\n }\r\n pluginState[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */] = true;\r\n delete pluginState[_DYN_TEARDOWN /* @min:%2eteardown */];\r\n });\r\n}\r\nexport function sortPlugins(plugins) {\r\n // Sort by priority\r\n return plugins.sort(function (extA, extB) {\r\n var result = 0;\r\n if (extB) {\r\n var bHasProcess = extB[STR_PROCESS_TELEMETRY];\r\n if (extA[STR_PROCESS_TELEMETRY]) {\r\n result = bHasProcess ? extA[STR_PRIORITY] - extB[STR_PRIORITY] : 1;\r\n }\r\n else if (bHasProcess) {\r\n result = -1;\r\n }\r\n }\r\n else {\r\n result = extA ? 1 : -1;\r\n }\r\n return result;\r\n });\r\n // sort complete\r\n}\r\n/**\r\n * Teardown / Unload helper to perform teardown/unloading operations for the provided components synchronously or asynchronously, this will call any\r\n * _doTeardown() or _doUnload() functions on the provided components to allow them to finish removal.\r\n * @param components - The components you want to unload\r\n * @param unloadCtx - This is the context that should be used during unloading.\r\n * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.\r\n * @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.\r\n * @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.\r\n */\r\nexport function unloadComponents(components, unloadCtx, unloadState, asyncCallback) {\r\n var idx = 0;\r\n function _doUnload() {\r\n while (idx < components[_DYN_LENGTH /* @min:%2elength */]) {\r\n var component = components[idx++];\r\n if (component) {\r\n var func = component._doUnload || component[_DYN__DO_TEARDOWN /* @min:%2e_doTeardown */];\r\n if (isFunction(func)) {\r\n if (func.call(component, unloadCtx, unloadState, _doUnload) === true) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return _doUnload();\r\n}\r\n/**\r\n * Creates a IDistributedTraceContext which optionally also \"sets\" the value on a parent\r\n * @param parentCtx - An optional parent distributed trace instance\r\n * @returns A new IDistributedTraceContext instance that uses an internal temporary object\r\n */\r\nexport function createDistributedTraceContext(parentCtx) {\r\n var trace = {};\r\n return {\r\n getName: function () {\r\n return trace[_DYN_NAME /* @min:%2ename */];\r\n },\r\n setName: function (newValue) {\r\n parentCtx && parentCtx.setName(newValue);\r\n trace[_DYN_NAME /* @min:%2ename */] = newValue;\r\n },\r\n getTraceId: function () {\r\n return trace[_DYN_TRACE_ID /* @min:%2etraceId */];\r\n },\r\n setTraceId: function (newValue) {\r\n parentCtx && parentCtx.setTraceId(newValue);\r\n if (isValidTraceId(newValue)) {\r\n trace[_DYN_TRACE_ID /* @min:%2etraceId */] = newValue;\r\n }\r\n },\r\n getSpanId: function () {\r\n return trace[_DYN_SPAN_ID /* @min:%2espanId */];\r\n },\r\n setSpanId: function (newValue) {\r\n parentCtx && parentCtx.setSpanId(newValue);\r\n if (isValidSpanId(newValue)) {\r\n trace[_DYN_SPAN_ID /* @min:%2espanId */] = newValue;\r\n }\r\n },\r\n getTraceFlags: function () {\r\n return trace[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */];\r\n },\r\n setTraceFlags: function (newTraceFlags) {\r\n parentCtx && parentCtx.setTraceFlags(newTraceFlags);\r\n trace[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = newTraceFlags;\r\n }\r\n };\r\n}\r\n//# sourceMappingURL=TelemetryHelpers.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrForEach, dumpObj } from \"@nevware21/ts-utils\";\r\nimport { _DYN_DIAG_LOG, _DYN_PUSH } from \"../__DynamicConstants\";\r\nimport { _throwInternal } from \"./DiagnosticLogger\";\r\nexport function createUnloadHandlerContainer() {\r\n var handlers = [];\r\n function _addHandler(handler) {\r\n if (handler) {\r\n handlers[_DYN_PUSH /* @min:%2epush */](handler);\r\n }\r\n }\r\n function _runHandlers(unloadCtx, unloadState) {\r\n arrForEach(handlers, function (handler) {\r\n try {\r\n handler(unloadCtx, unloadState);\r\n }\r\n catch (e) {\r\n _throwInternal(unloadCtx[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 73 /* _eInternalMessageId.PluginException */, \"Unexpected error calling unload handler - \" + dumpObj(e));\r\n }\r\n });\r\n handlers = [];\r\n }\r\n return {\r\n add: _addHandler,\r\n run: _runHandlers\r\n };\r\n}\r\n//# sourceMappingURL=UnloadHandlerContainer.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrAppend, arrForEach, dumpObj } from \"@nevware21/ts-utils\";\r\nimport { _throwInternal } from \"./DiagnosticLogger\";\r\n/**\r\n * Create a IUnloadHookContainer which can be used to remember unload hook functions to be executed during the component unloading\r\n * process.\r\n * @returns A new IUnloadHookContainer instance\r\n */\r\nexport function createUnloadHookContainer() {\r\n var _hooks = [];\r\n function _doUnload(logger) {\r\n var oldHooks = _hooks;\r\n _hooks = [];\r\n // Remove all registered unload hooks\r\n arrForEach(oldHooks, function (fn) {\r\n // allow either rm or remove callback function\r\n try {\r\n (fn.rm || fn.remove).call(fn);\r\n }\r\n catch (e) {\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 73 /* _eInternalMessageId.PluginException */, \"Unloading:\" + dumpObj(e));\r\n }\r\n });\r\n }\r\n function _addHook(hooks) {\r\n if (hooks) {\r\n arrAppend(_hooks, hooks);\r\n }\r\n }\r\n return {\r\n run: _doUnload,\r\n add: _addHook\r\n };\r\n}\r\n//# sourceMappingURL=UnloadHookContainer.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { isArray, isUndefined } from \"../helpers/base\";\r\nimport { isIterable, isIterator } from \"../iterator/iterator\";\r\nimport { iterForOf } from \"../iterator/forOf\";\r\nimport { fnApply } from \"../funcs/fnApply\";\r\n/**\r\n * Appends the `elms` to the `target` where the elms may be an array, a single object\r\n * or an iterator object\r\n * @group Array\r\n * @group Iterator\r\n * @example\r\n * ```ts\r\n * let theArray = arrAppend([], 1);\r\n * arrAppend(theArray, [ 2, 3, 4 ]);\r\n * arrAppend(theArray, [ \"a\", \"b\", \"c\" ]);\r\n * // theArray is now [ 1, 2, 3, 4, \"a\", \"b\", \"c\" ]\r\n * ```\r\n * @param target - The target array\r\n * @param elms - The item, array of items an iterable or iterator object of items to add to the target\r\n * @returns The passed in target array\r\n * @example\r\n * ```ts\r\n * // Adding a single value\r\n * arrAppend([], undefined); // []\r\n * arrAppend([], 0); // [ 0 ]\r\n * arrAppend([1], undefined); // [ 1 ]\r\n * arrAppend([1], 2); // [ 1, 2 ]\r\n *\r\n * // Adding an array\r\n * arrAppend([], [] as number[]); // []\r\n * arrAppend([], [0]); // [ 0 ]\r\n * arrAppend([1], []); // [ 1 ]\r\n * arrAppend([1], [2]); // [ 1, 2 ]\r\n *\r\n * // Adding with an iterator\r\n * arrAppend([], ([] as number[]).values()); // []\r\n * arrAppend([], [0].values()); // [ 0 ]\r\n * arrAppend([1], [].keys()); // [ 1 ]\r\n * arrAppend([1], [2].values()); // [ 1, 2 ]\r\n * arrAppend([1], [2].keys()); // [ 1, 0 ] - 0 is from the index from the first element\r\n * ```\r\n */\r\nexport function arrAppend(target, elms) {\r\n if (!isUndefined(elms) && target) {\r\n if (isArray(elms)) {\r\n // This is not just \"target.push(elms)\" but becomes effectively \"target.push(elms[0], elms[1], ...)\"\r\n fnApply(target.push, target, elms);\r\n }\r\n else if (isIterator(elms) || isIterable(elms)) {\r\n iterForOf(elms, function (elm) {\r\n target.push(elm);\r\n });\r\n }\r\n else {\r\n target.push(elms);\r\n }\r\n }\r\n return target;\r\n}\r\n//# sourceMappingURL=append.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { isArray, isUndefined } from \"../helpers/base\";\r\nimport { isIterable, isIterator } from \"../iterator/iterator\";\r\nimport { iterForOf } from \"../iterator/forOf\";\r\nimport { fnApply } from \"../funcs/fnApply\";\r\n\r\n/**\r\n * Appends the `elms` to the `target` where the elms may be an array, a single object\r\n * or an iterator object\r\n * @group Array\r\n * @group Iterator\r\n * @example\r\n * ```ts\r\n * let theArray = arrAppend([], 1);\r\n * arrAppend(theArray, [ 2, 3, 4 ]);\r\n * arrAppend(theArray, [ \"a\", \"b\", \"c\" ]);\r\n * // theArray is now [ 1, 2, 3, 4, \"a\", \"b\", \"c\" ]\r\n * ```\r\n * @param target - The target array\r\n * @param elms - The item, array of items an iterable or iterator object of items to add to the target\r\n * @returns The passed in target array\r\n * @example\r\n * ```ts\r\n * // Adding a single value\r\n * arrAppend([], undefined); // []\r\n * arrAppend([], 0); // [ 0 ]\r\n * arrAppend([1], undefined); // [ 1 ]\r\n * arrAppend([1], 2); // [ 1, 2 ]\r\n *\r\n * // Adding an array\r\n * arrAppend([], [] as number[]); // []\r\n * arrAppend([], [0]); // [ 0 ]\r\n * arrAppend([1], []); // [ 1 ]\r\n * arrAppend([1], [2]); // [ 1, 2 ]\r\n *\r\n * // Adding with an iterator\r\n * arrAppend([], ([] as number[]).values()); // []\r\n * arrAppend([], [0].values()); // [ 0 ]\r\n * arrAppend([1], [].keys()); // [ 1 ]\r\n * arrAppend([1], [2].values()); // [ 1, 2 ]\r\n * arrAppend([1], [2].keys()); // [ 1, 0 ] - 0 is from the index from the first element\r\n * ```\r\n */\r\nexport function arrAppend(target: T[], elms: T | T[] | Iterator): T[] {\r\n if (!isUndefined(elms) && target) {\r\n if (isArray(elms)) {\r\n // This is not just \"target.push(elms)\" but becomes effectively \"target.push(elms[0], elms[1], ...)\"\r\n fnApply(target.push, target, elms);\r\n } else if (isIterator(elms) || isIterable(elms)) {\r\n iterForOf(elms, (elm) => {\r\n target.push(elm);\r\n });\r\n } else {\r\n target.push(elms);\r\n }\r\n }\r\n\r\n return target;\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { getKnownSymbol } from \"../symbol/symbol\";\r\nimport { isFunction, isStrictNullOrUndefined } from \"../helpers/base\";\r\n/**\r\n * Checks if the type of value looks like an iterator instance (contains a next function).\r\n *\r\n * @since 0.4.0\r\n * @group Type Identity\r\n * @group Iterator\r\n * @typeParam T - Identifies the return type of the iterator defaults to any\r\n * @param value - The value to be checked\r\n * @returns {boolean} True if the value is an Iterator, otherwise false\r\n * @example\r\n * ```ts\r\n * isIterator(null); // false\r\n * isIterator(undefined); // false\r\n * isIterator(\"null\"); // false (Strings are iterable but not iterators)\r\n * isIterator([]); // false (Arrays are iterable but not iterators)\r\n * isIterator({\r\n * next: function() { return true }\r\n * }); // true, iterators must contain a \"next\" function\r\n * ```\r\n */\r\nexport function isIterator(value) {\r\n return !!value && isFunction(value.next);\r\n}\r\n/**\r\n * Checks if the value looks like it is iterable, contains a [symbol.iterator].\r\n *\r\n * @since 0.4.0\r\n * @group Type Identity\r\n * @group Iterator\r\n * @typeParam T - Identifies the return type of the iterator\r\n * @param value - The value to be checked\r\n * @returns {boolean} True if the value is an Iterable, otherwise false\r\n * @example\r\n * ```ts\r\n * isIterable(null); // false\r\n * isIterable(undefined); // false\r\n * isIterable(\"null\"); // true (Strings are iterable)\r\n * isIterable([]); // true (Arrays are iterable)\r\n * ```\r\n */\r\nexport function isIterable(value) {\r\n return !isStrictNullOrUndefined(value) && isFunction(value[getKnownSymbol(3 /* WellKnownSymbols.iterator */)]);\r\n}\r\n//# sourceMappingURL=iterator.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { getKnownSymbol } from \"../symbol/symbol\";\r\nimport { WellKnownSymbols } from \"../symbol/well_known\";\r\nimport { isFunction, isStrictNullOrUndefined } from \"../helpers/base\";\r\n\r\n/**\r\n * Checks if the type of value looks like an iterator instance (contains a next function).\r\n *\r\n * @since 0.4.0\r\n * @group Type Identity\r\n * @group Iterator\r\n * @typeParam T - Identifies the return type of the iterator defaults to any\r\n * @param value - The value to be checked\r\n * @returns {boolean} True if the value is an Iterator, otherwise false\r\n * @example\r\n * ```ts\r\n * isIterator(null); // false\r\n * isIterator(undefined); // false\r\n * isIterator(\"null\"); // false (Strings are iterable but not iterators)\r\n * isIterator([]); // false (Arrays are iterable but not iterators)\r\n * isIterator({\r\n * next: function() { return true }\r\n * }); // true, iterators must contain a \"next\" function\r\n * ```\r\n */\r\nexport function isIterator(value: any): value is Iterator {\r\n return !!value && isFunction(value.next);\r\n}\r\n\r\n/**\r\n * Checks if the value looks like it is iterable, contains a [symbol.iterator].\r\n *\r\n * @since 0.4.0\r\n * @group Type Identity\r\n * @group Iterator\r\n * @typeParam T - Identifies the return type of the iterator\r\n * @param value - The value to be checked\r\n * @returns {boolean} True if the value is an Iterable, otherwise false\r\n * @example\r\n * ```ts\r\n * isIterable(null); // false\r\n * isIterable(undefined); // false\r\n * isIterable(\"null\"); // true (Strings are iterable)\r\n * isIterable([]); // true (Arrays are iterable)\r\n * ```\r\n */\r\nexport function isIterable(value: any): value is Iterable {\r\n return !isStrictNullOrUndefined(value) && isFunction(value[getKnownSymbol(WellKnownSymbols.iterator)]);\r\n}","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { getLazy } from \"../helpers/lazy\";\r\nimport { DONE, VALUE } from \"../internal/constants\";\r\nimport { getKnownSymbol } from \"../symbol/symbol\";\r\nimport { isIterator } from \"./iterator\";\r\nvar _iterSymbol;\r\n/**\r\n * Calls the provided `callbackFn` function once for each element in the iterator or iterator returned by\r\n * the iterable and processed in the same order as returned by the iterator. As with the {@link arrForEach}\r\n * you CAN stop / break the iteration by returning -1 from the`callbackFn` function.\r\n *\r\n * The order of processing is not reset if you add or remove elements to the iterator, the actual behavior\r\n * will depend on the iterator imeplementation.\r\n *\r\n * If the passed `iter` is both an Iterable and Iterator the Iterator interface takes preceedence.\r\n * @remarks\r\n * If Symbols are NOT supported then the iterable MUST be using the same polyFill for the well know symbols,\r\n * if you are targetting a mixed environment you SHOULD either\r\n * - only use the polyfill Symbol's provided by this library\r\n * - ensure that you add any symbol polyfills BEFORE these utilities\r\n * iterForOf expects a `synchronous` function.\r\n * iterForOf does not wait for promises. Make sure you are aware of the implications while using\r\n * promises (or async functions) as forEach callback.\r\n *\r\n * @since 0.4.2\r\n * @group Iterator\r\n * @typeParam T - Identifies the element type of the iterator\r\n * @param callbackfn A `synchronous` function that accepts up to three arguments. iterForOf calls the\r\n * callbackfn function one time for each element returned by the iterator.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is\r\n * omitted, null or undefined the iterator will be used as the this value.\r\n * @throws Any exception thrown while processing the iterator\r\n * @example\r\n * ```ts\r\n * const items = {\r\n * 'item1': 'value1',\r\n * 'item2': 'value2',\r\n * 'item3': 'value3\r\n * };\r\n * const copyItems = [];\r\n *\r\n * iterForOf(items, (item) => {\r\n * copyItems.push(item);\r\n * // May return -1 to abort the iteration\r\n * });\r\n * ```\r\n */\r\nexport function iterForOf(iter, callbackfn, thisArg) {\r\n if (iter) {\r\n if (!isIterator(iter)) {\r\n !_iterSymbol && (_iterSymbol = getLazy(function () { return getKnownSymbol(3 /* WellKnownSymbols.iterator */); }));\r\n iter = iter[_iterSymbol.v] ? iter[_iterSymbol.v]() : null;\r\n }\r\n if (isIterator(iter)) {\r\n var err = void 0;\r\n var iterResult = void 0;\r\n try {\r\n var count = 0;\r\n while (!(iterResult = iter.next())[DONE]) {\r\n if (callbackfn.call(thisArg || iter, iterResult[VALUE], count, iter) === -1) {\r\n break;\r\n }\r\n count++;\r\n }\r\n }\r\n catch (failed) {\r\n err = { e: failed };\r\n if (iter.throw) {\r\n iterResult = null;\r\n iter.throw(err);\r\n }\r\n }\r\n finally {\r\n try {\r\n if (iterResult && !iterResult[DONE]) {\r\n iter.return && iter.return(iterResult);\r\n }\r\n }\r\n finally {\r\n if (err) {\r\n // eslint-disable-next-line no-unsafe-finally\r\n throw err.e;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n//# sourceMappingURL=forOf.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ILazyValue, getLazy } from \"../helpers/lazy\";\r\nimport { DONE, VALUE } from \"../internal/constants\";\r\nimport { getKnownSymbol } from \"../symbol/symbol\";\r\nimport { WellKnownSymbols } from \"../symbol/well_known\";\r\nimport { isIterator } from \"./iterator\";\r\n\r\nlet _iterSymbol: ILazyValue;\r\n\r\n/**\r\n * Calls the provided `callbackFn` function once for each element in the iterator or iterator returned by\r\n * the iterable and processed in the same order as returned by the iterator. As with the {@link arrForEach}\r\n * you CAN stop / break the iteration by returning -1 from the`callbackFn` function.\r\n *\r\n * The order of processing is not reset if you add or remove elements to the iterator, the actual behavior\r\n * will depend on the iterator imeplementation.\r\n *\r\n * If the passed `iter` is both an Iterable and Iterator the Iterator interface takes preceedence.\r\n * @remarks\r\n * If Symbols are NOT supported then the iterable MUST be using the same polyFill for the well know symbols,\r\n * if you are targetting a mixed environment you SHOULD either\r\n * - only use the polyfill Symbol's provided by this library\r\n * - ensure that you add any symbol polyfills BEFORE these utilities\r\n * iterForOf expects a `synchronous` function.\r\n * iterForOf does not wait for promises. Make sure you are aware of the implications while using\r\n * promises (or async functions) as forEach callback.\r\n *\r\n * @since 0.4.2\r\n * @group Iterator\r\n * @typeParam T - Identifies the element type of the iterator\r\n * @param callbackfn A `synchronous` function that accepts up to three arguments. iterForOf calls the\r\n * callbackfn function one time for each element returned by the iterator.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is\r\n * omitted, null or undefined the iterator will be used as the this value.\r\n * @throws Any exception thrown while processing the iterator\r\n * @example\r\n * ```ts\r\n * const items = {\r\n * 'item1': 'value1',\r\n * 'item2': 'value2',\r\n * 'item3': 'value3\r\n * };\r\n * const copyItems = [];\r\n *\r\n * iterForOf(items, (item) => {\r\n * copyItems.push(item);\r\n * // May return -1 to abort the iteration\r\n * });\r\n * ```\r\n */\r\nexport function iterForOf(iter: Iterator | Iterable, callbackfn: (value: T, count?: number, iter?: Iterator) => void | number, thisArg?: any): void {\r\n if (iter) {\r\n if (!isIterator(iter)) {\r\n !_iterSymbol && (_iterSymbol = getLazy(() => getKnownSymbol(WellKnownSymbols.iterator)));\r\n iter = iter[_iterSymbol.v] ? iter[_iterSymbol.v]() : null;\r\n }\r\n \r\n if (isIterator(iter)) {\r\n let err: { e: any };\r\n let iterResult: IteratorResult;\r\n try {\r\n let count = 0;\r\n while(!(iterResult = iter.next())[DONE]) {\r\n if (callbackfn.call(thisArg || iter, iterResult[VALUE], count, iter) === -1) {\r\n break;\r\n }\r\n \r\n count++;\r\n }\r\n } catch (failed) {\r\n err = { e: failed };\r\n if (iter.throw) {\r\n iterResult = null;\r\n iter.throw(err);\r\n }\r\n } finally {\r\n try {\r\n if (iterResult && !iterResult[DONE]) {\r\n iter.return && iter.return(iterResult);\r\n }\r\n } finally {\r\n if (err) {\r\n // eslint-disable-next-line no-unsafe-finally\r\n throw err.e;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { asString, isBoolean, isFunction, isNullOrUndefined, isString } from \"@nevware21/ts-utils\";\r\nimport { STR_EMPTY } from \"../JavaScriptSDK/InternalConstants\";\r\nimport { _DYN_BLK_VAL, _DYN_TO_LOWER_CASE } from \"../__DynamicConstants\";\r\n/**\r\n * @internal\r\n * @ignore\r\n * @param str\r\n * @param defaultValue\r\n * @returns\r\n */\r\nfunction _stringToBoolOrDefault(theValue, defaultValue, theConfig) {\r\n if (!theValue && isNullOrUndefined(theValue)) {\r\n return defaultValue;\r\n }\r\n if (isBoolean(theValue)) {\r\n return theValue;\r\n }\r\n return asString(theValue)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() === \"true\";\r\n}\r\n/**\r\n * Helper which returns an IConfigDefaultCheck instance with the field defined as an object\r\n * that should be merged\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @returns a new IConfigDefaultCheck structure\r\n */\r\nexport function cfgDfMerge(defaultValue) {\r\n return {\r\n mrg: true,\r\n v: defaultValue\r\n };\r\n}\r\n/**\r\n * Helper which returns an IConfigDefaultCheck instance with the provided field set function\r\n * @param setter - The IConfigCheckFn function to validate the user provided value\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @returns a new IConfigDefaultCheck structure\r\n */\r\nexport function cfgDfSet(setter, defaultValue) {\r\n return {\r\n set: setter,\r\n v: defaultValue\r\n };\r\n}\r\n/**\r\n * Helper which returns an IConfigDefaultCheck instance with the provided field validator\r\n * @param validator - The IConfigCheckFn function to validate the user provided value\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @param fallBackName - The fallback configuration name if the current value is not available\r\n * @returns a new IConfigDefaultCheck structure\r\n */\r\nexport function cfgDfValidate(validator, defaultValue, fallBackName) {\r\n return {\r\n fb: fallBackName,\r\n isVal: validator,\r\n v: defaultValue\r\n };\r\n}\r\n/**\r\n * Helper which returns an IConfigDefaultCheck instance that will validate and convert the user\r\n * provided value to a boolean from a string or boolean value\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @param fallBackName - The fallback configuration name if the current value is not available\r\n * @returns a new IConfigDefaultCheck structure\r\n */\r\nexport function cfgDfBoolean(defaultValue, fallBackName) {\r\n return {\r\n fb: fallBackName,\r\n set: _stringToBoolOrDefault,\r\n v: !!defaultValue\r\n };\r\n}\r\n/**\r\n * Helper which returns an IConfigDefaultCheck instance that will validate that the user\r\n * provided value is a function.\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @returns a new IConfigDefaultCheck structure\r\n */\r\nexport function cfgDfFunc(defaultValue) {\r\n return {\r\n isVal: isFunction,\r\n v: defaultValue || null\r\n };\r\n}\r\n/**\r\n * Helper which returns an IConfigDefaultCheck instance that will validate that the user\r\n * provided value is a function.\r\n * @param defaultValue - The default string value to apply it not provided or it's not valid, defaults to an empty string\r\n * @returns a new IConfigDefaultCheck structure\r\n */\r\nexport function cfgDfString(defaultValue) {\r\n return {\r\n isVal: isString,\r\n v: asString(defaultValue || STR_EMPTY)\r\n };\r\n}\r\n/**\r\n * Helper which returns an IConfigDefaultCheck instance identifying that value associated with this property\r\n * should not have it's properties converted into a dynamic config properties.\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @returns a new IConfigDefaultCheck structure\r\n */\r\nexport function cfgDfBlockPropValue(defaultValue) {\r\n var _a;\r\n return _a = {},\r\n _a[_DYN_BLK_VAL /* @min:blkVal */] = true,\r\n _a.v = defaultValue,\r\n _a;\r\n}\r\n//# sourceMappingURL=ConfigDefaultHelpers.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrForEach, arrIndexOf, getDocument, getWindow, isArray, objForEachKey, objKeys } from \"@nevware21/ts-utils\";\r\nimport { _DYN_HANDLER, _DYN_LENGTH, _DYN_NAME, _DYN_PUSH, _DYN_REPLACE, _DYN_SPLICE, _DYN_SPLIT, _DYN_TYPE } from \"../__DynamicConstants\";\r\nimport { createElmNodeData, createUniqueNamespace } from \"./DataCacheHelper\";\r\nimport { STR_EMPTY } from \"./InternalConstants\";\r\n// Added to help with minfication\r\nvar strOnPrefix = \"on\";\r\nvar strAttachEvent = \"attachEvent\";\r\nvar strAddEventHelper = \"addEventListener\";\r\nvar strDetachEvent = \"detachEvent\";\r\nvar strRemoveEventListener = \"removeEventListener\";\r\nvar strEvents = \"events\";\r\nvar strVisibilityChangeEvt = \"visibilitychange\";\r\nvar strPageHide = \"pagehide\";\r\nvar strPageShow = \"pageshow\";\r\nvar strUnload = \"unload\";\r\nvar strBeforeUnload = \"beforeunload\";\r\nvar strPageHideNamespace = createUniqueNamespace(\"aiEvtPageHide\");\r\nvar strPageShowNamespace = createUniqueNamespace(\"aiEvtPageShow\");\r\nvar rRemoveEmptyNs = /\\.[\\.]+/g;\r\nvar rRemoveTrailingEmptyNs = /[\\.]+$/;\r\nvar _guid = 1;\r\nvar elmNodeData = createElmNodeData(\"events\");\r\nvar eventNamespace = /^([^.]*)(?:\\.(.+)|)/;\r\nfunction _normalizeNamespace(name) {\r\n if (name && name[_DYN_REPLACE /* @min:%2ereplace */]) {\r\n return name[_DYN_REPLACE /* @min:%2ereplace */](/^[\\s\\.]+|(?=[\\s\\.])[\\.\\s]+$/g, STR_EMPTY);\r\n }\r\n return name;\r\n}\r\nfunction _getEvtNamespace(eventName, evtNamespace) {\r\n var _a;\r\n if (evtNamespace) {\r\n var theNamespace_1 = STR_EMPTY;\r\n if (isArray(evtNamespace)) {\r\n theNamespace_1 = STR_EMPTY;\r\n arrForEach(evtNamespace, function (name) {\r\n name = _normalizeNamespace(name);\r\n if (name) {\r\n if (name[0] !== \".\") {\r\n name = \".\" + name;\r\n }\r\n theNamespace_1 += name;\r\n }\r\n });\r\n }\r\n else {\r\n theNamespace_1 = _normalizeNamespace(evtNamespace);\r\n }\r\n if (theNamespace_1) {\r\n if (theNamespace_1[0] !== \".\") {\r\n theNamespace_1 = \".\" + theNamespace_1;\r\n }\r\n // We may only have the namespace and not an eventName\r\n eventName = (eventName || STR_EMPTY) + theNamespace_1;\r\n }\r\n }\r\n var parsedEvent = (eventNamespace.exec(eventName || STR_EMPTY) || []);\r\n return _a = {},\r\n _a[_DYN_TYPE /* @min:type */] = parsedEvent[1],\r\n _a.ns = ((parsedEvent[2] || STR_EMPTY).replace(rRemoveEmptyNs, \".\").replace(rRemoveTrailingEmptyNs, STR_EMPTY)[_DYN_SPLIT /* @min:%2esplit */](\".\").sort()).join(\".\"),\r\n _a;\r\n}\r\n/**\r\n * Get all of the registered events on the target object, this is primarily used for testing cleanup but may also be used by\r\n * applications to remove their own events\r\n * @param target - The EventTarget that has registered events\r\n * @param eventName - [Optional] The name of the event to return the registered handlers and full name (with namespaces)\r\n * @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,\r\n * if the eventName also includes a namespace the namespace(s) are merged into a single namespace\r\n */\r\nexport function __getRegisteredEvents(target, eventName, evtNamespace) {\r\n var theEvents = [];\r\n var eventCache = elmNodeData.get(target, strEvents, {}, false);\r\n var evtName = _getEvtNamespace(eventName, evtNamespace);\r\n objForEachKey(eventCache, function (evtType, registeredEvents) {\r\n arrForEach(registeredEvents, function (value) {\r\n var _a;\r\n if (!evtName[_DYN_TYPE /* @min:%2etype */] || evtName[_DYN_TYPE /* @min:%2etype */] === value.evtName[_DYN_TYPE /* @min:%2etype */]) {\r\n if (!evtName.ns || evtName.ns === evtName.ns) {\r\n theEvents[_DYN_PUSH /* @min:%2epush */]((_a = {},\r\n _a[_DYN_NAME /* @min:name */] = value.evtName[_DYN_TYPE /* @min:%2etype */] + (value.evtName.ns ? \".\" + value.evtName.ns : STR_EMPTY),\r\n _a.handler = value[_DYN_HANDLER /* @min:%2ehandler */],\r\n _a));\r\n }\r\n }\r\n });\r\n });\r\n return theEvents;\r\n}\r\n// Exported for internal unit testing only\r\nfunction _getRegisteredEvents(target, evtName, addDefault) {\r\n if (addDefault === void 0) { addDefault = true; }\r\n var aiEvts = elmNodeData.get(target, strEvents, {}, addDefault);\r\n var registeredEvents = aiEvts[evtName];\r\n if (!registeredEvents) {\r\n registeredEvents = aiEvts[evtName] = [];\r\n }\r\n return registeredEvents;\r\n}\r\nfunction _doDetach(obj, evtName, handlerRef, useCapture) {\r\n if (obj && evtName && evtName[_DYN_TYPE /* @min:%2etype */]) {\r\n if (obj[strRemoveEventListener]) {\r\n obj[strRemoveEventListener](evtName[_DYN_TYPE /* @min:%2etype */], handlerRef, useCapture);\r\n }\r\n else if (obj[strDetachEvent]) {\r\n obj[strDetachEvent](strOnPrefix + evtName[_DYN_TYPE /* @min:%2etype */], handlerRef);\r\n }\r\n }\r\n}\r\nfunction _doAttach(obj, evtName, handlerRef, useCapture) {\r\n var result = false;\r\n if (obj && evtName && evtName[_DYN_TYPE /* @min:%2etype */] && handlerRef) {\r\n if (obj[strAddEventHelper]) {\r\n // all browsers except IE before version 9\r\n obj[strAddEventHelper](evtName[_DYN_TYPE /* @min:%2etype */], handlerRef, useCapture);\r\n result = true;\r\n }\r\n else if (obj[strAttachEvent]) {\r\n // IE before version 9\r\n obj[strAttachEvent](strOnPrefix + evtName[_DYN_TYPE /* @min:%2etype */], handlerRef);\r\n result = true;\r\n }\r\n }\r\n return result;\r\n}\r\nfunction _doUnregister(target, events, evtName, unRegFn) {\r\n var idx = events[_DYN_LENGTH /* @min:%2elength */];\r\n while (idx--) {\r\n var theEvent = events[idx];\r\n if (theEvent) {\r\n if (!evtName.ns || evtName.ns === theEvent.evtName.ns) {\r\n if (!unRegFn || unRegFn(theEvent)) {\r\n _doDetach(target, theEvent.evtName, theEvent[_DYN_HANDLER /* @min:%2ehandler */], theEvent.capture);\r\n // Remove the registered event\r\n events[_DYN_SPLICE /* @min:%2esplice */](idx, 1);\r\n }\r\n }\r\n }\r\n }\r\n}\r\nfunction _unregisterEvents(target, evtName, unRegFn) {\r\n if (evtName[_DYN_TYPE /* @min:%2etype */]) {\r\n _doUnregister(target, _getRegisteredEvents(target, evtName[_DYN_TYPE /* @min:%2etype */]), evtName, unRegFn);\r\n }\r\n else {\r\n var eventCache = elmNodeData.get(target, strEvents, {});\r\n objForEachKey(eventCache, function (evtType, events) {\r\n _doUnregister(target, events, evtName, unRegFn);\r\n });\r\n // Cleanup\r\n if (objKeys(eventCache)[_DYN_LENGTH /* @min:%2elength */] === 0) {\r\n elmNodeData.kill(target, strEvents);\r\n }\r\n }\r\n}\r\nexport function mergeEvtNamespace(theNamespace, namespaces) {\r\n var newNamespaces;\r\n if (namespaces) {\r\n if (isArray(namespaces)) {\r\n newNamespaces = [theNamespace].concat(namespaces);\r\n }\r\n else {\r\n newNamespaces = [theNamespace, namespaces];\r\n }\r\n // resort the namespaces so they are always in order\r\n newNamespaces = (_getEvtNamespace(\"xx\", newNamespaces).ns)[_DYN_SPLIT /* @min:%2esplit */](\".\");\r\n }\r\n else {\r\n newNamespaces = theNamespace;\r\n }\r\n return newNamespaces;\r\n}\r\n/**\r\n * Binds the specified function to an event, so that the function gets called whenever the event fires on the object\r\n * @param obj - Object to add the event too.\r\n * @param eventName - String that specifies any of the standard DHTML Events without \"on\" prefix, if may also include an optional (dot \".\" prefixed)\r\n * namespaces \"click\" \"click.mynamespace\" in addition to specific namespaces.\r\n * @param handlerRef - Pointer that specifies the function to call when event fires\r\n * @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,\r\n * if the eventName also includes a namespace the namespace(s) are merged into a single namespace\r\n * @param useCapture - [Optional] Defaults to false\r\n * @returns True if the function was bound successfully to the event, otherwise false\r\n */\r\nexport function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {\r\n var _a;\r\n if (useCapture === void 0) { useCapture = false; }\r\n var result = false;\r\n if (target) {\r\n try {\r\n var evtName = _getEvtNamespace(eventName, evtNamespace);\r\n result = _doAttach(target, evtName, handlerRef, useCapture);\r\n if (result && elmNodeData.accept(target)) {\r\n var registeredEvent = (_a = {\r\n guid: _guid++,\r\n evtName: evtName\r\n },\r\n _a[_DYN_HANDLER /* @min:handler */] = handlerRef,\r\n _a.capture = useCapture,\r\n _a);\r\n _getRegisteredEvents(target, evtName.type)[_DYN_PUSH /* @min:%2epush */](registeredEvent);\r\n }\r\n }\r\n catch (e) {\r\n // Just Ignore any error so that we don't break any execution path\r\n }\r\n }\r\n return result;\r\n}\r\n/**\r\n * Removes an event handler for the specified event\r\n * @param Object - to remove the event from\r\n * @param eventName - {string} - The name of the event, with optional namespaces or just the namespaces,\r\n * such as \"click\", \"click.mynamespace\" or \".mynamespace\"\r\n * @param handlerRef - {any} - The callback function that needs to be removed from the given event, when using a\r\n * namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers\r\n * otherwise this will only remove events with this specific handler.\r\n * @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,\r\n * if the eventName also includes a namespace the namespace(s) are merged into a single namespace\r\n * @param useCapture - [Optional] Defaults to false\r\n */\r\nexport function eventOff(target, eventName, handlerRef, evtNamespace, useCapture) {\r\n if (useCapture === void 0) { useCapture = false; }\r\n if (target) {\r\n try {\r\n var evtName_1 = _getEvtNamespace(eventName, evtNamespace);\r\n var found_1 = false;\r\n _unregisterEvents(target, evtName_1, function (regEvent) {\r\n if ((evtName_1.ns && !handlerRef) || regEvent[_DYN_HANDLER /* @min:%2ehandler */] === handlerRef) {\r\n found_1 = true;\r\n return true;\r\n }\r\n return false;\r\n });\r\n if (!found_1) {\r\n // fallback to try and remove as requested\r\n _doDetach(target, evtName_1, handlerRef, useCapture);\r\n }\r\n }\r\n catch (e) {\r\n // Just Ignore any error so that we don't break any execution path\r\n }\r\n }\r\n}\r\n/**\r\n * Binds the specified function to an event, so that the function gets called whenever the event fires on the object\r\n * @param obj - Object to add the event too.\r\n * @param eventNameWithoutOn - String that specifies any of the standard DHTML Events without \"on\" prefix and optional (dot \".\" prefixed) namespaces \"click\" \"click.mynamespace\".\r\n * @param handlerRef - Pointer that specifies the function to call when event fires\r\n * @param useCapture - [Optional] Defaults to false\r\n * @returns True if the function was bound successfully to the event, otherwise false\r\n */\r\nexport function attachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {\r\n if (useCapture === void 0) { useCapture = false; }\r\n return eventOn(obj, eventNameWithoutOn, handlerRef, null, useCapture);\r\n}\r\n/**\r\n * Removes an event handler for the specified event\r\n * @param Object - to remove the event from\r\n * @param eventNameWithoutOn - {string} - The name of the event, with optional namespaces or just the namespaces,\r\n * such as \"click\", \"click.mynamespace\" or \".mynamespace\"\r\n * @param handlerRef - {any} - The callback function that needs to be removed from the given event, when using a\r\n * namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers\r\n * otherwise this will only remove events with this specific handler.\r\n * @param useCapture - [Optional] Defaults to false\r\n */\r\nexport function detachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {\r\n if (useCapture === void 0) { useCapture = false; }\r\n eventOff(obj, eventNameWithoutOn, handlerRef, null, useCapture);\r\n}\r\n/**\r\n * Trys to add an event handler for the specified event to the window, body and document\r\n * @param eventName - {string} - The name of the event\r\n * @param callback - {any} - The callback function that needs to be executed for the given event\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n * @return {boolean} - true if the handler was successfully added\r\n */\r\nexport function addEventHandler(eventName, callback, evtNamespace) {\r\n var result = false;\r\n var w = getWindow();\r\n if (w) {\r\n result = eventOn(w, eventName, callback, evtNamespace);\r\n result = eventOn(w[\"body\"], eventName, callback, evtNamespace) || result;\r\n }\r\n var doc = getDocument();\r\n if (doc) {\r\n result = eventOn(doc, eventName, callback, evtNamespace) || result;\r\n }\r\n return result;\r\n}\r\n/**\r\n * Trys to remove event handler(s) for the specified event/namespace to the window, body and document\r\n * @param eventName - {string} - The name of the event, with optional namespaces or just the namespaces,\r\n * such as \"click\", \"click.mynamespace\" or \".mynamespace\"\r\n * @param callback - {any} - - The callback function that needs to be removed from the given event, when using a\r\n * namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers\r\n * otherwise this will only remove events with this specific handler.\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n */\r\nexport function removeEventHandler(eventName, callback, evtNamespace) {\r\n var w = getWindow();\r\n if (w) {\r\n eventOff(w, eventName, callback, evtNamespace);\r\n eventOff(w[\"body\"], eventName, callback, evtNamespace);\r\n }\r\n var doc = getDocument();\r\n if (doc) {\r\n eventOff(doc, eventName, callback, evtNamespace);\r\n }\r\n}\r\n/**\r\n * Bind the listener to the array of events\r\n * @param events - An string array of event names to bind the listener to\r\n * @param listener - The event callback to call when the event is triggered\r\n * @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\r\nfunction _addEventListeners(events, listener, excludeEvents, evtNamespace) {\r\n var added = false;\r\n if (listener && events && events[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n arrForEach(events, function (name) {\r\n if (name) {\r\n if (!excludeEvents || arrIndexOf(excludeEvents, name) === -1) {\r\n added = addEventHandler(name, listener, evtNamespace) || added;\r\n }\r\n }\r\n });\r\n }\r\n return added;\r\n}\r\n/**\r\n * Bind the listener to the array of events\r\n * @param events - An string array of event names to bind the listener to\r\n * @param listener - The event callback to call when the event is triggered\r\n * @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\r\nexport function addEventListeners(events, listener, excludeEvents, evtNamespace) {\r\n var added = false;\r\n if (listener && events && isArray(events)) {\r\n added = _addEventListeners(events, listener, excludeEvents, evtNamespace);\r\n if (!added && excludeEvents && excludeEvents[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n // Failed to add any listeners and we excluded some, so just attempt to add the excluded events\r\n added = _addEventListeners(events, listener, null, evtNamespace);\r\n }\r\n }\r\n return added;\r\n}\r\n/**\r\n * Remove the listener from the array of events\r\n * @param events - An string array of event names to bind the listener to\r\n * @param listener - The event callback to call when the event is triggered\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n */\r\nexport function removeEventListeners(events, listener, evtNamespace) {\r\n if (events && isArray(events)) {\r\n arrForEach(events, function (name) {\r\n if (name) {\r\n removeEventHandler(name, listener, evtNamespace);\r\n }\r\n });\r\n }\r\n}\r\n/**\r\n * Listen to the 'beforeunload', 'unload' and 'pagehide' events which indicates a page unload is occurring,\r\n * this does NOT listen to the 'visibilitychange' event as while it does indicate that the page is being hidden\r\n * it does not *necessarily* mean that the page is being completely unloaded, it can mean that the user is\r\n * just navigating to a different Tab and may come back (without unloading the page). As such you may also\r\n * need to listen to the 'addPageHideEventListener' and 'addPageShowEventListener' events.\r\n * @param listener - The event callback to call when a page unload event is triggered\r\n * @param excludeEvents - [Optional] An array of events that should not be hooked, unless no other events can be.\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\r\nexport function addPageUnloadEventListener(listener, excludeEvents, evtNamespace) {\r\n // Hook the unload event for the document, window and body to ensure that the client events are flushed to the server\r\n // As just hooking the window does not always fire (on chrome) for page navigation's.\r\n return addEventListeners([strBeforeUnload, strUnload, strPageHide], listener, excludeEvents, evtNamespace);\r\n}\r\n/**\r\n * Remove any matching 'beforeunload', 'unload' and 'pagehide' events that may have been added via addEventListener,\r\n * addEventListeners, addPageUnloadEventListener or addPageHideEventListener.\r\n * @param listener - The specific event callback to to be removed\r\n * @param evtNamespace - [Optional] Namespace(s) uniquely identified and removed based on this namespace.\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\r\nexport function removePageUnloadEventListener(listener, evtNamespace) {\r\n removeEventListeners([strBeforeUnload, strUnload, strPageHide], listener, evtNamespace);\r\n}\r\n/**\r\n * Listen to the pagehide and visibility changing to 'hidden' events, because the 'visibilitychange' uses\r\n * an internal proxy to detect the visibility state you SHOULD use a unique namespace when if you plan to call\r\n * removePageShowEventListener as the remove ignores the listener argument for the 'visibilitychange' event.\r\n * @param listener - The event callback to call when a page hide event is triggered\r\n * @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.\r\n * @param evtNamespace - [Optional] A Namespace to append to the event listeners so they can be uniquely identified and removed\r\n * based on this namespace. This call also adds an additional unique \"pageshow\" namespace to the events\r\n * so that only the matching \"removePageHideEventListener\" can remove these events.\r\n * Suggestion: pass as true if you are also calling addPageUnloadEventListener as that also hooks pagehide\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\r\nexport function addPageHideEventListener(listener, excludeEvents, evtNamespace) {\r\n function _handlePageVisibility(evt) {\r\n var doc = getDocument();\r\n if (listener && doc && doc.visibilityState === \"hidden\") {\r\n listener(evt);\r\n }\r\n }\r\n // add the unique page show namespace to any provided namespace so we can only remove the ones added by \"pagehide\"\r\n var newNamespaces = mergeEvtNamespace(strPageHideNamespace, evtNamespace);\r\n var pageUnloadAdded = _addEventListeners([strPageHide], listener, excludeEvents, newNamespaces);\r\n if (!excludeEvents || arrIndexOf(excludeEvents, strVisibilityChangeEvt) === -1) {\r\n pageUnloadAdded = _addEventListeners([strVisibilityChangeEvt], _handlePageVisibility, excludeEvents, newNamespaces) || pageUnloadAdded;\r\n }\r\n if (!pageUnloadAdded && excludeEvents) {\r\n // Failed to add any listeners and we where requested to exclude some, so just call again without excluding anything\r\n pageUnloadAdded = addPageHideEventListener(listener, null, evtNamespace);\r\n }\r\n return pageUnloadAdded;\r\n}\r\n/**\r\n * Removes the pageHide event listeners added by addPageHideEventListener, because the 'visibilitychange' uses\r\n * an internal proxy to detect the visibility state you SHOULD use a unique namespace when calling addPageHideEventListener\r\n * as the remove ignores the listener argument for the 'visibilitychange' event.\r\n * @param listener - The specific listener to remove for the 'pageshow' event only (ignored for 'visibilitychange')\r\n * @param evtNamespace - The unique namespace used when calling addPageShowEventListener\r\n */\r\nexport function removePageHideEventListener(listener, evtNamespace) {\r\n // add the unique page show namespace to any provided namespace so we only remove the ones added by \"pagehide\"\r\n var newNamespaces = mergeEvtNamespace(strPageHideNamespace, evtNamespace);\r\n removeEventListeners([strPageHide], listener, newNamespaces);\r\n removeEventListeners([strVisibilityChangeEvt], null, newNamespaces);\r\n}\r\n/**\r\n * Listen to the pageshow and visibility changing to 'visible' events, because the 'visibilitychange' uses\r\n * an internal proxy to detect the visibility state you SHOULD use a unique namespace when if you plan to call\r\n * removePageShowEventListener as the remove ignores the listener argument for the 'visibilitychange' event.\r\n * @param listener - The event callback to call when a page is show event is triggered\r\n * @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.\r\n * @param evtNamespace - [Optional/Recommended] A Namespace to append to the event listeners so they can be uniquely\r\n * identified and removed based on this namespace. This call also adds an additional unique \"pageshow\" namespace to the events\r\n * so that only the matching \"removePageShowEventListener\" can remove these events.\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\r\nexport function addPageShowEventListener(listener, excludeEvents, evtNamespace) {\r\n function _handlePageVisibility(evt) {\r\n var doc = getDocument();\r\n if (listener && doc && doc.visibilityState === \"visible\") {\r\n listener(evt);\r\n }\r\n }\r\n // add the unique page show namespace to any provided namespace so we can only remove the ones added by \"pageshow\"\r\n var newNamespaces = mergeEvtNamespace(strPageShowNamespace, evtNamespace);\r\n var pageShowAdded = _addEventListeners([strPageShow], listener, excludeEvents, newNamespaces);\r\n pageShowAdded = _addEventListeners([strVisibilityChangeEvt], _handlePageVisibility, excludeEvents, newNamespaces) || pageShowAdded;\r\n if (!pageShowAdded && excludeEvents) {\r\n // Failed to add any listeners and we where requested to exclude some, so just call again without excluding anything\r\n pageShowAdded = addPageShowEventListener(listener, null, evtNamespace);\r\n }\r\n return pageShowAdded;\r\n}\r\n/**\r\n * Removes the pageShow event listeners added by addPageShowEventListener, because the 'visibilitychange' uses\r\n * an internal proxy to detect the visibility state you SHOULD use a unique namespace when calling addPageShowEventListener\r\n * as the remove ignores the listener argument for the 'visibilitychange' event.\r\n * @param listener - The specific listener to remove for the 'pageshow' event only (ignored for 'visibilitychange')\r\n * @param evtNamespace - The unique namespace used when calling addPageShowEventListener\r\n */\r\nexport function removePageShowEventListener(listener, evtNamespace) {\r\n // add the unique page show namespace to any provided namespace so we only remove the ones added by \"pageshow\"\r\n var newNamespaces = mergeEvtNamespace(strPageShowNamespace, evtNamespace);\r\n removeEventListeners([strPageShow], listener, newNamespaces);\r\n removeEventListeners([strVisibilityChangeEvt], null, newNamespaces);\r\n}\r\n//# sourceMappingURL=EventHelpers.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { strShimFunction, strShimPrototype } from \"@microsoft/applicationinsights-shims\";\r\nimport { getInst, objHasOwnProperty } from \"@nevware21/ts-utils\";\r\nimport { _DYN_APPLY, _DYN_LENGTH, _DYN_NAME, _DYN_PUSH, _DYN_SPLICE } from \"../__DynamicConstants\";\r\nimport { _getObjProto } from \"./HelperFuncs\";\r\nvar aiInstrumentHooks = \"_aiHooks\";\r\nvar cbNames = [\r\n \"req\", \"rsp\", \"hkErr\", \"fnErr\"\r\n];\r\n/** @ignore */\r\nfunction _arrLoop(arr, fn) {\r\n if (arr) {\r\n for (var lp = 0; lp < arr[_DYN_LENGTH /* @min:%2elength */]; lp++) {\r\n if (fn(arr[lp], lp)) {\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n/** @ignore */\r\nfunction _doCallbacks(hooks, callDetails, cbArgs, hookCtx, type) {\r\n if (type >= 0 /* CallbackType.Request */ && type <= 2 /* CallbackType.HookError */) {\r\n _arrLoop(hooks, function (hook, idx) {\r\n var cbks = hook.cbks;\r\n var cb = cbks[cbNames[type]];\r\n if (cb) {\r\n // Set the specific hook context implementation using a lazy creation pattern\r\n callDetails.ctx = function () {\r\n var ctx = hookCtx[idx] = (hookCtx[idx] || {});\r\n return ctx;\r\n };\r\n try {\r\n cb[_DYN_APPLY /* @min:%2eapply */](callDetails.inst, cbArgs);\r\n }\r\n catch (err) {\r\n var orgEx = callDetails.err;\r\n try {\r\n // Report Hook error via the callback\r\n var hookErrorCb = cbks[cbNames[2 /* CallbackType.HookError */]];\r\n if (hookErrorCb) {\r\n callDetails.err = err;\r\n hookErrorCb[_DYN_APPLY /* @min:%2eapply */](callDetails.inst, cbArgs);\r\n }\r\n }\r\n catch (e) {\r\n // Not much we can do here -- swallowing the exception to avoid crashing the hosting app\r\n }\r\n finally {\r\n // restore the original exception (if any)\r\n callDetails.err = orgEx;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n}\r\n/** @ignore */\r\nfunction _createFunctionHook(aiHook) {\r\n // Define a temporary method that queues-up a the real method call\r\n return function () {\r\n var _a;\r\n var funcThis = this;\r\n // Capture the original arguments passed to the method\r\n var orgArgs = arguments;\r\n var hooks = aiHook.h;\r\n var funcArgs = (_a = {},\r\n _a[_DYN_NAME /* @min:name */] = aiHook.n,\r\n _a.inst = funcThis,\r\n _a.ctx = null,\r\n _a.set = _replaceArg,\r\n _a);\r\n var hookCtx = [];\r\n var cbArgs = _createArgs([funcArgs], orgArgs);\r\n funcArgs.evt = getInst(\"event\");\r\n function _createArgs(target, theArgs) {\r\n _arrLoop(theArgs, function (arg) {\r\n target[_DYN_PUSH /* @min:%2epush */](arg);\r\n });\r\n return target;\r\n }\r\n function _replaceArg(idx, value) {\r\n orgArgs = _createArgs([], orgArgs);\r\n orgArgs[idx] = value;\r\n cbArgs = _createArgs([funcArgs], orgArgs);\r\n }\r\n // Call the pre-request hooks\r\n _doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 0 /* CallbackType.Request */);\r\n // Call the original function was called\r\n var theFunc = aiHook.f;\r\n if (theFunc) {\r\n try {\r\n funcArgs.rslt = theFunc[_DYN_APPLY /* @min:%2eapply */](funcThis, orgArgs);\r\n }\r\n catch (err) {\r\n // Report the request callback\r\n funcArgs.err = err;\r\n _doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 3 /* CallbackType.FunctionError */);\r\n // rethrow the original exception so anyone listening for it can catch the exception\r\n throw err;\r\n }\r\n }\r\n // Call the post-request hooks\r\n _doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 1 /* CallbackType.Response */);\r\n return funcArgs.rslt;\r\n };\r\n}\r\n/** @ignore */\r\nfunction _getOwner(target, name, checkPrototype, checkParentProto) {\r\n var owner = null;\r\n if (target) {\r\n if (objHasOwnProperty(target, name)) {\r\n owner = target;\r\n }\r\n else if (checkPrototype) {\r\n owner = _getOwner(_getObjProto(target), name, checkParentProto, false);\r\n }\r\n }\r\n return owner;\r\n}\r\n/**\r\n * Intercept the named prototype functions for the target class / object\r\n * @param target - The target object\r\n * @param funcName - The function name\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n */\r\nexport function InstrumentProto(target, funcName, callbacks) {\r\n if (target) {\r\n return InstrumentFunc(target[strShimPrototype], funcName, callbacks, false);\r\n }\r\n return null;\r\n}\r\n/**\r\n * Intercept the named prototype functions for the target class / object\r\n * @param target - The target object\r\n * @param funcNames - The function names to intercept and call\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n */\r\nexport function InstrumentProtos(target, funcNames, callbacks) {\r\n if (target) {\r\n return InstrumentFuncs(target[strShimPrototype], funcNames, callbacks, false);\r\n }\r\n return null;\r\n}\r\nfunction _createInstrumentHook(owner, funcName, fn, callbacks) {\r\n var aiHook = fn && fn[aiInstrumentHooks];\r\n if (!aiHook) {\r\n // Only hook the function once\r\n aiHook = {\r\n i: 0,\r\n n: funcName,\r\n f: fn,\r\n h: []\r\n };\r\n // Override (hook) the original function\r\n var newFunc = _createFunctionHook(aiHook);\r\n newFunc[aiInstrumentHooks] = aiHook; // Tag and store the function hooks\r\n owner[funcName] = newFunc;\r\n }\r\n var theHook = {\r\n // tslint:disable:object-literal-shorthand\r\n id: aiHook.i,\r\n cbks: callbacks,\r\n rm: function () {\r\n // DO NOT Use () => { shorthand for the function as the this gets replaced\r\n // with the outer this and not the this for theHook instance.\r\n var id = this.id;\r\n _arrLoop(aiHook.h, function (hook, idx) {\r\n if (hook.id === id) {\r\n aiHook.h[_DYN_SPLICE /* @min:%2esplice */](idx, 1);\r\n return 1;\r\n }\r\n });\r\n }\r\n // tslint:enable:object-literal-shorthand\r\n };\r\n aiHook.i++;\r\n aiHook.h[_DYN_PUSH /* @min:%2epush */](theHook);\r\n return theHook;\r\n}\r\n/**\r\n * Intercept the named prototype functions for the target class / object\r\n * @param target - The target object\r\n * @param funcName - The function name\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function\r\n * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype\r\n */\r\nexport function InstrumentFunc(target, funcName, callbacks, checkPrototype, checkParentProto) {\r\n if (checkPrototype === void 0) { checkPrototype = true; }\r\n if (target && funcName && callbacks) {\r\n var owner = _getOwner(target, funcName, checkPrototype, checkParentProto);\r\n if (owner) {\r\n var fn = owner[funcName];\r\n if (typeof fn === strShimFunction) {\r\n return _createInstrumentHook(owner, funcName, fn, callbacks);\r\n }\r\n }\r\n }\r\n return null;\r\n}\r\n/**\r\n * Intercept the named functions for the target class / object\r\n * @param target - The target object\r\n * @param funcNames - The function names to intercept and call\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function\r\n * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype\r\n */\r\nexport function InstrumentFuncs(target, funcNames, callbacks, checkPrototype, checkParentProto) {\r\n if (checkPrototype === void 0) { checkPrototype = true; }\r\n var hooks = null;\r\n _arrLoop(funcNames, function (funcName) {\r\n var hook = InstrumentFunc(target, funcName, callbacks, checkPrototype, checkParentProto);\r\n if (hook) {\r\n if (!hooks) {\r\n hooks = [];\r\n }\r\n hooks[_DYN_PUSH /* @min:%2epush */](hook);\r\n }\r\n });\r\n return hooks;\r\n}\r\n/**\r\n * Add an instrumentation hook to the provided named \"event\" for the target class / object, this doesn't check whether the\r\n * named \"event\" is in fact a function and just assigns the instrumentation hook to the target[evtName]\r\n * @param target - The target object\r\n * @param evtName - The name of the event\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function\r\n * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype\r\n */\r\nexport function InstrumentEvent(target, evtName, callbacks, checkPrototype, checkParentProto) {\r\n if (target && evtName && callbacks) {\r\n var owner = _getOwner(target, evtName, checkPrototype, checkParentProto) || target;\r\n if (owner) {\r\n return _createInstrumentHook(owner, evtName, owner[evtName], callbacks);\r\n }\r\n }\r\n return null;\r\n}\r\n//# sourceMappingURL=InstrumentHooks.js.map","var _a, _b;\r\nimport { arrForEach, arrIndexOf, dumpObj, getDocument, getLazy, getNavigator, isArray, isFunction, isNullOrUndefined, isString, isTruthy, isUndefined, objForEachKey, strEndsWith, strIndexOf, strLeft, strSubstring, strTrim, utcNow } from \"@nevware21/ts-utils\";\r\nimport { cfgDfMerge } from \"../Config/ConfigDefaultHelpers\";\r\nimport { createDynamicConfig, onConfigChange } from \"../Config/DynamicConfig\";\r\nimport { _DYN_ENABLED, _DYN_LENGTH, _DYN_LOGGER, _DYN_SET_DF, _DYN_SPLIT, _DYN_UNLOAD, _DYN_USER_AGENT } from \"../__DynamicConstants\";\r\nimport { _throwInternal } from \"./DiagnosticLogger\";\r\nimport { getLocation, isIE } from \"./EnvUtils\";\r\nimport { getExceptionName, isNotNullOrUndefined, setValue, strContains } from \"./HelperFuncs\";\r\nimport { STR_DOMAIN, STR_EMPTY, STR_PATH, UNDEFINED_VALUE } from \"./InternalConstants\";\r\nvar strToGMTString = \"toGMTString\";\r\nvar strToUTCString = \"toUTCString\";\r\nvar strCookie = \"cookie\";\r\nvar strExpires = \"expires\";\r\nvar strIsCookieUseDisabled = \"isCookieUseDisabled\";\r\nvar strDisableCookiesUsage = \"disableCookiesUsage\";\r\nvar strConfigCookieMgr = \"_ckMgr\";\r\nvar _supportsCookies = null;\r\nvar _allowUaSameSite = null;\r\nvar _parsedCookieValue = null;\r\nvar _doc;\r\nvar _cookieCache = {};\r\nvar _globalCookieConfig = {};\r\n// // `isCookieUseDisabled` is deprecated, so explicitly casting as a key of IConfiguration to avoid typing error\r\n// // when both isCookieUseDisabled and disableCookiesUsage are used disableCookiesUsage will take precedent, which is\r\n// // why its listed first\r\n/**\r\n * Set the supported dynamic config values as undefined (or an empty object) so that\r\n * any listeners will be informed of any changes.\r\n * Explicitly NOT including the deprecated `isCookieUseDisabled` as we don't want to support\r\n * the v1 deprecated field as dynamic for updates\r\n */\r\nvar rootDefaultConfig = (_a = {\r\n cookieCfg: cfgDfMerge((_b = {},\r\n _b[STR_DOMAIN] = { fb: \"cookieDomain\", dfVal: isNotNullOrUndefined },\r\n _b.path = { fb: \"cookiePath\", dfVal: isNotNullOrUndefined },\r\n _b.enabled = UNDEFINED_VALUE,\r\n _b.ignoreCookies = UNDEFINED_VALUE,\r\n _b.blockedCookies = UNDEFINED_VALUE,\r\n _b)),\r\n cookieDomain: UNDEFINED_VALUE,\r\n cookiePath: UNDEFINED_VALUE\r\n },\r\n _a[strDisableCookiesUsage] = UNDEFINED_VALUE,\r\n _a);\r\nfunction _getDoc() {\r\n !_doc && (_doc = getLazy(function () { return getDocument(); }));\r\n}\r\n/**\r\n * @ignore\r\n * DO NOT USE or export from the module, this is exposed as public to support backward compatibility of previous static utility methods only.\r\n * If you want to manager cookies either use the ICookieMgr available from the core instance via getCookieMgr() or create\r\n * your own instance of the CookieMgr and use that.\r\n * Using this directly for enabling / disabling cookie handling will not only affect your usage but EVERY user of cookies.\r\n * Example, if you are using a shared component that is also using Application Insights you will affect their cookie handling.\r\n * @param logger - The DiagnosticLogger to use for reporting errors.\r\n */\r\nfunction _gblCookieMgr(config, logger) {\r\n // Stash the global instance against the BaseCookieMgr class\r\n var inst = createCookieMgr[strConfigCookieMgr] || _globalCookieConfig[strConfigCookieMgr];\r\n if (!inst) {\r\n // Note: not using the getSetValue() helper as that would require always creating a temporary cookieMgr\r\n // that ultimately is never used\r\n inst = createCookieMgr[strConfigCookieMgr] = createCookieMgr(config, logger);\r\n _globalCookieConfig[strConfigCookieMgr] = inst;\r\n }\r\n return inst;\r\n}\r\nfunction _isMgrEnabled(cookieMgr) {\r\n if (cookieMgr) {\r\n return cookieMgr.isEnabled();\r\n }\r\n return true;\r\n}\r\nfunction _isIgnoredCookie(cookieMgrCfg, name) {\r\n if (name && cookieMgrCfg && isArray(cookieMgrCfg.ignoreCookies)) {\r\n return arrIndexOf(cookieMgrCfg.ignoreCookies, name) !== -1;\r\n }\r\n return false;\r\n}\r\nfunction _isBlockedCookie(cookieMgrCfg, name) {\r\n if (name && cookieMgrCfg && isArray(cookieMgrCfg.blockedCookies)) {\r\n if (arrIndexOf(cookieMgrCfg.blockedCookies, name) !== -1) {\r\n return true;\r\n }\r\n }\r\n return _isIgnoredCookie(cookieMgrCfg, name);\r\n}\r\nfunction _isCfgEnabled(rootConfig, cookieMgrConfig) {\r\n var isCfgEnabled = cookieMgrConfig[_DYN_ENABLED /* @min:%2eenabled */];\r\n if (isNullOrUndefined(isCfgEnabled)) {\r\n // Set the enabled from the provided setting or the legacy root values\r\n var cookieEnabled = void 0;\r\n // This field is deprecated and dynamic updates will not be fully supported\r\n if (!isUndefined(rootConfig[strIsCookieUseDisabled])) {\r\n cookieEnabled = !rootConfig[strIsCookieUseDisabled];\r\n }\r\n // If this value is defined it takes precedent over the above\r\n if (!isUndefined(rootConfig[strDisableCookiesUsage])) {\r\n cookieEnabled = !rootConfig[strDisableCookiesUsage];\r\n }\r\n // Not setting the cookieMgrConfig.enabled as that will update (set) the global dynamic config\r\n // So future \"updates\" then may not be as expected\r\n isCfgEnabled = cookieEnabled;\r\n }\r\n return isCfgEnabled;\r\n}\r\n/**\r\n * Helper to return the ICookieMgr from the core (if not null/undefined) or a default implementation\r\n * associated with the configuration or a legacy default.\r\n * @param core\r\n * @param config\r\n * @returns\r\n */\r\nexport function safeGetCookieMgr(core, config) {\r\n var cookieMgr;\r\n if (core) {\r\n // Always returns an instance\r\n cookieMgr = core.getCookieMgr();\r\n }\r\n else if (config) {\r\n var cookieCfg = config.cookieCfg;\r\n if (cookieCfg && cookieCfg[strConfigCookieMgr]) {\r\n cookieMgr = cookieCfg[strConfigCookieMgr];\r\n }\r\n else {\r\n cookieMgr = createCookieMgr(config);\r\n }\r\n }\r\n if (!cookieMgr) {\r\n // Get or initialize the default global (legacy) cookie manager if we couldn't find one\r\n cookieMgr = _gblCookieMgr(config, (core || {})[_DYN_LOGGER /* @min:%2elogger */]);\r\n }\r\n return cookieMgr;\r\n}\r\nexport function createCookieMgr(rootConfig, logger) {\r\n var _a;\r\n var cookieMgrConfig;\r\n var _path;\r\n var _domain;\r\n var unloadHandler;\r\n // Explicitly checking against false, so that setting to undefined will === true\r\n var _enabled;\r\n var _getCookieFn;\r\n var _setCookieFn;\r\n var _delCookieFn;\r\n // Make sure the root config is dynamic as it may be the global config\r\n rootConfig = createDynamicConfig(rootConfig || _globalCookieConfig, null, logger).cfg;\r\n // Will get recalled if the referenced configuration is changed\r\n unloadHandler = onConfigChange(rootConfig, function (details) {\r\n // Make sure the root config has all of the the defaults to the root config to ensure they are dynamic\r\n details[_DYN_SET_DF /* @min:%2esetDf */](details.cfg, rootDefaultConfig);\r\n // Create and apply the defaults to the cookieCfg element\r\n cookieMgrConfig = details.ref(details.cfg, \"cookieCfg\"); // details.setDf(details.cfg.cookieCfg, defaultConfig);\r\n _path = cookieMgrConfig[STR_PATH /* @min:%2epath */] || \"/\";\r\n _domain = cookieMgrConfig[STR_DOMAIN /* @min:%2edomain */];\r\n // Explicitly checking against false, so that setting to undefined will === true\r\n _enabled = _isCfgEnabled(rootConfig, cookieMgrConfig) !== false;\r\n _getCookieFn = cookieMgrConfig.getCookie || _getCookieValue;\r\n _setCookieFn = cookieMgrConfig.setCookie || _setCookieValue;\r\n _delCookieFn = cookieMgrConfig.delCookie || _setCookieValue;\r\n }, logger);\r\n var cookieMgr = (_a = {\r\n isEnabled: function () {\r\n var enabled = _isCfgEnabled(rootConfig, cookieMgrConfig) !== false && _enabled && areCookiesSupported(logger);\r\n // Using an indirect lookup for any global cookie manager to support tree shaking for SDK's\r\n // that don't use the \"applicationinsights-core\" version of the default cookie function\r\n var gblManager = _globalCookieConfig[strConfigCookieMgr];\r\n if (enabled && gblManager && cookieMgr !== gblManager) {\r\n // Make sure the GlobalCookie Manager instance (if not this instance) is also enabled.\r\n // As the global (deprecated) functions may have been called (for backward compatibility)\r\n enabled = _isMgrEnabled(gblManager);\r\n }\r\n return enabled;\r\n },\r\n setEnabled: function (value) {\r\n // Explicitly checking against false, so that setting to undefined will === true\r\n _enabled = value !== false;\r\n cookieMgrConfig[_DYN_ENABLED /* @min:%2eenabled */] = value;\r\n },\r\n set: function (name, value, maxAgeSec, domain, path) {\r\n var result = false;\r\n if (_isMgrEnabled(cookieMgr) && !_isBlockedCookie(cookieMgrConfig, name)) {\r\n var values = {};\r\n var theValue = strTrim(value || STR_EMPTY);\r\n var idx = strIndexOf(theValue, \";\");\r\n if (idx !== -1) {\r\n theValue = strTrim(strLeft(value, idx));\r\n values = _extractParts(strSubstring(value, idx + 1));\r\n }\r\n // Only update domain if not already present (isUndefined) and the value is truthy (not null, undefined or empty string)\r\n setValue(values, STR_DOMAIN, domain || _domain, isTruthy, isUndefined);\r\n if (!isNullOrUndefined(maxAgeSec)) {\r\n var _isIE = isIE();\r\n if (isUndefined(values[strExpires])) {\r\n var nowMs = utcNow();\r\n // Only add expires if not already present\r\n var expireMs = nowMs + (maxAgeSec * 1000);\r\n // Sanity check, if zero or -ve then ignore\r\n if (expireMs > 0) {\r\n var expiry = new Date();\r\n expiry.setTime(expireMs);\r\n setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || STR_EMPTY, isTruthy);\r\n }\r\n }\r\n if (!_isIE) {\r\n // Only replace if not already present\r\n setValue(values, \"max-age\", STR_EMPTY + maxAgeSec, null, isUndefined);\r\n }\r\n }\r\n var location_1 = getLocation();\r\n if (location_1 && location_1.protocol === \"https:\") {\r\n setValue(values, \"secure\", null, null, isUndefined);\r\n // Only set same site if not also secure\r\n if (_allowUaSameSite === null) {\r\n _allowUaSameSite = !uaDisallowsSameSiteNone((getNavigator() || {})[_DYN_USER_AGENT /* @min:%2euserAgent */]);\r\n }\r\n if (_allowUaSameSite) {\r\n setValue(values, \"SameSite\", \"None\", null, isUndefined);\r\n }\r\n }\r\n setValue(values, STR_PATH, path || _path, null, isUndefined);\r\n //let setCookieFn = cookieMgrConfig.setCookie || _setCookieValue;\r\n _setCookieFn(name, _formatCookieValue(theValue, values));\r\n result = true;\r\n }\r\n return result;\r\n },\r\n get: function (name) {\r\n var value = STR_EMPTY;\r\n if (_isMgrEnabled(cookieMgr) && !_isIgnoredCookie(cookieMgrConfig, name)) {\r\n value = _getCookieFn(name);\r\n }\r\n return value;\r\n },\r\n del: function (name, path) {\r\n var result = false;\r\n if (_isMgrEnabled(cookieMgr)) {\r\n // Only remove the cookie if the manager and cookie support has not been disabled\r\n result = cookieMgr.purge(name, path);\r\n }\r\n return result;\r\n },\r\n purge: function (name, path) {\r\n var _a;\r\n var result = false;\r\n if (areCookiesSupported(logger)) {\r\n // Setting the expiration date in the past immediately removes the cookie\r\n var values = (_a = {},\r\n _a[STR_PATH] = path ? path : \"/\",\r\n _a[strExpires] = \"Thu, 01 Jan 1970 00:00:01 GMT\",\r\n _a);\r\n if (!isIE()) {\r\n // Set max age to expire now\r\n values[\"max-age\"] = \"0\";\r\n }\r\n // let delCookie = cookieMgrConfig.delCookie || _setCookieValue;\r\n _delCookieFn(name, _formatCookieValue(STR_EMPTY, values));\r\n result = true;\r\n }\r\n return result;\r\n }\r\n },\r\n _a[_DYN_UNLOAD /* @min:unload */] = function (isAsync) {\r\n unloadHandler && unloadHandler.rm();\r\n unloadHandler = null;\r\n },\r\n _a);\r\n // Associated this cookie manager with the config\r\n cookieMgr[strConfigCookieMgr] = cookieMgr;\r\n return cookieMgr;\r\n}\r\n/*\r\n* Helper method to tell if document.cookie object is supported by the runtime\r\n*/\r\nexport function areCookiesSupported(logger) {\r\n if (_supportsCookies === null) {\r\n _supportsCookies = false;\r\n !_doc && _getDoc();\r\n try {\r\n var doc = _doc.v || {};\r\n _supportsCookies = doc[strCookie] !== undefined;\r\n }\r\n catch (e) {\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 68 /* _eInternalMessageId.CannotAccessCookie */, \"Cannot access document.cookie - \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n return _supportsCookies;\r\n}\r\nfunction _extractParts(theValue) {\r\n var values = {};\r\n if (theValue && theValue[_DYN_LENGTH /* @min:%2elength */]) {\r\n var parts = strTrim(theValue)[_DYN_SPLIT /* @min:%2esplit */](\";\");\r\n arrForEach(parts, function (thePart) {\r\n thePart = strTrim(thePart || STR_EMPTY);\r\n if (thePart) {\r\n var idx = strIndexOf(thePart, \"=\");\r\n if (idx === -1) {\r\n values[thePart] = null;\r\n }\r\n else {\r\n values[strTrim(strLeft(thePart, idx))] = strTrim(strSubstring(thePart, idx + 1));\r\n }\r\n }\r\n });\r\n }\r\n return values;\r\n}\r\nfunction _formatDate(theDate, func) {\r\n if (isFunction(theDate[func])) {\r\n return theDate[func]();\r\n }\r\n return null;\r\n}\r\nfunction _formatCookieValue(value, values) {\r\n var cookieValue = value || STR_EMPTY;\r\n objForEachKey(values, function (name, theValue) {\r\n cookieValue += \"; \" + name + (!isNullOrUndefined(theValue) ? \"=\" + theValue : STR_EMPTY);\r\n });\r\n return cookieValue;\r\n}\r\nfunction _getCookieValue(name) {\r\n var cookieValue = STR_EMPTY;\r\n !_doc && _getDoc();\r\n if (_doc.v) {\r\n var theCookie = _doc.v[strCookie] || STR_EMPTY;\r\n if (_parsedCookieValue !== theCookie) {\r\n _cookieCache = _extractParts(theCookie);\r\n _parsedCookieValue = theCookie;\r\n }\r\n cookieValue = strTrim(_cookieCache[name] || STR_EMPTY);\r\n }\r\n return cookieValue;\r\n}\r\nfunction _setCookieValue(name, cookieValue) {\r\n !_doc && _getDoc();\r\n if (_doc.v) {\r\n _doc.v[strCookie] = name + \"=\" + cookieValue;\r\n }\r\n}\r\nexport function uaDisallowsSameSiteNone(userAgent) {\r\n if (!isString(userAgent)) {\r\n return false;\r\n }\r\n // Cover all iOS based browsers here. This includes:\r\n // - Safari on iOS 12 for iPhone, iPod Touch, iPad\r\n // - WkWebview on iOS 12 for iPhone, iPod Touch, iPad\r\n // - Chrome on iOS 12 for iPhone, iPod Touch, iPad\r\n // All of which are broken by SameSite=None, because they use the iOS networking stack\r\n if (strContains(userAgent, \"CPU iPhone OS 12\") || strContains(userAgent, \"iPad; CPU OS 12\")) {\r\n return true;\r\n }\r\n // Cover Mac OS X based browsers that use the Mac OS networking stack. This includes:\r\n // - Safari on Mac OS X\r\n // This does not include:\r\n // - Internal browser on Mac OS X\r\n // - Chrome on Mac OS X\r\n // - Chromium on Mac OS X\r\n // Because they do not use the Mac OS networking stack.\r\n if (strContains(userAgent, \"Macintosh; Intel Mac OS X 10_14\") && strContains(userAgent, \"Version/\") && strContains(userAgent, \"Safari\")) {\r\n return true;\r\n }\r\n // Cover Mac OS X internal browsers that use the Mac OS networking stack. This includes:\r\n // - Internal browser on Mac OS X\r\n // This does not include:\r\n // - Safari on Mac OS X\r\n // - Chrome on Mac OS X\r\n // - Chromium on Mac OS X\r\n // Because they do not use the Mac OS networking stack.\r\n if (strContains(userAgent, \"Macintosh; Intel Mac OS X 10_14\") && strEndsWith(userAgent, \"AppleWebKit/605.1.15 (KHTML, like Gecko)\")) {\r\n return true;\r\n }\r\n // Cover Chrome 50-69, because some versions are broken by SameSite=None, and none in this range require it.\r\n // Note: this covers some pre-Chromium Edge versions, but pre-Chromim Edge does not require SameSite=None, so this is fine.\r\n // Note: this regex applies to Windows, Mac OS X, and Linux, deliberately.\r\n if (strContains(userAgent, \"Chrome/5\") || strContains(userAgent, \"Chrome/6\")) {\r\n return true;\r\n }\r\n // Unreal Engine runs Chromium 59, but does not advertise as Chrome until 4.23. Treat versions of Unreal\r\n // that don't specify their Chrome version as lacking support for SameSite=None.\r\n if (strContains(userAgent, \"UnrealEngine\") && !strContains(userAgent, \"Chrome\")) {\r\n return true;\r\n }\r\n // UCBrowser < 12.13.2 ignores Set-Cookie headers with SameSite=None\r\n // NB: this rule isn't complete - you need regex to make a complete rule.\r\n // See: https://www.chromium.org/updates/same-site/incompatible-clients\r\n if (strContains(userAgent, \"UCBrowser/12\") || strContains(userAgent, \"UCBrowser/11\")) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n//# sourceMappingURL=CookieMgr.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { isString, isUndefined } from \"../helpers/base\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { LENGTH, StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunctionWithPoly } from \"../internal/unwrapFunction\";\r\nimport { asString } from \"./as_string\";\r\nimport { strSubstring } from \"./substring\";\r\n/**\r\n * This method lets you determine whether or not a string ends with another string. This method is case-sensitive.\r\n * @group String\r\n * @param value - The value to be checked\r\n * @param searchString - The characters to be searched for at the end of `value` string.\r\n * @param length - If provided, it is used as the length of `value`. Defaults to value.length.\r\n */\r\nexport var strEndsWith = _unwrapFunctionWithPoly(\"endsWith\", StrProto, polyStrEndsWith);\r\n/**\r\n * This method lets you determine whether or not a string ends with another string. This method is case-sensitive.\r\n * @group Polyfill\r\n * @group String\r\n * @param value - The value to be checked\r\n * @param searchString - The characters to be searched for at the end of `value` string.\r\n * @param length - If provided, it is used as the length of `value`. Defaults to value.length.\r\n */\r\nexport function polyStrEndsWith(value, searchString, length) {\r\n if (!isString(value)) {\r\n throwTypeError(\"'\" + dumpObj(value) + \"' is not a string\");\r\n }\r\n var searchValue = isString(searchString) ? searchString : asString(searchString);\r\n var chkLen = searchValue[LENGTH];\r\n var len = value[LENGTH];\r\n var end = !isUndefined(length) && length < len ? length : len;\r\n return strSubstring(value, end - chkLen, end) === searchValue;\r\n}\r\n//# sourceMappingURL=ends_with.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { isString, isUndefined } from \"../helpers/base\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { LENGTH, StrProto } from \"../internal/constants\";\r\nimport { _unwrapFunctionWithPoly } from \"../internal/unwrapFunction\";\r\nimport { asString } from \"./as_string\";\r\nimport { strSubstring } from \"./substring\";\r\n\r\n/**\r\n * This method lets you determine whether or not a string ends with another string. This method is case-sensitive.\r\n * @group String\r\n * @param value - The value to be checked\r\n * @param searchString - The characters to be searched for at the end of `value` string.\r\n * @param length - If provided, it is used as the length of `value`. Defaults to value.length.\r\n */\r\nexport const strEndsWith: (value: string, searchString: string, length?: number) => boolean = _unwrapFunctionWithPoly(\"endsWith\", StrProto, polyStrEndsWith);\r\n\r\n/**\r\n * This method lets you determine whether or not a string ends with another string. This method is case-sensitive.\r\n * @group Polyfill\r\n * @group String\r\n * @param value - The value to be checked\r\n * @param searchString - The characters to be searched for at the end of `value` string.\r\n * @param length - If provided, it is used as the length of `value`. Defaults to value.length.\r\n */\r\nexport function polyStrEndsWith(value: string, searchString: string, length?: number): boolean {\r\n if (!isString(value)) {\r\n throwTypeError(\"'\" + dumpObj(value) + \"' is not a string\");\r\n }\r\n\r\n let searchValue = isString(searchString) ? searchString : asString(searchString);\r\n let chkLen = searchValue[LENGTH];\r\n let len = value[LENGTH];\r\n let end = !isUndefined(length) && length < len ? length : len;\r\n\r\n return strSubstring(value, end - chkLen, end) === searchValue;\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_TO_STRING = \"toString\"; // Count: 4\r\nexport var _DYN_IS_STORAGE_USE_DISAB0 = \"isStorageUseDisabled\"; // Count: 3\r\nexport var _DYN__ADD_HOOK = \"_addHook\"; // Count: 6\r\nexport var _DYN_CORE = \"core\"; // Count: 7\r\nexport var _DYN_DATA_TYPE = \"dataType\"; // Count: 8\r\nexport var _DYN_ENVELOPE_TYPE = \"envelopeType\"; // Count: 7\r\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 13\r\nexport var _DYN_TRACK = \"track\"; // Count: 7\r\nexport var _DYN_TRACK_PAGE_VIEW = \"trackPageView\"; // Count: 4\r\nexport var _DYN_TRACK_PREVIOUS_PAGE_1 = \"trackPreviousPageVisit\"; // Count: 3\r\nexport var _DYN_SEND_PAGE_VIEW_INTER2 = \"sendPageViewInternal\"; // Count: 7\r\nexport var _DYN_SEND_PAGE_VIEW_PERFO3 = \"sendPageViewPerformanceInternal\"; // Count: 3\r\nexport var _DYN_POPULATE_PAGE_VIEW_P4 = \"populatePageViewPerformanceEvent\"; // Count: 3\r\nexport var _DYN_HREF = \"href\"; // Count: 6\r\nexport var _DYN_SEND_EXCEPTION_INTER5 = \"sendExceptionInternal\"; // Count: 2\r\nexport var _DYN_EXCEPTION = \"exception\"; // Count: 3\r\nexport var _DYN_ERROR = \"error\"; // Count: 5\r\nexport var _DYN__ONERROR = \"_onerror\"; // Count: 3\r\nexport var _DYN_ERROR_SRC = \"errorSrc\"; // Count: 3\r\nexport var _DYN_LINE_NUMBER = \"lineNumber\"; // Count: 5\r\nexport var _DYN_COLUMN_NUMBER = \"columnNumber\"; // Count: 5\r\nexport var _DYN_MESSAGE = \"message\"; // Count: 4\r\nexport var _DYN__CREATE_AUTO_EXCEPTI6 = \"CreateAutoException\"; // Count: 3\r\nexport var _DYN_ADD_TELEMETRY_INITIA7 = \"addTelemetryInitializer\"; // Count: 4\r\nexport var _DYN_OVERRIDE_PAGE_VIEW_D8 = \"overridePageViewDuration\"; // Count: 2\r\nexport var _DYN_DURATION = \"duration\"; // Count: 10\r\nexport var _DYN_AUTO_TRACK_PAGE_VISI9 = \"autoTrackPageVisitTime\"; // Count: 2\r\nexport var _DYN_IS_BROWSER_LINK_TRAC10 = \"isBrowserLinkTrackingEnabled\"; // Count: 2\r\nexport var _DYN_LENGTH = \"length\"; // Count: 5\r\nexport var _DYN_ENABLE_AUTO_ROUTE_TR11 = \"enableAutoRouteTracking\"; // Count: 2\r\nexport var _DYN_ENABLE_UNHANDLED_PRO12 = \"enableUnhandledPromiseRejectionTracking\"; // Count: 2\r\nexport var _DYN_AUTO_UNHANDLED_PROMI13 = \"autoUnhandledPromiseInstrumented\"; // Count: 3\r\nexport var _DYN_IS_PERFORMANCE_TIMIN14 = \"isPerformanceTimingSupported\"; // Count: 2\r\nexport var _DYN_GET_PERFORMANCE_TIMI15 = \"getPerformanceTiming\"; // Count: 2\r\nexport var _DYN_NAVIGATION_START = \"navigationStart\"; // Count: 4\r\nexport var _DYN_SHOULD_COLLECT_DURAT16 = \"shouldCollectDuration\"; // Count: 3\r\nexport var _DYN_IS_PERFORMANCE_TIMIN17 = \"isPerformanceTimingDataReady\"; // Count: 2\r\nexport var _DYN_GET_ENTRIES_BY_TYPE = \"getEntriesByType\"; // Count: 3\r\nexport var _DYN_RESPONSE_START = \"responseStart\"; // Count: 5\r\nexport var _DYN_REQUEST_START = \"requestStart\"; // Count: 3\r\nexport var _DYN_LOAD_EVENT_END = \"loadEventEnd\"; // Count: 4\r\nexport var _DYN_RESPONSE_END = \"responseEnd\"; // Count: 5\r\nexport var _DYN_CONNECT_END = \"connectEnd\"; // Count: 4\r\nexport var _DYN_PAGE_VISIT_START_TIM18 = \"pageVisitStartTime\"; // Count: 2\r\n//# sourceMappingURL=__DynamicConstants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { dateTimeUtilsDuration } from \"@microsoft/applicationinsights-common\";\r\nimport { _throwInternal, arrForEach, dumpObj, getDocument, getExceptionName, getLocation, isNullOrUndefined } from \"@microsoft/applicationinsights-core-js\";\r\nimport { isWebWorker, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { _DYN_DURATION, _DYN_GET_PERFORMANCE_TIMI15, _DYN_HREF, _DYN_IS_PERFORMANCE_TIMIN14, _DYN_IS_PERFORMANCE_TIMIN17, _DYN_LENGTH, _DYN_NAVIGATION_START, _DYN_POPULATE_PAGE_VIEW_P4, _DYN_SEND_PAGE_VIEW_INTER2, _DYN_SEND_PAGE_VIEW_PERFO3, _DYN_SHOULD_COLLECT_DURAT16, _DYN_TRACK_PAGE_VIEW } from \"../../__DynamicConstants\";\r\n/**\r\n * Class encapsulates sending page views and page view performance telemetry.\r\n */\r\nvar PageViewManager = /** @class */ (function () {\r\n function PageViewManager(appInsights, overridePageViewDuration, core, pageViewPerformanceManager) {\r\n dynamicProto(PageViewManager, this, function (_self) {\r\n var queueTimer = null;\r\n var itemQueue = [];\r\n var pageViewPerformanceSent = false;\r\n var _logger;\r\n if (core) {\r\n _logger = core.logger;\r\n }\r\n function _flushChannels(isAsync) {\r\n if (core) {\r\n core.flush(isAsync, function () {\r\n // Event flushed, callback added to prevent promise creation\r\n });\r\n }\r\n }\r\n function _startTimer() {\r\n if (!queueTimer) {\r\n queueTimer = scheduleTimeout((function () {\r\n queueTimer = null;\r\n var allItems = itemQueue.slice(0);\r\n var doFlush = false;\r\n itemQueue = [];\r\n arrForEach(allItems, function (item) {\r\n if (!item()) {\r\n // Not processed so rescheduled\r\n itemQueue.push(item);\r\n }\r\n else {\r\n doFlush = true;\r\n }\r\n });\r\n if (itemQueue[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n _startTimer();\r\n }\r\n if (doFlush) {\r\n // We process at least one item so flush the queue\r\n _flushChannels(true);\r\n }\r\n }), 100);\r\n }\r\n }\r\n function _addQueue(cb) {\r\n itemQueue.push(cb);\r\n _startTimer();\r\n }\r\n _self[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */] = function (pageView, customProperties) {\r\n var name = pageView.name;\r\n if (isNullOrUndefined(name) || typeof name !== \"string\") {\r\n var doc = getDocument();\r\n name = pageView.name = doc && doc.title || \"\";\r\n }\r\n var uri = pageView.uri;\r\n if (isNullOrUndefined(uri) || typeof uri !== \"string\") {\r\n var location_1 = getLocation();\r\n uri = pageView.uri = location_1 && location_1[_DYN_HREF /* @min:%2ehref */] || \"\";\r\n }\r\n // case 1a. if performance timing is not supported by the browser, send the page view telemetry with the duration provided by the user. If the user\r\n // do not provide the duration, set duration to undefined\r\n // Also this is case 4\r\n if (!pageViewPerformanceManager[_DYN_IS_PERFORMANCE_TIMIN14 /* @min:%2eisPerformanceTimingSupported */]()) {\r\n appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);\r\n _flushChannels(true);\r\n if (!isWebWorker()) {\r\n // no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)\r\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 25 /* _eInternalMessageId.NavigationTimingNotSupported */, \"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.\");\r\n }\r\n return;\r\n }\r\n var pageViewSent = false;\r\n var customDuration;\r\n // if the performance timing is supported by the browser, calculate the custom duration\r\n var start = pageViewPerformanceManager[_DYN_GET_PERFORMANCE_TIMI15 /* @min:%2egetPerformanceTiming */]()[_DYN_NAVIGATION_START /* @min:%2enavigationStart */];\r\n if (start > 0) {\r\n customDuration = dateTimeUtilsDuration(start, +new Date);\r\n if (!pageViewPerformanceManager[_DYN_SHOULD_COLLECT_DURAT16 /* @min:%2eshouldCollectDuration */](customDuration)) {\r\n customDuration = undefined;\r\n }\r\n }\r\n // if the user has provided duration, send a page view telemetry with the provided duration. Otherwise, if\r\n // overridePageViewDuration is set to true, send a page view telemetry with the custom duration calculated earlier\r\n var duration;\r\n if (!isNullOrUndefined(customProperties) &&\r\n !isNullOrUndefined(customProperties[_DYN_DURATION /* @min:%2eduration */])) {\r\n duration = customProperties[_DYN_DURATION /* @min:%2eduration */];\r\n }\r\n if (overridePageViewDuration || !isNaN(duration)) {\r\n if (isNaN(duration)) {\r\n // case 3\r\n if (!customProperties) {\r\n customProperties = {};\r\n }\r\n customProperties[_DYN_DURATION /* @min:%2eduration */] = customDuration;\r\n }\r\n // case 2\r\n appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);\r\n _flushChannels(true);\r\n pageViewSent = true;\r\n }\r\n // now try to send the page view performance telemetry\r\n var maxDurationLimit = 60000;\r\n if (!customProperties) {\r\n customProperties = {};\r\n }\r\n // Queue the event for processing\r\n _addQueue(function () {\r\n var processed = false;\r\n try {\r\n if (pageViewPerformanceManager[_DYN_IS_PERFORMANCE_TIMIN17 /* @min:%2eisPerformanceTimingDataReady */]()) {\r\n processed = true;\r\n var pageViewPerformance = {\r\n name: name,\r\n uri: uri\r\n };\r\n pageViewPerformanceManager[_DYN_POPULATE_PAGE_VIEW_P4 /* @min:%2epopulatePageViewPerformanceEvent */](pageViewPerformance);\r\n if (!pageViewPerformance.isValid && !pageViewSent) {\r\n // If navigation timing gives invalid numbers, then go back to \"override page view duration\" mode.\r\n // That's the best value we can get that makes sense.\r\n customProperties[_DYN_DURATION /* @min:%2eduration */] = customDuration;\r\n appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);\r\n }\r\n else {\r\n if (!pageViewSent) {\r\n customProperties[_DYN_DURATION /* @min:%2eduration */] = pageViewPerformance.durationMs;\r\n appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);\r\n }\r\n if (!pageViewPerformanceSent) {\r\n appInsights[_DYN_SEND_PAGE_VIEW_PERFO3 /* @min:%2esendPageViewPerformanceInternal */](pageViewPerformance, customProperties);\r\n pageViewPerformanceSent = true;\r\n }\r\n }\r\n }\r\n else if (start > 0 && dateTimeUtilsDuration(start, +new Date) > maxDurationLimit) {\r\n // if performance timings are not ready but we exceeded the maximum duration limit, just log a page view telemetry\r\n // with the maximum duration limit. Otherwise, keep waiting until performance timings are ready\r\n processed = true;\r\n if (!pageViewSent) {\r\n customProperties[_DYN_DURATION /* @min:%2eduration */] = maxDurationLimit;\r\n appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);\r\n }\r\n }\r\n }\r\n catch (e) {\r\n _throwInternal(_logger, 1 /* eLoggingSeverity.CRITICAL */, 38 /* _eInternalMessageId.TrackPVFailedCalc */, \"trackPageView failed on page load calculation: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n return processed;\r\n });\r\n };\r\n _self.teardown = function (unloadCtx, unloadState) {\r\n if (queueTimer) {\r\n clearInterval(queueTimer);\r\n queueTimer = null;\r\n var allItems = itemQueue.slice(0);\r\n var doFlush_1 = false;\r\n itemQueue = [];\r\n arrForEach(allItems, function (item) {\r\n if (item()) {\r\n doFlush_1 = true;\r\n }\r\n });\r\n }\r\n };\r\n });\r\n }\r\n /**\r\n * Currently supported cases:\r\n * 1) (default case) track page view called with default parameters, overridePageViewDuration = false. Page view is sent with page view performance when navigation timing data is available.\r\n * a. If navigation timing is not supported then page view is sent right away with undefined duration. Page view performance is not sent.\r\n * 2) overridePageViewDuration = true, custom duration provided. Custom duration is used, page view sends right away.\r\n * 3) overridePageViewDuration = true, custom duration NOT provided. Page view is sent right away, duration is time spent from page load till now (or undefined if navigation timing is not supported).\r\n * 4) overridePageViewDuration = false, custom duration is provided. Page view is sent right away with custom duration.\r\n *\r\n * In all cases page view performance is sent once (only for the 1st call of trackPageView), or not sent if navigation timing is not supported.\r\n */\r\n PageViewManager.prototype.trackPageView = function (pageView, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n PageViewManager.prototype.teardown = function (unloadCtx, unloadState) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return PageViewManager;\r\n}());\r\nexport { PageViewManager };\r\n//# sourceMappingURL=PageViewManager.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { dateTimeUtilsDuration, msToTimeSpan } from \"@microsoft/applicationinsights-common\";\r\nimport { _throwInternal, getNavigator, getPerformance, safeGetLogger } from \"@microsoft/applicationinsights-core-js\";\r\nimport { strIndexOf } from \"@nevware21/ts-utils\";\r\nimport { _DYN_CONNECT_END, _DYN_DURATION, _DYN_GET_ENTRIES_BY_TYPE, _DYN_GET_PERFORMANCE_TIMI15, _DYN_IS_PERFORMANCE_TIMIN14, _DYN_IS_PERFORMANCE_TIMIN17, _DYN_LENGTH, _DYN_LOAD_EVENT_END, _DYN_NAVIGATION_START, _DYN_POPULATE_PAGE_VIEW_P4, _DYN_REQUEST_START, _DYN_RESPONSE_END, _DYN_RESPONSE_START, _DYN_SHOULD_COLLECT_DURAT16 } from \"../../__DynamicConstants\";\r\nvar MAX_DURATION_ALLOWED = 3600000; // 1h\r\nvar botAgentNames = [\"googlebot\", \"adsbot-google\", \"apis-google\", \"mediapartners-google\"];\r\nfunction _isPerformanceTimingSupported() {\r\n var perf = getPerformance();\r\n return perf && !!perf.timing;\r\n}\r\nfunction _isPerformanceNavigationTimingSupported() {\r\n var perf = getPerformance();\r\n return perf && perf.getEntriesByType && perf.getEntriesByType(\"navigation\")[_DYN_LENGTH /* @min:%2elength */] > 0;\r\n}\r\nfunction _isPerformanceTimingDataReady() {\r\n var perf = getPerformance();\r\n var timing = perf ? perf.timing : 0;\r\n return timing\r\n && timing.domainLookupStart > 0\r\n && timing[_DYN_NAVIGATION_START /* @min:%2enavigationStart */] > 0\r\n && timing[_DYN_RESPONSE_START /* @min:%2eresponseStart */] > 0\r\n && timing[_DYN_REQUEST_START /* @min:%2erequestStart */] > 0\r\n && timing[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */] > 0\r\n && timing[_DYN_RESPONSE_END /* @min:%2eresponseEnd */] > 0\r\n && timing[_DYN_CONNECT_END /* @min:%2econnectEnd */] > 0\r\n && timing.domLoading > 0;\r\n}\r\nfunction _getPerformanceTiming() {\r\n if (_isPerformanceTimingSupported()) {\r\n return getPerformance().timing;\r\n }\r\n return null;\r\n}\r\nfunction _getPerformanceNavigationTiming() {\r\n if (_isPerformanceNavigationTimingSupported()) {\r\n return getPerformance()[_DYN_GET_ENTRIES_BY_TYPE /* @min:%2egetEntriesByType */](\"navigation\")[0];\r\n }\r\n return null;\r\n}\r\n/**\r\n* This method tells if given durations should be excluded from collection.\r\n*/\r\nfunction _shouldCollectDuration() {\r\n var durations = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n durations[_i] = arguments[_i];\r\n }\r\n var _navigator = getNavigator() || {};\r\n // a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en\r\n var userAgent = _navigator.userAgent;\r\n var isGoogleBot = false;\r\n if (userAgent) {\r\n for (var i = 0; i < botAgentNames[_DYN_LENGTH /* @min:%2elength */]; i++) {\r\n isGoogleBot = isGoogleBot || strIndexOf(userAgent.toLowerCase(), botAgentNames[i]) !== -1;\r\n }\r\n }\r\n if (isGoogleBot) {\r\n // Don't report durations for GoogleBot, it is returning invalid values in performance.timing API.\r\n return false;\r\n }\r\n else {\r\n // for other page views, don't report if it's outside of a reasonable range\r\n for (var i = 0; i < durations[_DYN_LENGTH /* @min:%2elength */]; i++) {\r\n if (durations[i] < 0 || durations[i] >= MAX_DURATION_ALLOWED) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}\r\n/**\r\n * Class encapsulates sending page view performance telemetry.\r\n */\r\nvar PageViewPerformanceManager = /** @class */ (function () {\r\n function PageViewPerformanceManager(core) {\r\n var _logger = safeGetLogger(core);\r\n dynamicProto(PageViewPerformanceManager, this, function (_self) {\r\n _self[_DYN_POPULATE_PAGE_VIEW_P4 /* @min:%2epopulatePageViewPerformanceEvent */] = function (pageViewPerformance) {\r\n pageViewPerformance.isValid = false;\r\n /*\r\n * http://www.w3.org/TR/navigation-timing/#processing-model\r\n * |-navigationStart\r\n * | |-connectEnd\r\n * | ||-requestStart\r\n * | || |-responseStart\r\n * | || | |-responseEnd\r\n * | || | |\r\n * | || | | |-loadEventEnd\r\n * |---network---||---request---|---response---|---dom---|\r\n * |--------------------------total----------------------|\r\n *\r\n * total = The difference between the load event of the current document is completed and the first recorded timestamp of the performance entry : https://developer.mozilla.org/en-US/docs/Web/Performance/Navigation_and_resource_timings#duration\r\n * network = Redirect time + App Cache + DNS lookup time + TCP connection time\r\n * request = Request time : https://developer.mozilla.org/en-US/docs/Web/Performance/Navigation_and_resource_timings#request_time\r\n * response = Response time\r\n * dom = Document load time : https://html.spec.whatwg.org/multipage/dom.html#document-load-timing-info\r\n * = Document processing time : https://developers.google.com/web/fundamentals/performance/navigation-and-resource-timing/#document_processing\r\n * + Loading time : https://developers.google.com/web/fundamentals/performance/navigation-and-resource-timing/#loading\r\n */\r\n var navigationTiming = _getPerformanceNavigationTiming();\r\n var timing = _getPerformanceTiming();\r\n var total = 0;\r\n var network = 0;\r\n var request = 0;\r\n var response = 0;\r\n var dom = 0;\r\n if (navigationTiming || timing) {\r\n if (navigationTiming) {\r\n total = navigationTiming[_DYN_DURATION /* @min:%2eduration */];\r\n /**\r\n * support both cases:\r\n * - startTime is always zero: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming\r\n * - for older browsers where the startTime is not zero\r\n */\r\n network = navigationTiming.startTime === 0 ? navigationTiming[_DYN_CONNECT_END /* @min:%2econnectEnd */] : dateTimeUtilsDuration(navigationTiming.startTime, navigationTiming[_DYN_CONNECT_END /* @min:%2econnectEnd */]);\r\n request = dateTimeUtilsDuration(navigationTiming.requestStart, navigationTiming[_DYN_RESPONSE_START /* @min:%2eresponseStart */]);\r\n response = dateTimeUtilsDuration(navigationTiming[_DYN_RESPONSE_START /* @min:%2eresponseStart */], navigationTiming[_DYN_RESPONSE_END /* @min:%2eresponseEnd */]);\r\n dom = dateTimeUtilsDuration(navigationTiming.responseEnd, navigationTiming[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */]);\r\n }\r\n else {\r\n total = dateTimeUtilsDuration(timing[_DYN_NAVIGATION_START /* @min:%2enavigationStart */], timing[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */]);\r\n network = dateTimeUtilsDuration(timing[_DYN_NAVIGATION_START /* @min:%2enavigationStart */], timing[_DYN_CONNECT_END /* @min:%2econnectEnd */]);\r\n request = dateTimeUtilsDuration(timing.requestStart, timing[_DYN_RESPONSE_START /* @min:%2eresponseStart */]);\r\n response = dateTimeUtilsDuration(timing[_DYN_RESPONSE_START /* @min:%2eresponseStart */], timing[_DYN_RESPONSE_END /* @min:%2eresponseEnd */]);\r\n dom = dateTimeUtilsDuration(timing.responseEnd, timing[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */]);\r\n }\r\n if (total === 0) {\r\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 10 /* _eInternalMessageId.ErrorPVCalc */, \"error calculating page view performance.\", { total: total, network: network, request: request, response: response, dom: dom });\r\n }\r\n else if (!_self[_DYN_SHOULD_COLLECT_DURAT16 /* @min:%2eshouldCollectDuration */](total, network, request, response, dom)) {\r\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 45 /* _eInternalMessageId.InvalidDurationValue */, \"Invalid page load duration value. Browser perf data won't be sent.\", { total: total, network: network, request: request, response: response, dom: dom });\r\n }\r\n else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {\r\n // some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT\r\n // in this case, don't report client performance from this page\r\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 8 /* _eInternalMessageId.ClientPerformanceMathError */, \"client performance math error.\", { total: total, network: network, request: request, response: response, dom: dom });\r\n }\r\n else {\r\n pageViewPerformance.durationMs = total;\r\n // // convert to timespans\r\n pageViewPerformance.perfTotal = pageViewPerformance[_DYN_DURATION /* @min:%2eduration */] = msToTimeSpan(total);\r\n pageViewPerformance.networkConnect = msToTimeSpan(network);\r\n pageViewPerformance.sentRequest = msToTimeSpan(request);\r\n pageViewPerformance.receivedResponse = msToTimeSpan(response);\r\n pageViewPerformance.domProcessing = msToTimeSpan(dom);\r\n pageViewPerformance.isValid = true;\r\n }\r\n }\r\n };\r\n _self[_DYN_GET_PERFORMANCE_TIMI15 /* @min:%2egetPerformanceTiming */] = _getPerformanceTiming;\r\n _self[_DYN_IS_PERFORMANCE_TIMIN14 /* @min:%2eisPerformanceTimingSupported */] = _isPerformanceTimingSupported;\r\n _self[_DYN_IS_PERFORMANCE_TIMIN17 /* @min:%2eisPerformanceTimingDataReady */] = _isPerformanceTimingDataReady;\r\n _self[_DYN_SHOULD_COLLECT_DURAT16 /* @min:%2eshouldCollectDuration */] = _shouldCollectDuration;\r\n });\r\n }\r\n PageViewPerformanceManager.prototype.populatePageViewPerformanceEvent = function (pageViewPerformance) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n PageViewPerformanceManager.prototype.getPerformanceTiming = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Returns true is window performance timing API is supported, false otherwise.\r\n */\r\n PageViewPerformanceManager.prototype.isPerformanceTimingSupported = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return true;\r\n };\r\n /**\r\n * As page loads different parts of performance timing numbers get set. When all of them are set we can report it.\r\n * Returns true if ready, false otherwise.\r\n */\r\n PageViewPerformanceManager.prototype.isPerformanceTimingDataReady = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return true;\r\n };\r\n /**\r\n * This method tells if given durations should be excluded from collection.\r\n */\r\n PageViewPerformanceManager.prototype.shouldCollectDuration = function () {\r\n var durations = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n durations[_i] = arguments[_i];\r\n }\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return true;\r\n };\r\n return PageViewPerformanceManager;\r\n}());\r\nexport { PageViewPerformanceManager };\r\n//# sourceMappingURL=PageViewPerformanceManager.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { utlCanUseSessionStorage, utlGetSessionStorage, utlRemoveSessionStorage, utlSetSessionStorage } from \"@microsoft/applicationinsights-common\";\r\nimport { _warnToConsole, dateNow, dumpObj, getJSON, hasJSON, throwError } from \"@microsoft/applicationinsights-core-js\";\r\nimport { objDefine } from \"@nevware21/ts-utils\";\r\nimport { _DYN_PAGE_VISIT_START_TIM18, _DYN_TRACK_PREVIOUS_PAGE_1 } from \"../../__DynamicConstants\";\r\n/**\r\n * Used to track page visit durations\r\n */\r\nvar PageVisitTimeManager = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of PageVisitTimeManager\r\n * @param pageVisitTimeTrackingHandler - Delegate that will be called to send telemetry data to AI (when trackPreviousPageVisit is called)\r\n * @returns {}\r\n */\r\n function PageVisitTimeManager(logger, pageVisitTimeTrackingHandler) {\r\n var prevPageVisitDataKeyName = \"prevPageVisitData\";\r\n dynamicProto(PageVisitTimeManager, this, function (_self) {\r\n _self[_DYN_TRACK_PREVIOUS_PAGE_1 /* @min:%2etrackPreviousPageVisit */] = function (currentPageName, currentPageUrl) {\r\n try {\r\n // Restart timer for new page view\r\n var prevPageVisitTimeData = restartPageVisitTimer(currentPageName, currentPageUrl);\r\n // If there was a page already being timed, track the visit time for it now.\r\n if (prevPageVisitTimeData) {\r\n pageVisitTimeTrackingHandler(prevPageVisitTimeData.pageName, prevPageVisitTimeData.pageUrl, prevPageVisitTimeData.pageVisitTime);\r\n }\r\n }\r\n catch (e) {\r\n _warnToConsole(logger, \"Auto track page visit time failed, metric will not be collected: \" + dumpObj(e));\r\n }\r\n };\r\n /**\r\n * Stops timing of current page (if exists) and starts timing for duration of visit to pageName\r\n * @param pageName - Name of page to begin timing visit duration\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from last call to start or restart, if exists. Null if not.\r\n */\r\n function restartPageVisitTimer(pageName, pageUrl) {\r\n var prevPageVisitData = null;\r\n try {\r\n prevPageVisitData = stopPageVisitTimer();\r\n if (utlCanUseSessionStorage()) {\r\n if (utlGetSessionStorage(logger, prevPageVisitDataKeyName) != null) {\r\n throwError(\"Cannot call startPageVisit consecutively without first calling stopPageVisit\");\r\n }\r\n var currPageVisitDataStr = getJSON().stringify(new PageVisitData(pageName, pageUrl));\r\n utlSetSessionStorage(logger, prevPageVisitDataKeyName, currPageVisitDataStr);\r\n }\r\n }\r\n catch (e) {\r\n _warnToConsole(logger, \"Call to restart failed: \" + dumpObj(e));\r\n prevPageVisitData = null;\r\n }\r\n return prevPageVisitData;\r\n }\r\n /**\r\n * Stops timing of current page, if exists.\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from call to start, if exists. Null if not.\r\n */\r\n function stopPageVisitTimer() {\r\n var prevPageVisitData = null;\r\n try {\r\n if (utlCanUseSessionStorage()) {\r\n // Define end time of page's visit\r\n var pageVisitEndTime = dateNow();\r\n // Try to retrieve page name and start time from session storage\r\n var pageVisitDataJsonStr = utlGetSessionStorage(logger, prevPageVisitDataKeyName);\r\n if (pageVisitDataJsonStr && hasJSON()) {\r\n // if previous page data exists, set end time of visit\r\n prevPageVisitData = getJSON().parse(pageVisitDataJsonStr);\r\n prevPageVisitData.pageVisitTime = pageVisitEndTime - prevPageVisitData[_DYN_PAGE_VISIT_START_TIM18 /* @min:%2epageVisitStartTime */];\r\n // Remove data from storage since we already used it\r\n utlRemoveSessionStorage(logger, prevPageVisitDataKeyName);\r\n }\r\n }\r\n }\r\n catch (e) {\r\n _warnToConsole(logger, \"Stop page visit timer failed: \" + dumpObj(e));\r\n prevPageVisitData = null;\r\n }\r\n return prevPageVisitData;\r\n }\r\n // For backward compatibility\r\n objDefine(_self, \"_logger\", { g: function () { return logger; } });\r\n objDefine(_self, \"pageVisitTimeTrackingHandler\", { g: function () { return pageVisitTimeTrackingHandler; } });\r\n });\r\n }\r\n /**\r\n * Tracks the previous page visit time telemetry (if exists) and starts timing of new page visit time\r\n * @param currentPageName - Name of page to begin timing for visit duration\r\n * @param currentPageUrl - Url of page to begin timing for visit duration\r\n */\r\n PageVisitTimeManager.prototype.trackPreviousPageVisit = function (currentPageName, currentPageUrl) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return PageVisitTimeManager;\r\n}());\r\nexport { PageVisitTimeManager };\r\nvar PageVisitData = /** @class */ (function () {\r\n function PageVisitData(pageName, pageUrl) {\r\n this[_DYN_PAGE_VISIT_START_TIM18 /* @min:%2epageVisitStartTime */] = dateNow();\r\n this.pageName = pageName;\r\n this.pageUrl = pageUrl;\r\n }\r\n return PageVisitData;\r\n}());\r\nexport { PageVisitData };\r\n//# sourceMappingURL=PageVisitTimeManager.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { dateTimeUtilsDuration } from \"@microsoft/applicationinsights-common\";\r\nimport { _throwInternal } from \"@microsoft/applicationinsights-core-js\";\r\n/**\r\n * Used to record timed events and page views.\r\n */\r\nvar Timing = /** @class */ (function () {\r\n function Timing(logger, name) {\r\n var _self = this;\r\n var _events = {};\r\n _self.start = function (name) {\r\n if (typeof _events[name] !== \"undefined\") {\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 62 /* _eInternalMessageId.StartCalledMoreThanOnce */, \"start was called more than once for this event without calling stop.\", { name: name, key: name }, true);\r\n }\r\n _events[name] = +new Date;\r\n };\r\n _self.stop = function (name, url, properties, measurements) {\r\n var start = _events[name];\r\n if (isNaN(start)) {\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 63 /* _eInternalMessageId.StopCalledWithoutStart */, \"stop was called without a corresponding start.\", { name: name, key: name }, true);\r\n }\r\n else {\r\n var end = +new Date;\r\n var duration = dateTimeUtilsDuration(start, end);\r\n _self.action(name, url, duration, properties, measurements);\r\n }\r\n delete _events[name];\r\n _events[name] = undefined;\r\n };\r\n }\r\n return Timing;\r\n}());\r\nexport { Timing };\r\n//# sourceMappingURL=Timing.js.map","var _a, _b;\r\nimport { __assign, __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { BreezeChannelIdentifier, DEFAULT_BREEZE_ENDPOINT, DEFAULT_BREEZE_PATH, DisabledPropertyName, Event, Exception, Metric, PageView, PageViewPerformance, ProcessLegacy, RemoteDependencyData, RequestHeaders, SampleRate, Trace, isInternalApplicationInsightsEndpoint, utlCanUseSessionStorage } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, _throwInternal, _warnToConsole, arrForEach, cfgDfBoolean, cfgDfValidate, createProcessTelemetryContext, createUniqueNamespace, dateNow, dumpObj, getExceptionName, getIEVersion, getJSON, getNavigator, getWindow, isArray, isBeaconsSupported, isFetchSupported, isNullOrUndefined, isXhrSupported, mergeEvtNamespace, objExtend, objKeys, onConfigChange, runTargetUnload, useXDomainRequest } from \"@microsoft/applicationinsights-core-js\";\r\nimport { createPromise, doAwaitResponse } from \"@nevware21/ts-async\";\r\nimport { isTruthy, objDeepFreeze, objDefine, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { DependencyEnvelopeCreator, EventEnvelopeCreator, ExceptionEnvelopeCreator, MetricEnvelopeCreator, PageViewEnvelopeCreator, PageViewPerformanceEnvelopeCreator, TraceEnvelopeCreator } from \"./EnvelopeCreator\";\r\nimport { createOfflineListener } from \"./Offline\";\r\nimport { ArraySendBuffer, SessionStorageSendBuffer } from \"./SendBuffer\";\r\nimport { Serializer } from \"./Serializer\";\r\nimport { Sample } from \"./TelemetryProcessors/Sample\";\r\nimport { _DYN_BASE_TYPE, _DYN_BATCH_PAYLOADS, _DYN_BUFFER_OVERRIDE, _DYN_CLEAR, _DYN_CLEAR_SENT, _DYN_CONVERT_UNDEFINED, _DYN_COUNT, _DYN_CREATE_NEW, _DYN_CUSTOM_HEADERS, _DYN_DIAG_LOG, _DYN_DISABLE_XHR, _DYN_EMIT_LINE_DELIMITED_0, _DYN_ENABLE_SESSION_STORA4, _DYN_ENQUEUE, _DYN_EVENTS_LIMIT_IN_MEM, _DYN_EVENTS_SEND_REQUEST, _DYN_INSTRUMENTATION_KEY, _DYN_IS_BEACON_API_DISABL3, _DYN_IS_ONLINE, _DYN_ITEMS_ACCEPTED, _DYN_ITEMS_RECEIVED, _DYN_LENGTH, _DYN_MARK_AS_SENT, _DYN_MAX_BATCH_INTERVAL, _DYN_MAX_BATCH_SIZE_IN_BY1, _DYN_ONUNLOAD_DISABLE_BEA2, _DYN_ONUNLOAD_DISABLE_FET5, _DYN_PUSH, _DYN_SAMPLE_RATE, _DYN_SET_REQUEST_HEADER, _DYN_TAGS, _DYN_TRIGGER_SEND, _DYN__BUFFER, _DYN__ON_ERROR, _DYN__ON_PARTIAL_SUCCESS, _DYN__ON_SUCCESS, _DYN__SENDER, _DYN__XHR_READY_STATE_CHA6 } from \"./__DynamicConstants\";\r\nvar UNDEFINED_VALUE = undefined;\r\nvar FetchSyncRequestSizeLimitBytes = 65000; // approx 64kb (the current Edge, Firefox and Chrome max limit)\r\nfunction _getResponseText(xhr) {\r\n try {\r\n return xhr.responseText;\r\n }\r\n catch (e) {\r\n // Best effort, as XHR may throw while XDR wont so just ignore\r\n }\r\n return null;\r\n}\r\nvar defaultAppInsightsChannelConfig = objDeepFreeze((_a = {\r\n // Use the default value (handles empty string in the configuration)\r\n endpointUrl: cfgDfValidate(isTruthy, DEFAULT_BREEZE_ENDPOINT + DEFAULT_BREEZE_PATH)\r\n },\r\n _a[_DYN_EMIT_LINE_DELIMITED_0 /* @min:emitLineDelimitedJson */] = cfgDfBoolean(),\r\n _a[_DYN_MAX_BATCH_INTERVAL /* @min:maxBatchInterval */] = 15000,\r\n _a[_DYN_MAX_BATCH_SIZE_IN_BY1 /* @min:maxBatchSizeInBytes */] = 102400,\r\n _a.disableTelemetry = cfgDfBoolean(),\r\n _a[_DYN_ENABLE_SESSION_STORA4 /* @min:enableSessionStorageBuffer */] = cfgDfBoolean(true),\r\n _a.isRetryDisabled = cfgDfBoolean(),\r\n _a[_DYN_IS_BEACON_API_DISABL3 /* @min:isBeaconApiDisabled */] = cfgDfBoolean(true),\r\n _a[_DYN_DISABLE_XHR /* @min:disableXhr */] = cfgDfBoolean(),\r\n _a[_DYN_ONUNLOAD_DISABLE_FET5 /* @min:onunloadDisableFetch */] = cfgDfBoolean(),\r\n _a[_DYN_ONUNLOAD_DISABLE_BEA2 /* @min:onunloadDisableBeacon */] = cfgDfBoolean(),\r\n _a[_DYN_INSTRUMENTATION_KEY /* @min:instrumentationKey */] = UNDEFINED_VALUE,\r\n _a.namePrefix = UNDEFINED_VALUE,\r\n _a.samplingPercentage = cfgDfValidate(_chkSampling, 100),\r\n _a[_DYN_CUSTOM_HEADERS /* @min:customHeaders */] = UNDEFINED_VALUE,\r\n _a[_DYN_CONVERT_UNDEFINED /* @min:convertUndefined */] = UNDEFINED_VALUE,\r\n _a[_DYN_EVENTS_LIMIT_IN_MEM /* @min:eventsLimitInMem */] = 10000,\r\n _a[_DYN_BUFFER_OVERRIDE /* @min:bufferOverride */] = false,\r\n _a));\r\nfunction _chkSampling(value) {\r\n return !isNaN(value) && value > 0 && value <= 100;\r\n}\r\nvar EnvelopeTypeCreator = (_b = {},\r\n _b[Event.dataType] = EventEnvelopeCreator,\r\n _b[Trace.dataType] = TraceEnvelopeCreator,\r\n _b[PageView.dataType] = PageViewEnvelopeCreator,\r\n _b[PageViewPerformance.dataType] = PageViewPerformanceEnvelopeCreator,\r\n _b[Exception.dataType] = ExceptionEnvelopeCreator,\r\n _b[Metric.dataType] = MetricEnvelopeCreator,\r\n _b[RemoteDependencyData.dataType] = DependencyEnvelopeCreator,\r\n _b);\r\nvar Sender = /** @class */ (function (_super) {\r\n __extends(Sender, _super);\r\n function Sender() {\r\n var _this = _super.call(this) || this;\r\n _this.priority = 1001;\r\n _this.identifier = BreezeChannelIdentifier;\r\n // Don't set the defaults here, set them in the _initDefaults() as this is also called during unload\r\n var _consecutiveErrors; // How many times in a row a retryable error condition has occurred.\r\n var _retryAt; // The time to retry at in milliseconds from 1970/01/01 (this makes the timer calculation easy).\r\n var _lastSend; // The time of the last send operation.\r\n var _paused; // Flag indicating that the sending should be paused\r\n var _timeoutHandle; // Handle to the timer for delayed sending of batches of data.\r\n var _serializer;\r\n var _stamp_specific_redirects;\r\n var _headers;\r\n var _syncFetchPayload = 0; // Keep track of the outstanding sync fetch payload total (as sync fetch has limits)\r\n var _fallbackSender; // The sender to use if the payload size is too large\r\n var _syncUnloadSender; // The identified sender to use for the synchronous unload stage\r\n var _offlineListener;\r\n var _evtNamespace;\r\n var _endpointUrl;\r\n var _orgEndpointUrl;\r\n var _maxBatchSizeInBytes;\r\n var _beaconSupported;\r\n var _customHeaders;\r\n var _disableTelemetry;\r\n var _instrumentationKey;\r\n var _convertUndefined;\r\n var _isRetryDisabled;\r\n var _maxBatchInterval;\r\n var _sessionStorageUsed;\r\n var _bufferOverrideUsed;\r\n var _namePrefix;\r\n var _enableSendPromise;\r\n dynamicProto(Sender, _this, function (_self, _base) {\r\n _initDefaults();\r\n _self.pause = function () {\r\n _clearScheduledTimer();\r\n _paused = true;\r\n };\r\n _self.resume = function () {\r\n if (_paused) {\r\n _paused = false;\r\n _retryAt = null;\r\n // flush if we have exceeded the max-size already\r\n _checkMaxSize();\r\n _setupTimer();\r\n }\r\n };\r\n _self.flush = function (isAsync, callBack, sendReason) {\r\n if (isAsync === void 0) { isAsync = true; }\r\n if (!_paused) {\r\n // Clear the normal schedule timer as we are going to try and flush ASAP\r\n _clearScheduledTimer();\r\n try {\r\n return _self[_DYN_TRIGGER_SEND /* @min:%2etriggerSend */](isAsync, null, sendReason || 1 /* SendRequestReason.ManualFlush */);\r\n }\r\n catch (e) {\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 22 /* _eInternalMessageId.FlushFailed */, \"flush failed, telemetry will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n };\r\n _self.onunloadFlush = function () {\r\n if (!_paused) {\r\n if (_beaconSupported) {\r\n try {\r\n return _self[_DYN_TRIGGER_SEND /* @min:%2etriggerSend */](true, _doUnloadSend, 2 /* SendRequestReason.Unload */);\r\n }\r\n catch (e) {\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 20 /* _eInternalMessageId.FailedToSendQueuedTelemetry */, \"failed to flush with beacon sender on page unload, telemetry will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n else {\r\n _self.flush(false);\r\n }\r\n }\r\n };\r\n _self.addHeader = function (name, value) {\r\n _headers[name] = value;\r\n };\r\n _self.initialize = function (config, core, extensions, pluginChain) {\r\n if (_self.isInitialized()) {\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 28 /* _eInternalMessageId.SenderNotInitialized */, \"Sender is already initialized\");\r\n }\r\n _base.initialize(config, core, extensions, pluginChain);\r\n var identifier = _self.identifier;\r\n _serializer = new Serializer(core.logger);\r\n _consecutiveErrors = 0;\r\n _retryAt = null;\r\n _lastSend = 0;\r\n _self[_DYN__SENDER /* @min:%2e_sender */] = null;\r\n _stamp_specific_redirects = 0;\r\n var diagLog = _self[_DYN_DIAG_LOG /* @min:%2ediagLog */]();\r\n _evtNamespace = mergeEvtNamespace(createUniqueNamespace(\"Sender\"), core.evtNamespace && core.evtNamespace());\r\n _offlineListener = createOfflineListener(_evtNamespace);\r\n // This function will be re-called whenever any referenced configuration is changed\r\n _self._addHook(onConfigChange(config, function (details) {\r\n var config = details.cfg;\r\n var ctx = createProcessTelemetryContext(null, config, core);\r\n var senderConfig = ctx.getExtCfg(identifier, defaultAppInsightsChannelConfig);\r\n objDefine(_self, \"_senderConfig\", {\r\n g: function () {\r\n return senderConfig;\r\n }\r\n });\r\n // Only update the endpoint if the original config !== the current config\r\n // This is so any redirect endpointUrl is not overwritten\r\n if (_orgEndpointUrl !== senderConfig.endpointUrl) {\r\n if (_orgEndpointUrl) {\r\n // TODO: add doc to remind users to flush before changing endpoint, otherwise all unsent payload will be sent to new endpoint\r\n }\r\n _endpointUrl = _orgEndpointUrl = senderConfig.endpointUrl;\r\n }\r\n if (_customHeaders && _customHeaders !== senderConfig[_DYN_CUSTOM_HEADERS /* @min:%2ecustomHeaders */]) {\r\n // Removing any previously defined custom headers as they have changed\r\n arrForEach(_customHeaders, function (customHeader) {\r\n delete _headers[customHeader.header];\r\n });\r\n }\r\n _maxBatchSizeInBytes = senderConfig[_DYN_MAX_BATCH_SIZE_IN_BY1 /* @min:%2emaxBatchSizeInBytes */];\r\n _beaconSupported = (senderConfig[_DYN_ONUNLOAD_DISABLE_BEA2 /* @min:%2eonunloadDisableBeacon */] === false || senderConfig[_DYN_IS_BEACON_API_DISABL3 /* @min:%2eisBeaconApiDisabled */] === false) && isBeaconsSupported();\r\n var bufferOverride = senderConfig[_DYN_BUFFER_OVERRIDE /* @min:%2ebufferOverride */];\r\n var canUseSessionStorage = !!senderConfig[_DYN_ENABLE_SESSION_STORA4 /* @min:%2eenableSessionStorageBuffer */] &&\r\n (!!bufferOverride || utlCanUseSessionStorage());\r\n var namePrefix = senderConfig.namePrefix;\r\n //Note: emitLineDelimitedJson and eventsLimitInMem is directly accessed via config in senderBuffer\r\n //Therefore, if canUseSessionStorage is not changed, we do not need to re initialize a new one\r\n var shouldUpdate = (canUseSessionStorage !== _sessionStorageUsed)\r\n || (canUseSessionStorage && (_namePrefix !== namePrefix)) // prefixName is only used in session storage\r\n || (canUseSessionStorage && (_bufferOverrideUsed !== bufferOverride));\r\n if (_self[_DYN__BUFFER /* @min:%2e_buffer */]) {\r\n // case1 (Pre and Now enableSessionStorageBuffer settings are same)\r\n // if namePrefix changes, transfer current buffer to new buffer\r\n // else no action needed\r\n //case2 (Pre and Now enableSessionStorageBuffer settings are changed)\r\n // transfer current buffer to new buffer\r\n if (shouldUpdate) {\r\n try {\r\n _self._buffer = _self._buffer[_DYN_CREATE_NEW /* @min:%2ecreateNew */](diagLog, senderConfig, canUseSessionStorage);\r\n }\r\n catch (e) {\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 12 /* _eInternalMessageId.FailedAddingTelemetryToBuffer */, \"failed to transfer telemetry to different buffer storage, telemetry will be lost: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n _checkMaxSize();\r\n }\r\n else {\r\n _self[_DYN__BUFFER /* @min:%2e_buffer */] = canUseSessionStorage\r\n ? new SessionStorageSendBuffer(diagLog, senderConfig) : new ArraySendBuffer(diagLog, senderConfig);\r\n }\r\n _namePrefix = namePrefix;\r\n _sessionStorageUsed = canUseSessionStorage;\r\n _bufferOverrideUsed = bufferOverride;\r\n _self._sample = new Sample(senderConfig.samplingPercentage, diagLog);\r\n _instrumentationKey = senderConfig[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */];\r\n if (!_validateInstrumentationKey(_instrumentationKey, config)) {\r\n _throwInternal(diagLog, 1 /* eLoggingSeverity.CRITICAL */, 100 /* _eInternalMessageId.InvalidInstrumentationKey */, \"Invalid Instrumentation key \" + _instrumentationKey);\r\n }\r\n _customHeaders = senderConfig[_DYN_CUSTOM_HEADERS /* @min:%2ecustomHeaders */];\r\n if (!isInternalApplicationInsightsEndpoint(_endpointUrl) && _customHeaders && _customHeaders[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n arrForEach(_customHeaders, function (customHeader) {\r\n _this.addHeader(customHeader.header, customHeader.value);\r\n });\r\n }\r\n else {\r\n _customHeaders = null;\r\n }\r\n _enableSendPromise = senderConfig.enableSendPromise;\r\n var sendPostFunc = null;\r\n if (!senderConfig[_DYN_DISABLE_XHR /* @min:%2edisableXhr */] && useXDomainRequest()) {\r\n sendPostFunc = _xdrSender; // IE 8 and 9\r\n }\r\n else if (!senderConfig[_DYN_DISABLE_XHR /* @min:%2edisableXhr */] && isXhrSupported()) {\r\n sendPostFunc = _xhrSender;\r\n }\r\n if (!sendPostFunc && isFetchSupported()) {\r\n sendPostFunc = _fetchSender;\r\n }\r\n // always fallback to XHR\r\n _fallbackSender = sendPostFunc || _xhrSender;\r\n if (!senderConfig[_DYN_IS_BEACON_API_DISABL3 /* @min:%2eisBeaconApiDisabled */] && isBeaconsSupported()) {\r\n // Config is set to always used beacon sending\r\n sendPostFunc = _beaconSender;\r\n }\r\n _self[_DYN__SENDER /* @min:%2e_sender */] = sendPostFunc || _xhrSender;\r\n if (!senderConfig[_DYN_ONUNLOAD_DISABLE_FET5 /* @min:%2eonunloadDisableFetch */] && isFetchSupported(true)) {\r\n // Try and use the fetch with keepalive\r\n _syncUnloadSender = _fetchKeepAliveSender;\r\n }\r\n else if (isBeaconsSupported()) {\r\n // Try and use sendBeacon\r\n _syncUnloadSender = _beaconSender;\r\n }\r\n else if (!senderConfig[_DYN_DISABLE_XHR /* @min:%2edisableXhr */] && useXDomainRequest()) {\r\n _syncUnloadSender = _xdrSender; // IE 8 and 9\r\n }\r\n else if (!senderConfig[_DYN_DISABLE_XHR /* @min:%2edisableXhr */] && isXhrSupported()) {\r\n _syncUnloadSender = _xhrSender;\r\n }\r\n else {\r\n _syncUnloadSender = _fallbackSender;\r\n }\r\n _disableTelemetry = senderConfig.disableTelemetry;\r\n _convertUndefined = senderConfig[_DYN_CONVERT_UNDEFINED /* @min:%2econvertUndefined */] || UNDEFINED_VALUE;\r\n _isRetryDisabled = senderConfig.isRetryDisabled;\r\n _maxBatchInterval = senderConfig[_DYN_MAX_BATCH_INTERVAL /* @min:%2emaxBatchInterval */];\r\n }));\r\n };\r\n _self.processTelemetry = function (telemetryItem, itemCtx) {\r\n itemCtx = _self._getTelCtx(itemCtx);\r\n var diagLogger = itemCtx[_DYN_DIAG_LOG /* @min:%2ediagLog */]();\r\n try {\r\n // if master off switch is set, don't send any data\r\n if (_disableTelemetry) {\r\n // Do not send/save data\r\n return;\r\n }\r\n // validate input\r\n if (!telemetryItem) {\r\n _throwInternal(diagLogger, 1 /* eLoggingSeverity.CRITICAL */, 7 /* _eInternalMessageId.CannotSendEmptyTelemetry */, \"Cannot send empty telemetry\");\r\n return;\r\n }\r\n // validate event\r\n if (telemetryItem.baseData && !telemetryItem[_DYN_BASE_TYPE /* @min:%2ebaseType */]) {\r\n _throwInternal(diagLogger, 1 /* eLoggingSeverity.CRITICAL */, 70 /* _eInternalMessageId.InvalidEvent */, \"Cannot send telemetry without baseData and baseType\");\r\n return;\r\n }\r\n if (!telemetryItem[_DYN_BASE_TYPE /* @min:%2ebaseType */]) {\r\n // Default\r\n telemetryItem[_DYN_BASE_TYPE /* @min:%2ebaseType */] = \"EventData\";\r\n }\r\n // ensure a sender was constructed\r\n if (!_self[_DYN__SENDER /* @min:%2e_sender */]) {\r\n _throwInternal(diagLogger, 1 /* eLoggingSeverity.CRITICAL */, 28 /* _eInternalMessageId.SenderNotInitialized */, \"Sender was not initialized\");\r\n return;\r\n }\r\n // check if this item should be sampled in, else add sampleRate tag\r\n if (!_isSampledIn(telemetryItem)) {\r\n // Item is sampled out, do not send it\r\n _throwInternal(diagLogger, 2 /* eLoggingSeverity.WARNING */, 33 /* _eInternalMessageId.TelemetrySampledAndNotSent */, \"Telemetry item was sampled out and not sent\", { SampleRate: _self._sample[_DYN_SAMPLE_RATE /* @min:%2esampleRate */] });\r\n return;\r\n }\r\n else {\r\n telemetryItem[SampleRate] = _self._sample[_DYN_SAMPLE_RATE /* @min:%2esampleRate */];\r\n }\r\n // construct an envelope that Application Insights endpoint can understand\r\n // if ikey of telemetry is provided and not empty, envelope will use this iKey instead of senderConfig iKey\r\n var defaultEnvelopeIkey = telemetryItem.iKey || _instrumentationKey;\r\n var aiEnvelope_1 = Sender.constructEnvelope(telemetryItem, defaultEnvelopeIkey, diagLogger, _convertUndefined);\r\n if (!aiEnvelope_1) {\r\n _throwInternal(diagLogger, 1 /* eLoggingSeverity.CRITICAL */, 47 /* _eInternalMessageId.CreateEnvelopeError */, \"Unable to create an AppInsights envelope\");\r\n return;\r\n }\r\n var doNotSendItem_1 = false;\r\n // this is for running in legacy mode, where customer may already have a custom initializer present\r\n if (telemetryItem[_DYN_TAGS /* @min:%2etags */] && telemetryItem[_DYN_TAGS /* @min:%2etags */][ProcessLegacy]) {\r\n arrForEach(telemetryItem[_DYN_TAGS /* @min:%2etags */][ProcessLegacy], function (callBack) {\r\n try {\r\n if (callBack && callBack(aiEnvelope_1) === false) {\r\n doNotSendItem_1 = true;\r\n _warnToConsole(diagLogger, \"Telemetry processor check returns false\");\r\n }\r\n }\r\n catch (e) {\r\n // log error but dont stop executing rest of the telemetry initializers\r\n // doNotSendItem = true;\r\n _throwInternal(diagLogger, 1 /* eLoggingSeverity.CRITICAL */, 64 /* _eInternalMessageId.TelemetryInitializerFailed */, \"One of telemetry initializers failed, telemetry item will not be sent: \" + getExceptionName(e), { exception: dumpObj(e) }, true);\r\n }\r\n });\r\n delete telemetryItem[_DYN_TAGS /* @min:%2etags */][ProcessLegacy];\r\n }\r\n if (doNotSendItem_1) {\r\n return; // do not send, no need to execute next plugin\r\n }\r\n // check if the incoming payload is too large, truncate if necessary\r\n var payload = _serializer.serialize(aiEnvelope_1);\r\n // flush if we would exceed the max-size limit by adding this item\r\n var buffer = _self[_DYN__BUFFER /* @min:%2e_buffer */];\r\n _checkMaxSize(payload);\r\n // enqueue the payload\r\n buffer[_DYN_ENQUEUE /* @min:%2eenqueue */](payload);\r\n // ensure an invocation timeout is set\r\n _setupTimer();\r\n }\r\n catch (e) {\r\n _throwInternal(diagLogger, 2 /* eLoggingSeverity.WARNING */, 12 /* _eInternalMessageId.FailedAddingTelemetryToBuffer */, \"Failed adding telemetry to the sender's buffer, some telemetry will be lost: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n // hand off the telemetry item to the next plugin\r\n _self.processNext(telemetryItem, itemCtx);\r\n };\r\n /**\r\n * xhr state changes\r\n */\r\n _self[_DYN__XHR_READY_STATE_CHA6 /* @min:%2e_xhrReadyStateChange */] = function (xhr, payload, countOfItemsInPayload) {\r\n if (xhr.readyState === 4) {\r\n _checkResponsStatus(xhr.status, payload, xhr.responseURL, countOfItemsInPayload, _formatErrorMessageXhr(xhr), _getResponseText(xhr) || xhr.response);\r\n }\r\n };\r\n /**\r\n * Immediately send buffered data\r\n * @param async - {boolean} - Indicates if the events should be sent asynchronously\r\n * @param forcedSender - {SenderFunction} - Indicates the forcedSender, undefined if not passed\r\n */\r\n _self[_DYN_TRIGGER_SEND /* @min:%2etriggerSend */] = function (async, forcedSender, sendReason) {\r\n if (async === void 0) { async = true; }\r\n var result;\r\n if (!_paused) {\r\n try {\r\n var buffer = _self[_DYN__BUFFER /* @min:%2e_buffer */];\r\n // Send data only if disableTelemetry is false\r\n if (!_disableTelemetry) {\r\n if (buffer[_DYN_COUNT /* @min:%2ecount */]() > 0) {\r\n var payload = buffer.getItems();\r\n _notifySendRequest(sendReason || 0 /* SendRequestReason.Undefined */, async);\r\n // invoke send\r\n if (forcedSender) {\r\n result = forcedSender.call(_self, payload, async);\r\n }\r\n else {\r\n result = _self[_DYN__SENDER /* @min:%2e_sender */](payload, async);\r\n }\r\n }\r\n // update lastSend time to enable throttling\r\n _lastSend = +new Date;\r\n }\r\n else {\r\n buffer[_DYN_CLEAR /* @min:%2eclear */]();\r\n }\r\n _clearScheduledTimer();\r\n }\r\n catch (e) {\r\n /* Ignore this error for IE under v10 */\r\n var ieVer = getIEVersion();\r\n if (!ieVer || ieVer > 9) {\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 40 /* _eInternalMessageId.TransmissionFailed */, \"Telemetry transmission failed, some telemetry will be lost: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState) {\r\n _self.onunloadFlush();\r\n runTargetUnload(_offlineListener, false);\r\n _initDefaults();\r\n };\r\n /**\r\n * error handler\r\n */\r\n _self[_DYN__ON_ERROR /* @min:%2e_onError */] = function (payload, message, event) {\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 26 /* _eInternalMessageId.OnError */, \"Failed to send telemetry.\", { message: message });\r\n _self._buffer && _self._buffer[_DYN_CLEAR_SENT /* @min:%2eclearSent */](payload);\r\n };\r\n /**\r\n * partial success handler\r\n */\r\n _self[_DYN__ON_PARTIAL_SUCCESS /* @min:%2e_onPartialSuccess */] = function (payload, results) {\r\n var failed = [];\r\n var retry = [];\r\n // Iterate through the reversed array of errors so that splicing doesn't have invalid indexes after the first item.\r\n var errors = results.errors.reverse();\r\n for (var _i = 0, errors_1 = errors; _i < errors_1.length; _i++) {\r\n var error = errors_1[_i];\r\n var extracted = payload.splice(error.index, 1)[0];\r\n if (_isRetriable(error.statusCode)) {\r\n retry[_DYN_PUSH /* @min:%2epush */](extracted);\r\n }\r\n else {\r\n // All other errors, including: 402 (Monthly quota exceeded) and 439 (Too many requests and refresh cache).\r\n failed[_DYN_PUSH /* @min:%2epush */](extracted);\r\n }\r\n }\r\n if (payload[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n _self[_DYN__ON_SUCCESS /* @min:%2e_onSuccess */](payload, results[_DYN_ITEMS_ACCEPTED /* @min:%2eitemsAccepted */]);\r\n }\r\n if (failed[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](failed, _formatErrorMessageXhr(null, [\"partial success\", results[_DYN_ITEMS_ACCEPTED /* @min:%2eitemsAccepted */], \"of\", results.itemsReceived].join(\" \")));\r\n }\r\n if (retry[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n _resendPayload(retry);\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \"Partial success. \" +\r\n \"Delivered: \" + payload[_DYN_LENGTH /* @min:%2elength */] + \", Failed: \" + failed[_DYN_LENGTH /* @min:%2elength */] +\r\n \". Will retry to send \" + retry[_DYN_LENGTH /* @min:%2elength */] + \" our of \" + results[_DYN_ITEMS_RECEIVED /* @min:%2eitemsReceived */] + \" items\");\r\n }\r\n };\r\n /**\r\n * success handler\r\n */\r\n _self[_DYN__ON_SUCCESS /* @min:%2e_onSuccess */] = function (payload, countOfItemsInPayload) {\r\n _self._buffer && _self._buffer[_DYN_CLEAR_SENT /* @min:%2eclearSent */](payload);\r\n };\r\n /**\r\n * xdr state changes\r\n */\r\n _self._xdrOnLoad = function (xdr, payload) {\r\n var responseText = _getResponseText(xdr);\r\n if (xdr && (responseText + \"\" === \"200\" || responseText === \"\")) {\r\n _consecutiveErrors = 0;\r\n _self[_DYN__ON_SUCCESS /* @min:%2e_onSuccess */](payload, 0);\r\n }\r\n else {\r\n var results = _parseResponse(responseText);\r\n if (results && results.itemsReceived && results.itemsReceived > results[_DYN_ITEMS_ACCEPTED /* @min:%2eitemsAccepted */]\r\n && !_isRetryDisabled) {\r\n _self[_DYN__ON_PARTIAL_SUCCESS /* @min:%2e_onPartialSuccess */](payload, results);\r\n }\r\n else {\r\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, _formatErrorMessageXdr(xdr));\r\n }\r\n }\r\n };\r\n function _isSampledIn(envelope) {\r\n return _self._sample.isSampledIn(envelope);\r\n }\r\n function _checkMaxSize(incomingPayload) {\r\n var incomingSize = incomingPayload ? incomingPayload[_DYN_LENGTH /* @min:%2elength */] : 0;\r\n if ((_self[_DYN__BUFFER /* @min:%2e_buffer */].size() + incomingSize) > _maxBatchSizeInBytes) {\r\n if (!_offlineListener || _offlineListener[_DYN_IS_ONLINE /* @min:%2eisOnline */]()) { // only trigger send when currently online\r\n _self[_DYN_TRIGGER_SEND /* @min:%2etriggerSend */](true, null, 10 /* SendRequestReason.MaxBatchSize */);\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n function _checkResponsStatus(status, payload, responseUrl, countOfItemsInPayload, errorMessage, res) {\r\n var response = null;\r\n if (!_self._appId) {\r\n response = _parseResponse(res);\r\n if (response && response.appId) {\r\n _self._appId = response.appId;\r\n }\r\n }\r\n if ((status < 200 || status >= 300) && status !== 0) {\r\n // Update End Point url if permanent redirect or moved permanently\r\n // Updates the end point url before retry\r\n if (status === 301 || status === 307 || status === 308) {\r\n if (!_checkAndUpdateEndPointUrl(responseUrl)) {\r\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, errorMessage);\r\n return;\r\n }\r\n }\r\n if (!_isRetryDisabled && _isRetriable(status)) {\r\n _resendPayload(payload);\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". \" +\r\n \"Response code \" + status + \". Will retry to send \" + payload[_DYN_LENGTH /* @min:%2elength */] + \" items.\");\r\n }\r\n else {\r\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, errorMessage);\r\n }\r\n }\r\n else if (_offlineListener && !_offlineListener[_DYN_IS_ONLINE /* @min:%2eisOnline */]()) { // offline\r\n // Note: Don't check for status == 0, since adblock gives this code\r\n if (!_isRetryDisabled) {\r\n var offlineBackOffMultiplier = 10; // arbritrary number\r\n _resendPayload(payload, offlineBackOffMultiplier);\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". Offline - Response Code: \".concat(status, \". Offline status: \").concat(!_offlineListener.isOnline(), \". Will retry to send \").concat(payload.length, \" items.\"));\r\n }\r\n }\r\n else {\r\n // check if the xhr's responseURL or fetch's response.url is same as endpoint url\r\n // TODO after 10 redirects force send telemetry with 'redirect=false' as query parameter.\r\n _checkAndUpdateEndPointUrl(responseUrl);\r\n if (status === 206) {\r\n if (!response) {\r\n response = _parseResponse(res);\r\n }\r\n if (response && !_isRetryDisabled) {\r\n _self[_DYN__ON_PARTIAL_SUCCESS /* @min:%2e_onPartialSuccess */](payload, response);\r\n }\r\n else {\r\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, errorMessage);\r\n }\r\n }\r\n else {\r\n _consecutiveErrors = 0;\r\n _self[_DYN__ON_SUCCESS /* @min:%2e_onSuccess */](payload, countOfItemsInPayload);\r\n }\r\n }\r\n }\r\n function _checkAndUpdateEndPointUrl(responseUrl) {\r\n // Maximum stamp specific redirects allowed(uncomment this when breeze is ready with not allowing redirects feature)\r\n if (_stamp_specific_redirects >= 10) {\r\n // _self._senderConfig.endpointUrl = () => Sender._getDefaultAppInsightsChannelConfig().endpointUrl()+\"/?redirect=false\";\r\n // _stamp_specific_redirects = 0;\r\n return false;\r\n }\r\n if (!isNullOrUndefined(responseUrl) && responseUrl !== \"\") {\r\n if (responseUrl !== _endpointUrl) {\r\n _endpointUrl = responseUrl;\r\n ++_stamp_specific_redirects;\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n function _doUnloadSend(payload, isAsync) {\r\n if (_syncUnloadSender) {\r\n // We are unloading so always call the sender with sync set to false\r\n _syncUnloadSender(payload, false);\r\n }\r\n else {\r\n // Fallback to the previous beacon Sender (which causes a CORB warning on chrome now)\r\n _beaconSender(payload, isAsync);\r\n }\r\n }\r\n function _doBeaconSend(payload) {\r\n var nav = getNavigator();\r\n var buffer = _self[_DYN__BUFFER /* @min:%2e_buffer */];\r\n var url = _endpointUrl;\r\n var batch = _self._buffer[_DYN_BATCH_PAYLOADS /* @min:%2ebatchPayloads */](payload);\r\n // Chrome only allows CORS-safelisted values for the sendBeacon data argument\r\n // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283\r\n var plainTextBatch = new Blob([batch], { type: \"text/plain;charset=UTF-8\" });\r\n // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\r\n var queued = nav.sendBeacon(url, plainTextBatch);\r\n if (queued) {\r\n buffer[_DYN_MARK_AS_SENT /* @min:%2emarkAsSent */](payload);\r\n // no response from beaconSender, clear buffer\r\n _self._onSuccess(payload, payload[_DYN_LENGTH /* @min:%2elength */]);\r\n }\r\n return queued;\r\n }\r\n /**\r\n * Send Beacon API request\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param isAsync - {boolean} - not used\r\n * Note: Beacon API does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n function _beaconSender(payload, isAsync) {\r\n if (isArray(payload) && payload[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\r\n if (!_doBeaconSend(payload)) {\r\n // Failed to send entire payload so try and split data and try to send as much events as possible\r\n var droppedPayload = [];\r\n for (var lp = 0; lp < payload[_DYN_LENGTH /* @min:%2elength */]; lp++) {\r\n var thePayload = payload[lp];\r\n if (!_doBeaconSend([thePayload])) {\r\n // Can't send anymore, so split the batch and drop the rest\r\n droppedPayload[_DYN_PUSH /* @min:%2epush */](thePayload);\r\n }\r\n }\r\n if (droppedPayload[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n _fallbackSender && _fallbackSender(droppedPayload, true);\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". \" + \"Failed to send telemetry with Beacon API, retried with normal sender.\");\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * Send XMLHttpRequest\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param isAsync - {boolean} - Indicates if the request should be sent asynchronously\r\n */\r\n function _xhrSender(payload, isAsync) {\r\n var thePromise;\r\n var resolveFunc;\r\n var rejectFunc;\r\n var xhr = new XMLHttpRequest();\r\n var endPointUrl = _endpointUrl;\r\n try {\r\n xhr[DisabledPropertyName] = true;\r\n }\r\n catch (e) {\r\n // If the environment has locked down the XMLHttpRequest (preventExtensions and/or freeze), this would\r\n // cause the request to fail and we no telemetry would be sent\r\n }\r\n xhr.open(\"POST\", endPointUrl, isAsync);\r\n xhr[_DYN_SET_REQUEST_HEADER /* @min:%2esetRequestHeader */](\"Content-type\", \"application/json\");\r\n // append Sdk-Context request header only in case of breeze endpoint\r\n if (isInternalApplicationInsightsEndpoint(endPointUrl)) {\r\n xhr[_DYN_SET_REQUEST_HEADER /* @min:%2esetRequestHeader */](RequestHeaders[6 /* eRequestHeaders.sdkContextHeader */], RequestHeaders[7 /* eRequestHeaders.sdkContextHeaderAppIdRequest */]);\r\n }\r\n arrForEach(objKeys(_headers), function (headerName) {\r\n xhr[_DYN_SET_REQUEST_HEADER /* @min:%2esetRequestHeader */](headerName, _headers[headerName]);\r\n });\r\n xhr.onreadystatechange = function () {\r\n _self._xhrReadyStateChange(xhr, payload, payload[_DYN_LENGTH /* @min:%2elength */]);\r\n if (xhr.readyState === 4) {\r\n resolveFunc && resolveFunc(true);\r\n }\r\n };\r\n xhr.onerror = function (event) {\r\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, _formatErrorMessageXhr(xhr), event);\r\n rejectFunc && rejectFunc(event);\r\n };\r\n if (isAsync && _enableSendPromise) {\r\n thePromise = createPromise(function (resolve, reject) {\r\n resolveFunc = resolve;\r\n rejectFunc = reject;\r\n });\r\n }\r\n // compose an array of payloads\r\n var batch = _self._buffer[_DYN_BATCH_PAYLOADS /* @min:%2ebatchPayloads */](payload);\r\n xhr.send(batch);\r\n _self._buffer[_DYN_MARK_AS_SENT /* @min:%2emarkAsSent */](payload);\r\n return thePromise;\r\n }\r\n function _fetchKeepAliveSender(payload, isAsync) {\r\n if (isArray(payload)) {\r\n var payloadSize = payload[_DYN_LENGTH /* @min:%2elength */];\r\n for (var lp = 0; lp < payload[_DYN_LENGTH /* @min:%2elength */]; lp++) {\r\n payloadSize += payload[lp][_DYN_LENGTH /* @min:%2elength */];\r\n }\r\n if ((_syncFetchPayload + payloadSize) <= FetchSyncRequestSizeLimitBytes) {\r\n _doFetchSender(payload, false);\r\n }\r\n else if (isBeaconsSupported()) {\r\n // Fallback to beacon sender as we at least get told which events can't be scheduled\r\n _beaconSender(payload, isAsync);\r\n }\r\n else {\r\n // Payload is going to be too big so just try and send via XHR\r\n _fallbackSender && _fallbackSender(payload, true);\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". \" + \"Failed to send telemetry with Beacon API, retried with xhrSender.\");\r\n }\r\n }\r\n }\r\n /**\r\n * Send fetch API request\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param isAsync - {boolean} - not used\r\n */\r\n function _fetchSender(payload, isAsync) {\r\n return _doFetchSender(payload, true);\r\n }\r\n /**\r\n * Send fetch API request\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param isAsync - {boolean} - For fetch this identifies whether we are \"unloading\" (false) or a normal request\r\n */\r\n function _doFetchSender(payload, isAsync) {\r\n var _a;\r\n var endPointUrl = _endpointUrl;\r\n var batch = _self._buffer[_DYN_BATCH_PAYLOADS /* @min:%2ebatchPayloads */](payload);\r\n var plainTextBatch = new Blob([batch], { type: \"application/json\" });\r\n var thePromise;\r\n var resolveFunc;\r\n var rejectFunc;\r\n var requestHeaders = new Headers();\r\n var batchLength = batch[_DYN_LENGTH /* @min:%2elength */];\r\n var ignoreResponse = false;\r\n var responseHandled = false;\r\n // append Sdk-Context request header only in case of breeze endpoint\r\n if (isInternalApplicationInsightsEndpoint(endPointUrl)) {\r\n requestHeaders.append(RequestHeaders[6 /* eRequestHeaders.sdkContextHeader */], RequestHeaders[7 /* eRequestHeaders.sdkContextHeaderAppIdRequest */]);\r\n }\r\n arrForEach(objKeys(_headers), function (headerName) {\r\n requestHeaders.append(headerName, _headers[headerName]);\r\n });\r\n var init = (_a = {\r\n method: \"POST\",\r\n headers: requestHeaders,\r\n body: plainTextBatch\r\n },\r\n _a[DisabledPropertyName] = true // Mark so we don't attempt to track this request\r\n ,\r\n _a);\r\n if (!isAsync) {\r\n init.keepalive = true;\r\n // As a sync request (during unload), it is unlikely that we will get a chance to process the response so\r\n // just like beacon send assume that the events have been accepted and processed\r\n ignoreResponse = true;\r\n _syncFetchPayload += batchLength;\r\n }\r\n var request = new Request(endPointUrl, init);\r\n try {\r\n // Also try and tag the request (just in case the value in init is not copied over)\r\n request[DisabledPropertyName] = true;\r\n }\r\n catch (e) {\r\n // If the environment has locked down the XMLHttpRequest (preventExtensions and/or freeze), this would\r\n // cause the request to fail and we no telemetry would be sent\r\n }\r\n _self._buffer[_DYN_MARK_AS_SENT /* @min:%2emarkAsSent */](payload);\r\n if (isAsync && _enableSendPromise) {\r\n thePromise = createPromise(function (resolve, reject) {\r\n resolveFunc = resolve;\r\n rejectFunc = reject;\r\n });\r\n }\r\n try {\r\n doAwaitResponse(fetch(request), function (result) {\r\n if (!isAsync) {\r\n _syncFetchPayload -= batchLength;\r\n batchLength = 0;\r\n }\r\n if (!responseHandled) {\r\n responseHandled = true;\r\n if (!result.rejected) {\r\n var response_1 = result.value;\r\n /**\r\n * The Promise returned from fetch() won’t reject on HTTP error status even if the response is an HTTP 404 or 500.\r\n * Instead, it will resolve normally (with ok status set to false), and it will only reject on network failure\r\n * or if anything prevented the request from completing.\r\n */\r\n if (!response_1.ok) {\r\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, response_1.statusText);\r\n resolveFunc && resolveFunc(false);\r\n }\r\n else {\r\n doAwaitResponse(response_1.text(), function (resp) {\r\n _checkResponsStatus(response_1.status, payload, response_1.url, payload[_DYN_LENGTH /* @min:%2elength */], response_1.statusText, resp.value || \"\");\r\n resolveFunc && resolveFunc(true);\r\n });\r\n }\r\n }\r\n else {\r\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, result.reason && result.reason.message);\r\n rejectFunc && rejectFunc(result.reason);\r\n }\r\n }\r\n });\r\n }\r\n catch (e) {\r\n if (!responseHandled) {\r\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, dumpObj(e));\r\n rejectFunc && rejectFunc(e);\r\n }\r\n }\r\n if (ignoreResponse && !responseHandled) {\r\n // Assume success during unload processing as we most likely won't get the response\r\n responseHandled = true;\r\n _self._onSuccess(payload, payload[_DYN_LENGTH /* @min:%2elength */]);\r\n resolveFunc && resolveFunc(true);\r\n }\r\n return thePromise;\r\n }\r\n /**\r\n * Parses the response from the backend.\r\n * @param response - XMLHttpRequest or XDomainRequest response\r\n */\r\n function _parseResponse(response) {\r\n try {\r\n if (response && response !== \"\") {\r\n var result = getJSON().parse(response);\r\n if (result && result.itemsReceived && result.itemsReceived >= result[_DYN_ITEMS_ACCEPTED /* @min:%2eitemsAccepted */] &&\r\n result.itemsReceived - result.itemsAccepted === result.errors[_DYN_LENGTH /* @min:%2elength */]) {\r\n return result;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 43 /* _eInternalMessageId.InvalidBackendResponse */, \"Cannot parse the response. \" + getExceptionName(e), {\r\n response: response\r\n });\r\n }\r\n return null;\r\n }\r\n /**\r\n * Resend payload. Adds payload back to the send buffer and setup a send timer (with exponential backoff).\r\n * @param payload\r\n */\r\n function _resendPayload(payload, linearFactor) {\r\n if (linearFactor === void 0) { linearFactor = 1; }\r\n if (!payload || payload[_DYN_LENGTH /* @min:%2elength */] === 0) {\r\n return;\r\n }\r\n var buffer = _self[_DYN__BUFFER /* @min:%2e_buffer */];\r\n buffer[_DYN_CLEAR_SENT /* @min:%2eclearSent */](payload);\r\n _consecutiveErrors++;\r\n for (var _i = 0, payload_1 = payload; _i < payload_1.length; _i++) {\r\n var item = payload_1[_i];\r\n buffer[_DYN_ENQUEUE /* @min:%2eenqueue */](item);\r\n }\r\n // setup timer\r\n _setRetryTime(linearFactor);\r\n _setupTimer();\r\n }\r\n /**\r\n * Calculates the time to wait before retrying in case of an error based on\r\n * http://en.wikipedia.org/wiki/Exponential_backoff\r\n */\r\n function _setRetryTime(linearFactor) {\r\n var SlotDelayInSeconds = 10;\r\n var delayInSeconds;\r\n if (_consecutiveErrors <= 1) {\r\n delayInSeconds = SlotDelayInSeconds;\r\n }\r\n else {\r\n var backOffSlot = (Math.pow(2, _consecutiveErrors) - 1) / 2;\r\n // tslint:disable-next-line:insecure-random\r\n var backOffDelay = Math.floor(Math.random() * backOffSlot * SlotDelayInSeconds) + 1;\r\n backOffDelay = linearFactor * backOffDelay;\r\n delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds);\r\n }\r\n // TODO: Log the backoff time like the C# version does.\r\n var retryAfterTimeSpan = dateNow() + (delayInSeconds * 1000);\r\n // TODO: Log the retry at time like the C# version does.\r\n _retryAt = retryAfterTimeSpan;\r\n }\r\n /**\r\n * Sets up the timer which triggers actually sending the data.\r\n */\r\n function _setupTimer() {\r\n if (!_timeoutHandle && !_paused) {\r\n var retryInterval = _retryAt ? Math.max(0, _retryAt - dateNow()) : 0;\r\n var timerValue = Math.max(_maxBatchInterval, retryInterval);\r\n _timeoutHandle = scheduleTimeout(function () {\r\n _timeoutHandle = null;\r\n _self[_DYN_TRIGGER_SEND /* @min:%2etriggerSend */](true, null, 1 /* SendRequestReason.NormalSchedule */);\r\n }, timerValue);\r\n }\r\n }\r\n function _clearScheduledTimer() {\r\n _timeoutHandle && _timeoutHandle.cancel();\r\n _timeoutHandle = null;\r\n _retryAt = null;\r\n }\r\n /**\r\n * Checks if the SDK should resend the payload after receiving this status code from the backend.\r\n * @param statusCode\r\n */\r\n function _isRetriable(statusCode) {\r\n return statusCode === 401 // Unauthorized\r\n || statusCode === 403 // Forbidden\r\n || statusCode === 408 // Timeout\r\n || statusCode === 429 // Too many requests.\r\n || statusCode === 500 // Internal server error.\r\n || statusCode === 502 // Bad Gateway.\r\n || statusCode === 503 // Service unavailable.\r\n || statusCode === 504; // Gateway timeout.\r\n }\r\n function _formatErrorMessageXhr(xhr, message) {\r\n if (xhr) {\r\n return \"XMLHttpRequest,Status:\" + xhr.status + \",Response:\" + _getResponseText(xhr) || xhr.response || \"\";\r\n }\r\n return message;\r\n }\r\n /**\r\n * Send XDomainRequest\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param isAsync - {boolean} - Indicates if the request should be sent asynchronously\r\n *\r\n * Note: XDomainRequest does not support sync requests. This 'isAsync' parameter is added\r\n * to maintain consistency with the xhrSender's contract\r\n * Note: XDomainRequest does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n function _xdrSender(payload, isAsync) {\r\n var buffer = _self[_DYN__BUFFER /* @min:%2e_buffer */];\r\n var _window = getWindow();\r\n var xdr = new XDomainRequest();\r\n // NOTE: xdr may send previous retry payload to new endpoint since we are not able to check response URL\r\n xdr.onload = function () { return _self._xdrOnLoad(xdr, payload); };\r\n xdr.onerror = function (event) { return _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, _formatErrorMessageXdr(xdr), event); };\r\n // XDomainRequest requires the same protocol as the hosting page.\r\n // If the protocol doesn't match, we can't send the telemetry :(.\r\n var hostingProtocol = _window && _window.location && _window.location.protocol || \"\";\r\n if (_endpointUrl.lastIndexOf(hostingProtocol, 0) !== 0) {\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". \" +\r\n \"Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.\");\r\n buffer[_DYN_CLEAR /* @min:%2eclear */]();\r\n return;\r\n }\r\n var endpointUrl = _endpointUrl.replace(/^(https?:)/, \"\");\r\n xdr.open(\"POST\", endpointUrl);\r\n // compose an array of payloads\r\n var batch = buffer[_DYN_BATCH_PAYLOADS /* @min:%2ebatchPayloads */](payload);\r\n xdr.send(batch);\r\n buffer[_DYN_MARK_AS_SENT /* @min:%2emarkAsSent */](payload);\r\n }\r\n function _formatErrorMessageXdr(xdr, message) {\r\n if (xdr) {\r\n return \"XDomainRequest,Response:\" + _getResponseText(xdr) || \"\";\r\n }\r\n return message;\r\n }\r\n // Using function lookups for backward compatibility as the getNotifyMgr() did not exist until after v2.5.6\r\n function _getNotifyMgr() {\r\n var func = \"getNotifyMgr\";\r\n if (_self.core[func]) {\r\n return _self.core[func]();\r\n }\r\n // using _self.core['_notificationManager'] for backward compatibility\r\n return _self.core[\"_notificationManager\"];\r\n }\r\n function _notifySendRequest(sendRequest, isAsync) {\r\n var manager = _getNotifyMgr();\r\n if (manager && manager[_DYN_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */]) {\r\n try {\r\n manager[_DYN_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */](sendRequest, isAsync);\r\n }\r\n catch (e) {\r\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 74 /* _eInternalMessageId.NotificationException */, \"send request notification failed: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n }\r\n /**\r\n * Validate UUID Format\r\n * Specs taken from https://tools.ietf.org/html/rfc4122 and breeze repo\r\n */\r\n function _validateInstrumentationKey(instrumentationKey, config) {\r\n var disableValidation = config.disableInstrumentationKeyValidation;\r\n var disableIKeyValidationFlag = isNullOrUndefined(disableValidation) ? false : disableValidation;\r\n if (disableIKeyValidationFlag) {\r\n return true;\r\n }\r\n var UUID_Regex = \"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$\";\r\n var regexp = new RegExp(UUID_Regex);\r\n return regexp.test(instrumentationKey);\r\n }\r\n function _initDefaults() {\r\n _self[_DYN__SENDER /* @min:%2e_sender */] = null;\r\n _self[_DYN__BUFFER /* @min:%2e_buffer */] = null;\r\n _self._appId = null;\r\n _self._sample = null;\r\n _headers = {};\r\n _offlineListener = null;\r\n _consecutiveErrors = 0;\r\n _retryAt = null;\r\n _lastSend = null;\r\n _paused = false;\r\n _timeoutHandle = null;\r\n _serializer = null;\r\n _stamp_specific_redirects = 0;\r\n _syncFetchPayload = 0;\r\n _fallbackSender = null;\r\n _syncUnloadSender = null;\r\n _evtNamespace = null;\r\n _endpointUrl = null;\r\n _orgEndpointUrl = null;\r\n _maxBatchSizeInBytes = 0;\r\n _beaconSupported = false;\r\n _customHeaders = null;\r\n _disableTelemetry = false;\r\n _instrumentationKey = null;\r\n _convertUndefined = UNDEFINED_VALUE;\r\n _isRetryDisabled = false;\r\n _sessionStorageUsed = null;\r\n _namePrefix = UNDEFINED_VALUE;\r\n objDefine(_self, \"_senderConfig\", {\r\n g: function () {\r\n return objExtend({}, defaultAppInsightsChannelConfig);\r\n }\r\n });\r\n }\r\n });\r\n return _this;\r\n }\r\n Sender.constructEnvelope = function (orig, iKey, logger, convertUndefined) {\r\n var envelope;\r\n if (iKey !== orig.iKey && !isNullOrUndefined(iKey)) {\r\n envelope = __assign(__assign({}, orig), { iKey: iKey });\r\n }\r\n else {\r\n envelope = orig;\r\n }\r\n var creator = EnvelopeTypeCreator[envelope.baseType] || EventEnvelopeCreator;\r\n return creator(logger, envelope, convertUndefined);\r\n };\r\n /**\r\n * Pause the sending (transmission) of events, this will cause all events to be batched only until the maximum limits are\r\n * hit at which point new events are dropped. Will also cause events to NOT be sent during page unload, so if Session storage\r\n * is disabled events will be lost.\r\n * SessionStorage Limit is 2000 events, In-Memory (Array) Storage is 10,000 events (can be configured via the eventsLimitInMem).\r\n */\r\n Sender.prototype.pause = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Resume the sending (transmission) of events, this will restart the timer and any batched events will be sent using the normal\r\n * send interval.\r\n */\r\n Sender.prototype.resume = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Flush to send data immediately; channel should default to sending data asynchronously. If executing asynchronously (the default) and\r\n * you DO NOT pass a callback function then a [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * will be returned which will resolve once the flush is complete. The actual implementation of the `IPromise`\r\n * will be a native Promise (if supported) or the default as supplied by [ts-async library](https://github.com/nevware21/ts-async)\r\n * @param async - send data asynchronously when true\r\n * @param callBack - if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called.\r\n * If the caller doesn't return true the caller should assume that it may never be called.\r\n * @param sendReason - specify the reason that you are calling \"flush\" defaults to ManualFlush (1) if not specified\r\n * @returns - If a callback is provided `true` to indicate that callback will be called after the flush is complete otherwise the caller\r\n * should assume that any provided callback will never be called, Nothing or if occurring asynchronously a\r\n * [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html) which will be resolved once the unload is complete,\r\n * the [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html) will only be returned when no callback is provided\r\n * and async is true.\r\n */\r\n Sender.prototype.flush = function (async, callBack) {\r\n if (async === void 0) { async = true; }\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Flush the batched events synchronously (if possible -- based on configuration).\r\n * Will not flush if the Send has been paused.\r\n */\r\n Sender.prototype.onunloadFlush = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n Sender.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n Sender.prototype.processTelemetry = function (telemetryItem, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * xhr state changes\r\n */\r\n Sender.prototype._xhrReadyStateChange = function (xhr, payload, countOfItemsInPayload) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Trigger the immediate send of buffered data; If executing asynchronously (the default) this may (not required) return\r\n * an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html) that will resolve once the\r\n * send is complete. The actual implementation of the `IPromise` will be a native Promise (if supported) or the default\r\n * as supplied by [ts-async library](https://github.com/nevware21/ts-async)\r\n * @param async - Indicates if the events should be sent asynchronously\r\n * @param forcedSender - {SenderFunction} - Indicates the forcedSender, undefined if not passed\r\n * @returns - Nothing or optionally, if occurring asynchronously a [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * which will be resolved (or reject) once the send is complete, the [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * should only be returned when async is true.\r\n */\r\n Sender.prototype.triggerSend = function (async, forcedSender, sendReason) {\r\n if (async === void 0) { async = true; }\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * error handler\r\n */\r\n Sender.prototype._onError = function (payload, message, event) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * partial success handler\r\n */\r\n Sender.prototype._onPartialSuccess = function (payload, results) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * success handler\r\n */\r\n Sender.prototype._onSuccess = function (payload, countOfItemsInPayload) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * xdr state changes\r\n */\r\n Sender.prototype._xdrOnLoad = function (xdr, payload) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Add header to request\r\n * @param name - Header name.\r\n * @param value - Header value.\r\n */\r\n Sender.prototype.addHeader = function (name, value) {\r\n // @DynamicProtoStub - DO NOT add any code as this will be removed during packaging\r\n };\r\n return Sender;\r\n}(BaseTelemetryPlugin));\r\nexport { Sender };\r\n//# sourceMappingURL=Sender.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { createPromise, doAwaitResponse } from \"@nevware21/ts-async\";\r\nimport { arrSlice, getLength } from \"@nevware21/ts-utils\";\r\nimport { _DYN_UNLOAD } from \"../__DynamicConstants\";\r\n/**\r\n * Run the unload function of the target object if it exists\r\n * @param target - The target object that contains the unload function\r\n * @param isAsync - The caller identifies whether it is expecting the operation to complete synchronously or asynchronously. Even\r\n * if the caller is not waiting the operation may still be performed asynchronously depending on the component and the reverse is\r\n * also true.\r\n * @returns The result of the target function\r\n */\r\nexport function runTargetUnload(target, isAsync) {\r\n if (target && target[_DYN_UNLOAD /* @min:%2eunload */]) {\r\n return target[_DYN_UNLOAD /* @min:%2eunload */](isAsync);\r\n }\r\n}\r\n/**\r\n * Call the unload function on all targets handling any returned [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * / Promise before calling the next targets unload\r\n * @param targets - An array of the targets to unload\r\n * @param isAsync - The caller identifies whether it is expecting the operations to complete synchronously or asynchronously. Even\r\n * if the caller is not waiting the operation may still be performed asynchronously depending on the component and the reverse is\r\n * also true.\r\n * @param done - Optional callback function to call once all of the unload functions have been called.\r\n */\r\nexport function doUnloadAll(targets, isAsync, done) {\r\n var result;\r\n if (!done) {\r\n result = createPromise(function (resolved) {\r\n done = resolved;\r\n });\r\n }\r\n if (targets && getLength(targets) > 0) {\r\n doAwaitResponse(runTargetUnload(targets[0], isAsync), function () {\r\n doUnloadAll(arrSlice(targets, 1), isAsync, done);\r\n });\r\n }\r\n else {\r\n done();\r\n }\r\n return result;\r\n}\r\n//# sourceMappingURL=AsyncUtils.js.map","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { getLazy } from \"@nevware21/ts-utils\";\r\nimport { _createAllPromise, _createRejectedPromise, _createResolvedPromise } from \"./base\";\r\nimport { createNativePromise } from \"./nativePromise\";\r\nvar _promiseCreator;\r\n/**\r\n * Set the default promise implementation to use when calling `createPromise`; `createAllPromise`; `createResolvedPromise`\r\n * and `createRejectedPromise`. This is effective a global value and changing this will affect ALL callers of these\r\n * functions, as such these functions should only be used when switching implementations would have not unexpected\r\n * consequences like switching from a `createSyncPromise` to `createIdlePromise` where idle promises have a possibility\r\n * of never getting called during application shutdown or during an expected timeframe.\r\n * @group Alias\r\n * @group Promise\r\n * @param creator - The creator function to call when a new promise is required.\r\n */\r\nexport function setCreatePromiseImpl(creator) {\r\n _promiseCreator = creator ? getLazy(function () { return creator; }) : null;\r\n}\r\n/**\r\n * Creates a Promise instance using the current default promise creator that when resolved or rejected will execute\r\n * it's pending chained operations.\r\n * @group Alias\r\n * @group Promise\r\n * @param executor - The function to be executed during the creation of the promise. Any errors thrown in the executor will\r\n * cause the promise to be rejected. The return value of the executor is always ignored\r\n * @param timeout - [Optional] timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport function createPromise(executor, timeout) {\r\n !_promiseCreator && (_promiseCreator = getLazy(function () { return createNativePromise; }));\r\n return _promiseCreator.v.call(this, executor, timeout);\r\n}\r\n/**\r\n * Returns a single asynchronous Promise instance that resolves to an array of the results from the input promises.\r\n * This returned promise will resolve and execute it's pending chained operations __asynchronously__ using the optional\r\n * provided timeout value to schedule when the chained items will be executed, or if the input contains no promises.\r\n * It rejects immediately upon any of the input promises rejected or non-promises throwing an error,\r\n * and will reject with this first rejection message / error.\r\n * If the runtime doesn't support the Promise.all it will fallback back to an asynchronous Promise implementation.\r\n * @group Alias\r\n * @group All\r\n * @param input - The array of promises to wait to be resolved / rejected before resolving or rejecting the new promise\r\n * @param timeout\r\n * @returns\r\n *

\r\n */\r\nexport var createAllPromise = _createAllPromise(createPromise);\r\n/**\r\n * Returns a single asynchronous Promise instance that is already resolved with the given value. If the value passed is\r\n * a promise then that promise is returned instead of creating a new asynchronous promise instance.\r\n * If a new instance is returned then any chained operations will execute __asynchronously__ using the optional\r\n * timeout value to schedule when the chained items will be executed.(eg. `then()`; `finally()`).\r\n * @group Alias\r\n * @group Resolved\r\n * @param value - The value to be used by this `Promise`. Can also be a `Promise` or a thenable to resolve.\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport var createResolvedPromise = _createResolvedPromise(createPromise);\r\n/**\r\n * Returns a single asynchronous Promise instance that is already rejected with the given reason.\r\n * Any chained operations will execute __asynchronously__ using the optional timeout value to schedule\r\n * when then chained items will be executed. (eg. `catch()`; `finally()`).\r\n * @group Alias\r\n * @group Rejected\r\n * @param reason - The rejection reason\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport var createRejectedPromise = _createRejectedPromise(createPromise);\r\n//# sourceMappingURL=promise.js.map","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { getLazy, ILazyValue } from \"@nevware21/ts-utils\";\r\nimport { _createAllPromise, _createRejectedPromise, _createResolvedPromise } from \"./base\";\r\nimport { IPromise } from \"../interfaces/IPromise\";\r\nimport { createNativePromise } from \"./nativePromise\";\r\nimport { PromiseExecutor } from \"../interfaces/types\";\r\n\r\nlet _promiseCreator: ILazyValue<(executor: PromiseExecutor, timeout?: number) => IPromise>;\r\n\r\n/**\r\n * Set the default promise implementation to use when calling `createPromise`; `createAllPromise`; `createResolvedPromise`\r\n * and `createRejectedPromise`. This is effective a global value and changing this will affect ALL callers of these\r\n * functions, as such these functions should only be used when switching implementations would have not unexpected\r\n * consequences like switching from a `createSyncPromise` to `createIdlePromise` where idle promises have a possibility\r\n * of never getting called during application shutdown or during an expected timeframe.\r\n * @group Alias\r\n * @group Promise\r\n * @param creator - The creator function to call when a new promise is required.\r\n */\r\nexport function setCreatePromiseImpl(\r\n creator: (executor: PromiseExecutor, timeout?: number) => IPromise\r\n) {\r\n _promiseCreator = creator ? getLazy(() => creator) : null;\r\n}\r\n\r\n/**\r\n * Creates a Promise instance using the current default promise creator that when resolved or rejected will execute\r\n * it's pending chained operations.\r\n * @group Alias\r\n * @group Promise\r\n * @param executor - The function to be executed during the creation of the promise. Any errors thrown in the executor will\r\n * cause the promise to be rejected. The return value of the executor is always ignored\r\n * @param timeout - [Optional] timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport function createPromise(executor: PromiseExecutor, timeout?: number): IPromise {\r\n !_promiseCreator && (_promiseCreator = getLazy(() => createNativePromise));\r\n\r\n return _promiseCreator.v.call(this, executor, timeout);\r\n}\r\n\r\n/**\r\n * Returns a single asynchronous Promise instance that resolves to an array of the results from the input promises.\r\n * This returned promise will resolve and execute it's pending chained operations __asynchronously__ using the optional\r\n * provided timeout value to schedule when the chained items will be executed, or if the input contains no promises.\r\n * It rejects immediately upon any of the input promises rejected or non-promises throwing an error,\r\n * and will reject with this first rejection message / error.\r\n * If the runtime doesn't support the Promise.all it will fallback back to an asynchronous Promise implementation.\r\n * @group Alias\r\n * @group All\r\n * @param input - The array of promises to wait to be resolved / rejected before resolving or rejecting the new promise\r\n * @param timeout\r\n * @returns\r\n *
    \r\n *
  • An already resolved `Promise`, if the input passed is empty.\r\n *
  • A pending `Promise` in all other cases. This returned promise is then resolved/rejected __synchronously__\r\n * (as soon as the pending items is empty) when all the promises in the given input have resolved, or if any of the\r\n * promises reject.\r\n *
\r\n */\r\nexport const createAllPromise: (input: PromiseLike[], timeout?: number) => IPromise = _createAllPromise(createPromise);\r\n\r\n/**\r\n * Returns a single asynchronous Promise instance that is already resolved with the given value. If the value passed is\r\n * a promise then that promise is returned instead of creating a new asynchronous promise instance.\r\n * If a new instance is returned then any chained operations will execute __asynchronously__ using the optional\r\n * timeout value to schedule when the chained items will be executed.(eg. `then()`; `finally()`).\r\n * @group Alias\r\n * @group Resolved\r\n * @param value - The value to be used by this `Promise`. Can also be a `Promise` or a thenable to resolve.\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport const createResolvedPromise: (value: T, timeout?: number) => IPromise = _createResolvedPromise(createPromise);\r\n\r\n/**\r\n * Returns a single asynchronous Promise instance that is already rejected with the given reason.\r\n * Any chained operations will execute __asynchronously__ using the optional timeout value to schedule\r\n * when then chained items will be executed. (eg. `catch()`; `finally()`).\r\n * @group Alias\r\n * @group Rejected\r\n * @param reason - The rejection reason\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport const createRejectedPromise: (reason: any, timeout?: number) => IPromise = _createRejectedPromise(createPromise);\r\n","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { arrForEach, arrSlice, dumpObj, getKnownSymbol, hasSymbol, isFunction, isPromiseLike, isUndefined, throwTypeError, objToString, scheduleTimeout, getWindow, isNode, getGlobal, objDefine, objDefineProp, lazySafeGetInst } from \"@nevware21/ts-utils\";\r\nimport { doAwait } from \"./await\";\r\nimport { _addDebugState, _promiseDebugEnabled } from \"./debug\";\r\nimport { STRING_STATES } from \"../internal/state\";\r\nimport { emitEvent } from \"./event\";\r\nimport { STR_PROMISE } from \"../internal/constants\";\r\nvar NODE_UNHANDLED_REJECTION = \"unhandledRejection\";\r\nvar UNHANDLED_REJECTION = NODE_UNHANDLED_REJECTION.toLowerCase();\r\nvar _currentPromiseId = [];\r\nvar _uniquePromiseId = 0;\r\nvar _unhandledRejectionTimeout = 10;\r\nvar _hasPromiseRejectionEvent;\r\nfunction dumpFnObj(value) {\r\n if (isFunction(value)) {\r\n return value.toString();\r\n }\r\n return dumpObj(value);\r\n}\r\nexport function _createPromise(newPromise, processor, executor) {\r\n var additionalArgs = arrSlice(arguments, 3);\r\n var _state = 0 /* ePromiseState.Pending */;\r\n var _hasResolved = false;\r\n var _settledValue;\r\n var _queue = [];\r\n var _id = _uniquePromiseId++;\r\n var _parentId = _currentPromiseId.length > 0 ? _currentPromiseId[_currentPromiseId.length - 1] : undefined;\r\n var _handled = false;\r\n var _unHandledRejectionHandler = null;\r\n var _thePromise;\r\n !_hasPromiseRejectionEvent && (_hasPromiseRejectionEvent = lazySafeGetInst(STR_PROMISE + \"RejectionEvent\"));\r\n // https://tc39.es/ecma262/#sec-promise.prototype.then\r\n var _then = function (onResolved, onRejected) {\r\n try {\r\n _currentPromiseId.push(_id);\r\n _handled = true;\r\n _unHandledRejectionHandler && _unHandledRejectionHandler.cancel();\r\n _unHandledRejectionHandler = null;\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"then(\" + dumpFnObj(onResolved)+ \", \" + dumpFnObj(onResolved) + \")\");\r\n //#endif\r\n var thenPromise = newPromise(function (resolve, reject) {\r\n // Queue the new promise returned to be resolved or rejected\r\n // when this promise settles.\r\n _queue.push(function () {\r\n // https://tc39.es/ecma262/#sec-newpromisereactionjob\r\n //let value: any;\r\n try {\r\n // First call the onFulfilled or onRejected handler, on the settled value\r\n // of this promise. If the corresponding `handler` does not exist, simply\r\n // pass through the settled value.\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Handling settled value \" + dumpFnObj(_settledValue));\r\n //#endif\r\n var handler = _state === 2 /* ePromiseState.Resolved */ ? onResolved : onRejected;\r\n var value = isUndefined(handler) ? _settledValue : (isFunction(handler) ? handler(_settledValue) : handler);\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Handling Result \" + dumpFnObj(value));\r\n //#endif\r\n if (isPromiseLike(value)) {\r\n // The called handlers returned a new promise, so the chained promise\r\n // will follow the state of this promise.\r\n value.then(resolve, reject);\r\n }\r\n else if (handler) {\r\n // If we have a handler then chained promises are always \"resolved\" with the result returned\r\n resolve(value);\r\n }\r\n else if (_state === 3 /* ePromiseState.Rejected */) {\r\n // If this promise is rejected then the chained promise should be rejected\r\n // with either the settled value of this promise or the return value of the handler.\r\n reject(value);\r\n }\r\n else {\r\n // If this promise is fulfilled, then the chained promise is also fulfilled\r\n // with either the settled value of this promise or the return value of the handler.\r\n resolve(value);\r\n }\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n });\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Added to Queue \" + _queue.length);\r\n //#endif\r\n // If this promise is already settled, then immediately process the callback we\r\n // just added to the queue.\r\n if (_hasResolved) {\r\n _processQueue();\r\n }\r\n }, additionalArgs);\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Created -> \" + thenPromise.toString());\r\n //#endif\r\n return thenPromise;\r\n }\r\n finally {\r\n _currentPromiseId.pop();\r\n }\r\n };\r\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\r\n var _catch = function (onRejected) {\r\n // Reuse then onRejected to support rejection\r\n return _then(undefined, onRejected);\r\n };\r\n // https://tc39.es/ecma262/#sec-promise.prototype.finally\r\n var _finally = function (onFinally) {\r\n var thenFinally = onFinally;\r\n var catchFinally = onFinally;\r\n if (isFunction(onFinally)) {\r\n thenFinally = function (value) {\r\n onFinally && onFinally();\r\n return value;\r\n };\r\n catchFinally = function (reason) {\r\n onFinally && onFinally();\r\n throw reason;\r\n };\r\n }\r\n return _then(thenFinally, catchFinally);\r\n };\r\n var _strState = function () {\r\n return STRING_STATES[_state];\r\n };\r\n var _processQueue = function () {\r\n if (_queue.length > 0) {\r\n // The onFulfilled and onRejected handlers must be called asynchronously. Thus,\r\n // we make a copy of the queue and work on it once the current call stack unwinds.\r\n var pending = _queue.slice();\r\n _queue = [];\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Processing queue \" + pending.length);\r\n //#endif\r\n _handled = true;\r\n processor(pending);\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Processing done\");\r\n //#endif\r\n _unHandledRejectionHandler && _unHandledRejectionHandler.cancel();\r\n _unHandledRejectionHandler = null;\r\n }\r\n else {\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Empty Processing queue \");\r\n //#endif\r\n }\r\n };\r\n var _createSettleIfFn = function (newState, allowState) {\r\n return function (theValue) {\r\n if (_state === allowState) {\r\n if (newState === 2 /* ePromiseState.Resolved */ && isPromiseLike(theValue)) {\r\n _state = 1 /* ePromiseState.Resolving */;\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Resolving\");\r\n //#endif\r\n theValue.then(_createSettleIfFn(2 /* ePromiseState.Resolved */, 1 /* ePromiseState.Resolving */), _createSettleIfFn(3 /* ePromiseState.Rejected */, 1 /* ePromiseState.Resolving */));\r\n return;\r\n }\r\n _state = newState;\r\n _hasResolved = true;\r\n _settledValue = theValue;\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), _strState());\r\n //#endif\r\n _processQueue();\r\n if (!_handled && newState === 3 /* ePromiseState.Rejected */ && !_unHandledRejectionHandler) {\r\n _unHandledRejectionHandler = scheduleTimeout(_notifyUnhandledRejection, _unhandledRejectionTimeout);\r\n }\r\n }\r\n else {\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Already \" + _strState());\r\n //#endif\r\n }\r\n };\r\n };\r\n var _notifyUnhandledRejection = function () {\r\n if (!_handled) {\r\n if (isNode()) {\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Emitting \" + NODE_UNHANDLED_REJECTION);\r\n //#endif\r\n process.emit(NODE_UNHANDLED_REJECTION, _settledValue, _thePromise);\r\n }\r\n else {\r\n var gbl = getWindow() || getGlobal();\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Emitting \" + UNHANDLED_REJECTION);\r\n //#endif\r\n emitEvent(gbl, UNHANDLED_REJECTION, function (theEvt) {\r\n objDefine(theEvt, \"promise\", { g: function () { return _thePromise; } });\r\n theEvt.reason = _settledValue;\r\n return theEvt;\r\n }, !!_hasPromiseRejectionEvent.v);\r\n }\r\n }\r\n };\r\n _thePromise = {\r\n then: _then,\r\n \"catch\": _catch,\r\n finally: _finally\r\n };\r\n objDefineProp(_thePromise, \"state\", {\r\n get: _strState\r\n });\r\n if (_promiseDebugEnabled) {\r\n // eslint-disable-next-line brace-style\r\n _addDebugState(_thePromise, _strState, function () { return objToString(_settledValue); }, function () { return _handled; });\r\n }\r\n if (hasSymbol()) {\r\n _thePromise[getKnownSymbol(11 /* WellKnownSymbols.toStringTag */)] = \"IPromise\";\r\n }\r\n var _toString = function () {\r\n return \"IPromise\" + (_promiseDebugEnabled ? \"[\" + _id + (!isUndefined(_parentId) ? (\":\" + _parentId) : \"\") + \"]\" : \"\") + \" \" + _strState() + (_hasResolved ? (\" - \" + dumpFnObj(_settledValue)) : \"\");\r\n };\r\n _thePromise.toString = _toString;\r\n (function _initialize() {\r\n if (!isFunction(executor)) {\r\n throwTypeError(STR_PROMISE + \": executor is not a function - \" + dumpFnObj(executor));\r\n }\r\n var _rejectFn = _createSettleIfFn(3 /* ePromiseState.Rejected */, 0 /* ePromiseState.Pending */);\r\n try {\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Executing\");\r\n //#endif\r\n executor.call(_thePromise, _createSettleIfFn(2 /* ePromiseState.Resolved */, 0 /* ePromiseState.Pending */), _rejectFn);\r\n }\r\n catch (e) {\r\n _rejectFn(e);\r\n }\r\n })();\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Returning\");\r\n //#endif\r\n return _thePromise;\r\n}\r\n/**\r\n * @ignore\r\n * @internal\r\n * Returns a function which when called will return a new Promise object that resolves to an array of the\r\n * results from the input promises. The returned promise will resolve when all of the inputs' promises have\r\n * resolved, or if the input contains no promises. It rejects immediately upon any of the input promises\r\n * rejected or non-promises throwing an error, and will reject with this first rejection message / error.\r\n * @param newPromise - The delegate function used to create a new promise object the new promise instance.\r\n * @returns A function to create a promise that will be resolved when all arguments are resolved.\r\n */\r\nexport function _createAllPromise(newPromise) {\r\n return function (input) {\r\n var additionalArgs = arrSlice(arguments, 1);\r\n return newPromise(function (resolve, reject) {\r\n try {\r\n var values_1 = [];\r\n var pending_1 = 1; // Prefix to 1 so we finish iterating over all of the input promises first\r\n arrForEach(input, function (item, idx) {\r\n if (item) {\r\n pending_1++;\r\n doAwait(item, function (value) {\r\n // Set the result values\r\n values_1[idx] = value;\r\n if (--pending_1 === 0) {\r\n resolve(values_1);\r\n }\r\n }, reject);\r\n }\r\n });\r\n // Now decrement the pending so that we finish correctly\r\n pending_1--;\r\n if (pending_1 === 0) {\r\n // All promises were either resolved or where not a promise\r\n resolve(values_1);\r\n }\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n }, additionalArgs);\r\n };\r\n}\r\n/**\r\n * @ignore\r\n * @internal\r\n * The createResolvedPromise returns a PromiseLike object that is resolved with a given value. If the value is\r\n * PromiseLike (i.e. has a \"then\" method), the returned promise will \"follow\" that thenable, adopting its eventual\r\n * state; otherwise the returned promise will be fulfilled with the value. This function flattens nested layers\r\n * of promise-like objects (e.g. a promise that resolves to a promise that resolves to something) into a single layer.\r\n * @param newPromise - The delegate function used to create a new promise object\r\n * @param value Argument to be resolved by this Promise. Can also be a Promise or a thenable to resolve.\r\n * @param additionalArgs - Any additional arguments that should be passed to the delegate to assist with the creation of\r\n * the new promise instance.\r\n */\r\nexport function _createResolvedPromise(newPromise) {\r\n return function (value) {\r\n var additionalArgs = arrSlice(arguments, 1);\r\n if (isPromiseLike(value)) {\r\n return value;\r\n }\r\n return newPromise(function (resolve) {\r\n resolve(value);\r\n }, additionalArgs);\r\n };\r\n}\r\n/**\r\n * @ignore\r\n * @internal\r\n * Return a promise like object that is rejected with the given reason.\r\n * @param newPromise - The delegate function used to create a new promise object\r\n * @param reason - The rejection reason\r\n * @param additionalArgs - Any additional arguments that should be passed to the delegate to assist with the creation of\r\n * the new promise instance.\r\n */\r\nexport function _createRejectedPromise(newPromise) {\r\n return function (reason) {\r\n var additionalArgs = arrSlice(arguments, 1);\r\n return newPromise(function (_resolve, reject) {\r\n reject(reason);\r\n }, additionalArgs);\r\n };\r\n}\r\n//# sourceMappingURL=base.js.map","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport {\r\n arrForEach, arrSlice, dumpObj, getKnownSymbol, hasSymbol, isFunction, isPromiseLike, isUndefined,\r\n throwTypeError, WellKnownSymbols, objToString, scheduleTimeout, ITimerHandler, getWindow, isNode,\r\n getGlobal, ILazyValue, objDefine, objDefineProp, lazySafeGetInst\r\n} from \"@nevware21/ts-utils\";\r\nimport { doAwait } from \"./await\";\r\nimport { _addDebugState, _debugLog, _promiseDebugEnabled } from \"./debug\";\r\nimport { IPromise } from \"../interfaces/IPromise\";\r\nimport { PromisePendingProcessor } from \"./itemProcessor\";\r\nimport {\r\n FinallyPromiseHandler, PromiseCreatorFn, PromiseExecutor, RejectedPromiseHandler, ResolvedPromiseHandler\r\n} from \"../interfaces/types\";\r\nimport { ePromiseState, STRING_STATES } from \"../internal/state\";\r\nimport { emitEvent } from \"./event\";\r\nimport { STR_PROMISE } from \"../internal/constants\";\r\n\r\nconst NODE_UNHANDLED_REJECTION = \"unhandledRejection\";\r\nconst UNHANDLED_REJECTION = NODE_UNHANDLED_REJECTION.toLowerCase();\r\n\r\nlet _currentPromiseId: number[] = [];\r\nlet _uniquePromiseId = 0;\r\nlet _unhandledRejectionTimeout = 10;\r\n\r\nlet _hasPromiseRejectionEvent: ILazyValue;\r\n\r\nfunction dumpFnObj(value: any) {\r\n if (isFunction(value)) {\r\n return value.toString();\r\n }\r\n\r\n return dumpObj(value);\r\n}\r\n\r\n/**\r\n * @ignore\r\n * @internal\r\n *\r\n * Implementing a simple synchronous promise interface for support within any environment that\r\n * doesn't support the Promise API\r\n * @param newPromise - The delegate function used to create a new promise object\r\n * @param processor - The function to use to process the pending\r\n * @param executor - The resolve function\r\n * @param additionalArgs - [Optional] Additional arguments that will be passed to the PromiseCreatorFn\r\n */\r\nexport function _createPromise(newPromise: PromiseCreatorFn, processor: PromisePendingProcessor, executor: PromiseExecutor, ...additionalArgs: any): IPromise;\r\nexport function _createPromise(newPromise: PromiseCreatorFn, processor: PromisePendingProcessor, executor: PromiseExecutor): IPromise {\r\n let additionalArgs = arrSlice(arguments, 3);\r\n let _state = ePromiseState.Pending;\r\n let _hasResolved = false;\r\n let _settledValue: T;\r\n let _queue: (() => void)[] = [];\r\n let _id = _uniquePromiseId++;\r\n let _parentId = _currentPromiseId.length > 0 ? _currentPromiseId[_currentPromiseId.length - 1] : undefined;\r\n let _handled = false;\r\n let _unHandledRejectionHandler: ITimerHandler = null;\r\n let _thePromise: IPromise;\r\n\r\n !_hasPromiseRejectionEvent && (_hasPromiseRejectionEvent = lazySafeGetInst(STR_PROMISE + \"RejectionEvent\"));\r\n\r\n // https://tc39.es/ecma262/#sec-promise.prototype.then\r\n const _then = (onResolved?: ResolvedPromiseHandler, onRejected?: RejectedPromiseHandler): IPromise => {\r\n try {\r\n _currentPromiseId.push(_id);\r\n _handled = true;\r\n _unHandledRejectionHandler && _unHandledRejectionHandler.cancel();\r\n _unHandledRejectionHandler = null;\r\n\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"then(\" + dumpFnObj(onResolved)+ \", \" + dumpFnObj(onResolved) + \")\");\r\n //#endif\r\n let thenPromise = newPromise(function (resolve, reject) {\r\n // Queue the new promise returned to be resolved or rejected\r\n // when this promise settles.\r\n _queue.push(function () {\r\n // https://tc39.es/ecma262/#sec-newpromisereactionjob\r\n //let value: any;\r\n try {\r\n // First call the onFulfilled or onRejected handler, on the settled value\r\n // of this promise. If the corresponding `handler` does not exist, simply\r\n // pass through the settled value.\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Handling settled value \" + dumpFnObj(_settledValue));\r\n //#endif\r\n let handler = _state === ePromiseState.Resolved ? onResolved : onRejected;\r\n let value = isUndefined(handler) ? _settledValue : (isFunction(handler) ? handler(_settledValue) : handler);\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Handling Result \" + dumpFnObj(value));\r\n //#endif\r\n \r\n if (isPromiseLike(value)) {\r\n // The called handlers returned a new promise, so the chained promise\r\n // will follow the state of this promise.\r\n value.then(resolve as any, reject);\r\n } else if (handler) {\r\n // If we have a handler then chained promises are always \"resolved\" with the result returned\r\n resolve(value as any);\r\n } else if (_state === ePromiseState.Rejected) {\r\n // If this promise is rejected then the chained promise should be rejected\r\n // with either the settled value of this promise or the return value of the handler.\r\n reject(value);\r\n } else {\r\n // If this promise is fulfilled, then the chained promise is also fulfilled\r\n // with either the settled value of this promise or the return value of the handler.\r\n resolve(value as any);\r\n }\r\n } catch (e) {\r\n reject(e);\r\n }\r\n });\r\n \r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Added to Queue \" + _queue.length);\r\n //#endif\r\n \r\n // If this promise is already settled, then immediately process the callback we\r\n // just added to the queue.\r\n if (_hasResolved) {\r\n _processQueue();\r\n }\r\n }, additionalArgs);\r\n \r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Created -> \" + thenPromise.toString());\r\n //#endif\r\n \r\n return thenPromise;\r\n \r\n } finally {\r\n _currentPromiseId.pop();\r\n }\r\n }\r\n\r\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\r\n const _catch = (onRejected: RejectedPromiseHandler) => {\r\n // Reuse then onRejected to support rejection\r\n return _then(undefined, onRejected);\r\n }\r\n\r\n // https://tc39.es/ecma262/#sec-promise.prototype.finally\r\n const _finally = (onFinally: FinallyPromiseHandler): IPromise => {\r\n let thenFinally: any = onFinally;\r\n let catchFinally: any = onFinally;\r\n if (isFunction(onFinally)) {\r\n thenFinally = function(value: TResult1 | TResult2) {\r\n onFinally && onFinally();\r\n return value;\r\n }\r\n \r\n catchFinally = function(reason: any) {\r\n onFinally && onFinally();\r\n throw reason;\r\n }\r\n }\r\n\r\n return _then(thenFinally as any, catchFinally as any);\r\n }\r\n\r\n const _strState = () => {\r\n return STRING_STATES[_state];\r\n }\r\n\r\n const _processQueue = () => {\r\n if (_queue.length > 0) {\r\n // The onFulfilled and onRejected handlers must be called asynchronously. Thus,\r\n // we make a copy of the queue and work on it once the current call stack unwinds.\r\n let pending = _queue.slice();\r\n _queue = [];\r\n\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Processing queue \" + pending.length);\r\n //#endif\r\n\r\n _handled = true;\r\n processor(pending);\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Processing done\");\r\n //#endif\r\n _unHandledRejectionHandler && _unHandledRejectionHandler.cancel();\r\n _unHandledRejectionHandler = null;\r\n\r\n } else {\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Empty Processing queue \");\r\n //#endif\r\n }\r\n }\r\n\r\n const _createSettleIfFn = (newState: ePromiseState, allowState: ePromiseState) => {\r\n return (theValue: T) => {\r\n if (_state === allowState) {\r\n if (newState === ePromiseState.Resolved && isPromiseLike(theValue)) {\r\n _state = ePromiseState.Resolving;\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Resolving\");\r\n //#endif\r\n theValue.then(\r\n _createSettleIfFn(ePromiseState.Resolved, ePromiseState.Resolving),\r\n _createSettleIfFn(ePromiseState.Rejected, ePromiseState.Resolving));\r\n return;\r\n }\r\n\r\n _state = newState;\r\n _hasResolved = true;\r\n _settledValue = theValue;\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), _strState());\r\n //#endif\r\n _processQueue();\r\n if (!_handled && newState === ePromiseState.Rejected && !_unHandledRejectionHandler) {\r\n _unHandledRejectionHandler = scheduleTimeout(_notifyUnhandledRejection, _unhandledRejectionTimeout)\r\n }\r\n } else {\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Already \" + _strState());\r\n //#endif\r\n }\r\n };\r\n }\r\n\r\n const _notifyUnhandledRejection = () => {\r\n if (!_handled) {\r\n if (isNode()) {\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Emitting \" + NODE_UNHANDLED_REJECTION);\r\n //#endif\r\n process.emit(NODE_UNHANDLED_REJECTION, _settledValue, _thePromise);\r\n } else {\r\n let gbl = getWindow() || getGlobal();\r\n \r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Emitting \" + UNHANDLED_REJECTION);\r\n //#endif\r\n emitEvent(gbl, UNHANDLED_REJECTION, (theEvt: any) => {\r\n objDefine(theEvt, \"promise\", { g: () => _thePromise });\r\n theEvt.reason = _settledValue;\r\n return theEvt;\r\n }, !!_hasPromiseRejectionEvent.v);\r\n }\r\n }\r\n }\r\n\r\n _thePromise = {\r\n then: _then,\r\n \"catch\": _catch,\r\n finally: _finally\r\n } as any;\r\n\r\n objDefineProp(_thePromise, \"state\", {\r\n get: _strState\r\n });\r\n\r\n if (_promiseDebugEnabled) {\r\n // eslint-disable-next-line brace-style\r\n _addDebugState(_thePromise, _strState, () => { return objToString(_settledValue); }, () => _handled);\r\n }\r\n\r\n if (hasSymbol()) {\r\n _thePromise[getKnownSymbol(WellKnownSymbols.toStringTag)] = \"IPromise\";\r\n }\r\n\r\n const _toString = () => {\r\n return \"IPromise\" + (_promiseDebugEnabled ? \"[\" + _id + (!isUndefined(_parentId) ? (\":\" + _parentId) : \"\") + \"]\" : \"\") + \" \" + _strState() + (_hasResolved ? (\" - \" + dumpFnObj(_settledValue)) : \"\");\r\n }\r\n\r\n _thePromise.toString = _toString;\r\n\r\n (function _initialize() {\r\n if (!isFunction(executor)) {\r\n throwTypeError(STR_PROMISE + \": executor is not a function - \" + dumpFnObj(executor));\r\n }\r\n\r\n const _rejectFn = _createSettleIfFn(ePromiseState.Rejected, ePromiseState.Pending);\r\n try {\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Executing\");\r\n //#endif\r\n executor.call(\r\n _thePromise,\r\n _createSettleIfFn(ePromiseState.Resolved, ePromiseState.Pending),\r\n _rejectFn);\r\n } catch (e) {\r\n _rejectFn(e);\r\n }\r\n })();\r\n\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) _debugLog(_toString(), \"Returning\");\r\n //#endif\r\n return _thePromise;\r\n}\r\n\r\n/**\r\n * @ignore\r\n * @internal\r\n * Returns a function which when called will return a new Promise object that resolves to an array of the\r\n * results from the input promises. The returned promise will resolve when all of the inputs' promises have\r\n * resolved, or if the input contains no promises. It rejects immediately upon any of the input promises\r\n * rejected or non-promises throwing an error, and will reject with this first rejection message / error.\r\n * @param newPromise - The delegate function used to create a new promise object the new promise instance.\r\n * @returns A function to create a promise that will be resolved when all arguments are resolved.\r\n */\r\nexport function _createAllPromise(newPromise: PromiseCreatorFn): (input: PromiseLike[], ...additionalArgs: any) => IPromise {\r\n return function (input: PromiseLike[]): IPromise {\r\n let additionalArgs = arrSlice(arguments, 1);\r\n return newPromise((resolve, reject) => {\r\n try {\r\n let values = [] as any;\r\n let pending = 1; // Prefix to 1 so we finish iterating over all of the input promises first\r\n\r\n arrForEach(input, (item, idx) => {\r\n if (item) {\r\n pending++;\r\n doAwait(item, (value) => {\r\n // Set the result values\r\n values[idx] = value;\r\n if (--pending === 0) {\r\n resolve(values);\r\n }\r\n }, reject);\r\n }\r\n });\r\n\r\n // Now decrement the pending so that we finish correctly\r\n pending--;\r\n if (pending === 0) {\r\n // All promises were either resolved or where not a promise\r\n resolve(values);\r\n }\r\n } catch (e) {\r\n reject(e);\r\n }\r\n }, additionalArgs);\r\n };\r\n}\r\n\r\n/**\r\n * @ignore\r\n * @internal\r\n * The createResolvedPromise returns a PromiseLike object that is resolved with a given value. If the value is\r\n * PromiseLike (i.e. has a \"then\" method), the returned promise will \"follow\" that thenable, adopting its eventual\r\n * state; otherwise the returned promise will be fulfilled with the value. This function flattens nested layers\r\n * of promise-like objects (e.g. a promise that resolves to a promise that resolves to something) into a single layer.\r\n * @param newPromise - The delegate function used to create a new promise object\r\n * @param value Argument to be resolved by this Promise. Can also be a Promise or a thenable to resolve.\r\n * @param additionalArgs - Any additional arguments that should be passed to the delegate to assist with the creation of\r\n * the new promise instance.\r\n */\r\nexport function _createResolvedPromise(newPromise: PromiseCreatorFn): (value: T, ...additionalArgs: any) => IPromise {\r\n return function (value: T): IPromise {\r\n let additionalArgs = arrSlice(arguments, 1);\r\n if (isPromiseLike(value)) {\r\n return value as unknown as IPromise;\r\n }\r\n \r\n return newPromise((resolve) => {\r\n resolve(value);\r\n }, additionalArgs);\r\n };\r\n}\r\n\r\n/**\r\n * @ignore\r\n * @internal\r\n * Return a promise like object that is rejected with the given reason.\r\n * @param newPromise - The delegate function used to create a new promise object\r\n * @param reason - The rejection reason\r\n * @param additionalArgs - Any additional arguments that should be passed to the delegate to assist with the creation of\r\n * the new promise instance.\r\n */\r\nexport function _createRejectedPromise(newPromise: PromiseCreatorFn): (reason: any, ...additionalArgs: any) => IPromise {\r\n return function (reason: any): IPromise {\r\n let additionalArgs = arrSlice(arguments, 1);\r\n return newPromise((_resolve, reject) => {\r\n reject(reason);\r\n }, additionalArgs);\r\n };\r\n}\r\n","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { isPromiseLike } from \"@nevware21/ts-utils\";\r\nexport function doAwaitResponse(value, cb) {\r\n return doAwait(value, function (value) {\r\n cb && cb({\r\n value: value,\r\n rejected: false\r\n });\r\n }, function (reason) {\r\n cb && cb({\r\n rejected: true,\r\n reason: reason\r\n });\r\n });\r\n}\r\n/**\r\n * Wait for the promise to resolve or reject, if resolved the callback function will be called with it's value and if\r\n * rejected the rejectFn will be called with the reason. If the passed promise argument is not a promise the callback\r\n * will be called synchronously with the value.\r\n * @group Await Helper\r\n * @param value - The value or promise like value to wait for\r\n * @param resolveFn - The callback to call on the promise successful resolving.\r\n * @param rejectFn - The callback to call when the promise rejects\r\n * @returns The passed value, if it is a promise and there is either a resolve or reject handler\r\n * then it will return a chained promise with the value from the resolve or reject handler (depending\r\n * whether it resolve or rejects)\r\n * @example\r\n * ```ts\r\n * let promise = createPromise((resolve, reject) => {\r\n * resolve(42);\r\n * });\r\n *\r\n * // Handle via a chained promise\r\n * let chainedPromise = promise.then((value) => {\r\n * // Do something with the value\r\n * });\r\n *\r\n * // Handle via doAwait\r\n * doAwait(promise, (value) => {\r\n * // Do something with the value\r\n * });\r\n *\r\n * // It can also handle the raw value, so you could process the result of either a\r\n * // synchrounous return of the value or a Promise\r\n * doAwait(42, (value) => {\r\n * // Do something with the value\r\n * });\r\n * ```\r\n */\r\nexport function doAwait(value, resolveFn, rejectFn, finallyFn) {\r\n var result = value;\r\n if (isPromiseLike(value)) {\r\n if (resolveFn || rejectFn) {\r\n result = value.then(resolveFn, rejectFn);\r\n }\r\n }\r\n else {\r\n resolveFn && resolveFn(value);\r\n }\r\n if (finallyFn) {\r\n result = doFinally(result, finallyFn);\r\n }\r\n return result;\r\n}\r\n/**\r\n * Wait for the promise to resolve or reject and then call the finallyFn. If the passed promise argument is not a promise the callback\r\n * will be called synchronously with the value. If the passed promise doesn't implement finally then a finally implementation will be\r\n * simulated using then(..., ...).\r\n * @group Await Helper\r\n * @param value - The value or promise like value to wait for\r\n * @param finallyFn - The finally function to call once the promise has resolved or rejected\r\n */\r\nexport function doFinally(value, finallyFn) {\r\n var result = value;\r\n if (finallyFn) {\r\n if (isPromiseLike(value)) {\r\n if (value.finally) {\r\n result = value.finally(finallyFn);\r\n }\r\n else {\r\n // Simulate finally if not available\r\n result = value.then(function (value) {\r\n finallyFn();\r\n return value;\r\n }, function (reason) {\r\n finallyFn();\r\n throw reason;\r\n });\r\n }\r\n }\r\n else {\r\n finallyFn();\r\n }\r\n }\r\n return result;\r\n}\r\n//# sourceMappingURL=await.js.map","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { isPromiseLike } from \"@nevware21/ts-utils\";\r\nimport { AwaitResponse } from \"../interfaces/await-response\";\r\nimport { IPromise } from \"../interfaces/IPromise\";\r\nimport { FinallyPromiseHandler, RejectedPromiseHandler, ResolvedPromiseHandler } from \"../interfaces/types\";\r\n\r\n/**\r\n * Helper to coallesce the promise resolved / reject into a single callback to simplify error handling.\r\n * @group Await Helper\r\n * @param value - The value or promise like value to wait for\r\n * @param cb - The callback to call with the response of the promise as an IAwaitResponse object.\r\n */\r\nexport function doAwaitResponse(value: T | Promise, cb: (response: AwaitResponse) => void): T | Promise;\r\nexport function doAwaitResponse(value: T | PromiseLike, cb: (response: AwaitResponse) => void): T | PromiseLike;\r\nexport function doAwaitResponse(value: T | IPromise, cb: (response: AwaitResponse) => void): T | IPromise {\r\n return doAwait(value as any, (value) => {\r\n cb && cb({\r\n value: value,\r\n rejected: false\r\n });\r\n },\r\n (reason) => {\r\n cb && cb({\r\n rejected: true,\r\n reason: reason\r\n });\r\n });\r\n}\r\n\r\n/**\r\n * Wait for the promise to resolve or reject, if resolved the callback function will be called with it's value and if\r\n * rejected the rejectFn will be called with the reason. If the passed promise argument is not a promise the callback\r\n * will be called synchronously with the value.\r\n * @group Await Helper\r\n * @param value - The value or promise like value to wait for\r\n * @param resolveFn - The callback to call on the promise successful resolving.\r\n * @param rejectFn - The callback to call when the promise rejects\r\n * @param finallyFn - The callback to call once the promise has resolved or rejected\r\n * @returns The passed value, if it is a promise and there is either a resolve or reject handler\r\n * then it will return a chained promise with the value from the resolve or reject handler (depending\r\n * whether it resolve or rejects)\r\n * @example\r\n * ```ts\r\n * let promise = createPromise((resolve, reject) => {\r\n * resolve(42);\r\n * });\r\n *\r\n * // Handle via a chained promise\r\n * let chainedPromise = promise.then((value) => {\r\n * // Do something with the value\r\n * });\r\n *\r\n * // Handle via doAwait\r\n * doAwait(promise, (value) => {\r\n * // Do something with the value\r\n * });\r\n *\r\n * // It can also handle the raw value, so you could process the result of either a\r\n * // synchrounous return of the value or a Promise\r\n * doAwait(42, (value) => {\r\n * // Do something with the value\r\n * });\r\n * ```\r\n */\r\nexport function doAwait(value: T | Promise, resolveFn: ResolvedPromiseHandler, rejectFn?: RejectedPromiseHandler, finallyFn?: FinallyPromiseHandler): T | Promise;\r\n\r\n/**\r\n * Wait for the promise to resolve or reject, if resolved the callback function will be called with it's value and if\r\n * rejected the rejectFn will be called with the reason. If the passed promise argument is not a promise the callback\r\n * will be called synchronously with the value.\r\n * @group Await Helper\r\n * @param value - The value or promise like value to wait for\r\n * @param resolveFn - The callback to call on the promise successful resolving.\r\n * @param rejectFn - The callback to call when the promise rejects\r\n * @param finallyFn - The callback to call once the promise has resolved or rejected\r\n * @returns The passed value, if it is a promise and there is either a resolve or reject handler\r\n * then it will return a chained promise with the value from the resolve or reject handler (depending\r\n * whether it resolve or rejects)\r\n * @example\r\n * ```ts\r\n * let promise = createPromise((resolve, reject) => {\r\n * resolve(42);\r\n * });\r\n *\r\n * // Handle via a chained promise\r\n * let chainedPromise = promise.then((value) => {\r\n * // Do something with the value\r\n * });\r\n *\r\n * // Handle via doAwait\r\n * doAwait(promise, (value) => {\r\n * // Do something with the value\r\n * });\r\n *\r\n * // It can also handle the raw value, so you could process the result of either a\r\n * // synchrounous return of the value or a Promise\r\n * doAwait(42, (value) => {\r\n * // Do something with the value\r\n * });\r\n * ```\r\n */\r\nexport function doAwait(value: T | PromiseLike, resolveFn: ResolvedPromiseHandler, rejectFn?: RejectedPromiseHandler, finallyFn?: FinallyPromiseHandler): T | PromiseLike;\r\n\r\n/**\r\n * Wait for the promise to resolve or reject, if resolved the callback function will be called with it's value and if\r\n * rejected the rejectFn will be called with the reason. If the passed promise argument is not a promise the callback\r\n * will be called synchronously with the value.\r\n * @group Await Helper\r\n * @param value - The value or promise like value to wait for\r\n * @param resolveFn - The callback to call on the promise successful resolving.\r\n * @param rejectFn - The callback to call when the promise rejects\r\n * @returns The passed value, if it is a promise and there is either a resolve or reject handler\r\n * then it will return a chained promise with the value from the resolve or reject handler (depending\r\n * whether it resolve or rejects)\r\n * @example\r\n * ```ts\r\n * let promise = createPromise((resolve, reject) => {\r\n * resolve(42);\r\n * });\r\n *\r\n * // Handle via a chained promise\r\n * let chainedPromise = promise.then((value) => {\r\n * // Do something with the value\r\n * });\r\n *\r\n * // Handle via doAwait\r\n * doAwait(promise, (value) => {\r\n * // Do something with the value\r\n * });\r\n *\r\n * // It can also handle the raw value, so you could process the result of either a\r\n * // synchrounous return of the value or a Promise\r\n * doAwait(42, (value) => {\r\n * // Do something with the value\r\n * });\r\n * ```\r\n */\r\nexport function doAwait(value: T | IPromise, resolveFn: ResolvedPromiseHandler, rejectFn?: RejectedPromiseHandler, finallyFn?: FinallyPromiseHandler): T | IPromise {\r\n let result = value;\r\n \r\n if (isPromiseLike(value)) {\r\n if (resolveFn || rejectFn) {\r\n result = value.then(resolveFn, rejectFn) as any;\r\n }\r\n } else {\r\n resolveFn && resolveFn(value as T);\r\n }\r\n\r\n if (finallyFn) {\r\n result = doFinally(result as any, finallyFn);\r\n }\r\n\r\n return result as any;\r\n}\r\n\r\n/**\r\n * Wait for the promise to resolve or reject and then call the finallyFn. If the passed promise argument is not a promise the callback\r\n * will be called synchronously with the value. If the passed promise doesn't implement finally then a finally implementation will be\r\n * simulated using then(..., ...).\r\n * @group Await Helper\r\n * @param value - The value or promise like value to wait for\r\n * @param finallyFn - The finally function to call once the promise has resolved or rejected\r\n */\r\nexport function doFinally(value: T | Promise, finallyFn: FinallyPromiseHandler): T | Promise;\r\n\r\n/**\r\n * Wait for the promise to resolve or reject and then call the finallyFn. If the passed promise argument is not a promise the callback\r\n * will be called synchronously with the value. If the passed promise doesn't implement finally then a finally implementation will be\r\n * simulated using then(..., ...).\r\n * @group Await Helper\r\n * @param value - The value or promise like value to wait for\r\n * @param finallyFn - The finally function to call once the promise has resolved or rejected\r\n */\r\nexport function doFinally(value: T | PromiseLike, finallyFn: FinallyPromiseHandler): T | PromiseLike;\r\n\r\n/**\r\n * Wait for the promise to resolve or reject and then call the finallyFn. If the passed promise argument is not a promise the callback\r\n * will be called synchronously with the value. If the passed promise doesn't implement finally then a finally implementation will be\r\n * simulated using then(..., ...).\r\n * @group Await Helper\r\n * @param value - The value or promise like value to wait for\r\n * @param finallyFn - The finally function to call once the promise has resolved or rejected\r\n */\r\nexport function doFinally(value: T | IPromise, finallyFn: FinallyPromiseHandler): T | IPromise {\r\n let result = value;\r\n if (finallyFn) {\r\n if (isPromiseLike(value)) {\r\n if ((value as IPromise).finally) {\r\n result = (value as IPromise).finally(finallyFn);\r\n } else {\r\n // Simulate finally if not available\r\n result = value.then(\r\n function(value) {\r\n finallyFn();\r\n return value;\r\n }, function(reason: any) {\r\n finallyFn();\r\n throw reason;\r\n });\r\n }\r\n } else {\r\n finallyFn();\r\n }\r\n }\r\n\r\n return result;\r\n}","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { objDefineProp } from \"@nevware21/ts-utils\";\r\nvar _debugState;\r\nvar _debugResult;\r\nvar _debugHandled;\r\n/**\r\n * @internal\r\n * @ignore\r\n */\r\nexport var _promiseDebugEnabled = false;\r\nvar _theLogger = null;\r\n/**\r\n * @internal\r\n * @ignore Internal function enable logging the internal state of the promise during execution, this code and references are\r\n * removed from the production artifacts\r\n */\r\nexport function _debugLog(id, message) {\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) if (_theLogger) {\r\n //#:(!DEBUG) _theLogger(id, message);\r\n //#:(!DEBUG) }\r\n //#endif\r\n}\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal function to add the debug state to the promise so that it provides simular visibility as you would\r\n * see from native promises\r\n * @param thePromise - The Promise implementation\r\n * @param stateFn - The function to return the state of the promise\r\n * @param resultFn - The function to return the result (settled value) of the promise\r\n * @param handledFn - The function to return whether the promise has been handled (used for throwing\r\n * unhandled rejection events)\r\n */\r\nexport function _addDebugState(thePromise, stateFn, resultFn, handledFn) {\r\n // While the IPromise implementations provide a `state` property, keeping the `[[PromiseState]]`\r\n // as native promises also have a non-enumerable property of the same name\r\n _debugState = _debugState || { toString: function () { return \"[[PromiseState]]\"; } };\r\n _debugResult = _debugResult || { toString: function () { return \"[[PromiseResult]]\"; } };\r\n _debugHandled = _debugHandled || { toString: function () { return \"[[PromiseIsHandled]]\"; } };\r\n objDefineProp(thePromise, _debugState, { get: stateFn });\r\n objDefineProp(thePromise, _debugResult, { get: resultFn });\r\n objDefineProp(thePromise, _debugHandled, { get: handledFn });\r\n}\r\n/**\r\n * Debug helper to enable internal debugging of the promise implementations. Disabled by default.\r\n * For the generated packages included in the npm package the `logger` will not be called as the\r\n * `_debugLog` function that uses this logger is removed during packaging.\r\n *\r\n * It is available directly from the repository for unit testing.\r\n *\r\n * @group Debug\r\n * @param enabled - Should debugging be enabled (defaults `false`, when `true` promises will have\r\n * additional debug properties and the `toString` will include extra details.\r\n * @param logger - Optional logger that will log internal state changes, only called in debug\r\n * builds as the calling function is removed is the production artifacts.\r\n * @example\r\n * ```ts\r\n * // The Id is the id of the promise\r\n * // The message is the internal debug message\r\n * function promiseDebugLogger(id: string, message: string) {\r\n * if (console && console.log) {\r\n * console.log(id, message);\r\n * }\r\n * }\r\n *\r\n * setPromiseDebugState(true, promiseDebugLogger);\r\n *\r\n * // While the logger will not be called for the production packages\r\n * // Setting the `enabled` flag to tru will cause each promise to have\r\n * // the following additional properties added\r\n * // [[PromiseState]]; => Same as the `state` property\r\n * // [[PromiseResult]]; => The settled value\r\n * // [[PromiseIsHandled]] => Identifies if the promise has been handled\r\n * // It will also cause the `toString` for the promise to include additional\r\n * // debugging information\r\n * ```\r\n */\r\nexport function setPromiseDebugState(enabled, logger) {\r\n _promiseDebugEnabled = enabled;\r\n _theLogger = logger;\r\n}\r\n//# sourceMappingURL=debug.js.map","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { objDefineProp } from \"@nevware21/ts-utils\";\r\n\r\nlet _debugState: any;\r\nlet _debugResult: any;\r\nlet _debugHandled: any;\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n */\r\nexport let _promiseDebugEnabled = false;\r\n\r\nlet _theLogger: (id: string, message: string) => void = null;\r\n\r\n/**\r\n * @internal\r\n * @ignore Internal function enable logging the internal state of the promise during execution, this code and references are\r\n * removed from the production artifacts\r\n */\r\nexport function _debugLog(id: string, message: string) {\r\n //#ifdef DEBUG\r\n //#:(!DEBUG) if (_theLogger) {\r\n //#:(!DEBUG) _theLogger(id, message);\r\n //#:(!DEBUG) }\r\n //#endif\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal function to add the debug state to the promise so that it provides simular visibility as you would\r\n * see from native promises\r\n * @param thePromise - The Promise implementation\r\n * @param stateFn - The function to return the state of the promise\r\n * @param resultFn - The function to return the result (settled value) of the promise\r\n * @param handledFn - The function to return whether the promise has been handled (used for throwing\r\n * unhandled rejection events)\r\n */\r\nexport function _addDebugState(thePromise: any, stateFn: () => string, resultFn: () => string, handledFn: () => boolean) {\r\n // While the IPromise implementations provide a `state` property, keeping the `[[PromiseState]]`\r\n // as native promises also have a non-enumerable property of the same name\r\n _debugState = _debugState || { toString: () => \"[[PromiseState]]\" };\r\n _debugResult = _debugResult || { toString: () => \"[[PromiseResult]]\" };\r\n _debugHandled = _debugHandled || { toString: () => \"[[PromiseIsHandled]]\" };\r\n \r\n objDefineProp(thePromise, _debugState, { get: stateFn });\r\n objDefineProp(thePromise, _debugResult, { get: resultFn });\r\n objDefineProp(thePromise, _debugHandled, { get: handledFn });\r\n}\r\n\r\n/**\r\n * Debug helper to enable internal debugging of the promise implementations. Disabled by default.\r\n * For the generated packages included in the npm package the `logger` will not be called as the\r\n * `_debugLog` function that uses this logger is removed during packaging.\r\n *\r\n * It is available directly from the repository for unit testing.\r\n *\r\n * @group Debug\r\n * @param enabled - Should debugging be enabled (defaults `false`, when `true` promises will have\r\n * additional debug properties and the `toString` will include extra details.\r\n * @param logger - Optional logger that will log internal state changes, only called in debug\r\n * builds as the calling function is removed is the production artifacts.\r\n * @example\r\n * ```ts\r\n * // The Id is the id of the promise\r\n * // The message is the internal debug message\r\n * function promiseDebugLogger(id: string, message: string) {\r\n * if (console && console.log) {\r\n * console.log(id, message);\r\n * }\r\n * }\r\n *\r\n * setPromiseDebugState(true, promiseDebugLogger);\r\n *\r\n * // While the logger will not be called for the production packages\r\n * // Setting the `enabled` flag to tru will cause each promise to have\r\n * // the following additional properties added\r\n * // [[PromiseState]]; => Same as the `state` property\r\n * // [[PromiseResult]]; => The settled value\r\n * // [[PromiseIsHandled]] => Identifies if the promise has been handled\r\n * // It will also cause the `toString` for the promise to include additional\r\n * // debugging information\r\n * ```\r\n */\r\nexport function setPromiseDebugState(enabled: boolean, logger?: (id: string, message: string) => void) {\r\n _promiseDebugEnabled = enabled;\r\n _theLogger = logger;\r\n}","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n/**\r\n * @ignore -- Don't include in the generated documentation\r\n * @internal\r\n */\r\nexport var STRING_STATES = [\r\n \"pending\", \"resolving\", \"resolved\", \"rejected\"\r\n];\r\n//# sourceMappingURL=state.js.map","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\n/**\r\n * @ignore -- Don't include in the generated documentation\r\n * @internal\r\n */\r\nexport const enum ePromiseState {\r\n Pending = 0,\r\n Resolving = 1,\r\n Resolved = 2,\r\n Rejected = 3\r\n}\r\n\r\n/**\r\n * @ignore -- Don't include in the generated documentation\r\n * @internal\r\n */\r\nexport const STRING_STATES: string[] = [\r\n \"pending\", \"resolving\", \"resolved\", \"rejected\"\r\n];\r\n","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { dumpObj, getDocument, safeGetLazy, getInst } from \"@nevware21/ts-utils\";\r\nvar DISPATCH_EVENT = \"dispatchEvent\";\r\nvar _hasInitEvent;\r\n/**\r\n * @internal\r\n * @ignore\r\n * @param target\r\n * @param evtName\r\n * @param populateEvent\r\n * @param useNewEvent\r\n */\r\nexport function emitEvent(target, evtName, populateEvent, useNewEvent) {\r\n var doc = getDocument();\r\n !_hasInitEvent && (_hasInitEvent = safeGetLazy(function () {\r\n var evt;\r\n if (doc && doc.createEvent) {\r\n evt = doc.createEvent(\"Event\");\r\n }\r\n return (!!evt && evt.initEvent);\r\n }, null));\r\n var theEvt = _hasInitEvent.v ? doc.createEvent(\"Event\") : (useNewEvent ? new Event(evtName) : {});\r\n populateEvent && populateEvent(theEvt);\r\n if (_hasInitEvent.v) {\r\n theEvt.initEvent(evtName, false, true);\r\n }\r\n if (theEvt && target[DISPATCH_EVENT]) {\r\n target[DISPATCH_EVENT](theEvt);\r\n }\r\n else {\r\n var handler = target[\"on\" + evtName];\r\n if (handler) {\r\n handler(theEvt);\r\n }\r\n else {\r\n var theConsole = getInst(\"console\");\r\n theConsole && (theConsole[\"error\"] || theConsole[\"log\"])(evtName, dumpObj(theEvt));\r\n }\r\n }\r\n}\r\n//# sourceMappingURL=event.js.map","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { dumpObj, getDocument, safeGetLazy, ILazyValue, getInst } from \"@nevware21/ts-utils\";\r\n\r\nconst DISPATCH_EVENT = \"dispatchEvent\";\r\nlet _hasInitEvent: ILazyValue;\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * @param target\r\n * @param evtName\r\n * @param populateEvent\r\n * @param useNewEvent\r\n */\r\nexport function emitEvent(target: any, evtName: string, populateEvent: (theEvt: Event | any) => Event | any, useNewEvent: boolean) {\r\n\r\n let doc = getDocument();\r\n !_hasInitEvent && (_hasInitEvent = safeGetLazy(() => {\r\n let evt: any;\r\n if (doc && doc.createEvent) {\r\n evt = doc.createEvent(\"Event\");\r\n }\r\n \r\n return (!!evt && evt.initEvent);\r\n }, null));\r\n\r\n let theEvt: Event = _hasInitEvent.v ? doc.createEvent(\"Event\") : (useNewEvent ? new Event(evtName) : {} as Event);\r\n populateEvent && populateEvent(theEvt);\r\n\r\n if (_hasInitEvent.v) {\r\n theEvt.initEvent(evtName, false, true);\r\n }\r\n\r\n if (theEvt && target[DISPATCH_EVENT]) {\r\n target[DISPATCH_EVENT](theEvt);\r\n } else {\r\n let handler = target[\"on\" + evtName];\r\n if (handler) {\r\n handler(theEvt);\r\n } else {\r\n let theConsole = getInst(\"console\");\r\n theConsole && (theConsole[\"error\"] || theConsole[\"log\"])(evtName, dumpObj(theEvt));\r\n }\r\n }\r\n}\r\n","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2023 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nexport var STR_PROMISE = \"Promise\";\r\n//# sourceMappingURL=constants.js.map","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2023 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nexport const STR_PROMISE = \"Promise\";","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { createAsyncPromise } from \"./asyncPromise\";\r\nimport { _createAllPromise, _createRejectedPromise, _createResolvedPromise } from \"./base\";\r\nimport { STRING_STATES } from \"../internal/state\";\r\nimport { dumpObj, lazySafeGetInst, isFunction, objDefineProp, throwTypeError } from \"@nevware21/ts-utils\";\r\nimport { STR_PROMISE } from \"../internal/constants\";\r\nvar _isPromiseSupported;\r\n/**\r\n * Creates a Promise instance that when resolved or rejected will execute it's pending chained operations using the\r\n * available native Promise implementation.\r\n * If runtime does not support native `Promise` class (or no polyfill is available) this function will fallback to using\r\n * `createAsyncPromise` which will resolve them __asynchronously__ using the optional provided timeout value to\r\n * schedule when the chained items will be executed.\r\n * @group Alias\r\n * @group Promise\r\n * @group Native\r\n * @param executor - The function to be executed during the creation of the promise. Any errors thrown in the executor will\r\n * cause the promise to be rejected. The return value of the executor is always ignored\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport function createNativePromise(executor, timeout) {\r\n !_isPromiseSupported && (_isPromiseSupported = lazySafeGetInst(STR_PROMISE));\r\n var PrmCls = _isPromiseSupported.v;\r\n if (!PrmCls) {\r\n return createAsyncPromise(executor);\r\n }\r\n if (!isFunction(executor)) {\r\n throwTypeError(STR_PROMISE + \": executor is not a function - \" + dumpObj(executor));\r\n }\r\n var _state = 0 /* ePromiseState.Pending */;\r\n function _strState() {\r\n return STRING_STATES[_state];\r\n }\r\n var thePromise = new PrmCls(function (resolve, reject) {\r\n function _resolve(value) {\r\n _state = 2 /* ePromiseState.Resolved */;\r\n resolve(value);\r\n }\r\n function _reject(reason) {\r\n _state = 3 /* ePromiseState.Rejected */;\r\n reject(reason);\r\n }\r\n executor(_resolve, _reject);\r\n });\r\n objDefineProp(thePromise, \"state\", {\r\n get: _strState\r\n });\r\n return thePromise;\r\n}\r\n/**\r\n * Returns a single asynchronous Promise instance that resolves to an array of the results from the input promises.\r\n * This returned promise will resolve and execute it's pending chained operations __asynchronously__ using the optional\r\n * provided timeout value to schedule when the chained items will be executed, or if the input contains no promises.\r\n * It rejects immediately upon any of the input promises rejected or non-promises throwing an error,\r\n * and will reject with this first rejection message / error.\r\n * If the runtime doesn't support the Promise.all it will fallback back to an asynchronous Promise implementation.\r\n * @group Alias\r\n * @group All\r\n * @group Native\r\n * @param input - The array of promises to wait to be resolved / rejected before resolving or rejecting the new promise\r\n * @param timeout\r\n * @returns\r\n *
    \r\n *
  • An already resolved `Promise`, if the input passed is empty.\r\n *
  • A pending `Promise` in all other cases. This returned promise is then resolved/rejected __synchronously__\r\n * (as soon as the pending items is empty) when all the promises in the given input have resolved, or if any of the\r\n * promises reject.\r\n *
\r\n */\r\nexport var createNativeAllPromise = _createAllPromise(createNativePromise);\r\n/**\r\n * Returns a single asynchronous Promise instance that is already resolved with the given value. If the value passed is\r\n * a promise then that promise is returned instead of creating a new asynchronous promise instance.\r\n * If a new instance is returned then any chained operations will execute __asynchronously__ using the optional\r\n * timeout value to schedule when the chained items will be executed.(eg. `then()`; `finally()`).\r\n * @group Alias\r\n * @group Resolved\r\n * @group Native\r\n * @param value - The value to be used by this `Promise`. Can also be a `Promise` or a thenable to resolve.\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport var createNativeResolvedPromise = _createResolvedPromise(createNativePromise);\r\n/**\r\n * Returns a single asynchronous Promise instance that is already rejected with the given reason.\r\n * Any chained operations will execute __asynchronously__ using the optional timeout value to schedule\r\n * when then chained items will be executed. (eg. `catch()`; `finally()`).\r\n * @group Alias\r\n * @group Rejected\r\n * @group Native\r\n * @param reason - The rejection reason\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport var createNativeRejectedPromise = _createRejectedPromise(createNativePromise);\r\n//# sourceMappingURL=nativePromise.js.map","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { createAsyncPromise } from \"./asyncPromise\";\r\nimport { _createAllPromise, _createRejectedPromise, _createResolvedPromise } from \"./base\";\r\nimport { IPromise } from \"../interfaces/IPromise\";\r\nimport { ePromiseState, STRING_STATES } from \"../internal/state\";\r\nimport { PromiseExecutor } from \"../interfaces/types\";\r\nimport { dumpObj, lazySafeGetInst, ILazyValue, isFunction, objDefineProp, throwTypeError } from \"@nevware21/ts-utils\";\r\nimport { STR_PROMISE } from \"../internal/constants\";\r\n\r\nlet _isPromiseSupported: ILazyValue;\r\n\r\n/**\r\n * Creates a Promise instance that when resolved or rejected will execute it's pending chained operations using the\r\n * available native Promise implementation.\r\n * If runtime does not support native `Promise` class (or no polyfill is available) this function will fallback to using\r\n * `createAsyncPromise` which will resolve them __asynchronously__ using the optional provided timeout value to\r\n * schedule when the chained items will be executed.\r\n * @group Alias\r\n * @group Promise\r\n * @group Native\r\n * @param executor - The function to be executed during the creation of the promise. Any errors thrown in the executor will\r\n * cause the promise to be rejected. The return value of the executor is always ignored\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport function createNativePromise(executor: PromiseExecutor, timeout?: number): IPromise {\r\n !_isPromiseSupported && (_isPromiseSupported = lazySafeGetInst(STR_PROMISE));\r\n\r\n const PrmCls = _isPromiseSupported.v;\r\n if (!PrmCls) {\r\n return createAsyncPromise(executor);\r\n }\r\n\r\n if (!isFunction(executor)) {\r\n throwTypeError(STR_PROMISE + \": executor is not a function - \" + dumpObj(executor));\r\n }\r\n\r\n let _state = ePromiseState.Pending;\r\n\r\n function _strState() {\r\n return STRING_STATES[_state];\r\n }\r\n\r\n let thePromise = new PrmCls((resolve, reject) => {\r\n function _resolve(value: T) {\r\n _state = ePromiseState.Resolved;\r\n resolve(value);\r\n }\r\n\r\n function _reject(reason: any) {\r\n _state = ePromiseState.Rejected;\r\n reject(reason);\r\n }\r\n\r\n executor(_resolve, _reject);\r\n\r\n }) as IPromise;\r\n\r\n objDefineProp(thePromise, \"state\", {\r\n get: _strState\r\n });\r\n\r\n return thePromise;\r\n}\r\n\r\n/**\r\n * Returns a single asynchronous Promise instance that resolves to an array of the results from the input promises.\r\n * This returned promise will resolve and execute it's pending chained operations __asynchronously__ using the optional\r\n * provided timeout value to schedule when the chained items will be executed, or if the input contains no promises.\r\n * It rejects immediately upon any of the input promises rejected or non-promises throwing an error,\r\n * and will reject with this first rejection message / error.\r\n * If the runtime doesn't support the Promise.all it will fallback back to an asynchronous Promise implementation.\r\n * @group Alias\r\n * @group All\r\n * @group Native\r\n * @param input - The array of promises to wait to be resolved / rejected before resolving or rejecting the new promise\r\n * @param timeout\r\n * @returns\r\n *
    \r\n *
  • An already resolved `Promise`, if the input passed is empty.\r\n *
  • A pending `Promise` in all other cases. This returned promise is then resolved/rejected __synchronously__\r\n * (as soon as the pending items is empty) when all the promises in the given input have resolved, or if any of the\r\n * promises reject.\r\n *
\r\n */\r\nexport const createNativeAllPromise: (input: PromiseLike[], timeout?: number) => IPromise = _createAllPromise(createNativePromise);\r\n\r\n/**\r\n * Returns a single asynchronous Promise instance that is already resolved with the given value. If the value passed is\r\n * a promise then that promise is returned instead of creating a new asynchronous promise instance.\r\n * If a new instance is returned then any chained operations will execute __asynchronously__ using the optional\r\n * timeout value to schedule when the chained items will be executed.(eg. `then()`; `finally()`).\r\n * @group Alias\r\n * @group Resolved\r\n * @group Native\r\n * @param value - The value to be used by this `Promise`. Can also be a `Promise` or a thenable to resolve.\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport const createNativeResolvedPromise: (value: T, timeout?: number) => Promise = _createResolvedPromise(createNativePromise);\r\n\r\n/**\r\n * Returns a single asynchronous Promise instance that is already rejected with the given reason.\r\n * Any chained operations will execute __asynchronously__ using the optional timeout value to schedule\r\n * when then chained items will be executed. (eg. `catch()`; `finally()`).\r\n * @group Alias\r\n * @group Rejected\r\n * @group Native\r\n * @param reason - The rejection reason\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport const createNativeRejectedPromise: (reason: any, timeout?: number) => Promise = _createRejectedPromise(createNativePromise);\r\n","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { _createAllPromise, _createPromise, _createRejectedPromise, _createResolvedPromise } from \"./base\";\r\nimport { timeoutItemProcessor } from \"./itemProcessor\";\r\n/**\r\n * Creates an asynchronous Promise instance that when resolved or rejected will execute it's pending chained operations\r\n * __asynchronously__ using the optional provided timeout value to schedule when the chained items will be ececuted.\r\n * @group Async\r\n * @group Promise\r\n * @param executor - The function to be executed during the creation of the promise. Any errors thrown in the executor will\r\n * cause the promise to be rejected. The return value of the executor is always ignored\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport function createAsyncPromise(executor, timeout) {\r\n return _createPromise(createAsyncPromise, timeoutItemProcessor(timeout), executor, timeout);\r\n}\r\n/**\r\n * Returns a single asynchronous Promise instance that resolves to an array of the results from the input promises.\r\n * This returned promise will resolve and execute it's pending chained operations __asynchronously__ using the optional\r\n * provided timeout value to schedule when the chained items will be executed, or if the input contains no promises.\r\n * It rejects immediately upon any of the input promises rejected or non-promises throwing an error,\r\n * and will reject with this first rejection message / error.\r\n * When resolved or rejected any additional chained operations will execute __asynchronously__ using the optional\r\n * timeout value to schedul when the chained item will be executed (eg. `then()`; `catch()`; `finally()`).\r\n * @group Async\r\n * @group All\r\n * @param input - The array of promises to wait to be resolved / rejected before resolving or rejecting the new promise\r\n * @param timeout\r\n * @returns\r\n *
    \r\n *
  • An already resolved `Promise`, if the input passed is empty.\r\n *
  • A pending `Promise` in all other cases. This returned promise is then resolved/rejected __synchronously__\r\n * (as soon as the pending items is empty) when all the promises in the given input have resolved, or if any of the\r\n * promises reject.\r\n *
\r\n */\r\nexport var createAsyncAllPromise = _createAllPromise(createAsyncPromise);\r\n// /**\r\n// * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved\r\n// * or rejected.\r\n// * @param values An array of Promises.\r\n// * @returns A new Promise.\r\n// */\r\n// race(values: T): Promise>;\r\n//export const createAsyncRacePromise: (values: T): IPromise;\r\n/**\r\n * Returns a single asynchronous Promise instance that is already resolved with the given value. If the value passed is\r\n * a promise then that promise is returned instead of creating a new asynchronous promise instance.\r\n * If a new instance is returned then any chained operations will execute __asynchronously__ using the optional\r\n * timeout value to schedule when the chained items will be executed.(eg. `then()`; `finally()`).\r\n * @group Async\r\n * @group Resolved\r\n * @param value - The value to be used by this `Promise`. Can also be a `Promise` or a thenable to resolve.\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport var createAsyncResolvedPromise = _createResolvedPromise(createAsyncPromise);\r\n/**\r\n * Returns a single asynchronous Promise instance that is already rejected with the given reason.\r\n * Any chained operations will execute __asynchronously__ using the optional timeout value to schedule\r\n * when then chained items will be executed. (eg. `catch()`; `finally()`).\r\n * @group Async\r\n * @group Rejected\r\n * @param reason - The rejection reason\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport var createAsyncRejectedPromise = _createRejectedPromise(createAsyncPromise);\r\n//# sourceMappingURL=asyncPromise.js.map","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { _createAllPromise, _createPromise, _createRejectedPromise, _createResolvedPromise } from \"./base\";\r\nimport { IPromise } from \"../interfaces/IPromise\";\r\nimport { timeoutItemProcessor } from \"./itemProcessor\";\r\nimport { PromiseExecutor } from \"../interfaces/types\";\r\n\r\n/**\r\n * Creates an asynchronous Promise instance that when resolved or rejected will execute it's pending chained operations\r\n * __asynchronously__ using the optional provided timeout value to schedule when the chained items will be ececuted.\r\n * @group Async\r\n * @group Promise\r\n * @param executor - The function to be executed during the creation of the promise. Any errors thrown in the executor will\r\n * cause the promise to be rejected. The return value of the executor is always ignored\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport function createAsyncPromise(executor: PromiseExecutor, timeout?: number): IPromise {\r\n return _createPromise(createAsyncPromise, timeoutItemProcessor(timeout), executor, timeout);\r\n}\r\n\r\n/**\r\n * Returns a single asynchronous Promise instance that resolves to an array of the results from the input promises.\r\n * This returned promise will resolve and execute it's pending chained operations __asynchronously__ using the optional\r\n * provided timeout value to schedule when the chained items will be executed, or if the input contains no promises.\r\n * It rejects immediately upon any of the input promises rejected or non-promises throwing an error,\r\n * and will reject with this first rejection message / error.\r\n * When resolved or rejected any additional chained operations will execute __asynchronously__ using the optional\r\n * timeout value to schedul when the chained item will be executed (eg. `then()`; `catch()`; `finally()`).\r\n * @group Async\r\n * @group All\r\n * @param input - The array of promises to wait to be resolved / rejected before resolving or rejecting the new promise\r\n * @param timeout\r\n * @returns\r\n *
    \r\n *
  • An already resolved `Promise`, if the input passed is empty.\r\n *
  • A pending `Promise` in all other cases. This returned promise is then resolved/rejected __synchronously__\r\n * (as soon as the pending items is empty) when all the promises in the given input have resolved, or if any of the\r\n * promises reject.\r\n *
\r\n */\r\nexport const createAsyncAllPromise: (input: PromiseLike[], timeout?: number) => IPromise = _createAllPromise(createAsyncPromise);\r\n\r\n// /**\r\n// * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved\r\n// * or rejected.\r\n// * @param values An array of Promises.\r\n// * @returns A new Promise.\r\n// */\r\n// race(values: T): Promise>;\r\n//export const createAsyncRacePromise: (values: T): IPromise;\r\n\r\n/**\r\n * Returns a single asynchronous Promise instance that is already resolved with the given value. If the value passed is\r\n * a promise then that promise is returned instead of creating a new asynchronous promise instance.\r\n * If a new instance is returned then any chained operations will execute __asynchronously__ using the optional\r\n * timeout value to schedule when the chained items will be executed.(eg. `then()`; `finally()`).\r\n * @group Async\r\n * @group Resolved\r\n * @param value - The value to be used by this `Promise`. Can also be a `Promise` or a thenable to resolve.\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport const createAsyncResolvedPromise: (value: T, timeout?: number) => IPromise = _createResolvedPromise(createAsyncPromise);\r\n\r\n/**\r\n * Returns a single asynchronous Promise instance that is already rejected with the given reason.\r\n * Any chained operations will execute __asynchronously__ using the optional timeout value to schedule\r\n * when then chained items will be executed. (eg. `catch()`; `finally()`).\r\n * @group Async\r\n * @group Rejected\r\n * @param reason - The rejection reason\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n */\r\nexport const createAsyncRejectedPromise: (reason: any, timeout?: number) => IPromise = _createRejectedPromise(createAsyncPromise);\r\n","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { arrForEach, isNumber, scheduleIdleCallback, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nvar _processPendingItems = function (pending) {\r\n arrForEach(pending, function (fn) {\r\n try {\r\n fn();\r\n }\r\n catch (e) {\r\n // Don't let 1 failing handler break all others\r\n // TODO: Add some form of error reporting (i.e. Call any registered JS error handler so the error is reported)\r\n }\r\n });\r\n};\r\n/**\r\n * @internal\r\n * @ignore\r\n * Return an item processor that processes all of the pending items synchronously\r\n * @return An item processor\r\n */\r\nexport function syncItemProcessor() {\r\n return _processPendingItems;\r\n}\r\n/**\r\n * @internal\r\n * @ignore\r\n * Return an item processor that processes all of the pending items asynchronously using the optional timeout.\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n * @return An item processor\r\n */\r\nexport function timeoutItemProcessor(timeout) {\r\n var callbackTimeout = isNumber(timeout) ? timeout : 0;\r\n return function (pending) {\r\n scheduleTimeout(function () {\r\n _processPendingItems(pending);\r\n }, callbackTimeout);\r\n };\r\n}\r\n/**\r\n * @internal\r\n * @ignore\r\n * Return an item processor that processes all of the pending items using an idle callback (if available) or based on\r\n * a timeout (when `requestIdenCallback` is not supported) using the optional timeout.\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n * @return An item processor\r\n */\r\nexport function idleItemProcessor(timeout) {\r\n var options;\r\n if (timeout >= 0) {\r\n options = {\r\n timeout: +timeout\r\n };\r\n }\r\n return function (pending) {\r\n scheduleIdleCallback(function (deadline) {\r\n _processPendingItems(pending);\r\n }, options);\r\n };\r\n}\r\n//# sourceMappingURL=itemProcessor.js.map","/*\r\n * @nevware21/ts-async\r\n * https://github.com/nevware21/ts-async\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { arrForEach, isNumber, scheduleIdleCallback, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { IPromise } from \"../interfaces/IPromise\";\r\nimport { PromiseExecutor } from \"../interfaces/types\";\r\n\r\nexport type PromisePendingProcessor = (pending: PromisePendingFn[]) => void;\r\nexport type PromisePendingFn = () => void;\r\nexport type PromiseCreatorFn = (newExecutor: PromiseExecutor, ...extraArgs: any) => IPromise;\r\n\r\nconst _processPendingItems = (pending: PromisePendingFn[]) => {\r\n arrForEach(pending, (fn: PromisePendingFn) => {\r\n try {\r\n fn();\r\n } catch (e) {\r\n // Don't let 1 failing handler break all others\r\n // TODO: Add some form of error reporting (i.e. Call any registered JS error handler so the error is reported)\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Return an item processor that processes all of the pending items synchronously\r\n * @return An item processor\r\n */\r\nexport function syncItemProcessor(): (pending: PromisePendingFn[]) => void {\r\n return _processPendingItems;\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Return an item processor that processes all of the pending items asynchronously using the optional timeout.\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n * @return An item processor\r\n */\r\nexport function timeoutItemProcessor(timeout?: number): (pending: PromisePendingFn[]) => void {\r\n let callbackTimeout = isNumber(timeout) ? timeout : 0;\r\n\r\n return (pending: PromisePendingFn[]) => {\r\n scheduleTimeout(() => {\r\n _processPendingItems(pending);\r\n }, callbackTimeout);\r\n }\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Return an item processor that processes all of the pending items using an idle callback (if available) or based on\r\n * a timeout (when `requestIdenCallback` is not supported) using the optional timeout.\r\n * @param timeout - Optional timeout to wait before processing the items, defaults to zero.\r\n * @return An item processor\r\n */\r\nexport function idleItemProcessor(timeout?: number): (pending: PromisePendingFn[]) => void {\r\n let options: any;\r\n if (timeout >= 0) {\r\n options = {\r\n timeout: +timeout\r\n };\r\n }\r\n\r\n return (pending: PromisePendingFn[]) => {\r\n scheduleIdleCallback((deadline: IdleDeadline) => {\r\n _processPendingItems(pending);\r\n }, options);\r\n };\r\n}","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { isDefined, isUndefined } from \"../helpers/base\";\r\nimport { elapsedTime, perfNow } from \"../helpers/perf\";\r\nimport { safeGetLazy } from \"../helpers/safe_lazy\";\r\nimport { _createTimerHandler } from \"./handler\";\r\nimport { scheduleTimeout } from \"./timeout\";\r\nvar _hasIdleCallback;\r\nvar _defaultIdleTimeout = 100;\r\nvar _maxExecutionTime = 50;\r\n/**\r\n * Identifies if the runtime supports the `requestIdleCallback` API.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n * @group Environment\r\n *\r\n * @returns True if the runtime supports `requestIdleCallback` otherwise false.\r\n * @example\r\n * ```ts\r\n * let nativeIdleTimeouts = hasIdleCallback();\r\n * // true === idle timeouts are supported by the runtime otherwise false and the {@linke scheduleIdleCallback}\r\n * will use `setTimeout` instead.\r\n * ```\r\n */\r\nexport function hasIdleCallback() {\r\n !_hasIdleCallback && (_hasIdleCallback = safeGetLazy(function () { return isDefined(requestIdleCallback); }, false));\r\n return !!(_hasIdleCallback.v ? requestIdleCallback : false);\r\n}\r\n/**\r\n * Set the idle timeout fallback timeout which is used when the runtime does not support `requestIdleCallback`\r\n * the default idle timeout will be used for the scheduled timer. Defaults to 100ms\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @param timeout - The time in milliseconds that the timer should wait before calling the idle function.\r\n */\r\nexport function setDefaultIdleTimeout(timeout) {\r\n _defaultIdleTimeout = timeout;\r\n}\r\n/**\r\n * Set the idle timeout fallback simulated maximum execution time, used when the runtime doesn't\r\n * support `requestIdleTimeout` to simulate the [IdleDeadline](https://w3c.github.io/requestidlecallback/#dom-idledeadline)\r\n * `timeRemaining` value.\r\n * This value is used as the base time of the [IdleDeadline.timeRemaining](https://developer.mozilla.org/en-US/docs/Web/API/IdleDeadline/timeRemaining)\r\n * less the start time the callback was called. Defaults to 50ms.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @param maxTime - The maximum execution time in milliseconds.\r\n */\r\nexport function setDefaultMaxExecutionTime(maxTime) {\r\n _maxExecutionTime = maxTime;\r\n}\r\n/**\r\n * Queues a function to be called during a browser's idle periods. This enables developers to\r\n * perform background and low priority work on the main event loop, without impacting latency-critical\r\n * events such as animation and input response. Functions are generally called in first-in-first-out\r\n * order; however, callbacks which have a timeout specified may be called out-of-order if necessary\r\n * in order to run them before the timeout elapses.\r\n *\r\n * You can call scheduledleCallback() within an idle callback function to schedule another callback to\r\n * take place no sooner than the next pass through the event loop.\r\n *\r\n * If the runtime does not support the [requestIdleCallback](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback)\r\n * it will fallback to use `setTimeout` with either the provided timeout or the current default idle\r\n * timeout, which can be set via {@link setDefaultIdleTimeout}. It will always supply a deadline which\r\n * indicates that the request timed out.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @param callback - A reference to a function that should be called in the near future, when the\r\n * event loop is idle. The callback function is passed an [IdleDeadline](https://w3c.github.io/requestidlecallback/#dom-idledeadline)\r\n * object describing the amount of time available and whether or not the callback has been run because\r\n * the timeout period expired.\r\n * @param options - Contains optional configuration parameters. Currently only one property is defined:\r\n * `timeout` If the number of milliseconds represented by this parameter has elapsed and the callback\r\n * has not already been called, then a task to execute the callback is queued in the event loop (even\r\n * if doing so risks causing a negative performance impact). timeout must be a positive value or it\r\n * is ignored.\r\n * @returns A handle which can be used to cancel the callback by passing it into the `cancelIdleCallback()`\r\n * method.\r\n * @example\r\n * ```ts\r\n * let idleCalled = false;\r\n * let idleTimedOut = false;\r\n * let theIdleTimer = scheduleIdleCallback((idleDeadline: IdleDeadline) => {\r\n * // This callback will be called when the system is idle (via requestIdleCallback) or after the provided timeout 100ms\r\n * idleCalled = true;\r\n * idleTimedOut = idleDeadline?.didTimeout;\r\n * while ((idleDeadline.timeRemaining() > 0 || deadline.didTimeout)) {\r\n * // Do some background operations while there is time remaining or we timed out\r\n * // Unlike interval timers this callback will NOT be called again unless you call \"refresh\"\r\n * // to restart it or create a new idle timer\r\n * }\r\n * }, 100);\r\n *\r\n * // Instead of calling cancelIdleCallback() with the returned value from requestIdleCallback() the returned\r\n * // handler instance can be used instead to cancel the idle timer\r\n * theIdleTimer.cancel();\r\n * theIdleTimer.enabled; // false\r\n *\r\n * // You can start the timer via enabled\r\n * theIdleTimer.enabled = true;\r\n *\r\n * // You can also \"restart\" the timer, whether it has previously triggered not not via the `refresh()`\r\n * theIdleTimer.refresh();\r\n * ```\r\n */\r\nexport function scheduleIdleCallback(callback, options) {\r\n function _createDeadline(timedOut) {\r\n var startTime = perfNow();\r\n return {\r\n didTimeout: timedOut,\r\n timeRemaining: function () {\r\n return _maxExecutionTime - elapsedTime(startTime);\r\n }\r\n };\r\n }\r\n if (hasIdleCallback()) {\r\n var handler_1 = _createTimerHandler(true, function (idleId) {\r\n idleId && cancelIdleCallback(idleId);\r\n return requestIdleCallback(function (deadline) {\r\n handler_1.dn();\r\n callback(deadline || _createDeadline(false));\r\n }, options);\r\n }, function (idleId) {\r\n cancelIdleCallback(idleId);\r\n });\r\n return handler_1.h;\r\n }\r\n var timeout = (options || {}).timeout;\r\n if (isUndefined(timeout)) {\r\n timeout = _defaultIdleTimeout;\r\n }\r\n return scheduleTimeout(function () {\r\n callback(_createDeadline(true));\r\n }, timeout);\r\n}\r\n//# sourceMappingURL=idle.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { isDefined, isUndefined } from \"../helpers/base\";\r\nimport { ILazyValue } from \"../helpers/lazy\";\r\nimport { elapsedTime, perfNow } from \"../helpers/perf\";\r\nimport { safeGetLazy } from \"../helpers/safe_lazy\";\r\nimport { ITimerHandler, _createTimerHandler } from \"./handler\";\r\nimport { scheduleTimeout } from \"./timeout\";\r\n\r\nlet _hasIdleCallback: ILazyValue;\r\nlet _defaultIdleTimeout = 100;\r\nlet _maxExecutionTime = 50;\r\n\r\n/**\r\n * Identifies if the runtime supports the `requestIdleCallback` API.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n * @group Environment\r\n *\r\n * @returns True if the runtime supports `requestIdleCallback` otherwise false.\r\n * @example\r\n * ```ts\r\n * let nativeIdleTimeouts = hasIdleCallback();\r\n * // true === idle timeouts are supported by the runtime otherwise false and the {@linke scheduleIdleCallback}\r\n * will use `setTimeout` instead.\r\n * ```\r\n */\r\nexport function hasIdleCallback(): boolean {\r\n !_hasIdleCallback && (_hasIdleCallback = safeGetLazy(() => isDefined(requestIdleCallback), false));\r\n return !!(_hasIdleCallback.v ? requestIdleCallback : false);\r\n}\r\n\r\n/**\r\n * Set the idle timeout fallback timeout which is used when the runtime does not support `requestIdleCallback`\r\n * the default idle timeout will be used for the scheduled timer. Defaults to 100ms\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @param timeout - The time in milliseconds that the timer should wait before calling the idle function.\r\n */\r\nexport function setDefaultIdleTimeout(timeout: number) {\r\n _defaultIdleTimeout = timeout;\r\n}\r\n\r\n/**\r\n * Set the idle timeout fallback simulated maximum execution time, used when the runtime doesn't\r\n * support `requestIdleTimeout` to simulate the [IdleDeadline](https://w3c.github.io/requestidlecallback/#dom-idledeadline)\r\n * `timeRemaining` value.\r\n * This value is used as the base time of the [IdleDeadline.timeRemaining](https://developer.mozilla.org/en-US/docs/Web/API/IdleDeadline/timeRemaining)\r\n * less the start time the callback was called. Defaults to 50ms.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @param maxTime - The maximum execution time in milliseconds.\r\n */\r\nexport function setDefaultMaxExecutionTime(maxTime: number) {\r\n _maxExecutionTime = maxTime;\r\n}\r\n\r\n/**\r\n * Queues a function to be called during a browser's idle periods. This enables developers to\r\n * perform background and low priority work on the main event loop, without impacting latency-critical\r\n * events such as animation and input response. Functions are generally called in first-in-first-out\r\n * order; however, callbacks which have a timeout specified may be called out-of-order if necessary\r\n * in order to run them before the timeout elapses.\r\n *\r\n * You can call scheduledleCallback() within an idle callback function to schedule another callback to\r\n * take place no sooner than the next pass through the event loop.\r\n *\r\n * If the runtime does not support the [requestIdleCallback](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback)\r\n * it will fallback to use `setTimeout` with either the provided timeout or the current default idle\r\n * timeout, which can be set via {@link setDefaultIdleTimeout}. It will always supply a deadline which\r\n * indicates that the request timed out.\r\n *\r\n * @since 0.4.4\r\n * @group Timer\r\n *\r\n * @param callback - A reference to a function that should be called in the near future, when the\r\n * event loop is idle. The callback function is passed an [IdleDeadline](https://w3c.github.io/requestidlecallback/#dom-idledeadline)\r\n * object describing the amount of time available and whether or not the callback has been run because\r\n * the timeout period expired.\r\n * @param options - Contains optional configuration parameters. Currently only one property is defined:\r\n * `timeout` If the number of milliseconds represented by this parameter has elapsed and the callback\r\n * has not already been called, then a task to execute the callback is queued in the event loop (even\r\n * if doing so risks causing a negative performance impact). timeout must be a positive value or it\r\n * is ignored.\r\n * @returns A handle which can be used to cancel the callback by passing it into the `cancelIdleCallback()`\r\n * method.\r\n * @example\r\n * ```ts\r\n * let idleCalled = false;\r\n * let idleTimedOut = false;\r\n * let theIdleTimer = scheduleIdleCallback((idleDeadline: IdleDeadline) => {\r\n * // This callback will be called when the system is idle (via requestIdleCallback) or after the provided timeout 100ms\r\n * idleCalled = true;\r\n * idleTimedOut = idleDeadline?.didTimeout;\r\n * while ((idleDeadline.timeRemaining() > 0 || deadline.didTimeout)) {\r\n * // Do some background operations while there is time remaining or we timed out\r\n * // Unlike interval timers this callback will NOT be called again unless you call \"refresh\"\r\n * // to restart it or create a new idle timer\r\n * }\r\n * }, 100);\r\n *\r\n * // Instead of calling cancelIdleCallback() with the returned value from requestIdleCallback() the returned\r\n * // handler instance can be used instead to cancel the idle timer\r\n * theIdleTimer.cancel();\r\n * theIdleTimer.enabled; // false\r\n *\r\n * // You can start the timer via enabled\r\n * theIdleTimer.enabled = true;\r\n *\r\n * // You can also \"restart\" the timer, whether it has previously triggered not not via the `refresh()`\r\n * theIdleTimer.refresh();\r\n * ```\r\n */\r\nexport function scheduleIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): ITimerHandler {\r\n function _createDeadline(timedOut: boolean) {\r\n let startTime = perfNow();\r\n return {\r\n didTimeout: timedOut,\r\n timeRemaining: () => {\r\n return _maxExecutionTime - elapsedTime(startTime);\r\n }\r\n };\r\n }\r\n\r\n if (hasIdleCallback()) {\r\n let handler = _createTimerHandler(true, (idleId: number) => {\r\n idleId && cancelIdleCallback(idleId);\r\n return requestIdleCallback((deadline: IdleDeadline) => {\r\n handler.dn();\r\n callback(deadline || _createDeadline(false));\r\n }, options);\r\n }, (idleId: number) => {\r\n cancelIdleCallback(idleId);\r\n });\r\n\r\n return handler.h;\r\n }\r\n\r\n let timeout = (options || {}).timeout;\r\n if (isUndefined(timeout)) {\r\n timeout = _defaultIdleTimeout;\r\n }\r\n \r\n return scheduleTimeout(() => {\r\n callback(_createDeadline(true));\r\n }, timeout);\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { LENGTH } from \"../internal/constants\";\r\nimport { _unwrapProp } from \"../internal/unwrapFunction\";\r\n/**\r\n * Helper to return the length value of an object, this will return the value\r\n * of the \"length\" property. Generally used to return the length of a string or array.\r\n *\r\n * @since 0.4.2\r\n * @group Array\r\n * @group String\r\n * @group String\r\n * @group Array\r\n * @group Object\r\n * @param value - The value to return the length property from, must contain a `length` property\r\n * @example\r\n * ```ts\r\n * getLength(\"\"); // returns 0\r\n * getLength(\"Hello World\"); // returns 11\r\n * getLength([]); // returns 0;\r\n * getLength([0, 1, 2, 3]); // returns 4;\r\n * getLength({ length: 42}); // returns 42\r\n * getLength({ length: () => 53; }); // returns the function that if called would return 53\r\n * ```\r\n */\r\nexport var getLength = _unwrapProp(LENGTH);\r\n//# sourceMappingURL=length.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { LENGTH } from \"../internal/constants\";\r\nimport { _unwrapProp } from \"../internal/unwrapFunction\";\r\n\r\n/**\r\n * Interface to identify that an object contains the length property used as a type\r\n * constraint for {@link getLength}\r\n *\r\n * @since 0.4.2\r\n * @group String\r\n * @group Array\r\n * @group Object\r\n */\r\nexport interface IGetLength {\r\n\r\n /**\r\n * Identifies the property that returns the length of the instance\r\n */\r\n length: unknown;\r\n}\r\n\r\n/**\r\n * Helper to return the length value of an object, this will return the value\r\n * of the \"length\" property. Generally used to return the length of a string or array.\r\n *\r\n * @since 0.4.2\r\n * @group Array\r\n * @group String\r\n * @group String\r\n * @group Array\r\n * @group Object\r\n * @param value - The value to return the length property from, must contain a `length` property\r\n * @example\r\n * ```ts\r\n * getLength(\"\"); // returns 0\r\n * getLength(\"Hello World\"); // returns 11\r\n * getLength([]); // returns 0;\r\n * getLength([0, 1, 2, 3]); // returns 4;\r\n * getLength({ length: 42}); // returns 42\r\n * getLength({ length: () => 53; }); // returns the function that if called would return 53\r\n * ```\r\n */\r\nexport const getLength: (value: T) => T[\"length\"] = _unwrapProp(LENGTH);\r\n","import { __assign } from \"tslib\";\r\nimport { CtxTagKeys, Data, Envelope, Event, Exception, HttpMethod, Metric, PageView, PageViewPerformance, RemoteDependencyData, SampleRate, Trace, dataSanitizeString } from \"@microsoft/applicationinsights-common\";\r\nimport { _throwInternal, _warnToConsole, getJSON, hasJSON, isNullOrUndefined, isNumber, isString, isTruthy, objForEachKey, optimizeObject, setValue, toISOString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { STR_DURATION } from \"./InternalConstants\";\r\nimport { _DYN_DATA, _DYN_DATA_TYPE, _DYN_DEVICE_TYPE, _DYN_ENVELOPE_TYPE, _DYN_LENGTH, _DYN_MEASUREMENTS, _DYN_NAME, _DYN_STRINGIFY, _DYN_TAGS, _DYN_TO_STRING, _DYN_TRACE_ID } from \"./__DynamicConstants\";\r\n// these two constants are used to filter out properties not needed when trying to extract custom properties and measurements from the incoming payload\r\nvar strBaseType = \"baseType\";\r\nvar strBaseData = \"baseData\";\r\nvar strProperties = \"properties\";\r\nvar strTrue = \"true\";\r\nfunction _setValueIf(target, field, value) {\r\n return setValue(target, field, value, isTruthy);\r\n}\r\n/*\r\n * Maps Part A data from CS 4.0\r\n */\r\nfunction _extractPartAExtensions(logger, item, env) {\r\n // todo: switch to keys from common in this method\r\n var envTags = env[_DYN_TAGS /* @min:%2etags */] = env[_DYN_TAGS /* @min:%2etags */] || {};\r\n var itmExt = item.ext = item.ext || {};\r\n var itmTags = item[_DYN_TAGS /* @min:%2etags */] = item[_DYN_TAGS /* @min:%2etags */] || [];\r\n var extUser = itmExt.user;\r\n if (extUser) {\r\n _setValueIf(envTags, CtxTagKeys.userAuthUserId, extUser.authId);\r\n _setValueIf(envTags, CtxTagKeys.userId, extUser.id || extUser.localId);\r\n }\r\n var extApp = itmExt.app;\r\n if (extApp) {\r\n _setValueIf(envTags, CtxTagKeys.sessionId, extApp.sesId);\r\n }\r\n var extDevice = itmExt.device;\r\n if (extDevice) {\r\n _setValueIf(envTags, CtxTagKeys.deviceId, extDevice.id || extDevice.localId);\r\n _setValueIf(envTags, CtxTagKeys[_DYN_DEVICE_TYPE /* @min:%2edeviceType */], extDevice.deviceClass);\r\n _setValueIf(envTags, CtxTagKeys.deviceIp, extDevice.ip);\r\n _setValueIf(envTags, CtxTagKeys.deviceModel, extDevice.model);\r\n _setValueIf(envTags, CtxTagKeys[_DYN_DEVICE_TYPE /* @min:%2edeviceType */], extDevice[_DYN_DEVICE_TYPE /* @min:%2edeviceType */]);\r\n }\r\n var web = item.ext.web;\r\n if (web) {\r\n _setValueIf(envTags, CtxTagKeys.deviceLanguage, web.browserLang);\r\n _setValueIf(envTags, CtxTagKeys.deviceBrowserVersion, web.browserVer);\r\n _setValueIf(envTags, CtxTagKeys.deviceBrowser, web.browser);\r\n var envData = env[_DYN_DATA /* @min:%2edata */] = env[_DYN_DATA /* @min:%2edata */] || {};\r\n var envBaseData = envData[strBaseData] = envData[strBaseData] || {};\r\n var envProps = envBaseData[strProperties] = envBaseData[strProperties] || {};\r\n _setValueIf(envProps, \"domain\", web.domain);\r\n _setValueIf(envProps, \"isManual\", web.isManual ? strTrue : null);\r\n _setValueIf(envProps, \"screenRes\", web.screenRes);\r\n _setValueIf(envProps, \"userConsent\", web.userConsent ? strTrue : null);\r\n }\r\n var extOs = itmExt.os;\r\n if (extOs) {\r\n _setValueIf(envTags, CtxTagKeys.deviceOS, extOs[_DYN_NAME /* @min:%2ename */]);\r\n }\r\n // No support for mapping Trace.traceState to 2.0 as it is currently empty\r\n var extTrace = itmExt.trace;\r\n if (extTrace) {\r\n _setValueIf(envTags, CtxTagKeys.operationParentId, extTrace.parentID);\r\n _setValueIf(envTags, CtxTagKeys.operationName, dataSanitizeString(logger, extTrace[_DYN_NAME /* @min:%2ename */]));\r\n _setValueIf(envTags, CtxTagKeys.operationId, extTrace[_DYN_TRACE_ID /* @min:%2etraceID */]);\r\n }\r\n // Sample 4.0 schema\r\n // {\r\n // \"time\" : \"2018-09-05T22:51:22.4936Z\",\r\n // \"name\" : \"MetricWithNamespace\",\r\n // \"iKey\" : \"ABC-5a4cbd20-e601-4ef5-a3c6-5d6577e4398e\",\r\n // \"ext\": { \"cloud\": {\r\n // \"role\": \"WATSON3\",\r\n // \"roleInstance\": \"CO4AEAP00000260\"\r\n // },\r\n // \"device\": {}, \"correlation\": {} },\r\n // \"tags\": [\r\n // { \"amazon.region\" : \"east2\" },\r\n // { \"os.expid\" : \"wp:02df239\" }\r\n // ]\r\n // }\r\n var tgs = {};\r\n // deals with tags.push({object})\r\n for (var i = itmTags[_DYN_LENGTH /* @min:%2elength */] - 1; i >= 0; i--) {\r\n var tg = itmTags[i];\r\n objForEachKey(tg, function (key, value) {\r\n tgs[key] = value;\r\n });\r\n itmTags.splice(i, 1);\r\n }\r\n // deals with tags[key]=value (and handles hasOwnProperty)\r\n objForEachKey(itmTags, function (tg, value) {\r\n tgs[tg] = value;\r\n });\r\n var theTags = __assign(__assign({}, envTags), tgs);\r\n if (!theTags[CtxTagKeys.internalSdkVersion]) {\r\n // Append a version in case it is not already set\r\n theTags[CtxTagKeys.internalSdkVersion] = dataSanitizeString(logger, \"javascript:\".concat(EnvelopeCreator.Version), 64);\r\n }\r\n env[_DYN_TAGS /* @min:%2etags */] = optimizeObject(theTags);\r\n}\r\nfunction _extractPropsAndMeasurements(data, properties, measurements) {\r\n if (!isNullOrUndefined(data)) {\r\n objForEachKey(data, function (key, value) {\r\n if (isNumber(value)) {\r\n measurements[key] = value;\r\n }\r\n else if (isString(value)) {\r\n properties[key] = value;\r\n }\r\n else if (hasJSON()) {\r\n properties[key] = getJSON()[_DYN_STRINGIFY /* @min:%2estringify */](value);\r\n }\r\n });\r\n }\r\n}\r\nfunction _convertPropsUndefinedToCustomDefinedValue(properties, customUndefinedValue) {\r\n if (!isNullOrUndefined(properties)) {\r\n objForEachKey(properties, function (key, value) {\r\n properties[key] = value || customUndefinedValue;\r\n });\r\n }\r\n}\r\n// TODO: Do we want this to take logger as arg or use this._logger as nonstatic?\r\nfunction _createEnvelope(logger, envelopeType, telemetryItem, data) {\r\n var envelope = new Envelope(logger, data, envelopeType);\r\n _setValueIf(envelope, \"sampleRate\", telemetryItem[SampleRate]);\r\n if ((telemetryItem[strBaseData] || {}).startTime) {\r\n envelope.time = toISOString(telemetryItem[strBaseData].startTime);\r\n }\r\n envelope.iKey = telemetryItem.iKey;\r\n var iKeyNoDashes = telemetryItem.iKey.replace(/-/g, \"\");\r\n envelope[_DYN_NAME /* @min:%2ename */] = envelope[_DYN_NAME /* @min:%2ename */].replace(\"{0}\", iKeyNoDashes);\r\n // extract all extensions from ctx\r\n _extractPartAExtensions(logger, telemetryItem, envelope);\r\n // loop through the envelope tags (extension of Part A) and pick out the ones that should go in outgoing envelope tags\r\n telemetryItem[_DYN_TAGS /* @min:%2etags */] = telemetryItem[_DYN_TAGS /* @min:%2etags */] || [];\r\n return optimizeObject(envelope);\r\n}\r\nfunction EnvelopeCreatorInit(logger, telemetryItem) {\r\n if (isNullOrUndefined(telemetryItem[strBaseData])) {\r\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 46 /* _eInternalMessageId.TelemetryEnvelopeInvalid */, \"telemetryItem.baseData cannot be null.\");\r\n }\r\n}\r\nexport var EnvelopeCreator = {\r\n Version: '3.0.2'\r\n};\r\nexport function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\r\n EnvelopeCreatorInit(logger, telemetryItem);\r\n var customMeasurements = telemetryItem[strBaseData][_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\r\n var customProperties = telemetryItem[strBaseData][strProperties] || {};\r\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], customProperties, customMeasurements);\r\n if (!isNullOrUndefined(customUndefinedValue)) {\r\n _convertPropsUndefinedToCustomDefinedValue(customProperties, customUndefinedValue);\r\n }\r\n var bd = telemetryItem[strBaseData];\r\n if (isNullOrUndefined(bd)) {\r\n _warnToConsole(logger, \"Invalid input for dependency data\");\r\n return null;\r\n }\r\n var method = bd[strProperties] && bd[strProperties][HttpMethod] ? bd[strProperties][HttpMethod] : \"GET\";\r\n var remoteDepData = new RemoteDependencyData(logger, bd.id, bd.target, bd[_DYN_NAME /* @min:%2ename */], bd[STR_DURATION /* @min:%2eduration */], bd.success, bd.responseCode, method, bd.type, bd.correlationContext, customProperties, customMeasurements);\r\n var data = new Data(RemoteDependencyData[_DYN_DATA_TYPE /* @min:%2edataType */], remoteDepData);\r\n return _createEnvelope(logger, RemoteDependencyData[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\r\n}\r\nexport function EventEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\r\n EnvelopeCreatorInit(logger, telemetryItem);\r\n var customProperties = {};\r\n var customMeasurements = {};\r\n if (telemetryItem[strBaseType] !== Event[_DYN_DATA_TYPE /* @min:%2edataType */]) {\r\n customProperties[\"baseTypeSource\"] = telemetryItem[strBaseType]; // save the passed in base type as a property\r\n }\r\n if (telemetryItem[strBaseType] === Event[_DYN_DATA_TYPE /* @min:%2edataType */]) { // take collection\r\n customProperties = telemetryItem[strBaseData][strProperties] || {};\r\n customMeasurements = telemetryItem[strBaseData][_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\r\n }\r\n else { // if its not a known type, convert to custom event\r\n if (telemetryItem[strBaseData]) {\r\n _extractPropsAndMeasurements(telemetryItem[strBaseData], customProperties, customMeasurements);\r\n }\r\n }\r\n // Extract root level properties from part C telemetryItem.data\r\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], customProperties, customMeasurements);\r\n if (!isNullOrUndefined(customUndefinedValue)) {\r\n _convertPropsUndefinedToCustomDefinedValue(customProperties, customUndefinedValue);\r\n }\r\n var eventName = telemetryItem[strBaseData][_DYN_NAME /* @min:%2ename */];\r\n var eventData = new Event(logger, eventName, customProperties, customMeasurements);\r\n var data = new Data(Event[_DYN_DATA_TYPE /* @min:%2edataType */], eventData);\r\n return _createEnvelope(logger, Event[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\r\n}\r\nexport function ExceptionEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\r\n EnvelopeCreatorInit(logger, telemetryItem);\r\n // Extract root level properties from part C telemetryItem.data\r\n var customMeasurements = telemetryItem[strBaseData][_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\r\n var customProperties = telemetryItem[strBaseData][strProperties] || {};\r\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], customProperties, customMeasurements);\r\n if (!isNullOrUndefined(customUndefinedValue)) {\r\n _convertPropsUndefinedToCustomDefinedValue(customProperties, customUndefinedValue);\r\n }\r\n var bd = telemetryItem[strBaseData];\r\n var exData = Exception.CreateFromInterface(logger, bd, customProperties, customMeasurements);\r\n var data = new Data(Exception[_DYN_DATA_TYPE /* @min:%2edataType */], exData);\r\n return _createEnvelope(logger, Exception[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\r\n}\r\nexport function MetricEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\r\n EnvelopeCreatorInit(logger, telemetryItem);\r\n var baseData = telemetryItem[strBaseData];\r\n var props = baseData[strProperties] || {};\r\n var measurements = baseData[_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\r\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], props, measurements);\r\n if (!isNullOrUndefined(customUndefinedValue)) {\r\n _convertPropsUndefinedToCustomDefinedValue(props, customUndefinedValue);\r\n }\r\n var baseMetricData = new Metric(logger, baseData[_DYN_NAME /* @min:%2ename */], baseData.average, baseData.sampleCount, baseData.min, baseData.max, baseData.stdDev, props, measurements);\r\n var data = new Data(Metric[_DYN_DATA_TYPE /* @min:%2edataType */], baseMetricData);\r\n return _createEnvelope(logger, Metric[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\r\n}\r\nexport function PageViewEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\r\n EnvelopeCreatorInit(logger, telemetryItem);\r\n // Since duration is not part of the domain properties in Common Schema, extract it from part C\r\n var duration;\r\n var baseData = telemetryItem[strBaseData];\r\n if (!isNullOrUndefined(baseData) &&\r\n !isNullOrUndefined(baseData[strProperties]) &&\r\n !isNullOrUndefined(baseData[strProperties][STR_DURATION])) { // from part B properties\r\n duration = baseData[strProperties][STR_DURATION];\r\n delete baseData[strProperties][STR_DURATION];\r\n }\r\n else if (!isNullOrUndefined(telemetryItem[_DYN_DATA /* @min:%2edata */]) &&\r\n !isNullOrUndefined(telemetryItem[_DYN_DATA /* @min:%2edata */][STR_DURATION])) { // from custom properties\r\n duration = telemetryItem[_DYN_DATA /* @min:%2edata */][STR_DURATION];\r\n delete telemetryItem[_DYN_DATA /* @min:%2edata */][STR_DURATION];\r\n }\r\n var bd = telemetryItem[strBaseData];\r\n // special case: pageview.id is grabbed from current operation id. Analytics plugin is decoupled from properties plugin, so this is done here instead. This can be made a default telemetry intializer instead if needed to be decoupled from channel\r\n var currentContextId;\r\n if (((telemetryItem.ext || {}).trace || {})[_DYN_TRACE_ID /* @min:%2etraceID */]) {\r\n currentContextId = telemetryItem.ext.trace[_DYN_TRACE_ID /* @min:%2etraceID */];\r\n }\r\n var id = bd.id || currentContextId;\r\n var name = bd[_DYN_NAME /* @min:%2ename */];\r\n var url = bd.uri;\r\n var properties = bd[strProperties] || {};\r\n var measurements = bd[_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\r\n // refUri is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\r\n if (!isNullOrUndefined(bd.refUri)) {\r\n properties[\"refUri\"] = bd.refUri;\r\n }\r\n // pageType is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\r\n if (!isNullOrUndefined(bd.pageType)) {\r\n properties[\"pageType\"] = bd.pageType;\r\n }\r\n // isLoggedIn is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\r\n if (!isNullOrUndefined(bd.isLoggedIn)) {\r\n properties[\"isLoggedIn\"] = bd.isLoggedIn[_DYN_TO_STRING /* @min:%2etoString */]();\r\n }\r\n // pageTags is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\r\n if (!isNullOrUndefined(bd[strProperties])) {\r\n var pageTags = bd[strProperties];\r\n objForEachKey(pageTags, function (key, value) {\r\n properties[key] = value;\r\n });\r\n }\r\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], properties, measurements);\r\n if (!isNullOrUndefined(customUndefinedValue)) {\r\n _convertPropsUndefinedToCustomDefinedValue(properties, customUndefinedValue);\r\n }\r\n var pageViewData = new PageView(logger, name, url, duration, properties, measurements, id);\r\n var data = new Data(PageView[_DYN_DATA_TYPE /* @min:%2edataType */], pageViewData);\r\n return _createEnvelope(logger, PageView[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\r\n}\r\nexport function PageViewPerformanceEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\r\n EnvelopeCreatorInit(logger, telemetryItem);\r\n var bd = telemetryItem[strBaseData];\r\n var name = bd[_DYN_NAME /* @min:%2ename */];\r\n var url = bd.uri || bd.url;\r\n var properties = bd[strProperties] || {};\r\n var measurements = bd[_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\r\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], properties, measurements);\r\n if (!isNullOrUndefined(customUndefinedValue)) {\r\n _convertPropsUndefinedToCustomDefinedValue(properties, customUndefinedValue);\r\n }\r\n var baseData = new PageViewPerformance(logger, name, url, undefined, properties, measurements, bd);\r\n var data = new Data(PageViewPerformance[_DYN_DATA_TYPE /* @min:%2edataType */], baseData);\r\n return _createEnvelope(logger, PageViewPerformance[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\r\n}\r\nexport function TraceEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\r\n EnvelopeCreatorInit(logger, telemetryItem);\r\n var message = telemetryItem[strBaseData].message;\r\n var severityLevel = telemetryItem[strBaseData].severityLevel;\r\n var props = telemetryItem[strBaseData][strProperties] || {};\r\n var measurements = telemetryItem[strBaseData][_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\r\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], props, measurements);\r\n if (!isNullOrUndefined(customUndefinedValue)) {\r\n _convertPropsUndefinedToCustomDefinedValue(props, customUndefinedValue);\r\n }\r\n var baseData = new Trace(logger, message, severityLevel, props, measurements);\r\n var data = new Data(Trace[_DYN_DATA_TYPE /* @min:%2edataType */], baseData);\r\n return _createEnvelope(logger, Trace[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\r\n}\r\n//# sourceMappingURL=EnvelopeCreator.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// ###################################################################################################################################################\r\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\r\n// ###################################################################################################################################################\r\n// Generally you should only put values that are used more than 2 times and then only if not already exposed as a constant (such as SdkCoreNames)\r\n// as when using \"short\" named values from here they will be will be minified smaller than the SdkCoreNames[eSdkCoreNames.xxxx] value.\r\nexport var STR_DURATION = \"duration\";\r\n//# sourceMappingURL=InternalConstants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_TAGS = \"tags\"; // Count: 17\r\nexport var _DYN_DEVICE_TYPE = \"deviceType\"; // Count: 3\r\nexport var _DYN_DATA = \"data\"; // Count: 13\r\nexport var _DYN_NAME = \"name\"; // Count: 8\r\nexport var _DYN_TRACE_ID = \"traceID\"; // Count: 5\r\nexport var _DYN_LENGTH = \"length\"; // Count: 36\r\nexport var _DYN_STRINGIFY = \"stringify\"; // Count: 5\r\nexport var _DYN_MEASUREMENTS = \"measurements\"; // Count: 7\r\nexport var _DYN_DATA_TYPE = \"dataType\"; // Count: 10\r\nexport var _DYN_ENVELOPE_TYPE = \"envelopeType\"; // Count: 7\r\nexport var _DYN_TO_STRING = \"toString\"; // Count: 7\r\nexport var _DYN_ON_LINE = \"onLine\"; // Count: 4\r\nexport var _DYN_IS_ONLINE = \"isOnline\"; // Count: 3\r\nexport var _DYN__GET = \"_get\"; // Count: 5\r\nexport var _DYN_ENQUEUE = \"enqueue\"; // Count: 7\r\nexport var _DYN_COUNT = \"count\"; // Count: 6\r\nexport var _DYN_EVENTS_LIMIT_IN_MEM = \"eventsLimitInMem\"; // Count: 2\r\nexport var _DYN_PUSH = \"push\"; // Count: 6\r\nexport var _DYN_EMIT_LINE_DELIMITED_0 = \"emitLineDelimitedJson\"; // Count: 3\r\nexport var _DYN_CLEAR = \"clear\"; // Count: 7\r\nexport var _DYN_BATCH_PAYLOADS = \"batchPayloads\"; // Count: 5\r\nexport var _DYN_CREATE_NEW = \"createNew\"; // Count: 3\r\nexport var _DYN_MARK_AS_SENT = \"markAsSent\"; // Count: 7\r\nexport var _DYN_CLEAR_SENT = \"clearSent\"; // Count: 5\r\nexport var _DYN_BUFFER_OVERRIDE = \"bufferOverride\"; // Count: 3\r\nexport var _DYN__BUFFER__KEY = \"BUFFER_KEY\"; // Count: 5\r\nexport var _DYN__SENT__BUFFER__KEY = \"SENT_BUFFER_KEY\"; // Count: 8\r\nexport var _DYN__MAX__BUFFER__SIZE = \"MAX_BUFFER_SIZE\"; // Count: 5\r\nexport var _DYN_TRIGGER_SEND = \"triggerSend\"; // Count: 5\r\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 16\r\nexport var _DYN__SENDER = \"_sender\"; // Count: 5\r\nexport var _DYN_CUSTOM_HEADERS = \"customHeaders\"; // Count: 3\r\nexport var _DYN_MAX_BATCH_SIZE_IN_BY1 = \"maxBatchSizeInBytes\"; // Count: 2\r\nexport var _DYN_ONUNLOAD_DISABLE_BEA2 = \"onunloadDisableBeacon\"; // Count: 2\r\nexport var _DYN_IS_BEACON_API_DISABL3 = \"isBeaconApiDisabled\"; // Count: 3\r\nexport var _DYN_ENABLE_SESSION_STORA4 = \"enableSessionStorageBuffer\"; // Count: 2\r\nexport var _DYN__BUFFER = \"_buffer\"; // Count: 11\r\nexport var _DYN_INSTRUMENTATION_KEY = \"instrumentationKey\"; // Count: 2\r\nexport var _DYN_DISABLE_XHR = \"disableXhr\"; // Count: 5\r\nexport var _DYN_ONUNLOAD_DISABLE_FET5 = \"onunloadDisableFetch\"; // Count: 2\r\nexport var _DYN_CONVERT_UNDEFINED = \"convertUndefined\"; // Count: 2\r\nexport var _DYN_MAX_BATCH_INTERVAL = \"maxBatchInterval\"; // Count: 2\r\nexport var _DYN_BASE_TYPE = \"baseType\"; // Count: 4\r\nexport var _DYN_SAMPLE_RATE = \"sampleRate\"; // Count: 4\r\nexport var _DYN__XHR_READY_STATE_CHA6 = \"_xhrReadyStateChange\"; // Count: 2\r\nexport var _DYN__ON_ERROR = \"_onError\"; // Count: 11\r\nexport var _DYN__ON_PARTIAL_SUCCESS = \"_onPartialSuccess\"; // Count: 3\r\nexport var _DYN__ON_SUCCESS = \"_onSuccess\"; // Count: 6\r\nexport var _DYN_ITEMS_ACCEPTED = \"itemsAccepted\"; // Count: 5\r\nexport var _DYN_ITEMS_RECEIVED = \"itemsReceived\"; // Count: 6\r\nexport var _DYN_SET_REQUEST_HEADER = \"setRequestHeader\"; // Count: 3\r\nexport var _DYN_EVENTS_SEND_REQUEST = \"eventsSendRequest\"; // Count: 2\r\nexport var _DYN_GET_SAMPLING_SCORE = \"getSamplingScore\"; // Count: 2\r\nexport var _DYN_GET_HASH_CODE_SCORE = \"getHashCodeScore\"; // Count: 4\r\n//# sourceMappingURL=__DynamicConstants.js.map","import { createUniqueNamespace, eventOff, eventOn, getDocument, getNavigator, getWindow, isNullOrUndefined, isUndefined, mergeEvtNamespace } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_IS_ONLINE, _DYN_ON_LINE } from \"./__DynamicConstants\";\r\nfunction _disableEvents(target, evtNamespace) {\r\n eventOff(target, null, null, evtNamespace);\r\n}\r\n/**\r\n * Create a new OfflineListener instance to monitor browser online / offline events\r\n * @param parentEvtNamespace - The parent event namespace to append to any specific events for this instance\r\n */\r\nexport function createOfflineListener(parentEvtNamespace) {\r\n var _a;\r\n var _document = getDocument();\r\n var _navigator = getNavigator(); // Gets the window.navigator or workerNavigator depending on the global\r\n var _isListening = false;\r\n var _onlineStatus = true;\r\n var _evtNamespace = mergeEvtNamespace(createUniqueNamespace(\"OfflineListener\"), parentEvtNamespace);\r\n try {\r\n if (_enableEvents(getWindow())) {\r\n _isListening = true;\r\n }\r\n if (_document) {\r\n // Also attach to the document.body or document\r\n var target = _document.body || _document;\r\n if (target.ononline) {\r\n if (_enableEvents(target)) {\r\n _isListening = true;\r\n }\r\n }\r\n }\r\n if (_isListening) {\r\n // We are listening to events so lets set the current status rather than assuming we are online #1538\r\n if (_navigator && !isNullOrUndefined(_navigator[_DYN_ON_LINE /* @min:%2eonLine */])) { // navigator.onLine is undefined in react-native\r\n _onlineStatus = _navigator[_DYN_ON_LINE /* @min:%2eonLine */];\r\n }\r\n }\r\n }\r\n catch (e) {\r\n // this makes react-native less angry\r\n _isListening = false;\r\n }\r\n function _enableEvents(target) {\r\n var enabled = false;\r\n if (target) {\r\n enabled = eventOn(target, \"online\", _setOnline, _evtNamespace);\r\n if (enabled) {\r\n eventOn(target, \"offline\", _setOffline, _evtNamespace);\r\n }\r\n }\r\n return enabled;\r\n }\r\n function _setOnline() {\r\n _onlineStatus = true;\r\n }\r\n function _setOffline() {\r\n _onlineStatus = false;\r\n }\r\n function _isOnline() {\r\n var result = true;\r\n if (_isListening) {\r\n result = _onlineStatus;\r\n }\r\n else if (_navigator && !isNullOrUndefined(_navigator[_DYN_ON_LINE /* @min:%2eonLine */])) { // navigator.onLine is undefined in react-native\r\n result = _navigator[_DYN_ON_LINE /* @min:%2eonLine */];\r\n }\r\n return result;\r\n }\r\n function _unload() {\r\n var win = getWindow();\r\n if (win && _isListening) {\r\n _disableEvents(win, _evtNamespace);\r\n if (_document) {\r\n // Also attach to the document.body or document\r\n var target = _document.body || _document;\r\n if (!isUndefined(target.ononline)) {\r\n _disableEvents(target, _evtNamespace);\r\n }\r\n }\r\n _isListening = false;\r\n }\r\n }\r\n return _a = {},\r\n _a[_DYN_IS_ONLINE /* @min:isOnline */] = _isOnline,\r\n _a.isListening = function () { return _isListening; },\r\n _a.unload = _unload,\r\n _a;\r\n}\r\n//# sourceMappingURL=Offline.js.map","import { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { utlGetSessionStorage, utlSetSessionStorage } from \"@microsoft/applicationinsights-common\";\r\nimport { _throwInternal, arrForEach, arrIndexOf, dumpObj, getExceptionName, getJSON, isArray, isFunction, isString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_BATCH_PAYLOADS, _DYN_BUFFER_OVERRIDE, _DYN_CLEAR, _DYN_CLEAR_SENT, _DYN_COUNT, _DYN_CREATE_NEW, _DYN_EMIT_LINE_DELIMITED_0, _DYN_ENQUEUE, _DYN_EVENTS_LIMIT_IN_MEM, _DYN_LENGTH, _DYN_MARK_AS_SENT, _DYN_PUSH, _DYN_STRINGIFY, _DYN__BUFFER__KEY, _DYN__GET, _DYN__MAX__BUFFER__SIZE, _DYN__SENT__BUFFER__KEY } from \"./__DynamicConstants\";\r\nvar BaseSendBuffer = /** @class */ (function () {\r\n function BaseSendBuffer(logger, config) {\r\n var _buffer = [];\r\n var _bufferFullMessageSent = false;\r\n this[_DYN__GET /* @min:%2e_get */] = function () {\r\n return _buffer;\r\n };\r\n this._set = function (buffer) {\r\n _buffer = buffer;\r\n return _buffer;\r\n };\r\n dynamicProto(BaseSendBuffer, this, function (_self) {\r\n _self[_DYN_ENQUEUE /* @min:%2eenqueue */] = function (payload) {\r\n if (_self[_DYN_COUNT /* @min:%2ecount */]() >= config[_DYN_EVENTS_LIMIT_IN_MEM /* @min:%2eeventsLimitInMem */]) {\r\n // sent internal log only once per page view\r\n if (!_bufferFullMessageSent) {\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 105 /* _eInternalMessageId.InMemoryStorageBufferFull */, \"Maximum in-memory buffer size reached: \" + _self[_DYN_COUNT /* @min:%2ecount */](), true);\r\n _bufferFullMessageSent = true;\r\n }\r\n return;\r\n }\r\n _buffer[_DYN_PUSH /* @min:%2epush */](payload);\r\n };\r\n _self[_DYN_COUNT /* @min:%2ecount */] = function () {\r\n return _buffer[_DYN_LENGTH /* @min:%2elength */];\r\n };\r\n _self.size = function () {\r\n var size = _buffer[_DYN_LENGTH /* @min:%2elength */];\r\n for (var lp = 0; lp < _buffer[_DYN_LENGTH /* @min:%2elength */]; lp++) {\r\n size += _buffer[lp][_DYN_LENGTH /* @min:%2elength */];\r\n }\r\n if (!config[_DYN_EMIT_LINE_DELIMITED_0 /* @min:%2eemitLineDelimitedJson */]) {\r\n size += 2;\r\n }\r\n return size;\r\n };\r\n _self[_DYN_CLEAR /* @min:%2eclear */] = function () {\r\n _buffer = [];\r\n _bufferFullMessageSent = false;\r\n };\r\n _self.getItems = function () {\r\n return _buffer.slice(0);\r\n };\r\n _self[_DYN_BATCH_PAYLOADS /* @min:%2ebatchPayloads */] = function (payload) {\r\n if (payload && payload[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n var batch = config[_DYN_EMIT_LINE_DELIMITED_0 /* @min:%2eemitLineDelimitedJson */] ?\r\n payload.join(\"\\n\") :\r\n \"[\" + payload.join(\",\") + \"]\";\r\n return batch;\r\n }\r\n return null;\r\n };\r\n _self[_DYN_CREATE_NEW /* @min:%2ecreateNew */] = function (newLogger, newConfig, canUseSessionStorage) {\r\n var items = _buffer.slice(0);\r\n newLogger = newLogger || logger;\r\n newConfig = newConfig || {};\r\n var newBuffer = !!canUseSessionStorage ? new SessionStorageSendBuffer(newLogger, newConfig) : new ArraySendBuffer(newLogger, newConfig);\r\n arrForEach(items, function (payload) {\r\n newBuffer[_DYN_ENQUEUE /* @min:%2eenqueue */](payload);\r\n });\r\n return newBuffer;\r\n };\r\n });\r\n }\r\n BaseSendBuffer.prototype.enqueue = function (payload) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n BaseSendBuffer.prototype.count = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return 0;\r\n };\r\n BaseSendBuffer.prototype.size = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return 0;\r\n };\r\n BaseSendBuffer.prototype.clear = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n BaseSendBuffer.prototype.getItems = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n BaseSendBuffer.prototype.batchPayloads = function (payload) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n BaseSendBuffer.prototype.createNew = function (newLogger, newConfig, canUseSessionStorage) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n return BaseSendBuffer;\r\n}());\r\n/*\r\n * An array based send buffer.\r\n */\r\nvar ArraySendBuffer = /** @class */ (function (_super) {\r\n __extends(ArraySendBuffer, _super);\r\n function ArraySendBuffer(logger, config) {\r\n var _this = _super.call(this, logger, config) || this;\r\n dynamicProto(ArraySendBuffer, _this, function (_self, _base) {\r\n _self[_DYN_MARK_AS_SENT /* @min:%2emarkAsSent */] = function (payload) {\r\n _base[_DYN_CLEAR /* @min:%2eclear */]();\r\n };\r\n _self[_DYN_CLEAR_SENT /* @min:%2eclearSent */] = function (payload) {\r\n // not supported\r\n };\r\n });\r\n return _this;\r\n }\r\n ArraySendBuffer.prototype.markAsSent = function (payload) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ArraySendBuffer.prototype.clearSent = function (payload) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return ArraySendBuffer;\r\n}(BaseSendBuffer));\r\nexport { ArraySendBuffer };\r\n/*\r\n * Session storage buffer holds a copy of all unsent items in the browser session storage.\r\n */\r\nvar SessionStorageSendBuffer = /** @class */ (function (_super) {\r\n __extends(SessionStorageSendBuffer, _super);\r\n function SessionStorageSendBuffer(logger, config) {\r\n var _this = _super.call(this, logger, config) || this;\r\n var _bufferFullMessageSent = false;\r\n //Note: should not use config.namePrefix directly, because it will always refers to the latest namePrefix\r\n var _namePrefix = config === null || config === void 0 ? void 0 : config.namePrefix;\r\n var _a = config[_DYN_BUFFER_OVERRIDE /* @min:%2ebufferOverride */] || { getItem: utlGetSessionStorage, setItem: utlSetSessionStorage }, getItem = _a.getItem, setItem = _a.setItem;\r\n dynamicProto(SessionStorageSendBuffer, _this, function (_self, _base) {\r\n var bufferItems = _getBuffer(SessionStorageSendBuffer[_DYN__BUFFER__KEY /* @min:%2eBUFFER_KEY */]);\r\n var notDeliveredItems = _getBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */]);\r\n var buffer = _self._set(bufferItems.concat(notDeliveredItems));\r\n // If the buffer has too many items, drop items from the end.\r\n if (buffer[_DYN_LENGTH /* @min:%2elength */] > SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE /* @min:%2eMAX_BUFFER_SIZE */]) {\r\n buffer[_DYN_LENGTH /* @min:%2elength */] = SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE /* @min:%2eMAX_BUFFER_SIZE */];\r\n }\r\n _setBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */], []);\r\n _setBuffer(SessionStorageSendBuffer[_DYN__BUFFER__KEY /* @min:%2eBUFFER_KEY */], buffer);\r\n _self[_DYN_ENQUEUE /* @min:%2eenqueue */] = function (payload) {\r\n if (_self[_DYN_COUNT /* @min:%2ecount */]() >= SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE /* @min:%2eMAX_BUFFER_SIZE */]) {\r\n // sent internal log only once per page view\r\n if (!_bufferFullMessageSent) {\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 67 /* _eInternalMessageId.SessionStorageBufferFull */, \"Maximum buffer size reached: \" + _self[_DYN_COUNT /* @min:%2ecount */](), true);\r\n _bufferFullMessageSent = true;\r\n }\r\n return;\r\n }\r\n _base[_DYN_ENQUEUE /* @min:%2eenqueue */](payload);\r\n _setBuffer(SessionStorageSendBuffer.BUFFER_KEY, _self[_DYN__GET /* @min:%2e_get */]());\r\n };\r\n _self[_DYN_CLEAR /* @min:%2eclear */] = function () {\r\n _base[_DYN_CLEAR /* @min:%2eclear */]();\r\n _setBuffer(SessionStorageSendBuffer.BUFFER_KEY, _self[_DYN__GET /* @min:%2e_get */]());\r\n _setBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */], []);\r\n _bufferFullMessageSent = false;\r\n };\r\n _self[_DYN_MARK_AS_SENT /* @min:%2emarkAsSent */] = function (payload) {\r\n _setBuffer(SessionStorageSendBuffer[_DYN__BUFFER__KEY /* @min:%2eBUFFER_KEY */], _self._set(_removePayloadsFromBuffer(payload, _self[_DYN__GET /* @min:%2e_get */]())));\r\n var sentElements = _getBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */]);\r\n if (sentElements instanceof Array && payload instanceof Array) {\r\n sentElements = sentElements.concat(payload);\r\n if (sentElements[_DYN_LENGTH /* @min:%2elength */] > SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE /* @min:%2eMAX_BUFFER_SIZE */]) {\r\n // We send telemetry normally. If the SENT_BUFFER is too big we don't add new elements\r\n // until we receive a response from the backend and the buffer has free space again (see clearSent method)\r\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 67 /* _eInternalMessageId.SessionStorageBufferFull */, \"Sent buffer reached its maximum size: \" + sentElements[_DYN_LENGTH /* @min:%2elength */], true);\r\n sentElements[_DYN_LENGTH /* @min:%2elength */] = SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE /* @min:%2eMAX_BUFFER_SIZE */];\r\n }\r\n _setBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */], sentElements);\r\n }\r\n };\r\n _self[_DYN_CLEAR_SENT /* @min:%2eclearSent */] = function (payload) {\r\n var sentElements = _getBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */]);\r\n sentElements = _removePayloadsFromBuffer(payload, sentElements);\r\n _setBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */], sentElements);\r\n };\r\n _self[_DYN_CREATE_NEW /* @min:%2ecreateNew */] = function (newLogger, newConfig, canUseSessionStorage) {\r\n canUseSessionStorage = !!canUseSessionStorage;\r\n var unsentItems = _self[_DYN__GET /* @min:%2e_get */]().slice(0);\r\n var sentItems = _getBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */]).slice(0);\r\n newLogger = newLogger || logger;\r\n newConfig = newConfig || {};\r\n // to make sure that we do not send duplicated payloads when it is switched back to previous one\r\n _self[_DYN_CLEAR /* @min:%2eclear */]();\r\n var newBuffer = canUseSessionStorage ? new SessionStorageSendBuffer(newLogger, newConfig) : new ArraySendBuffer(newLogger, newConfig);\r\n arrForEach(unsentItems, function (payload) {\r\n newBuffer[_DYN_ENQUEUE /* @min:%2eenqueue */](payload);\r\n });\r\n if (canUseSessionStorage) {\r\n // arr buffer will clear all payloads if markAsSent() is called\r\n newBuffer[_DYN_MARK_AS_SENT /* @min:%2emarkAsSent */](sentItems);\r\n }\r\n return newBuffer;\r\n };\r\n function _removePayloadsFromBuffer(payloads, buffer) {\r\n var remaining = [];\r\n arrForEach(buffer, function (value) {\r\n if (!isFunction(value) && arrIndexOf(payloads, value) === -1) {\r\n remaining[_DYN_PUSH /* @min:%2epush */](value);\r\n }\r\n });\r\n return remaining;\r\n }\r\n function _getBuffer(key) {\r\n var prefixedKey = key;\r\n try {\r\n prefixedKey = _namePrefix ? _namePrefix + \"_\" + prefixedKey : prefixedKey;\r\n var bufferJson = getItem(logger, prefixedKey);\r\n if (bufferJson) {\r\n var buffer_1 = getJSON().parse(bufferJson);\r\n if (isString(buffer_1)) {\r\n // When using some version prototype.js the stringify / parse cycle does not decode array's correctly\r\n buffer_1 = getJSON().parse(buffer_1);\r\n }\r\n if (buffer_1 && isArray(buffer_1)) {\r\n return buffer_1;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 42 /* _eInternalMessageId.FailedToRestoreStorageBuffer */, \" storage key: \" + prefixedKey + \", \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n return [];\r\n }\r\n function _setBuffer(key, buffer) {\r\n var prefixedKey = key;\r\n try {\r\n prefixedKey = _namePrefix ? _namePrefix + \"_\" + prefixedKey : prefixedKey;\r\n var bufferJson = JSON[_DYN_STRINGIFY /* @min:%2estringify */](buffer);\r\n setItem(logger, prefixedKey, bufferJson);\r\n }\r\n catch (e) {\r\n // if there was an error, clear the buffer\r\n // telemetry is stored in the _buffer array so we won't loose any items\r\n setItem(logger, prefixedKey, JSON[_DYN_STRINGIFY /* @min:%2estringify */]([]));\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 41 /* _eInternalMessageId.FailedToSetStorageBuffer */, \" storage key: \" + prefixedKey + \", \" + getExceptionName(e) + \". Buffer cleared\", { exception: dumpObj(e) });\r\n }\r\n }\r\n });\r\n return _this;\r\n }\r\n SessionStorageSendBuffer.prototype.enqueue = function (payload) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n SessionStorageSendBuffer.prototype.clear = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n SessionStorageSendBuffer.prototype.markAsSent = function (payload) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n SessionStorageSendBuffer.prototype.clearSent = function (payload) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n SessionStorageSendBuffer.prototype.createNew = function (newLogger, newConfig, canUseSessionStorage) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n SessionStorageSendBuffer.BUFFER_KEY = \"AI_buffer\";\r\n SessionStorageSendBuffer.SENT_BUFFER_KEY = \"AI_sentBuffer\";\r\n // Maximum number of payloads stored in the buffer. If the buffer is full, new elements will be dropped.\r\n SessionStorageSendBuffer.MAX_BUFFER_SIZE = 2000;\r\n return SessionStorageSendBuffer;\r\n}(BaseSendBuffer));\r\nexport { SessionStorageSendBuffer };\r\n//# sourceMappingURL=SendBuffer.js.map","import dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { _throwInternal, getJSON, isArray, isFunction, isObject, objForEachKey } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_LENGTH, _DYN_PUSH, _DYN_STRINGIFY, _DYN_TO_STRING } from \"./__DynamicConstants\";\r\nvar Serializer = /** @class */ (function () {\r\n function Serializer(logger) {\r\n dynamicProto(Serializer, this, function (_self) {\r\n /**\r\n * Serializes the current object to a JSON string.\r\n */\r\n _self.serialize = function (input) {\r\n var output = _serializeObject(input, \"root\");\r\n try {\r\n return getJSON()[_DYN_STRINGIFY /* @min:%2estringify */](output);\r\n }\r\n catch (e) {\r\n // if serialization fails return an empty string\r\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.CannotSerializeObject */, (e && isFunction(e[_DYN_TO_STRING /* @min:%2etoString */])) ? e[_DYN_TO_STRING /* @min:%2etoString */]() : \"Error serializing object\", null, true);\r\n }\r\n };\r\n function _serializeObject(source, name) {\r\n var circularReferenceCheck = \"__aiCircularRefCheck\";\r\n var output = {};\r\n if (!source) {\r\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.CannotSerializeObject */, \"cannot serialize object because it is null or undefined\", { name: name }, true);\r\n return output;\r\n }\r\n if (source[circularReferenceCheck]) {\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 50 /* _eInternalMessageId.CircularReferenceDetected */, \"Circular reference detected while serializing object\", { name: name }, true);\r\n return output;\r\n }\r\n if (!source.aiDataContract) {\r\n // special case for measurements/properties/tags\r\n if (name === \"measurements\") {\r\n output = _serializeStringMap(source, \"number\", name);\r\n }\r\n else if (name === \"properties\") {\r\n output = _serializeStringMap(source, \"string\", name);\r\n }\r\n else if (name === \"tags\") {\r\n output = _serializeStringMap(source, \"string\", name);\r\n }\r\n else if (isArray(source)) {\r\n output = _serializeArray(source, name);\r\n }\r\n else {\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 49 /* _eInternalMessageId.CannotSerializeObjectNonSerializable */, \"Attempting to serialize an object which does not implement ISerializable\", { name: name }, true);\r\n try {\r\n // verify that the object can be stringified\r\n getJSON()[_DYN_STRINGIFY /* @min:%2estringify */](source);\r\n output = source;\r\n }\r\n catch (e) {\r\n // if serialization fails return an empty string\r\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.CannotSerializeObject */, (e && isFunction(e[_DYN_TO_STRING /* @min:%2etoString */])) ? e[_DYN_TO_STRING /* @min:%2etoString */]() : \"Error serializing object\", null, true);\r\n }\r\n }\r\n return output;\r\n }\r\n source[circularReferenceCheck] = true;\r\n objForEachKey(source.aiDataContract, function (field, contract) {\r\n var isRequired = (isFunction(contract)) ? (contract() & 1 /* FieldType.Required */) : (contract & 1 /* FieldType.Required */);\r\n var isHidden = (isFunction(contract)) ? (contract() & 4 /* FieldType.Hidden */) : (contract & 4 /* FieldType.Hidden */);\r\n var isArray = contract & 2 /* FieldType.Array */;\r\n var isPresent = source[field] !== undefined;\r\n var isObj = isObject(source[field]) && source[field] !== null;\r\n if (isRequired && !isPresent && !isArray) {\r\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 24 /* _eInternalMessageId.MissingRequiredFieldSpecification */, \"Missing required field specification. The field is required but not present on source\", { field: field, name: name });\r\n // If not in debug mode, continue and hope the error is permissible\r\n }\r\n else if (!isHidden) { // Don't serialize hidden fields\r\n var value = void 0;\r\n if (isObj) {\r\n if (isArray) {\r\n // special case; recurse on each object in the source array\r\n value = _serializeArray(source[field], field);\r\n }\r\n else {\r\n // recurse on the source object in this field\r\n value = _serializeObject(source[field], field);\r\n }\r\n }\r\n else {\r\n // assign the source field to the output even if undefined or required\r\n value = source[field];\r\n }\r\n // only emit this field if the value is defined\r\n if (value !== undefined) {\r\n output[field] = value;\r\n }\r\n }\r\n });\r\n delete source[circularReferenceCheck];\r\n return output;\r\n }\r\n function _serializeArray(sources, name) {\r\n var output;\r\n if (!!sources) {\r\n if (!isArray(sources)) {\r\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 54 /* _eInternalMessageId.ItemNotInArray */, \"This field was specified as an array in the contract but the item is not an array.\\r\\n\", { name: name }, true);\r\n }\r\n else {\r\n output = [];\r\n for (var i = 0; i < sources[_DYN_LENGTH /* @min:%2elength */]; i++) {\r\n var source = sources[i];\r\n var item = _serializeObject(source, name + \"[\" + i + \"]\");\r\n output[_DYN_PUSH /* @min:%2epush */](item);\r\n }\r\n }\r\n }\r\n return output;\r\n }\r\n function _serializeStringMap(map, expectedType, name) {\r\n var output;\r\n if (map) {\r\n output = {};\r\n objForEachKey(map, function (field, value) {\r\n if (expectedType === \"string\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n }\r\n else if (value === null) {\r\n output[field] = \"null\";\r\n }\r\n else if (!value[_DYN_TO_STRING /* @min:%2etoString */]) {\r\n output[field] = \"invalid field: toString() is not defined.\";\r\n }\r\n else {\r\n output[field] = value[_DYN_TO_STRING /* @min:%2etoString */]();\r\n }\r\n }\r\n else if (expectedType === \"number\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n }\r\n else if (value === null) {\r\n output[field] = \"null\";\r\n }\r\n else {\r\n var num = parseFloat(value);\r\n if (isNaN(num)) {\r\n output[field] = \"NaN\";\r\n }\r\n else {\r\n output[field] = num;\r\n }\r\n }\r\n }\r\n else {\r\n output[field] = \"invalid field: \" + name + \" is of unknown type.\";\r\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, output[field], null, true);\r\n }\r\n });\r\n }\r\n return output;\r\n }\r\n });\r\n }\r\n /**\r\n * Serializes the current object to a JSON string.\r\n */\r\n Serializer.prototype.serialize = function (input) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n return Serializer;\r\n}());\r\nexport { Serializer };\r\n//# sourceMappingURL=Serializer.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { Metric } from \"@microsoft/applicationinsights-common\";\r\nimport { safeGetLogger } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_DATA_TYPE, _DYN_GET_SAMPLING_SCORE, _DYN_SAMPLE_RATE } from \"../__DynamicConstants\";\r\nimport { SamplingScoreGenerator } from \"./SamplingScoreGenerators/SamplingScoreGenerator\";\r\nvar Sample = /** @class */ (function () {\r\n function Sample(sampleRate, logger) {\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n this.INT_MAX_VALUE = 2147483647;\r\n var _logger = logger || safeGetLogger(null);\r\n if (sampleRate > 100 || sampleRate < 0) {\r\n _logger.throwInternal(2 /* eLoggingSeverity.WARNING */, 58 /* _eInternalMessageId.SampleRateOutOfRange */, \"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.\", { samplingRate: sampleRate }, true);\r\n sampleRate = 100;\r\n }\r\n this[_DYN_SAMPLE_RATE /* @min:%2esampleRate */] = sampleRate;\r\n this.samplingScoreGenerator = new SamplingScoreGenerator();\r\n }\r\n /**\r\n * Determines if an envelope is sampled in (i.e. will be sent) or not (i.e. will be dropped).\r\n */\r\n Sample.prototype.isSampledIn = function (envelope) {\r\n var samplingPercentage = this[_DYN_SAMPLE_RATE /* @min:%2esampleRate */]; // 0 - 100\r\n var isSampledIn = false;\r\n if (samplingPercentage === null || samplingPercentage === undefined || samplingPercentage >= 100) {\r\n return true;\r\n }\r\n else if (envelope.baseType === Metric[_DYN_DATA_TYPE /* @min:%2edataType */]) {\r\n // exclude MetricData telemetry from sampling\r\n return true;\r\n }\r\n isSampledIn = this.samplingScoreGenerator[_DYN_GET_SAMPLING_SCORE /* @min:%2egetSamplingScore */](envelope) < samplingPercentage;\r\n return isSampledIn;\r\n };\r\n return Sample;\r\n}());\r\nexport { Sample };\r\n//# sourceMappingURL=Sample.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { ContextTagKeys } from \"@microsoft/applicationinsights-common\";\r\nimport { _DYN_GET_HASH_CODE_SCORE, _DYN_GET_SAMPLING_SCORE, _DYN_TAGS, _DYN_TRACE_ID } from \"../../__DynamicConstants\";\r\nimport { HashCodeScoreGenerator } from \"./HashCodeScoreGenerator\";\r\nvar SamplingScoreGenerator = /** @class */ (function () {\r\n function SamplingScoreGenerator() {\r\n var _self = this;\r\n var hashCodeGenerator = new HashCodeScoreGenerator();\r\n var keys = new ContextTagKeys();\r\n _self[_DYN_GET_SAMPLING_SCORE /* @min:%2egetSamplingScore */] = function (item) {\r\n var score = 0;\r\n if (item[_DYN_TAGS /* @min:%2etags */] && item[_DYN_TAGS /* @min:%2etags */][keys.userId]) { // search in tags first, then ext\r\n score = hashCodeGenerator.getHashCodeScore(item[_DYN_TAGS /* @min:%2etags */][keys.userId]);\r\n }\r\n else if (item.ext && item.ext.user && item.ext.user.id) {\r\n score = hashCodeGenerator[_DYN_GET_HASH_CODE_SCORE /* @min:%2egetHashCodeScore */](item.ext.user.id);\r\n }\r\n else if (item[_DYN_TAGS /* @min:%2etags */] && item[_DYN_TAGS /* @min:%2etags */][keys.operationId]) { // search in tags first, then ext\r\n score = hashCodeGenerator.getHashCodeScore(item[_DYN_TAGS /* @min:%2etags */][keys.operationId]);\r\n }\r\n else if (item.ext && item.ext.telemetryTrace && item.ext.telemetryTrace[_DYN_TRACE_ID /* @min:%2etraceID */]) {\r\n score = hashCodeGenerator.getHashCodeScore(item.ext.telemetryTrace[_DYN_TRACE_ID /* @min:%2etraceID */]);\r\n }\r\n else {\r\n // tslint:disable-next-line:insecure-random\r\n score = (Math.random() * 100);\r\n }\r\n return score;\r\n };\r\n }\r\n return SamplingScoreGenerator;\r\n}());\r\nexport { SamplingScoreGenerator };\r\n//# sourceMappingURL=SamplingScoreGenerator.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { _DYN_LENGTH } from \"../../__DynamicConstants\";\r\n// (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution\r\nvar MIN_INPUT_LENGTH = 8;\r\nvar HashCodeScoreGenerator = /** @class */ (function () {\r\n function HashCodeScoreGenerator() {\r\n }\r\n HashCodeScoreGenerator.prototype.getHashCodeScore = function (key) {\r\n var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;\r\n return score * 100;\r\n };\r\n HashCodeScoreGenerator.prototype.getHashCode = function (input) {\r\n if (input === \"\") {\r\n return 0;\r\n }\r\n while (input[_DYN_LENGTH /* @min:%2elength */] < MIN_INPUT_LENGTH) {\r\n input = input.concat(input);\r\n }\r\n // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function\r\n var hash = 5381;\r\n for (var i = 0; i < input[_DYN_LENGTH /* @min:%2elength */]; ++i) {\r\n hash = ((hash << 5) + hash) + input.charCodeAt(i);\r\n // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)\r\n // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.\r\n hash = hash & hash;\r\n }\r\n return Math.abs(hash);\r\n };\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n HashCodeScoreGenerator.INT_MAX_VALUE = 2147483647;\r\n return HashCodeScoreGenerator;\r\n}());\r\nexport { HashCodeScoreGenerator };\r\n//# sourceMappingURL=HashCodeScoreGenerator.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nvar _a;\r\nimport { __spreadArray } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { createPromise } from \"@nevware21/ts-async\";\r\nimport { arrAppend, arrForEach, arrIndexOf, createTimeout, deepExtend, hasDocument, isFunction, isNullOrUndefined, isPlainObject, objDeepFreeze, objDefine, objForEachKey, objFreeze, objHasOwn, scheduleTimeout, throwError } from \"@nevware21/ts-utils\";\r\nimport { createDynamicConfig, onConfigChange } from \"../Config/DynamicConfig\";\r\nimport { _DYN_ADD_NOTIFICATION_LIS1, _DYN_CANCEL, _DYN_CREATE_NEW, _DYN_ENABLED, _DYN_GET_NOTIFY_MGR, _DYN_GET_PLUGIN, _DYN_GET_PROCESS_TEL_CONT0, _DYN_IDENTIFIER, _DYN_INITIALIZE, _DYN_IS_ASYNC, _DYN_IS_INITIALIZED, _DYN_LENGTH, _DYN_LOGGER, _DYN_LOGGING_LEVEL_CONSOL4, _DYN_MESSAGE, _DYN_MESSAGE_ID, _DYN_NAME, _DYN_NOTIFY, _DYN_ON_COMPLETE, _DYN_POLL_INTERNAL_LOGS, _DYN_PROCESS_NEXT, _DYN_PUSH, _DYN_REMOVE_NOTIFICATION_2, _DYN_SET_DF, _DYN_SPLICE, _DYN_STOP_POLLING_INTERNA3, _DYN_TEARDOWN, _DYN_TIME, _DYN_UNLOAD, _DYN_VERSION, _DYN_WATCH } from \"../__DynamicConstants\";\r\nimport { doUnloadAll, runTargetUnload } from \"./AsyncUtils\";\r\nimport { ChannelControllerPriority } from \"./Constants\";\r\nimport { createCookieMgr } from \"./CookieMgr\";\r\nimport { createUniqueNamespace } from \"./DataCacheHelper\";\r\nimport { getDebugListener } from \"./DbgExtensionUtils\";\r\nimport { DiagnosticLogger, _InternalLogMessage, _throwInternal, _warnToConsole } from \"./DiagnosticLogger\";\r\nimport { getSetValue, proxyFunctionAs, proxyFunctions, toISOString } from \"./HelperFuncs\";\r\nimport { STR_CHANNELS, STR_CORE, STR_CREATE_PERF_MGR, STR_DISABLED, STR_EMPTY, STR_EVENTS_DISCARDED, STR_EXTENSIONS, STR_EXTENSION_CONFIG, STR_GET_PERF_MGR, STR_PRIORITY, UNDEFINED_VALUE } from \"./InternalConstants\";\r\nimport { NotificationManager } from \"./NotificationManager\";\r\nimport { PerfManager, doPerf, getGblPerfMgr } from \"./PerfManager\";\r\nimport { createProcessTelemetryContext, createProcessTelemetryUnloadContext, createProcessTelemetryUpdateContext, createTelemetryProxyChain } from \"./ProcessTelemetryContext\";\r\nimport { _getPluginState, createDistributedTraceContext, initializePlugins, sortPlugins } from \"./TelemetryHelpers\";\r\nimport { TelemetryInitializerPlugin } from \"./TelemetryInitializerPlugin\";\r\nimport { createUnloadHandlerContainer } from \"./UnloadHandlerContainer\";\r\nimport { createUnloadHookContainer } from \"./UnloadHookContainer\";\r\nvar strValidationError = \"Plugins must provide initialize method\";\r\nvar strNotificationManager = \"_notificationManager\";\r\nvar strSdkUnloadingError = \"SDK is still unloading...\";\r\nvar strSdkNotInitialized = \"SDK is not initialized\";\r\n// const strPluginUnloadFailed = \"Failed to unload plugin\";\r\n/**\r\n * The default settings for the config.\r\n * WE MUST include all defaults here to ensure that the config is created with all of the properties\r\n * defined as dynamic.\r\n */\r\nvar defaultConfig = objDeepFreeze((_a = {\r\n cookieCfg: {}\r\n },\r\n _a[STR_EXTENSIONS] = { rdOnly: true, ref: true, v: [] },\r\n _a[STR_CHANNELS] = { rdOnly: true, ref: true, v: [] },\r\n _a[STR_EXTENSION_CONFIG] = { ref: true, v: {} },\r\n _a[STR_CREATE_PERF_MGR] = UNDEFINED_VALUE,\r\n _a.loggingLevelConsole = 0 /* eLoggingSeverity.DISABLED */,\r\n _a.diagnosticLogInterval = UNDEFINED_VALUE,\r\n _a));\r\n/**\r\n * Helper to create the default performance manager\r\n * @param core\r\n * @param notificationMgr\r\n */\r\nfunction _createPerfManager(core, notificationMgr) {\r\n return new PerfManager(notificationMgr);\r\n}\r\nfunction _validateExtensions(logger, channelPriority, allExtensions) {\r\n var _a;\r\n // Concat all available extensions\r\n var coreExtensions = [];\r\n var channels = [];\r\n // Check if any two extensions have the same priority, then warn to console\r\n // And extract the local extensions from the\r\n var extPriorities = {};\r\n // Extension validation\r\n arrForEach(allExtensions, function (ext) {\r\n // Check for ext.initialize\r\n if (isNullOrUndefined(ext) || isNullOrUndefined(ext[_DYN_INITIALIZE /* @min:%2einitialize */])) {\r\n throwError(strValidationError);\r\n }\r\n var extPriority = ext[STR_PRIORITY /* @min:%2epriority */];\r\n var identifier = ext[_DYN_IDENTIFIER /* @min:%2eidentifier */];\r\n if (ext && extPriority) {\r\n if (!isNullOrUndefined(extPriorities[extPriority])) {\r\n _warnToConsole(logger, \"Two extensions have same priority #\" + extPriority + \" - \" + extPriorities[extPriority] + \", \" + identifier);\r\n }\r\n else {\r\n // set a value\r\n extPriorities[extPriority] = identifier;\r\n }\r\n }\r\n // Split extensions to core and channels\r\n if (!extPriority || extPriority < channelPriority) {\r\n // Add to core extension that will be managed by AppInsightsCore\r\n coreExtensions[_DYN_PUSH /* @min:%2epush */](ext);\r\n }\r\n else {\r\n channels[_DYN_PUSH /* @min:%2epush */](ext);\r\n }\r\n });\r\n return _a = {},\r\n _a[STR_CORE /* @min:core */] = coreExtensions,\r\n _a[STR_CHANNELS /* @min:channels */] = channels,\r\n _a;\r\n}\r\nfunction _isPluginPresent(thePlugin, plugins) {\r\n var exists = false;\r\n arrForEach(plugins, function (plugin) {\r\n if (plugin === thePlugin) {\r\n exists = true;\r\n return -1;\r\n }\r\n });\r\n return exists;\r\n}\r\nfunction _deepMergeConfig(details, target, newValues, merge) {\r\n // Lets assign the new values to the existing config\r\n if (newValues) {\r\n objForEachKey(newValues, function (key, value) {\r\n if (merge) {\r\n if (isPlainObject(value) && isPlainObject(target[key])) {\r\n // The target is an object and it has a value\r\n _deepMergeConfig(details, target[key], value, merge);\r\n }\r\n }\r\n if (merge && isPlainObject(value) && isPlainObject(target[key])) {\r\n // The target is an object and it has a value\r\n _deepMergeConfig(details, target[key], value, merge);\r\n }\r\n else {\r\n // Just Assign (replace) and/or make the property dynamic\r\n details.set(target, key, value);\r\n }\r\n });\r\n }\r\n}\r\nfunction _findWatcher(listeners, newWatcher) {\r\n var theListener = null;\r\n var idx = -1;\r\n arrForEach(listeners, function (listener, lp) {\r\n if (listener.w === newWatcher) {\r\n theListener = listener;\r\n idx = lp;\r\n return -1;\r\n }\r\n });\r\n return { i: idx, l: theListener };\r\n}\r\nfunction _addDelayedCfgListener(listeners, newWatcher) {\r\n var theListener = _findWatcher(listeners, newWatcher).l;\r\n if (!theListener) {\r\n theListener = {\r\n w: newWatcher,\r\n rm: function () {\r\n var fnd = _findWatcher(listeners, newWatcher);\r\n if (fnd.i !== -1) {\r\n listeners[_DYN_SPLICE /* @min:%2esplice */](fnd.i, 1);\r\n }\r\n }\r\n };\r\n listeners[_DYN_PUSH /* @min:%2epush */](theListener);\r\n }\r\n return theListener;\r\n}\r\nfunction _registerDelayedCfgListener(config, listeners, logger) {\r\n arrForEach(listeners, function (listener) {\r\n var unloadHdl = onConfigChange(config, listener.w, logger);\r\n delete listener.w; // Clear the listener reference so it will get garbage collected.\r\n // replace the remove function\r\n listener.rm = function () {\r\n unloadHdl.rm();\r\n };\r\n });\r\n}\r\nvar AppInsightsCore = /** @class */ (function () {\r\n function AppInsightsCore() {\r\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\r\n var _configHandler;\r\n var _isInitialized;\r\n var _logger;\r\n var _eventQueue;\r\n var _notificationManager;\r\n var _perfManager;\r\n var _cfgPerfManager;\r\n var _cookieManager;\r\n var _pluginChain;\r\n var _configExtensions;\r\n var _channelConfig;\r\n var _channels;\r\n var _isUnloading;\r\n var _telemetryInitializerPlugin;\r\n var _internalLogsEventName;\r\n var _evtNamespace;\r\n var _unloadHandlers;\r\n var _hookContainer;\r\n var _debugListener;\r\n var _traceCtx;\r\n var _instrumentationKey;\r\n var _cfgListeners;\r\n var _extensions;\r\n var _pluginVersionStringArr;\r\n var _pluginVersionString;\r\n /**\r\n * Internal log poller\r\n */\r\n var _internalLogPoller;\r\n var _internalLogPollerListening;\r\n var _forceStopInternalLogPoller;\r\n dynamicProto(AppInsightsCore, this, function (_self) {\r\n // Set the default values (also called during teardown)\r\n _initDefaults();\r\n // Special internal method to allow the unit tests and DebugPlugin to hook embedded objects\r\n _self[\"_getDbgPlgTargets\"] = function () {\r\n return [_extensions];\r\n };\r\n _self[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */] = function () { return _isInitialized; };\r\n // Creating the self.initialize = ()\r\n _self[_DYN_INITIALIZE /* @min:%2einitialize */] = function (config, extensions, logger, notificationManager) {\r\n if (_isUnloading) {\r\n throwError(strSdkUnloadingError);\r\n }\r\n // Make sure core is only initialized once\r\n if (_self[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */]()) {\r\n throwError(\"Core cannot be initialized more than once\");\r\n }\r\n _configHandler = createDynamicConfig(config, defaultConfig, logger || _self[_DYN_LOGGER /* @min:%2elogger */], false);\r\n // Re-assigning the local config property so we don't have any references to the passed value and it can be garbage collected\r\n config = _configHandler.cfg;\r\n // This will be \"re-run\" if the referenced config properties are changed\r\n _addUnloadHook(_configHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\r\n _instrumentationKey = details.cfg.instrumentationKey;\r\n // Mark the extensionConfig and all first level keys as referenced\r\n // This is so that calls to getExtCfg() will always return the same object\r\n // Even when a user may \"re-assign\" the plugin properties (or it's unloaded/reloaded)\r\n var extCfg = details.ref(details.cfg, STR_EXTENSION_CONFIG);\r\n objForEachKey(extCfg, function (key) {\r\n details.ref(extCfg, key);\r\n });\r\n if (isNullOrUndefined(_instrumentationKey)) {\r\n throwError(\"Please provide instrumentation key\");\r\n }\r\n }));\r\n _notificationManager = notificationManager;\r\n _initDebugListener();\r\n _initPerfManager();\r\n _self[_DYN_LOGGER /* @min:%2elogger */] = logger;\r\n var cfgExtensions = config[STR_EXTENSIONS /* @min:%2eextensions */];\r\n // Extension validation\r\n _configExtensions = [];\r\n _configExtensions[_DYN_PUSH /* @min:%2epush */].apply(_configExtensions, __spreadArray(__spreadArray([], extensions, false), cfgExtensions, false));\r\n _channelConfig = config[STR_CHANNELS /* @min:%2echannels */];\r\n _initPluginChain(null);\r\n if (!_channels || _channels[_DYN_LENGTH /* @min:%2elength */] === 0) {\r\n throwError(\"No \" + STR_CHANNELS + \" available\");\r\n }\r\n if (_channelConfig && _channelConfig[_DYN_LENGTH /* @min:%2elength */] > 1) {\r\n var teeController = _self[_DYN_GET_PLUGIN /* @min:%2egetPlugin */](\"TeeChannelController\");\r\n if (!teeController || !teeController.plugin) {\r\n _throwInternal(_logger, 1 /* eLoggingSeverity.CRITICAL */, 28 /* _eInternalMessageId.SenderNotInitialized */, \"TeeChannel required\");\r\n }\r\n }\r\n _registerDelayedCfgListener(config, _cfgListeners, _logger);\r\n _cfgListeners = null;\r\n _isInitialized = true;\r\n _self.releaseQueue();\r\n _self[_DYN_POLL_INTERNAL_LOGS /* @min:%2epollInternalLogs */]();\r\n };\r\n _self.getChannels = function () {\r\n var controls = [];\r\n if (_channels) {\r\n arrForEach(_channels, function (channel) {\r\n controls[_DYN_PUSH /* @min:%2epush */](channel);\r\n });\r\n }\r\n return objFreeze(controls);\r\n };\r\n _self.track = function (telemetryItem) {\r\n doPerf(_self[STR_GET_PERF_MGR /* @min:%2egetPerfMgr */](), function () { return \"AppInsightsCore:track\"; }, function () {\r\n if (telemetryItem === null) {\r\n _notifyInvalidEvent(telemetryItem);\r\n // throw error\r\n throwError(\"Invalid telemetry item\");\r\n }\r\n // do basic validation before sending it through the pipeline\r\n if (!telemetryItem[_DYN_NAME /* @min:%2ename */] && isNullOrUndefined(telemetryItem[_DYN_NAME /* @min:%2ename */])) {\r\n _notifyInvalidEvent(telemetryItem);\r\n throwError(\"telemetry name required\");\r\n }\r\n // setup default iKey if not passed in\r\n telemetryItem.iKey = telemetryItem.iKey || _instrumentationKey;\r\n // add default timestamp if not passed in\r\n telemetryItem[_DYN_TIME /* @min:%2etime */] = telemetryItem[_DYN_TIME /* @min:%2etime */] || toISOString(new Date());\r\n // Common Schema 4.0\r\n telemetryItem.ver = telemetryItem.ver || \"4.0\";\r\n if (!_isUnloading && _self[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */]()) {\r\n // Process the telemetry plugin chain\r\n _createTelCtx()[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](telemetryItem);\r\n }\r\n else {\r\n // Queue events until all extensions are initialized\r\n _eventQueue[_DYN_PUSH /* @min:%2epush */](telemetryItem);\r\n }\r\n }, function () { return ({ item: telemetryItem }); }, !(telemetryItem.sync));\r\n };\r\n _self[_DYN_GET_PROCESS_TEL_CONT0 /* @min:%2egetProcessTelContext */] = _createTelCtx;\r\n _self[_DYN_GET_NOTIFY_MGR /* @min:%2egetNotifyMgr */] = function () {\r\n if (!_notificationManager) {\r\n _notificationManager = new NotificationManager(_configHandler.cfg);\r\n // For backward compatibility only\r\n _self[strNotificationManager] = _notificationManager;\r\n }\r\n return _notificationManager;\r\n };\r\n /**\r\n * Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.\r\n * The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be\r\n * called.\r\n * @param listener - An INotificationListener object.\r\n */\r\n _self[_DYN_ADD_NOTIFICATION_LIS1 /* @min:%2eaddNotificationListener */] = function (listener) {\r\n _self[_DYN_GET_NOTIFY_MGR /* @min:%2egetNotifyMgr */]()[_DYN_ADD_NOTIFICATION_LIS1 /* @min:%2eaddNotificationListener */](listener);\r\n };\r\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - INotificationListener to remove.\r\n */\r\n _self[_DYN_REMOVE_NOTIFICATION_2 /* @min:%2eremoveNotificationListener */] = function (listener) {\r\n if (_notificationManager) {\r\n _notificationManager[_DYN_REMOVE_NOTIFICATION_2 /* @min:%2eremoveNotificationListener */](listener);\r\n }\r\n };\r\n _self.getCookieMgr = function () {\r\n if (!_cookieManager) {\r\n _cookieManager = createCookieMgr(_configHandler.cfg, _self[_DYN_LOGGER /* @min:%2elogger */]);\r\n }\r\n return _cookieManager;\r\n };\r\n _self.setCookieMgr = function (cookieMgr) {\r\n if (_cookieManager !== cookieMgr) {\r\n runTargetUnload(_cookieManager, false);\r\n _cookieManager = cookieMgr;\r\n }\r\n };\r\n _self[STR_GET_PERF_MGR /* @min:%2egetPerfMgr */] = function () {\r\n if (!_perfManager && !_cfgPerfManager) {\r\n _addUnloadHook(_configHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\r\n if (details.cfg.enablePerfMgr) {\r\n var createPerfMgr = details.cfg[STR_CREATE_PERF_MGR /* @min:%2ecreatePerfMgr */];\r\n if (isFunction(createPerfMgr)) {\r\n _cfgPerfManager = createPerfMgr(_self, _self[_DYN_GET_NOTIFY_MGR /* @min:%2egetNotifyMgr */]());\r\n }\r\n }\r\n }));\r\n }\r\n return _perfManager || _cfgPerfManager || getGblPerfMgr();\r\n };\r\n _self.setPerfMgr = function (perfMgr) {\r\n _perfManager = perfMgr;\r\n };\r\n _self.eventCnt = function () {\r\n return _eventQueue[_DYN_LENGTH /* @min:%2elength */];\r\n };\r\n _self.releaseQueue = function () {\r\n if (_isInitialized && _eventQueue[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n var eventQueue = _eventQueue;\r\n _eventQueue = [];\r\n arrForEach(eventQueue, function (event) {\r\n _createTelCtx()[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](event);\r\n });\r\n }\r\n };\r\n _self[_DYN_POLL_INTERNAL_LOGS /* @min:%2epollInternalLogs */] = function (eventName) {\r\n _internalLogsEventName = eventName || null;\r\n _forceStopInternalLogPoller = false;\r\n _internalLogPoller && _internalLogPoller[_DYN_CANCEL /* @min:%2ecancel */]();\r\n return _startLogPoller(true);\r\n };\r\n function _startLogPoller(alwaysStart) {\r\n if ((!_internalLogPoller || !_internalLogPoller[_DYN_ENABLED /* @min:%2eenabled */]) && !_forceStopInternalLogPoller) {\r\n var shouldStart = alwaysStart || (_logger && _logger.queue[_DYN_LENGTH /* @min:%2elength */] > 0);\r\n if (shouldStart) {\r\n if (!_internalLogPollerListening) {\r\n _internalLogPollerListening = true;\r\n // listen for any configuration changes so that changes to the\r\n // interval will cause the timer to be re-initialized\r\n _addUnloadHook(_configHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\r\n var interval = details.cfg.diagnosticLogInterval;\r\n if (!interval || !(interval > 0)) {\r\n interval = 10000;\r\n }\r\n var isRunning = false;\r\n if (_internalLogPoller) {\r\n // It was already created so remember it's running and cancel\r\n isRunning = _internalLogPoller[_DYN_ENABLED /* @min:%2eenabled */];\r\n _internalLogPoller[_DYN_CANCEL /* @min:%2ecancel */]();\r\n }\r\n // Create / reconfigure\r\n _internalLogPoller = createTimeout(_flushInternalLogs, interval);\r\n _internalLogPoller.unref();\r\n // Restart if previously running\r\n _internalLogPoller[_DYN_ENABLED /* @min:%2eenabled */] = isRunning;\r\n }));\r\n }\r\n _internalLogPoller[_DYN_ENABLED /* @min:%2eenabled */] = true;\r\n }\r\n }\r\n return _internalLogPoller;\r\n }\r\n _self[_DYN_STOP_POLLING_INTERNA3 /* @min:%2estopPollingInternalLogs */] = function () {\r\n _forceStopInternalLogPoller = true;\r\n _internalLogPoller && _internalLogPoller[_DYN_CANCEL /* @min:%2ecancel */]();\r\n _flushInternalLogs();\r\n };\r\n // Add addTelemetryInitializer\r\n proxyFunctions(_self, function () { return _telemetryInitializerPlugin; }, [\"addTelemetryInitializer\"]);\r\n _self[_DYN_UNLOAD /* @min:%2eunload */] = function (isAsync, unloadComplete, cbTimeout) {\r\n var _a;\r\n if (isAsync === void 0) { isAsync = true; }\r\n if (!_isInitialized) {\r\n // The SDK is not initialized\r\n throwError(strSdkNotInitialized);\r\n }\r\n // Check if the SDK still unloading so throw\r\n if (_isUnloading) {\r\n // The SDK is already unloading\r\n throwError(strSdkUnloadingError);\r\n }\r\n var unloadState = (_a = {\r\n reason: 50 /* TelemetryUnloadReason.SdkUnload */\r\n },\r\n _a[_DYN_IS_ASYNC /* @min:isAsync */] = isAsync,\r\n _a.flushComplete = false,\r\n _a);\r\n var result;\r\n if (isAsync && !unloadComplete) {\r\n result = createPromise(function (resolve) {\r\n // Set the callback to the promise resolve callback\r\n unloadComplete = resolve;\r\n });\r\n }\r\n var processUnloadCtx = createProcessTelemetryUnloadContext(_getPluginChain(), _self);\r\n processUnloadCtx[_DYN_ON_COMPLETE /* @min:%2eonComplete */](function () {\r\n _hookContainer.run(_self[_DYN_LOGGER /* @min:%2elogger */]);\r\n // Run any \"unload\" functions for the _cookieManager, _notificationManager and _logger\r\n doUnloadAll([_cookieManager, _notificationManager, _logger], isAsync, function () {\r\n _initDefaults();\r\n unloadComplete && unloadComplete(unloadState);\r\n });\r\n }, _self);\r\n function _doUnload(flushComplete) {\r\n unloadState.flushComplete = flushComplete;\r\n _isUnloading = true;\r\n // Run all of the unload handlers first (before unloading the plugins)\r\n _unloadHandlers.run(processUnloadCtx, unloadState);\r\n // Stop polling the internal logs\r\n _self[_DYN_STOP_POLLING_INTERNA3 /* @min:%2estopPollingInternalLogs */]();\r\n // Start unloading the components, from this point onwards the SDK should be considered to be in an unstable state\r\n processUnloadCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](unloadState);\r\n }\r\n _flushInternalLogs();\r\n if (!_flushChannels(isAsync, _doUnload, 6 /* SendRequestReason.SdkUnload */, cbTimeout)) {\r\n _doUnload(false);\r\n }\r\n return result;\r\n };\r\n _self[_DYN_GET_PLUGIN /* @min:%2egetPlugin */] = _getPlugin;\r\n _self.addPlugin = function (plugin, replaceExisting, isAsync, addCb) {\r\n if (!plugin) {\r\n addCb && addCb(false);\r\n _logOrThrowError(strValidationError);\r\n return;\r\n }\r\n var existingPlugin = _getPlugin(plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */]);\r\n if (existingPlugin && !replaceExisting) {\r\n addCb && addCb(false);\r\n _logOrThrowError(\"Plugin [\" + plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */] + \"] is already loaded!\");\r\n return;\r\n }\r\n var updateState = {\r\n reason: 16 /* TelemetryUpdateReason.PluginAdded */\r\n };\r\n function _addPlugin(removed) {\r\n _configExtensions[_DYN_PUSH /* @min:%2epush */](plugin);\r\n updateState.added = [plugin];\r\n // Re-Initialize the plugin chain\r\n _initPluginChain(updateState);\r\n addCb && addCb(true);\r\n }\r\n if (existingPlugin) {\r\n var removedPlugins_1 = [existingPlugin.plugin];\r\n var unloadState = {\r\n reason: 2 /* TelemetryUnloadReason.PluginReplace */,\r\n isAsync: !!isAsync\r\n };\r\n _removePlugins(removedPlugins_1, unloadState, function (removed) {\r\n if (!removed) {\r\n // Previous plugin was successfully removed or was not installed\r\n addCb && addCb(false);\r\n }\r\n else {\r\n updateState.removed = removedPlugins_1;\r\n updateState.reason |= 32 /* TelemetryUpdateReason.PluginRemoved */;\r\n _addPlugin(true);\r\n }\r\n });\r\n }\r\n else {\r\n _addPlugin(false);\r\n }\r\n };\r\n _self.updateCfg = function (newConfig, mergeExisting) {\r\n if (mergeExisting === void 0) { mergeExisting = true; }\r\n var updateState;\r\n if (_self[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */]()) {\r\n updateState = {\r\n reason: 1 /* TelemetryUpdateReason.ConfigurationChanged */,\r\n cfg: _configHandler.cfg,\r\n oldCfg: deepExtend({}, _configHandler.cfg),\r\n newConfig: deepExtend({}, newConfig),\r\n merge: mergeExisting\r\n };\r\n newConfig = updateState.newConfig;\r\n var cfg = _configHandler.cfg;\r\n // replace the immutable (if initialized) values\r\n // We don't currently allow updating the extensions and channels via the update config\r\n // So overwriting any user provided values to reuse the existing values\r\n newConfig[STR_EXTENSIONS /* @min:%2eextensions */] = cfg[STR_EXTENSIONS /* @min:%2eextensions */];\r\n newConfig[STR_CHANNELS /* @min:%2echannels */] = cfg[STR_CHANNELS /* @min:%2echannels */];\r\n }\r\n // Explicitly blocking any previous config watchers so that they don't get called because\r\n // of this bulk update (Probably not necessary)\r\n _configHandler._block(function (details) {\r\n // Lets assign the new values to the existing config either overwriting or re-assigning\r\n var theConfig = details.cfg;\r\n _deepMergeConfig(details, theConfig, newConfig, mergeExisting);\r\n if (!mergeExisting) {\r\n // Remove (unassign) the values \"missing\" from the newConfig and also not in the default config\r\n objForEachKey(theConfig, function (key) {\r\n if (!objHasOwn(newConfig, key)) {\r\n // Set the value to undefined\r\n details.set(theConfig, key, UNDEFINED_VALUE);\r\n }\r\n });\r\n }\r\n // Apply defaults to the new config\r\n details[_DYN_SET_DF /* @min:%2esetDf */](theConfig, defaultConfig);\r\n }, true);\r\n // Now execute all of the listeners (synchronously) so they update their values immediately\r\n _configHandler[_DYN_NOTIFY /* @min:%2enotify */]();\r\n if (updateState) {\r\n _doUpdate(updateState);\r\n }\r\n };\r\n _self.evtNamespace = function () {\r\n return _evtNamespace;\r\n };\r\n _self.flush = _flushChannels;\r\n _self.getTraceCtx = function (createNew) {\r\n if (!_traceCtx) {\r\n _traceCtx = createDistributedTraceContext();\r\n }\r\n return _traceCtx;\r\n };\r\n _self.setTraceCtx = function (traceCtx) {\r\n _traceCtx = traceCtx || null;\r\n };\r\n _self.addUnloadHook = _addUnloadHook;\r\n // Create the addUnloadCb\r\n proxyFunctionAs(_self, \"addUnloadCb\", function () { return _unloadHandlers; }, \"add\");\r\n _self.onCfgChange = function (handler) {\r\n var unloadHook;\r\n if (!_isInitialized) {\r\n unloadHook = _addDelayedCfgListener(_cfgListeners, handler);\r\n }\r\n else {\r\n unloadHook = onConfigChange(_configHandler.cfg, handler, _self[_DYN_LOGGER /* @min:%2elogger */]);\r\n }\r\n return {\r\n rm: function () {\r\n unloadHook.rm();\r\n }\r\n };\r\n };\r\n _self.getWParam = function () {\r\n return (hasDocument() || !!_configHandler.cfg.enableWParam) ? 0 : -1;\r\n };\r\n function _setPluginVersions() {\r\n var thePlugins = {};\r\n _pluginVersionStringArr = [];\r\n var _addPluginVersions = function (plugins) {\r\n if (plugins) {\r\n arrForEach(plugins, function (plugin) {\r\n if (plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */] && plugin[_DYN_VERSION /* @min:%2eversion */] && !thePlugins[plugin.identifier]) {\r\n var ver = plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */] + \"=\" + plugin[_DYN_VERSION /* @min:%2eversion */];\r\n _pluginVersionStringArr[_DYN_PUSH /* @min:%2epush */](ver);\r\n thePlugins[plugin.identifier] = plugin;\r\n }\r\n });\r\n }\r\n };\r\n _addPluginVersions(_channels);\r\n if (_channelConfig) {\r\n arrForEach(_channelConfig, function (channels) {\r\n _addPluginVersions(channels);\r\n });\r\n }\r\n _addPluginVersions(_configExtensions);\r\n }\r\n function _initDefaults() {\r\n _isInitialized = false;\r\n // Use a default logger so initialization errors are not dropped on the floor with full logging\r\n _configHandler = createDynamicConfig({}, defaultConfig, _self[_DYN_LOGGER /* @min:%2elogger */]);\r\n // Set the logging level to critical so that any critical initialization failures are displayed on the console\r\n _configHandler.cfg[_DYN_LOGGING_LEVEL_CONSOL4 /* @min:%2eloggingLevelConsole */] = 1 /* eLoggingSeverity.CRITICAL */;\r\n // Define _self.config\r\n objDefine(_self, \"config\", {\r\n g: function () { return _configHandler.cfg; },\r\n s: function (newValue) {\r\n _self.updateCfg(newValue, false);\r\n }\r\n });\r\n objDefine(_self, \"pluginVersionStringArr\", {\r\n g: function () {\r\n if (!_pluginVersionStringArr) {\r\n _setPluginVersions();\r\n }\r\n return _pluginVersionStringArr;\r\n }\r\n });\r\n objDefine(_self, \"pluginVersionString\", {\r\n g: function () {\r\n if (!_pluginVersionString) {\r\n if (!_pluginVersionStringArr) {\r\n _setPluginVersions();\r\n }\r\n _pluginVersionString = _pluginVersionStringArr.join(\";\");\r\n }\r\n return _pluginVersionString || STR_EMPTY;\r\n }\r\n });\r\n objDefine(_self, \"logger\", {\r\n g: function () {\r\n if (!_logger) {\r\n _logger = new DiagnosticLogger(_configHandler.cfg);\r\n _configHandler[_DYN_LOGGER /* @min:%2elogger */] = _logger;\r\n }\r\n return _logger;\r\n },\r\n s: function (newLogger) {\r\n _configHandler[_DYN_LOGGER /* @min:%2elogger */] = newLogger;\r\n if (_logger !== newLogger) {\r\n runTargetUnload(_logger, false);\r\n _logger = newLogger;\r\n }\r\n }\r\n });\r\n _self[_DYN_LOGGER /* @min:%2elogger */] = new DiagnosticLogger(_configHandler.cfg);\r\n _extensions = [];\r\n var cfgExtensions = _self.config[STR_EXTENSIONS /* @min:%2eextensions */] || [];\r\n cfgExtensions.splice(0, cfgExtensions[_DYN_LENGTH /* @min:%2elength */]);\r\n arrAppend(cfgExtensions, _extensions);\r\n _telemetryInitializerPlugin = new TelemetryInitializerPlugin();\r\n _eventQueue = [];\r\n runTargetUnload(_notificationManager, false);\r\n _notificationManager = null;\r\n _perfManager = null;\r\n _cfgPerfManager = null;\r\n runTargetUnload(_cookieManager, false);\r\n _cookieManager = null;\r\n _pluginChain = null;\r\n _configExtensions = [];\r\n _channelConfig = null;\r\n _channels = null;\r\n _isUnloading = false;\r\n _internalLogsEventName = null;\r\n _evtNamespace = createUniqueNamespace(\"AIBaseCore\", true);\r\n _unloadHandlers = createUnloadHandlerContainer();\r\n _traceCtx = null;\r\n _instrumentationKey = null;\r\n _hookContainer = createUnloadHookContainer();\r\n _cfgListeners = [];\r\n _pluginVersionString = null;\r\n _pluginVersionStringArr = null;\r\n _forceStopInternalLogPoller = false;\r\n }\r\n function _createTelCtx() {\r\n var theCtx = createProcessTelemetryContext(_getPluginChain(), _configHandler.cfg, _self);\r\n theCtx[_DYN_ON_COMPLETE /* @min:%2eonComplete */](_startLogPoller);\r\n return theCtx;\r\n }\r\n // Initialize or Re-initialize the plugins\r\n function _initPluginChain(updateState) {\r\n // Extension validation\r\n var theExtensions = _validateExtensions(_self[_DYN_LOGGER /* @min:%2elogger */], ChannelControllerPriority, _configExtensions);\r\n _pluginChain = null;\r\n _pluginVersionString = null;\r\n _pluginVersionStringArr = null;\r\n // Get the primary channel queue and include as part of the normal extensions\r\n _channels = (_channelConfig || [])[0] || [];\r\n // Add any channels provided in the extensions and sort them\r\n _channels = sortPlugins(arrAppend(_channels, theExtensions[STR_CHANNELS /* @min:%2echannels */]));\r\n // Create an array of all extensions, including the _channels\r\n var allExtensions = arrAppend(sortPlugins(theExtensions[STR_CORE /* @min:%2ecore */]), _channels);\r\n // Required to allow plugins to call core.getPlugin() during their own initialization\r\n _extensions = objFreeze(allExtensions);\r\n // This has a side effect of adding the extensions passed during initialization\r\n // into the config.extensions, so you can see all of the extensions loaded.\r\n // This will also get updated by the addPlugin() and remove plugin code.\r\n var cfgExtensions = _self.config[STR_EXTENSIONS /* @min:%2eextensions */] || [];\r\n cfgExtensions.splice(0, cfgExtensions[_DYN_LENGTH /* @min:%2elength */]);\r\n arrAppend(cfgExtensions, _extensions);\r\n var rootCtx = _createTelCtx();\r\n // Initializing the channels first\r\n if (_channels && _channels[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n initializePlugins(rootCtx[_DYN_CREATE_NEW /* @min:%2ecreateNew */](_channels), allExtensions);\r\n }\r\n // Now initialize the normal extensions (explicitly not including the _channels as this can cause duplicate initialization)\r\n initializePlugins(rootCtx, allExtensions);\r\n if (updateState) {\r\n _doUpdate(updateState);\r\n }\r\n }\r\n function _getPlugin(pluginIdentifier) {\r\n var theExt = null;\r\n var thePlugin = null;\r\n var channelHosts = [];\r\n arrForEach(_extensions, function (ext) {\r\n if (ext[_DYN_IDENTIFIER /* @min:%2eidentifier */] === pluginIdentifier && ext !== _telemetryInitializerPlugin) {\r\n thePlugin = ext;\r\n return -1;\r\n }\r\n if (ext.getChannel) {\r\n channelHosts[_DYN_PUSH /* @min:%2epush */](ext);\r\n }\r\n });\r\n if (!thePlugin && channelHosts[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n arrForEach(channelHosts, function (host) {\r\n thePlugin = host.getChannel(pluginIdentifier);\r\n if (!thePlugin) {\r\n return -1;\r\n }\r\n });\r\n }\r\n if (thePlugin) {\r\n theExt = {\r\n plugin: thePlugin,\r\n setEnabled: function (enabled) {\r\n _getPluginState(thePlugin)[STR_DISABLED] = !enabled;\r\n },\r\n isEnabled: function () {\r\n var pluginState = _getPluginState(thePlugin);\r\n return !pluginState[_DYN_TEARDOWN /* @min:%2eteardown */] && !pluginState[STR_DISABLED];\r\n },\r\n remove: function (isAsync, removeCb) {\r\n var _a;\r\n if (isAsync === void 0) { isAsync = true; }\r\n var pluginsToRemove = [thePlugin];\r\n var unloadState = (_a = {\r\n reason: 1 /* TelemetryUnloadReason.PluginUnload */\r\n },\r\n _a[_DYN_IS_ASYNC /* @min:isAsync */] = isAsync,\r\n _a);\r\n _removePlugins(pluginsToRemove, unloadState, function (removed) {\r\n if (removed) {\r\n // Re-Initialize the plugin chain\r\n _initPluginChain({\r\n reason: 32 /* TelemetryUpdateReason.PluginRemoved */,\r\n removed: pluginsToRemove\r\n });\r\n }\r\n removeCb && removeCb(removed);\r\n });\r\n }\r\n };\r\n }\r\n return theExt;\r\n }\r\n function _getPluginChain() {\r\n if (!_pluginChain) {\r\n // copy the collection of extensions\r\n var extensions = (_extensions || []).slice();\r\n // During add / remove this may get called again, so don't read if already present\r\n if (arrIndexOf(extensions, _telemetryInitializerPlugin) === -1) {\r\n extensions[_DYN_PUSH /* @min:%2epush */](_telemetryInitializerPlugin);\r\n }\r\n _pluginChain = createTelemetryProxyChain(sortPlugins(extensions), _configHandler.cfg, _self);\r\n }\r\n return _pluginChain;\r\n }\r\n function _removePlugins(thePlugins, unloadState, removeComplete) {\r\n if (thePlugins && thePlugins[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n var unloadChain = createTelemetryProxyChain(thePlugins, _configHandler.cfg, _self);\r\n var unloadCtx = createProcessTelemetryUnloadContext(unloadChain, _self);\r\n unloadCtx[_DYN_ON_COMPLETE /* @min:%2eonComplete */](function () {\r\n var removed = false;\r\n // Remove the listed config extensions\r\n var newConfigExtensions = [];\r\n arrForEach(_configExtensions, function (plugin, idx) {\r\n if (!_isPluginPresent(plugin, thePlugins)) {\r\n newConfigExtensions[_DYN_PUSH /* @min:%2epush */](plugin);\r\n }\r\n else {\r\n removed = true;\r\n }\r\n });\r\n _configExtensions = newConfigExtensions;\r\n _pluginVersionString = null;\r\n _pluginVersionStringArr = null;\r\n // Re-Create the channel config\r\n var newChannelConfig = [];\r\n if (_channelConfig) {\r\n arrForEach(_channelConfig, function (queue, idx) {\r\n var newQueue = [];\r\n arrForEach(queue, function (channel) {\r\n if (!_isPluginPresent(channel, thePlugins)) {\r\n newQueue[_DYN_PUSH /* @min:%2epush */](channel);\r\n }\r\n else {\r\n removed = true;\r\n }\r\n });\r\n newChannelConfig[_DYN_PUSH /* @min:%2epush */](newQueue);\r\n });\r\n _channelConfig = newChannelConfig;\r\n }\r\n removeComplete && removeComplete(removed);\r\n _startLogPoller();\r\n });\r\n unloadCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](unloadState);\r\n }\r\n else {\r\n removeComplete(false);\r\n }\r\n }\r\n function _flushInternalLogs() {\r\n if (_logger && _logger.queue) {\r\n var queue = _logger.queue.slice(0);\r\n _logger.queue[_DYN_LENGTH /* @min:%2elength */] = 0;\r\n arrForEach(queue, function (logMessage) {\r\n var _a;\r\n var item = (_a = {},\r\n _a[_DYN_NAME /* @min:name */] = _internalLogsEventName ? _internalLogsEventName : \"InternalMessageId: \" + logMessage[_DYN_MESSAGE_ID /* @min:%2emessageId */],\r\n _a.iKey = _instrumentationKey,\r\n _a[_DYN_TIME /* @min:time */] = toISOString(new Date()),\r\n _a.baseType = _InternalLogMessage.dataType,\r\n _a.baseData = { message: logMessage[_DYN_MESSAGE /* @min:%2emessage */] },\r\n _a);\r\n _self.track(item);\r\n });\r\n }\r\n }\r\n function _flushChannels(isAsync, callBack, sendReason, cbTimeout) {\r\n // Setting waiting to one so that we don't call the callBack until we finish iterating\r\n var waiting = 1;\r\n var doneIterating = false;\r\n var cbTimer = null;\r\n cbTimeout = cbTimeout || 5000;\r\n function doCallback() {\r\n waiting--;\r\n if (doneIterating && waiting === 0) {\r\n cbTimer && cbTimer[_DYN_CANCEL /* @min:%2ecancel */]();\r\n cbTimer = null;\r\n callBack && callBack(doneIterating);\r\n callBack = null;\r\n }\r\n }\r\n if (_channels && _channels[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n var flushCtx = _createTelCtx()[_DYN_CREATE_NEW /* @min:%2ecreateNew */](_channels);\r\n flushCtx.iterate(function (plugin) {\r\n if (plugin.flush) {\r\n waiting++;\r\n var handled_1 = false;\r\n // Not all channels will call this callback for every scenario\r\n if (!plugin.flush(isAsync, function () {\r\n handled_1 = true;\r\n doCallback();\r\n }, sendReason)) {\r\n if (!handled_1) {\r\n // If any channel doesn't return true and it didn't call the callback, then we should assume that the callback\r\n // will never be called, so use a timeout to allow the channel(s) some time to \"finish\" before triggering any\r\n // followup function (such as unloading)\r\n if (isAsync && cbTimer == null) {\r\n cbTimer = scheduleTimeout(function () {\r\n cbTimer = null;\r\n doCallback();\r\n }, cbTimeout);\r\n }\r\n else {\r\n doCallback();\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n doneIterating = true;\r\n doCallback();\r\n return true;\r\n }\r\n function _initDebugListener() {\r\n // Lazily ensure that the notification manager is created\r\n !_notificationManager && _self[_DYN_GET_NOTIFY_MGR /* @min:%2egetNotifyMgr */]();\r\n // Will get recalled if any referenced config values are changed\r\n _addUnloadHook(_configHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\r\n var disableDbgExt = details.cfg.disableDbgExt;\r\n if (disableDbgExt === true && _debugListener) {\r\n // Remove any previously loaded debug listener\r\n _notificationManager[_DYN_REMOVE_NOTIFICATION_2 /* @min:%2eremoveNotificationListener */](_debugListener);\r\n _debugListener = null;\r\n }\r\n if (_notificationManager && !_debugListener && disableDbgExt !== true) {\r\n _debugListener = getDebugListener(details.cfg);\r\n _notificationManager[_DYN_ADD_NOTIFICATION_LIS1 /* @min:%2eaddNotificationListener */](_debugListener);\r\n }\r\n }));\r\n }\r\n function _initPerfManager() {\r\n // Will get recalled if any referenced config values are changed\r\n _addUnloadHook(_configHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\r\n var enablePerfMgr = details.cfg.enablePerfMgr;\r\n if (!enablePerfMgr && _cfgPerfManager) {\r\n // Remove any existing config based performance manager\r\n _cfgPerfManager = null;\r\n }\r\n if (enablePerfMgr) {\r\n // Set the performance manager creation function if not defined\r\n getSetValue(details.cfg, STR_CREATE_PERF_MGR, _createPerfManager);\r\n }\r\n }));\r\n }\r\n function _doUpdate(updateState) {\r\n var updateCtx = createProcessTelemetryUpdateContext(_getPluginChain(), _self);\r\n updateCtx[_DYN_ON_COMPLETE /* @min:%2eonComplete */](_startLogPoller);\r\n if (!_self._updateHook || _self._updateHook(updateCtx, updateState) !== true) {\r\n updateCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](updateState);\r\n }\r\n }\r\n function _logOrThrowError(message) {\r\n var logger = _self[_DYN_LOGGER /* @min:%2elogger */];\r\n if (logger) {\r\n // there should always be a logger\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 73 /* _eInternalMessageId.PluginException */, message);\r\n _startLogPoller();\r\n }\r\n else {\r\n throwError(message);\r\n }\r\n }\r\n function _notifyInvalidEvent(telemetryItem) {\r\n var manager = _self[_DYN_GET_NOTIFY_MGR /* @min:%2egetNotifyMgr */]();\r\n if (manager) {\r\n manager[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */]([telemetryItem], 2 /* eEventsDiscardedReason.InvalidEvent */);\r\n }\r\n }\r\n function _addUnloadHook(hooks) {\r\n _hookContainer.add(hooks);\r\n }\r\n });\r\n }\r\n AppInsightsCore.prototype.initialize = function (config, extensions, logger, notificationManager) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AppInsightsCore.prototype.getChannels = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n AppInsightsCore.prototype.track = function (telemetryItem) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AppInsightsCore.prototype.getProcessTelContext = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n AppInsightsCore.prototype.getNotifyMgr = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.\r\n * The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be\r\n * called.\r\n * @param listener - An INotificationListener object.\r\n */\r\n AppInsightsCore.prototype.addNotificationListener = function (listener) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - INotificationListener to remove.\r\n */\r\n AppInsightsCore.prototype.removeNotificationListener = function (listener) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Get the current cookie manager for this instance\r\n */\r\n AppInsightsCore.prototype.getCookieMgr = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Set the current cookie manager for this instance\r\n * @param cookieMgr - The manager, if set to null/undefined will cause the default to be created\r\n */\r\n AppInsightsCore.prototype.setCookieMgr = function (cookieMgr) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AppInsightsCore.prototype.getPerfMgr = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n AppInsightsCore.prototype.setPerfMgr = function (perfMgr) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AppInsightsCore.prototype.eventCnt = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return 0;\r\n };\r\n /**\r\n * Enable the timer that checks the logger.queue for log messages to be flushed.\r\n * Note: Since 3.0.1 and 2.8.13 this is no longer an interval timer but is a normal\r\n * timer that is only started when this function is called and then subsequently\r\n * only _if_ there are any logger.queue messages to be sent.\r\n */\r\n AppInsightsCore.prototype.pollInternalLogs = function (eventName) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Stop the timer that log messages from logger.queue when available\r\n */\r\n AppInsightsCore.prototype.stopPollingInternalLogs = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Add a telemetry processor to decorate or drop telemetry events.\r\n * @param telemetryInitializer - The Telemetry Initializer function\r\n * @returns - A ITelemetryInitializerHandler to enable the initializer to be removed\r\n */\r\n AppInsightsCore.prototype.addTelemetryInitializer = function (telemetryInitializer) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered\r\n * to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous\r\n * unload call return `true` stating that all plugins reported that they also unloaded, the recommended\r\n * approach is to create a new instance and initialize that instance.\r\n * This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable\r\n * to successfully remove any global references or they may just be completing the unload process asynchronously.\r\n * If you pass isAsync as `true` (also the default) and DO NOT pass a callback function then an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * will be returned which will resolve once the unload is complete. The actual implementation of the `IPromise`\r\n * will be a native Promise (if supported) or the default as supplied by [ts-async library](https://github.com/nevware21/ts-async)\r\n * @param isAsync - Can the unload be performed asynchronously (default)\r\n * @param unloadComplete - An optional callback that will be called once the unload has completed\r\n * @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the\r\n * unload. Defaults to 5 seconds.\r\n * @return Nothing or if occurring asynchronously a [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * which will be resolved once the unload is complete, the [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * will only be returned when no callback is provided and isAsync is true\r\n */\r\n AppInsightsCore.prototype.unload = function (isAsync, unloadComplete, cbTimeout) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AppInsightsCore.prototype.getPlugin = function (pluginIdentifier) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Add a new plugin to the installation\r\n * @param plugin - The new plugin to add\r\n * @param replaceExisting - should any existing plugin be replaced, default is false\r\n * @param doAsync - Should the add be performed asynchronously\r\n * @param addCb - [Optional] callback to call after the plugin has been added\r\n */\r\n AppInsightsCore.prototype.addPlugin = function (plugin, replaceExisting, doAsync, addCb) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Update the configuration used and broadcast the changes to all loaded plugins\r\n * @param newConfig - The new configuration is apply\r\n * @param mergeExisting - Should the new configuration merge with the existing or just replace it. Default is to true.\r\n */\r\n AppInsightsCore.prototype.updateCfg = function (newConfig, mergeExisting) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Returns the unique event namespace that should be used\r\n */\r\n AppInsightsCore.prototype.evtNamespace = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Add an unload handler that will be called when the SDK is being unloaded\r\n * @param handler - the handler\r\n */\r\n AppInsightsCore.prototype.addUnloadCb = function (handler) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Flush and send any batched / cached data immediately\r\n * @param async - send data asynchronously when true (defaults to true)\r\n * @param callBack - if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called.\r\n * If the caller doesn't return true the caller should assume that it may never be called.\r\n * @param sendReason - specify the reason that you are calling \"flush\" defaults to ManualFlush (1) if not specified\r\n * @returns - true if the callback will be return after the flush is complete otherwise the caller should assume that any provided callback will never be called\r\n */\r\n AppInsightsCore.prototype.flush = function (isAsync, callBack, sendReason) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Gets the current distributed trace context for this instance if available\r\n * @param createNew - Optional flag to create a new instance if one doesn't currently exist, defaults to true\r\n */\r\n AppInsightsCore.prototype.getTraceCtx = function (createNew) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Sets the current distributed trace context for this instance if available\r\n */\r\n AppInsightsCore.prototype.setTraceCtx = function (newTracectx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Add this hook so that it is automatically removed during unloading\r\n * @param hooks - The single hook or an array of IInstrumentHook objects\r\n */\r\n AppInsightsCore.prototype.addUnloadHook = function (hooks) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Watches and tracks changes for accesses to the current config, and if the accessed config changes the\r\n * handler will be recalled.\r\n * @param handler\r\n * @returns A watcher handler instance that can be used to remove itself when being unloaded\r\n */\r\n AppInsightsCore.prototype.onCfgChange = function (handler) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n AppInsightsCore.prototype.releaseQueue = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Hook for Core extensions to allow them to update their own configuration before updating all of the plugins.\r\n * @param updateCtx - The plugin update context\r\n * @param updateState - The Update State\r\n * @returns boolean - True means the extension class will call updateState otherwise the Core will\r\n */\r\n AppInsightsCore.prototype._updateHook = function (updateCtx, updateState) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return false;\r\n };\r\n return AppInsightsCore;\r\n}());\r\nexport { AppInsightsCore };\r\n//# sourceMappingURL=AppInsightsCore.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { arrForEach } from \"../array/forEach\";\r\nimport { arrSlice } from \"../array/slice\";\r\nimport { objCopyProps, objDeepCopy } from \"../object/copy\";\r\n/**\r\n * @internal\r\n * @ignore\r\n */\r\nfunction _doExtend(target, theArgs) {\r\n arrForEach(theArgs, function (theArg) {\r\n objCopyProps(target, theArg);\r\n });\r\n return target;\r\n}\r\nexport function deepExtend(target, obj1, obj2, obj3, obj4, obj5, obj6) {\r\n return _doExtend(objDeepCopy(target) || {}, arrSlice(arguments));\r\n}\r\nexport function objExtend(target, obj1, obj2, obj3, obj4, obj5, obj6) {\r\n return _doExtend(target || {}, arrSlice(arguments));\r\n}\r\n//# sourceMappingURL=extend.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { arrForEach } from \"../array/forEach\";\r\nimport { arrSlice } from \"../array/slice\";\r\nimport { objCopyProps, objDeepCopy } from \"../object/copy\";\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n */\r\nfunction _doExtend(target: T, theArgs: any[]): any {\r\n arrForEach(theArgs, (theArg) => {\r\n objCopyProps(target, theArg);\r\n });\r\n\r\n return target;\r\n}\r\n\r\n/**\r\n * Create a new object by merging the passed arguments, this is effectively the same as calling `objExtend({}, ...theArgs)` where\r\n * all of the arguments are added to a new object that is returned.\r\n * @group Object\r\n * @param target - The original object to be extended.\r\n * @param theArgs - The optional number of arguments to be copied\r\n * @returns - A new object or the original\r\n */\r\nexport function deepExtend(target: T, ...theArgs: any): T & any;\r\nexport function deepExtend(target: T, obj1?: T1, obj2?: T2, obj3?: T3, obj4?: T4, obj5?: T5, obj6?: T6): T & T1 & T2 & T3 & T4 & T5 & T6 {\r\n return _doExtend(objDeepCopy(target) || {}, arrSlice(arguments));\r\n}\r\n \r\n/**\r\n * Extend the target object by merging the passed arguments into it\r\n * @group Object\r\n * @param target - The object to be extended or overwritten\r\n * @param theArgs - The optional number of arguments to be copied\r\n * @returns - A new object or the original\r\n */\r\nexport function objExtend(target: T, ...theArgs: any): T & any;\r\nexport function objExtend(target: T, obj1?: T1, obj2?: T2, obj3?: T3, obj4?: T4, obj5?: T5, obj6?: T6): T & T1 & T2 & T3 & T4 & T5 & T6 {\r\n return _doExtend(target || {}, arrSlice(arguments));\r\n}\r\n\r\n ","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\nimport { arrForEach } from \"../array/forEach\";\r\nimport { fnCall } from \"../funcs/fnCall\";\r\nimport { isArray, isDate, isNullOrUndefined, isPrimitiveType } from \"../helpers/base\";\r\nimport { FUNCTION, NULL_VALUE, OBJECT } from \"../internal/constants\";\r\nimport { objDefine } from \"./define\";\r\nimport { isPlainObject } from \"./is_plain_object\";\r\n/**\r\n * @internal\r\n * @ignore\r\n * Generic Object deep copy handler which creates a new plain object and copies enumerable properties from\r\n * the source to the new target plain object. The source object does not have to be a plain object.\r\n * @param details - The details object for the current property being copied\r\n * @returns true if the handler processed the field.\r\n */\r\nvar _defaultDeepCopyHandler = function (details) {\r\n // Make sure we at least copy plain objects\r\n details.value && plainObjDeepCopyHandler(details);\r\n // Always return true so that the iteration completes\r\n return true;\r\n};\r\n/**\r\n * @internal\r\n * @ignore\r\n * The ordered default deep copy handlers\r\n */\r\nvar defaultDeepCopyHandlers = [\r\n arrayDeepCopyHandler,\r\n plainObjDeepCopyHandler,\r\n functionDeepCopyHandler,\r\n dateDeepCopyHandler\r\n];\r\n/**\r\n * @internal\r\n * @ignore\r\n * Helper function used for detecting and handling recursive properties\r\n * @param visitMap - The current map of objects that have been visited\r\n * @param source - The value (object) to be copied\r\n * @param newPath - The new access path from the origin to the current property\r\n * @param cb - The callback function to call if the current object has not already been processed.\r\n * @returns The new deep copied property, may be incomplete as the object is recursive and is still in the process of being copied\r\n */\r\nfunction _getSetVisited(visitMap, source, newPath, cb) {\r\n var theEntry;\r\n arrForEach(visitMap, function (entry) {\r\n if (entry.k === source) {\r\n theEntry = entry;\r\n return -1;\r\n }\r\n });\r\n if (!theEntry) {\r\n // Add the target to the visit map so that deep nested objects refer to the single instance\r\n // Even if we have not finished processing it yet.\r\n theEntry = { k: source, v: source };\r\n visitMap.push(theEntry);\r\n // Now call the copy callback so that it populates the target\r\n cb(theEntry);\r\n }\r\n return theEntry.v;\r\n}\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper which performs the recursive deep copy\r\n * @param visitMap - The current map of objects that have been visited\r\n * @param value - The value being copied\r\n * @param ctx - The current copy context\r\n * @param key - [Optional] the current `key` for the value from the source object\r\n * @returns The new deep copied instance of the value.\r\n */\r\nfunction _deepCopy(visitMap, value, ctx, key) {\r\n var userHandler = ctx.handler;\r\n var newPath = ctx.path ? (key ? ctx.path.concat(key) : ctx.path) : [];\r\n var newCtx = {\r\n handler: ctx.handler,\r\n src: ctx.src,\r\n path: newPath\r\n };\r\n var theType = typeof value;\r\n var isPlain = false;\r\n var isPrim = false;\r\n if (value && theType === OBJECT) {\r\n isPlain = isPlainObject(value);\r\n }\r\n else {\r\n isPrim = value === NULL_VALUE || isPrimitiveType(theType);\r\n }\r\n var details = {\r\n type: theType,\r\n isPrim: isPrim,\r\n isPlain: isPlain,\r\n value: value,\r\n result: value,\r\n path: newPath,\r\n origin: ctx.src,\r\n copy: function (source, newKey) {\r\n return _deepCopy(visitMap, source, newKey ? newCtx : ctx, newKey);\r\n },\r\n copyTo: function (target, source) {\r\n return _copyProps(visitMap, target, source, newCtx);\r\n }\r\n };\r\n if (!details.isPrim) {\r\n return _getSetVisited(visitMap, value, newPath, function (newEntry) {\r\n // Use an accessor to set the new value onto the new entry\r\n objDefine(details, \"result\", {\r\n g: function () {\r\n return newEntry.v;\r\n },\r\n s: function (newValue) {\r\n newEntry.v = newValue;\r\n }\r\n });\r\n var idx = 0;\r\n var handler = userHandler;\r\n while (!fnCall(handler || (idx < defaultDeepCopyHandlers.length ? defaultDeepCopyHandlers[idx++] : _defaultDeepCopyHandler), ctx, details)) {\r\n handler = NULL_VALUE;\r\n }\r\n });\r\n }\r\n // Allow the user handler to override the provided value\r\n if (userHandler && fnCall(userHandler, ctx, details)) {\r\n return details.result;\r\n }\r\n return value;\r\n}\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper to copy all of the enumerable properties from the source object to the new target object\r\n * @param visitMap - The current map of objects that have been visited\r\n * @param target - The target object to copy the properties to.\r\n * @param source - The source object to copy the properties from.\r\n * @param ctx - The current deep copy context\r\n * @returns The populated target object\r\n */\r\nfunction _copyProps(visitMap, target, source, ctx) {\r\n if (!isNullOrUndefined(source)) {\r\n // Copy all properties (not just own properties)\r\n for (var key in source) {\r\n // Perform a deep copy of the object\r\n target[key] = _deepCopy(visitMap, source[key], ctx, key);\r\n }\r\n }\r\n return target;\r\n}\r\n/**\r\n * Object helper to copy all of the enumerable properties from the source object to the target, the\r\n * properties are copied via {@link objDeepCopy}. Automatic handling of recursive properties was added in v0.4.4\r\n * @group Object\r\n * @param target - The target object to populated\r\n * @param source - The source object to copy the properties from\r\n * @param handler - An optional callback that lets you provide / overide the deep cloning (Since 0.4.4)\r\n * @returns The target object\r\n * @example\r\n * ```ts\r\n * let a: any = { a: 1 };\r\n * let b: any = { b: 2, d: new Date(), e: new TestClass(\"Hello Darkness\") };\r\n * a.b = b; // { a: 1, b: { b: 2} }\r\n * b.a = a; // { a: 1, b: { b: 2, a: { a: 1, { b: 2, a: ... }}}}\r\n *\r\n * function copyHandler(details: IObjDeepCopyHandlerDetails) {\r\n * // details.origin === a\r\n * // details.path[] is the path to the current value\r\n * if (details.value && isDate(details.value)) {\r\n * // So for the date path === [ \"b\", \"d\" ] which represents\r\n * // details.origin[\"b\"][\"d\"] === The Date\r\n *\r\n * // Create a clone the Date object and set as the \"newValue\"\r\n * details.value = new Date(details.value.getTime());\r\n *\r\n * // Return true to indicate that we have \"handled\" the conversion\r\n * // See objDeepCopy example for just reusing the original value (just don't replace details.value)\r\n * return true;\r\n * }\r\n *\r\n * return false;\r\n * }\r\n *\r\n * let c: any = objCopyProps({}, a, copyHandler);\r\n *\r\n * assert.notEqual(a, c, \"check a and c are not the same\");\r\n * assert.ok(c !== c.b.a, \"The root object won't be the same for the target reference as are are copying properties to our target\");\r\n * assert.ok(c.b === c.b.a.b, \"Check that the 2 'b' references are the same object\");\r\n * assert.ok(c.b.a === c.b.a.b.a, \"Check that the 2 'a' references are the same object\");\r\n * assert.ok(c.b.d === c.b.a.b.d, \"Check that the 2 'd' references are the same object\");\r\n * assert.ok(isDate(c.b.d), \"The copied date is still real 'Date' instance\");\r\n * assert.notEqual(c.b.d, a.b.d, \"And the copied date is not the same as the original\");\r\n * assert.equal(c.b.d.getTime(), a.b.d.getTime(), \"But the dates are the same\");\r\n *\r\n * assert.ok(isObject(c.b.d), \"The copied date is now an object\");\r\n * ```\r\n */\r\nexport function objCopyProps(target, source, handler) {\r\n var ctx = {\r\n handler: handler,\r\n src: source,\r\n path: []\r\n };\r\n return _copyProps([], target, source, ctx);\r\n}\r\n/**\r\n * Performs a deep copy of the source object, this is designed to work with base (plain) objects, arrays and primitives\r\n * if the source object contains class objects they will either be not cloned or may be considered non-operational after\r\n * performing a deep copy. ie. This is performing a deep copy of the objects properties so that altering the copy will\r\n * not mutate the source object hierarchy.\r\n * Automatic handling of recursive properties was added in v0.4.4.\r\n * @group Object\r\n * @group Object - Deep Copy\r\n * @param source - The source object to be copied\r\n * @param handler - An optional callback that lets you provide / overide the deep cloning (Since 0.4.4)\r\n * @return A new object which contains a deep copy of the source properties\r\n * @example\r\n * ```ts\r\n * let a: any = { a: 1 };\r\n * let b: any = { b: 2, d: new Date(), e: new TestClass(\"Hello Darkness\") };\r\n * a.b = b; // { a: 1, b: { b: 2} }\r\n * b.a = a; // { a: 1, b: { b: 2, a: { a: 1, { b: 2, a: ... }}}}\r\n *\r\n * function copyHandler(details: IObjDeepCopyHandlerDetails) {\r\n * // details.origin === a\r\n * // details.path[] is the path to the current value\r\n * if (details.value && isDate(details.value)) {\r\n * // So for the date path === [ \"b\", \"d\" ] which represents\r\n * // details.origin[\"b\"][\"d\"] === The Date\r\n *\r\n * // Return true to indicate that we have \"handled\" the conversion\r\n * // Which in this case will reuse the existing instance (as we didn't replace details.value)\r\n * // See objCopyProps example for replacing the Date instance\r\n * return true;\r\n * }\r\n *\r\n * return false;\r\n * }\r\n *\r\n * let c: any = objDeepCopy(a, copyHandler);\r\n *\r\n * assert.notEqual(a, c, \"check a and c are not the same\");\r\n * assert.ok(c === c.b.a, \"The root object won't be the same for the target reference\");\r\n * assert.ok(c.b === c.b.a.b, \"Check that the 2 'b' references are the same object\");\r\n * assert.ok(c.b.a === c.b.a.b.a, \"Check that the 2 'a' references are the same object\");\r\n * assert.ok(c.b.d === c.b.a.b.d, \"Check that the 2 'd' references are the same object\");\r\n * assert.ok(isDate(c.b.d), \"The copied date is still real 'Date' instance\");\r\n * assert.equal(c.b.d, a.b.d, \"And the copied date is the original date\");\r\n * assert.equal(c.b.d.getTime(), a.b.d.getTime(), \"But the dates are the same\");\r\n * assert.ok(isObject(c.b.d), \"The copied date is now an object\");\r\n * assert.ok(!isError(c.b.e), \"The copied error is no longer a real 'Error' instance\");\r\n * assert.ok(isObject(c.b.e), \"The copied error is now an object\");\r\n * assert.equal(42, c.b.e.value, \"Expect that the local property was copied\");\r\n * ```\r\n */\r\nexport function objDeepCopy(source, handler) {\r\n var ctx = {\r\n handler: handler,\r\n src: source\r\n };\r\n return _deepCopy([], source, ctx);\r\n}\r\n/**\r\n * Deep copy handler to identify and copy arrays.\r\n * @since 0.4.4\r\n * @group Object - Deep Copy\r\n * @param details - The details object for the current property being copied\r\n * @returns `true` if the current value is a function otherwise `false`\r\n */\r\nexport function arrayDeepCopyHandler(details) {\r\n var value = details.value;\r\n if (isArray(value)) {\r\n // Assign the \"result\" value before performing any additional deep Copying, so any recursive object get a reference to this instance\r\n var target = details.result = [];\r\n target.length = value.length;\r\n // Copying all properties as arrays can contain non-indexed based properties\r\n details.copyTo(target, value);\r\n return true;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Deep copy handler to identify and copy Date instances.\r\n * @since 0.4.4\r\n * @group Object - Deep Copy\r\n * @param details - The details object for the current property being copied\r\n * @returns `true` if the current value is a function otherwise `false`\r\n */\r\nexport function dateDeepCopyHandler(details) {\r\n var value = details.value;\r\n if (isDate(value)) {\r\n details.result = new Date(value.getTime());\r\n return true;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Deep copy handler to identify and copy functions. This handler just returns the original\r\n * function so the original function will be assigned to any new deep copied instance.\r\n * @since 0.4.4\r\n * @group Object - Deep Copy\r\n * @param details - The details object for the current property being copied\r\n * @returns `true` if the current value is a function otherwise `false`\r\n */\r\nexport function functionDeepCopyHandler(details) {\r\n if (details.type === FUNCTION) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Deep copy handler to identify and copy plain objects.\r\n * @since 0.4.4\r\n * @group Object - Deep Copy\r\n * @param details - The details object for the current property being copied\r\n * @returns `true` if the current value is a function otherwise `false`\r\n */\r\nexport function plainObjDeepCopyHandler(details) {\r\n var value = details.value;\r\n if (value && details.isPlain) {\r\n // Assign the \"result\" value before performing any additional deep Copying, so any recursive object get a reference to this instance\r\n var target = details.result = {};\r\n details.copyTo(target, value);\r\n return true;\r\n }\r\n return false;\r\n}\r\n//# sourceMappingURL=copy.js.map","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 Nevware21\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { arrForEach } from \"../array/forEach\";\r\nimport { fnCall } from \"../funcs/fnCall\";\r\nimport { isArray, isDate, isNullOrUndefined, isPrimitiveType } from \"../helpers/base\";\r\nimport { FUNCTION, NULL_VALUE, OBJECT } from \"../internal/constants\";\r\nimport { objDefine } from \"./define\";\r\nimport { isPlainObject } from \"./is_plain_object\";\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Provides the current context while performing a deep copy\r\n */\r\ninterface _DeepCopyContext {\r\n handler: ObjDeepCopyHandler;\r\n src: any;\r\n path?: Array;\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Defines the type used for tracking visited objects during deep copy to identify recursive\r\n * objects.\r\n */\r\ninterface _RecursiveVisitMap {\r\n k: any;\r\n v: any;\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Generic Object deep copy handler which creates a new plain object and copies enumerable properties from\r\n * the source to the new target plain object. The source object does not have to be a plain object.\r\n * @param details - The details object for the current property being copied\r\n * @returns true if the handler processed the field.\r\n */\r\nconst _defaultDeepCopyHandler = (details: IObjDeepCopyHandlerDetails): boolean => {\r\n // Make sure we at least copy plain objects\r\n details.value && plainObjDeepCopyHandler(details);\r\n\r\n // Always return true so that the iteration completes\r\n return true;\r\n};\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * The ordered default deep copy handlers\r\n */\r\nconst defaultDeepCopyHandlers: ObjDeepCopyHandler[] = [\r\n arrayDeepCopyHandler,\r\n plainObjDeepCopyHandler,\r\n functionDeepCopyHandler,\r\n dateDeepCopyHandler\r\n];\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Helper function used for detecting and handling recursive properties\r\n * @param visitMap - The current map of objects that have been visited\r\n * @param source - The value (object) to be copied\r\n * @param newPath - The new access path from the origin to the current property\r\n * @param cb - The callback function to call if the current object has not already been processed.\r\n * @returns The new deep copied property, may be incomplete as the object is recursive and is still in the process of being copied\r\n */\r\nfunction _getSetVisited(visitMap: _RecursiveVisitMap[], source: any, newPath: Array, cb: (newEntry: _RecursiveVisitMap) => void) {\r\n let theEntry: _RecursiveVisitMap;\r\n arrForEach(visitMap, (entry) => {\r\n if (entry.k === source) {\r\n theEntry = entry;\r\n return -1;\r\n }\r\n });\r\n\r\n if (!theEntry) {\r\n // Add the target to the visit map so that deep nested objects refer to the single instance\r\n // Even if we have not finished processing it yet.\r\n theEntry = { k: source, v: source };\r\n visitMap.push(theEntry);\r\n\r\n // Now call the copy callback so that it populates the target\r\n cb(theEntry);\r\n }\r\n\r\n return theEntry.v;\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper which performs the recursive deep copy\r\n * @param visitMap - The current map of objects that have been visited\r\n * @param value - The value being copied\r\n * @param ctx - The current copy context\r\n * @param key - [Optional] the current `key` for the value from the source object\r\n * @returns The new deep copied instance of the value.\r\n */\r\nfunction _deepCopy(visitMap: _RecursiveVisitMap[], value: T, ctx: _DeepCopyContext, key?: string | number | symbol): T {\r\n let userHandler = ctx.handler;\r\n let newPath = ctx.path ? (key ? ctx.path.concat(key) : ctx.path) : [];\r\n\r\n let newCtx: _DeepCopyContext = {\r\n handler: ctx.handler,\r\n src: ctx.src,\r\n path: newPath\r\n };\r\n\r\n const theType = typeof value;\r\n let isPlain = false;\r\n let isPrim = false;\r\n if (value && theType === OBJECT) {\r\n isPlain = isPlainObject(value);\r\n } else {\r\n isPrim = value === NULL_VALUE || isPrimitiveType(theType);\r\n }\r\n\r\n let details: IObjDeepCopyHandlerDetails = {\r\n type: theType,\r\n isPrim: isPrim,\r\n isPlain: isPlain,\r\n value: value,\r\n result: value,\r\n path: newPath,\r\n origin: ctx.src,\r\n copy: (source: T, newKey?: string | number | symbol): T => {\r\n return _deepCopy(visitMap, source, newKey ? newCtx : ctx, newKey);\r\n },\r\n copyTo: (target: T, source: T): T => {\r\n return _copyProps(visitMap, target, source, newCtx);\r\n }\r\n };\r\n\r\n if (!details.isPrim) {\r\n return _getSetVisited(visitMap, value, newPath, (newEntry) => {\r\n\r\n // Use an accessor to set the new value onto the new entry\r\n objDefine(details, \"result\", {\r\n g: function () {\r\n return newEntry.v;\r\n },\r\n s: function (newValue: any) {\r\n newEntry.v = newValue;\r\n }\r\n });\r\n\r\n let idx = 0;\r\n let handler = userHandler;\r\n while (!fnCall(handler || (idx < defaultDeepCopyHandlers.length ? defaultDeepCopyHandlers[idx++] : _defaultDeepCopyHandler), ctx, details)) {\r\n handler = NULL_VALUE;\r\n }\r\n });\r\n }\r\n\r\n // Allow the user handler to override the provided value\r\n if (userHandler && fnCall(userHandler, ctx, details)) {\r\n return details.result;\r\n }\r\n\r\n return value;\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal helper to copy all of the enumerable properties from the source object to the new target object\r\n * @param visitMap - The current map of objects that have been visited\r\n * @param target - The target object to copy the properties to.\r\n * @param source - The source object to copy the properties from.\r\n * @param ctx - The current deep copy context\r\n * @returns The populated target object\r\n */\r\nfunction _copyProps(visitMap: _RecursiveVisitMap[], target: T, source: T, ctx: _DeepCopyContext) {\r\n if (!isNullOrUndefined(source)) {\r\n // Copy all properties (not just own properties)\r\n for (const key in source) {\r\n // Perform a deep copy of the object\r\n target[key] = _deepCopy(visitMap, source[key], ctx, key);\r\n }\r\n }\r\n\r\n return target;\r\n}\r\n\r\n/**\r\n * Object helper to copy all of the enumerable properties from the source object to the target, the\r\n * properties are copied via {@link objDeepCopy}. Automatic handling of recursive properties was added in v0.4.4\r\n * @group Object\r\n * @param target - The target object to populated\r\n * @param source - The source object to copy the properties from\r\n * @param handler - An optional callback that lets you provide / overide the deep cloning (Since 0.4.4)\r\n * @returns The target object\r\n * @example\r\n * ```ts\r\n * let a: any = { a: 1 };\r\n * let b: any = { b: 2, d: new Date(), e: new TestClass(\"Hello Darkness\") };\r\n * a.b = b; // { a: 1, b: { b: 2} }\r\n * b.a = a; // { a: 1, b: { b: 2, a: { a: 1, { b: 2, a: ... }}}}\r\n *\r\n * function copyHandler(details: IObjDeepCopyHandlerDetails) {\r\n * // details.origin === a\r\n * // details.path[] is the path to the current value\r\n * if (details.value && isDate(details.value)) {\r\n * // So for the date path === [ \"b\", \"d\" ] which represents\r\n * // details.origin[\"b\"][\"d\"] === The Date\r\n *\r\n * // Create a clone the Date object and set as the \"newValue\"\r\n * details.value = new Date(details.value.getTime());\r\n *\r\n * // Return true to indicate that we have \"handled\" the conversion\r\n * // See objDeepCopy example for just reusing the original value (just don't replace details.value)\r\n * return true;\r\n * }\r\n *\r\n * return false;\r\n * }\r\n *\r\n * let c: any = objCopyProps({}, a, copyHandler);\r\n *\r\n * assert.notEqual(a, c, \"check a and c are not the same\");\r\n * assert.ok(c !== c.b.a, \"The root object won't be the same for the target reference as are are copying properties to our target\");\r\n * assert.ok(c.b === c.b.a.b, \"Check that the 2 'b' references are the same object\");\r\n * assert.ok(c.b.a === c.b.a.b.a, \"Check that the 2 'a' references are the same object\");\r\n * assert.ok(c.b.d === c.b.a.b.d, \"Check that the 2 'd' references are the same object\");\r\n * assert.ok(isDate(c.b.d), \"The copied date is still real 'Date' instance\");\r\n * assert.notEqual(c.b.d, a.b.d, \"And the copied date is not the same as the original\");\r\n * assert.equal(c.b.d.getTime(), a.b.d.getTime(), \"But the dates are the same\");\r\n *\r\n * assert.ok(isObject(c.b.d), \"The copied date is now an object\");\r\n * ```\r\n */\r\nexport function objCopyProps(target: T, source: any, handler?: ObjDeepCopyHandler) {\r\n let ctx: _DeepCopyContext = {\r\n handler: handler,\r\n src: source,\r\n path: []\r\n };\r\n\r\n return _copyProps([], target, source, ctx);\r\n}\r\n\r\n/**\r\n * Context details passed to the deep copy handler to allow it parse the current value based on the original source\r\n * and path to reach the current value. The provided value should be updated with the value to by copied into the\r\n * new deep copy and will be used when the handler returns true.\r\n * @since 0.4.4\r\n * @group Object - Deep Copy\r\n */\r\nexport interface IObjDeepCopyHandlerDetails {\r\n /**\r\n * Identifies the type of the value as per `typeof value`, saves each check having to process this value.\r\n */\r\n type: string;\r\n\r\n /**\r\n * Identifies whether the type of the value is considered to be a primitive value\r\n */\r\n isPrim: boolean;\r\n\r\n /**\r\n * Identifies whether the type is a plain object or not, this also saves each handler from checking\r\n * the `type`, currently the type will also be \"object\" if this is `true`.\r\n * @since 0.9.6\r\n */\r\n isPlain: boolean;\r\n\r\n /**\r\n * The current value to be processed, replace this value with the new deep copied value to use when returning\r\n * true from the handler. Ignored when the handler returns false.\r\n */\r\n readonly value: any;\r\n\r\n /**\r\n * Replace this value with the new deep copied value (defaults to the same as the value property) this value will be\r\n * used when returning true from the handler. Ignored when the handler returns false.\r\n */\r\n result: any;\r\n\r\n /**\r\n * A array of keys from the orginal source (origin) object which lead to the current value\r\n */\r\n path: Array;\r\n\r\n /**\r\n * The original source object passed into the `objDeepCopy()` or `objCopyProps()` functions.\r\n */\r\n origin?: any;\r\n\r\n /**\r\n * Continue the deep copy with the current context and recursive checks, effectively calls {@link objDeepCopy}\r\n * but keeps the current context and recursive references.\r\n * @param source - The source object to be copied\r\n */\r\n copy(source: T, key?: string | number | symbol): T;\r\n\r\n /**\r\n * Continue the deep copy with the current context and recursive checks by copying all of the properties\r\n * from the source to the target instance, effectively calls {@link objCopyProps} but keeps the current context\r\n * and recursive references.\r\n * @param target - The target object to populated\r\n * @param source - The source object to copy the properties from\r\n */\r\n copyTo(target: T, source: T): T;\r\n}\r\n\r\n/**\r\n * An optional deep copy handler that lets you provide your own logic for deep copying objects, will\r\n * only be called once per object/property combination, so if an object is recursively included it\r\n * will only get called for the first instance.\r\n * Handlers SHOULD assign the \"result\" value with the new target instance BEFORE performing any additional deep copying,\r\n * so any recursive objects will get a reference to the new instance and not keep attempting to create new copies.\r\n * @since 0.4.4\r\n * @group Object - Deep Copy\r\n * @return true if handled and the value in details should be used otherwise false to continue with the default handling\r\n * The library includes several helpers which can be reused by any user provided handler\r\n * - {@link functionDeepCopyHandler} - Used to copy functions\r\n * - {@link arrayDeepCopyHandler} - Used to copy arrays\r\n * - {@link plainObjDeepCopyHandler} - Used to copy plain objects\r\n * - {@link dateDeepCopyHandler} - Used to copy date instances\r\n */\r\nexport type ObjDeepCopyHandler = (details: IObjDeepCopyHandlerDetails) => boolean;\r\n\r\n/**\r\n * Performs a deep copy of the source object, this is designed to work with base (plain) objects, arrays and primitives\r\n * if the source object contains class objects they will either be not cloned or may be considered non-operational after\r\n * performing a deep copy. ie. This is performing a deep copy of the objects properties so that altering the copy will\r\n * not mutate the source object hierarchy.\r\n * Automatic handling of recursive properties was added in v0.4.4.\r\n * @group Object\r\n * @group Object - Deep Copy\r\n * @param source - The source object to be copied\r\n * @param handler - An optional callback that lets you provide / overide the deep cloning (Since 0.4.4)\r\n * @return A new object which contains a deep copy of the source properties\r\n * @example\r\n * ```ts\r\n * let a: any = { a: 1 };\r\n * let b: any = { b: 2, d: new Date(), e: new TestClass(\"Hello Darkness\") };\r\n * a.b = b; // { a: 1, b: { b: 2} }\r\n * b.a = a; // { a: 1, b: { b: 2, a: { a: 1, { b: 2, a: ... }}}}\r\n *\r\n * function copyHandler(details: IObjDeepCopyHandlerDetails) {\r\n * // details.origin === a\r\n * // details.path[] is the path to the current value\r\n * if (details.value && isDate(details.value)) {\r\n * // So for the date path === [ \"b\", \"d\" ] which represents\r\n * // details.origin[\"b\"][\"d\"] === The Date\r\n *\r\n * // Return true to indicate that we have \"handled\" the conversion\r\n * // Which in this case will reuse the existing instance (as we didn't replace details.value)\r\n * // See objCopyProps example for replacing the Date instance\r\n * return true;\r\n * }\r\n *\r\n * return false;\r\n * }\r\n *\r\n * let c: any = objDeepCopy(a, copyHandler);\r\n *\r\n * assert.notEqual(a, c, \"check a and c are not the same\");\r\n * assert.ok(c === c.b.a, \"The root object won't be the same for the target reference\");\r\n * assert.ok(c.b === c.b.a.b, \"Check that the 2 'b' references are the same object\");\r\n * assert.ok(c.b.a === c.b.a.b.a, \"Check that the 2 'a' references are the same object\");\r\n * assert.ok(c.b.d === c.b.a.b.d, \"Check that the 2 'd' references are the same object\");\r\n * assert.ok(isDate(c.b.d), \"The copied date is still real 'Date' instance\");\r\n * assert.equal(c.b.d, a.b.d, \"And the copied date is the original date\");\r\n * assert.equal(c.b.d.getTime(), a.b.d.getTime(), \"But the dates are the same\");\r\n * assert.ok(isObject(c.b.d), \"The copied date is now an object\");\r\n * assert.ok(!isError(c.b.e), \"The copied error is no longer a real 'Error' instance\");\r\n * assert.ok(isObject(c.b.e), \"The copied error is now an object\");\r\n * assert.equal(42, c.b.e.value, \"Expect that the local property was copied\");\r\n * ```\r\n */\r\nexport function objDeepCopy(source: T, handler?: ObjDeepCopyHandler): T {\r\n let ctx: _DeepCopyContext = {\r\n handler: handler,\r\n src: source\r\n };\r\n\r\n return _deepCopy([], source, ctx);\r\n}\r\n\r\n/**\r\n * Deep copy handler to identify and copy arrays.\r\n * @since 0.4.4\r\n * @group Object - Deep Copy\r\n * @param details - The details object for the current property being copied\r\n * @returns `true` if the current value is a function otherwise `false`\r\n */\r\nexport function arrayDeepCopyHandler(details: IObjDeepCopyHandlerDetails): boolean {\r\n let value = details.value;\r\n if (isArray(value)) {\r\n // Assign the \"result\" value before performing any additional deep Copying, so any recursive object get a reference to this instance\r\n let target: any[] = details.result = [];\r\n target.length = value.length;\r\n\r\n // Copying all properties as arrays can contain non-indexed based properties\r\n details.copyTo(target, value);\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Deep copy handler to identify and copy Date instances.\r\n * @since 0.4.4\r\n * @group Object - Deep Copy\r\n * @param details - The details object for the current property being copied\r\n * @returns `true` if the current value is a function otherwise `false`\r\n */\r\nexport function dateDeepCopyHandler(details: IObjDeepCopyHandlerDetails) {\r\n let value = details.value;\r\n if (isDate(value)) {\r\n details.result = new Date(value.getTime());\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Deep copy handler to identify and copy functions. This handler just returns the original\r\n * function so the original function will be assigned to any new deep copied instance.\r\n * @since 0.4.4\r\n * @group Object - Deep Copy\r\n * @param details - The details object for the current property being copied\r\n * @returns `true` if the current value is a function otherwise `false`\r\n */\r\nexport function functionDeepCopyHandler(details: IObjDeepCopyHandlerDetails): boolean {\r\n if (details.type === FUNCTION) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Deep copy handler to identify and copy plain objects.\r\n * @since 0.4.4\r\n * @group Object - Deep Copy\r\n * @param details - The details object for the current property being copied\r\n * @returns `true` if the current value is a function otherwise `false`\r\n */\r\nexport function plainObjDeepCopyHandler(details: IObjDeepCopyHandlerDetails): boolean {\r\n let value = details.value;\r\n if (value && details.isPlain) {\r\n // Assign the \"result\" value before performing any additional deep Copying, so any recursive object get a reference to this instance\r\n let target = details.result = {};\r\n details.copyTo(target, value);\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport var ChannelControllerPriority = 500;\r\n//# sourceMappingURL=Constants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { createAllPromise, createPromise, doAwaitResponse } from \"@nevware21/ts-async\";\r\nimport { arrForEach, arrIndexOf, objDefine, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { createDynamicConfig } from \"../Config/DynamicConfig\";\r\nimport { _DYN_ADD_NOTIFICATION_LIS1, _DYN_IS_ASYNC, _DYN_IS_CHILD_EVT, _DYN_PUSH, _DYN_REMOVE_NOTIFICATION_2, _DYN_SPLICE, _DYN_UNLOAD, _DYN_WATCH } from \"../__DynamicConstants\";\r\nimport { STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_EVENTS_SENT, STR_PERF_EVENT } from \"./InternalConstants\";\r\nvar defaultValues = {\r\n perfEvtsSendAll: false\r\n};\r\nfunction _runListeners(listeners, name, isAsync, callback) {\r\n arrForEach(listeners, function (listener) {\r\n if (listener && listener[name]) {\r\n if (isAsync) {\r\n scheduleTimeout(function () { return callback(listener); }, 0);\r\n }\r\n else {\r\n try {\r\n callback(listener);\r\n }\r\n catch (e) {\r\n // Catch errors to ensure we don't block sending the requests\r\n }\r\n }\r\n }\r\n });\r\n}\r\n/**\r\n * Class to manage sending notifications to all the listeners.\r\n */\r\nvar NotificationManager = /** @class */ (function () {\r\n function NotificationManager(config) {\r\n this.listeners = [];\r\n var perfEvtsSendAll;\r\n var unloadHandler;\r\n var _listeners = [];\r\n var cfgHandler = createDynamicConfig(config, defaultValues);\r\n unloadHandler = cfgHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\r\n perfEvtsSendAll = !!details.cfg.perfEvtsSendAll;\r\n });\r\n dynamicProto(NotificationManager, this, function (_self) {\r\n objDefine(_self, \"listeners\", {\r\n g: function () { return _listeners; }\r\n });\r\n _self[_DYN_ADD_NOTIFICATION_LIS1 /* @min:%2eaddNotificationListener */] = function (listener) {\r\n _listeners[_DYN_PUSH /* @min:%2epush */](listener);\r\n };\r\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - AWTNotificationListener to remove.\r\n */\r\n _self[_DYN_REMOVE_NOTIFICATION_2 /* @min:%2eremoveNotificationListener */] = function (listener) {\r\n var index = arrIndexOf(_listeners, listener);\r\n while (index > -1) {\r\n _listeners[_DYN_SPLICE /* @min:%2esplice */](index, 1);\r\n index = arrIndexOf(_listeners, listener);\r\n }\r\n };\r\n /**\r\n * Notification for events sent.\r\n * @param events - The array of events that have been sent.\r\n */\r\n _self[STR_EVENTS_SENT /* @min:%2eeventsSent */] = function (events) {\r\n _runListeners(_listeners, STR_EVENTS_SENT, true, function (listener) {\r\n listener[STR_EVENTS_SENT /* @min:%2eeventsSent */](events);\r\n });\r\n };\r\n /**\r\n * Notification for events being discarded.\r\n * @param events - The array of events that have been discarded by the SDK.\r\n * @param reason - The reason for which the SDK discarded the events. The EventsDiscardedReason\r\n * constant should be used to check the different values.\r\n */\r\n _self[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */] = function (events, reason) {\r\n _runListeners(_listeners, STR_EVENTS_DISCARDED, true, function (listener) {\r\n listener[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */](events, reason);\r\n });\r\n };\r\n /**\r\n * [Optional] A function called when the events have been requested to be sent to the sever.\r\n * @param sendReason - The reason why the event batch is being sent.\r\n * @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.\r\n */\r\n _self[STR_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */] = function (sendReason, isAsync) {\r\n _runListeners(_listeners, STR_EVENTS_SEND_REQUEST, isAsync, function (listener) {\r\n listener[STR_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */](sendReason, isAsync);\r\n });\r\n };\r\n _self[STR_PERF_EVENT /* @min:%2eperfEvent */] = function (perfEvent) {\r\n if (perfEvent) {\r\n // Send all events or only parent events\r\n if (perfEvtsSendAll || !perfEvent[_DYN_IS_CHILD_EVT /* @min:%2eisChildEvt */]()) {\r\n _runListeners(_listeners, STR_PERF_EVENT, false, function (listener) {\r\n if (perfEvent[_DYN_IS_ASYNC /* @min:%2eisAsync */]) {\r\n scheduleTimeout(function () { return listener[STR_PERF_EVENT /* @min:%2eperfEvent */](perfEvent); }, 0);\r\n }\r\n else {\r\n listener[STR_PERF_EVENT /* @min:%2eperfEvent */](perfEvent);\r\n }\r\n });\r\n }\r\n }\r\n };\r\n _self[_DYN_UNLOAD /* @min:%2eunload */] = function (isAsync) {\r\n var _finishUnload = function () {\r\n unloadHandler && unloadHandler.rm();\r\n unloadHandler = null;\r\n _listeners = [];\r\n };\r\n var waiting;\r\n _runListeners(_listeners, \"unload\", false, function (listener) {\r\n var asyncUnload = listener[_DYN_UNLOAD /* @min:%2eunload */](isAsync);\r\n if (asyncUnload) {\r\n if (!waiting) {\r\n waiting = [];\r\n }\r\n waiting[_DYN_PUSH /* @min:%2epush */](asyncUnload);\r\n }\r\n });\r\n if (waiting) {\r\n return createPromise(function (resolve) {\r\n return doAwaitResponse(createAllPromise(waiting), function () {\r\n _finishUnload();\r\n resolve();\r\n });\r\n });\r\n }\r\n else {\r\n _finishUnload();\r\n }\r\n };\r\n });\r\n }\r\n /**\r\n * Adds a notification listener.\r\n * @param listener - The notification listener to be added.\r\n */\r\n NotificationManager.prototype.addNotificationListener = function (listener) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - AWTNotificationListener to remove.\r\n */\r\n NotificationManager.prototype.removeNotificationListener = function (listener) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Notification for events sent.\r\n * @param events - The array of events that have been sent.\r\n */\r\n NotificationManager.prototype.eventsSent = function (events) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Notification for events being discarded.\r\n * @param events - The array of events that have been discarded by the SDK.\r\n * @param reason - The reason for which the SDK discarded the events. The EventsDiscardedReason\r\n * constant should be used to check the different values.\r\n */\r\n NotificationManager.prototype.eventsDiscarded = function (events, reason) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * [Optional] A function called when the events have been requested to be sent to the sever.\r\n * @param sendReason - The reason why the event batch is being sent.\r\n * @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.\r\n */\r\n NotificationManager.prototype.eventsSendRequest = function (sendReason, isAsync) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * [Optional] This event is sent if you have enabled perf events, they are primarily used to track internal performance testing and debugging\r\n * the event can be displayed via the debug plugin extension.\r\n * @param perfEvent\r\n */\r\n NotificationManager.prototype.perfEvent = function (perfEvent) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Unload and remove any state that this INotificationManager may be holding, this is generally called when the\r\n * owning SDK is being unloaded.\r\n * @param isAsync - Can the unload be performed asynchronously (default)\r\n * @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then\r\n * the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * / Promise to allow any listeners to wait for the operation to complete.\r\n */\r\n NotificationManager.prototype.unload = function (isAsync) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return NotificationManager;\r\n}());\r\nexport { NotificationManager };\r\n//# sourceMappingURL=NotificationManager.js.map","// // Copyright (c) Microsoft Corporation. All rights reserved.\r\n// // Licensed under the MIT License.\r\nimport { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { arrAppend, arrForEach, dumpObj } from \"@nevware21/ts-utils\";\r\nimport { _DYN_APPLY, _DYN_DIAG_LOG, _DYN_LENGTH, _DYN_PROCESS_NEXT, _DYN_SPLICE, _DYN__DO_TEARDOWN } from \"../__DynamicConstants\";\r\nimport { BaseTelemetryPlugin } from \"./BaseTelemetryPlugin\";\r\nimport { _throwInternal } from \"./DiagnosticLogger\";\r\nimport { getExceptionName } from \"./HelperFuncs\";\r\nimport { STR_PROCESS_TELEMETRY } from \"./InternalConstants\";\r\nfunction _addInitializer(_initializers, id, telemetryInitializer) {\r\n var theInitializer = {\r\n id: id,\r\n fn: telemetryInitializer\r\n };\r\n arrAppend(_initializers, theInitializer);\r\n var handler = {\r\n remove: function () {\r\n arrForEach(_initializers, function (initializer, idx) {\r\n if (initializer.id === theInitializer.id) {\r\n _initializers[_DYN_SPLICE /* @min:%2esplice */](idx, 1);\r\n return -1;\r\n }\r\n });\r\n }\r\n };\r\n return handler;\r\n}\r\nfunction _runInitializers(_initializers, item, logger) {\r\n var doNotSendItem = false;\r\n var telemetryInitializersCount = _initializers[_DYN_LENGTH /* @min:%2elength */];\r\n for (var i = 0; i < telemetryInitializersCount; ++i) {\r\n var telemetryInitializer = _initializers[i];\r\n if (telemetryInitializer) {\r\n try {\r\n if (telemetryInitializer.fn[_DYN_APPLY /* @min:%2eapply */](null, [item]) === false) {\r\n doNotSendItem = true;\r\n break;\r\n }\r\n }\r\n catch (e) {\r\n // log error but dont stop executing rest of the telemetry initializers\r\n // doNotSendItem = true;\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 64 /* _eInternalMessageId.TelemetryInitializerFailed */, \"Telemetry initializer failed: \" + getExceptionName(e), { exception: dumpObj(e) }, true);\r\n }\r\n }\r\n }\r\n return !doNotSendItem;\r\n}\r\nvar TelemetryInitializerPlugin = /** @class */ (function (_super) {\r\n __extends(TelemetryInitializerPlugin, _super);\r\n function TelemetryInitializerPlugin() {\r\n var _this = _super.call(this) || this;\r\n _this.identifier = \"TelemetryInitializerPlugin\";\r\n _this.priority = 199;\r\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\r\n var _id;\r\n var _initializers;\r\n _initDefaults();\r\n dynamicProto(TelemetryInitializerPlugin, _this, function (_self, _base) {\r\n _self.addTelemetryInitializer = function (telemetryInitializer) {\r\n return _addInitializer(_initializers, _id++, telemetryInitializer);\r\n };\r\n _self[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */] = function (item, itemCtx) {\r\n if (_runInitializers(_initializers, item, itemCtx ? itemCtx[_DYN_DIAG_LOG /* @min:%2ediagLog */]() : _self[_DYN_DIAG_LOG /* @min:%2ediagLog */]())) {\r\n _self[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](item, itemCtx);\r\n }\r\n };\r\n _self[_DYN__DO_TEARDOWN /* @min:%2e_doTeardown */] = function () {\r\n _initDefaults();\r\n };\r\n });\r\n function _initDefaults() {\r\n _id = 0;\r\n _initializers = [];\r\n }\r\n return _this;\r\n }\r\n /**\r\n * Add a telemetry processor to decorate or drop telemetry events.\r\n * @param telemetryInitializer - The Telemetry Initializer function\r\n * @returns - A ITelemetryInitializerHandler to enable the initializer to be removed\r\n */\r\n TelemetryInitializerPlugin.prototype.addTelemetryInitializer = function (telemetryInitializer) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n TelemetryInitializerPlugin.prototype.processTelemetry = function (env, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return TelemetryInitializerPlugin;\r\n}(BaseTelemetryPlugin));\r\nexport { TelemetryInitializerPlugin };\r\n//# sourceMappingURL=TelemetryInitializerPlugin.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar _a;\r\nimport { __assign, __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { DisabledPropertyName, PropertiesPluginIdentifier, RemoteDependencyData, RequestHeaders, correlationIdCanIncludeCorrelationHeader, correlationIdGetCorrelationContext, createDistributedTraceContextFromTrace, createTelemetryItem, createTraceParent, dateTimeUtilsNow, formatTraceParent, isInternalApplicationInsightsEndpoint } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, InstrumentFunc, InstrumentProto, _throwInternal, arrForEach, createProcessTelemetryContext, createUniqueNamespace, dumpObj, eventOn, generateW3CId, getExceptionName, getGlobal, getIEVersion, getLocation, getPerformance, isFunction, isNullOrUndefined, isString, isXhrSupported, mergeEvtNamespace, onConfigChange, strPrototype, strTrim } from \"@microsoft/applicationinsights-core-js\";\r\nimport { isWebWorker, objFreeze, scheduleTimeout, strIndexOf, strSubstr, strSubstring } from \"@nevware21/ts-utils\";\r\nimport { STR_PROPERTIES } from \"./InternalConstants\";\r\nimport { _DYN_ABORTED, _DYN_ABORT_DONE, _DYN_ADD_REQUEST_CONTEXT, _DYN_AJAX_DIAGNOSTICS_MES16, _DYN_AJAX_PERF_LOOKUP_DEL10, _DYN_CONTEXT, _DYN_CORE, _DYN_CORRELATION_CONTEXT, _DYN_DISABLE_AJAX_TRACKIN9, _DYN_DISABLE_FETCH_TRACKI11, _DYN_ENABLE_AJAX_ERROR_ST5, _DYN_ENABLE_AJAX_PERF_TRA6, _DYN_ENABLE_REQUEST_HEADE4, _DYN_ENABLE_RESPONSE_HEAD12, _DYN_ERROR_STATUS_TEXT, _DYN_EXCEPTION, _DYN_EXCLUDE_REQUEST_FROM8, _DYN_GET_ABSOLUTE_URL, _DYN_GET_ALL_RESPONSE_HEA15, _DYN_GET_PART_APROPS, _DYN_GET_TRACE_FLAGS, _DYN_GET_TRACE_ID, _DYN_HEADERS, _DYN_HEADER_MAP, _DYN_INCLUDE_CORRELATION_2, _DYN_INST, _DYN_LENGTH, _DYN_MAX_AJAX_CALLS_PER_V7, _DYN_METHOD, _DYN_NAME, _DYN_OPEN_DONE, _DYN_PERF_MARK, _DYN_PERF_TIMING, _DYN_REQUEST_HEADERS, _DYN_REQUEST_SENT_TIME, _DYN_REQUEST_URL, _DYN_RESPONSE, _DYN_RESPONSE_FINISHED_TI14, _DYN_RESPONSE_TEXT, _DYN_SEND_DONE, _DYN_SET_REQUEST_HEADER, _DYN_SPAN_ID, _DYN_SPAN_ID1, _DYN_START_TIME, _DYN_STATE_CHANGE_ATTACHE13, _DYN_STATUS, _DYN_STATUS_TEXT, _DYN_TO_LOWER_CASE, _DYN_TRACE_FLAGS, _DYN_TRACE_ID, _DYN_TRACE_ID0, _DYN_TRACK_DEPENDENCY_DAT3, _DYN__ADD_HOOK, _DYN__CREATE_TRACK_ITEM } from \"./__DynamicConstants\";\r\nimport { ajaxRecord } from \"./ajaxRecord\";\r\nvar AJAX_MONITOR_PREFIX = \"ai.ajxmn.\";\r\nvar strDiagLog = \"diagLog\";\r\nvar strAjaxData = \"ajaxData\";\r\nvar STR_FETCH = \"fetch\";\r\nvar ERROR_HEADER = \"Failed to monitor XMLHttpRequest\";\r\nvar ERROR_PREFIX = \", monitoring data for this ajax call \";\r\nvar ERROR_POSTFIX = ERROR_PREFIX + \"may be incorrect.\";\r\nvar ERROR_NOT_SENT = ERROR_PREFIX + \"won't be sent.\";\r\nvar CORRELATION_HEADER_ERROR = \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\";\r\nvar CUSTOM_REQUEST_CONTEXT_ERROR = \"Failed to add custom defined request context as configured call back may missing a null check.\";\r\nvar FAILED_TO_CALCULATE_DURATION_ERROR = \"Failed to calculate the duration of the \";\r\n// Using a global value so that to handle same iKey with multiple app insights instances (mostly for testing)\r\nvar _markCount = 0;\r\n/** @Ignore */\r\nfunction _supportsFetch() {\r\n var _global = getGlobal();\r\n if (!_global ||\r\n isNullOrUndefined(_global.Request) ||\r\n isNullOrUndefined(_global.Request[strPrototype]) ||\r\n isNullOrUndefined(_global[STR_FETCH])) {\r\n return null;\r\n }\r\n return _global[STR_FETCH];\r\n}\r\n/**\r\n * Determines whether ajax monitoring can be enabled on this document\r\n * @returns True if Ajax monitoring is supported on this page, otherwise false\r\n * @ignore\r\n */\r\nfunction _supportsAjaxMonitoring(ajaxMonitorInstance) {\r\n var _a;\r\n var result = false;\r\n if (isXhrSupported()) {\r\n var proto = XMLHttpRequest[strPrototype];\r\n result = !isNullOrUndefined(proto) &&\r\n !isNullOrUndefined(proto.open) && // eslint-disable-line security/detect-non-literal-fs-filename -- false positive\r\n !isNullOrUndefined(proto.send) &&\r\n !isNullOrUndefined(proto.abort);\r\n }\r\n var ieVer = getIEVersion();\r\n if (ieVer && ieVer < 9) {\r\n result = false;\r\n }\r\n if (result) {\r\n // Disable if the XmlHttpRequest can't be extended or hooked\r\n try {\r\n var xhr = new XMLHttpRequest();\r\n xhr[strAjaxData] = {};\r\n // Check that we can update the prototype\r\n var theOpen = XMLHttpRequest[strPrototype].open;\r\n XMLHttpRequest[strPrototype].open = theOpen;\r\n }\r\n catch (e) {\r\n // We can't decorate the xhr object so disable monitoring\r\n result = false;\r\n _throwInternalCritical(ajaxMonitorInstance, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */, \"Failed to enable XMLHttpRequest monitoring, extension is not supported\", (_a = {},\r\n _a[_DYN_EXCEPTION /* @min:exception */] = dumpObj(e),\r\n _a));\r\n }\r\n }\r\n return result;\r\n}\r\n/** @Ignore */\r\nfunction _getFailedAjaxDiagnosticsMessage(xhr) {\r\n var result = \"\";\r\n try {\r\n if (xhr && xhr[strAjaxData] && xhr[strAjaxData][_DYN_REQUEST_URL /* @min:%2erequestUrl */]) {\r\n result += \"(url: '\" + xhr[strAjaxData][_DYN_REQUEST_URL /* @min:%2erequestUrl */] + \"')\";\r\n }\r\n }\r\n catch (e) {\r\n // eslint-disable-next-line no-empty\r\n }\r\n return result;\r\n}\r\n/** @ignore */\r\nfunction _throwInternalCritical(ajaxMonitorInstance, msgId, message, properties, isUserAct) {\r\n _throwInternal(ajaxMonitorInstance[strDiagLog](), 1 /* eLoggingSeverity.CRITICAL */, msgId, message, properties, isUserAct);\r\n}\r\n/** @ignore */\r\nfunction _throwInternalWarning(ajaxMonitorInstance, msgId, message, properties, isUserAct) {\r\n _throwInternal(ajaxMonitorInstance[strDiagLog](), 2 /* eLoggingSeverity.WARNING */, msgId, message, properties, isUserAct);\r\n}\r\n/** @Ignore */\r\nfunction _createErrorCallbackFunc(ajaxMonitorInstance, internalMessage, message) {\r\n // tslint:disable-next-line\r\n return function (args) {\r\n var _a;\r\n _throwInternalCritical(ajaxMonitorInstance, internalMessage, message, (_a = {\r\n ajaxDiagnosticsMessage: _getFailedAjaxDiagnosticsMessage(args[_DYN_INST /* @min:%2einst */])\r\n },\r\n _a[_DYN_EXCEPTION /* @min:exception */] = dumpObj(args.err),\r\n _a));\r\n };\r\n}\r\nfunction _indexOf(value, match) {\r\n if (value && match) {\r\n return strIndexOf(value, match);\r\n }\r\n return -1;\r\n}\r\nfunction _addHandler(container, id, theFunc) {\r\n var theHandler = {\r\n id: id,\r\n fn: theFunc\r\n };\r\n container.push(theHandler);\r\n return {\r\n remove: function () {\r\n arrForEach(container, function (initializer, idx) {\r\n if (initializer.id === theHandler.id) {\r\n container.splice(idx, 1);\r\n return -1;\r\n }\r\n });\r\n }\r\n };\r\n}\r\nfunction _processDependencyContainer(core, container, details, message) {\r\n var result = true;\r\n arrForEach(container, function (theFunc, idx) {\r\n try {\r\n if (theFunc.fn.call(null, details) === false) {\r\n result = false;\r\n }\r\n }\r\n catch (e) {\r\n _throwInternal(core && core.logger, 1 /* eLoggingSeverity.CRITICAL */, 64 /* _eInternalMessageId.TelemetryInitializerFailed */, \"Dependency \" + message + \" [#\" + idx + \"] failed: \" + getExceptionName(e), { exception: dumpObj(e) }, true);\r\n }\r\n });\r\n return result;\r\n}\r\nfunction _processDependencyListeners(listeners, core, ajaxData, xhr, input, init) {\r\n var _a;\r\n var initializersCount = listeners[_DYN_LENGTH /* @min:%2elength */];\r\n if (initializersCount > 0) {\r\n var details = (_a = {},\r\n _a[_DYN_CORE /* @min:core */] = core,\r\n _a.xhr = xhr,\r\n _a.input = input,\r\n _a.init = init,\r\n _a.traceId = ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */],\r\n _a.spanId = ajaxData[_DYN_SPAN_ID /* @min:%2espanID */],\r\n _a.traceFlags = ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */],\r\n _a.context = ajaxData[_DYN_CONTEXT /* @min:%2econtext */] || {},\r\n _a.aborted = !!ajaxData[_DYN_ABORTED /* @min:%2eaborted */],\r\n _a);\r\n _processDependencyContainer(core, listeners, details, \"listener\");\r\n ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */] = details[_DYN_TRACE_ID0 /* @min:%2etraceId */];\r\n ajaxData[_DYN_SPAN_ID /* @min:%2espanID */] = details[_DYN_SPAN_ID1 /* @min:%2espanId */];\r\n ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = details[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */];\r\n ajaxData[_DYN_CONTEXT /* @min:%2econtext */] = details[_DYN_CONTEXT /* @min:%2econtext */];\r\n }\r\n}\r\nvar BLOB_CORE = \"*.blob.core.\";\r\nexport var DfltAjaxCorrelationHeaderExDomains = objFreeze([\r\n BLOB_CORE + \"windows.net\",\r\n BLOB_CORE + \"chinacloudapi.cn\",\r\n BLOB_CORE + \"cloudapi.de\",\r\n BLOB_CORE + \"usgovcloudapi.net\"\r\n]);\r\nvar _internalExcludeEndpoints = [\r\n /https:\\/\\/[^\\/]*(\\.pipe\\.aria|aria\\.pipe|events\\.data|collector\\.azure)\\.[^\\/]+\\/(OneCollector\\/1|Collector\\/3)\\.0/i\r\n];\r\nvar _defaultConfig = objFreeze((_a = {},\r\n _a[_DYN_MAX_AJAX_CALLS_PER_V7 /* @min:maxAjaxCallsPerView */] = 500,\r\n _a[_DYN_DISABLE_AJAX_TRACKIN9 /* @min:disableAjaxTracking */] = false,\r\n _a[_DYN_DISABLE_FETCH_TRACKI11 /* @min:disableFetchTracking */] = false,\r\n _a[_DYN_EXCLUDE_REQUEST_FROM8 /* @min:excludeRequestFromAutoTrackingPatterns */] = undefined,\r\n _a.disableCorrelationHeaders = false,\r\n _a.distributedTracingMode = 1 /* eDistributedTracingModes.AI_AND_W3C */,\r\n _a.correlationHeaderExcludedDomains = DfltAjaxCorrelationHeaderExDomains,\r\n _a.correlationHeaderDomains = undefined,\r\n _a.correlationHeaderExcludePatterns = undefined,\r\n _a.appId = undefined,\r\n _a.enableCorsCorrelation = false,\r\n _a[_DYN_ENABLE_REQUEST_HEADE4 /* @min:enableRequestHeaderTracking */] = false,\r\n _a[_DYN_ENABLE_RESPONSE_HEAD12 /* @min:enableResponseHeaderTracking */] = false,\r\n _a[_DYN_ENABLE_AJAX_ERROR_ST5 /* @min:enableAjaxErrorStatusText */] = false,\r\n _a[_DYN_ENABLE_AJAX_PERF_TRA6 /* @min:enableAjaxPerfTracking */] = false,\r\n _a.maxAjaxPerfLookupAttempts = 3,\r\n _a[_DYN_AJAX_PERF_LOOKUP_DEL10 /* @min:ajaxPerfLookupDelay */] = 25,\r\n _a.ignoreHeaders = [\r\n \"Authorization\",\r\n \"X-API-Key\",\r\n \"WWW-Authenticate\"\r\n ],\r\n _a[_DYN_ADD_REQUEST_CONTEXT /* @min:addRequestContext */] = undefined,\r\n _a.addIntEndpoints = true,\r\n _a));\r\nvar AjaxMonitor = /** @class */ (function (_super) {\r\n __extends(AjaxMonitor, _super);\r\n function AjaxMonitor() {\r\n var _this = _super.call(this) || this;\r\n _this.identifier = AjaxMonitor.identifier;\r\n _this.priority = 120;\r\n var _fetchInitialized; // fetch monitoring initialized\r\n var _xhrInitialized; // XHR monitoring initialized\r\n var _currentWindowHost;\r\n var _extensionConfig;\r\n var _enableRequestHeaderTracking;\r\n var _enableAjaxErrorStatusText;\r\n var _trackAjaxAttempts;\r\n var _context;\r\n var _isUsingW3CHeaders;\r\n var _isUsingAIHeaders;\r\n var _markPrefix;\r\n var _enableAjaxPerfTracking;\r\n var _maxAjaxCallsPerView;\r\n var _enableResponseHeaderTracking;\r\n var _disabledUrls;\r\n var _disableAjaxTracking;\r\n var _disableFetchTracking;\r\n var _excludeRequestFromAutoTrackingPatterns;\r\n var _addRequestContext;\r\n var _evtNamespace;\r\n var _dependencyHandlerId;\r\n var _dependencyListeners;\r\n var _dependencyInitializers;\r\n var _ignoreHeaders;\r\n var _maxAjaxPerfLookupAttempts;\r\n var _ajaxPerfLookupDelay;\r\n var _distributedTracingMode;\r\n var _appId;\r\n var _polyfillInitialized;\r\n dynamicProto(AjaxMonitor, _this, function (_self, _base) {\r\n var _addHook = _base[_DYN__ADD_HOOK /* @min:%2e_addHook */];\r\n _initDefaults();\r\n _self.initialize = function (config, core, extensions, pluginChain) {\r\n if (!_self.isInitialized()) {\r\n _base.initialize(config, core, extensions, pluginChain);\r\n _evtNamespace = mergeEvtNamespace(createUniqueNamespace(\"ajax\"), core && core.evtNamespace && core.evtNamespace());\r\n _populateDefaults(config);\r\n _instrumentXhr();\r\n _instrumentFetch();\r\n _populateContext();\r\n }\r\n };\r\n _self._doTeardown = function () {\r\n _initDefaults();\r\n };\r\n _self.trackDependencyData = function (dependency, properties) {\r\n _reportDependencyInternal(_dependencyInitializers, _self[_DYN_CORE /* @min:%2ecore */], null, dependency, properties);\r\n };\r\n _self[_DYN_INCLUDE_CORRELATION_2 /* @min:%2eincludeCorrelationHeaders */] = function (ajaxData, input, init, xhr) {\r\n // Test Hook to allow the overriding of the location host\r\n var currentWindowHost = _self[\"_currentWindowHost\"] || _currentWindowHost;\r\n _processDependencyListeners(_dependencyListeners, _self[_DYN_CORE /* @min:%2ecore */], ajaxData, xhr, input, init);\r\n if (input) { // Fetch\r\n if (correlationIdCanIncludeCorrelationHeader(_extensionConfig, ajaxData[_DYN_GET_ABSOLUTE_URL /* @min:%2egetAbsoluteUrl */](), currentWindowHost)) {\r\n if (!init) {\r\n init = {};\r\n }\r\n // init headers override original request headers\r\n // so, if they exist use only them, otherwise use request's because they should have been applied in the first place\r\n // not using original request headers will result in them being lost\r\n var headers = new Headers(init[_DYN_HEADERS /* @min:%2eheaders */] || (input instanceof Request ? (input[_DYN_HEADERS /* @min:%2eheaders */] || {}) : {}));\r\n if (_isUsingAIHeaders) {\r\n var id = \"|\" + ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */] + \".\" + ajaxData[_DYN_SPAN_ID /* @min:%2espanID */];\r\n headers.set(RequestHeaders[3 /* eRequestHeaders.requestIdHeader */], id);\r\n if (_enableRequestHeaderTracking) {\r\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[3 /* eRequestHeaders.requestIdHeader */]] = id;\r\n }\r\n }\r\n var appId = _appId || (_context && _context.appId());\r\n if (appId) {\r\n headers.set(RequestHeaders[0 /* eRequestHeaders.requestContextHeader */], RequestHeaders[2 /* eRequestHeaders.requestContextAppIdFormat */] + appId);\r\n if (_enableRequestHeaderTracking) {\r\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[0 /* eRequestHeaders.requestContextHeader */]] = RequestHeaders[2 /* eRequestHeaders.requestContextAppIdFormat */] + appId;\r\n }\r\n }\r\n if (_isUsingW3CHeaders) {\r\n var traceFlags = ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */];\r\n if (isNullOrUndefined(traceFlags)) {\r\n traceFlags = 0x01;\r\n }\r\n var traceParent = formatTraceParent(createTraceParent(ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */], ajaxData[_DYN_SPAN_ID /* @min:%2espanID */], traceFlags));\r\n headers.set(RequestHeaders[4 /* eRequestHeaders.traceParentHeader */], traceParent);\r\n if (_enableRequestHeaderTracking) {\r\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[4 /* eRequestHeaders.traceParentHeader */]] = traceParent;\r\n }\r\n }\r\n init[_DYN_HEADERS /* @min:%2eheaders */] = headers;\r\n }\r\n return init;\r\n }\r\n else if (xhr) { // XHR\r\n if (correlationIdCanIncludeCorrelationHeader(_extensionConfig, ajaxData[_DYN_GET_ABSOLUTE_URL /* @min:%2egetAbsoluteUrl */](), currentWindowHost)) {\r\n if (_isUsingAIHeaders) {\r\n var id = \"|\" + ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */] + \".\" + ajaxData[_DYN_SPAN_ID /* @min:%2espanID */];\r\n xhr[_DYN_SET_REQUEST_HEADER /* @min:%2esetRequestHeader */](RequestHeaders[3 /* eRequestHeaders.requestIdHeader */], id);\r\n if (_enableRequestHeaderTracking) {\r\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[3 /* eRequestHeaders.requestIdHeader */]] = id;\r\n }\r\n }\r\n var appId = _appId || (_context && _context.appId());\r\n if (appId) {\r\n xhr[_DYN_SET_REQUEST_HEADER /* @min:%2esetRequestHeader */](RequestHeaders[0 /* eRequestHeaders.requestContextHeader */], RequestHeaders[2 /* eRequestHeaders.requestContextAppIdFormat */] + appId);\r\n if (_enableRequestHeaderTracking) {\r\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[0 /* eRequestHeaders.requestContextHeader */]] = RequestHeaders[2 /* eRequestHeaders.requestContextAppIdFormat */] + appId;\r\n }\r\n }\r\n if (_isUsingW3CHeaders) {\r\n var traceFlags = ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */];\r\n if (isNullOrUndefined(traceFlags)) {\r\n traceFlags = 0x01;\r\n }\r\n var traceParent = formatTraceParent(createTraceParent(ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */], ajaxData[_DYN_SPAN_ID /* @min:%2espanID */], traceFlags));\r\n xhr[_DYN_SET_REQUEST_HEADER /* @min:%2esetRequestHeader */](RequestHeaders[4 /* eRequestHeaders.traceParentHeader */], traceParent);\r\n if (_enableRequestHeaderTracking) {\r\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[4 /* eRequestHeaders.traceParentHeader */]] = traceParent;\r\n }\r\n }\r\n }\r\n return xhr;\r\n }\r\n return undefined;\r\n };\r\n _self[_DYN_TRACK_DEPENDENCY_DAT3 /* @min:%2etrackDependencyDataInternal */] = function (dependency, properties, systemProperties) {\r\n if (_maxAjaxCallsPerView === -1 || _trackAjaxAttempts < _maxAjaxCallsPerView) {\r\n // Hack since expected format in w3c mode is |abc.def.\r\n // Non-w3c format is |abc.def\r\n // @todo Remove if better solution is available, e.g. handle in portal\r\n if ((_distributedTracingMode === 2 /* eDistributedTracingModes.W3C */\r\n || _distributedTracingMode === 1 /* eDistributedTracingModes.AI_AND_W3C */)\r\n && typeof dependency.id === \"string\" && dependency.id[dependency.id[_DYN_LENGTH /* @min:%2elength */] - 1] !== \".\") {\r\n dependency.id += \".\";\r\n }\r\n if (isNullOrUndefined(dependency[_DYN_START_TIME /* @min:%2estartTime */])) {\r\n dependency[_DYN_START_TIME /* @min:%2estartTime */] = new Date();\r\n }\r\n var item = createTelemetryItem(dependency, RemoteDependencyData.dataType, RemoteDependencyData.envelopeType, _self[strDiagLog](), properties, systemProperties);\r\n _self[_DYN_CORE /* @min:%2ecore */].track(item);\r\n }\r\n else if (_trackAjaxAttempts === _maxAjaxCallsPerView) {\r\n _throwInternalCritical(_self, 55 /* _eInternalMessageId.MaxAjaxPerPVExceeded */, \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\", true);\r\n }\r\n ++_trackAjaxAttempts;\r\n };\r\n _self.addDependencyListener = function (dependencyListener) {\r\n return _addHandler(_dependencyListeners, _dependencyHandlerId++, dependencyListener);\r\n };\r\n _self.addDependencyInitializer = function (dependencyInitializer) {\r\n return _addHandler(_dependencyInitializers, _dependencyHandlerId++, dependencyInitializer);\r\n };\r\n function _initDefaults() {\r\n var location = getLocation();\r\n _fetchInitialized = false; // fetch monitoring initialized\r\n _xhrInitialized = false; // XHR monitoring initialized\r\n _polyfillInitialized = false; // polyfill monitoring initialized\r\n _currentWindowHost = location && location.host && location.host[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n _extensionConfig = null;\r\n _enableRequestHeaderTracking = false;\r\n _enableAjaxErrorStatusText = false;\r\n _trackAjaxAttempts = 0;\r\n _context = null;\r\n _isUsingW3CHeaders = false;\r\n _isUsingAIHeaders = false;\r\n _markPrefix = null;\r\n _enableAjaxPerfTracking = false;\r\n _maxAjaxCallsPerView = 0;\r\n _enableResponseHeaderTracking = false;\r\n _disabledUrls = {};\r\n _disableAjaxTracking = false;\r\n _disableFetchTracking = false;\r\n _excludeRequestFromAutoTrackingPatterns = null;\r\n _addRequestContext = null;\r\n _evtNamespace = null;\r\n _dependencyHandlerId = 0;\r\n _dependencyListeners = [];\r\n _dependencyInitializers = [];\r\n _ignoreHeaders = null;\r\n _maxAjaxPerfLookupAttempts = 1;\r\n _ajaxPerfLookupDelay = 1;\r\n _distributedTracingMode = 1 /* eDistributedTracingModes.AI_AND_W3C */;\r\n _appId = null;\r\n }\r\n function _populateDefaults(config) {\r\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(config, function (details) {\r\n var config = details.cfg;\r\n var ctx = createProcessTelemetryContext(null, config, _self[_DYN_CORE /* @min:%2ecore */]);\r\n _extensionConfig = ctx.getExtCfg(AjaxMonitor.identifier, _defaultConfig);\r\n _distributedTracingMode = _extensionConfig.distributedTracingMode;\r\n _enableRequestHeaderTracking = _extensionConfig[_DYN_ENABLE_REQUEST_HEADE4 /* @min:%2eenableRequestHeaderTracking */];\r\n _enableAjaxErrorStatusText = _extensionConfig[_DYN_ENABLE_AJAX_ERROR_ST5 /* @min:%2eenableAjaxErrorStatusText */];\r\n _enableAjaxPerfTracking = _extensionConfig[_DYN_ENABLE_AJAX_PERF_TRA6 /* @min:%2eenableAjaxPerfTracking */];\r\n _maxAjaxCallsPerView = _extensionConfig[_DYN_MAX_AJAX_CALLS_PER_V7 /* @min:%2emaxAjaxCallsPerView */];\r\n _excludeRequestFromAutoTrackingPatterns = [].concat(_extensionConfig[_DYN_EXCLUDE_REQUEST_FROM8 /* @min:%2eexcludeRequestFromAutoTrackingPatterns */] || [], _extensionConfig.addIntEndpoints !== false ? _internalExcludeEndpoints : []);\r\n _addRequestContext = _extensionConfig[_DYN_ADD_REQUEST_CONTEXT /* @min:%2eaddRequestContext */];\r\n _isUsingAIHeaders = _distributedTracingMode === 0 /* eDistributedTracingModes.AI */ || _distributedTracingMode === 1 /* eDistributedTracingModes.AI_AND_W3C */;\r\n _isUsingW3CHeaders = _distributedTracingMode === 1 /* eDistributedTracingModes.AI_AND_W3C */ || _distributedTracingMode === 2 /* eDistributedTracingModes.W3C */;\r\n if (_enableAjaxPerfTracking) {\r\n var iKey = config.instrumentationKey || \"unkwn\";\r\n if (iKey[_DYN_LENGTH /* @min:%2elength */] > 5) {\r\n _markPrefix = AJAX_MONITOR_PREFIX + strSubstring(iKey, iKey[_DYN_LENGTH /* @min:%2elength */] - 5) + \".\";\r\n }\r\n else {\r\n _markPrefix = AJAX_MONITOR_PREFIX + iKey + \".\";\r\n }\r\n }\r\n _disableAjaxTracking = !!_extensionConfig[_DYN_DISABLE_AJAX_TRACKIN9 /* @min:%2edisableAjaxTracking */];\r\n _maxAjaxPerfLookupAttempts = _extensionConfig.maxAjaxPerfLookupAttempts;\r\n _ajaxPerfLookupDelay = _extensionConfig[_DYN_AJAX_PERF_LOOKUP_DEL10 /* @min:%2eajaxPerfLookupDelay */];\r\n _ignoreHeaders = _extensionConfig.ignoreHeaders;\r\n _appId = _extensionConfig.appId;\r\n }));\r\n }\r\n function _populateContext() {\r\n var propExt = _self[_DYN_CORE /* @min:%2ecore */].getPlugin(PropertiesPluginIdentifier);\r\n if (propExt) {\r\n _context = propExt.plugin[_DYN_CONTEXT /* @min:%2econtext */]; // we could move IPropertiesPlugin to common as well\r\n }\r\n }\r\n // discard the header if it's defined as ignoreHeaders in ICorrelationConfig\r\n function _canIncludeHeaders(header) {\r\n var rlt = true;\r\n if (header || _ignoreHeaders) {\r\n arrForEach(_ignoreHeaders, (function (key) {\r\n if (key[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() === header[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]()) {\r\n rlt = false;\r\n return -1;\r\n }\r\n }));\r\n }\r\n return rlt;\r\n }\r\n // Fetch Stuff\r\n function _instrumentFetch() {\r\n var fetch = _supportsFetch();\r\n if (!fetch) {\r\n return;\r\n }\r\n var global = getGlobal();\r\n var isPolyfill = fetch.polyfill;\r\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extensionConfig, function () {\r\n _disableFetchTracking = !!_extensionConfig[_DYN_DISABLE_FETCH_TRACKI11 /* @min:%2edisableFetchTracking */];\r\n _enableResponseHeaderTracking = _extensionConfig[_DYN_ENABLE_RESPONSE_HEAD12 /* @min:%2eenableResponseHeaderTracking */];\r\n if (!_disableFetchTracking && !_fetchInitialized) {\r\n _addHook(InstrumentFunc(global, STR_FETCH, {\r\n ns: _evtNamespace,\r\n // Add request hook\r\n req: function (callDetails, input, init) {\r\n var fetchData;\r\n if (!_disableFetchTracking && _fetchInitialized &&\r\n !_isDisabledRequest(null, input, init) &&\r\n // If we have a polyfil and XHR instrumented then let XHR report otherwise we get duplicates\r\n !(isPolyfill && _xhrInitialized)) {\r\n var ctx = callDetails.ctx();\r\n fetchData = _createFetchRecord(input, init);\r\n var newInit = _self[_DYN_INCLUDE_CORRELATION_2 /* @min:%2eincludeCorrelationHeaders */](fetchData, input, init);\r\n if (newInit !== init) {\r\n callDetails.set(1, newInit);\r\n }\r\n ctx.data = fetchData;\r\n }\r\n },\r\n rsp: function (callDetails, input) {\r\n if (!_disableFetchTracking) {\r\n var fetchData_1 = callDetails.ctx().data;\r\n if (fetchData_1) {\r\n // Replace the result with the new promise from this code\r\n callDetails.rslt = callDetails.rslt.then(function (response) {\r\n _reportFetchMetrics(callDetails, (response || {})[_DYN_STATUS /* @min:%2estatus */], input, response, fetchData_1, function () {\r\n var _a;\r\n var ajaxResponse = (_a = {\r\n statusText: (response || {})[_DYN_STATUS_TEXT /* @min:%2estatusText */]\r\n },\r\n _a[_DYN_HEADER_MAP /* @min:headerMap */] = null,\r\n _a[_DYN_CORRELATION_CONTEXT /* @min:correlationContext */] = _getFetchCorrelationContext(response),\r\n _a);\r\n if (_enableResponseHeaderTracking && response) {\r\n var responseHeaderMap_1 = {};\r\n response.headers.forEach(function (value, name) {\r\n if (_canIncludeHeaders(name)) {\r\n responseHeaderMap_1[name] = value;\r\n }\r\n });\r\n ajaxResponse[_DYN_HEADER_MAP /* @min:%2eheaderMap */] = responseHeaderMap_1;\r\n }\r\n return ajaxResponse;\r\n });\r\n return response;\r\n })\r\n .catch(function (reason) {\r\n _reportFetchMetrics(callDetails, 0, input, null, fetchData_1, null, { error: reason.message || dumpObj(reason) });\r\n throw reason;\r\n });\r\n }\r\n }\r\n },\r\n // Create an error callback to report any hook errors\r\n hkErr: _createErrorCallbackFunc(_self, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */, \"Failed to monitor Window.fetch\" + ERROR_POSTFIX)\r\n }, true, isWebWorker()));\r\n _fetchInitialized = true;\r\n }\r\n else if (isPolyfill && !_polyfillInitialized) {\r\n // If fetch is a polyfill we need to capture the request to ensure that we correctly track\r\n // disabled request URLS (i.e. internal urls) to ensure we don't end up in a constant loop\r\n // of reporting ourselves, for example React Native uses a polyfill for fetch\r\n // Note: Polyfill implementations that don't support the \"polyfill\" tag are not supported\r\n // the workaround is to add a polyfill property to your fetch implementation before initializing\r\n // App Insights\r\n _addHook(InstrumentFunc(global, STR_FETCH, {\r\n ns: _evtNamespace,\r\n req: function (callDetails, input, init) {\r\n // Just call so that we record any disabled URL\r\n _isDisabledRequest(null, input, init);\r\n }\r\n }));\r\n _polyfillInitialized = true;\r\n }\r\n }));\r\n if (isPolyfill) {\r\n // retag the instrumented fetch with the same polyfill settings this is mostly for testing\r\n // But also supports multiple App Insights usages\r\n global[STR_FETCH].polyfill = isPolyfill;\r\n }\r\n }\r\n function _hookProto(target, funcName, callbacks) {\r\n _addHook(InstrumentProto(target, funcName, callbacks));\r\n }\r\n function _instrumentXhr() {\r\n if (!_supportsAjaxMonitoring(_self)) {\r\n return;\r\n }\r\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extensionConfig, function () {\r\n _disableAjaxTracking = !!_extensionConfig[_DYN_DISABLE_AJAX_TRACKIN9 /* @min:%2edisableAjaxTracking */];\r\n _enableRequestHeaderTracking = _extensionConfig[_DYN_ENABLE_REQUEST_HEADE4 /* @min:%2eenableRequestHeaderTracking */];\r\n if (!_disableAjaxTracking && !_xhrInitialized) {\r\n // Instrument open\r\n _hookProto(XMLHttpRequest, \"open\", {\r\n ns: _evtNamespace,\r\n req: function (args, method, url, async) {\r\n if (!_disableAjaxTracking) {\r\n var xhr = args[_DYN_INST /* @min:%2einst */];\r\n var ajaxData = xhr[strAjaxData];\r\n if (!_isDisabledRequest(xhr, url) && _isMonitoredXhrInstance(xhr, true)) {\r\n if (!ajaxData || !ajaxData.xhrMonitoringState[_DYN_OPEN_DONE /* @min:%2eopenDone */]) {\r\n // Only create a single ajaxData (even when multiple AI instances are running)\r\n _openHandler(xhr, method, url, async);\r\n }\r\n // always attach to the on ready state change (required for handling multiple instances)\r\n _attachToOnReadyStateChange(xhr);\r\n }\r\n }\r\n },\r\n hkErr: _createErrorCallbackFunc(_self, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */, ERROR_HEADER + \".open\" + ERROR_POSTFIX)\r\n });\r\n // Instrument send\r\n _hookProto(XMLHttpRequest, \"send\", {\r\n ns: _evtNamespace,\r\n req: function (args, context) {\r\n if (!_disableAjaxTracking) {\r\n var xhr = args[_DYN_INST /* @min:%2einst */];\r\n var ajaxData = xhr[strAjaxData];\r\n if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState[_DYN_SEND_DONE /* @min:%2esendDone */]) {\r\n _createMarkId(\"xhr\", ajaxData);\r\n ajaxData[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */] = dateTimeUtilsNow();\r\n _self[_DYN_INCLUDE_CORRELATION_2 /* @min:%2eincludeCorrelationHeaders */](ajaxData, undefined, undefined, xhr);\r\n ajaxData.xhrMonitoringState[_DYN_SEND_DONE /* @min:%2esendDone */] = true;\r\n }\r\n }\r\n },\r\n hkErr: _createErrorCallbackFunc(_self, 17 /* _eInternalMessageId.FailedMonitorAjaxSend */, ERROR_HEADER + ERROR_POSTFIX)\r\n });\r\n // Instrument abort\r\n _hookProto(XMLHttpRequest, \"abort\", {\r\n ns: _evtNamespace,\r\n req: function (args) {\r\n if (!_disableAjaxTracking) {\r\n var xhr = args[_DYN_INST /* @min:%2einst */];\r\n var ajaxData = xhr[strAjaxData];\r\n if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState[_DYN_ABORT_DONE /* @min:%2eabortDone */]) {\r\n ajaxData[_DYN_ABORTED /* @min:%2eaborted */] = 1;\r\n ajaxData.xhrMonitoringState[_DYN_ABORT_DONE /* @min:%2eabortDone */] = true;\r\n }\r\n }\r\n },\r\n hkErr: _createErrorCallbackFunc(_self, 13 /* _eInternalMessageId.FailedMonitorAjaxAbort */, ERROR_HEADER + \".abort\" + ERROR_POSTFIX)\r\n });\r\n // Instrument setRequestHeader\r\n _hookProto(XMLHttpRequest, \"setRequestHeader\", {\r\n ns: _evtNamespace,\r\n req: function (args, header, value) {\r\n if (!_disableAjaxTracking && _enableRequestHeaderTracking) {\r\n var xhr = args[_DYN_INST /* @min:%2einst */];\r\n if (_isMonitoredXhrInstance(xhr) && _canIncludeHeaders(header)) {\r\n xhr[strAjaxData][_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][header] = value;\r\n }\r\n }\r\n },\r\n hkErr: _createErrorCallbackFunc(_self, 71 /* _eInternalMessageId.FailedMonitorAjaxSetRequestHeader */, ERROR_HEADER + \".setRequestHeader\" + ERROR_POSTFIX)\r\n });\r\n _xhrInitialized = true;\r\n }\r\n }));\r\n }\r\n function _isDisabledRequest(xhr, request, init) {\r\n var isDisabled = false;\r\n var theUrl = ((!isString(request) ? (request || {}).url || \"\" : request) || \"\")[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n // check excludeRequestFromAutoTrackingPatterns before stripping off any query string\r\n arrForEach(_excludeRequestFromAutoTrackingPatterns, function (regex) {\r\n var theRegex = regex;\r\n if (isString(regex)) {\r\n theRegex = new RegExp(regex);\r\n }\r\n if (!isDisabled) {\r\n isDisabled = theRegex.test(theUrl);\r\n }\r\n });\r\n // if request url matches with exclude regex pattern, return true and no need to check for headers\r\n if (isDisabled) {\r\n return isDisabled;\r\n }\r\n var idx = _indexOf(theUrl, \"?\");\r\n var idx2 = _indexOf(theUrl, \"#\");\r\n if (idx === -1 || (idx2 !== -1 && idx2 < idx)) {\r\n idx = idx2;\r\n }\r\n if (idx !== -1) {\r\n // Strip off any Query string\r\n theUrl = theUrl.substring(0, idx);\r\n }\r\n // check that this instance is not not used by ajax call performed inside client side monitoring to send data to collector\r\n if (!isNullOrUndefined(xhr)) {\r\n // Look on the XMLHttpRequest of the URL string value\r\n isDisabled = xhr[DisabledPropertyName] === true || theUrl[DisabledPropertyName] === true;\r\n }\r\n else if (!isNullOrUndefined(request)) { // fetch\r\n // Look for DisabledPropertyName in either Request or RequestInit\r\n isDisabled = (typeof request === \"object\" ? request[DisabledPropertyName] === true : false) ||\r\n (init ? init[DisabledPropertyName] === true : false);\r\n }\r\n // Also add extra check just in case the XHR or fetch objects where not decorated with the DisableProperty due to sealing or freezing\r\n if (!isDisabled && theUrl && isInternalApplicationInsightsEndpoint(theUrl)) {\r\n isDisabled = true;\r\n }\r\n if (isDisabled) {\r\n // Add the disabled url if not present\r\n if (!_disabledUrls[theUrl]) {\r\n _disabledUrls[theUrl] = 1;\r\n }\r\n }\r\n else {\r\n // Check to see if the url is listed as disabled\r\n if (_disabledUrls[theUrl]) {\r\n isDisabled = true;\r\n }\r\n }\r\n return isDisabled;\r\n }\r\n /// Verifies that particalar instance of XMLHttpRequest needs to be monitored\r\n /// Optional parameter. True if ajaxData must be excluded from verification\r\n /// True if instance needs to be monitored, otherwise false\r\n function _isMonitoredXhrInstance(xhr, excludeAjaxDataValidation) {\r\n var ajaxValidation = true;\r\n var initialized = _xhrInitialized;\r\n if (!isNullOrUndefined(xhr)) {\r\n ajaxValidation = excludeAjaxDataValidation === true || !isNullOrUndefined(xhr[strAjaxData]);\r\n }\r\n // checking to see that all interested functions on xhr were instrumented\r\n return initialized\r\n // checking on ajaxData to see that it was not removed in user code\r\n && ajaxValidation;\r\n }\r\n function _getDistributedTraceCtx() {\r\n var distributedTraceCtx = null;\r\n if (_self[_DYN_CORE /* @min:%2ecore */] && _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx) {\r\n distributedTraceCtx = _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx(false);\r\n }\r\n // Fall back\r\n if (!distributedTraceCtx && _context && _context.telemetryTrace) {\r\n distributedTraceCtx = createDistributedTraceContextFromTrace(_context.telemetryTrace);\r\n }\r\n return distributedTraceCtx;\r\n }\r\n function _openHandler(xhr, method, url, async) {\r\n var _a;\r\n var distributedTraceCtx = _getDistributedTraceCtx();\r\n var traceID = (distributedTraceCtx && distributedTraceCtx[_DYN_GET_TRACE_ID /* @min:%2egetTraceId */]()) || generateW3CId();\r\n var spanID = strSubstr(generateW3CId(), 0, 16);\r\n var ajaxData = new ajaxRecord(traceID, spanID, _self[strDiagLog](), (_a = _self.core) === null || _a === void 0 ? void 0 : _a.getTraceCtx());\r\n ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = distributedTraceCtx && distributedTraceCtx[_DYN_GET_TRACE_FLAGS /* @min:%2egetTraceFlags */]();\r\n ajaxData[_DYN_METHOD /* @min:%2emethod */] = method;\r\n ajaxData[_DYN_REQUEST_URL /* @min:%2erequestUrl */] = url;\r\n ajaxData.xhrMonitoringState[_DYN_OPEN_DONE /* @min:%2eopenDone */] = true;\r\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */] = {};\r\n ajaxData.async = async;\r\n ajaxData[_DYN_ERROR_STATUS_TEXT /* @min:%2eerrorStatusText */] = _enableAjaxErrorStatusText;\r\n xhr[strAjaxData] = ajaxData;\r\n }\r\n function _attachToOnReadyStateChange(xhr) {\r\n xhr[strAjaxData].xhrMonitoringState[_DYN_STATE_CHANGE_ATTACHE13 /* @min:%2estateChangeAttached */] = eventOn(xhr, \"readystatechange\", function () {\r\n var _a;\r\n try {\r\n if (xhr && xhr.readyState === 4 && _isMonitoredXhrInstance(xhr)) {\r\n _onAjaxComplete(xhr);\r\n }\r\n }\r\n catch (e) {\r\n var exceptionText = dumpObj(e);\r\n // ignore messages with c00c023f, as this a known IE9 XHR abort issue\r\n if (!exceptionText || _indexOf(exceptionText[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */](), \"c00c023f\") === -1) {\r\n _throwInternalCritical(_self, 16 /* _eInternalMessageId.FailedMonitorAjaxRSC */, ERROR_HEADER + \" 'readystatechange' event handler\" + ERROR_POSTFIX, (_a = {},\r\n _a[_DYN_AJAX_DIAGNOSTICS_MES16 /* @min:ajaxDiagnosticsMessage */] = _getFailedAjaxDiagnosticsMessage(xhr),\r\n _a[_DYN_EXCEPTION /* @min:exception */] = exceptionText,\r\n _a));\r\n }\r\n }\r\n }, _evtNamespace);\r\n }\r\n function _getResponseText(xhr) {\r\n try {\r\n var responseType = xhr.responseType;\r\n if (responseType === \"\" || responseType === \"text\") {\r\n // As per the specification responseText is only valid if the type is an empty string or \"text\"\r\n return xhr[_DYN_RESPONSE_TEXT /* @min:%2eresponseText */];\r\n }\r\n }\r\n catch (e) {\r\n // This shouldn't happen because of the above check -- but just in case, so just ignore\r\n }\r\n return null;\r\n }\r\n function _onAjaxComplete(xhr) {\r\n var ajaxData = xhr[strAjaxData];\r\n ajaxData[_DYN_RESPONSE_FINISHED_TI14 /* @min:%2eresponseFinishedTime */] = dateTimeUtilsNow();\r\n ajaxData[_DYN_STATUS /* @min:%2estatus */] = xhr[_DYN_STATUS /* @min:%2estatus */];\r\n function _reportXhrError(e, failedProps) {\r\n var errorProps = failedProps || {};\r\n errorProps[\"ajaxDiagnosticsMessage\"] = _getFailedAjaxDiagnosticsMessage(xhr);\r\n if (e) {\r\n errorProps[\"exception\"] = dumpObj(e);\r\n }\r\n _throwInternalWarning(_self, 14 /* _eInternalMessageId.FailedMonitorAjaxDur */, FAILED_TO_CALCULATE_DURATION_ERROR + \"ajax call\" + ERROR_NOT_SENT, errorProps);\r\n }\r\n _findPerfResourceEntry(\"xmlhttprequest\", ajaxData, function () {\r\n try {\r\n var dependency = ajaxData[_DYN__CREATE_TRACK_ITEM /* @min:%2eCreateTrackItem */](\"Ajax\", _enableRequestHeaderTracking, function () {\r\n var _a;\r\n var ajaxResponse = (_a = {\r\n statusText: xhr[_DYN_STATUS_TEXT /* @min:%2estatusText */]\r\n },\r\n _a[_DYN_HEADER_MAP /* @min:headerMap */] = null,\r\n _a[_DYN_CORRELATION_CONTEXT /* @min:correlationContext */] = _getAjaxCorrelationContext(xhr),\r\n _a.type = xhr.responseType,\r\n _a[_DYN_RESPONSE_TEXT /* @min:responseText */] = _getResponseText(xhr),\r\n _a.response = xhr[_DYN_RESPONSE /* @min:%2eresponse */],\r\n _a);\r\n if (_enableResponseHeaderTracking) {\r\n var headers = xhr[_DYN_GET_ALL_RESPONSE_HEA15 /* @min:%2egetAllResponseHeaders */]();\r\n if (headers) {\r\n // xhr.getAllResponseHeaders() method returns all the response headers, separated by CRLF, as a string or null\r\n // the regex converts the header string into an array of individual headers\r\n var arr = strTrim(headers).split(/[\\r\\n]+/);\r\n var responseHeaderMap_2 = {};\r\n arrForEach(arr, function (line) {\r\n var parts = line.split(\": \");\r\n var header = parts.shift();\r\n var value = parts.join(\": \");\r\n if (_canIncludeHeaders(header)) {\r\n responseHeaderMap_2[header] = value;\r\n }\r\n });\r\n ajaxResponse[_DYN_HEADER_MAP /* @min:%2eheaderMap */] = responseHeaderMap_2;\r\n }\r\n }\r\n return ajaxResponse;\r\n });\r\n var properties = void 0;\r\n try {\r\n if (!!_addRequestContext) {\r\n properties = _addRequestContext({ status: xhr[_DYN_STATUS /* @min:%2estatus */], xhr: xhr });\r\n }\r\n }\r\n catch (e) {\r\n _throwInternalWarning(_self, 104 /* _eInternalMessageId.FailedAddingCustomDefinedRequestContext */, CUSTOM_REQUEST_CONTEXT_ERROR);\r\n }\r\n if (dependency) {\r\n if (properties !== undefined) {\r\n dependency[STR_PROPERTIES /* @min:%2eproperties */] = __assign(__assign({}, dependency.properties), properties);\r\n }\r\n var sysProperties = ajaxData[_DYN_GET_PART_APROPS /* @min:%2egetPartAProps */]();\r\n _reportDependencyInternal(_dependencyInitializers, _self[_DYN_CORE /* @min:%2ecore */], ajaxData, dependency, null, sysProperties);\r\n }\r\n else {\r\n _reportXhrError(null, {\r\n requestSentTime: ajaxData[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */],\r\n responseFinishedTime: ajaxData[_DYN_RESPONSE_FINISHED_TI14 /* @min:%2eresponseFinishedTime */]\r\n });\r\n }\r\n }\r\n finally {\r\n // cleanup telemetry data\r\n try {\r\n xhr[strAjaxData] = null;\r\n }\r\n catch (e) {\r\n // May throw in environments that prevent extension or freeze xhr\r\n }\r\n }\r\n }, function (e) {\r\n _reportXhrError(e, null);\r\n });\r\n }\r\n function _getAjaxCorrelationContext(xhr) {\r\n var _a;\r\n try {\r\n var responseHeadersString = xhr[_DYN_GET_ALL_RESPONSE_HEA15 /* @min:%2egetAllResponseHeaders */]();\r\n if (responseHeadersString !== null) {\r\n var index = _indexOf(responseHeadersString[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */](), RequestHeaders[8 /* eRequestHeaders.requestContextHeaderLowerCase */]);\r\n if (index !== -1) {\r\n var responseHeader = xhr.getResponseHeader(RequestHeaders[0 /* eRequestHeaders.requestContextHeader */]);\r\n return correlationIdGetCorrelationContext(responseHeader);\r\n }\r\n }\r\n }\r\n catch (e) {\r\n _throwInternalWarning(_self, 18 /* _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader */, CORRELATION_HEADER_ERROR, (_a = {},\r\n _a[_DYN_AJAX_DIAGNOSTICS_MES16 /* @min:ajaxDiagnosticsMessage */] = _getFailedAjaxDiagnosticsMessage(xhr),\r\n _a[_DYN_EXCEPTION /* @min:exception */] = dumpObj(e),\r\n _a));\r\n }\r\n }\r\n function _createMarkId(type, ajaxData) {\r\n if (ajaxData[_DYN_REQUEST_URL /* @min:%2erequestUrl */] && _markPrefix && _enableAjaxPerfTracking) {\r\n var performance_1 = getPerformance();\r\n if (performance_1 && isFunction(performance_1.mark)) {\r\n _markCount++;\r\n var markId = _markPrefix + type + \"#\" + _markCount;\r\n performance_1.mark(markId);\r\n var entries = performance_1.getEntriesByName(markId);\r\n if (entries && entries[_DYN_LENGTH /* @min:%2elength */] === 1) {\r\n ajaxData[_DYN_PERF_MARK /* @min:%2eperfMark */] = entries[0];\r\n }\r\n }\r\n }\r\n }\r\n function _findPerfResourceEntry(initiatorType, ajaxData, trackCallback, reportError) {\r\n var perfMark = ajaxData[_DYN_PERF_MARK /* @min:%2eperfMark */];\r\n var performance = getPerformance();\r\n var maxAttempts = _maxAjaxPerfLookupAttempts;\r\n var retryDelay = _ajaxPerfLookupDelay;\r\n var requestUrl = ajaxData[_DYN_REQUEST_URL /* @min:%2erequestUrl */];\r\n var attempt = 0;\r\n (function locateResourceTiming() {\r\n try {\r\n if (performance && perfMark) {\r\n attempt++;\r\n var perfTiming = null;\r\n var entries = performance.getEntries();\r\n for (var lp = entries[_DYN_LENGTH /* @min:%2elength */] - 1; lp >= 0; lp--) {\r\n var entry = entries[lp];\r\n if (entry) {\r\n if (entry.entryType === \"resource\") {\r\n if (entry.initiatorType === initiatorType &&\r\n (_indexOf(entry[_DYN_NAME /* @min:%2ename */], requestUrl) !== -1 || _indexOf(requestUrl, entry[_DYN_NAME /* @min:%2ename */]) !== -1)) {\r\n perfTiming = entry;\r\n }\r\n }\r\n else if (entry.entryType === \"mark\" && entry[_DYN_NAME /* @min:%2ename */] === perfMark[_DYN_NAME /* @min:%2ename */]) {\r\n // We hit the start event\r\n ajaxData[_DYN_PERF_TIMING /* @min:%2eperfTiming */] = perfTiming;\r\n break;\r\n }\r\n if (entry[_DYN_START_TIME /* @min:%2estartTime */] < perfMark[_DYN_START_TIME /* @min:%2estartTime */] - 1000) {\r\n // Fallback to try and reduce the time spent looking for the perf entry\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if (!perfMark || // - we don't have a perfMark or\r\n ajaxData[_DYN_PERF_TIMING /* @min:%2eperfTiming */] || // - we have not found the perf entry or\r\n attempt >= maxAttempts || // - we have tried too many attempts or\r\n ajaxData.async === false) { // - this is a sync request\r\n if (perfMark && isFunction(performance.clearMarks)) {\r\n // Remove the mark so we don't fill up the performance resources too much\r\n performance.clearMarks(perfMark[_DYN_NAME /* @min:%2ename */]);\r\n }\r\n ajaxData.perfAttempts = attempt;\r\n // just continue and report the track event\r\n trackCallback();\r\n }\r\n else {\r\n // We need to wait for the browser to populate the window.performance entry\r\n // This needs to be at least 1ms as waiting <= 1 (on firefox) is not enough time for fetch or xhr,\r\n // this is a scheduling issue for the browser implementation\r\n scheduleTimeout(locateResourceTiming, retryDelay);\r\n }\r\n }\r\n catch (e) {\r\n reportError(e);\r\n }\r\n })();\r\n }\r\n function _createFetchRecord(input, init) {\r\n var _a;\r\n var distributedTraceCtx = _getDistributedTraceCtx();\r\n var traceID = (distributedTraceCtx && distributedTraceCtx[_DYN_GET_TRACE_ID /* @min:%2egetTraceId */]()) || generateW3CId();\r\n var spanID = strSubstr(generateW3CId(), 0, 16);\r\n var ajaxData = new ajaxRecord(traceID, spanID, _self[strDiagLog](), (_a = _self.core) === null || _a === void 0 ? void 0 : _a.getTraceCtx());\r\n ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = distributedTraceCtx && distributedTraceCtx[_DYN_GET_TRACE_FLAGS /* @min:%2egetTraceFlags */]();\r\n ajaxData[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */] = dateTimeUtilsNow();\r\n ajaxData[_DYN_ERROR_STATUS_TEXT /* @min:%2eerrorStatusText */] = _enableAjaxErrorStatusText;\r\n if (input instanceof Request) {\r\n ajaxData[_DYN_REQUEST_URL /* @min:%2erequestUrl */] = input ? input.url : \"\";\r\n }\r\n else {\r\n ajaxData[_DYN_REQUEST_URL /* @min:%2erequestUrl */] = input;\r\n }\r\n var method = \"GET\";\r\n if (init && init[_DYN_METHOD /* @min:%2emethod */]) {\r\n method = init[_DYN_METHOD /* @min:%2emethod */];\r\n }\r\n else if (input && input instanceof Request) {\r\n method = input[_DYN_METHOD /* @min:%2emethod */];\r\n }\r\n ajaxData[_DYN_METHOD /* @min:%2emethod */] = method;\r\n var requestHeaders = {};\r\n if (_enableRequestHeaderTracking) {\r\n var headers = new Headers((init ? init[_DYN_HEADERS /* @min:%2eheaders */] : 0) || (input instanceof Request ? (input[_DYN_HEADERS /* @min:%2eheaders */] || {}) : {}));\r\n headers.forEach(function (value, key) {\r\n if (_canIncludeHeaders(key)) {\r\n requestHeaders[key] = value;\r\n }\r\n });\r\n }\r\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */] = requestHeaders;\r\n _createMarkId(STR_FETCH, ajaxData);\r\n return ajaxData;\r\n }\r\n function _getFailedFetchDiagnosticsMessage(input) {\r\n var result = \"\";\r\n try {\r\n if (!isNullOrUndefined(input)) {\r\n if (typeof (input) === \"string\") {\r\n result += \"(url: '\".concat(input, \"')\");\r\n }\r\n else {\r\n result += \"(url: '\".concat(input.url, \"')\");\r\n }\r\n }\r\n }\r\n catch (e) {\r\n _throwInternalCritical(_self, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */, \"Failed to grab failed fetch diagnostics message\", { exception: dumpObj(e) });\r\n }\r\n return result;\r\n }\r\n function _reportFetchMetrics(callDetails, status, input, response, ajaxData, getResponse, properties) {\r\n if (!ajaxData) {\r\n return;\r\n }\r\n function _reportFetchError(msgId, e, failedProps) {\r\n var errorProps = failedProps || {};\r\n errorProps[\"fetchDiagnosticsMessage\"] = _getFailedFetchDiagnosticsMessage(input);\r\n if (e) {\r\n errorProps[\"exception\"] = dumpObj(e);\r\n }\r\n _throwInternalWarning(_self, msgId, FAILED_TO_CALCULATE_DURATION_ERROR + \"fetch call\" + ERROR_NOT_SENT, errorProps);\r\n }\r\n ajaxData[_DYN_RESPONSE_FINISHED_TI14 /* @min:%2eresponseFinishedTime */] = dateTimeUtilsNow();\r\n ajaxData[_DYN_STATUS /* @min:%2estatus */] = status;\r\n _findPerfResourceEntry(STR_FETCH, ajaxData, function () {\r\n var dependency = ajaxData[_DYN__CREATE_TRACK_ITEM /* @min:%2eCreateTrackItem */](\"Fetch\", _enableRequestHeaderTracking, getResponse);\r\n var properties;\r\n try {\r\n if (!!_addRequestContext) {\r\n properties = _addRequestContext({ status: status, request: input, response: response });\r\n }\r\n }\r\n catch (e) {\r\n _throwInternalWarning(_self, 104 /* _eInternalMessageId.FailedAddingCustomDefinedRequestContext */, CUSTOM_REQUEST_CONTEXT_ERROR);\r\n }\r\n if (dependency) {\r\n if (properties !== undefined) {\r\n dependency[STR_PROPERTIES /* @min:%2eproperties */] = __assign(__assign({}, dependency.properties), properties);\r\n }\r\n var sysProperties = ajaxData[_DYN_GET_PART_APROPS /* @min:%2egetPartAProps */]();\r\n _reportDependencyInternal(_dependencyInitializers, _self[_DYN_CORE /* @min:%2ecore */], ajaxData, dependency, null, sysProperties);\r\n }\r\n else {\r\n _reportFetchError(14 /* _eInternalMessageId.FailedMonitorAjaxDur */, null, {\r\n requestSentTime: ajaxData[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */],\r\n responseFinishedTime: ajaxData[_DYN_RESPONSE_FINISHED_TI14 /* @min:%2eresponseFinishedTime */]\r\n });\r\n }\r\n }, function (e) {\r\n _reportFetchError(18 /* _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader */, e, null);\r\n });\r\n }\r\n function _getFetchCorrelationContext(response) {\r\n var _a;\r\n if (response && response[_DYN_HEADERS /* @min:%2eheaders */]) {\r\n try {\r\n var responseHeader = response[_DYN_HEADERS /* @min:%2eheaders */].get(RequestHeaders[0 /* eRequestHeaders.requestContextHeader */]);\r\n return correlationIdGetCorrelationContext(responseHeader);\r\n }\r\n catch (e) {\r\n _throwInternalWarning(_self, 18 /* _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader */, CORRELATION_HEADER_ERROR, (_a = {\r\n fetchDiagnosticsMessage: _getFailedFetchDiagnosticsMessage(response)\r\n },\r\n _a[_DYN_EXCEPTION /* @min:exception */] = dumpObj(e),\r\n _a));\r\n }\r\n }\r\n }\r\n function _reportDependencyInternal(initializers, core, ajaxData, dependency, properties, systemProperties) {\r\n var _a;\r\n var result = true;\r\n var initializersCount = initializers[_DYN_LENGTH /* @min:%2elength */];\r\n if (initializersCount > 0) {\r\n var details = (_a = {\r\n item: dependency\r\n },\r\n _a[STR_PROPERTIES /* @min:properties */] = properties,\r\n _a.sysProperties = systemProperties,\r\n _a.context = ajaxData ? ajaxData[_DYN_CONTEXT /* @min:%2econtext */] : null,\r\n _a.aborted = ajaxData ? !!ajaxData[_DYN_ABORTED /* @min:%2eaborted */] : false,\r\n _a);\r\n result = _processDependencyContainer(core, initializers, details, \"initializer\");\r\n }\r\n if (result) {\r\n _self[_DYN_TRACK_DEPENDENCY_DAT3 /* @min:%2etrackDependencyDataInternal */](dependency, properties, systemProperties);\r\n }\r\n }\r\n });\r\n return _this;\r\n }\r\n AjaxMonitor.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AjaxMonitor.prototype.processTelemetry = function (item, itemCtx) {\r\n this.processNext(item, itemCtx);\r\n };\r\n /**\r\n * Logs dependency call\r\n * @param dependencyData - dependency data object\r\n */\r\n AjaxMonitor.prototype.trackDependencyData = function (dependency, properties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AjaxMonitor.prototype.includeCorrelationHeaders = function (ajaxData, input, init, xhr) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Add an ajax listener which is called just prior to the request being sent and before the correlation headers are added, to allow you\r\n * to access the headers and modify the values used to generate the distributed tracing correlation headers.\r\n * @param dependencyListener - The Telemetry Initializer function\r\n * @returns - A IDependencyListenerHandler to enable the initializer to be removed\r\n */\r\n AjaxMonitor.prototype.addDependencyListener = function (dependencyListener) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Add an dependency telemetry initializer callback function to allow populating additional properties or drop the request.\r\n * It is called after the dependency call has completed and any available performance details are available. A dependency\r\n * initializer is similar to the TelemetryInitializer function but it allows you to block the reporting of the dependency\r\n * request so that it doesn't count against the `maxAjaxCallsPerView`.\r\n * @param dependencyInitializer - The Dependency Telemetry Initializer function\r\n * @returns - A IDependencyInitializerHandler to enable the initializer to be removed\r\n */\r\n AjaxMonitor.prototype.addDependencyInitializer = function (dependencyInitializer) {\r\n return null;\r\n };\r\n /**\r\n * Protected function to allow sub classes the chance to add additional properties to the dependency event\r\n * before it's sent. This function calls track, so sub-classes must call this function after they have\r\n * populated their properties.\r\n * @param dependencyData - dependency data object\r\n */\r\n AjaxMonitor.prototype.trackDependencyDataInternal = function (dependency, properties, systemProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AjaxMonitor.identifier = \"AjaxDependencyPlugin\";\r\n return AjaxMonitor;\r\n}(BaseTelemetryPlugin));\r\nexport { AjaxMonitor };\r\n//# sourceMappingURL=ajax.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// ###################################################################################################################################################\r\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\r\n// ###################################################################################################################################################\r\n// Generally you should only put values that are used more than 2 times and then only if not already exposed as a constant (such as SdkCoreNames)\r\n// as when using \"short\" named values from here they will be will be minified smaller than the SdkCoreNames[eSdkCoreNames.xxxx] value.\r\nexport var STR_DURATION = \"duration\";\r\nexport var STR_PROPERTIES = \"properties\";\r\n//# sourceMappingURL=InternalConstants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_REQUEST_URL = \"requestUrl\"; // Count: 12\r\nexport var _DYN_INST = \"inst\"; // Count: 5\r\nexport var _DYN_LENGTH = \"length\"; // Count: 10\r\nexport var _DYN_TRACE_ID = \"traceID\"; // Count: 9\r\nexport var _DYN_SPAN_ID = \"spanID\"; // Count: 8\r\nexport var _DYN_TRACE_FLAGS = \"traceFlags\"; // Count: 13\r\nexport var _DYN_CONTEXT = \"context\"; // Count: 7\r\nexport var _DYN_ABORTED = \"aborted\"; // Count: 7\r\nexport var _DYN_TRACE_ID0 = \"traceId\"; // Count: 5\r\nexport var _DYN_SPAN_ID1 = \"spanId\"; // Count: 5\r\nexport var _DYN__ADD_HOOK = \"_addHook\"; // Count: 4\r\nexport var _DYN_CORE = \"core\"; // Count: 8\r\nexport var _DYN_INCLUDE_CORRELATION_2 = \"includeCorrelationHeaders\"; // Count: 4\r\nexport var _DYN_GET_ABSOLUTE_URL = \"getAbsoluteUrl\"; // Count: 3\r\nexport var _DYN_HEADERS = \"headers\"; // Count: 6\r\nexport var _DYN_REQUEST_HEADERS = \"requestHeaders\"; // Count: 13\r\nexport var _DYN_SET_REQUEST_HEADER = \"setRequestHeader\"; // Count: 3\r\nexport var _DYN_TRACK_DEPENDENCY_DAT3 = \"trackDependencyDataInternal\"; // Count: 2\r\nexport var _DYN_START_TIME = \"startTime\"; // Count: 6\r\nexport var _DYN_TO_LOWER_CASE = \"toLowerCase\"; // Count: 6\r\nexport var _DYN_ENABLE_REQUEST_HEADE4 = \"enableRequestHeaderTracking\"; // Count: 3\r\nexport var _DYN_ENABLE_AJAX_ERROR_ST5 = \"enableAjaxErrorStatusText\"; // Count: 2\r\nexport var _DYN_ENABLE_AJAX_PERF_TRA6 = \"enableAjaxPerfTracking\"; // Count: 2\r\nexport var _DYN_MAX_AJAX_CALLS_PER_V7 = \"maxAjaxCallsPerView\"; // Count: 2\r\nexport var _DYN_EXCLUDE_REQUEST_FROM8 = \"excludeRequestFromAutoTrackingPatterns\"; // Count: 2\r\nexport var _DYN_ADD_REQUEST_CONTEXT = \"addRequestContext\"; // Count: 2\r\nexport var _DYN_DISABLE_AJAX_TRACKIN9 = \"disableAjaxTracking\"; // Count: 3\r\nexport var _DYN_AJAX_PERF_LOOKUP_DEL10 = \"ajaxPerfLookupDelay\"; // Count: 2\r\nexport var _DYN_DISABLE_FETCH_TRACKI11 = \"disableFetchTracking\"; // Count: 2\r\nexport var _DYN_ENABLE_RESPONSE_HEAD12 = \"enableResponseHeaderTracking\"; // Count: 2\r\nexport var _DYN_STATUS = \"status\"; // Count: 11\r\nexport var _DYN_STATUS_TEXT = \"statusText\"; // Count: 9\r\nexport var _DYN_HEADER_MAP = \"headerMap\"; // Count: 8\r\nexport var _DYN_OPEN_DONE = \"openDone\"; // Count: 3\r\nexport var _DYN_SEND_DONE = \"sendDone\"; // Count: 3\r\nexport var _DYN_REQUEST_SENT_TIME = \"requestSentTime\"; // Count: 9\r\nexport var _DYN_ABORT_DONE = \"abortDone\"; // Count: 3\r\nexport var _DYN_GET_TRACE_ID = \"getTraceId\"; // Count: 3\r\nexport var _DYN_GET_TRACE_FLAGS = \"getTraceFlags\"; // Count: 3\r\nexport var _DYN_METHOD = \"method\"; // Count: 8\r\nexport var _DYN_ERROR_STATUS_TEXT = \"errorStatusText\"; // Count: 3\r\nexport var _DYN_STATE_CHANGE_ATTACHE13 = \"stateChangeAttached\"; // Count: 2\r\nexport var _DYN_RESPONSE_TEXT = \"responseText\"; // Count: 6\r\nexport var _DYN_RESPONSE_FINISHED_TI14 = \"responseFinishedTime\"; // Count: 7\r\nexport var _DYN__CREATE_TRACK_ITEM = \"CreateTrackItem\"; // Count: 3\r\nexport var _DYN_RESPONSE = \"response\"; // Count: 4\r\nexport var _DYN_GET_ALL_RESPONSE_HEA15 = \"getAllResponseHeaders\"; // Count: 2\r\nexport var _DYN_GET_PART_APROPS = \"getPartAProps\"; // Count: 3\r\nexport var _DYN_PERF_MARK = \"perfMark\"; // Count: 4\r\nexport var _DYN_NAME = \"name\"; // Count: 6\r\nexport var _DYN_PERF_TIMING = \"perfTiming\"; // Count: 3\r\nexport var _DYN_EXCEPTION = \"exception\"; // Count: 5\r\nexport var _DYN_AJAX_DIAGNOSTICS_MES16 = \"ajaxDiagnosticsMessage\"; // Count: 3\r\nexport var _DYN_CORRELATION_CONTEXT = \"correlationContext\"; // Count: 3\r\nexport var _DYN_AJAX_TOTAL_DURATION = \"ajaxTotalDuration\"; // Count: 3\r\nexport var _DYN_EVENT_TRACE_CTX = \"eventTraceCtx\"; // Count: 3\r\n//# sourceMappingURL=__DynamicConstants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { Extensions, dataSanitizeUrl, dateTimeUtilsDuration, msToTimeSpan, urlGetAbsoluteUrl, urlGetCompleteUrl } from \"@microsoft/applicationinsights-common\";\r\nimport { arrForEach, isNullOrUndefined, isNumber, isString, normalizeJsName, objForEachKey, objKeys } from \"@microsoft/applicationinsights-core-js\";\r\nimport { STR_DURATION, STR_PROPERTIES } from \"./InternalConstants\";\r\nimport { _DYN_ABORTED, _DYN_ABORT_DONE, _DYN_AJAX_TOTAL_DURATION, _DYN_CORRELATION_CONTEXT, _DYN_ERROR_STATUS_TEXT, _DYN_EVENT_TRACE_CTX, _DYN_GET_ABSOLUTE_URL, _DYN_GET_PART_APROPS, _DYN_GET_TRACE_FLAGS, _DYN_GET_TRACE_ID, _DYN_HEADER_MAP, _DYN_LENGTH, _DYN_METHOD, _DYN_NAME, _DYN_OPEN_DONE, _DYN_PERF_MARK, _DYN_PERF_TIMING, _DYN_REQUEST_HEADERS, _DYN_REQUEST_SENT_TIME, _DYN_REQUEST_URL, _DYN_RESPONSE, _DYN_RESPONSE_FINISHED_TI14, _DYN_SEND_DONE, _DYN_SPAN_ID, _DYN_SPAN_ID1, _DYN_START_TIME, _DYN_STATE_CHANGE_ATTACHE13, _DYN_STATUS, _DYN_STATUS_TEXT, _DYN_TRACE_FLAGS, _DYN_TRACE_ID, _DYN_TRACE_ID0, _DYN__CREATE_TRACK_ITEM } from \"./__DynamicConstants\";\r\n/** @ignore */\r\nfunction _calcPerfDuration(resourceEntry, start, end) {\r\n var result = 0;\r\n var from = resourceEntry[start];\r\n var to = resourceEntry[end];\r\n if (from && to) {\r\n result = dateTimeUtilsDuration(from, to);\r\n }\r\n return result;\r\n}\r\n/** @ignore */\r\nfunction _setPerfDuration(props, name, resourceEntry, start, end) {\r\n var result = 0;\r\n var value = _calcPerfDuration(resourceEntry, start, end);\r\n if (value) {\r\n result = _setPerfValue(props, name, msToTimeSpan(value));\r\n }\r\n return result;\r\n}\r\n/** @ignore */\r\nfunction _setPerfValue(props, name, value) {\r\n var strPerf = \"ajaxPerf\";\r\n var result = 0;\r\n if (props && name && value) {\r\n var perfData = props[strPerf] = (props[strPerf] || {});\r\n perfData[name] = value;\r\n result = 1;\r\n }\r\n return result;\r\n}\r\n/** @ignore */\r\nfunction _populatePerfData(ajaxData, dependency) {\r\n /*\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API\r\n * | -startTime\r\n * | -redirectStart\r\n * | | -redirectEnd\r\n * | | | -fetchStart\r\n * | | | | -domainLookupStart\r\n * | | | | |- domainLookupEnd\r\n * | | | | | | -connectStart\r\n * | | | | | | | -secureConnectionStart\r\n * | | | | | | | | -connectEnd\r\n * | | | | | | | | | -requestStart\r\n * | | | | | | | | | | | -responseStart\r\n * | | | | | | | | | | | | | -responseEnd\r\n * +------------+-+---+----------------+-+--+--------+-+-----------+-+------------+-+\r\n * |--redirect--| |---|--domainLookup--| |--connect--| |--request--| |--response--| |\r\n * |-------------------networkConnect----------------|\r\n * | |---------sentRequest--------|\r\n * |------------------------------------perfTotal-----------------------------------|\r\n */\r\n var resourceEntry = ajaxData[_DYN_PERF_TIMING /* @min:%2eperfTiming */];\r\n var props = dependency[STR_PROPERTIES /* @min:%2eproperties */] || {};\r\n var propsSet = 0;\r\n var strName = \"name\";\r\n var strStart = \"Start\";\r\n var strEnd = \"End\";\r\n var strDomainLookup = \"domainLookup\";\r\n var strConnect = \"connect\";\r\n var strRedirect = \"redirect\";\r\n var strRequest = \"request\";\r\n var strResponse = \"response\";\r\n var strStartTime = \"startTime\";\r\n var strDomainLookupStart = strDomainLookup + strStart;\r\n var strDomainLookupEnd = strDomainLookup + strEnd;\r\n var strConnectStart = strConnect + strStart;\r\n var strConnectEnd = strConnect + strEnd;\r\n var strRequestStart = strRequest + strStart;\r\n var strRequestEnd = strRequest + strEnd;\r\n var strResponseStart = strResponse + strStart;\r\n var strResponseEnd = strResponse + strEnd;\r\n var strRedirectStart = strRedirect + strStart;\r\n var strRedirectEnd = strRedirect = strEnd;\r\n var strTransferSize = \"transferSize\";\r\n var strEncodedBodySize = \"encodedBodySize\";\r\n var strDecodedBodySize = \"decodedBodySize\";\r\n var strServerTiming = \"serverTiming\";\r\n if (resourceEntry) {\r\n // redirect\r\n propsSet |= _setPerfDuration(props, strRedirect, resourceEntry, strRedirectStart, strRedirectEnd);\r\n // domainLookup\r\n propsSet |= _setPerfDuration(props, strDomainLookup, resourceEntry, strDomainLookupStart, strDomainLookupEnd);\r\n // connect\r\n propsSet |= _setPerfDuration(props, strConnect, resourceEntry, strConnectStart, strConnectEnd);\r\n // request\r\n propsSet |= _setPerfDuration(props, strRequest, resourceEntry, strRequestStart, strRequestEnd);\r\n // response\r\n propsSet |= _setPerfDuration(props, strResponse, resourceEntry, strResponseStart, strResponseEnd);\r\n // Network connection time\r\n propsSet |= _setPerfDuration(props, \"networkConnect\", resourceEntry, strStartTime, strConnectEnd);\r\n // Sent Request\r\n propsSet |= _setPerfDuration(props, \"sentRequest\", resourceEntry, strRequestStart, strResponseEnd);\r\n // PerfTotal / Duration\r\n var duration = resourceEntry[STR_DURATION /* @min:%2eduration */];\r\n if (!duration) {\r\n duration = _calcPerfDuration(resourceEntry, strStartTime, strResponseEnd) || 0;\r\n }\r\n propsSet |= _setPerfValue(props, STR_DURATION, duration);\r\n propsSet |= _setPerfValue(props, \"perfTotal\", duration);\r\n var serverTiming = resourceEntry[strServerTiming];\r\n if (serverTiming) {\r\n var server_1 = {};\r\n arrForEach(serverTiming, function (value, idx) {\r\n var name = normalizeJsName(value[strName] || \"\" + idx);\r\n var newValue = server_1[name] || {};\r\n objForEachKey(value, function (key, val) {\r\n if (key !== strName && isString(val) || isNumber(val)) {\r\n if (newValue[key]) {\r\n val = newValue[key] + \";\" + val;\r\n }\r\n if (val || !isString(val)) {\r\n // Only set the value if it has a value and it's not an empty string\r\n newValue[key] = val;\r\n }\r\n }\r\n });\r\n server_1[name] = newValue;\r\n });\r\n propsSet |= _setPerfValue(props, strServerTiming, server_1);\r\n }\r\n propsSet |= _setPerfValue(props, strTransferSize, resourceEntry[strTransferSize]);\r\n propsSet |= _setPerfValue(props, strEncodedBodySize, resourceEntry[strEncodedBodySize]);\r\n propsSet |= _setPerfValue(props, strDecodedBodySize, resourceEntry[strDecodedBodySize]);\r\n }\r\n else {\r\n if (ajaxData[_DYN_PERF_MARK /* @min:%2eperfMark */]) {\r\n propsSet |= _setPerfValue(props, \"missing\", ajaxData.perfAttempts);\r\n }\r\n }\r\n if (propsSet) {\r\n dependency[STR_PROPERTIES /* @min:%2eproperties */] = props;\r\n }\r\n}\r\nvar XHRMonitoringState = /** @class */ (function () {\r\n function XHRMonitoringState() {\r\n var self = this;\r\n self[_DYN_OPEN_DONE /* @min:%2eopenDone */] = false;\r\n self.setRequestHeaderDone = false;\r\n self[_DYN_SEND_DONE /* @min:%2esendDone */] = false;\r\n self[_DYN_ABORT_DONE /* @min:%2eabortDone */] = false;\r\n // True, if onreadyStateChangeCallback function attached to xhr, otherwise false\r\n self[_DYN_STATE_CHANGE_ATTACHE13 /* @min:%2estateChangeAttached */] = false;\r\n }\r\n return XHRMonitoringState;\r\n}());\r\nexport { XHRMonitoringState };\r\nvar ajaxRecord = /** @class */ (function () {\r\n function ajaxRecord(traceId, spanId, logger, traceCtx) {\r\n var _a;\r\n var self = this;\r\n var _logger = logger;\r\n var strResponseText = \"responseText\";\r\n // Assigning the initial/default values within the constructor to avoid typescript from creating a bunch of\r\n // this.XXXX = null\r\n self[_DYN_PERF_MARK /* @min:%2eperfMark */] = null;\r\n self.completed = false;\r\n self.requestHeadersSize = null;\r\n self[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */] = null;\r\n self.responseReceivingDuration = null;\r\n self.callbackDuration = null;\r\n self[_DYN_AJAX_TOTAL_DURATION /* @min:%2eajaxTotalDuration */] = null;\r\n self[_DYN_ABORTED /* @min:%2eaborted */] = 0;\r\n self.pageUrl = null;\r\n self[_DYN_REQUEST_URL /* @min:%2erequestUrl */] = null;\r\n self.requestSize = 0;\r\n self[_DYN_METHOD /* @min:%2emethod */] = null;\r\n self[_DYN_STATUS /* @min:%2estatus */] = null;\r\n self[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */] = null;\r\n self.responseStartedTime = null;\r\n self[_DYN_RESPONSE_FINISHED_TI14 /* @min:%2eresponseFinishedTime */] = null;\r\n self.callbackFinishedTime = null;\r\n self.endTime = null;\r\n self.xhrMonitoringState = new XHRMonitoringState();\r\n self.clientFailure = 0;\r\n self[_DYN_TRACE_ID /* @min:%2etraceID */] = traceId;\r\n self[_DYN_SPAN_ID /* @min:%2espanID */] = spanId;\r\n self[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = traceCtx === null || traceCtx === void 0 ? void 0 : traceCtx.getTraceFlags();\r\n if (traceCtx) {\r\n self[_DYN_EVENT_TRACE_CTX /* @min:%2eeventTraceCtx */] = (_a = {},\r\n _a[_DYN_TRACE_ID0 /* @min:traceId */] = traceCtx[_DYN_GET_TRACE_ID /* @min:%2egetTraceId */](),\r\n _a[_DYN_SPAN_ID1 /* @min:spanId */] = traceCtx.getSpanId(),\r\n _a[_DYN_TRACE_FLAGS /* @min:traceFlags */] = traceCtx[_DYN_GET_TRACE_FLAGS /* @min:%2egetTraceFlags */](),\r\n _a);\r\n }\r\n else {\r\n self[_DYN_EVENT_TRACE_CTX /* @min:%2eeventTraceCtx */] = null;\r\n }\r\n dynamicProto(ajaxRecord, self, function (self) {\r\n self.getAbsoluteUrl = function () {\r\n return self[_DYN_REQUEST_URL /* @min:%2erequestUrl */] ? urlGetAbsoluteUrl(self[_DYN_REQUEST_URL /* @min:%2erequestUrl */]) : null;\r\n };\r\n self.getPathName = function () {\r\n return self[_DYN_REQUEST_URL /* @min:%2erequestUrl */] ? dataSanitizeUrl(_logger, urlGetCompleteUrl(self[_DYN_METHOD /* @min:%2emethod */], self[_DYN_REQUEST_URL /* @min:%2erequestUrl */])) : null;\r\n };\r\n self[_DYN__CREATE_TRACK_ITEM /* @min:%2eCreateTrackItem */] = function (ajaxType, enableRequestHeaderTracking, getResponse) {\r\n var _a;\r\n // round to 3 decimal points\r\n self.ajaxTotalDuration = Math.round(dateTimeUtilsDuration(self.requestSentTime, self.responseFinishedTime) * 1000) / 1000;\r\n if (self[_DYN_AJAX_TOTAL_DURATION /* @min:%2eajaxTotalDuration */] < 0) {\r\n return null;\r\n }\r\n var dependency = (_a = {\r\n id: \"|\" + self[_DYN_TRACE_ID /* @min:%2etraceID */] + \".\" + self[_DYN_SPAN_ID /* @min:%2espanID */],\r\n target: self[_DYN_GET_ABSOLUTE_URL /* @min:%2egetAbsoluteUrl */]()\r\n },\r\n _a[_DYN_NAME /* @min:name */] = self.getPathName(),\r\n _a.type = ajaxType,\r\n _a[_DYN_START_TIME /* @min:startTime */] = null,\r\n _a.duration = self[_DYN_AJAX_TOTAL_DURATION /* @min:%2eajaxTotalDuration */],\r\n _a.success = (+(self[_DYN_STATUS /* @min:%2estatus */])) >= 200 && (+(self[_DYN_STATUS /* @min:%2estatus */])) < 400,\r\n _a.responseCode = (+(self[_DYN_STATUS /* @min:%2estatus */])),\r\n _a[STR_PROPERTIES] = { HttpMethod: self[_DYN_METHOD /* @min:%2emethod */] },\r\n _a);\r\n var props = dependency[STR_PROPERTIES];\r\n if (self[_DYN_ABORTED /* @min:%2eaborted */]) {\r\n props[_DYN_ABORTED /* @min:%2eaborted */] = true;\r\n }\r\n if (self[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */]) {\r\n // Set the correct dependency start time\r\n dependency[_DYN_START_TIME /* @min:%2estartTime */] = new Date();\r\n dependency[_DYN_START_TIME /* @min:%2estartTime */].setTime(self[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */]);\r\n }\r\n // Add Ajax perf details if available\r\n _populatePerfData(self, dependency);\r\n if (enableRequestHeaderTracking) {\r\n if (objKeys(self.requestHeaders)[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n props[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */] = self[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */];\r\n }\r\n }\r\n if (getResponse) {\r\n var response = getResponse();\r\n if (response) {\r\n // enrich dependency target with correlation context from the server\r\n var correlationContext = response[_DYN_CORRELATION_CONTEXT /* @min:%2ecorrelationContext */];\r\n if (correlationContext) {\r\n dependency.correlationContext = /* dependency.target + \" | \" + */ correlationContext;\r\n }\r\n if (response[_DYN_HEADER_MAP /* @min:%2eheaderMap */]) {\r\n if (objKeys(response.headerMap)[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n props.responseHeaders = response[_DYN_HEADER_MAP /* @min:%2eheaderMap */];\r\n }\r\n }\r\n if (self[_DYN_ERROR_STATUS_TEXT /* @min:%2eerrorStatusText */]) {\r\n if (self[_DYN_STATUS /* @min:%2estatus */] >= 400) {\r\n var responseType = response.type;\r\n if (responseType === \"\" || responseType === \"text\") {\r\n props.responseText = response.responseText ? response[_DYN_STATUS_TEXT /* @min:%2estatusText */] + \" - \" + response[strResponseText] : response[_DYN_STATUS_TEXT /* @min:%2estatusText */];\r\n }\r\n if (responseType === \"json\") {\r\n props.responseText = response.response ? response[_DYN_STATUS_TEXT /* @min:%2estatusText */] + \" - \" + JSON.stringify(response[_DYN_RESPONSE /* @min:%2eresponse */]) : response[_DYN_STATUS_TEXT /* @min:%2estatusText */];\r\n }\r\n }\r\n else if (self[_DYN_STATUS /* @min:%2estatus */] === 0) {\r\n props.responseText = response[_DYN_STATUS_TEXT /* @min:%2estatusText */] || \"\";\r\n }\r\n }\r\n }\r\n }\r\n return dependency;\r\n };\r\n self[_DYN_GET_PART_APROPS /* @min:%2egetPartAProps */] = function () {\r\n var _a;\r\n var partA = null;\r\n var traceCtx = self[_DYN_EVENT_TRACE_CTX /* @min:%2eeventTraceCtx */];\r\n if (traceCtx && (traceCtx[_DYN_TRACE_ID0 /* @min:%2etraceId */] || traceCtx[_DYN_SPAN_ID1 /* @min:%2espanId */])) {\r\n partA = {};\r\n var traceExt = partA[Extensions.TraceExt] = (_a = {},\r\n _a[_DYN_TRACE_ID /* @min:traceID */] = traceCtx[_DYN_TRACE_ID0 /* @min:%2etraceId */],\r\n _a.parentID = traceCtx[_DYN_SPAN_ID1 /* @min:%2espanId */],\r\n _a);\r\n if (!isNullOrUndefined(traceCtx[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */])) {\r\n traceExt[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = traceCtx[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */];\r\n }\r\n }\r\n return partA;\r\n };\r\n });\r\n }\r\n ajaxRecord.prototype.getAbsoluteUrl = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n ajaxRecord.prototype.getPathName = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n ajaxRecord.prototype.CreateTrackItem = function (ajaxType, enableRequestHeaderTracking, getResponse) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n ajaxRecord.prototype.getPartAProps = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n return ajaxRecord;\r\n}());\r\nexport { ajaxRecord };\r\n//# sourceMappingURL=ajaxRecord.js.map","/**\r\n* PropertiesPlugin.ts\r\n* @copyright Microsoft 2018\r\n*/\r\nvar _a;\r\nimport { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { BreezeChannelIdentifier, PageView, PropertiesPluginIdentifier, createDistributedTraceContextFromTrace } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, _InternalLogMessage, _logInternalMessage, createProcessTelemetryContext, getNavigator, getSetValue, isNullOrUndefined, onConfigChange } from \"@microsoft/applicationinsights-core-js\";\r\nimport { objDeepFreeze, objDefine } from \"@nevware21/ts-utils\";\r\nimport { TelemetryContext } from \"./TelemetryContext\";\r\nimport { _DYN_ACCOUNT_ID, _DYN_APPLY_APPLICATION_CO1, _DYN_APPLY_DEVICE_CONTEXT, _DYN_APPLY_INTERNAL_CONTE5, _DYN_APPLY_LOCATION_CONTE4, _DYN_APPLY_OPERATING_SYST3, _DYN_APPLY_OPERATION_CONT2, _DYN_APPLY_SESSION_CONTEX0, _DYN_APPLY_USER_CONTEXT, _DYN_GET_NEW_ID, _DYN_GET_SESSION_ID, _DYN_GET_TRACE_CTX, _DYN_ID_LENGTH, _DYN_IS_NEW_USER, _DYN_IS_USER_COOKIE_SET, _DYN_NAME_PREFIX, _DYN_SESSION_COOKIE_POSTF6, _DYN_SESSION_MANAGER, _DYN_TELEMETRY_TRACE, _DYN_UPDATE, _DYN_USER_COOKIE_POSTFIX } from \"./__DynamicConstants\";\r\nvar undefString;\r\nvar nullValue = null;\r\nvar _defaultConfig = objDeepFreeze((_a = {},\r\n _a[_DYN_ACCOUNT_ID /* @min:accountId */] = nullValue,\r\n _a.sessionRenewalMs = 30 * 60 * 1000,\r\n _a.samplingPercentage = 100,\r\n _a.sessionExpirationMs = 24 * 60 * 60 * 1000,\r\n _a.cookieDomain = nullValue,\r\n _a.sdkExtension = nullValue,\r\n _a.isBrowserLinkTrackingEnabled = false,\r\n _a.appId = nullValue,\r\n _a[_DYN_GET_SESSION_ID /* @min:getSessionId */] = nullValue,\r\n _a[_DYN_NAME_PREFIX /* @min:namePrefix */] = undefString,\r\n _a[_DYN_SESSION_COOKIE_POSTF6 /* @min:sessionCookiePostfix */] = undefString,\r\n _a[_DYN_USER_COOKIE_POSTFIX /* @min:userCookiePostfix */] = undefString,\r\n _a[_DYN_ID_LENGTH /* @min:idLength */] = 22,\r\n _a[_DYN_GET_NEW_ID /* @min:getNewId */] = nullValue,\r\n _a));\r\nvar PropertiesPlugin = /** @class */ (function (_super) {\r\n __extends(PropertiesPlugin, _super);\r\n function PropertiesPlugin() {\r\n var _this = _super.call(this) || this;\r\n _this.priority = 110;\r\n _this.identifier = PropertiesPluginIdentifier;\r\n var _extensionConfig;\r\n var _distributedTraceCtx;\r\n var _previousTraceCtx;\r\n var _context;\r\n dynamicProto(PropertiesPlugin, _this, function (_self, _base) {\r\n _initDefaults();\r\n objDefine(_self, \"context\", {\r\n g: function () {\r\n return _context;\r\n }\r\n });\r\n _self.initialize = function (config, core, extensions, pluginChain) {\r\n _base.initialize(config, core, extensions, pluginChain);\r\n _populateDefaults(config);\r\n };\r\n /**\r\n * Add Part A fields to the event\r\n * @param event - The event that needs to be processed\r\n */\r\n _self.processTelemetry = function (event, itemCtx) {\r\n if (!isNullOrUndefined(event)) {\r\n itemCtx = _self._getTelCtx(itemCtx);\r\n // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\r\n if (event.name === PageView.envelopeType) {\r\n itemCtx.diagLog().resetInternalMessageCount();\r\n }\r\n var theContext = (_context || {});\r\n if (theContext.session) {\r\n // If customer did not provide custom session id update the session manager\r\n if (typeof _context.session.id !== \"string\" && theContext[_DYN_SESSION_MANAGER /* @min:%2esessionManager */]) {\r\n theContext[_DYN_SESSION_MANAGER /* @min:%2esessionManager */][_DYN_UPDATE /* @min:%2eupdate */]();\r\n }\r\n }\r\n var userCtx = theContext.user;\r\n if (userCtx && !userCtx[_DYN_IS_USER_COOKIE_SET /* @min:%2eisUserCookieSet */]) {\r\n userCtx[_DYN_UPDATE /* @min:%2eupdate */](theContext.user.id);\r\n }\r\n _processTelemetryInternal(event, itemCtx);\r\n if (userCtx && userCtx[_DYN_IS_NEW_USER /* @min:%2eisNewUser */]) {\r\n userCtx[_DYN_IS_NEW_USER /* @min:%2eisNewUser */] = false;\r\n var message = new _InternalLogMessage(72 /* _eInternalMessageId.SendBrowserInfoOnUserInit */, ((getNavigator() || {}).userAgent || \"\"));\r\n _logInternalMessage(itemCtx.diagLog(), 1 /* eLoggingSeverity.CRITICAL */, message);\r\n }\r\n _self.processNext(event, itemCtx);\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState) {\r\n var core = (unloadCtx || {}).core();\r\n if (core && core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */]) {\r\n var traceCtx = core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */](false);\r\n if (traceCtx === _distributedTraceCtx) {\r\n core.setTraceCtx(_previousTraceCtx);\r\n }\r\n }\r\n _initDefaults();\r\n };\r\n function _initDefaults() {\r\n _extensionConfig = null;\r\n _distributedTraceCtx = null;\r\n _previousTraceCtx = null;\r\n _context = null;\r\n }\r\n function _populateDefaults(config) {\r\n var identifier = _self.identifier;\r\n var core = _self.core;\r\n // This function will be re-called whenever any referenced configuration is changed\r\n _self._addHook(onConfigChange(config, function () {\r\n var ctx = createProcessTelemetryContext(null, config, core);\r\n _extensionConfig = ctx.getExtCfg(identifier, _defaultConfig);\r\n // Test hook to allow accessing the internal values -- explicitly not defined as an available property on the class\r\n _self[\"_extConfig\"] = _extensionConfig;\r\n }));\r\n // This is outside of the onConfigChange as we don't want to update (replace) these values whenever a referenced config item changes\r\n _previousTraceCtx = core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */](false);\r\n _context = new TelemetryContext(core, _extensionConfig, _previousTraceCtx, _self._unloadHooks);\r\n _distributedTraceCtx = createDistributedTraceContextFromTrace(_self.context[_DYN_TELEMETRY_TRACE /* @min:%2etelemetryTrace */], _previousTraceCtx);\r\n core.setTraceCtx(_distributedTraceCtx);\r\n _self.context.appId = function () {\r\n var breezeChannel = core.getPlugin(BreezeChannelIdentifier);\r\n return breezeChannel ? breezeChannel.plugin[\"_appId\"] : null;\r\n };\r\n }\r\n function _processTelemetryInternal(evt, itemCtx) {\r\n // Set Part A fields\r\n getSetValue(evt, \"tags\", []);\r\n getSetValue(evt, \"ext\", {});\r\n var ctx = _self.context;\r\n ctx[_DYN_APPLY_SESSION_CONTEX0 /* @min:%2eapplySessionContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_APPLICATION_CO1 /* @min:%2eapplyApplicationContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_DEVICE_CONTEXT /* @min:%2eapplyDeviceContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_OPERATION_CONT2 /* @min:%2eapplyOperationContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_USER_CONTEXT /* @min:%2eapplyUserContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_OPERATING_SYST3 /* @min:%2eapplyOperatingSystemContxt */](evt, itemCtx);\r\n ctx.applyWebContext(evt, itemCtx);\r\n ctx[_DYN_APPLY_LOCATION_CONTE4 /* @min:%2eapplyLocationContext */](evt, itemCtx); // legacy tags\r\n ctx[_DYN_APPLY_INTERNAL_CONTE5 /* @min:%2eapplyInternalContext */](evt, itemCtx); // legacy tags\r\n ctx.cleanUp(evt, itemCtx);\r\n }\r\n });\r\n return _this;\r\n }\r\n PropertiesPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Add Part A fields to the event\r\n * @param event - The event that needs to be processed\r\n */\r\n PropertiesPlugin.prototype.processTelemetry = function (event, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return PropertiesPlugin;\r\n}(BaseTelemetryPlugin));\r\nexport default PropertiesPlugin;\r\n//# sourceMappingURL=PropertiesPlugin.js.map","/**\r\n* TelemetryContext.ts\r\n* @copyright Microsoft 2018\r\n*/\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { CtxTagKeys, Extensions, PageView, dataSanitizeString } from \"@microsoft/applicationinsights-common\";\r\nimport { _InternalLogMessage, getSetValue, hasWindow, isNullOrUndefined, isString, objKeys, setValue } from \"@microsoft/applicationinsights-core-js\";\r\nimport { Application } from \"./Context/Application\";\r\nimport { Device } from \"./Context/Device\";\r\nimport { Internal } from \"./Context/Internal\";\r\nimport { Location } from \"./Context/Location\";\r\nimport { Session, _SessionManager } from \"./Context/Session\";\r\nimport { TelemetryTrace } from \"./Context/TelemetryTrace\";\r\nimport { User } from \"./Context/User\";\r\nimport { _DYN_ACCOUNT_ID, _DYN_APPLY_APPLICATION_CO1, _DYN_APPLY_DEVICE_CONTEXT, _DYN_APPLY_INTERNAL_CONTE5, _DYN_APPLY_LOCATION_CONTE4, _DYN_APPLY_OPERATING_SYST3, _DYN_APPLY_OPERATION_CONT2, _DYN_APPLY_SESSION_CONTEX0, _DYN_APPLY_USER_CONTEXT, _DYN_AUTHENTICATED_ID, _DYN_AUTOMATIC_SESSION, _DYN_GET_SESSION_ID, _DYN_LENGTH, _DYN_SESSION_MANAGER, _DYN_TELEMETRY_TRACE } from \"./__DynamicConstants\";\r\nvar strExt = \"ext\";\r\nvar strTags = \"tags\";\r\nfunction _removeEmpty(target, name) {\r\n if (target && target[name] && objKeys(target[name])[_DYN_LENGTH /* @min:%2elength */] === 0) {\r\n delete target[name];\r\n }\r\n}\r\nfunction _nullResult() {\r\n return null;\r\n}\r\nvar TelemetryContext = /** @class */ (function () {\r\n function TelemetryContext(core, defaultConfig, previousTraceCtx, unloadHookContainer) {\r\n var _this = this;\r\n var logger = core.logger;\r\n dynamicProto(TelemetryContext, this, function (_self) {\r\n _self.appId = _nullResult;\r\n _self[_DYN_GET_SESSION_ID /* @min:%2egetSessionId */] = _nullResult;\r\n _self.application = new Application();\r\n _self.internal = new Internal(defaultConfig, unloadHookContainer);\r\n if (hasWindow()) {\r\n _self[_DYN_SESSION_MANAGER /* @min:%2esessionManager */] = new _SessionManager(defaultConfig, core, unloadHookContainer);\r\n _self.device = new Device();\r\n _self.location = new Location();\r\n _self.user = new User(defaultConfig, core, unloadHookContainer);\r\n var traceId = void 0;\r\n var parentId = void 0;\r\n var name_1;\r\n if (previousTraceCtx) {\r\n traceId = previousTraceCtx.getTraceId();\r\n parentId = previousTraceCtx.getSpanId();\r\n name_1 = previousTraceCtx.getName();\r\n }\r\n _self[_DYN_TELEMETRY_TRACE /* @min:%2etelemetryTrace */] = new TelemetryTrace(traceId, parentId, name_1, logger);\r\n _self.session = new Session();\r\n }\r\n _self[_DYN_GET_SESSION_ID /* @min:%2egetSessionId */] = function () {\r\n var session = _self.session;\r\n var sesId = null;\r\n // If customer set session info, apply their context; otherwise apply context automatically generated\r\n if (session && isString(session.id)) {\r\n sesId = session.id;\r\n }\r\n else {\r\n // Gets the automatic session if it exists or an empty object\r\n var autoSession = (_self[_DYN_SESSION_MANAGER /* @min:%2esessionManager */] || {})[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */];\r\n sesId = autoSession && isString(autoSession.id) ? autoSession.id : null;\r\n }\r\n return sesId;\r\n };\r\n _self[_DYN_APPLY_SESSION_CONTEX0 /* @min:%2eapplySessionContext */] = function (evt, itemCtx) {\r\n setValue(getSetValue(evt.ext, Extensions.AppExt), \"sesId\", _self[_DYN_GET_SESSION_ID /* @min:%2egetSessionId */](), isString);\r\n };\r\n _self[_DYN_APPLY_OPERATING_SYST3 /* @min:%2eapplyOperatingSystemContxt */] = function (evt, itemCtx) {\r\n setValue(evt.ext, Extensions.OSExt, _self.os);\r\n };\r\n _self[_DYN_APPLY_APPLICATION_CO1 /* @min:%2eapplyApplicationContext */] = function (evt, itemCtx) {\r\n var application = _self.application;\r\n if (application) {\r\n // evt.ext.app\r\n var tags = getSetValue(evt, strTags);\r\n setValue(tags, CtxTagKeys.applicationVersion, application.ver, isString);\r\n setValue(tags, CtxTagKeys.applicationBuild, application.build, isString);\r\n }\r\n };\r\n _self[_DYN_APPLY_DEVICE_CONTEXT /* @min:%2eapplyDeviceContext */] = function (evt, itemCtx) {\r\n var device = _self.device;\r\n if (device) {\r\n // evt.ext.device\r\n var extDevice = getSetValue(getSetValue(evt, strExt), Extensions.DeviceExt);\r\n setValue(extDevice, \"localId\", device.id, isString);\r\n setValue(extDevice, \"ip\", device.ip, isString);\r\n setValue(extDevice, \"model\", device.model, isString);\r\n setValue(extDevice, \"deviceClass\", device.deviceClass, isString);\r\n }\r\n };\r\n _self[_DYN_APPLY_INTERNAL_CONTE5 /* @min:%2eapplyInternalContext */] = function (evt, itemCtx) {\r\n var internal = _self.internal;\r\n if (internal) {\r\n var tags = getSetValue(evt, strTags);\r\n setValue(tags, CtxTagKeys.internalAgentVersion, internal.agentVersion, isString); // not mapped in CS 4.0\r\n setValue(tags, CtxTagKeys.internalSdkVersion, dataSanitizeString(logger, internal.sdkVersion, 64), isString);\r\n if (evt.baseType === _InternalLogMessage.dataType || evt.baseType === PageView.dataType) {\r\n setValue(tags, CtxTagKeys.internalSnippet, internal.snippetVer, isString);\r\n setValue(tags, CtxTagKeys.internalSdkSrc, internal.sdkSrc, isString);\r\n }\r\n }\r\n };\r\n _self[_DYN_APPLY_LOCATION_CONTE4 /* @min:%2eapplyLocationContext */] = function (evt, itemCtx) {\r\n var location = _this.location;\r\n if (location) {\r\n setValue(getSetValue(evt, strTags, []), CtxTagKeys.locationIp, location.ip, isString);\r\n }\r\n };\r\n _self[_DYN_APPLY_OPERATION_CONT2 /* @min:%2eapplyOperationContext */] = function (evt, itemCtx) {\r\n var telemetryTrace = _self[_DYN_TELEMETRY_TRACE /* @min:%2etelemetryTrace */];\r\n if (telemetryTrace) {\r\n var extTrace = getSetValue(getSetValue(evt, strExt), Extensions.TraceExt, { traceID: undefined, parentID: undefined });\r\n setValue(extTrace, \"traceID\", telemetryTrace.traceID, isString, isNullOrUndefined);\r\n setValue(extTrace, \"name\", telemetryTrace.name, isString, isNullOrUndefined);\r\n setValue(extTrace, \"parentID\", telemetryTrace.parentID, isString, isNullOrUndefined);\r\n }\r\n };\r\n _self.applyWebContext = function (evt, itemCtx) {\r\n var web = _this.web;\r\n if (web) {\r\n setValue(getSetValue(evt, strExt), Extensions.WebExt, web);\r\n }\r\n };\r\n _self[_DYN_APPLY_USER_CONTEXT /* @min:%2eapplyUserContext */] = function (evt, itemCtx) {\r\n var user = _self.user;\r\n if (user) {\r\n var tags = getSetValue(evt, strTags, []);\r\n // stays in tags\r\n setValue(tags, CtxTagKeys.userAccountId, user[_DYN_ACCOUNT_ID /* @min:%2eaccountId */], isString);\r\n // CS 4.0\r\n var extUser = getSetValue(getSetValue(evt, strExt), Extensions.UserExt);\r\n setValue(extUser, \"id\", user.id, isString);\r\n setValue(extUser, \"authId\", user[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */], isString);\r\n }\r\n };\r\n _self.cleanUp = function (evt, itemCtx) {\r\n var ext = evt.ext;\r\n if (ext) {\r\n _removeEmpty(ext, Extensions.DeviceExt);\r\n _removeEmpty(ext, Extensions.UserExt);\r\n _removeEmpty(ext, Extensions.WebExt);\r\n _removeEmpty(ext, Extensions.OSExt);\r\n _removeEmpty(ext, Extensions.AppExt);\r\n _removeEmpty(ext, Extensions.TraceExt);\r\n }\r\n };\r\n });\r\n }\r\n TelemetryContext.prototype.applySessionContext = function (evt, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n TelemetryContext.prototype.applyOperatingSystemContxt = function (event, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n TelemetryContext.prototype.applyApplicationContext = function (event, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n TelemetryContext.prototype.applyDeviceContext = function (event, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n TelemetryContext.prototype.applyInternalContext = function (event, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n TelemetryContext.prototype.applyLocationContext = function (event, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n TelemetryContext.prototype.applyOperationContext = function (event, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n TelemetryContext.prototype.applyWebContext = function (event, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n TelemetryContext.prototype.applyUserContext = function (event, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n TelemetryContext.prototype.cleanUp = function (event, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return TelemetryContext;\r\n}());\r\nexport { TelemetryContext };\r\n//# sourceMappingURL=TelemetryContext.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Application = /** @class */ (function () {\r\n function Application() {\r\n }\r\n return Application;\r\n}());\r\nexport { Application };\r\n//# sourceMappingURL=Application.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Device = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the Device class\r\n */\r\n function Device() {\r\n // don't attempt to fingerprint browsers\r\n this.id = \"browser\";\r\n // Device type is a dimension in our data platform\r\n // Setting it to 'Browser' allows to separate client and server dependencies/exceptions\r\n this.deviceClass = \"Browser\";\r\n }\r\n return Device;\r\n}());\r\nexport { Device };\r\n//# sourceMappingURL=Device.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { onConfigChange } from \"@microsoft/applicationinsights-core-js\";\r\nvar Version = '3.0.2';\r\nvar Internal = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */\r\n function Internal(config, unloadHookContainer) {\r\n var _this = this;\r\n var unloadHook = onConfigChange((config), function () {\r\n var prefix = config.sdkExtension;\r\n _this.sdkVersion = (prefix ? prefix + \"_\" : \"\") + \"javascript:\" + Version;\r\n });\r\n unloadHookContainer && unloadHookContainer.add(unloadHook);\r\n }\r\n return Internal;\r\n}());\r\nexport { Internal };\r\n//# sourceMappingURL=Internal.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Location = /** @class */ (function () {\r\n function Location() {\r\n }\r\n return Location;\r\n}());\r\nexport { Location };\r\n//# sourceMappingURL=Location.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage } from \"@microsoft/applicationinsights-common\";\r\nimport { _throwInternal, dateNow, dumpObj, getExceptionName, isFunction, newId, onConfigChange, safeGetCookieMgr, safeGetLogger } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_ACQUISITION_DATE, _DYN_AUTOMATIC_SESSION, _DYN_GET_NEW_ID, _DYN_ID_LENGTH, _DYN_JOIN, _DYN_LENGTH, _DYN_NAME_PREFIX, _DYN_RENEWAL_DATE, _DYN_UPDATE } from \"../__DynamicConstants\";\r\nvar SESSION_COOKIE_NAME = \"ai_session\";\r\nvar ACQUISITION_SPAN = 86400000; // 24 hours in ms\r\nvar RENEWAL_SPAN = 1800000; // 30 minutes in ms\r\nvar COOKIE_UPDATE_INTERVAL = 60000; // 1 minute in ms\r\nvar Session = /** @class */ (function () {\r\n function Session() {\r\n }\r\n return Session;\r\n}());\r\nexport { Session };\r\nvar _SessionManager = /** @class */ (function () {\r\n function _SessionManager(config, core, unloadHookContainer) {\r\n var self = this;\r\n var _storageNamePrefix;\r\n var _cookieUpdatedTimestamp;\r\n var _logger = safeGetLogger(core);\r\n var _cookieManager = safeGetCookieMgr(core);\r\n var _sessionExpirationMs;\r\n var _sessionRenewalMs;\r\n dynamicProto(_SessionManager, self, function (_self) {\r\n if (!config) {\r\n config = {};\r\n }\r\n var unloadHook = onConfigChange(config, function (details) {\r\n _sessionExpirationMs = config.sessionExpirationMs || ACQUISITION_SPAN;\r\n _sessionRenewalMs = config.sessionRenewalMs || RENEWAL_SPAN;\r\n // sessionCookiePostfix takes the preference if it is configured, otherwise takes namePrefix if configured.\r\n var sessionCookiePostfix = config.sessionCookiePostfix || config[_DYN_NAME_PREFIX /* @min:%2enamePrefix */] || \"\";\r\n _storageNamePrefix = SESSION_COOKIE_NAME + sessionCookiePostfix;\r\n });\r\n unloadHookContainer && unloadHookContainer.add(unloadHook);\r\n _self[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */] = new Session();\r\n _self[_DYN_UPDATE /* @min:%2eupdate */] = function () {\r\n // Always using Date getTime() as there is a bug in older IE instances that causes the performance timings to have the hi-bit set eg 0x800000000 causing\r\n // the number to be incorrect.\r\n var nowMs = dateNow();\r\n var isExpired = false;\r\n var session = _self[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */];\r\n if (!session.id) {\r\n isExpired = !_initializeAutomaticSession(session, nowMs);\r\n }\r\n if (!isExpired && _sessionExpirationMs > 0) {\r\n var timeSinceAcqMs = nowMs - session[_DYN_ACQUISITION_DATE /* @min:%2eacquisitionDate */];\r\n var timeSinceRenewalMs = nowMs - session[_DYN_RENEWAL_DATE /* @min:%2erenewalDate */];\r\n isExpired = timeSinceAcqMs < 0 || timeSinceRenewalMs < 0; // expired if the acquisition or last renewal are in the future\r\n isExpired = isExpired || timeSinceAcqMs > _sessionExpirationMs; // expired if the time since acquisition is more than session Expiration\r\n isExpired = isExpired || timeSinceRenewalMs > _sessionRenewalMs; // expired if the time since last renewal is more than renewal period\r\n }\r\n // renew if acquisitionSpan or renewalSpan has elapsed\r\n if (isExpired) {\r\n // update automaticSession so session state has correct id\r\n _renew(nowMs);\r\n }\r\n else {\r\n // do not update the cookie more often than cookieUpdateInterval\r\n if (!_cookieUpdatedTimestamp || nowMs - _cookieUpdatedTimestamp > COOKIE_UPDATE_INTERVAL) {\r\n _setCookie(session, nowMs);\r\n }\r\n }\r\n };\r\n /**\r\n * Record the current state of the automatic session and store it in our cookie string format\r\n * into the browser's local storage. This is used to restore the session data when the cookie\r\n * expires.\r\n */\r\n _self.backup = function () {\r\n var session = _self[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */];\r\n _setStorage(session.id, session[_DYN_ACQUISITION_DATE /* @min:%2eacquisitionDate */], session[_DYN_RENEWAL_DATE /* @min:%2erenewalDate */]);\r\n };\r\n /**\r\n * Use config.namePrefix + ai_session cookie data or local storage data (when the cookie is unavailable) to\r\n * initialize the automatic session.\r\n * @returns true if values set otherwise false\r\n */\r\n function _initializeAutomaticSession(session, now) {\r\n var isValid = false;\r\n var cookieValue = _cookieManager.get(_storageNamePrefix);\r\n if (cookieValue && isFunction(cookieValue.split)) {\r\n isValid = _initializeAutomaticSessionWithData(session, cookieValue);\r\n }\r\n else {\r\n // There's no cookie, but we might have session data in local storage\r\n // This can happen if the session expired or the user actively deleted the cookie\r\n // We only want to recover data if the cookie is missing from expiry. We should respect the user's wishes if the cookie was deleted actively.\r\n // The User class handles this for us and deletes our local storage object if the persistent user cookie was removed.\r\n var storageValue = utlGetLocalStorage(_logger, _storageNamePrefix);\r\n if (storageValue) {\r\n isValid = _initializeAutomaticSessionWithData(session, storageValue);\r\n }\r\n }\r\n return isValid || !!session.id;\r\n }\r\n /**\r\n * Extract id, acquisitionDate, and renewalDate from an ai_session payload string and\r\n * use this data to initialize automaticSession.\r\n *\r\n * @param sessionData - The string stored in an ai_session cookie or local storage backup\r\n * @returns true if values set otherwise false\r\n */\r\n function _initializeAutomaticSessionWithData(session, sessionData) {\r\n var isValid = false;\r\n var sessionReset = \", session will be reset\";\r\n var tokens = sessionData.split(\"|\");\r\n if (tokens[_DYN_LENGTH /* @min:%2elength */] >= 2) {\r\n try {\r\n var acqMs = +tokens[1] || 0;\r\n var renewalMs = +tokens[2] || 0;\r\n if (isNaN(acqMs) || acqMs <= 0) {\r\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 27 /* _eInternalMessageId.SessionRenewalDateIsZero */, \"AI session acquisition date is 0\" + sessionReset);\r\n }\r\n else if (isNaN(renewalMs) || renewalMs <= 0) {\r\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 27 /* _eInternalMessageId.SessionRenewalDateIsZero */, \"AI session renewal date is 0\" + sessionReset);\r\n }\r\n else if (tokens[0]) {\r\n // Everything looks valid so set the values\r\n session.id = tokens[0];\r\n session[_DYN_ACQUISITION_DATE /* @min:%2eacquisitionDate */] = acqMs;\r\n session[_DYN_RENEWAL_DATE /* @min:%2erenewalDate */] = renewalMs;\r\n isValid = true;\r\n }\r\n }\r\n catch (e) {\r\n _throwInternal(_logger, 1 /* eLoggingSeverity.CRITICAL */, 9 /* _eInternalMessageId.ErrorParsingAISessionCookie */, \"Error parsing ai_session value [\" + (sessionData || \"\") + \"]\" + sessionReset + \" - \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n }\r\n return isValid;\r\n }\r\n function _renew(nowMs) {\r\n var getNewId = config[_DYN_GET_NEW_ID /* @min:%2egetNewId */] || newId;\r\n _self.automaticSession.id = getNewId(config[_DYN_ID_LENGTH /* @min:%2eidLength */] || 22);\r\n _self[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */][_DYN_ACQUISITION_DATE /* @min:%2eacquisitionDate */] = nowMs;\r\n _setCookie(_self[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */], nowMs);\r\n // If this browser does not support local storage, fire an internal log to keep track of it at this point\r\n if (!utlCanUseLocalStorage()) {\r\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 0 /* _eInternalMessageId.BrowserDoesNotSupportLocalStorage */, \"Browser does not support local storage. Session durations will be inaccurate.\");\r\n }\r\n }\r\n function _setCookie(session, nowMs) {\r\n var acq = session[_DYN_ACQUISITION_DATE /* @min:%2eacquisitionDate */];\r\n session[_DYN_RENEWAL_DATE /* @min:%2erenewalDate */] = nowMs;\r\n var renewalPeriodMs = _sessionRenewalMs;\r\n // Set cookie to expire after the session expiry time passes or the session renewal deadline, whichever is sooner\r\n // Expiring the cookie will cause the session to expire even if the user isn't on the page\r\n var acqTimeLeftMs = (acq + _sessionExpirationMs) - nowMs;\r\n var cookie = [session.id, acq, nowMs];\r\n var maxAgeSec = 0;\r\n if (acqTimeLeftMs < renewalPeriodMs) {\r\n maxAgeSec = acqTimeLeftMs / 1000;\r\n }\r\n else {\r\n maxAgeSec = renewalPeriodMs / 1000;\r\n }\r\n var cookieDomain = config.cookieDomain || null;\r\n // if sessionExpirationMs is set to 0, it means the expiry is set to 0 for this session cookie\r\n // A cookie with 0 expiry in the session cookie will never expire for that browser session. If the browser is closed the cookie expires.\r\n // Depending on the browser, another instance does not inherit this cookie, however, another tab will\r\n _cookieManager.set(_storageNamePrefix, cookie[_DYN_JOIN /* @min:%2ejoin */](\"|\"), _sessionExpirationMs > 0 ? maxAgeSec : null, cookieDomain);\r\n _cookieUpdatedTimestamp = nowMs;\r\n }\r\n function _setStorage(guid, acq, renewal) {\r\n // Keep data in local storage to retain the last session id, allowing us to cleanly end the session when it expires\r\n // Browsers that don't support local storage won't be able to end sessions cleanly from the client\r\n // The server will notice this and end the sessions itself, with loss of accurate session duration\r\n utlSetLocalStorage(_logger, _storageNamePrefix, [guid, acq, renewal][_DYN_JOIN /* @min:%2ejoin */](\"|\"));\r\n }\r\n });\r\n }\r\n _SessionManager.prototype.update = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Record the current state of the automatic session and store it in our cookie string format\r\n * into the browser's local storage. This is used to restore the session data when the cookie\r\n * expires.\r\n */\r\n _SessionManager.prototype.backup = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return _SessionManager;\r\n}());\r\nexport { _SessionManager };\r\n//# sourceMappingURL=Session.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_SESSION_MANAGER = \"sessionManager\"; // Count: 3\r\nexport var _DYN_UPDATE = \"update\"; // Count: 4\r\nexport var _DYN_IS_USER_COOKIE_SET = \"isUserCookieSet\"; // Count: 4\r\nexport var _DYN_IS_NEW_USER = \"isNewUser\"; // Count: 4\r\nexport var _DYN_GET_TRACE_CTX = \"getTraceCtx\"; // Count: 3\r\nexport var _DYN_TELEMETRY_TRACE = \"telemetryTrace\"; // Count: 3\r\nexport var _DYN_APPLY_SESSION_CONTEX0 = \"applySessionContext\"; // Count: 2\r\nexport var _DYN_APPLY_APPLICATION_CO1 = \"applyApplicationContext\"; // Count: 2\r\nexport var _DYN_APPLY_DEVICE_CONTEXT = \"applyDeviceContext\"; // Count: 2\r\nexport var _DYN_APPLY_OPERATION_CONT2 = \"applyOperationContext\"; // Count: 2\r\nexport var _DYN_APPLY_USER_CONTEXT = \"applyUserContext\"; // Count: 2\r\nexport var _DYN_APPLY_OPERATING_SYST3 = \"applyOperatingSystemContxt\"; // Count: 2\r\nexport var _DYN_APPLY_LOCATION_CONTE4 = \"applyLocationContext\"; // Count: 2\r\nexport var _DYN_APPLY_INTERNAL_CONTE5 = \"applyInternalContext\"; // Count: 2\r\nexport var _DYN_ACCOUNT_ID = \"accountId\"; // Count: 7\r\nexport var _DYN_GET_SESSION_ID = \"getSessionId\"; // Count: 4\r\nexport var _DYN_NAME_PREFIX = \"namePrefix\"; // Count: 3\r\nexport var _DYN_SESSION_COOKIE_POSTF6 = \"sessionCookiePostfix\"; // Count: 2\r\nexport var _DYN_USER_COOKIE_POSTFIX = \"userCookiePostfix\"; // Count: 2\r\nexport var _DYN_ID_LENGTH = \"idLength\"; // Count: 4\r\nexport var _DYN_GET_NEW_ID = \"getNewId\"; // Count: 3\r\nexport var _DYN_LENGTH = \"length\"; // Count: 4\r\nexport var _DYN_AUTOMATIC_SESSION = \"automaticSession\"; // Count: 5\r\nexport var _DYN_AUTHENTICATED_ID = \"authenticatedId\"; // Count: 6\r\nexport var _DYN_ACQUISITION_DATE = \"acquisitionDate\"; // Count: 5\r\nexport var _DYN_RENEWAL_DATE = \"renewalDate\"; // Count: 4\r\nexport var _DYN_JOIN = \"join\"; // Count: 5\r\nexport var _DYN_COOKIE_SEPARATOR = \"cookieSeparator\"; // Count: 5\r\nexport var _DYN_AUTH_USER_COOKIE_NAM7 = \"authUserCookieName\"; // Count: 3\r\n//# sourceMappingURL=__DynamicConstants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { dataSanitizeString } from \"@microsoft/applicationinsights-common\";\r\nimport { generateW3CId, getLocation } from \"@microsoft/applicationinsights-core-js\";\r\nvar TelemetryTrace = /** @class */ (function () {\r\n function TelemetryTrace(id, parentId, name, logger) {\r\n var _self = this;\r\n _self.traceID = id || generateW3CId();\r\n _self.parentID = parentId;\r\n var location = getLocation();\r\n if (!name && location && location.pathname) {\r\n name = location.pathname;\r\n }\r\n _self.name = dataSanitizeString(logger, name);\r\n }\r\n return TelemetryTrace;\r\n}());\r\nexport { TelemetryTrace };\r\n//# sourceMappingURL=TelemetryTrace.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { utlRemoveStorage } from \"@microsoft/applicationinsights-common\";\r\nimport { _throwInternal, newId, onConfigChange, safeGetCookieMgr, safeGetLogger, toISOString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { objDefine } from \"@nevware21/ts-utils\";\r\nimport { _DYN_ACCOUNT_ID, _DYN_AUTHENTICATED_ID, _DYN_AUTH_USER_COOKIE_NAM7, _DYN_COOKIE_SEPARATOR, _DYN_GET_NEW_ID, _DYN_ID_LENGTH, _DYN_IS_NEW_USER, _DYN_IS_USER_COOKIE_SET, _DYN_JOIN, _DYN_LENGTH, _DYN_NAME_PREFIX, _DYN_UPDATE, _DYN_USER_COOKIE_POSTFIX } from \"../__DynamicConstants\";\r\nfunction _validateUserInput(id) {\r\n // Validate:\r\n // 1. Id is a non-empty string.\r\n // 2. It does not contain special characters for cookies.\r\n if (typeof id !== \"string\" ||\r\n !id ||\r\n id.match(/,|;|=| |\\|/)) {\r\n return false;\r\n }\r\n return true;\r\n}\r\nvar User = /** @class */ (function () {\r\n function User(config, core, unloadHookContainer) {\r\n /**\r\n * A flag indicating whether this represents a new user\r\n */\r\n this.isNewUser = false;\r\n /**\r\n * A flag indicating whether the user cookie has been set\r\n */\r\n this.isUserCookieSet = false;\r\n var _logger = safeGetLogger(core);\r\n var _cookieManager = safeGetCookieMgr(core);\r\n var _storageNamePrefix;\r\n dynamicProto(User, this, function (_self) {\r\n // Define _self.config\r\n objDefine(_self, \"config\", {\r\n g: function () { return config; }\r\n });\r\n var unloadHook = onConfigChange(config, function () {\r\n var userCookiePostfix = config[_DYN_USER_COOKIE_POSTFIX /* @min:%2euserCookiePostfix */] || \"\";\r\n _storageNamePrefix = User.userCookieName + userCookiePostfix;\r\n // get userId or create new one if none exists\r\n var cookie = _cookieManager.get(_storageNamePrefix);\r\n if (cookie) {\r\n _self[_DYN_IS_NEW_USER /* @min:%2eisNewUser */] = false;\r\n var params = cookie.split(User[_DYN_COOKIE_SEPARATOR /* @min:%2ecookieSeparator */]);\r\n if (params[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n _self.id = params[0];\r\n // we already have a cookie\r\n _self[_DYN_IS_USER_COOKIE_SET /* @min:%2eisUserCookieSet */] = !!_self.id;\r\n }\r\n }\r\n if (!_self.id) {\r\n _self.id = _generateNewId();\r\n var newCookie = _generateNewCookie(_self.id);\r\n _setUserCookie(newCookie[_DYN_JOIN /* @min:%2ejoin */](User[_DYN_COOKIE_SEPARATOR /* @min:%2ecookieSeparator */]));\r\n // If we have an config.namePrefix() + ai_session in local storage this means the user actively removed our cookies.\r\n // We should respect their wishes and clear ourselves from local storage\r\n var name_1 = (config[_DYN_NAME_PREFIX /* @min:%2enamePrefix */] || \"\") + \"ai_session\";\r\n utlRemoveStorage(_logger, name_1);\r\n }\r\n // We still take the account id from the ctor param for backward compatibility.\r\n // But if the the customer set the accountId through the newer setAuthenticatedUserContext API, we will override it.\r\n _self[_DYN_ACCOUNT_ID /* @min:%2eaccountId */] = config[_DYN_ACCOUNT_ID /* @min:%2eaccountId */] || undefined;\r\n // Get the auth user id and account id from the cookie if exists\r\n // Cookie is in the pattern: |\r\n var authCookie = _cookieManager.get(User[_DYN_AUTH_USER_COOKIE_NAM7 /* @min:%2eauthUserCookieName */]);\r\n if (authCookie) {\r\n authCookie = decodeURI(authCookie);\r\n var authCookieString = authCookie.split(User[_DYN_COOKIE_SEPARATOR /* @min:%2ecookieSeparator */]);\r\n if (authCookieString[0]) {\r\n _self[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */] = authCookieString[0];\r\n }\r\n if (authCookieString[_DYN_LENGTH /* @min:%2elength */] > 1 && authCookieString[1]) {\r\n _self[_DYN_ACCOUNT_ID /* @min:%2eaccountId */] = authCookieString[1];\r\n }\r\n }\r\n });\r\n unloadHookContainer && unloadHookContainer.add(unloadHook);\r\n function _generateNewId() {\r\n var theConfig = (config || {});\r\n var getNewId = theConfig[_DYN_GET_NEW_ID /* @min:%2egetNewId */] || newId;\r\n var id = getNewId(theConfig[_DYN_ID_LENGTH /* @min:%2eidLength */] ? config[_DYN_ID_LENGTH /* @min:%2eidLength */] : 22);\r\n return id;\r\n }\r\n function _generateNewCookie(userId) {\r\n var acqStr = toISOString(new Date());\r\n _self.accountAcquisitionDate = acqStr;\r\n _self[_DYN_IS_NEW_USER /* @min:%2eisNewUser */] = true;\r\n var newCookie = [userId, acqStr];\r\n return newCookie;\r\n }\r\n function _setUserCookie(cookie) {\r\n // without expiration, cookies expire at the end of the session\r\n // set it to 365 days from now\r\n // 365 * 24 * 60 * 60 = 31536000\r\n var oneYear = 31536000;\r\n _self[_DYN_IS_USER_COOKIE_SET /* @min:%2eisUserCookieSet */] = _cookieManager.set(_storageNamePrefix, cookie, oneYear);\r\n }\r\n _self.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) {\r\n if (storeInCookie === void 0) { storeInCookie = false; }\r\n // Validate inputs to ensure no cookie control characters.\r\n var isInvalidInput = !_validateUserInput(authenticatedUserId) || (accountId && !_validateUserInput(accountId));\r\n if (isInvalidInput) {\r\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 60 /* _eInternalMessageId.SetAuthContextFailedAccountName */, \"Setting auth user context failed. \" +\r\n \"User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\", true);\r\n return;\r\n }\r\n // Create cookie string.\r\n _self[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */] = authenticatedUserId;\r\n var authCookie = _self[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */];\r\n if (accountId) {\r\n _self[_DYN_ACCOUNT_ID /* @min:%2eaccountId */] = accountId;\r\n authCookie = [_self[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */], _self.accountId][_DYN_JOIN /* @min:%2ejoin */](User[_DYN_COOKIE_SEPARATOR /* @min:%2ecookieSeparator */]);\r\n }\r\n if (storeInCookie) {\r\n // Set the cookie. No expiration date because this is a session cookie (expires when browser closed).\r\n // Encoding the cookie to handle unexpected unicode characters.\r\n _cookieManager.set(User[_DYN_AUTH_USER_COOKIE_NAM7 /* @min:%2eauthUserCookieName */], encodeURI(authCookie));\r\n }\r\n };\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n * @returns {}\r\n */\r\n _self.clearAuthenticatedUserContext = function () {\r\n _self[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */] = null;\r\n _self[_DYN_ACCOUNT_ID /* @min:%2eaccountId */] = null;\r\n _cookieManager.del(User[_DYN_AUTH_USER_COOKIE_NAM7 /* @min:%2eauthUserCookieName */]);\r\n };\r\n _self[_DYN_UPDATE /* @min:%2eupdate */] = function (userId) {\r\n // Optimizations to avoid setting and processing the cookie when not needed\r\n if (_self.id !== userId || !_self[_DYN_IS_USER_COOKIE_SET /* @min:%2eisUserCookieSet */]) {\r\n var user_id = userId ? userId : _generateNewId();\r\n var user_cookie = _generateNewCookie(user_id);\r\n _setUserCookie(user_cookie[_DYN_JOIN /* @min:%2ejoin */](User[_DYN_COOKIE_SEPARATOR /* @min:%2ecookieSeparator */]));\r\n }\r\n };\r\n });\r\n }\r\n /**\r\n * Sets the authenticated user id and the account id in this session.\r\n *\r\n * @param authenticatedUserId - {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId - {string} - An optional string to represent the account associated with the authenticated user.\r\n */\r\n User.prototype.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) {\r\n if (storeInCookie === void 0) { storeInCookie = false; }\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n * @returns {}\r\n */\r\n User.prototype.clearAuthenticatedUserContext = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Update or create the user cookie if cookies where previously disabled or the new userId does not match the existing value.\r\n * If you pass nothing a new random user id will be created.\r\n * @param userId - Specific either the current (via appInsights.context.user.id) or new id that you want to set\r\n */\r\n User.prototype.update = function (userId) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n User.cookieSeparator = \"|\";\r\n User.userCookieName = \"ai_user\";\r\n User.authUserCookieName = \"ai_authUser\";\r\n return User;\r\n}());\r\nexport { User };\r\n//# sourceMappingURL=User.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// ###################################################################################################################################################\r\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\r\n// ###################################################################################################################################################\r\n// Generally you should only put values that are used more than 2 times and then only if not already exposed as a constant (such as SdkCoreNames)\r\n// as when using \"short\" named values from here they will be will be minified smaller than the SdkCoreNames[eSdkCoreNames.xxxx] value.\r\nvar _AUTHENTICATED_USER_CONTEXT = \"AuthenticatedUserContext\";\r\nvar _TRACK = \"track\";\r\nexport var STR_EMPTY = \"\";\r\nexport var STR_SNIPPET = \"snippet\";\r\nexport var STR_GET_COOKIE_MGR = \"getCookieMgr\";\r\nexport var STR_START_TRACK_PAGE = \"startTrackPage\";\r\nexport var STR_STOP_TRACK_PAGE = \"stopTrackPage\";\r\nexport var STR_FLUSH = \"flush\";\r\nexport var STR_START_TRACK_EVENT = \"startTrackEvent\";\r\nexport var STR_STOP_TRACK_EVENT = \"stopTrackEvent\";\r\nexport var STR_ADD_TELEMETRY_INITIALIZER = \"addTelemetryInitializer\";\r\nexport var STR_ADD_TELEMETRY_INITIALIZERS = STR_ADD_TELEMETRY_INITIALIZER + \"s\";\r\nexport var STR_POLL_INTERNAL_LOGS = \"pollInternalLogs\";\r\nexport var STR_GET_PLUGIN = \"getPlugin\";\r\nexport var STR_EVT_NAMESPACE = \"evtNamespace\";\r\nexport var STR_TRACK_EVENT = _TRACK + \"Event\";\r\nexport var STR_TRACK_TRACE = _TRACK + \"Trace\";\r\nexport var STR_TRACK_METRIC = _TRACK + \"Metric\";\r\nexport var STR_TRACK_PAGE_VIEW = _TRACK + \"PageView\";\r\nexport var STR_TRACK_EXCEPTION = _TRACK + \"Exception\";\r\nexport var STR_TRACK_DEPENDENCY_DATA = _TRACK + \"DependencyData\";\r\nexport var STR_SET_AUTHENTICATED_USER_CONTEXT = \"set\" + _AUTHENTICATED_USER_CONTEXT;\r\nexport var STR_CLEAR_AUTHENTICATED_USER_CONTEXT = \"clear\" + _AUTHENTICATED_USER_CONTEXT;\r\n//# sourceMappingURL=InternalConstants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_VERSION = \"version\"; // Count: 6\r\nexport var _DYN_QUEUE = \"queue\"; // Count: 6\r\nexport var _DYN_CONNECTION_STRING = \"connectionString\"; // Count: 4\r\nexport var _DYN_ENDPOINT_URL = \"endpointUrl\"; // Count: 3\r\nexport var _DYN_INSTRUMENTATION_KEY = \"instrumentationKey\"; // Count: 3\r\nexport var _DYN_DISABLE_IKEY_DEPRECA0 = \"disableIkeyDeprecationMessage\"; // Count: 2\r\nexport var _DYN_ONUNLOAD_FLUSH = \"onunloadFlush\"; // Count: 6\r\nexport var _DYN_CONTEXT = \"context\"; // Count: 5\r\nexport var _DYN_ADD_HOUSEKEEPING_BEF1 = \"addHousekeepingBeforeUnload\"; // Count: 2\r\nexport var _DYN_UPDATE_SNIPPET_DEFIN2 = \"updateSnippetDefinitions\"; // Count: 2\r\n//# sourceMappingURL=__DynamicConstants.js.map"],"names":["mapClass","defaults","$6b9be1171d21f18a$var$_globalCfg","$d8ec17546a34ef88$export$2d4a6284764f647f","$3d5fcb60a9467a45$var$_cachedGlobal","$3d5fcb60a9467a45$var$_cachedWindow","$3d5fcb60a9467a45$var$_cachedDocument","$3d5fcb60a9467a45$var$_cachedNavigator","$3d5fcb60a9467a45$var$_cachedHistory","$3d5fcb60a9467a45$var$_isWebWorker","$3d5fcb60a9467a45$var$_isNode","$c9b63384299a3252$var$_a","$824d7bc9d9e48f68$var$_perf","$a339b44c6e62d324$var$_fnToString","$a339b44c6e62d324$var$_objCtrFnString","$a339b44c6e62d324$var$_gblWindow","$f26b93b472d141b0$var$_polySymbols","$3ab078397ef07bc3$var$_symbol","$3ab078397ef07bc3$var$_symbolFor","$3ab078397ef07bc3$var$_symbolKeyFor","$6037ad71549710c7$var$_isProtoArray","$0cd2c3ce211547d0$var$_unsupportedError","$6d79a478fc63a9ca$var$aggregationErrorType","$12f08319fee74ea0$var$_debugListener","$cc2aaaebf96ac6a7$var$_a","$4f88a205a18f32bb$var$_iterSymbol","$b61d51369f8191a4$var$_a","$d751d7cd1b1c5598$var$_a","$d751d7cd1b1c5598$var$_b","$d751d7cd1b1c5598$var$_doc","$826a9f6c1286ca27$var$_a","$62835fabb9e36d10$var$_hasInitEvent","$d9a1248df50a1c7f$var$_hasPromiseRejectionEvent","$4ec0308f22f7433a$var$_isPromiseSupported","$911d39c591a62618$var$_promiseCreator","$de50c0f740c66740$var$_a","$de50c0f740c66740$var$_b","$e5177bba49076348$var$_a","$2569abef053897bd$var$_a","$374e174ea903f978$var$_a","$374e174ea903f978$var$undefString","$a7828c8fd42bf560$var$_a","$a7828c8fd42bf560$var$_internalSdkSrc","$parcel$global","globalThis","$b347daff6f5f8dc1$export$375c5ccc31575c19","undefined","$b347daff6f5f8dc1$export$428cfe48a69a3b4f","$b347daff6f5f8dc1$export$601fe16600f10158","$b347daff6f5f8dc1$export$4e8bcd47a31d751c","$b347daff6f5f8dc1$export$8b8a958a7f6f130c","$b347daff6f5f8dc1$export$4ddd10988dd20ff4","$b347daff6f5f8dc1$export$bac6e64dee11e7fb","$b347daff6f5f8dc1$export$a0e01ba2ebef17f2","$b347daff6f5f8dc1$export$6db089fe7b26f5b6","$b347daff6f5f8dc1$export$943e078395581e44","$b347daff6f5f8dc1$export$27c95a7104c1f7aa","$b347daff6f5f8dc1$export$b2c0731cca6bbbd0","$b347daff6f5f8dc1$export$ecb956a5faeb2d4a","$b347daff6f5f8dc1$export$5f32d5745d700b0e","$b347daff6f5f8dc1$export$71efb3495f6084f2","$b347daff6f5f8dc1$export$764bd63f4c2043a2","$b347daff6f5f8dc1$export$3c5e605ca7ade9f2","$b347daff6f5f8dc1$export$ddd00fe728e19670","$b347daff6f5f8dc1$export$9ec954dd81c90a5d","Object","$b347daff6f5f8dc1$export$e77bb59b5e655b3d","$b347daff6f5f8dc1$export$7ce2e0314415f079","String","$b347daff6f5f8dc1$export$a31bd47275edb702","$b347daff6f5f8dc1$export$dbb682be7aa6edc2","Math","$b347daff6f5f8dc1$export$b42fc7fc171852c3","Array","$b347daff6f5f8dc1$export$f3f471c81a14426","$6b9be1171d21f18a$var$GLOBAL_CONFIG_KEY","$6b9be1171d21f18a$export$141de058bfcfe74","result","self","window","$6b9be1171d21f18a$export$8a1a74f726f2b336","gbl","$ab7fdd65453f0d9e$export$e51ae4db7b428f67","cb","defValue","e","$533f826bbc418791$var$PRIMITIVE_TYPES","$533f826bbc418791$export$baab46d9fe4a4eef","theType","value","$533f826bbc418791$export$76383c610bda195a","theName","$533f826bbc418791$export$3cbb80dec8953997","toString","call","$533f826bbc418791$export$fce6876652108ab","$533f826bbc418791$export$bedb7023a7733221","$533f826bbc418791$export$4e62c701997796c1","arg","$533f826bbc418791$export$844ec244b1367d54","$533f826bbc418791$export$f6e2535fb5126e54","$533f826bbc418791$export$a6cdc56e425d0d0a","$533f826bbc418791$export$43bee75e5e14138e","isArray","$533f826bbc418791$export$871608497c498473","$533f826bbc418791$export$7e4aa119212bc614","$533f826bbc418791$export$f9ce7b637dfbe238","$533f826bbc418791$export$e6127cc7fe7395c3","$533f826bbc418791$export$ae936b9d47e5870e","then","$533f826bbc418791$export$8f9cae6546f97a9f","$a1ed021ceb472abb$export$1bd5e8b059facbe9","getOwnPropertyDescriptor","$78c14fe71626d827$export$d76937f5d45b7158","obj","prop","hasOwnProperty","$08325aa6d8565cc0$export$34e6b98f73578a9c","$45e528077703ac0c$export$aa0705d5774c95d1","theObject","callbackfn","thisArg","$d212d948d25f959a$var$propMap","c","v","w","g","s","$d212d948d25f959a$export$8b8fd4dfd45f6b81","$d212d948d25f959a$export$d0d2ebf910ad6e2","target","key","propDesc","$d212d948d25f959a$var$_createProp","l","get","desc","set","newValue","$d8ec17546a34ef88$var$_fetchLazyTestHooks","$d8ec17546a34ef88$export$db98eae15987454c","lazyValue","b","lzy","configurable","$f07ca4f3c96b6502$export$c6675fd9042172d2","$b364f2cd2faf3e98$exports","$3d5fcb60a9467a45$var$WINDOW","$3d5fcb60a9467a45$export$45fd08e1bc14fe1c","name","$3d5fcb60a9467a45$export$3df6e51375017edd","$3d5fcb60a9467a45$export$a4e55266d2135a7f","useCached","$3d5fcb60a9467a45$export$c4372eca9c56fe99","$3d5fcb60a9467a45$export$f65ca476c09acec0","$3d5fcb60a9467a45$export$fef62134eea24008","$3d5fcb60a9467a45$export$38b2d434cce3ea22","$3d5fcb60a9467a45$export$a56241c767c1d89f","$3d5fcb60a9467a45$export$f9582a3c130d9538","$3d5fcb60a9467a45$export$97b87b8868ff7a3c","WorkerGlobalScope","$44a1c24c0e411039$export$8bf7aba4a9e09055","message","Error","$44a1c24c0e411039$export$3f7738bd7dcba681","TypeError","$c9b63384299a3252$var$Constructor","$c9b63384299a3252$var$Prototype","$c9b63384299a3252$var$strFunction","$c9b63384299a3252$var$DynInstFuncTable","$c9b63384299a3252$var$DynProxyTag","$c9b63384299a3252$var$DynClassName","$c9b63384299a3252$var$DynInstChkTag","$c9b63384299a3252$var$DynProtoDefaultOptions","$c9b63384299a3252$var$UnknownValue","$c9b63384299a3252$var$str__Proto","$c9b63384299a3252$var$DynProtoBaseProto","$c9b63384299a3252$var$DynProtoGlobalSettings","$c9b63384299a3252$var$DynProtoCurrent","$c9b63384299a3252$var$strUseBaseInst","$c9b63384299a3252$var$strSetInstFuncs","$c9b63384299a3252$var$Obj","$c9b63384299a3252$var$_objGetPrototypeOf","$c9b63384299a3252$var$_objGetOwnProps","$c9b63384299a3252$var$_gbl","$c9b63384299a3252$var$_gblInst","o","n","$c9b63384299a3252$var$_isObjectOrArrayPrototype","$c9b63384299a3252$var$_isObjectArrayOrFunctionPrototype","Function","$c9b63384299a3252$var$_getObjProto","newProto","curProto","$c9b63384299a3252$var$_forEachProp","func","props","name_1","push","length","lp","$c9b63384299a3252$var$_isDynamicCandidate","funcName","skipOwn","$c9b63384299a3252$var$_throwTypeError","$c9b63384299a3252$var$_hasVisited","values","$c9b63384299a3252$var$_getObjName","unknownValue","$c9b63384299a3252$export$2e2bcd8739ae039","theClass","delegateFunc","options","instFuncs","classProto","$c9b63384299a3252$var$_checkPrototype","thisTarget","visited","thisProto","className","$c9b63384299a3252$var$DynClassNamePrefix","perfOptions","useBaseInst","baseFuncs","$c9b63384299a3252$var$_getBaseFuncs","_instFuncProxy","funcHost","theFunc","instFuncTable","apply","arguments","baseProto","setInstanceFunc","$c9b63384299a3252$var$_populatePrototype","proto","baseInstFuncs","instFuncs_1","dynProtoProxy","currentDynProtoProxy","protoFunc","instFunc","$c9b63384299a3252$var$_getInstFunc","canAddInst","objProto","$36a077d9f4439b69$var$_objFreeze","$36a077d9f4439b69$export$afe328edc487dcfe","$36a077d9f4439b69$export$f7628dc18f4211e5","keys","$36a077d9f4439b69$export$a15782d21797da4c","$36a077d9f4439b69$export$5da24d7703175bc5","$36a077d9f4439b69$export$743454acee35f1d4","$386f00e3a193a7da$export$21fce7cbd4dc679f","object","format","propertyValueDump","stack","JSON","stringify","entries","$f80c2443c3b8028d$export$c09f2411a4ae511b","$f80c2443c3b8028d$var$_objCreate","type","tempFunc","$67b827af57eed1eb$export$327014e6dfd5ba11","$67b827af57eed1eb$export$127e9c2439c2ee16","$67b827af57eed1eb$export$9b7d2d86cf58b987","$67b827af57eed1eb$export$ecddaaeb55ecf049","$67b827af57eed1eb$export$9ec954dd81c90a5d","$67b827af57eed1eb$export$e77bb59b5e655b3d","$2a74b38b87b38cda$var$strHasOwnProperty","$2a74b38b87b38cda$export$b3cf7a802e578501","t","i","p","$2a74b38b87b38cda$var$extendStaticsFn","d","__proto__","$2a74b38b87b38cda$export$1f9c32e3fbfb8e62","__","constructor","$2a74b38b87b38cda$export$643fbb7023bc1942","to","from","il","j","$f6bb085f8cf12216$export$e2e5bcdbdc49c586","theArray","len","idx","$d491d25af4ac425c$var$_arrSlice","$d491d25af4ac425c$var$_throwMissingFunction","$d491d25af4ac425c$export$fe708dcfc359f940","$d491d25af4ac425c$export$34d1cd0b62238dad","clsProto","clsFn","$d491d25af4ac425c$export$e4412260893e0ee4","polyFunc","theArgs","$a96d4958027d6f85$export$9f3b3ffa84393d30","$628cad25a0769458$export$a56f095995763cca","Date","now","getTime","$824d7bc9d9e48f68$export$28a0276e10aa78d7","min","$317394647a739f1b$export$2ca8010d037f830f","max","$f0b39daabf48e63b$export$aaf2ac896f62f2c3","$c3f3bf8012a4b2d4$export$9d1aa7361d7a6e87","$c3f3bf8012a4b2d4$export$25b2a9bb66b0078d","start","$5df3266279dc0b26$var$_createTrimFn","exp","replace","$5df3266279dc0b26$export$f662cd8e6ce31dc2","$5df3266279dc0b26$export$bb2565d3c45fa8e8","$5df3266279dc0b26$export$78c6fe435b4cfdc5","$f67365b40c49b6c1$export$ef0e11c5f5f351f7","$1ae5573ce493bccc$export$e4eaee9e01d9baaa","$1ae5573ce493bccc$export$9d71a37f0770d87f","$1ae5573ce493bccc$export$6eae51590aaea43","$1ae5573ce493bccc$export$9e4bb115c58de388","$1ae5573ce493bccc$export$6c2b24c6eee14c46","$1ae5573ce493bccc$export$667d3cd09d258d38","$1ae5573ce493bccc$export$6c078c21a0c6c1ce","$1ae5573ce493bccc$export$24caac6d68ff1537","$1ae5573ce493bccc$export$fc59eec8d77f3766","$1ae5573ce493bccc$export$e6a243fe757439f9","$1ae5573ce493bccc$export$2f85ca6962b15ff8","$1ae5573ce493bccc$export$a0a330e7fa1e278c","$1ae5573ce493bccc$export$84020a2e4fe863b0","$1ae5573ce493bccc$export$d17a699c20d379ac","$1ae5573ce493bccc$export$bd01c5e3f12db01c","$1ae5573ce493bccc$export$65cd33bb52d04675","$1ae5573ce493bccc$export$f001befbf8417151","$1ae5573ce493bccc$export$2e2716e9c35a66a8","$1ae5573ce493bccc$export$37717a508eca6e2d","$1ae5573ce493bccc$export$538c138266a38409","$1ae5573ce493bccc$export$9734b0a24bf02e93","$1ae5573ce493bccc$export$7b5ba5854159c1f0","$1ae5573ce493bccc$export$5c220169317cd6de","$1ae5573ce493bccc$export$a08d24db8e8aa3f3","$1ae5573ce493bccc$export$3a09068de032bb32","$1ae5573ce493bccc$export$5c8bcfab4f42ca62","$1ae5573ce493bccc$export$861144ba9c13be60","$1ae5573ce493bccc$export$c9b1609f2b84393a","$1ae5573ce493bccc$export$8d1c48dba7ad83a","$1ae5573ce493bccc$export$7eb85b5cba77a43d","$1ae5573ce493bccc$export$8693bdba21bfca93","$1ae5573ce493bccc$export$568c4302d11f2b22","$1ae5573ce493bccc$export$e53d8cae4d527530","$1ae5573ce493bccc$export$1e6514b499ba4d34","$1ae5573ce493bccc$export$7176fb2a7d11927e","$1ae5573ce493bccc$export$2cc5b49df2eed261","$1ae5573ce493bccc$export$923606b70907833e","$1ae5573ce493bccc$export$d8114c9e990204cb","$1ae5573ce493bccc$export$c7ff2c36e5c78421","$1ae5573ce493bccc$export$458d234b616d0745","$1ae5573ce493bccc$export$c9f4bebf02f459de","$1ae5573ce493bccc$export$36754a48de7fd714","$1ae5573ce493bccc$export$55d672a1dc4d50c1","$1ae5573ce493bccc$export$2e850152cb3355e2","$1ae5573ce493bccc$export$b889f1d4cb07c706","$1ae5573ce493bccc$export$aa192ee35fac3196","$1ae5573ce493bccc$export$ef9ef3ed86c4485","$1ae5573ce493bccc$export$6a3333b2109fff2a","$1ae5573ce493bccc$export$8fdcd26070ec159","$1ae5573ce493bccc$export$b353fcbe1ae31450","$1ae5573ce493bccc$export$3a89026537e5dfec","$1ae5573ce493bccc$export$c405fd80acb80a5b","$1ae5573ce493bccc$export$2ec27a3df8fa4130","$1ae5573ce493bccc$export$b6736e780b133181","$1ae5573ce493bccc$export$a5eb52c53bba8560","$1ae5573ce493bccc$export$c105b94efa183847","$1ae5573ce493bccc$export$4e92e4b92b41ba2d","$9fe4a5d5204a4cff$export$a43287864529b8fd","$9fe4a5d5204a4cff$export$829012af4b2055a2","$9fe4a5d5204a4cff$export$3094ace9cd82ff99","$9fe4a5d5204a4cff$export$1cf3476332da55b3","$9fe4a5d5204a4cff$export$49e9417944569ae8","$9fe4a5d5204a4cff$export$ffb2356587263734","$9fe4a5d5204a4cff$export$a077ce616a1ab4ee","$9fe4a5d5204a4cff$export$820a3bce4a265606","$9fe4a5d5204a4cff$export$58efcc07763b37be","$9fe4a5d5204a4cff$export$bb3c4bc1b1175d3d","$9fe4a5d5204a4cff$export$bacb5b2f4c1081b9","$9fe4a5d5204a4cff$export$d75e063cb88a1c25","$9fe4a5d5204a4cff$export$5d265841733c97c3","$9fe4a5d5204a4cff$export$f8b08c7de64edfbf","$9fe4a5d5204a4cff$export$8f3e5386cefa231e","$9fe4a5d5204a4cff$export$bdba10701e0ccff3","$0194d45a55d79548$export$7c0888b0c4641088","$e9133230f0eaf267$export$4b40e215736a9426","$a339b44c6e62d324$export$53b83ca8eaab0383","ex","$0b747974b0bb3563$var$rCamelCase","$0b747974b0bb3563$var$rNormalizeInvalid","$0b747974b0bb3563$var$rLeadingNumeric","$0b747974b0bb3563$export$821e81707b1677f9","$0b747974b0bb3563$export$71fc1ee3e76bc1fe","$0b747974b0bb3563$export$f60443f194e40bc2","_all","letter","toUpperCase","match","$0b747974b0bb3563$export$3185d777c612e61f","search","$0b747974b0bb3563$export$dfaaa8705752128f","date","toISOString","$0b747974b0bb3563$export$39c4487b36c98fec","$0b747974b0bb3563$export$80746c6bc6142fc8","field","valChk","srcChk","theValue","$0b747974b0bb3563$export$51417ccc212471e","$0b747974b0bb3563$var$_createProxyFunction","source","srcFunc","src","originalArguments","$0b747974b0bb3563$export$5dd8d245f6f94a18","overwriteTarget","$0b747974b0bb3563$export$94f4c7fb7e7d8dc7","functionsToProxy","theFuncName","$0b747974b0bb3563$export$3e03fa3fc3e422d7","$0c599844349363c4$var$strJSON","$0c599844349363c4$var$strMsie","$0c599844349363c4$var$strTrident","$0c599844349363c4$var$strXMLHttpRequest","$0c599844349363c4$var$_isTrident","$0c599844349363c4$var$_navUserAgentCheck","$0c599844349363c4$var$_useXDomainRequest","$0c599844349363c4$var$_beaconsSupported","$0c599844349363c4$var$_hasProperty","property","supported","tmp","$0c599844349363c4$export$e7fd20fad3cf4b5f","checkForMock","location","$0c599844349363c4$export$a2856ab6913b9fff","Boolean","$0c599844349363c4$export$d047a7c56db64af4","$0c599844349363c4$export$7e7b1a9668aaed8","nav","userAgent","$0c599844349363c4$export$eb7ff627fa81c42e","userAgentStr","navigator_1","ua","doc","parseInt","tridentVer","$0c599844349363c4$export$cf496c79c05967a0","sendBeacon","$0c599844349363c4$export$f8c1c61350d9749","withKeepAlive","isSupported","request","$0c599844349363c4$export$b9f2bc09e5ac0fa5","XDomainRequest","$0c599844349363c4$export$cfeac9aa070f0108","$dd28c90c4d15de9c$var$_mwcSeeded","$dd28c90c4d15de9c$var$_mwcW","$dd28c90c4d15de9c$var$_mwcZ","$dd28c90c4d15de9c$export$aec042b223b6f5f9","signed","getRandomValues","Uint32Array","$dd28c90c4d15de9c$var$_autoSeedMwc","seedValue","random","$dd28c90c4d15de9c$var$SEED1","$dd28c90c4d15de9c$var$SEED2","$dd28c90c4d15de9c$export$3ffb74f7babdd68f","floor","$dd28c90c4d15de9c$var$UInt32Mask","$dd28c90c4d15de9c$export$9ffd10a3fbdc175b","maxLength","number","chars","base64chars","charAt","$945e40d4195d77bb$export$58d1fad45f39d957","hexValues","oct","a","clockSequenceHi","$6f47dad7a26666b5$var$INVALID_TRACE_ID","$6f47dad7a26666b5$var$INVALID_SPAN_ID","$6f47dad7a26666b5$var$_isValid","invalidValue","$6f47dad7a26666b5$export$2f21fe23413fe96b","traceId","spanId","flags","version","_a","$6f47dad7a26666b5$export$29dd34cf1269f6da","$6f47dad7a26666b5$export$8e51c6d8f0586aff","traceFlags","$6f47dad7a26666b5$export$55f8c39d2c902d0d","$6f47dad7a26666b5$var$_formatFlags","isNaN","concat","toLowerCase","$6f47dad7a26666b5$var$_formatValue","$71dfba5ea0640485$export$7c6abff2f2bdd9c0","$71dfba5ea0640485$export$dc288b6444e20c04","$71dfba5ea0640485$export$ea8a69bf327def66","$71dfba5ea0640485$export$8343e6f32f5246de","$71dfba5ea0640485$export$5c9ec0fce655ebcf","$71dfba5ea0640485$export$e6c0f3431c6cd728","$71dfba5ea0640485$export$4003f5e1672d759","$71dfba5ea0640485$export$7d566319b90dbb26","$51d848565ca908fc$export$8557db26cff37a74","keyType","valueType","completeFn","theMap","$4c75282440d4ddf3$export$fd52abd0b2703048","$78a4729d55fca66a$export$e499e02a1fe05177","requestContextHeader","requestContextTargetKey","requestContextAppIdFormat","requestIdHeader","traceParentHeader","traceStateHeader","sdkContextHeader","sdkContextHeaderAppIdRequest","requestContextHeaderLowerCase","$8a2d104e2647a310$var$version","$8a2d104e2647a310$var$instanceName","$8a2d104e2647a310$var$_dataUid","$8a2d104e2647a310$var$_canAcceptData","$8a2d104e2647a310$export$eb4a6badb18ead04","includeVersion","$8a2d104e2647a310$export$b95c3438408d78aa","data","id","accept","addDefault","theCache","$8a2d104e2647a310$var$_getCache","kill","$2b347a3380a9d5e1$var$_isConfigDefaults","isVal","fb","$2b347a3380a9d5e1$var$_getDefault","dynamicHandler","theConfig","cfgDefaults","isDefaultValid","dfVal","fallbacks","fallback","fbValue","cfg","$2b347a3380a9d5e1$export$f11b7d3a4617b9e9","defaultValue","isValid","setFn","readOnly","blkDynamicValue","mergeDf","mrg","reference","ref","usingDefault","cfgValue","$2b347a3380a9d5e1$var$_resolveDefaultValue","newValue_1","dfName","dfValue","$49e650e29acde80b$export$aad005cc63185e9e","asyncIterator","hasInstance","isConcatSpreadable","iterator","matchAll","species","split","toPrimitive","toStringTag","unscopables","searchString","position","searchValue","chkLen","pos","$f26b93b472d141b0$var$_wellKnownSymbolCache","$f26b93b472d141b0$export$1e4b0b24415108a8","description","theSymbol","$3ab078397ef07bc3$var$_getSymbolValue","$3ab078397ef07bc3$export$57af67db727bc7c7","resetCache","$3ab078397ef07bc3$export$3a9aefdadea26115","noPoly","knownName","$3ab078397ef07bc3$export$70503d621eee7e7b","$3ab078397ef07bc3$export$4d0ba04d25a41f31","registry","$f26b93b472d141b0$var$_globalSymbolRegistry","gblCfg","gblSym","k","newSymbol","$36be0cb20f115b6f$export$3af51e1f665d1d72","$36be0cb20f115b6f$var$BLOCK_DYNAMIC","$36be0cb20f115b6f$var$FORCE_DYNAMIC","$36be0cb20f115b6f$export$d4b814eca8f802e7","getFunc","state","blkVal","$36be0cb20f115b6f$export$e2aa058b2c3c7959","$b2527bd3661c8e9e$var$arrayMethodsToPatch","$b2527bd3661c8e9e$export$6103ab389f3208de","logger","$b2527bd3661c8e9e$var$_getOwnPropGetter","$b2527bd3661c8e9e$export$7d85a661fa08a14d","getter","$b2527bd3661c8e9e$var$_createDynamicProperty","detail","h","trk","handler","fn","clr","checkDynamic","isObjectOrArray","_getProperty","$b2527bd3661c8e9e$export$f24b4ed0a40d3d27","activeHandler","act","chng","add","ro","upd","isReferenced","rf","hdlr","valueState","newIsObjectOrArray","$b2527bd3661c8e9e$export$945b6f6a011a9f7a","isDynamic","inPlace","rdOnly","blkProp","method","orgMethod","args","_i","$46728a52dfc641a6$export$1bea104a0e2567f0","$d88e50d36d3d9760$export$2801572b9d3736b5","$de882ae8157e9b9b$var$UNREF","$de882ae8157e9b9b$var$HAS_REF","$de882ae8157e9b9b$var$ENABLED","$d03b12effd00bf96$var$_createTimeoutWith","startTimer","overrideFn","refreshFn","cancelFn","theTimerHandler","timerId","_unref","_refresh","_cancel","isArr","setTimeout","clearFn","clearTimeout","timerFn","dn","refresh","cancel","$d03b12effd00bf96$export$5f4d6617421d489b","callback","timeout","$6037ad71549710c7$export$97268f64d317ba65","$0cd2c3ce211547d0$var$_createCustomError","$0cd2c3ce211547d0$var$_safeDefineName","$0cd2c3ce211547d0$var$_safeSetName","baseClass","$0cd2c3ce211547d0$export$435492119a21bab3","constructCb","errorBase","theBaseClass","orgName","captureFn","captureStackTrace","_self","orgProto","_this","$83c3e1b1398a495d$var$symPrefix","$acb30f9e62dc5705$export$3a9e9180c14487fd","config","defaultConfig","$acb30f9e62dc5705$var$_createDynamicHandler","theState","uid","newTarget","$36be0cb20f115b6f$export$36c4765ffcb8ffc1","target_1","cfgHandler","defaultValues","configHandler","rm","use","_block","allowUpdate","details","prevUpd","dynamicPropertySymbol","dynamicPropertyReadOnly","dynamicPropertyReferenced","dynamicPropertyBlockValue","dynamicPropertyDetail","_waitingHandlers","_watcherTimer","_useHandler","prevWatcher","bind","setDf","_notifyWatchers","notifyHandlers","watcherFailures_1","sourceErrors","errors","theMessage","srcError","$acb30f9e62dc5705$export$454a433e4deb244f","$12f08319fee74ea0$var$listenerFuncs","$12f08319fee74ea0$var$_aiNamespace","$12f08319fee74ea0$export$a0b1f407ae6b45dc","ns","disableDbgExt","$cc2aaaebf96ac6a7$var$STR_WARN_TO_CONSOLE","$cc2aaaebf96ac6a7$var$defaultValues","loggingLevelConsole","loggingLevelTelemetry","maxMessageLimit","enableDebug","$cc2aaaebf96ac6a7$var$_logFuncs","$cc2aaaebf96ac6a7$var$_sanitizeDiagnosticText","text","$cc2aaaebf96ac6a7$var$_logToConsole","theConsole","console","logFunc","$cc2aaaebf96ac6a7$export$70ef838ed08aad47","_InternalLogMessage","msgId","msg","isUserAct","properties","strProps","diagnosticText","dataType","$cc2aaaebf96ac6a7$export$5102d32ea1d740a","core","$cc2aaaebf96ac6a7$export$4f80edb2e10dc14c","DiagnosticLogger","identifier","queue","_loggingLevelConsole","_loggingLevelTelemetry","_maxInternalMessageLimit","_enableDebug","_unloadHandler","_messageCount","_messageLogged","_logInternalMessage","severity","logMessage","messageKey","$cc2aaaebf96ac6a7$var$AIInternalMessagePrefix","_debugExtMsg","throttleLimitMessage","throttleMessage","errorToConsole","dbgExt","consoleLoggingLevel","debugToConsole","resetInternalMessageCount","isAsync","__ieDyn","$cc2aaaebf96ac6a7$var$_getLogger","$cc2aaaebf96ac6a7$export$c7ca1fcbf1d310c4","$cc2aaaebf96ac6a7$export$25fb4cb97863f0a8","$db8f3a1d23da96b1$export$b889f1d4cb07c706","$db8f3a1d23da96b1$export$6eae51590aaea43","$db8f3a1d23da96b1$export$e4eaee9e01d9baaa","$db8f3a1d23da96b1$export$3960f2eafedb8f1","$db8f3a1d23da96b1$export$e2818d11505fa034","$db8f3a1d23da96b1$export$596e0e0dc14a1e9b","$db8f3a1d23da96b1$export$9734b0a24bf02e93","$db8f3a1d23da96b1$export$923606b70907833e","$db8f3a1d23da96b1$export$a318a8141fc98747","$db8f3a1d23da96b1$export$34ec22d747521ad","$db8f3a1d23da96b1$export$89ce3552c03e8ec9","$db8f3a1d23da96b1$export$967696d490ed5a4a","$db8f3a1d23da96b1$export$4b848bcab7cafe5d","$db8f3a1d23da96b1$export$14814e6f9bf337b4","$db8f3a1d23da96b1$export$32fc64677eb5b7a2","$db8f3a1d23da96b1$export$59a1581bc81a9aae","$db8f3a1d23da96b1$export$6008dba8ea08a587","$db8f3a1d23da96b1$export$2675b0014c60aa10","$db8f3a1d23da96b1$export$5bc84cbcfe97e161","$db8f3a1d23da96b1$export$880f71e9a894c474","$db8f3a1d23da96b1$export$aadef743ee7d1db8","$db8f3a1d23da96b1$export$7e3ee7b01672f321","$db8f3a1d23da96b1$export$b1b7551538b2085","$db8f3a1d23da96b1$export$25f3022e0cda8855","$db8f3a1d23da96b1$export$47d30bd816d62bdc","$db8f3a1d23da96b1$export$8ea03ef8a4bcfeeb","$db8f3a1d23da96b1$export$138215f6c1f0eedf","$db8f3a1d23da96b1$export$aa395e58f404db90","$db8f3a1d23da96b1$export$e046465ee502552","$8c3059962bb1d83c$export$1e3742b0a5fad0e9","map","nameTrunc","origLength","uniqueField","$8c3059962bb1d83c$export$d924cb9df01a6484","num","$8c3059962bb1d83c$export$4e25b1d4bcd67eb8","valueTrunc","$8c3059962bb1d83c$export$356146502a9f860c","url","$8c3059962bb1d83c$export$8860beb3484248f1","$8c3059962bb1d83c$export$dff84a9939b48dc0","messageTrunc","$8c3059962bb1d83c$export$efba9e468fe3b2cf","tempProps_1","exception","$8c3059962bb1d83c$export$3f0e10abe91e800b","measurements","tempMeasurements_1","measure","input","_msgId","inputTrunc","$8ef642882a9aa00a$var$_document","$8ef642882a9aa00a$var$_htmlAnchorIdx","$8ef642882a9aa00a$var$_htmlAnchorElement","$8ef642882a9aa00a$export$7121b8cb971a9df2","anchorIdx","tempAnchor","anchorCache","createElement","host","$8ef642882a9aa00a$export$ff1d1b7a9bae98f","inclPort","fullHost","$8ef642882a9aa00a$export$eac70d47569302de","href","protocol","port","$d98b699aeccdabc6$var$_internalEndpoints","$d98b699aeccdabc6$export$edade5317663baa4","endpointUrl","$d98b699aeccdabc6$export$a62d10d7f896c08c","requestUrl","currentHost","disableCorrelationHeaders","matchExists_1","correlationHeaderExcludePatterns","test","requestHost","enableCorsCorrelation","includedDomains","correlationHeaderDomains","domain","regex","RegExp","excludedDomains","correlationHeaderExcludedDomains","$d98b699aeccdabc6$export$dbaf37203f788583","responseHeader","correlationId","$d98b699aeccdabc6$export$23620a0eaa22fb00","keyValues","keyValue","$d98b699aeccdabc6$export$30a447e32c58a836","perf","timing","navigationStart","$d98b699aeccdabc6$export$bfc7deb7f4f00987","end","$d98b699aeccdabc6$export$847d5dabba5fabb9","telemetryTrace","parentCtx","trace","getName","setName","getTraceId","traceID","setTraceId","getSpanId","parentID","setSpanId","getTraceFlags","setTraceFlags","newTraceFlags","$63cf4b7ad6b789c0$export$a16e2b23dbd5466c","$a383874e4b463649$export$4e2d65a9843399df","ver","sampleRate","tags","time","aiDataContract","iKey","$9bdc8b7e7935e83a$export$d61e24a684f9e51","Event","envelopeType","$7ce500be4896551d$export$76f1a28030e24fa6","$1e8d24b24fb574aa$var$strError","$1e8d24b24fb574aa$var$strStack","$1e8d24b24fb574aa$var$strStackDetails","$1e8d24b24fb574aa$var$strErrorSrc","$1e8d24b24fb574aa$var$strMessage","$1e8d24b24fb574aa$var$strDescription","$1e8d24b24fb574aa$var$_stringify","convertToString","$1e8d24b24fb574aa$var$_formatMessage","theEvent","errorType","evtMessage","$1e8d24b24fb574aa$var$_isStackDetails","$1e8d24b24fb574aa$var$_convertStackObj","errorStack","items","$1e8d24b24fb574aa$var$_getStackFromErrorObj","errorObj","$1e8d24b24fb574aa$var$_getOperaStack","errorMessage","lines","entry","reason","$1e8d24b24fb574aa$var$_getErrorType","typeName","results","funcNameRegex","exec","$1e8d24b24fb574aa$export$7eb96e918bb60d21","$1e8d24b24fb574aa$export$e2f174de097e0bcd","Exception","severityLevel","exceptions","$1e8d24b24fb574aa$var$_isExceptionInternal","$1e8d24b24fb574aa$export$39152eac9dc76c5e","CreateAutoException","lineNumber","columnNumber","error","evt","errorSrc","stackDetails","CreateFromInterface","prototype","toInterface","_b","problemGroup","isManual","exceptionDetailsInterface","CreateSimpleException","assembly","fileName","line","formatError","_ExceptionDetails","outerId","hasFullStack","parsedStack","$1e8d24b24fb574aa$var$_isExceptionDetailsInternal","$1e8d24b24fb574aa$var$_parseStack","frames","level_1","totalSizeInBytes_1","frame","theFrame","$1e8d24b24fb574aa$export$b9d0519a34c90616","parsedFrame","left","right","size","acceptedLeft","acceptedRight","lSize","howMany","splice","exceptionTrunc","_StackFrame","sourceFrame","level","matches","sizeInBytes","baseSize","$5048f48c42282ced$export$7e0232b0f089a6b8","kind","count","stdDev","$659de0afdff509f2$export$efdd3e096bc27746","Metric","metrics","dataPoint","$8ce53fcb9c1dc1db$export$4460ed97e7c4a927","totalms","ms","$8ce53fcb9c1dc1db$var$strEmpty","round","sec","hour","days","$5c5f40703ef3d51c$export$12c0fdede1c6bc6c","PageView","durationMs","duration","$0dd1de134f090c69$export$a7b48490930dbffa","RemoteDependencyData","absoluteUrl","commandName","success","resultCode","requestAPI","correlationContext","dependencyKind","dependencySource","dependencyTypeName","dependencyFields","parsedUrl","pathName","pathname","$16adbdbcb0ae9015$export$78e1bea9036f120f","Trace","$27d410d508f4b32f$export$709aae57ec681346","PageViewPerformance","unused","cs4BaseData","perfTotal","networkConnect","sentRequest","receivedResponse","domProcessing","$74e0f4254782bad9$export$2d0294657ab35f1b","baseType","baseData","$d1bdc0f4cef94745$var$_aiNameFunc","baseName","aiName","$d1bdc0f4cef94745$var$_aiApplication","$d1bdc0f4cef94745$var$_aiDevice","$d1bdc0f4cef94745$var$_aiLocation","$d1bdc0f4cef94745$var$_aiOperation","$d1bdc0f4cef94745$var$_aiSession","$d1bdc0f4cef94745$var$_aiUser","$d1bdc0f4cef94745$var$_aiCloud","$d1bdc0f4cef94745$var$_aiInternal","$d1bdc0f4cef94745$export$8e2bcdf18620784a","_super","ContextTagKeys","applicationVersion","applicationBuild","applicationTypeId","applicationId","applicationLayer","deviceId","deviceIp","deviceLanguage","deviceLocale","deviceModel","deviceFriendlyName","deviceNetwork","deviceNetworkName","deviceOEMName","deviceOS","deviceOSVersion","deviceRoleInstance","deviceRoleName","deviceScreenResolution","deviceType","deviceMachineName","deviceVMName","deviceBrowser","deviceBrowserVersion","locationIp","locationCountry","locationProvince","locationCity","operationId","operationName","operationParentId","operationRootId","operationSyntheticSource","operationCorrelationVector","sessionId","sessionIsFirst","sessionIsNew","userAccountAcquisitionDate","userAccountId","userId","userStoreRegion","userAuthUserId","userAnonymousUserAcquisitionDate","userAuthenticatedUserAcquisitionDate","cloudName","cloudRole","cloudRoleVer","cloudRoleInstance","cloudEnvironment","cloudLocation","cloudDeploymentUnit","internalNodeName","internalSdkVersion","internalAgentVersion","internalSnippet","internalSdkSrc","$932e93a8e5adf75c$export$2dc41327de8d98f1","item","envelopeName","customProperties","systemProperties","telemetryItem","ext","$1185376df44832bd$export$152f4bb29f8263d0","UserExt","DeviceExt","TraceExt","WebExt","AppExt","OSExt","$1185376df44832bd$export$ebc7727f2a4272f6","$b5e9c029fdfb79a5$export$58aa8b47bf337bc8","eventName","event","createEvent","initEvent","$524c8ecd2c7c151d$export$d5f3ec63cad061d9","LocalStorage","SessionStorage","AI","AI_AND_W3C","W3C","$8e03bdff803b84be$var$_canUseLocalStorage","$8e03bdff803b84be$var$_canUseSessionStorage","$8e03bdff803b84be$var$_getLocalStorageObject","$8e03bdff803b84be$export$f28746933126d63f","$8e03bdff803b84be$var$_getVerifiedStorageObject","storageType","storage","setItem","fail","getItem","$8e03bdff803b84be$var$_getSessionStorageObject","$8e03bdff803b84be$export$c81985c4209bac26","reset","$8e03bdff803b84be$export$a398bd2f40e2eb6e","$8e03bdff803b84be$export$21abea3a85fee3f5","$ca7353bd9238d340$export$2268e69a6d93b7cc","$ca7353bd9238d340$export$a714a094d3058c99","$28deccfc004f252b$var$strParentContextKey","$28deccfc004f252b$var$strChildrenContextKey","$28deccfc004f252b$export$e3556d2ce46cdae0","PerfEvent","payloadDetails","theDetails_1","ctx","childTime","childEvts","childEvt","exTime","ParentContextKey","ChildrenContextKey","$28deccfc004f252b$export$cbeb6df2e8e9b5ae","PerfManager","manager","create","fire","perfEvent","$28deccfc004f252b$var$doPerfActiveKey","$28deccfc004f252b$export$c6fbeb260600c482","mgrSource","getSource","perfMgr","perfEvt","currentActive","children","$757da337740268ac$var$pluginStateData","$757da337740268ac$export$37cfaecb9b4b1b3b","plugin","$757da337740268ac$export$be211df7b1eeb33e","processContext","extensions","pluginState","initPlugins","lastPlugin","proxy","thePlugin","isInitialized","getCfg","$757da337740268ac$export$478771939b7b39a2","plugins","sort","extA","extB","bHasProcess","$bc7124acb0f73e64$var$strHasRunFlags","$bc7124acb0f73e64$var$strGetTelCtx","$bc7124acb0f73e64$var$_chainId","$bc7124acb0f73e64$var$_createInternalContext","telemetryChain","startAt","_nextProxy","_onComplete","$bc7124acb0f73e64$var$_getNextProxyStart","$bc7124acb0f73e64$export$107e639207cdf742","context","_next","nextProxy","onComplete","completeDetails","diagLog","getExtCfg","newConfig","_getExtCfg","getConfig","extConfig","rootConfig","hasNext","getNext","setNext","nextPlugin","iterate","that","createIfMissing","idCfg","extCfg","$bc7124acb0f73e64$export$ca98f11e981bcfd6","internalContext","env","$bc7124acb0f73e64$export$91bbbd4999751948","unloadState","$bc7124acb0f73e64$export$e4c32b40c4fbf98a","updateState","firstProxy","lastProxy_1","newProxy","$bc7124acb0f73e64$export$7f7b955927f4ae5e","chainId","hasProcessTelemetry","hasSetNext","proxyChain","getPlugin","processTelemetry","itemCtx","_processChain","sync","unload","unloadCtx","hasRun","pluginCore","update","updateCtx","_id","_setNext","processPluginFn","hasRunContext","nextId","hasNextRun","$d13bf4befeee29ad$export$1dd1604aeaf8cfed","handlers","run","$9d91a18754d7a062$export$50db6e277db66ea0","next","$54343718a076ab6e$export$69c7b96f216fdf7b","elms","iter","err","iterResult","failed","throw","return","elm","$efe9376777343289$export$31fa167f9d342989","_hooks","oldHooks","remove","hooks","$b61d51369f8191a4$var$strGetPlugin","$b61d51369f8191a4$var$defaultValues","$b61d51369f8191a4$export$64a11c2f90e6766c","BaseTelemetryPlugin","_isinitialized","_rootCtx","_nextPlugin","_unloadHandlerContainer","_hookContainer","_getTelCtx","currentCtx","rootCtx","_setDefaults","pluginChain","_initDefaults","unloadDone","theUnloadCtx","theUnloadState","_unloadCallback","updateDone","theUpdateCtx","_doUpdate","_updateCallback","setInitialized","$61c4d9dd4226f64e$var$_stringToBoolOrDefault","$61c4d9dd4226f64e$export$d0884590a6a82e6c","validator","fallBackName","$61c4d9dd4226f64e$export$bad0d7bace730ae","$12cc003c7fb5ccde$var$strAttachEvent","$12cc003c7fb5ccde$var$strAddEventHelper","$12cc003c7fb5ccde$var$strDetachEvent","$12cc003c7fb5ccde$var$strRemoveEventListener","$12cc003c7fb5ccde$var$strEvents","$12cc003c7fb5ccde$var$strVisibilityChangeEvt","$12cc003c7fb5ccde$var$strPageHide","$12cc003c7fb5ccde$var$strUnload","$12cc003c7fb5ccde$var$strBeforeUnload","$12cc003c7fb5ccde$var$strPageHideNamespace","$12cc003c7fb5ccde$var$rRemoveEmptyNs","$12cc003c7fb5ccde$var$rRemoveTrailingEmptyNs","$12cc003c7fb5ccde$var$_guid","$12cc003c7fb5ccde$var$elmNodeData","$12cc003c7fb5ccde$var$eventNamespace","$12cc003c7fb5ccde$var$_normalizeNamespace","$12cc003c7fb5ccde$var$_getEvtNamespace","evtNamespace","theNamespace_1","parsedEvent","join","$12cc003c7fb5ccde$var$_getRegisteredEvents","evtName","aiEvts","registeredEvents","$12cc003c7fb5ccde$var$_doDetach","handlerRef","useCapture","$12cc003c7fb5ccde$var$strOnPrefix","$12cc003c7fb5ccde$var$_doUnregister","events","unRegFn","capture","$12cc003c7fb5ccde$export$3f37a50e0edde3be","theNamespace","namespaces","$12cc003c7fb5ccde$export$324ab159353a60a9","registeredEvent","guid","$12cc003c7fb5ccde$export$51dedceb7c784eff","evtName_1","found_1","$12cc003c7fb5ccde$var$_unregisterEvents","eventCache","evtType","regEvent","$12cc003c7fb5ccde$var$_addEventListeners","listener","excludeEvents","added","$12cc003c7fb5ccde$export$3b37be979ee3303a","$12cc003c7fb5ccde$export$8c7b13b21690651d","$12cc003c7fb5ccde$export$546f5991fce5bf06","$12cc003c7fb5ccde$export$46744aee53e5e558","newNamespaces","pageUnloadAdded","visibilityState","$963b9811c2275531$var$aiInstrumentHooks","$963b9811c2275531$var$cbNames","$963b9811c2275531$var$_arrLoop","arr","$963b9811c2275531$var$_doCallbacks","callDetails","cbArgs","hookCtx","hook","cbks","inst","orgEx","hookErrorCb","$963b9811c2275531$var$_getOwner","checkPrototype","checkParentProto","owner","$963b9811c2275531$var$_createInstrumentHook","callbacks","aiHook","newFunc","f","orgArgs","funcArgs","_createArgs","rslt","theHook","$963b9811c2275531$export$152e6c4c396a57a","$963b9811c2275531$export$b96f6cbe9b035430","$2b52e71bd2d7d7f0$export$5222b9460f3ddbec","$d751d7cd1b1c5598$var$strToGMTString","$d751d7cd1b1c5598$var$strToUTCString","$d751d7cd1b1c5598$var$strCookie","$d751d7cd1b1c5598$var$strExpires","$d751d7cd1b1c5598$var$strIsCookieUseDisabled","$d751d7cd1b1c5598$var$strDisableCookiesUsage","$d751d7cd1b1c5598$var$strConfigCookieMgr","$d751d7cd1b1c5598$var$_supportsCookies","$d751d7cd1b1c5598$var$_allowUaSameSite","$d751d7cd1b1c5598$var$_parsedCookieValue","$d751d7cd1b1c5598$var$_cookieCache","$d751d7cd1b1c5598$var$_globalCookieConfig","$d751d7cd1b1c5598$var$rootDefaultConfig","cookieCfg","path","enabled","ignoreCookies","blockedCookies","cookieDomain","cookiePath","$d751d7cd1b1c5598$var$_getDoc","$d751d7cd1b1c5598$var$_isMgrEnabled","cookieMgr","isEnabled","$d751d7cd1b1c5598$var$_isIgnoredCookie","cookieMgrCfg","$d751d7cd1b1c5598$var$_isCfgEnabled","cookieMgrConfig","isCfgEnabled","cookieEnabled","$d751d7cd1b1c5598$export$76c0b273586c25c7","getCookieMgr","$d751d7cd1b1c5598$export$2ae082191ac44e5a","unloadHandler","_path","_domain","_enabled","_getCookieFn","getCookie","$d751d7cd1b1c5598$var$_getCookieValue","_setCookieFn","setCookie","$d751d7cd1b1c5598$var$_setCookieValue","_delCookieFn","delCookie","$d751d7cd1b1c5598$export$25d06da9c29ef62a","gblManager","setEnabled","maxAgeSec","$d751d7cd1b1c5598$var$_extractParts","_isIE","expireMs","nowMs","expiry","setTime","$d751d7cd1b1c5598$var$_formatDate","location_1","$d751d7cd1b1c5598$var$_formatCookieValue","del","purge","thePart","theDate","cookieValue","theCookie","$9acc3b97657eaaf0$export$e2818d11505fa034","$9acc3b97657eaaf0$export$f357d96937d91514","$9acc3b97657eaaf0$export$3b3afe26ca0e015c","$9acc3b97657eaaf0$export$f9ae8d0acf86503e","$9acc3b97657eaaf0$export$9e16762ab4f2648","$9acc3b97657eaaf0$export$2672d4f7ccc80348","$9acc3b97657eaaf0$export$c7ff2c36e5c78421","$9acc3b97657eaaf0$export$548634e98b3af9c4","$9acc3b97657eaaf0$export$ab1a8669316b7a02","$9acc3b97657eaaf0$export$5b63a890d51a5194","$9acc3b97657eaaf0$export$e4d43b697816aae1","$9acc3b97657eaaf0$export$fe3039bd0e70dd3f","$9acc3b97657eaaf0$export$20270e2265c2a185","$9acc3b97657eaaf0$export$8d0bd9d006f3ecea","$9acc3b97657eaaf0$export$5414b86ab837cb07","$9acc3b97657eaaf0$export$4852fd87b68a6e1f","$9acc3b97657eaaf0$export$ff0a0f80c43edd37","$9acc3b97657eaaf0$export$31fe7bcf0f7c83e8","$9acc3b97657eaaf0$export$d190ee0b6bfe36d8","$9acc3b97657eaaf0$export$4d19a8ea486d5967","$9acc3b97657eaaf0$export$91a182df12726bcd","$9acc3b97657eaaf0$export$923606b70907833e","$9acc3b97657eaaf0$export$3dedbd38aa3b0c11","$9acc3b97657eaaf0$export$935b759388157821","$9acc3b97657eaaf0$export$aa395e58f404db90","$9acc3b97657eaaf0$export$e4892641d6ea1b45","$9acc3b97657eaaf0$export$204917ab19f7a461","$9acc3b97657eaaf0$export$6eae51590aaea43","$9acc3b97657eaaf0$export$6390687f17a52950","$9acc3b97657eaaf0$export$72fe3f7aecc0d015","$9acc3b97657eaaf0$export$527cc291f0159d2a","$9acc3b97657eaaf0$export$379c72358869fe15","$9acc3b97657eaaf0$export$f80d3e3d3d24d8e2","$9acc3b97657eaaf0$export$f8670e269dbf7411","$9acc3b97657eaaf0$export$7d974758a7a955a6","$9acc3b97657eaaf0$export$2e020f7b1a6ecc9d","$9acc3b97657eaaf0$export$efd7bea2390142dc","$9acc3b97657eaaf0$export$3e2743adb5050880","$9acc3b97657eaaf0$export$cb472b94f03785cf","$9acc3b97657eaaf0$export$ade5c25ec120f74e","$9acc3b97657eaaf0$export$204c1f54732d882","$6e4263cfc9177d6e$export$5bb8d6768724bf86","PageViewManager","appInsights","overridePageViewDuration","pageViewPerformanceManager","_logger","queueTimer","itemQueue","pageViewPerformanceSent","_flushChannels","flush","pageView","customDuration","title","uri","pageViewSent","processed","pageViewPerformance","_startTimer","allItems","slice","doFlush","teardown","clearInterval","$14a28652d5a6e87a$var$botAgentNames","$14a28652d5a6e87a$var$_isPerformanceTimingSupported","$14a28652d5a6e87a$var$_isPerformanceTimingDataReady","domainLookupStart","domLoading","$14a28652d5a6e87a$var$_getPerformanceTiming","$14a28652d5a6e87a$var$_shouldCollectDuration","durations","_navigator","isGoogleBot","$14a28652d5a6e87a$export$da80ef98bc1bafa6","PageViewPerformanceManager","navigationTiming","getEntriesByType","total","network","response","dom","startTime","requestStart","responseEnd","$55f799186175501d$export$f6fdd81afb2fe76","PageVisitTimeManager","pageVisitTimeTrackingHandler","prevPageVisitDataKeyName","currentPageName","currentPageUrl","prevPageVisitTimeData","restartPageVisitTimer","pageName","pageUrl","prevPageVisitData","stopPageVisitTimer","pageVisitEndTime","pageVisitDataJsonStr","parse","pageVisitTime","currPageVisitDataStr","$55f799186175501d$export$513202441432a369","$6610fcdfc52ae3ca$export$ef1e5872612852d1","_events","stop","action","$826a9f6c1286ca27$var$_dispatchEvent","evnt","dispatchEvent","$826a9f6c1286ca27$var$defaultValues","sessionRenewalMs","$826a9f6c1286ca27$var$_chkConfigMilliseconds","sessionExpirationMs","disableExceptionTracking","samplingPercentage","namePrefix","disableFlushOnBeforeUnload","disableFlushOnUnload","$826a9f6c1286ca27$export$ca681bfeb2cf0fca","AnalyticsPlugin","_eventTracking","_pageTracking","_pageViewManager","_pageViewPerformanceManager","_pageVisitTimeManager","_preInitTelemetryInitializers","_isBrowserLinkTrackingEnabled","_browserLinkInitializerAdded","_enableAutoRouteTracking","_historyListenerAdded","_disableExceptionTracking","_autoExceptionInstrumented","_enableUnhandledPromiseRejectionTracking","_autoUnhandledPromiseInstrumented","_extConfig","_autoTrackPageVisitTime","_prevUri","_currUri","_evtNamespace","priority","autoRoutePVDelay","_base","_addHook","_throwInternal","throwInternal","processNext","trackEvent","startTrackEvent","stopTrackEvent","trackTrace","trackMetric","metric","inPv","refUri","referrer","trackPageViewPerformance","inPvp","startTrackPage","stopTrackPage","measurement","loc","theError","trackException","_window","URL","errorString","telemetryInitializer","initialize","locn","win","initializer","_addDefaultTelemetryInitializers","browserLinkPaths_1","envelope","remoteData","average","sampleCount","PageName","PageUrl","pageViewItem","autoExceptionInstrumented","rsp","$826a9f6c1286ca27$var$_getReason","_location","_history","pushState","replaceState","_addHistoryListener","history","distributedTraceCtx","_getDistributedTraceCtx","getTraceCtx","traceLocationName","hash","_doTeardown","Version","$a99c2448b4d73401$export$856fe465480fa77a","$a99c2448b4d73401$export$96acbd3e4fcaef01","rejected","resolveFn","rejectFn","finallyFn","finally","$896661fc40700b02$export$61c67cf036cd42e2","$62835fabb9e36d10$var$DISPATCH_EVENT","$f66d8c7e331f9ecc$export$b50db53b804b62d","$d9a1248df50a1c7f$var$NODE_UNHANDLED_REJECTION","$d9a1248df50a1c7f$var$UNHANDLED_REJECTION","$d9a1248df50a1c7f$var$_currentPromiseId","$d9a1248df50a1c7f$var$_uniquePromiseId","$d9a1248df50a1c7f$var$dumpFnObj","$d9a1248df50a1c7f$export$2e2d787d49b332bf","newPromise","additionalArgs","resolve","reject","values_1","pending_1","$d9a1248df50a1c7f$export$4ea99934313e7d98","$d9a1248df50a1c7f$export$71a67f20b06fc70e","_resolve","$f5e6aa96df7c2079$var$_processPendingItems","pending","$635d6d63c46ba6e7$export$74d26603c0c38da8","executor","callbackTimeout","processor","_settledValue","_thePromise","_state","_hasResolved","_queue","_handled","_unHandledRejectionHandler","_then","onResolved","onRejected","_processQueue","pop","_strState","_createSettleIfFn","newState","allowState","_notifyUnhandledRejection","versions","node","emit","populateEvent","useNewEvent","theEvt","onFinally","thenFinally","catchFinally","_rejectFn","$4ec0308f22f7433a$export$7edeaca5327f34ec","PrmCls","thePromise","$911d39c591a62618$export$5a1eb20c68656e88","$911d39c591a62618$export$1ed2fd8fe9f5c6","$2cb93c1cbddb67ab$export$86347c3dd68c03f6","$c0ca326fc9479ec0$export$be41298b7716c698","$e5f8715adea0dc31$export$d0f526aa8043f6d7","$e5f8715adea0dc31$export$f393dda3e1c87f59","$e5f8715adea0dc31$export$2f5ff0b46814907e","$e5f8715adea0dc31$export$9734b0a24bf02e93","$e5f8715adea0dc31$export$a5eb52c53bba8560","$e5f8715adea0dc31$export$6eae51590aaea43","$e5f8715adea0dc31$export$a318a8141fc98747","$e5f8715adea0dc31$export$32fc64677eb5b7a2","$e5f8715adea0dc31$export$9e16762ab4f2648","$e5f8715adea0dc31$export$2672d4f7ccc80348","$e5f8715adea0dc31$export$e2818d11505fa034","$e5f8715adea0dc31$export$a9130fdcd11ec7ef","$e5f8715adea0dc31$export$704cf8098f85ad0f","$e5f8715adea0dc31$export$7768b9624b4c70a6","$e5f8715adea0dc31$export$4aae77f3ba3c48b4","$e5f8715adea0dc31$export$e9679ef501b0d1","$e5f8715adea0dc31$export$c8dd872dc774fa7c","$e5f8715adea0dc31$export$a0a330e7fa1e278c","$e5f8715adea0dc31$export$b18aabdfc0aaf6b","$e5f8715adea0dc31$export$5eeb73fac03da74a","$e5f8715adea0dc31$export$a5da323a4da829fc","$e5f8715adea0dc31$export$1e6514b499ba4d34","$e5f8715adea0dc31$export$52e50651d87300e3","$e5f8715adea0dc31$export$13da1b5a005ef035","$e5f8715adea0dc31$export$4637bcb72c509e60","$e5f8715adea0dc31$export$63ab2dad6d8a60ed","$e5f8715adea0dc31$export$d03f333763905c89","$e5f8715adea0dc31$export$20d3a25105cda3b1","$e5f8715adea0dc31$export$df21ab0de9057cc4","$e5f8715adea0dc31$export$c7ff2c36e5c78421","$e5f8715adea0dc31$export$e5390b88ba6f1b04","$e5f8715adea0dc31$export$dbe59923e879fdc5","$e5f8715adea0dc31$export$803d432e48ba5ceb","$e5f8715adea0dc31$export$6b8e1dc9b77f253c","$e5f8715adea0dc31$export$f5629284a6f7ec3d","$e5f8715adea0dc31$export$782dd40ba58c3597","$e5f8715adea0dc31$export$3f8a6394c5f7e7be","$e5f8715adea0dc31$export$81cfd43387c8dbcc","$e5f8715adea0dc31$export$85f018eb7798fb52","$e5f8715adea0dc31$export$d1f891e9714d3108","$e5f8715adea0dc31$export$12df46deb7379c67","$e5f8715adea0dc31$export$983774f06380e463","$e5f8715adea0dc31$export$aa558e99f83347cf","$e5f8715adea0dc31$export$c2afe23fa18f9dff","$e5f8715adea0dc31$export$fd0c91d4da43d71b","$e5f8715adea0dc31$export$689c49d56ac33585","$e5f8715adea0dc31$export$82a109ffee49e423","$e5f8715adea0dc31$export$fb8523c8667e286a","$e5f8715adea0dc31$export$84ecd29f369f5b1d","$e5f8715adea0dc31$export$298b8388870fcfe9","$e5f8715adea0dc31$export$2c3af30a5c45aa6e","$0b044846db0c77e8$var$strBaseType","$0b044846db0c77e8$var$strBaseData","$0b044846db0c77e8$var$strProperties","$0b044846db0c77e8$var$strTrue","$0b044846db0c77e8$var$_setValueIf","$0b044846db0c77e8$var$_extractPropsAndMeasurements","$0b044846db0c77e8$var$_convertPropsUndefinedToCustomDefinedValue","customUndefinedValue","$0b044846db0c77e8$var$_createEnvelope","iKeyNoDashes","$0b044846db0c77e8$var$_extractPartAExtensions","envTags","itmExt","itmTags","extUser","user","authId","localId","extApp","app","sesId","extDevice","device","deviceClass","ip","model","web","browserLang","browserVer","browser","envData","envBaseData","envProps","screenRes","userConsent","extOs","os","extTrace","tgs","tg","theTags","$0b044846db0c77e8$export$3f11c9a3e644970c","$0b044846db0c77e8$var$EnvelopeCreatorInit","$0b044846db0c77e8$export$b74153364c2066d1","customMeasurements","eventData","$9f852541a61ca36f$var$_disableEvents","$633f36e5bb6b03ff$var$BaseSendBuffer","BaseSendBuffer","_buffer","_bufferFullMessageSent","_set","buffer","payload","getItems","newLogger","canUseSessionStorage","newBuffer","$633f36e5bb6b03ff$export$dcb776947c16915f","$633f36e5bb6b03ff$export$d706e5fd60d36d56","ArraySendBuffer","SessionStorageSendBuffer","_namePrefix","bufferItems","_getBuffer","notDeliveredItems","_removePayloadsFromBuffer","payloads","remaining","prefixedKey","bufferJson","buffer_1","_setBuffer","BUFFER_KEY","sentElements","unsentItems","sentItems","SENT_BUFFER_KEY","MAX_BUFFER_SIZE","$2c9268977b2520db$export$ef852775387a0be7","Serializer","_serializeObject","circularReferenceCheck","output","_serializeStringMap","_serializeArray","contract","isRequired","isHidden","isPresent","isObj","sources","expectedType","parseFloat","serialize","$7d0a42f949c72b34$export$e2bdf7ff70742e42","HashCodeScoreGenerator","getHashCodeScore","score","getHashCode","INT_MAX_VALUE","charCodeAt","abs","$a511b226057b3229$export$4526db980ad5b8a1","hashCodeGenerator","$9c8a4bf222316b8c$export$21a3eccb8a1780eb","Sample","samplingRate","samplingScoreGenerator","isSampledIn","$de50c0f740c66740$var$UNDEFINED_VALUE","$de50c0f740c66740$var$_getResponseText","xhr","responseText","$de50c0f740c66740$var$defaultAppInsightsChannelConfig","disableTelemetry","isRetryDisabled","$de50c0f740c66740$var$EnvelopeTypeCreator","currentContextId","bd","pageType","isLoggedIn","pageViewData","exData","baseMetricData","remoteDepData","responseCode","$de50c0f740c66740$export$c5a96f3e01fb6582","Sender","_consecutiveErrors","_retryAt","_paused","_timeoutHandle","_serializer","_stamp_specific_redirects","_headers","_fallbackSender","_syncUnloadSender","_offlineListener","_endpointUrl","_orgEndpointUrl","_maxBatchSizeInBytes","_beaconSupported","_customHeaders","_disableTelemetry","_instrumentationKey","_convertUndefined","_isRetryDisabled","_maxBatchInterval","_sessionStorageUsed","_bufferOverrideUsed","_enableSendPromise","_syncFetchPayload","_checkMaxSize","incomingPayload","incomingSize","_checkResponsStatus","status","responseUrl","countOfItemsInPayload","res","_appId","_parseResponse","appId","_checkAndUpdateEndPointUrl","_isRetriable","_resendPayload","isOnline","_doUnloadSend","_beaconSender","_doBeaconSend","batch","plainTextBatch","Blob","queued","_onSuccess","droppedPayload","thePayload","_xhrSender","resolveFunc","rejectFunc","XMLHttpRequest","endPointUrl","open","headerName","onreadystatechange","_xhrReadyStateChange","readyState","onerror","_formatErrorMessageXhr","send","_fetchKeepAliveSender","payloadSize","_doFetchSender","_fetchSender","requestHeaders","Headers","batchLength","ignoreResponse","responseHandled","append","init","headers","body","keepalive","Request","fetch","response_1","ok","resp","statusText","itemsReceived","itemsAccepted","linearFactor","payload_1","_setRetryTime","delayInSeconds","backOffDelay","pow","_setupTimer","retryInterval","_clearScheduledTimer","statusCode","_xdrSender","xdr","onload","_xdrOnLoad","_formatErrorMessageXdr","hostingProtocol","lastIndexOf","_sample","$0b747974b0bb3563$export$a7f7e50f928053df","obj1","obj2","obj3","obj4","obj5","obj6","extended","argLen","deep","isArgArray","isArgObj","isNewArray","clone","pause","resume","callBack","sendReason","onunloadFlush","addHeader","parentEvtNamespace","_document","_isListening","_onlineStatus","_enableEvents","ononline","_setOnline","_setOffline","isListening","instrumentationKey","disableValidation","senderConfig","customHeader","header","bufferOverride","shouldUpdate","disableInstrumentationKeyValidation","regexp","enableSendPromise","sendPostFunc","diagLogger","SampleRate","defaultEnvelopeIkey","aiEnvelope_1","constructEnvelope","doNotSendItem_1","responseURL","async","forcedSender","_notifySendRequest","sendRequest","ieVer","retry","reverse","errors_1","extracted","index","orig","convertUndefined","creator","$eab8f97afa7948b4$var$_defaultDeepCopyHandler","$eab8f97afa7948b4$export$7d1ebb7d4f033054","$eab8f97afa7948b4$var$defaultDeepCopyHandlers","copyTo","$eab8f97afa7948b4$var$_deepCopy","visitMap","theEntry","userHandler","newPath","newCtx","isPlain","isPrim","indexOf","origin","copy","newKey","$eab8f97afa7948b4$var$_copyProps","newEntry","$9042921d36c971e1$export$54e9fb29908872fa","theArg","$21e0e68428bc90cf$var$defaultValues","perfEvtsSendAll","$21e0e68428bc90cf$var$_runListeners","listeners","$21e0e68428bc90cf$export$dfa1f14b6290f8c5","NotificationManager","_listeners","waiting","_finishUnload","asyncUnload","$4d4645ee8836015f$export$5da7f32cc3b89dc1","TelemetryInitializerPlugin","_initializers","addTelemetryInitializer","theInitializer","$4d4645ee8836015f$var$_runInitializers","doNotSendItem","telemetryInitializersCount","$e5177bba49076348$var$strValidationError","$e5177bba49076348$var$strSdkUnloadingError","$e5177bba49076348$var$defaultConfig","diagnosticLogInterval","$e5177bba49076348$var$_createPerfManager","notificationMgr","$e5177bba49076348$var$_isPluginPresent","exists","$e5177bba49076348$var$_findWatcher","newWatcher","theListener","$e5177bba49076348$export$e7ac25a6828d23bf","AppInsightsCore","_configHandler","_isInitialized","_eventQueue","_notificationManager","_perfManager","_cfgPerfManager","_cookieManager","_pluginChain","_configExtensions","_channelConfig","_channels","_isUnloading","_telemetryInitializerPlugin","_internalLogsEventName","_unloadHandlers","_debugListener","_traceCtx","_cfgListeners","_extensions","_pluginVersionStringArr","_pluginVersionString","_internalLogPoller","_internalLogPollerListening","_forceStopInternalLogPoller","_startLogPoller","alwaysStart","_addUnloadHook","interval","isRunning","_flushInternalLogs","unref","_setPluginVersions","thePlugins","_addPluginVersions","channels","updateCfg","cfgExtensions","_createTelCtx","theCtx","_getPluginChain","_initPluginChain","coreExtensions","extPriorities","theExtensions","extPriority","allExtensions","_getPlugin","pluginIdentifier","theExt","channelHosts","getChannel","removeCb","pluginsToRemove","_removePlugins","removed","removeComplete","newConfigExtensions","newChannelConfig","newQueue","channel","track","cbTimeout","doneIterating","cbTimer","doCallback","flushCtx","handled_1","_updateHook","_logOrThrowError","_notifyInvalidEvent","notificationManager","$12f08319fee74ea0$var$_listenerProxyFunc","enablePerfMgr","teeController","unloadHdl","releaseQueue","getChannels","controls","setCookieMgr","createPerfMgr","setPerfMgr","eventCnt","eventQueue","unloadComplete","flushComplete","processUnloadCtx","_doUnload","$2cb93c1cbddb67ab$export$bc81824d13c51ef3","targets","done","resolved","addPlugin","replaceExisting","addCb","existingPlugin","_addPlugin","removedPlugins_1","mergeExisting","oldCfg","merge","$e5177bba49076348$var$_deepMergeConfig","newValues","createNew","setTraceCtx","traceCtx","addUnloadHook","onCfgChange","unloadHook","fnd","getWParam","enableWParam","$072e43366110cd19$export$be41298b7716c698","$072e43366110cd19$export$400e70f2a2ecb5aa","$785f2f8595bbd489$export$8ff033ecd75b66c3","$785f2f8595bbd489$export$25a34734290022f3","$785f2f8595bbd489$export$6eae51590aaea43","$785f2f8595bbd489$export$a5eb52c53bba8560","$785f2f8595bbd489$export$c105b94efa183847","$785f2f8595bbd489$export$4e92e4b92b41ba2d","$785f2f8595bbd489$export$fdcd48959e13aba7","$785f2f8595bbd489$export$fcf18cee9ee41961","$785f2f8595bbd489$export$f8d9e07631527156","$785f2f8595bbd489$export$e39be82dc519c4ae","$785f2f8595bbd489$export$3b3afe26ca0e015c","$785f2f8595bbd489$export$f9ae8d0acf86503e","$785f2f8595bbd489$export$ec2c4b7da1ef8dd0","$785f2f8595bbd489$export$de5be3709039b9b0","$785f2f8595bbd489$export$829ed22a43b4aada","$785f2f8595bbd489$export$b58618e731cdb301","$785f2f8595bbd489$export$84ecd29f369f5b1d","$785f2f8595bbd489$export$2aa2820bfe761f5b","$785f2f8595bbd489$export$69cac26425c8ea23","$785f2f8595bbd489$export$e4eaee9e01d9baaa","$785f2f8595bbd489$export$abc5bbd8bd54996a","$785f2f8595bbd489$export$928b837287a09b1f","$785f2f8595bbd489$export$a2e6a87e51acdf74","$785f2f8595bbd489$export$8e8c994d518b7819","$785f2f8595bbd489$export$e4bbd5d3fe5db54b","$785f2f8595bbd489$export$e9d1b90025f35753","$785f2f8595bbd489$export$1b35c99ae5c93631","$785f2f8595bbd489$export$990dec05286abf9b","$785f2f8595bbd489$export$391aca270631e029","$785f2f8595bbd489$export$21cd44ec55cfc0f9","$785f2f8595bbd489$export$f8d169088a01f6f2","$785f2f8595bbd489$export$e44f43b238a0c7f0","$785f2f8595bbd489$export$422ea83a60e3414b","$785f2f8595bbd489$export$9984940f44bb6769","$785f2f8595bbd489$export$ebd7b63f645a373e","$785f2f8595bbd489$export$b3507d39ae3f3e22","$785f2f8595bbd489$export$dda6370f5a5c9f36","$785f2f8595bbd489$export$90dab0fe9b2b7158","$785f2f8595bbd489$export$1fd22cf8d803736f","$785f2f8595bbd489$export$47d30bd816d62bdc","$785f2f8595bbd489$export$cce28811c9041832","$785f2f8595bbd489$export$99588eb1c78d46e0","$785f2f8595bbd489$export$d9f76b3afffa4e88","$785f2f8595bbd489$export$e52fa892d403cac3","$785f2f8595bbd489$export$e31aceb60e1b3a1a","$785f2f8595bbd489$export$71a9f4a2e496846d","$785f2f8595bbd489$export$121ad73699ff0814","$785f2f8595bbd489$export$e2e640c31408a88f","$785f2f8595bbd489$export$9e85e7b326182790","$785f2f8595bbd489$export$9734b0a24bf02e93","$785f2f8595bbd489$export$6bec4987b5d3526c","$785f2f8595bbd489$export$4852fd87b68a6e1f","$785f2f8595bbd489$export$c9bea9d79dd8e37a","$785f2f8595bbd489$export$c4a9b5c39c7409f7","$785f2f8595bbd489$export$7820e90f0eaab413","$785f2f8595bbd489$export$c050ff25390a2bce","$9a2f7734ba2f502d$var$_calcPerfDuration","resourceEntry","$9a2f7734ba2f502d$var$_setPerfDuration","$9a2f7734ba2f502d$var$_setPerfValue","strPerf","perfData","$9a2f7734ba2f502d$export$79f098456caec6e7","setRequestHeaderDone","$9a2f7734ba2f502d$export$3391d178758cbbb1","ajaxRecord","completed","requestHeadersSize","responseReceivingDuration","callbackDuration","requestSize","responseStartedTime","callbackFinishedTime","endTime","xhrMonitoringState","clientFailure","getAbsoluteUrl","getPathName","ajaxType","enableRequestHeaderTracking","getResponse","ajaxTotalDuration","requestSentTime","responseFinishedTime","dependency","HttpMethod","$9a2f7734ba2f502d$var$_populatePerfData","ajaxData","propsSet","strName","strStart","strDomainLookup","strConnect","strRedirect","strRequest","strResponse","strStartTime","strConnectEnd","strRequestStart","strResponseEnd","strRedirectStart","strRedirectEnd","strTransferSize","strEncodedBodySize","strDecodedBodySize","strServerTiming","serverTiming","server_1","val","perfAttempts","headerMap","responseHeaders","responseType","partA","traceExt","$2569abef053897bd$var$AJAX_MONITOR_PREFIX","$2569abef053897bd$var$strDiagLog","$2569abef053897bd$var$strAjaxData","$2569abef053897bd$var$STR_FETCH","$2569abef053897bd$var$ERROR_HEADER","$2569abef053897bd$var$ERROR_PREFIX","$2569abef053897bd$var$ERROR_POSTFIX","$2569abef053897bd$var$ERROR_NOT_SENT","$2569abef053897bd$var$CORRELATION_HEADER_ERROR","$2569abef053897bd$var$CUSTOM_REQUEST_CONTEXT_ERROR","$2569abef053897bd$var$FAILED_TO_CALCULATE_DURATION_ERROR","$2569abef053897bd$var$_markCount","$2569abef053897bd$var$_getFailedAjaxDiagnosticsMessage","$2569abef053897bd$var$_throwInternalCritical","ajaxMonitorInstance","$2569abef053897bd$var$_throwInternalWarning","$2569abef053897bd$var$_createErrorCallbackFunc","internalMessage","ajaxDiagnosticsMessage","$2569abef053897bd$var$_indexOf","$2569abef053897bd$var$_addHandler","container","theHandler","$2569abef053897bd$var$_processDependencyContainer","$2569abef053897bd$var$BLOB_CORE","$2569abef053897bd$export$ae1f7dcb3278b8bb","$2569abef053897bd$var$_internalExcludeEndpoints","$2569abef053897bd$var$_defaultConfig","distributedTracingMode","maxAjaxPerfLookupAttempts","ignoreHeaders","addIntEndpoints","$2569abef053897bd$export$d9a50c4d1eb2475f","AjaxMonitor","_fetchInitialized","_xhrInitialized","_currentWindowHost","_extensionConfig","_enableRequestHeaderTracking","_enableAjaxErrorStatusText","_trackAjaxAttempts","_context","_isUsingW3CHeaders","_isUsingAIHeaders","_markPrefix","_enableAjaxPerfTracking","_maxAjaxCallsPerView","_enableResponseHeaderTracking","_disabledUrls","_disableAjaxTracking","_disableFetchTracking","_excludeRequestFromAutoTrackingPatterns","_addRequestContext","_dependencyHandlerId","_dependencyListeners","_dependencyInitializers","_ignoreHeaders","_maxAjaxPerfLookupAttempts","_ajaxPerfLookupDelay","_distributedTracingMode","_polyfillInitialized","_canIncludeHeaders","rlt","_hookProto","_isDisabledRequest","isDisabled","theUrl","theRegex","idx2","substring","_isMonitoredXhrInstance","excludeAjaxDataValidation","ajaxValidation","initialized","_createMarkId","performance_1","mark","markId","getEntriesByName","_findPerfResourceEntry","initiatorType","trackCallback","reportError","perfMark","performance","maxAttempts","retryDelay","attempt","locateResourceTiming","perfTiming","getEntries","entryType","clearMarks","_getFailedFetchDiagnosticsMessage","_reportFetchMetrics","sysProperties","_reportDependencyInternal","_reportFetchError","failedProps","errorProps","initializers","aborted","propExt","$2569abef053897bd$var$_supportsAjaxMonitoring","abort","theOpen","req","_onAjaxComplete","_reportXhrError","ajaxResponse","_getAjaxCorrelationContext","responseHeadersString","getResponseHeader","_getResponseText","responseHeaderMap_2","parts","shift","exceptionText","hkErr","_instrumentFetch","_global","global","isPolyfill","polyfill","forEach","newInit","fetchData_1","_getFetchCorrelationContext","fetchDiagnosticsMessage","responseHeaderMap_1","catch","trackDependencyData","currentWindowHost","$2569abef053897bd$var$_processDependencyListeners","initializersCount","traceParent","addDependencyListener","dependencyListener","addDependencyInitializer","dependencyInitializer","$8da6cf2fd8f2255d$export$16975c34e60e1e61","$4af86dbfa3092e80$export$8215d14a63d9fb10","$40e2a879f9bef5dc$export$81742925a72ee8f2","unloadHookContainer","prefix","sdkExtension","sdkVersion","$767b8cd94041adba$export$18a2be9195644f38","$f9279bf813e6e5d7$export$1c39d669bde62767","$f9279bf813e6e5d7$export$c9f4bebf02f459de","$f9279bf813e6e5d7$export$52b1fe3e70f4c699","$f9279bf813e6e5d7$export$e8019acdc6dfe227","$f9279bf813e6e5d7$export$2d15b9b0e9d1daaa","$f9279bf813e6e5d7$export$805965d0d38cc4a5","$f9279bf813e6e5d7$export$585a4eb45f8043ec","$f9279bf813e6e5d7$export$5c833c29ed72a760","$f9279bf813e6e5d7$export$f3448cce94ee4935","$f9279bf813e6e5d7$export$a6c599a5c1ab6761","$f9279bf813e6e5d7$export$5090ada1085f4557","$f9279bf813e6e5d7$export$dddc87038d37bcef","$f9279bf813e6e5d7$export$4768decfd4f15bcf","$f9279bf813e6e5d7$export$348ac062a116e27c","$f9279bf813e6e5d7$export$f251a1587d4aac90","$f9279bf813e6e5d7$export$3af04f76fec134a","$f9279bf813e6e5d7$export$6d013a7bc2da53c1","$f9279bf813e6e5d7$export$f3af58106bbab288","$f9279bf813e6e5d7$export$5c90c36f2382a0ff","$f9279bf813e6e5d7$export$d4e11a6879dac67b","$f9279bf813e6e5d7$export$6eae51590aaea43","$f9279bf813e6e5d7$export$4d608086992f55c7","$f9279bf813e6e5d7$export$574ff42e0e7ce0c","$f9279bf813e6e5d7$export$8c9471ee03377604","$f9279bf813e6e5d7$export$7254663b30b11264","$f9279bf813e6e5d7$export$9876e756459769d6","$f9279bf813e6e5d7$export$57599fb6aa598bd4","$f9279bf813e6e5d7$export$7bdc84f949b24ffd","$b3a76197ac0f306d$export$1fb4852a55678982","$b3a76197ac0f306d$export$9a3efd42578d1f11","_SessionManager","_storageNamePrefix","_cookieUpdatedTimestamp","_sessionExpirationMs","_sessionRenewalMs","$b3a76197ac0f306d$var$SESSION_COOKIE_NAME","sessionCookiePostfix","_initializeAutomaticSessionWithData","session","sessionData","sessionReset","tokens","acqMs","renewalMs","_setCookie","acq","renewalPeriodMs","acqTimeLeftMs","cookie","getNewId","isExpired","_initializeAutomaticSession","storageValue","timeSinceAcqMs","timeSinceRenewalMs","automaticSession","backup","renewal","$39a36e687e3ece23$export$d65492b1f626b9ec","parentId","$0ad45f65976bc29a$var$_validateUserInput","$0ad45f65976bc29a$export$1f44aaf2ec115b54","User","isNewUser","isUserCookieSet","userCookiePostfix","userCookieName","params","_generateNewId","_setUserCookie","newCookie","_generateNewCookie","authCookie","authCookieString","decodeURI","acqStr","accountAcquisitionDate","setAuthenticatedUserContext","authenticatedUserId","accountId","storeInCookie","encodeURI","clearAuthenticatedUserContext","user_cookie","cookieSeparator","authUserCookieName","$c7c00a0692573aa9$var$strTags","$c7c00a0692573aa9$var$_removeEmpty","$c7c00a0692573aa9$var$_nullResult","$c7c00a0692573aa9$export$7b6b7bc4acb29126","TelemetryContext","previousTraceCtx","application","internal","autoSession","build","agentVersion","snippetVer","sdkSrc","applyWebContext","cleanUp","$374e174ea903f978$var$_defaultConfig","isBrowserLinkTrackingEnabled","$374e174ea903f978$var$PropertiesPlugin","PropertiesPlugin","_distributedTraceCtx","_previousTraceCtx","_unloadHooks","breezeChannel","theContext","userCtx","$07885e4968a136ac$var$_AUTHENTICATED_USER_CONTEXT","$07885e4968a136ac$var$_TRACK","$07885e4968a136ac$export$c40a95bd1f19a04a","$07885e4968a136ac$export$36b97ab40aae74fe","$07885e4968a136ac$export$6030ed320bde556b","$07885e4968a136ac$export$59cf80c2878d98fc","$07885e4968a136ac$export$657de6e6c53d3d4b","$07885e4968a136ac$export$2a937c908483aaba","$07885e4968a136ac$export$6a76308d410f3214","$07885e4968a136ac$export$f73efacb9b6b9a35","$07885e4968a136ac$export$96dcb75b34c1a4","$07885e4968a136ac$export$5a8b50b634878942","$07885e4968a136ac$export$ab9c6dcf6c4e2bbc","$07885e4968a136ac$export$94666ce386bd4f64","$07885e4968a136ac$export$f920535c288b298f","$5f4895b2bf2489f4$export$568c4302d11f2b22","$5f4895b2bf2489f4$export$a1c208448cc1b3be","$5f4895b2bf2489f4$export$1160203e21ea532","$5f4895b2bf2489f4$export$bfa1c9e5dcf1e78","$5f4895b2bf2489f4$export$81cfd43387c8dbcc","$5f4895b2bf2489f4$export$c0d9014f1d64bf51","$5f4895b2bf2489f4$export$f30bfb116278d530","$5f4895b2bf2489f4$export$fdcd48959e13aba7","$5f4895b2bf2489f4$export$1005ab001db54adc","$a7828c8fd42bf560$var$_ignoreUpdateSnippetProperties","$a7828c8fd42bf560$var$UNDEFINED_VALUE","$a7828c8fd42bf560$var$defaultConfigValues","$a7828c8fd42bf560$export$e8021799dbedb971","AppInsightsSku","snippet","dependencies","_sender","_snippetVersion","_houseKeepingNamespace","_core","_config","_analyticsPlugin","sv","cs","connectionString","fields","kv","kvParts","endpointsuffix","locationPrefix","ingest","ingestionendpoint","instrumentationkey","isErrMessageDisabled","_removePageEventHandlers","flushDone","loadAppInsights","legacyMode","$a7828c8fd42bf560$export$62f75e89e888afb6","scrpt","document","currentScript","url_1","src_1","_updateSnippetProperties","emptyQueue","chkSet","_loop_1","length_1","appInsightsInstance","performHousekeeping_1","loadedPlugin","propertiesPlugin","_sessionManager","added_1","analyticsPlugin_1","theConfig_1","excludePageUnloadEvents","disablePageUnloadEvents","product","getSender","$a1e7c06e675ca002$var$aiConnectionString","decodeURIComponent","trackPageView"],"version":3,"file":"ai.js.map"}