humanbehavior-js 0.1.9 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -0
- package/dist/cjs/index.js +72 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react/index.js +492 -25
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/esm/index.js +72 -15
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/react/index.js +474 -9
- package/dist/esm/react/index.js.map +1 -1
- package/dist/index.min.js +1 -15
- package/dist/index.min.js.map +1 -1
- package/dist/types/index.d.ts +20 -3
- package/dist/types/react/index.d.ts +18 -3
- package/package.json +32 -10
- package/src/api.ts +12 -7
- package/src/index.ts +2 -2
- package/src/react/index.tsx +49 -3
- package/src/tracker.ts +59 -8
- package/rollup.config.js +0 -106
- package/simple-demo.html +0 -26
- package/simple-spa.html +0 -658
- package/tsconfig.json +0 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/utils/logger.ts","../../../src/react/index.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\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);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\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;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\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]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\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; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\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\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\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\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n",null,null],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkGA;AACO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AAC7D,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CA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,IAAI,CAAC;AACtC,gBAAA,iBAAiB,EAAE;AACrB,YAAA,CAAC;AAED,YAAA,OAAO,MAAK;AACV,gBAAA,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,iBAAiB,CAAC;AACzD,gBAAA,OAAO,CAAC,SAAS,GAAG,iBAAiB;AACrC,gBAAA,OAAO,CAAC,YAAY,GAAG,oBAAoB;AAC7C,YAAA,CAAC;QACH;AACF,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;AAEb,IAAA,OAAO,IAAI;AACb;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/jsx-runtime.js","../../../src/utils/logger.ts","../../../src/react/index.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\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);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\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;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\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]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\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; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\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\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\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\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(\n type,\n key,\n self,\n source,\n owner,\n props,\n debugStack,\n debugTask\n ) {\n self = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== self ? self : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n self,\n source,\n getOwner(),\n maybeKey,\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_ELEMENT_TYPE &&\n node._store &&\n (node._store.validated = 1);\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n \"react-stack-bottom-frame\": function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React[\"react-stack-bottom-frame\"].bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n",null,null],"names":["jsxRuntimeModule","require$$0","require$$1","_jsx","_Fragment","_jsxs"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkGA;AACO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AAC7D,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAA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;YAGvB,MAAM,iBAAiB,GAAG,MAAK;gBAC7B,OAAO,CAAC,aAAa,EAAE;AACzB,YAAA,CAAC;;AAGD,YAAA,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,iBAAiB,CAAC;;AAGtD,YAAA,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS;AAC3C,YAAA,MAAM,oBAAoB,GAAG,OAAO,CAAC,YAAY;AAEjD,YAAA,OAAO,CAAC,SAAS,GAAG,UAAS,GAAG,IAAI,EAAA;AAClC,gBAAA,iBAAiB,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;AACnC,gBAAA,iBAAiB,EAAE;AACrB,YAAA,CAAC;AAED,YAAA,OAAO,CAAC,YAAY,GAAG,UAAS,GAAG,IAAI,EAAA;AACrC,gBAAA,oBAAoB,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;AACtC,gBAAA,iBAAiB,EAAE;AACrB,YAAA,CAAC;AAED,YAAA,OAAO,MAAK;AACV,gBAAA,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,iBAAiB,CAAC;AACzD,gBAAA,OAAO,CAAC,SAAS,GAAG,iBAAiB;AACrC,gBAAA,OAAO,CAAC,YAAY,GAAG,oBAAoB;AAC7C,YAAA,CAAC;QACH;AACF,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;AAEb,IAAA,OAAO,IAAI;AACb;;;;","x_google_ignoreList":[0,1,2,3]}
|
package/dist/index.min.js
CHANGED
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).HumanBehaviorTracker={})}(this,function(e){"use strict";function t(e,t,n,o){return new(n||(n=Promise))(function(i,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((o=o.apply(e,t||[])).next())})}var n;function o(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function i(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function r(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t).map(s).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),n):null}catch(e){return null}var n}function s(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=r(e.styleSheet)||t}catch(e){}return t}"function"==typeof SuppressedError&&SuppressedError,function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(n||(n={}));var a=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(t,o)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function l(e){var t=e.maskInputOptions,n=e.tagName,o=e.type,i=e.value,r=e.maskInputFn,s=i||"";return(t[n.toLowerCase()]||t[o])&&(s=r?r(s):"*".repeat(s.length)),s}var c="__rrweb_original__";var d,u,h=1,g=new RegExp("[^a-z0-9-_:]");function p(){return h++}var m=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,f=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,I=/^(data:)([^,]*),(.*)/i;function y(e,t){return(e||"").replace(m,function(e,n,o,i,r,s){var a,l=o||r||s,c=n||i||"";if(!l)return e;if(!f.test(l))return"url(".concat(c).concat(l).concat(c,")");if(I.test(l))return"url(".concat(c).concat(l).concat(c,")");if("/"===l[0])return"url(".concat(c).concat((a=t,(a.indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+l)).concat(c,")");var d=t.split("/"),u=l.split("/");d.pop();for(var h=0,g=u;h<g.length;h++){var p=g[h];"."!==p&&(".."===p?d.pop():d.push(p))}return"url(".concat(c).concat(d.join("/")).concat(c,")")})}var C=/^[^ \t\n\r\u000c]+/,v=/^[, \t\n\r\u000c]+/;function b(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function S(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function w(){var e=document.createElement("a");return e.href="",e.href}function A(e,t,n,o){return"src"===n||"href"===n&&o&&("use"!==t||"#"!==o[0])||"xlink:href"===n&&o&&"#"!==o[0]?b(e,o):"background"!==n||!o||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&o?function(e,t){if(""===t.trim())return t;var n=0;function o(e){var o,i=e.exec(t.substring(n));return i?(o=i[0],n+=o.length,o):""}for(var i=[];o(v),!(n>=t.length);){var r=o(C);if(","===r.slice(-1))r=b(e,r.substring(0,r.length-1)),i.push(r);else{var s="";r=b(e,r);for(var a=!1;;){var l=t.charAt(n);if(""===l){i.push((r+s).trim());break}if(a)")"===l&&(a=!1);else{if(","===l){n+=1,i.push((r+s).trim());break}"("===l&&(a=!0)}s+=l,n+=1}}}return i.join(", ")}(e,o):"style"===n&&o?y(o,w()):"object"===t&&"data"===n&&o?b(e,o):o:b(e,o)}function k(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&k(e.parentNode,t,n);for(var o=e.classList.length;o--;){var i=e.classList[o];if(t.test(i))return!0}return!!n&&k(e.parentNode,t,n)}function T(e,t,n){var o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("string"==typeof t){if(o.classList.contains(t))return!0;if(o.closest(".".concat(t)))return!0}else if(k(o,t,!0))return!0;if(n){if(o.matches(n))return!0;if(o.closest(n))return!0}return!1}function E(e,t){var o=t.doc,i=t.mirror,s=t.blockClass,a=t.blockSelector,h=t.maskTextClass,p=t.maskTextSelector,m=t.inlineStylesheet,f=t.maskInputOptions,I=void 0===f?{}:f,C=t.maskTextFn,v=t.maskInputFn,b=t.dataURLOptions,k=void 0===b?{}:b,E=t.inlineImages,M=t.recordCanvas,R=t.keepIframeSrcFn,N=t.newlyAddedElement,O=void 0!==N&&N,x=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(o,i);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:n.Document,childNodes:[],compatMode:e.compatMode}:{type:n.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:n.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return function(e,t){for(var o=t.doc,i=t.blockClass,s=t.blockSelector,a=t.inlineStylesheet,h=t.maskInputOptions,p=void 0===h?{}:h,m=t.maskInputFn,f=t.dataURLOptions,I=void 0===f?{}:f,C=t.inlineImages,v=t.recordCanvas,b=t.keepIframeSrcFn,k=t.newlyAddedElement,T=void 0!==k&&k,E=t.rootId,M=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var o=e.classList.length;o--;){var i=e.classList[o];if(t.test(i))return!0}return!!n&&e.matches(n)}(e,i,s),R=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return g.test(t)?"div":t}(e),N={},O=e.attributes.length,x=0;x<O;x++){var F=e.attributes[x];N[F.name]=A(o,R,F.name,F.value)}if("link"===R&&a){var L=Array.from(o.styleSheets).find(function(t){return t.href===e.href}),U=null;L&&(U=r(L)),U&&(delete N.rel,delete N.href,N._cssText=y(U,L.href))}if("style"===R&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){(U=r(e.sheet))&&(N._cssText=y(U,w()))}if("input"===R||"textarea"===R||"select"===R){var D=e.value,B=e.checked;"radio"!==N.type&&"checkbox"!==N.type&&"submit"!==N.type&&"button"!==N.type&&D?N.value=l({type:N.type,tagName:R,value:D,maskInputOptions:p,maskInputFn:m}):B&&(N.checked=B)}"option"===R&&(e.selected&&!p.select?N.selected=!0:delete N.selected);if("canvas"===R&&v)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var o=0;o<e.height;o+=50){var i=t.getImageData,r=c in i?i[c]:i;if(new Uint32Array(r.call(t,n,o,Math.min(50,e.width-n),Math.min(50,e.height-o)).data.buffer).some(function(e){return 0!==e}))return!1}return!0})(e)||(N.rr_dataURL=e.toDataURL(I.type,I.quality));else if(!("__context"in e)){var _=e.toDataURL(I.type,I.quality),W=document.createElement("canvas");W.width=e.width,W.height=e.height,_!==W.toDataURL(I.type,I.quality)&&(N.rr_dataURL=_)}if("img"===R&&C){d||(d=o.createElement("canvas"),u=d.getContext("2d"));var G=e,Z=G.crossOrigin;G.crossOrigin="anonymous";var V=function(){try{d.width=G.naturalWidth,d.height=G.naturalHeight,u.drawImage(G,0,0),N.rr_dataURL=d.toDataURL(I.type,I.quality)}catch(e){console.warn("Cannot inline img src=".concat(G.currentSrc,"! Error: ").concat(e))}Z?N.crossOrigin=Z:G.removeAttribute("crossorigin")};G.complete&&0!==G.naturalWidth?V():G.onload=V}"audio"!==R&&"video"!==R||(N.rr_mediaState=e.paused?"paused":"played",N.rr_mediaCurrentTime=e.currentTime);T||(e.scrollLeft&&(N.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(N.rr_scrollTop=e.scrollTop));if(M){var K=e.getBoundingClientRect(),z=K.width,P=K.height;N={class:N.class,rr_width:"".concat(z,"px"),rr_height:"".concat(P,"px")}}"iframe"!==R||b(N.src)||(e.contentDocument||(N.rr_src=N.src),delete N.src);return{type:n.Element,tagName:R,attributes:N,childNodes:[],isSVG:S(e)||void 0,needBlock:M,rootId:E}}(e,{doc:o,blockClass:s,blockSelector:a,inlineStylesheet:m,maskInputOptions:I,maskInputFn:v,dataURLOptions:k,inlineImages:E,recordCanvas:M,keepIframeSrcFn:R,newlyAddedElement:O,rootId:x});case e.TEXT_NODE:return function(e,t){var o,i=t.maskTextClass,r=t.maskTextSelector,s=t.maskTextFn,a=t.rootId,l=e.parentNode&&e.parentNode.tagName,c=e.textContent,d="STYLE"===l||void 0,u="SCRIPT"===l||void 0;if(d&&c){try{e.nextSibling||e.previousSibling||(null===(o=e.parentNode.sheet)||void 0===o?void 0:o.cssRules)&&(c=(h=e.parentNode.sheet).cssRules?Array.from(h.cssRules).map(function(e){return e.cssText||""}).join(""):"")}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(t),e)}c=y(c,w())}var h;u&&(c="SCRIPT_PLACEHOLDER");!d&&!u&&c&&T(e,i,r)&&(c=s?s(c):c.replace(/[\S]/g,"*"));return{type:n.Text,textContent:c||"",isStyle:d,rootId:a}}(e,{maskTextClass:h,maskTextSelector:p,maskTextFn:C,rootId:x});case e.CDATA_SECTION_NODE:return{type:n.CDATA,textContent:"",rootId:x};case e.COMMENT_NODE:return{type:n.Comment,textContent:e.textContent||"",rootId:x};default:return!1}}function M(e){return void 0===e?"":e.toLowerCase()}function R(e,t){var r,s=t.doc,a=t.mirror,l=t.blockClass,c=t.blockSelector,d=t.maskTextClass,u=t.maskTextSelector,h=t.skipChild,g=void 0!==h&&h,m=t.inlineStylesheet,f=void 0===m||m,I=t.maskInputOptions,y=void 0===I?{}:I,C=t.maskTextFn,v=t.maskInputFn,b=t.slimDOMOptions,S=t.dataURLOptions,w=void 0===S?{}:S,A=t.inlineImages,k=void 0!==A&&A,T=t.recordCanvas,N=void 0!==T&&T,O=t.onSerialize,x=t.onIframeLoad,F=t.iframeLoadTimeout,L=void 0===F?5e3:F,U=t.onStylesheetLoad,D=t.stylesheetLoadTimeout,B=void 0===D?5e3:D,_=t.keepIframeSrcFn,W=void 0===_?function(){return!1}:_,G=t.newlyAddedElement,Z=void 0!==G&&G,V=t.preserveWhiteSpace,K=void 0===V||V,z=E(e,{doc:s,mirror:a,blockClass:l,blockSelector:c,maskTextClass:d,maskTextSelector:u,inlineStylesheet:f,maskInputOptions:y,maskTextFn:C,maskInputFn:v,dataURLOptions:w,inlineImages:k,recordCanvas:N,keepIframeSrcFn:W,newlyAddedElement:Z});if(!z)return console.warn(e,"not serialized"),null;r=a.hasNode(e)?a.getId(e):!function(e,t){if(t.comment&&e.type===n.Comment)return!0;if(e.type===n.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(M(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===M(e.attributes.name)||"icon"===M(e.attributes.rel)||"apple-touch-icon"===M(e.attributes.rel)||"shortcut icon"===M(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&M(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(M(e.attributes.property).match(/^(og|twitter|fb):/)||M(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===M(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===M(e.attributes.name)||"googlebot"===M(e.attributes.name)||"bingbot"===M(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===M(e.attributes.name)||"generator"===M(e.attributes.name)||"framework"===M(e.attributes.name)||"publisher"===M(e.attributes.name)||"progid"===M(e.attributes.name)||M(e.attributes.property).match(/^article:/)||M(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===M(e.attributes.name)||"yandex-verification"===M(e.attributes.name)||"csrf-token"===M(e.attributes.name)||"p:domain_verify"===M(e.attributes.name)||"verify-v1"===M(e.attributes.name)||"verification"===M(e.attributes.name)||"shopify-checkout-api-token"===M(e.attributes.name)))return!0}}return!1}(z,b)&&(K||z.type!==n.Text||z.isStyle||z.textContent.replace(/^\s+|\s+$/gm,"").length)?p():-2;var P=Object.assign(z,{id:r});if(a.add(e,P),-2===r)return null;O&&O(e);var j=!g;if(P.type===n.Element){j=j&&!P.needBlock,delete P.needBlock;var J=e.shadowRoot;J&&i(J)&&(P.isShadowHost=!0)}if((P.type===n.Document||P.type===n.Element)&&j){b.headWhitespace&&P.type===n.Element&&"head"===P.tagName&&(K=!1);for(var Y={doc:s,mirror:a,blockClass:l,blockSelector:c,maskTextClass:d,maskTextSelector:u,skipChild:g,inlineStylesheet:f,maskInputOptions:y,maskTextFn:C,maskInputFn:v,slimDOMOptions:b,dataURLOptions:w,inlineImages:k,recordCanvas:N,preserveWhiteSpace:K,onSerialize:O,onIframeLoad:x,iframeLoadTimeout:L,onStylesheetLoad:U,stylesheetLoadTimeout:B,keepIframeSrcFn:W},H=0,Q=Array.from(e.childNodes);H<Q.length;H++){($=R(Q[H],Y))&&P.childNodes.push($)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(var q=0,X=Array.from(e.shadowRoot.childNodes);q<X.length;q++){var $;($=R(X[q],Y))&&(i(e.shadowRoot)&&($.isShadow=!0),P.childNodes.push($))}}return e.parentNode&&o(e.parentNode)&&i(e.parentNode)&&(P.isShadow=!0),P.type===n.Element&&"iframe"===P.tagName&&function(e,t,n){var o=e.contentWindow;if(o){var i,r=!1;try{i=o.document.readyState}catch(e){return}if("complete"===i){var s="about:blank";if(o.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(a),r=!0,t()})}}}(e,function(){var t=e.contentDocument;if(t&&x){var n=R(t,{doc:t,mirror:a,blockClass:l,blockSelector:c,maskTextClass:d,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:y,maskTextFn:C,maskInputFn:v,slimDOMOptions:b,dataURLOptions:w,inlineImages:k,recordCanvas:N,preserveWhiteSpace:K,onSerialize:O,onIframeLoad:x,iframeLoadTimeout:L,onStylesheetLoad:U,stylesheetLoadTimeout:B,keepIframeSrcFn:W});n&&x(e,n)}},L),P.type===n.Element&&"link"===P.tagName&&"stylesheet"===P.attributes.rel&&function(e,t,n){var o,i=!1;try{o=e.sheet}catch(e){return}if(!o){var r=setTimeout(function(){i||(t(),i=!0)},n);e.addEventListener("load",function(){clearTimeout(r),i=!0,t()})}}(e,function(){if(U){var t=R(e,{doc:s,mirror:a,blockClass:l,blockSelector:c,maskTextClass:d,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:y,maskTextFn:C,maskInputFn:v,slimDOMOptions:b,dataURLOptions:w,inlineImages:k,recordCanvas:N,preserveWhiteSpace:K,onSerialize:O,onIframeLoad:x,iframeLoadTimeout:L,onStylesheetLoad:U,stylesheetLoadTimeout:B,keepIframeSrcFn:W});t&&U(e,t)}},B),P}function N(e,t,n=document){const o={capture:!0,passive:!0};return n.addEventListener(e,t,o),()=>n.removeEventListener(e,t,o)}const O="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let x={map:{},getId:()=>(console.error(O),-1),getNode:()=>(console.error(O),null),removeNodeFromMap(){console.error(O)},has:()=>(console.error(O),!1),reset(){console.error(O)}};function F(e,t,n={}){let o=null,i=0;return function(...r){const s=Date.now();i||!1!==n.leading||(i=s);const a=t-(s-i),l=this;a<=0||a>t?(o&&(clearTimeout(o),o=null),i=s,e.apply(l,r)):o||!1===n.trailing||(o=setTimeout(()=>{i=!1===n.leading?0:Date.now(),o=null,e.apply(l,r)},a))}}function L(e,t,n,o,i=window){const r=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,o?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),r&&r.set&&r.set.call(this,e)}}),()=>L(e,t,r||{},!0)}function U(e,t,n){try{if(!(t in e))return()=>{};const o=e[t],i=n(o);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(e){return()=>{}}}function D(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function B(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function _(e,t,n,o){if(!e)return!1;const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;if("string"==typeof t){if(i.classList.contains(t))return!0;if(o&&null!==i.closest("."+t))return!0}else if(k(i,t,o))return!0;if(n){if(e.matches(n))return!0;if(o&&null!==i.closest(n))return!0}return!1}function W(e,t){return-2===t.getId(e)}function G(e,t){if(o(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||G(e.parentNode,t))}function Z(e){return Boolean(e.changedTouches)}function V(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function K(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function z(e){return Boolean(null==e?void 0:e.shadowRoot)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(x=new Proxy(x,{get:(e,t,n)=>("map"===t&&console.error(O),Reflect.get(e,t,n))}));class P{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var j=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(j||{}),J=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e))(J||{}),Y=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Y||{}),H=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(H||{});function Q(e){return"__ln"in e}class q{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Q(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Q(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const X=(e,t)=>`${e}@${t}`;class ${constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new q,n=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{var r,s,a,l;let c=null;(null===(s=null===(r=i.getRootNode)||void 0===r?void 0:r.call(i))||void 0===s?void 0:s.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&i.getRootNode().host&&(c=i.getRootNode().host);let d=c;for(;(null===(l=null===(a=null==d?void 0:d.getRootNode)||void 0===a?void 0:a.call(d))||void 0===l?void 0:l.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&d.getRootNode().host;)d=d.getRootNode().host;const u=!(this.doc.contains(i)||d&&this.doc.contains(d));if(!i.parentNode||u)return;const h=o(i.parentNode)?this.mirror.getId(c):this.mirror.getId(i.parentNode),g=n(i);if(-1===h||-1===g)return t.addNode(i);const p=R(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{V(e,this.mirror)&&this.iframeManager.addIframe(e),K(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),z(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});p&&e.push({parentId:h,nextId:g,node:p})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of Array.from(this.movedSet.values()))te(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(const e of Array.from(this.addedSet.values()))oe(this.droppedSet,e)||te(this.removes,e,this.mirror)?oe(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let r=null;for(;t.length;){let e=null;if(r){const t=this.mirror.getId(r.value.parentNode),o=n(r.value);-1!==t&&-1!==o&&(e=r)}if(!e)for(let o=t.length-1;o>=0;o--){const i=t.get(o);if(i){const t=this.mirror.getId(i.value.parentNode);if(-1===n(i.value))continue;if(-1!==t){e=i;break}{const t=i.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const n=t.parentNode.host;if(-1!==this.mirror.getId(n)){e=i;break}}}}}if(!e){for(;t.head;)t.removeNode(t.head.value);break}r=e.previous,t.removeNode(e.value),i(e.value)}const s={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>({id:this.mirror.getId(e.node),attributes:e.attributes})).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=e=>{if(!W(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;_(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:T(e.target,this.maskTextClass,this.maskTextSelector)&&t?this.maskTextFn?this.maskTextFn(t):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(n=l({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),_(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let o=this.attributes.find(t=>t.node===e.target);if("IFRAME"===t.tagName&&"src"===e.attributeName&&!this.keepIframeSrcFn(n)){if(t.contentDocument)return;e.attributeName="rr_src"}if(o||(o={node:e.target,attributes:{}},this.attributes.push(o)),"style"===e.attributeName){const n=this.doc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue),void 0!==o.attributes.style&&null!==o.attributes.style||(o.attributes.style={});const i=o.attributes.style;for(const e of Array.from(t.style)){const o=t.style.getPropertyValue(e),r=t.style.getPropertyPriority(e);o===n.style.getPropertyValue(e)&&r===n.style.getPropertyPriority(e)||(i[e]=""===r?o:[o,r])}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(i[e]=!1)}else o.attributes[e.attributeName]=A(this.doc,t.tagName,e.attributeName,n);break}case"childList":if(_(e.target,this.blockClass,this.blockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),r=o(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);_(e.target,this.blockClass,this.blockSelector,!1)||W(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(ee(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||G(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[X(n,r)]?ee(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!o(e.target)||!i(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(this.mirror.hasNode(e)){if(W(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[X(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);_(e,this.blockClass,this.blockSelector,!1)||e.childNodes.forEach(e=>this.genAdds(e))}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ee(e,t){e.delete(t),t.childNodes.forEach(t=>ee(e,t))}function te(e,t,n){return 0!==e.length&&ne(e,t,n)}function ne(e,t,n){const{parentNode:o}=t;if(!o)return!1;const i=n.getId(o);return!!e.some(e=>e.id===i)||ne(e,o,n)}function oe(e,t){return 0!==e.size&&ie(e,t)}function ie(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||ie(e,n))}const re=[],se="undefined"!=typeof CSSGroupingRule,ae="undefined"!=typeof CSSMediaRule,le="undefined"!=typeof CSSSupportsRule,ce="undefined"!=typeof CSSConditionRule;function de(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function ue(e,t){var n,o;const i=new $;re.push(i),i.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=null===(o=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===o?void 0:o.call(n,"MutationObserver");s&&window[s]&&(r=window[s]);const a=new r(i.processMutations.bind(i));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function he({mouseInteractionCb:e,doc:t,mirror:n,blockClass:o,blockSelector:i,sampling:r}){if(!1===r.mouseInteraction)return()=>{};const s=!0===r.mouseInteraction||void 0===r.mouseInteraction?{}:r.mouseInteraction,a=[];return Object.keys(Y).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]).forEach(r=>{const s=r.toLowerCase(),l=(t=>r=>{const s=de(r);if(_(s,o,i,!0))return;const a=Z(r)?r.changedTouches[0]:r;if(!a)return;const l=n.getId(s),{clientX:c,clientY:d}=a;e({type:Y[t],id:l,x:c,y:d})})(r);a.push(N(s,l,t))}),()=>{a.forEach(e=>e())}}function ge({scrollCb:e,doc:t,mirror:n,blockClass:o,blockSelector:i,sampling:r}){return N("scroll",F(r=>{const s=de(r);if(!s||_(s,o,i,!0))return;const a=n.getId(s);if(s===t){const n=t.scrollingElement||t.documentElement;e({id:a,x:n.scrollLeft,y:n.scrollTop})}else e({id:a,x:s.scrollLeft,y:s.scrollTop})},r.scroll||100),t)}function pe(e,t){const n=Object.assign({},e);return t||delete n.userTriggered,n}const me=["INPUT","TEXTAREA","SELECT"],fe=new WeakMap;function Ie(e){return function(e,t){if(se&&e.parentRule instanceof CSSGroupingRule||ae&&e.parentRule instanceof CSSMediaRule||le&&e.parentRule instanceof CSSSupportsRule||ce&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function ye(e,t,n){let o,i;return e?(e.ownerNode?o=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:o}):{}}function Ce({mirror:e,stylesheetManager:t},n){var o,i,r;let s=null;s="#document"===n.nodeName?e.getId(n):e.getId(n.host);const a="#document"===n.nodeName?null===(o=n.defaultView)||void 0===o?void 0:o.Document:null===(r=null===(i=n.ownerDocument)||void 0===i?void 0:i.defaultView)||void 0===r?void 0:r.ShadowRoot,l=Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets");return null!==s&&-1!==s&&a&&l?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null===(e=l.get)||void 0===e?void 0:e.call(this)},set(e){var n;const o=null===(n=l.set)||void 0===n?void 0:n.call(this,e);if(null!==s&&-1!==s)try{t.adoptStyleSheets(e,s)}catch(e){}return o}}),()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}):()=>{}}function ve(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){const{mutationCb:n,mousemoveCb:o,mouseInteractionCb:i,scrollCb:r,viewportResizeCb:s,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:d,canvasMutationCb:u,fontCb:h,selectionCb:g}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),o(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),i(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),r(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),s(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),d(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),h(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),g(...e)}}(e,t);const o=ue(e,e.doc),i=function({mousemoveCb:e,sampling:t,doc:n,mirror:o}){if(!1===t.mousemove)return()=>{};const i="number"==typeof t.mousemove?t.mousemove:50,r="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let s,a=[];const l=F(t=>{const n=Date.now()-s;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],s=null},r),c=F(e=>{const t=de(e),{clientX:n,clientY:i}=Z(e)?e.changedTouches[0]:e;s||(s=Date.now()),a.push({x:n,y:i,id:o.getId(t),timeOffset:Date.now()-s}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?J.Drag:e instanceof MouseEvent?J.MouseMove:J.TouchMove)},i,{trailing:!1}),d=[N("mousemove",c,n),N("touchmove",c,n),N("drag",c,n)];return()=>{d.forEach(e=>e())}}(e),r=he(e),s=ge(e),a=function({viewportResizeCb:e}){let t=-1,n=-1;return N("resize",F(()=>{const o=D(),i=B();t===o&&n===i||(e({width:Number(i),height:Number(o)}),t=o,n=i)},200),window)}(e),c=function({inputCb:e,doc:t,mirror:n,blockClass:o,blockSelector:i,ignoreClass:r,maskInputOptions:s,maskInputFn:a,sampling:c,userTriggeredOnInput:d}){function u(e){let n=de(e);const c=e.isTrusted;if(n&&"OPTION"===n.tagName&&(n=n.parentElement),!n||!n.tagName||me.indexOf(n.tagName)<0||_(n,o,i,!0))return;const u=n.type;if(n.classList.contains(r))return;let g=n.value,p=!1;"radio"===u||"checkbox"===u?p=n.checked:(s[n.tagName.toLowerCase()]||s[u])&&(g=l({maskInputOptions:s,tagName:n.tagName,type:u,value:g,maskInputFn:a})),h(n,pe({text:g,isChecked:p,userTriggered:c},d));const m=n.name;"radio"===u&&m&&p&&t.querySelectorAll(`input[type="radio"][name="${m}"]`).forEach(e=>{e!==n&&h(e,pe({text:e.value,isChecked:!p,userTriggered:!1},d))})}function h(t,o){const i=fe.get(t);if(!i||i.text!==o.text||i.isChecked!==o.isChecked){fe.set(t,o);const i=n.getId(t);e(Object.assign(Object.assign({},o),{id:i}))}}const g=("last"===c.input?["change"]:["input","change"]).map(e=>N(e,u,t)),p=t.defaultView;if(!p)return()=>{g.forEach(e=>e())};const m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),f=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&g.push(...f.map(e=>L(e[0],e[1],{set(){u({target:this})}},!1,p))),()=>{g.forEach(e=>e())}}(e),d=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:o,sampling:i}){const r=r=>F(i=>{const s=de(i);if(!s||_(s,t,n,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:d}=s;e({type:r,id:o.getId(s),currentTime:a,volume:l,muted:c,playbackRate:d})},i.media||500),s=[N("play",r(0)),N("pause",r(1)),N("seeked",r(2)),N("volumechange",r(3)),N("ratechange",r(4))];return()=>{s.forEach(e=>e())}}(e),u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:o}){const i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=function(o,r){const{id:s,styleId:a}=ye(this,t,n.styleMirror);return(s&&-1!==s||a&&-1!==a)&&e({id:s,styleId:a,adds:[{rule:o,index:r}]}),i.apply(this,[o,r])};const r=o.CSSStyleSheet.prototype.deleteRule;let s,a;o.CSSStyleSheet.prototype.deleteRule=function(o){const{id:i,styleId:s}=ye(this,t,n.styleMirror);return(i&&-1!==i||s&&-1!==s)&&e({id:i,styleId:s,removes:[{index:o}]}),r.apply(this,[o])},o.CSSStyleSheet.prototype.replace&&(s=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=function(o){const{id:i,styleId:r}=ye(this,t,n.styleMirror);return(i&&-1!==i||r&&-1!==r)&&e({id:i,styleId:r,replace:o}),s.apply(this,[o])}),o.CSSStyleSheet.prototype.replaceSync&&(a=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=function(o){const{id:i,styleId:r}=ye(this,t,n.styleMirror);return(i&&-1!==i||r&&-1!==r)&&e({id:i,styleId:r,replaceSync:o}),a.apply(this,[o])});const l={};se?l.CSSGroupingRule=o.CSSGroupingRule:(ae&&(l.CSSMediaRule=o.CSSMediaRule),ce&&(l.CSSConditionRule=o.CSSConditionRule),le&&(l.CSSSupportsRule=o.CSSSupportsRule));const c={};return Object.entries(l).forEach(([o,i])=>{c[o]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(i,r){const{id:s,styleId:a}=ye(this.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||a&&-1!==a)&&e({id:s,styleId:a,adds:[{rule:i,index:[...Ie(this),r||0]}]}),c[o].insertRule.apply(this,[i,r])},i.prototype.deleteRule=function(i){const{id:r,styleId:s}=ye(this.parentStyleSheet,t,n.styleMirror);return(r&&-1!==r||s&&-1!==s)&&e({id:r,styleId:s,removes:[{index:[...Ie(this),i]}]}),c[o].deleteRule.apply(this,[i])}}),()=>{o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=r,s&&(o.CSSStyleSheet.prototype.replace=s),a&&(o.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})}}(e,{win:n}),h=Ce(e,e.doc),g=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:o},{win:i}){const r=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=function(i,s,a){var l;if(n.has(i))return r.apply(this,[i,s,a]);const{id:c,styleId:d}=ye(null===(l=this.parentRule)||void 0===l?void 0:l.parentStyleSheet,t,o.styleMirror);return(c&&-1!==c||d&&-1!==d)&&e({id:c,styleId:d,set:{property:i,value:s,priority:a},index:Ie(this.parentRule)}),r.apply(this,[i,s,a])};const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=function(i){var r;if(n.has(i))return s.apply(this,[i]);const{id:a,styleId:l}=ye(null===(r=this.parentRule)||void 0===r?void 0:r.parentStyleSheet,t,o.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,remove:{property:i},index:Ie(this.parentRule)}),s.apply(this,[i])},()=>{i.CSSStyleDeclaration.prototype.setProperty=r,i.CSSStyleDeclaration.prototype.removeProperty=s}}(e,{win:n}),p=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const o=[],i=new WeakMap,r=n.FontFace;n.FontFace=function(e,t,n){const o=new r(e,t,n);return i.set(o,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),o};const s=U(t.fonts,"add",function(t){return function(n){return setTimeout(()=>{const t=i.get(n);t&&(e(t),i.delete(n))},0),t.apply(this,[n])}});return o.push(()=>{n.FontFace=r}),o.push(s),()=>{o.forEach(e=>e())}}(e):()=>{},m=function(e){const{doc:t,mirror:n,blockClass:o,blockSelector:i,selectionCb:r}=e;let s=!0;const a=()=>{const e=t.getSelection();if(!e||s&&(null==e?void 0:e.isCollapsed))return;s=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const r=e.getRangeAt(t),{startContainer:s,startOffset:l,endContainer:c,endOffset:d}=r;_(s,o,i,!0)||_(c,o,i,!0)||a.push({start:n.getId(s),startOffset:l,end:n.getId(c),endOffset:d})}r({ranges:a})};return a(),N("selectionchange",a)}(e),f=[];for(const t of e.plugins)f.push(t.observer(t.callback,n,t.options));return()=>{re.forEach(e=>e.reset()),o.disconnect(),i(),r(),s(),a(),c(),d(),u(),h(),g(),p(),m(),f.forEach(e=>e())}}class be{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,o){const i=n||this.getIdToRemoteIdMap(e),r=o||this.getRemoteIdToIdMap(e);let s=i.get(t);return s||(s=this.generateIdFn(),i.set(t,s),r.set(s,t)),s}getIds(e,t){const n=this.getIdToRemoteIdMap(e),o=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,o))}getRemoteId(e,t,n){const o=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const i=o.get(t);return i||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Se{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new be(p),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new be(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if("rrweb"===e.data.type){if(!e.source)return;const t=this.crossOriginIframeMap.get(e.source);if(!t)return;const n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}}transformCrossOriginEvent(e,t){var n;switch(t.type){case j.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e),{timestamp:t.timestamp,type:j.IncrementalSnapshot,data:{source:J.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case j.Meta:case j.Load:case j.DomContentLoaded:return!1;case j.Plugin:return t;case j.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case j.IncrementalSnapshot:switch(t.data.source){case J.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case J.Drag:case J.TouchMove:case J.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case J.ViewportResize:return!1;case J.MediaInteraction:case J.MouseInteraction:case J.Scroll:case J.CanvasMutation:case J.Input:return this.replaceIds(t.data,e,["id"]),t;case J.StyleSheetRule:case J.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case J.Font:return t;case J.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case J.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}}replace(e,t,n,o){for(const i of o)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}}class we{constructor(e){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const t=this;this.restorePatches.push(U(Element.prototype,"attachShadow",function(e){return function(n){const o=e.call(this,n);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(e,t){i(e)&&(this.shadowDoms.has(e)||(this.shadowDoms.add(e),ue(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),ge(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),Ce({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)},0)))}observeAttachShadow(e){if(e.contentWindow){const t=this;this.restorePatches.push(U(e.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(o){const i=n.call(this,o);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),i}}))}}reset(){this.restorePatches.forEach(e=>e()),this.shadowDoms=new WeakSet}}
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */function Ae(e,t,n,o){return new(n||(n=Promise))(function(t,i){function r(e){try{a(o.next(e))}catch(e){i(e)}}function s(e){try{a(o.throw(e))}catch(e){i(e)}}function a(e){var o;e.done?t(e.value):(o=e.value,o instanceof n?o:new n(function(e){e(o)})).then(r,s)}a((o=o.apply(e,[])).next())})}for(var ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Te="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ee=0;Ee<64;Ee++)Te[ke.charCodeAt(Ee)]=Ee;const Me=new Map;const Re=(e,t,n)=>{if(!e||!xe(e,t)&&"object"!=typeof e)return;const o=function(e,t){let n=Me.get(e);return n||(n=new Map,Me.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let i=o.indexOf(e);return-1===i&&(i=o.length,o.push(e)),i};function Ne(e,t,n){if(e instanceof Array)return e.map(e=>Ne(e,t,n));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){const t=e.constructor.name,n=function(e){var t,n=new Uint8Array(e),o=n.length,i="";for(t=0;t<o;t+=3)i+=ke[n[t]>>2],i+=ke[(3&n[t])<<4|n[t+1]>>4],i+=ke[(15&n[t+1])<<2|n[t+2]>>6],i+=ke[63&n[t+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e);return{rr_type:t,base64:n}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ne(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ne(e.data,t,n),e.width,e.height]}}if(xe(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Re(e,t,n)}}return e}const Oe=(e,t,n)=>[...e].map(e=>Ne(e,t,n)),xe=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(n.find(n=>e instanceof t[n]))};function Fe(e,t,n){const o=[];try{const i=U(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(o,...i){return _(this,t,n,!0)||"__context"in this||(this.__context=o),e.apply(this,[o,...i])}});o.push(i)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(e=>e())}}function Le(e,t,n,o,i,r,s){const a=[],l=Object.getOwnPropertyNames(e);for(const r of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(r))try{if("function"!=typeof e[r])continue;const l=U(e,r,function(e){return function(...a){const l=e.apply(this,a);if(Re(l,s,this),!_(this.canvas,o,i,!0)){const e=Oe([...a],s,this),o={type:t,property:r,args:e};n(this.canvas,o)}return l}});a.push(l)}catch(o){const i=L(e,r,{set(e){n(this.canvas,{type:t,property:r,args:[e],setter:!0})}});a.push(i)}return a}var Ue=null;try{var De="undefined"!=typeof module&&"function"==typeof module.require&&module.require("worker_threads")||"function"==typeof __non_webpack_require__&&__non_webpack_require__("worker_threads")||"function"==typeof require&&require("worker_threads");Ue=De.Worker}catch(e){}function Be(e,t,n){var o=function(e){return Buffer.from(e,"base64").toString("utf8")}(e),i=o.indexOf("\n",10)+1,r=o.substring(i)+"";return function(e){return new Ue(r,Object.assign({},e,{eval:!0}))}}function _e(e,t,n){var o=function(e){return atob(e)}(e),i=o.indexOf("\n",10)+1,r=o.substring(i)+"",s=new Blob([r],{type:"application/javascript"});return URL.createObjectURL(s)}var We="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);var Ge,Ze=(Ge="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIEN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BoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",We?Be(Ge):function(e){var t;return function(n){return t=t||_e(e),new Worker(t,n)}}(Ge));class Ve{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};const{sampling:t="all",win:n,blockClass:o,blockSelector:i,recordCanvas:r,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,r&&"all"===t&&this.initCanvasMutationObserver(n,o,i),r&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,o,i,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,o,i){const r=Fe(t,n,o),s=new Map,a=new Ze;a.onmessage=e=>{const{id:t}=e.data;if(s.set(t,!1),!("base64"in e.data))return;const{base64:n,type:o,width:i,height:r}=e.data;this.mutationCb({id:t,type:H["2D"],commands:[{property:"clearRect",args:[0,0,i,r]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:o}]},0,0]}]})};const l=1e3/e;let c,d=0;const u=e=>{d&&e-d<l||(d=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{_(t,n,o,!0)||e.push(t)}),e})().forEach(e=>Ae(this,0,void 0,function*(){var t;const n=this.mirror.getId(e);if(s.get(n))return;if(s.set(n,!0),["webgl","webgl2"].includes(e.__context)){const n=e.getContext(e.__context);!1===(null===(t=null==n?void 0:n.getContextAttributes())||void 0===t?void 0:t.preserveDrawingBuffer)&&(null==n||n.clear(n.COLOR_BUFFER_BIT))}const o=yield createImageBitmap(e);a.postMessage({id:n,bitmap:o,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[o])}))),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{r(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=Fe(e,t,n),i=function(e,t,n,o){const i=[],r=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of r)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;const r=U(t.CanvasRenderingContext2D.prototype,s,function(i){return function(...r){return _(this.canvas,n,o,!0)||setTimeout(()=>{const n=Oe([...r],t,this);e(this.canvas,{type:H["2D"],property:s,args:n})},0),i.apply(this,r)}});i.push(r)}catch(n){const o=L(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:H["2D"],property:s,args:[t],setter:!0})}});i.push(o)}return()=>{i.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n),r=function(e,t,n,o){const i=[];return i.push(...Le(t.WebGLRenderingContext.prototype,H.WebGL,e,n,o,0,t)),void 0!==t.WebGL2RenderingContext&&i.push(...Le(t.WebGL2RenderingContext.prototype,H.WebGL2,e,n,o,0,t)),()=>{i.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=()=>{o(),i(),r()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const o=n.map(e=>{const t=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["type"]);return t}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:o}),this.pendingCanvasMutations.delete(e)}}class Ke{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new P,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},o=[];for(const t of e){let e;if(this.styleMirror.has(t))e=this.styleMirror.getId(t);else{e=this.styleMirror.add(t);const n=Array.from(t.rules||CSSRule);o.push({styleId:e,rules:n.map((e,t)=>({rule:s(e),index:t}))})}n.styleIds.push(e)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}function ze(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}let Pe,je,Je,Ye=!1;const He=new a;function Qe(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:r=null,ignoreClass:s="rr-ignore",maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:d=!0,maskAllInputs:u,maskInputOptions:h,slimDOMOptions:g,maskInputFn:p,maskTextFn:m,hooks:f,packFn:I,sampling:y={},dataURLOptions:C={},mousemoveWait:v,recordCanvas:b=!1,recordCrossOriginIframes:S=!1,userTriggeredOnInput:w=!1,collectFonts:A=!1,inlineImages:k=!1,plugins:T,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:M=new Set([])}=e,O=!S||window.parent===window;let x=!1;if(!O)try{window.parent.document,x=!1}catch(e){x=!0}if(O&&!t)throw new Error("emit function is required");void 0!==v&&void 0===y.mousemove&&(y.mousemove=v),He.reset();const F=!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==h?h:{password:!0},L=!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===g,headMetaDescKeywords:"all"===g}:g||{};let U;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let _=0;const W=e=>{for(const t of T||[])t.eventProcessor&&(e=t.eventProcessor(e));return I&&(e=I(e)),e};Pe=(e,i)=>{var r;if(!(null===(r=re[0])||void 0===r?void 0:r.isFrozen())||e.type===j.FullSnapshot||e.type===j.IncrementalSnapshot&&e.data.source===J.Mutation||re.forEach(e=>e.unfreeze()),O)null==t||t(W(e),i);else if(x){const t={type:"rrweb",event:W(e),isCheckout:i};window.parent.postMessage(t,"*")}if(e.type===j.FullSnapshot)U=e,_=0;else if(e.type===j.IncrementalSnapshot){if(e.data.source===J.Mutation&&e.data.isAttachIframe)return;_++;const t=o&&_>=o,i=n&&e.timestamp-U.timestamp>n;(t||i)&&je(!0)}};const G=e=>{Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.Mutation},e)}))},Z=e=>Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.Scroll},e)})),P=e=>Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.CanvasMutation},e)})),Y=new Ke({mutationCb:G,adoptedStyleSheetCb:e=>Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.AdoptedStyleSheet},e)}))}),H=new Se({mirror:He,mutationCb:G,stylesheetManager:Y,recordCrossOriginIframes:S,wrappedEmit:Pe});for(const e of T||[])e.getMirror&&e.getMirror({nodeMirror:He,crossOriginIframeMirror:H.crossOriginIframeMirror,crossOriginIframeStyleMirror:H.crossOriginIframeStyleMirror});Je=new Ve({recordCanvas:b,mutationCb:P,win:window,blockClass:i,blockSelector:r,mirror:He,sampling:y.canvas,dataURLOptions:C});const Q=new we({mutationCb:G,scrollCb:Z,bypassOptions:{blockClass:i,blockSelector:r,maskTextClass:l,maskTextSelector:c,inlineStylesheet:d,maskInputOptions:F,dataURLOptions:C,maskTextFn:m,maskInputFn:p,recordCanvas:b,inlineImages:k,sampling:y,slimDOMOptions:L,iframeManager:H,stylesheetManager:Y,canvasManager:Je,keepIframeSrcFn:E},mirror:He});je=(e=!1)=>{var t,n,o,s,u,h;Pe(ze({type:j.Meta,data:{href:window.location.href,width:B(),height:D()}}),e),Y.reset(),re.forEach(e=>e.lock());const g=function(e,t){var n=t||{},o=n.mirror,i=void 0===o?new a:o,r=n.blockClass,s=void 0===r?"rr-block":r,l=n.blockSelector,c=void 0===l?null:l,d=n.maskTextClass,u=void 0===d?"rr-mask":d,h=n.maskTextSelector,g=void 0===h?null:h,p=n.inlineStylesheet,m=void 0===p||p,f=n.inlineImages,I=void 0!==f&&f,y=n.recordCanvas,C=void 0!==y&&y,v=n.maskAllInputs,b=void 0!==v&&v,S=n.maskTextFn,w=n.maskInputFn,A=n.slimDOM,k=void 0!==A&&A,T=n.dataURLOptions,E=n.preserveWhiteSpace,M=n.onSerialize,N=n.onIframeLoad,O=n.iframeLoadTimeout,x=n.onStylesheetLoad,F=n.stylesheetLoadTimeout,L=n.keepIframeSrcFn;return R(e,{doc:e,mirror:i,blockClass:s,blockSelector:c,maskTextClass:u,maskTextSelector:g,skipChild:!1,inlineStylesheet:m,maskInputOptions:!0===b?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===b?{password:!0}:b,maskTextFn:S,maskInputFn:w,slimDOMOptions:!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===k,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===k?{}:k,dataURLOptions:T,inlineImages:I,recordCanvas:C,preserveWhiteSpace:E,onSerialize:M,onIframeLoad:N,iframeLoadTimeout:O,onStylesheetLoad:x,stylesheetLoadTimeout:F,keepIframeSrcFn:void 0===L?function(){return!1}:L,newlyAddedElement:!1})}(document,{mirror:He,blockClass:i,blockSelector:r,maskTextClass:l,maskTextSelector:c,inlineStylesheet:d,maskAllInputs:F,maskTextFn:m,slimDOM:L,dataURLOptions:C,recordCanvas:b,inlineImages:k,onSerialize:e=>{V(e,He)&&H.addIframe(e),K(e,He)&&Y.trackLinkElement(e),z(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{H.attachIframe(e,t),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:E});if(!g)return console.warn("Failed to snapshot the document");Pe(ze({type:j.FullSnapshot,data:{node:g,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(u=null===(s=null===document||void 0===document?void 0:document.body)||void 0===s?void 0:s.parentElement)||void 0===u?void 0:u.scrollTop)||(null===(h=null===document||void 0===document?void 0:document.body)||void 0===h?void 0:h.scrollTop)||0}}})),re.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,He.getId(document))};try{const e=[];e.push(N("DOMContentLoaded",()=>{Pe(ze({type:j.DomContentLoaded,data:{}}))}));const t=e=>{var t;return ve({mutationCb:G,mousemoveCb:(e,t)=>Pe(ze({type:j.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.MouseInteraction},e)})),scrollCb:Z,viewportResizeCb:e=>Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.ViewportResize},e)})),inputCb:e=>Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.Input},e)})),mediaInteractionCb:e=>Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.MediaInteraction},e)})),styleSheetRuleCb:e=>Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.StyleSheetRule},e)})),styleDeclarationCb:e=>Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.StyleDeclaration},e)})),canvasMutationCb:P,fontCb:e=>Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.Font},e)})),selectionCb:e=>{Pe(ze({type:j.IncrementalSnapshot,data:Object.assign({source:J.Selection},e)}))},blockClass:i,ignoreClass:s,maskTextClass:l,maskTextSelector:c,maskInputOptions:F,inlineStylesheet:d,sampling:y,recordCanvas:b,inlineImages:k,userTriggeredOnInput:w,collectFonts:A,doc:e,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:E,blockSelector:r,slimDOMOptions:L,dataURLOptions:C,mirror:He,iframeManager:H,stylesheetManager:Y,shadowDomManager:Q,canvasManager:Je,ignoreCSSAttributes:M,plugins:(null===(t=null==T?void 0:T.filter(e=>e.observer))||void 0===t?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>Pe(ze({type:j.Plugin,data:{plugin:e.name,payload:t}}))})))||[]},f)};H.addLoadListener(n=>{e.push(t(n.contentDocument))});const n=()=>{je(),e.push(t(document)),Ye=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():e.push(N("load",()=>{Pe(ze({type:j.Load,data:{}})),n()},window)),()=>{e.forEach(e=>e()),Ye=!1}}catch(e){console.warn(e)}}Qe.addCustomEvent=(e,t)=>{if(!Ye)throw new Error("please add custom event after start recording");Pe(ze({type:j.Custom,data:{tag:e,payload:t}}))},Qe.freezePage=()=>{re.forEach(e=>e.freeze())},Qe.takeFullSnapshot=e=>{if(!Ye)throw new Error("please take full snapshot after start recording");je(e)},Qe.mirror=He;const qe=[];for(let e=0;e<256;++e)qe.push((e+256).toString(16).slice(1));let Xe;const $e=new Uint8Array(16);const et={};function tt(e,t,n){let o;{const e=Date.now(),i=function(){if(!Xe){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Xe=crypto.getRandomValues.bind(crypto)}return Xe($e)}();!function(e,t,n){e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0);e.node||(e.node=n.slice(10,16),e.node[0]|=1,e.clockseq=16383&(n[8]<<8|n[9]));e.msecs=t}(et,e,i),o=function(e,t,n,o,i,r,s=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(r){if(s<0||s+16>r.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else r=new Uint8Array(16),s=0;t??=Date.now(),n??=0,o??=16383&(e[8]<<8|e[9]),i??=e.slice(10,16);const a=(1e4*(268435455&(t+=122192928e5))+n)%4294967296;r[s++]=a>>>24&255,r[s++]=a>>>16&255,r[s++]=a>>>8&255,r[s++]=255&a;const l=t/4294967296*1e4&268435455;r[s++]=l>>>8&255,r[s++]=255&l,r[s++]=l>>>24&15|16,r[s++]=l>>>16&255,r[s++]=o>>>8|128,r[s++]=255&o;for(let e=0;e<6;++e)r[s++]=i[e];return r}(i,et.msecs,et.nsecs,et.clockseq,et.node,t,n)}return t??function(e,t=0){return(qe[e[t+0]]+qe[e[t+1]]+qe[e[t+2]]+qe[e[t+3]]+"-"+qe[e[t+4]]+qe[e[t+5]]+"-"+qe[e[t+6]]+qe[e[t+7]]+"-"+qe[e[t+8]]+qe[e[t+9]]+"-"+qe[e[t+10]]+qe[e[t+11]]+qe[e[t+12]]+qe[e[t+13]]+qe[e[t+14]]+qe[e[t+15]]).toLowerCase()}(o)}var nt;e.LogLevel=void 0,(nt=e.LogLevel||(e.LogLevel={}))[nt.NONE=0]="NONE",nt[nt.ERROR=1]="ERROR",nt[nt.WARN=2]="WARN",nt[nt.INFO=3]="INFO",nt[nt.DEBUG=4]="DEBUG";const ot=new class{constructor(t){this.config={level:e.LogLevel.ERROR,enableConsole:!0,enableStorage:!1},this.isBrowser="undefined"!=typeof window,t&&(this.config=Object.assign(Object.assign({},this.config),t))}setConfig(e){this.config=Object.assign(Object.assign({},this.config),e)}shouldLog(e){return e<=this.config.level}formatMessage(e,t,...n){return`[HumanBehavior ${e}] ${(new Date).toISOString()}: ${t}`}error(t,...n){if(!this.shouldLog(e.LogLevel.ERROR))return;const o=this.formatMessage("ERROR",t);this.config.enableConsole&&console.error(o,...n),this.config.enableStorage&&this.isBrowser&&this.logToStorage(o,n)}warn(t,...n){if(!this.shouldLog(e.LogLevel.WARN))return;const o=this.formatMessage("WARN",t);this.config.enableConsole&&console.warn(o,...n),this.config.enableStorage&&this.isBrowser&&this.logToStorage(o,n)}info(t,...n){if(!this.shouldLog(e.LogLevel.INFO))return;const o=this.formatMessage("INFO",t);this.config.enableConsole&&console.log(o,...n),this.config.enableStorage&&this.isBrowser&&this.logToStorage(o,n)}debug(t,...n){if(!this.shouldLog(e.LogLevel.DEBUG))return;const o=this.formatMessage("DEBUG",t);this.config.enableConsole&&console.log(o,...n),this.config.enableStorage&&this.isBrowser&&this.logToStorage(o,n)}logToStorage(e,t){try{const n=JSON.parse(localStorage.getItem("human_behavior_logs")||"[]"),o={message:e,args:t.length>0?t:void 0,timestamp:Date.now()};n.push(o),n.length>1e3&&n.splice(0,n.length-1e3),localStorage.setItem("human_behavior_logs",JSON.stringify(n))}catch(e){}}getLogs(){if(!this.isBrowser)return[];try{return JSON.parse(localStorage.getItem("human_behavior_logs")||"[]")}catch(e){return[]}}clearLogs(){this.isBrowser&&localStorage.removeItem("human_behavior_logs")}},it=(e,...t)=>ot.error(e,...t),rt=(e,...t)=>ot.warn(e,...t),st=(e,...t)=>ot.info(e,...t),at=(e,...t)=>ot.debug(e,...t),lt=1048576;function ct(e,t,n){return(new TextEncoder).encode(JSON.stringify({sessionId:n,events:[...e,t]})).length>lt}function dt(e,t){if((new TextEncoder).encode(JSON.stringify({sessionId:t,events:[e]})).length<=lt)return[e];const n=Object.assign({},e),o=["screenshot","html","dom","fullText","innerHTML","outerHTML"];o.forEach(e=>{n[e]&&delete n[e]});if((new TextEncoder).encode(JSON.stringify({sessionId:t,events:[n]})).length<=lt)return[n];return[Object.assign({type:e.type,timestamp:e.timestamp,url:e.url,pathname:e.pathname},Object.fromEntries(Object.entries(e).filter(([e,t])=>!o.includes(e)&&"object"!=typeof t&&"string"!=typeof t||"string"==typeof t&&t.length<1e3)))]}class ut{constructor({apiKey:e,ingestionUrl:t}){this.apiKey=e,this.baseUrl=t}init(e,n){return t(this,void 0,void 0,function*(){let t=null,o=null;"undefined"!=typeof window&&(t=window.location.href,o=document.referrer),console.log("API init called with:",{sessionId:e,userId:n,entryURL:t,referrer:o,baseUrl:this.baseUrl});try{const i=yield fetch(`${this.baseUrl}/api/ingestion/init`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`,Referer:o||""},body:JSON.stringify({sessionId:e,endUserId:n,entryURL:t,referrer:o})});if(console.log("API init response status:",i.status),!i.ok){const e=yield i.text();throw console.error("API init failed:",i.status,e),new Error(`Failed to initialize ingestion: ${i.statusText} - ${e}`)}const r=yield i.json();return console.log("API init success:",r),{sessionId:r.sessionId,endUserId:r.endUserId}}catch(e){throw console.error("API init error:",e),e}})}sendEvents(e,n,o){return t(this,void 0,void 0,function*(){const t=yield fetch(`${this.baseUrl}/api/ingestion/events`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({sessionId:n,events:e,endUserId:o})});if(!t.ok)throw new Error(`Failed to send events: ${t.statusText}`)})}sendEventsChunked(e,n,o){return t(this,void 0,void 0,function*(){try{const t=[];let i=[];for(const r of e)if(ct(i,r,n)){if(i.length>0){const e=yield fetch(`${this.baseUrl}/api/ingestion/events`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({sessionId:n,events:i,endUserId:o})});if(!e.ok)throw new Error(`Failed to send events: ${e.statusText}`);t.push(yield e.json()),i=[]}i=dt(r,n)}else i.push(r);if(i.length>0){const e=yield fetch(`${this.baseUrl}/api/ingestion/events`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({sessionId:n,events:i,endUserId:o})});if(!e.ok)throw new Error(`Failed to send events: ${e.statusText}`);t.push(yield e.json())}return t.flat()}catch(e){throw it("Error sending events:",e),e}})}sendUserData(e,n,o){return t(this,void 0,void 0,function*(){try{const t=yield fetch(`${this.baseUrl}/api/ingestion/user`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({userId:e,userAttributes:n,sessionId:o})});if(!t.ok)throw new Error(`Failed to send user data: ${t.statusText} with API key: ${this.apiKey}`);return yield t.json()}catch(e){throw it("Error sending user data:",e),e}})}sendUserAuth(e,n,o,i){return t(this,void 0,void 0,function*(){try{const t=yield fetch(`${this.baseUrl}/api/ingestion/user/auth`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({userId:e,userAttributes:n,sessionId:o,authFields:i})});if(!t.ok)throw new Error(`Failed to authenticate user: ${t.statusText} with API key: ${this.apiKey}`);return yield t.json()}catch(e){throw it("Error authenticating user:",e),e}})}sendBeaconEvents(e,t){const n={sessionId:t,events:e,endUserId:null},o=new Blob([JSON.stringify(n)],{type:"application/json"});return navigator.sendBeacon(`${this.baseUrl}/api/ingestion/events`,o)}sendCustomEvent(e,n,o){return t(this,void 0,void 0,function*(){try{const t=yield fetch(`${this.baseUrl}/api/ingestion/customEvent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({sessionId:e,eventName:n,eventProperties:o||{}})});if(!t.ok)throw new Error(`Failed to send custom event: ${t.status} ${t.statusText}`);return yield t.json()}catch(e){throw it("Error sending custom event:",e),e}})}sendCustomEventBatch(e,n){return t(this,void 0,void 0,function*(){try{const t=yield fetch(`${this.baseUrl}/api/ingestion/customEvent/batch`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({sessionId:e,events:n})});if(!t.ok)throw new Error(`Failed to send custom event batch: ${t.statusText}`);return yield t.json()}catch(e){throw it("Error sending custom event batch:",e),e}})}}const ht="undefined"!=typeof window;class gt{constructor(e){this.redactedText="[REDACTED]",this.userSelectedFields=new Set,this.excludeSelectors=['[data-no-redact="true"]',".human-behavior-no-redact"],(null==e?void 0:e.redactedText)&&(this.redactedText=e.redactedText),(null==e?void 0:e.excludeSelectors)&&(this.excludeSelectors=[...this.excludeSelectors,...e.excludeSelectors]),(null==e?void 0:e.userFields)&&this.setFieldsToRedact(e.userFields)}setFieldsToRedact(e){this.userSelectedFields.clear(),e.forEach(e=>this.userSelectedFields.add(e)),e.length>0?(at(`Redaction: Active for ${e.length} field(s):`,e),e.forEach(e=>{const t=document.querySelectorAll(e);at(`Redaction: Found ${t.length} element(s) for selector '${e}'`),t.forEach((t,n)=>{at(`Redaction: Element ${n} for '${e}':`,t)})})):at("Redaction: Disabled - no fields selected")}isActive(){return this.userSelectedFields.size>0}getSelectedFields(){return Array.from(this.userSelectedFields)}processEvent(e){if(0===this.userSelectedFields.size)return e;const t=JSON.parse(JSON.stringify(e));if(3===t.type)if(5===t.data.source){this.isFieldSelected(t.data)&&(at("Redaction: Processing input event for redaction"),this.redactInputEvent(t.data))}else 0===t.data.source?this.redactDOMEvent(t.data):2===t.data.source&&this.redactMouseEvent(t.data);else 2===t.type&&this.redactFullSnapshot(t.data);return t}redactInputEvent(e){if(!this.isFieldSelected(e))return;at("Redaction: Redacting input event with text:",e.text);["text","value","content","data","input","textContent"].forEach(t=>{void 0!==e[t]&&"string"==typeof e[t]&&(e[t]=this.redactedText,at(`Redaction: Redacted property '${t}'`))}),Object.keys(e).forEach(t=>{"string"==typeof e[t]&&e[t].length>0&&(e[t]=this.redactedText,at(`Redaction: Redacted additional property '${t}'`))}),e.attributes&&"object"==typeof e.attributes&&e.attributes.value&&"string"==typeof e.attributes.value&&(e.attributes.value=this.redactedText,at("Redaction: Redacted nested value attribute")),at("Redaction: Input event redaction complete")}redactDOMEvent(e){e.texts&&Array.isArray(e.texts)&&e.texts.forEach(e=>{e.text&&"string"==typeof e.text&&this.shouldRedactDOMChange(e)&&(e.text=this.redactedText)}),e.attributes&&Array.isArray(e.attributes)&&e.attributes.forEach(e=>{e.attributes&&e.attributes.value&&"string"==typeof e.attributes.value&&this.shouldRedactDOMChange(e)&&(e.attributes.value=this.redactedText)}),e.adds&&Array.isArray(e.adds)&&e.adds.forEach(e=>{e.node&&e.node.textContent&&"string"==typeof e.node.textContent&&this.shouldRedactDOMChange(e)&&(e.node.textContent=this.redactedText)})}shouldRedactDOMChange(e){if(!ht)return!1;try{const t=e.id;if(void 0!==t){let e=document.querySelector(`[data-rrweb-id="${t}"]`);if(e)return this.shouldRedactElement(e)}const n=e.nodeId;if(void 0!==n){const e=document.querySelector(`[data-rrweb-id="${n}"]`);if(e)return this.shouldRedactElement(e)}return!1}catch(e){return rt("Error checking if DOM change should be redacted:",e),!1}}redactMouseEvent(e){e.text&&"string"==typeof e.text&&this.isFieldSelected(e)&&(e.text=this.redactedText)}redactFullSnapshot(e){e.node&&2===e.node.type&&this.redactNode(e.node)}redactNode(e){e&&(2!==e.type||!e.tagName||"input"!==e.tagName.toLowerCase()&&"textarea"!==e.tagName.toLowerCase()||this.shouldRedactNode(e)&&(e.attributes&&e.attributes.value&&(e.attributes.value=this.redactedText),e.textContent&&(e.textContent=this.redactedText)),e.childNodes&&Array.isArray(e.childNodes)&&e.childNodes.forEach(e=>{this.redactNode(e)}))}shouldRedactNode(e){if(!e.attributes)return!1;for(const t of this.userSelectedFields)if(this.selectorMatchesNode(t,e))return!0;return!1}selectorMatchesNode(e,t){if(!t.attributes)return!1;try{const n=document.createElement(t.tagName||"div");return t.attributes&&Object.keys(t.attributes).forEach(e=>{n.setAttribute(e,t.attributes[e])}),n.matches(e)}catch(n){return this.basicSelectorMatch(e,t)}}basicSelectorMatch(e,t){if(!t.attributes)return!1;if(e.includes("input[type=")){const n=e.match(/input\[type="([^"]+)"\]/);if(n&&"input"===t.tagName&&t.attributes.type===n[1])return!0}if(e.startsWith("#")){const n=e.substring(1);return t.attributes.id===n}if(e.startsWith(".")){const n=e.substring(1);return t.attributes.class&&t.attributes.class.includes(n)}return!e.includes("[")&&!e.includes(".")&&(t.tagName&&t.tagName.toLowerCase()===e.toLowerCase())}isFieldSelected(e){if(!ht)return!1;try{if(5===e.source){const t=e.id;if(void 0!==t){let n=document.querySelector(`[data-rrweb-id="${t}"]`);if(n)return this.shouldRedactElement(n);if(void 0!==e.nodeId&&(n=document.querySelector(`[data-rrweb-id="${e.nodeId}"]`),n))return this.shouldRedactElement(n);for(const e of this.userSelectedFields){const t=document.querySelectorAll(e);if(t.length>0)for(const n of t)if(n===document.activeElement)return at("Redaction: Found focused element matching selector:",e),!0}const o=document.activeElement;return!(!o||!this.shouldRedactElement(o))&&(at("Redaction: Active element should be redacted"),!0)}}const t=e.id;if(void 0!==t){let e=document.querySelector(`[data-rrweb-id="${t}"]`);if(e)return this.shouldRedactElement(e)}const n=e.nodeId;if(void 0!==n){const e=document.querySelector(`[data-rrweb-id="${n}"]`);if(e)return this.shouldRedactElement(e)}if(e.target&&e.target.id){const t=document.querySelector(`[data-rrweb-id="${e.target.id}"]`);if(t)return this.shouldRedactElement(t)}return!1}catch(e){return rt("Error checking if field should be redacted:",e),!1}}shouldRedactElement(e){for(const t of this.excludeSelectors)if(e.matches(t)||e.closest(t))return!1;for(const t of this.userSelectedFields)if(e.matches(t))return!0;return!1}getOriginalValue(e){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e.value}isElementRedacted(e){return this.shouldRedactElement(e)}}const pt=new gt,mt="undefined"!=typeof window;class ft{static init(e,t){if(mt&&window.__humanBehaviorGlobalTracker)return at("Tracker already initialized, returning existing instance"),window.__humanBehaviorGlobalTracker;(null==t?void 0:t.logLevel)&&this.configureLogging({level:t.logLevel});const n=new ft(e,null==t?void 0:t.ingestionUrl);if((null==t?void 0:t.redactFields)&&n.setRedactedFields(t.redactFields),!1!==(null==t?void 0:t.enableAutomaticTracking)&&n.setupAutomaticTracking(null==t?void 0:t.automaticTrackingOptions),mt){const e=n.api.baseUrl+"/api/health";fetch(e,{method:"HEAD"}).then(()=>at("Connection test successful")).catch(e=>{rt("Connection test failed - ad blocker may be active:",e.message),n._connectionBlocked=!0})}return n.start(),n}constructor(e,t){if(this.eventIngestionQueue=[],this.queueSizeBytes=0,this.userProperties={},this.isProcessing=!1,this.flushInterval=null,this.FLUSH_INTERVAL_MS=5e3,this.endUserId=null,this.initialized=!1,this.initializationPromise=null,this.originalConsole=null,this.consoleTrackingEnabled=!1,this.navigationTrackingEnabled=!1,this.currentUrl="",this.previousUrl="",this.originalPushState=null,this.originalReplaceState=null,this.navigationListeners=[],this._connectionBlocked=!1,!e)throw new Error("Human Behavior API Key is required");if(this.api=new ut({apiKey:e,ingestionUrl:t||"https://ingest.humanbehavior.co"}),this.apiKey=e,this.redactionManager=new gt,mt){const e=localStorage.getItem("human_behavior_session_id"),t=localStorage.getItem("human_behavior_last_activity"),n=Date.now()-18e5;e&&t&&parseInt(t)>n?(this.sessionId=e,at(`Reusing existing session: ${this.sessionId}`),localStorage.setItem("human_behavior_last_activity",Date.now().toString())):(e&&(at(`Session expired, clearing old session: ${e}`),localStorage.removeItem("human_behavior_session_id"),localStorage.removeItem("human_behavior_last_activity")),this.sessionId=tt(),at(`Creating new session: ${this.sessionId}`),localStorage.setItem("human_behavior_session_id",this.sessionId),localStorage.setItem("human_behavior_last_activity",Date.now().toString())),this.currentUrl=window.location.href,window.__humanBehaviorGlobalTracker=this}else this.sessionId=tt();this.initializationPromise=this.init()}init(){return t(this,void 0,void 0,function*(){try{const e=this.getCookie(`human_behavior_end_user_id_${this.apiKey}`);at(`Initializing with sessionId: ${this.sessionId}, userId: ${e}`);const{sessionId:t,endUserId:n}=yield this.api.init(this.sessionId,e);t!==this.sessionId&&(at(`Server returned different sessionId: ${t} (client had: ${this.sessionId})`),this.sessionId=t,mt&&localStorage.setItem("human_behavior_session_id",this.sessionId)),this.endUserId=n,this.setCookie(`human_behavior_end_user_id_${this.apiKey}`,n,365),mt?(this.setupPageUnloadHandler(),this.setupNavigationTracking()):rt("HumanBehaviorTracker initialized in a non-browser environment. Session tracking is disabled."),this.initialized=!0,st(`HumanBehaviorTracker initialized with sessionId: ${this.sessionId}, endUserId: ${n}`)}catch(e){throw it("Failed to initialize HumanBehaviorTracker:",e),e}})}ensureInitialized(){return t(this,void 0,void 0,function*(){if(!this.initializationPromise)throw new Error("HumanBehaviorTracker initialization failed");yield this.initializationPromise})}setupNavigationTracking(){if(!mt||this.navigationTrackingEnabled)return;this.navigationTrackingEnabled=!0,at("Setting up navigation tracking"),this.originalPushState=history.pushState,this.originalReplaceState=history.replaceState,history.pushState=(...e)=>{this.previousUrl=this.currentUrl,this.currentUrl=window.location.href,this.originalPushState.apply(history,e),this.trackNavigationEvent("pushState",this.previousUrl,this.currentUrl)},history.replaceState=(...e)=>{this.previousUrl=this.currentUrl,this.currentUrl=window.location.href,this.originalReplaceState.apply(history,e),this.trackNavigationEvent("replaceState",this.previousUrl,this.currentUrl)};const e=()=>{this.previousUrl=this.currentUrl,this.currentUrl=window.location.href,this.trackNavigationEvent("popstate",this.previousUrl,this.currentUrl)};window.addEventListener("popstate",e),this.navigationListeners.push(()=>{window.removeEventListener("popstate",e)});const t=()=>{this.previousUrl=this.currentUrl,this.currentUrl=window.location.href,this.trackNavigationEvent("hashchange",this.previousUrl,this.currentUrl)};window.addEventListener("hashchange",t),this.navigationListeners.push(()=>{window.removeEventListener("hashchange",t)}),this.trackNavigationEvent("pageLoad","",this.currentUrl)}trackNavigationEvent(e,n,o){return t(this,void 0,void 0,function*(){if(this.initialized)try{const t={type:e,from:n,to:o,timestamp:(new Date).toISOString(),pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,referrer:document.referrer};yield this.addEvent({type:5,data:{payload:Object.assign({eventType:"navigation"},t)},timestamp:Date.now()}),at(`Navigation tracked: ${e} from ${n} to ${o}`)}catch(e){it("Failed to track navigation event:",e)}})}trackPageView(e){return t(this,void 0,void 0,function*(){if(this.initialized)try{const t={url:e||window.location.href,pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,referrer:document.referrer,timestamp:(new Date).toISOString()};yield this.addEvent({type:5,data:{payload:Object.assign({eventType:"pageview"},t)},timestamp:Date.now()}),at(`Pageview tracked: ${t.url}`)}catch(e){it("Failed to track pageview event:",e)}})}customEvent(e,n){return t(this,void 0,void 0,function*(){var t,o,i,r,s;if(this.initialized)try{yield this.api.sendCustomEvent(this.sessionId,e,n),at(`Custom event tracked: ${e}`,n)}catch(a){it("Failed to track custom event:",a),(null===(t=a.message)||void 0===t?void 0:t.includes("500"))||(null===(o=a.message)||void 0===o?void 0:o.includes("Internal Server Error"))||(null===(i=a.message)||void 0===i?void 0:i.includes("Failed to send custom event"))?rt("Custom event endpoint failed, using fallback"):(null===(r=a.message)||void 0===r?void 0:r.includes("ERR_BLOCKED_BY_CLIENT"))?rt("Custom event request blocked by ad blocker, using fallback"):(null===(s=a.message)||void 0===s?void 0:s.includes("Failed to fetch"))&&rt("Custom event network error, using fallback");try{const t={eventName:e,properties:n||{},timestamp:(new Date).toISOString(),url:window.location.href,pathname:window.location.pathname};yield this.addEvent({type:5,data:{payload:Object.assign({eventType:"custom"},t)},timestamp:Date.now()}),at(`Custom event added to event stream as fallback: ${e}`)}catch(e){it("Failed to add custom event to event stream as fallback:",e)}}})}setupAutomaticTracking(e){if(!mt)return;const t={trackButtons:!1!==(null==e?void 0:e.trackButtons),trackLinks:!1!==(null==e?void 0:e.trackLinks),trackForms:!1!==(null==e?void 0:e.trackForms),includeText:!1!==(null==e?void 0:e.includeText),includeClasses:(null==e?void 0:e.includeClasses)||!1};at("Setting up automatic tracking with config:",t),t.trackButtons&&this.setupAutomaticButtonTracking(t),t.trackLinks&&this.setupAutomaticLinkTracking(t),t.trackForms&&this.setupAutomaticFormTracking(t)}setupAutomaticButtonTracking(e){document.addEventListener("click",n=>t(this,void 0,void 0,function*(){var t;const o=n.target;if("BUTTON"===o.tagName||o.closest("button")){const n="BUTTON"===o.tagName?o:o.closest("button"),i={buttonId:n.id||null,buttonType:n.type||"button",page:window.location.pathname,timestamp:Date.now()};e.includeText&&(i.buttonText=(null===(t=n.textContent)||void 0===t?void 0:t.trim())||null),e.includeClasses&&(i.buttonClass=n.className||null),Object.keys(i).forEach(e=>{null===i[e]&&delete i[e]}),yield this.customEvent("button_clicked",i)}}))}setupAutomaticLinkTracking(e){document.addEventListener("click",n=>t(this,void 0,void 0,function*(){var t;const o=n.target;if("A"===o.tagName||o.closest("a")){const n="A"===o.tagName?o:o.closest("a"),i={linkUrl:n.href||null,linkId:n.id||null,linkTarget:n.target||null,page:window.location.pathname,timestamp:Date.now()};e.includeText&&(i.linkText=(null===(t=n.textContent)||void 0===t?void 0:t.trim())||null),e.includeClasses&&(i.linkClass=n.className||null),Object.keys(i).forEach(e=>{null===i[e]&&delete i[e]}),yield this.customEvent("link_clicked",i)}}))}setupAutomaticFormTracking(e){document.addEventListener("submit",n=>t(this,void 0,void 0,function*(){const t=n.target,o=new FormData(t),i={formId:t.id||null,formAction:t.action||null,formMethod:t.method||"get",fields:Array.from(o.keys()),page:window.location.pathname,timestamp:Date.now()};e.includeClasses&&(i.formClass=t.className||null),Object.keys(i).forEach(e=>{null===i[e]&&delete i[e]}),yield this.customEvent("form_submitted",i)}))}cleanupNavigationTracking(){this.navigationTrackingEnabled&&(this.originalPushState&&(history.pushState=this.originalPushState),this.originalReplaceState&&(history.replaceState=this.originalReplaceState),this.navigationListeners.forEach(e=>e()),this.navigationListeners=[],this.navigationTrackingEnabled=!1,at("Navigation tracking cleaned up"))}static logToStorage(e){st(e)}static configureLogging(e){ot.setConfig({level:{none:0,error:1,warn:2,info:3,debug:4}[e.level||"error"],enableConsole:!1!==e.enableConsole,enableStorage:e.enableStorage||!1})}enableConsoleTracking(){mt&&!this.consoleTrackingEnabled&&(this.originalConsole={log:console.log,warn:console.warn,error:console.error},console.log=(...e)=>{this.trackConsoleEvent("log",e),this.originalConsole.log(...e)},console.warn=(...e)=>{this.trackConsoleEvent("warn",e),this.originalConsole.warn(...e)},console.error=(...e)=>{this.trackConsoleEvent("error",e),this.originalConsole.error(...e)},this.consoleTrackingEnabled=!0,at("Console tracking enabled"))}disableConsoleTracking(){mt&&this.consoleTrackingEnabled&&(this.originalConsole&&(console.log=this.originalConsole.log,console.warn=this.originalConsole.warn,console.error=this.originalConsole.error),this.consoleTrackingEnabled=!1,at("Console tracking disabled"))}trackConsoleEvent(e,t){if(this.initialized)try{const n={level:e,message:t.map(e=>"object"==typeof e?JSON.stringify(e):String(e)).join(" "),timestamp:(new Date).toISOString(),url:window.location.href};this.addEvent({type:5,data:{payload:Object.assign({eventType:"console"},n)},timestamp:Date.now()}).catch(e=>{it("Failed to track console event:",e)})}catch(e){it("Error in trackConsoleEvent:",e)}}setupPageUnloadHandler(){if(!mt)return;at("Setting up page unload handler"),window.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(at("Page hidden - sending pending events"),this.api.sendBeaconEvents(this.eventIngestionQueue,this.sessionId))}),window.addEventListener("beforeunload",()=>{this.api.sendBeaconEvents(this.eventIngestionQueue,this.sessionId)});const e=()=>{localStorage.setItem("human_behavior_last_activity",Date.now().toString())};window.addEventListener("click",e),window.addEventListener("keydown",e),window.addEventListener("scroll",e),window.addEventListener("mousemove",e)}viewLogs(){try{const e=ot.getLogs();console.log("HumanBehavior Logs:",e),ot.clearLogs()}catch(e){it("Failed to read logs:",e)}}addUserInfo(e){return t(this,void 0,void 0,function*(){if(yield this.ensureInitialized(),!this.endUserId)throw new Error("Cannot add user info before tracker initialization");this.userProperties=e,yield this.api.sendUserData(this.endUserId,e,this.sessionId)})}auth(e){return t(this,void 0,void 0,function*(){if(yield this.ensureInitialized(),!this.endUserId)throw new Error("Cannot authenticate before tracker initialization");if(!this.userProperties||0===Object.keys(this.userProperties).length)throw new Error("No user info available. Call addUserInfo() first.");const t=yield this.api.sendUserAuth(this.endUserId,this.userProperties,this.sessionId,e);t&&t.userId&&t.userId!==this.endUserId&&(this.endUserId=t.userId,this.setCookie(`human_behavior_end_user_id_${this.apiKey}`,t.userId,365))})}start(){return t(this,void 0,void 0,function*(){yield this.ensureInitialized(),mt&&(this.flushInterval=window.setInterval(()=>{this.flush()},this.FLUSH_INTERVAL_MS),this.enableConsoleTracking(),Qe({emit:e=>{this.addEvent(e)},inlineStylesheet:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,blockClass:"rr-block",ignoreClass:"rr-ignore",maskTextClass:"rr-ignore"}))})}stop(){return t(this,void 0,void 0,function*(){yield this.ensureInitialized(),mt&&(this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.disableConsoleTracking(),this.cleanupNavigationTracking())})}addEvent(e){return t(this,void 0,void 0,function*(){yield this.ensureInitialized();const t=this.redactionManager.processEvent(e),n=(new TextEncoder).encode(JSON.stringify(t)).length;this.eventIngestionQueue.push(t),this.queueSizeBytes+=n})}flush(){return t(this,void 0,void 0,function*(){var e,t,n,o,i,r;if(!this.isProcessing&&this.initialized){this.isProcessing=!0;try{const s=this.eventIngestionQueue;if(this.eventIngestionQueue=[],this.queueSizeBytes=0,s.length>0){at("Flushing events:",s);try{yield this.api.sendEventsChunked(s,this.sessionId,this.endUserId)}catch(s){if(null===(e=s.message)||void 0===e?void 0:e.includes("ERROR: Session already completed"))rt("Session expired, events will be lost");else if((null===(t=s.message)||void 0===t?void 0:t.includes("413"))||(null===(n=s.message)||void 0===n?void 0:n.includes("Content Too Large")))rt("Payload too large, events will be lost");else{if(!((null===(o=s.message)||void 0===o?void 0:o.includes("ERR_BLOCKED_BY_CLIENT"))||(null===(i=s.message)||void 0===i?void 0:i.includes("Failed to fetch"))||(null===(r=s.message)||void 0===r?void 0:r.includes("NetworkError"))))throw s;rt("Request blocked by ad blocker or network issue, events will be lost")}}}}finally{this.isProcessing=!1}}})}setCookie(e,t,n){if(mt)try{const o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3);const i=`expires=${o.toUTCString()}`;document.cookie=`${e}=${t};${i};path=/;SameSite=Lax`,localStorage.setItem(e,t),at(`Set cookie and localStorage: ${e}`)}catch(n){try{localStorage.setItem(e,t),at(`Cookie blocked, using localStorage: ${e}`)}catch(e){it("Failed to store user ID in both cookie and localStorage:",e)}}}getCookie(e){if(!mt)return null;try{const t=e+"=",n=document.cookie.split(";");for(let o=0;o<n.length;o++){let i=n[o];for(;" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t)){const n=i.substring(t.length,i.length);return at(`Found cookie: ${e}`),n}}const o=localStorage.getItem(e);return o?(at(`Cookie not found, using localStorage: ${e}`),o):null}catch(t){try{const t=localStorage.getItem(e);if(t)return at(`Cookie access failed, using localStorage: ${e}`),t}catch(e){it("Failed to access both cookie and localStorage:",e)}return null}}redact(e){return t(this,void 0,void 0,function*(){yield this.ensureInitialized(),mt?this.redactionManager=new gt(e):rt("Redaction is only available in browser environments")})}setRedactedFields(e){mt?this.redactionManager.setFieldsToRedact(e):rt("Redaction is only available in browser environments")}isRedactionActive(){return this.redactionManager.isActive()}getRedactedFields(){return this.redactionManager.getSelectedFields()}getSessionId(){return this.sessionId}getCurrentUrl(){return this.currentUrl}testConnection(){return t(this,void 0,void 0,function*(){try{return yield this.api.init(this.sessionId,this.endUserId),{success:!0}}catch(e){return{success:!1,error:e.message||"Unknown error"}}})}getConnectionStatus(){const e=[];let t=!1;return this.eventIngestionQueue.length>0&&(t=!0,e.push("Some requests may be blocked by ad blockers")),this._connectionBlocked&&(t=!0,e.push("Initial connection test failed - ad blocker may be active")),"undefined"==typeof window&&e.push("Not running in browser environment"),void 0===navigator.sendBeacon&&e.push("sendBeacon not available, using fetch fallback"),{blocked:t,recommendations:e}}isPreexistingUser(){if(!mt)return!1;const e=this.getCookie(`human_behavior_end_user_id_${this.apiKey}`);return null!==e&&e!==this.endUserId}getUserInfo(){return{endUserId:this.endUserId,sessionId:this.sessionId,isPreexistingUser:this.isPreexistingUser(),initialized:this.initialized}}}mt&&(window.HumanBehaviorTracker=ft),"undefined"!=typeof window&&(window.HumanBehaviorTracker=ft),e.HumanBehaviorAPI=ut,e.HumanBehaviorTracker=ft,e.MAX_CHUNK_SIZE_BYTES=lt,e.RedactionManager=gt,e.default=ft,e.isChunkSizeExceeded=ct,e.logDebug=at,e.logError=it,e.logInfo=st,e.logWarn=rt,e.logger=ot,e.redactionManager=pt,e.splitLargeEvent=dt,e.validateSingleEventSize=function(e,t){const n=(new TextEncoder).encode(JSON.stringify({sessionId:t,events:[e]})).length;n>lt&&console.warn(`Single event size (${n} bytes) exceeds maximum chunk size (1048576 bytes). Consider reducing event data size.`)},Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rrweb")):"function"==typeof define&&define.amd?define(["exports","rrweb"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).HumanBehaviorTracker={},e.rrweb)}(this,function(e,t){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var n=i(t);function s(e,t,i,n){return new(i||(i=Promise))(function(s,o){function r(e){try{d(n.next(e))}catch(e){o(e)}}function a(e){try{d(n.throw(e))}catch(e){o(e)}}function d(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,a)}d((n=n.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));let r;const a=new Uint8Array(16);const d={};function l(e,t,i){let n;{const e=Date.now(),s=function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(a)}();!function(e,t,i){e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0);e.node||(e.node=i.slice(10,16),e.node[0]|=1,e.clockseq=16383&(i[8]<<8|i[9]));e.msecs=t}(d,e,s),n=function(e,t,i,n,s,o,r=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(o){if(r<0||r+16>o.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`)}else o=new Uint8Array(16),r=0;t??=Date.now(),i??=0,n??=16383&(e[8]<<8|e[9]),s??=e.slice(10,16);const a=(1e4*(268435455&(t+=122192928e5))+i)%4294967296;o[r++]=a>>>24&255,o[r++]=a>>>16&255,o[r++]=a>>>8&255,o[r++]=255&a;const d=t/4294967296*1e4&268435455;o[r++]=d>>>8&255,o[r++]=255&d,o[r++]=d>>>24&15|16,o[r++]=d>>>16&255,o[r++]=n>>>8|128,o[r++]=255&n;for(let e=0;e<6;++e)o[r++]=s[e];return o}(s,d.msecs,d.nsecs,d.clockseq,d.node,t,i)}return t??function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(n)}var c;e.LogLevel=void 0,(c=e.LogLevel||(e.LogLevel={}))[c.NONE=0]="NONE",c[c.ERROR=1]="ERROR",c[c.WARN=2]="WARN",c[c.INFO=3]="INFO",c[c.DEBUG=4]="DEBUG";const u=new class{constructor(t){this.config={level:e.LogLevel.ERROR,enableConsole:!0,enableStorage:!1},this.isBrowser="undefined"!=typeof window,t&&(this.config=Object.assign(Object.assign({},this.config),t))}setConfig(e){this.config=Object.assign(Object.assign({},this.config),e)}shouldLog(e){return e<=this.config.level}formatMessage(e,t,...i){return`[HumanBehavior ${e}] ${(new Date).toISOString()}: ${t}`}error(t,...i){if(!this.shouldLog(e.LogLevel.ERROR))return;const n=this.formatMessage("ERROR",t);this.config.enableConsole&&console.error(n,...i),this.config.enableStorage&&this.isBrowser&&this.logToStorage(n,i)}warn(t,...i){if(!this.shouldLog(e.LogLevel.WARN))return;const n=this.formatMessage("WARN",t);this.config.enableConsole&&console.warn(n,...i),this.config.enableStorage&&this.isBrowser&&this.logToStorage(n,i)}info(t,...i){if(!this.shouldLog(e.LogLevel.INFO))return;const n=this.formatMessage("INFO",t);this.config.enableConsole&&console.log(n,...i),this.config.enableStorage&&this.isBrowser&&this.logToStorage(n,i)}debug(t,...i){if(!this.shouldLog(e.LogLevel.DEBUG))return;const n=this.formatMessage("DEBUG",t);this.config.enableConsole&&console.log(n,...i),this.config.enableStorage&&this.isBrowser&&this.logToStorage(n,i)}logToStorage(e,t){try{const i=JSON.parse(localStorage.getItem("human_behavior_logs")||"[]"),n={message:e,args:t.length>0?t:void 0,timestamp:Date.now()};i.push(n),i.length>1e3&&i.splice(0,i.length-1e3),localStorage.setItem("human_behavior_logs",JSON.stringify(i))}catch(e){}}getLogs(){if(!this.isBrowser)return[];try{return JSON.parse(localStorage.getItem("human_behavior_logs")||"[]")}catch(e){return[]}}clearLogs(){this.isBrowser&&localStorage.removeItem("human_behavior_logs")}},h=(e,...t)=>u.error(e,...t),g=(e,...t)=>u.warn(e,...t),v=(e,...t)=>u.info(e,...t),f=(e,...t)=>u.debug(e,...t),m=1048576;function p(e,t,i){return(new TextEncoder).encode(JSON.stringify({sessionId:i,events:[...e,t]})).length>m}function y(e,t){if((new TextEncoder).encode(JSON.stringify({sessionId:t,events:[e]})).length<=m)return[e];const i=Object.assign({},e),n=["screenshot","html","dom","fullText","innerHTML","outerHTML"];n.forEach(e=>{i[e]&&delete i[e]});if((new TextEncoder).encode(JSON.stringify({sessionId:t,events:[i]})).length<=m)return[i];return[Object.assign({type:e.type,timestamp:e.timestamp,url:e.url,pathname:e.pathname},Object.fromEntries(Object.entries(e).filter(([e,t])=>!n.includes(e)&&"object"!=typeof t&&"string"!=typeof t||"string"==typeof t&&t.length<1e3)))]}class b{constructor({apiKey:e,ingestionUrl:t}){this.apiKey=e,this.baseUrl=t}init(e,t){return s(this,void 0,void 0,function*(){let i=null,n=null;"undefined"!=typeof window&&(i=window.location.href,n=document.referrer),console.log("API init called with:",{sessionId:e,userId:t,entryURL:i,referrer:n,baseUrl:this.baseUrl});try{const s=yield fetch(`${this.baseUrl}/api/ingestion/init`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`,Referer:n||""},body:JSON.stringify({sessionId:e,endUserId:t,entryURL:i,referrer:n})});if(console.log("API init response status:",s.status),!s.ok){const e=yield s.text();throw console.error("API init failed:",s.status,e),new Error(`Failed to initialize ingestion: ${s.statusText} - ${e}`)}const o=yield s.json();return console.log("API init success:",o),{sessionId:o.sessionId,endUserId:o.endUserId}}catch(e){throw console.error("API init error:",e),e}})}sendEvents(e,t,i){return s(this,void 0,void 0,function*(){const n=yield fetch(`${this.baseUrl}/api/ingestion/events`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({sessionId:t,events:e,endUserId:i})});if(!n.ok)throw new Error(`Failed to send events: ${n.statusText}`)})}sendEventsChunked(e,t,i){return s(this,void 0,void 0,function*(){try{const n=[];let s=[];for(const o of e)if(p(s,o,t)){if(s.length>0){const e=yield fetch(`${this.baseUrl}/api/ingestion/events`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({sessionId:t,events:s,endUserId:i})});if(!e.ok)throw new Error(`Failed to send events: ${e.statusText}`);n.push(yield e.json()),s=[]}s=y(o,t)}else s.push(o);if(s.length>0){const e=yield fetch(`${this.baseUrl}/api/ingestion/events`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({sessionId:t,events:s,endUserId:i})});if(!e.ok)throw new Error(`Failed to send events: ${e.statusText}`);n.push(yield e.json())}return n.flat()}catch(e){throw h("Error sending events:",e),e}})}sendUserData(e,t,i){return s(this,void 0,void 0,function*(){try{const n=yield fetch(`${this.baseUrl}/api/ingestion/user`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({userId:e,userAttributes:t,sessionId:i})});if(!n.ok)throw new Error(`Failed to send user data: ${n.statusText} with API key: ${this.apiKey}`);return yield n.json()}catch(e){throw h("Error sending user data:",e),e}})}sendUserAuth(e,t,i,n){return s(this,void 0,void 0,function*(){try{const s=yield fetch(`${this.baseUrl}/api/ingestion/user/auth`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({userId:e,userAttributes:t,sessionId:i,authFields:n})});if(!s.ok)throw new Error(`Failed to authenticate user: ${s.statusText} with API key: ${this.apiKey}`);return yield s.json()}catch(e){throw h("Error authenticating user:",e),e}})}sendBeaconEvents(e,t){const i={sessionId:t,events:e,endUserId:null,apiKey:this.apiKey},n=new Blob([JSON.stringify(i)],{type:"application/json"});return navigator.sendBeacon(`${this.baseUrl}/api/ingestion/events`,n)}sendCustomEvent(e,t,i){return s(this,void 0,void 0,function*(){v("[SDK] Sending custom event",{sessionId:e,eventName:t,eventProperties:i});try{const n=yield fetch(`${this.baseUrl}/api/ingestion/customEvent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({sessionId:e,eventName:t,eventProperties:i||{}})});if(v("[SDK] Custom event response",{status:n.status,statusText:n.statusText}),!n.ok){const e=yield n.text();throw h("[SDK] Failed to send custom event",{status:n.status,statusText:n.statusText,errorText:e}),new Error(`Failed to send custom event: ${n.status} ${n.statusText} - ${e}`)}const s=yield n.json();return f("[SDK] Custom event success",s),s}catch(n){throw h("[SDK] Error sending custom event",n,{sessionId:e,eventName:t,eventProperties:i}),n}})}sendCustomEventBatch(e,t){return s(this,void 0,void 0,function*(){try{const i=yield fetch(`${this.baseUrl}/api/ingestion/customEvent/batch`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({sessionId:e,events:t})});if(!i.ok)throw new Error(`Failed to send custom event batch: ${i.statusText}`);return yield i.json()}catch(e){throw h("Error sending custom event batch:",e),e}})}}const w="undefined"!=typeof window;class S{constructor(e){this.redactedText="[REDACTED]",this.userSelectedFields=new Set,this.excludeSelectors=['[data-no-redact="true"]',".human-behavior-no-redact"],(null==e?void 0:e.redactedText)&&(this.redactedText=e.redactedText),(null==e?void 0:e.excludeSelectors)&&(this.excludeSelectors=[...this.excludeSelectors,...e.excludeSelectors]),(null==e?void 0:e.userFields)&&this.setFieldsToRedact(e.userFields)}setFieldsToRedact(e){this.userSelectedFields.clear(),e.forEach(e=>this.userSelectedFields.add(e)),e.length>0?(f(`Redaction: Active for ${e.length} field(s):`,e),e.forEach(e=>{const t=document.querySelectorAll(e);f(`Redaction: Found ${t.length} element(s) for selector '${e}'`),t.forEach((t,i)=>{f(`Redaction: Element ${i} for '${e}':`,t)})})):f("Redaction: Disabled - no fields selected")}isActive(){return this.userSelectedFields.size>0}getSelectedFields(){return Array.from(this.userSelectedFields)}processEvent(e){if(0===this.userSelectedFields.size)return e;const t=JSON.parse(JSON.stringify(e));if(3===t.type)if(5===t.data.source){this.isFieldSelected(t.data)&&(f("Redaction: Processing input event for redaction"),this.redactInputEvent(t.data))}else 0===t.data.source?this.redactDOMEvent(t.data):2===t.data.source&&this.redactMouseEvent(t.data);else 2===t.type&&this.redactFullSnapshot(t.data);return t}redactInputEvent(e){if(!this.isFieldSelected(e))return;f("Redaction: Redacting input event with text:",e.text);["text","value","content","data","input","textContent"].forEach(t=>{void 0!==e[t]&&"string"==typeof e[t]&&(e[t]=this.redactedText,f(`Redaction: Redacted property '${t}'`))}),Object.keys(e).forEach(t=>{"string"==typeof e[t]&&e[t].length>0&&(e[t]=this.redactedText,f(`Redaction: Redacted additional property '${t}'`))}),e.attributes&&"object"==typeof e.attributes&&e.attributes.value&&"string"==typeof e.attributes.value&&(e.attributes.value=this.redactedText,f("Redaction: Redacted nested value attribute")),f("Redaction: Input event redaction complete")}redactDOMEvent(e){e.texts&&Array.isArray(e.texts)&&e.texts.forEach(e=>{e.text&&"string"==typeof e.text&&this.shouldRedactDOMChange(e)&&(e.text=this.redactedText)}),e.attributes&&Array.isArray(e.attributes)&&e.attributes.forEach(e=>{e.attributes&&e.attributes.value&&"string"==typeof e.attributes.value&&this.shouldRedactDOMChange(e)&&(e.attributes.value=this.redactedText)}),e.adds&&Array.isArray(e.adds)&&e.adds.forEach(e=>{e.node&&e.node.textContent&&"string"==typeof e.node.textContent&&this.shouldRedactDOMChange(e)&&(e.node.textContent=this.redactedText)})}shouldRedactDOMChange(e){if(!w)return!1;try{const t=e.id;if(void 0!==t){let e=document.querySelector(`[data-rrweb-id="${t}"]`);if(e)return this.shouldRedactElement(e)}const i=e.nodeId;if(void 0!==i){const e=document.querySelector(`[data-rrweb-id="${i}"]`);if(e)return this.shouldRedactElement(e)}return!1}catch(e){return g("Error checking if DOM change should be redacted:",e),!1}}redactMouseEvent(e){e.text&&"string"==typeof e.text&&this.isFieldSelected(e)&&(e.text=this.redactedText)}redactFullSnapshot(e){e.node&&2===e.node.type&&this.redactNode(e.node)}redactNode(e){e&&(2!==e.type||!e.tagName||"input"!==e.tagName.toLowerCase()&&"textarea"!==e.tagName.toLowerCase()||this.shouldRedactNode(e)&&(e.attributes&&e.attributes.value&&(e.attributes.value=this.redactedText),e.textContent&&(e.textContent=this.redactedText)),e.childNodes&&Array.isArray(e.childNodes)&&e.childNodes.forEach(e=>{this.redactNode(e)}))}shouldRedactNode(e){if(!e.attributes)return!1;for(const t of this.userSelectedFields)if(this.selectorMatchesNode(t,e))return!0;return!1}selectorMatchesNode(e,t){if(!t.attributes)return!1;try{const i=document.createElement(t.tagName||"div");return t.attributes&&Object.keys(t.attributes).forEach(e=>{i.setAttribute(e,t.attributes[e])}),i.matches(e)}catch(i){return this.basicSelectorMatch(e,t)}}basicSelectorMatch(e,t){if(!t.attributes)return!1;if(e.includes("input[type=")){const i=e.match(/input\[type="([^"]+)"\]/);if(i&&"input"===t.tagName&&t.attributes.type===i[1])return!0}if(e.startsWith("#")){const i=e.substring(1);return t.attributes.id===i}if(e.startsWith(".")){const i=e.substring(1);return t.attributes.class&&t.attributes.class.includes(i)}return!e.includes("[")&&!e.includes(".")&&(t.tagName&&t.tagName.toLowerCase()===e.toLowerCase())}isFieldSelected(e){if(!w)return!1;try{if(5===e.source){const t=e.id;if(void 0!==t){let i=document.querySelector(`[data-rrweb-id="${t}"]`);if(i)return this.shouldRedactElement(i);if(void 0!==e.nodeId&&(i=document.querySelector(`[data-rrweb-id="${e.nodeId}"]`),i))return this.shouldRedactElement(i);for(const e of this.userSelectedFields){const t=document.querySelectorAll(e);if(t.length>0)for(const i of t)if(i===document.activeElement)return f("Redaction: Found focused element matching selector:",e),!0}const n=document.activeElement;return!(!n||!this.shouldRedactElement(n))&&(f("Redaction: Active element should be redacted"),!0)}}const t=e.id;if(void 0!==t){let e=document.querySelector(`[data-rrweb-id="${t}"]`);if(e)return this.shouldRedactElement(e)}const i=e.nodeId;if(void 0!==i){const e=document.querySelector(`[data-rrweb-id="${i}"]`);if(e)return this.shouldRedactElement(e)}if(e.target&&e.target.id){const t=document.querySelector(`[data-rrweb-id="${e.target.id}"]`);if(t)return this.shouldRedactElement(t)}return!1}catch(e){return g("Error checking if field should be redacted:",e),!1}}shouldRedactElement(e){for(const t of this.excludeSelectors)if(e.matches(t)||e.closest(t))return!1;for(const t of this.userSelectedFields)if(e.matches(t))return!0;return!1}getOriginalValue(e){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e.value}isElementRedacted(e){return this.shouldRedactElement(e)}}const k=new S,I="undefined"!=typeof window;class HumanBehaviorTracker{static init(e,t){if(I&&window.__humanBehaviorGlobalTracker)return f("Tracker already initialized, returning existing instance"),window.__humanBehaviorGlobalTracker;(null==t?void 0:t.logLevel)&&this.configureLogging({level:t.logLevel});const i=new HumanBehaviorTracker(e,null==t?void 0:t.ingestionUrl);if((null==t?void 0:t.redactFields)&&i.setRedactedFields(t.redactFields),!1!==(null==t?void 0:t.enableAutomaticTracking)&&i.setupAutomaticTracking(null==t?void 0:t.automaticTrackingOptions),I){const e=i.api.baseUrl+"/api/health";fetch(e,{method:"HEAD"}).then(()=>f("Connection test successful")).catch(e=>{g("Connection test failed - ad blocker may be active:",e.message),i._connectionBlocked=!0})}return i.start(),i}constructor(e,t){if(this.eventIngestionQueue=[],this.queueSizeBytes=0,this.userProperties={},this.isProcessing=!1,this.flushInterval=null,this.FLUSH_INTERVAL_MS=5e3,this.endUserId=null,this.initialized=!1,this.initializationPromise=null,this.originalConsole=null,this.consoleTrackingEnabled=!1,this.navigationTrackingEnabled=!1,this.currentUrl="",this.previousUrl="",this.originalPushState=null,this.originalReplaceState=null,this.navigationListeners=[],this._connectionBlocked=!1,!e)throw new Error("Human Behavior API Key is required");if(this.api=new b({apiKey:e,ingestionUrl:t||"https://ingest.humanbehavior.co"}),this.apiKey=e,this.redactionManager=new S,I){const e=localStorage.getItem("human_behavior_session_id"),t=localStorage.getItem("human_behavior_last_activity"),i=Date.now()-18e5;e&&t&&parseInt(t)>i?(this.sessionId=e,f(`Reusing existing session: ${this.sessionId}`),localStorage.setItem("human_behavior_last_activity",Date.now().toString())):(e&&(f(`Session expired, clearing old session: ${e}`),localStorage.removeItem("human_behavior_session_id"),localStorage.removeItem("human_behavior_last_activity")),this.sessionId=l(),f(`Creating new session: ${this.sessionId}`),localStorage.setItem("human_behavior_session_id",this.sessionId),localStorage.setItem("human_behavior_last_activity",Date.now().toString())),this.currentUrl=window.location.href,window.__humanBehaviorGlobalTracker=this}else this.sessionId=l();this.initializationPromise=this.init()}init(){return s(this,void 0,void 0,function*(){try{const e=this.getCookie(`human_behavior_end_user_id_${this.apiKey}`);f(`Initializing with sessionId: ${this.sessionId}, userId: ${e}`);const{sessionId:t,endUserId:i}=yield this.api.init(this.sessionId,e);t!==this.sessionId&&(f(`Server returned different sessionId: ${t} (client had: ${this.sessionId})`),this.sessionId=t,I&&localStorage.setItem("human_behavior_session_id",this.sessionId)),this.endUserId=i,this.setCookie(`human_behavior_end_user_id_${this.apiKey}`,i,365),I?(this.setupPageUnloadHandler(),this.setupNavigationTracking()):g("HumanBehaviorTracker initialized in a non-browser environment. Session tracking is disabled."),this.initialized=!0,v(`HumanBehaviorTracker initialized with sessionId: ${this.sessionId}, endUserId: ${i}`)}catch(e){throw h("Failed to initialize HumanBehaviorTracker:",e),e}})}ensureInitialized(){return s(this,void 0,void 0,function*(){if(!this.initializationPromise)throw new Error("HumanBehaviorTracker initialization failed");yield this.initializationPromise})}setupNavigationTracking(){if(!I||this.navigationTrackingEnabled)return;this.navigationTrackingEnabled=!0,f("Setting up navigation tracking"),this.originalPushState=history.pushState,this.originalReplaceState=history.replaceState,history.pushState=(...e)=>{this.previousUrl=this.currentUrl,this.currentUrl=window.location.href,this.originalPushState.apply(history,e),this.trackNavigationEvent("pushState",this.previousUrl,this.currentUrl)},history.replaceState=(...e)=>{this.previousUrl=this.currentUrl,this.currentUrl=window.location.href,this.originalReplaceState.apply(history,e),this.trackNavigationEvent("replaceState",this.previousUrl,this.currentUrl)};const e=()=>{this.previousUrl=this.currentUrl,this.currentUrl=window.location.href,this.trackNavigationEvent("popstate",this.previousUrl,this.currentUrl)};window.addEventListener("popstate",e),this.navigationListeners.push(()=>{window.removeEventListener("popstate",e)});const t=()=>{this.previousUrl=this.currentUrl,this.currentUrl=window.location.href,this.trackNavigationEvent("hashchange",this.previousUrl,this.currentUrl)};window.addEventListener("hashchange",t),this.navigationListeners.push(()=>{window.removeEventListener("hashchange",t)}),this.trackNavigationEvent("pageLoad","",this.currentUrl)}trackNavigationEvent(e,t,i){return s(this,void 0,void 0,function*(){if(this.initialized)try{const n={type:e,from:t,to:i,timestamp:(new Date).toISOString(),pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,referrer:document.referrer};yield this.addEvent({type:5,data:{payload:Object.assign({eventType:"navigation"},n)},timestamp:Date.now()}),f(`Navigation tracked: ${e} from ${t} to ${i}`)}catch(e){h("Failed to track navigation event:",e)}})}trackPageView(e){return s(this,void 0,void 0,function*(){if(this.initialized)try{const t={url:e||window.location.href,pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,referrer:document.referrer,timestamp:(new Date).toISOString()};yield this.addEvent({type:5,data:{payload:Object.assign({eventType:"pageview"},t)},timestamp:Date.now()}),f(`Pageview tracked: ${t.url}`)}catch(e){h("Failed to track pageview event:",e)}})}customEvent(e,t){return s(this,void 0,void 0,function*(){var i,n,s,o,r;if(this.initialized)try{yield this.api.sendCustomEvent(this.sessionId,e,t),f(`Custom event tracked: ${e}`,t)}catch(a){h("Failed to track custom event:",a),(null===(i=a.message)||void 0===i?void 0:i.includes("500"))||(null===(n=a.message)||void 0===n?void 0:n.includes("Internal Server Error"))||(null===(s=a.message)||void 0===s?void 0:s.includes("Failed to send custom event"))?g("Custom event endpoint failed, using fallback"):(null===(o=a.message)||void 0===o?void 0:o.includes("ERR_BLOCKED_BY_CLIENT"))?g("Custom event request blocked by ad blocker, using fallback"):(null===(r=a.message)||void 0===r?void 0:r.includes("Failed to fetch"))&&g("Custom event network error, using fallback");try{const i={eventName:e,properties:t||{},timestamp:(new Date).toISOString(),url:window.location.href,pathname:window.location.pathname};yield this.addEvent({type:5,data:{payload:Object.assign({eventType:"custom"},i)},timestamp:Date.now()}),f(`Custom event added to event stream as fallback: ${e}`)}catch(e){h("Failed to add custom event to event stream as fallback:",e)}}})}setupAutomaticTracking(e){if(!I)return;const t={trackButtons:!1!==(null==e?void 0:e.trackButtons),trackLinks:!1!==(null==e?void 0:e.trackLinks),trackForms:!1!==(null==e?void 0:e.trackForms),includeText:!1!==(null==e?void 0:e.includeText),includeClasses:(null==e?void 0:e.includeClasses)||!1};f("Setting up automatic tracking with config:",t),t.trackButtons&&this.setupAutomaticButtonTracking(t),t.trackLinks&&this.setupAutomaticLinkTracking(t),t.trackForms&&this.setupAutomaticFormTracking(t)}setupAutomaticButtonTracking(e){document.addEventListener("click",t=>s(this,void 0,void 0,function*(){var i;const n=t.target;if("BUTTON"===n.tagName||n.closest("button")){const t="BUTTON"===n.tagName?n:n.closest("button"),s={buttonId:t.id||null,buttonType:t.type||"button",page:window.location.pathname,timestamp:Date.now()};e.includeText&&(s.buttonText=(null===(i=t.textContent)||void 0===i?void 0:i.trim())||null),e.includeClasses&&(s.buttonClass=t.className||null),Object.keys(s).forEach(e=>{null===s[e]&&delete s[e]}),yield this.customEvent("button_clicked",s)}}))}setupAutomaticLinkTracking(e){document.addEventListener("click",t=>s(this,void 0,void 0,function*(){var i;const n=t.target;if("A"===n.tagName||n.closest("a")){const t="A"===n.tagName?n:n.closest("a"),s={linkUrl:t.href||null,linkId:t.id||null,linkTarget:t.target||null,page:window.location.pathname,timestamp:Date.now()};e.includeText&&(s.linkText=(null===(i=t.textContent)||void 0===i?void 0:i.trim())||null),e.includeClasses&&(s.linkClass=t.className||null),Object.keys(s).forEach(e=>{null===s[e]&&delete s[e]}),yield this.customEvent("link_clicked",s)}}))}setupAutomaticFormTracking(e){document.addEventListener("submit",t=>s(this,void 0,void 0,function*(){const i=t.target,n=new FormData(i),s={formId:i.id||null,formAction:i.action||null,formMethod:i.method||"get",fields:Array.from(n.keys()),page:window.location.pathname,timestamp:Date.now()};e.includeClasses&&(s.formClass=i.className||null),Object.keys(s).forEach(e=>{null===s[e]&&delete s[e]}),yield this.customEvent("form_submitted",s)}))}cleanupNavigationTracking(){this.navigationTrackingEnabled&&(this.originalPushState&&(history.pushState=this.originalPushState),this.originalReplaceState&&(history.replaceState=this.originalReplaceState),this.navigationListeners.forEach(e=>e()),this.navigationListeners=[],this.navigationTrackingEnabled=!1,f("Navigation tracking cleaned up"))}static logToStorage(e){v(e)}static configureLogging(e){u.setConfig({level:{none:0,error:1,warn:2,info:3,debug:4}[e.level||"error"],enableConsole:!1!==e.enableConsole,enableStorage:e.enableStorage||!1})}enableConsoleTracking(){I&&!this.consoleTrackingEnabled&&(this.originalConsole={log:console.log,warn:console.warn,error:console.error},console.log=(...e)=>{this.trackConsoleEvent("log",e),this.originalConsole.log(...e)},console.warn=(...e)=>{this.trackConsoleEvent("warn",e),this.originalConsole.warn(...e)},console.error=(...e)=>{this.trackConsoleEvent("error",e),this.originalConsole.error(...e)},this.consoleTrackingEnabled=!0,f("Console tracking enabled"))}disableConsoleTracking(){I&&this.consoleTrackingEnabled&&(this.originalConsole&&(console.log=this.originalConsole.log,console.warn=this.originalConsole.warn,console.error=this.originalConsole.error),this.consoleTrackingEnabled=!1,f("Console tracking disabled"))}trackConsoleEvent(e,t){if(this.initialized)try{const i={level:e,message:t.map(e=>"object"==typeof e?JSON.stringify(e):String(e)).join(" "),timestamp:(new Date).toISOString(),url:window.location.href};this.addEvent({type:5,data:{payload:Object.assign({eventType:"console"},i)},timestamp:Date.now()}).catch(e=>{h("Failed to track console event:",e)})}catch(e){h("Error in trackConsoleEvent:",e)}}setupPageUnloadHandler(){if(!I)return;f("Setting up page unload handler"),window.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(f("Page hidden - sending pending events"),this.api.sendBeaconEvents(this.eventIngestionQueue,this.sessionId))}),window.addEventListener("beforeunload",()=>{this.api.sendBeaconEvents(this.eventIngestionQueue,this.sessionId)});const e=()=>{localStorage.setItem("human_behavior_last_activity",Date.now().toString())};window.addEventListener("click",e),window.addEventListener("keydown",e),window.addEventListener("scroll",e),window.addEventListener("mousemove",e)}viewLogs(){try{const e=u.getLogs();console.log("HumanBehavior Logs:",e),u.clearLogs()}catch(e){h("Failed to read logs:",e)}}addUserInfo(e){return s(this,arguments,void 0,function*({userId:e,userProperties:t}){if(yield this.ensureInitialized(),!this.endUserId)throw new Error("Cannot add user info before tracker initialization");this.userProperties=t,yield this.api.sendUserData(this.endUserId,t,this.sessionId),e&&(this.endUserId=e)})}auth(e){return s(this,void 0,void 0,function*(){if(yield this.ensureInitialized(),!this.endUserId)throw new Error("Cannot authenticate before tracker initialization");const t=yield this.api.sendUserAuth(this.endUserId,{id:e},this.sessionId,["id"]);t&&t.userId&&t.userId!==this.endUserId&&(this.endUserId=t.userId,this.setCookie(`human_behavior_end_user_id_${this.apiKey}`,t.userId,365))})}start(){return s(this,void 0,void 0,function*(){yield this.ensureInitialized(),I&&(this.flushInterval=window.setInterval(()=>{this.flush()},this.FLUSH_INTERVAL_MS),this.enableConsoleTracking(),n.record({emit:e=>{this.addEvent(e)},inlineStylesheet:!0,recordCanvas:!0,collectFonts:!0,inlineImages:!0,blockClass:"rr-block",ignoreClass:"rr-ignore",maskTextClass:"rr-ignore"}))})}stop(){return s(this,void 0,void 0,function*(){yield this.ensureInitialized(),I&&(this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.disableConsoleTracking(),this.cleanupNavigationTracking())})}addEvent(e){return s(this,void 0,void 0,function*(){yield this.ensureInitialized();const t=this.redactionManager.processEvent(e),i=(new TextEncoder).encode(JSON.stringify(t)).length;this.eventIngestionQueue.push(t),this.queueSizeBytes+=i})}flush(){return s(this,void 0,void 0,function*(){var e,t,i,n,s,o;if(!this.isProcessing&&this.initialized){this.isProcessing=!0;try{const r=this.eventIngestionQueue;if(this.eventIngestionQueue=[],this.queueSizeBytes=0,r.length>0){f("Flushing events:",r);try{yield this.api.sendEventsChunked(r,this.sessionId,this.endUserId)}catch(r){if(null===(e=r.message)||void 0===e?void 0:e.includes("ERROR: Session already completed"))g("Session expired, events will be lost");else if((null===(t=r.message)||void 0===t?void 0:t.includes("413"))||(null===(i=r.message)||void 0===i?void 0:i.includes("Content Too Large")))g("Payload too large, events will be lost");else{if(!((null===(n=r.message)||void 0===n?void 0:n.includes("ERR_BLOCKED_BY_CLIENT"))||(null===(s=r.message)||void 0===s?void 0:s.includes("Failed to fetch"))||(null===(o=r.message)||void 0===o?void 0:o.includes("NetworkError"))))throw r;g("Request blocked by ad blocker or network issue, events will be lost")}}}}finally{this.isProcessing=!1}}})}setCookie(e,t,i){if(I)try{const n=new Date;n.setTime(n.getTime()+24*i*60*60*1e3);const s=`expires=${n.toUTCString()}`;document.cookie=`${e}=${t};${s};path=/;SameSite=Lax`,localStorage.setItem(e,t),f(`Set cookie and localStorage: ${e}`)}catch(i){try{localStorage.setItem(e,t),f(`Cookie blocked, using localStorage: ${e}`)}catch(e){h("Failed to store user ID in both cookie and localStorage:",e)}}}getCookie(e){if(!I)return null;try{const t=e+"=",i=document.cookie.split(";");for(let n=0;n<i.length;n++){let s=i[n];for(;" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(t)){const i=s.substring(t.length,s.length);return f(`Found cookie: ${e}`),i}}const n=localStorage.getItem(e);return n?(f(`Cookie not found, using localStorage: ${e}`),n):null}catch(t){try{const t=localStorage.getItem(e);if(t)return f(`Cookie access failed, using localStorage: ${e}`),t}catch(e){h("Failed to access both cookie and localStorage:",e)}return null}}deleteCookie(e){if(I){try{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; SameSite=Lax`,f(`Deleted cookie: ${e}`)}catch(t){h(`Failed to delete cookie: ${e}`,t)}try{localStorage.removeItem(e),f(`Removed from localStorage: ${e}`)}catch(t){h(`Failed to remove from localStorage: ${e}`,t)}}}logout(){if(I)try{const e=`human_behavior_end_user_id_${this.apiKey}`;this.deleteCookie(e),localStorage.removeItem("human_behavior_session_id"),localStorage.removeItem("human_behavior_last_activity"),this.endUserId=null,this.userProperties={},v("User logged out - cleared all user data and cookies")}catch(e){h("Error during logout:",e)}}redact(e){return s(this,void 0,void 0,function*(){yield this.ensureInitialized(),I?this.redactionManager=new S(e):g("Redaction is only available in browser environments")})}setRedactedFields(e){I?this.redactionManager.setFieldsToRedact(e):g("Redaction is only available in browser environments")}isRedactionActive(){return this.redactionManager.isActive()}getRedactedFields(){return this.redactionManager.getSelectedFields()}getSessionId(){return this.sessionId}getCurrentUrl(){return this.currentUrl}testConnection(){return s(this,void 0,void 0,function*(){try{return yield this.api.init(this.sessionId,this.endUserId),{success:!0}}catch(e){return{success:!1,error:e.message||"Unknown error"}}})}getConnectionStatus(){const e=[];let t=!1;return this.eventIngestionQueue.length>0&&(t=!0,e.push("Some requests may be blocked by ad blockers")),this._connectionBlocked&&(t=!0,e.push("Initial connection test failed - ad blocker may be active")),"undefined"==typeof window&&e.push("Not running in browser environment"),void 0===navigator.sendBeacon&&e.push("sendBeacon not available, using fetch fallback"),{blocked:t,recommendations:e}}isPreexistingUser(){if(!I)return!1;const e=this.getCookie(`human_behavior_end_user_id_${this.apiKey}`);return null!==e&&e!==this.endUserId}getUserInfo(){return{endUserId:this.endUserId,sessionId:this.sessionId,isPreexistingUser:this.isPreexistingUser(),initialized:this.initialized}}}I&&(window.HumanBehaviorTracker=HumanBehaviorTracker),"undefined"!=typeof window&&(window.HumanBehaviorTracker=HumanBehaviorTracker),e.HumanBehaviorAPI=b,e.HumanBehaviorTracker=HumanBehaviorTracker,e.MAX_CHUNK_SIZE_BYTES=m,e.RedactionManager=S,e.default=HumanBehaviorTracker,e.isChunkSizeExceeded=p,e.logDebug=f,e.logError=h,e.logInfo=v,e.logWarn=g,e.logger=u,e.redactionManager=k,e.splitLargeEvent=y,e.validateSingleEventSize=function(e,t){const i=(new TextEncoder).encode(JSON.stringify({sessionId:t,events:[e]})).length;i>m&&console.warn(`Single event size (${i} bytes) exceeds maximum chunk size (1048576 bytes). Consider reducing event data size.`)},Object.defineProperty(e,"__esModule",{value:!0})});
|
|
16
2
|
//# sourceMappingURL=index.min.js.map
|