@microsoft/applicationinsights-perfmarkmeasure-js 3.4.2 → 3.4.3-nightly3.2606-03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/es5/{ai.prfmm-mgr.3.4.2.cjs.js → ai.prfmm-mgr.3.4.3-nightly3.2606-03.cjs.js} +2 -2
- package/browser/es5/ai.prfmm-mgr.3.4.3-nightly3.2606-03.cjs.js.map +1 -0
- package/browser/es5/{ai.prfmm-mgr.3.4.2.cjs.min.js → ai.prfmm-mgr.3.4.3-nightly3.2606-03.cjs.min.js} +2 -2
- package/browser/es5/ai.prfmm-mgr.3.4.3-nightly3.2606-03.cjs.min.js.map +1 -0
- package/browser/es5/{ai.prfmm-mgr.3.4.2.gbl.js → ai.prfmm-mgr.3.4.3-nightly3.2606-03.gbl.js} +4 -4
- package/browser/es5/ai.prfmm-mgr.3.4.3-nightly3.2606-03.gbl.js.map +1 -0
- package/browser/es5/ai.prfmm-mgr.3.4.3-nightly3.2606-03.gbl.min.js +6 -0
- package/browser/es5/ai.prfmm-mgr.3.4.3-nightly3.2606-03.gbl.min.js.map +1 -0
- package/browser/es5/ai.prfmm-mgr.3.4.3-nightly3.2606-03.integrity.json +66 -0
- package/browser/es5/{ai.prfmm-mgr.3.4.2.js → ai.prfmm-mgr.3.4.3-nightly3.2606-03.js} +4 -4
- package/browser/es5/ai.prfmm-mgr.3.4.3-nightly3.2606-03.js.map +1 -0
- package/browser/es5/ai.prfmm-mgr.3.4.3-nightly3.2606-03.min.js +6 -0
- package/browser/es5/ai.prfmm-mgr.3.4.3-nightly3.2606-03.min.js.map +1 -0
- package/browser/es5/ai.prfmm-mgr.3.cjs.js +1 -1
- package/browser/es5/ai.prfmm-mgr.3.cjs.js.map +1 -1
- package/browser/es5/ai.prfmm-mgr.3.cjs.min.js +1 -1
- package/browser/es5/ai.prfmm-mgr.3.cjs.min.js.map +1 -1
- package/browser/es5/ai.prfmm-mgr.3.gbl.js +3 -3
- package/browser/es5/ai.prfmm-mgr.3.gbl.js.map +1 -1
- package/browser/es5/ai.prfmm-mgr.3.gbl.min.js +2 -2
- package/browser/es5/ai.prfmm-mgr.3.gbl.min.js.map +1 -1
- package/browser/es5/ai.prfmm-mgr.3.integrity.json +25 -25
- package/browser/es5/ai.prfmm-mgr.3.js +3 -3
- package/browser/es5/ai.prfmm-mgr.3.js.map +1 -1
- package/browser/es5/ai.prfmm-mgr.3.min.js +2 -2
- package/browser/es5/ai.prfmm-mgr.3.min.js.map +1 -1
- package/dist/es5/applicationinsights-perfmarkmeasure-js.js +1 -1
- package/dist/es5/applicationinsights-perfmarkmeasure-js.js.map +1 -1
- package/dist/es5/applicationinsights-perfmarkmeasure-js.min.js +1 -1
- package/dist/es5/applicationinsights-perfmarkmeasure-js.min.js.map +1 -1
- package/dist-es5/PerfMarkMeasureManager.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/dist-es5/applicationinsights-perfmarkmeasure-js.js +1 -1
- package/dist-es5/interfaces/IPerfMarkMeasureConfiguration.js +1 -1
- package/package.json +73 -70
- package/types/applicationinsights-perfmarkmeasure-js.d.ts +1 -1
- package/types/applicationinsights-perfmarkmeasure-js.namespaced.d.ts +1 -1
- package/browser/es5/ai.prfmm-mgr.3.4.2.cjs.js.map +0 -1
- package/browser/es5/ai.prfmm-mgr.3.4.2.cjs.min.js.map +0 -1
- package/browser/es5/ai.prfmm-mgr.3.4.2.gbl.js.map +0 -1
- package/browser/es5/ai.prfmm-mgr.3.4.2.gbl.min.js +0 -6
- package/browser/es5/ai.prfmm-mgr.3.4.2.gbl.min.js.map +0 -1
- package/browser/es5/ai.prfmm-mgr.3.4.2.integrity.json +0 -66
- package/browser/es5/ai.prfmm-mgr.3.4.2.js.map +0 -1
- package/browser/es5/ai.prfmm-mgr.3.4.2.min.js +0 -6
- package/browser/es5/ai.prfmm-mgr.3.4.2.min.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.prfmm-mgr.3.4.3-nightly3.2606-03.cjs.js","sources":["https://raw.githubusercontent.com/microsoft/ApplicationInsights-JS/refs/tags/3.4.3-nightly3.2606-03/tools/shims/src/Constants.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/internal/treeshake_helpers.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/internal/constants.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/helpers/safe.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/helpers/base.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/internal/stubs.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/string/as_string.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/helpers/diagnostics.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/helpers/throw.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/internal/throwIf.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/object/has_own_prop.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/object/has_own.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/object/for_each_key.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/object/define.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/internal/global.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/object/create.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/helpers/date.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/helpers/lazy.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/helpers/cache.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/helpers/environment.ts","https://raw.githubusercontent.com/nevware21/ts-utils/refs/tags/0.15.0/lib/src/helpers/perf.ts","https://raw.githubusercontent.com/microsoft/ApplicationInsights-JS/refs/tags/3.4.3-nightly3.2606-03/tools/shims/src/Constants.ts","https://raw.githubusercontent.com/microsoft/dynamicproto-js/refs/tags/2.0.5/lib/src/DynamicProto.ts","ai.prfmm-mgr@3.4.3-nightly3.2606-03/shared/AppInsightsCore/dist-es5/__DynamicConstants.js","ai.prfmm-mgr@3.4.3-nightly3.2606-03/shared/AppInsightsCore/dist-es5/constants/InternalConstants.js","ai.prfmm-mgr@3.4.3-nightly3.2606-03/shared/AppInsightsCore/dist-es5/utils/HelperFuncs.js","ai.prfmm-mgr@3.4.3-nightly3.2606-03/shared/AppInsightsCore/dist-es5/internal/noopHelpers.js","ai.prfmm-mgr@3.4.3-nightly3.2606-03/shared/AppInsightsCore/dist-es5/core/PerfManager.js","ai.prfmm-mgr@3.4.3-nightly3.2606-03/dist-es5/__DynamicConstants.js","ai.prfmm-mgr@3.4.3-nightly3.2606-03/dist-es5/PerfMarkMeasureManager.js"],"sourcesContent":["// 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","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2024 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal tree shaking helper to return the first available function from the two provided.\r\n * This is required to ensure that tree-shaking can remove any unused functions as this ensures\r\n * that the alias assignments are not considered side-effects and are tagged correctly as pure.\r\n * @param func1 - The system function to use if available\r\n * @param func2 - The polyfill function to use if the static function is not available\r\n * @returns The first available function from the two provided\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function _pureAssign<F>(func1: F, func2?: F): F {\r\n return func1 || func2;\r\n}\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Internal tree shaking helper to return the value of the named property from the provided object.\r\n * By using this helper, we can explicitly tell the tree-shaking tool that this function is pure and\r\n * has no side effects. As some tree-shaking tools may not be able to determine this automatically.\r\n * @param value - The object to get the property value from\r\n * @param name - The name of the property to get the value of\r\n * @returns The value of the named property from the provided object\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function _pureRef<R extends T[keyof T], T = any>(value: T, name: keyof T): R {\r\n return value !== null && value !== undefined ? value[name] as R : undefined as unknown as R;\r\n}","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022-2025 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { _pureAssign, _pureRef } from \"./treeshake_helpers\";\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 FUNCTION = \"function\";\r\nexport const OBJECT = \"object\";\r\nexport const PROTOTYPE = \"prototype\";\r\nexport const __PROTO__ = \"__proto__\";\r\nexport const UNDEFINED = \"undefined\";\r\nexport const CONSTRUCTOR = \"constructor\";\r\nexport const SYMBOL = \"Symbol\";\r\nexport const LENGTH = \"length\";\r\nexport const NAME = \"name\";\r\nexport const CALL = \"call\";\r\nexport const TO_STRING = \"toString\";\r\n\r\nexport const GET_OWN_PROPERTY_DESCRIPTOR = \"getOwnPropertyDescriptor\";\r\nexport const GET_OWN_PROPERTY_NAMES = \"getOwnPropertyNames\";\r\nexport const GET_OWN_PROPERTY_SYMBOLS = \"getOwnPropertySymbols\";\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const ObjClass = (/*#__PURE__*/_pureAssign(Object));\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const ObjProto = (/*#__PURE__*/_pureRef<typeof Object.prototype>(ObjClass, PROTOTYPE));\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const StrCls = (/*#__PURE__*/_pureAssign(String));\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const StrProto = (/*#__PURE__*/_pureRef<typeof String.prototype>(StrCls, PROTOTYPE)) as String;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const MathCls = (/*#__PURE__*/_pureAssign(Math)) as Math;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const ArrCls = (/*#__PURE__*/_pureAssign(Array));\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const ArrProto = (/*#__PURE__*/_pureRef<typeof ArrCls.prototype>(ArrCls, PROTOTYPE));\r\n\r\n/**\r\n * @ignore\r\n *\r\n */\r\nexport const ArrSlice = (/*#__PURE__*/_pureRef<typeof ArrProto.slice>(ArrProto, \"slice\"));\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const NumberCls = (/*#__PURE__*/_pureAssign(Number));\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const NumberProto = (/*#__PURE__*/_pureRef<typeof Number.prototype>(NumberCls, PROTOTYPE)) as Number;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const FuncCls = (/*#__PURE__*/_pureAssign(Function)) as FunctionConstructor;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const FuncProto = (/*#__PURE__*/_pureRef<typeof Function.prototype>(FuncCls, PROTOTYPE)) as Function;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const DateCls = (/*#__PURE__*/_pureAssign(Date)) as DateConstructor;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const DateProto = (/*#__PURE__*/_pureRef<typeof Date.prototype>(DateCls, PROTOTYPE)) as Date;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const RegExpCls = (/*#__PURE__*/_pureAssign(RegExp)) as RegExpConstructor;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const RegExpProto = (/*#__PURE__*/_pureRef<typeof RegExp.prototype>(RegExpCls, PROTOTYPE)) as RegExp;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const BooleanCls = (/*#__PURE__*/_pureAssign(Boolean)) as BooleanConstructor;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const BooleanProto = (/*#__PURE__*/_pureRef<typeof Boolean.prototype>(BooleanCls, PROTOTYPE)) as Boolean;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const ErrorCls = (/*#__PURE__*/_pureAssign(Error)) as ErrorConstructor;\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const ErrorProto = (/*#__PURE__*/_pureRef<typeof Error.prototype>(ErrorCls, PROTOTYPE)) as Error;\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\n/**\r\n * Infers the return type of the specified function\r\n * @since 0.10.5\r\n * @group Safe\r\n * @typeParam T - The type of the function which to infer the return type\r\n */\r\nexport type SafeReturnType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? R : any\r\n\r\n/**\r\n * Defines the return value of the {@link safe} function, which is an object with either a value or an error\r\n * @since 0.10.5\r\n * @group Safe\r\n * @typeParam T - The type of the function to call\r\n * @typeParam R - The return type of the function\r\n */\r\nexport interface ISafeReturn<T extends (...args: any) => R, R = SafeReturnType<T>> {\r\n /**\r\n * The value returned by the function call\r\n */\r\n v?: R;\r\n\r\n /**\r\n * The error thrown by the function call\r\n */\r\n e?: Error;\r\n}\r\n\r\n/**\r\n * Call the specified function with zero or more individual arguments, the call will be wrapped in a try / catch\r\n * block and the result returned wrapped in an {@link ISafeReturn} instance. If the function call throws an\r\n * exception the {@link ISafeReturn.e | error} property will contain the exception otherwise the {@link ISafeReturn.v | value}\r\n * property will contain the value returned from the function.\r\n * @since 0.10.5\r\n * @group Safe\r\n * @typeParam F - The type of the function to call\r\n * @typeParam R - The return type of the function to call\r\n * @param func - The function to call\r\n * @param argArray - An array of the arguments to pass to the function\r\n * @returns The return value of the function or undefined if an exception is thrown\r\n * @example\r\n * ```ts\r\n * let result = safe((value: string) => {\r\n * return JSON.parse(value);\r\n * }, [\"{ invalid: json value\"]);\r\n *\r\n * // result.e instanceof SyntaxError\r\n *\r\n * let result2 = safe((value: string) => {\r\n * return JSON.parse(value);\r\n * }, [\"{ valid: 'json value' }\"]);\r\n *\r\n * // result2.v === { valid: \"json value\" }\r\n * ```\r\n */\r\nexport function safe<F extends (...args: unknown[]) => R, R = ReturnType<F>>(func: F, argArray?: any[]): ISafeReturn<F, R> {\r\n try {\r\n return {\r\n v: func.apply(this, argArray)\r\n };\r\n } catch (e) {\r\n return { e };\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-2025 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ArrCls, FUNCTION, LENGTH, NULL_VALUE, OBJECT, ObjProto, TO_STRING, UNDEFINED, UNDEF_VALUE } from \"../internal/constants\";\r\nimport { _isPolyfillType } from \"../internal/poly_helpers\";\r\nimport { _pureRef } from \"../internal/treeshake_helpers\";\r\nimport { safeGet } from \"./safe_get\";\r\n\r\nlet _primitiveTypes: string[];\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function _createIs<T>(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 provided type or the type is a polyfill for 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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function _createIsWithPoly<T>(theType: string): (value: any) => value is T {\r\n return function (value: any): value is T {\r\n return typeof value === theType || _isPolyfillType(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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function _createObjIs<T>(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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function objToString(value: any): string {\r\n return ObjProto[TO_STRING].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\n/*#__NO_SIDE_EFFECTS__*/\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\n/*#__NO_SIDE_EFFECTS__*/\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 arg - 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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isStrictUndefined(arg: any): arg is undefined {\r\n return arg === UNDEF_VALUE;\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\n/*#__NO_SIDE_EFFECTS__*/\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 strictly `null` or `undefined`. A string value of `\"undefined\"` is NOT\r\n * considered to be undefined. When this function returns `true`, TypeScript narrows the type to `null | 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 strictly `null` or `undefined`, narrowing the type to `null | undefined`.\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isStrictNullOrUndefined(value: any): value is null | undefined {\r\n return value === NULL_VALUE || value === UNDEF_VALUE;\r\n}\r\n\r\n/**\r\n * Checks if the passed value is defined, which means it is not strictly `undefined` (and not `null`).\r\n * A string value of `\"undefined\"` is considered to be defined. When this returns `true`, TypeScript narrows\r\n * the type to `Exclude<T, undefined>`, removing `undefined` from the type.\r\n * @group Type Identity\r\n * @group Value Check\r\n * @typeParam T - The expected type of the value when it is defined.\r\n * @param arg - The value to check\r\n * @returns `true` if the value is defined (not `null` and not `undefined`), narrowing the type to `Exclude<T, 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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isDefined<T>(arg: any): arg is Exclude<T, undefined> {\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function 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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isPrimitiveType(theType: string): boolean {\r\n !_primitiveTypes && (_primitiveTypes = [ \"string\", \"number\", \"boolean\", UNDEFINED, \"symbol\", \"bigint\" ]);\r\n\r\n return !!(theType !== OBJECT && _primitiveTypes.indexOf(theType) !== -1);\r\n}\r\n\r\n/**\r\n * Checks to see if the past value is a string value\r\n * @function\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 = (/*#__PURE__*/_createIs<string>(\"string\"));\r\n\r\n/**\r\n * Checks to see if the past value is a function value\r\n * @function\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 = (/*#__PURE__*/_createIs<Function>(FUNCTION));\r\n\r\n/**\r\n * Checks if the provided value is an AsyncFunction\r\n * @function\r\n * @group Type Identity\r\n * @since 0.12.3\r\n * @param value - Value to be checked\r\n * @returns True if the value is an AsyncFunction, false otherwise\r\n * @remarks\r\n * This function checks if the provided value is an AsyncFunction, which is a special type of function\r\n * that returns a Promise and can be used with the `await` keyword. Note that this function does not\r\n * check if the function is a generator or an async generator function. And when using TypeScript\r\n * and targetting earlier versions of JavaScript, the type of the function may NOT be AsyncFunction\r\n * and instead be a regular function. This is because the type of the function is determined by the\r\n * JavaScript engine and not the TypeScript compiler.\r\n * @example\r\n * ```ts\r\n * async function asyncFn() { }\r\n * isAsyncFunction(asyncFn); // true\r\n * isAsyncFunction(function() {}); // false\r\n * isAsyncFunction(function* () {}); // false\r\n * isAsyncFunction(async function* () {}); // false\r\n * isAsyncFunction(null); // false\r\n * isAsyncFunction(undefined); // false\r\n * ```\r\n */\r\nexport const isAsyncFunction: (value: any) => value is Function = (/*#__PURE__*/_createObjIs<Function>(\"AsyncFunction\"));\r\n\r\n/**\r\n * Checks if the provided value is a GeneratorFunction\r\n * @function\r\n * @group Type Identity\r\n * @since 0.12.3\r\n * @param value - Value to be checked\r\n * @returns True if the value is a GeneratorFunction, false otherwise\r\n * @remarks\r\n * This function checks if the provided value is a GeneratorFunction, which is a special type of function\r\n * that returns a Generator and can be used with the `yield` keyword. Note that this function does not\r\n * check if the function is an async function or an async generator function. And when using TypeScript\r\n * and targetting earlier versions of JavaScript, the type of the function may NOT be GeneratorFunction\r\n * and instead be a regular function.\r\n * @example\r\n * ```ts\r\n * function* genFn() { }\r\n * isGenerator(genFn); // true\r\n * isGenerator(function() {}); // false\r\n * isGenerator(async function() {}); // false\r\n * isGenerator(async function* () {}); // false\r\n * isGenerator(null); // false\r\n * isGenerator(undefined); // false\r\n * ```\r\n */\r\nexport const isGenerator: (value: any) => value is GeneratorFunction = (/*#__PURE__*/_createObjIs<GeneratorFunction>(\"GeneratorFunction\"));\r\n\r\n/**\r\n * Checks if the provided value is an AsyncGeneratorFunction\r\n * @function\r\n * @group Type Identity\r\n * @since 0.12.3\r\n * @param value - Value to be checked\r\n * @returns True if the value is an AsyncGeneratorFunction, false otherwise\r\n * @remarks\r\n * This function checks if the provided value is an AsyncGeneratorFunction, which is a special type of function\r\n * that returns an AsyncGenerator and can be used with the `await` keyword. Note that this function does not\r\n * check if the function is a generator or an async function. And when using TypeScript and targetting earlier\r\n * versions of JavaScript, the type of the function may NOT be AsyncGeneratorFunction and instead be a regular function.\r\n * @example\r\n * ```ts\r\n * async function* asyncGenFn() { }\r\n * isAsyncGenerator(asyncGenFn); // true\r\n * isAsyncGenerator(function() {}); // false\r\n * isAsyncGenerator(async function() {}); // false\r\n * isAsyncGenerator(function* () {}); // false\r\n * isAsyncGenerator(null); // false\r\n * isAsyncGenerator(undefined); // false\r\n * ```\r\n */\r\nexport const isAsyncGenerator: (value: any) => value is AsyncGeneratorFunction = (/*#__PURE__*/_createObjIs<AsyncGeneratorFunction>(\"AsyncGeneratorFunction\"));\r\n\r\n/**\r\n * Checks to see if the past value is an object value\r\n * @function\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isObject<T>(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 * @function\r\n * @group Type Identity\r\n * @group Array\r\n * @param arg - Value to be checked.\r\n * @return 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: <T = any>(arg: any) => arg is Array<T> = (/* #__PURE__*/_pureRef<typeof ArrCls.isArray>(ArrCls as any, \"isArray\"));\r\n\r\n/**\r\n * Checks if the type of value is array-like (has a numeric length property and numeric indices).\r\n * @since 0.14.0\r\n * @function\r\n * @group Type Identity\r\n * @group Array\r\n * @param arg - Value to be checked.\r\n * @return True if the value is array-like, false otherwise.\r\n * @example\r\n * ```ts\r\n * import { isArrayLike } from \"@nevware21/ts-utils\";\r\n *\r\n * isArrayLike([1, 2, 3]); // true\r\n * isArrayLike(\"hello\"); // true\r\n * isArrayLike({ length: 3, 0: \"a\", 1: \"b\", 2: \"c\" }); // true\r\n * isArrayLike({ length: \"3\" }); // false (length is not a number)\r\n * isArrayLike({ 0: \"a\", 1: \"b\" }); // false (no length property)\r\n * isArrayLike(null); // false\r\n * isArrayLike(undefined); // false\r\n * ```\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isArrayLike(arg: any): arg is ArrayLike<any> {\r\n return !isStrictNullOrUndefined(arg) && !isFunction(arg) && isNumber(arg[LENGTH]) && arg[LENGTH] >= 0;\r\n}\r\n\r\n/**\r\n * Check if an object is of type Date\r\n * @function\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 = (/*#__PURE__*/_createObjIs<Date>(\"Date\"));\r\n\r\n/**\r\n * Checks if the type of value is a number.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a number, false otherwise.\r\n */\r\nexport const isNumber: (value: any) => value is number = (/*#__PURE__*/_createIs<number>(\"number\"));\r\n\r\n/**\r\n * Checks if the type of value is a boolean.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a boolean, false otherwise.\r\n */\r\nexport const isBoolean: (value: any) => value is boolean = (/*#__PURE__*/_createIs<boolean>(\"boolean\"));\r\n\r\n/**\r\n * Determines if a value is a regular expression object.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Reference to check.\r\n * @returns True if `value` is a `RegExp`.\r\n */\r\nexport const isRegExp: (value: any) => value is RegExp = (/*#__PURE__*/_createObjIs<RegExp>(\"RegExp\"));\r\n\r\n/**\r\n * Checks if the type of value is a File object.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a File, false otherwise.\r\n */\r\nexport const isFile: (value: any) => value is File = (/*#__PURE__*/_createObjIs<File>(\"File\"));\r\n\r\n/**\r\n * Checks if the type of value is a FormData object.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a FormData, false otherwise.\r\n */\r\nexport const isFormData: (value: any) => value is FormData = (/*#__PURE__*/_createObjIs<FormData>(\"FormData\"));\r\n\r\n/**\r\n * Checks if the type of value is a Blob object.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a Blob, false otherwise.\r\n */\r\nexport const isBlob: (value: any) => value is Blob = (/*#__PURE__*/_createObjIs<Blob>(\"Blob\"));\r\n\r\n/**\r\n * Checks if the type of value is a ArrayBuffer object.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a ArrayBuffer, false otherwise.\r\n */\r\nexport const isArrayBuffer: (value: any) => value is ArrayBuffer = (/*#__PURE__*/_createObjIs<ArrayBuffer>(\"ArrayBuffer\"));\r\n\r\n/**\r\n * Checks if the type of value is a Error object.\r\n * @function\r\n * @group Type Identity\r\n * @group Error\r\n * @param value - Value to be checked.\r\n * @return True if the value is a Error, false otherwise.\r\n */\r\nexport const isError: (value: any) => value is Error = (/*#__PURE__*/_createObjIs<Error>(\"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 value - Value to be checked.\r\n * @return True if the value is a PromiseLike, false otherwise.\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isPromiseLike<T>(value: any): value is PromiseLike<T> {\r\n return !!(value && value.then && 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 * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a PromiseLike, false otherwise.\r\n */\r\nexport const isThenable: <T>(value: any) => value is PromiseLike<T> = 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 value - Value to be checked.\r\n * @return True if the value is a Promise, false otherwise.\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isPromise<T>(value: any): value is Promise<T> {\r\n return !!(value && value.then && value.catch && isFunction(value.then) && isFunction((value as any).catch));\r\n}\r\n\r\n/**\r\n * Checks if the type of value is a Map object.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a Map, false otherwise.\r\n * @example\r\n * ```ts\r\n * isMap(new Map()); // true\r\n * isMap(new WeakMap()); // false\r\n * isMap({}); // false\r\n * isMap(null); // false\r\n * ```\r\n */\r\nexport const isMap: <K = any, V = any>(value: any) => value is Map<K, V> = (/*#__PURE__*/_createObjIs<Map<any, any>>(\"Map\"));\r\n\r\n/**\r\n * Checks if the type of value is a WeakMap object.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a WeakMap, false otherwise.\r\n * @example\r\n * ```ts\r\n * isWeakMap(new WeakMap()); // true\r\n * isWeakMap(new Map()); // false\r\n * isWeakMap({}); // false\r\n * isWeakMap(null); // false\r\n * ```\r\n */\r\nexport const isWeakMap: <K extends object = object, V = any>(value: any) => value is WeakMap<K, V> = (/*#__PURE__*/_createObjIs<WeakMap<any, any>>(\"WeakMap\"));\r\n\r\n/**\r\n * Checks if the type of value is a Set object.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a Set, false otherwise.\r\n * @example\r\n * ```ts\r\n * isSet(new Set()); // true\r\n * isSet(new WeakSet()); // false\r\n * isSet({}); // false\r\n * isSet(null); // false\r\n * ```\r\n */\r\nexport const isSet: <T = any>(value: any) => value is Set<T> = (/*#__PURE__*/_createObjIs<Set<any>>(\"Set\"));\r\n\r\n/**\r\n * Checks if the type of value is a WeakSet object.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a WeakSet, false otherwise.\r\n * @example\r\n * ```ts\r\n * isWeakSet(new WeakSet()); // true\r\n * isWeakSet(new Set()); // false\r\n * isWeakSet({}); // false\r\n * isWeakSet(null); // false\r\n * ```\r\n */\r\nexport const isWeakSet: <T extends object = object>(value: any) => value is WeakSet<T> = (/*#__PURE__*/_createObjIs<WeakSet<any>>(\"WeakSet\"));\r\n\r\n/**\r\n * Checks if the type of value is Map-like (has essential Map methods).\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value implements the Map interface, false otherwise.\r\n * @example\r\n * ```ts\r\n * isMapLike(new Map()); // true\r\n *\r\n * // Custom map-like implementation\r\n * const myMap = {\r\n * get: (key) => { return null; },\r\n * set: (key, value) => { return myMap; },\r\n * has: (key) => { return false; },\r\n * delete: (key) => { return false; },\r\n * size: 0\r\n * };\r\n * isMapLike(myMap); // true\r\n *\r\n * isMapLike({}); // false\r\n * isMapLike(null); // false\r\n * isMapLike(undefined); // false\r\n * ```\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isMapLike<K = any, V = any>(value: any): value is Map<K, V> {\r\n return !!(value &&\r\n isFunction(value.get) &&\r\n isFunction(value.set) &&\r\n isFunction(value.has) &&\r\n isFunction(value.delete) &&\r\n isNumber(value.size));\r\n}\r\n\r\n/**\r\n * Checks if the type of value is Set-like (has essential Set methods).\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value implements the Set interface, false otherwise.\r\n * @example\r\n * ```ts\r\n * isSetLike(new Set()); // true\r\n *\r\n * // Custom set-like implementation\r\n * const mySet = {\r\n * add: (value) => { return mySet; },\r\n * has: (value) => { return false; },\r\n * delete: (value) => { return false; },\r\n * size: 0\r\n * };\r\n * isSetLike(mySet); // true\r\n *\r\n * isSetLike({}); // false\r\n * isSetLike(null); // false\r\n * isSetLike(undefined); // false\r\n * ```\r\n */\r\nexport function isSetLike<T = any>(value: any): value is Set<T> {\r\n return !!(value &&\r\n isFunction(value.add) &&\r\n isFunction(value.has) &&\r\n isFunction(value.delete) &&\r\n isNumber(value.size));\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 value - Value to be checked.\r\n * @return True if the value is not truthy, false otherwise.\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isNotTruthy(value: any) {\r\n return !value || !isTruthy(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 value - Value to be checked.\r\n * @return True if the value is not truthy, false otherwise.\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\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/**\r\n * Checks if the type of value is a BigInt.\r\n * @function\r\n * @group Type Identity\r\n * @param value - Value to be checked.\r\n * @return True if the value is a BigInt, false otherwise.\r\n * @example\r\n * ```ts\r\n * isBigInt(BigInt(42)); // true\r\n * isBigInt(42n); // true\r\n *\r\n * isBigInt(42); // false\r\n * isBigInt(\"42\"); // false\r\n * isBigInt(null); // false\r\n * isBigInt(undefined); // false\r\n * ```\r\n */\r\nexport const isBigInt: (value: any) => value is bigint = (/*#__PURE__*/_createIsWithPoly<bigint>(\"bigint\"));\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2025 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\n/**\r\n * Stub function that returns nothing.\r\n * This is used as a placeholder for polyfills or other functions that do not return a value.\r\n * @internal\r\n * @returns undefined\r\n * @template T - The type of the return value\r\n */\r\nexport function _returnNothing<T>(): T | undefined {\r\n return;\r\n}\r\n\r\n/**\r\n * Stub function that returns an empty array.\r\n * This is used as a placeholder for polyfills or other functions that expect an array return value.\r\n * @internal\r\n * @returns An empty array of type T\r\n * @template T - The type of the array elements\r\n */\r\nexport function _returnEmptyArray<T>(): T[] {\r\n return [];\r\n}\r\n\r\n/**\r\n * Stub function that returns false.\r\n * @internal\r\n * @returns false\r\n */\r\nexport function _returnFalse(): boolean {\r\n return false;\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 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { StrCls } from \"../internal/constants\";\r\nimport { _pureAssign } from \"../internal/treeshake_helpers\";\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 * @function\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 = (/*#__PURE__*/_pureAssign(StrCls));\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { CALL, EMPTY, NULL_VALUE, ObjProto, TO_STRING, UNDEF_VALUE } from \"../internal/constants\";\r\nimport { asString } from \"../string/as_string\";\r\n\r\nconst ERROR_TYPE = \"[object Error]\";\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 * @returns A string representation of the object suitable for diagnostics logging\r\n * @example\r\n * ```ts\r\n * let obj = { a: 1, b: \"Hello\", c: { d: 2, e: \"Darkness\" } };\r\n *\r\n * let objStr = dumpObj(obj);\r\n * // objStr === \"[object Object]: { a: 1, b: \"Hello\", c: { d: 2, e: \"Darkness\" } }\"\r\n *\r\n * let objStrFmt = dumpObj(obj, true);\r\n * // objStrFmt === \"[object Object]: {\\n a: 1,\\n b: \"Hello\",\\n c: {\\n d: 2,\\n e: \"Darkness\"\\n }\\n}\"\r\n *\r\n * let objStrFmt2 = dumpObj(obj, 2);\r\n * // objStrFmt2 === \"[object Object]: {\\n a: 1,\\n b: \"Hello\",\\n c: {\\n d: 2,\\n e: \"Darkness\"\\n }\\n}\"\r\n *\r\n * let objStrFmt3 = dumpObj(obj, 0);\r\n * // objStrFmt3 === \"[object Object]: { a: 1, b: \"Hello\", c: { d: 2, e: \"Darkness\" } }\"\r\n *\r\n * let objStrFmt4 = dumpObj(obj, false);\r\n * // objStrFmt4 === \"[object Object]: { a: 1, b: \"Hello\", c: { d: 2, e: \"Darkness\" } }\"\r\n *\r\n * let objStrFmt5 = dumpObj(obj, null);\r\n * // objStrFmt5 === \"[object Object]: { a: 1, b: \"Hello\", c: { d: 2, e: \"Darkness\" } }\"\r\n *\r\n * let objStrFmt6 = dumpObj(obj, undefined);\r\n * // objStrFmt6 === \"[object Object]: { a: 1, b: \"Hello\", c: { d: 2, e: \"Darkness\" } }\"\r\n *\r\n * let objStrFmt7 = dumpObj(obj, \"\");\r\n * // objStrFmt7 === \"[object Object]: { a: 1, b: \"Hello\", c: { d: 2, e: \"Darkness\" } }\"\r\n *\r\n * let err = new Error(\"Hello Darkness\");\r\n * let errStr = dumpObj(err);\r\n * // errStr === \"[object Error]: { stack: 'Error: Hello Darkness\\n at <anonymous>:1:13', message: 'Hello Darkness', name: 'Error'\"\r\n *\r\n * let errStrFmt = dumpObj(err, true);\r\n * // errStrFmt === \"[object Error]: {\\n stack: \"Error: Hello Darkness\\n at <anonymous>:1:13\",\\n message: \"Hello Darkness\",\\n name: \"Error\"\\n}\"\r\n *\r\n * let errStrFmt2 = dumpObj(err, 2);\r\n * // errStrFmt2 === \"[object Error]: {\\n stack: \"Error: Hello Darkness\\n at <anonymous>:1:13\",\\n message: \"Hello Darkness\",\\n name: \"Error\"\\n}\"\r\n *\r\n * let errStrFmt3 = dumpObj(err, 0);\r\n * // errStrFmt3 === \"[object Error]: { stack: \"Error: Hello Darkness\\n at <anonymous>:1:13\", message: \"Hello Darkness\", name: \"Error\" }\"\r\n *\r\n * ```\r\n * @see {@link dumpObj}\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function dumpObj(object: any, format?: boolean | number): string {\r\n let propertyValueDump = EMPTY;\r\n const objType = ObjProto[TO_STRING][CALL](object);\r\n if (objType === ERROR_TYPE) {\r\n object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };\r\n }\r\n\r\n try {\r\n propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? (((typeof format as unknown) === \"number\") ? format as number : 4) : UNDEF_VALUE);\r\n propertyValueDump = (propertyValueDump ? propertyValueDump.replace(/\"(\\w+)\"\\s*:\\s{0,1}/g, \"$1: \") : NULL_VALUE) || asString(object);\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 objType + \": \" + propertyValueDump;\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022-2025 NevWare21 Solutions LLC\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 - The optional message to include in the error\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 - The optional message to include in the error\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 - The optional message to include in the error\r\n */\r\nexport function throwRangeError(message?: string): never {\r\n throw new RangeError(message);\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2025 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { isStrictNullOrUndefined, isString } from \"../helpers/base\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\n\r\n/**\r\n * Throws a TypeError if the provided object is null or undefined.\r\n * This is a utility function to ensure that the object is valid before performing operations on it.\r\n * @param obj - The object to check\r\n * @internal\r\n * @since 0.12.0\r\n */\r\nexport function _throwIfNullOrUndefined(obj: any): void {\r\n // Ensure we're working with an object\r\n if (isStrictNullOrUndefined(obj)) {\r\n throwTypeError(\"Cannot convert undefined or null to object\");\r\n }\r\n}\r\n\r\n/**\r\n * Throws a TypeError if the provided value is not a string.\r\n * This is a utility function to ensure that the value is a string before performing string operations.\r\n * @param value - The value to check\r\n * @internal\r\n * @since 0.12.0\r\n */\r\nexport function _throwIfNotString(value: any): void {\r\n if (!isString(value)) {\r\n throwTypeError(\"'\" + dumpObj(value) + \"' is not a string\");\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 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { CALL, 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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function objHasOwnProperty<T = any>(obj: T, prop: PropertyKey): boolean {\r\n return !!obj && ObjProto.hasOwnProperty[CALL](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-2025 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { GET_OWN_PROPERTY_DESCRIPTOR, ObjClass } from \"../internal/constants\";\r\nimport { _returnNothing } from \"../internal/stubs\";\r\nimport { _throwIfNullOrUndefined } from \"../internal/throwIf\";\r\nimport { _pureAssign, _pureRef } from \"../internal/treeshake_helpers\";\r\nimport { objHasOwnProperty } from \"./has_own_prop\";\r\n\r\nconst _objGetOwnPropertyDescriptor: (target: any, prop: PropertyKey) => PropertyDescriptor | undefined = (/*#__PURE__*/_pureAssign((/*#__PURE__*/_pureRef<typeof Object.getOwnPropertyDescriptor>(ObjClass as any, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));\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 * @function\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: <T = any>(obj: T, prop: PropertyKey) => boolean = (/*#__PURE__*/_pureAssign((/*#__PURE__*/_pureRef(ObjClass as any, \"hasOwn\")), polyObjHasOwn));\r\n\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function polyObjHasOwn<T = any>(obj: T, prop: PropertyKey): boolean {\r\n // Ensure we're working with an object\r\n _throwIfNullOrUndefined(obj);\r\n \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-2025 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { isFunction, isObject, isStrictNullOrUndefined } from \"../helpers/base\";\r\nimport { CALL } from \"../internal/constants\";\r\nimport { objHasOwn } from \"./has_own\";\r\nimport { isUnsafePropKey } from \"./isUnsafePropKey\";\r\n\r\n/**\r\n * Calls the provided `callbackFn` function once for each key in an object. This is equivalent to `arrForEach(Object.keys(theObject), callbackFn)` or\r\n * if not using the array helper `Object.keys(theObject).forEach(callbackFn)` except that this helper avoids creating a temporary array 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 *\r\n * **Note:** This helper only iterates string (and numeric) keys (via for...in loop) and does NOT include enumerable symbol keys.\r\n * If you need to iterate all keys including symbol, use {@link forEachOwnKey} or {@link forEachOwnKeySafe} instead.\r\n *\r\n * Caution: this helper does not filter unsafe keys like `__proto__`, `constructor`, or `prototype`.\r\n * If your callback uses the returned key to assign directly to another object (for example\r\n * `target[key] = value`), validate keys first (for example with {@link isUnsafePropKey}) or\r\n * use {@link objForEachKeySafe} when iterating untrusted input.\r\n * @group Object\r\n * @typeParam T - The object type\r\n * @param theObject - The object to iterate over\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 * // Basic iteration - only string keys\r\n * const obj = { name: \"Alice\", age: 30 };\r\n * objForEachKey(obj, (key, value) => {\r\n * console.log(key, value); // name Alice, age 30\r\n * });\r\n * ```\r\n * @example\r\n * ```ts\r\n * // Unsafe keys warning - use objForEachKeySafe for untrusted input\r\n * // Note: use Object.defineProperty (not an object literal) so \"__proto__\" is\r\n * // created as a normal own enumerable property rather than being treated\r\n * // specially by the JS engine.\r\n * const untrustedObj: any = { name: \"Bob\" };\r\n * Object.defineProperty(untrustedObj, \"__proto__\", { value: \"attack\", enumerable: true, configurable: true, writable: true });\r\n * objForEachKey(untrustedObj, (key, value) => {\r\n * console.log(key, value); // name Bob, __proto__ attack (UNSAFE!)\r\n * });\r\n *\r\n * // Safe iteration with objForEachKeySafe\r\n * objForEachKeySafe(untrustedObj, (key, value) => {\r\n * console.log(key, value); // name Bob (unsafe keys filtered)\r\n * });\r\n * ```\r\n * @see {@link objForEachKeySafe} for safe iteration that filters unsafe keys\r\n * @see {@link forEachOwnKey} for iteration that includes both string and symbol keys\r\n * @see {@link forEachOwnKeySafe} for safe iteration with both string and symbol keys\r\n */\r\nexport function objForEachKey<T>(theObject: T, callbackfn: (key: string, value: T[keyof T]) => void | number, thisArg?: any): void {\r\n if (theObject && (isObject(theObject) || isFunction(theObject))) {\r\n for (const prop in theObject) {\r\n if (objHasOwn(theObject, prop)) {\r\n if (callbackfn[CALL](isStrictNullOrUndefined(thisArg) ? theObject : thisArg, prop, theObject[prop as keyof T]) === -1) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Calls the provided `callbackFn` function once for each key in an object, filtering out unsafe keys like `__proto__`, `constructor`, and `prototype`.\r\n * This is a safe wrapper around {@link objForEachKey} that validates keys before passing them to the callback.\r\n *\r\n * Like {@link objForEachKey}, this helper iterates only string keys (via for...in loop) and does NOT include enumerable symbol keys.\r\n * If you need to iterate both string and symbol keys, use {@link forEachOwnKeySafe} instead.\r\n * @group Object\r\n * @since 0.14.0\r\n * @typeParam T - The object type\r\n * @param theObject - The object to iterate over\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 * // Safe iteration - unsafe keys are skipped\r\n * const untrustedObj: any = { name: \"Alice\", constructor: {} };\r\n * Object.defineProperty(untrustedObj, \"__proto__\", { value: \"attack\", enumerable: true, configurable: true, writable: true });\r\n * objForEachKeySafe(untrustedObj, (key, value) => {\r\n * console.log(key, value); // Only prints: name Alice\r\n * });\r\n * ```\r\n * @example\r\n * ```ts\r\n * // Difference between objForEachKey variants:\r\n * const source = { name: \"Alice\", age: 30, [Symbol.for(\"id\")]: 123 };\r\n *\r\n * // objForEachKey - includes unsafe keys if present, no symbol keys\r\n * objForEachKey(source, (key, value) => {\r\n * console.log(key, value); // name Alice, age 30\r\n * });\r\n *\r\n * // objForEachKeySafe - filters unsafe keys, no symbol keys\r\n * objForEachKeySafe(source, (key, value) => {\r\n * console.log(key, value); // name Alice, age 30 (same as above since no unsafe keys)\r\n * });\r\n *\r\n * // forEachOwnKeySafe - filters unsafe keys, includes symbol keys\r\n * forEachOwnKeySafe(source, (key, value) => {\r\n * console.log(key, value); // name Alice, age 30, Symbol(id) 123\r\n * });\r\n * ```\r\n */\r\nexport function objForEachKeySafe<T>(theObject: T, callbackfn: (key: string, value: T[keyof T]) => void | number, thisArg?: any): void {\r\n objForEachKey(theObject, (key: string, value: T[keyof T]) => {\r\n if (!isUnsafePropKey(key)) {\r\n return callbackfn[CALL](isStrictNullOrUndefined(thisArg) ? theObject : thisArg, key, value);\r\n }\r\n }, thisArg);\r\n}\r\n","/*\r\n * @nevware21/ts-utils\r\n * https://github.com/nevware21/ts-utils\r\n *\r\n * Copyright (c) 2022-2025 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { GET_OWN_PROPERTY_DESCRIPTOR, GET_OWN_PROPERTY_SYMBOLS, ObjClass } from \"../internal/constants\";\r\nimport { isFunction, isStrictUndefined } from \"../helpers/base\";\r\nimport { objForEachKey } from \"./for_each_key\";\r\nimport { ILazyValue } from \"../helpers/lazy\";\r\nimport { _pureAssign, _pureRef } from \"../internal/treeshake_helpers\";\r\nimport { arrForEach } from \"../array/forEach\";\r\nimport { _objPropertyIsEnumerable } from \"./property_is_enumerable\";\r\nimport { _returnEmptyArray, _returnNothing } from \"../internal/stubs\";\r\n\r\nconst _objGetOwnPropertyDescriptor: (target: any, prop: PropertyKey) => PropertyDescriptor | undefined = (/*#__PURE__*/_pureAssign((/*#__PURE__*/_pureRef<typeof Object.getOwnPropertyDescriptor>(ObjClass as any, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));\r\nconst _objGetOwnPropertySymbols: (obj: any) => symbol[] = (/*#__PURE__*/_pureAssign((/*#__PURE__*/_pureRef<typeof Object.getOwnPropertySymbols>(ObjClass, GET_OWN_PROPERTY_SYMBOLS)), _returnEmptyArray));\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<V = any> {\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<V>;\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 - The value to set the property to.\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\n/*#__NO_SIDE_EFFECTS__*/\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: keyof ObjDefinePropDescriptor, value) => {\r\n prop[propMap[key]] = isStrictUndefined(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 * @function\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 * @returns The object that was passed to the function with the new or updated property.\r\n */\r\nexport const objDefineProp: <T>(target: T, key: PropertyKey, descriptor: PropertyDescriptor & ThisType<any>) => T = (/*#__PURE__*/_pureRef<typeof Object.defineProperty>(ObjClass as any, \"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 * @function\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: <T>(target: T, props: PropertyDescriptorMap & ThisType<any>) => T = (/*#__PURE__*/_pureRef<typeof Object.defineProperties>(ObjClass as any, \"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<T, V = any>(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<T, V = any>(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<T>(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<T>(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 arrForEach(_objGetOwnPropertySymbols(propDescMap), (sym) => {\r\n if (_objPropertyIsEnumerable(propDescMap, sym)) {\r\n props[sym] = _createProp(propDescMap[sym]);\r\n }\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 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { safe } from \"../helpers/safe\";\r\nimport { TimeoutOverrideFuncs } from \"../timer/timeout\";\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 tmOut?: TimeoutOverrideFuncs,\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function _getGlobalValue(): Window {\r\n var result: Window;\r\n\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function _getGlobalConfig(): TsUtilsGlobalConfig {\r\n if (!_globalCfg) {\r\n let gbl: any = safe(_getGlobalValue).v || {};\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-2025 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { __PROTO__, FUNCTION, ObjClass, OBJECT, PROTOTYPE } from \"../internal/constants\";\r\nimport { dumpObj } from \"../helpers/diagnostics\";\r\nimport { throwTypeError } from \"../helpers/throw\";\r\nimport { _pureAssign, _pureRef } from \"../internal/treeshake_helpers\";\r\nimport { objDefineProperties } from \"./define\";\r\nimport { safe } from \"../helpers/safe\";\r\nimport { isStrictNullOrUndefined } from \"../helpers/base\";\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 * @function\r\n * @group Object\r\n * @param obj - Object to use as a prototype. May be null\r\n * @param properties - JavaScript object that contains one or more property descriptors.\r\n */\r\nexport const objCreate: (obj: any, properties?: PropertyDescriptorMap & ThisType<any>) => any = (/* #__PURE__*/_pureAssign((/* #__PURE__*/_pureRef<typeof Object.create>(ObjClass as any, \"create\")), 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 * @param properties - JavaScript object that contains one or more property descriptors.\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function polyObjCreate(obj: any, properties?: PropertyDescriptorMap & ThisType<any>): any {\r\n let newObj: any = null;\r\n\r\n // Create a temporary constructor function to set the prototype\r\n function tempFunc() {}\r\n\r\n if (!isStrictNullOrUndefined(obj)) {\r\n let type = typeof obj;\r\n if (type !== OBJECT && type !== FUNCTION) {\r\n throwTypeError(\"Prototype must be an Object or function: \" + dumpObj(obj));\r\n }\r\n\r\n tempFunc[PROTOTYPE] = obj;\r\n safe(() => {\r\n (tempFunc as any)[__PROTO__] = obj;\r\n });\r\n newObj = new (tempFunc as any)();\r\n } else {\r\n // If obj is null or undefined, create an empty object\r\n newObj = {};\r\n }\r\n\r\n // Apply property descriptors if provided\r\n if (properties) {\r\n safe(objDefineProperties, [newObj, properties]);\r\n }\r\n \r\n return newObj;\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 Solutions LLC\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 utcNow()\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\n/*#__NO_SIDE_EFFECTS__*/\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 utcNow()\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\n/*#__NO_SIDE_EFFECTS__*/\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 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { fnApply } from \"../funcs/funcs\";\r\nimport { _GlobalTestHooks, _getGlobalConfig } from \"../internal/global\";\r\nimport { objDefineProp } from \"../object/define\";\r\nimport { ICachedValue } from \"./cache\";\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\nexport function _initTestHooks() {\r\n _globalLazyTestHooks = _getGlobalConfig();\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<T> extends ICachedValue<T> {\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 * @param argArray - Optional array of arguments to be passed to the callback function (since 0.12.3)\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 * // With arguments - the argument types are inferred from the callback\r\n * let cachedValueWithArgs = getLazy(\r\n * (id: number, name: string) => callSomeExpensiveFunction(id, name),\r\n * [123, \"test\"]\r\n * );\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function getLazy<T, F extends (...args: any[]) => T = (...args: any[]) => T>(cb: F | ((...args: Parameters<F>) => T), argArray?: Parameters<F>): ILazyValue<T> {\r\n let lazyValue = { } as ILazyValue<T>;\r\n !_globalLazyTestHooks && _initTestHooks();\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 = fnApply(cb, null, argArray);\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\r\n lazyValue.b = _globalLazyTestHooks.lzy;\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 !_globalLazyTestHooks && _initTestHooks();\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.11.7\r\n * @group Lazy\r\n * @param cb - The callback function to fetch the value to be lazily evaluated and cached\r\n * @param argArray - Optional array of arguments to be passed to the callback function (since 0.12.3)\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 * // With arguments - the argument types are inferred from the callback\r\n * let cachedValueWithArgs = getWritableLazy(\r\n * (id: number, name: string) => callSomeExpensiveFunction(id, name),\r\n * [123, \"test\"]\r\n * );\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<T, F extends (...args: any[]) => T = () => T>(cb: F | ((...args: Parameters<F>) => T), argArray?: Parameters<F>): ILazyValue<T> {\r\n let lazyValue = { } as ILazyValue<T>;\r\n !_globalLazyTestHooks && _initTestHooks();\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 = fnApply(cb, null, argArray);\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) 2024 NevWare21 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { fnApply } from \"../funcs/funcs\";\r\nimport { NULL_VALUE } from \"../internal/constants\";\r\nimport { objDefineProp } from \"../object/define\";\r\n\r\n/**\r\n * A generic interface for holding a cached value\r\n * @since 0.10.5\r\n * @group Helpers\r\n * @group Cache\r\n * @typeParam T - The type of the value to be cached\r\n * @example\r\n * ```ts\r\n * let cachedValue: ICachedValue<string> = {\r\n * v: \"some value\"\r\n * };\r\n * ```\r\n */\r\nexport interface ICachedValue<T> {\r\n /**\r\n * Returns the current cached value\r\n */\r\n v: T,\r\n\r\n /**\r\n * Returns the current cached value\r\n */\r\n toJSON(): T;\r\n}\r\n\r\n/**\r\n * Create and return a readonly {@link ICachedValue} instance that is populated with the provided value.\r\n * This is useful when you want to cache a previously fetched value and return it without having to re-fetch\r\n * it again.\r\n * This is a lightweight version of {@link getLazy} which does not support any expiration or invalidation,\r\n * it also will not honor the {@link setBypassLazyCache} setting and will always return the provided value.\r\n * @since 0.10.5\r\n * @group Helpers\r\n * @group Cache\r\n * @typeParam T - The type of the value to be cached\r\n * @param value - The value to cache\r\n * @returns A new {@link ICachedValue} instance which wraps the provided value\r\n * @example\r\n * ```ts\r\n * let cachedValue = createCachedValue(\"some value\");\r\n * // cachedValue.v === \"some value\"\r\n *\r\n * JSON.stringify(cachedValue) === '{\"v\":\"some value\"}';\r\n * ```\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function createCachedValue<T>(value: T): ICachedValue<T> {\r\n return objDefineProp({\r\n toJSON: () => value\r\n }, \"v\", { value }) as ICachedValue<T>;\r\n}\r\n\r\n/**\r\n * Create and return a readonly {@link ICachedValue} 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 * will not cause re-execution of the callback as the result from the first call is cached internally.\r\n * This is a lightweight version of {@link getLazy} which does not support any expiration or invalidation,\r\n * it also will not honor the {@link setBypassLazyCache} setting and will always return the provided value.\r\n * @remarks Since 0.12.3 this is now an alias for {@link getDeferred}, it is recommended to use that function\r\n * directly instead of this one.\r\n * @since 0.10.5\r\n * @group Helpers\r\n * @group Cache\r\n * @function\r\n * @typeParam T - The type of the value to be cached\r\n * @param cb - The callback function to fetch the value to be lazily evaluated and cached\r\n * @returns\r\n */\r\nexport const createDeferredCachedValue: <T>(cb: () => T) => ICachedValue<T> = getDeferred;\r\n\r\n/**\r\n * Create and return a readonly {@link ICachedValue} 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 * will not cause re-execution of the callback as the result from the first call is cached internally.\r\n * This version supports passing arguments to the callback function.\r\n * This is a lightweight version of {@link getLazy} which does not support any expiration or invalidation,\r\n * it also will not honor the {@link setBypassLazyCache} setting and will always return the provided value.\r\n * This is the same as {@link createDeferredCachedValue} but allows passing an array of arguments to the\r\n * callback function.\r\n * @since 0.12.3\r\n * @group Helpers\r\n * @group Cache\r\n * @typeParam R - The type of the value to be cached\r\n * @typeParam F - The type of the callback function, defaults to () => T if not specified\r\n * @param cb - The callback function to fetch the value to be lazily evaluated and cached\r\n * @param argArray - Optional array of arguments to be passed to the callback function\r\n * @returns A new readonly {@link ICachedValue} 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 = getDeferred(() => callSomeExpensiveFunction());\r\n * let theValue;\r\n *\r\n * // With arguments - the argument types are inferred from the callback\r\n * let cachedValueWithArgs = getDeferred(\r\n * (id: number, name: string) => callSomeExpensiveFunction(id, name),\r\n * [123, \"test\"]\r\n * );\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/*#__NO_SIDE_EFFECTS__*/\r\nexport function getDeferred<R, F extends (...args: any[]) => R = (...args: any[]) => R>(cb: F | ((...args: Parameters<F>) => R), argArray?: Parameters<F>): ICachedValue<R> {\r\n let theValue: any = {\r\n toJSON: () => theValue.v\r\n };\r\n\r\n return objDefineProp(theValue as ICachedValue<R>, \"v\", {\r\n get: () => {\r\n // Use apply to call the callback with the provided arguments\r\n let result: R = fnApply(cb, null, argArray);\r\n cb = NULL_VALUE;\r\n objDefineProp(theValue, \"v\", { value: result });\r\n return result;\r\n },\r\n configurable: true\r\n });\r\n}\r\n\r\n/**\r\n * Create and return a writable {@link ICachedValue} 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 * will not cause re-execution of the callback as the result from the first call is cached internally.\r\n * Unlike {@link getDeferred}, this version allows the cached value to be changed after it's been evaluated.\r\n * This is a lightweight version that does not support any expiration or invalidation.\r\n * @since 0.12.3\r\n * @group Helpers\r\n * @group Cache\r\n * @typeParam R - The type of the value to be cached\r\n * @typeParam F - The type of the callback function, defaults to (...args: any[]) => R if not specified\r\n * @param cb - The callback function to fetch the value to be lazily evaluated and cached\r\n * @param argArray - Optional array of arguments to be passed to the callback function\r\n * @returns A new writable {@link ICachedValue} 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 = getWritableDeferred(() => callSomeExpensiveFunction());\r\n * let theValue;\r\n *\r\n * // With arguments - the argument types are inferred from the callback\r\n * let cachedValueWithArgs = getWritableDeferred(\r\n * (id: number, name: string) => callSomeExpensiveFunction(id, name),\r\n * [123, \"test\"]\r\n * );\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 * // The cached value can be changed\r\n * cachedValue.v = \"new value\";\r\n * theValue = cachedValue.v; // \"new value\"\r\n * ```\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function getWritableDeferred<R, F extends (...args: any[]) => R = (...args: any[]) => R>(cb: F | ((...args: Parameters<F>) => R), argArray?: Parameters<F>): ICachedValue<R> {\r\n let theValue: any = {\r\n toJSON: () => theValue.v\r\n };\r\n\r\n let _setValue = (newValue: R) => {\r\n // Just replace the value\r\n objDefineProp(theValue, \"v\", {\r\n value: newValue,\r\n writable: true\r\n });\r\n };\r\n\r\n return objDefineProp(theValue as ICachedValue<R>, \"v\", {\r\n get: () => {\r\n let result = fnApply(cb, null, argArray);\r\n _setValue(result);\r\n cb = NULL_VALUE;\r\n \r\n return result;\r\n },\r\n set: _setValue,\r\n configurable: true\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 Solutions LLC\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 { ILazyValue, _globalLazyTestHooks, _initTestHooks, getLazy } from \"./lazy\";\r\nimport { ICachedValue, createCachedValue } from \"./cache\";\r\nimport { safe } from \"./safe\";\r\nimport { ScheduleMicrotaskFn } from \"./types\";\r\n\r\nconst WINDOW = \"window\";\r\n\r\ndeclare let WorkerGlobalScope: any;\r\ndeclare let self: any;\r\n\r\nlet _cachedGlobal: ICachedValue<Window>;\r\n\r\n/**\r\n * @internal\r\n * @ignore\r\n * Returns a function which will return the named global object if available, will return `null` if the object is not available.\r\n * @param getFn - The function to use to get the global object\r\n * @param instName - The name of the global object to get, may be any valid PropertyKey (string, number or symbol)\r\n * @returns A function which will return the named global object if available, the funcion will return `null` if the object is not available.\r\n */\r\nexport function _getGlobalInstFn<T>(getFn: (...args: unknown[]) => T, theArgs?: unknown[]): () => T | null | undefined {\r\n let cachedValue: ICachedValue<T>;\r\n return function() {\r\n !_globalLazyTestHooks && _initTestHooks();\r\n if (!cachedValue || _globalLazyTestHooks.lzy) {\r\n cachedValue = createCachedValue(safe(getFn, theArgs).v);\r\n }\r\n \r\n return cachedValue.v;\r\n }\r\n}\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, may be any valid PropertyKey (string, number or symbol)\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function lazySafeGetInst<T>(name: string | number | symbol) : ILazyValue<T> {\r\n return getLazy(() => safe(getInst<T>, [name]).v || UNDEF_VALUE);\r\n}\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 * - <null> (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 function getGlobal(useCached?: boolean): Window {\r\n !_globalLazyTestHooks && _initTestHooks();\r\n if (!_cachedGlobal || useCached === false || _globalLazyTestHooks.lzy) {\r\n _cachedGlobal = createCachedValue(safe(_getGlobalValue).v || NULL_VALUE);\r\n }\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, may be any valid property key (string, number or symbol)\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function getInst<T>(name: string | number | symbol, useCached?: boolean): T | null {\r\n let gbl: any;\r\n if (!_cachedGlobal || useCached === false) {\r\n gbl = getGlobal(useCached);\r\n } else {\r\n gbl = _cachedGlobal.v;\r\n }\r\n\r\n if (gbl && gbl[name]) {\r\n return gbl[name] as T;\r\n }\r\n\r\n // Test workaround, for environments where <global>.window (when global == window) doesn't return the base window\r\n if (name === WINDOW) {\r\n // tslint:disable-next-line: no-angle-bracket-type-assertion\r\n try {\r\n return window as T;\r\n } catch (e) {\r\n // Ignore\r\n }\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function hasDocument(): boolean {\r\n return !!getDocument();\r\n}\r\n\r\n/**\r\n * Return the global `document` instance.\r\n * @function\r\n * @group Environment\r\n * @returns\r\n */\r\nexport const getDocument = (/*#__PURE__*/_getGlobalInstFn<Document>(getInst, [\"document\"]));\r\n\r\n/**\r\n * Identify whether the runtime contains a `window` object\r\n * @group Environment\r\n * @returns\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function hasWindow(): boolean {\r\n return !!getWindow();\r\n}\r\n\r\n/**\r\n * Return the global `window` instance.\r\n * @function\r\n * @group Environment\r\n * @returns\r\n */\r\nexport const getWindow = (/*#__PURE__*/_getGlobalInstFn<Window>(getInst, [WINDOW]));\r\n\r\n/**\r\n * Identify whether the runtimne contains a `navigator` object\r\n * @group Environment\r\n * @returns\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function hasNavigator(): boolean {\r\n return !!getNavigator();\r\n}\r\n\r\n/**\r\n * Returns the global `navigator` instance\r\n * @function\r\n * @group Environment\r\n * @returns\r\n */\r\nexport const getNavigator = (/*#__PURE__*/_getGlobalInstFn<Navigator>(getInst, [\"navigator\"]));\r\n\r\n/**\r\n * Identifies whether the runtime contains a `history` object\r\n * @group Environment\r\n * @returns\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function hasHistory(): boolean {\r\n return !!getHistory();\r\n}\r\n\r\n/**\r\n * Returns the global `history` instance\r\n * @function\r\n * @group Environment\r\n * @returns\r\n */\r\nexport const getHistory = (/*#__PURE__*/_getGlobalInstFn<History>(getInst, [\"history\"]));\r\n\r\n/**\r\n * Simple method to determine if we are running in a node environment\r\n * @function\r\n * @group Environment\r\n * @returns True if you are\r\n */\r\nexport const isNode = (/*#__PURE__*/_getGlobalInstFn<boolean>(() => {\r\n return !!safe(() => {\r\n let processInst = getInst<any>(\"process\");\r\n return processInst && (processInst.versions || {}).node;\r\n }).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 * @function\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 = (/*#__PURE__*/_getGlobalInstFn<boolean>(() => {\r\n return !!safe(() => self && self instanceof WorkerGlobalScope).v;\r\n}));\r\n\r\n\r\n/**\r\n * Returns the global `queueMicrotask` function if available, or `null` when unavailable.\r\n *\r\n * @function\r\n * @since 0.15.0\r\n * @group Timer\r\n * @group Environment\r\n * @example\r\n * ```ts\r\n * const queueFn = getQueueMicrotask();\r\n * if (queueFn) {\r\n * queueFn(() => {\r\n * console.log(\"microtask\");\r\n * });\r\n * }\r\n * ```\r\n */\r\nexport const getQueueMicrotask = (/*#__PURE__*/_getGlobalInstFn<ScheduleMicrotaskFn>(getInst as any, [\"queueMicrotask\"]));\r\n\r\n/**\r\n * Identifies if the runtime supports the `queueMicrotask` API.\r\n *\r\n * @since 0.15.0\r\n * @group Timer\r\n * @group Environment\r\n * @returns True if the runtime supports `queueMicrotask` otherwise false.\r\n * @example\r\n * ```ts\r\n * if (hasQueueMicrotask()) {\r\n * console.log(\"Native queueMicrotask support is available\");\r\n * }\r\n * ```\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function hasQueueMicrotask(): boolean {\r\n return !!( /*#__PURE__*/getQueueMicrotask());\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 Solutions LLC\r\n * Licensed under the MIT license.\r\n */\r\n\r\nimport { ICachedValue, createCachedValue } from \"./cache\";\r\nimport { utcNow } from \"./date\";\r\nimport { getInst } from \"./environment\";\r\nimport { _globalLazyTestHooks, _initTestHooks } from \"./lazy\";\r\nimport { safe } from \"./safe\";\r\n\r\nlet _perf: ICachedValue<Performance>\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\n/*#__NO_SIDE_EFFECTS__*/\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function getPerformance(): Performance {\r\n !_globalLazyTestHooks && _initTestHooks();\r\n if (!_perf || _globalLazyTestHooks.lzy) {\r\n _perf = createCachedValue(safe(getInst<Performance>, [\"performance\"]).v);\r\n }\r\n \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\n/*#__NO_SIDE_EFFECTS__*/\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function elapsedTime(startTime: number): number {\r\n return perfNow() - startTime;\r\n}","// 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","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { getGlobal, objCreate, 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\n\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 * Name used to cache base prototype function sources on the class prototype to avoid\r\n * re-walking the prototype chain on every instance creation.\r\n * @ignore\r\n */\r\nconst DynBaseProtoFuncs = '_dynBaseFuncs';\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 * Prefix used for per-instance resolved function cache keys stored in the instFuncTable\r\n * @ignore\r\n */\r\nconst DynResolvedCachePrefix = '_dyn_r$';\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 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)) && funcName !== str__Proto && funcName !== Prototype);\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 let instFuncs = objCreate(null);\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 * Caches and returns a mapping of base prototype function names to their source prototype objects.\r\n * This avoids re-walking the prototype chain on every instance creation, reducing construction\r\n * cost from O(M*D) to O(M) for subsequent instances (M = methods, D = depth).\r\n * @param classProto The current class prototype to look up base functions for\r\n * @ignore\r\n */\r\nfunction _getBaseProtoFuncs(classProto: any): any {\r\n if (objHasOwnProperty(classProto, DynBaseProtoFuncs)) {\r\n return classProto[DynBaseProtoFuncs];\r\n }\r\n\r\n let baseFuncSources = objCreate(null);\r\n let baseProto = _getObjProto(classProto);\r\n let visited: any[] = [];\r\n\r\n // Walk the entire prototype chain once and record which proto owns each function\r\n while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {\r\n _forEachProp(baseProto, (name) => {\r\n if (!baseFuncSources[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {\r\n baseFuncSources[name] = baseProto;\r\n }\r\n });\r\n\r\n visited.push(baseProto);\r\n baseProto = _getObjProto(baseProto);\r\n }\r\n\r\n classProto[DynBaseProtoFuncs] = baseFuncSources;\r\n return baseFuncSources;\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 let baseFuncs = objCreate(null);\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 // Use cached prototype chain function sources to avoid O(M*D) walk per instance\r\n let baseFuncSources = _getBaseProtoFuncs(classProto);\r\n for (let name in baseFuncSources) {\r\n if (!baseFuncs[name]) {\r\n // Create an instance callback for passing the base function to the caller\r\n baseFuncs[name] = _instFuncProxy(thisTarget, baseFuncSources[name], name);\r\n }\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] || objCreate(null);\r\n instFunc = (instFuncTable[proto[DynClassName]] || objCreate(null))[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 // Only perform the prototype chain walk if canAddInst is still viable\r\n if (canAddInst) {\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 (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\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 // Pre-compute a cache key for storing the resolved instance function directly in the\r\n // instFuncTable (which is per-instance and NOT frozen even when the instance is).\r\n // This avoids repeated _getInstFunc lookups when the shortcut optimization cannot be applied.\r\n let cacheKey = DynResolvedCachePrefix + className + \".\" + funcName;\r\n\r\n let dynProtoProxy = function() {\r\n // Fast path: check the per-instance resolved cache to avoid _getInstFunc overhead on repeated calls\r\n let instFuncTable = this[DynInstFuncTable];\r\n let instFunc = instFuncTable ? instFuncTable[cacheKey] : undefined;\r\n if (!instFunc) {\r\n // Use the instance or prototype function\r\n instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);\r\n // Cache the resolved function for subsequent calls from this instance.\r\n // instFuncTable is created with objCreate(null) during construction and is not frozen\r\n // even when the instance itself is frozen (Object.freeze is shallow).\r\n if (instFuncTable) {\r\n instFuncTable[cacheKey] = instFunc;\r\n }\r\n }\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] || objCreate(null);\r\n if (!_isObjectOrArrayPrototype(instFuncTable)) {\r\n let instFuncs = instFuncTable[className] = (instFuncTable[className] || objCreate(null)); // 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 if (!_isObjectOrArrayPrototype(instFuncs)) {\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 // Invalidate any cached resolved function for this entry so stale\r\n // values are not returned after re-registration via dynamicProto\r\n delete instFuncTable[DynResolvedCachePrefix + className + \".\" + 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\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<DPType> = (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<DPType, DPCls>(theClass:DPCls, target:DPType, delegateFunc: DynamicProtoDelegate<DPType>, 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","// 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 ES5 which can result in a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_TO_LOWER_CASE = \"toLowerCase\"; // Count: 17\r\nexport var _DYN_LENGTH = \"length\"; // Count: 137\r\nexport var _DYN_WARN_TO_CONSOLE = \"warnToConsole\"; // Count: 5\r\nexport var _DYN_THROW_INTERNAL = \"throwInternal\"; // Count: 9\r\nexport var _DYN_WATCH = \"watch\"; // Count: 7\r\nexport var _DYN_APPLY = \"apply\"; // Count: 7\r\nexport var _DYN_PUSH = \"push\"; // Count: 68\r\nexport var _DYN_SPLICE = \"splice\"; // Count: 15\r\nexport var _DYN_LOGGER = \"logger\"; // Count: 22\r\nexport var _DYN_CANCEL = \"cancel\"; // Count: 9\r\nexport var _DYN_INITIALIZE = \"initialize\"; // Count: 8\r\nexport var _DYN_IDENTIFIER = \"identifier\"; // Count: 9\r\nexport var _DYN_REMOVE_NOTIFICATION_0 = \"removeNotificationListener\"; // Count: 4\r\nexport var _DYN_ADD_NOTIFICATION_LIS1 = \"addNotificationListener\"; // Count: 4\r\nexport var _DYN_STRINGIFY = \"stringify\"; // Count: 10\r\nexport var _DYN_TRACE_ID = \"traceId\"; // Count: 19\r\nexport var _DYN_SPAN_ID = \"spanId\"; // Count: 22\r\nexport var _DYN_TRACE_FLAGS = \"traceFlags\"; // Count: 19\r\nexport var _DYN_IS_INITIALIZED = \"isInitialized\"; // Count: 11\r\nexport var _DYN_TRACE_HDR_MODE = \"traceHdrMode\"; // Count: 3\r\nexport var _DYN_GET_NOTIFY_MGR = \"getNotifyMgr\"; // Count: 5\r\nexport var _DYN_GET_PLUGIN = \"getPlugin\"; // Count: 5\r\nexport var _DYN_TRACK = \"track\"; // Count: 6\r\nexport var _DYN_NAME = \"name\"; // Count: 18\r\nexport var _DYN_I_KEY = \"iKey\"; // Count: 8\r\nexport var _DYN_TIME = \"time\"; // Count: 6\r\nexport var _DYN_PROCESS_NEXT = \"processNext\"; // Count: 15\r\nexport var _DYN_GET_PROCESS_TEL_CONT2 = \"getProcessTelContext\"; // Count: 2\r\nexport var _DYN_POLL_INTERNAL_LOGS = \"pollInternalLogs\"; // Count: 4\r\nexport var _DYN_VALUE = \"value\"; // Count: 32\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: 7\r\nexport var _DYN_ON_COMPLETE = \"onComplete\"; // Count: 4\r\nexport var _DYN_REASON = \"reason\"; // Count: 5\r\nexport var _DYN_FLUSH = \"flush\"; // Count: 5\r\nexport var _DYN_GET_TRACE_CTX = \"getTraceCtx\"; // Count: 4\r\nexport var _DYN_SET_TRACE_CTX = \"setTraceCtx\"; // Count: 3\r\nexport var _DYN_GET_ACTIVE_SPAN = \"getActiveSpan\"; // Count: 3\r\nexport var _DYN_SET_ACTIVE_SPAN = \"setActiveSpan\"; // Count: 5\r\nexport var _DYN_SPAN_CONTEXT = \"spanContext\"; // Count: 6\r\nexport var _DYN_PARENT_SPAN_CONTEXT = \"parentSpanContext\"; // Count: 4\r\nexport var _DYN_PARENT_SPAN_ID = \"parentSpanId\"; // Count: 3\r\nexport var _DYN_LOGGING_LEVEL_CONSOL4 = \"loggingLevelConsole\"; // Count: 2\r\nexport var _DYN_JOIN = \"join\"; // Count: 8\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: 18\r\nexport var _DYN_ATTRIBUTE_COUNT_LIMI5 = \"attributeCountLimit\"; // Count: 3\r\nexport var _DYN_SUPPRESS_TRACING = \"suppressTracing\"; // Count: 5\r\nexport var _DYN_NOT_IMPLEMENTED = \"notImplemented\"; // Count: 3\r\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 9\r\nexport var _DYN__DO_TEARDOWN = \"_doTeardown\"; // Count: 5\r\nexport var _DYN_UPDATE = \"update\"; // Count: 5\r\nexport var _DYN_GET_NEXT = \"getNext\"; // Count: 10\r\nexport var _DYN_SET_NEXT_PLUGIN = \"setNextPlugin\"; // Count: 5\r\nexport var _DYN_SPLIT = \"split\"; // Count: 16\r\nexport var _DYN_IS_CHILD_EVT = \"isChildEvt\"; // Count: 3\r\nexport var _DYN_DATA = \"data\"; // Count: 17\r\nexport var _DYN_GET_CTX = \"getCtx\"; // Count: 6\r\nexport var _DYN_SET_CTX = \"setCtx\"; // Count: 10\r\nexport var _DYN_CONFIG = \"config\"; // Count: 9\r\nexport var _DYN_CALL = \"call\"; // Count: 6\r\nexport var _DYN_ITEMS_RECEIVED = \"itemsReceived\"; // Count: 3\r\nexport var _DYN_HEADERS = \"headers\"; // Count: 6\r\nexport var _DYN_URL_STRING = \"urlString\"; // Count: 5\r\nexport var _DYN_TIMEOUT = \"timeout\"; // Count: 6\r\nexport var _DYN_STATUS = \"status\"; // Count: 10\r\nexport var _DYN_REPLACE = \"replace\"; // Count: 12\r\nexport var _DYN_HOST = \"host\"; // Count: 11\r\nexport var _DYN_HAS_OWN_PROPERTY = \"hasOwnProperty\"; // Count: 3\r\nexport var _DYN_TOTAL_REQUEST = \"totalRequest\"; // Count: 4\r\nexport var _DYN_REQUEST_DURATION = \"requestDuration\"; // Count: 3\r\nexport var _DYN_FAILURE = \"failure\"; // Count: 4\r\nexport var _DYN_EXCEPTION = \"exception\"; // Count: 6\r\nexport var _DYN_THROTTLE = \"throttle\"; // Count: 4\r\nexport var _DYN_INDEX_OF = \"indexOf\"; // Count: 6\r\nexport var _DYN_TYPE = \"type\"; // Count: 18\r\nexport var _DYN_MATCH = \"match\"; // Count: 7\r\nexport var _DYN_SET_TRACE_FLAGS = \"setTraceFlags\"; // Count: 3\r\nexport var _DYN_PATHNAME = \"pathname\"; // Count: 6\r\nexport var _DYN_TRACE_STATE = \"traceState\"; // Count: 7\r\nexport var _DYN_COUNT = \"count\"; // Count: 6\r\nexport var _DYN_PRE_TRIGGER_DATE = \"preTriggerDate\"; // Count: 4\r\nexport var _DYN_GET_UTCDATE = \"getUTCDate\"; // Count: 3\r\nexport var _DYN_TIMINGS = \"timings\"; // Count: 4\r\nexport var _DYN_BASE_DATA = \"baseData\"; // Count: 5\r\nexport var _DYN_PROPERTIES = \"properties\"; // Count: 13\r\nexport var _DYN_USER_AGENT = \"userAgent\"; // Count: 4\r\nexport var _DYN_ATTRIBUTES = \"attributes\"; // Count: 6\r\nexport var _DYN_KIND = \"kind\"; // Count: 6\r\nexport var _DYN_START_TIME = \"startTime\"; // Count: 6\r\nexport var _DYN_DURATION = \"duration\"; // Count: 5\r\nexport var _DYN_TO_STRING = \"toString\"; // Count: 12\r\nexport var _DYN_PROCESS_TELEMETRY_ST6 = \"processTelemetryStart\"; // Count: 3\r\nexport var _DYN_HANDLE_FIELD = \"handleField\"; // Count: 3\r\nexport var _DYN_RM_SANITIZER = \"rmSanitizer\"; // Count: 3\r\nexport var _DYN_RM_FIELD_SANITIZER = \"rmFieldSanitizer\"; // Count: 3\r\nexport var _DYN_CAN_HANDLE = \"canHandle\"; // Count: 4\r\nexport var _DYN_HANDLER = \"handler\"; // Count: 5\r\nexport var _DYN_ERROR_HANDLERS = \"errorHandlers\"; // Count: 4\r\nexport var _DYN_EVT_NAME = \"evtName\"; // Count: 4\r\nexport var _DYN_CONCAT = \"concat\"; // Count: 5\r\nexport var _DYN_WARN = \"warn\"; // Count: 6\r\nexport var _DYN_INGESTIONENDPOINT = \"ingestionendpoint\"; // Count: 6\r\nexport var _DYN_CREATE_EVENT = \"createEvent\"; // Count: 4\r\nexport var _DYN_SUBSTRING = \"substring\"; // Count: 4\r\nexport var _DYN_GET_ALL_RESPONSE_HEA7 = \"getAllResponseHeaders\"; // Count: 2\r\nexport var _DYN_REMOVE_ITEM = \"removeItem\"; // Count: 3\r\nexport var _DYN_GET_ATTRIBUTE = \"getAttribute\"; // Count: 3\r\nexport var _DYN_CORRELATION_HEADER_E8 = \"correlationHeaderExcludePatterns\"; // Count: 2\r\nexport var _DYN_ENTRIES = \"entries\"; // Count: 5\r\nexport var _DYN_TRACE_CFG = \"traceCfg\"; // Count: 6\r\nexport var _DYN_MEASUREMENTS = \"measurements\"; // Count: 9\r\nexport var _DYN_SIZE_IN_BYTES = \"sizeInBytes\"; // Count: 4\r\nexport var _DYN_TYPE_NAME = \"typeName\"; // Count: 5\r\nexport var _DYN_EXCEPTIONS = \"exceptions\"; // Count: 5\r\nexport var _DYN_SEVERITY_LEVEL = \"severityLevel\"; // Count: 5\r\nexport var _DYN_PROBLEM_GROUP = \"problemGroup\"; // Count: 3\r\nexport var _DYN_PARSED_STACK = \"parsedStack\"; // Count: 6\r\nexport var _DYN_HAS_FULL_STACK = \"hasFullStack\"; // Count: 5\r\nexport var _DYN_ASSEMBLY = \"assembly\"; // Count: 4\r\nexport var _DYN_FILE_NAME = \"fileName\"; // Count: 9\r\nexport var _DYN_LINE = \"line\"; // Count: 6\r\nexport var _DYN_AI_DATA_CONTRACT = \"aiDataContract\"; // Count: 4\r\n//# sourceMappingURL=__DynamicConstants.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_OFFLINE_STORE = \"offlineEventsStored\";\r\nexport var STR_OFFLINE_SENT = \"offlineBatchSent\";\r\nexport var STR_OFFLINE_DROP = \"offlineBatchDrop\";\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\nexport var STR_REDACTED = \"REDACTED\";\r\nexport var DEFAULT_SENSITIVE_PARAMS = [\"sig\", \"Signature\", \"AWSAccessKeyId\", \"X-Goog-Signature\"];\r\nexport var STR_DEFAULT_ENDPOINT_URL = \"https://browser.events.data.microsoft.com/OneCollector/1.0/\";\r\nexport var STR_VERSION = \"version\";\r\nexport var STR_NOT_SPECIFIED = \"not_specified\";\r\n//# sourceMappingURL=InternalConstants.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { ObjAssign, ObjClass, ObjProto } from \"@microsoft/applicationinsights-shims\";\r\nimport { arrForEach, asString as asString21, createCachedValue, getKnownSymbol, isArray, isBoolean, isError, isFunction, isNullOrUndefined, isNumber, isObject, isPlainObject, isString, isUndefined, isUnsafePropKey, mathFloor, mathRound, newSymbol, objCreate, objDeepFreeze, objDefine, objForEachKey, objGetPrototypeOf, objHasOwn, objSetPrototypeOf, safe, strIndexOf, strSplit, strTrim } from \"@nevware21/ts-utils\";\r\nimport { _DYN_APPLY, _DYN_CONCAT, _DYN_GET_ALL_RESPONSE_HEA7, _DYN_IDENTIFIER, _DYN_LENGTH, _DYN_NAME, _DYN_REPLACE, _DYN_SPLIT, _DYN_STATUS, _DYN_SUBSTRING, _DYN_TO_LOWER_CASE } from \"../__DynamicConstants\";\r\nimport { STR_EMPTY } from \"../constants/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\nvar _ProtoNameTag;\r\nexport var _getObjProto = Object[strGetPrototypeOf];\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isNotUndefined(value) {\r\n return !isUndefined(value);\r\n}\r\n/*#__NO_SIDE_EFFECTS__*/\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\n/*#__NO_SIDE_EFFECTS__*/\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\n/*#__NO_SIDE_EFFECTS__*/\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function toISOString(date) {\r\n return date && date.toISOString() || STR_EMPTY;\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\n/*#__NO_SIDE_EFFECTS__*/\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\n/*#__NO_SIDE_EFFECTS__*/\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 * Set the type of the object by defining the toStringTag well known symbol, this will impact the\r\n * Object.prototype.toString.call() results for the object. And can be used to identify the type\r\n * in the debug output and also in the DevTools watchers window when inspecting the object etc.\r\n * @param target - The object to set the toStringTag symbol on\r\n * @param nameOrFunc - The name or function to use for the toStringTag\r\n * @returns The target object\r\n */\r\nexport function setObjStringTag(target, nameOrFunc) {\r\n safe(objDefine, [target, getKnownSymbol(11 /* WellKnownSymbols.toStringTag */), isFunction(nameOrFunc) ? { g: nameOrFunc, e: false } : { v: nameOrFunc, w: false, e: false }]);\r\n return target;\r\n}\r\n/**\r\n * Introduce an intermediate prototype to the target object and that sets the toStringTag on that prototype,\r\n * this avoids directly modifying the target object and also allows multiple different \"types\" to be\r\n * applied to the same target object if required.\r\n * This is done as a best effort approach and may not always succeed due to security / object model restrictions\r\n * So if it fails then it will fallback to just defining the toStringTag on the target object, which also may fail\r\n * resulting in no change.\r\n * @param target - The object to set the toStringTag symbol on\r\n * @param name - The name or function to use for the toStringTag\r\n * @returns The target object\r\n */\r\nexport function setProtoTypeName(target, name) {\r\n if (target) {\r\n var proto_1 = _getObjProto(target);\r\n var done_1 = false;\r\n if (proto_1) {\r\n // Set the target's prototype to the new intermediate prototype\r\n safe(function () {\r\n // Create a new intermediate prototype that extends the current prototype\r\n var newProto = setObjStringTag(objCreate(proto_1), name);\r\n if (!_ProtoNameTag) {\r\n // Note: Using a cached value instead of a lazy value as we want to ensure that the namespace is consistent\r\n // across multiple calls as the `getLazy()` supports runtime invalidation via `setBypassLazyCache()` which would\r\n // result in different namespaces being returned.\r\n _ProtoNameTag = createCachedValue(newSymbol(\"ai$ProtoName\"));\r\n }\r\n // Tag this new prototype\r\n objDefine(newProto, _ProtoNameTag.v, {\r\n v: true,\r\n w: false,\r\n e: false\r\n });\r\n objSetPrototypeOf(target, newProto);\r\n done_1 = true;\r\n });\r\n }\r\n if (!done_1) {\r\n // Either no prototype or we failed to set it so just define the toStringTag on the target\r\n safe(setObjStringTag, [target, name]);\r\n }\r\n }\r\n return target;\r\n}\r\n/**\r\n * Update the introduced intermediate prototype name of the target object.\r\n * @param target - The object to look for the prototype name and update\r\n * @param name - The updated name to apply\r\n * @returns The target Object\r\n */\r\nexport function updateProtoTypeName(target, name) {\r\n if (_ProtoNameTag) {\r\n // Find the Parent Proto\r\n while (target && target !== ObjProto && !target[_ProtoNameTag.v]) {\r\n var protoTarget = objGetPrototypeOf(target);\r\n if (target === protoTarget) {\r\n // Break out of any recursive case (happens on some runtimes) where the prototype of an\r\n // object is the same prototype\r\n break;\r\n }\r\n target = protoTarget;\r\n }\r\n if (target[_ProtoNameTag.v]) {\r\n // Found it so update\r\n safe(setObjStringTag, [target, name]);\r\n }\r\n }\r\n return target;\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\n/*#__NO_SIDE_EFFECTS__*/\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 // Prevent prototype pollution by skipping unsafe keys\r\n if (isUnsafePropKey(prop)) {\r\n continue;\r\n }\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/**\r\n * Checks if the feature is enabled on not. If the feature is not defined, it will return the default state if provided or undefined.\r\n * If the feature is defined, it will check the mode and return true if the mode is enable or false if the mode is disable.\r\n * @param feature - The feature name to check\r\n * @param cfg - The configuration object to check the feature state against\r\n * @param sdkDefaultState - Optional default state to return if the feature is not defined\r\n * @returns True if the feature is enabled, false if the feature is disabled, or undefined if the feature is not defined and no default state is provided.\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isFeatureEnabled(feature, cfg, sdkDefaultState) {\r\n var ft = cfg && cfg.featureOptIn && cfg.featureOptIn[feature];\r\n if (feature && ft) {\r\n var mode = ft.mode;\r\n // NOTE: None will be considered as true\r\n if (mode === 3 /* FeatureOptInMode.enable */) {\r\n return true;\r\n }\r\n else if (mode === 2 /* FeatureOptInMode.disable */) {\r\n return false;\r\n }\r\n }\r\n // Return the default state if provided or undefined\r\n return sdkDefaultState;\r\n}\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function 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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function formatErrorMessageXdr(xdr, message) {\r\n if (xdr) {\r\n return \"XDomainRequest,Response:\" + getResponseText(xdr) || STR_EMPTY;\r\n }\r\n return message;\r\n}\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function formatErrorMessageXhr(xhr, message) {\r\n if (xhr) {\r\n return \"XMLHttpRequest,Status:\" + xhr[_DYN_STATUS /* @min:%2estatus */] + \",Response:\" + getResponseText(xhr) || xhr.response || STR_EMPTY;\r\n }\r\n return message;\r\n}\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function prependTransports(theTransports, newTransports) {\r\n if (newTransports) {\r\n if (isNumber(newTransports)) {\r\n theTransports = [newTransports][_DYN_CONCAT /* @min:%2econcat */](theTransports);\r\n }\r\n else if (isArray(newTransports)) {\r\n theTransports = newTransports[_DYN_CONCAT /* @min:%2econcat */](theTransports);\r\n }\r\n }\r\n return theTransports;\r\n}\r\nvar strDisabledPropertyName = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\r\nvar strWithCredentials = \"withCredentials\";\r\nvar strTimeout = \"timeout\";\r\n/**\r\n * Create and open an XMLHttpRequest object\r\n * @param method - The request method\r\n * @param urlString - The url\r\n * @param withCredentials - Option flag indicating that credentials should be sent\r\n * @param disabled - Optional flag indicating that the XHR object should be marked as disabled and not tracked (default is false)\r\n * @param isSync - Optional flag indicating if the instance should be a synchronous request (defaults to false)\r\n * @param timeout - Optional value identifying the timeout value that should be assigned to the XHR request\r\n * @returns A new opened XHR request\r\n */\r\nexport function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {\r\n if (disabled === void 0) { disabled = false; }\r\n if (isSync === void 0) { isSync = false; }\r\n function _wrapSetXhrProp(xhr, prop, value) {\r\n try {\r\n xhr[prop] = value;\r\n }\r\n catch (e) {\r\n // - Wrapping as depending on the environment setting the property may fail (non-terminally)\r\n }\r\n }\r\n var xhr = new XMLHttpRequest();\r\n if (disabled) {\r\n // Tag the instance so it's not tracked (trackDependency)\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 _wrapSetXhrProp(xhr, strDisabledPropertyName, disabled);\r\n }\r\n if (withCredentials) {\r\n // Some libraries require that the withCredentials flag is set \"before\" open and\r\n // - Wrapping as IE 10 has started throwing when setting before open\r\n _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);\r\n }\r\n xhr.open(method, urlString, !isSync);\r\n if (withCredentials) {\r\n // withCredentials should be set AFTER open (https://xhr.spec.whatwg.org/#the-withcredentials-attribute)\r\n // And older firefox instances from 11+ will throw for sync events (current versions don't) which happens during unload processing\r\n _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);\r\n }\r\n // Only set the timeout for asynchronous requests as\r\n // \"Timeout shouldn't be used for synchronous XMLHttpRequests requests used in a document environment or it will throw an InvalidAccessError exception.\"\"\r\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout\r\n if (!isSync && timeout) {\r\n _wrapSetXhrProp(xhr, strTimeout, timeout);\r\n }\r\n return xhr;\r\n}\r\n/**\r\n* Converts the XHR getAllResponseHeaders to a map containing the header key and value.\r\n* @internal\r\n*/\r\n// tslint:disable-next-line: align\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function convertAllHeadersToMap(headersString) {\r\n var headers = {};\r\n if (isString(headersString)) {\r\n var headersArray = strTrim(headersString)[_DYN_SPLIT /* @min:%2esplit */](/[\\r\\n]+/);\r\n arrForEach(headersArray, function (headerEntry) {\r\n if (headerEntry) {\r\n var idx = strIndexOf(headerEntry, \": \");\r\n if (idx !== -1) {\r\n // The new spec has the headers returning all as lowercase -- but not all browsers do this yet\r\n var header = strTrim(headerEntry.substring(0, idx))[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n var value = strTrim(headerEntry[_DYN_SUBSTRING /* @min:%2esubstring */](idx + 1));\r\n headers[header] = value;\r\n }\r\n else {\r\n headers[strTrim(headerEntry)] = 1;\r\n }\r\n }\r\n });\r\n }\r\n return headers;\r\n}\r\n/**\r\n* append the XHR headers.\r\n* @internal\r\n*/\r\nexport function _appendHeader(theHeaders, xhr, name) {\r\n if (!theHeaders[name] && xhr && xhr.getResponseHeader) {\r\n var value = xhr.getResponseHeader(name);\r\n if (value) {\r\n theHeaders[name] = strTrim(value);\r\n }\r\n }\r\n return theHeaders;\r\n}\r\nvar STR_KILL_DURATION_HEADER = \"kill-duration\";\r\nvar STR_KILL_DURATION_SECONDS_HEADER = \"kill-duration-seconds\";\r\nvar STR_TIME_DELTA_HEADER = \"time-delta-millis\";\r\n/**\r\n* get the XHR getAllResponseHeaders.\r\n* @internal\r\n*/\r\nexport function _getAllResponseHeaders(xhr, isOneDs) {\r\n var theHeaders = {};\r\n if (!xhr[_DYN_GET_ALL_RESPONSE_HEA7 /* @min:%2egetAllResponseHeaders */]) {\r\n // Firefox 2-63 doesn't have getAllResponseHeaders function but it does have getResponseHeader\r\n // Only call these if getAllResponseHeaders doesn't exist, otherwise we can get invalid response errors\r\n // as collector is not currently returning the correct header to allow JS to access these headers\r\n if (!!isOneDs) {\r\n theHeaders = _appendHeader(theHeaders, xhr, STR_TIME_DELTA_HEADER);\r\n theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_HEADER);\r\n theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_SECONDS_HEADER);\r\n }\r\n }\r\n else {\r\n theHeaders = convertAllHeadersToMap(xhr[_DYN_GET_ALL_RESPONSE_HEA7 /* @min:%2egetAllResponseHeaders */]());\r\n }\r\n return theHeaders;\r\n}\r\n/*#__NO_SIDE_EFFECTS__*/\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\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function msToTimeSpan(totalms) {\r\n if (isTimeSpan(totalms)) {\r\n // Already in time span format\r\n return totalms;\r\n }\r\n if (isNaN(totalms) || totalms < 0) {\r\n totalms = 0;\r\n }\r\n totalms = mathRound(totalms);\r\n var ms = STR_EMPTY + totalms % 1000;\r\n var sec = STR_EMPTY + mathFloor(totalms / 1000) % 60;\r\n var min = STR_EMPTY + mathFloor(totalms / (1000 * 60)) % 60;\r\n var hour = STR_EMPTY + mathFloor(totalms / (1000 * 60 * 60)) % 24;\r\n var days = mathFloor(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 + \".\" : STR_EMPTY) + hour + \":\" + min + \":\" + sec + \".\" + ms;\r\n}\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function getExtensionByName(extensions, identifier) {\r\n var extension = null;\r\n arrForEach(extensions, function (value) {\r\n if (value[_DYN_IDENTIFIER /* @min:%2eidentifier */] === identifier) {\r\n extension = value;\r\n return -1;\r\n }\r\n });\r\n return extension;\r\n}\r\n/*#__NO_SIDE_EFFECTS__*/\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/**\r\n * A helper method to determine whether the provided value is in a ISO time span format (DD.HH:MM:SS.MMMMMM)\r\n * @param value - The value to check\r\n * @returns True if the value is in a time span format; false otherwise\r\n */\r\n/*#__NO_SIDE_EFFECTS__*/\r\nexport function isTimeSpan(value) {\r\n var result = false;\r\n if (isString(value)) {\r\n var parts = strSplit(value, \":\");\r\n if (parts[_DYN_LENGTH /* @min:%2elength */] === 3) {\r\n // Looks like a candidate, now validate each part\r\n var daysHours = strSplit(parts[0], \".\");\r\n if (daysHours[_DYN_LENGTH /* @min:%2elength */] === 2) {\r\n result = !isNaN(parseInt(daysHours[0] || \"0\")) && !isNaN(parseInt(daysHours[1] || \"0\"));\r\n }\r\n else {\r\n result = !isNaN(parseInt(daysHours[0] || \"0\"));\r\n }\r\n result = result && !isNaN(parseInt(parts[1] || \"0\"));\r\n var secondsParts = strSplit(parts[2], \".\");\r\n if (secondsParts[_DYN_LENGTH /* @min:%2elength */] === 2) {\r\n result = result && !isNaN(parseInt(secondsParts[0] || \"0\")) && !isNaN(parseInt(secondsParts[1] || \"0\"));\r\n }\r\n else {\r\n result = result && !isNaN(parseInt(secondsParts[0] || \"0\"));\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\n//# sourceMappingURL=HelperFuncs.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n/**\r\n * A simple function that does nothing and returns the current this (if any).\r\n * @returns\r\n */\r\nexport function _noopThis() {\r\n return this;\r\n}\r\n/**\r\n * A simple function that does nothing and returns undefined.\r\n */\r\nexport function _noopVoid() {\r\n}\r\n//# sourceMappingURL=noopHelpers.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_GET_CTX, _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 \"../constants/InternalConstants\";\r\nimport { _noopVoid } from \"../internal/noopHelpers\";\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.isAsync = 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.complete = 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.complete = _noopVoid;\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.complete();\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// @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 ES5 which can result in a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_MEASURE = \"measure\"; // Count: 4\r\n//# sourceMappingURL=__DynamicConstants.js.map","/**\r\n* PerfMarkMeasureManager.ts\r\n* @copyright Microsoft 2021\r\n*/\r\nimport { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { PerfManager, getPerformance, getSetValue } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_MEASURE } from \"./__DynamicConstants\";\r\n// Names used in the perf Event context\r\nvar strCtxMarkName = \"prf-mark\";\r\nvar strCtxMarkEndName = \"prf-mark-end\";\r\nvar strCtxMeasureName = \"prf-measure\";\r\nvar PerfMarkMeasureManager = /** @class */ (function (_super) {\r\n __extends(PerfMarkMeasureManager, _super);\r\n function PerfMarkMeasureManager(config, manager) {\r\n var _this = _super.call(this, manager) || this;\r\n var _config = config || {};\r\n var _uniqueId = 0;\r\n // Set any defaults that have not been defined\r\n getSetValue(_config, \"useMarks\", true);\r\n getSetValue(_config, \"markPrefix\", \"ai.prfmrk.\");\r\n getSetValue(_config, \"useEndMarks\", false);\r\n getSetValue(_config, \"markEndPrefix\", \"ai.prfmrk-end.\");\r\n getSetValue(_config, \"useMeasures\", true);\r\n getSetValue(_config, \"measurePrefix\", \"ai.prfmsr.\");\r\n dynamicProto(PerfMarkMeasureManager, _this, function (_self, _base) {\r\n var _perf = getPerformance();\r\n _self.create = function (src, payloadDetails, isAsync) {\r\n var perfEvent = _base.create(src, payloadDetails, isAsync);\r\n if (perfEvent) {\r\n var markName = _getMarkName(perfEvent);\r\n if (markName) {\r\n _perf.mark(markName);\r\n }\r\n }\r\n return perfEvent;\r\n };\r\n _self.fire = function (perfEvent) {\r\n if (perfEvent) {\r\n var mrkEndName = null;\r\n if (_config.useEndMarks === true) {\r\n mrkEndName = perfEvent.getCtx(strCtxMarkEndName);\r\n if (mrkEndName) {\r\n _perf.mark(mrkEndName);\r\n }\r\n }\r\n var measureName = perfEvent.getCtx(strCtxMeasureName);\r\n if (measureName) {\r\n var mrkName = perfEvent.getCtx(strCtxMarkName);\r\n if (mrkName) {\r\n if (mrkEndName) {\r\n _perf[_DYN_MEASURE /* @min:%2emeasure */](measureName, mrkName, mrkEndName);\r\n }\r\n else {\r\n _perf[_DYN_MEASURE /* @min:%2emeasure */](measureName, mrkName);\r\n }\r\n }\r\n else {\r\n if (mrkEndName) {\r\n _perf[_DYN_MEASURE /* @min:%2emeasure */](measureName, undefined, mrkEndName);\r\n }\r\n else {\r\n _perf[_DYN_MEASURE /* @min:%2emeasure */](measureName);\r\n }\r\n }\r\n }\r\n _base.fire(perfEvent);\r\n }\r\n };\r\n });\r\n function _getMarkName(perfEvent) {\r\n var mrkName = null;\r\n var postFix = \"\";\r\n if (_config.uniqueNames) {\r\n postFix = _uniqueId + \".\";\r\n _uniqueId++;\r\n }\r\n if (_config.useMarks) {\r\n var mappedName = _getMappedName(_config.markNameMap, perfEvent.name);\r\n if (mappedName) {\r\n mrkName = (_config.markPrefix || \"\") + postFix + mappedName;\r\n perfEvent.setCtx(strCtxMarkName, mrkName);\r\n if (_config.useEndMarks === true) {\r\n var mrkEndName = (_config.markEndPrefix || \"\") + postFix + mappedName;\r\n perfEvent.setCtx(strCtxMarkEndName, mrkEndName);\r\n }\r\n }\r\n }\r\n if (_config.useMeasures) {\r\n var measureName = null;\r\n var mappedName = _getMappedName(_config.measureNameMap || _config.markNameMap, perfEvent.name);\r\n if (mappedName) {\r\n measureName = (_config.measurePrefix || \"\") + postFix + mappedName;\r\n perfEvent.setCtx(strCtxMeasureName, measureName);\r\n }\r\n }\r\n return mrkName;\r\n }\r\n function _getMappedName(map, name) {\r\n var mappedName = name;\r\n if (map) {\r\n // A map exists\r\n mappedName = map[name];\r\n }\r\n return mappedName;\r\n }\r\n return _this;\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 PerfMarkMeasureManager.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 PerfMarkMeasureManager.prototype.fire = function (perfEvent) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return PerfMarkMeasureManager;\r\n}(PerfManager));\r\nexport { PerfMarkMeasureManager };\r\n//# sourceMappingURL=PerfMarkMeasureManager.js.map"],"names":["ObjClass","_objGetOwnPropertyDescriptor","__extends"],"mappings":";;;;;;;AAGO,IAAM,eAAe,GAAG,UAAU,CAAC;AAGnC,IAAM,gBAAgB,GAAG,WAAW,CAAC;AAGrC,IAAMA,UAAQ,GAAG,MAAM;;;ACS9B;AACM,SAAU,WAAW,CAAI,KAAQ,EAAE,KAAS,EAAA;AAC9C,IAAA,OAAO,KAAK,IAAI,KAAK,CAAA;AACzB,CAAA;AAYA;AACM,SAAU,QAAQ,CAAgC,KAAQ,EAAE,IAAa,EAAA;AAC3E,IAAA,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,GAAG,KAAK,CAAC,IAAI,CAAM,GAAG,SAAyB,CAAA;AAC/F,CAAA;ACvBO,IAAM,WAAW,GAAc,SAAS,CAAA;AACxC,IAAM,UAAU,GAAS,IAAI,CAAA;AAE7B,IAAM,KAAK,GAAG,EAAE,CAAA;AAChB,IAAM,QAAQ,GAAG,UAAU,CAAA;AAC3B,IAAM,MA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