@snowplow/browser-plugin-debugger 4.1.1-dev.2 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.min.js","sources":["../../../common/temp/node_modules/.pnpm/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs","../../../libraries/tracker-core/dist/index.module.js","../src/index.ts","../../../common/temp/node_modules/.pnpm/randomcolor@0.6.2/node_modules/randomcolor/randomColor.js"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","/*!\n * Core functionality for Snowplow JavaScript trackers v4.1.1-dev.2 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { __spreadArray, __assign, __awaiter, __generator } from 'tslib';\nimport { v4 } from 'uuid';\n\nvar version$1 = \"4.1.1-dev.2\";\n\n/*\n * Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io)\n * and Contributors (http://phpjs.org/authors)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/**\n * Decodes a url safe Base 64 encoded string\n * @remarks See: {@link http://tools.ietf.org/html/rfc4648#page-7}\n * @param data - String to decode\n * @returns The decoded string\n */\nfunction base64urldecode(data) {\n if (!data) {\n return data;\n }\n var padding = 4 - (data.length % 4);\n switch (padding) {\n case 2:\n data += '==';\n break;\n case 3:\n data += '=';\n break;\n }\n var b64Data = data.replace(/-/g, '+').replace(/_/g, '/');\n return base64decode(b64Data);\n}\n/**\n * Encodes a string into a url safe Base 64 encoded string\n * @remarks See: {@link http://tools.ietf.org/html/rfc4648#page-7}\n * @param data - String to encode\n * @returns The url safe Base 64 string\n */\nfunction base64urlencode(data) {\n if (!data) {\n return data;\n }\n var enc = base64encode(data);\n return enc.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n}\nvar b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n/**\n * Encode string as base64.\n * Any type can be passed, but will be stringified\n *\n * @param data - string to encode\n * @returns base64-encoded string\n */\nfunction base64encode(data) {\n // discuss at: http://phpjs.org/functions/base64_encode/\n // original by: Tyler Akins (http://rumkin.com)\n // improved by: Bayron Guevara\n // improved by: Thunder.m\n // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // improved by: Rafał Kukawski (http://kukawski.pl)\n // bugfixed by: Pellentesque Malesuada\n // example 1: base64_encode('Kevin van Zonneveld');\n // returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA=='\n // example 2: base64_encode('a');\n // returns 2: 'YQ=='\n // example 3: base64_encode('✓ à la mode');\n // returns 3: '4pyTIMOgIGxhIG1vZGU='\n var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0;\n var tmp_arr = [];\n if (!data) {\n return data;\n }\n data = unescape(encodeURIComponent(data));\n do {\n // pack three octets into four hexets\n o1 = data.charCodeAt(i++);\n o2 = data.charCodeAt(i++);\n o3 = data.charCodeAt(i++);\n bits = (o1 << 16) | (o2 << 8) | o3;\n h1 = (bits >> 18) & 0x3f;\n h2 = (bits >> 12) & 0x3f;\n h3 = (bits >> 6) & 0x3f;\n h4 = bits & 0x3f;\n // use hexets to index into b64, and append result to encoded string\n tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);\n } while (i < data.length);\n var enc = tmp_arr.join('');\n var r = data.length % 3;\n return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3);\n}\n/**\n * Decode base64 to string\n *\n * @param data - base64 to string\n * @returns decoded string\n */\nfunction base64decode(encodedData) {\n // discuss at: http://locutus.io/php/base64_decode/\n // original by: Tyler Akins (http://rumkin.com)\n // improved by: Thunder.m\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: Aman Gupta\n // input by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Pellentesque Malesuada\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Indigo744\n // example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==')\n // returns 1: 'Kevin van Zonneveld'\n // example 2: base64_decode('YQ==')\n // returns 2: 'a'\n // example 3: base64_decode('4pyTIMOgIGxhIG1vZGU=')\n // returns 3: '✓ à la mode'\n // decodeUTF8string()\n // Internal function to decode properly UTF8 string\n // Adapted from Solution #1 at https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding\n var decodeUTF8string = function (str) {\n // Going backwards: from bytestream, to percent-encoding, to original string.\n return decodeURIComponent(str\n .split('')\n .map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\n })\n .join(''));\n };\n var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, dec = '';\n var tmpArr = [];\n if (!encodedData) {\n return encodedData;\n }\n encodedData += '';\n do {\n // unpack four hexets into three octets using index points in b64\n h1 = b64.indexOf(encodedData.charAt(i++));\n h2 = b64.indexOf(encodedData.charAt(i++));\n h3 = b64.indexOf(encodedData.charAt(i++));\n h4 = b64.indexOf(encodedData.charAt(i++));\n bits = (h1 << 18) | (h2 << 12) | (h3 << 6) | h4;\n o1 = (bits >> 16) & 0xff;\n o2 = (bits >> 8) & 0xff;\n o3 = bits & 0xff;\n if (h3 === 64) {\n tmpArr[ac++] = String.fromCharCode(o1);\n }\n else if (h4 === 64) {\n tmpArr[ac++] = String.fromCharCode(o1, o2);\n }\n else {\n tmpArr[ac++] = String.fromCharCode(o1, o2, o3);\n }\n } while (i < encodedData.length);\n dec = tmpArr.join('');\n return decodeUTF8string(dec.replace(/\\0+$/, ''));\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nfunction payloadBuilder() {\n var dict = {}, allJson = [], jsonForProcessing = [], contextEntitiesForProcessing = [];\n var processor;\n var add = function (key, value) {\n if (value != null && value !== '') {\n // null also checks undefined\n dict[key] = value;\n }\n };\n var addDict = function (dict) {\n for (var key in dict) {\n if (Object.prototype.hasOwnProperty.call(dict, key)) {\n add(key, dict[key]);\n }\n }\n };\n var addJson = function (keyIfEncoded, keyIfNotEncoded, json) {\n if (json && isNonEmptyJson(json)) {\n var jsonWithKeys = { keyIfEncoded: keyIfEncoded, keyIfNotEncoded: keyIfNotEncoded, json: json };\n jsonForProcessing.push(jsonWithKeys);\n allJson.push(jsonWithKeys);\n }\n };\n var addContextEntity = function (entity) {\n contextEntitiesForProcessing.push(entity);\n };\n return {\n add: add,\n addDict: addDict,\n addJson: addJson,\n addContextEntity: addContextEntity,\n getPayload: function () { return dict; },\n getJson: function () { return allJson; },\n withJsonProcessor: function (jsonProcessor) {\n processor = jsonProcessor;\n },\n build: function () {\n processor === null || processor === void 0 ? void 0 : processor(this, jsonForProcessing, contextEntitiesForProcessing);\n return dict;\n },\n };\n}\n/**\n * A helper to build a Snowplow request from a set of name-value pairs, provided using the add methods.\n * Will base64 encode JSON, if desired, on build\n *\n * @returns The request builder, with add and build methods\n */\nfunction payloadJsonProcessor(encodeBase64) {\n return function (payloadBuilder, jsonForProcessing, contextEntitiesForProcessing) {\n var add = function (json, keyIfEncoded, keyIfNotEncoded) {\n var str = JSON.stringify(json);\n if (encodeBase64) {\n payloadBuilder.add(keyIfEncoded, base64urlencode(str));\n }\n else {\n payloadBuilder.add(keyIfNotEncoded, str);\n }\n };\n var getContextFromPayload = function () {\n var payload = payloadBuilder.getPayload();\n if (encodeBase64 ? payload.cx : payload.co) {\n return JSON.parse(encodeBase64 ? base64urldecode(payload.cx) : payload.co);\n }\n return undefined;\n };\n var combineContexts = function (originalContext, newContext) {\n var context = originalContext || getContextFromPayload();\n if (context) {\n context.data = context.data.concat(newContext.data);\n }\n else {\n context = newContext;\n }\n return context;\n };\n var context = undefined;\n for (var _i = 0, jsonForProcessing_1 = jsonForProcessing; _i < jsonForProcessing_1.length; _i++) {\n var json = jsonForProcessing_1[_i];\n if (json.keyIfEncoded === 'cx') {\n context = combineContexts(context, json.json);\n }\n else {\n add(json.json, json.keyIfEncoded, json.keyIfNotEncoded);\n }\n }\n jsonForProcessing.length = 0;\n if (contextEntitiesForProcessing.length) {\n var newContext = {\n schema: 'iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0',\n data: __spreadArray([], contextEntitiesForProcessing, true),\n };\n context = combineContexts(context, newContext);\n contextEntitiesForProcessing.length = 0;\n }\n if (context) {\n add(context, 'cx', 'co');\n }\n };\n}\n/**\n * Is property a non-empty JSON?\n * @param property - Checks if object is non-empty json\n */\nfunction isNonEmptyJson(property) {\n if (!isJson(property)) {\n return false;\n }\n for (var key in property) {\n if (Object.prototype.hasOwnProperty.call(property, key)) {\n return true;\n }\n }\n return false;\n}\n/**\n * Is property a JSON?\n * @param property - Checks if object is json\n */\nfunction isJson(property) {\n return (typeof property !== 'undefined' &&\n property !== null &&\n (property.constructor === {}.constructor || property.constructor === [].constructor));\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar label = 'Snowplow: ';\nvar LOG_LEVEL;\n(function (LOG_LEVEL) {\n LOG_LEVEL[LOG_LEVEL[\"none\"] = 0] = \"none\";\n LOG_LEVEL[LOG_LEVEL[\"error\"] = 1] = \"error\";\n LOG_LEVEL[LOG_LEVEL[\"warn\"] = 2] = \"warn\";\n LOG_LEVEL[LOG_LEVEL[\"debug\"] = 3] = \"debug\";\n LOG_LEVEL[LOG_LEVEL[\"info\"] = 4] = \"info\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\nvar LOG = logger();\nfunction logger(logLevel) {\n if (logLevel === void 0) { logLevel = LOG_LEVEL.warn; }\n function setLogLevel(level) {\n if (LOG_LEVEL[level]) {\n logLevel = level;\n }\n else {\n logLevel = LOG_LEVEL.warn;\n }\n }\n /**\n * Log errors, with or without error object\n */\n function error(message, error) {\n var extraParams = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n extraParams[_i - 2] = arguments[_i];\n }\n if (logLevel >= LOG_LEVEL.error && typeof console !== 'undefined') {\n var logMsg = label + message + '\\n';\n if (error) {\n console.error.apply(console, __spreadArray([logMsg + '\\n', error], extraParams, false));\n }\n else {\n console.error.apply(console, __spreadArray([logMsg], extraParams, false));\n }\n }\n }\n /**\n * Log warnings, with or without error object\n */\n function warn(message, error) {\n var extraParams = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n extraParams[_i - 2] = arguments[_i];\n }\n if (logLevel >= LOG_LEVEL.warn && typeof console !== 'undefined') {\n var logMsg = label + message;\n if (error) {\n console.warn.apply(console, __spreadArray([logMsg + '\\n', error], extraParams, false));\n }\n else {\n console.warn.apply(console, __spreadArray([logMsg], extraParams, false));\n }\n }\n }\n /**\n * Log debug messages\n */\n function debug(message) {\n var extraParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n extraParams[_i - 1] = arguments[_i];\n }\n if (logLevel >= LOG_LEVEL.debug && typeof console !== 'undefined') {\n console.debug.apply(console, __spreadArray([label + message], extraParams, false));\n }\n }\n /**\n * Log info messages\n */\n function info(message) {\n var extraParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n extraParams[_i - 1] = arguments[_i];\n }\n if (logLevel >= LOG_LEVEL.info && typeof console !== 'undefined') {\n console.info.apply(console, __spreadArray([label + message], extraParams, false));\n }\n }\n return { setLogLevel: setLogLevel, warn: warn, error: error, debug: debug, info: info };\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Contains helper functions to aid in the addition and removal of Global Contexts\n */\nfunction globalContexts() {\n var globalPrimitives = [];\n var conditionalProviders = [];\n var namedPrimitives = {};\n var namedConditionalProviders = {};\n /**\n * Returns all applicable global contexts for a specified event\n * @param event - The event to check for applicable global contexts for\n * @returns An array of contexts\n */\n var assembleAllContexts = function (event) {\n var eventSchema = getUsefulSchema(event);\n var eventType = getEventType(event);\n var contexts = [];\n var generatedPrimitives = generatePrimitives(globalPrimitives.concat(Object.values(namedPrimitives)), event, eventType, eventSchema);\n contexts.push.apply(contexts, generatedPrimitives);\n var generatedConditionals = generateConditionals(conditionalProviders.concat(Object.values(namedConditionalProviders)), event, eventType, eventSchema);\n contexts.push.apply(contexts, generatedConditionals);\n return contexts;\n };\n return {\n getGlobalPrimitives: function () {\n return globalPrimitives.concat(Object.values(namedPrimitives));\n },\n getConditionalProviders: function () {\n return conditionalProviders.concat(Object.values(namedConditionalProviders));\n },\n addGlobalContexts: function (contexts) {\n if (Array.isArray(contexts)) {\n var acceptedConditionalContexts = [];\n var acceptedContextPrimitives = [];\n for (var _i = 0, contexts_1 = contexts; _i < contexts_1.length; _i++) {\n var context = contexts_1[_i];\n if (isConditionalContextProvider(context)) {\n acceptedConditionalContexts.push(context);\n }\n else if (isContextPrimitive(context)) {\n acceptedContextPrimitives.push(context);\n }\n }\n globalPrimitives = globalPrimitives.concat(acceptedContextPrimitives);\n conditionalProviders = conditionalProviders.concat(acceptedConditionalContexts);\n }\n else {\n for (var _a = 0, _b = Object.entries(contexts); _a < _b.length; _a++) {\n var _c = _b[_a], name_1 = _c[0], context = _c[1];\n if (isConditionalContextProvider(context)) {\n namedConditionalProviders[name_1] = context;\n }\n else if (isContextPrimitive(context)) {\n namedPrimitives[name_1] = context;\n }\n }\n }\n },\n clearGlobalContexts: function () {\n conditionalProviders = [];\n globalPrimitives = [];\n namedConditionalProviders = {};\n namedPrimitives = {};\n },\n removeGlobalContexts: function (contexts) {\n var _loop_1 = function (context) {\n if (typeof context === 'string') {\n delete namedConditionalProviders[context];\n delete namedPrimitives[context];\n }\n else if (isConditionalContextProvider(context)) {\n conditionalProviders = conditionalProviders.filter(function (item) { return !compareProvider(context, item); });\n }\n else if (isContextPrimitive(context)) {\n globalPrimitives = globalPrimitives.filter(function (item) { return !compareProvider(context, item); });\n }\n };\n for (var _i = 0, contexts_2 = contexts; _i < contexts_2.length; _i++) {\n var context = contexts_2[_i];\n _loop_1(context);\n }\n },\n getApplicableContexts: function (event) {\n return assembleAllContexts(event);\n },\n };\n}\nfunction pluginContexts(plugins) {\n /**\n * Add common contexts to every event\n *\n * @param array - additionalContexts List of user-defined contexts\n * @returns userContexts combined with commonContexts\n */\n return {\n addPluginContexts: function (additionalContexts) {\n var combinedContexts = additionalContexts\n ? __spreadArray([], additionalContexts, true) : [];\n plugins.forEach(function (plugin) {\n try {\n if (plugin.contexts) {\n combinedContexts.push.apply(combinedContexts, plugin.contexts());\n }\n }\n catch (ex) {\n LOG.error('Error adding plugin contexts', ex);\n }\n });\n return combinedContexts;\n },\n };\n}\n/**\n * Find dynamic context generating functions and return their results to be merged into the static contexts\n * Combine an array of unchanging contexts with the result of a context-creating function\n *\n * @param dynamicOrStaticContexts - Array of custom context Objects or custom context generating functions\n * @param Parameters - to pass to dynamic context callbacks\n * @returns An array of Self Describing JSON context\n */\nfunction resolveDynamicContext(dynamicOrStaticContexts) {\n var _a;\n var extraParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n extraParams[_i - 1] = arguments[_i];\n }\n return ((_a = dynamicOrStaticContexts === null || dynamicOrStaticContexts === void 0 ? void 0 : dynamicOrStaticContexts.map(function (context) {\n if (typeof context === 'function') {\n try {\n return context.apply(void 0, extraParams);\n }\n catch (e) {\n //TODO: provide warning\n return undefined;\n }\n }\n else {\n return context;\n }\n }).filter(Boolean)) !== null && _a !== void 0 ? _a : []);\n}\n/**\n * Slices a schema into its composite parts. Useful for ruleset filtering.\n * @param input - A schema string\n * @returns The vendor, schema name, major, minor and patch information of a schema string\n */\nfunction getSchemaParts(input) {\n var re = new RegExp('^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/jsonschema/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$');\n var matches = re.exec(input);\n if (matches !== null)\n return matches.slice(1, 6);\n return undefined;\n}\n/**\n * Validates the vendor section of a schema string contains allowed wildcard values\n * @param parts - Array of parts from a schema string\n * @returns Whether the vendor validation parts are a valid combination\n */\nfunction validateVendorParts(parts) {\n if (parts[0] === '*' || parts[1] === '*') {\n return false; // no wildcard in first or second part\n }\n if (parts.slice(2).length > 0) {\n var asterisk = false;\n for (var _i = 0, _a = parts.slice(2); _i < _a.length; _i++) {\n var part = _a[_i];\n if (part === '*')\n // mark when we've found a wildcard\n asterisk = true;\n else if (asterisk)\n // invalid if alpha parts come after wildcard\n return false;\n }\n return true;\n }\n else if (parts.length == 2)\n return true;\n return false;\n}\n/**\n * Validates the vendor part of a schema string is valid for a rule set\n * @param input - Vendor part of a schema string\n * @returns Whether the vendor validation string is valid\n */\nfunction validateVendor(input) {\n var parts = input.split('.');\n if (parts && parts.length > 1)\n return validateVendorParts(parts);\n return false;\n}\n/**\n * Checks for validity of input and returns all the sections of a schema string that are used to match rules in a ruleset\n * @param input - A Schema string\n * @returns The sections of a schema string that are used to match rules in a ruleset\n */\nfunction getRuleParts(input) {\n var re = new RegExp('^iglu:((?:(?:[a-zA-Z0-9-_]+|\\\\*).)+(?:[a-zA-Z0-9-_]+|\\\\*))/([a-zA-Z0-9-_.]+|\\\\*)/jsonschema/([1-9][0-9]*|\\\\*)-(0|[1-9][0-9]*|\\\\*)-(0|[1-9][0-9]*|\\\\*)$');\n var matches = re.exec(input);\n if (matches !== null && validateVendor(matches[1]))\n return matches.slice(1, 6);\n return undefined;\n}\n/**\n * Ensures the rules specified in a schema string of a ruleset are valid\n * @param input - A Schema string\n * @returns if there rule is valid\n */\nfunction isValidRule(input) {\n var ruleParts = getRuleParts(input);\n if (ruleParts) {\n var vendor = ruleParts[0];\n return ruleParts.length === 5 && validateVendor(vendor);\n }\n return false;\n}\n/**\n * Check if a variable is an Array containing only strings\n * @param input - The variable to validate\n * @returns True if the input is an array containing only strings\n */\nfunction isStringArray(input) {\n return (Array.isArray(input) &&\n input.every(function (x) {\n return typeof x === 'string';\n }));\n}\n/**\n * Validates whether a rule set is an array of valid ruleset strings\n * @param input - The Array of rule set arguments\n * @returns True is the input is an array of valid rules\n */\nfunction isValidRuleSetArg(input) {\n if (isStringArray(input))\n return input.every(function (x) {\n return isValidRule(x);\n });\n else if (typeof input === 'string')\n return isValidRule(input);\n return false;\n}\n/**\n * Check if a variable is a valid, non-empty Self Describing JSON\n * @param input - The variable to validate\n * @returns True if a valid Self Describing JSON\n */\nfunction isSelfDescribingJson(input) {\n var sdj = input;\n if (isNonEmptyJson(sdj))\n if ('schema' in sdj && 'data' in sdj)\n return typeof sdj.schema === 'string' && typeof sdj.data === 'object';\n return false;\n}\n/**\n * Validates if the input object contains the expected properties of a ruleset\n * @param input - The object containing a rule set\n * @returns True if a valid rule set\n */\nfunction isRuleSet(input) {\n var ruleSet = input;\n var ruleCount = 0;\n if (input != null && typeof input === 'object' && !Array.isArray(input)) {\n if (Object.prototype.hasOwnProperty.call(ruleSet, 'accept')) {\n if (isValidRuleSetArg(ruleSet['accept'])) {\n ruleCount += 1;\n }\n else {\n return false;\n }\n }\n if (Object.prototype.hasOwnProperty.call(ruleSet, 'reject')) {\n if (isValidRuleSetArg(ruleSet['reject'])) {\n ruleCount += 1;\n }\n else {\n return false;\n }\n }\n // if either 'reject' or 'accept' or both exists,\n // we have a valid ruleset\n return ruleCount > 0 && ruleCount <= 2;\n }\n return false;\n}\n/**\n * Validates if the function can be a valid context generator function\n * @param input - The function to be validated\n */\nfunction isContextCallbackFunction(input) {\n return typeof input === 'function' && input.length <= 1;\n}\n/**\n * Validates if the function can be a valid context primitive function or self describing json\n * @param input - The function or orbject to be validated\n * @returns True if either a Context Generator or Self Describing JSON\n */\nfunction isContextPrimitive(input) {\n return isContextCallbackFunction(input) || isSelfDescribingJson(input);\n}\n/**\n * Validates if an array is a valid shape to be a Filter Provider\n * @param input - The Array of Context filter callbacks\n */\nfunction isFilterProvider(input) {\n if (Array.isArray(input)) {\n if (input.length === 2) {\n if (Array.isArray(input[1])) {\n return isContextCallbackFunction(input[0]) && input[1].every(isContextPrimitive);\n }\n return isContextCallbackFunction(input[0]) && isContextPrimitive(input[1]);\n }\n }\n return false;\n}\n/**\n * Validates if an array is a valid shape to be an array of rule sets\n * @param input - The Array of Rule Sets\n */\nfunction isRuleSetProvider(input) {\n if (Array.isArray(input) && input.length === 2) {\n if (!isRuleSet(input[0]))\n return false;\n if (Array.isArray(input[1]))\n return input[1].every(isContextPrimitive);\n return isContextPrimitive(input[1]);\n }\n return false;\n}\n/**\n * Checks if an input array is either a filter provider or a rule set provider\n * @param input - An array of filter providers or rule set providers\n * @returns Whether the array is a valid {@link ConditionalContextProvider}\n */\nfunction isConditionalContextProvider(input) {\n return isFilterProvider(input) || isRuleSetProvider(input);\n}\n/**\n * Checks if a given schema matches any rules within the provided rule set\n * @param ruleSet - The rule set containing rules to match schema against\n * @param schema - The schema to be matched against the rule set\n */\nfunction matchSchemaAgainstRuleSet(ruleSet, schema) {\n var rejectCount = 0;\n var acceptCount = 0;\n var acceptRules = ruleSet['accept'];\n if (Array.isArray(acceptRules)) {\n if (ruleSet.accept.some(function (rule) { return matchSchemaAgainstRule(rule, schema); })) {\n acceptCount++;\n }\n }\n else if (typeof acceptRules === 'string') {\n if (matchSchemaAgainstRule(acceptRules, schema)) {\n acceptCount++;\n }\n }\n var rejectRules = ruleSet['reject'];\n if (Array.isArray(rejectRules)) {\n if (ruleSet.reject.some(function (rule) { return matchSchemaAgainstRule(rule, schema); })) {\n rejectCount++;\n }\n }\n else if (typeof rejectRules === 'string') {\n if (matchSchemaAgainstRule(rejectRules, schema)) {\n rejectCount++;\n }\n }\n if (acceptCount > 0 && rejectCount === 0) {\n return true;\n }\n else if (acceptCount === 0 && rejectCount > 0) {\n return false;\n }\n return false;\n}\n/**\n * Checks if a given schema matches a specific rule from a rule set\n * @param rule - The rule to match schema against\n * @param schema - The schema to be matched against the rule\n */\nfunction matchSchemaAgainstRule(rule, schema) {\n if (!isValidRule(rule))\n return false;\n var ruleParts = getRuleParts(rule);\n var schemaParts = getSchemaParts(schema);\n if (ruleParts && schemaParts) {\n if (!matchVendor(ruleParts[0], schemaParts[0]))\n return false;\n for (var i = 1; i < 5; i++) {\n if (!matchPart(ruleParts[i], schemaParts[i]))\n return false;\n }\n return true; // if it hasn't failed, it passes\n }\n return false;\n}\nfunction matchVendor(rule, vendor) {\n // rule and vendor must have same number of elements\n var vendorParts = vendor.split('.');\n var ruleParts = rule.split('.');\n if (vendorParts && ruleParts) {\n if (vendorParts.length !== ruleParts.length)\n return false;\n for (var i = 0; i < ruleParts.length; i++) {\n if (!matchPart(vendorParts[i], ruleParts[i]))\n return false;\n }\n return true;\n }\n return false;\n}\nfunction matchPart(rule, schema) {\n // parts should be the string nested between slashes in the URI: /example/\n return (rule && schema && rule === '*') || rule === schema;\n}\n// Returns the \"useful\" schema, i.e. what would someone want to use to identify events.\n// For some events this is the 'e' property but for unstructured events, this is the\n// 'schema' from the 'ue_px' field.\nfunction getUsefulSchema(sb) {\n var eventJson = sb.getJson();\n for (var _i = 0, eventJson_1 = eventJson; _i < eventJson_1.length; _i++) {\n var json = eventJson_1[_i];\n if (json.keyIfEncoded === 'ue_px' && typeof json.json['data'] === 'object') {\n var schema = json.json['data']['schema'];\n if (typeof schema == 'string') {\n return schema;\n }\n }\n }\n return '';\n}\nfunction getEventType(payloadBuilder) {\n var eventType = payloadBuilder.getPayload()['e'];\n return typeof eventType === 'string' ? eventType : '';\n}\nfunction buildGenerator(generator, event, eventType, eventSchema) {\n var contextGeneratorResult = undefined;\n try {\n // try to evaluate context generator\n var args = {\n event: event.getPayload(),\n eventType: eventType,\n eventSchema: eventSchema,\n };\n contextGeneratorResult = generator(args);\n // determine if the produced result is a valid SDJ\n if (Array.isArray(contextGeneratorResult) && contextGeneratorResult.every(isSelfDescribingJson)) {\n return contextGeneratorResult;\n }\n else if (isSelfDescribingJson(contextGeneratorResult)) {\n return contextGeneratorResult;\n }\n else {\n return undefined;\n }\n }\n catch (error) {\n contextGeneratorResult = undefined;\n }\n return contextGeneratorResult;\n}\nfunction normalizeToArray(input) {\n if (Array.isArray(input)) {\n return input;\n }\n return Array.of(input);\n}\nfunction generatePrimitives(contextPrimitives, event, eventType, eventSchema) {\n var _a;\n var normalizedInputs = normalizeToArray(contextPrimitives);\n var partialEvaluate = function (primitive) {\n var result = evaluatePrimitive(primitive, event, eventType, eventSchema);\n if (result && result.length !== 0) {\n return result;\n }\n return undefined;\n };\n var generatedContexts = normalizedInputs.map(partialEvaluate);\n return (_a = []).concat.apply(_a, generatedContexts.filter(function (c) { return c != null && c.filter(Boolean); }));\n}\nfunction evaluatePrimitive(contextPrimitive, event, eventType, eventSchema) {\n if (isSelfDescribingJson(contextPrimitive)) {\n return [contextPrimitive];\n }\n else if (isContextCallbackFunction(contextPrimitive)) {\n var generatorOutput = buildGenerator(contextPrimitive, event, eventType, eventSchema);\n if (isSelfDescribingJson(generatorOutput)) {\n return [generatorOutput];\n }\n else if (Array.isArray(generatorOutput)) {\n return generatorOutput;\n }\n }\n return undefined;\n}\nfunction evaluateProvider(provider, event, eventType, eventSchema) {\n if (isFilterProvider(provider)) {\n var filter = provider[0];\n var filterResult = false;\n try {\n var args = {\n event: event.getPayload(),\n eventType: eventType,\n eventSchema: eventSchema,\n };\n filterResult = filter(args);\n }\n catch (error) {\n filterResult = false;\n }\n if (filterResult === true) {\n return generatePrimitives(provider[1], event, eventType, eventSchema);\n }\n }\n else if (isRuleSetProvider(provider)) {\n if (matchSchemaAgainstRuleSet(provider[0], eventSchema)) {\n return generatePrimitives(provider[1], event, eventType, eventSchema);\n }\n }\n return [];\n}\nfunction compareProviderPart(a, b) {\n if (typeof a === 'function')\n return a === b;\n return JSON.stringify(a) === JSON.stringify(b);\n}\nfunction compareProvider(a, b) {\n if (isConditionalContextProvider(a)) {\n if (!isConditionalContextProvider(b))\n return false;\n var ruleA = a[0], primitivesA = a[1];\n var ruleB = b[0], primitivesB_1 = b[1];\n if (!compareProviderPart(ruleA, ruleB))\n return false;\n if (Array.isArray(primitivesA)) {\n if (!Array.isArray(primitivesB_1))\n return false;\n if (primitivesA.length !== primitivesB_1.length)\n return false;\n return primitivesA.reduce(function (matches, a, i) { return matches && compareProviderPart(a, primitivesB_1[i]); }, true);\n }\n else {\n if (Array.isArray(primitivesB_1))\n return false;\n return compareProviderPart(primitivesA, primitivesB_1);\n }\n }\n else if (isContextPrimitive(a)) {\n if (!isContextPrimitive(b))\n return false;\n return compareProviderPart(a, b);\n }\n return false;\n}\nfunction generateConditionals(providers, event, eventType, eventSchema) {\n var _a;\n var normalizedInput = normalizeToArray(providers);\n var partialEvaluate = function (provider) {\n var result = evaluateProvider(provider, event, eventType, eventSchema);\n if (result && result.length !== 0) {\n return result;\n }\n return undefined;\n };\n var generatedContexts = normalizedInput.map(partialEvaluate);\n return (_a = []).concat.apply(_a, generatedContexts.filter(function (c) { return c != null && c.filter(Boolean); }));\n}\n\n/**\n * Create a new EventStorePayload\n */\nfunction newEventStorePayload(_a) {\n var payload = _a.payload, _b = _a.svrAnon, svrAnon = _b === void 0 ? false : _b;\n return {\n payload: payload,\n svrAnon: svrAnon,\n };\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Transform optional/old-behavior number timestamp into`Timestamp` ADT\n *\n * @param timestamp - optional number or timestamp object\n * @returns correct timestamp object\n */\nfunction getTimestamp(timestamp) {\n if (timestamp == null) {\n return { type: 'dtm', value: new Date().getTime() };\n }\n else if (typeof timestamp === 'number') {\n return { type: 'dtm', value: timestamp };\n }\n else if (timestamp.type === 'ttm') {\n // We can return timestamp here, but this is safer fallback\n return { type: 'ttm', value: timestamp.value };\n }\n else {\n return { type: 'dtm', value: timestamp.value || new Date().getTime() };\n }\n}\n/**\n * Create a tracker core object\n *\n * @param base64 - Whether to base 64 encode contexts and self describing event JSONs\n * @param corePlugins - The core plugins to be processed with each event\n * @param callback - Function applied to every payload dictionary object\n * @returns Tracker core\n */\nfunction trackerCore(configuration) {\n if (configuration === void 0) { configuration = {}; }\n function newCore(base64, corePlugins, callback) {\n var pluginContextsHelper = pluginContexts(corePlugins), globalContextsHelper = globalContexts();\n var encodeBase64 = base64, payloadPairs = {}; // Dictionary of key-value pairs which get added to every payload, e.g. tracker version\n /**\n * Wraps an array of custom contexts in a self-describing JSON\n *\n * @param contexts - Array of custom context self-describing JSONs\n * @returns Outer JSON\n */\n function completeContexts(contexts) {\n if (contexts && contexts.length) {\n return {\n schema: 'iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0',\n data: contexts,\n };\n }\n return undefined;\n }\n /**\n * Adds all global contexts to a contexts array\n *\n * @param pb - PayloadData\n * @param contexts - Custom contexts relating to the event\n */\n function attachGlobalContexts(pb, contexts) {\n var applicableContexts = globalContextsHelper.getApplicableContexts(pb);\n var returnedContexts = [];\n if (contexts && contexts.length) {\n returnedContexts.push.apply(returnedContexts, contexts);\n }\n if (applicableContexts && applicableContexts.length) {\n returnedContexts.push.apply(returnedContexts, applicableContexts);\n }\n return returnedContexts;\n }\n /**\n * Gets called by every trackXXX method\n * Adds context and payloadPairs name-value pairs to the payload\n * Applies the callback to the built payload\n *\n * @param pb - Payload\n * @param context - Custom contexts relating to the event\n * @param timestamp - Timestamp of the event\n * @returns Payload after the callback is applied or undefined if the event is skipped\n */\n function track(pb, context, timestamp) {\n if (!active) {\n LOG.error('Track called on deactivated tracker');\n return undefined;\n }\n pb.withJsonProcessor(payloadJsonProcessor(encodeBase64));\n pb.add('eid', v4());\n pb.addDict(payloadPairs);\n var tstamp = getTimestamp(timestamp);\n pb.add(tstamp.type, tstamp.value.toString());\n var allContexts = attachGlobalContexts(pb, pluginContextsHelper.addPluginContexts(context));\n var wrappedContexts = completeContexts(allContexts);\n if (wrappedContexts !== undefined) {\n pb.addJson('cx', 'co', wrappedContexts);\n }\n corePlugins.forEach(function (plugin) {\n try {\n if (plugin.beforeTrack) {\n plugin.beforeTrack(pb);\n }\n }\n catch (ex) {\n LOG.error('Plugin beforeTrack', ex);\n }\n });\n // Call the filter on plugins to determine if the event should be tracked\n var skip = corePlugins.find(function (plugin) {\n try {\n return plugin.filter && plugin.filter(pb.build()) === false;\n }\n catch (ex) {\n LOG.error('Plugin filter', ex);\n return false;\n }\n });\n if (skip) {\n return undefined;\n }\n if (typeof callback === 'function') {\n callback(pb);\n }\n var finalPayload = pb.build();\n corePlugins.forEach(function (plugin) {\n try {\n if (plugin.afterTrack) {\n plugin.afterTrack(finalPayload);\n }\n }\n catch (ex) {\n LOG.error('Plugin afterTrack', ex);\n }\n });\n return finalPayload;\n }\n /**\n * Set a persistent key-value pair to be added to every payload\n *\n * @param key - Field name\n * @param value - Field value\n */\n function addPayloadPair(key, value) {\n payloadPairs[key] = value;\n }\n var core = {\n track: track,\n addPayloadPair: addPayloadPair,\n getBase64Encoding: function () {\n return encodeBase64;\n },\n setBase64Encoding: function (encode) {\n encodeBase64 = encode;\n },\n addPayloadDict: function (dict) {\n for (var key in dict) {\n if (Object.prototype.hasOwnProperty.call(dict, key)) {\n payloadPairs[key] = dict[key];\n }\n }\n },\n resetPayloadPairs: function (dict) {\n payloadPairs = isJson(dict) ? dict : {};\n },\n setTrackerVersion: function (version) {\n addPayloadPair('tv', version);\n },\n setTrackerNamespace: function (name) {\n addPayloadPair('tna', name);\n },\n setAppId: function (appId) {\n addPayloadPair('aid', appId);\n },\n setPlatform: function (value) {\n addPayloadPair('p', value);\n },\n setUserId: function (userId) {\n addPayloadPair('uid', userId);\n },\n setScreenResolution: function (width, height) {\n addPayloadPair('res', width + 'x' + height);\n },\n setViewport: function (width, height) {\n addPayloadPair('vp', width + 'x' + height);\n },\n setColorDepth: function (depth) {\n addPayloadPair('cd', depth);\n },\n setTimezone: function (timezone) {\n addPayloadPair('tz', timezone);\n },\n setLang: function (lang) {\n addPayloadPair('lang', lang);\n },\n setIpAddress: function (ip) {\n addPayloadPair('ip', ip);\n },\n setUseragent: function (useragent) {\n addPayloadPair('ua', useragent);\n },\n addGlobalContexts: function (contexts) {\n globalContextsHelper.addGlobalContexts(contexts);\n },\n clearGlobalContexts: function () {\n globalContextsHelper.clearGlobalContexts();\n },\n removeGlobalContexts: function (contexts) {\n globalContextsHelper.removeGlobalContexts(contexts);\n },\n };\n return core;\n }\n var active = true;\n var base64 = configuration.base64, corePlugins = configuration.corePlugins, callback = configuration.callback, plugins = corePlugins !== null && corePlugins !== void 0 ? corePlugins : [], partialCore = newCore(base64 !== null && base64 !== void 0 ? base64 : true, plugins, callback), core = __assign(__assign({}, partialCore), { addPlugin: function (configuration) {\n var _a, _b;\n var plugin = configuration.plugin;\n plugins.push(plugin);\n (_a = plugin.logger) === null || _a === void 0 ? void 0 : _a.call(plugin, LOG);\n (_b = plugin.activateCorePlugin) === null || _b === void 0 ? void 0 : _b.call(plugin, core);\n }, deactivate: function () {\n plugins.forEach(function (plugin) {\n var _a;\n (_a = plugin.deactivatePlugin) === null || _a === void 0 ? void 0 : _a.call(plugin, core);\n });\n plugins.length = 0;\n active = false;\n } });\n plugins === null || plugins === void 0 ? void 0 : plugins.forEach(function (plugin) {\n var _a, _b;\n (_a = plugin.logger) === null || _a === void 0 ? void 0 : _a.call(plugin, LOG);\n (_b = plugin.activateCorePlugin) === null || _b === void 0 ? void 0 : _b.call(plugin, core);\n });\n return core;\n}\n/**\n * Build a self-describing event\n * A custom event type, allowing for an event to be tracked using your own custom schema\n * and a data object which conforms to the supplied schema\n *\n * @param event - Contains the properties and schema location for the event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSelfDescribingEvent(event) {\n var _a = event.event, schema = _a.schema, data = _a.data, pb = payloadBuilder();\n var ueJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0',\n data: { schema: schema, data: data },\n };\n pb.add('e', 'ue');\n pb.addJson('ue_px', 'ue_pr', ueJson);\n return pb;\n}\n/**\n * Build a Page View Event\n * Represents a Page View, which is typically fired as soon as possible when a web page\n * is loaded within the users browser. Often also fired on \"virtual page views\" within\n * Single Page Applications (SPA).\n *\n * @param event - Contains the properties for the Page View event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildPageView(event) {\n var pageUrl = event.pageUrl, pageTitle = event.pageTitle, referrer = event.referrer, pb = payloadBuilder();\n pb.add('e', 'pv'); // 'pv' for Page View\n pb.add('url', pageUrl);\n pb.add('page', pageTitle);\n pb.add('refr', referrer);\n return pb;\n}\n/**\n * Build a Page Ping Event\n * Fires when activity tracking is enabled in the browser.\n * Tracks same information as the last tracked Page View and includes scroll\n * information from the current page view\n *\n * @param event - Contains the properties for the Page Ping event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildPagePing(event) {\n var pageUrl = event.pageUrl, pageTitle = event.pageTitle, referrer = event.referrer, minXOffset = event.minXOffset, maxXOffset = event.maxXOffset, minYOffset = event.minYOffset, maxYOffset = event.maxYOffset, pb = payloadBuilder();\n pb.add('e', 'pp'); // 'pp' for Page Ping\n pb.add('url', pageUrl);\n pb.add('page', pageTitle);\n pb.add('refr', referrer);\n if (minXOffset && !isNaN(Number(minXOffset)))\n pb.add('pp_mix', minXOffset.toString());\n if (maxXOffset && !isNaN(Number(maxXOffset)))\n pb.add('pp_max', maxXOffset.toString());\n if (minYOffset && !isNaN(Number(minYOffset)))\n pb.add('pp_miy', minYOffset.toString());\n if (maxYOffset && !isNaN(Number(maxYOffset)))\n pb.add('pp_may', maxYOffset.toString());\n return pb;\n}\n/**\n * Build a Structured Event\n * A classic style of event tracking, allows for easier movement between analytics\n * systems. A loosely typed event, creating a Self Describing event is preferred, but\n * useful for interoperability.\n *\n * @param event - Contains the properties for the Structured event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildStructEvent(event) {\n var category = event.category, action = event.action, label = event.label, property = event.property, value = event.value, pb = payloadBuilder();\n pb.add('e', 'se'); // 'se' for Structured Event\n pb.add('se_ca', category);\n pb.add('se_ac', action);\n pb.add('se_la', label);\n pb.add('se_pr', property);\n pb.add('se_va', value == null ? undefined : value.toString());\n return pb;\n}\n/**\n * Build an Ecommerce Transaction Event\n * Allows for tracking common ecommerce events, this event is usually used when\n * a consumer completes a transaction.\n *\n * @param event - Contains the properties for the Ecommerce Transactoion event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildEcommerceTransaction(event) {\n var orderId = event.orderId, total = event.total, affiliation = event.affiliation, tax = event.tax, shipping = event.shipping, city = event.city, state = event.state, country = event.country, currency = event.currency, pb = payloadBuilder();\n pb.add('e', 'tr'); // 'tr' for Transaction\n pb.add('tr_id', orderId);\n pb.add('tr_af', affiliation);\n pb.add('tr_tt', total);\n pb.add('tr_tx', tax);\n pb.add('tr_sh', shipping);\n pb.add('tr_ci', city);\n pb.add('tr_st', state);\n pb.add('tr_co', country);\n pb.add('tr_cu', currency);\n return pb;\n}\n/**\n * Build an Ecommerce Transaction Item Event\n * Related to the {@link buildEcommerceTransaction}\n * Each Ecommerce Transaction may contain one or more EcommerceTransactionItem events\n *\n * @param event - Contains the properties for the Ecommerce Transaction Item event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildEcommerceTransactionItem(event) {\n var orderId = event.orderId, sku = event.sku, price = event.price, name = event.name, category = event.category, quantity = event.quantity, currency = event.currency, pb = payloadBuilder();\n pb.add('e', 'ti'); // 'tr' for Transaction Item\n pb.add('ti_id', orderId);\n pb.add('ti_sk', sku);\n pb.add('ti_nm', name);\n pb.add('ti_ca', category);\n pb.add('ti_pr', price);\n pb.add('ti_qu', quantity);\n pb.add('ti_cu', currency);\n return pb;\n}\n/**\n * Build a Scren View Event\n * Similar to a Page View but less focused on typical web properties\n * Often used for mobile applications as the user is presented with\n * new views as they performance navigation events\n *\n * @param event - Contains the properties for the Screen View event. One or more properties must be included.\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildScreenView(event) {\n var name = event.name, id = event.id;\n return buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/screen_view/jsonschema/1-0-0',\n data: removeEmptyProperties({ name: name, id: id }),\n },\n });\n}\n/**\n * Build a Link Click Event\n * Used when a user clicks on a link on a webpage, typically an anchor tag `<a>`\n *\n * @param event - Contains the properties for the Link Click event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildLinkClick(event) {\n var targetUrl = event.targetUrl, elementId = event.elementId, elementClasses = event.elementClasses, elementTarget = event.elementTarget, elementContent = event.elementContent;\n var eventJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1',\n data: removeEmptyProperties({ targetUrl: targetUrl, elementId: elementId, elementClasses: elementClasses, elementTarget: elementTarget, elementContent: elementContent }),\n };\n return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Impression Event\n * Used to track an advertisement impression\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Impression event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdImpression(event) {\n var impressionId = event.impressionId, costModel = event.costModel, cost = event.cost, targetUrl = event.targetUrl, bannerId = event.bannerId, zoneId = event.zoneId, advertiserId = event.advertiserId, campaignId = event.campaignId;\n var eventJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/ad_impression/jsonschema/1-0-0',\n data: removeEmptyProperties({\n impressionId: impressionId,\n costModel: costModel,\n cost: cost,\n targetUrl: targetUrl,\n bannerId: bannerId,\n zoneId: zoneId,\n advertiserId: advertiserId,\n campaignId: campaignId,\n }),\n };\n return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Click Event\n * Used to track an advertisement click\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Click event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdClick(event) {\n var targetUrl = event.targetUrl, clickId = event.clickId, costModel = event.costModel, cost = event.cost, bannerId = event.bannerId, zoneId = event.zoneId, impressionId = event.impressionId, advertiserId = event.advertiserId, campaignId = event.campaignId;\n var eventJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/ad_click/jsonschema/1-0-0',\n data: removeEmptyProperties({\n targetUrl: targetUrl,\n clickId: clickId,\n costModel: costModel,\n cost: cost,\n bannerId: bannerId,\n zoneId: zoneId,\n impressionId: impressionId,\n advertiserId: advertiserId,\n campaignId: campaignId,\n }),\n };\n return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Conversion Event\n * Used to track an advertisement click\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Conversion event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdConversion(event) {\n var conversionId = event.conversionId, costModel = event.costModel, cost = event.cost, category = event.category, action = event.action, property = event.property, initialValue = event.initialValue, advertiserId = event.advertiserId, campaignId = event.campaignId;\n var eventJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/ad_conversion/jsonschema/1-0-0',\n data: removeEmptyProperties({\n conversionId: conversionId,\n costModel: costModel,\n cost: cost,\n category: category,\n action: action,\n property: property,\n initialValue: initialValue,\n advertiserId: advertiserId,\n campaignId: campaignId,\n }),\n };\n return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Social Interaction Event\n * Social tracking will be used to track the way users interact\n * with Facebook, Twitter and Google + widgets\n * e.g. to capture “like this” or “tweet this” events.\n *\n * @param event - Contains the properties for the Social Interaction event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSocialInteraction(event) {\n var action = event.action, network = event.network, target = event.target;\n var eventJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/social_interaction/jsonschema/1-0-0',\n data: removeEmptyProperties({ action: action, network: network, target: target }),\n };\n return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Add To Cart Event\n * For tracking users adding items from a cart\n * on an ecommerce site.\n *\n * @param event - Contains the properties for the Add To Cart event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAddToCart(event) {\n var sku = event.sku, quantity = event.quantity, name = event.name, category = event.category, unitPrice = event.unitPrice, currency = event.currency;\n return buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/add_to_cart/jsonschema/1-0-0',\n data: removeEmptyProperties({\n sku: sku,\n quantity: quantity,\n name: name,\n category: category,\n unitPrice: unitPrice,\n currency: currency,\n }),\n },\n });\n}\n/**\n * Build a Remove From Cart Event\n * For tracking users removing items from a cart\n * on an ecommerce site.\n *\n * @param event - Contains the properties for the Remove From Cart event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildRemoveFromCart(event) {\n var sku = event.sku, quantity = event.quantity, name = event.name, category = event.category, unitPrice = event.unitPrice, currency = event.currency;\n return buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/remove_from_cart/jsonschema/1-0-0',\n data: removeEmptyProperties({\n sku: sku,\n quantity: quantity,\n name: name,\n category: category,\n unitPrice: unitPrice,\n currency: currency,\n }),\n },\n });\n}\n/**\n * Build a Form Focus or Change Form Event based on schema property\n * When a user focuses on a form element or when a user makes a\n * change to a form element.\n *\n * @param event - Contains the properties for the Form Focus or Change Form event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildFormFocusOrChange(event) {\n var event_schema = '';\n var schema = event.schema, formId = event.formId, elementId = event.elementId, nodeName = event.nodeName, elementClasses = event.elementClasses, value = event.value, type = event.type;\n var event_data = { formId: formId, elementId: elementId, nodeName: nodeName, elementClasses: elementClasses, value: value };\n if (schema === 'change_form') {\n event_schema = 'iglu:com.snowplowanalytics.snowplow/change_form/jsonschema/1-0-0';\n event_data.type = type;\n }\n else if (schema === 'focus_form') {\n event_schema = 'iglu:com.snowplowanalytics.snowplow/focus_form/jsonschema/1-0-0';\n event_data.elementType = type;\n }\n return buildSelfDescribingEvent({\n event: {\n schema: event_schema,\n data: removeEmptyProperties(event_data, { value: true }),\n },\n });\n}\n/**\n * Build a Form Submission Event\n * Used to track when a user submits a form\n *\n * @param event - Contains the properties for the Form Submission event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildFormSubmission(event) {\n var formId = event.formId, formClasses = event.formClasses, elements = event.elements;\n return buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/submit_form/jsonschema/1-0-0',\n data: removeEmptyProperties({ formId: formId, formClasses: formClasses, elements: elements }),\n },\n });\n}\n/**\n * Build a Site Search Event\n * Used when a user performs a search action on a page\n *\n * @param event - Contains the properties for the Site Search event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSiteSearch(event) {\n var terms = event.terms, filters = event.filters, totalResults = event.totalResults, pageResults = event.pageResults;\n return buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/site_search/jsonschema/1-0-0',\n data: removeEmptyProperties({ terms: terms, filters: filters, totalResults: totalResults, pageResults: pageResults }),\n },\n });\n}\n/**\n * Build a Consent Withdrawn Event\n * Used for tracking when a user withdraws their consent\n *\n * @param event - Contains the properties for the Consent Withdrawn event\n * @returns An object containing the PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track} and a 'consent_document' context\n */\nfunction buildConsentWithdrawn(event) {\n var all = event.all, id = event.id, version = event.version, name = event.name, description = event.description;\n var documentJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0',\n data: removeEmptyProperties({ id: id, version: version, name: name, description: description }),\n };\n return {\n event: buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/consent_withdrawn/jsonschema/1-0-0',\n data: removeEmptyProperties({\n all: all,\n }),\n },\n }),\n context: [documentJson],\n };\n}\n/**\n * Build a Consent Granted Event\n * Used for tracking when a user grants their consent\n *\n * @param event - Contains the properties for the Consent Granted event\n * @returns An object containing the PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track} and a 'consent_document' context\n */\nfunction buildConsentGranted(event) {\n var expiry = event.expiry, id = event.id, version = event.version, name = event.name, description = event.description;\n var documentJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0',\n data: removeEmptyProperties({ id: id, version: version, name: name, description: description }),\n };\n return {\n event: buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/consent_granted/jsonschema/1-0-0',\n data: removeEmptyProperties({\n expiry: expiry,\n }),\n },\n }),\n context: [documentJson],\n };\n}\n/**\n * Returns a copy of a JSON with undefined and null properties removed\n *\n * @param event - JSON object to clean\n * @param exemptFields - Set of fields which should not be removed even if empty\n * @returns A cleaned copy of eventJson\n */\nfunction removeEmptyProperties(event, exemptFields) {\n if (exemptFields === void 0) { exemptFields = {}; }\n var ret = {};\n for (var k in event) {\n if (exemptFields[k] || (event[k] !== null && typeof event[k] !== 'undefined')) {\n ret[k] = event[k];\n }\n }\n return ret;\n}\n\nfunction newInMemoryEventStore(_a) {\n var _b = _a.maxSize, maxSize = _b === void 0 ? 1000 : _b, _c = _a.events, events = _c === void 0 ? [] : _c;\n var store = __spreadArray([], events, true);\n var count = function () { return Promise.resolve(store.length); };\n return {\n count: count,\n add: function (payload) {\n store.push(payload);\n while (store.length > maxSize) {\n store.shift();\n }\n return count();\n },\n removeHead: function (count) {\n for (var i = 0; i < count; i++) {\n store.shift();\n }\n return Promise.resolve();\n },\n iterator: function () {\n var index = 0;\n // copy the store to prevent mutation\n var events = __spreadArray([], store, true);\n return {\n next: function () {\n if (index < events.length) {\n return Promise.resolve({ value: events[index++], done: false });\n }\n return Promise.resolve({ value: undefined, done: true });\n },\n };\n },\n getAll: function () { return Promise.resolve(__spreadArray([], store, true)); },\n getAllPayloads: function () { return Promise.resolve(store.map(function (e) { return e.payload; })); },\n };\n}\n\nvar PAYLOAD_DATA_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4';\n\n/**\n * Enclose an array of events in a self-describing payload_data JSON string\n *\n * @param array - events Batch of events\n * @returns string payload_data self-describing JSON\n */\nfunction encloseInPayloadDataEnvelope(events) {\n return JSON.stringify({\n schema: PAYLOAD_DATA_SCHEMA,\n data: events,\n });\n}\n/**\n * Attaches the STM field to outbound POST events.\n *\n * @param events - the events to attach the STM to\n */\nfunction attachStmToEvent(events) {\n var stm = new Date().getTime().toString();\n for (var i = 0; i < events.length; i++) {\n events[i]['stm'] = stm;\n }\n return events;\n}\nfunction newEmitterRequest(_a) {\n var endpoint = _a.endpoint, _b = _a.protocol, protocol = _b === void 0 ? 'https' : _b, port = _a.port, _c = _a.eventMethod, eventMethod = _c === void 0 ? 'post' : _c, customHeaders = _a.customHeaders, connectionTimeout = _a.connectionTimeout, _d = _a.keepalive, keepalive = _d === void 0 ? false : _d, _e = _a.postPath, postPath = _e === void 0 ? '/com.snowplowanalytics.snowplow/tp2' : _e, _f = _a.useStm, useStm = _f === void 0 ? true : _f, _g = _a.maxPostBytes, maxPostBytes = _g === void 0 ? 40000 : _g, _h = _a.credentials, credentials = _h === void 0 ? 'include' : _h;\n var events = [];\n var usePost = eventMethod.toLowerCase() === 'post';\n var timer;\n var abortController;\n function countBytes() {\n var count = events.reduce(function (acc, event) { return acc + (usePost ? event.getPOSTRequestBytesCount() : event.getGETRequestBytesCount()); }, 0);\n if (usePost) {\n count += 88; // 88 bytes for the payload_data envelope\n }\n return count;\n }\n function countEvents() {\n return events.length;\n }\n function getServerAnonymizationOfExistingEvents() {\n return events.length > 0 ? events[0].getServerAnonymization() : undefined;\n }\n function addEvent(event) {\n if (events.length > 0 && getServerAnonymizationOfExistingEvents() !== event.getServerAnonymization()) {\n return false;\n }\n else {\n events.push(event);\n return true;\n }\n }\n function getEvents() {\n return events;\n }\n function isFull() {\n if (usePost) {\n return countBytes() >= maxPostBytes;\n }\n else {\n return events.length >= 1;\n }\n }\n function createHeaders() {\n var headers = new Headers();\n if (usePost) {\n headers.append('Content-Type', 'application/json; charset=UTF-8');\n }\n if (customHeaders) {\n Object.keys(customHeaders).forEach(function (key) {\n headers.append(key, customHeaders[key]);\n });\n }\n if (getServerAnonymizationOfExistingEvents()) {\n headers.append('SP-Anonymous', '*');\n }\n return headers;\n }\n function getFullCollectorUrl() {\n var collectorUrl = endpoint;\n if (!endpoint.includes('://')) {\n collectorUrl = \"\".concat(protocol, \"://\").concat(endpoint);\n }\n if (port) {\n collectorUrl = \"\".concat(collectorUrl, \":\").concat(port);\n }\n var path = usePost ? postPath : '/i';\n return collectorUrl + path;\n }\n function makeRequest(url, options) {\n closeRequest(false);\n abortController = new AbortController();\n timer = setTimeout(function () {\n var reason = 'Request timed out';\n console.error(reason);\n timer = undefined;\n closeRequest(false, reason);\n }, connectionTimeout !== null && connectionTimeout !== void 0 ? connectionTimeout : 5000);\n var requestOptions = __assign({ headers: createHeaders(), signal: abortController.signal, keepalive: keepalive, credentials: credentials }, options);\n var request = new Request(url, requestOptions);\n return request;\n }\n function makePostRequest() {\n var batch = attachStmToEvent(events.map(function (event) { return event.getPOSTRequestBody(); }));\n return makeRequest(getFullCollectorUrl(), {\n method: 'POST',\n body: encloseInPayloadDataEnvelope(batch),\n });\n }\n function makeGetRequest() {\n if (events.length !== 1) {\n throw new Error('Only one event can be sent in a GET request');\n }\n var event = events[0];\n var url = event.getGETRequestURL(getFullCollectorUrl(), useStm);\n return makeRequest(url, {\n method: 'GET',\n });\n }\n function toRequest() {\n if (events.length === 0) {\n return undefined;\n }\n if (usePost) {\n return makePostRequest();\n }\n else {\n return makeGetRequest();\n }\n }\n function closeRequest(successful, reason) {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n if (abortController !== undefined) {\n var controller = abortController;\n abortController = undefined;\n if (!successful) {\n controller.abort(reason);\n }\n }\n }\n return {\n addEvent: addEvent,\n getEvents: getEvents,\n toRequest: toRequest,\n countBytes: countBytes,\n countEvents: countEvents,\n isFull: isFull,\n closeRequest: closeRequest,\n };\n}\n\n/**\n * Count the number of bytes a string will occupy when UTF-8 encoded\n * Taken from http://stackoverflow.com/questions/2848462/count-bytes-in-textarea-using-javascript/\n *\n * @param s - The string\n * @returns number Length of s in bytes when UTF-8 encoded\n */\nfunction getUTF8Length(s) {\n var len = 0;\n for (var i = 0; i < s.length; i++) {\n var code = s.charCodeAt(i);\n if (code <= 0x7f) {\n len += 1;\n }\n else if (code <= 0x7ff) {\n len += 2;\n }\n else if (code >= 0xd800 && code <= 0xdfff) {\n // Surrogate pair: These take 4 bytes in UTF-8 and 2 chars in UCS-2\n // (Assume next char is the other [valid] half and just skip it)\n len += 4;\n i++;\n }\n else if (code < 0xffff) {\n len += 3;\n }\n else {\n len += 4;\n }\n }\n return len;\n}\n/*\n * Convert a dictionary to a querystring\n * The context field is the last in the querystring\n */\nfunction getQuerystring(request) {\n var lowPriorityKeys = { co: true, cx: true };\n var args = [];\n for (var key in request) {\n if (request.hasOwnProperty(key) && !lowPriorityKeys[key]) {\n args.push(key + '=' + encodeURIComponent(request[key]));\n }\n }\n for (var contextKey in lowPriorityKeys) {\n if (request.hasOwnProperty(contextKey) && lowPriorityKeys[contextKey]) {\n args.push(contextKey + '=' + encodeURIComponent(request[contextKey]));\n }\n }\n return '?' + args.join('&');\n}\n/*\n * Convert numeric fields to strings to match payload_data schema\n */\nfunction preparePostBody(request) {\n var cleanedRequest = Object.keys(request)\n .map(function (k) { return [k, request[k]]; })\n .reduce(function (acc, _a) {\n var key = _a[0], value = _a[1];\n acc[key] = value.toString();\n return acc;\n }, {});\n return cleanedRequest;\n}\nfunction newEmitterEvent(eventStorePayload) {\n var querystring = null;\n var postBody = null;\n var byteCountGET = null;\n var byteCountPOST = null;\n function getPayload() {\n return eventStorePayload.payload;\n }\n function getServerAnonymization() {\n var _a;\n return (_a = eventStorePayload.svrAnon) !== null && _a !== void 0 ? _a : false;\n }\n function getCachedQuerystring(payload) {\n if (querystring === null) {\n querystring = getQuerystring(payload);\n }\n return querystring;\n }\n function getGETRequestURL(collectorUrl, useStm) {\n var querystring = getCachedQuerystring(getPayload());\n if (useStm) {\n return collectorUrl + querystring.replace('?', '?stm=' + new Date().getTime() + '&');\n }\n return collectorUrl + querystring;\n }\n function getGETRequestBytesCount() {\n if (byteCountGET === null) {\n var querystring_1 = getCachedQuerystring(getPayload());\n byteCountGET = getUTF8Length(querystring_1);\n }\n return byteCountGET;\n }\n function getPOSTRequestBody() {\n if (postBody === null) {\n postBody = preparePostBody(getPayload());\n }\n return postBody;\n }\n function getPOSTRequestBytesCount() {\n if (byteCountPOST === null) {\n byteCountPOST = getUTF8Length(JSON.stringify(getPOSTRequestBody()));\n }\n return byteCountPOST;\n }\n return {\n getPayload: getPayload,\n getServerAnonymization: getServerAnonymization,\n getGETRequestURL: getGETRequestURL,\n getGETRequestBytesCount: getGETRequestBytesCount,\n getPOSTRequestBody: getPOSTRequestBody,\n getPOSTRequestBytesCount: getPOSTRequestBytesCount,\n };\n}\n\nfunction newEmitter(_a) {\n var endpoint = _a.endpoint, _b = _a.eventMethod, eventMethod = _b === void 0 ? 'post' : _b, postPath = _a.postPath, protocol = _a.protocol, port = _a.port, _c = _a.maxPostBytes, maxPostBytes = _c === void 0 ? 40000 : _c, maxGetBytes = _a.maxGetBytes, _d = _a.bufferSize, bufferSize = _d === void 0 ? 1 : _d, customHeaders = _a.customHeaders, serverAnonymization = _a.serverAnonymization, connectionTimeout = _a.connectionTimeout, keepalive = _a.keepalive, idService = _a.idService, _e = _a.dontRetryStatusCodes, dontRetryStatusCodes = _e === void 0 ? [] : _e, _f = _a.retryStatusCodes, retryStatusCodes = _f === void 0 ? [] : _f, _g = _a.retryFailedRequests, retryFailedRequests = _g === void 0 ? true : _g, onRequestFailure = _a.onRequestFailure, onRequestSuccess = _a.onRequestSuccess, _h = _a.customFetch, customFetch = _h === void 0 ? fetch : _h, useStm = _a.useStm, _j = _a.eventStore, eventStore = _j === void 0 ? newInMemoryEventStore({}) : _j, credentials = _a.credentials;\n var idServiceCalled = false;\n var flushInProgress = false;\n var usePost = eventMethod.toLowerCase() === 'post';\n dontRetryStatusCodes = dontRetryStatusCodes.concat([400, 401, 403, 410, 422]);\n function shouldRetryForStatusCode(statusCode) {\n // success, don't retry\n if (statusCode >= 200 && statusCode < 300) {\n return false;\n }\n if (!retryFailedRequests) {\n return false;\n }\n // retry if status code among custom user-supplied retry codes\n if (retryStatusCodes.includes(statusCode)) {\n return true;\n }\n // retry if status code *not* among the don't retry codes\n return !dontRetryStatusCodes.includes(statusCode);\n }\n function callOnRequestSuccess(payloads, response) {\n if (onRequestSuccess !== undefined) {\n setTimeout(function () {\n try {\n onRequestSuccess === null || onRequestSuccess === void 0 ? void 0 : onRequestSuccess(payloads, response);\n }\n catch (e) {\n LOG.error('Error in onRequestSuccess', e);\n }\n }, 0);\n }\n }\n function callOnRequestFailure(failure, response) {\n if (onRequestFailure !== undefined) {\n setTimeout(function () {\n try {\n onRequestFailure === null || onRequestFailure === void 0 ? void 0 : onRequestFailure(failure, response);\n }\n catch (e) {\n LOG.error('Error in onRequestFailure', e);\n }\n }, 0);\n }\n }\n function executeRequest(request) {\n return __awaiter(this, void 0, void 0, function () {\n var fetchRequest, payloads, response, willRetry, e_1, message;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n fetchRequest = request.toRequest();\n if (fetchRequest === undefined) {\n throw new Error('Empty batch');\n }\n payloads = request.getEvents().map(function (event) { return event.getPayload(); });\n _a.label = 1;\n case 1:\n _a.trys.push([1, 4, , 5]);\n return [4 /*yield*/, customFetch(fetchRequest)];\n case 2:\n response = _a.sent();\n return [4 /*yield*/, response.text()];\n case 3:\n _a.sent(); // wait for the response to be fully read\n request.closeRequest(true);\n if (response.ok) {\n callOnRequestSuccess(payloads, response);\n return [2 /*return*/, { success: true, retry: false, status: response.status }];\n }\n else {\n willRetry = shouldRetryForStatusCode(response.status);\n callOnRequestFailure({\n events: payloads,\n status: response.status,\n message: response.statusText,\n willRetry: willRetry,\n }, response);\n return [2 /*return*/, { success: false, retry: willRetry, status: response.status }];\n }\n case 4:\n e_1 = _a.sent();\n request.closeRequest(false);\n message = typeof e_1 === 'string' ? e_1 : e_1 ? e_1.message : 'Unknown error';\n callOnRequestFailure({\n events: payloads,\n message: message,\n willRetry: true,\n });\n return [2 /*return*/, { success: false, retry: true }];\n case 5: return [2 /*return*/];\n }\n });\n });\n }\n function newEmitterRequestWithConfig() {\n return newEmitterRequest({\n endpoint: endpoint,\n protocol: protocol,\n port: port,\n eventMethod: eventMethod,\n customHeaders: customHeaders,\n connectionTimeout: connectionTimeout,\n keepalive: keepalive,\n maxPostBytes: maxPostBytes,\n useStm: useStm,\n credentials: credentials,\n postPath: postPath,\n });\n }\n function shouldSkipEventStore(emitterEvent) {\n var eventTooBigWarning = function (bytes, maxBytes) {\n return LOG.warn('Event (' + bytes + 'B) too big, max is ' + maxBytes);\n };\n if (usePost) {\n var bytes = emitterEvent.getPOSTRequestBytesCount() + 88; // 88 bytes for the payload_data envelope\n var tooBig = bytes > maxPostBytes;\n if (tooBig) {\n eventTooBigWarning(bytes, maxPostBytes);\n }\n return tooBig;\n }\n else {\n if (maxGetBytes === undefined) {\n return false;\n }\n var bytes = emitterEvent.getGETRequestBytesCount();\n var tooBig = bytes > maxGetBytes;\n if (tooBig) {\n eventTooBigWarning(bytes, maxGetBytes);\n }\n return tooBig;\n }\n }\n function callIdService() {\n return __awaiter(this, void 0, void 0, function () {\n var request;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(idService && !idServiceCalled)) return [3 /*break*/, 2];\n idServiceCalled = true;\n request = new Request(idService, { method: 'GET' });\n return [4 /*yield*/, customFetch(request)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n });\n }\n function flush() {\n return __awaiter(this, void 0, void 0, function () {\n var e_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!flushInProgress) return [3 /*break*/, 5];\n flushInProgress = true;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, 4, 5]);\n return [4 /*yield*/, continueFlush()];\n case 2:\n _a.sent();\n return [3 /*break*/, 5];\n case 3:\n e_2 = _a.sent();\n LOG.error('Error sending events', e_2);\n return [3 /*break*/, 5];\n case 4:\n flushInProgress = false;\n return [7 /*endfinally*/];\n case 5: return [2 /*return*/];\n }\n });\n });\n }\n function continueFlush() {\n return __awaiter(this, void 0, void 0, function () {\n var request, eventStoreIterator, _a, value, done, event_1, _b, success, retry, status;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, callIdService()];\n case 1:\n _c.sent();\n request = newEmitterRequestWithConfig();\n eventStoreIterator = eventStore.iterator();\n _c.label = 2;\n case 2:\n if (request.isFull()) {\n return [3 /*break*/, 4];\n }\n return [4 /*yield*/, eventStoreIterator.next()];\n case 3:\n _a = _c.sent(), value = _a.value, done = _a.done;\n if (done || value === undefined) {\n return [3 /*break*/, 4];\n }\n event_1 = newEmitterEvent(value);\n if (!request.addEvent(event_1)) {\n return [3 /*break*/, 4];\n }\n return [3 /*break*/, 2];\n case 4:\n if (request.countEvents() === 0) {\n return [2 /*return*/];\n }\n return [4 /*yield*/, executeRequest(request)];\n case 5:\n _b = _c.sent(), success = _b.success, retry = _b.retry, status = _b.status;\n if (!(success || !retry)) return [3 /*break*/, 7];\n if (!success) {\n LOG.error(\"Status \".concat(status, \", will not retry.\"));\n }\n return [4 /*yield*/, eventStore.removeHead(request.countEvents())];\n case 6:\n _c.sent();\n _c.label = 7;\n case 7:\n if (!success) return [3 /*break*/, 9];\n return [4 /*yield*/, continueFlush()];\n case 8:\n _c.sent();\n _c.label = 9;\n case 9: return [2 /*return*/];\n }\n });\n });\n }\n function input(payload) {\n return __awaiter(this, void 0, void 0, function () {\n var eventStorePayload, event, request, count;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n eventStorePayload = newEventStorePayload({ payload: payload, svrAnon: serverAnonymization });\n event = newEmitterEvent(eventStorePayload);\n if (!shouldSkipEventStore(event)) return [3 /*break*/, 2];\n request = newEmitterRequestWithConfig();\n request.addEvent(event);\n return [4 /*yield*/, executeRequest(request)];\n case 1:\n _a.sent();\n return [3 /*break*/, 5];\n case 2: return [4 /*yield*/, eventStore.add(eventStorePayload)];\n case 3:\n count = _a.sent();\n if (!(count >= bufferSize)) return [3 /*break*/, 5];\n return [4 /*yield*/, flush()];\n case 4:\n _a.sent();\n _a.label = 5;\n case 5: return [2 /*return*/];\n }\n });\n });\n }\n function setCollectorUrl(url) {\n endpoint = url;\n }\n function setAnonymousTracking(at) {\n serverAnonymization = at;\n }\n function setBufferSize(bs) {\n bufferSize = bs;\n }\n return {\n flush: flush,\n input: input,\n setCollectorUrl: setCollectorUrl,\n setAnonymousTracking: setAnonymousTracking,\n setBufferSize: setBufferSize,\n };\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar version = version$1;\n\nexport { LOG, LOG_LEVEL, buildAdClick, buildAdConversion, buildAdImpression, buildAddToCart, buildConsentGranted, buildConsentWithdrawn, buildEcommerceTransaction, buildEcommerceTransactionItem, buildFormFocusOrChange, buildFormSubmission, buildLinkClick, buildPagePing, buildPageView, buildRemoveFromCart, buildScreenView, buildSelfDescribingEvent, buildSiteSearch, buildSocialInteraction, buildStructEvent, getRuleParts, getSchemaParts, globalContexts, isConditionalContextProvider, isContextCallbackFunction, isContextPrimitive, isFilterProvider, isJson, isNonEmptyJson, isRuleSet, isRuleSetProvider, isSelfDescribingJson, isStringArray, isValidRule, isValidRuleSetArg, matchSchemaAgainstRule, matchSchemaAgainstRuleSet, newEmitter, newEventStorePayload, newInMemoryEventStore, payloadBuilder, payloadJsonProcessor, pluginContexts, removeEmptyProperties, resolveDynamicContext, trackerCore, validateVendor, validateVendorParts, version };\n//# sourceMappingURL=index.module.js.map\n","/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { BrowserPlugin, BrowserTracker } from '@snowplow/browser-tracker-core';\nimport {\n EventJson,\n EventJsonWithKeys,\n JsonProcessor,\n Logger,\n LOG_LEVEL,\n Payload,\n PayloadBuilder,\n payloadJsonProcessor,\n version,\n getSchemaParts,\n SelfDescribingJson,\n} from '@snowplow/tracker-core';\nimport randomcolor from 'randomcolor';\n\n/**\n * Adds advertisement tracking functions\n */\nexport function DebuggerPlugin(logLevel: LOG_LEVEL = LOG_LEVEL.debug): BrowserPlugin {\n let LOG: Logger;\n let tracker: BrowserTracker;\n let eventColour: string;\n\n const colours = {\n event: () => `color: White; background: ${eventColour}; font-weight: bold; padding: 1px 4px; border-radius: 2px;`,\n snowplowPurple: 'color: White; background: #6638B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n activated: 'color: White; background: #9E62DD; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n payload: 'color: White; background: #3748B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n json: 'color: White; background: #388AB8; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n schema: 'color: White; background: #268047; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n schemaVersion: 'color: White; background: #80265F; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n };\n\n const debug = (style: string, message: string, extra?: [string, ...unknown[]]) => {\n const [extraMessage, ...rest] = extra ?? [''];\n LOG.debug(\n `v${version} %c${tracker.namespace}%c %c%s` + extraMessage,\n colours.snowplowPurple,\n '',\n style,\n message,\n ...rest\n );\n };\n\n function jsonInterceptor(encodeBase64: boolean): JsonProcessor {\n const log = (jsonType: string, data: SelfDescribingJson) => {\n const schemaParts = getSchemaParts(data['schema']);\n debug(colours.event(), 'Event', [\n '%c%s%c%s%c%s\\n%o',\n colours.json,\n `${jsonType}: ${schemaParts ? schemaParts[1] : 'Unknown Schema'}`,\n colours.schemaVersion,\n schemaParts ? `Version: ${schemaParts[2]}-${schemaParts[3]}-${schemaParts[4]}` : 'Unknown Schema Version',\n colours.schema,\n schemaParts ? `Vendor: ${schemaParts[0]}` : 'Unknown Vendor',\n data['data'],\n ]);\n };\n\n return (\n payloadBuilder: PayloadBuilder,\n jsonForProcessing: EventJson,\n contextEntitiesForProcessing: SelfDescribingJson[]\n ) => {\n if (jsonForProcessing.length) {\n for (const json of jsonForProcessing) {\n const data = json.json['data'] as SelfDescribingJson;\n if (Array.isArray(data)) {\n data.forEach((d) => {\n log(getJsonType(json), d);\n });\n } else {\n log(getJsonType(json), data);\n }\n }\n }\n if (contextEntitiesForProcessing.length) {\n for (const entity of contextEntitiesForProcessing) {\n log('Context', entity);\n }\n }\n return payloadJsonProcessor(encodeBase64)(payloadBuilder, jsonForProcessing, contextEntitiesForProcessing);\n };\n }\n\n return {\n logger: (logger) => {\n LOG = logger;\n logger.setLogLevel(logLevel);\n },\n activateBrowserPlugin: (t) => {\n tracker = t;\n debug(colours.activated, 'Tracker Activated');\n },\n beforeTrack: (payloadBuilder: PayloadBuilder) => {\n eventColour = randomcolor({ luminosity: 'dark' });\n payloadBuilder.withJsonProcessor(jsonInterceptor(tracker.core.getBase64Encoding()));\n debug(colours.event(), 'Event', ['%c%s', colours.snowplowPurple, getEventType(payloadBuilder)]);\n payloadBuilder.build();\n },\n afterTrack: (payload: Payload) => {\n debug(colours.event(), 'Event', ['%c%s\\n%o', colours.payload, 'Payload', payload]);\n },\n };\n}\n\nfunction getJsonType(json: EventJsonWithKeys) {\n switch (json.keyIfEncoded) {\n case 'cx':\n return 'Context';\n case 'ue_px':\n return 'Self Describing';\n default:\n return `${json.keyIfEncoded}, ${json.keyIfNotEncoded}`;\n }\n}\n\nfunction getEventType(payloadBuilder: PayloadBuilder) {\n const payload = payloadBuilder.getPayload();\n switch (payload['e']) {\n case 'pv':\n return 'Page View';\n case 'pp':\n return 'Page Ping';\n case 'tr':\n return 'Ecommerce Transaction';\n case 'ti':\n return 'Ecommerce Transaction Item';\n case 'se':\n return 'Structured Event';\n case 'ue':\n return 'Self Describing';\n default:\n return typeof payload['e'] === 'string' ? payload['e'] : 'Invalid';\n }\n}\n","// randomColor by David Merfield under the CC0 license\n// https://github.com/davidmerfield/randomColor/\n\n;(function(root, factory) {\n\n // Support CommonJS\n if (typeof exports === 'object') {\n var randomColor = factory();\n\n // Support NodeJS & Component, which allow module.exports to be a function\n if (typeof module === 'object' && module && module.exports) {\n exports = module.exports = randomColor;\n }\n\n // Support CommonJS 1.1.1 spec\n exports.randomColor = randomColor;\n\n // Support AMD\n } else if (typeof define === 'function' && define.amd) {\n define([], factory);\n\n // Support vanilla script loading\n } else {\n root.randomColor = factory();\n }\n\n}(this, function() {\n\n // Seed to get repeatable colors\n var seed = null;\n\n // Shared color dictionary\n var colorDictionary = {};\n\n // Populate the color dictionary\n loadColorBounds();\n\n // check if a range is taken\n var colorRanges = [];\n\n var randomColor = function (options) {\n\n options = options || {};\n\n // Check if there is a seed and ensure it's an\n // integer. Otherwise, reset the seed value.\n if (options.seed !== undefined && options.seed !== null && options.seed === parseInt(options.seed, 10)) {\n seed = options.seed;\n\n // A string was passed as a seed\n } else if (typeof options.seed === 'string') {\n seed = stringToInteger(options.seed);\n\n // Something was passed as a seed but it wasn't an integer or string\n } else if (options.seed !== undefined && options.seed !== null) {\n throw new TypeError('The seed value must be an integer or string');\n\n // No seed, reset the value outside.\n } else {\n seed = null;\n }\n\n var H,S,B;\n\n // Check if we need to generate multiple colors\n if (options.count !== null && options.count !== undefined) {\n\n var totalColors = options.count,\n colors = [];\n // Value false at index i means the range i is not taken yet.\n for (var i = 0; i < options.count; i++) {\n colorRanges.push(false)\n }\n options.count = null;\n\n while (totalColors > colors.length) {\n\n var color = randomColor(options);\n\n if (seed !== null) {\n options.seed = seed;\n }\n\n colors.push(color);\n }\n\n options.count = totalColors;\n\n return colors;\n }\n\n // First we pick a hue (H)\n H = pickHue(options);\n\n // Then use H to determine saturation (S)\n S = pickSaturation(H, options);\n\n // Then use S and H to determine brightness (B).\n B = pickBrightness(H, S, options);\n\n // Then we return the HSB color in the desired format\n return setFormat([H,S,B], options);\n };\n\n function pickHue(options) {\n if (colorRanges.length > 0) {\n var hueRange = getRealHueRange(options.hue)\n\n var hue = randomWithin(hueRange)\n\n //Each of colorRanges.length ranges has a length equal approximatelly one step\n var step = (hueRange[1] - hueRange[0]) / colorRanges.length\n\n var j = parseInt((hue - hueRange[0]) / step)\n\n //Check if the range j is taken\n if (colorRanges[j] === true) {\n j = (j + 2) % colorRanges.length\n }\n else {\n colorRanges[j] = true\n }\n\n var min = (hueRange[0] + j * step) % 359,\n max = (hueRange[0] + (j + 1) * step) % 359;\n\n hueRange = [min, max]\n\n hue = randomWithin(hueRange)\n\n if (hue < 0) {hue = 360 + hue;}\n return hue\n }\n else {\n var hueRange = getHueRange(options.hue)\n\n hue = randomWithin(hueRange);\n // Instead of storing red as two seperate ranges,\n // we group them, using negative numbers\n if (hue < 0) {\n hue = 360 + hue;\n }\n\n return hue;\n }\n }\n\n function pickSaturation (hue, options) {\n\n if (options.hue === 'monochrome') {\n return 0;\n }\n\n if (options.luminosity === 'random') {\n return randomWithin([0,100]);\n }\n\n var saturationRange = getSaturationRange(hue);\n\n var sMin = saturationRange[0],\n sMax = saturationRange[1];\n\n switch (options.luminosity) {\n\n case 'bright':\n sMin = 55;\n break;\n\n case 'dark':\n sMin = sMax - 10;\n break;\n\n case 'light':\n sMax = 55;\n break;\n }\n\n return randomWithin([sMin, sMax]);\n\n }\n\n function pickBrightness (H, S, options) {\n\n var bMin = getMinimumBrightness(H, S),\n bMax = 100;\n\n switch (options.luminosity) {\n\n case 'dark':\n bMax = bMin + 20;\n break;\n\n case 'light':\n bMin = (bMax + bMin)/2;\n break;\n\n case 'random':\n bMin = 0;\n bMax = 100;\n break;\n }\n\n return randomWithin([bMin, bMax]);\n }\n\n function setFormat (hsv, options) {\n\n switch (options.format) {\n\n case 'hsvArray':\n return hsv;\n\n case 'hslArray':\n return HSVtoHSL(hsv);\n\n case 'hsl':\n var hsl = HSVtoHSL(hsv);\n return 'hsl('+hsl[0]+', '+hsl[1]+'%, '+hsl[2]+'%)';\n\n case 'hsla':\n var hslColor = HSVtoHSL(hsv);\n var alpha = options.alpha || Math.random();\n return 'hsla('+hslColor[0]+', '+hslColor[1]+'%, '+hslColor[2]+'%, ' + alpha + ')';\n\n case 'rgbArray':\n return HSVtoRGB(hsv);\n\n case 'rgb':\n var rgb = HSVtoRGB(hsv);\n return 'rgb(' + rgb.join(', ') + ')';\n\n case 'rgba':\n var rgbColor = HSVtoRGB(hsv);\n var alpha = options.alpha || Math.random();\n return 'rgba(' + rgbColor.join(', ') + ', ' + alpha + ')';\n\n default:\n return HSVtoHex(hsv);\n }\n\n }\n\n function getMinimumBrightness(H, S) {\n\n var lowerBounds = getColorInfo(H).lowerBounds;\n\n for (var i = 0; i < lowerBounds.length - 1; i++) {\n\n var s1 = lowerBounds[i][0],\n v1 = lowerBounds[i][1];\n\n var s2 = lowerBounds[i+1][0],\n v2 = lowerBounds[i+1][1];\n\n if (S >= s1 && S <= s2) {\n\n var m = (v2 - v1)/(s2 - s1),\n b = v1 - m*s1;\n\n return m*S + b;\n }\n\n }\n\n return 0;\n }\n\n function getHueRange (colorInput) {\n\n if (typeof parseInt(colorInput) === 'number') {\n\n var number = parseInt(colorInput);\n\n if (number < 360 && number > 0) {\n return [number, number];\n }\n\n }\n\n if (typeof colorInput === 'string') {\n\n if (colorDictionary[colorInput]) {\n var color = colorDictionary[colorInput];\n if (color.hueRange) {return color.hueRange;}\n } else if (colorInput.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) {\n var hue = HexToHSB(colorInput)[0];\n return [ hue, hue ];\n }\n }\n\n return [0,360];\n\n }\n\n function getSaturationRange (hue) {\n return getColorInfo(hue).saturationRange;\n }\n\n function getColorInfo (hue) {\n\n // Maps red colors to make picking hue easier\n if (hue >= 334 && hue <= 360) {\n hue-= 360;\n }\n\n for (var colorName in colorDictionary) {\n var color = colorDictionary[colorName];\n if (color.hueRange &&\n hue >= color.hueRange[0] &&\n hue <= color.hueRange[1]) {\n return colorDictionary[colorName];\n }\n } return 'Color not found';\n }\n\n function randomWithin (range) {\n if (seed === null) {\n //generate random evenly destinct number from : https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/\n var golden_ratio = 0.618033988749895\n var r=Math.random()\n r += golden_ratio\n r %= 1\n return Math.floor(range[0] + r*(range[1] + 1 - range[0]));\n } else {\n //Seeded random algorithm from http://indiegamr.com/generate-repeatable-random-numbers-in-js/\n var max = range[1] || 1;\n var min = range[0] || 0;\n seed = (seed * 9301 + 49297) % 233280;\n var rnd = seed / 233280.0;\n return Math.floor(min + rnd * (max - min));\n}\n }\n\n function HSVtoHex (hsv){\n\n var rgb = HSVtoRGB(hsv);\n\n function componentToHex(c) {\n var hex = c.toString(16);\n return hex.length == 1 ? '0' + hex : hex;\n }\n\n var hex = '#' + componentToHex(rgb[0]) + componentToHex(rgb[1]) + componentToHex(rgb[2]);\n\n return hex;\n\n }\n\n function defineColor (name, hueRange, lowerBounds) {\n\n var sMin = lowerBounds[0][0],\n sMax = lowerBounds[lowerBounds.length - 1][0],\n\n bMin = lowerBounds[lowerBounds.length - 1][1],\n bMax = lowerBounds[0][1];\n\n colorDictionary[name] = {\n hueRange: hueRange,\n lowerBounds: lowerBounds,\n saturationRange: [sMin, sMax],\n brightnessRange: [bMin, bMax]\n };\n\n }\n\n function loadColorBounds () {\n\n defineColor(\n 'monochrome',\n null,\n [[0,0],[100,0]]\n );\n\n defineColor(\n 'red',\n [-26,18],\n [[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]\n );\n\n defineColor(\n 'orange',\n [18,46],\n [[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]\n );\n\n defineColor(\n 'yellow',\n [46,62],\n [[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]\n );\n\n defineColor(\n 'green',\n [62,178],\n [[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]\n );\n\n defineColor(\n 'blue',\n [178, 257],\n [[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]\n );\n\n defineColor(\n 'purple',\n [257, 282],\n [[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]\n );\n\n defineColor(\n 'pink',\n [282, 334],\n [[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]\n );\n\n }\n\n function HSVtoRGB (hsv) {\n\n // this doesn't work for the values of 0 and 360\n // here's the hacky fix\n var h = hsv[0];\n if (h === 0) {h = 1;}\n if (h === 360) {h = 359;}\n\n // Rebase the h,s,v values\n h = h/360;\n var s = hsv[1]/100,\n v = hsv[2]/100;\n\n var h_i = Math.floor(h*6),\n f = h * 6 - h_i,\n p = v * (1 - s),\n q = v * (1 - f*s),\n t = v * (1 - (1 - f)*s),\n r = 256,\n g = 256,\n b = 256;\n\n switch(h_i) {\n case 0: r = v; g = t; b = p; break;\n case 1: r = q; g = v; b = p; break;\n case 2: r = p; g = v; b = t; break;\n case 3: r = p; g = q; b = v; break;\n case 4: r = t; g = p; b = v; break;\n case 5: r = v; g = p; b = q; break;\n }\n\n var result = [Math.floor(r*255), Math.floor(g*255), Math.floor(b*255)];\n return result;\n }\n\n function HexToHSB (hex) {\n hex = hex.replace(/^#/, '');\n hex = hex.length === 3 ? hex.replace(/(.)/g, '$1$1') : hex;\n\n var red = parseInt(hex.substr(0, 2), 16) / 255,\n green = parseInt(hex.substr(2, 2), 16) / 255,\n blue = parseInt(hex.substr(4, 2), 16) / 255;\n\n var cMax = Math.max(red, green, blue),\n delta = cMax - Math.min(red, green, blue),\n saturation = cMax ? (delta / cMax) : 0;\n\n switch (cMax) {\n case red: return [ 60 * (((green - blue) / delta) % 6) || 0, saturation, cMax ];\n case green: return [ 60 * (((blue - red) / delta) + 2) || 0, saturation, cMax ];\n case blue: return [ 60 * (((red - green) / delta) + 4) || 0, saturation, cMax ];\n }\n }\n\n function HSVtoHSL (hsv) {\n var h = hsv[0],\n s = hsv[1]/100,\n v = hsv[2]/100,\n k = (2-s)*v;\n\n return [\n h,\n Math.round(s*v / (k<1 ? k : 2-k) * 10000) / 100,\n k/2 * 100\n ];\n }\n\n function stringToInteger (string) {\n var total = 0\n for (var i = 0; i !== string.length; i++) {\n if (total >= Number.MAX_SAFE_INTEGER) break;\n total += string.charCodeAt(i)\n }\n return total\n }\n\n // get The range of given hue when options.count!=0\n function getRealHueRange(colorHue)\n { if (!isNaN(colorHue)) {\n var number = parseInt(colorHue);\n\n if (number < 360 && number > 0) {\n return getColorInfo(colorHue).hueRange\n }\n }\n else if (typeof colorHue === 'string') {\n\n if (colorDictionary[colorHue]) {\n var color = colorDictionary[colorHue];\n\n if (color.hueRange) {\n return color.hueRange\n }\n } else if (colorHue.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) {\n var hue = HexToHSB(colorHue)[0]\n return getColorInfo(hue).hueRange\n }\n }\n\n return [0,360]\n}\n return randomColor;\n}));\n"],"names":["__spreadArray","to","from","pack","arguments","length","ar","i","l","Array","prototype","slice","call","concat","payloadJsonProcessor","L","encodeBase64","payloadBuilder","jsonForProcessing","contextEntitiesForProcessing","add","json","keyIfEncoded","keyIfNotEncoded","str","JSON","stringify","ac","tmp_arr","data","unescape","encodeURIComponent","o1","charCodeAt","o2","o3","bits","h1","a","h3","c","b64","charAt","h2","h4","enc","join","d","r","replace","combineContexts","originalContext","newContext","payload","getPayload","cx","co","n","parse","f","g","base64decode","encodedData","dec","tmpArr","indexOf","u","t","String","fromCharCode","decodeUTF8string","p","decodeURIComponent","split","map","toString","b64Data","undefined","context","_i","schema","getJsonType","H","getEventType","e","SuppressedError","LOG_LEVEL","none","error","warn","debug","info","root","this","randomColor","setFormat","hsv","options","format","hsl","HSVtoHSL","hslColor","alpha","Math","random","HSVtoRGB","rgbColor","HSVtoHex","getHueRange","colorInput","parseInt","number","colorDictionary","color","hueRange","match","hue","HexToHSB","getColorInfo","colorName","randomWithin","range","seed","floor","golden_ratio","max","min","componentToHex","hex","rgb","defineColor","name","lowerBounds","saturationRange","brightnessRange","h","s","v","h_i","q","b","z","x","result","red","substr","green","blue","cMax","delta","saturation","k","round","getRealHueRange","colorHue","isNaN","colorRanges","total","string","Number","MAX_SAFE_INTEGER","TypeError","count","totalColors","colors","push","step","j","luminosity","sMin","sMax","S","s1","v1","s2","v2","m","bMax","bMin","B","factory","module","exports","DebuggerPlugin","logLevel","LOG","tracker","eventColour","colours","event","snowplowPurple","activated","schemaVersion","style","message","extra","_a","extraMessage","rest","apply","version$1","namespace","logger","setLogLevel","activateBrowserPlugin","beforeTrack","randomcolor","withJsonProcessor","jsonInterceptor","log","jsonType","matches","re","exec","input","schemaParts","isArray","forEach","core","getBase64Encoding","build","afterTrack"],"mappings":";;;;;;wPAqNOA,WAAuBC,CAAIC,CAAAA,CAAAA,CAAMC,CACtC,CAAA,CAAA,CAAA,CAAA,CAAIA,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAArBC,CAAUC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiCC,CAAxBC,CAAAA,CAAAA,CAAI,CAAGC,CAAAA,CAAAA,CAAIN,CAAKG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAYE,CAAIC,CAAAA,CAAAA,CAAGD,CACxED,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQC,SACHD,CAAIA,CAAAA,CAAAA,CAAAA,CAAAA,CAAKG,CAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAUC,CAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAKV,CAAM,CAAA,CAAA,CAAGK,CAClDD,CAAAA,CAAAA,CAAAA,CAAAA,CAAGC,CAAKL,CAAAA,CAAAA,CAAAA,CAAKK,CAGdN,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAGY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CAAA,CAAA,CAAA,CAAA,CAAA,CAAWA,CAD9C,CAAA,CAAA,CAAA,CAnFmC"}
1
+ {"version":3,"file":"index.umd.min.js","sources":["../../../common/temp/node_modules/.pnpm/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs","../../../libraries/tracker-core/dist/index.module.js","../src/index.ts","../../../common/temp/node_modules/.pnpm/randomcolor@0.6.2/node_modules/randomcolor/randomColor.js"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","/*!\n * Core functionality for Snowplow JavaScript trackers v4.2.0 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { __spreadArray, __assign, __awaiter, __generator } from 'tslib';\nimport { v4 } from 'uuid';\n\nvar version$1 = \"4.2.0\";\n\n/*\n * Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io)\n * and Contributors (http://phpjs.org/authors)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/**\n * Decodes a url safe Base 64 encoded string\n * @remarks See: {@link http://tools.ietf.org/html/rfc4648#page-7}\n * @param data - String to decode\n * @returns The decoded string\n */\nfunction base64urldecode(data) {\n if (!data) {\n return data;\n }\n var padding = 4 - (data.length % 4);\n switch (padding) {\n case 2:\n data += '==';\n break;\n case 3:\n data += '=';\n break;\n }\n var b64Data = data.replace(/-/g, '+').replace(/_/g, '/');\n return base64decode(b64Data);\n}\n/**\n * Encodes a string into a url safe Base 64 encoded string\n * @remarks See: {@link http://tools.ietf.org/html/rfc4648#page-7}\n * @param data - String to encode\n * @returns The url safe Base 64 string\n */\nfunction base64urlencode(data) {\n if (!data) {\n return data;\n }\n var enc = base64encode(data);\n return enc.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n}\nvar b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n/**\n * Encode string as base64.\n * Any type can be passed, but will be stringified\n *\n * @param data - string to encode\n * @returns base64-encoded string\n */\nfunction base64encode(data) {\n // discuss at: http://phpjs.org/functions/base64_encode/\n // original by: Tyler Akins (http://rumkin.com)\n // improved by: Bayron Guevara\n // improved by: Thunder.m\n // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // improved by: Rafał Kukawski (http://kukawski.pl)\n // bugfixed by: Pellentesque Malesuada\n // example 1: base64_encode('Kevin van Zonneveld');\n // returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA=='\n // example 2: base64_encode('a');\n // returns 2: 'YQ=='\n // example 3: base64_encode('✓ à la mode');\n // returns 3: '4pyTIMOgIGxhIG1vZGU='\n var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0;\n var tmp_arr = [];\n if (!data) {\n return data;\n }\n data = unescape(encodeURIComponent(data));\n do {\n // pack three octets into four hexets\n o1 = data.charCodeAt(i++);\n o2 = data.charCodeAt(i++);\n o3 = data.charCodeAt(i++);\n bits = (o1 << 16) | (o2 << 8) | o3;\n h1 = (bits >> 18) & 0x3f;\n h2 = (bits >> 12) & 0x3f;\n h3 = (bits >> 6) & 0x3f;\n h4 = bits & 0x3f;\n // use hexets to index into b64, and append result to encoded string\n tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);\n } while (i < data.length);\n var enc = tmp_arr.join('');\n var r = data.length % 3;\n return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3);\n}\n/**\n * Decode base64 to string\n *\n * @param data - base64 to string\n * @returns decoded string\n */\nfunction base64decode(encodedData) {\n // discuss at: http://locutus.io/php/base64_decode/\n // original by: Tyler Akins (http://rumkin.com)\n // improved by: Thunder.m\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: Aman Gupta\n // input by: Brett Zamir (http://brett-zamir.me)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Pellentesque Malesuada\n // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n // improved by: Indigo744\n // example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==')\n // returns 1: 'Kevin van Zonneveld'\n // example 2: base64_decode('YQ==')\n // returns 2: 'a'\n // example 3: base64_decode('4pyTIMOgIGxhIG1vZGU=')\n // returns 3: '✓ à la mode'\n // decodeUTF8string()\n // Internal function to decode properly UTF8 string\n // Adapted from Solution #1 at https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding\n var decodeUTF8string = function (str) {\n // Going backwards: from bytestream, to percent-encoding, to original string.\n return decodeURIComponent(str\n .split('')\n .map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\n })\n .join(''));\n };\n var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, dec = '';\n var tmpArr = [];\n if (!encodedData) {\n return encodedData;\n }\n encodedData += '';\n do {\n // unpack four hexets into three octets using index points in b64\n h1 = b64.indexOf(encodedData.charAt(i++));\n h2 = b64.indexOf(encodedData.charAt(i++));\n h3 = b64.indexOf(encodedData.charAt(i++));\n h4 = b64.indexOf(encodedData.charAt(i++));\n bits = (h1 << 18) | (h2 << 12) | (h3 << 6) | h4;\n o1 = (bits >> 16) & 0xff;\n o2 = (bits >> 8) & 0xff;\n o3 = bits & 0xff;\n if (h3 === 64) {\n tmpArr[ac++] = String.fromCharCode(o1);\n }\n else if (h4 === 64) {\n tmpArr[ac++] = String.fromCharCode(o1, o2);\n }\n else {\n tmpArr[ac++] = String.fromCharCode(o1, o2, o3);\n }\n } while (i < encodedData.length);\n dec = tmpArr.join('');\n return decodeUTF8string(dec.replace(/\\0+$/, ''));\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nfunction payloadBuilder() {\n var dict = {}, allJson = [], jsonForProcessing = [], contextEntitiesForProcessing = [];\n var processor;\n var add = function (key, value) {\n if (value != null && value !== '') {\n // null also checks undefined\n dict[key] = value;\n }\n };\n var addDict = function (dict) {\n for (var key in dict) {\n if (Object.prototype.hasOwnProperty.call(dict, key)) {\n add(key, dict[key]);\n }\n }\n };\n var addJson = function (keyIfEncoded, keyIfNotEncoded, json) {\n if (json && isNonEmptyJson(json)) {\n var jsonWithKeys = { keyIfEncoded: keyIfEncoded, keyIfNotEncoded: keyIfNotEncoded, json: json };\n jsonForProcessing.push(jsonWithKeys);\n allJson.push(jsonWithKeys);\n }\n };\n var addContextEntity = function (entity) {\n contextEntitiesForProcessing.push(entity);\n };\n return {\n add: add,\n addDict: addDict,\n addJson: addJson,\n addContextEntity: addContextEntity,\n getPayload: function () { return dict; },\n getJson: function () { return allJson; },\n withJsonProcessor: function (jsonProcessor) {\n processor = jsonProcessor;\n },\n build: function () {\n processor === null || processor === void 0 ? void 0 : processor(this, jsonForProcessing, contextEntitiesForProcessing);\n return dict;\n },\n };\n}\n/**\n * A helper to build a Snowplow request from a set of name-value pairs, provided using the add methods.\n * Will base64 encode JSON, if desired, on build\n *\n * @returns The request builder, with add and build methods\n */\nfunction payloadJsonProcessor(encodeBase64) {\n return function (payloadBuilder, jsonForProcessing, contextEntitiesForProcessing) {\n var add = function (json, keyIfEncoded, keyIfNotEncoded) {\n var str = JSON.stringify(json);\n if (encodeBase64) {\n payloadBuilder.add(keyIfEncoded, base64urlencode(str));\n }\n else {\n payloadBuilder.add(keyIfNotEncoded, str);\n }\n };\n var getContextFromPayload = function () {\n var payload = payloadBuilder.getPayload();\n if (encodeBase64 ? payload.cx : payload.co) {\n return JSON.parse(encodeBase64 ? base64urldecode(payload.cx) : payload.co);\n }\n return undefined;\n };\n var combineContexts = function (originalContext, newContext) {\n var context = originalContext || getContextFromPayload();\n if (context) {\n context.data = context.data.concat(newContext.data);\n }\n else {\n context = newContext;\n }\n return context;\n };\n var context = undefined;\n for (var _i = 0, jsonForProcessing_1 = jsonForProcessing; _i < jsonForProcessing_1.length; _i++) {\n var json = jsonForProcessing_1[_i];\n if (json.keyIfEncoded === 'cx') {\n context = combineContexts(context, json.json);\n }\n else {\n add(json.json, json.keyIfEncoded, json.keyIfNotEncoded);\n }\n }\n jsonForProcessing.length = 0;\n if (contextEntitiesForProcessing.length) {\n var newContext = {\n schema: 'iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0',\n data: __spreadArray([], contextEntitiesForProcessing, true),\n };\n context = combineContexts(context, newContext);\n contextEntitiesForProcessing.length = 0;\n }\n if (context) {\n add(context, 'cx', 'co');\n }\n };\n}\n/**\n * Is property a non-empty JSON?\n * @param property - Checks if object is non-empty json\n */\nfunction isNonEmptyJson(property) {\n if (!isJson(property)) {\n return false;\n }\n for (var key in property) {\n if (Object.prototype.hasOwnProperty.call(property, key)) {\n return true;\n }\n }\n return false;\n}\n/**\n * Is property a JSON?\n * @param property - Checks if object is json\n */\nfunction isJson(property) {\n return (typeof property !== 'undefined' &&\n property !== null &&\n (property.constructor === {}.constructor || property.constructor === [].constructor));\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar label = 'Snowplow: ';\nvar LOG_LEVEL;\n(function (LOG_LEVEL) {\n LOG_LEVEL[LOG_LEVEL[\"none\"] = 0] = \"none\";\n LOG_LEVEL[LOG_LEVEL[\"error\"] = 1] = \"error\";\n LOG_LEVEL[LOG_LEVEL[\"warn\"] = 2] = \"warn\";\n LOG_LEVEL[LOG_LEVEL[\"debug\"] = 3] = \"debug\";\n LOG_LEVEL[LOG_LEVEL[\"info\"] = 4] = \"info\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\nvar LOG = logger();\nfunction logger(logLevel) {\n if (logLevel === void 0) { logLevel = LOG_LEVEL.warn; }\n function setLogLevel(level) {\n if (LOG_LEVEL[level]) {\n logLevel = level;\n }\n else {\n logLevel = LOG_LEVEL.warn;\n }\n }\n /**\n * Log errors, with or without error object\n */\n function error(message, error) {\n var extraParams = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n extraParams[_i - 2] = arguments[_i];\n }\n if (logLevel >= LOG_LEVEL.error && typeof console !== 'undefined') {\n var logMsg = label + message + '\\n';\n if (error) {\n console.error.apply(console, __spreadArray([logMsg + '\\n', error], extraParams, false));\n }\n else {\n console.error.apply(console, __spreadArray([logMsg], extraParams, false));\n }\n }\n }\n /**\n * Log warnings, with or without error object\n */\n function warn(message, error) {\n var extraParams = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n extraParams[_i - 2] = arguments[_i];\n }\n if (logLevel >= LOG_LEVEL.warn && typeof console !== 'undefined') {\n var logMsg = label + message;\n if (error) {\n console.warn.apply(console, __spreadArray([logMsg + '\\n', error], extraParams, false));\n }\n else {\n console.warn.apply(console, __spreadArray([logMsg], extraParams, false));\n }\n }\n }\n /**\n * Log debug messages\n */\n function debug(message) {\n var extraParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n extraParams[_i - 1] = arguments[_i];\n }\n if (logLevel >= LOG_LEVEL.debug && typeof console !== 'undefined') {\n console.debug.apply(console, __spreadArray([label + message], extraParams, false));\n }\n }\n /**\n * Log info messages\n */\n function info(message) {\n var extraParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n extraParams[_i - 1] = arguments[_i];\n }\n if (logLevel >= LOG_LEVEL.info && typeof console !== 'undefined') {\n console.info.apply(console, __spreadArray([label + message], extraParams, false));\n }\n }\n return { setLogLevel: setLogLevel, warn: warn, error: error, debug: debug, info: info };\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Contains helper functions to aid in the addition and removal of Global Contexts\n */\nfunction globalContexts() {\n var globalPrimitives = [];\n var conditionalProviders = [];\n var namedPrimitives = {};\n var namedConditionalProviders = {};\n /**\n * Returns all applicable global contexts for a specified event\n * @param event - The event to check for applicable global contexts for\n * @returns An array of contexts\n */\n var assembleAllContexts = function (event) {\n var eventSchema = getUsefulSchema(event);\n var eventType = getEventType(event);\n var contexts = [];\n var generatedPrimitives = generatePrimitives(globalPrimitives.concat(Object.values(namedPrimitives)), event, eventType, eventSchema);\n contexts.push.apply(contexts, generatedPrimitives);\n var generatedConditionals = generateConditionals(conditionalProviders.concat(Object.values(namedConditionalProviders)), event, eventType, eventSchema);\n contexts.push.apply(contexts, generatedConditionals);\n return contexts;\n };\n return {\n getGlobalPrimitives: function () {\n return globalPrimitives.concat(Object.values(namedPrimitives));\n },\n getConditionalProviders: function () {\n return conditionalProviders.concat(Object.values(namedConditionalProviders));\n },\n addGlobalContexts: function (contexts) {\n if (Array.isArray(contexts)) {\n var acceptedConditionalContexts = [];\n var acceptedContextPrimitives = [];\n for (var _i = 0, contexts_1 = contexts; _i < contexts_1.length; _i++) {\n var context = contexts_1[_i];\n if (isConditionalContextProvider(context)) {\n acceptedConditionalContexts.push(context);\n }\n else if (isContextPrimitive(context)) {\n acceptedContextPrimitives.push(context);\n }\n }\n globalPrimitives = globalPrimitives.concat(acceptedContextPrimitives);\n conditionalProviders = conditionalProviders.concat(acceptedConditionalContexts);\n }\n else {\n for (var _a = 0, _b = Object.entries(contexts); _a < _b.length; _a++) {\n var _c = _b[_a], name_1 = _c[0], context = _c[1];\n if (isConditionalContextProvider(context)) {\n namedConditionalProviders[name_1] = context;\n }\n else if (isContextPrimitive(context)) {\n namedPrimitives[name_1] = context;\n }\n }\n }\n },\n clearGlobalContexts: function () {\n conditionalProviders = [];\n globalPrimitives = [];\n namedConditionalProviders = {};\n namedPrimitives = {};\n },\n removeGlobalContexts: function (contexts) {\n var _loop_1 = function (context) {\n if (typeof context === 'string') {\n delete namedConditionalProviders[context];\n delete namedPrimitives[context];\n }\n else if (isConditionalContextProvider(context)) {\n conditionalProviders = conditionalProviders.filter(function (item) { return !compareProvider(context, item); });\n }\n else if (isContextPrimitive(context)) {\n globalPrimitives = globalPrimitives.filter(function (item) { return !compareProvider(context, item); });\n }\n };\n for (var _i = 0, contexts_2 = contexts; _i < contexts_2.length; _i++) {\n var context = contexts_2[_i];\n _loop_1(context);\n }\n },\n getApplicableContexts: function (event) {\n return assembleAllContexts(event);\n },\n };\n}\nfunction pluginContexts(plugins) {\n /**\n * Add common contexts to every event\n *\n * @param array - additionalContexts List of user-defined contexts\n * @returns userContexts combined with commonContexts\n */\n return {\n addPluginContexts: function (additionalContexts) {\n var combinedContexts = additionalContexts\n ? __spreadArray([], additionalContexts, true) : [];\n plugins.forEach(function (plugin) {\n try {\n if (plugin.contexts) {\n combinedContexts.push.apply(combinedContexts, plugin.contexts());\n }\n }\n catch (ex) {\n LOG.error('Error adding plugin contexts', ex);\n }\n });\n return combinedContexts;\n },\n };\n}\n/**\n * Find dynamic context generating functions and return their results to be merged into the static contexts\n * Combine an array of unchanging contexts with the result of a context-creating function\n *\n * @param dynamicOrStaticContexts - Array of custom context Objects or custom context generating functions\n * @param Parameters - to pass to dynamic context callbacks\n * @returns An array of Self Describing JSON context\n */\nfunction resolveDynamicContext(dynamicOrStaticContexts) {\n var _a;\n var extraParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n extraParams[_i - 1] = arguments[_i];\n }\n return ((_a = dynamicOrStaticContexts === null || dynamicOrStaticContexts === void 0 ? void 0 : dynamicOrStaticContexts.map(function (context) {\n if (typeof context === 'function') {\n try {\n return context.apply(void 0, extraParams);\n }\n catch (e) {\n //TODO: provide warning\n return undefined;\n }\n }\n else {\n return context;\n }\n }).filter(Boolean)) !== null && _a !== void 0 ? _a : []);\n}\n/**\n * Slices a schema into its composite parts. Useful for ruleset filtering.\n * @param input - A schema string\n * @returns The vendor, schema name, major, minor and patch information of a schema string\n */\nfunction getSchemaParts(input) {\n var re = new RegExp('^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/jsonschema/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$');\n var matches = re.exec(input);\n if (matches !== null)\n return matches.slice(1, 6);\n return undefined;\n}\n/**\n * Validates the vendor section of a schema string contains allowed wildcard values\n * @param parts - Array of parts from a schema string\n * @returns Whether the vendor validation parts are a valid combination\n */\nfunction validateVendorParts(parts) {\n if (parts[0] === '*' || parts[1] === '*') {\n return false; // no wildcard in first or second part\n }\n if (parts.slice(2).length > 0) {\n var asterisk = false;\n for (var _i = 0, _a = parts.slice(2); _i < _a.length; _i++) {\n var part = _a[_i];\n if (part === '*')\n // mark when we've found a wildcard\n asterisk = true;\n else if (asterisk)\n // invalid if alpha parts come after wildcard\n return false;\n }\n return true;\n }\n else if (parts.length == 2)\n return true;\n return false;\n}\n/**\n * Validates the vendor part of a schema string is valid for a rule set\n * @param input - Vendor part of a schema string\n * @returns Whether the vendor validation string is valid\n */\nfunction validateVendor(input) {\n var parts = input.split('.');\n if (parts && parts.length > 1)\n return validateVendorParts(parts);\n return false;\n}\n/**\n * Checks for validity of input and returns all the sections of a schema string that are used to match rules in a ruleset\n * @param input - A Schema string\n * @returns The sections of a schema string that are used to match rules in a ruleset\n */\nfunction getRuleParts(input) {\n var re = new RegExp('^iglu:((?:(?:[a-zA-Z0-9-_]+|\\\\*).)+(?:[a-zA-Z0-9-_]+|\\\\*))/([a-zA-Z0-9-_.]+|\\\\*)/jsonschema/([1-9][0-9]*|\\\\*)-(0|[1-9][0-9]*|\\\\*)-(0|[1-9][0-9]*|\\\\*)$');\n var matches = re.exec(input);\n if (matches !== null && validateVendor(matches[1]))\n return matches.slice(1, 6);\n return undefined;\n}\n/**\n * Ensures the rules specified in a schema string of a ruleset are valid\n * @param input - A Schema string\n * @returns if there rule is valid\n */\nfunction isValidRule(input) {\n var ruleParts = getRuleParts(input);\n if (ruleParts) {\n var vendor = ruleParts[0];\n return ruleParts.length === 5 && validateVendor(vendor);\n }\n return false;\n}\n/**\n * Check if a variable is an Array containing only strings\n * @param input - The variable to validate\n * @returns True if the input is an array containing only strings\n */\nfunction isStringArray(input) {\n return (Array.isArray(input) &&\n input.every(function (x) {\n return typeof x === 'string';\n }));\n}\n/**\n * Validates whether a rule set is an array of valid ruleset strings\n * @param input - The Array of rule set arguments\n * @returns True is the input is an array of valid rules\n */\nfunction isValidRuleSetArg(input) {\n if (isStringArray(input))\n return input.every(function (x) {\n return isValidRule(x);\n });\n else if (typeof input === 'string')\n return isValidRule(input);\n return false;\n}\n/**\n * Check if a variable is a valid, non-empty Self Describing JSON\n * @param input - The variable to validate\n * @returns True if a valid Self Describing JSON\n */\nfunction isSelfDescribingJson(input) {\n var sdj = input;\n if (isNonEmptyJson(sdj))\n if ('schema' in sdj && 'data' in sdj)\n return typeof sdj.schema === 'string' && typeof sdj.data === 'object';\n return false;\n}\n/**\n * Validates if the input object contains the expected properties of a ruleset\n * @param input - The object containing a rule set\n * @returns True if a valid rule set\n */\nfunction isRuleSet(input) {\n var ruleSet = input;\n var ruleCount = 0;\n if (input != null && typeof input === 'object' && !Array.isArray(input)) {\n if (Object.prototype.hasOwnProperty.call(ruleSet, 'accept')) {\n if (isValidRuleSetArg(ruleSet['accept'])) {\n ruleCount += 1;\n }\n else {\n return false;\n }\n }\n if (Object.prototype.hasOwnProperty.call(ruleSet, 'reject')) {\n if (isValidRuleSetArg(ruleSet['reject'])) {\n ruleCount += 1;\n }\n else {\n return false;\n }\n }\n // if either 'reject' or 'accept' or both exists,\n // we have a valid ruleset\n return ruleCount > 0 && ruleCount <= 2;\n }\n return false;\n}\n/**\n * Validates if the function can be a valid context generator function\n * @param input - The function to be validated\n */\nfunction isContextCallbackFunction(input) {\n return typeof input === 'function' && input.length <= 1;\n}\n/**\n * Validates if the function can be a valid context primitive function or self describing json\n * @param input - The function or orbject to be validated\n * @returns True if either a Context Generator or Self Describing JSON\n */\nfunction isContextPrimitive(input) {\n return isContextCallbackFunction(input) || isSelfDescribingJson(input);\n}\n/**\n * Validates if an array is a valid shape to be a Filter Provider\n * @param input - The Array of Context filter callbacks\n */\nfunction isFilterProvider(input) {\n if (Array.isArray(input)) {\n if (input.length === 2) {\n if (Array.isArray(input[1])) {\n return isContextCallbackFunction(input[0]) && input[1].every(isContextPrimitive);\n }\n return isContextCallbackFunction(input[0]) && isContextPrimitive(input[1]);\n }\n }\n return false;\n}\n/**\n * Validates if an array is a valid shape to be an array of rule sets\n * @param input - The Array of Rule Sets\n */\nfunction isRuleSetProvider(input) {\n if (Array.isArray(input) && input.length === 2) {\n if (!isRuleSet(input[0]))\n return false;\n if (Array.isArray(input[1]))\n return input[1].every(isContextPrimitive);\n return isContextPrimitive(input[1]);\n }\n return false;\n}\n/**\n * Checks if an input array is either a filter provider or a rule set provider\n * @param input - An array of filter providers or rule set providers\n * @returns Whether the array is a valid {@link ConditionalContextProvider}\n */\nfunction isConditionalContextProvider(input) {\n return isFilterProvider(input) || isRuleSetProvider(input);\n}\n/**\n * Checks if a given schema matches any rules within the provided rule set\n * @param ruleSet - The rule set containing rules to match schema against\n * @param schema - The schema to be matched against the rule set\n */\nfunction matchSchemaAgainstRuleSet(ruleSet, schema) {\n var rejectCount = 0;\n var acceptCount = 0;\n var acceptRules = ruleSet['accept'];\n if (Array.isArray(acceptRules)) {\n if (ruleSet.accept.some(function (rule) { return matchSchemaAgainstRule(rule, schema); })) {\n acceptCount++;\n }\n }\n else if (typeof acceptRules === 'string') {\n if (matchSchemaAgainstRule(acceptRules, schema)) {\n acceptCount++;\n }\n }\n var rejectRules = ruleSet['reject'];\n if (Array.isArray(rejectRules)) {\n if (ruleSet.reject.some(function (rule) { return matchSchemaAgainstRule(rule, schema); })) {\n rejectCount++;\n }\n }\n else if (typeof rejectRules === 'string') {\n if (matchSchemaAgainstRule(rejectRules, schema)) {\n rejectCount++;\n }\n }\n if (acceptCount > 0 && rejectCount === 0) {\n return true;\n }\n else if (acceptCount === 0 && rejectCount > 0) {\n return false;\n }\n return false;\n}\n/**\n * Checks if a given schema matches a specific rule from a rule set\n * @param rule - The rule to match schema against\n * @param schema - The schema to be matched against the rule\n */\nfunction matchSchemaAgainstRule(rule, schema) {\n if (!isValidRule(rule))\n return false;\n var ruleParts = getRuleParts(rule);\n var schemaParts = getSchemaParts(schema);\n if (ruleParts && schemaParts) {\n if (!matchVendor(ruleParts[0], schemaParts[0]))\n return false;\n for (var i = 1; i < 5; i++) {\n if (!matchPart(ruleParts[i], schemaParts[i]))\n return false;\n }\n return true; // if it hasn't failed, it passes\n }\n return false;\n}\nfunction matchVendor(rule, vendor) {\n // rule and vendor must have same number of elements\n var vendorParts = vendor.split('.');\n var ruleParts = rule.split('.');\n if (vendorParts && ruleParts) {\n if (vendorParts.length !== ruleParts.length)\n return false;\n for (var i = 0; i < ruleParts.length; i++) {\n if (!matchPart(vendorParts[i], ruleParts[i]))\n return false;\n }\n return true;\n }\n return false;\n}\nfunction matchPart(rule, schema) {\n // parts should be the string nested between slashes in the URI: /example/\n return (rule && schema && rule === '*') || rule === schema;\n}\n// Returns the \"useful\" schema, i.e. what would someone want to use to identify events.\n// For some events this is the 'e' property but for unstructured events, this is the\n// 'schema' from the 'ue_px' field.\nfunction getUsefulSchema(sb) {\n var eventJson = sb.getJson();\n for (var _i = 0, eventJson_1 = eventJson; _i < eventJson_1.length; _i++) {\n var json = eventJson_1[_i];\n if (json.keyIfEncoded === 'ue_px' && typeof json.json['data'] === 'object') {\n var schema = json.json['data']['schema'];\n if (typeof schema == 'string') {\n return schema;\n }\n }\n }\n return '';\n}\nfunction getEventType(payloadBuilder) {\n var eventType = payloadBuilder.getPayload()['e'];\n return typeof eventType === 'string' ? eventType : '';\n}\nfunction buildGenerator(generator, event, eventType, eventSchema) {\n var contextGeneratorResult = undefined;\n try {\n // try to evaluate context generator\n var args = {\n event: event.getPayload(),\n eventType: eventType,\n eventSchema: eventSchema,\n };\n contextGeneratorResult = generator(args);\n // determine if the produced result is a valid SDJ\n if (Array.isArray(contextGeneratorResult) && contextGeneratorResult.every(isSelfDescribingJson)) {\n return contextGeneratorResult;\n }\n else if (isSelfDescribingJson(contextGeneratorResult)) {\n return contextGeneratorResult;\n }\n else {\n return undefined;\n }\n }\n catch (error) {\n contextGeneratorResult = undefined;\n }\n return contextGeneratorResult;\n}\nfunction normalizeToArray(input) {\n if (Array.isArray(input)) {\n return input;\n }\n return Array.of(input);\n}\nfunction generatePrimitives(contextPrimitives, event, eventType, eventSchema) {\n var _a;\n var normalizedInputs = normalizeToArray(contextPrimitives);\n var partialEvaluate = function (primitive) {\n var result = evaluatePrimitive(primitive, event, eventType, eventSchema);\n if (result && result.length !== 0) {\n return result;\n }\n return undefined;\n };\n var generatedContexts = normalizedInputs.map(partialEvaluate);\n return (_a = []).concat.apply(_a, generatedContexts.filter(function (c) { return c != null && c.filter(Boolean); }));\n}\nfunction evaluatePrimitive(contextPrimitive, event, eventType, eventSchema) {\n if (isSelfDescribingJson(contextPrimitive)) {\n return [contextPrimitive];\n }\n else if (isContextCallbackFunction(contextPrimitive)) {\n var generatorOutput = buildGenerator(contextPrimitive, event, eventType, eventSchema);\n if (isSelfDescribingJson(generatorOutput)) {\n return [generatorOutput];\n }\n else if (Array.isArray(generatorOutput)) {\n return generatorOutput;\n }\n }\n return undefined;\n}\nfunction evaluateProvider(provider, event, eventType, eventSchema) {\n if (isFilterProvider(provider)) {\n var filter = provider[0];\n var filterResult = false;\n try {\n var args = {\n event: event.getPayload(),\n eventType: eventType,\n eventSchema: eventSchema,\n };\n filterResult = filter(args);\n }\n catch (error) {\n filterResult = false;\n }\n if (filterResult === true) {\n return generatePrimitives(provider[1], event, eventType, eventSchema);\n }\n }\n else if (isRuleSetProvider(provider)) {\n if (matchSchemaAgainstRuleSet(provider[0], eventSchema)) {\n return generatePrimitives(provider[1], event, eventType, eventSchema);\n }\n }\n return [];\n}\nfunction compareProviderPart(a, b) {\n if (typeof a === 'function')\n return a === b;\n return JSON.stringify(a) === JSON.stringify(b);\n}\nfunction compareProvider(a, b) {\n if (isConditionalContextProvider(a)) {\n if (!isConditionalContextProvider(b))\n return false;\n var ruleA = a[0], primitivesA = a[1];\n var ruleB = b[0], primitivesB_1 = b[1];\n if (!compareProviderPart(ruleA, ruleB))\n return false;\n if (Array.isArray(primitivesA)) {\n if (!Array.isArray(primitivesB_1))\n return false;\n if (primitivesA.length !== primitivesB_1.length)\n return false;\n return primitivesA.reduce(function (matches, a, i) { return matches && compareProviderPart(a, primitivesB_1[i]); }, true);\n }\n else {\n if (Array.isArray(primitivesB_1))\n return false;\n return compareProviderPart(primitivesA, primitivesB_1);\n }\n }\n else if (isContextPrimitive(a)) {\n if (!isContextPrimitive(b))\n return false;\n return compareProviderPart(a, b);\n }\n return false;\n}\nfunction generateConditionals(providers, event, eventType, eventSchema) {\n var _a;\n var normalizedInput = normalizeToArray(providers);\n var partialEvaluate = function (provider) {\n var result = evaluateProvider(provider, event, eventType, eventSchema);\n if (result && result.length !== 0) {\n return result;\n }\n return undefined;\n };\n var generatedContexts = normalizedInput.map(partialEvaluate);\n return (_a = []).concat.apply(_a, generatedContexts.filter(function (c) { return c != null && c.filter(Boolean); }));\n}\n\n/**\n * Create a new EventStorePayload\n */\nfunction newEventStorePayload(_a) {\n var payload = _a.payload, _b = _a.svrAnon, svrAnon = _b === void 0 ? false : _b;\n return {\n payload: payload,\n svrAnon: svrAnon,\n };\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Transform optional/old-behavior number timestamp into`Timestamp` ADT\n *\n * @param timestamp - optional number or timestamp object\n * @returns correct timestamp object\n */\nfunction getTimestamp(timestamp) {\n if (timestamp == null) {\n return { type: 'dtm', value: new Date().getTime() };\n }\n else if (typeof timestamp === 'number') {\n return { type: 'dtm', value: timestamp };\n }\n else if (timestamp.type === 'ttm') {\n // We can return timestamp here, but this is safer fallback\n return { type: 'ttm', value: timestamp.value };\n }\n else {\n return { type: 'dtm', value: timestamp.value || new Date().getTime() };\n }\n}\n/**\n * Create a tracker core object\n *\n * @param base64 - Whether to base 64 encode contexts and self describing event JSONs\n * @param corePlugins - The core plugins to be processed with each event\n * @param callback - Function applied to every payload dictionary object\n * @returns Tracker core\n */\nfunction trackerCore(configuration) {\n if (configuration === void 0) { configuration = {}; }\n function newCore(base64, corePlugins, callback) {\n var pluginContextsHelper = pluginContexts(corePlugins), globalContextsHelper = globalContexts();\n var encodeBase64 = base64, payloadPairs = {}; // Dictionary of key-value pairs which get added to every payload, e.g. tracker version\n /**\n * Wraps an array of custom contexts in a self-describing JSON\n *\n * @param contexts - Array of custom context self-describing JSONs\n * @returns Outer JSON\n */\n function completeContexts(contexts) {\n if (contexts && contexts.length) {\n return {\n schema: 'iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0',\n data: contexts,\n };\n }\n return undefined;\n }\n /**\n * Adds all global contexts to a contexts array\n *\n * @param pb - PayloadData\n * @param contexts - Custom contexts relating to the event\n */\n function attachGlobalContexts(pb, contexts) {\n var applicableContexts = globalContextsHelper.getApplicableContexts(pb);\n var returnedContexts = [];\n if (contexts && contexts.length) {\n returnedContexts.push.apply(returnedContexts, contexts);\n }\n if (applicableContexts && applicableContexts.length) {\n returnedContexts.push.apply(returnedContexts, applicableContexts);\n }\n return returnedContexts;\n }\n /**\n * Gets called by every trackXXX method\n * Adds context and payloadPairs name-value pairs to the payload\n * Applies the callback to the built payload\n *\n * @param pb - Payload\n * @param context - Custom contexts relating to the event\n * @param timestamp - Timestamp of the event\n * @returns Payload after the callback is applied or undefined if the event is skipped\n */\n function track(pb, context, timestamp) {\n if (!active) {\n LOG.error('Track called on deactivated tracker');\n return undefined;\n }\n pb.withJsonProcessor(payloadJsonProcessor(encodeBase64));\n pb.add('eid', v4());\n pb.addDict(payloadPairs);\n var tstamp = getTimestamp(timestamp);\n pb.add(tstamp.type, tstamp.value.toString());\n var allContexts = attachGlobalContexts(pb, pluginContextsHelper.addPluginContexts(context));\n var wrappedContexts = completeContexts(allContexts);\n if (wrappedContexts !== undefined) {\n pb.addJson('cx', 'co', wrappedContexts);\n }\n corePlugins.forEach(function (plugin) {\n try {\n if (plugin.beforeTrack) {\n plugin.beforeTrack(pb);\n }\n }\n catch (ex) {\n LOG.error('Plugin beforeTrack', ex);\n }\n });\n // Call the filter on plugins to determine if the event should be tracked\n var skip = corePlugins.find(function (plugin) {\n try {\n return plugin.filter && plugin.filter(pb.build()) === false;\n }\n catch (ex) {\n LOG.error('Plugin filter', ex);\n return false;\n }\n });\n if (skip) {\n return undefined;\n }\n if (typeof callback === 'function') {\n callback(pb);\n }\n var finalPayload = pb.build();\n corePlugins.forEach(function (plugin) {\n try {\n if (plugin.afterTrack) {\n plugin.afterTrack(finalPayload);\n }\n }\n catch (ex) {\n LOG.error('Plugin afterTrack', ex);\n }\n });\n return finalPayload;\n }\n /**\n * Set a persistent key-value pair to be added to every payload\n *\n * @param key - Field name\n * @param value - Field value\n */\n function addPayloadPair(key, value) {\n payloadPairs[key] = value;\n }\n var core = {\n track: track,\n addPayloadPair: addPayloadPair,\n getBase64Encoding: function () {\n return encodeBase64;\n },\n setBase64Encoding: function (encode) {\n encodeBase64 = encode;\n },\n addPayloadDict: function (dict) {\n for (var key in dict) {\n if (Object.prototype.hasOwnProperty.call(dict, key)) {\n payloadPairs[key] = dict[key];\n }\n }\n },\n resetPayloadPairs: function (dict) {\n payloadPairs = isJson(dict) ? dict : {};\n },\n setTrackerVersion: function (version) {\n addPayloadPair('tv', version);\n },\n setTrackerNamespace: function (name) {\n addPayloadPair('tna', name);\n },\n setAppId: function (appId) {\n addPayloadPair('aid', appId);\n },\n setPlatform: function (value) {\n addPayloadPair('p', value);\n },\n setUserId: function (userId) {\n addPayloadPair('uid', userId);\n },\n setScreenResolution: function (width, height) {\n addPayloadPair('res', width + 'x' + height);\n },\n setViewport: function (width, height) {\n addPayloadPair('vp', width + 'x' + height);\n },\n setColorDepth: function (depth) {\n addPayloadPair('cd', depth);\n },\n setTimezone: function (timezone) {\n addPayloadPair('tz', timezone);\n },\n setLang: function (lang) {\n addPayloadPair('lang', lang);\n },\n setIpAddress: function (ip) {\n addPayloadPair('ip', ip);\n },\n setUseragent: function (useragent) {\n addPayloadPair('ua', useragent);\n },\n addGlobalContexts: function (contexts) {\n globalContextsHelper.addGlobalContexts(contexts);\n },\n clearGlobalContexts: function () {\n globalContextsHelper.clearGlobalContexts();\n },\n removeGlobalContexts: function (contexts) {\n globalContextsHelper.removeGlobalContexts(contexts);\n },\n };\n return core;\n }\n var active = true;\n var base64 = configuration.base64, corePlugins = configuration.corePlugins, callback = configuration.callback, plugins = corePlugins !== null && corePlugins !== void 0 ? corePlugins : [], partialCore = newCore(base64 !== null && base64 !== void 0 ? base64 : true, plugins, callback), core = __assign(__assign({}, partialCore), { addPlugin: function (configuration) {\n var _a, _b;\n var plugin = configuration.plugin;\n plugins.push(plugin);\n (_a = plugin.logger) === null || _a === void 0 ? void 0 : _a.call(plugin, LOG);\n (_b = plugin.activateCorePlugin) === null || _b === void 0 ? void 0 : _b.call(plugin, core);\n }, deactivate: function () {\n plugins.forEach(function (plugin) {\n var _a;\n (_a = plugin.deactivatePlugin) === null || _a === void 0 ? void 0 : _a.call(plugin, core);\n });\n plugins.length = 0;\n active = false;\n } });\n plugins === null || plugins === void 0 ? void 0 : plugins.forEach(function (plugin) {\n var _a, _b;\n (_a = plugin.logger) === null || _a === void 0 ? void 0 : _a.call(plugin, LOG);\n (_b = plugin.activateCorePlugin) === null || _b === void 0 ? void 0 : _b.call(plugin, core);\n });\n return core;\n}\n/**\n * Build a self-describing event\n * A custom event type, allowing for an event to be tracked using your own custom schema\n * and a data object which conforms to the supplied schema\n *\n * @param event - Contains the properties and schema location for the event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSelfDescribingEvent(event) {\n var _a = event.event, schema = _a.schema, data = _a.data, pb = payloadBuilder();\n var ueJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0',\n data: { schema: schema, data: data },\n };\n pb.add('e', 'ue');\n pb.addJson('ue_px', 'ue_pr', ueJson);\n return pb;\n}\n/**\n * Build a Page View Event\n * Represents a Page View, which is typically fired as soon as possible when a web page\n * is loaded within the users browser. Often also fired on \"virtual page views\" within\n * Single Page Applications (SPA).\n *\n * @param event - Contains the properties for the Page View event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildPageView(event) {\n var pageUrl = event.pageUrl, pageTitle = event.pageTitle, referrer = event.referrer, pb = payloadBuilder();\n pb.add('e', 'pv'); // 'pv' for Page View\n pb.add('url', pageUrl);\n pb.add('page', pageTitle);\n pb.add('refr', referrer);\n return pb;\n}\n/**\n * Build a Page Ping Event\n * Fires when activity tracking is enabled in the browser.\n * Tracks same information as the last tracked Page View and includes scroll\n * information from the current page view\n *\n * @param event - Contains the properties for the Page Ping event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildPagePing(event) {\n var pageUrl = event.pageUrl, pageTitle = event.pageTitle, referrer = event.referrer, minXOffset = event.minXOffset, maxXOffset = event.maxXOffset, minYOffset = event.minYOffset, maxYOffset = event.maxYOffset, pb = payloadBuilder();\n pb.add('e', 'pp'); // 'pp' for Page Ping\n pb.add('url', pageUrl);\n pb.add('page', pageTitle);\n pb.add('refr', referrer);\n if (minXOffset && !isNaN(Number(minXOffset)))\n pb.add('pp_mix', minXOffset.toString());\n if (maxXOffset && !isNaN(Number(maxXOffset)))\n pb.add('pp_max', maxXOffset.toString());\n if (minYOffset && !isNaN(Number(minYOffset)))\n pb.add('pp_miy', minYOffset.toString());\n if (maxYOffset && !isNaN(Number(maxYOffset)))\n pb.add('pp_may', maxYOffset.toString());\n return pb;\n}\n/**\n * Build a Structured Event\n * A classic style of event tracking, allows for easier movement between analytics\n * systems. A loosely typed event, creating a Self Describing event is preferred, but\n * useful for interoperability.\n *\n * @param event - Contains the properties for the Structured event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildStructEvent(event) {\n var category = event.category, action = event.action, label = event.label, property = event.property, value = event.value, pb = payloadBuilder();\n pb.add('e', 'se'); // 'se' for Structured Event\n pb.add('se_ca', category);\n pb.add('se_ac', action);\n pb.add('se_la', label);\n pb.add('se_pr', property);\n pb.add('se_va', value == null ? undefined : value.toString());\n return pb;\n}\n/**\n * Build an Ecommerce Transaction Event\n * Allows for tracking common ecommerce events, this event is usually used when\n * a consumer completes a transaction.\n *\n * @param event - Contains the properties for the Ecommerce Transactoion event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildEcommerceTransaction(event) {\n var orderId = event.orderId, total = event.total, affiliation = event.affiliation, tax = event.tax, shipping = event.shipping, city = event.city, state = event.state, country = event.country, currency = event.currency, pb = payloadBuilder();\n pb.add('e', 'tr'); // 'tr' for Transaction\n pb.add('tr_id', orderId);\n pb.add('tr_af', affiliation);\n pb.add('tr_tt', total);\n pb.add('tr_tx', tax);\n pb.add('tr_sh', shipping);\n pb.add('tr_ci', city);\n pb.add('tr_st', state);\n pb.add('tr_co', country);\n pb.add('tr_cu', currency);\n return pb;\n}\n/**\n * Build an Ecommerce Transaction Item Event\n * Related to the {@link buildEcommerceTransaction}\n * Each Ecommerce Transaction may contain one or more EcommerceTransactionItem events\n *\n * @param event - Contains the properties for the Ecommerce Transaction Item event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildEcommerceTransactionItem(event) {\n var orderId = event.orderId, sku = event.sku, price = event.price, name = event.name, category = event.category, quantity = event.quantity, currency = event.currency, pb = payloadBuilder();\n pb.add('e', 'ti'); // 'tr' for Transaction Item\n pb.add('ti_id', orderId);\n pb.add('ti_sk', sku);\n pb.add('ti_nm', name);\n pb.add('ti_ca', category);\n pb.add('ti_pr', price);\n pb.add('ti_qu', quantity);\n pb.add('ti_cu', currency);\n return pb;\n}\n/**\n * Build a Scren View Event\n * Similar to a Page View but less focused on typical web properties\n * Often used for mobile applications as the user is presented with\n * new views as they performance navigation events\n *\n * @param event - Contains the properties for the Screen View event. One or more properties must be included.\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildScreenView(event) {\n var name = event.name, id = event.id;\n return buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/screen_view/jsonschema/1-0-0',\n data: removeEmptyProperties({ name: name, id: id }),\n },\n });\n}\n/**\n * Build a Link Click Event\n * Used when a user clicks on a link on a webpage, typically an anchor tag `<a>`\n *\n * @param event - Contains the properties for the Link Click event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildLinkClick(event) {\n var targetUrl = event.targetUrl, elementId = event.elementId, elementClasses = event.elementClasses, elementTarget = event.elementTarget, elementContent = event.elementContent;\n var eventJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1',\n data: removeEmptyProperties({ targetUrl: targetUrl, elementId: elementId, elementClasses: elementClasses, elementTarget: elementTarget, elementContent: elementContent }),\n };\n return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Impression Event\n * Used to track an advertisement impression\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Impression event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdImpression(event) {\n var impressionId = event.impressionId, costModel = event.costModel, cost = event.cost, targetUrl = event.targetUrl, bannerId = event.bannerId, zoneId = event.zoneId, advertiserId = event.advertiserId, campaignId = event.campaignId;\n var eventJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/ad_impression/jsonschema/1-0-0',\n data: removeEmptyProperties({\n impressionId: impressionId,\n costModel: costModel,\n cost: cost,\n targetUrl: targetUrl,\n bannerId: bannerId,\n zoneId: zoneId,\n advertiserId: advertiserId,\n campaignId: campaignId,\n }),\n };\n return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Click Event\n * Used to track an advertisement click\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Click event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdClick(event) {\n var targetUrl = event.targetUrl, clickId = event.clickId, costModel = event.costModel, cost = event.cost, bannerId = event.bannerId, zoneId = event.zoneId, impressionId = event.impressionId, advertiserId = event.advertiserId, campaignId = event.campaignId;\n var eventJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/ad_click/jsonschema/1-0-0',\n data: removeEmptyProperties({\n targetUrl: targetUrl,\n clickId: clickId,\n costModel: costModel,\n cost: cost,\n bannerId: bannerId,\n zoneId: zoneId,\n impressionId: impressionId,\n advertiserId: advertiserId,\n campaignId: campaignId,\n }),\n };\n return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Conversion Event\n * Used to track an advertisement click\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Conversion event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdConversion(event) {\n var conversionId = event.conversionId, costModel = event.costModel, cost = event.cost, category = event.category, action = event.action, property = event.property, initialValue = event.initialValue, advertiserId = event.advertiserId, campaignId = event.campaignId;\n var eventJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/ad_conversion/jsonschema/1-0-0',\n data: removeEmptyProperties({\n conversionId: conversionId,\n costModel: costModel,\n cost: cost,\n category: category,\n action: action,\n property: property,\n initialValue: initialValue,\n advertiserId: advertiserId,\n campaignId: campaignId,\n }),\n };\n return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Social Interaction Event\n * Social tracking will be used to track the way users interact\n * with Facebook, Twitter and Google + widgets\n * e.g. to capture “like this” or “tweet this” events.\n *\n * @param event - Contains the properties for the Social Interaction event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSocialInteraction(event) {\n var action = event.action, network = event.network, target = event.target;\n var eventJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/social_interaction/jsonschema/1-0-0',\n data: removeEmptyProperties({ action: action, network: network, target: target }),\n };\n return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Add To Cart Event\n * For tracking users adding items from a cart\n * on an ecommerce site.\n *\n * @param event - Contains the properties for the Add To Cart event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAddToCart(event) {\n var sku = event.sku, quantity = event.quantity, name = event.name, category = event.category, unitPrice = event.unitPrice, currency = event.currency;\n return buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/add_to_cart/jsonschema/1-0-0',\n data: removeEmptyProperties({\n sku: sku,\n quantity: quantity,\n name: name,\n category: category,\n unitPrice: unitPrice,\n currency: currency,\n }),\n },\n });\n}\n/**\n * Build a Remove From Cart Event\n * For tracking users removing items from a cart\n * on an ecommerce site.\n *\n * @param event - Contains the properties for the Remove From Cart event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildRemoveFromCart(event) {\n var sku = event.sku, quantity = event.quantity, name = event.name, category = event.category, unitPrice = event.unitPrice, currency = event.currency;\n return buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/remove_from_cart/jsonschema/1-0-0',\n data: removeEmptyProperties({\n sku: sku,\n quantity: quantity,\n name: name,\n category: category,\n unitPrice: unitPrice,\n currency: currency,\n }),\n },\n });\n}\n/**\n * Build a Form Focus or Change Form Event based on schema property\n * When a user focuses on a form element or when a user makes a\n * change to a form element.\n *\n * @param event - Contains the properties for the Form Focus or Change Form event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildFormFocusOrChange(event) {\n var event_schema = '';\n var schema = event.schema, formId = event.formId, elementId = event.elementId, nodeName = event.nodeName, elementClasses = event.elementClasses, value = event.value, type = event.type;\n var event_data = { formId: formId, elementId: elementId, nodeName: nodeName, elementClasses: elementClasses, value: value };\n if (schema === 'change_form') {\n event_schema = 'iglu:com.snowplowanalytics.snowplow/change_form/jsonschema/1-0-0';\n event_data.type = type;\n }\n else if (schema === 'focus_form') {\n event_schema = 'iglu:com.snowplowanalytics.snowplow/focus_form/jsonschema/1-0-0';\n event_data.elementType = type;\n }\n return buildSelfDescribingEvent({\n event: {\n schema: event_schema,\n data: removeEmptyProperties(event_data, { value: true }),\n },\n });\n}\n/**\n * Build a Form Submission Event\n * Used to track when a user submits a form\n *\n * @param event - Contains the properties for the Form Submission event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildFormSubmission(event) {\n var formId = event.formId, formClasses = event.formClasses, elements = event.elements;\n return buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/submit_form/jsonschema/1-0-0',\n data: removeEmptyProperties({ formId: formId, formClasses: formClasses, elements: elements }),\n },\n });\n}\n/**\n * Build a Site Search Event\n * Used when a user performs a search action on a page\n *\n * @param event - Contains the properties for the Site Search event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSiteSearch(event) {\n var terms = event.terms, filters = event.filters, totalResults = event.totalResults, pageResults = event.pageResults;\n return buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/site_search/jsonschema/1-0-0',\n data: removeEmptyProperties({ terms: terms, filters: filters, totalResults: totalResults, pageResults: pageResults }),\n },\n });\n}\n/**\n * Build a Consent Withdrawn Event\n * Used for tracking when a user withdraws their consent\n *\n * @param event - Contains the properties for the Consent Withdrawn event\n * @returns An object containing the PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track} and a 'consent_document' context\n */\nfunction buildConsentWithdrawn(event) {\n var all = event.all, id = event.id, version = event.version, name = event.name, description = event.description;\n var documentJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0',\n data: removeEmptyProperties({ id: id, version: version, name: name, description: description }),\n };\n return {\n event: buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/consent_withdrawn/jsonschema/1-0-0',\n data: removeEmptyProperties({\n all: all,\n }),\n },\n }),\n context: [documentJson],\n };\n}\n/**\n * Build a Consent Granted Event\n * Used for tracking when a user grants their consent\n *\n * @param event - Contains the properties for the Consent Granted event\n * @returns An object containing the PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track} and a 'consent_document' context\n */\nfunction buildConsentGranted(event) {\n var expiry = event.expiry, id = event.id, version = event.version, name = event.name, description = event.description;\n var documentJson = {\n schema: 'iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0',\n data: removeEmptyProperties({ id: id, version: version, name: name, description: description }),\n };\n return {\n event: buildSelfDescribingEvent({\n event: {\n schema: 'iglu:com.snowplowanalytics.snowplow/consent_granted/jsonschema/1-0-0',\n data: removeEmptyProperties({\n expiry: expiry,\n }),\n },\n }),\n context: [documentJson],\n };\n}\n/**\n * Returns a copy of a JSON with undefined and null properties removed\n *\n * @param event - JSON object to clean\n * @param exemptFields - Set of fields which should not be removed even if empty\n * @returns A cleaned copy of eventJson\n */\nfunction removeEmptyProperties(event, exemptFields) {\n if (exemptFields === void 0) { exemptFields = {}; }\n var ret = {};\n for (var k in event) {\n if (exemptFields[k] || (event[k] !== null && typeof event[k] !== 'undefined')) {\n ret[k] = event[k];\n }\n }\n return ret;\n}\n\nfunction newInMemoryEventStore(_a) {\n var _b = _a.maxSize, maxSize = _b === void 0 ? 1000 : _b, _c = _a.events, events = _c === void 0 ? [] : _c;\n var store = __spreadArray([], events, true);\n var count = function () { return Promise.resolve(store.length); };\n return {\n count: count,\n add: function (payload) {\n store.push(payload);\n while (store.length > maxSize) {\n store.shift();\n }\n return count();\n },\n removeHead: function (count) {\n for (var i = 0; i < count; i++) {\n store.shift();\n }\n return Promise.resolve();\n },\n iterator: function () {\n var index = 0;\n // copy the store to prevent mutation\n var events = __spreadArray([], store, true);\n return {\n next: function () {\n if (index < events.length) {\n return Promise.resolve({ value: events[index++], done: false });\n }\n return Promise.resolve({ value: undefined, done: true });\n },\n };\n },\n getAll: function () { return Promise.resolve(__spreadArray([], store, true)); },\n getAllPayloads: function () { return Promise.resolve(store.map(function (e) { return e.payload; })); },\n };\n}\n\nvar PAYLOAD_DATA_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4';\n\n/**\n * Enclose an array of events in a self-describing payload_data JSON string\n *\n * @param array - events Batch of events\n * @returns string payload_data self-describing JSON\n */\nfunction encloseInPayloadDataEnvelope(events) {\n return JSON.stringify({\n schema: PAYLOAD_DATA_SCHEMA,\n data: events,\n });\n}\n/**\n * Attaches the STM field to outbound POST events.\n *\n * @param events - the events to attach the STM to\n */\nfunction attachStmToEvent(events) {\n var stm = new Date().getTime().toString();\n for (var i = 0; i < events.length; i++) {\n events[i]['stm'] = stm;\n }\n return events;\n}\nfunction newEmitterRequest(_a) {\n var endpoint = _a.endpoint, _b = _a.protocol, protocol = _b === void 0 ? 'https' : _b, port = _a.port, _c = _a.eventMethod, eventMethod = _c === void 0 ? 'post' : _c, customHeaders = _a.customHeaders, connectionTimeout = _a.connectionTimeout, _d = _a.keepalive, keepalive = _d === void 0 ? false : _d, _e = _a.postPath, postPath = _e === void 0 ? '/com.snowplowanalytics.snowplow/tp2' : _e, _f = _a.useStm, useStm = _f === void 0 ? true : _f, _g = _a.maxPostBytes, maxPostBytes = _g === void 0 ? 40000 : _g, _h = _a.credentials, credentials = _h === void 0 ? 'include' : _h;\n var events = [];\n var usePost = eventMethod.toLowerCase() === 'post';\n var timer;\n var abortController;\n function countBytes() {\n var count = events.reduce(function (acc, event) { return acc + (usePost ? event.getPOSTRequestBytesCount() : event.getGETRequestBytesCount()); }, 0);\n if (usePost) {\n count += 88; // 88 bytes for the payload_data envelope\n }\n return count;\n }\n function countEvents() {\n return events.length;\n }\n function getServerAnonymizationOfExistingEvents() {\n return events.length > 0 ? events[0].getServerAnonymization() : undefined;\n }\n function addEvent(event) {\n if (events.length > 0 && getServerAnonymizationOfExistingEvents() !== event.getServerAnonymization()) {\n return false;\n }\n else {\n events.push(event);\n return true;\n }\n }\n function getEvents() {\n return events;\n }\n function isFull() {\n if (usePost) {\n return countBytes() >= maxPostBytes;\n }\n else {\n return events.length >= 1;\n }\n }\n function createHeaders() {\n var headers = new Headers();\n if (usePost) {\n headers.append('Content-Type', 'application/json; charset=UTF-8');\n }\n if (customHeaders) {\n Object.keys(customHeaders).forEach(function (key) {\n headers.append(key, customHeaders[key]);\n });\n }\n if (getServerAnonymizationOfExistingEvents()) {\n headers.append('SP-Anonymous', '*');\n }\n return headers;\n }\n function getFullCollectorUrl() {\n var collectorUrl = endpoint;\n if (!endpoint.includes('://')) {\n collectorUrl = \"\".concat(protocol, \"://\").concat(endpoint);\n }\n if (port) {\n collectorUrl = \"\".concat(collectorUrl, \":\").concat(port);\n }\n var path = usePost ? postPath : '/i';\n return collectorUrl + path;\n }\n function makeRequest(url, options) {\n closeRequest(false);\n abortController = new AbortController();\n timer = setTimeout(function () {\n var reason = 'Request timed out';\n console.error(reason);\n timer = undefined;\n closeRequest(false, reason);\n }, connectionTimeout !== null && connectionTimeout !== void 0 ? connectionTimeout : 5000);\n var requestOptions = __assign({ headers: createHeaders(), signal: abortController.signal, keepalive: keepalive, credentials: credentials }, options);\n var request = new Request(url, requestOptions);\n return request;\n }\n function makePostRequest() {\n var batch = attachStmToEvent(events.map(function (event) { return event.getPOSTRequestBody(); }));\n return makeRequest(getFullCollectorUrl(), {\n method: 'POST',\n body: encloseInPayloadDataEnvelope(batch),\n });\n }\n function makeGetRequest() {\n if (events.length !== 1) {\n throw new Error('Only one event can be sent in a GET request');\n }\n var event = events[0];\n var url = event.getGETRequestURL(getFullCollectorUrl(), useStm);\n return makeRequest(url, {\n method: 'GET',\n });\n }\n function toRequest() {\n if (events.length === 0) {\n return undefined;\n }\n if (usePost) {\n return makePostRequest();\n }\n else {\n return makeGetRequest();\n }\n }\n function closeRequest(successful, reason) {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n if (abortController !== undefined) {\n var controller = abortController;\n abortController = undefined;\n if (!successful) {\n controller.abort(reason);\n }\n }\n }\n return {\n addEvent: addEvent,\n getEvents: getEvents,\n toRequest: toRequest,\n countBytes: countBytes,\n countEvents: countEvents,\n isFull: isFull,\n closeRequest: closeRequest,\n };\n}\n\n/**\n * Count the number of bytes a string will occupy when UTF-8 encoded\n * Taken from http://stackoverflow.com/questions/2848462/count-bytes-in-textarea-using-javascript/\n *\n * @param s - The string\n * @returns number Length of s in bytes when UTF-8 encoded\n */\nfunction getUTF8Length(s) {\n var len = 0;\n for (var i = 0; i < s.length; i++) {\n var code = s.charCodeAt(i);\n if (code <= 0x7f) {\n len += 1;\n }\n else if (code <= 0x7ff) {\n len += 2;\n }\n else if (code >= 0xd800 && code <= 0xdfff) {\n // Surrogate pair: These take 4 bytes in UTF-8 and 2 chars in UCS-2\n // (Assume next char is the other [valid] half and just skip it)\n len += 4;\n i++;\n }\n else if (code < 0xffff) {\n len += 3;\n }\n else {\n len += 4;\n }\n }\n return len;\n}\n/*\n * Convert a dictionary to a querystring\n * The context field is the last in the querystring\n */\nfunction getQuerystring(request) {\n var lowPriorityKeys = { co: true, cx: true };\n var args = [];\n for (var key in request) {\n if (request.hasOwnProperty(key) && !lowPriorityKeys[key]) {\n args.push(key + '=' + encodeURIComponent(request[key]));\n }\n }\n for (var contextKey in lowPriorityKeys) {\n if (request.hasOwnProperty(contextKey) && lowPriorityKeys[contextKey]) {\n args.push(contextKey + '=' + encodeURIComponent(request[contextKey]));\n }\n }\n return '?' + args.join('&');\n}\n/*\n * Convert numeric fields to strings to match payload_data schema\n */\nfunction preparePostBody(request) {\n var cleanedRequest = Object.keys(request)\n .map(function (k) { return [k, request[k]]; })\n .reduce(function (acc, _a) {\n var key = _a[0], value = _a[1];\n acc[key] = value.toString();\n return acc;\n }, {});\n return cleanedRequest;\n}\nfunction newEmitterEvent(eventStorePayload) {\n var querystring = null;\n var postBody = null;\n var byteCountGET = null;\n var byteCountPOST = null;\n function getPayload() {\n return eventStorePayload.payload;\n }\n function getServerAnonymization() {\n var _a;\n return (_a = eventStorePayload.svrAnon) !== null && _a !== void 0 ? _a : false;\n }\n function getCachedQuerystring(payload) {\n if (querystring === null) {\n querystring = getQuerystring(payload);\n }\n return querystring;\n }\n function getGETRequestURL(collectorUrl, useStm) {\n var querystring = getCachedQuerystring(getPayload());\n if (useStm) {\n return collectorUrl + querystring.replace('?', '?stm=' + new Date().getTime() + '&');\n }\n return collectorUrl + querystring;\n }\n function getGETRequestBytesCount() {\n if (byteCountGET === null) {\n var querystring_1 = getCachedQuerystring(getPayload());\n byteCountGET = getUTF8Length(querystring_1);\n }\n return byteCountGET;\n }\n function getPOSTRequestBody() {\n if (postBody === null) {\n postBody = preparePostBody(getPayload());\n }\n return postBody;\n }\n function getPOSTRequestBytesCount() {\n if (byteCountPOST === null) {\n byteCountPOST = getUTF8Length(JSON.stringify(getPOSTRequestBody()));\n }\n return byteCountPOST;\n }\n return {\n getPayload: getPayload,\n getServerAnonymization: getServerAnonymization,\n getGETRequestURL: getGETRequestURL,\n getGETRequestBytesCount: getGETRequestBytesCount,\n getPOSTRequestBody: getPOSTRequestBody,\n getPOSTRequestBytesCount: getPOSTRequestBytesCount,\n };\n}\n\nfunction newEmitter(_a) {\n var endpoint = _a.endpoint, _b = _a.eventMethod, eventMethod = _b === void 0 ? 'post' : _b, postPath = _a.postPath, protocol = _a.protocol, port = _a.port, _c = _a.maxPostBytes, maxPostBytes = _c === void 0 ? 40000 : _c, maxGetBytes = _a.maxGetBytes, _d = _a.bufferSize, bufferSize = _d === void 0 ? 1 : _d, customHeaders = _a.customHeaders, serverAnonymization = _a.serverAnonymization, connectionTimeout = _a.connectionTimeout, keepalive = _a.keepalive, idService = _a.idService, _e = _a.dontRetryStatusCodes, dontRetryStatusCodes = _e === void 0 ? [] : _e, _f = _a.retryStatusCodes, retryStatusCodes = _f === void 0 ? [] : _f, _g = _a.retryFailedRequests, retryFailedRequests = _g === void 0 ? true : _g, onRequestFailure = _a.onRequestFailure, onRequestSuccess = _a.onRequestSuccess, _h = _a.customFetch, customFetch = _h === void 0 ? fetch : _h, useStm = _a.useStm, _j = _a.eventStore, eventStore = _j === void 0 ? newInMemoryEventStore({}) : _j, credentials = _a.credentials;\n var idServiceCalled = false;\n var flushInProgress = false;\n var usePost = eventMethod.toLowerCase() === 'post';\n dontRetryStatusCodes = dontRetryStatusCodes.concat([400, 401, 403, 410, 422]);\n function shouldRetryForStatusCode(statusCode) {\n // success, don't retry\n if (statusCode >= 200 && statusCode < 300) {\n return false;\n }\n if (!retryFailedRequests) {\n return false;\n }\n // retry if status code among custom user-supplied retry codes\n if (retryStatusCodes.includes(statusCode)) {\n return true;\n }\n // retry if status code *not* among the don't retry codes\n return !dontRetryStatusCodes.includes(statusCode);\n }\n function callOnRequestSuccess(payloads, response) {\n if (onRequestSuccess !== undefined) {\n setTimeout(function () {\n try {\n onRequestSuccess === null || onRequestSuccess === void 0 ? void 0 : onRequestSuccess(payloads, response);\n }\n catch (e) {\n LOG.error('Error in onRequestSuccess', e);\n }\n }, 0);\n }\n }\n function callOnRequestFailure(failure, response) {\n if (onRequestFailure !== undefined) {\n setTimeout(function () {\n try {\n onRequestFailure === null || onRequestFailure === void 0 ? void 0 : onRequestFailure(failure, response);\n }\n catch (e) {\n LOG.error('Error in onRequestFailure', e);\n }\n }, 0);\n }\n }\n function executeRequest(request) {\n return __awaiter(this, void 0, void 0, function () {\n var fetchRequest, payloads, response, willRetry, e_1, message;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n fetchRequest = request.toRequest();\n if (fetchRequest === undefined) {\n throw new Error('Empty batch');\n }\n payloads = request.getEvents().map(function (event) { return event.getPayload(); });\n _a.label = 1;\n case 1:\n _a.trys.push([1, 4, , 5]);\n return [4 /*yield*/, customFetch(fetchRequest)];\n case 2:\n response = _a.sent();\n return [4 /*yield*/, response.text()];\n case 3:\n _a.sent(); // wait for the response to be fully read\n request.closeRequest(true);\n if (response.ok) {\n callOnRequestSuccess(payloads, response);\n return [2 /*return*/, { success: true, retry: false, status: response.status }];\n }\n else {\n willRetry = shouldRetryForStatusCode(response.status);\n callOnRequestFailure({\n events: payloads,\n status: response.status,\n message: response.statusText,\n willRetry: willRetry,\n }, response);\n return [2 /*return*/, { success: false, retry: willRetry, status: response.status }];\n }\n case 4:\n e_1 = _a.sent();\n request.closeRequest(false);\n message = typeof e_1 === 'string' ? e_1 : e_1 ? e_1.message : 'Unknown error';\n callOnRequestFailure({\n events: payloads,\n message: message,\n willRetry: true,\n });\n return [2 /*return*/, { success: false, retry: true }];\n case 5: return [2 /*return*/];\n }\n });\n });\n }\n function newEmitterRequestWithConfig() {\n return newEmitterRequest({\n endpoint: endpoint,\n protocol: protocol,\n port: port,\n eventMethod: eventMethod,\n customHeaders: customHeaders,\n connectionTimeout: connectionTimeout,\n keepalive: keepalive,\n maxPostBytes: maxPostBytes,\n useStm: useStm,\n credentials: credentials,\n postPath: postPath,\n });\n }\n function shouldSkipEventStore(emitterEvent) {\n var eventTooBigWarning = function (bytes, maxBytes) {\n return LOG.warn('Event (' + bytes + 'B) too big, max is ' + maxBytes);\n };\n if (usePost) {\n var bytes = emitterEvent.getPOSTRequestBytesCount() + 88; // 88 bytes for the payload_data envelope\n var tooBig = bytes > maxPostBytes;\n if (tooBig) {\n eventTooBigWarning(bytes, maxPostBytes);\n }\n return tooBig;\n }\n else {\n if (maxGetBytes === undefined) {\n return false;\n }\n var bytes = emitterEvent.getGETRequestBytesCount();\n var tooBig = bytes > maxGetBytes;\n if (tooBig) {\n eventTooBigWarning(bytes, maxGetBytes);\n }\n return tooBig;\n }\n }\n function callIdService() {\n return __awaiter(this, void 0, void 0, function () {\n var request;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(idService && !idServiceCalled)) return [3 /*break*/, 2];\n idServiceCalled = true;\n request = new Request(idService, { method: 'GET' });\n return [4 /*yield*/, customFetch(request)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n });\n }\n function flush() {\n return __awaiter(this, void 0, void 0, function () {\n var e_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!flushInProgress) return [3 /*break*/, 5];\n flushInProgress = true;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, 4, 5]);\n return [4 /*yield*/, continueFlush()];\n case 2:\n _a.sent();\n return [3 /*break*/, 5];\n case 3:\n e_2 = _a.sent();\n LOG.error('Error sending events', e_2);\n return [3 /*break*/, 5];\n case 4:\n flushInProgress = false;\n return [7 /*endfinally*/];\n case 5: return [2 /*return*/];\n }\n });\n });\n }\n function continueFlush() {\n return __awaiter(this, void 0, void 0, function () {\n var request, eventStoreIterator, _a, value, done, event_1, _b, success, retry, status;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, callIdService()];\n case 1:\n _c.sent();\n request = newEmitterRequestWithConfig();\n eventStoreIterator = eventStore.iterator();\n _c.label = 2;\n case 2:\n if (request.isFull()) {\n return [3 /*break*/, 4];\n }\n return [4 /*yield*/, eventStoreIterator.next()];\n case 3:\n _a = _c.sent(), value = _a.value, done = _a.done;\n if (done || value === undefined) {\n return [3 /*break*/, 4];\n }\n event_1 = newEmitterEvent(value);\n if (!request.addEvent(event_1)) {\n return [3 /*break*/, 4];\n }\n return [3 /*break*/, 2];\n case 4:\n if (request.countEvents() === 0) {\n return [2 /*return*/];\n }\n return [4 /*yield*/, executeRequest(request)];\n case 5:\n _b = _c.sent(), success = _b.success, retry = _b.retry, status = _b.status;\n if (!(success || !retry)) return [3 /*break*/, 7];\n if (!success) {\n LOG.error(\"Status \".concat(status, \", will not retry.\"));\n }\n return [4 /*yield*/, eventStore.removeHead(request.countEvents())];\n case 6:\n _c.sent();\n _c.label = 7;\n case 7:\n if (!success) return [3 /*break*/, 9];\n return [4 /*yield*/, continueFlush()];\n case 8:\n _c.sent();\n _c.label = 9;\n case 9: return [2 /*return*/];\n }\n });\n });\n }\n function input(payload) {\n return __awaiter(this, void 0, void 0, function () {\n var eventStorePayload, event, request, count;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n eventStorePayload = newEventStorePayload({ payload: payload, svrAnon: serverAnonymization });\n event = newEmitterEvent(eventStorePayload);\n if (!shouldSkipEventStore(event)) return [3 /*break*/, 2];\n request = newEmitterRequestWithConfig();\n request.addEvent(event);\n return [4 /*yield*/, executeRequest(request)];\n case 1:\n _a.sent();\n return [3 /*break*/, 5];\n case 2: return [4 /*yield*/, eventStore.add(eventStorePayload)];\n case 3:\n count = _a.sent();\n if (!(count >= bufferSize)) return [3 /*break*/, 5];\n return [4 /*yield*/, flush()];\n case 4:\n _a.sent();\n _a.label = 5;\n case 5: return [2 /*return*/];\n }\n });\n });\n }\n function setCollectorUrl(url) {\n endpoint = url;\n }\n function setAnonymousTracking(at) {\n serverAnonymization = at;\n }\n function setBufferSize(bs) {\n bufferSize = bs;\n }\n return {\n flush: flush,\n input: input,\n setCollectorUrl: setCollectorUrl,\n setAnonymousTracking: setAnonymousTracking,\n setBufferSize: setBufferSize,\n };\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar version = version$1;\n\nexport { LOG, LOG_LEVEL, buildAdClick, buildAdConversion, buildAdImpression, buildAddToCart, buildConsentGranted, buildConsentWithdrawn, buildEcommerceTransaction, buildEcommerceTransactionItem, buildFormFocusOrChange, buildFormSubmission, buildLinkClick, buildPagePing, buildPageView, buildRemoveFromCart, buildScreenView, buildSelfDescribingEvent, buildSiteSearch, buildSocialInteraction, buildStructEvent, getRuleParts, getSchemaParts, globalContexts, isConditionalContextProvider, isContextCallbackFunction, isContextPrimitive, isFilterProvider, isJson, isNonEmptyJson, isRuleSet, isRuleSetProvider, isSelfDescribingJson, isStringArray, isValidRule, isValidRuleSetArg, matchSchemaAgainstRule, matchSchemaAgainstRuleSet, newEmitter, newEventStorePayload, newInMemoryEventStore, payloadBuilder, payloadJsonProcessor, pluginContexts, removeEmptyProperties, resolveDynamicContext, trackerCore, validateVendor, validateVendorParts, version };\n//# sourceMappingURL=index.module.js.map\n","/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { BrowserPlugin, BrowserTracker } from '@snowplow/browser-tracker-core';\nimport {\n EventJson,\n EventJsonWithKeys,\n JsonProcessor,\n Logger,\n LOG_LEVEL,\n Payload,\n PayloadBuilder,\n payloadJsonProcessor,\n version,\n getSchemaParts,\n SelfDescribingJson,\n} from '@snowplow/tracker-core';\nimport randomcolor from 'randomcolor';\n\n/**\n * Adds advertisement tracking functions\n */\nexport function DebuggerPlugin(logLevel: LOG_LEVEL = LOG_LEVEL.debug): BrowserPlugin {\n let LOG: Logger;\n let tracker: BrowserTracker;\n let eventColour: string;\n\n const colours = {\n event: () => `color: White; background: ${eventColour}; font-weight: bold; padding: 1px 4px; border-radius: 2px;`,\n snowplowPurple: 'color: White; background: #6638B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n activated: 'color: White; background: #9E62DD; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n payload: 'color: White; background: #3748B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n json: 'color: White; background: #388AB8; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n schema: 'color: White; background: #268047; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n schemaVersion: 'color: White; background: #80265F; font-weight: bold; padding: 1px 4px; border-radius: 2px;',\n };\n\n const debug = (style: string, message: string, extra?: [string, ...unknown[]]) => {\n const [extraMessage, ...rest] = extra ?? [''];\n LOG.debug(\n `v${version} %c${tracker.namespace}%c %c%s` + extraMessage,\n colours.snowplowPurple,\n '',\n style,\n message,\n ...rest\n );\n };\n\n function jsonInterceptor(encodeBase64: boolean): JsonProcessor {\n const log = (jsonType: string, data: SelfDescribingJson) => {\n const schemaParts = getSchemaParts(data['schema']);\n debug(colours.event(), 'Event', [\n '%c%s%c%s%c%s\\n%o',\n colours.json,\n `${jsonType}: ${schemaParts ? schemaParts[1] : 'Unknown Schema'}`,\n colours.schemaVersion,\n schemaParts ? `Version: ${schemaParts[2]}-${schemaParts[3]}-${schemaParts[4]}` : 'Unknown Schema Version',\n colours.schema,\n schemaParts ? `Vendor: ${schemaParts[0]}` : 'Unknown Vendor',\n data['data'],\n ]);\n };\n\n return (\n payloadBuilder: PayloadBuilder,\n jsonForProcessing: EventJson,\n contextEntitiesForProcessing: SelfDescribingJson[]\n ) => {\n if (jsonForProcessing.length) {\n for (const json of jsonForProcessing) {\n const data = json.json['data'] as SelfDescribingJson;\n if (Array.isArray(data)) {\n data.forEach((d) => {\n log(getJsonType(json), d);\n });\n } else {\n log(getJsonType(json), data);\n }\n }\n }\n if (contextEntitiesForProcessing.length) {\n for (const entity of contextEntitiesForProcessing) {\n log('Context', entity);\n }\n }\n return payloadJsonProcessor(encodeBase64)(payloadBuilder, jsonForProcessing, contextEntitiesForProcessing);\n };\n }\n\n return {\n logger: (logger) => {\n LOG = logger;\n logger.setLogLevel(logLevel);\n },\n activateBrowserPlugin: (t) => {\n tracker = t;\n debug(colours.activated, 'Tracker Activated');\n },\n beforeTrack: (payloadBuilder: PayloadBuilder) => {\n eventColour = randomcolor({ luminosity: 'dark' });\n payloadBuilder.withJsonProcessor(jsonInterceptor(tracker.core.getBase64Encoding()));\n debug(colours.event(), 'Event', ['%c%s', colours.snowplowPurple, getEventType(payloadBuilder)]);\n payloadBuilder.build();\n },\n afterTrack: (payload: Payload) => {\n debug(colours.event(), 'Event', ['%c%s\\n%o', colours.payload, 'Payload', payload]);\n },\n };\n}\n\nfunction getJsonType(json: EventJsonWithKeys) {\n switch (json.keyIfEncoded) {\n case 'cx':\n return 'Context';\n case 'ue_px':\n return 'Self Describing';\n default:\n return `${json.keyIfEncoded}, ${json.keyIfNotEncoded}`;\n }\n}\n\nfunction getEventType(payloadBuilder: PayloadBuilder) {\n const payload = payloadBuilder.getPayload();\n switch (payload['e']) {\n case 'pv':\n return 'Page View';\n case 'pp':\n return 'Page Ping';\n case 'tr':\n return 'Ecommerce Transaction';\n case 'ti':\n return 'Ecommerce Transaction Item';\n case 'se':\n return 'Structured Event';\n case 'ue':\n return 'Self Describing';\n default:\n return typeof payload['e'] === 'string' ? payload['e'] : 'Invalid';\n }\n}\n","// randomColor by David Merfield under the CC0 license\n// https://github.com/davidmerfield/randomColor/\n\n;(function(root, factory) {\n\n // Support CommonJS\n if (typeof exports === 'object') {\n var randomColor = factory();\n\n // Support NodeJS & Component, which allow module.exports to be a function\n if (typeof module === 'object' && module && module.exports) {\n exports = module.exports = randomColor;\n }\n\n // Support CommonJS 1.1.1 spec\n exports.randomColor = randomColor;\n\n // Support AMD\n } else if (typeof define === 'function' && define.amd) {\n define([], factory);\n\n // Support vanilla script loading\n } else {\n root.randomColor = factory();\n }\n\n}(this, function() {\n\n // Seed to get repeatable colors\n var seed = null;\n\n // Shared color dictionary\n var colorDictionary = {};\n\n // Populate the color dictionary\n loadColorBounds();\n\n // check if a range is taken\n var colorRanges = [];\n\n var randomColor = function (options) {\n\n options = options || {};\n\n // Check if there is a seed and ensure it's an\n // integer. Otherwise, reset the seed value.\n if (options.seed !== undefined && options.seed !== null && options.seed === parseInt(options.seed, 10)) {\n seed = options.seed;\n\n // A string was passed as a seed\n } else if (typeof options.seed === 'string') {\n seed = stringToInteger(options.seed);\n\n // Something was passed as a seed but it wasn't an integer or string\n } else if (options.seed !== undefined && options.seed !== null) {\n throw new TypeError('The seed value must be an integer or string');\n\n // No seed, reset the value outside.\n } else {\n seed = null;\n }\n\n var H,S,B;\n\n // Check if we need to generate multiple colors\n if (options.count !== null && options.count !== undefined) {\n\n var totalColors = options.count,\n colors = [];\n // Value false at index i means the range i is not taken yet.\n for (var i = 0; i < options.count; i++) {\n colorRanges.push(false)\n }\n options.count = null;\n\n while (totalColors > colors.length) {\n\n var color = randomColor(options);\n\n if (seed !== null) {\n options.seed = seed;\n }\n\n colors.push(color);\n }\n\n options.count = totalColors;\n\n return colors;\n }\n\n // First we pick a hue (H)\n H = pickHue(options);\n\n // Then use H to determine saturation (S)\n S = pickSaturation(H, options);\n\n // Then use S and H to determine brightness (B).\n B = pickBrightness(H, S, options);\n\n // Then we return the HSB color in the desired format\n return setFormat([H,S,B], options);\n };\n\n function pickHue(options) {\n if (colorRanges.length > 0) {\n var hueRange = getRealHueRange(options.hue)\n\n var hue = randomWithin(hueRange)\n\n //Each of colorRanges.length ranges has a length equal approximatelly one step\n var step = (hueRange[1] - hueRange[0]) / colorRanges.length\n\n var j = parseInt((hue - hueRange[0]) / step)\n\n //Check if the range j is taken\n if (colorRanges[j] === true) {\n j = (j + 2) % colorRanges.length\n }\n else {\n colorRanges[j] = true\n }\n\n var min = (hueRange[0] + j * step) % 359,\n max = (hueRange[0] + (j + 1) * step) % 359;\n\n hueRange = [min, max]\n\n hue = randomWithin(hueRange)\n\n if (hue < 0) {hue = 360 + hue;}\n return hue\n }\n else {\n var hueRange = getHueRange(options.hue)\n\n hue = randomWithin(hueRange);\n // Instead of storing red as two seperate ranges,\n // we group them, using negative numbers\n if (hue < 0) {\n hue = 360 + hue;\n }\n\n return hue;\n }\n }\n\n function pickSaturation (hue, options) {\n\n if (options.hue === 'monochrome') {\n return 0;\n }\n\n if (options.luminosity === 'random') {\n return randomWithin([0,100]);\n }\n\n var saturationRange = getSaturationRange(hue);\n\n var sMin = saturationRange[0],\n sMax = saturationRange[1];\n\n switch (options.luminosity) {\n\n case 'bright':\n sMin = 55;\n break;\n\n case 'dark':\n sMin = sMax - 10;\n break;\n\n case 'light':\n sMax = 55;\n break;\n }\n\n return randomWithin([sMin, sMax]);\n\n }\n\n function pickBrightness (H, S, options) {\n\n var bMin = getMinimumBrightness(H, S),\n bMax = 100;\n\n switch (options.luminosity) {\n\n case 'dark':\n bMax = bMin + 20;\n break;\n\n case 'light':\n bMin = (bMax + bMin)/2;\n break;\n\n case 'random':\n bMin = 0;\n bMax = 100;\n break;\n }\n\n return randomWithin([bMin, bMax]);\n }\n\n function setFormat (hsv, options) {\n\n switch (options.format) {\n\n case 'hsvArray':\n return hsv;\n\n case 'hslArray':\n return HSVtoHSL(hsv);\n\n case 'hsl':\n var hsl = HSVtoHSL(hsv);\n return 'hsl('+hsl[0]+', '+hsl[1]+'%, '+hsl[2]+'%)';\n\n case 'hsla':\n var hslColor = HSVtoHSL(hsv);\n var alpha = options.alpha || Math.random();\n return 'hsla('+hslColor[0]+', '+hslColor[1]+'%, '+hslColor[2]+'%, ' + alpha + ')';\n\n case 'rgbArray':\n return HSVtoRGB(hsv);\n\n case 'rgb':\n var rgb = HSVtoRGB(hsv);\n return 'rgb(' + rgb.join(', ') + ')';\n\n case 'rgba':\n var rgbColor = HSVtoRGB(hsv);\n var alpha = options.alpha || Math.random();\n return 'rgba(' + rgbColor.join(', ') + ', ' + alpha + ')';\n\n default:\n return HSVtoHex(hsv);\n }\n\n }\n\n function getMinimumBrightness(H, S) {\n\n var lowerBounds = getColorInfo(H).lowerBounds;\n\n for (var i = 0; i < lowerBounds.length - 1; i++) {\n\n var s1 = lowerBounds[i][0],\n v1 = lowerBounds[i][1];\n\n var s2 = lowerBounds[i+1][0],\n v2 = lowerBounds[i+1][1];\n\n if (S >= s1 && S <= s2) {\n\n var m = (v2 - v1)/(s2 - s1),\n b = v1 - m*s1;\n\n return m*S + b;\n }\n\n }\n\n return 0;\n }\n\n function getHueRange (colorInput) {\n\n if (typeof parseInt(colorInput) === 'number') {\n\n var number = parseInt(colorInput);\n\n if (number < 360 && number > 0) {\n return [number, number];\n }\n\n }\n\n if (typeof colorInput === 'string') {\n\n if (colorDictionary[colorInput]) {\n var color = colorDictionary[colorInput];\n if (color.hueRange) {return color.hueRange;}\n } else if (colorInput.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) {\n var hue = HexToHSB(colorInput)[0];\n return [ hue, hue ];\n }\n }\n\n return [0,360];\n\n }\n\n function getSaturationRange (hue) {\n return getColorInfo(hue).saturationRange;\n }\n\n function getColorInfo (hue) {\n\n // Maps red colors to make picking hue easier\n if (hue >= 334 && hue <= 360) {\n hue-= 360;\n }\n\n for (var colorName in colorDictionary) {\n var color = colorDictionary[colorName];\n if (color.hueRange &&\n hue >= color.hueRange[0] &&\n hue <= color.hueRange[1]) {\n return colorDictionary[colorName];\n }\n } return 'Color not found';\n }\n\n function randomWithin (range) {\n if (seed === null) {\n //generate random evenly destinct number from : https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/\n var golden_ratio = 0.618033988749895\n var r=Math.random()\n r += golden_ratio\n r %= 1\n return Math.floor(range[0] + r*(range[1] + 1 - range[0]));\n } else {\n //Seeded random algorithm from http://indiegamr.com/generate-repeatable-random-numbers-in-js/\n var max = range[1] || 1;\n var min = range[0] || 0;\n seed = (seed * 9301 + 49297) % 233280;\n var rnd = seed / 233280.0;\n return Math.floor(min + rnd * (max - min));\n}\n }\n\n function HSVtoHex (hsv){\n\n var rgb = HSVtoRGB(hsv);\n\n function componentToHex(c) {\n var hex = c.toString(16);\n return hex.length == 1 ? '0' + hex : hex;\n }\n\n var hex = '#' + componentToHex(rgb[0]) + componentToHex(rgb[1]) + componentToHex(rgb[2]);\n\n return hex;\n\n }\n\n function defineColor (name, hueRange, lowerBounds) {\n\n var sMin = lowerBounds[0][0],\n sMax = lowerBounds[lowerBounds.length - 1][0],\n\n bMin = lowerBounds[lowerBounds.length - 1][1],\n bMax = lowerBounds[0][1];\n\n colorDictionary[name] = {\n hueRange: hueRange,\n lowerBounds: lowerBounds,\n saturationRange: [sMin, sMax],\n brightnessRange: [bMin, bMax]\n };\n\n }\n\n function loadColorBounds () {\n\n defineColor(\n 'monochrome',\n null,\n [[0,0],[100,0]]\n );\n\n defineColor(\n 'red',\n [-26,18],\n [[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]\n );\n\n defineColor(\n 'orange',\n [18,46],\n [[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]\n );\n\n defineColor(\n 'yellow',\n [46,62],\n [[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]\n );\n\n defineColor(\n 'green',\n [62,178],\n [[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]\n );\n\n defineColor(\n 'blue',\n [178, 257],\n [[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]\n );\n\n defineColor(\n 'purple',\n [257, 282],\n [[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]\n );\n\n defineColor(\n 'pink',\n [282, 334],\n [[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]\n );\n\n }\n\n function HSVtoRGB (hsv) {\n\n // this doesn't work for the values of 0 and 360\n // here's the hacky fix\n var h = hsv[0];\n if (h === 0) {h = 1;}\n if (h === 360) {h = 359;}\n\n // Rebase the h,s,v values\n h = h/360;\n var s = hsv[1]/100,\n v = hsv[2]/100;\n\n var h_i = Math.floor(h*6),\n f = h * 6 - h_i,\n p = v * (1 - s),\n q = v * (1 - f*s),\n t = v * (1 - (1 - f)*s),\n r = 256,\n g = 256,\n b = 256;\n\n switch(h_i) {\n case 0: r = v; g = t; b = p; break;\n case 1: r = q; g = v; b = p; break;\n case 2: r = p; g = v; b = t; break;\n case 3: r = p; g = q; b = v; break;\n case 4: r = t; g = p; b = v; break;\n case 5: r = v; g = p; b = q; break;\n }\n\n var result = [Math.floor(r*255), Math.floor(g*255), Math.floor(b*255)];\n return result;\n }\n\n function HexToHSB (hex) {\n hex = hex.replace(/^#/, '');\n hex = hex.length === 3 ? hex.replace(/(.)/g, '$1$1') : hex;\n\n var red = parseInt(hex.substr(0, 2), 16) / 255,\n green = parseInt(hex.substr(2, 2), 16) / 255,\n blue = parseInt(hex.substr(4, 2), 16) / 255;\n\n var cMax = Math.max(red, green, blue),\n delta = cMax - Math.min(red, green, blue),\n saturation = cMax ? (delta / cMax) : 0;\n\n switch (cMax) {\n case red: return [ 60 * (((green - blue) / delta) % 6) || 0, saturation, cMax ];\n case green: return [ 60 * (((blue - red) / delta) + 2) || 0, saturation, cMax ];\n case blue: return [ 60 * (((red - green) / delta) + 4) || 0, saturation, cMax ];\n }\n }\n\n function HSVtoHSL (hsv) {\n var h = hsv[0],\n s = hsv[1]/100,\n v = hsv[2]/100,\n k = (2-s)*v;\n\n return [\n h,\n Math.round(s*v / (k<1 ? k : 2-k) * 10000) / 100,\n k/2 * 100\n ];\n }\n\n function stringToInteger (string) {\n var total = 0\n for (var i = 0; i !== string.length; i++) {\n if (total >= Number.MAX_SAFE_INTEGER) break;\n total += string.charCodeAt(i)\n }\n return total\n }\n\n // get The range of given hue when options.count!=0\n function getRealHueRange(colorHue)\n { if (!isNaN(colorHue)) {\n var number = parseInt(colorHue);\n\n if (number < 360 && number > 0) {\n return getColorInfo(colorHue).hueRange\n }\n }\n else if (typeof colorHue === 'string') {\n\n if (colorDictionary[colorHue]) {\n var color = colorDictionary[colorHue];\n\n if (color.hueRange) {\n return color.hueRange\n }\n } else if (colorHue.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) {\n var hue = HexToHSB(colorHue)[0]\n return getColorInfo(hue).hueRange\n }\n }\n\n return [0,360]\n}\n return randomColor;\n}));\n"],"names":["__spreadArray","to","from","pack","arguments","length","ar","i","l","Array","prototype","slice","call","concat","payloadJsonProcessor","L","encodeBase64","payloadBuilder","jsonForProcessing","contextEntitiesForProcessing","add","json","keyIfEncoded","keyIfNotEncoded","str","JSON","stringify","ac","tmp_arr","data","unescape","encodeURIComponent","o1","charCodeAt","o2","o3","bits","h1","a","h3","c","b64","charAt","h2","h4","enc","join","d","r","replace","combineContexts","originalContext","newContext","payload","getPayload","cx","co","n","parse","f","g","base64decode","encodedData","dec","tmpArr","indexOf","u","t","String","fromCharCode","decodeUTF8string","p","decodeURIComponent","split","map","toString","b64Data","undefined","context","_i","schema","getJsonType","H","getEventType","e","SuppressedError","LOG_LEVEL","none","error","warn","debug","info","root","this","randomColor","setFormat","hsv","options","format","hsl","HSVtoHSL","hslColor","alpha","Math","random","HSVtoRGB","rgbColor","HSVtoHex","getHueRange","colorInput","parseInt","number","colorDictionary","color","hueRange","match","hue","HexToHSB","getColorInfo","colorName","randomWithin","range","seed","floor","golden_ratio","max","min","componentToHex","hex","rgb","defineColor","name","lowerBounds","saturationRange","brightnessRange","h","s","v","h_i","q","b","z","x","result","red","substr","green","blue","cMax","delta","saturation","k","round","getRealHueRange","colorHue","isNaN","colorRanges","total","string","Number","MAX_SAFE_INTEGER","TypeError","count","totalColors","colors","push","step","j","luminosity","sMin","sMax","S","s1","v1","s2","v2","m","bMax","bMin","B","factory","module","exports","DebuggerPlugin","logLevel","LOG","tracker","eventColour","colours","event","snowplowPurple","activated","schemaVersion","style","message","extra","_a","extraMessage","rest","apply","version$1","namespace","logger","setLogLevel","activateBrowserPlugin","beforeTrack","randomcolor","withJsonProcessor","jsonInterceptor","log","jsonType","matches","re","exec","input","schemaParts","isArray","forEach","core","getBase64Encoding","build","afterTrack"],"mappings":";;;;;;wPAqNOA,WAAuBC,CAAIC,CAAAA,CAAAA,CAAMC,CACtC,CAAA,CAAA,CAAA,CAAA,CAAIA,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAArBC,CAAUC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiCC,CAAxBC,CAAAA,CAAAA,CAAI,CAAGC,CAAAA,CAAAA,CAAIN,CAAKG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAYE,CAAIC,CAAAA,CAAAA,CAAGD,CACxED,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQC,SACHD,CAAIA,CAAAA,CAAAA,CAAAA,CAAAA,CAAKG,CAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAUC,CAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAKV,CAAM,CAAA,CAAA,CAAGK,CAClDD,CAAAA,CAAAA,CAAAA,CAAAA,CAAGC,CAAKL,CAAAA,CAAAA,CAAAA,CAAKK,CAGdN,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAGY,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAOP,CAAMG,CAAAA,CAAA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