{"version":3,"file":"psm.legacy.min.umd.js","sources":["../../../node_modules/core-js/internals/global.js","../../../node_modules/core-js/internals/fails.js","../../../node_modules/core-js/internals/descriptors.js","../../../node_modules/core-js/internals/object-property-is-enumerable.js","../../../node_modules/core-js/internals/create-property-descriptor.js","../../../node_modules/core-js/internals/classof-raw.js","../../../node_modules/core-js/internals/indexed-object.js","../../../node_modules/core-js/internals/require-object-coercible.js","../../../node_modules/core-js/internals/to-indexed-object.js","../../../node_modules/core-js/internals/is-object.js","../../../node_modules/core-js/internals/to-primitive.js","../../../node_modules/core-js/internals/has.js","../../../node_modules/core-js/internals/document-create-element.js","../../../node_modules/core-js/internals/ie8-dom-define.js","../../../node_modules/core-js/internals/object-get-own-property-descriptor.js","../../../node_modules/core-js/internals/an-object.js","../../../node_modules/core-js/internals/object-define-property.js","../../../node_modules/core-js/internals/create-non-enumerable-property.js","../../../node_modules/core-js/internals/set-global.js","../../../node_modules/core-js/internals/shared-store.js","../../../node_modules/core-js/internals/inspect-source.js","../../../node_modules/core-js/internals/internal-state.js","../../../node_modules/core-js/internals/native-weak-map.js","../../../node_modules/core-js/internals/shared.js","../../../node_modules/core-js/internals/uid.js","../../../node_modules/core-js/internals/shared-key.js","../../../node_modules/core-js/internals/hidden-keys.js","../../../node_modules/core-js/internals/redefine.js","../../../node_modules/core-js/internals/path.js","../../../node_modules/core-js/internals/get-built-in.js","../../../node_modules/core-js/internals/to-integer.js","../../../node_modules/core-js/internals/to-length.js","../../../node_modules/core-js/internals/to-absolute-index.js","../../../node_modules/core-js/internals/array-includes.js","../../../node_modules/core-js/internals/object-keys-internal.js","../../../node_modules/core-js/internals/enum-bug-keys.js","../../../node_modules/core-js/internals/object-get-own-property-names.js","../../../node_modules/core-js/internals/object-get-own-property-symbols.js","../../../node_modules/core-js/internals/own-keys.js","../../../node_modules/core-js/internals/copy-constructor-properties.js","../../../node_modules/core-js/internals/is-forced.js","../../../node_modules/core-js/internals/export.js","../../../node_modules/core-js/internals/native-promise-constructor.js","../../../node_modules/core-js/internals/native-symbol.js","../../../node_modules/core-js/internals/use-symbol-as-uid.js","../../../node_modules/core-js/internals/well-known-symbol.js","../../../node_modules/core-js/internals/set-to-string-tag.js","../../../node_modules/core-js/internals/set-species.js","../../../node_modules/core-js/internals/a-function.js","../../../node_modules/core-js/internals/iterators.js","../../../node_modules/core-js/internals/is-array-iterator-method.js","../../../node_modules/core-js/internals/function-bind-context.js","../../../node_modules/core-js/internals/to-string-tag-support.js","../../../node_modules/core-js/internals/classof.js","../../../node_modules/core-js/internals/get-iterator-method.js","../../../node_modules/core-js/internals/call-with-safe-iteration-closing.js","../../../node_modules/core-js/internals/iterate.js","../../../node_modules/core-js/internals/check-correctness-of-iteration.js","../../../node_modules/core-js/internals/task.js","../../../node_modules/core-js/internals/species-constructor.js","../../../node_modules/core-js/internals/html.js","../../../node_modules/core-js/internals/engine-user-agent.js","../../../node_modules/core-js/internals/engine-is-ios.js","../../../node_modules/core-js/internals/microtask.js","../../../node_modules/core-js/internals/engine-v8-version.js","../../../node_modules/core-js/internals/new-promise-capability.js","../../../node_modules/core-js/internals/promise-resolve.js","../../../node_modules/core-js/internals/perform.js","../../../node_modules/core-js/modules/es.promise.js","../../../node_modules/core-js/internals/host-report-errors.js","../../../node_modules/core-js/internals/an-instance.js","../../../node_modules/core-js/internals/redefine-all.js","../../utils/node_modules/uuid/dist/esm-browser/rng.js","../../utils/node_modules/uuid/dist/esm-browser/validate.js","../../utils/node_modules/uuid/dist/esm-browser/stringify.js","../../utils/node_modules/uuid/dist/esm-browser/v4.js","../../utils/dist/logger-78d4afc0.esm.js","../../utils/dist/cdp-utils-js.esm.js","../../../node_modules/core-js/internals/object-create.js","../../telemetry-core/dist/cdp-telemetry-core.esm.js","../../feature-flag-client/dist/base-3e89e47d.esm.js","../../../node_modules/core-js/internals/object-keys.js","../../../node_modules/core-js/internals/object-define-properties.js","../../../node_modules/core-js/internals/add-to-unscopables.js","../../../node_modules/core-js/internals/iterators-core.js","../../../node_modules/core-js/internals/to-object.js","../../../node_modules/core-js/internals/correct-prototype-getter.js","../../../node_modules/core-js/internals/object-get-prototype-of.js","../../../node_modules/core-js/internals/create-iterator-constructor.js","../../../node_modules/core-js/internals/object-set-prototype-of.js","../../../node_modules/core-js/internals/a-possible-prototype.js","../../../node_modules/core-js/internals/define-iterator.js","../../../node_modules/core-js/modules/es.array.iterator.js","../../feature-flag-client/dist/cdp-feature-flag-client.esm.js","../src/modules/helpers/domain-helper.js","../src/modules/helpers/constants.js","../src/modules/helpers/feature-flag-interface.js","../src/modules/helpers/location-helper.js","../src/modules/helpers/logger.js","../../../node_modules/core-js/modules/es.function.name.js","../src/modules/helpers/telemetry-helper.js","../../../node_modules/core-js/internals/object-assign.js","../src/modules/identity/index.js","../../../node_modules/core-js/modules/es.object.assign.js","../src/modules/privacy/get-consent.js","../src/modules/privacy/set-consent.js","../src/index.js","../src/modules/privacy/index.js","../src/modules/helpers/privacy-helper.js"],"sourcesContent":["var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.6.5',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","module.exports = {};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n // eslint-disable-next-line no-undef\n && !Symbol.sham\n // eslint-disable-next-line no-undef\n && typeof Symbol.iterator == 'symbol';\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name)) {\n if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];\n else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","module.exports = {};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var anObject = require('../internals/an-object');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n};\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {\n var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);\n var iterator, iterFn, index, length, result, next, step;\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = AS_ENTRIES\n ? boundFunction(anObject(step = iterable[index])[0], step[1])\n : boundFunction(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n\niterate.stop = function (result) {\n return new Result(true, result);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line no-throw-literal\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\n\nvar location = global.location;\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(id + '', location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (classof(process) == 'process') {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n typeof postMessage == 'function' &&\n !global.importScripts &&\n !fails(post) &&\n location.protocol !== 'file:'\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","var anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.github.io/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar classof = require('../internals/classof-raw');\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar IS_NODE = classof(process) == 'process';\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n } else if (MutationObserver && !IS_IOS) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","'use strict';\nvar aFunction = require('../internals/a-function');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\n\n// 25.4.1.5 NewPromiseCapability(C)\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar isObject = require('../internals/is-object');\nvar aFunction = require('../internals/a-function');\nvar anInstance = require('../internals/an-instance');\nvar classof = require('../internals/classof-raw');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar PromiseConstructor = NativePromise;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar $fetch = getBuiltIn('fetch');\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar IS_NODE = classof(process) == 'process';\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);\n if (!GLOBAL_CORE_JS_PROMISE) {\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (V8_VERSION === 66) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n if (!IS_NODE && typeof PromiseRejectionEvent != 'function') return true;\n }\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = PromiseConstructor.resolve(1);\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n return !(promise.then(function () { /* empty */ }) instanceof FakePromise);\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\n\nvar notify = function (promise, state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(promise, state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (handler = global['on' + name]) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (promise, state) {\n task.call(global, function () {\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (promise, state) {\n task.call(global, function () {\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, promise, state, unwrap) {\n return function (value) {\n fn(promise, state, value, unwrap);\n };\n};\n\nvar internalReject = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(promise, state, true);\n};\n\nvar internalResolve = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, promise, wrapper, state),\n bind(internalReject, promise, wrapper, state)\n );\n } catch (error) {\n internalReject(promise, wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(promise, state, false);\n }\n } catch (error) {\n internalReject(promise, { done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aFunction(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, this, state), bind(internalReject, this, state));\n } catch (error) {\n internalReject(this, state, error);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructor.prototype, {\n // `Promise.prototype.then` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(this, state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, promise, state);\n this.reject = bind(internalReject, promise, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && typeof NativePromise == 'function') {\n nativeThen = NativePromise.prototype.then;\n\n // wrap native Promise#then for native async functions\n redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // wrap fetch result\n if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {\n // eslint-disable-next-line no-unused-vars\n fetch: function fetch(input /* , init */) {\n return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));\n }\n });\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.github.io/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.github.io/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.github.io/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.github.io/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import { v4 } from 'uuid';\n\nfunction getCurrentTime() {\n return new Date().toISOString();\n}\n\n/**\n * helper function for http methods ie. GET, POST, etc.\n * @param request\n * @returns request\n */\nfunction makeRequest(request) {\n return new Promise((resolve, reject) => {\n try {\n const data = extractRequestPayload(request);\n const xhr = new XMLHttpRequest();\n xhr.open(request.method, request.url, true);\n xhr.setRequestHeader('Content-Type', 'application/json');\n\n if (request.headers && Object.keys(request.headers).length > 0) {\n for (const property in request.headers) {\n if (Object.prototype.hasOwnProperty.call(request.headers, property)) {\n xhr.setRequestHeader(property, request.headers[property]);\n }\n }\n }\n\n xhr.addEventListener('readystatechange', () => {\n if (xhr.readyState === 4) {\n const responseParam = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: xhr.getAllResponseHeaders(),\n data: ''\n };\n\n if (xhr.status >= 200 && xhr.status < 300) {\n try {\n responseParam.data = JSON.parse(xhr.response);\n return resolve(JSON.parse(JSON.stringify(responseParam)));\n } catch (e) {\n return resolve(xhr.response);\n }\n }\n }\n });\n xhr.addEventListener('error', () => {\n return reject({\n status: xhr.status,\n statusText: `An error occurred during the transaction`\n });\n });\n xhr.send(data);\n } catch (e) {\n return reject(new Error(e.message));\n }\n });\n}\n\nfunction extractRequestPayload(request) {\n if (typeof request.payload === 'string') {\n return request.payload;\n } else if (request.payload instanceof String) {\n return request.payload.valueOf();\n } else {\n return JSON.stringify(request.payload);\n }\n}\n\nfunction isEnvNode() {\n try {\n return typeof process !== 'undefined' && typeof process.versions.node !== 'undefined';\n } catch (error) {\n return false;\n }\n}\nfunction generateUUID() {\n return v4();\n}\n\n//@ts-nocheck\n\nfunction getGeoLocation() {\n return new Promise((resolve, reject) => {\n const request = {\n url: 'https://geo.ngtv.io/locate',\n method: 'GET'\n };\n makeRequest(request).then(response => resolve(response.data)).catch(error => {\n // TODO - need to revisit once logger will finalise\n // errorLogger(error);\n return reject(error);\n });\n });\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nclass Logger {\n constructor(url, metadata) {\n this.url = void 0;\n this.metadata = void 0;\n this.level = void 0;\n this.url = url;\n this.metadata = metadata;\n this.level = window.location.search.search(/[?&]psm_debug=[1t]/) !== -1 ? 'debug' : 'error';\n }\n\n transport(level, scope, caller, ...args) {\n const payload = {\n message: {\n version: this.metadata.version,\n level,\n appId: this.metadata.appId,\n wmukid: this.metadata.wmukid,\n eventId: generateUUID(),\n timestamp: new Date().toISOString(),\n brand: this.metadata.brand,\n domain: this.metadata.domain,\n userAgent: window.navigator.userAgent.toString(),\n platform: 'Web',\n scope,\n caller,\n data: args\n }\n };\n makeRequest({\n url: this.url,\n method: 'POST',\n payload: JSON.stringify(payload, null, 2),\n headers: {\n type: 'application/json'\n }\n });\n }\n\n debug(scope, caller, ...args) {\n if (this.level !== 'debug') {\n return;\n }\n\n console.info('[PSM]', scope, caller, ...args);\n this.transport('debug', scope, caller, ...args);\n }\n\n error(scope, caller, ...args) {\n if (this.level === 'debug') {\n console.error('[PSM]', scope, caller, ...args);\n }\n\n this.transport('error', scope, caller, ...args);\n }\n\n}\n\nexport { Logger as L, generateUUID as a, getCurrentTime as b, getGeoLocation as g, isEnvNode as i, makeRequest as m };\n","export { L as Logger, a as generateUUID, b as getCurrentTime, g as getGeoLocation, i as isEnvNode, m as makeRequest } from './logger-78d4afc0.esm.js';\nimport 'uuid';\n\nfunction getGlobalObject() {\n if (typeof self !== 'undefined') {\n return self;\n }\n\n if (typeof window !== 'undefined') {\n return window;\n }\n\n if (typeof global !== 'undefined') {\n return global;\n }\n\n throw new Error('cannot find the global object');\n}\n\nfunction getCookies() {\n const cookies = document.cookie;\n const output = {};\n cookies.split(/\\s*;\\s*/).forEach(pair => {\n const pairs = pair.split(/\\s*=\\s*/);\n output[pairs[0]] = pairs.splice(1).join('=');\n });\n return output;\n}\n\nfunction getCookiesArray() {\n const cookies = document.cookie;\n const output = [];\n cookies.split(/\\s*;\\s*/).forEach(pair => {\n const pairs = pair.split(/\\s*=\\s*/);\n const cookieObject = {};\n cookieObject['key'] = pairs[0];\n cookieObject['value'] = pairs[1];\n output.push(cookieObject);\n });\n return output;\n}\n\nfunction getOneCookie(cookieName) {\n let fullCookieName; // Check if cookieName is already encoded\n\n try {\n decodeURIComponent(cookieName); // already encoded\n\n fullCookieName = `${cookieName}=`;\n } catch (e) {\n // needs encoding\n fullCookieName = `${encodeURIComponent(cookieName)}=`;\n }\n\n const cookies = document.cookie.match(`(^|;)\\\\s*${fullCookieName}\\\\s*([^;]+)`); // decode cookie value on return\n //const cookie = cookies?.pop();\n\n const cookie = cookies && cookies.pop();\n\n if (cookie) {\n try {\n return JSON.parse(decodeURIComponent(cookie));\n } catch {\n return decodeURIComponent(cookie);\n }\n }\n\n return null; //return cookie ? JSON.parse(decodeURIComponent(cookie)) : null;\n}\n\nfunction setCookie(cookieName, cookieObject, cookieDomain) {\n let cookieString = '';\n\n if (!cookieName) {\n return null; //TODO: once we finalise the logger need to implement below mentioned method.\n //return errorLogger(`Cookie name ${cookieName} invalid`);\n }\n\n if (!cookieObject) {\n return null; //TODO: once we finalise the logger need to implement below mentioned method.\n // return errorLogger(\n // `Cookie object: ${JSON.stringify(cookieObject)} invalid.`\n // );\n }\n\n const expiration = new Date(Date.now() + 365 * 24 * 60 * 60 * 1000);\n\n if (typeof cookieObject === 'string') {\n cookieString = cookieObject;\n } else {\n cookieString = JSON.stringify(cookieObject);\n }\n\n if (!cookieDomain) {\n cookieDomain = getGlobalObject().location.hostname;\n } // cookie token & value need to be encoded before saving\n\n\n document.cookie = `${encodeURIComponent(cookieName)}=${encodeURIComponent(cookieString)};expires=${expiration.toUTCString()}; domain=${cookieDomain}; samesite=Lax; path=/`;\n return cookieObject;\n}\n\nfunction removeCookie(cookieName, cookieDomain) {\n if (!cookieDomain) {\n cookieDomain = getGlobalObject().location.hostname;\n }\n\n if (cookieName) {\n document.cookie = `${encodeURIComponent(cookieName)}=; domain=${cookieDomain}; samesite=Lax; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;\n }\n}\n\nexport { getCookies, getCookiesArray, getGlobalObject, getOneCookie, removeCookie, setCookie };\n","var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","import { generateUUID, getGeoLocation, makeRequest } from '@turnercode/cdp-utils-js';\n\nclass DefaultConfigService {\n constructor() {\n this._config = {\n dopplerUrl: '',\n baseEvent: () => ({}),\n isFeatureEnabled: () => Promise.resolve(true),\n version: '',\n isTelemetryEnabled: () => true\n };\n }\n\n config() {\n return this._config;\n }\n\n applyConfig(config) {\n // TODO: Perhaps make this a merge rather than a replace?\n this._config = config;\n }\n\n}\n\nclass DefaultDopplerService {\n constructor(configService, featureFlagService) {\n this.configService = void 0;\n this.featureFlagService = void 0;\n this.sourceIp = void 0;\n this.configService = configService;\n this.featureFlagService = featureFlagService;\n }\n\n async sendEvent(eventName, payload) {\n if (!this.featureFlagService.telemetryEnabled()) {\n return {\n message: `Event ${eventName} not sent because the Telemetry Feature Flag is disabled.`\n };\n }\n\n const message = [{ ...this.configService.config().baseEvent(),\n eventId: generateUUID(),\n eventType: 'telemetry',\n eventName,\n companyName: 'WarnerMedia',\n productName: this.brand(),\n applicationName: this.brand(),\n device: {\n type: navigator.platform,\n name: null,\n model: null,\n osName: null,\n osVersion: null\n },\n userProperties: {\n wmhhid: null,\n wminid: null\n },\n context: {\n appLocation: this.location(),\n sourceIp: await this.ipAddress(),\n userAgent: navigator.userAgent.toString()\n },\n library: {\n name: 'Psm',\n version: this.configService.config().version\n },\n eventProperties: payload\n }];\n const dopplerBaseUrl = this.configService.config().dopplerUrl;\n\n if (!dopplerBaseUrl) {\n return Promise.reject('Misconfigured build. DOPPLER_URL not provided');\n }\n\n if (await this.featureFlagService.eventEnabled(eventName)) {\n return this.doSend(dopplerBaseUrl, message).then(r => {\n return r;\n });\n } else {\n return {\n message: `Event ${eventName} not sent because it is not enabled by Feature Flags`\n };\n }\n } // If this is useful outside of telemetry, we can move it to cdp-utilities\n\n\n location() {\n // TODO: Implement safeguards for isomorphic support\n return window && window.location && window.location.href;\n }\n\n brand() {\n const baseEvent = this.configService.config().baseEvent();\n return baseEvent.brand || null;\n }\n\n async ipAddress() {\n if (this.sourceIp) {\n return Promise.resolve(this.sourceIp);\n }\n\n const location = await getGeoLocation();\n\n if (location) {\n this.sourceIp = location['ip_address'];\n } else {\n this.sourceIp = 'Unknown';\n }\n\n return Promise.resolve(this.sourceIp);\n } // Extracted to simplify testing\n\n\n async doSend(url, message) {\n try {\n const request = {\n url,\n method: 'POST',\n payload: JSON.stringify(message)\n };\n return makeRequest(request);\n } catch (error) {\n return Promise.reject(error);\n }\n }\n\n}\n\nclass WrappedFeatureFlagService {\n constructor(configService) {\n this.TELEMETRY_EVENT_PREFIX = 'telemetry.events.';\n this.config = void 0;\n this.config = configService && configService.config();\n }\n\n async eventEnabled(eventName, unknownFlagsEnabled = true) {\n return this.featureEnabled(`${this.TELEMETRY_EVENT_PREFIX}${eventName}`, unknownFlagsEnabled);\n }\n\n async featureEnabled(featureName, unknownFlagsEnabled = true) {\n return this.config.isFeatureEnabled(featureName, unknownFlagsEnabled).then(enabled => {\n return enabled;\n }).catch(() => {\n return unknownFlagsEnabled;\n });\n }\n\n telemetryEnabled() {\n return this.config.isTelemetryEnabled();\n }\n\n heartbeatFrequency() {\n return 5;\n }\n\n heartbeatInactivityTimeout() {\n return 60;\n }\n\n}\n\nconst configService = new DefaultConfigService();\nconst featureFlagService = new WrappedFeatureFlagService(configService);\nconst dopplerService = new DefaultDopplerService(configService, featureFlagService);\nconst container = {\n configService,\n featureFlagService,\n dopplerService\n};\n\nclass TelemetryBase {\n constructor(dopplerService, featureFlagService) {\n this.dopplerService = void 0;\n this._featureFlagService = void 0;\n this.observers = [];\n this.dopplerService = dopplerService;\n this._featureFlagService = featureFlagService;\n this.sendAppLoad();\n }\n\n addObserver(observer) {\n this.observers.push(observer);\n }\n\n featureFlagService() {\n return this._featureFlagService;\n }\n\n notifyObservers(payload) {\n this.observers.map(observer => observer.notified(payload));\n }\n\n sendAppLoad() {\n return this.sendEvent('appLoad', {});\n }\n\n async sendEvent(eventName, payload) {\n if (!this._featureFlagService.telemetryEnabled()) {\n return {\n message: `Event ${eventName} not sent because the Telemetry Feature Flag is disabled.`\n };\n }\n\n return this.dopplerService.sendEvent(eventName, payload).then(r => {\n this.notifyObservers(r);\n return r;\n });\n }\n\n}\n\nfunction initTelemetry(config) {\n container.configService.applyConfig(config);\n const telemetry = new TelemetryBase(container.dopplerService, container.featureFlagService);\n return telemetry;\n}\n\nclass CallbackObserver {\n constructor(callback) {\n this.callback = void 0;\n this.callback = callback;\n }\n\n notified(message) {\n this.callback(message);\n }\n\n}\n\nexport { CallbackObserver, initTelemetry };\n","const APP_USER_ID = 'wmAppUserId';\nconst FEATURE_FLAG_CONFIG = 'wmFeatureFlagConfig';\nconst FEATURE_FLAG_USER_ID = 'wmFeatureFlagUserId';\nconst FEATURE_FLAG_CONFIG_ETAG = 'wmFeatureFlagConfigEtag';\nconst FEATURE_FLAG_RESULTS = 'wmFeatureFlagResults';\nconst CONFIG_CACHE_START = 'wmConfigCacheStart';\nconst CACHE_USED = 'Cache was used due to remote loading failing.';\nconst FALLBACK_USED_REMOTE_LOAD_FAILED = 'Fallback used because remote config loading failed.';\nconst FALLBACK_OR_CACHE_USED_REMOTE_LOAD_FAILED = 'Fallback or cache used because remote config loading failed.';\nconst FALLBACK_USED_FLAG_NOT_IN_REMOTE = 'Fallback used because a requested flag was present in it and not the remote.';\nconst REMOTE_CONFIG_USED_NO_FALLBACK_PRESENT = 'Remote config used because a fallback config is not present.';\nconst FAILED_TO_READ_CONFIG_FROM_STORAGE = 'There was a problem reading the config object from storage, possibly due to invalid config JSON.';\nconst UNABLE_TO_ACCESS_LOCAL_STORAGE = 'Unable to access localStorage';\nconst UNABLE_TO_ACCESS_SESSION_STORAGE = 'Unable to access sessionStorage';\nconst MULTIPLE_INSTANCES_SUPPORT = 'A clientId must be provided for multiple instance support.';\n\n/**\n * @module wm-feature-flag-client\n */\nclass FeatureFlagStorage {\n constructor(storageType, clientId) {\n this.storageType = void 0;\n this.clientId = void 0;\n this.storage = void 0;\n this.warnings = void 0;\n this.storageType = storageType;\n this.clientId = clientId;\n this.warnings = [];\n\n if (!this.clientId) {\n const warning = {\n code: 'MULTIPLE_INSTANCES_SUPPORT',\n message: `${MULTIPLE_INSTANCES_SUPPORT}`\n };\n this.warnings.push(warning);\n }\n\n switch (this.storageType) {\n case 'localStorage':\n try {\n this.storage = localStorage;\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_LOCAL_STORAGE',\n message: `${UNABLE_TO_ACCESS_LOCAL_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n break;\n\n case 'sessionStorage':\n try {\n this.storage = sessionStorage;\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_SESSION_STORAGE',\n message: `${UNABLE_TO_ACCESS_SESSION_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n break;\n\n case 'inMemory': // todo: implement an in-memory storage option for non-browser env\n\n default:\n try {\n this.storage = localStorage;\n break;\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_LOCAL_STORAGE',\n message: `${UNABLE_TO_ACCESS_LOCAL_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n }\n }\n\n get(key) {\n let storeItem;\n if (typeof Storage === 'undefined') return;\n let storageKey = key;\n if (this.clientId) storageKey = `${storageKey}-${this.clientId}`;\n\n try {\n storeItem = this.storage.getItem(storageKey);\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_LOCAL_STORAGE',\n message: `${UNABLE_TO_ACCESS_LOCAL_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n return storeItem;\n }\n\n set(key, value) {\n if (typeof Storage === 'undefined') return;\n let storageKey = key;\n if (this.clientId) storageKey = `${storageKey}-${this.clientId}`;\n\n try {\n this.storage.setItem(storageKey, value);\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_LOCAL_STORAGE',\n message: `${UNABLE_TO_ACCESS_LOCAL_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n return;\n }\n\n delete(key) {\n if (typeof Storage === 'undefined') return;\n let storageKey = key;\n if (this.clientId) storageKey = `${storageKey}-${this.clientId}`;\n\n try {\n this.storage.deleteItem(storageKey);\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_LOCAL_STORAGE',\n message: `${UNABLE_TO_ACCESS_LOCAL_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n return;\n }\n\n}\n\nvar config = {\n\tffLibraryVersionCode: 1,\n\tffLibraryVersionName: \"1.0.2-beta\",\n\tffLibraryLanguage: \"Javascript\",\n\tminimumPollFrequencySeconds: 60\n};\n\nexport { APP_USER_ID as A, CONFIG_CACHE_START as C, FeatureFlagStorage as F, REMOTE_CONFIG_USED_NO_FALLBACK_PRESENT as R, FEATURE_FLAG_CONFIG as a, FEATURE_FLAG_CONFIG_ETAG as b, config as c, FEATURE_FLAG_USER_ID as d, CACHE_USED as e, FALLBACK_OR_CACHE_USED_REMOTE_LOAD_FAILED as f, FALLBACK_USED_REMOTE_LOAD_FAILED as g, FEATURE_FLAG_RESULTS as h, FALLBACK_USED_FLAG_NOT_IN_REMOTE as i, FAILED_TO_READ_CONFIG_FROM_STORAGE as j };\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {\n createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","var anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.github.io/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","import { c as config, F as FeatureFlagStorage, a as FEATURE_FLAG_CONFIG, b as FEATURE_FLAG_CONFIG_ETAG, R as REMOTE_CONFIG_USED_NO_FALLBACK_PRESENT, A as APP_USER_ID, d as FEATURE_FLAG_USER_ID, C as CONFIG_CACHE_START, e as CACHE_USED, f as FALLBACK_OR_CACHE_USED_REMOTE_LOAD_FAILED, g as FALLBACK_USED_REMOTE_LOAD_FAILED, h as FEATURE_FLAG_RESULTS, i as FALLBACK_USED_FLAG_NOT_IN_REMOTE, j as FAILED_TO_READ_CONFIG_FROM_STORAGE } from './base-3e89e47d.esm.js';\nimport 'core-js/modules/es.array.iterator';\nimport { generateUUID, makeRequest } from '@turnercode/cdp-utils-js';\n\nconst setPolyfills = () => {\n /* Object.entries polyfill */\n if (!Object.entries) {\n Object.entries = function (obj) {\n const ownProps = Object.keys(obj);\n let i = ownProps.length;\n const resArray = new Array(i); // preallocate the Array\n\n while (i--) resArray[i] = [ownProps[i], obj[ownProps[i]]];\n\n return resArray;\n };\n }\n /* Array.prototype.find polyfill */\n\n\n if (!Array.prototype.find) {\n Object.defineProperty(Array.prototype, 'find', {\n value: function (predicate) {\n // 1. Let O be ? ToObject(this value).\n if (this == null) {\n throw TypeError('\"this\" is null or not defined');\n }\n\n const o = Object(this); // 2. Let len be ? ToLength(? Get(O, \"length\")).\n\n const len = o.length >>> 0; // 3. If IsCallable(predicate) is false, throw a TypeError exception.\n\n if (typeof predicate !== 'function') {\n throw TypeError('predicate must be a function');\n } // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.\n // eslint-disable-next-line prefer-rest-params\n\n\n const thisArg = arguments[1]; // 5. Let k be 0.\n\n let k = 0; // 6. Repeat, while k < len\n\n while (k < len) {\n // a. Let Pk be ! ToString(k).\n // b. Let kValue be ? Get(O, Pk).\n // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).\n // d. If testResult is true, return kValue.\n const kValue = o[k];\n\n if (predicate.call(thisArg, kValue, k, o)) {\n return kValue;\n } // e. Increase k by 1.\n\n\n k++;\n } // 7. Return undefined.\n\n\n return undefined;\n },\n configurable: true,\n writable: true\n });\n }\n};\n\nconst ERROR = 'input is invalid type';\nconst HEX_CHARS = '0123456789abcdef'.split('');\nconst EXTRA = [-2147483648, 8388608, 32768, 128];\nconst SHIFT = [24, 16, 8, 0];\nconst K = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2];\nclass Sha256 {\n constructor() {\n this.blocks = [];\n this.h0 = void 0;\n this.h1 = void 0;\n this.h2 = void 0;\n this.h3 = void 0;\n this.h4 = void 0;\n this.h5 = void 0;\n this.h6 = void 0;\n this.h7 = void 0;\n this.block = void 0;\n this.start = void 0;\n this.bytes = void 0;\n this.hBytes = void 0;\n this.finalized = void 0;\n this.hashed = void 0;\n this.first = void 0;\n this.lastByteIndex = void 0;\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; // 256\n\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n }\n\n create() {\n return this;\n }\n\n update(message) {\n if (this.finalized) {\n return;\n }\n\n let notString;\n const type = typeof message;\n\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(ERROR);\n } else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n\n notString = true;\n }\n\n let code,\n index = 0,\n i;\n const length = message.length,\n blocks = this.blocks;\n\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | code >> 6) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | code >> 12) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + ((code & 0x3ff) << 10 | message.charCodeAt(++index) & 0x3ff);\n blocks[i >> 2] |= (0xf0 | code >> 18) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code >> 12 & 0x3f) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n\n return this;\n }\n\n finalize() {\n if (this.finalized) {\n return;\n }\n\n this.finalized = true;\n const blocks = this.blocks,\n i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n blocks[14] = this.hBytes << 3 | this.bytes >>> 29;\n blocks[15] = this.bytes << 3;\n this.hash();\n }\n\n hash() {\n let a = this.h0,\n b = this.h1,\n c = this.h2,\n d = this.h3,\n e = this.h4,\n f = this.h5,\n g = this.h6,\n h = this.h7,\n j,\n s0,\n s1,\n maj,\n t1,\n t2,\n ch,\n ab,\n da,\n cd,\n bc;\n const blocks = this.blocks;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = (t1 >>> 7 | t1 << 25) ^ (t1 >>> 18 | t1 << 14) ^ t1 >>> 3;\n t1 = blocks[j - 2];\n s1 = (t1 >>> 17 | t1 << 15) ^ (t1 >>> 19 | t1 << 13) ^ t1 >>> 10;\n blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;\n }\n\n bc = b & c;\n\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = t1 - 1521486534 << 0;\n d = t1 + 143694565 << 0;\n this.first = false;\n } else {\n s0 = (a >>> 2 | a << 30) ^ (a >>> 13 | a << 19) ^ (a >>> 22 | a << 10);\n s1 = (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7);\n ab = a & b;\n maj = ab ^ a & c ^ bc;\n ch = e & f ^ ~e & g;\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = d + t1 << 0;\n d = t1 + t2 << 0;\n }\n\n s0 = (d >>> 2 | d << 30) ^ (d >>> 13 | d << 19) ^ (d >>> 22 | d << 10);\n s1 = (h >>> 6 | h << 26) ^ (h >>> 11 | h << 21) ^ (h >>> 25 | h << 7);\n da = d & a;\n maj = da ^ d & b ^ ab;\n ch = h & e ^ ~h & f;\n t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = c + t1 << 0;\n c = t1 + t2 << 0;\n s0 = (c >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10);\n s1 = (g >>> 6 | g << 26) ^ (g >>> 11 | g << 21) ^ (g >>> 25 | g << 7);\n cd = c & d;\n maj = cd ^ c & a ^ da;\n ch = g & h ^ ~g & e;\n t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = b + t1 << 0;\n b = t1 + t2 << 0;\n s0 = (b >>> 2 | b << 30) ^ (b >>> 13 | b << 19) ^ (b >>> 22 | b << 10);\n s1 = (f >>> 6 | f << 26) ^ (f >>> 11 | f << 21) ^ (f >>> 25 | f << 7);\n bc = b & c;\n maj = bc ^ b & d ^ cd;\n ch = f & g ^ ~f & h;\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = a + t1 << 0;\n a = t1 + t2 << 0;\n }\n\n this.h0 = this.h0 + a << 0;\n this.h1 = this.h1 + b << 0;\n this.h2 = this.h2 + c << 0;\n this.h3 = this.h3 + d << 0;\n this.h4 = this.h4 + e << 0;\n this.h5 = this.h5 + f << 0;\n this.h6 = this.h6 + g << 0;\n this.h7 = this.h7 + h << 0;\n }\n\n hex() {\n this.finalize();\n const h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n let hex = HEX_CHARS[h0 >> 28 & 0x0f] + HEX_CHARS[h0 >> 24 & 0x0f] + HEX_CHARS[h0 >> 20 & 0x0f] + HEX_CHARS[h0 >> 16 & 0x0f] + HEX_CHARS[h0 >> 12 & 0x0f] + HEX_CHARS[h0 >> 8 & 0x0f] + HEX_CHARS[h0 >> 4 & 0x0f] + HEX_CHARS[h0 & 0x0f] + HEX_CHARS[h1 >> 28 & 0x0f] + HEX_CHARS[h1 >> 24 & 0x0f] + HEX_CHARS[h1 >> 20 & 0x0f] + HEX_CHARS[h1 >> 16 & 0x0f] + HEX_CHARS[h1 >> 12 & 0x0f] + HEX_CHARS[h1 >> 8 & 0x0f] + HEX_CHARS[h1 >> 4 & 0x0f] + HEX_CHARS[h1 & 0x0f] + HEX_CHARS[h2 >> 28 & 0x0f] + HEX_CHARS[h2 >> 24 & 0x0f] + HEX_CHARS[h2 >> 20 & 0x0f] + HEX_CHARS[h2 >> 16 & 0x0f] + HEX_CHARS[h2 >> 12 & 0x0f] + HEX_CHARS[h2 >> 8 & 0x0f] + HEX_CHARS[h2 >> 4 & 0x0f] + HEX_CHARS[h2 & 0x0f] + HEX_CHARS[h3 >> 28 & 0x0f] + HEX_CHARS[h3 >> 24 & 0x0f] + HEX_CHARS[h3 >> 20 & 0x0f] + HEX_CHARS[h3 >> 16 & 0x0f] + HEX_CHARS[h3 >> 12 & 0x0f] + HEX_CHARS[h3 >> 8 & 0x0f] + HEX_CHARS[h3 >> 4 & 0x0f] + HEX_CHARS[h3 & 0x0f] + HEX_CHARS[h4 >> 28 & 0x0f] + HEX_CHARS[h4 >> 24 & 0x0f] + HEX_CHARS[h4 >> 20 & 0x0f] + HEX_CHARS[h4 >> 16 & 0x0f] + HEX_CHARS[h4 >> 12 & 0x0f] + HEX_CHARS[h4 >> 8 & 0x0f] + HEX_CHARS[h4 >> 4 & 0x0f] + HEX_CHARS[h4 & 0x0f] + HEX_CHARS[h5 >> 28 & 0x0f] + HEX_CHARS[h5 >> 24 & 0x0f] + HEX_CHARS[h5 >> 20 & 0x0f] + HEX_CHARS[h5 >> 16 & 0x0f] + HEX_CHARS[h5 >> 12 & 0x0f] + HEX_CHARS[h5 >> 8 & 0x0f] + HEX_CHARS[h5 >> 4 & 0x0f] + HEX_CHARS[h5 & 0x0f] + HEX_CHARS[h6 >> 28 & 0x0f] + HEX_CHARS[h6 >> 24 & 0x0f] + HEX_CHARS[h6 >> 20 & 0x0f] + HEX_CHARS[h6 >> 16 & 0x0f] + HEX_CHARS[h6 >> 12 & 0x0f] + HEX_CHARS[h6 >> 8 & 0x0f] + HEX_CHARS[h6 >> 4 & 0x0f] + HEX_CHARS[h6 & 0x0f];\n hex += HEX_CHARS[h7 >> 28 & 0x0f] + HEX_CHARS[h7 >> 24 & 0x0f] + HEX_CHARS[h7 >> 20 & 0x0f] + HEX_CHARS[h7 >> 16 & 0x0f] + HEX_CHARS[h7 >> 12 & 0x0f] + HEX_CHARS[h7 >> 8 & 0x0f] + HEX_CHARS[h7 >> 4 & 0x0f] + HEX_CHARS[h7 & 0x0f];\n return hex;\n }\n\n toString() {\n return this.hex();\n }\n\n digest() {\n this.finalize();\n const h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n const arr = [h0 >> 24 & 0xff, h0 >> 16 & 0xff, h0 >> 8 & 0xff, h0 & 0xff, h1 >> 24 & 0xff, h1 >> 16 & 0xff, h1 >> 8 & 0xff, h1 & 0xff, h2 >> 24 & 0xff, h2 >> 16 & 0xff, h2 >> 8 & 0xff, h2 & 0xff, h3 >> 24 & 0xff, h3 >> 16 & 0xff, h3 >> 8 & 0xff, h3 & 0xff, h4 >> 24 & 0xff, h4 >> 16 & 0xff, h4 >> 8 & 0xff, h4 & 0xff, h5 >> 24 & 0xff, h5 >> 16 & 0xff, h5 >> 8 & 0xff, h5 & 0xff, h6 >> 24 & 0xff, h6 >> 16 & 0xff, h6 >> 8 & 0xff, h6 & 0xff];\n arr.push(h7 >> 24 & 0xff, h7 >> 16 & 0xff, h7 >> 8 & 0xff, h7 & 0xff);\n return arr;\n }\n\n array() {\n return this.digest();\n }\n\n arrayBuffer() {\n this.finalize();\n const buffer = new ArrayBuffer(32);\n const dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n dataView.setUint32(28, this.h7);\n return buffer;\n }\n\n}\n\n/**\n * @module wm-feature-flag-client\n */\n/* set polyfills for IE11 support */\n\nsetPolyfills();\n/**\n * Provides core feature flag querying functionality for\n * determining which features are enabled for a specific user.\n * @implements {IFlagFlagClient}\n */\n\nclass FeatureFlagClient {\n /**\n * Creates a new instance of the [FeatureFlagClient] class.\n * @param context The conext object containing the userId and config data\n * @param config Optional. The feature flag config file.\n *\n * @remarks\n * The config file at location context.configUrl will be fetched from AWS S3 unless a config file is provided\n */\n constructor(context, fallbackConfig, quickInit = false) {\n this.config = void 0;\n this.configRefreshIntervalDefault = void 0;\n this.context = void 0;\n this.fallbackConfig = void 0;\n this.featureFlagUserId = void 0;\n this.initialized = void 0;\n this.libraryLanguage = void 0;\n this.storage = void 0;\n this.quickInit = void 0;\n this.globalWarnings = void 0;\n\n this.addStorageWarnings = () => {\n const addStorageWarningsWarnings = [];\n\n if (this.storage.warnings && this.storage.warnings.length > 0) {\n this.storage.warnings.map(warning => {\n addStorageWarningsWarnings.push(warning);\n });\n }\n\n return addStorageWarningsWarnings;\n };\n\n this.targetingPropsToLowerCase = targetingProperties => {\n return Object.entries(targetingProperties).reduce((acc, [key, value]) => {\n let valueLowerCase;\n if (typeof value === 'string') valueLowerCase = value.toLowerCase();\n\n if (Array.isArray(value)) {\n valueLowerCase = value.map(entry => entry.toLowerCase());\n }\n\n acc[key.toLowerCase()] = valueLowerCase;\n return acc;\n }, {});\n };\n\n if (!context) throw new Error('Please provide a context object to the constructor.');\n if (!context.configUrl && !fallbackConfig) throw new Error('Please provide either a config url or a valid config object.');\n this.config = undefined;\n this.configRefreshIntervalDefault = config.minimumPollFrequencySeconds;\n this.context = context;\n this.fallbackConfig = fallbackConfig;\n this.featureFlagUserId = '';\n this.libraryLanguage = config.ffLibraryLanguage;\n this.initialized = false;\n this.quickInit = quickInit;\n const storageType = context && context.storageType ? context.storageType : '';\n this.storage = new FeatureFlagStorage(storageType, context.clientId);\n this.globalWarnings = [];\n }\n /**\n * Creates a hash of the userId and saltKey (using browser'crypto / msCrytpo' api)\n * @param userId The userId used to create the hash\n * @param salt The salt used to create the hash\n * @return {string} hash\n */\n\n\n createHash(userId, salt) {\n const sha256 = new Sha256();\n const hash = sha256.create();\n hash.update(`${userId}${salt}`);\n const hashValue = hash.hex();\n return hashValue;\n }\n /**\n * Creates a user id\n * @return {string} userId\n */\n\n\n createUserId() {\n const userId = generateUUID();\n return userId;\n }\n /**\n * Creates a 2-digit string from the hash to be used as an index for\n * comparing against the rollout percentage of the feature to determine\n * whether the feature is enabled or disabled\n * @param hash\n * @return {string} 2-digit segment of the hash\n */\n\n\n getUserFeatureIndex(hash) {\n const hashSegment = parseInt(hash.substring(0, 10), 16);\n return hashSegment.toString().slice(-2);\n }\n /**\n * Initialization code to ensure that the userId, config and ffLibraryLanguage are set\n * @return {void}\n */\n\n\n async init() {\n const initWarnings = [];\n const {\n config,\n fallbackConfig,\n initialized,\n featureFlagUserId,\n libraryLanguage,\n storage,\n configRefreshIntervalDefault,\n quickInit\n } = this;\n const {\n configUrl,\n userId,\n configRefreshInterval\n } = this.context; // get user-defined refresh interval or use default if none provided\n\n const cfgRefreshInterval = typeof configRefreshInterval !== 'undefined' ? configRefreshInterval : configRefreshIntervalDefault;\n const cacheIsExpired = this.checkConfigCacheExpiry(cfgRefreshInterval); // initialization steps:\n // 1. ensure we have feature flag configuration. first look for config in storage,\n // otherwise fetch it from configUrl location\n\n if (!config || cacheIsExpired) {\n const configFromStorage = storage.get(FEATURE_FLAG_CONFIG);\n\n try {\n if (configFromStorage) this.config = JSON.parse(configFromStorage);\n } catch (error) {\n const warning = {\n code: 'FAILED_TO_READ_CONFIG_FROM_STORAGE',\n message: FAILED_TO_READ_CONFIG_FROM_STORAGE\n };\n initWarnings.push(warning);\n }\n\n if (!configFromStorage || cacheIsExpired) {\n // check if config file has changed before downloading\n // by populating 'If-None-Match' header with value of the previous etag\n // get config file (if it has been updated), save it in storage along with new eTag\n if (configUrl) {\n // set fallback config as default in case remote fetch fails\n if (!cacheIsExpired && fallbackConfig) this.updateConfig(fallbackConfig);\n let prevETag = storage.get(FEATURE_FLAG_CONFIG_ETAG) || '-1'; // if no config in storage, fetch file\n\n prevETag = !configFromStorage ? '-1' : prevETag;\n\n try {\n if (quickInit && fallbackConfig) {\n if (!configFromStorage) this.updateConfig(fallbackConfig);\n this.loadAndSetRemoteConfig(configUrl, prevETag);\n return initWarnings;\n }\n\n if (quickInit && !fallbackConfig) {\n const warning = {\n code: 'REMOTE_CONFIG_USED_NO_FALLBACK_PRESENT',\n message: REMOTE_CONFIG_USED_NO_FALLBACK_PRESENT\n };\n initWarnings.push(warning);\n }\n\n await this.loadAndSetRemoteConfig(configUrl, prevETag);\n } catch (error) {\n // log and continue to use cached file version, or set fallbackConfig if available\n if (configFromStorage || fallbackConfig) {\n this.setNoNewConfigWarning();\n } else {\n throw new Error(`Failed to load config file - no config url or default config provided. ${error}`);\n }\n }\n } else {\n // use fallbackConfig if there is no configUrl\n if (!fallbackConfig) throw new Error('Failed to load config file - no config url or default config provided.');\n this.updateConfig(fallbackConfig);\n }\n }\n } // pass through if instance already initialized\n\n\n if (initialized) return initWarnings; // 2. ensure we have a userId. if it's not in the context object, check storage.\n\n if (!userId) {\n const _userId = storage.get(APP_USER_ID);\n\n if (_userId) this.context.userId = _userId;\n } else {\n storage.set(APP_USER_ID, userId);\n } // 3. ensure we have a featureFlagUserId. if there isn't one in storage, create one.\n\n\n if (!featureFlagUserId) {\n const ffUserId = storage.get(FEATURE_FLAG_USER_ID);\n if (ffUserId) this.featureFlagUserId = ffUserId;\n\n if (!ffUserId) {\n this.featureFlagUserId = this.createUserId();\n storage.set(FEATURE_FLAG_USER_ID, this.featureFlagUserId);\n }\n } // 4. ensure that the ffLibraryLanguage property is set\n\n\n if (!this.context.userTargetingProperties || this.context.userTargetingProperties && !this.context.userTargetingProperties.ffLibraryLanguage) {\n const userTargetingProperties = {\n ffLibraryLanguage: libraryLanguage\n };\n this.updateContext(undefined, userTargetingProperties);\n }\n\n this.initialized = true;\n return initWarnings;\n }\n /**\n * Determine whether the flag config has been cached longer than the desired interval\n * @param interval The maximum time (in ms) to cache the config file before fetching a new copy\n * @return {boolean}\n */\n\n\n checkConfigCacheExpiry(interval) {\n const {\n storage\n } = this;\n const now = new Date();\n let expired = false;\n\n const setIntervalStart = timestamp => storage.set(CONFIG_CACHE_START, timestamp); // check for a timestamp in browser storage\n\n\n const configCacheStartSerialized = storage.get(CONFIG_CACHE_START); // if there's no timestamp in browser storage, create one\n\n if (!configCacheStartSerialized) {\n const _now = new Date();\n\n setIntervalStart(JSON.stringify(_now.getTime()));\n }\n\n const configCacheStart = configCacheStartSerialized ? JSON.parse(configCacheStartSerialized) : now.getTime();\n const cacheTimeElapsed = now.getTime() - configCacheStart; // in ms\n\n expired = cacheTimeElapsed > interval ? true : false;\n\n if (expired === true) {\n const _now2 = new Date();\n\n setIntervalStart(JSON.stringify(_now2.getTime()));\n }\n\n return expired;\n }\n\n async isFeatureEnabled(flagName) {\n return (await this.queryFeatureFlag(flagName)).enabled;\n }\n /**\n * When remote fetch of config file fails (or is unchanged - 304)\n * set warning and appropriate backup config\n * @param interval The maximum time (in ms) to cache the config file before fetching a new copy\n * @return {void}\n */\n\n\n setNoNewConfigWarning() {\n const {\n fallbackConfig,\n storage\n } = this;\n const configFromStorage = storage.get(FEATURE_FLAG_CONFIG); // if there is no new config file version available, handle the 304 error\n // log and continue to use cached file version, or set fallbackConfig if available\n\n if (configFromStorage) {\n const warning = {\n code: 'CACHE_USED',\n message: CACHE_USED\n };\n this.globalWarnings.push(warning);\n } else if (!configFromStorage && fallbackConfig) {\n this.globalWarnings.push({\n code: 'FALLBACK_USED_REMOTE_LOAD_FAILED',\n message: CACHE_USED\n });\n this.updateConfig(fallbackConfig);\n }\n }\n\n async loadAndSetRemoteConfig(configUrl, prevETag) {\n let response;\n\n try {\n response = await this.loadConfig(configUrl, prevETag);\n } catch (err) {\n // remote fetch unsuccessfull, go to cache (or fallback)\n this.globalWarnings.push({\n code: 'FALLBACK_OR_CACHE_USED_REMOTE_LOAD_FAILED',\n message: FALLBACK_OR_CACHE_USED_REMOTE_LOAD_FAILED\n });\n this.setNoNewConfigWarning();\n }\n\n if (response) {\n this.config = response.data ? response.data : this.config;\n\n if (!response.data) {\n this.globalWarnings.push({\n code: 'FALLBACK_USED_REMOTE_LOAD_FAILED',\n message: FALLBACK_USED_REMOTE_LOAD_FAILED\n });\n }\n\n let eTag = response.headers && response.headers.etag ? response.headers.etag : '';\n if (response && response.etag) eTag = response.etag;\n if (eTag) this.storage.set(FEATURE_FLAG_CONFIG_ETAG, eTag); // store config to temp storage\n\n this.storage.set(FEATURE_FLAG_CONFIG, JSON.stringify(this.config));\n }\n }\n /**\n * Loads the config file from the configUrl location\n * @param configUrl Uri for the desired feature flag config file\n * @param eTag The value of the etag header from the previous request, default to -1\n */\n\n\n async loadConfig(configUrl, eTag = '-1') {\n let response;\n const url = `${configUrl}?version=${config.ffLibraryVersionCode}`;\n const headers = {\n 'If-None-Match': eTag\n };\n\n try {\n response = await makeRequest({\n url,\n method: 'GET',\n headers\n });\n } catch (error) {\n throw new Error(`Failed to fetch config file: ${error}`);\n }\n\n return response;\n }\n /**\n * Update the config object\n * @param config A feature flag configuration file\n */\n\n\n updateConfig(config) {\n this.config = config;\n this.storage.set(FEATURE_FLAG_CONFIG, JSON.stringify(config));\n }\n /**\n * Update the context object\n * @param userId a string id\n * @param userTargeting an object conatining user cohort targeting criteria\n * @param replaceAllTargeting a boolean the determine where or not to replace all targeting\n */\n\n\n updateContext(userId, userTargeting, replaceAllTargeting) {\n const newContext = { ...this.context\n };\n if (userId) newContext.userId = userId;\n\n if (replaceAllTargeting) {\n newContext.userTargetingProperties = userTargeting;\n } else {\n const mergedTargetingProperties = { ...newContext.userTargetingProperties,\n ...userTargeting\n };\n newContext.userTargetingProperties = mergedTargetingProperties;\n }\n\n this.context = newContext;\n }\n /**\n * Add Storage warnings to FeatureFlagClient.warnings array\n * @param warnings An array of IWarning objects\n */\n\n\n /**\n * Determine which cohort configuration from the feature config file to use\n * @param context The conext object containing the userId and config data\n * @param cohortConfigs cohort configuration objects from the feature config file\n * @return {ICohortConfig}\n */\n getCohortConfig(context, cohortConfigs) {\n // set a defaut cohort config in case no matches found\n const defaultIdType = context.userId ? 'appUserId' : 'ffUserId';\n let cohortConfig = {\n rolloutValue: '-1',\n cohortPriority: 1,\n stickinessProperty: defaultIdType\n }; // sort by 'cohortPriority' property\n\n const cohortConfigsSorted = [...cohortConfigs];\n cohortConfigsSorted.sort((a, b) => a.cohortPriority > b.cohortPriority ? 1 : -1); // transform context keys to lower case for case insensitive matching\n\n const clientTargetingProperties = this.targetingPropsToLowerCase(context.userTargetingProperties); // identify cohort config to use by validating all 'cohortCriteria' fields\n\n const matchedCohortConfig = cohortConfigsSorted.find(cohortConfig => {\n let matchDetected = false; // if there is no userId provider and the stickinessProperty specifies userId - do not match\n\n if (!context.userId && cohortConfig.stickinessProperty === 'appUserId') return false; // if no cohort criteria is present, consider the cohort a match\n\n if (!cohortConfig.cohortCriteria || cohortConfig.cohortCriteria.length < 1) return true;\n const cohortFields = cohortConfig.cohortCriteria; // iterate through cohort criteria\n\n for (let i = 0; i < cohortFields.length; i++) {\n let {\n requiredFieldName\n } = cohortFields[i];\n const {\n requiredFieldValues\n } = cohortFields[i];\n requiredFieldName = requiredFieldName.toLowerCase(); // if at least one cohort field value is present in context object, consider the filed validated\n\n const cohortFieldFoundInContext = requiredFieldValues.some(fieldValue => {\n fieldValue = fieldValue.toLowerCase(); // match if fieldValue is empty string and property is absent in clientTargetingProperties\n // eslint-disable-next-line no-prototype-builtins\n\n if (!clientTargetingProperties.hasOwnProperty(requiredFieldName) && fieldValue === '') return true; // check for both string and array values of the matching property\n\n if (typeof clientTargetingProperties[requiredFieldName] === 'string') return clientTargetingProperties[requiredFieldName] === fieldValue;\n\n if (Array.isArray(clientTargetingProperties[requiredFieldName])) {\n return clientTargetingProperties[requiredFieldName].some(contextValue => contextValue === fieldValue);\n }\n });\n matchDetected = cohortFieldFoundInContext;\n if (!matchDetected) break;\n }\n\n return matchDetected;\n }); // overwrite default cohort config if a matching config was found\n\n if (matchedCohortConfig) cohortConfig = { ...matchedCohortConfig\n };\n return cohortConfig;\n }\n /**\n * set feature flag results into storage\n * @param results Either a single result (object) or an array of results\n * @return {IQueryFeatureResult[]}\n */\n\n\n cacheFlagResults(results) {\n const {\n storage\n } = this;\n let prevResults = [],\n prevResultsReduced = [],\n newResults = []; // populate newResults array from results argument\n\n if (Array.isArray(results)) {\n newResults = results ? [...results] : [];\n } else {\n newResults.push(results);\n } // get cached flag values from storage and deserialize\n\n\n const storedResultsString = storage.get(FEATURE_FLAG_RESULTS);\n const storedResults = storedResultsString ? JSON.parse(storedResultsString) : [];\n prevResults = [...storedResults]; // filter out duplicates from prevResults\n\n if (prevResults.length > 0) {\n prevResultsReduced = prevResults.reduce((accumulator, currentValue) => {\n if (newResults.find(result => result.flagId === currentValue.flagId)) {\n return accumulator;\n } else {\n return [...accumulator, currentValue];\n }\n }, []);\n } // merge previous and new results and set into storage\n\n\n const mergedResults = [...prevResultsReduced, ...newResults];\n storage.set(FEATURE_FLAG_RESULTS, JSON.stringify(mergedResults));\n return mergedResults;\n }\n /**\n * check if the flag's enabled value has changed compared with the cached value\n * @param result The processed new flag to compare\n * @return {boolean}\n */\n\n\n checkIfFlagUpdated(result) {\n const {\n storage\n } = this; // get cached flag values from storage and deserialize\n\n const storedResultsString = storage.get(FEATURE_FLAG_RESULTS);\n const storedResults = storedResultsString ? JSON.parse(storedResultsString) : []; // if no results in storage, return true (ie, flag updated)\n\n if (storedResults.length < 1) return true; // compare values of stored flag and fetched flag\n\n const prevFlag = storedResults.find(prevFlag => prevFlag.flagId === result.flagId);\n if (!prevFlag) return true;\n const hasFlagChanged = prevFlag.enabled !== result.enabled;\n return hasFlagChanged;\n }\n /**\n * Checks whether or not a given feature is enabled for a specific user\n * @param flagId\n * @param isQueryAll is this part of a queryAllFeatureFlags call?\n * @return {IQueryFeatureResult} response object containing feature name, 'enabled' boolean and userId\n */\n\n\n async queryFeatureFlag(flagId, isQueryAll = false) {\n const {\n context,\n fallbackConfig\n } = this;\n let enabled = false,\n flagConfig,\n flagName,\n hashId,\n operationalId,\n userFeatureIndex,\n userIdType = 'appUserId',\n warnings = [];\n\n const mergeWarnings = arrayToMerge => {\n const globalWarnings = isQueryAll ? [] : this.globalWarnings;\n return warnings.concat(arrayToMerge, globalWarnings);\n };\n\n const getFlagConfig = (config, flagId) => {\n return config.flags.find(flag => flag.id === flagId);\n };\n\n const getFallbackConfig = (fallbackConfig, flagId) => {\n flagConfig = getFlagConfig(fallbackConfig, flagId);\n\n if (flagConfig) {\n const addStorageWarningsWarnings = this.addStorageWarnings();\n warnings = mergeWarnings(addStorageWarningsWarnings);\n const result = {\n clientId: context.clientId,\n flagId: flagConfig.id,\n flagName: flagConfig.name ? flagConfig.name : undefined,\n enabled: flagConfig.defaultValue,\n updatedSinceLastQuery: true,\n warnings: warnings\n };\n result.updatedSinceLastQuery = this.checkIfFlagUpdated(result);\n this.cacheFlagResults(result);\n return result;\n }\n };\n\n try {\n const initWwarnings = await this.init();\n warnings = initWwarnings.concat(warnings);\n operationalId = this.context.userId ? this.context.userId : undefined;\n if (!this.config || !this.config.flags) throw new Error('Operation failed - no config file or invalid config file detected.'); // get the feature flag configuration matching the feature name provided\n\n flagConfig = getFlagConfig(this.config, flagId); // if the flag is not found, try again using the fallbackConfig, if available\n\n if (!flagConfig) {\n if (fallbackConfig) {\n const response = getFallbackConfig(fallbackConfig, flagId);\n\n if (response) {\n const warning = {\n code: 'FALLBACK_USED_FLAG_NOT_IN_REMOTE',\n message: FALLBACK_USED_FLAG_NOT_IN_REMOTE\n };\n warnings.push(warning);\n return response;\n }\n } // if there's still no match throw and error\n\n\n throw new Error('Flag not found');\n }\n\n const {\n cohorts,\n defaultValue,\n name,\n type\n } = flagConfig;\n if (type && type.toLowerCase() !== 'boolean' && !isQueryAll) throw new Error('Flag not found'); // if there are no cohorts (ie fallbackConfig) return early\n\n if (!cohorts || cohorts.length < 1) {\n const _addStorageWarningsWarnings = this.addStorageWarnings();\n\n warnings = mergeWarnings(_addStorageWarningsWarnings);\n const _result = {\n clientId: context.clientId,\n flagId: flagConfig.id,\n flagName: name,\n enabled: flagConfig.defaultValue,\n updatedSinceLastQuery: true,\n warnings: warnings\n };\n _result.updatedSinceLastQuery = this.checkIfFlagUpdated(_result);\n this.cacheFlagResults(_result);\n return _result;\n }\n\n flagName = name; // determine the feature's cohort config\n\n const cohortConfig = this.getCohortConfig(context, cohorts);\n let {\n rolloutValue\n } = cohortConfig;\n const {\n stickinessProperty\n } = cohortConfig;\n rolloutValue = rolloutValue || '0'; // create the hash and 'user feature index' (derived from hash)\n\n const saltKey = flagConfig.id;\n hashId = this.context.userId ? this.context.userId : undefined; // use the ffUserId if specified by cohort config\n\n if (stickinessProperty === 'ffUserId') {\n operationalId = this.featureFlagUserId;\n userIdType = 'ffUserId';\n hashId = operationalId;\n }\n\n const hash = hashId ? this.createHash(hashId, saltKey) : undefined;\n userFeatureIndex = hash ? this.getUserFeatureIndex(hash) : '-1';\n enabled = parseInt(userFeatureIndex, 10) < parseInt(rolloutValue, 10); // determine whether or not flag is enabled for the given user\n // attempt to use the defaultValue if either there is no cohort config match or an invalid userFeatureIndex\n\n if (parseInt(rolloutValue, 10) < 0 || parseInt(userFeatureIndex, 10) < 0 || parseInt(userFeatureIndex, 10) > 99) {\n if (typeof defaultValue === 'undefined') {\n // try fallback config\n if (fallbackConfig) {\n const response = getFallbackConfig(fallbackConfig, flagId);\n if (response) return response; // if there's still no match throw and error\n\n throw new Error('Flag not found');\n }\n\n throw new Error('Unable to determine flag default value');\n }\n\n enabled = defaultValue;\n }\n } catch (error) {\n throw new Error(`Failed to query feature flag: ${error}`);\n }\n\n const addStorageWarningsWarnings = this.addStorageWarnings();\n warnings = mergeWarnings(addStorageWarningsWarnings);\n const result = {\n flagId: flagId,\n flagName: flagName,\n enabled: enabled,\n updatedSinceLastQuery: true,\n clientId: context.clientId,\n userId: operationalId,\n userIdType: userIdType,\n warnings: warnings\n };\n result.updatedSinceLastQuery = this.checkIfFlagUpdated(result);\n this.cacheFlagResults(result);\n return result;\n }\n /**\n * Checks availability of all features for a specific user\n * @return {IQueryFeatureResult[]} array of feature flag data objects\n */\n\n\n async queryAllFeatureFlags() {\n var _this = this;\n\n await this.init();\n const {\n config\n } = this;\n if (!config || !config.flags) throw new Error('No config file or invalid config file detected.');\n const featureFlagResponse = {\n anyFlagsUpdatedSinceLastQuery: false,\n globalWarnings: this.globalWarnings,\n results: []\n };\n const promises = config.flags.map(async function (flag) {\n const featureFlagData = await _this.queryFeatureFlag(flag.id, true);\n if (featureFlagData.updatedSinceLastQuery === true) featureFlagResponse.anyFlagsUpdatedSinceLastQuery = true;\n featureFlagResponse.results.push(featureFlagData);\n });\n return Promise.all(promises).then(() => featureFlagResponse);\n }\n\n}\n\nexport { FeatureFlagClient };\n","import { getOneCookie } from '@turnercode/cdp-utils-js';\n\nfunction getDomain() {\n const psmMetaData = getOneCookie('psmMetaData');\n let cookieDomain = window.location.hostname;\n if (psmMetaData?.domain) {\n cookieDomain = psmMetaData.domain;\n }\n return cookieDomain;\n}\nexport { getDomain };\n","import pkg from '../../../package.json';\n\nconst LOCATE_URL = 'https://geo.ngtv.io/locate';\nconst CCPA_NON_USP_LOCATION_STRING = '1---';\nconst urlObject = {\n featureFlag: {\n DEV: 'https://wmff.warnermediacdn.com/psm_dev_full.json',\n QA: 'https://wmff.warnermediacdn.com/psm_qa_full.json',\n PROD: 'https://wmff.warnermediacdn.com/psm_prod_full.json',\n INTEGRATION: 'https://wmff.warnermediacdn.com/psm_brand_integration_config_full.json',\n },\n privacy: {\n DEV: 'https://dev.privacy.api.wmcdp.io/v1/pvc',\n QA: 'https://test.privacy.api.wmcdp.io/v1/pvc',\n PROD: 'https://privacy.api.wmcdp.io/v1/pvc',\n INTEGRATION: 'https://integration.privacy.api.wmcdp.io/v1/pvc',\n },\n identity: {\n DEV: 'https://dev.identity.api.wmcdp.io/v1/reg',\n QA: 'https://test.identity.api.wmcdp.io/v1/reg',\n PROD: 'https://identity.api.wmcdp.io/v1/reg',\n INTEGRATION: 'https://integration.identity.api.wmcdp.io/v1/reg',\n },\n telemetry: {\n DEV: 'https://dev.telemetry.api.wmcdp.io/v1/tel',\n QA: 'https://test.telemetry.api.wmcdp.io/v1/tel',\n PROD: 'https://telemetry.api.wmcdp.io/v1/tel',\n INTEGRATION: 'https://integration.telemetry.api.wmcdp.io/v1/tel',\n },\n errors: {\n DEV: 'https://dev.logs.psm.wmcdp.io',\n QA: 'https://dev.logs.psm.wmcdp.io',\n PROD: 'https://logs.psm.wmcdp.io',\n INTEGRATION: 'https://dev.logs.psm.wmcdp.io',\n },\n};\n\nconst ffLocalConfig = {\n featureFlagLibraryVersion: '0.1',\n flags: [\n {\n defaultValue: true,\n id: 'getSetConsentState',\n cohorts: [],\n name: 'FALLBACK_getSetConsentState',\n type: 'boolean',\n },\n {\n defaultValue: true,\n id: 'telemetry',\n cohorts: [],\n name: 'FALLBACK_telemetry',\n type: 'boolean',\n },\n {\n defaultValue: true,\n id: 'WMUKID',\n cohorts: [],\n name: 'FALLBACK_WMUKID',\n type: 'boolean',\n },\n ],\n};\n\nconst defaultFlagState = [\n {\n flagId: 'getSetConsentState',\n flagName: 'DEFAULT_getSetConsentState',\n enabled: true,\n userId: '',\n userIdType: 'ffUserId',\n warnings: [],\n },\n {\n flagId: 'WMUKID',\n flagName: 'DEFAULT_WMUKID',\n enabled: true,\n userId: '',\n userIdType: 'ffUserId',\n warnings: [],\n },\n {\n flagId: 'telemetry',\n flagName: 'DEFAULT_telemetry',\n enabled: true,\n userId: '',\n userIdType: 'ffUserId',\n warnings: [],\n },\n];\n\nfunction getPsmVersion() {\n return pkg.version;\n}\n\nfunction getUrl(environment, urlType) {\n const uppercaseEnv = environment.toUpperCase();\n let envString;\n if (uppercaseEnv === 'DEV' || uppercaseEnv === 'DEVELOPMENT') {\n envString = 'DEV';\n } else if (\n uppercaseEnv === 'TEST' ||\n uppercaseEnv === 'TESTING' ||\n uppercaseEnv === 'STAGE' ||\n uppercaseEnv === 'STAGING' ||\n uppercaseEnv === 'QA'\n ) {\n envString = 'QA';\n } else if (uppercaseEnv === 'PROD' || uppercaseEnv === 'PRODUCTION') {\n envString = 'PROD';\n } else if (uppercaseEnv === 'INTEGRATION') {\n envString = 'INTEGRATION';\n } else {\n envString = 'PROD';\n }\n\n const urlString = urlObject[urlType][envString];\n return urlString;\n}\n\nexport { ffLocalConfig, defaultFlagState, LOCATE_URL, getPsmVersion, getUrl, CCPA_NON_USP_LOCATION_STRING, urlObject };\n","/* eslint-disable no-plusplus */\nimport { defaultFlagState } from './constants';\n\nfunction findFlag(data, idToLookFor) {\n for (let i = 0; i < data.length; i++) {\n if (data[i].flagId === idToLookFor) {\n return data[i];\n }\n }\n}\n\nfunction getFlagState(flagName) {\n let featureFlag = {};\n try {\n const featureFlagFromSessionStorage = JSON.parse(sessionStorage.getItem('psmFeatureFlags'));\n\n if (featureFlagFromSessionStorage) {\n featureFlag = findFlag(featureFlagFromSessionStorage, flagName) || {};\n } else {\n featureFlag = findFlag(defaultFlagState, flagName) || {};\n }\n } catch (e) {\n featureFlag = findFlag(defaultFlagState, flagName) || {};\n }\n return featureFlag.enabled || false;\n}\n\nfunction isPrivacyEnabled() {\n const privacyEnabled = getFlagState('getSetConsentState');\n return privacyEnabled;\n}\n\nfunction isTelemetryEnabled() {\n const telemetryEnabled = getFlagState('telemetry');\n return telemetryEnabled;\n}\n\nfunction isIdentityEnabled() {\n const identityEnabled = getFlagState('WMUKID');\n return identityEnabled;\n}\n\nexport { isPrivacyEnabled, isIdentityEnabled, isTelemetryEnabled, getFlagState };\n","import { getOneCookie } from '@turnercode/cdp-utils-js';\n\nfunction getGeoMatch() {\n const geoLocations = ['US', 'PR', 'VI', 'UM', ''];\n const psmMetaData = getOneCookie('psmMetaData');\n const userLocation = psmMetaData?.location;\n const geoMatch = userLocation && geoLocations.indexOf(userLocation.toUpperCase()) >= 0;\n return geoMatch;\n}\n\nexport { getGeoMatch };\n","/* eslint-disable no-console */\n/* eslint-disable no-bitwise */\n/* eslint-disable no-plusplus */\nimport { getOneCookie, makeRequest, getCurrentTime } from '@turnercode/cdp-utils-js';\n\nimport { getUrl, getPsmVersion } from './constants';\n\nfunction createBaseEvent(params = {}) {\n const { psmMetaData = getOneCookie('psmMetaData'), wmukid } = params;\n\n let wmukidCookie = wmukid;\n\n // If no wmukid param passed, try and get the ID from the cookie itself\n if (!wmukidCookie) {\n wmukidCookie = getOneCookie('WMUKID')?.id;\n }\n\n let baseObject = {};\n\n // Fields shared across all Doppler payloads\n baseObject = {\n appId: psmMetaData.appId || 'Unknown',\n wmukid: wmukidCookie || 'Unknown',\n wmhhid: getOneCookie('wmhhid'), // currently null\n wminid: getOneCookie('wminid'), // currently null\n attuid: getOneCookie('firstpartyuid'), // currently null\n timestamp: getCurrentTime(),\n brand: psmMetaData.brand || null,\n domain: psmMetaData.domain || null,\n userAgent: window.navigator.userAgent.toString(),\n platform: 'web',\n library: {\n name: 'Psm',\n version: getPsmVersion(),\n },\n };\n\n // Only attach ids object if there are IDs in the object\n const ids = getOneCookie('psmExternalIds') || {};\n\n if (Object.keys(ids).length !== 0) {\n if (ids.kruxid && ids.kruxid !== 'retry') {\n baseObject.ids = ids;\n }\n }\n\n return baseObject;\n}\n\nfunction debugLogger(message) {\n console.info(message);\n}\n\nfunction errorLogger(eventType, method, errorDetails, flag) {\n let wmUkId = '{}';\n try {\n wmUkId = getOneCookie('WMUKID');\n wmUkId = wmUkId.id;\n } catch (e) {\n wmUkId = 'Unknown';\n }\n const psmMetaData = getOneCookie('psmMetaData');\n const appId = psmMetaData.appId || null;\n const brand = psmMetaData.brand || null;\n const errorObject = {\n message: {\n eventType,\n method,\n WMUKID: wmUkId,\n Brand: brand,\n appId,\n Platform: 'Web',\n error: true,\n errorMessage: errorDetails.message,\n flagName: flag,\n enabled: true,\n },\n };\n const env = psmMetaData.environment || 'PROD';\n const errorUrl = getUrl(env, 'errors');\n makeRequest({ url: errorUrl, method: 'POST', payload: errorObject });\n}\n\nexport { errorLogger, debugLogger, createBaseEvent };\n","var DESCRIPTORS = require('../internals/descriptors');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.github.io/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !(NAME in FunctionPrototype)) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","import { isTelemetryEnabled } from './feature-flag-interface';\nimport { errorLogger } from './logger';\n\nfunction sendTelemetryEvent(methodName, eventName, eventProperties) {\n // Needed because the telemetry library does not freeze the feature flag state--this prevents a discrepancy between what prism-js thinks the telemetry flag is and what telemetry thinks the telemetry flag is\n if (!isTelemetryEnabled()) {\n return;\n }\n\n /*\n * Needed to give the telemetryModule a chance to finish initializing given UserConsent\n * ccpaDoNotShare/ccpaShareData invokations occur immediately on the page load and can happen\n * before the telemetryModule is finished initializing!\n */\n return setTimeout(() => {\n try {\n return window.WM.CDP.telemetryModule.sendEvent(eventName, eventProperties);\n } catch (e) {\n errorLogger('Telemetry', methodName, e);\n }\n }, 2000);\n}\nexport { sendTelemetryEvent };\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\nvar nativeAssign = Object.assign;\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\nmodule.exports = !nativeAssign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : nativeAssign;\n","/* eslint-disable no-bitwise */\nimport {\n generateUUID,\n getCookies,\n getGeoLocation,\n getOneCookie,\n makeRequest,\n removeCookie,\n setCookie,\n} from '@turnercode/cdp-utils-js';\n\nimport {\n createBaseEvent,\n debugLogger,\n errorLogger,\n getDomain,\n getGeoMatch,\n isIdentityEnabled,\n sendTelemetryEvent,\n} from '../helpers';\nimport { getUrl } from '../helpers/constants';\n\nfunction setRetryFlag(options) {\n const cookieName = options;\n\n const cookie = getOneCookie(cookieName);\n cookie.retry = true;\n setCookie(cookieName, cookie, getDomain());\n}\n\nfunction getKruxId() {\n let kruxId;\n try {\n kruxId = window.Krux.kuid;\n if (!kruxId) {\n kruxId = localStorage.getItem('kxkuid') || '';\n }\n } catch (e) {\n const localKruxId = localStorage.getItem('kxkuid');\n if (typeof localKruxId === 'string') kruxId = localKruxId;\n }\n return kruxId;\n}\n\nfunction updateExternalIds(domain) {\n setCookie('psmRetryExternalIds', 'false', domain);\n\n let externalIds = getOneCookie('psmExternalIds') || {};\n // What's currently saved as kruxid on the externalIds object\n const existingKruxId = externalIds.kruxid;\n // What is saved in the browser as kuid\n const newKruxId = getKruxId();\n\n // Don't update if IDs are the same\n if (newKruxId === existingKruxId) {\n return false;\n }\n\n // If new krux ID isn't a string, the service isn't available\n if (typeof newKruxId !== 'string') {\n externalIds = {};\n // If new KruxID is valid, add to externalIds object\n } else if (newKruxId.length > 0) {\n externalIds.kruxid = newKruxId;\n // If krux service is available, but KruxID isn't valid yet, mark to retry\n } else {\n externalIds.kruxid = 'retry';\n setCookie('psmExternalIds', externalIds, domain);\n setCookie('psmRetryExternalIds', 'true', domain);\n return false;\n }\n\n setCookie('psmExternalIds', externalIds, domain);\n return true;\n}\n\nasync function registerIdentity(cookieObject) {\n const psmMetaData = getOneCookie('psmMetaData') || {};\n const baseEventObject = createBaseEvent({ psmMetaData, wmukid: cookieObject.id });\n const retryIds = getOneCookie('psmRetryExternalIds') || false;\n\n if (baseEventObject.wmukid === 'Unknown') {\n errorLogger('Identity', 'registerIdentity', { message: 'WMUKID is Unknown' }, 'WMUKID');\n return;\n }\n\n // If useragent contains spider, bot, crawl, or scrape, return\n const userAgent = baseEventObject.userAgent;\n const crawlers =\n '((?:[A-z0-9]+|[A-z-]+ ?)?(?: the )?(?:[Ss][Pp][Ii][Dd][Ee][Rr]|[Ss]crape|[A-Za-z0-9-]*(?:[^C][^Uu])[Bb]ot|[Cc][Rr][Aa][Ww][Ll])[A-z0-9]*)(?:(?:[ /]| v)(d+)(?:.(d+)(?:.(d+))?)?)?';\n if (userAgent.match(crawlers)) {\n return;\n }\n\n // If externalIds haven't been generated yet, retry WMUKID registration\n if (retryIds) {\n setRetryFlag('WMUKID');\n return 'External IDs not found.';\n }\n\n // Grabs user's location info\n const locationData = (await getGeoLocation()) || {};\n\n if (!locationData.states) {\n locationData.states = [{ state: 'Unknown', cities: ['Unknown'], zipcodes: [] }];\n }\n const addressDetails = {\n country: locationData.country_alpha2 || 'Unknown',\n state: locationData.states[0].state || 'Unknown',\n city: locationData.states[0].cities[0] || 'Unknown',\n zips: locationData.states[0].zipcodes || 'Unknown',\n };\n\n const idEventObject = {\n ...baseEventObject,\n ...addressDetails,\n ip: locationData.ip_address || 'Unknown',\n cookies: getCookies(),\n };\n\n const env = psmMetaData.environment || 'PROD';\n const identityUrl = getUrl(env, 'identity');\n\n try {\n const resp = await makeRequest({ url: identityUrl, method: 'POST', payload: idEventObject });\n sendTelemetryEvent('registerIdentity', 'identity-registerWMUKID', addressDetails);\n return resp;\n } catch (error) {\n errorLogger('Identity', 'registerIdentity', error, 'WMUKID');\n setRetryFlag('WMUKID');\n throw error;\n }\n}\n\nfunction createWMUKID() {\n const WMUKID = generateUUID();\n\n const cookieObject = {\n id: WMUKID,\n version: 0.1,\n timestamp: new Date().toISOString(),\n };\n setCookie('WMUKID', cookieObject, getDomain());\n registerIdentity(cookieObject)\n .then((response) => {\n debugLogger(`identity registered ${JSON.stringify(response) || cookieObject.id}`);\n })\n .catch((e) => {\n errorLogger('Identity', 'createWMUKID', e, 'WMUKID');\n });\n // sendTelemetryEvent('getWMUKID', 'identity-wmukidCreated', {});\n return cookieObject.id;\n}\n\nfunction getWMUKID() {\n const identityEnabled = isIdentityEnabled();\n const geoMatch = getGeoMatch();\n let retryFlag = false;\n if (!identityEnabled || !geoMatch) {\n return 'Unknown';\n }\n let WMUKID = getOneCookie('WMUKID') || null;\n\n if (!WMUKID) {\n return createWMUKID();\n }\n\n // sendTelemetryEvent('getWMUKID', 'identity-wmukidFromCache', {});\n\n retryFlag = WMUKID.retry;\n\n if (retryFlag) {\n delete WMUKID.retry;\n setCookie('WMUKID', WMUKID, getDomain());\n registerIdentity(WMUKID)\n .then((response) => {\n debugLogger(`identity registered ${JSON.stringify(response) || WMUKID.id}`);\n })\n .catch((e) => {\n setRetryFlag('WMUKID');\n errorLogger('Identity', 'getWMUKID', e, 'WMUKID');\n });\n }\n\n try {\n WMUKID = WMUKID.id;\n } catch (e) {\n errorLogger('Identity', 'getWMUKID', e, 'WMUKID');\n }\n return WMUKID;\n}\nfunction removeWMUKID() {\n removeCookie('WMUKID', getDomain());\n}\n\nexport { getKruxId, getWMUKID, updateExternalIds, removeWMUKID };\n","var $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n assign: assign\n});\n","import { getOneCookie } from '@turnercode/cdp-utils-js';\n\nimport { getGeoMatch, isPrivacyEnabled } from '../helpers';\nimport { CCPA_NON_USP_LOCATION_STRING } from '../helpers/constants';\n\nfunction getUSPString() {\n if (!isPrivacyEnabled()) {\n return;\n }\n if (!getGeoMatch()) {\n return CCPA_NON_USP_LOCATION_STRING;\n }\n const uspString = getOneCookie('usprivacy');\n\n // sendTelemetryEvent('getUSPString', 'privacy-getUSPString', {});\n\n return uspString;\n}\n\nfunction getUSPObject() {\n if (!isPrivacyEnabled() || !getGeoMatch()) {\n return;\n }\n const uspObject = getOneCookie('uspObject');\n\n // sendTelemetryEvent('getUSPObject', 'privacy-getUSPObject', {});\n\n return uspObject;\n}\n\nfunction getUSPData() {\n if (!isPrivacyEnabled() || !getGeoMatch()) {\n return;\n }\n const uspData = getOneCookie('uspData');\n\n // sendTelemetryEvent('getUSPData', 'privacy-getUSPData', {});\n\n return uspData;\n}\n\nfunction getUSPBoolean() {\n if (!isPrivacyEnabled() || !getGeoMatch()) {\n return;\n }\n let uspBoolean = false;\n const uspString = getOneCookie('usprivacy');\n const uspCharacters = (uspString && uspString.split('')) || [];\n const optOut = uspCharacters[2];\n if (optOut === 'Y') {\n uspBoolean = true;\n }\n\n // sendTelemetryEvent('getUSPBoolean', 'privacy-getUSPBoolean', {});\n return uspBoolean;\n}\n\nfunction getUSPInt() {\n if (!isPrivacyEnabled() || !getGeoMatch()) {\n return;\n }\n let uspInt = 0;\n const uspString = getOneCookie('usprivacy');\n const uspCharacters = (uspString && uspString.split('')) || [];\n const optOut = uspCharacters[2];\n if (optOut === 'Y') {\n uspInt = 1;\n }\n\n // sendTelemetryEvent('getUSPInt', 'privacy-getUSPInt', {});\n\n return uspInt;\n}\n\nexport { getUSPString, getUSPObject, getUSPBoolean, getUSPInt, getUSPData };\n","import { setCookie } from '@turnercode/cdp-utils-js';\n\nimport { getDomain } from '../helpers';\n\nfunction setUSPObject(uspString) {\n let uspObject = {\n uspString,\n comScore: 1,\n };\n if (uspString === '1YYN') {\n uspObject = {\n uspString,\n comScore: 0,\n };\n }\n setCookie('uspObject', uspObject, getDomain());\n}\n\nfunction setUSPDataCookie(uspString, spec) {\n const uspData = {\n version: parseInt(spec, 10) || spec,\n uspString,\n };\n setCookie('uspData', uspData, getDomain());\n}\n\nfunction setUSPString(uspString) {\n setCookie('usprivacy', uspString, getDomain());\n}\n\nexport { setUSPObject, setUSPString, setUSPDataCookie };\n","import { getGeoLocation, getOneCookie, removeCookie, setCookie } from '@turnercode/cdp-utils-js';\nimport { initTelemetry } from '@turnercode/cdp-telemetry-core';\nimport { FeatureFlagClient } from '@turnercode/cdp-feature-flag-client';\n\nimport {\n createBaseEvent,\n errorLogger,\n isIdentityEnabled,\n isPrivacyEnabled,\n isTelemetryEnabled,\n sendTelemetryEvent,\n} from './modules/helpers';\nimport { defaultFlagState, ffLocalConfig, getPsmVersion, getUrl } from './modules/helpers/constants';\nimport { getWMUKID, removeWMUKID, updateExternalIds } from './modules/identity';\nimport { PrivacyModule } from './modules/privacy';\n\nconst privacyModule = new PrivacyModule();\n\nasync function getFeatureFlags(ffClient) {\n try {\n const featureFlags = await ffClient.queryAllFeatureFlags();\n sessionStorage.setItem('psmFeatureFlags', JSON.stringify(featureFlags.results));\n if (featureFlags.anyFlagsUpdatedSinceLastQuery)\n sendTelemetryEvent('getFeatureFlags', 'featureflagging-queryAllFeatureFlags', { featureFlags });\n } catch (error) {\n sessionStorage.setItem('psmFeatureFlags', JSON.stringify(defaultFlagState));\n errorLogger('FeatureFlagging', 'queryAllFeatureFlags', error);\n }\n}\n/**\n *\n * @param {Object} psmMetaData - AppID, BrandName, Environment, Domain\n * @param {String} telemetryUrl - based on environment it will load\n * @param {Object} FFClient - Feature Flag client confgiuration\n */\nfunction initializeTelemetry(psmMetaData, telemetryUrl, FFClient) {\n const telemetryModule = initTelemetry({\n baseEvent: () => createBaseEvent({ psmMetaData }),\n dopplerUrl: telemetryUrl,\n isFeatureEnabled: async (flagName, flagDefault) => {\n try {\n return await FFClient.isFeatureEnabled(flagName);\n } catch (e) {\n return flagDefault;\n }\n },\n version: getPsmVersion(),\n isTelemetryEnabled,\n });\n window.WM.CDP.telemetryModule = telemetryModule;\n}\n/**\n *\n * @param {String} appId - The app ID the CDP team provides\n * @param {String} brandName - Your brand name, e.g. CNN, should match the brand provided when registering in CMDB. If you do not know what to pass here reach out to the Psm development team\n * @param {String} environment - production, development, qa, or test\n * @param {String} domain - the domain of your app , e.g. cnn.com\n * @param {String} locationOverride- Optional parameter to override the Psm geolocation service\n */\nasync function initPsm(appId, brandName, environment, domain, locationOverride) {\n const psmMetaData = { appId, brand: brandName, environment: environment.toUpperCase(), domain };\n\n const featureFlagUrl = getUrl(environment, 'featureFlag');\n const telemetryUrl = getUrl(environment, 'telemetry');\n\n const idsUpdated = updateExternalIds(domain);\n\n if (idsUpdated) {\n removeWMUKID();\n if (getOneCookie('usprivacy') === '1YYN') {\n setCookie('retryPrivacy', 'true', domain);\n }\n }\n\n const FFClient = new FeatureFlagClient(\n {\n configUrl: featureFlagUrl,\n configRefreshInterval: 60000,\n userTargetingProperties: {\n Platform: ['Web'],\n Brand: [brandName],\n },\n },\n ffLocalConfig,\n true\n );\n\n if (locationOverride) {\n psmMetaData.location = locationOverride;\n } else {\n const geoService = await getGeoLocation();\n const userLocation = geoService.country_alpha2;\n psmMetaData.location = userLocation;\n }\n\n setCookie('psmMetaData', psmMetaData, domain);\n removeCookie('psmFeatureFlags', domain);\n\n await getFeatureFlags(FFClient);\n initializeTelemetry(psmMetaData, telemetryUrl, FFClient);\n getWMUKID();\n privacyModule.initPrivacy(true);\n}\n\n// initialize WM and WM.CDP objects\nwindow.WM = window.WM || {};\nwindow.WM.CDP = window.WM.CDP || {};\n\n// IAB method\nwindow.__uspapi = privacyModule.__uspapi;\n\n// Expose Consent\nwindow.WM.CDP.getUSPString = function () {\n sendTelemetryEvent('getUSPString', 'privacy-getUSPString', {});\n return privacyModule.getUSPString();\n};\nwindow.WM.CDP.getUSPBoolean = function () {\n sendTelemetryEvent('getUSPBoolean', 'privacy-getUSPBoolean', {});\n return privacyModule.getUSPBoolean();\n};\nwindow.WM.CDP.getUSPInt = function () {\n sendTelemetryEvent('getUSPInt', 'privacy-getUSPInt', {});\n return privacyModule.getUSPInt();\n};\nwindow.WM.CDP.getUSPObject = function () {\n sendTelemetryEvent('getUSPObject', 'privacy-getUSPObject', {});\n return privacyModule.getUSPObject();\n};\nwindow.WM.CDP.getUSPData = function () {\n sendTelemetryEvent('getUSPData', 'privacy-getUSPData', {});\n return privacyModule.getUSPData();\n};\n// Set Consent\nwindow.WM.CDP.ccpaDoNotShare = privacyModule.ccpaDoNotShare;\nwindow.WM.CDP.ccpaShareData = privacyModule.ccpaShareData;\nwindow.WM.CDP.setUSPData = privacyModule.setUSPData;\n\n// Get WMUKID\nwindow.WM.CDP.getWMUKID = getWMUKID;\n\n// Remove WMUKID\nwindow.WM.CDP.removeWMUKID = removeWMUKID;\n\n// init Psm\nwindow.WM.CDP.initPsm = initPsm;\n\n// Feature Flag state\nwindow.WM.CDP.isIdentityEnabled = isIdentityEnabled;\nwindow.WM.CDP.isPrivacyEnabled = isPrivacyEnabled;\nwindow.WM.CDP.isTelemetryEnabled = isTelemetryEnabled;\n\n// Psm Utils\nwindow.WM.CDP.getVersion = getPsmVersion;\n\nexport const {\n __uspapi,\n getUSPString,\n getUSPBoolean,\n getUSPInt,\n getUSPObject,\n getUSPData,\n setUSPData,\n ccpaDoNotShare,\n ccpaShareData,\n} = privacyModule;\n\nexport { initPsm };\n","import { getOneCookie, makeRequest, setCookie } from '@turnercode/cdp-utils-js';\n\nimport {\n debugLogger,\n errorLogger,\n getDomain,\n getGeoMatch,\n isPrivacyEnabled,\n createBaseEvent,\n findFrame,\n addFrame,\n setHandler,\n sendTelemetryEvent,\n} from '../helpers';\n\nimport { getUrl } from '../helpers/constants';\nimport { getWMUKID } from '../identity';\nimport { getUSPBoolean, getUSPData, getUSPInt, getUSPObject, getUSPString } from './get-consent';\nimport { setUSPDataCookie, setUSPObject, setUSPString } from './set-consent';\n\n/**\n * @class PrivacyModule\n */\n\nexport class PrivacyModule {\n constructor() {\n this.specCharacter = '1';\n this.opportunity = 'Y';\n this.optOut = 'N';\n this.LSPA = 'N';\n this.uspString = '';\n this.getUSPString = getUSPString;\n this.getUSPObject = getUSPObject;\n this.getUSPInt = getUSPInt;\n this.getUSPBoolean = getUSPBoolean;\n this.getUSPData = getUSPData;\n this.ccpaDoNotShare = this.ccpaDoNotShare.bind(this);\n this.ccpaShareData = this.ccpaShareData.bind(this);\n this.setUSPData = this.setUSPData.bind(this);\n this.__uspapi = this.__uspapi.bind(this);\n }\n\n async sendPrivacyEvent(optOut) {\n setCookie('retryPrivacy', 'false', getDomain());\n\n const psmMetaData = getOneCookie('psmMetaData');\n const retryIds = getOneCookie('psmRetryExternalIds') || false;\n\n let wmukid;\n\n // If no wmukid param passed, try and get the ID from the cookie itself\n if (!wmukid) {\n try {\n wmukid = getOneCookie('WMUKID').id;\n } catch {\n wmukid = getWMUKID();\n }\n }\n\n // handles user-consent calling ccpaDoNotShare/ccpaShareData before page fully loads\n if (!wmukid || wmukid === undefined) {\n setCookie('retryPrivacy', 'true', getDomain());\n return errorLogger('pvc', 'sendPrivacyEvent', 'WMUKID not found');\n }\n\n if (retryIds) {\n setCookie('retryPrivacy', 'true', getDomain());\n return 'Privacy not registered: External IDs not generated yet.';\n }\n\n const privacyObject = createBaseEvent({ psmMetaData, wmukid });\n\n const env = psmMetaData.environment || 'PROD';\n const privacyUrl = getUrl(env, 'privacy');\n\n privacyObject.optOut = optOut;\n\n try {\n const resp = await makeRequest({ url: privacyUrl, method: 'POST', payload: privacyObject });\n sendTelemetryEvent('sendPrivacyEvent', 'privacy-registerPrivacyEvent', { optOut });\n return resp;\n } catch (error) {\n setCookie('retryPrivacy', 'true', getDomain());\n errorLogger('pvc', 'sendPrivacyEvent', error);\n return error;\n }\n }\n\n __uspapi(command, version, callback) {\n // sendTelemetryEvent('__uspapi', 'privacy-__uspapi', {});\n\n if (command === 'getUSPData' && (version === 1 || version === '1')) {\n callback({ version, uspString: getUSPString() }, true);\n } else if (command === 'ccpaDoNotShare') {\n callback({ version, uspString: this.ccpaDoNotShare() }, true);\n } else if (command === 'ccpaShareData') {\n callback({ version, uspString: this.ccpaShareData() }, true);\n } else if (command === 'ping') {\n callback({ version: 1, uspapiLoaded: true }, true);\n } else {\n callback(null, false);\n }\n }\n\n /**\n * This creates the USPAPI stub function used for IAB.\n */\n createUspIabHandlers() {\n const uspMsgHandler = function _uspMsgHandler(event) {\n try {\n const msgIsString = typeof event.data === 'string';\n let i;\n let json;\n\n try {\n json = msgIsString ? JSON.parse(event.data) : event.data;\n } catch (e) {\n json = {};\n }\n if (typeof json === 'object' && json !== null && json.__uspapiCall) {\n // sendTelemetryEvent('_uspMsgHandler', 'privacy-uspMessageHandler', {});\n i = json.__uspapiCall;\n window.__uspapi(\n i.command,\n i.version,\n function (retValue, success) {\n const returnMsg = {};\n\n returnMsg.__uspapiReturn = {\n returnValue: retValue,\n success,\n callId: i.callId,\n };\n event.source.postMessage(msgIsString ? JSON.stringify(returnMsg) : returnMsg, '*');\n },\n i.parameter\n );\n }\n } catch (e) {\n errorLogger('Privacy', '_uspMsgHandler', e);\n }\n };\n\n const usingUspFrame = findFrame('__uspapiLocator');\n\n /* CCPA IAB handler must always be defined, even in GDPR regions... */\n if (usingUspFrame === null) {\n /* But only for the top frame */\n addFrame('__uspapiLocator');\n window.__uspapi.msgHandler = uspMsgHandler;\n setHandler(window.__uspapi.msgHandler);\n }\n }\n\n /**\n * @method PrivacyModule#setUSPData\n * @param {Boolean} optOutBoolean - Pass true if you want to opt out of sharing data and false if you want to opt in to sharing data\n */\n setUSPData(optOutBoolean) {\n sendTelemetryEvent('setUSPData', 'privacy-setUSPData', {});\n\n const privacyEnabled = isPrivacyEnabled();\n if (!privacyEnabled) {\n debugLogger('privacy is off');\n return;\n }\n if (optOutBoolean) {\n return this.ccpaDoNotShare();\n }\n return this.ccpaShareData();\n }\n\n ccpaDoNotShare() {\n sendTelemetryEvent('ccpaDoNotShare', 'privacy-ccpaDoNotShare', {});\n\n const geoMatch = getGeoMatch();\n const privacyEnabled = isPrivacyEnabled();\n const existingUSPString = getUSPString();\n if (!privacyEnabled || !geoMatch) {\n return;\n }\n if (this.optOut === '-') {\n return;\n }\n if (existingUSPString === '1---' || existingUSPString === '1YYN') {\n return;\n }\n this.sendPrivacyEvent(true);\n this.optOut = 'Y';\n this.generateUSPString();\n setUSPString(this.uspString);\n setUSPObject(this.uspString);\n setUSPDataCookie(this.uspString, this.specCharacter);\n return this.uspString;\n }\n\n ccpaShareData() {\n sendTelemetryEvent('ccpaShareData', 'privacy-ccpaShareData', {});\n\n const geoMatch = getGeoMatch();\n const privacyEnabled = isPrivacyEnabled();\n const existingUSPString = getUSPString();\n if (!privacyEnabled || !geoMatch) {\n return;\n }\n if (this.optOut === '-') {\n return;\n }\n if (existingUSPString === '1---' || existingUSPString === '1YNN' || !existingUSPString) {\n return;\n }\n this.sendPrivacyEvent(false);\n this.optOut = 'N';\n this.generateUSPString();\n setUSPString(this.uspString);\n setUSPObject(this.uspString);\n setUSPDataCookie(this.uspString, this.specCharacter);\n return this.uspString;\n }\n\n generateUSPString() {\n const uspString = `${this.specCharacter}${this.opportunity}${this.optOut}${this.LSPA}`;\n this.uspString = uspString;\n return this.uspString;\n }\n\n initPrivacy() {\n this.createUspIabHandlers();\n const geoMatch = getGeoMatch();\n const existingUSPString = getUSPString();\n const uspBoolean = getUSPBoolean();\n const retryPrivacy = getOneCookie('retryPrivacy') || false;\n\n if (existingUSPString) {\n debugLogger('Privacy cookie already set');\n if (retryPrivacy) {\n this.sendPrivacyEvent(uspBoolean);\n }\n return existingUSPString;\n } else {\n if (!geoMatch) {\n this.specCharacter = '1';\n this.opportunity = '-';\n this.optOut = '-';\n this.LSPA = '-';\n } else {\n this.specCharacter = '1';\n this.opportunity = 'Y';\n this.optOut = 'N';\n this.LSPA = 'N';\n }\n this.generateUSPString();\n setUSPString(this.uspString);\n setUSPObject(this.uspString);\n setUSPDataCookie(this.uspString, this.specCharacter);\n }\n }\n}\n","/**\n * Internal function to find a frame, if it exists\n *\n * @param {string} locator - Locator string to use to find frame\n * @returns {object} - Child frame object if found, else null\n */\nfunction findFrame(locator) {\n let cf = null;\n let w;\n\n for (w = window; w; w = w.parent) {\n try {\n if (w.frames && w.frames[locator]) {\n cf = w;\n break;\n }\n } catch (e) {\n throw new Error(e);\n }\n if (w === window.top) {\n break;\n }\n }\n return cf;\n}\n/**\n * Internal function to add a frame for messaging\n *\n * @param {string} locator - locator string to use to name new frame\n * @returns {boolean} - true if successful, false if not\n */\nfunction addFrame(locator) {\n let iframe;\n\n if (!window.frames[locator]) {\n if (document.body) {\n iframe = document.createElement('iframe');\n iframe.style.cssText = 'display:none';\n iframe.name = locator;\n\n document.body.appendChild(iframe);\n } else {\n /* In the case where this stub is located in the head,\n * this allows us to inject the iframe more quickly than\n * relying on DOMContentLoaded or other events.\n */\n setTimeout(addFrame.bind(window, locator), 5);\n }\n return true;\n }\n return false;\n}\n/**\n * Internal function to set a messaging handler\n *\n * @param {function} handler - Function to use as messaging handler\n */\nfunction setHandler(handler) {\n if (window.addEventListener) {\n window.addEventListener('message', handler, false);\n } else {\n window.attachEvent('onmessage', handler);\n }\n}\n\nexport { findFrame, addFrame, setHandler };\n"],"names":["check","it","Math","globalThis","window","self","global","Function","exec","error","fails","Object","defineProperty","get","nativePropertyIsEnumerable","propertyIsEnumerable","getOwnPropertyDescriptor","call","1","V","descriptor","this","enumerable","bitmap","value","configurable","writable","toString","slice","split","classof","undefined","TypeError","IndexedObject","requireObjectCoercible","input","PREFERRED_STRING","isObject","fn","val","valueOf","hasOwnProperty","key","document","EXISTS","createElement","DESCRIPTORS","a","nativeGetOwnPropertyDescriptor","O","P","toIndexedObject","toPrimitive","IE8_DOM_DEFINE","has","createPropertyDescriptor","propertyIsEnumerableModule","f","String","nativeDefineProperty","Attributes","anObject","object","definePropertyModule","createNonEnumerableProperty","setGlobal","functionToString","store","inspectSource","set","WeakMap","test","module","push","version","mode","copyright","id","postfix","random","keys","shared","uid","NATIVE_WEAK_MAP","wmget","wmhas","wmset","metadata","STATE","sharedKey","hiddenKeys","objectHas","enforce","getterFor","TYPE","state","type","getInternalState","InternalStateModule","enforceInternalState","TEMPLATE","options","unsafe","simple","noTargetGet","source","join","prototype","aFunction","variable","namespace","method","arguments","length","path","ceil","floor","argument","isNaN","min","toInteger","max","createMethod","IS_INCLUDES","$this","el","fromIndex","toLength","index","integer","toAbsoluteIndex","indexOf","names","i","result","enumBugKeys","concat","getOwnPropertyNames","internalObjectKeys","getOwnPropertySymbols","getBuiltIn","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","target","ownKeys","getOwnPropertyDescriptorModule","replacement","isForced","feature","detection","data","normalize","POLYFILL","NATIVE","string","replace","toLowerCase","require$$0","targetProperty","sourceProperty","TARGET","GLOBAL","STATIC","stat","forced","copyConstructorProperties","sham","redefine","Promise","Symbol","NATIVE_SYMBOL","iterator","WellKnownSymbolsStore","createWellKnownSymbol","USE_SYMBOL_AS_UID","withoutSetter","name","TO_STRING_TAG","wellKnownSymbol","TAG","SPECIES","ITERATOR","ArrayPrototype","Array","that","b","c","apply","CORRECT_ARGUMENTS","classofRaw","TO_STRING_TAG_SUPPORT","tag","tryGet","callee","ENTRIES","returnMethod","Result","stopped","iterable","AS_ENTRIES","IS_ITERATOR","iterFn","next","step","boundFunction","bind","Iterators","getIteratorMethod","done","callWithSafeIterationClosing","stop","SAFE_CLOSING","called","iteratorWithReturn","return","from","defer","channel","port","userAgent","location","setImmediate","clear","clearImmediate","process","MessageChannel","Dispatch","counter","queue","run","runner","listener","event","post","postMessage","protocol","host","args","nextTick","now","IS_IOS","port2","port1","onmessage","addEventListener","importScripts","html","appendChild","removeChild","setTimeout","flush","head","last","notify","toggle","node","promise","then","macrotask","require$$1","MutationObserver","WebKitMutationObserver","IS_NODE","queueMicrotaskDescriptor","queueMicrotask","parent","domain","exit","enter","createTextNode","observe","characterData","resolve","match","task","PromiseCapability","C","reject","$$resolve","$$reject","x","constructor","promiseCapability","newPromiseCapability","versions","v8","Internal","OwnPromiseCapability","PromiseWrapper","nativeThen","Constructor","setInternalState","getInternalPromiseState","PromiseConstructor","NativePromise","$fetch","newPromiseCapabilityModule","newGenericPromiseCapability","DISPATCH_EVENT","createEvent","dispatchEvent","FORCED","V8_VERSION","PromiseRejectionEvent","FakePromise","INCORRECT_ITERATION","SKIP_CLOSING","ITERATION_SUPPORT","all","checkCorrectnessOfIteration","isThenable","isReject","notified","chain","reactions","microtask","ok","exited","reaction","handler","fail","rejection","onHandleUnhandled","onUnhandled","reason","initEvent","console","hostReportErrors","isUnhandled","perform","emit","unwrap","internalReject","internalResolve","wrapper","executor","anInstance","src","redefineAll","onFulfilled","onRejected","defaultConstructor","S","catch","$","fetch","promiseResolve","wrap","setToStringTag","r","capability","$promiseResolve","values","remaining","iterate","alreadyCalled","race","getRandomValues","crypto","msCrypto","rnds8","Uint8Array","rng","Error","validate","uuid","REGEX","byteToHex","substr","v4","buf","offset","rnds","arr","stringify","makeRequest","request","payload","JSON","extractRequestPayload","xhr","XMLHttpRequest","open","url","setRequestHeader","headers","property","readyState","responseParam","status","statusText","getAllResponseHeaders","parse","response","e","send","message","generateUUID","getGeoLocation","getGlobalObject","getOneCookie","cookieName","fullCookieName","decodeURIComponent","encodeURIComponent","cookies","cookie","pop","setCookie","cookieObject","cookieDomain","cookieString","expiration","Date","hostname","toUTCString","removeCookie","activeXDocument","DefaultConfigService","_config","dopplerUrl","baseEvent","isFeatureEnabled","isTelemetryEnabled","config","applyConfig","DefaultDopplerService","configService","featureFlagService","sourceIp","sendEvent","eventName","_this2","telemetryEnabled","navigator","platform","model","osName","osVersion","brand","ipAddress","eventId","eventType","companyName","productName","applicationName","device","userProperties","wmhhid","wminid","context","appLocation","library","eventProperties","dopplerBaseUrl","eventEnabled","doSend","href","_this4","WrappedFeatureFlagService","TELEMETRY_EVENT_PREFIX","unknownFlagsEnabled","featureEnabled","featureName","enabled","heartbeatFrequency","heartbeatInactivityTimeout","container","dopplerService","TelemetryBase","_featureFlagService","observers","sendAppLoad","addObserver","observer","notifyObservers","map","_this10","CACHE_USED","FeatureFlagStorage","storageType","clientId","storage","warnings","code","localStorage","UNABLE_TO_ACCESS_LOCAL_STORAGE","sessionStorage","UNABLE_TO_ACCESS_SESSION_STORAGE","storeItem","Storage","storageKey","getItem","setItem","deleteItem","defineProperties","Properties","objectKeys","IE_PROTO","EmptyConstructor","scriptTag","content","LT","NullProtoObject","ActiveXObject","iframeDocument","iframe","write","close","temp","parentWindow","NullProtoObjectViaActiveX","documentCreateElement","style","display","contentWindow","F","create","UNSCOPABLES","IteratorPrototype","PrototypeOfArrayIteratorPrototype","arrayIterator","getPrototypeOf","ObjectPrototype","CORRECT_PROTOTYPE_GETTER","toObject","BUGGY_SAFARI_ITERATORS","returnThis","setPrototypeOf","setter","CORRECT_SETTER","proto","aPossiblePrototype","__proto__","IteratorsCore","_catch","body","recover","Iterable","NAME","IteratorConstructor","DEFAULT","IS_SET","kind","createIteratorConstructor","CurrentIteratorPrototype","methods","KEY","getIterationMethod","KIND","defaultIterator","IterablePrototype","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","entries","defineIterator","iterated","Arguments","addToUnscopables","ERROR","HEX_CHARS","EXTRA","SHIFT","K","Sha256","blocks","h0","h1","h2","h3","h4","h5","h6","h7","block","start","bytes","hBytes","finalized","hashed","first","lastByteIndex","update","notString","ArrayBuffer","isArray","isView","charCodeAt","hash","finalize","j","t1","ab","da","cd","bc","d","g","h","hex","digest","array","arrayBuffer","buffer","dataView","DataView","setUint32","obj","ownProps","resArray","find","predicate","o","len","thisArg","k","kValue","FeatureFlagClient","fallbackConfig","quickInit","configRefreshIntervalDefault","featureFlagUserId","initialized","libraryLanguage","globalWarnings","addStorageWarnings","addStorageWarningsWarnings","warning","targetingPropsToLowerCase","targetingProperties","reduce","acc","valueLowerCase","entry","configUrl","createHash","userId","salt","createUserId","getUserFeatureIndex","parseInt","substring","init","initWarnings","_userId","ffUserId","userTargetingProperties","ffLibraryLanguage","updateContext","configRefreshInterval","cacheIsExpired","checkConfigCacheExpiry","configFromStorage","updateConfig","prevETag","loadAndSetRemoteConfig","_exit2","setNoNewConfigWarning","interval","expired","setIntervalStart","timestamp","configCacheStartSerialized","_now","getTime","configCacheStart","_now2","flagName","queryFeatureFlag","_this8","eTag","etag","loadConfig","If-None-Match","userTargeting","replaceAllTargeting","newContext","mergedTargetingProperties","getCohortConfig","cohortConfigs","cohortConfig","rolloutValue","cohortPriority","stickinessProperty","cohortConfigsSorted","sort","clientTargetingProperties","matchedCohortConfig","matchDetected","cohortCriteria","cohortFields","requiredFieldName","requiredFieldValues","cohortFieldFoundInContext","some","fieldValue","contextValue","cacheFlagResults","results","prevResults","prevResultsReduced","newResults","storedResultsString","storedResults","accumulator","currentValue","flagId","mergedResults","checkIfFlagUpdated","prevFlag","isQueryAll","flagConfig","hashId","operationalId","userFeatureIndex","mergeWarnings","updatedSinceLastQuery","userIdType","arrayToMerge","getFlagConfig","flags","flag","getFallbackConfig","defaultValue","initWwarnings","_exit6","cohorts","_addStorageWarningsWarnings","_result","queryAllFeatureFlags","_this","_this12","featureFlagResponse","anyFlagsUpdatedSinceLastQuery","promises","featureFlagData","getDomain","psmMetaData","urlObject","featureFlag","DEV","QA","PROD","INTEGRATION","privacy","identity","telemetry","errors","ffLocalConfig","featureFlagLibraryVersion","defaultFlagState","getUrl","environment","urlType","uppercaseEnv","toUpperCase","findFlag","idToLookFor","getFlagState","featureFlagFromSessionStorage","isPrivacyEnabled","isIdentityEnabled","getGeoMatch","userLocation","createBaseEvent","params","wmukidCookie","wmukid","_getOneCookie","baseObject","appId","attuid","toISOString","ids","kruxid","debugLogger","info","errorLogger","errorDetails","wmUkId","errorObject","WMUKID","Brand","Platform","errorMessage","FunctionPrototype","FunctionPrototypeToString","nameRE","sendTelemetryEvent","methodName","WM","CDP","telemetryModule","nativeAssign","assign","A","B","symbol","forEach","chr","T","argumentsLength","setRetryFlag","retry","registerIdentity","baseEventObject","retryIds","locationData","states","cities","zipcodes","output","addressDetails","country","country_alpha2","city","zips","idEventObject","ip","ip_address","pair","pairs","splice","identityUrl","resp","getWMUKID","identityEnabled","geoMatch","removeWMUKID","getUSPString","getUSPObject","getUSPData","getUSPBoolean","uspBoolean","uspString","getUSPInt","uspInt","setUSPObject","uspObject","comScore","setUSPDataCookie","spec","setUSPString","initPsm","brandName","locationOverride","getFeatureFlags","FFClient","telemetryUrl","flagDefault","initializeTelemetry","privacyModule","initPrivacy","featureFlagUrl","externalIds","existingKruxId","newKruxId","kruxId","Krux","kuid","localKruxId","getKruxId","updateExternalIds","geoService","ffClient","featureFlags","specCharacter","opportunity","optOut","LSPA","ccpaDoNotShare","ccpaShareData","setUSPData","__uspapi","sendPrivacyEvent","privacyObject","privacyUrl","command","callback","uspapiLoaded","createUspIabHandlers","locator","w","cf","frames","top","findFrame","addFrame","cssText","msgHandler","json","msgIsString","__uspapiCall","retValue","success","returnMsg","__uspapiReturn","returnValue","callId","parameter","attachEvent","optOutBoolean","privacyEnabled","existingUSPString","generateUSPString","retryPrivacy","getVersion"],"mappings":"whBAAA,IAAIA,EAAQ,SAAUC,GACpB,OAAOA,GAAMA,EAAGC,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