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,WAC3C,IACC,OAAOr/B,MAAQ,IAAI83B,SAAS,cAAb,GACd,MAAOr2B,GACR,GAAsB,iBAAXmb,OAAqB,OAAOA,QALjB,GCAxBiiB,EAAoBS,IAAO3B,KAC1BA,EAASn+B,OAAOW,OAAOw9B,IACX4B,WAAU5B,EAAO4B,SAAW,IACxC//B,OAAOwO,eAAe2vB,EAAQ,UAAW,CACxCyB,YAAY,EACZI,IAAK,KACJ,MAAM,IAAIr9B,MAAM,0FAA4Fw7B,EAAOpxB,OAG9GoxB,GCTRkB,EAAoB79B,EAAI,CAAC+M,EAAK6K,IAAUpZ,OAAOU,UAAUL,eAAegB,KAAKkN,EAAK6K,GCClFimB,EAAoBr9B,EAAKw9B,IACH,oBAAX/9B,QAA0BA,OAAOw+B,aAC1CjgC,OAAOwO,eAAegxB,EAAS/9B,OAAOw+B,YAAa,CAAEp+B,MAAO,WAE7D7B,OAAOwO,eAAegxB,EAAS,aAAc,CAAE39B,OAAO,WCGvD,MARA,OAEOmS,KAAK,CACV0F,IAAK,4DACL,QAAW,SAIP/W,MAAM","sources":["webpack://small-js-error-factory/./node_modules/tslib/tslib.es6.js","webpack://small-js-error-factory/./node_modules/@sentry/types/esm/severity.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/is.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/syncpromise.js","webpack://small-js-error-factory/./node_modules/@sentry/hub/esm/scope.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/browser.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/string.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/object.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/misc.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/logger.js","webpack://small-js-error-factory/./node_modules/@sentry/hub/esm/session.js","webpack://small-js-error-factory/./node_modules/@sentry/hub/esm/hub.js","webpack://small-js-error-factory/./node_modules/@sentry/minimal/esm/index.js","webpack://small-js-error-factory/./node_modules/@sentry/core/esm/version.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/polyfill.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/error.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/dsn.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/stacktrace.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/normalize.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/memo.js","webpack://small-js-error-factory/./node_modules/@sentry/core/esm/integration.js","webpack://small-js-error-factory/./node_modules/@sentry/core/esm/baseclient.js","webpack://small-js-error-factory/./node_modules/@sentry/core/esm/api.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/envelope.js","webpack://small-js-error-factory/./node_modules/@sentry/core/esm/request.js","webpack://small-js-error-factory/./node_modules/@sentry/core/esm/transports/noop.js","webpack://small-js-error-factory/./node_modules/@sentry/core/esm/basebackend.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/supports.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/stack-parsers.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/eventbuilder.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/ratelimit.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/transports/utils.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/transports/base.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/promisebuffer.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/clientreport.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/async.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/status.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/transports/fetch.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/transports/xhr.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/backend.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/helpers.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/instrument.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/enums.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/severity.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/client.js","webpack://small-js-error-factory/./node_modules/@sentry/core/esm/integrations/functiontostring.js","webpack://small-js-error-factory/./node_modules/@sentry/core/esm/integrations/inboundfilters.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/integrations/trycatch.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/integrations/globalhandlers.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/integrations/linkederrors.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/integrations/dedupe.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/integrations/useragent.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/sdk.js","webpack://small-js-error-factory/./node_modules/@sentry/core/esm/sdk.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/version.js","webpack://small-js-error-factory/./node_modules/@sentry/browser/esm/index.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/env.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/global.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/node.js","webpack://small-js-error-factory/./node_modules/@sentry/utils/esm/time.js","webpack://small-js-error-factory/webpack/bootstrap","webpack://small-js-error-factory/webpack/runtime/define property getters","webpack://small-js-error-factory/webpack/runtime/global","webpack://small-js-error-factory/webpack/runtime/harmony module decorator","webpack://small-js-error-factory/webpack/runtime/hasOwnProperty shorthand","webpack://small-js-error-factory/webpack/runtime/make namespace object","webpack://small-js-error-factory/./src/index.ts"],"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 */\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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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 __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;\r\n return g = { next: verb(0), \"throw\": verb(1), \"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 (_) 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 function __createBinding(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, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = 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\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\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 __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 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\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: n === \"return\" } : 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\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/**\n * TODO(v7): Remove this enum and replace with SeverityLevel\n */\nexport var Severity;\n(function (Severity) {\n /** JSDoc */\n Severity[\"Fatal\"] = \"fatal\";\n /** JSDoc */\n Severity[\"Error\"] = \"error\";\n /** JSDoc */\n Severity[\"Warning\"] = \"warning\";\n /** JSDoc */\n Severity[\"Log\"] = \"log\";\n /** JSDoc */\n Severity[\"Info\"] = \"info\";\n /** JSDoc */\n Severity[\"Debug\"] = \"debug\";\n /** JSDoc */\n Severity[\"Critical\"] = \"critical\";\n})(Severity || (Severity = {}));\n// TODO: in v7, these can disappear, because they now also exist in `@sentry/utils`. (Having them there rather than here\n// is nice because then it enforces the idea that only types are exported from `@sentry/types`.)\nexport var SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];\n//# sourceMappingURL=severity.js.map","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n// eslint-disable-next-line @typescript-eslint/unbound-method\nvar objectToString = Object.prototype.toString;\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\nfunction isBuiltin(wat, ty) {\n return objectToString.call(wat) === \"[object \" + ty + \"]\";\n}\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat) {\n return isBuiltin(wat, 'String');\n}\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat) {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isNaN(wat) {\n return typeof wat === 'number' && wat !== wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n }\n catch (_e) {\n return false;\n }\n}\n//# sourceMappingURL=is.js.map","/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nexport function resolvedSyncPromise(value) {\n return new SyncPromise(function (resolve) {\n resolve(value);\n });\n}\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nexport function rejectedSyncPromise(reason) {\n return new SyncPromise(function (_, reject) {\n reject(reason);\n });\n}\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nvar SyncPromise = /** @class */ (function () {\n function SyncPromise(executor) {\n var _this = this;\n this._state = 0 /* PENDING */;\n this._handlers = [];\n /** JSDoc */\n this._resolve = function (value) {\n _this._setResult(1 /* RESOLVED */, value);\n };\n /** JSDoc */\n this._reject = function (reason) {\n _this._setResult(2 /* REJECTED */, reason);\n };\n /** JSDoc */\n this._setResult = function (state, value) {\n if (_this._state !== 0 /* PENDING */) {\n return;\n }\n if (isThenable(value)) {\n void value.then(_this._resolve, _this._reject);\n return;\n }\n _this._state = state;\n _this._value = value;\n _this._executeHandlers();\n };\n /** JSDoc */\n this._executeHandlers = function () {\n if (_this._state === 0 /* PENDING */) {\n return;\n }\n var cachedHandlers = _this._handlers.slice();\n _this._handlers = [];\n cachedHandlers.forEach(function (handler) {\n if (handler[0]) {\n return;\n }\n if (_this._state === 1 /* RESOLVED */) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](_this._value);\n }\n if (_this._state === 2 /* REJECTED */) {\n handler[2](_this._value);\n }\n handler[0] = true;\n });\n };\n try {\n executor(this._resolve, this._reject);\n }\n catch (e) {\n this._reject(e);\n }\n }\n /** JSDoc */\n SyncPromise.prototype.then = function (onfulfilled, onrejected) {\n var _this = this;\n return new SyncPromise(function (resolve, reject) {\n _this._handlers.push([\n false,\n function (result) {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result);\n }\n else {\n try {\n resolve(onfulfilled(result));\n }\n catch (e) {\n reject(e);\n }\n }\n },\n function (reason) {\n if (!onrejected) {\n reject(reason);\n }\n else {\n try {\n resolve(onrejected(reason));\n }\n catch (e) {\n reject(e);\n }\n }\n },\n ]);\n _this._executeHandlers();\n });\n };\n /** JSDoc */\n SyncPromise.prototype.catch = function (onrejected) {\n return this.then(function (val) { return val; }, onrejected);\n };\n /** JSDoc */\n SyncPromise.prototype.finally = function (onfinally) {\n var _this = this;\n return new SyncPromise(function (resolve, reject) {\n var val;\n var isRejected;\n return _this.then(function (value) {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n }, function (reason) {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n }).then(function () {\n if (isRejected) {\n reject(val);\n return;\n }\n resolve(val);\n });\n });\n };\n return SyncPromise;\n}());\nexport { SyncPromise };\n//# sourceMappingURL=syncpromise.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { dateTimestampInSeconds, getGlobalObject, isPlainObject, isThenable, SyncPromise } from '@sentry/utils';\n/**\n * Absolute maximum number of breadcrumbs added to an event.\n * The `maxBreadcrumbs` option cannot be higher than this value.\n */\nvar MAX_BREADCRUMBS = 100;\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nvar Scope = /** @class */ (function () {\n function Scope() {\n /** Flag if notifying is happening. */\n this._notifyingListeners = false;\n /** Callback for client to receive scope changes. */\n this._scopeListeners = [];\n /** Callback list that will be called after {@link applyToEvent}. */\n this._eventProcessors = [];\n /** Array of breadcrumbs. */\n this._breadcrumbs = [];\n /** User */\n this._user = {};\n /** Tags */\n this._tags = {};\n /** Extra */\n this._extra = {};\n /** Contexts */\n this._contexts = {};\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n this._sdkProcessingMetadata = {};\n }\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n Scope.clone = function (scope) {\n var newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = __spread(scope._breadcrumbs);\n newScope._tags = __assign({}, scope._tags);\n newScope._extra = __assign({}, scope._extra);\n newScope._contexts = __assign({}, scope._contexts);\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = __spread(scope._eventProcessors);\n newScope._requestSession = scope._requestSession;\n }\n return newScope;\n };\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n Scope.prototype.addScopeListener = function (callback) {\n this._scopeListeners.push(callback);\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.addEventProcessor = function (callback) {\n this._eventProcessors.push(callback);\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setUser = function (user) {\n this._user = user || {};\n if (this._session) {\n this._session.update({ user: user });\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getUser = function () {\n return this._user;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getRequestSession = function () {\n return this._requestSession;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setRequestSession = function (requestSession) {\n this._requestSession = requestSession;\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTags = function (tags) {\n this._tags = __assign(__assign({}, this._tags), tags);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTag = function (key, value) {\n var _a;\n this._tags = __assign(__assign({}, this._tags), (_a = {}, _a[key] = value, _a));\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setExtras = function (extras) {\n this._extra = __assign(__assign({}, this._extra), extras);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setExtra = function (key, extra) {\n var _a;\n this._extra = __assign(__assign({}, this._extra), (_a = {}, _a[key] = extra, _a));\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setFingerprint = function (fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setLevel = function (level) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTransactionName = function (name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * Can be removed in major version.\n * @deprecated in favor of {@link this.setTransactionName}\n */\n Scope.prototype.setTransaction = function (name) {\n return this.setTransactionName(name);\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setContext = function (key, context) {\n var _a;\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n }\n else {\n this._contexts = __assign(__assign({}, this._contexts), (_a = {}, _a[key] = context, _a));\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setSpan = function (span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getSpan = function () {\n return this._span;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getTransaction = function () {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n var span = this.getSpan();\n return span && span.transaction;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setSession = function (session) {\n if (!session) {\n delete this._session;\n }\n else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getSession = function () {\n return this._session;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.update = function (captureContext) {\n if (!captureContext) {\n return this;\n }\n if (typeof captureContext === 'function') {\n var updatedScope = captureContext(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n if (captureContext instanceof Scope) {\n this._tags = __assign(__assign({}, this._tags), captureContext._tags);\n this._extra = __assign(__assign({}, this._extra), captureContext._extra);\n this._contexts = __assign(__assign({}, this._contexts), captureContext._contexts);\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n }\n else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext;\n this._tags = __assign(__assign({}, this._tags), captureContext.tags);\n this._extra = __assign(__assign({}, this._extra), captureContext.extra);\n this._contexts = __assign(__assign({}, this._contexts), captureContext.contexts);\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n }\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.clear = function () {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {\n var maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n var mergedBreadcrumb = __assign({ timestamp: dateTimestampInSeconds() }, breadcrumb);\n this._breadcrumbs = __spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxCrumbs);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.clearBreadcrumbs = function () {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n };\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional information about the original exception.\n * @hidden\n */\n Scope.prototype.applyToEvent = function (event, hint) {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = __assign(__assign({}, this._extra), event.extra);\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = __assign(__assign({}, this._tags), event.tags);\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = __assign(__assign({}, this._user), event.user);\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = __assign(__assign({}, this._contexts), event.contexts);\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = __assign({ trace: this._span.getTraceContext() }, event.contexts);\n var transactionName = this._span.transaction && this._span.transaction.name;\n if (transactionName) {\n event.tags = __assign({ transaction: transactionName }, event.tags);\n }\n }\n this._applyFingerprint(event);\n event.breadcrumbs = __spread((event.breadcrumbs || []), this._breadcrumbs);\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n event.sdkProcessingMetadata = this._sdkProcessingMetadata;\n return this._notifyEventProcessors(__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint);\n };\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n Scope.prototype.setSDKProcessingMetadata = function (newData) {\n this._sdkProcessingMetadata = __assign(__assign({}, this._sdkProcessingMetadata), newData);\n return this;\n };\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {\n var _this = this;\n if (index === void 0) { index = 0; }\n return new SyncPromise(function (resolve, reject) {\n var processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n }\n else {\n var result = processor(__assign({}, event), hint);\n if (isThenable(result)) {\n void result\n .then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); })\n .then(null, reject);\n }\n else {\n void _this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n };\n /**\n * This will be called on every set call.\n */\n Scope.prototype._notifyScopeListeners = function () {\n var _this = this;\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(function (callback) {\n callback(_this);\n });\n this._notifyingListeners = false;\n }\n };\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n Scope.prototype._applyFingerprint = function (event) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n };\n return Scope;\n}());\nexport { Scope };\n/**\n * Returns the global event processors.\n */\nfunction getGlobalEventProcessors() {\n /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n var global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n}\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}\n//# sourceMappingURL=scope.js.map","import { getGlobalObject } from './global';\nimport { isString } from './is';\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem, keyAttrs) {\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n var currentElem = elem;\n var MAX_TRAVERSE_HEIGHT = 5;\n var MAX_OUTPUT_LEN = 80;\n var out = [];\n var height = 0;\n var len = 0;\n var separator = ' > ';\n var sepLength = separator.length;\n var nextStr = void 0;\n // eslint-disable-next-line no-plusplus\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n return out.reverse().join(separator);\n }\n catch (_oO) {\n return '<unknown>';\n }\n}\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n var elem = el;\n var out = [];\n var className;\n var classes;\n var key;\n var attr;\n var i;\n if (!elem || !elem.tagName) {\n return '';\n }\n out.push(elem.tagName.toLowerCase());\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n var keyAttrPairs = keyAttrs && keyAttrs.length\n ? keyAttrs.filter(function (keyAttr) { return elem.getAttribute(keyAttr); }).map(function (keyAttr) { return [keyAttr, elem.getAttribute(keyAttr)]; })\n : null;\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(function (keyAttrPair) {\n out.push(\"[\" + keyAttrPair[0] + \"=\\\"\" + keyAttrPair[1] + \"\\\"]\");\n });\n }\n else {\n if (elem.id) {\n out.push(\"#\" + elem.id);\n }\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(\".\" + classes[i]);\n }\n }\n }\n var allowedAttrs = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(\"[\" + key + \"=\\\"\" + attr + \"\\\"]\");\n }\n }\n return out.join('');\n}\n/**\n * A safe form of location.href\n */\nexport function getLocationHref() {\n var global = getGlobalObject();\n try {\n return global.document.location.href;\n }\n catch (oO) {\n return '';\n }\n}\n//# sourceMappingURL=browser.js.map","import { isRegExp, isString } from './is';\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str, max) {\n if (max === void 0) { max = 0; }\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : str.substr(0, max) + \"...\";\n}\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line, colno) {\n var newLine = line;\n var lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n var start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n var end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = \"'{snip} \" + newLine;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n return newLine;\n}\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n var output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var i = 0; i < input.length; i++) {\n var value = input[i];\n try {\n output.push(String(value));\n }\n catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n return output.join(delimiter);\n}\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value, pattern) {\n if (!isString(value)) {\n return false;\n }\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n/**\n * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to\n * `new RegExp()`.\n *\n * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime\n * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node\n * 12+).\n *\n * @param regexString The string to escape\n * @returns An version of the string with all special regex characters escaped\n */\nexport function escapeStringForRegex(regexString) {\n // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems\n // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.\n return regexString.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n//# sourceMappingURL=string.js.map","import { __values } from \"tslib\";\nimport { htmlTreeAsString } from './browser';\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive } from './is';\nimport { truncate } from './string';\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nexport function fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n var original = source[name];\n var wrapped = replacementFactory(original);\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n try {\n markFunctionWrapped(wrapped, original);\n }\n catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n source[name] = wrapped;\n}\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nexport function addNonEnumerableProperty(obj, name, value) {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n}\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nexport function markFunctionWrapped(wrapped, original) {\n var proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n}\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nexport function getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object) {\n return Object.keys(object)\n .map(function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]); })\n .join('&');\n}\n/**\n * Transforms any object into an object literal with all its attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n */\nexport function getWalkSource(value) {\n if (isError(value)) {\n var error = value;\n var err = {\n message: error.message,\n name: error.name,\n stack: error.stack,\n };\n for (var i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n return err;\n }\n if (isEvent(value)) {\n var event_1 = value;\n var source = {};\n // Accessing event attributes can throw (see https://github.com/getsentry/sentry-javascript/issues/768 and\n // https://github.com/getsentry/sentry-javascript/issues/838), but accessing `type` hasn't been wrapped in a\n // try-catch in at least two years and no one's complained, so that's likely not an issue anymore\n source.type = event_1.type;\n try {\n source.target = isElement(event_1.target)\n ? htmlTreeAsString(event_1.target)\n : Object.prototype.toString.call(event_1.target);\n }\n catch (_oO) {\n source.target = '<unknown>';\n }\n try {\n source.currentTarget = isElement(event_1.currentTarget)\n ? htmlTreeAsString(event_1.currentTarget)\n : Object.prototype.toString.call(event_1.currentTarget);\n }\n catch (_oO) {\n source.currentTarget = '<unknown>';\n }\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event_1.detail;\n }\n for (var attr in event_1) {\n if (Object.prototype.hasOwnProperty.call(event_1, attr)) {\n source[attr] = event_1[attr];\n }\n }\n return source;\n }\n return value;\n}\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function extractExceptionKeysForMessage(exception, maxLength) {\n if (maxLength === void 0) { maxLength = 40; }\n var keys = Object.keys(getWalkSource(exception));\n keys.sort();\n if (!keys.length) {\n return '[object has no keys]';\n }\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n var serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n return '';\n}\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys(val) {\n var e_1, _a;\n if (isPlainObject(val)) {\n var obj = val;\n var rv = {};\n try {\n for (var _b = __values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return rv;\n }\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys);\n }\n return val;\n}\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nexport function objectify(wat) {\n var objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new wat.constructor(wat);\n break;\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n//# sourceMappingURL=object.js.map","import { __assign } from \"tslib\";\nimport { getGlobalObject } from './global';\nimport { addNonEnumerableProperty } from './object';\nimport { snipLine } from './string';\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4() {\n var global = getGlobalObject();\n var crypto = global.crypto || global.msCrypto;\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n var arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n // set 4 in byte 7\n // eslint-disable-next-line no-bitwise\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n // eslint-disable-next-line no-bitwise\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n var pad = function (num) {\n var v = num.toString(16);\n while (v.length < 4) {\n v = \"0\" + v;\n }\n return v;\n };\n return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]));\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n // eslint-disable-next-line no-bitwise\n var r = (Math.random() * 16) | 0;\n // eslint-disable-next-line no-bitwise\n var v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not <a/> href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(url) {\n if (!url) {\n return {};\n }\n var match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment,\n };\n}\nfunction getFirstException(event) {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event) {\n var message = event.message, eventId = event.event_id;\n if (message) {\n return message;\n }\n var firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return firstException.type + \": \" + firstException.value;\n }\n return firstException.type || firstException.value || eventId || '<unknown>';\n }\n return eventId || '<unknown>';\n}\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event, value, type) {\n var exception = (event.exception = event.exception || {});\n var values = (exception.values = exception.values || []);\n var firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nexport function addExceptionMechanism(event, newMechanism) {\n var firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n var defaultMechanism = { type: 'generic', handled: true };\n var currentMechanism = firstException.mechanism;\n firstException.mechanism = __assign(__assign(__assign({}, defaultMechanism), currentMechanism), newMechanism);\n if (newMechanism && 'data' in newMechanism) {\n var mergedData = __assign(__assign({}, (currentMechanism && currentMechanism.data)), newMechanism.data);\n firstException.mechanism.data = mergedData;\n }\n}\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nvar SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input) {\n var match = input.match(SEMVER_REGEXP) || [];\n var major = parseInt(match[1], 10);\n var minor = parseInt(match[2], 10);\n var patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines, frame, linesOfContext) {\n if (linesOfContext === void 0) { linesOfContext = 5; }\n var lineno = frame.lineno || 0;\n var maxLines = lines.length;\n var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map(function (line) { return snipLine(line, 0); });\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map(function (line) { return snipLine(line, 0); });\n}\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nexport function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nexport function checkOrSetAlreadyCaught(exception) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && exception.__sentry_captured__) {\n return true;\n }\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception, '__sentry_captured__', true);\n }\n catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n return false;\n}\n//# sourceMappingURL=misc.js.map","import { __read, __spread } from \"tslib\";\nimport { isDebugBuild } from './env';\nimport { getGlobalObject } from './global';\n// TODO: Implement different loggers for different environments\nvar global = getGlobalObject();\n/** Prefix for logging strings */\nvar PREFIX = 'Sentry Logger ';\nexport var CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n/**\n * Temporarily unwrap `console.log` and friends in order to perform the given callback using the original methods.\n * Restores wrapping after the callback completes.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox(callback) {\n var global = getGlobalObject();\n if (!('console' in global)) {\n return callback();\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var originalConsole = global.console;\n var wrappedLevels = {};\n // Restore all wrapped console methods\n CONSOLE_LEVELS.forEach(function (level) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (level in global.console && originalConsole[level].__sentry_original__) {\n wrappedLevels[level] = originalConsole[level];\n originalConsole[level] = originalConsole[level].__sentry_original__;\n }\n });\n // Perform callback manipulations\n var result = callback();\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(function (level) {\n originalConsole[level] = wrappedLevels[level];\n });\n return result;\n}\n/** JSDoc */\nvar Logger = /** @class */ (function () {\n /** JSDoc */\n function Logger() {\n this._enabled = false;\n }\n /** JSDoc */\n Logger.prototype.disable = function () {\n this._enabled = false;\n };\n /** JSDoc */\n Logger.prototype.enable = function () {\n this._enabled = true;\n };\n /** JSDoc */\n Logger.prototype.log = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n var _a;\n (_a = global.console).log.apply(_a, __spread([PREFIX + \"[Log]:\"], args));\n });\n };\n /** JSDoc */\n Logger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n var _a;\n (_a = global.console).warn.apply(_a, __spread([PREFIX + \"[Warn]:\"], args));\n });\n };\n /** JSDoc */\n Logger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n var _a;\n (_a = global.console).error.apply(_a, __spread([PREFIX + \"[Error]:\"], args));\n });\n };\n return Logger;\n}());\nvar sentryGlobal = global.__SENTRY__ || {};\nvar logger = sentryGlobal.logger || new Logger();\nif (isDebugBuild()) {\n // Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\n sentryGlobal.logger = logger;\n global.__SENTRY__ = sentryGlobal;\n}\nexport { logger };\n//# sourceMappingURL=logger.js.map","import { dropUndefinedKeys, timestampInSeconds, uuid4 } from '@sentry/utils';\n/**\n * @inheritdoc\n */\nvar Session = /** @class */ (function () {\n function Session(context) {\n this.errors = 0;\n this.sid = uuid4();\n this.duration = 0;\n this.status = 'ok';\n this.init = true;\n this.ignoreDuration = false;\n // Both timestamp and started are in seconds since the UNIX epoch.\n var startingTime = timestampInSeconds();\n this.timestamp = startingTime;\n this.started = startingTime;\n if (context) {\n this.update(context);\n }\n }\n /** JSDoc */\n // eslint-disable-next-line complexity\n Session.prototype.update = function (context) {\n if (context === void 0) { context = {}; }\n if (context.user) {\n if (!this.ipAddress && context.user.ip_address) {\n this.ipAddress = context.user.ip_address;\n }\n if (!this.did && !context.did) {\n this.did = context.user.id || context.user.email || context.user.username;\n }\n }\n this.timestamp = context.timestamp || timestampInSeconds();\n if (context.ignoreDuration) {\n this.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n this.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n this.init = context.init;\n }\n if (!this.did && context.did) {\n this.did = \"\" + context.did;\n }\n if (typeof context.started === 'number') {\n this.started = context.started;\n }\n if (this.ignoreDuration) {\n this.duration = undefined;\n }\n else if (typeof context.duration === 'number') {\n this.duration = context.duration;\n }\n else {\n var duration = this.timestamp - this.started;\n this.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n this.release = context.release;\n }\n if (context.environment) {\n this.environment = context.environment;\n }\n if (!this.ipAddress && context.ipAddress) {\n this.ipAddress = context.ipAddress;\n }\n if (!this.userAgent && context.userAgent) {\n this.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n this.errors = context.errors;\n }\n if (context.status) {\n this.status = context.status;\n }\n };\n /** JSDoc */\n Session.prototype.close = function (status) {\n if (status) {\n this.update({ status: status });\n }\n else if (this.status === 'ok') {\n this.update({ status: 'exited' });\n }\n else {\n this.update();\n }\n };\n /** JSDoc */\n Session.prototype.toJSON = function () {\n return dropUndefinedKeys({\n sid: \"\" + this.sid,\n init: this.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(this.started * 1000).toISOString(),\n timestamp: new Date(this.timestamp * 1000).toISOString(),\n status: this.status,\n errors: this.errors,\n did: typeof this.did === 'number' || typeof this.did === 'string' ? \"\" + this.did : undefined,\n duration: this.duration,\n attrs: {\n release: this.release,\n environment: this.environment,\n ip_address: this.ipAddress,\n user_agent: this.userAgent,\n },\n });\n };\n return Session;\n}());\nexport { Session };\n//# sourceMappingURL=session.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalObject, isDebugBuild, isNodeEnv, logger, uuid4, } from '@sentry/utils';\nimport { Scope } from './scope';\nimport { Session } from './session';\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nexport var API_VERSION = 4;\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nvar DEFAULT_BREADCRUMBS = 100;\n/**\n * @inheritDoc\n */\nvar Hub = /** @class */ (function () {\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n function Hub(client, scope, _version) {\n if (scope === void 0) { scope = new Scope(); }\n if (_version === void 0) { _version = API_VERSION; }\n this._version = _version;\n /** Is a {@link Layer}[] containing the client and scope */\n this._stack = [{}];\n this.getStackTop().scope = scope;\n if (client) {\n this.bindClient(client);\n }\n }\n /**\n * @inheritDoc\n */\n Hub.prototype.isOlderThan = function (version) {\n return this._version < version;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.bindClient = function (client) {\n var top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.pushScope = function () {\n // We want to clone the content of prev scope\n var scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope: scope,\n });\n return scope;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.popScope = function () {\n if (this.getStack().length <= 1)\n return false;\n return !!this.getStack().pop();\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.withScope = function (callback) {\n var scope = this.pushScope();\n try {\n callback(scope);\n }\n finally {\n this.popScope();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.getClient = function () {\n return this.getStackTop().client;\n };\n /** Returns the scope of the top stack. */\n Hub.prototype.getScope = function () {\n return this.getStackTop().scope;\n };\n /** Returns the scope stack for domains or the process. */\n Hub.prototype.getStack = function () {\n return this._stack;\n };\n /** Returns the topmost scope layer in the order domain > local > process. */\n Hub.prototype.getStackTop = function () {\n return this._stack[this._stack.length - 1];\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n Hub.prototype.captureException = function (exception, hint) {\n var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n var finalHint = hint;\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n var syntheticException = void 0;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n finalHint = {\n originalException: exception,\n syntheticException: syntheticException,\n };\n }\n this._invokeClient('captureException', exception, __assign(__assign({}, finalHint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureMessage = function (message, level, hint) {\n var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n var finalHint = hint;\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n var syntheticException = void 0;\n try {\n throw new Error(message);\n }\n catch (exception) {\n syntheticException = exception;\n }\n finalHint = {\n originalException: message,\n syntheticException: syntheticException,\n };\n }\n this._invokeClient('captureMessage', message, level, __assign(__assign({}, finalHint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureEvent = function (event, hint) {\n var eventId = hint && hint.event_id ? hint.event_id : uuid4();\n if (event.type !== 'transaction') {\n this._lastEventId = eventId;\n }\n this._invokeClient('captureEvent', event, __assign(__assign({}, hint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.lastEventId = function () {\n return this._lastEventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (!scope || !client)\n return;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _b = (client.getOptions && client.getOptions()) || {}, _c = _b.beforeBreadcrumb, beforeBreadcrumb = _c === void 0 ? null : _c, _d = _b.maxBreadcrumbs, maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;\n if (maxBreadcrumbs <= 0)\n return;\n var timestamp = dateTimestampInSeconds();\n var mergedBreadcrumb = __assign({ timestamp: timestamp }, breadcrumb);\n var finalBreadcrumb = beforeBreadcrumb\n ? consoleSandbox(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); })\n : mergedBreadcrumb;\n if (finalBreadcrumb === null)\n return;\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setUser = function (user) {\n var scope = this.getScope();\n if (scope)\n scope.setUser(user);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setTags = function (tags) {\n var scope = this.getScope();\n if (scope)\n scope.setTags(tags);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setExtras = function (extras) {\n var scope = this.getScope();\n if (scope)\n scope.setExtras(extras);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setTag = function (key, value) {\n var scope = this.getScope();\n if (scope)\n scope.setTag(key, value);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setExtra = function (key, extra) {\n var scope = this.getScope();\n if (scope)\n scope.setExtra(key, extra);\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Hub.prototype.setContext = function (name, context) {\n var scope = this.getScope();\n if (scope)\n scope.setContext(name, context);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.configureScope = function (callback) {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (scope && client) {\n callback(scope);\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.run = function (callback) {\n var oldHub = makeMain(this);\n try {\n callback(this);\n }\n finally {\n makeMain(oldHub);\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.getIntegration = function (integration) {\n var client = this.getClient();\n if (!client)\n return null;\n try {\n return client.getIntegration(integration);\n }\n catch (_oO) {\n isDebugBuild() && logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Hub\");\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startSpan = function (context) {\n return this._callExtensionMethod('startSpan', context);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startTransaction = function (context, customSamplingContext) {\n return this._callExtensionMethod('startTransaction', context, customSamplingContext);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.traceHeaders = function () {\n return this._callExtensionMethod('traceHeaders');\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureSession = function (endSession) {\n if (endSession === void 0) { endSession = false; }\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n // only send the update\n this._sendSessionUpdate();\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.endSession = function () {\n var layer = this.getStackTop();\n var scope = layer && layer.scope;\n var session = scope && scope.getSession();\n if (session) {\n session.close();\n }\n this._sendSessionUpdate();\n // the session is over; take it off of the scope\n if (scope) {\n scope.setSession();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startSession = function (context) {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n var _b = (client && client.getOptions()) || {}, release = _b.release, environment = _b.environment;\n // Will fetch userAgent if called from browser sdk\n var global = getGlobalObject();\n var userAgent = (global.navigator || {}).userAgent;\n var session = new Session(__assign(__assign(__assign({ release: release,\n environment: environment }, (scope && { user: scope.getUser() })), (userAgent && { userAgent: userAgent })), context));\n if (scope) {\n // End existing session if there's one\n var currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n currentSession.update({ status: 'exited' });\n }\n this.endSession();\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n }\n return session;\n };\n /**\n * Sends the current Session on the scope\n */\n Hub.prototype._sendSessionUpdate = function () {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (!scope)\n return;\n var session = scope.getSession && scope.getSession();\n if (session) {\n if (client && client.captureSession) {\n client.captureSession(session);\n }\n }\n };\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Hub.prototype._invokeClient = function (method) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var _b = this.getStackTop(), scope = _b.scope, client = _b.client;\n if (client && client[method]) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (_a = client)[method].apply(_a, __spread(args, [scope]));\n }\n };\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Hub.prototype._callExtensionMethod = function (method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n isDebugBuild() && logger.warn(\"Extension method \" + method + \" couldn't be found, doing nothing.\");\n };\n return Hub;\n}());\nexport { Hub };\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier() {\n var carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n/**\n * Returns the active domain, if one exists\n * @deprecated No longer used; remove in v7\n * @returns The domain, or undefined if there is no active domain\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function getActiveDomain() {\n isDebugBuild() && logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');\n var sentry = getMainCarrier().__SENTRY__;\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}\n/**\n * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry) {\n try {\n var sentry = getMainCarrier().__SENTRY__;\n var activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub)\n return carrier.__SENTRY__.hub;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nexport function setHubOnCarrier(carrier, hub) {\n if (!carrier)\n return false;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n//# sourceMappingURL=hub.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { getCurrentHub } from '@sentry/hub';\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction callOnHub(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var hub = getCurrentHub();\n if (hub && hub[method]) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return hub[method].apply(hub, __spread(args));\n }\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\n}\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function captureException(exception, captureContext) {\n var syntheticException = new Error('Sentry syntheticException');\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException,\n });\n}\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param Severity Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message, captureContext) {\n var syntheticException = new Error(message);\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n var level = typeof captureContext === 'string' ? captureContext : undefined;\n var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined;\n return callOnHub('captureMessage', message, level, __assign({ originalException: message, syntheticException: syntheticException }, context));\n}\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event) {\n return callOnHub('captureEvent', event);\n}\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback) {\n callOnHub('configureScope', callback);\n}\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb) {\n callOnHub('addBreadcrumb', breadcrumb);\n}\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function setContext(name, context) {\n callOnHub('setContext', name, context);\n}\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras) {\n callOnHub('setExtras', extras);\n}\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags) {\n callOnHub('setTags', tags);\n}\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nexport function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\n}\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nexport function setTag(key, value) {\n callOnHub('setTag', key, value);\n}\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user) {\n callOnHub('setUser', user);\n}\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback) {\n callOnHub('withScope', callback);\n}\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function _callOnClient(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n callOnHub.apply(void 0, __spread(['_invokeClient', method], args));\n}\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\nexport function startTransaction(context, customSamplingContext) {\n return callOnHub('startTransaction', __assign({}, context), customSamplingContext);\n}\n//# sourceMappingURL=index.js.map","export var SDK_VERSION = '6.19.2';\n//# sourceMappingURL=version.js.map","export var setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);\n/**\n * setPrototypeOf polyfill using __proto__\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction setProtoOf(obj, proto) {\n // @ts-ignore __proto__ does not exist on obj\n obj.__proto__ = proto;\n return obj;\n}\n/**\n * setPrototypeOf polyfill using mixin\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction mixinProperties(obj, proto) {\n for (var prop in proto) {\n if (!Object.prototype.hasOwnProperty.call(obj, prop)) {\n // @ts-ignore typescript complains about indexing so we remove\n obj[prop] = proto[prop];\n }\n }\n return obj;\n}\n//# sourceMappingURL=polyfill.js.map","import { __extends } from \"tslib\";\nimport { setPrototypeOf } from './polyfill';\n/** An error emitted by Sentry SDKs and related utilities. */\nvar SentryError = /** @class */ (function (_super) {\n __extends(SentryError, _super);\n function SentryError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.message = message;\n _this.name = _newTarget.prototype.constructor.name;\n setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return SentryError;\n}(Error));\nexport { SentryError };\n//# sourceMappingURL=error.js.map","import { __read } from \"tslib\";\nimport { isDebugBuild } from './env';\nimport { SentryError } from './error';\n/** Regular expression used to parse a Dsn. */\nvar DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn, withPassword) {\n if (withPassword === void 0) { withPassword = false; }\n var host = dsn.host, path = dsn.path, pass = dsn.pass, port = dsn.port, projectId = dsn.projectId, protocol = dsn.protocol, publicKey = dsn.publicKey;\n return (protocol + \"://\" + publicKey + (withPassword && pass ? \":\" + pass : '') +\n (\"@\" + host + (port ? \":\" + port : '') + \"/\" + (path ? path + \"/\" : path) + projectId));\n}\nfunction dsnFromString(str) {\n var match = DSN_REGEX.exec(str);\n if (!match) {\n throw new SentryError(\"Invalid Sentry Dsn: \" + str);\n }\n var _a = __read(match.slice(1), 6), protocol = _a[0], publicKey = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5];\n var path = '';\n var projectId = lastPath;\n var split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop();\n }\n if (projectId) {\n var projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n return dsnFromComponents({ host: host, pass: pass, path: path, projectId: projectId, port: port, protocol: protocol, publicKey: publicKey });\n}\nfunction dsnFromComponents(components) {\n // TODO this is for backwards compatibility, and can be removed in a future version\n if ('user' in components && !('publicKey' in components)) {\n components.publicKey = components.user;\n }\n return {\n user: components.publicKey || '',\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\nfunction validateDsn(dsn) {\n if (!isDebugBuild()) {\n return;\n }\n var port = dsn.port, projectId = dsn.projectId, protocol = dsn.protocol;\n var requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n requiredComponents.forEach(function (component) {\n if (!dsn[component]) {\n throw new SentryError(\"Invalid Sentry Dsn: \" + component + \" missing\");\n }\n });\n if (!projectId.match(/^\\d+$/)) {\n throw new SentryError(\"Invalid Sentry Dsn: Invalid projectId \" + projectId);\n }\n if (!isValidProtocol(protocol)) {\n throw new SentryError(\"Invalid Sentry Dsn: Invalid protocol \" + protocol);\n }\n if (port && isNaN(parseInt(port, 10))) {\n throw new SentryError(\"Invalid Sentry Dsn: Invalid port \" + port);\n }\n return true;\n}\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport function makeDsn(from) {\n var components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n validateDsn(components);\n return components;\n}\n//# sourceMappingURL=dsn.js.map","import { __assign, __values } from \"tslib\";\nvar STACKTRACE_LIMIT = 50;\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nexport function createStackParser() {\n var parsers = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n parsers[_i] = arguments[_i];\n }\n var sortedParsers = parsers.sort(function (a, b) { return a[0] - b[0]; }).map(function (p) { return p[1]; });\n return function (stack, skipFirst) {\n var e_1, _a, e_2, _b;\n if (skipFirst === void 0) { skipFirst = 0; }\n var frames = [];\n try {\n for (var _c = __values(stack.split('\\n').slice(skipFirst)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var line = _d.value;\n try {\n for (var sortedParsers_1 = (e_2 = void 0, __values(sortedParsers)), sortedParsers_1_1 = sortedParsers_1.next(); !sortedParsers_1_1.done; sortedParsers_1_1 = sortedParsers_1.next()) {\n var parser = sortedParsers_1_1.value;\n var frame = parser(line);\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (sortedParsers_1_1 && !sortedParsers_1_1.done && (_b = sortedParsers_1.return)) _b.call(sortedParsers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return stripSentryFramesAndReverse(frames);\n };\n}\n/**\n * @hidden\n */\nexport function stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n var localStack = stack;\n var firstFrameFunction = localStack[0].function || '';\n var lastFrameFunction = localStack[localStack.length - 1].function || '';\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .slice(0, STACKTRACE_LIMIT)\n .map(function (frame) { return (__assign(__assign({}, frame), { filename: frame.filename || localStack[0].filename, function: frame.function || '?' })); })\n .reverse();\n}\nvar defaultFunctionName = '<anonymous>';\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n//# sourceMappingURL=stacktrace.js.map","import { __read } from \"tslib\";\nimport { isPrimitive, isSyntheticEvent } from './is';\nimport { memoBuilder } from './memo';\nimport { getWalkSource } from './object';\nimport { getFunctionName } from './stacktrace';\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normallized output..\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\nexport function normalize(input, depth, maxProperties) {\n if (depth === void 0) { depth = +Infinity; }\n if (maxProperties === void 0) { maxProperties = +Infinity; }\n try {\n // since we're at the outermost level, there is no key\n return walk('', input, depth, maxProperties);\n }\n catch (_oO) {\n return '**non-serializable**';\n }\n}\n/** JSDoc */\nexport function normalizeToSize(object, \n// Default Node.js REPL depth\ndepth, \n// 100kB, as 200kB is max payload size, so half sounds reasonable\nmaxSize) {\n if (depth === void 0) { depth = 3; }\n if (maxSize === void 0) { maxSize = 100 * 1024; }\n var serialized = normalize(object, depth);\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n return serialized;\n}\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nexport function walk(key, value, depth, maxProperties, memo) {\n if (depth === void 0) { depth = +Infinity; }\n if (maxProperties === void 0) { maxProperties = +Infinity; }\n if (memo === void 0) { memo = memoBuilder(); }\n var _a = __read(memo, 2), memoize = _a[0], unmemoize = _a[1];\n // If we reach the maximum depth, serialize whatever is left\n if (depth === 0) {\n return serializeValue(value);\n }\n // If value implements `toJSON` method, call it and return early\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n // `makeSerializable` provides a string representation of certain non-serializable values. For all others, it's a\n // pass-through. If what comes back is a primitive (either because it's been stringified or because it was primitive\n // all along), we're done.\n var serializable = makeSerializable(value, key);\n if (isPrimitive(serializable)) {\n return serializable;\n }\n // Create source that we will use for the next iteration. It will either be an objectified error object (`Error` type\n // with extracted key:value pairs) or the input itself.\n var source = getWalkSource(value);\n // Create an accumulator that will act as a parent for all future itterations of that branch\n var acc = Array.isArray(value) ? [] : {};\n // If we already walked that branch, bail out, as it's circular reference\n if (memoize(value)) {\n return '[Circular ~]';\n }\n var propertyCount = 0;\n // Walk all keys of the source\n for (var innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n if (propertyCount >= maxProperties) {\n acc[innerKey] = '[MaxProperties ~]';\n break;\n }\n propertyCount += 1;\n // Recursively walk through all the child nodes\n var innerValue = source[innerKey];\n acc[innerKey] = walk(innerKey, innerValue, depth - 1, maxProperties, memo);\n }\n // Once walked through all the branches, remove the parent from memo storage\n unmemoize(value);\n // Return accumulated values\n return acc;\n}\n/**\n * Transform any non-primitive, BigInt, or Symbol-type value into a string. Acts as a no-op on strings, numbers,\n * booleans, null, and undefined.\n *\n * @param value The value to stringify\n * @returns For non-primitive, BigInt, and Symbol-type values, a string denoting the value's type, type and value, or\n * type and `description` property, respectively. For non-BigInt, non-Symbol primitives, returns the original value,\n * unchanged.\n */\nfunction serializeValue(value) {\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n var type = Object.prototype.toString.call(value);\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n // `makeSerializable` provides a string representation of certain non-serializable values. For all others, it's a\n // pass-through.\n var serializable = makeSerializable(value);\n return isPrimitive(serializable) ? serializable : type;\n}\n/**\n * makeSerializable()\n *\n * Takes unserializable input and make it serializer-friendly.\n *\n * Handles globals, functions, `undefined`, `NaN`, and other non-serializable values.\n */\nfunction makeSerializable(value, key) {\n if (key === 'domain' && value && typeof value === 'object' && value._events) {\n return '[Domain]';\n }\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n // It's safe to use `window` and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n if (value === void 0) {\n return '[undefined]';\n }\n if (typeof value === 'function') {\n return \"[Function: \" + getFunctionName(value) + \"]\";\n }\n // symbols and bigints are considered primitives by TS, but aren't natively JSON-serilaizable\n if (typeof value === 'symbol') {\n return \"[\" + String(value) + \"]\";\n }\n if (typeof value === 'bigint') {\n return \"[BigInt: \" + String(value) + \"]\";\n }\n return value;\n}\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n/** Calculates bytes size of input object */\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n//# sourceMappingURL=normalize.js.map","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Helper to decycle json objects\n */\nexport function memoBuilder() {\n var hasWeakSet = typeof WeakSet === 'function';\n var inner = hasWeakSet ? new WeakSet() : [];\n function memoize(obj) {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var i = 0; i < inner.length; i++) {\n var value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n function unmemoize(obj) {\n if (hasWeakSet) {\n inner.delete(obj);\n }\n else {\n for (var i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n//# sourceMappingURL=memo.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { addNonEnumerableProperty, isDebugBuild, logger } from '@sentry/utils';\nexport var installedIntegrations = [];\n/**\n * @private\n */\nfunction filterDuplicates(integrations) {\n return integrations.reduce(function (acc, integrations) {\n if (acc.every(function (accIntegration) { return integrations.name !== accIntegration.name; })) {\n acc.push(integrations);\n }\n return acc;\n }, []);\n}\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && __spread(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = __spread(filterDuplicates(defaultIntegrations));\n if (Array.isArray(userIntegrations)) {\n // Filter out integrations that are also included in user options\n integrations = __spread(integrations.filter(function (integrations) {\n return userIntegrations.every(function (userIntegration) { return userIntegration.name !== integrations.name; });\n }), filterDuplicates(userIntegrations));\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(integrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n // Make sure that if present, `Debug` integration will always run last\n var integrationsNames = integrations.map(function (i) { return i.name; });\n var alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, __spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n return integrations;\n}\n/** Setup given integration */\nexport function setupIntegration(integration) {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n isDebugBuild() && logger.log(\"Integration installed: \" + integration.name);\n}\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`\n // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be\n // considered a member of the index the way the actual integrations are\n addNonEnumerableProperty(integrations, 'initialized', true);\n return integrations;\n}\n//# sourceMappingURL=integration.js.map","import { __assign, __read, __spread, __values } from \"tslib\";\n/* eslint-disable max-lines */\nimport { Scope } from '@sentry/hub';\nimport { checkOrSetAlreadyCaught, dateTimestampInSeconds, isDebugBuild, isPlainObject, isPrimitive, isThenable, logger, makeDsn, normalize, rejectedSyncPromise, resolvedSyncPromise, SentryError, SyncPromise, truncate, uuid4, } from '@sentry/utils';\nimport { setupIntegrations } from './integration';\nvar ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient<NodeBackend, NodeOptions> {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nvar BaseClient = /** @class */ (function () {\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n function BaseClient(backendClass, options) {\n /** Array of used integrations. */\n this._integrations = {};\n /** Number of calls being processed */\n this._numProcessing = 0;\n this._backend = new backendClass(options);\n this._options = options;\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n }\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n BaseClient.prototype.captureException = function (exception, hint, scope) {\n var _this = this;\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n isDebugBuild() && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n var eventId = hint && hint.event_id;\n this._process(this._getBackend()\n .eventFromException(exception, hint)\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureMessage = function (message, level, hint, scope) {\n var _this = this;\n var eventId = hint && hint.event_id;\n var promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(String(message), level, hint)\n : this._getBackend().eventFromException(message, hint);\n this._process(promisedEvent\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureEvent = function (event, hint, scope) {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n isDebugBuild() && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n var eventId = hint && hint.event_id;\n this._process(this._captureEvent(event, hint, scope).then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureSession = function (session) {\n if (!this._isEnabled()) {\n isDebugBuild() && logger.warn('SDK not enabled, will not capture session.');\n return;\n }\n if (!(typeof session.release === 'string')) {\n isDebugBuild() && logger.warn('Discarded session because of missing or non-string release');\n }\n else {\n this._sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n session.update({ init: false });\n }\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getDsn = function () {\n return this._dsn;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getOptions = function () {\n return this._options;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getTransport = function () {\n return this._getBackend().getTransport();\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.flush = function (timeout) {\n var _this = this;\n return this._isClientDoneProcessing(timeout).then(function (clientFinished) {\n return _this.getTransport()\n .close(timeout)\n .then(function (transportFlushed) { return clientFinished && transportFlushed; });\n });\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.close = function (timeout) {\n var _this = this;\n return this.flush(timeout).then(function (result) {\n _this.getOptions().enabled = false;\n return result;\n });\n };\n /**\n * Sets up the integrations\n */\n BaseClient.prototype.setupIntegrations = function () {\n if (this._isEnabled() && !this._integrations.initialized) {\n this._integrations = setupIntegrations(this._options);\n }\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getIntegration = function (integration) {\n try {\n return this._integrations[integration.id] || null;\n }\n catch (_oO) {\n isDebugBuild() && logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Client\");\n return null;\n }\n };\n /** Updates existing session based on the provided event */\n BaseClient.prototype._updateSessionFromEvent = function (session, event) {\n var e_1, _a;\n var crashed = false;\n var errored = false;\n var exceptions = event.exception && event.exception.values;\n if (exceptions) {\n errored = true;\n try {\n for (var exceptions_1 = __values(exceptions), exceptions_1_1 = exceptions_1.next(); !exceptions_1_1.done; exceptions_1_1 = exceptions_1.next()) {\n var ex = exceptions_1_1.value;\n var mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (exceptions_1_1 && !exceptions_1_1.done && (_a = exceptions_1.return)) _a.call(exceptions_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n var sessionNonTerminal = session.status === 'ok';\n var shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n if (shouldUpdateAndSend) {\n session.update(__assign(__assign({}, (crashed && { status: 'crashed' })), { errors: session.errors || Number(errored || crashed) }));\n this.captureSession(session);\n }\n };\n /** Deliver captured session to Sentry */\n BaseClient.prototype._sendSession = function (session) {\n this._getBackend().sendSession(session);\n };\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n BaseClient.prototype._isClientDoneProcessing = function (timeout) {\n var _this = this;\n return new SyncPromise(function (resolve) {\n var ticked = 0;\n var tick = 1;\n var interval = setInterval(function () {\n if (_this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n }\n else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n };\n /** Returns the current backend. */\n BaseClient.prototype._getBackend = function () {\n return this._backend;\n };\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n BaseClient.prototype._isEnabled = function () {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n };\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n BaseClient.prototype._prepareEvent = function (event, scope, hint) {\n var _this = this;\n var _a = this.getOptions(), _b = _a.normalizeDepth, normalizeDepth = _b === void 0 ? 3 : _b, _c = _a.normalizeMaxBreadth, normalizeMaxBreadth = _c === void 0 ? 1000 : _c;\n var prepared = __assign(__assign({}, event), { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()), timestamp: event.timestamp || dateTimestampInSeconds() });\n this._applyClientOptions(prepared);\n this._applyIntegrationsMetadata(prepared);\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n var finalScope = scope;\n if (hint && hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n // We prepare the result here with a resolved Event.\n var result = resolvedSyncPromise(prepared);\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (finalScope) {\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n return result.then(function (evt) {\n if (evt) {\n // TODO this is more of the hack trying to solve https://github.com/getsentry/sentry-javascript/issues/2809\n // it is only attached as extra data to the event if the event somehow skips being normalized\n evt.sdkProcessingMetadata = __assign(__assign({}, evt.sdkProcessingMetadata), { normalizeDepth: normalize(normalizeDepth) });\n }\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return _this._normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n };\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n BaseClient.prototype._normalizeEvent = function (event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n var normalized = __assign(__assign(__assign(__assign(__assign({}, event), (event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(function (b) { return (__assign(__assign({}, b), (b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }))); }),\n })), (event.user && {\n user: normalize(event.user, depth, maxBreadth),\n })), (event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n })), (event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }));\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n normalized.contexts.trace = event.contexts.trace;\n }\n event.sdkProcessingMetadata = __assign(__assign({}, event.sdkProcessingMetadata), { baseClientNormalized: true });\n return normalized;\n };\n /**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\n BaseClient.prototype._applyClientOptions = function (event) {\n var options = this.getOptions();\n var environment = options.environment, release = options.release, dist = options.dist, _a = options.maxValueLength, maxValueLength = _a === void 0 ? 250 : _a;\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : 'production';\n }\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n var exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n var request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n };\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\n BaseClient.prototype._applyIntegrationsMetadata = function (event) {\n var integrationsArray = Object.keys(this._integrations);\n if (integrationsArray.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = __spread((event.sdk.integrations || []), integrationsArray);\n }\n };\n /**\n * Tells the backend to send this event\n * @param event The Sentry event to send\n */\n BaseClient.prototype._sendEvent = function (event) {\n this._getBackend().sendEvent(event);\n };\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n BaseClient.prototype._captureEvent = function (event, hint, scope) {\n return this._processEvent(event, hint, scope).then(function (finalEvent) {\n return finalEvent.event_id;\n }, function (reason) {\n isDebugBuild() && logger.error(reason);\n return undefined;\n });\n };\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n BaseClient.prototype._processEvent = function (event, hint, scope) {\n var _this = this;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;\n var transport = this.getTransport();\n function recordLostEvent(outcome, category) {\n if (transport.recordLostEvent) {\n transport.recordLostEvent(outcome, category);\n }\n }\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.'));\n }\n var isTransaction = event.type === 'transaction';\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n recordLostEvent('sample_rate', 'event');\n return rejectedSyncPromise(new SentryError(\"Discarding event because it's not included in the random sample (sampling rate = \" + sampleRate + \")\"));\n }\n return this._prepareEvent(event, scope, hint)\n .then(function (prepared) {\n if (prepared === null) {\n recordLostEvent('event_processor', event.type || 'event');\n throw new SentryError('An event processor returned null, will not send event.');\n }\n var isInternalException = hint && hint.data && hint.data.__sentry__ === true;\n if (isInternalException || isTransaction || !beforeSend) {\n return prepared;\n }\n var beforeSendResult = beforeSend(prepared, hint);\n return _ensureBeforeSendRv(beforeSendResult);\n })\n .then(function (processedEvent) {\n if (processedEvent === null) {\n recordLostEvent('before_send', event.type || 'event');\n throw new SentryError('`beforeSend` returned `null`, will not send event.');\n }\n var session = scope && scope.getSession && scope.getSession();\n if (!isTransaction && session) {\n _this._updateSessionFromEvent(session, processedEvent);\n }\n _this._sendEvent(processedEvent);\n return processedEvent;\n })\n .then(null, function (reason) {\n if (reason instanceof SentryError) {\n throw reason;\n }\n _this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\"Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: \" + reason);\n });\n };\n /**\n * Occupies the client with processing and event\n */\n BaseClient.prototype._process = function (promise) {\n var _this = this;\n this._numProcessing += 1;\n void promise.then(function (value) {\n _this._numProcessing -= 1;\n return value;\n }, function (reason) {\n _this._numProcessing -= 1;\n return reason;\n });\n };\n return BaseClient;\n}());\nexport { BaseClient };\n/**\n * Verifies that return value of configured `beforeSend` is of expected type.\n */\nfunction _ensureBeforeSendRv(rv) {\n var nullErr = '`beforeSend` method has to return `null` or a valid event.';\n if (isThenable(rv)) {\n return rv.then(function (event) {\n if (!(isPlainObject(event) || event === null)) {\n throw new SentryError(nullErr);\n }\n return event;\n }, function (e) {\n throw new SentryError(\"beforeSend rejected with \" + e);\n });\n }\n else if (!(isPlainObject(rv) || rv === null)) {\n throw new SentryError(nullErr);\n }\n return rv;\n}\n//# sourceMappingURL=baseclient.js.map","import { dsnToString, makeDsn, urlEncode } from '@sentry/utils';\nvar SENTRY_API_VERSION = '7';\n/**\n * Helper class to provide urls, headers and metadata that can be used to form\n * different types of requests to Sentry endpoints.\n * Supports both envelopes and regular event requests.\n *\n * @deprecated Please use APIDetails\n **/\nvar API = /** @class */ (function () {\n /** Create a new instance of API */\n function API(dsn, metadata, tunnel) {\n if (metadata === void 0) { metadata = {}; }\n this.dsn = dsn;\n this._dsnObject = makeDsn(dsn);\n this.metadata = metadata;\n this._tunnel = tunnel;\n }\n /** Returns the Dsn object. */\n API.prototype.getDsn = function () {\n return this._dsnObject;\n };\n /** Does this transport force envelopes? */\n API.prototype.forceEnvelope = function () {\n return !!this._tunnel;\n };\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n API.prototype.getBaseApiEndpoint = function () {\n return getBaseApiEndpoint(this._dsnObject);\n };\n /** Returns the store endpoint URL. */\n API.prototype.getStoreEndpoint = function () {\n return getStoreEndpoint(this._dsnObject);\n };\n /**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getStoreEndpointWithUrlEncodedAuth = function () {\n return getStoreEndpointWithUrlEncodedAuth(this._dsnObject);\n };\n /**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {\n return getEnvelopeEndpointWithUrlEncodedAuth(this._dsnObject, this._tunnel);\n };\n return API;\n}());\nexport { API };\n/** Initializes API Details */\nexport function initAPIDetails(dsn, metadata, tunnel) {\n return {\n initDsn: dsn,\n metadata: metadata || {},\n dsn: makeDsn(dsn),\n tunnel: tunnel,\n };\n}\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n var protocol = dsn.protocol ? dsn.protocol + \":\" : '';\n var port = dsn.port ? \":\" + dsn.port : '';\n return protocol + \"//\" + dsn.host + port + (dsn.path ? \"/\" + dsn.path : '') + \"/api/\";\n}\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn, target) {\n return \"\" + getBaseApiEndpoint(dsn) + dsn.projectId + \"/\" + target + \"/\";\n}\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn) {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n });\n}\n/** Returns the store endpoint URL. */\nfunction getStoreEndpoint(dsn) {\n return _getIngestEndpoint(dsn, 'store');\n}\n/**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getStoreEndpointWithUrlEncodedAuth(dsn) {\n return getStoreEndpoint(dsn) + \"?\" + _encodedAuth(dsn);\n}\n/** Returns the envelope endpoint URL. */\nfunction _getEnvelopeEndpoint(dsn) {\n return _getIngestEndpoint(dsn, 'envelope');\n}\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel) {\n return tunnel ? tunnel : _getEnvelopeEndpoint(dsn) + \"?\" + _encodedAuth(dsn);\n}\n/**\n * Returns an object that can be used in request headers.\n * This is needed for node and the old /store endpoint in sentry\n */\nexport function getRequestHeaders(dsn, clientName, clientVersion) {\n // CHANGE THIS to use metadata but keep clientName and clientVersion compatible\n var header = [\"Sentry sentry_version=\" + SENTRY_API_VERSION];\n header.push(\"sentry_client=\" + clientName + \"/\" + clientVersion);\n header.push(\"sentry_key=\" + dsn.publicKey);\n if (dsn.pass) {\n header.push(\"sentry_secret=\" + dsn.pass);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n}\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(dsnLike, dialogOptions) {\n var dsn = makeDsn(dsnLike);\n var endpoint = getBaseApiEndpoint(dsn) + \"embed/error-page/\";\n var encodedOptions = \"dsn=\" + dsnToString(dsn);\n for (var key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions += \"&name=\" + encodeURIComponent(dialogOptions.user.name);\n }\n if (dialogOptions.user.email) {\n encodedOptions += \"&email=\" + encodeURIComponent(dialogOptions.user.email);\n }\n }\n else {\n encodedOptions += \"&\" + encodeURIComponent(key) + \"=\" + encodeURIComponent(dialogOptions[key]);\n }\n }\n return endpoint + \"?\" + encodedOptions;\n}\n//# sourceMappingURL=api.js.map","import { __read, __spread } from \"tslib\";\nimport { isPrimitive } from './is';\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function createEnvelope(headers, items) {\n if (items === void 0) { items = []; }\n return [headers, items];\n}\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function addItemToEnvelope(envelope, newItem) {\n var _a = __read(envelope, 2), headers = _a[0], items = _a[1];\n return [headers, __spread(items, [newItem])];\n}\n/**\n * Get the type of the envelope. Grabs the type from the first envelope item.\n */\nexport function getEnvelopeType(envelope) {\n var _a = __read(envelope, 2), _b = __read(_a[1], 1), _c = __read(_b[0], 1), firstItemHeader = _c[0];\n return firstItemHeader.type;\n}\n/**\n * Serializes an envelope into a string.\n */\nexport function serializeEnvelope(envelope) {\n var _a = __read(envelope, 2), headers = _a[0], items = _a[1];\n var serializedHeaders = JSON.stringify(headers);\n // Have to cast items to any here since Envelope is a union type\n // Fixed in Typescript 4.2\n // TODO: Remove any[] cast when we upgrade to TS 4.2\n // https://github.com/microsoft/TypeScript/issues/36390\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return items.reduce(function (acc, item) {\n var _a = __read(item, 2), itemHeaders = _a[0], payload = _a[1];\n // We do not serialize payloads that are primitives\n var serializedPayload = isPrimitive(payload) ? String(payload) : JSON.stringify(payload);\n return acc + \"\\n\" + JSON.stringify(itemHeaders) + \"\\n\" + serializedPayload;\n }, serializedHeaders);\n}\n//# sourceMappingURL=envelope.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { createEnvelope, dsnToString, normalize, serializeEnvelope } from '@sentry/utils';\nimport { getEnvelopeEndpointWithUrlEncodedAuth, getStoreEndpointWithUrlEncodedAuth } from './api';\n/** Extract sdk info from from the API metadata */\nfunction getSdkMetadataForEnvelopeHeader(api) {\n if (!api.metadata || !api.metadata.sdk) {\n return;\n }\n var _a = api.metadata.sdk, name = _a.name, version = _a.version;\n return { name: name, version: version };\n}\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = __spread((event.sdk.integrations || []), (sdkInfo.integrations || []));\n event.sdk.packages = __spread((event.sdk.packages || []), (sdkInfo.packages || []));\n return event;\n}\n/** Creates an envelope from a Session */\nexport function createSessionEnvelope(session, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var envelopeHeaders = __assign(__assign({ sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n // I know this is hacky but we don't want to add `sessions` to request type since it's never rate limited\n var type = 'aggregates' in session ? 'sessions' : 'session';\n // TODO (v7) Have to cast type because envelope items do not accept a `SentryRequestType`\n var envelopeItem = [{ type: type }, session];\n var envelope = createEnvelope(envelopeHeaders, [envelopeItem]);\n return [envelope, type];\n}\n/** Creates a SentryRequest from a Session. */\nexport function sessionToSentryRequest(session, api) {\n var _a = __read(createSessionEnvelope(session, api), 2), envelope = _a[0], type = _a[1];\n return {\n body: serializeEnvelope(envelope),\n type: type,\n url: getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel),\n };\n}\n/**\n * Create an Envelope from an event. Note that this is duplicated from below,\n * but on purpose as this will be refactored in v7.\n */\nexport function createEventEnvelope(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;\n var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;\n var envelopeHeaders = __assign(__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n var eventItem = [\n {\n type: eventType,\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n },\n event,\n ];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var useEnvelope = eventType === 'transaction' || !!api.tunnel;\n var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;\n var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;\n // TODO: Below is a temporary hack in order to debug a serialization error - see\n // https://github.com/getsentry/sentry-javascript/issues/2809,\n // https://github.com/getsentry/sentry-javascript/pull/4425, and\n // https://github.com/getsentry/sentry-javascript/pull/4574.\n //\n // TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to\n // throw a circular reference error.\n //\n // When it's time to remove it:\n // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting\n // `sdkProcessingMetadata`\n // 2. Restore the original version of the request body, which is commented out\n // 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the\n // baseClient tests in this package\n enhanceEventWithSdkInfo(event, api.metadata.sdk);\n event.tags = event.tags || {};\n event.extra = event.extra || {};\n // In theory, all events should be marked as having gone through normalization and so\n // we should never set this tag/extra data\n if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {\n event.tags.skippedNormalization = true;\n event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';\n }\n // prevent this data from being sent to sentry\n // TODO: This is NOT part of the hack - DO NOT DELETE\n delete event.sdkProcessingMetadata;\n var body;\n try {\n // 99.9% of events should get through just fine - no change in behavior for them\n body = JSON.stringify(event);\n }\n catch (err) {\n // Record data about the error without replacing original event data, then force renormalization\n event.tags.JSONStringifyError = true;\n event.extra.JSONStringifyError = err;\n try {\n body = JSON.stringify(normalize(event));\n }\n catch (newErr) {\n // At this point even renormalization hasn't worked, meaning something about the event data has gone very wrong.\n // Time to cut our losses and record only the new error. With luck, even in the problematic cases we're trying to\n // debug with this hack, we won't ever land here.\n var innerErr = newErr;\n body = JSON.stringify({\n message: 'JSON.stringify error after renormalization',\n // setting `extra: { innerErr }` here for some reason results in an empty object, so unpack manually\n extra: { message: innerErr.message, stack: innerErr.stack },\n });\n }\n }\n var req = {\n // this is the relevant line of code before the hack was added, to make it easy to undo said hack once we've solved\n // the mystery\n // body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n body: body,\n type: eventType,\n url: useEnvelope\n ? getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel)\n : getStoreEndpointWithUrlEncodedAuth(api.dsn),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = __assign(__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n var eventItem = [\n {\n type: eventType,\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n },\n req.body,\n ];\n var envelope = createEnvelope(envelopeHeaders, [eventItem]);\n req.body = serializeEnvelope(envelope);\n }\n return req;\n}\n//# sourceMappingURL=request.js.map","import { resolvedSyncPromise } from '@sentry/utils';\n/** Noop transport */\nvar NoopTransport = /** @class */ (function () {\n function NoopTransport() {\n }\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.sendEvent = function (_) {\n return resolvedSyncPromise({\n reason: 'NoopTransport: Event has been skipped because no Dsn is configured.',\n status: 'skipped',\n });\n };\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.close = function (_) {\n return resolvedSyncPromise(true);\n };\n return NoopTransport;\n}());\nexport { NoopTransport };\n//# sourceMappingURL=noop.js.map","import { __read } from \"tslib\";\nimport { isDebugBuild, logger, SentryError } from '@sentry/utils';\nimport { initAPIDetails } from './api';\nimport { createEventEnvelope, createSessionEnvelope } from './request';\nimport { NoopTransport } from './transports/noop';\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nvar BaseBackend = /** @class */ (function () {\n /** Creates a new backend instance. */\n function BaseBackend(options) {\n this._options = options;\n if (!this._options.dsn) {\n isDebugBuild() && logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n BaseBackend.prototype.eventFromException = function (_exception, _hint) {\n throw new SentryError('Backend has to implement `eventFromException` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendEvent = function (event) {\n // TODO(v7): Remove the if-else\n if (this._newTransport &&\n this._options.dsn &&\n this._options._experiments &&\n this._options._experiments.newTransport) {\n var api = initAPIDetails(this._options.dsn, this._options._metadata, this._options.tunnel);\n var env = createEventEnvelope(event, api);\n void this._newTransport.send(env).then(null, function (reason) {\n isDebugBuild() && logger.error('Error while sending event:', reason);\n });\n }\n else {\n void this._transport.sendEvent(event).then(null, function (reason) {\n isDebugBuild() && logger.error('Error while sending event:', reason);\n });\n }\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendSession = function (session) {\n if (!this._transport.sendSession) {\n isDebugBuild() && logger.warn(\"Dropping session because custom transport doesn't implement sendSession\");\n return;\n }\n // TODO(v7): Remove the if-else\n if (this._newTransport &&\n this._options.dsn &&\n this._options._experiments &&\n this._options._experiments.newTransport) {\n var api = initAPIDetails(this._options.dsn, this._options._metadata, this._options.tunnel);\n var _a = __read(createSessionEnvelope(session, api), 1), env = _a[0];\n void this._newTransport.send(env).then(null, function (reason) {\n isDebugBuild() && logger.error('Error while sending session:', reason);\n });\n }\n else {\n void this._transport.sendSession(session).then(null, function (reason) {\n isDebugBuild() && logger.error('Error while sending session:', reason);\n });\n }\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.getTransport = function () {\n return this._transport;\n };\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n BaseBackend.prototype._setupTransport = function () {\n return new NoopTransport();\n };\n return BaseBackend;\n}());\nexport { BaseBackend };\n//# sourceMappingURL=basebackend.js.map","import { isDebugBuild } from './env';\nimport { getGlobalObject } from './global';\nimport { logger } from './logger';\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException() {\n try {\n new DOMException('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch() {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n try {\n new Headers();\n new Request('');\n new Response();\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch() {\n if (!supportsFetch()) {\n return false;\n }\n var global = getGlobalObject();\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n var result = false;\n var doc = global.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof doc.createElement === 'function') {\n try {\n var sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n }\n catch (err) {\n isDebugBuild() &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n return result;\n}\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver() {\n return 'ReportingObserver' in getGlobalObject();\n}\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n if (!supportsFetch()) {\n return false;\n }\n try {\n new Request('_', {\n referrerPolicy: 'origin',\n });\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n var global = getGlobalObject();\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var chrome = global.chrome;\n var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n return !isChromePackagedApp && hasHistoryApi;\n}\n//# sourceMappingURL=supports.js.map","import { __read } from \"tslib\";\n// global reference to slice\nvar UNKNOWN_FUNCTION = '?';\nvar OPERA10_PRIORITY = 10;\nvar OPERA11_PRIORITY = 20;\nvar CHROME_PRIORITY = 30;\nvar WINJS_PRIORITY = 40;\nvar GECKO_PRIORITY = 50;\nfunction createFrame(filename, func, lineno, colno) {\n var frame = {\n filename: filename,\n function: func,\n // All browser frames are considered in_app\n in_app: true,\n };\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n if (colno !== undefined) {\n frame.colno = colno;\n }\n return frame;\n}\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nvar chromeRegex = /^\\s*at (?:(.*?) ?\\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nvar chrome = function (line) {\n var parts = chromeRegex.exec(line);\n if (parts) {\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval) {\n var subMatch = chromeEvalRegex.exec(parts[2]);\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n var _a = __read(extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]), 2), func = _a[0], filename = _a[1];\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n return;\n};\nexport var chromeStackParser = [CHROME_PRIORITY, chrome];\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nvar geckoREgex = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nvar gecko = function (line) {\n var _a;\n var parts = geckoREgex.exec(line);\n if (parts) {\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n var subMatch = geckoEvalRegex.exec(parts[3]);\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n var filename = parts[3];\n var func = parts[1] || UNKNOWN_FUNCTION;\n _a = __read(extractSafariExtensionDetails(func, filename), 2), func = _a[0], filename = _a[1];\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n return;\n};\nexport var geckoStackParser = [GECKO_PRIORITY, gecko];\nvar winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nvar winjs = function (line) {\n var parts = winjsRegex.exec(line);\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\nexport var winjsStackParser = [WINJS_PRIORITY, winjs];\nvar opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\nvar opera10 = function (line) {\n var parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\nexport var opera10StackParser = [OPERA10_PRIORITY, opera10];\nvar opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\nvar opera11 = function (line) {\n var parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\nexport var opera11StackParser = [OPERA11_PRIORITY, opera11];\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nvar extractSafariExtensionDetails = function (func, filename) {\n var isSafariExtension = func.indexOf('safari-extension') !== -1;\n var isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? \"safari-extension:\" + filename : \"safari-web-extension:\" + filename,\n ]\n : [func, filename];\n};\n//# sourceMappingURL=stack-parsers.js.map","import { __assign } from \"tslib\";\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue, createStackParser, extractExceptionKeysForMessage, isDOMError, isDOMException, isError, isErrorEvent, isEvent, isPlainObject, normalizeToSize, resolvedSyncPromise, } from '@sentry/utils';\nimport { chromeStackParser, geckoStackParser, opera10StackParser, opera11StackParser, winjsStackParser, } from './stack-parsers';\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromError(ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n var frames = parseStackFrames(ex);\n var exception = {\n type: ex && ex.name,\n value: extractMessage(ex),\n };\n if (frames.length) {\n exception.stacktrace = { frames: frames };\n }\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception, syntheticException, isUnhandledRejection) {\n var event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: \"Non-Error \" + (isUnhandledRejection ? 'promise rejection' : 'exception') + \" captured with keys: \" + extractExceptionKeysForMessage(exception),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n if (syntheticException) {\n var frames_1 = parseStackFrames(syntheticException);\n if (frames_1.length) {\n event.stacktrace = { frames: frames_1 };\n }\n }\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromError(ex) {\n return {\n exception: {\n values: [exceptionFromError(ex)],\n },\n };\n}\n/** Parses stack frames from an error */\nexport function parseStackFrames(ex) {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n var stacktrace = ex.stacktrace || ex.stack || '';\n var popSize = getPopSize(ex);\n try {\n return createStackParser(opera10StackParser, opera11StackParser, chromeStackParser, winjsStackParser, geckoStackParser)(stacktrace, popSize);\n }\n catch (e) {\n // no-empty\n }\n return [];\n}\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nvar reactMinifiedRegexp = /Minified React error #\\d+;/i;\nfunction getPopSize(ex) {\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n if (reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n }\n return 0;\n}\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex) {\n var message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(exception, hint, attachStacktrace) {\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromUnknownInput(exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(message, level, hint, attachStacktrace) {\n if (level === void 0) { level = Severity.Info; }\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromString(message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(exception, syntheticException, attachStacktrace, isUnhandledRejection) {\n var event;\n if (isErrorEvent(exception) && exception.error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n var errorEvent = exception;\n return eventFromError(errorEvent.error);\n }\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception)) {\n var domException = exception;\n if ('stack' in exception) {\n event = eventFromError(exception);\n }\n else {\n var name_1 = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n var message = domException.message ? name_1 + \": \" + domException.message : name_1;\n event = eventFromString(message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n event.tags = __assign(__assign({}, event.tags), { 'DOMException.code': \"\" + domException.code });\n }\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n var objectException = exception;\n event = eventFromPlainObject(objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, \"\" + exception, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromString(input, syntheticException, attachStacktrace) {\n var event = {\n message: input,\n };\n if (attachStacktrace && syntheticException) {\n var frames_2 = parseStackFrames(syntheticException);\n if (frames_2.length) {\n event.stacktrace = { frames: frames_2 };\n }\n }\n return event;\n}\n//# sourceMappingURL=eventbuilder.js.map","import { __assign, __values } from \"tslib\";\nexport var DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nexport function parseRetryAfterHeader(header, now) {\n if (now === void 0) { now = Date.now(); }\n var headerDelay = parseInt(\"\" + header, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n var headerDate = Date.parse(\"\" + header);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n return DEFAULT_RETRY_AFTER;\n}\n/**\n * Gets the time that given category is disabled until for rate limiting\n */\nexport function disabledUntil(limits, category) {\n return limits[category] || limits.all || 0;\n}\n/**\n * Checks if a category is rate limited\n */\nexport function isRateLimited(limits, category, now) {\n if (now === void 0) { now = Date.now(); }\n return disabledUntil(limits, category) > now;\n}\n/**\n * Update ratelimits from incoming headers.\n * Returns true if headers contains a non-empty rate limiting header.\n */\nexport function updateRateLimits(limits, headers, now) {\n var e_1, _a, e_2, _b;\n if (now === void 0) { now = Date.now(); }\n var updatedRateLimits = __assign({}, limits);\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n var rateLimitHeader = headers['x-sentry-rate-limits'];\n var retryAfterHeader = headers['retry-after'];\n if (rateLimitHeader) {\n try {\n /**\n * rate limit headers are of the form\n * <header>,<header>,..\n * where each <header> is of the form\n * <retry_after>: <categories>: <scope>: <reason_code>\n * where\n * <retry_after> is a delay in seconds\n * <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * <category>;<category>;...\n * <scope> is what's being limited (org, project, or key) - ignored by SDK\n * <reason_code> is an arbitrary string like \"org_quota\" - ignored by SDK\n */\n for (var _c = __values(rateLimitHeader.trim().split(',')), _d = _c.next(); !_d.done; _d = _c.next()) {\n var limit = _d.value;\n var parameters = limit.split(':', 2);\n var headerDelay = parseInt(parameters[0], 10);\n var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!parameters[1]) {\n updatedRateLimits.all = now + delay;\n }\n else {\n try {\n for (var _e = (e_2 = void 0, __values(parameters[1].split(';'))), _f = _e.next(); !_f.done; _f = _e.next()) {\n var category = _f.value;\n updatedRateLimits[category] = now + delay;\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n }\n return updatedRateLimits;\n}\n//# sourceMappingURL=ratelimit.js.map","import { forget, getGlobalObject, isDebugBuild, isNativeFetch, logger, supportsFetch } from '@sentry/utils';\nvar global = getGlobalObject();\nvar cachedFetchImpl;\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation() {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n /* eslint-disable @typescript-eslint/unbound-method */\n // Fast path to avoid DOM I/O\n if (isNativeFetch(global.fetch)) {\n return (cachedFetchImpl = global.fetch.bind(global));\n }\n var document = global.document;\n var fetchImpl = global.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n var sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n var contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n }\n catch (e) {\n isDebugBuild() &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n return (cachedFetchImpl = fetchImpl.bind(global));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n/**\n * Sends sdk client report using sendBeacon or fetch as a fallback if available\n *\n * @param url report endpoint\n * @param body report payload\n */\nexport function sendReport(url, body) {\n var isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';\n var hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';\n if (hasSendBeacon) {\n // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch\n var sendBeacon = global.navigator.sendBeacon.bind(global.navigator);\n return sendBeacon(url, body);\n }\n if (supportsFetch()) {\n var fetch_1 = getNativeFetchImplementation();\n return forget(fetch_1(url, {\n body: body,\n method: 'POST',\n credentials: 'omit',\n keepalive: true,\n }));\n }\n}\n//# sourceMappingURL=utils.js.map","import { __read } from \"tslib\";\nimport { eventToSentryRequest, getEnvelopeEndpointWithUrlEncodedAuth, getStoreEndpointWithUrlEncodedAuth, initAPIDetails, sessionToSentryRequest, } from '@sentry/core';\nimport { createClientReportEnvelope, disabledUntil, dsnToString, eventStatusFromHttpCode, getGlobalObject, isDebugBuild, isRateLimited, logger, makePromiseBuffer, serializeEnvelope, updateRateLimits, } from '@sentry/utils';\nimport { sendReport } from './utils';\nfunction requestTypeToCategory(ty) {\n var tyStr = ty;\n return tyStr === 'event' ? 'error' : tyStr;\n}\nvar global = getGlobalObject();\n/** Base Transport class implementation */\nvar BaseTransport = /** @class */ (function () {\n function BaseTransport(options) {\n var _this = this;\n this.options = options;\n /** A simple buffer holding all requests. */\n this._buffer = makePromiseBuffer(30);\n /** Locks transport after receiving rate limits in a response */\n this._rateLimits = {};\n this._outcomes = {};\n this._api = initAPIDetails(options.dsn, options._metadata, options.tunnel);\n // eslint-disable-next-line deprecation/deprecation\n this.url = getStoreEndpointWithUrlEncodedAuth(this._api.dsn);\n if (this.options.sendClientReports && global.document) {\n global.document.addEventListener('visibilitychange', function () {\n if (global.document.visibilityState === 'hidden') {\n _this._flushOutcomes();\n }\n });\n }\n }\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.sendEvent = function (event) {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.sendSession = function (session) {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.close = function (timeout) {\n return this._buffer.drain(timeout);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.recordLostEvent = function (reason, category) {\n var _a;\n if (!this.options.sendClientReports) {\n return;\n }\n // We want to track each category (event, transaction, session) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`\n var key = requestTypeToCategory(category) + \":\" + reason;\n isDebugBuild() && logger.log(\"Adding outcome: \" + key);\n this._outcomes[key] = (_a = this._outcomes[key], (_a !== null && _a !== void 0 ? _a : 0)) + 1;\n };\n /**\n * Send outcomes as an envelope\n */\n BaseTransport.prototype._flushOutcomes = function () {\n if (!this.options.sendClientReports) {\n return;\n }\n var outcomes = this._outcomes;\n this._outcomes = {};\n // Nothing to send\n if (!Object.keys(outcomes).length) {\n isDebugBuild() && logger.log('No outcomes to flush');\n return;\n }\n isDebugBuild() && logger.log(\"Flushing outcomes:\\n\" + JSON.stringify(outcomes, null, 2));\n var url = getEnvelopeEndpointWithUrlEncodedAuth(this._api.dsn, this._api.tunnel);\n var discardedEvents = Object.keys(outcomes).map(function (key) {\n var _a = __read(key.split(':'), 2), category = _a[0], reason = _a[1];\n return {\n reason: reason,\n category: category,\n quantity: outcomes[key],\n };\n // TODO: Improve types on discarded_events to get rid of cast\n });\n var envelope = createClientReportEnvelope(discardedEvents, this._api.tunnel && dsnToString(this._api.dsn));\n try {\n sendReport(url, serializeEnvelope(envelope));\n }\n catch (e) {\n isDebugBuild() && logger.error(e);\n }\n };\n /**\n * Handle Sentry repsonse for promise-based transports.\n */\n BaseTransport.prototype._handleResponse = function (_a) {\n var requestType = _a.requestType, response = _a.response, headers = _a.headers, resolve = _a.resolve, reject = _a.reject;\n var status = eventStatusFromHttpCode(response.status);\n this._rateLimits = updateRateLimits(this._rateLimits, headers);\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(requestType) && isDebugBuild()) {\n isDebugBuild() &&\n // eslint-disable-next-line deprecation/deprecation\n logger.warn(\"Too many \" + requestType + \" requests, backing off until: \" + this._disabledUntil(requestType));\n }\n if (status === 'success') {\n resolve({ status: status });\n return;\n }\n reject(response);\n };\n /**\n * Gets the time that given category is disabled until for rate limiting\n *\n * @deprecated Please use `disabledUntil` from @sentry/utils\n */\n BaseTransport.prototype._disabledUntil = function (requestType) {\n var category = requestTypeToCategory(requestType);\n return new Date(disabledUntil(this._rateLimits, category));\n };\n /**\n * Checks if a category is rate limited\n *\n * @deprecated Please use `isRateLimited` from @sentry/utils\n */\n BaseTransport.prototype._isRateLimited = function (requestType) {\n var category = requestTypeToCategory(requestType);\n return isRateLimited(this._rateLimits, category);\n };\n return BaseTransport;\n}());\nexport { BaseTransport };\n//# sourceMappingURL=base.js.map","import { SentryError } from './error';\nimport { rejectedSyncPromise, resolvedSyncPromise, SyncPromise } from './syncpromise';\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer(limit) {\n var buffer = [];\n function isReady() {\n return limit === undefined || buffer.length < limit;\n }\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike<T>\n * @returns Removed promise.\n */\n function remove(task) {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:\n * PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer) {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n // start the task and add its promise to the queue\n var task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(function () { return remove(task); })\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, function () {\n return remove(task).then(null, function () {\n // We have to add another catch here because `remove()` starts a new promise chain.\n });\n });\n return task;\n }\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout) {\n return new SyncPromise(function (resolve, reject) {\n var counter = buffer.length;\n if (!counter) {\n return resolve(true);\n }\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n var capturedSetTimeout = setTimeout(function () {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(function (item) {\n void resolvedSyncPromise(item).then(function () {\n // eslint-disable-next-line no-plusplus\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n return {\n $: buffer,\n add: add,\n drain: drain,\n };\n}\n//# sourceMappingURL=promisebuffer.js.map","import { createEnvelope } from './envelope';\nimport { dateTimestampInSeconds } from './time';\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nexport function createClientReportEnvelope(discarded_events, dsn, timestamp) {\n var clientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events: discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn: dsn } : {}, [clientReportItem]);\n}\n//# sourceMappingURL=clientreport.js.map","/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function forget(promise) {\n void promise.then(null, function (e) {\n // TODO: Use a better logging mechanism\n // eslint-disable-next-line no-console\n console.error(e);\n });\n}\n//# sourceMappingURL=async.js.map","/**\n * Converts an HTTP status code to sentry status {@link EventStatus}.\n *\n * @param code number HTTP status code\n * @returns EventStatus\n */\nexport function eventStatusFromHttpCode(code) {\n if (code >= 200 && code < 300) {\n return 'success';\n }\n if (code === 429) {\n return 'rate_limit';\n }\n if (code >= 400 && code < 500) {\n return 'invalid';\n }\n if (code >= 500) {\n return 'failed';\n }\n return 'unknown';\n}\n//# sourceMappingURL=status.js.map","import { __extends } from \"tslib\";\nimport { SentryError, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\nimport { getNativeFetchImplementation } from './utils';\n/** `fetch` based transport */\nvar FetchTransport = /** @class */ (function (_super) {\n __extends(FetchTransport, _super);\n function FetchTransport(options, fetchImpl) {\n if (fetchImpl === void 0) { fetchImpl = getNativeFetchImplementation(); }\n var _this = _super.call(this, options) || this;\n _this._fetch = fetchImpl;\n return _this;\n }\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n FetchTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n // eslint-disable-next-line deprecation/deprecation\n reason: \"Transport for \" + sentryRequest.type + \" requests locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n var options = {\n body: sentryRequest.body,\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''),\n };\n if (this.options.fetchParameters !== undefined) {\n Object.assign(options, this.options.fetchParameters);\n }\n if (this.options.headers !== undefined) {\n options.headers = this.options.headers;\n }\n return this._buffer\n .add(function () {\n return new SyncPromise(function (resolve, reject) {\n void _this._fetch(sentryRequest.url, options)\n .then(function (response) {\n var headers = {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n };\n _this._handleResponse({\n requestType: sentryRequest.type,\n response: response,\n headers: headers,\n resolve: resolve,\n reject: reject,\n });\n })\n .catch(reject);\n });\n })\n .then(undefined, function (reason) {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n _this.recordLostEvent('queue_overflow', sentryRequest.type);\n }\n else {\n _this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n };\n return FetchTransport;\n}(BaseTransport));\nexport { FetchTransport };\n//# sourceMappingURL=fetch.js.map","import { __extends } from \"tslib\";\nimport { SentryError, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\n/** `XHR` based transport */\nvar XHRTransport = /** @class */ (function (_super) {\n __extends(XHRTransport, _super);\n function XHRTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n XHRTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n // eslint-disable-next-line deprecation/deprecation\n reason: \"Transport for \" + sentryRequest.type + \" requests locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n return this._buffer\n .add(function () {\n return new SyncPromise(function (resolve, reject) {\n var request = new XMLHttpRequest();\n request.onreadystatechange = function () {\n if (request.readyState === 4) {\n var headers = {\n 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': request.getResponseHeader('Retry-After'),\n };\n _this._handleResponse({ requestType: sentryRequest.type, response: request, headers: headers, resolve: resolve, reject: reject });\n }\n };\n request.open('POST', sentryRequest.url);\n for (var header in _this.options.headers) {\n if (Object.prototype.hasOwnProperty.call(_this.options.headers, header)) {\n request.setRequestHeader(header, _this.options.headers[header]);\n }\n }\n request.send(sentryRequest.body);\n });\n })\n .then(undefined, function (reason) {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n _this.recordLostEvent('queue_overflow', sentryRequest.type);\n }\n else {\n _this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n };\n return XHRTransport;\n}(BaseTransport));\nexport { XHRTransport };\n//# sourceMappingURL=xhr.js.map","import { __assign, __extends } from \"tslib\";\nimport { BaseBackend } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nvar BrowserBackend = /** @class */ (function (_super) {\n __extends(BrowserBackend, _super);\n function BrowserBackend() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromException = function (exception, hint) {\n return eventFromException(exception, hint, this._options.attachStacktrace);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {\n if (level === void 0) { level = Severity.Info; }\n return eventFromMessage(message, level, hint, this._options.attachStacktrace);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype._setupTransport = function () {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return _super.prototype._setupTransport.call(this);\n }\n var transportOptions = __assign(__assign({}, this._options.transportOptions), { dsn: this._options.dsn, tunnel: this._options.tunnel, sendClientReports: this._options.sendClientReports, _metadata: this._options._metadata });\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n };\n return BrowserBackend;\n}(BaseBackend));\nexport { BrowserBackend };\n//# sourceMappingURL=backend.js.map","import { __assign } from \"tslib\";\nimport { captureException, getReportDialogEndpoint, withScope } from '@sentry/core';\nimport { addExceptionMechanism, addExceptionTypeValue, addNonEnumerableProperty, getGlobalObject, getOriginalFunction, isDebugBuild, logger, markFunctionWrapped, } from '@sentry/utils';\nvar global = getGlobalObject();\nvar ignoreOnError = 0;\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n/**\n * @hidden\n */\nexport function ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(function () {\n ignoreOnError -= 1;\n });\n}\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(fn, options, before) {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n if (options === void 0) { options = {}; }\n if (typeof fn !== 'function') {\n return fn;\n }\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n var wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n /* eslint-disable prefer-rest-params */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var sentryWrapped = function () {\n var args = Array.prototype.slice.call(arguments);\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n }\n catch (ex) {\n ignoreNextOnError();\n withScope(function (scope) {\n scope.addEventProcessor(function (event) {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n event.extra = __assign(__assign({}, event.extra), { arguments: args });\n return event;\n });\n captureException(ex);\n });\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (var property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n }\n catch (_oO) { } // eslint-disable-line no-empty\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n // Restore original function name (not all browsers allow that)\n try {\n var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get: function () {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n }\n catch (_oO) { }\n return sentryWrapped;\n}\n/**\n * Injects the Report Dialog script\n * @hidden\n */\nexport function injectReportDialog(options) {\n if (options === void 0) { options = {}; }\n if (!global.document) {\n return;\n }\n if (!options.eventId) {\n isDebugBuild() && logger.error('Missing eventId option in showReportDialog call');\n return;\n }\n if (!options.dsn) {\n isDebugBuild() && logger.error('Missing dsn option in showReportDialog call');\n return;\n }\n var script = global.document.createElement('script');\n script.async = true;\n script.src = getReportDialogEndpoint(options.dsn, options);\n if (options.onLoad) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n script.onload = options.onLoad;\n }\n var injectionPoint = global.document.head || global.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n }\n}\n//# sourceMappingURL=helpers.js.map","import { __assign, __values } from \"tslib\";\nimport { isDebugBuild } from './env';\nimport { getGlobalObject } from './global';\nimport { isInstanceOf, isString } from './is';\nimport { CONSOLE_LEVELS, logger } from './logger';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\nvar global = getGlobalObject();\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\nvar handlers = {};\nvar instrumented = {};\n/** Instruments given API */\nfunction instrument(type) {\n if (instrumented[type]) {\n return;\n }\n instrumented[type] = true;\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n isDebugBuild() && logger.warn('unknown instrumentation type:', type);\n return;\n }\n}\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(type, callback) {\n handlers[type] = handlers[type] || [];\n handlers[type].push(callback);\n instrument(type);\n}\n/** JSDoc */\nfunction triggerHandlers(type, data) {\n var e_1, _a;\n if (!type || !handlers[type]) {\n return;\n }\n try {\n for (var _b = __values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {\n var handler = _c.value;\n try {\n handler(data);\n }\n catch (e) {\n isDebugBuild() &&\n logger.error(\"Error while triggering instrumentation handler.\\nType: \" + type + \"\\nName: \" + getFunctionName(handler) + \"\\nError:\", e);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n}\n/** JSDoc */\nfunction instrumentConsole() {\n if (!('console' in global)) {\n return;\n }\n CONSOLE_LEVELS.forEach(function (level) {\n if (!(level in global.console)) {\n return;\n }\n fill(global.console, level, function (originalConsoleMethod) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n triggerHandlers('console', { args: args, level: level });\n // this fails for some browsers. :(\n if (originalConsoleMethod) {\n originalConsoleMethod.apply(global.console, args);\n }\n };\n });\n });\n}\n/** JSDoc */\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n fill(global, 'fetch', function (originalFetch) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var handlerData = {\n args: args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n triggerHandlers('fetch', __assign({}, handlerData));\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(global, args).then(function (response) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), { endTimestamp: Date.now(), response: response }));\n return response;\n }, function (error) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), { endTimestamp: Date.now(), error: error }));\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n });\n };\n });\n}\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n/** JSDoc */\nfunction instrumentXHR() {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n var xhrproto = XMLHttpRequest.prototype;\n fill(xhrproto, 'open', function (originalOpen) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var url = args[1];\n var xhrInfo = (xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n });\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n var onreadystatechangeHandler = function () {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = xhr.status;\n }\n catch (e) {\n /* do nothing */\n }\n triggerHandlers('xhr', {\n args: args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr: xhr,\n });\n }\n };\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function (original) {\n return function () {\n var readyStateArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n readyStateArgs[_i] = arguments[_i];\n }\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n }\n else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n return originalOpen.apply(xhr, args);\n };\n });\n fill(xhrproto, 'send', function (originalSend) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this.__sentry_xhr__ && args[0] !== undefined) {\n this.__sentry_xhr__.body = args[0];\n }\n triggerHandlers('xhr', {\n args: args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n return originalSend.apply(this, args);\n };\n });\n}\nvar lastHref;\n/** JSDoc */\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n var oldOnPopState = global.onpopstate;\n global.onpopstate = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n var from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n }\n catch (_oO) {\n // no-empty\n }\n }\n };\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n var from = lastHref;\n var to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\nvar debounceDuration = 1000;\nvar debounceTimerID;\nvar lastCapturedEvent;\n/**\n * Decide whether the current event should finish the debounce of previously captured one.\n * @param previous previously captured event\n * @param current event to be captured\n */\nfunction shouldShortcircuitPreviousDebounce(previous, current) {\n // If there was no previous event, it should always be swapped for the new one.\n if (!previous) {\n return true;\n }\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (previous.type !== current.type) {\n return true;\n }\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (previous.target !== current.target) {\n return true;\n }\n }\n catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return false;\n}\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(event) {\n // We are only interested in filtering `keypress` events for now.\n if (event.type !== 'keypress') {\n return false;\n }\n try {\n var target = event.target;\n if (!target || !target.tagName) {\n return true;\n }\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n }\n catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n return true;\n}\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler, globalListener) {\n if (globalListener === void 0) { globalListener = false; }\n return function (event) {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event)) {\n return;\n }\n var name = event.type === 'keypress' ? 'input' : event.type;\n // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.\n if (debounceTimerID === undefined) {\n handler({\n event: event,\n name: name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {\n handler({\n event: event,\n name: name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = global.setTimeout(function () {\n debounceTimerID = undefined;\n }, debounceDuration);\n };\n}\n/** JSDoc */\nfunction instrumentDOM() {\n if (!('document' in global)) {\n return;\n }\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n var triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n var globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n global.document.addEventListener('click', globalDOMEventHandler, false);\n global.document.addEventListener('keypress', globalDOMEventHandler, false);\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach(function (target) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var proto = global[target] && global[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (originalAddEventListener) {\n return function (type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n var el = this;\n var handlers_1 = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n var handlerForType = (handlers_1[type] = handlers_1[type] || { refCount: 0 });\n if (!handlerForType.handler) {\n var handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n handlerForType.refCount += 1;\n }\n catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n var el = this;\n var handlers_2 = el.__sentry_instrumentation_handlers__ || {};\n var handlerForType = handlers_2[type];\n if (handlerForType) {\n handlerForType.refCount -= 1;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers_2[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers_2).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n }\n catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n });\n });\n}\nvar _oldOnErrorHandler = null;\n/** JSDoc */\nfunction instrumentError() {\n _oldOnErrorHandler = global.onerror;\n global.onerror = function (msg, url, line, column, error) {\n triggerHandlers('error', {\n column: column,\n error: error,\n line: line,\n msg: msg,\n url: url,\n });\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n return false;\n };\n}\nvar _oldOnUnhandledRejectionHandler = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n global.onunhandledrejection = function (e) {\n triggerHandlers('unhandledrejection', e);\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n return true;\n };\n}\n//# sourceMappingURL=instrument.js.map","export var SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];\n//# sourceMappingURL=enums.js.map","import { __assign } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addInstrumentationHandler, getEventDescription, getGlobalObject, htmlTreeAsString, parseUrl, safeJoin, severityFromString, } from '@sentry/utils';\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nvar Breadcrumbs = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function Breadcrumbs(options) {\n /**\n * @inheritDoc\n */\n this.name = Breadcrumbs.id;\n this._options = __assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options);\n }\n /**\n * Create a breadcrumb of `sentry` from the events themselves\n */\n Breadcrumbs.prototype.addSentryBreadcrumb = function (event) {\n if (!this._options.sentry) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"sentry.\" + (event.type === 'transaction' ? 'transaction' : 'event'),\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n }, {\n event: event,\n });\n };\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n Breadcrumbs.prototype.setupOnce = function () {\n if (this._options.console) {\n addInstrumentationHandler('console', _consoleBreadcrumb);\n }\n if (this._options.dom) {\n addInstrumentationHandler('dom', _domBreadcrumb(this._options.dom));\n }\n if (this._options.xhr) {\n addInstrumentationHandler('xhr', _xhrBreadcrumb);\n }\n if (this._options.fetch) {\n addInstrumentationHandler('fetch', _fetchBreadcrumb);\n }\n if (this._options.history) {\n addInstrumentationHandler('history', _historyBreadcrumb);\n }\n };\n /**\n * @inheritDoc\n */\n Breadcrumbs.id = 'Breadcrumbs';\n return Breadcrumbs;\n}());\nexport { Breadcrumbs };\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _domBreadcrumb(dom) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _innerDomBreadcrumb(handlerData) {\n var target;\n var keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target, keyAttrs)\n : htmlTreeAsString(handlerData.event, keyAttrs);\n }\n catch (e) {\n target = '<unknown>';\n }\n if (target.length === 0) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"ui.\" + handlerData.name,\n message: target,\n }, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n });\n }\n return _innerDomBreadcrumb;\n}\n/**\n * Creates breadcrumbs from console API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _consoleBreadcrumb(handlerData) {\n var breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = \"Assertion failed: \" + (safeJoin(handlerData.args.slice(1), ' ') || 'console.assert');\n breadcrumb.data.arguments = handlerData.args.slice(1);\n }\n else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}\n/**\n * Creates breadcrumbs from XHR API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _xhrBreadcrumb(handlerData) {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n var _a = handlerData.xhr.__sentry_xhr__ || {}, method = _a.method, url = _a.url, status_code = _a.status_code, body = _a.body;\n getCurrentHub().addBreadcrumb({\n category: 'xhr',\n data: {\n method: method,\n url: url,\n status_code: status_code,\n },\n type: 'http',\n }, {\n xhr: handlerData.xhr,\n input: body,\n });\n return;\n }\n}\n/**\n * Creates breadcrumbs from fetch API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _fetchBreadcrumb(handlerData) {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: handlerData.fetchData,\n level: Severity.Error,\n type: 'http',\n }, {\n data: handlerData.error,\n input: handlerData.args,\n });\n }\n else {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: __assign(__assign({}, handlerData.fetchData), { status_code: handlerData.response.status }),\n type: 'http',\n }, {\n input: handlerData.args,\n response: handlerData.response,\n });\n }\n}\n/**\n * Creates breadcrumbs from history API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _historyBreadcrumb(handlerData) {\n var global = getGlobalObject();\n var from = handlerData.from;\n var to = handlerData.to;\n var parsedLoc = parseUrl(global.location.href);\n var parsedFrom = parseUrl(from);\n var parsedTo = parseUrl(to);\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from: from,\n to: to,\n },\n });\n}\n//# sourceMappingURL=breadcrumbs.js.map","import { Severity } from '@sentry/types';\nimport { SeverityLevels } from './enums';\nfunction isSupportedSeverity(level) {\n return SeverityLevels.indexOf(level) !== -1;\n}\n/**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\nexport function severityFromString(level) {\n if (level === 'warn')\n return Severity.Warning;\n if (isSupportedSeverity(level)) {\n return level;\n }\n return Severity.Log;\n}\n//# sourceMappingURL=severity.js.map","import { __assign, __extends } from \"tslib\";\nimport { BaseClient, SDK_VERSION } from '@sentry/core';\nimport { getGlobalObject, isDebugBuild, logger } from '@sentry/utils';\nimport { BrowserBackend } from './backend';\nimport { injectReportDialog } from './helpers';\nimport { Breadcrumbs } from './integrations';\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nvar BrowserClient = /** @class */ (function (_super) {\n __extends(BrowserClient, _super);\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n function BrowserClient(options) {\n if (options === void 0) { options = {}; }\n var _this = this;\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n _this = _super.call(this, BrowserBackend, options) || this;\n return _this;\n }\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n BrowserClient.prototype.showReportDialog = function (options) {\n if (options === void 0) { options = {}; }\n // doesn't work without a document (React Native)\n var document = getGlobalObject().document;\n if (!document) {\n return;\n }\n if (!this._isEnabled()) {\n isDebugBuild() && logger.error('Trying to call showReportDialog with Sentry Client disabled');\n return;\n }\n injectReportDialog(__assign(__assign({}, options), { dsn: options.dsn || this.getDsn() }));\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._prepareEvent = function (event, scope, hint) {\n event.platform = event.platform || 'javascript';\n return _super.prototype._prepareEvent.call(this, event, scope, hint);\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._sendEvent = function (event) {\n var integration = this.getIntegration(Breadcrumbs);\n if (integration) {\n integration.addSentryBreadcrumb(event);\n }\n _super.prototype._sendEvent.call(this, event);\n };\n return BrowserClient;\n}(BaseClient));\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map","import { getOriginalFunction } from '@sentry/utils';\nvar originalFunctionToString;\n/** Patch toString calls to return proper name for wrapped functions */\nvar FunctionToString = /** @class */ (function () {\n function FunctionToString() {\n /**\n * @inheritDoc\n */\n this.name = FunctionToString.id;\n }\n /**\n * @inheritDoc\n */\n FunctionToString.prototype.setupOnce = function () {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n };\n /**\n * @inheritDoc\n */\n FunctionToString.id = 'FunctionToString';\n return FunctionToString;\n}());\nexport { FunctionToString };\n//# sourceMappingURL=functiontostring.js.map","import { __read, __spread } from \"tslib\";\nimport { getEventDescription, isDebugBuild, isMatchingPattern, logger } from '@sentry/utils';\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nvar DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n/** Inbound filters configurable by the user */\nvar InboundFilters = /** @class */ (function () {\n function InboundFilters(_options) {\n if (_options === void 0) { _options = {}; }\n this._options = _options;\n /**\n * @inheritDoc\n */\n this.name = InboundFilters.id;\n }\n /**\n * @inheritDoc\n */\n InboundFilters.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(function (event) {\n var hub = getCurrentHub();\n if (hub) {\n var self_1 = hub.getIntegration(InboundFilters);\n if (self_1) {\n var client = hub.getClient();\n var clientOptions = client ? client.getOptions() : {};\n var options = _mergeOptions(self_1._options, clientOptions);\n return _shouldDropEvent(event, options) ? null : event;\n }\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n InboundFilters.id = 'InboundFilters';\n return InboundFilters;\n}());\nexport { InboundFilters };\n/** JSDoc */\nexport function _mergeOptions(internalOptions, clientOptions) {\n if (internalOptions === void 0) { internalOptions = {}; }\n if (clientOptions === void 0) { clientOptions = {}; }\n return {\n allowUrls: __spread((internalOptions.whitelistUrls || []), (internalOptions.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),\n denyUrls: __spread((internalOptions.blacklistUrls || []), (internalOptions.denyUrls || []), (clientOptions.blacklistUrls || []), (clientOptions.denyUrls || [])),\n ignoreErrors: __spread((internalOptions.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n/** JSDoc */\nexport function _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n isDebugBuild() &&\n logger.warn(\"Event dropped due to being internal Sentry Error.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n isDebugBuild() &&\n logger.warn(\"Event dropped due to being matched by `ignoreErrors` option.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n isDebugBuild() &&\n logger.warn(\"Event dropped due to being matched by `denyUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + _getEventFilterUrl(event));\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n isDebugBuild() &&\n logger.warn(\"Event dropped due to not being matched by `allowUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + _getEventFilterUrl(event));\n return true;\n }\n return false;\n}\nfunction _isIgnoredError(event, ignoreErrors) {\n if (!ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n return _getPossibleEventMessages(event).some(function (message) {\n return ignoreErrors.some(function (pattern) { return isMatchingPattern(message, pattern); });\n });\n}\nfunction _isDeniedUrl(event, denyUrls) {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n var url = _getEventFilterUrl(event);\n return !url ? false : denyUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n}\nfunction _isAllowedUrl(event, allowUrls) {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n var url = _getEventFilterUrl(event);\n return !url ? true : allowUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n}\nfunction _getPossibleEventMessages(event) {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n var _a = (event.exception.values && event.exception.values[0]) || {}, _b = _a.type, type = _b === void 0 ? '' : _b, _c = _a.value, value = _c === void 0 ? '' : _c;\n return [\"\" + value, type + \": \" + value];\n }\n catch (oO) {\n isDebugBuild() && logger.error(\"Cannot extract message for event \" + getEventDescription(event));\n return [];\n }\n }\n return [];\n}\nfunction _isSentryError(event) {\n try {\n // @ts-ignore can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n }\n catch (e) {\n // ignore\n }\n return false;\n}\nfunction _getLastValidUrl(frames) {\n if (frames === void 0) { frames = []; }\n for (var i = frames.length - 1; i >= 0; i--) {\n var frame = frames[i];\n if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n return null;\n}\nfunction _getEventFilterUrl(event) {\n try {\n if (event.stacktrace) {\n return _getLastValidUrl(event.stacktrace.frames);\n }\n var frames_1;\n try {\n // @ts-ignore we only care about frames if the whole thing here is defined\n frames_1 = event.exception.values[0].stacktrace.frames;\n }\n catch (e) {\n // ignore\n }\n return frames_1 ? _getLastValidUrl(frames_1) : null;\n }\n catch (oO) {\n isDebugBuild() && logger.error(\"Cannot extract url for event \" + getEventDescription(event));\n return null;\n }\n}\n//# sourceMappingURL=inboundfilters.js.map","import { __assign } from \"tslib\";\nimport { fill, getFunctionName, getGlobalObject, getOriginalFunction } from '@sentry/utils';\nimport { wrap } from '../helpers';\nvar DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nvar TryCatch = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function TryCatch(options) {\n /**\n * @inheritDoc\n */\n this.name = TryCatch.id;\n this._options = __assign({ XMLHttpRequest: true, eventTarget: true, requestAnimationFrame: true, setInterval: true, setTimeout: true }, options);\n }\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n TryCatch.prototype.setupOnce = function () {\n var global = getGlobalObject();\n if (this._options.setTimeout) {\n fill(global, 'setTimeout', _wrapTimeFunction);\n }\n if (this._options.setInterval) {\n fill(global, 'setInterval', _wrapTimeFunction);\n }\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', _wrapRAF);\n }\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n var eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n var eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n };\n /**\n * @inheritDoc\n */\n TryCatch.id = 'TryCatch';\n return TryCatch;\n}());\nexport { TryCatch };\n/** JSDoc */\nfunction _wrapTimeFunction(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _wrapRAF(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (callback) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n/** JSDoc */\nfunction _wrapXHR(originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n xmlHttpRequestProps.forEach(function (prop) {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original) {\n var wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n // If Instrument integration has been called before TryCatch, get the name of original function\n var originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n return originalSend.apply(this, args);\n };\n}\n/** JSDoc */\nfunction _wrapEventTarget(target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var global = getGlobalObject();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var proto = global[target] && global[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n try {\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n }\n catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n return original.apply(this, [\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (eventName, fn, options) {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n var wrappedEventHandler = fn;\n try {\n var originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n }\n catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n });\n}\n//# sourceMappingURL=trycatch.js.map","import { __assign, __read } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addInstrumentationHandler, getLocationHref, isDebugBuild, isErrorEvent, isPrimitive, isString, logger, } from '@sentry/utils';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n/** Global handlers */\nvar GlobalHandlers = /** @class */ (function () {\n /** JSDoc */\n function GlobalHandlers(options) {\n /**\n * @inheritDoc\n */\n this.name = GlobalHandlers.id;\n /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */\n this._installFunc = {\n onerror: _installGlobalOnErrorHandler,\n onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,\n };\n this._options = __assign({ onerror: true, onunhandledrejection: true }, options);\n }\n /**\n * @inheritDoc\n */\n GlobalHandlers.prototype.setupOnce = function () {\n Error.stackTraceLimit = 50;\n var options = this._options;\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for (var key in options) {\n var installFunc = this._installFunc[key];\n if (installFunc && options[key]) {\n globalHandlerLog(key);\n installFunc();\n this._installFunc[key] = undefined;\n }\n }\n };\n /**\n * @inheritDoc\n */\n GlobalHandlers.id = 'GlobalHandlers';\n return GlobalHandlers;\n}());\nexport { GlobalHandlers };\n/** JSDoc */\nfunction _installGlobalOnErrorHandler() {\n addInstrumentationHandler('error', \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function (data) {\n var _a = __read(getHubAndAttachStacktrace(), 2), hub = _a[0], attachStacktrace = _a[1];\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n var msg = data.msg, url = data.url, line = data.line, column = data.column, error = data.error;\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return;\n }\n var event = error === undefined && isString(msg)\n ? _eventFromIncompleteOnError(msg, url, line, column)\n : _enhanceEventWithInitialFrame(eventFromUnknownInput(error || msg, undefined, attachStacktrace, false), url, line, column);\n event.level = Severity.Error;\n addMechanismAndCapture(hub, error, event, 'onerror');\n });\n}\n/** JSDoc */\nfunction _installGlobalOnUnhandledRejectionHandler() {\n addInstrumentationHandler('unhandledrejection', \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function (e) {\n var _a = __read(getHubAndAttachStacktrace(), 2), hub = _a[0], attachStacktrace = _a[1];\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n var error = e;\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n }\n catch (_oO) {\n // no-empty\n }\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return true;\n }\n var event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(error, undefined, attachStacktrace, true);\n event.level = Severity.Error;\n addMechanismAndCapture(hub, error, event, 'onunhandledrejection');\n return;\n });\n}\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: \"Non-Error promise rejection captured with value: \" + String(reason),\n },\n ],\n },\n };\n}\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _eventFromIncompleteOnError(msg, url, line, column) {\n var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n // If 'message' is ErrorEvent, get real message from inside\n var message = isErrorEvent(msg) ? msg.message : msg;\n var name = 'Error';\n var groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n var event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _enhanceEventWithInitialFrame(event, url, line, column) {\n // event.exception\n var e = (event.exception = event.exception || {});\n // event.exception.values\n var ev = (e.values = e.values || []);\n // event.exception.values[0]\n var ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n var ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n var ev0sf = (ev0s.frames = ev0s.frames || []);\n var colno = isNaN(parseInt(column, 10)) ? undefined : column;\n var lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n var filename = isString(url) && url.length > 0 ? url : getLocationHref();\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno: colno,\n filename: filename,\n function: '?',\n in_app: true,\n lineno: lineno,\n });\n }\n return event;\n}\nfunction globalHandlerLog(type) {\n isDebugBuild() && logger.log(\"Global Handler attached: \" + type);\n}\nfunction addMechanismAndCapture(hub, error, event, type) {\n addExceptionMechanism(event, {\n handled: false,\n type: type,\n });\n hub.captureEvent(event, {\n originalException: error,\n });\n}\nfunction getHubAndAttachStacktrace() {\n var hub = getCurrentHub();\n var client = hub.getClient();\n var attachStacktrace = client && client.getOptions().attachStacktrace;\n return [hub, attachStacktrace];\n}\n//# sourceMappingURL=globalhandlers.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { isInstanceOf } from '@sentry/utils';\nimport { exceptionFromError } from '../eventbuilder';\nvar DEFAULT_KEY = 'cause';\nvar DEFAULT_LIMIT = 5;\n/** Adds SDK info to an event. */\nvar LinkedErrors = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function LinkedErrors(options) {\n if (options === void 0) { options = {}; }\n /**\n * @inheritDoc\n */\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event, hint) {\n var self = getCurrentHub().getIntegration(LinkedErrors);\n return self ? _handler(self._key, self._limit, event, hint) : event;\n });\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.id = 'LinkedErrors';\n return LinkedErrors;\n}());\nexport { LinkedErrors };\n/**\n * @inheritDoc\n */\nexport function _handler(key, limit, event, hint) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n var linkedErrors = _walkErrorTree(limit, hint.originalException, key);\n event.exception.values = __spread(linkedErrors, event.exception.values);\n return event;\n}\n/**\n * JSDOC\n */\nexport function _walkErrorTree(limit, error, key, stack) {\n if (stack === void 0) { stack = []; }\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= limit) {\n return stack;\n }\n var exception = exceptionFromError(error[key]);\n return _walkErrorTree(limit, error[key], key, __spread([exception], stack));\n}\n//# sourceMappingURL=linkederrors.js.map","import { isDebugBuild, logger } from '@sentry/utils';\n/** Deduplication filter */\nvar Dedupe = /** @class */ (function () {\n function Dedupe() {\n /**\n * @inheritDoc\n */\n this.name = Dedupe.id;\n }\n /**\n * @inheritDoc\n */\n Dedupe.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(function (currentEvent) {\n var self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, self._previousEvent)) {\n isDebugBuild() && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n }\n catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n };\n /**\n * @inheritDoc\n */\n Dedupe.id = 'Dedupe';\n return Dedupe;\n}());\nexport { Dedupe };\n/** JSDoc */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n return false;\n}\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n var currentMessage = currentEvent.message;\n var previousMessage = previousEvent.message;\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n if (currentMessage !== previousMessage) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n var previousException = _getExceptionFromEvent(previousEvent);\n var currentException = _getExceptionFromEvent(currentEvent);\n if (!previousException || !currentException) {\n return false;\n }\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n var currentFrames = _getFramesFromEvent(currentEvent);\n var previousFrames = _getFramesFromEvent(previousEvent);\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n currentFrames = currentFrames;\n previousFrames = previousFrames;\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n // Otherwise, compare the two\n for (var i = 0; i < previousFrames.length; i++) {\n var frameA = previousFrames[i];\n var frameB = currentFrames[i];\n if (frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function) {\n return false;\n }\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n var currentFingerprint = currentEvent.fingerprint;\n var previousFingerprint = previousEvent.fingerprint;\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n currentFingerprint = currentFingerprint;\n previousFingerprint = previousFingerprint;\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n }\n catch (_oO) {\n return false;\n }\n}\n/** JSDoc */\nfunction _getExceptionFromEvent(event) {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n/** JSDoc */\nfunction _getFramesFromEvent(event) {\n var exception = event.exception;\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n }\n catch (_oO) {\n return undefined;\n }\n }\n else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n}\n//# sourceMappingURL=dedupe.js.map","import { __assign } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\nvar global = getGlobalObject();\n/** UserAgent */\nvar UserAgent = /** @class */ (function () {\n function UserAgent() {\n /**\n * @inheritDoc\n */\n this.name = UserAgent.id;\n }\n /**\n * @inheritDoc\n */\n UserAgent.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event) {\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n // grab as much info as exists and add it to the event\n var url = (event.request && event.request.url) || (global.location && global.location.href);\n var referrer = (global.document || {}).referrer;\n var userAgent = (global.navigator || {}).userAgent;\n var headers = __assign(__assign(__assign({}, (event.request && event.request.headers)), (referrer && { Referer: referrer })), (userAgent && { 'User-Agent': userAgent }));\n var request = __assign(__assign({}, (url && { url: url })), { headers: headers });\n return __assign(__assign({}, event), { request: request });\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n UserAgent.id = 'UserAgent';\n return UserAgent;\n}());\nexport { UserAgent };\n//# sourceMappingURL=useragent.js.map","import { __assign } from \"tslib\";\nimport { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { addInstrumentationHandler, getGlobalObject, isDebugBuild, logger, resolvedSyncPromise } from '@sentry/utils';\nimport { BrowserClient } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\nexport var defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new UserAgent(),\n];\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options) {\n if (options === void 0) { options = {}; }\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n var window_1 = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) {\n options.release = window_1.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n initAndBind(BrowserClient, options);\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options) {\n if (options === void 0) { options = {}; }\n var hub = getCurrentHub();\n var scope = hub.getScope();\n if (scope) {\n options.user = __assign(__assign({}, scope.getUser()), options.user);\n }\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n var client = hub.getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId() {\n return getCurrentHub().lastEventId();\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad() {\n // Noop\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback) {\n callback();\n}\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function flush(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n isDebugBuild() && logger.warn('Cannot flush events. No client defined.');\n return resolvedSyncPromise(false);\n}\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function close(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n isDebugBuild() && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return resolvedSyncPromise(false);\n}\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn) {\n return internalWrap(fn)();\n}\nfunction startSessionOnHub(hub) {\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n}\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking() {\n var window = getGlobalObject();\n var document = window.document;\n if (typeof document === 'undefined') {\n isDebugBuild() && logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n var hub = getCurrentHub();\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) {\n return;\n }\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSessionOnHub(hub);\n // We want to create a session for every navigation as well\n addInstrumentationHandler('history', function (_a) {\n var from = _a.from, to = _a.to;\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) {\n startSessionOnHub(getCurrentHub());\n }\n });\n}\n//# sourceMappingURL=sdk.js.map","import { getCurrentHub } from '@sentry/hub';\nimport { isDebugBuild, logger } from '@sentry/utils';\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass, options) {\n if (options.debug === true) {\n if (isDebugBuild()) {\n logger.enable();\n }\n else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n }\n }\n var hub = getCurrentHub();\n var scope = hub.getScope();\n if (scope) {\n scope.update(options.initialScope);\n }\n var client = new clientClass(options);\n hub.bindClient(client);\n}\n//# sourceMappingURL=sdk.js.map","// TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata\nexport var SDK_NAME = 'sentry.javascript.browser';\n//# sourceMappingURL=version.js.map","import { __assign } from \"tslib\";\nexport * from './exports';\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\nvar windowIntegrations = {};\n// This block is needed to add compatibility with the integrations packages when used with a CDN\nvar _window = getGlobalObject();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\nvar INTEGRATIONS = __assign(__assign(__assign({}, windowIntegrations), CoreIntegrations), BrowserIntegrations);\nexport { INTEGRATIONS as Integrations, Transports };\n//# sourceMappingURL=index.js.map","/**\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n */\nvar __SENTRY_DEBUG__ = true;\n/**\n * Figures out if we're building with debug functionality.\n *\n * @returns true if this is a debug build\n */\nexport function isDebugBuild() {\n return __SENTRY_DEBUG__;\n}\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n//# sourceMappingURL=env.js.map","/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\nimport { isNodeEnv } from './node';\nvar fallbackGlobalObject = {};\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject() {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined' // eslint-disable-line no-restricted-globals\n ? window // eslint-disable-line no-restricted-globals\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}\n//# sourceMappingURL=global.js.map","/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\nimport { isBrowserBundle } from './env';\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (!isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]');\n}\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nexport function dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\nexport function loadModule(moduleName) {\n var mod;\n try {\n mod = dynamicRequire(module, moduleName);\n }\n catch (e) {\n // no-empty\n }\n try {\n var cwd = dynamicRequire(module, 'process').cwd;\n mod = dynamicRequire(module, cwd() + \"/node_modules/\" + moduleName);\n }\n catch (e) {\n // no-empty\n }\n return mod;\n}\n//# sourceMappingURL=node.js.map","import { getGlobalObject } from './global';\nimport { dynamicRequire, isNodeEnv } from './node';\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\nvar dateTimestampSource = {\n nowSeconds: function () { return Date.now() / 1000; },\n};\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction getBrowserPerformance() {\n var performance = getGlobalObject().performance;\n if (!performance || !performance.now) {\n return undefined;\n }\n // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n var timeOrigin = Date.now() - performance.now();\n return {\n now: function () { return performance.now(); },\n timeOrigin: timeOrigin,\n };\n}\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\nfunction getNodePerformance() {\n try {\n var perfHooks = dynamicRequire(module, 'perf_hooks');\n return perfHooks.performance;\n }\n catch (_) {\n return undefined;\n }\n}\n/**\n * The Performance API implementation for the current platform, if available.\n */\nvar platformPerformance = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\nvar timestampSource = platformPerformance === undefined\n ? dateTimestampSource\n : {\n nowSeconds: function () { return (platformPerformance.timeOrigin + platformPerformance.now()) / 1000; },\n };\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nexport var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nexport var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);\n// Re-exported with an old name for backwards-compatibility.\nexport var timestampWithMs = timestampInSeconds;\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\nexport var usingPerformanceAPI = platformPerformance !== undefined;\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nexport var _browserPerformanceTimeOriginMode;\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nexport var browserPerformanceTimeOrigin = (function () {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n var performance = getGlobalObject().performance;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n var threshold = 3600 * 1000;\n var performanceNow = performance.now();\n var dateNow = Date.now();\n // if timeOrigin isn't available set delta to threshold so it isn't used\n var timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n var timeOriginIsReliable = timeOriginDelta < threshold;\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n var navigationStart = performance.timing && performance.timing.navigationStart;\n var hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n var navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n var navigationStartIsReliable = navigationStartDelta < threshold;\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n }\n else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n//# sourceMappingURL=time.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = (module) => {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: () => {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import * as Sentry from \"@sentry/browser\";\n\nSentry.init({\n dsn: \"http://c30a07050f594ecc9bd3cb97604f9da1@172.17.0.1:8000/1\",\n \"release\": \"test\"\n});\n\nlet foo = \"bar\";\nthrow Error(\"The error\");\nconsole.log(foo);\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","Severity","__assign","assign","t","s","i","n","arguments","length","call","apply","__values","o","Symbol","iterator","m","next","value","done","TypeError","r","e","ar","push","error","concat","objectToString","toString","isError","wat","isInstanceOf","Error","isBuiltin","ty","isErrorEvent","isDOMError","isString","isPlainObject","isEvent","Event","isElement","Element","isThenable","Boolean","then","base","_e","resolvedSyncPromise","SyncPromise","resolve","rejectedSyncPromise","reason","_","reject","executor","_this","_state","_handlers","_resolve","_setResult","_reject","state","_value","_executeHandlers","cachedHandlers","slice","forEach","handler","onfulfilled","onrejected","result","catch","val","finally","onfinally","isRejected","Scope","_notifyingListeners","_scopeListeners","_eventProcessors","_breadcrumbs","_user","_tags","_extra","_contexts","_sdkProcessingMetadata","clone","scope","newScope","_level","_span","_session","_transactionName","_fingerprint","_requestSession","addScopeListener","callback","addEventProcessor","setUser","user","update","_notifyScopeListeners","getUser","getRequestSession","setRequestSession","requestSession","setTags","tags","setTag","key","_a","setExtras","extras","setExtra","extra","setFingerprint","fingerprint","setLevel","level","setTransactionName","name","setTransaction","setContext","context","setSpan","span","getSpan","getTransaction","transaction","setSession","session","getSession","captureContext","updatedScope","keys","contexts","clear","undefined","addBreadcrumb","breadcrumb","maxBreadcrumbs","maxCrumbs","Math","min","mergedBreadcrumb","timestamp","clearBreadcrumbs","applyToEvent","event","hint","trace","getTraceContext","transactionName","_applyFingerprint","breadcrumbs","sdkProcessingMetadata","_notifyEventProcessors","getGlobalEventProcessors","setSDKProcessingMetadata","newData","processors","index","processor","final","isArray","global","__SENTRY__","globalEventProcessors","addGlobalEventProcessor","htmlTreeAsString","elem","keyAttrs","currentElem","out","height","len","sepLength","nextStr","_htmlElementAsString","parentNode","reverse","join","_oO","el","className","classes","attr","tagName","toLowerCase","keyAttrPairs","filter","keyAttr","getAttribute","map","keyAttrPair","id","split","allowedAttrs","truncate","str","max","substr","safeJoin","input","delimiter","output","String","isMatchingPattern","pattern","test","indexOf","fill","source","replacementFactory","original","wrapped","markFunctionWrapped","_Oo","addNonEnumerableProperty","obj","defineProperty","writable","configurable","proto","getOriginalFunction","func","__sentry_original__","getWalkSource","err","message","stack","event_1","type","target","currentTarget","CustomEvent","detail","extractExceptionKeysForMessage","exception","maxLength","sort","includedKeys","serialized","dropUndefinedKeys","e_1","rv","_b","_c","e_1_1","return","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","replace","c","random","parseUrl","url","match","query","fragment","host","path","protocol","relative","getFirstException","values","getEventDescription","eventId","event_id","firstException","addExceptionTypeValue","addExceptionMechanism","newMechanism","currentMechanism","mechanism","handled","mergedData","data","checkOrSetAlreadyCaught","__sentry_captured__","PREFIX","CONSOLE_LEVELS","consoleSandbox","originalConsole","console","wrappedLevels","Logger","_enabled","disable","enable","log","args","_i","warn","sentryGlobal","logger","Session","errors","sid","duration","status","init","ignoreDuration","startingTime","time","started","ipAddress","ip_address","did","email","username","release","environment","userAgent","close","toJSON","Date","toISOString","attrs","user_agent","Hub","client","_version","_stack","getStackTop","bindClient","isOlderThan","version","setupIntegrations","pushScope","getScope","getStack","getClient","popScope","pop","withScope","captureException","_lastEventId","finalHint","syntheticException","originalException","_invokeClient","captureMessage","captureEvent","lastEventId","getOptions","beforeBreadcrumb","_d","finalBreadcrumb","configureScope","run","oldHub","makeMain","getIntegration","integration","startSpan","_callExtensionMethod","startTransaction","customSamplingContext","traceHeaders","captureSession","endSession","_sendSessionUpdate","layer","startSession","navigator","currentSession","method","carrier","getMainCarrier","sentry","extensions","hub","registry","getHubFromCarrier","setHubOnCarrier","getCurrentHub","hasHubOnCarrier","activeDomain","domain","active","registryHubTopStack","getHubFromActiveDomain","callOnHub","SDK_VERSION","prop","SentryError","_super","_newTarget","DSN_REGEX","dsnToString","dsn","withPassword","pass","port","projectId","publicKey","dsnFromComponents","components","makeDsn","from","exec","projectMatch","dsnFromString","component","isValidProtocol","isNaN","parseInt","validateDsn","stripSentryFramesAndReverse","localStack","firstFrameFunction","function","lastFrameFunction","frame","filename","defaultFunctionName","getFunctionName","fn","normalize","depth","maxProperties","walk","normalizeToSize","object","maxSize","encodeURI","utf8Length","JSON","stringify","memo","hasWeakSet","inner","WeakSet","has","add","delete","splice","memoize","unmemoize","serializable","makeSerializable","serializeValue","acc","propertyCount","innerKey","innerValue","_events","g","window","document","installedIntegrations","filterDuplicates","integrations","reduce","every","accIntegration","ALREADY_SEEN_ERROR","BaseClient","backendClass","options","_integrations","_numProcessing","_backend","_options","_dsn","_process","_getBackend","eventFromException","_captureEvent","promisedEvent","eventFromMessage","_isEnabled","_sendSession","getDsn","getTransport","flush","timeout","_isClientDoneProcessing","clientFinished","transportFlushed","enabled","initialized","defaultIntegrations","userIntegrations","userIntegration","integrationsNames","alwaysLastToRun","getIntegrationsToSetup","setupOnce","setupIntegration","_updateSessionFromEvent","crashed","errored","exceptions","exceptions_1","exceptions_1_1","sessionNonTerminal","Number","sendSession","ticked","interval","setInterval","clearInterval","_prepareEvent","normalizeDepth","normalizeMaxBreadth","prepared","_applyClientOptions","_applyIntegrationsMetadata","finalScope","evt","_normalizeEvent","maxBreadth","normalized","baseClientNormalized","dist","maxValueLength","request","integrationsArray","sdk","_sendEvent","sendEvent","_processEvent","finalEvent","beforeSend","sampleRate","transport","recordLostEvent","outcome","category","isTransaction","__sentry__","nullErr","_ensureBeforeSendRv","processedEvent","promise","initAPIDetails","metadata","tunnel","initDsn","getBaseApiEndpoint","_getIngestEndpoint","_encodedAuth","sentry_key","sentry_version","encodeURIComponent","getStoreEndpoint","getStoreEndpointWithUrlEncodedAuth","getEnvelopeEndpointWithUrlEncodedAuth","_getEnvelopeEndpoint","createEnvelope","headers","items","serializeEnvelope","envelope","serializedHeaders","item","itemHeaders","payload","serializedPayload","getSdkMetadataForEnvelopeHeader","api","createSessionEnvelope","sdkInfo","sent_at","API","_dsnObject","_tunnel","forceEnvelope","NoopTransport","BaseBackend","_transport","_setupTransport","_exception","_hint","_message","_newTransport","_experiments","newTransport","env","eventType","transactionSampling","samplingMethod","rate","sample_rates","createEventEnvelope","_metadata","send","supportsFetch","Headers","Request","Response","isNativeFetch","supportsReferrerPolicy","referrerPolicy","UNKNOWN_FUNCTION","createFrame","lineno","colno","in_app","chromeRegex","chromeEvalRegex","chromeStackParser","line","parts","subMatch","extractSafariExtensionDetails","geckoREgex","geckoEvalRegex","geckoStackParser","winjsRegex","winjsStackParser","opera10Regex","opera10StackParser","opera11Regex","opera11StackParser","isSafariExtension","isSafariWebExtension","exceptionFromError","ex","frames","parseStackFrames","extractMessage","stacktrace","eventFromError","popSize","framesToPop","reactMinifiedRegexp","getPopSize","parsers","sortedParsers","a","skipFirst","e_2","sortedParsers_1","sortedParsers_1_1","parser","e_2_1","createStackParser","attachStacktrace","eventFromUnknownInput","Info","eventFromString","isUnhandledRejection","domException","name_1","code","__serialized__","frames_1","eventFromPlainObject","synthetic","frames_2","disabledUntil","limits","all","cachedFetchImpl","getNativeFetchImplementation","fetch","bind","fetchImpl","createElement","sandbox","hidden","head","appendChild","contentWindow","removeChild","requestTypeToCategory","BaseTransport","_buffer","limit","buffer","remove","task","$","taskProducer","drain","counter","capturedSetTimeout","setTimeout","clearTimeout","makePromiseBuffer","_rateLimits","_outcomes","_api","sendClientReports","addEventListener","visibilityState","_flushOutcomes","_sendRequest","body","useEnvelope","packages","enhanceEventWithSdkInfo","skippedNormalization","JSONStringifyError","newErr","innerErr","req","eventToSentryRequest","sessionToSentryRequest","outcomes","discarded_events","quantity","sendBeacon","fetch_1","credentials","keepalive","sendReport","_handleResponse","requestType","response","now","updatedRateLimits","rateLimitHeader","retryAfterHeader","trim","parameters","headerDelay","delay","_f","header","headerDate","parse","parseRetryAfterHeader","updateRateLimits","_isRateLimited","_disabledUntil","isRateLimited","FetchTransport","_fetch","sentryRequest","originalPayload","Promise","fetchParameters","get","XHRTransport","XMLHttpRequest","onreadystatechange","readyState","getResponseHeader","open","setRequestHeader","BrowserBackend","transportOptions","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","wrap","before","wrapper","__sentry_wrapped__","sentryWrapped","wrappedArguments","arg","property","getOwnPropertyDescriptor","injectReportDialog","script","async","src","dsnLike","dialogOptions","endpoint","encodedOptions","getReportDialogEndpoint","onLoad","onload","injectionPoint","lastHref","debounceTimerID","lastCapturedEvent","handlers","instrumented","addInstrumentationHandler","originalConsoleMethod","triggerHandlers","triggerDOMHandler","globalDOMEventHandler","makeDOMEventHandler","originalAddEventListener","listener","handlers_1","__sentry_instrumentation_handlers__","handlerForType","refCount","originalRemoveEventListener","handlers_2","instrumentDOM","xhrproto","originalOpen","xhr","xhrInfo","__sentry_xhr__","toUpperCase","__sentry_own_request__","onreadystatechangeHandler","status_code","endTimestamp","startTimestamp","readyStateArgs","originalSend","instrumentXHR","doc","supportsNativeFetch","originalFetch","handlerData","fetchData","getFetchMethod","getFetchUrl","chrome","isChromePackagedApp","app","runtime","hasHistoryApi","history","pushState","replaceState","supportsHistory","oldOnPopState","onpopstate","to","location","href","historyReplacementFunction","originalHistoryFunction","instrumentHistory","_oldOnErrorHandler","onerror","msg","column","_oldOnUnhandledRejectionHandler","onunhandledrejection","instrument","fetchArgs","globalListener","isContentEditable","shouldSkipDOMEvent","previous","current","shouldShortcircuitPreviousDebounce","Breadcrumbs","dom","addSentryBreadcrumb","_consoleBreadcrumb","serializeAttribute","_xhrBreadcrumb","_fetchBreadcrumb","_historyBreadcrumb","Warning","isSupportedSeverity","Log","parsedLoc","parsedFrom","parsedTo","originalFunctionToString","BrowserClient","showReportDialog","platform","DEFAULT_IGNORE_ERRORS","InboundFilters","self_1","clientOptions","internalOptions","allowUrls","whitelistUrls","denyUrls","blacklistUrls","ignoreErrors","ignoreInternal","_mergeOptions","_isSentryError","oO","_getPossibleEventMessages","some","_isIgnoredError","_getEventFilterUrl","_isDeniedUrl","_isAllowedUrl","_shouldDropEvent","_getLastValidUrl","FunctionToString","Function","DEFAULT_EVENT_TARGET","TryCatch","eventTarget","requestAnimationFrame","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","_wrapEventTarget","originalCallback","xmlHttpRequestProps","wrapOptions","originalFunction","eventName","handleEvent","wrappedEventHandler","originalEventHandler","GlobalHandlers","_installFunc","_installGlobalOnErrorHandler","_installGlobalOnUnhandledRejectionHandler","stackTraceLimit","installFunc","getHubAndAttachStacktrace","groups","_enhanceEventWithInitialFrame","_eventFromIncompleteOnError","addMechanismAndCapture","ev","ev0","ev0s","ev0sf","getLocationHref","LinkedErrors","_key","_limit","self","linkedErrors","_walkErrorTree","_handler","Dedupe","currentEvent","previousEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","_isSameMessageEvent","previousException","_getExceptionFromEvent","currentException","_isSameExceptionEvent","_previousEvent","currentFrames","_getFramesFromEvent","previousFrames","frameA","frameB","currentFingerprint","previousFingerprint","UserAgent","referrer","Referer","window_1","SENTRY_RELEASE","autoSessionTracking","clientClass","debug","initialScope","initAndBind","startSessionOnHub","startSessionTracking","forceLoad","SDK_NAME","windowIntegrations","_window","Sentry","Integrations","INTEGRATIONS","isDebugBuild","isBrowserBundle","__SENTRY_BROWSER_BUNDLE__","fallbackGlobalObject","getGlobalObject","isNodeEnv","process","dynamicRequire","mod","require","dateTimestampSource","nowSeconds","platformPerformance","module","performance","getNodePerformance","timeOrigin","getBrowserPerformance","timestampSource","dateTimestampInSeconds","timestampInSeconds","threshold","performanceNow","dateNow","timeOriginDelta","abs","timeOriginIsReliable","navigationStart","timing","navigationStartDelta","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","definition","enumerable","globalThis","hmd","children","set","toStringTag"],"sourceRoot":""}
|