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id,OAAOD,gBAC3DE,EAAgD,kBAApBF,EAE5BG,EAAuBD,EAAqBtvC,KAAK6zB,IAAIub,EAAkBJ,EAAiBC,GAAWF,EACnGS,EAA4BD,EAAuBR,EACvD,OAAII,GAAwBK,EAEpBN,GAAmBK,GACiB,aAC7Bnd,EAAYQ,aAGiB,kBAC7Bwc,IAIqB,UAC7BH,EAjCP,CAFwC,MAoC3C,CA1CyC,E,wBCtG1C,IAAIQ,EAA6B,qBAAX77B,OAAyBA,OAA2B,qBAAX,EAAAyrB,EAAyB,EAAAA,EAAyB,qBAATvyB,KAAuBA,KAAO,CAAC,EAAI2iC,EAAQt8B,eAAe,CAACxY,GAAG,4CAChK80C,EAAQC,gBAAgBD,EAAQC,iBAAmB,CAAC,EACpDD,EAAQC,gBAAgB,oBAAoB,CAAC/0C,GAAG,2C","sources":["webpack://bungalow-website/./node_modules/@sentry/core/esm/integration.js","webpack://bungalow-website/./node_modules/@sentry/core/esm/baseclient.js","webpack://bungalow-website/./node_modules/@sentry/core/esm/transports/noop.js","webpack://bungalow-website/./node_modules/@sentry/core/esm/basebackend.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/backend.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/client.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/stack-parsers.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/eventbuilder.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/flags.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/helpers.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/version.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/index.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/enums.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/severity.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/integrations/dedupe.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/integrations/globalhandlers.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/integrations/linkederrors.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/integrations/trycatch.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/integrations/useragent.js","webpack://bungalow-website/./node_modules/@sentry/core/esm/sdk.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/sdk.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/clientreport.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/transports/base.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/transports/fetch.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/transports/new-fetch.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/transports/new-xhr.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/async.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/transports/utils.js","webpack://bungalow-website/./node_modules/@sentry/browser/esm/transports/xhr.js","webpack://bungalow-website/./node_modules/@sentry/core/esm/api.js","webpack://bungalow-website/./node_modules/@sentry/core/esm/flags.js","webpack://bungalow-website/./node_modules/@sentry/core/esm/integrations/functiontostring.js","webpack://bungalow-website/./node_modules/@sentry/core/esm/integrations/inboundfilters.js","webpack://bungalow-website/./node_modules/@sentry/core/esm/request.js","webpack://bungalow-website/./node_modules/@sentry/core/esm/transports/base.js","webpack://bungalow-website/./node_modules/@sentry/core/esm/version.js","webpack://bungalow-website/./node_modules/@sentry/hub/esm/flags.js","webpack://bungalow-website/./node_modules/@sentry/hub/esm/hub.js","webpack://bungalow-website/./node_modules/@sentry/hub/esm/scope.js","webpack://bungalow-website/./node_modules/@sentry/hub/esm/session.js","webpack://bungalow-website/./node_modules/@sentry/integrations/esm/extraerrordata.js","webpack://bungalow-website/./node_modules/@sentry/integrations/esm/flags.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/path.js","webpack://bungalow-website/./node_modules/@sentry/integrations/esm/vue.js","webpack://bungalow-website/./node_modules/@sentry/minimal/esm/index.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/constants.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/flags.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/errors.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/hubextensions.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/idletransaction.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/tracing.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/backgroundtab.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/bindReporter.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/generateUniqueID.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/initMetric.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/observe.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/onHidden.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/web-vitals/getCLS.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/getVisibilityWatcher.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/web-vitals/getFID.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/web-vitals/getLCP.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/metrics.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/request.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/router.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/browser/browsertracing.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/index.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/span.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/transaction.js","webpack://bungalow-website/./node_modules/@sentry/tracing/esm/utils.js","webpack://bungalow-website/./node_modules/@sentry/types/esm/severity.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/browser.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/dsn.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/envelope.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/polyfill.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/error.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/flags.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/global.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/instrument.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/is.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/logger.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/misc.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/env.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/node.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/memo.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/normalize.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/object.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/promisebuffer.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/ratelimit.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/stacktrace.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/status.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/string.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/supports.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/syncpromise.js","webpack://bungalow-website/./node_modules/@sentry/utils/esm/time.js","webpack://bungalow-website/./node_modules/@sentry/webpack-plugin/src/sentry-webpack.module.js"],"sourcesContent":["import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { addNonEnumerableProperty, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\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 IS_DEBUG_BUILD && 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, isPlainObject, isPrimitive, isThenable, logger, makeDsn, normalize, rejectedSyncPromise, resolvedSyncPromise, SentryError, SyncPromise, truncate, uuid4, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\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 IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && logger.warn('SDK not enabled, will not capture session.');\n return;\n }\n if (!(typeof session.release === 'string')) {\n IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && 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) + \" (\" + typeof 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 normalized.sdkProcessingMetadata = __assign(__assign({}, normalized.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 IS_DEBUG_BUILD && 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 { 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 { logger, SentryError } from '@sentry/utils';\nimport { initAPIDetails } from './api';\nimport { IS_DEBUG_BUILD } from './flags';\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 IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && logger.error('Error while sending event:', reason);\n });\n }\n else {\n void this._transport.sendEvent(event).then(null, function (reason) {\n IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && logger.error('Error while sending session:', reason);\n });\n }\n else {\n void this._transport.sendSession(session).then(null, function (reason) {\n IS_DEBUG_BUILD && 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 { __assign, __extends } from \"tslib\";\nimport { BaseBackend, getEnvelopeEndpointWithUrlEncodedAuth, initAPIDetails } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, makeNewFetchTransport, makeNewXHRTransport, 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 var api = initAPIDetails(transportOptions.dsn, transportOptions._metadata, transportOptions.tunnel);\n var url = getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel);\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n var requestOptions = __assign({}, transportOptions.fetchParameters);\n this._newTransport = makeNewFetchTransport({ requestOptions: requestOptions, url: url });\n return new FetchTransport(transportOptions);\n }\n this._newTransport = makeNewXHRTransport({\n url: url,\n headers: transportOptions.headers,\n });\n return new XHRTransport(transportOptions);\n };\n return BrowserBackend;\n}(BaseBackend));\nexport { BrowserBackend };\n//# sourceMappingURL=backend.js.map","import { __assign, __extends } from \"tslib\";\nimport { BaseClient, SDK_VERSION } from '@sentry/core';\nimport { getGlobalObject, logger } from '@sentry/utils';\nimport { BrowserBackend } from './backend';\nimport { IS_DEBUG_BUILD } from './flags';\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 IS_DEBUG_BUILD && 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 { __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","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","import { __assign } from \"tslib\";\nimport { captureException, getReportDialogEndpoint, withScope } from '@sentry/core';\nimport { addExceptionMechanism, addExceptionTypeValue, addNonEnumerableProperty, getGlobalObject, getOriginalFunction, logger, markFunctionWrapped, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\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 IS_DEBUG_BUILD && logger.error('Missing eventId option in showReportDialog call');\n return;\n }\n if (!options.dsn) {\n IS_DEBUG_BUILD && 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","// 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","export var SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];\n//# sourceMappingURL=enums.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 } 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 { logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\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 IS_DEBUG_BUILD && 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, __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, isErrorEvent, isPrimitive, isString, logger, } from '@sentry/utils';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { IS_DEBUG_BUILD } from '../flags';\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 IS_DEBUG_BUILD && 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 { __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 } 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 { getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\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 (IS_DEBUG_BUILD) {\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","import { __assign } from \"tslib\";\nimport { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { addInstrumentationHandler, getGlobalObject, logger, resolvedSyncPromise } from '@sentry/utils';\nimport { BrowserClient } from './client';\nimport { IS_DEBUG_BUILD } from './flags';\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 IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && 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 { 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","import { __read } from \"tslib\";\nimport { eventToSentryRequest, getEnvelopeEndpointWithUrlEncodedAuth, getStoreEndpointWithUrlEncodedAuth, initAPIDetails, sessionToSentryRequest, } from '@sentry/core';\nimport { createClientReportEnvelope, disabledUntil, dsnToString, eventStatusFromHttpCode, getGlobalObject, isRateLimited, logger, makePromiseBuffer, serializeEnvelope, updateRateLimits, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\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 IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && logger.log('No outcomes to flush');\n return;\n }\n IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && 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)) {\n IS_DEBUG_BUILD &&\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 { __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 { __assign } from \"tslib\";\nimport { createTransport, } from '@sentry/core';\nimport { getNativeFetchImplementation } from './utils';\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nexport function makeNewFetchTransport(options, nativeFetch) {\n if (nativeFetch === void 0) { nativeFetch = getNativeFetchImplementation(); }\n function makeRequest(request) {\n var requestOptions = __assign({ body: request.body, method: 'POST', referrerPolicy: 'origin' }, options.requestOptions);\n return nativeFetch(options.url, requestOptions).then(function (response) {\n return response.text().then(function (body) { return ({\n body: body,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n reason: response.statusText,\n statusCode: response.status,\n }); });\n });\n }\n return createTransport({ bufferSize: options.bufferSize }, makeRequest);\n}\n//# sourceMappingURL=new-fetch.js.map","import { createTransport, } from '@sentry/core';\nimport { SyncPromise } from '@sentry/utils';\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */\nvar XHR_READYSTATE_DONE = 4;\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\nexport function makeNewXHRTransport(options) {\n function makeRequest(request) {\n return new SyncPromise(function (resolve, _reject) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n var response = {\n body: xhr.response,\n headers: {\n 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': xhr.getResponseHeader('Retry-After'),\n },\n reason: xhr.statusText,\n statusCode: xhr.status,\n };\n resolve(response);\n }\n };\n xhr.open('POST', options.url);\n for (var header in options.headers) {\n if (Object.prototype.hasOwnProperty.call(options.headers, header)) {\n xhr.setRequestHeader(header, options.headers[header]);\n }\n }\n xhr.send(request.body);\n });\n }\n return createTransport({ bufferSize: options.bufferSize }, makeRequest);\n}\n//# sourceMappingURL=new-xhr.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","import { forget, getGlobalObject, isNativeFetch, logger, supportsFetch } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\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 IS_DEBUG_BUILD &&\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 { __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 { 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","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.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, isMatchingPattern, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\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 IS_DEBUG_BUILD &&\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 IS_DEBUG_BUILD &&\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 IS_DEBUG_BUILD &&\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 IS_DEBUG_BUILD &&\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 IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && logger.error(\"Cannot extract url for event \" + getEventDescription(event));\n return null;\n }\n}\n//# sourceMappingURL=inboundfilters.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 // 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 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 { disabledUntil, eventStatusFromHttpCode, getEnvelopeType, isRateLimited, makePromiseBuffer, rejectedSyncPromise, resolvedSyncPromise, serializeEnvelope, updateRateLimits, } from '@sentry/utils';\nexport var ERROR_TRANSPORT_CATEGORY = 'error';\nexport var TRANSACTION_TRANSPORT_CATEGORY = 'transaction';\nexport var ATTACHMENT_TRANSPORT_CATEGORY = 'attachment';\nexport var SESSION_TRANSPORT_CATEGORY = 'session';\nexport var DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n/**\n * Creates a `NewTransport`\n *\n * @param options\n * @param makeRequest\n */\nexport function createTransport(options, makeRequest, buffer) {\n if (buffer === void 0) { buffer = makePromiseBuffer(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE); }\n var rateLimits = {};\n var flush = function (timeout) { return buffer.drain(timeout); };\n function send(envelope) {\n var envCategory = getEnvelopeType(envelope);\n var category = envCategory === 'event' ? 'error' : envCategory;\n var request = {\n category: category,\n body: serializeEnvelope(envelope),\n };\n // Don't add to buffer if transport is already rate-limited\n if (isRateLimited(rateLimits, category)) {\n return rejectedSyncPromise({\n status: 'rate_limit',\n reason: getRateLimitReason(rateLimits, category),\n });\n }\n var requestTask = function () {\n return makeRequest(request).then(function (_a) {\n var body = _a.body, headers = _a.headers, reason = _a.reason, statusCode = _a.statusCode;\n var status = eventStatusFromHttpCode(statusCode);\n if (headers) {\n rateLimits = updateRateLimits(rateLimits, headers);\n }\n if (status === 'success') {\n return resolvedSyncPromise({ status: status, reason: reason });\n }\n return rejectedSyncPromise({\n status: status,\n reason: reason ||\n body ||\n (status === 'rate_limit' ? getRateLimitReason(rateLimits, category) : 'Unknown transport error'),\n });\n });\n };\n return buffer.add(requestTask);\n }\n return {\n send: send,\n flush: flush,\n };\n}\nfunction getRateLimitReason(rateLimits, category) {\n return \"Too many \" + category + \" requests, backing off until: \" + new Date(disabledUntil(rateLimits, category)).toISOString();\n}\n//# sourceMappingURL=base.js.map","export var SDK_VERSION = '6.19.7';\n//# sourceMappingURL=version.js.map","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalObject, getGlobalSingleton, isNodeEnv, logger, uuid4, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\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 IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD && 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 return getGlobalSingleton('hub', function () { return new Hub(); }, carrier);\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 var __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n//# sourceMappingURL=hub.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { dateTimestampInSeconds, getGlobalSingleton, 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 return getGlobalSingleton('globalEventProcessors', function () { return []; });\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 { 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, __values } from \"tslib\";\nimport { isError, isPlainObject, logger, normalize } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\n/** Patch toString calls to return proper name for wrapped functions */\nvar ExtraErrorData = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function ExtraErrorData(options) {\n /**\n * @inheritDoc\n */\n this.name = ExtraErrorData.id;\n this._options = __assign({ depth: 3 }, options);\n }\n /**\n * @inheritDoc\n */\n ExtraErrorData.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(function (event, hint) {\n var self = getCurrentHub().getIntegration(ExtraErrorData);\n if (!self) {\n return event;\n }\n return self.enhanceEventWithErrorData(event, hint);\n });\n };\n /**\n * Attaches extracted information from the Error object to extra field in the Event\n */\n ExtraErrorData.prototype.enhanceEventWithErrorData = function (event, hint) {\n var _a;\n if (!hint || !hint.originalException || !isError(hint.originalException)) {\n return event;\n }\n var name = hint.originalException.name || hint.originalException.constructor.name;\n var errorData = this._extractErrorData(hint.originalException);\n if (errorData) {\n var contexts = __assign({}, event.contexts);\n var normalizedErrorData = normalize(errorData, this._options.depth);\n if (isPlainObject(normalizedErrorData)) {\n contexts = __assign(__assign({}, event.contexts), (_a = {}, _a[name] = __assign({}, normalizedErrorData), _a));\n }\n return __assign(__assign({}, event), { contexts: contexts });\n }\n return event;\n };\n /**\n * Extract extra information from the Error object\n */\n ExtraErrorData.prototype._extractErrorData = function (error) {\n var e_1, _a, e_2, _b;\n // We are trying to enhance already existing event, so no harm done if it won't succeed\n try {\n var nativeKeys = [\n 'name',\n 'message',\n 'stack',\n 'line',\n 'column',\n 'fileName',\n 'lineNumber',\n 'columnNumber',\n 'toJSON',\n ];\n var extraErrorInfo = {};\n try {\n // We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway.\n for (var _c = __values(Object.keys(error)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var key = _d.value;\n if (nativeKeys.indexOf(key) !== -1) {\n continue;\n }\n var value = error[key];\n extraErrorInfo[key] = isError(value) ? value.toString() : value;\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 // Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)\n if (typeof error.toJSON === 'function') {\n var serializedError = error.toJSON();\n try {\n for (var _e = __values(Object.keys(serializedError)), _f = _e.next(); !_f.done; _f = _e.next()) {\n var key = _f.value;\n var value = serializedError[key];\n extraErrorInfo[key] = isError(value) ? value.toString() : value;\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 return extraErrorInfo;\n }\n catch (oO) {\n IS_DEBUG_BUILD && logger.error('Unable to extract extra data from the Error object:', oO);\n }\n return null;\n };\n /**\n * @inheritDoc\n */\n ExtraErrorData.id = 'ExtraErrorData';\n return ExtraErrorData;\n}());\nexport { ExtraErrorData };\n//# sourceMappingURL=extraerrordata.js.map","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n/** JSDoc */\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n }\n else if (last === '..') {\n parts.splice(i, 1);\n // eslint-disable-next-line no-plusplus\n up++;\n }\n else if (up) {\n parts.splice(i, 1);\n // eslint-disable-next-line no-plusplus\n up--;\n }\n }\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n // eslint-disable-next-line no-plusplus\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n return parts;\n}\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^/]+?|)(\\.[^./]*|))(?:[/]*)$/;\n/** JSDoc */\nfunction splitPath(filename) {\n var parts = splitPathRe.exec(filename);\n return parts ? parts.slice(1) : [];\n}\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resolvedPath = '';\n var resolvedAbsolute = false;\n for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = i >= 0 ? args[i] : '/';\n // Skip empty entries\n if (!path) {\n continue;\n }\n resolvedPath = path + \"/\" + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n // Normalize the path\n resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/');\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n/** JSDoc */\nfunction trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from, to) {\n /* eslint-disable no-param-reassign */\n from = resolve(from).substr(1);\n to = resolve(to).substr(1);\n /* eslint-enable no-param-reassign */\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n return outputParts.join('/');\n}\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path) {\n var isPathAbsolute = isAbsolute(path);\n var trailingSlash = path.substr(-1) === '/';\n // Normalize the path\n var normalizedPath = normalizeArray(path.split('/').filter(function (p) { return !!p; }), !isPathAbsolute).join('/');\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n// posix version\n/** JSDoc */\nexport function isAbsolute(path) {\n return path.charAt(0) === '/';\n}\n// posix version\n/** JSDoc */\nexport function join() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return normalizePath(args.join('/'));\n}\n/** JSDoc */\nexport function dirname(path) {\n var result = splitPath(path);\n var root = result[0];\n var dir = result[1];\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n return root + dir;\n}\n/** JSDoc */\nexport function basename(path, ext) {\n var f = splitPath(path)[2];\n if (ext && f.substr(ext.length * -1) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n}\n//# sourceMappingURL=path.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { basename, getGlobalObject, logger, timestampWithMs } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\n/**\n * Used to extract Tracing integration from the current client,\n * without the need to import `Tracing` itself from the @sentry/apm package.\n * @deprecated as @sentry/tracing should be used over @sentry/apm.\n */\nvar TRACING_GETTER = {\n id: 'Tracing',\n};\n/**\n * Used to extract BrowserTracing integration from @sentry/tracing\n */\nvar BROWSER_TRACING_GETTER = {\n id: 'BrowserTracing',\n};\nvar VUE_OP = 'ui.vue';\n// Mappings from operation to corresponding lifecycle hook.\nvar HOOKS = {\n activate: ['activated', 'deactivated'],\n create: ['beforeCreate', 'created'],\n destroy: ['beforeDestroy', 'destroyed'],\n mount: ['beforeMount', 'mounted'],\n update: ['beforeUpdate', 'updated'],\n};\nvar COMPONENT_NAME_REGEXP = /(?:^|[-_/])(\\w)/g;\nvar ROOT_COMPONENT_NAME = 'root';\nvar ANONYMOUS_COMPONENT_NAME = 'anonymous component';\n/** JSDoc */\nvar Vue = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function Vue(options) {\n var _this = this;\n /**\n * @inheritDoc\n */\n this.name = Vue.id;\n /**\n * Cache holding already processed component names\n */\n this._componentsCache = {};\n /** Keep it as attribute function, to keep correct `this` binding inside the hooks callbacks */\n // eslint-disable-next-line @typescript-eslint/typedef\n this._applyTracingHooks = function (vm, getCurrentHub) {\n // Don't attach twice, just in case\n if (vm.$options.$_sentryPerfHook) {\n return;\n }\n vm.$options.$_sentryPerfHook = true;\n var name = _this._getComponentName(vm);\n var rootMount = name === ROOT_COMPONENT_NAME;\n var spans = {};\n // Render hook starts after once event is emitted,\n // but it ends before the second event of the same type.\n //\n // Because of this, we start measuring inside the first event,\n // but finish it before it triggers, to skip the event emitter timing itself.\n var rootHandler = function (hook) {\n var now = timestampWithMs();\n // On the first handler call (before), it'll be undefined, as `$once` will add it in the future.\n // However, on the second call (after), it'll be already in place.\n if (_this._rootSpan) {\n _this._finishRootSpan(now, getCurrentHub);\n }\n else {\n vm.$once(\"hook:\" + hook, function () {\n // Create an activity on the first event call. There'll be no second call, as rootSpan will be in place,\n // thus new event handler won't be attached.\n // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.\n // We also need to ask for the `.constructor`, as `pushActivity` and `popActivity` are static, not instance methods.\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line deprecation/deprecation\n var tracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n if (tracingIntegration) {\n _this._tracingActivity = tracingIntegration.constructor.pushActivity('Vue Application Render');\n var transaction = tracingIntegration.constructor.getTransaction();\n if (transaction) {\n _this._rootSpan = transaction.startChild({\n description: 'Application Render',\n op: VUE_OP,\n });\n }\n // Use functionality from @sentry/tracing\n }\n else {\n var activeTransaction = getActiveTransaction(getCurrentHub());\n if (activeTransaction) {\n _this._rootSpan = activeTransaction.startChild({\n description: 'Application Render',\n op: VUE_OP,\n });\n }\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n });\n }\n };\n var childHandler = function (hook, operation) {\n // Skip components that we don't want to track to minimize the noise and give a more granular control to the user\n var shouldTrack = Array.isArray(_this._options.tracingOptions.trackComponents)\n ? _this._options.tracingOptions.trackComponents.indexOf(name) > -1\n : _this._options.tracingOptions.trackComponents;\n if (!_this._rootSpan || !shouldTrack) {\n return;\n }\n var now = timestampWithMs();\n var span = spans[operation];\n // On the first handler call (before), it'll be undefined, as `$once` will add it in the future.\n // However, on the second call (after), it'll be already in place.\n if (span) {\n span.finish();\n _this._finishRootSpan(now, getCurrentHub);\n }\n else {\n vm.$once(\"hook:\" + hook, function () {\n if (_this._rootSpan) {\n spans[operation] = _this._rootSpan.startChild({\n description: \"Vue <\" + name + \">\",\n op: VUE_OP + \".\" + operation,\n });\n }\n });\n }\n };\n // Each component has it's own scope, so all activities are only related to one of them\n _this._options.tracingOptions.hooks.forEach(function (operation) {\n // Retrieve corresponding hooks from Vue lifecycle.\n // eg. mount => ['beforeMount', 'mounted']\n var internalHooks = HOOKS[operation];\n if (!internalHooks) {\n IS_DEBUG_BUILD && logger.warn(\"Unknown hook: \" + operation);\n return;\n }\n internalHooks.forEach(function (internalHook) {\n var handler = rootMount\n ? rootHandler.bind(_this, internalHook)\n : childHandler.bind(_this, internalHook, operation);\n var currentValue = vm.$options[internalHook];\n if (Array.isArray(currentValue)) {\n vm.$options[internalHook] = __spread([handler], currentValue);\n }\n else if (typeof currentValue === 'function') {\n vm.$options[internalHook] = [handler, currentValue];\n }\n else {\n vm.$options[internalHook] = [handler];\n }\n });\n });\n };\n IS_DEBUG_BUILD && logger.log('You are still using the Vue.js integration, consider moving to @sentry/vue');\n this._options = __assign(__assign({ \n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Vue: getGlobalObject().Vue, attachProps: true, logErrors: false, tracing: false }, options), { tracingOptions: __assign({ hooks: ['mount', 'update'], timeout: 2000, trackComponents: false }, options.tracingOptions) });\n }\n /**\n * @inheritDoc\n */\n Vue.prototype.setupOnce = function (_, getCurrentHub) {\n if (!this._options.Vue) {\n IS_DEBUG_BUILD && logger.error('Vue integration is missing a Vue instance');\n return;\n }\n this._attachErrorHandler(getCurrentHub);\n if (this._options.tracing) {\n this._startTracing(getCurrentHub);\n }\n };\n /**\n * Extract component name from the ViewModel\n */\n Vue.prototype._getComponentName = function (vm) {\n // Such level of granularity is most likely not necessary, but better safe than sorry. — Kamil\n if (!vm) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n if (vm.$root === vm) {\n return ROOT_COMPONENT_NAME;\n }\n if (!vm.$options) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n if (vm.$options.name) {\n return vm.$options.name;\n }\n if (vm.$options._componentTag) {\n return vm.$options._componentTag;\n }\n // injected by vue-loader\n if (vm.$options.__file) {\n var unifiedFile = vm.$options.__file.replace(/^[a-zA-Z]:/, '').replace(/\\\\/g, '/');\n var filename = basename(unifiedFile, '.vue');\n return (this._componentsCache[filename] ||\n (this._componentsCache[filename] = filename.replace(COMPONENT_NAME_REGEXP, function (_, c) {\n return c ? c.toUpperCase() : '';\n })));\n }\n return ANONYMOUS_COMPONENT_NAME;\n };\n /** Finish top-level span and activity with a debounce configured using `timeout` option */\n Vue.prototype._finishRootSpan = function (timestamp, getCurrentHub) {\n var _this = this;\n if (this._rootSpanTimer) {\n clearTimeout(this._rootSpanTimer);\n }\n this._rootSpanTimer = setTimeout(function () {\n if (_this._tracingActivity) {\n // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.\n // We also need to ask for the `.constructor`, as `pushActivity` and `popActivity` are static, not instance methods.\n // eslint-disable-next-line deprecation/deprecation\n var tracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n if (tracingIntegration) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n tracingIntegration.constructor.popActivity(_this._tracingActivity);\n }\n }\n // We should always finish the span, only should pop activity if using @sentry/apm\n if (_this._rootSpan) {\n _this._rootSpan.finish(timestamp);\n }\n }, this._options.tracingOptions.timeout);\n };\n /** Inject configured tracing hooks into Vue's component lifecycles */\n Vue.prototype._startTracing = function (getCurrentHub) {\n var applyTracingHooks = this._applyTracingHooks;\n this._options.Vue.mixin({\n beforeCreate: function () {\n // eslint-disable-next-line deprecation/deprecation\n if (getCurrentHub().getIntegration(TRACING_GETTER) || getCurrentHub().getIntegration(BROWSER_TRACING_GETTER)) {\n // `this` points to currently rendered component\n applyTracingHooks(this, getCurrentHub);\n }\n else {\n IS_DEBUG_BUILD &&\n logger.error('Vue integration has tracing enabled, but Tracing integration is not configured');\n }\n },\n });\n };\n /** Inject Sentry's handler into owns Vue's error handler */\n Vue.prototype._attachErrorHandler = function (getCurrentHub) {\n var _this = this;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var currentErrorHandler = this._options.Vue.config.errorHandler;\n this._options.Vue.config.errorHandler = function (error, vm, info) {\n var metadata = {};\n if (vm) {\n try {\n metadata.componentName = _this._getComponentName(vm);\n if (_this._options.attachProps) {\n metadata.propsData = vm.$options.propsData;\n }\n }\n catch (_oO) {\n IS_DEBUG_BUILD && logger.warn('Unable to extract metadata from Vue component.');\n }\n }\n if (info) {\n metadata.lifecycleHook = info;\n }\n if (getCurrentHub().getIntegration(Vue)) {\n // Capture exception in the next event loop, to make sure that all breadcrumbs are recorded in time.\n setTimeout(function () {\n getCurrentHub().withScope(function (scope) {\n scope.setContext('vue', metadata);\n getCurrentHub().captureException(error);\n });\n });\n }\n if (typeof currentErrorHandler === 'function') {\n currentErrorHandler.call(_this._options.Vue, error, vm, info);\n }\n if (_this._options.logErrors) {\n if (_this._options.Vue.util) {\n _this._options.Vue.util.warn(\"Error in \" + info + \": \\\"\" + (error && error.toString()) + \"\\\"\", vm);\n }\n // eslint-disable-next-line no-console\n console.error(error);\n }\n };\n };\n /**\n * @inheritDoc\n */\n Vue.id = 'Vue';\n return Vue;\n}());\nexport { Vue };\n/** Grabs active transaction off scope */\nexport function getActiveTransaction(hub) {\n if (hub && hub.getScope) {\n var scope = hub.getScope();\n if (scope) {\n return scope.getTransaction();\n }\n }\n return undefined;\n}\n//# sourceMappingURL=vue.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","// Store finish reasons in tuple to save on bundle size\n// Readonly type should enforce that this is not mutated.\nexport var FINISH_REASON_TAG = 'finishReason';\nexport var IDLE_TRANSACTION_FINISH_REASONS = ['heartbeatFailed', 'idleTimeout', 'documentHidden'];\n//# sourceMappingURL=constants.js.map","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","import { addInstrumentationHandler, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { getActiveTransaction } from './utils';\n/**\n * Configures global error listeners\n */\nexport function registerErrorInstrumentation() {\n addInstrumentationHandler('error', errorCallback);\n addInstrumentationHandler('unhandledrejection', errorCallback);\n}\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\nfunction errorCallback() {\n var activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n var status_1 = 'internal_error';\n IS_DEBUG_BUILD && logger.log(\"[Tracing] Transaction: \" + status_1 + \" -> Global error occured\");\n activeTransaction.setStatus(status_1);\n }\n}\n//# sourceMappingURL=errors.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { getMainCarrier } from '@sentry/hub';\nimport { dynamicRequire, isNaN, isNodeEnv, loadModule, logger } from '@sentry/utils';\nimport { registerErrorInstrumentation } from './errors';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { IdleTransaction } from './idletransaction';\nimport { Transaction } from './transaction';\nimport { hasTracingEnabled } from './utils';\n/** Returns all trace headers that are currently on the top scope. */\nfunction traceHeaders() {\n var scope = this.getScope();\n if (scope) {\n var span = scope.getSpan();\n if (span) {\n return {\n 'sentry-trace': span.toTraceparent(),\n };\n }\n }\n return {};\n}\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * @param transaction: The transaction needing a sampling decision\n * @param options: The current client's options, so we can access `tracesSampleRate` and/or `tracesSampler`\n * @param samplingContext: Default and user-provided data which may be used to help make the decision\n *\n * @returns The given transaction with its `sampled` value set\n */\nfunction sample(transaction, options, samplingContext) {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled(options)) {\n transaction.sampled = false;\n return transaction;\n }\n // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n if (transaction.sampled !== undefined) {\n transaction.setMetadata({\n transactionSampling: { method: 'explicitly_set' },\n });\n return transaction;\n }\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should\n // work; prefer the hook if so\n var sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setMetadata({\n transactionSampling: {\n method: 'client_sampler',\n // cast to number in case it's a boolean\n rate: Number(sampleRate),\n },\n });\n }\n else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n transaction.setMetadata({\n transactionSampling: { method: 'inheritance' },\n });\n }\n else {\n sampleRate = options.tracesSampleRate;\n transaction.setMetadata({\n transactionSampling: {\n method: 'client_rate',\n // cast to number in case it's a boolean\n rate: Number(sampleRate),\n },\n });\n }\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!isValidSampleRate(sampleRate)) {\n IS_DEBUG_BUILD && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n transaction.sampled = false;\n return transaction;\n }\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!sampleRate) {\n IS_DEBUG_BUILD &&\n logger.log(\"[Tracing] Discarding transaction because \" + (typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'));\n transaction.sampled = false;\n return transaction;\n }\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n transaction.sampled = Math.random() < sampleRate;\n // if we're not going to keep it, we're done\n if (!transaction.sampled) {\n IS_DEBUG_BUILD &&\n logger.log(\"[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = \" + Number(sampleRate) + \")\");\n return transaction;\n }\n IS_DEBUG_BUILD && logger.log(\"[Tracing] starting \" + transaction.op + \" transaction - \" + transaction.name);\n return transaction;\n}\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nfunction isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n IS_DEBUG_BUILD &&\n logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got \" + JSON.stringify(rate) + \" of type \" + JSON.stringify(typeof rate) + \".\");\n return false;\n }\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n IS_DEBUG_BUILD &&\n logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got \" + rate + \".\");\n return false;\n }\n return true;\n}\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\nfunction _startTransaction(transactionContext, customSamplingContext) {\n var client = this.getClient();\n var options = (client && client.getOptions()) || {};\n var transaction = new Transaction(transactionContext, this);\n transaction = sample(transaction, options, __assign({ parentSampled: transactionContext.parentSampled, transactionContext: transactionContext }, customSamplingContext));\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && options._experiments.maxSpans);\n }\n return transaction;\n}\n/**\n * Create new idle transaction.\n */\nexport function startIdleTransaction(hub, transactionContext, idleTimeout, onScope, customSamplingContext) {\n var client = hub.getClient();\n var options = (client && client.getOptions()) || {};\n var transaction = new IdleTransaction(transactionContext, hub, idleTimeout, onScope);\n transaction = sample(transaction, options, __assign({ parentSampled: transactionContext.parentSampled, transactionContext: transactionContext }, customSamplingContext));\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && options._experiments.maxSpans);\n }\n return transaction;\n}\n/**\n * @private\n */\nexport function _addTracingExtensions() {\n var carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n}\n/**\n * @private\n */\nfunction _autoloadDatabaseIntegrations() {\n var carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n var packageToIntegrationMapping = {\n mongodb: function () {\n var integration = dynamicRequire(module, './integrations/node/mongo');\n return new integration.Mongo();\n },\n mongoose: function () {\n var integration = dynamicRequire(module, './integrations/node/mongo');\n return new integration.Mongo({ mongoose: true });\n },\n mysql: function () {\n var integration = dynamicRequire(module, './integrations/node/mysql');\n return new integration.Mysql();\n },\n pg: function () {\n var integration = dynamicRequire(module, './integrations/node/postgres');\n return new integration.Postgres();\n },\n };\n var mappedPackages = Object.keys(packageToIntegrationMapping)\n .filter(function (moduleName) { return !!loadModule(moduleName); })\n .map(function (pkg) {\n try {\n return packageToIntegrationMapping[pkg]();\n }\n catch (e) {\n return undefined;\n }\n })\n .filter(function (p) { return p; });\n if (mappedPackages.length > 0) {\n carrier.__SENTRY__.integrations = __spread((carrier.__SENTRY__.integrations || []), mappedPackages);\n }\n}\n/**\n * This patches the global object and injects the Tracing extensions methods\n */\nexport function addExtensionMethods() {\n _addTracingExtensions();\n // Detect and automatically load specified integrations.\n if (isNodeEnv()) {\n _autoloadDatabaseIntegrations();\n }\n // If an error happens globally, we should make sure transaction status is set to error.\n registerErrorInstrumentation();\n}\n//# sourceMappingURL=hubextensions.js.map","import { __extends, __values } from \"tslib\";\nimport { logger, timestampWithMs } from '@sentry/utils';\nimport { FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS } from './constants';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { SpanRecorder } from './span';\nimport { Transaction } from './transaction';\nexport var DEFAULT_IDLE_TIMEOUT = 1000;\nexport var HEARTBEAT_INTERVAL = 5000;\n/**\n * @inheritDoc\n */\nvar IdleTransactionSpanRecorder = /** @class */ (function (_super) {\n __extends(IdleTransactionSpanRecorder, _super);\n function IdleTransactionSpanRecorder(_pushActivity, _popActivity, transactionSpanId, maxlen) {\n if (transactionSpanId === void 0) { transactionSpanId = ''; }\n var _this = _super.call(this, maxlen) || this;\n _this._pushActivity = _pushActivity;\n _this._popActivity = _popActivity;\n _this.transactionSpanId = transactionSpanId;\n return _this;\n }\n /**\n * @inheritDoc\n */\n IdleTransactionSpanRecorder.prototype.add = function (span) {\n var _this = this;\n // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n if (span.spanId !== this.transactionSpanId) {\n // We patch span.finish() to pop an activity after setting an endTimestamp.\n span.finish = function (endTimestamp) {\n span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampWithMs();\n _this._popActivity(span.spanId);\n };\n // We should only push new activities if the span does not have an end timestamp.\n if (span.endTimestamp === undefined) {\n this._pushActivity(span.spanId);\n }\n }\n _super.prototype.add.call(this, span);\n };\n return IdleTransactionSpanRecorder;\n}(SpanRecorder));\nexport { IdleTransactionSpanRecorder };\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */\nvar IdleTransaction = /** @class */ (function (_super) {\n __extends(IdleTransaction, _super);\n function IdleTransaction(transactionContext, _idleHub, \n /**\n * The time to wait in ms until the idle transaction will be finished.\n * @default 1000\n */\n _idleTimeout, \n // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends\n _onScope) {\n if (_idleTimeout === void 0) { _idleTimeout = DEFAULT_IDLE_TIMEOUT; }\n if (_onScope === void 0) { _onScope = false; }\n var _this = _super.call(this, transactionContext, _idleHub) || this;\n _this._idleHub = _idleHub;\n _this._idleTimeout = _idleTimeout;\n _this._onScope = _onScope;\n // Activities store a list of active spans\n _this.activities = {};\n // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n _this._heartbeatCounter = 0;\n // We should not use heartbeat if we finished a transaction\n _this._finished = false;\n _this._beforeFinishCallbacks = [];\n if (_idleHub && _onScope) {\n // There should only be one active transaction on the scope\n clearActiveTransaction(_idleHub);\n // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n IS_DEBUG_BUILD && logger.log(\"Setting idle transaction on scope. Span ID: \" + _this.spanId);\n _idleHub.configureScope(function (scope) { return scope.setSpan(_this); });\n }\n _this._initTimeout = setTimeout(function () {\n if (!_this._finished) {\n _this.finish();\n }\n }, _this._idleTimeout);\n return _this;\n }\n /** {@inheritDoc} */\n IdleTransaction.prototype.finish = function (endTimestamp) {\n var e_1, _a;\n var _this = this;\n if (endTimestamp === void 0) { endTimestamp = timestampWithMs(); }\n this._finished = true;\n this.activities = {};\n if (this.spanRecorder) {\n IS_DEBUG_BUILD &&\n logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);\n try {\n for (var _b = __values(this._beforeFinishCallbacks), _c = _b.next(); !_c.done; _c = _b.next()) {\n var callback = _c.value;\n callback(this, endTimestamp);\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 this.spanRecorder.spans = this.spanRecorder.spans.filter(function (span) {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanId === _this.spanId) {\n return true;\n }\n // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n if (!span.endTimestamp) {\n span.endTimestamp = endTimestamp;\n span.setStatus('cancelled');\n IS_DEBUG_BUILD &&\n logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n var keepSpan = span.startTimestamp < endTimestamp;\n if (!keepSpan) {\n IS_DEBUG_BUILD &&\n logger.log('[Tracing] discarding Span since it happened after Transaction was finished', JSON.stringify(span, undefined, 2));\n }\n return keepSpan;\n });\n IS_DEBUG_BUILD && logger.log('[Tracing] flushing IdleTransaction');\n }\n else {\n IS_DEBUG_BUILD && logger.log('[Tracing] No active IdleTransaction');\n }\n // if `this._onScope` is `true`, the transaction put itself on the scope when it started\n if (this._onScope) {\n clearActiveTransaction(this._idleHub);\n }\n return _super.prototype.finish.call(this, endTimestamp);\n };\n /**\n * Register a callback function that gets excecuted before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */\n IdleTransaction.prototype.registerBeforeFinishCallback = function (callback) {\n this._beforeFinishCallbacks.push(callback);\n };\n /**\n * @inheritDoc\n */\n IdleTransaction.prototype.initSpanRecorder = function (maxlen) {\n var _this = this;\n if (!this.spanRecorder) {\n var pushActivity = function (id) {\n if (_this._finished) {\n return;\n }\n _this._pushActivity(id);\n };\n var popActivity = function (id) {\n if (_this._finished) {\n return;\n }\n _this._popActivity(id);\n };\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen);\n // Start heartbeat so that transactions do not run forever.\n IS_DEBUG_BUILD && logger.log('Starting heartbeat');\n this._pingHeartbeat();\n }\n this.spanRecorder.add(this);\n };\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n IdleTransaction.prototype._pushActivity = function (spanId) {\n if (this._initTimeout) {\n clearTimeout(this._initTimeout);\n this._initTimeout = undefined;\n }\n IS_DEBUG_BUILD && logger.log(\"[Tracing] pushActivity: \" + spanId);\n this.activities[spanId] = true;\n IS_DEBUG_BUILD && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n };\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n IdleTransaction.prototype._popActivity = function (spanId) {\n var _this = this;\n if (this.activities[spanId]) {\n IS_DEBUG_BUILD && logger.log(\"[Tracing] popActivity \" + spanId);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.activities[spanId];\n IS_DEBUG_BUILD && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n if (Object.keys(this.activities).length === 0) {\n var timeout = this._idleTimeout;\n // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampWithMs is in seconds, timeout is in ms\n var end_1 = timestampWithMs() + timeout / 1000;\n setTimeout(function () {\n if (!_this._finished) {\n _this.setTag(FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS[1]);\n _this.finish(end_1);\n }\n }, timeout);\n }\n };\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n IdleTransaction.prototype._beat = function () {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n var heartbeatString = Object.keys(this.activities).join('');\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter += 1;\n }\n else {\n this._heartbeatCounter = 1;\n }\n this._prevHeartbeatString = heartbeatString;\n if (this._heartbeatCounter >= 3) {\n IS_DEBUG_BUILD && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n this.setStatus('deadline_exceeded');\n this.setTag(FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS[0]);\n this.finish();\n }\n else {\n this._pingHeartbeat();\n }\n };\n /**\n * Pings the heartbeat\n */\n IdleTransaction.prototype._pingHeartbeat = function () {\n var _this = this;\n IS_DEBUG_BUILD && logger.log(\"pinging Heartbeat -> current counter: \" + this._heartbeatCounter);\n setTimeout(function () {\n _this._beat();\n }, HEARTBEAT_INTERVAL);\n };\n return IdleTransaction;\n}(Transaction));\nexport { IdleTransaction };\n/**\n * Reset transaction on scope to `undefined`\n */\nfunction clearActiveTransaction(hub) {\n if (hub) {\n var scope = hub.getScope();\n if (scope) {\n var transaction = scope.getTransaction();\n if (transaction) {\n scope.setSpan(undefined);\n }\n }\n }\n}\n//# sourceMappingURL=idletransaction.js.map","export var TRACEPARENT_REGEXP = new RegExp('^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$');\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nexport function extractTraceparentData(traceparent) {\n var matches = traceparent.match(TRACEPARENT_REGEXP);\n if (matches) {\n var parentSampled = void 0;\n if (matches[3] === '1') {\n parentSampled = true;\n }\n else if (matches[3] === '0') {\n parentSampled = false;\n }\n return {\n traceId: matches[1],\n parentSampled: parentSampled,\n parentSpanId: matches[2],\n };\n }\n return undefined;\n}\n//# sourceMappingURL=tracing.js.map","import { getGlobalObject, logger } from '@sentry/utils';\nimport { FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS } from '../constants';\nimport { IS_DEBUG_BUILD } from '../flags';\nimport { getActiveTransaction } from '../utils';\nvar global = getGlobalObject();\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nexport function registerBackgroundTabDetection() {\n if (global && global.document) {\n global.document.addEventListener('visibilitychange', function () {\n var activeTransaction = getActiveTransaction();\n if (global.document.hidden && activeTransaction) {\n var statusType = 'cancelled';\n IS_DEBUG_BUILD &&\n logger.log(\"[Tracing] Transaction: \" + statusType + \" -> since tab moved to the background, op: \" + activeTransaction.op);\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!activeTransaction.status) {\n activeTransaction.setStatus(statusType);\n }\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.setTag(FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS[2]);\n activeTransaction.finish();\n }\n });\n }\n else {\n IS_DEBUG_BUILD && logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n//# sourceMappingURL=backgroundtab.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var bindReporter = function (callback, metric, reportAllChanges) {\n var prevValue;\n return function (forceReport) {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n metric.delta = metric.value - (prevValue || 0);\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (metric.delta || prevValue === undefined) {\n prevValue = metric.value;\n callback(metric);\n }\n }\n }\n };\n};\n//# sourceMappingURL=bindReporter.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nexport var generateUniqueID = function () {\n return \"v2-\" + Date.now() + \"-\" + (Math.floor(Math.random() * (9e12 - 1)) + 1e12);\n};\n//# sourceMappingURL=generateUniqueID.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { generateUniqueID } from './generateUniqueID';\nexport var initMetric = function (name, value) {\n return {\n name: name,\n value: (value !== null && value !== void 0 ? value : -1),\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n };\n};\n//# sourceMappingURL=initMetric.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nexport var observe = function (type, callback) {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n // More extensive feature detect needed for Firefox due to:\n // https://github.com/GoogleChrome/web-vitals/issues/142\n if (type === 'first-input' && !('PerformanceEventTiming' in self)) {\n return;\n }\n var po = new PerformanceObserver(function (l) { return l.getEntries().map(callback); });\n po.observe({ type: type, buffered: true });\n return po;\n }\n }\n catch (e) {\n // Do nothing.\n }\n return;\n};\n//# sourceMappingURL=observe.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getGlobalObject } from '@sentry/utils';\nexport var onHidden = function (cb, once) {\n var onHiddenOrPageHide = function (event) {\n if (event.type === 'pagehide' || getGlobalObject().document.visibilityState === 'hidden') {\n cb(event);\n if (once) {\n removeEventListener('visibilitychange', onHiddenOrPageHide, true);\n removeEventListener('pagehide', onHiddenOrPageHide, true);\n }\n }\n };\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n};\n//# sourceMappingURL=onHidden.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nexport var getCLS = function (onReport, reportAllChanges) {\n var metric = initMetric('CLS', 0);\n var report;\n var sessionValue = 0;\n var sessionEntries = [];\n var entryHandler = function (entry) {\n // Only count layout shifts without recent user input.\n // TODO: Figure out why entry can be undefined\n if (entry && !entry.hadRecentInput) {\n var firstSessionEntry = sessionEntries[0];\n var lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n // If the entry occurred less than 1 second after the previous entry and\n // less than 5 seconds after the first entry in the session, include the\n // entry in the current session. Otherwise, start a new session.\n if (sessionValue &&\n sessionEntries.length !== 0 &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n }\n else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n if (report) {\n report();\n }\n }\n }\n };\n var po = observe('layout-shift', entryHandler);\n if (po) {\n report = bindReporter(onReport, metric, reportAllChanges);\n onHidden(function () {\n po.takeRecords().map(entryHandler);\n report(true);\n });\n }\n};\n//# sourceMappingURL=getCLS.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getGlobalObject } from '@sentry/utils';\nimport { onHidden } from './onHidden';\nvar firstHiddenTime = -1;\nvar initHiddenTime = function () {\n return getGlobalObject().document.visibilityState === 'hidden' ? 0 : Infinity;\n};\nvar trackChanges = function () {\n // Update the time if/when the document becomes hidden.\n onHidden(function (_a) {\n var timeStamp = _a.timeStamp;\n firstHiddenTime = timeStamp;\n }, true);\n};\nexport var getVisibilityWatcher = function () {\n if (firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = initHiddenTime();\n trackChanges();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n//# sourceMappingURL=getVisibilityWatcher.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nexport var getFID = function (onReport, reportAllChanges) {\n var visibilityWatcher = getVisibilityWatcher();\n var metric = initMetric('FID');\n var report;\n var entryHandler = function (entry) {\n // Only report if the page wasn't hidden prior to the first input.\n if (report && entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n var po = observe('first-input', entryHandler);\n if (po) {\n report = bindReporter(onReport, metric, reportAllChanges);\n onHidden(function () {\n po.takeRecords().map(entryHandler);\n po.disconnect();\n }, true);\n }\n};\n//# sourceMappingURL=getFID.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nvar reportedMetricIDs = {};\nexport var getLCP = function (onReport, reportAllChanges) {\n var visibilityWatcher = getVisibilityWatcher();\n var metric = initMetric('LCP');\n var report;\n var entryHandler = function (entry) {\n // The startTime attribute returns the value of the renderTime if it is not 0,\n // and the value of the loadTime otherwise.\n var value = entry.startTime;\n // If the page was hidden prior to paint time of the entry,\n // ignore it and mark the metric as final, otherwise add the entry.\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries.push(entry);\n }\n if (report) {\n report();\n }\n };\n var po = observe('largest-contentful-paint', entryHandler);\n if (po) {\n report = bindReporter(onReport, metric, reportAllChanges);\n var stopListening_1 = function () {\n if (!reportedMetricIDs[metric.id]) {\n po.takeRecords().map(entryHandler);\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n };\n // Stop listening after input. Note: while scrolling is an input that\n // stop LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(function (type) {\n addEventListener(type, stopListening_1, { once: true, capture: true });\n });\n onHidden(stopListening_1, true);\n }\n};\n//# sourceMappingURL=getLCP.js.map","import { __assign, __rest } from \"tslib\";\nimport { browserPerformanceTimeOrigin, getGlobalObject, htmlTreeAsString, isNodeEnv, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nimport { msToSec } from '../utils';\nimport { getCLS } from './web-vitals/getCLS';\nimport { getFID } from './web-vitals/getFID';\nimport { getLCP } from './web-vitals/getLCP';\nimport { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher';\nvar global = getGlobalObject();\n/** Class tracking metrics */\nvar MetricsInstrumentation = /** @class */ (function () {\n function MetricsInstrumentation(_reportAllChanges) {\n if (_reportAllChanges === void 0) { _reportAllChanges = false; }\n this._reportAllChanges = _reportAllChanges;\n this._measurements = {};\n this._performanceCursor = 0;\n if (!isNodeEnv() && global && global.performance && global.document) {\n if (global.performance.mark) {\n global.performance.mark('sentry-tracing-init');\n }\n this._trackCLS();\n this._trackLCP();\n this._trackFID();\n }\n }\n /** Add performance related spans to a transaction */\n MetricsInstrumentation.prototype.addPerformanceEntries = function (transaction) {\n var _this = this;\n if (!global || !global.performance || !global.performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n IS_DEBUG_BUILD && logger.log('[Tracing] Adding & adjusting spans using Performance API');\n var timeOrigin = msToSec(browserPerformanceTimeOrigin);\n var responseStartTimestamp;\n var requestStartTimestamp;\n global.performance\n .getEntries()\n .slice(this._performanceCursor)\n .forEach(function (entry) {\n var startTime = msToSec(entry.startTime);\n var duration = msToSec(entry.duration);\n if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) {\n return;\n }\n switch (entry.entryType) {\n case 'navigation': {\n addNavigationSpans(transaction, entry, timeOrigin);\n responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n var startTimestamp = addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n // capture web vitals\n var firstHidden = getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n var shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n if (entry.name === 'first-paint' && shouldRecord) {\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding FP');\n _this._measurements['fp'] = { value: entry.startTime };\n _this._measurements['mark.fp'] = { value: startTimestamp };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding FCP');\n _this._measurements['fcp'] = { value: entry.startTime };\n _this._measurements['mark.fcp'] = { value: startTimestamp };\n }\n break;\n }\n case 'resource': {\n var resourceName = entry.name.replace(global.location.origin, '');\n addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin);\n break;\n }\n default:\n // Ignore other entry types.\n }\n });\n this._performanceCursor = Math.max(performance.getEntries().length - 1, 0);\n this._trackNavigator(transaction);\n // Measurements are only available for pageload transactions\n if (transaction.op === 'pageload') {\n // normalize applicable web vital values to be relative to transaction.startTimestamp\n var timeOrigin_1 = msToSec(browserPerformanceTimeOrigin);\n // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the\n // start of the response in milliseconds\n if (typeof responseStartTimestamp === 'number') {\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding TTFB');\n this._measurements['ttfb'] = { value: (responseStartTimestamp - transaction.startTimestamp) * 1000 };\n if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) {\n // Capture the time spent making the request and receiving the first byte of the response.\n // This is the time between the start of the request and the start of the response in milliseconds.\n this._measurements['ttfb.requestTime'] = { value: (responseStartTimestamp - requestStartTimestamp) * 1000 };\n }\n }\n ['fcp', 'fp', 'lcp'].forEach(function (name) {\n if (!_this._measurements[name] || timeOrigin_1 >= transaction.startTimestamp) {\n return;\n }\n // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n var oldValue = _this._measurements[name].value;\n var measurementTimestamp = timeOrigin_1 + msToSec(oldValue);\n // normalizedValue should be in milliseconds\n var normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);\n var delta = normalizedValue - oldValue;\n IS_DEBUG_BUILD &&\n logger.log(\"[Measurements] Normalized \" + name + \" from \" + oldValue + \" to \" + normalizedValue + \" (\" + delta + \")\");\n _this._measurements[name].value = normalizedValue;\n });\n if (this._measurements['mark.fid'] && this._measurements['fid']) {\n // create span for FID\n _startChild(transaction, {\n description: 'first input delay',\n endTimestamp: this._measurements['mark.fid'].value + msToSec(this._measurements['fid'].value),\n op: 'web.vitals',\n startTimestamp: this._measurements['mark.fid'].value,\n });\n }\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n if (!('fcp' in this._measurements)) {\n delete this._measurements.cls;\n }\n transaction.setMeasurements(this._measurements);\n tagMetricInfo(transaction, this._lcpEntry, this._clsEntry);\n transaction.setTag('sentry_reportAllChanges', this._reportAllChanges);\n }\n };\n /**\n * Capture the information of the user agent.\n */\n MetricsInstrumentation.prototype._trackNavigator = function (transaction) {\n var navigator = global.navigator;\n if (!navigator) {\n return;\n }\n // track network connectivity\n var connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n if (connection.type) {\n transaction.setTag('connectionType', connection.type);\n }\n if (isMeasurementValue(connection.rtt)) {\n this._measurements['connection.rtt'] = { value: connection.rtt };\n }\n if (isMeasurementValue(connection.downlink)) {\n this._measurements['connection.downlink'] = { value: connection.downlink };\n }\n }\n if (isMeasurementValue(navigator.deviceMemory)) {\n transaction.setTag('deviceMemory', String(navigator.deviceMemory));\n }\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n };\n /** Starts tracking the Cumulative Layout Shift on the current page. */\n MetricsInstrumentation.prototype._trackCLS = function () {\n var _this = this;\n // See:\n // https://web.dev/evolving-cls/\n // https://web.dev/cls-web-tooling/\n getCLS(function (metric) {\n var entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding CLS');\n _this._measurements['cls'] = { value: metric.value };\n _this._clsEntry = entry;\n });\n };\n /** Starts tracking the Largest Contentful Paint on the current page. */\n MetricsInstrumentation.prototype._trackLCP = function () {\n var _this = this;\n getLCP(function (metric) {\n var entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n var timeOrigin = msToSec(browserPerformanceTimeOrigin);\n var startTime = msToSec(entry.startTime);\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding LCP');\n _this._measurements['lcp'] = { value: metric.value };\n _this._measurements['mark.lcp'] = { value: timeOrigin + startTime };\n _this._lcpEntry = entry;\n }, this._reportAllChanges);\n };\n /** Starts tracking the First Input Delay on the current page. */\n MetricsInstrumentation.prototype._trackFID = function () {\n var _this = this;\n getFID(function (metric) {\n var entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n var timeOrigin = msToSec(browserPerformanceTimeOrigin);\n var startTime = msToSec(entry.startTime);\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding FID');\n _this._measurements['fid'] = { value: metric.value };\n _this._measurements['mark.fid'] = { value: timeOrigin + startTime };\n });\n };\n return MetricsInstrumentation;\n}());\nexport { MetricsInstrumentation };\n/** Instrument navigation entries */\nfunction addNavigationSpans(transaction, entry, timeOrigin) {\n ['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'].forEach(function (event) {\n addPerformanceNavigationTiming(transaction, entry, event, timeOrigin);\n });\n addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'TLS/SSL', 'connectEnd');\n addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'cache', 'domainLookupStart');\n addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin, 'DNS');\n addRequest(transaction, entry, timeOrigin);\n}\n/** Create measure related spans */\nfunction addMeasureSpans(transaction, entry, startTime, duration, timeOrigin) {\n var measureStartTimestamp = timeOrigin + startTime;\n var measureEndTimestamp = measureStartTimestamp + duration;\n _startChild(transaction, {\n description: entry.name,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType,\n startTimestamp: measureStartTimestamp,\n });\n return measureStartTimestamp;\n}\n/** Create resource-related spans */\nexport function addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n var data = {};\n if ('transferSize' in entry) {\n data['Transfer Size'] = entry.transferSize;\n }\n if ('encodedBodySize' in entry) {\n data['Encoded Body Size'] = entry.encodedBodySize;\n }\n if ('decodedBodySize' in entry) {\n data['Decoded Body Size'] = entry.decodedBodySize;\n }\n var startTimestamp = timeOrigin + startTime;\n var endTimestamp = startTimestamp + duration;\n _startChild(transaction, {\n description: resourceName,\n endTimestamp: endTimestamp,\n op: entry.initiatorType ? \"resource.\" + entry.initiatorType : 'resource',\n startTimestamp: startTimestamp,\n data: data,\n });\n}\n/** Create performance navigation related spans */\nfunction addPerformanceNavigationTiming(transaction, entry, event, timeOrigin, description, eventEnd) {\n var end = eventEnd ? entry[eventEnd] : entry[event + \"End\"];\n var start = entry[event + \"Start\"];\n if (!start || !end) {\n return;\n }\n _startChild(transaction, {\n op: 'browser',\n description: (description !== null && description !== void 0 ? description : event),\n startTimestamp: timeOrigin + msToSec(start),\n endTimestamp: timeOrigin + msToSec(end),\n });\n}\n/** Create request and response related spans */\nfunction addRequest(transaction, entry, timeOrigin) {\n _startChild(transaction, {\n op: 'browser',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n });\n _startChild(transaction, {\n op: 'browser',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n });\n}\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nexport function _startChild(transaction, _a) {\n var startTimestamp = _a.startTimestamp, ctx = __rest(_a, [\"startTimestamp\"]);\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n transaction.startTimestamp = startTimestamp;\n }\n return transaction.startChild(__assign({ startTimestamp: startTimestamp }, ctx));\n}\n/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}\n/** Add LCP / CLS data to transaction to allow debugging */\nfunction tagMetricInfo(transaction, lcpEntry, clsEntry) {\n if (lcpEntry) {\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding LCP Data');\n // Capture Properties of the LCP element that contributes to the LCP.\n if (lcpEntry.element) {\n transaction.setTag('lcp.element', htmlTreeAsString(lcpEntry.element));\n }\n if (lcpEntry.id) {\n transaction.setTag('lcp.id', lcpEntry.id);\n }\n if (lcpEntry.url) {\n // Trim URL to the first 200 characters.\n transaction.setTag('lcp.url', lcpEntry.url.trim().slice(0, 200));\n }\n transaction.setTag('lcp.size', lcpEntry.size);\n }\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (clsEntry && clsEntry.sources) {\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding CLS Data');\n clsEntry.sources.forEach(function (source, index) {\n return transaction.setTag(\"cls.source.\" + (index + 1), htmlTreeAsString(source.node));\n });\n }\n}\n//# sourceMappingURL=metrics.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { addInstrumentationHandler, isInstanceOf, isMatchingPattern } from '@sentry/utils';\nimport { getActiveTransaction, hasTracingEnabled } from '../utils';\nexport var DEFAULT_TRACING_ORIGINS = ['localhost', /^\\//];\nexport var defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n tracingOrigins: DEFAULT_TRACING_ORIGINS,\n};\n/** Registers span creators for xhr and fetch requests */\nexport function instrumentOutgoingRequests(_options) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = __assign(__assign({}, defaultRequestInstrumentationOptions), _options), traceFetch = _a.traceFetch, traceXHR = _a.traceXHR, tracingOrigins = _a.tracingOrigins, shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest;\n // We should cache url -> decision so that we don't have to compute\n // regexp everytime we create a request.\n var urlMap = {};\n var defaultShouldCreateSpan = function (url) {\n if (urlMap[url]) {\n return urlMap[url];\n }\n var origins = tracingOrigins;\n urlMap[url] =\n origins.some(function (origin) { return isMatchingPattern(url, origin); }) &&\n !isMatchingPattern(url, 'sentry_key');\n return urlMap[url];\n };\n // We want that our users don't have to re-implement shouldCreateSpanForRequest themselves\n // That's why we filter out already unwanted Spans from tracingOrigins\n var shouldCreateSpan = defaultShouldCreateSpan;\n if (typeof shouldCreateSpanForRequest === 'function') {\n shouldCreateSpan = function (url) {\n return defaultShouldCreateSpan(url) && shouldCreateSpanForRequest(url);\n };\n }\n var spans = {};\n if (traceFetch) {\n addInstrumentationHandler('fetch', function (handlerData) {\n fetchCallback(handlerData, shouldCreateSpan, spans);\n });\n }\n if (traceXHR) {\n addInstrumentationHandler('xhr', function (handlerData) {\n xhrCallback(handlerData, shouldCreateSpan, spans);\n });\n }\n}\n/**\n * Create and track fetch request spans\n */\nexport function fetchCallback(handlerData, shouldCreateSpan, spans) {\n if (!hasTracingEnabled() || !(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) {\n return;\n }\n if (handlerData.endTimestamp) {\n var spanId = handlerData.fetchData.__span;\n if (!spanId)\n return;\n var span = spans[spanId];\n if (span) {\n if (handlerData.response) {\n // TODO (kmclb) remove this once types PR goes through\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n span.setHttpStatus(handlerData.response.status);\n }\n else if (handlerData.error) {\n span.setStatus('internal_error');\n }\n span.finish();\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return;\n }\n var activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n var span = activeTransaction.startChild({\n data: __assign(__assign({}, handlerData.fetchData), { type: 'fetch' }),\n description: handlerData.fetchData.method + \" \" + handlerData.fetchData.url,\n op: 'http.client',\n });\n handlerData.fetchData.__span = span.spanId;\n spans[span.spanId] = span;\n var request = (handlerData.args[0] = handlerData.args[0]);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var options = (handlerData.args[1] = handlerData.args[1] || {});\n var headers = options.headers;\n if (isInstanceOf(request, Request)) {\n headers = request.headers;\n }\n if (headers) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (typeof headers.append === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n headers.append('sentry-trace', span.toTraceparent());\n }\n else if (Array.isArray(headers)) {\n headers = __spread(headers, [['sentry-trace', span.toTraceparent()]]);\n }\n else {\n headers = __assign(__assign({}, headers), { 'sentry-trace': span.toTraceparent() });\n }\n }\n else {\n headers = { 'sentry-trace': span.toTraceparent() };\n }\n options.headers = headers;\n }\n}\n/**\n * Create and track xhr request spans\n */\nexport function xhrCallback(handlerData, shouldCreateSpan, spans) {\n if (!hasTracingEnabled() ||\n (handlerData.xhr && handlerData.xhr.__sentry_own_request__) ||\n !(handlerData.xhr && handlerData.xhr.__sentry_xhr__ && shouldCreateSpan(handlerData.xhr.__sentry_xhr__.url))) {\n return;\n }\n var xhr = handlerData.xhr.__sentry_xhr__;\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp) {\n var spanId = handlerData.xhr.__sentry_xhr_span_id__;\n if (!spanId)\n return;\n var span = spans[spanId];\n if (span) {\n span.setHttpStatus(xhr.status_code);\n span.finish();\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return;\n }\n // if not, create a new span to track it\n var activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n var span = activeTransaction.startChild({\n data: __assign(__assign({}, xhr.data), { type: 'xhr', method: xhr.method, url: xhr.url }),\n description: xhr.method + \" \" + xhr.url,\n op: 'http.client',\n });\n handlerData.xhr.__sentry_xhr_span_id__ = span.spanId;\n spans[handlerData.xhr.__sentry_xhr_span_id__] = span;\n if (handlerData.xhr.setRequestHeader) {\n try {\n handlerData.xhr.setRequestHeader('sentry-trace', span.toTraceparent());\n }\n catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n }\n }\n}\n//# sourceMappingURL=request.js.map","import { addInstrumentationHandler, getGlobalObject, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nvar global = getGlobalObject();\n/**\n * Default function implementing pageload and navigation transactions\n */\nexport function instrumentRoutingWithDefaults(customStartTransaction, startTransactionOnPageLoad, startTransactionOnLocationChange) {\n if (startTransactionOnPageLoad === void 0) { startTransactionOnPageLoad = true; }\n if (startTransactionOnLocationChange === void 0) { startTransactionOnLocationChange = true; }\n if (!global || !global.location) {\n IS_DEBUG_BUILD && logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n var startingUrl = global.location.href;\n var activeTransaction;\n if (startTransactionOnPageLoad) {\n activeTransaction = customStartTransaction({ name: global.location.pathname, op: 'pageload' });\n }\n if (startTransactionOnLocationChange) {\n addInstrumentationHandler('history', function (_a) {\n var to = _a.to, from = _a.from;\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n if (from !== to) {\n startingUrl = undefined;\n if (activeTransaction) {\n IS_DEBUG_BUILD && logger.log(\"[Tracing] Finishing current transaction with op: \" + activeTransaction.op);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeTransaction.finish();\n }\n activeTransaction = customStartTransaction({ name: global.location.pathname, op: 'navigation' });\n }\n });\n }\n}\n//# sourceMappingURL=router.js.map","import { __assign } from \"tslib\";\nimport { getGlobalObject, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nimport { startIdleTransaction } from '../hubextensions';\nimport { DEFAULT_IDLE_TIMEOUT } from '../idletransaction';\nimport { extractTraceparentData, secToMs } from '../utils';\nimport { registerBackgroundTabDetection } from './backgroundtab';\nimport { MetricsInstrumentation } from './metrics';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests, } from './request';\nimport { instrumentRoutingWithDefaults } from './router';\nexport var DEFAULT_MAX_TRANSACTION_DURATION_SECONDS = 600;\nvar DEFAULT_BROWSER_TRACING_OPTIONS = __assign({ idleTimeout: DEFAULT_IDLE_TIMEOUT, markBackgroundTransactions: true, maxTransactionDuration: DEFAULT_MAX_TRANSACTION_DURATION_SECONDS, routingInstrumentation: instrumentRoutingWithDefaults, startTransactionOnLocationChange: true, startTransactionOnPageLoad: true }, defaultRequestInstrumentationOptions);\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n */\nvar BrowserTracing = /** @class */ (function () {\n function BrowserTracing(_options) {\n /**\n * @inheritDoc\n */\n this.name = BrowserTracing.id;\n /** Store configured idle timeout so that it can be added as a tag to transactions */\n this._configuredIdleTimeout = undefined;\n var tracingOrigins = defaultRequestInstrumentationOptions.tracingOrigins;\n // NOTE: Logger doesn't work in constructors, as it's initialized after integrations instances\n if (_options) {\n this._configuredIdleTimeout = _options.idleTimeout;\n if (_options.tracingOrigins && Array.isArray(_options.tracingOrigins) && _options.tracingOrigins.length !== 0) {\n tracingOrigins = _options.tracingOrigins;\n }\n else {\n IS_DEBUG_BUILD && (this._emitOptionsWarning = true);\n }\n }\n this.options = __assign(__assign(__assign({}, DEFAULT_BROWSER_TRACING_OPTIONS), _options), { tracingOrigins: tracingOrigins });\n var _metricOptions = this.options._metricOptions;\n this._metrics = new MetricsInstrumentation(_metricOptions && _metricOptions._reportAllChanges);\n }\n /**\n * @inheritDoc\n */\n BrowserTracing.prototype.setupOnce = function (_, getCurrentHub) {\n var _this = this;\n this._getCurrentHub = getCurrentHub;\n if (this._emitOptionsWarning) {\n IS_DEBUG_BUILD &&\n logger.warn('[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace.');\n IS_DEBUG_BUILD &&\n logger.warn(\"[Tracing] We added a reasonable default for you: \" + defaultRequestInstrumentationOptions.tracingOrigins);\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = this.options, instrumentRouting = _a.routingInstrumentation, startTransactionOnLocationChange = _a.startTransactionOnLocationChange, startTransactionOnPageLoad = _a.startTransactionOnPageLoad, markBackgroundTransactions = _a.markBackgroundTransactions, traceFetch = _a.traceFetch, traceXHR = _a.traceXHR, tracingOrigins = _a.tracingOrigins, shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest;\n instrumentRouting(function (context) { return _this._createRouteTransaction(context); }, startTransactionOnPageLoad, startTransactionOnLocationChange);\n if (markBackgroundTransactions) {\n registerBackgroundTabDetection();\n }\n instrumentOutgoingRequests({ traceFetch: traceFetch, traceXHR: traceXHR, tracingOrigins: tracingOrigins, shouldCreateSpanForRequest: shouldCreateSpanForRequest });\n };\n /** Create routing idle transaction. */\n BrowserTracing.prototype._createRouteTransaction = function (context) {\n var _this = this;\n if (!this._getCurrentHub) {\n IS_DEBUG_BUILD &&\n logger.warn(\"[Tracing] Did not create \" + context.op + \" transaction because _getCurrentHub is invalid.\");\n return undefined;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = this.options, beforeNavigate = _a.beforeNavigate, idleTimeout = _a.idleTimeout, maxTransactionDuration = _a.maxTransactionDuration;\n var parentContextFromHeader = context.op === 'pageload' ? getHeaderContext() : undefined;\n var expandedContext = __assign(__assign(__assign({}, context), parentContextFromHeader), { trimEnd: true });\n var modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext;\n // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n var finalContext = modifiedContext === undefined ? __assign(__assign({}, expandedContext), { sampled: false }) : modifiedContext;\n if (finalContext.sampled === false) {\n IS_DEBUG_BUILD && logger.log(\"[Tracing] Will not send \" + finalContext.op + \" transaction because of beforeNavigate.\");\n }\n IS_DEBUG_BUILD && logger.log(\"[Tracing] Starting \" + finalContext.op + \" transaction on scope\");\n var hub = this._getCurrentHub();\n var location = getGlobalObject().location;\n var idleTransaction = startIdleTransaction(hub, finalContext, idleTimeout, true, { location: location });\n idleTransaction.registerBeforeFinishCallback(function (transaction, endTimestamp) {\n _this._metrics.addPerformanceEntries(transaction);\n adjustTransactionDuration(secToMs(maxTransactionDuration), transaction, endTimestamp);\n });\n idleTransaction.setTag('idleTimeout', this._configuredIdleTimeout);\n return idleTransaction;\n };\n /**\n * @inheritDoc\n */\n BrowserTracing.id = 'BrowserTracing';\n return BrowserTracing;\n}());\nexport { BrowserTracing };\n/**\n * Gets transaction context from a sentry-trace meta.\n *\n * @returns Transaction context data from the header or undefined if there's no header or the header is malformed\n */\nexport function getHeaderContext() {\n var header = getMetaContent('sentry-trace');\n if (header) {\n return extractTraceparentData(header);\n }\n return undefined;\n}\n/** Returns the value of a meta tag */\nexport function getMetaContent(metaName) {\n var el = getGlobalObject().document.querySelector(\"meta[name=\" + metaName + \"]\");\n return el ? el.getAttribute('content') : null;\n}\n/** Adjusts transaction value based on max transaction duration */\nfunction adjustTransactionDuration(maxDuration, transaction, endTimestamp) {\n var diff = endTimestamp - transaction.startTimestamp;\n var isOutdatedTransaction = endTimestamp && (diff > maxDuration || diff < 0);\n if (isOutdatedTransaction) {\n transaction.setStatus('deadline_exceeded');\n transaction.setTag('maxTransactionDurationExceeded', 'true');\n }\n}\n//# sourceMappingURL=browsertracing.js.map","import { addExtensionMethods } from './hubextensions';\nimport * as Integrations from './integrations';\nexport { Integrations };\n// This is already exported as part of `Integrations` above (and for the moment will remain so for\n// backwards compatibility), but that interferes with treeshaking, so we also export it separately\n// here.\n//\n// Previously we expected users to import tracing integrations like\n//\n// import { Integrations } from '@sentry/tracing';\n// const instance = new Integrations.BrowserTracing();\n//\n// This makes the integrations unable to be treeshaken though. To address this, we now have\n// this individual export. We now expect users to consume BrowserTracing like so:\n//\n// import { BrowserTracing } from '@sentry/tracing';\n// const instance = new BrowserTracing();\n//\n// For an example of of the new usage of BrowserTracing, see @sentry/nextjs index.client.ts\nexport { BrowserTracing } from './browser';\nexport { Span, spanStatusfromHttpCode } from './span';\n// eslint-disable-next-line deprecation/deprecation\nexport { SpanStatus } from './spanstatus';\nexport { Transaction } from './transaction';\nexport { \n// TODO deprecate old name in v7\ninstrumentOutgoingRequests as registerRequestInstrumentation, defaultRequestInstrumentationOptions, } from './browser';\nexport { IdleTransaction } from './idletransaction';\nexport { startIdleTransaction } from './hubextensions';\n// We are patching the global object with our hub extension methods\naddExtensionMethods();\nexport { addExtensionMethods };\nexport { extractTraceparentData, getActiveTransaction, hasTracingEnabled, stripUrlQueryAndFragment, TRACEPARENT_REGEXP, } from './utils';\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport { dropUndefinedKeys, timestampWithMs, uuid4 } from '@sentry/utils';\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\nvar SpanRecorder = /** @class */ (function () {\n function SpanRecorder(maxlen) {\n if (maxlen === void 0) { maxlen = 1000; }\n this.spans = [];\n this._maxlen = maxlen;\n }\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n SpanRecorder.prototype.add = function (span) {\n if (this.spans.length > this._maxlen) {\n span.spanRecorder = undefined;\n }\n else {\n this.spans.push(span);\n }\n };\n return SpanRecorder;\n}());\nexport { SpanRecorder };\n/**\n * Span contains all data about a span\n */\nvar Span = /** @class */ (function () {\n /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */\n function Span(spanContext) {\n /**\n * @inheritDoc\n */\n this.traceId = uuid4();\n /**\n * @inheritDoc\n */\n this.spanId = uuid4().substring(16);\n /**\n * Timestamp in seconds when the span was created.\n */\n this.startTimestamp = timestampWithMs();\n /**\n * @inheritDoc\n */\n this.tags = {};\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.data = {};\n if (!spanContext) {\n return this;\n }\n if (spanContext.traceId) {\n this.traceId = spanContext.traceId;\n }\n if (spanContext.spanId) {\n this.spanId = spanContext.spanId;\n }\n if (spanContext.parentSpanId) {\n this.parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this.sampled = spanContext.sampled;\n }\n if (spanContext.op) {\n this.op = spanContext.op;\n }\n if (spanContext.description) {\n this.description = spanContext.description;\n }\n if (spanContext.data) {\n this.data = spanContext.data;\n }\n if (spanContext.tags) {\n this.tags = spanContext.tags;\n }\n if (spanContext.status) {\n this.status = spanContext.status;\n }\n if (spanContext.startTimestamp) {\n this.startTimestamp = spanContext.startTimestamp;\n }\n if (spanContext.endTimestamp) {\n this.endTimestamp = spanContext.endTimestamp;\n }\n }\n /**\n * @inheritDoc\n * @deprecated\n */\n Span.prototype.child = function (spanContext) {\n return this.startChild(spanContext);\n };\n /**\n * @inheritDoc\n */\n Span.prototype.startChild = function (spanContext) {\n var childSpan = new Span(__assign(__assign({}, spanContext), { parentSpanId: this.spanId, sampled: this.sampled, traceId: this.traceId }));\n childSpan.spanRecorder = this.spanRecorder;\n if (childSpan.spanRecorder) {\n childSpan.spanRecorder.add(childSpan);\n }\n childSpan.transaction = this.transaction;\n return childSpan;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.setTag = function (key, value) {\n var _a;\n this.tags = __assign(__assign({}, this.tags), (_a = {}, _a[key] = value, _a));\n return this;\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n Span.prototype.setData = function (key, value) {\n var _a;\n this.data = __assign(__assign({}, this.data), (_a = {}, _a[key] = value, _a));\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.setStatus = function (value) {\n this.status = value;\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.setHttpStatus = function (httpStatus) {\n this.setTag('http.status_code', String(httpStatus));\n var spanStatus = spanStatusfromHttpCode(httpStatus);\n if (spanStatus !== 'unknown_error') {\n this.setStatus(spanStatus);\n }\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.isSuccess = function () {\n return this.status === 'ok';\n };\n /**\n * @inheritDoc\n */\n Span.prototype.finish = function (endTimestamp) {\n this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampWithMs();\n };\n /**\n * @inheritDoc\n */\n Span.prototype.toTraceparent = function () {\n var sampledString = '';\n if (this.sampled !== undefined) {\n sampledString = this.sampled ? '-1' : '-0';\n }\n return this.traceId + \"-\" + this.spanId + sampledString;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.toContext = function () {\n return dropUndefinedKeys({\n data: this.data,\n description: this.description,\n endTimestamp: this.endTimestamp,\n op: this.op,\n parentSpanId: this.parentSpanId,\n sampled: this.sampled,\n spanId: this.spanId,\n startTimestamp: this.startTimestamp,\n status: this.status,\n tags: this.tags,\n traceId: this.traceId,\n });\n };\n /**\n * @inheritDoc\n */\n Span.prototype.updateWithContext = function (spanContext) {\n var _a, _b, _c, _d, _e;\n this.data = (_a = spanContext.data, (_a !== null && _a !== void 0 ? _a : {}));\n this.description = spanContext.description;\n this.endTimestamp = spanContext.endTimestamp;\n this.op = spanContext.op;\n this.parentSpanId = spanContext.parentSpanId;\n this.sampled = spanContext.sampled;\n this.spanId = (_b = spanContext.spanId, (_b !== null && _b !== void 0 ? _b : this.spanId));\n this.startTimestamp = (_c = spanContext.startTimestamp, (_c !== null && _c !== void 0 ? _c : this.startTimestamp));\n this.status = spanContext.status;\n this.tags = (_d = spanContext.tags, (_d !== null && _d !== void 0 ? _d : {}));\n this.traceId = (_e = spanContext.traceId, (_e !== null && _e !== void 0 ? _e : this.traceId));\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.getTraceContext = function () {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this.traceId,\n });\n };\n /**\n * @inheritDoc\n */\n Span.prototype.toJSON = function () {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n start_timestamp: this.startTimestamp,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.endTimestamp,\n trace_id: this.traceId,\n });\n };\n return Span;\n}());\nexport { Span };\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\nexport function spanStatusfromHttpCode(httpStatus) {\n if (httpStatus < 400 && httpStatus >= 100) {\n return 'ok';\n }\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return 'unauthenticated';\n case 403:\n return 'permission_denied';\n case 404:\n return 'not_found';\n case 409:\n return 'already_exists';\n case 413:\n return 'failed_precondition';\n case 429:\n return 'resource_exhausted';\n default:\n return 'invalid_argument';\n }\n }\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return 'unimplemented';\n case 503:\n return 'unavailable';\n case 504:\n return 'deadline_exceeded';\n default:\n return 'internal_error';\n }\n }\n return 'unknown_error';\n}\n//# sourceMappingURL=span.js.map","import { __assign, __extends } from \"tslib\";\nimport { getCurrentHub, Hub } from '@sentry/hub';\nimport { dropUndefinedKeys, isInstanceOf, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { Span as SpanClass, SpanRecorder } from './span';\n/** JSDoc */\nvar Transaction = /** @class */ (function (_super) {\n __extends(Transaction, _super);\n /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n */\n function Transaction(transactionContext, hub) {\n var _this = _super.call(this, transactionContext) || this;\n _this._measurements = {};\n /**\n * The reference to the current hub.\n */\n _this._hub = getCurrentHub();\n if (isInstanceOf(hub, Hub)) {\n _this._hub = hub;\n }\n _this.name = transactionContext.name || '';\n _this.metadata = transactionContext.metadata || {};\n _this._trimEnd = transactionContext.trimEnd;\n // this is because transactions are also spans, and spans have a transaction pointer\n _this.transaction = _this;\n return _this;\n }\n /**\n * JSDoc\n */\n Transaction.prototype.setName = function (name) {\n this.name = name;\n };\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n Transaction.prototype.initSpanRecorder = function (maxlen) {\n if (maxlen === void 0) { maxlen = 1000; }\n if (!this.spanRecorder) {\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n this.spanRecorder.add(this);\n };\n /**\n * Set observed measurements for this transaction.\n * @hidden\n */\n Transaction.prototype.setMeasurements = function (measurements) {\n this._measurements = __assign({}, measurements);\n };\n /**\n * Set metadata for this transaction.\n * @hidden\n */\n Transaction.prototype.setMetadata = function (newMetadata) {\n this.metadata = __assign(__assign({}, this.metadata), newMetadata);\n };\n /**\n * @inheritDoc\n */\n Transaction.prototype.finish = function (endTimestamp) {\n var _this = this;\n // This transaction is already finished, so we should not flush it again.\n if (this.endTimestamp !== undefined) {\n return undefined;\n }\n if (!this.name) {\n IS_DEBUG_BUILD && logger.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');\n this.name = '<unlabeled transaction>';\n }\n // just sets the end timestamp\n _super.prototype.finish.call(this, endTimestamp);\n if (this.sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n IS_DEBUG_BUILD && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n var client = this._hub.getClient();\n var transport = client && client.getTransport && client.getTransport();\n if (transport && transport.recordLostEvent) {\n transport.recordLostEvent('sample_rate', 'transaction');\n }\n return undefined;\n }\n var finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(function (s) { return s !== _this && s.endTimestamp; }) : [];\n if (this._trimEnd && finishedSpans.length > 0) {\n this.endTimestamp = finishedSpans.reduce(function (prev, current) {\n if (prev.endTimestamp && current.endTimestamp) {\n return prev.endTimestamp > current.endTimestamp ? prev : current;\n }\n return prev;\n }).endTimestamp;\n }\n var transaction = {\n contexts: {\n trace: this.getTraceContext(),\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.endTimestamp,\n transaction: this.name,\n type: 'transaction',\n sdkProcessingMetadata: this.metadata,\n };\n var hasMeasurements = Object.keys(this._measurements).length > 0;\n if (hasMeasurements) {\n IS_DEBUG_BUILD &&\n logger.log('[Measurements] Adding measurements to transaction', JSON.stringify(this._measurements, undefined, 2));\n transaction.measurements = this._measurements;\n }\n IS_DEBUG_BUILD && logger.log(\"[Tracing] Finishing \" + this.op + \" transaction: \" + this.name + \".\");\n return this._hub.captureEvent(transaction);\n };\n /**\n * @inheritDoc\n */\n Transaction.prototype.toContext = function () {\n var spanContext = _super.prototype.toContext.call(this);\n return dropUndefinedKeys(__assign(__assign({}, spanContext), { name: this.name, trimEnd: this._trimEnd }));\n };\n /**\n * @inheritDoc\n */\n Transaction.prototype.updateWithContext = function (transactionContext) {\n var _a;\n _super.prototype.updateWithContext.call(this, transactionContext);\n this.name = (_a = transactionContext.name, (_a !== null && _a !== void 0 ? _a : ''));\n this._trimEnd = transactionContext.trimEnd;\n return this;\n };\n return Transaction;\n}(SpanClass));\nexport { Transaction };\n//# sourceMappingURL=transaction.js.map","import { getCurrentHub } from '@sentry/hub';\n/**\n * The `extractTraceparentData` function and `TRACEPARENT_REGEXP` constant used\n * to be declared in this file. It was later moved into `@sentry/utils` as part of a\n * move to remove `@sentry/tracing` dependencies from `@sentry/node` (`extractTraceparentData`\n * is the only tracing function used by `@sentry/node`).\n *\n * These exports are kept here for backwards compatability's sake.\n *\n * TODO(v7): Reorganize these exports\n *\n * See https://github.com/getsentry/sentry-javascript/issues/4642 for more details.\n */\nexport { TRACEPARENT_REGEXP, extractTraceparentData } from '@sentry/utils';\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nexport function hasTracingEnabled(maybeOptions) {\n var client = getCurrentHub().getClient();\n var options = maybeOptions || (client && client.getOptions());\n return !!options && ('tracesSampleRate' in options || 'tracesSampler' in options);\n}\n/** Grabs active transaction off scope, if any */\nexport function getActiveTransaction(maybeHub) {\n var hub = maybeHub || getCurrentHub();\n var scope = hub.getScope();\n return scope && scope.getTransaction();\n}\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nexport function msToSec(time) {\n return time / 1000;\n}\n/**\n * Converts from seconds to milliseconds\n * @param time time in seconds\n */\nexport function secToMs(time) {\n return time * 1000;\n}\n// so it can be used in manual instrumentation without necessitating a hard dependency on @sentry/utils\nexport { stripUrlQueryAndFragment } from '@sentry/utils';\n//# sourceMappingURL=utils.js.map","/**\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","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 { __read } from \"tslib\";\nimport { SentryError } from './error';\nimport { IS_DEBUG_BUILD } from './flags';\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 (!IS_DEBUG_BUILD) {\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 { __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","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","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.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/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `getGlobalObject`'s return value\n * @returns the singleton\n */\nexport function getGlobalSingleton(name, creator, obj) {\n var global = (obj || getGlobalObject());\n var __SENTRY__ = (global.__SENTRY__ = global.__SENTRY__ || {});\n var singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n//# sourceMappingURL=global.js.map","import { __assign, __values } from \"tslib\";\nimport { IS_DEBUG_BUILD } from './flags';\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 IS_DEBUG_BUILD && 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 IS_DEBUG_BUILD &&\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","/* 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","import { __read, __spread } from \"tslib\";\nimport { IS_DEBUG_BUILD } from './flags';\nimport { getGlobalObject, getGlobalSingleton } 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 disable sentry console instrumentations.\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 var originalConsole = global.console;\n var wrappedLevels = {};\n // Restore all wrapped console methods\n CONSOLE_LEVELS.forEach(function (level) {\n // TODO(v7): Remove this check as it's only needed for Node 6\n var originalWrappedFunc = originalConsole[level] && originalConsole[level].__sentry_original__;\n if (level in global.console && originalWrappedFunc) {\n wrappedLevels[level] = originalConsole[level];\n originalConsole[level] = originalWrappedFunc;\n }\n });\n try {\n return callback();\n }\n finally {\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(function (level) {\n originalConsole[level] = wrappedLevels[level];\n });\n }\n}\nfunction makeLogger() {\n var enabled = false;\n var logger = {\n enable: function () {\n enabled = true;\n },\n disable: function () {\n enabled = false;\n },\n };\n if (IS_DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(function (name) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (enabled) {\n consoleSandbox(function () {\n var _a;\n (_a = global.console)[name].apply(_a, __spread([PREFIX + \"[\" + name + \"]:\"], args));\n });\n }\n };\n });\n }\n else {\n CONSOLE_LEVELS.forEach(function (name) {\n logger[name] = function () { return undefined; };\n });\n }\n return logger;\n}\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nvar logger;\nif (IS_DEBUG_BUILD) {\n logger = getGlobalSingleton('logger', makeLogger);\n}\nelse {\n logger = makeLogger();\n}\nexport { logger };\n//# sourceMappingURL=logger.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","/*\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 *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These fags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\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 { 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","/* 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 } from \"tslib\";\nimport { isError, isEvent, isNaN, isSyntheticEvent } from './is';\nimport { memoBuilder } from './memo';\nimport { convertToPlainObject } 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 visit('', input, depth, maxProperties);\n }\n catch (err) {\n return { ERROR: \"**non-serializable** (\" + err + \")\" };\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 normalized = normalize(object, depth);\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n return normalized;\n}\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(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 the value has a `toJSON` method, see if we can bail and let it do the work\n var valueWithToJSON = value;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n return valueWithToJSON.toJSON();\n }\n catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n // Get the simple cases out of the way first\n if (value === null || (['number', 'boolean', 'string'].includes(typeof value) && !isNaN(value))) {\n return value;\n }\n var stringified = stringifyValue(key, value);\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n // We're also done if we've reached the max depth\n if (depth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n var normalized = (Array.isArray(value) ? [] : {});\n var numAdded = 0;\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n var visitable = (isError(value) || isEvent(value) ? convertToPlainObject(value) : value);\n for (var visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n // Recursively visit all the child nodes\n var visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, depth - 1, maxProperties, memo);\n numAdded += 1;\n }\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n // Return accumulated values\n return normalized;\n}\n// TODO remove this in v7 (this means the method will no longer be exported, under any name)\nexport { visit as walk };\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(key, \n// this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n// our internal use, it'll do\nvalue) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && value._events) {\n return '[Domain]';\n }\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n // It's safe to use `global`, `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 if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\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 // this catches `undefined` (but not `null`, which is a primitive and can be serialized on its own)\n if (value === void 0) {\n return '[undefined]';\n }\n if (typeof value === 'function') {\n return \"[Function: \" + getFunctionName(value) + \"]\";\n }\n if (typeof value === 'symbol') {\n return \"[\" + String(value) + \"]\";\n }\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return \"[BigInt: \" + String(value) + \"]\";\n }\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n return \"[object \" + Object.getPrototypeOf(value).constructor.name + \"]\";\n }\n catch (err) {\n return \"**non-serializable** (\" + err + \")\";\n }\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","import { __assign, __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 convertToPlainObject(value) {\n var newObj = value;\n if (isError(value)) {\n newObj = __assign({ message: value.message, name: value.name, stack: value.stack }, getOwnProperties(value));\n }\n else if (isEvent(value)) {\n var event_1 = value;\n newObj = __assign({ type: event_1.type, target: serializeEventTarget(event_1.target), currentTarget: serializeEventTarget(event_1.currentTarget) }, getOwnProperties(event_1));\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = event_1.detail;\n }\n }\n return newObj;\n}\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n }\n catch (_oO) {\n return '<unknown>';\n }\n}\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n var extractedProps = {};\n for (var property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = obj[property];\n }\n }\n return extractedProps;\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(convertToPlainObject(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 rv = {};\n try {\n for (var _b = __values(Object.keys(val)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (typeof val[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(val[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 { 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 { __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 { __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","/**\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 { 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 { IS_DEBUG_BUILD } from './flags';\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 IS_DEBUG_BUILD &&\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","/* 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 { 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","var _global = (typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}); _global.SENTRY_RELEASE={id:\"5f1f4533054e713ecde711aacdcfd5029995d749\"};\n _global.SENTRY_RELEASES=_global.SENTRY_RELEASES || {};\n _global.SENTRY_RELEASES[\"website@bungalow\"]={id:\"5f1f4533054e713ecde711aacdcfd5029995d749\"};\n "],"names":["installedIntegrations","filterDuplicates","integrations","reduce","acc","every","accIntegration","name","push","getIntegrationsToSetup","options","defaultIntegrations","userIntegrations","Array","isArray","filter","userIntegration","integrationsNames","map","i","alwaysLastToRun","indexOf","apply","splice","setupIntegration","integration","setupOnce","logger","log","setupIntegrations","forEach","ALREADY_SEEN_ERROR","BaseClient","backendClass","this","_integrations","_numProcessing","_backend","_options","dsn","_dsn","prototype","captureException","exception","hint","scope","_this","eventId","event_id","_process","_getBackend","eventFromException","then","event","_captureEvent","result","captureMessage","message","level","promisedEvent","is","eventFromMessage","String","captureEvent","originalException","captureSession","session","_isEnabled","release","warn","_sendSession","update","init","getDsn","getOptions","getTransport","flush","timeout","_isClientDoneProcessing","clientFinished","close","transportFlushed","enabled","initialized","getIntegration","id","_oO","_updateSessionFromEvent","e_1","_a","crashed","errored","exceptions","values","exceptions_1","exceptions_1_1","next","done","ex","value","mechanism","handled","e_1_1","error","return","call","sessionNonTerminal","status","shouldUpdateAndSend","errors","Number","sendSession","resolve","ticked","tick","interval","setInterval","clearInterval","undefined","_prepareEvent","_b","normalizeDepth","_c","normalizeMaxBreadth","prepared","timestamp","_applyClientOptions","_applyIntegrationsMetadata","finalScope","captureContext","clone","applyToEvent","evt","sdkProcessingMetadata","normalize","_normalizeEvent","depth","maxBreadth","normalized","breadcrumbs","b","data","user","contexts","extra","trace","baseClientNormalized","environment","dist","maxValueLength","request","url","integrationsArray","Object","keys","length","sdk","_sendEvent","sendEvent","_processEvent","finalEvent","reason","beforeSend","sampleRate","transport","recordLostEvent","outcome","category","isTransaction","type","Math","random","isInternalException","__sentry__","beforeSendResult","_ensureBeforeSendRv","processedEvent","getSession","promise","rv","nullErr","e","NoopTransport","_","BaseBackend","_transport","_setupTransport","_exception","_hint","_message","_level","_newTransport","_experiments","newTransport","api","_metadata","tunnel","env","send","BrowserBackend","_super","arguments","attachStacktrace","Info","transportOptions","sendClientReports","supports","requestOptions","fetchParameters","headers","BrowserClient","packages","version","showReportDialog","document","platform","addSentryBreadcrumb","UNKNOWN_FUNCTION","OPERA10_PRIORITY","OPERA11_PRIORITY","CHROME_PRIORITY","WINJS_PRIORITY","GECKO_PRIORITY","createFrame","filename","func","lineno","colno","frame","function","in_app","chromeRegex","chromeEvalRegex","chrome","line","parts","exec","isEval","subMatch","extractSafariExtensionDetails","chromeStackParser","geckoREgex","geckoEvalRegex","gecko","geckoStackParser","winjsRegex","winjs","winjsStackParser","opera10Regex","opera10","opera10StackParser","opera11Regex","opera11","opera11StackParser","isSafariExtension","isSafariWebExtension","split","exceptionFromError","frames","parseStackFrames","extractMessage","stacktrace","eventFromPlainObject","syntheticException","isUnhandledRejection","constructor","__serialized__","frames_1","eventFromError","stack","popSize","getPopSize","reactMinifiedRegexp","framesToPop","test","eventFromUnknownInput","Error","eventFromString","errorEvent","domException","name_1","tags","code","objectException","synthetic","input","frames_2","IS_DEBUG_BUILD","__SENTRY_DEBUG__","global","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","setTimeout","wrap","fn","before","wrapper","__sentry_wrapped__","sentryWrapped","args","slice","wrappedArguments","arg","addEventProcessor","property","hasOwnProperty","descriptor","getOwnPropertyDescriptor","configurable","defineProperty","get","injectReportDialog","script","createElement","async","src","onLoad","onload","injectionPoint","head","body","appendChild","SDK_NAME","windowIntegrations","_window","Sentry","Integrations","INTEGRATIONS","SeverityLevels","isSupportedSeverity","severityFromString","Warning","Log","Breadcrumbs","console","dom","fetch","history","sentry","xhr","addBreadcrumb","_consoleBreadcrumb","_domBreadcrumb","_xhrBreadcrumb","_fetchBreadcrumb","_historyBreadcrumb","_innerDomBreadcrumb","handlerData","target","keyAttrs","serializeAttribute","breadcrumb","endTimestamp","__sentry_own_request__","__sentry_xhr__","method","status_code","fetchData","match","response","from","to","parsedLoc","location","href","parsedFrom","parsedTo","path","protocol","host","relative","Dedupe","addGlobalEventProcessor","getCurrentHub","currentEvent","self","_shouldDropEvent","_previousEvent","previousEvent","_isSameMessageEvent","_isSameExceptionEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","previousException","_getExceptionFromEvent","currentException","currentFrames","_getFramesFromEvent","previousFrames","frameA","frameB","currentFingerprint","fingerprint","previousFingerprint","join","GlobalHandlers","_installFunc","onerror","_installGlobalOnErrorHandler","onunhandledrejection","_installGlobalOnUnhandledRejectionHandler","stackTraceLimit","key","installFunc","globalHandlerLog","getHubAndAttachStacktrace","hub","msg","column","_eventFromIncompleteOnError","_enhanceEventWithInitialFrame","addMechanismAndCapture","detail","_eventFromRejectionWithPrimitive","ERROR_TYPES_RE","groups","ev","ev0","ev0s","ev0sf","isNaN","parseInt","client","getClient","DEFAULT_KEY","DEFAULT_LIMIT","LinkedErrors","_key","_limit","limit","_handler","linkedErrors","_walkErrorTree","DEFAULT_EVENT_TARGET","TryCatch","XMLHttpRequest","eventTarget","requestAnimationFrame","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","_wrapEventTarget","original","_i","originalCallback","callback","handler","originalSend","xmlHttpRequestProps","prop","wrapOptions","originalFunction","proto","eventName","handleEvent","bind","err","originalRemoveEventListener","wrappedEventHandler","originalEventHandler","UserAgent","navigator","referrer","userAgent","Referer","initAndBind","clientClass","debug","enable","getScope","initialScope","bindClient","window_1","SENTRY_RELEASE","autoSessionTracking","startSessionTracking","getUser","lastEventId","forceLoad","startSessionOnHub","startSession","ignoreDuration","window","createClientReportEnvelope","discarded_events","clientReportItem","requestTypeToCategory","ty","tyStr","BaseTransport","_buffer","_rateLimits","_outcomes","_api","addEventListener","visibilityState","_flushOutcomes","_sendRequest","drain","outcomes","JSON","stringify","discardedEvents","quantity","envelope","_handleResponse","requestType","reject","_isRateLimited","_disabledUntil","Date","FetchTransport","fetchImpl","_fetch","sentryRequest","originalPayload","Promise","referrerPolicy","assign","add","catch","makeNewFetchTransport","nativeFetch","makeRequest","text","statusText","statusCode","bufferSize","XHR_READYSTATE_DONE","makeNewXHRTransport","_reject","header","onreadystatechange","readyState","getResponseHeader","open","setRequestHeader","forget","cachedFetchImpl","getNativeFetchImplementation","sandbox","hidden","contentWindow","removeChild","sendReport","isRealNavigator","toString","hasSendBeacon","sendBeacon","fetch_1","credentials","keepalive","XHRTransport","SENTRY_API_VERSION","API","metadata","_dsnObject","_tunnel","forceEnvelope","getBaseApiEndpoint","getStoreEndpoint","getStoreEndpointWithUrlEncodedAuth","getEnvelopeEndpointWithUrlEncodedAuth","initAPIDetails","initDsn","port","_getIngestEndpoint","projectId","_encodedAuth","sentry_key","publicKey","sentry_version","_getEnvelopeEndpoint","getReportDialogEndpoint","dsnLike","dialogOptions","endpoint","encodedOptions","encodeURIComponent","email","originalFunctionToString","FunctionToString","Function","context","DEFAULT_IGNORE_ERRORS","InboundFilters","self_1","clientOptions","_mergeOptions","internalOptions","allowUrls","whitelistUrls","denyUrls","blacklistUrls","ignoreErrors","ignoreInternal","_isSentryError","_isIgnoredError","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","_getPossibleEventMessages","some","pattern","oO","_getLastValidUrl","getSdkMetadataForEnvelopeHeader","enhanceEventWithSdkInfo","sdkInfo","createSessionEnvelope","envelopeHeaders","sent_at","toISOString","envelopeItem","sessionToSentryRequest","createEventEnvelope","eventType","transactionSampling","samplingMethod","rate","skippedNormalization","eventItem","sample_rates","eventToSentryRequest","useEnvelope","JSONStringifyError","newErr","innerErr","req","DEFAULT_TRANSPORT_BUFFER_SIZE","createTransport","buffer","rateLimits","envCategory","getRateLimitReason","requestTask","SDK_VERSION","API_VERSION","DEFAULT_BREADCRUMBS","Hub","_version","_stack","getStackTop","isOlderThan","top","pushScope","getStack","popScope","pop","withScope","_lastEventId","finalHint","_invokeClient","beforeBreadcrumb","_d","maxBreadcrumbs","mergedBreadcrumb","finalBreadcrumb","setUser","setTags","setExtras","extras","setTag","setExtra","setContext","configureScope","run","oldHub","makeMain","startSpan","_callExtensionMethod","startTransaction","customSamplingContext","traceHeaders","endSession","_sendSessionUpdate","layer","setSession","currentSession","carrier","getMainCarrier","__SENTRY__","extensions","registry","getHubFromCarrier","setHubOnCarrier","hasHubOnCarrier","getHubFromActiveDomain","activeDomain","domain","active","registryHubTopStack","_Oo","MAX_BREADCRUMBS","Scope","_notifyingListeners","_scopeListeners","_eventProcessors","_breadcrumbs","_user","_tags","_extra","_contexts","_sdkProcessingMetadata","newScope","_span","_session","_transactionName","_fingerprint","_requestSession","addScopeListener","_notifyScopeListeners","getRequestSession","setRequestSession","requestSession","setFingerprint","setLevel","setTransactionName","setTransaction","setSpan","span","getSpan","getTransaction","transaction","updatedScope","clear","maxCrumbs","min","clearBreadcrumbs","getTraceContext","transactionName","_applyFingerprint","_notifyEventProcessors","getGlobalEventProcessors","setSDKProcessingMetadata","newData","processors","index","processor","final","concat","Session","sid","duration","startingTime","started","ipAddress","ip_address","did","username","toJSON","attrs","user_agent","ExtraErrorData","enhanceEventWithErrorData","errorData","_extractErrorData","normalizedErrorData","e_2","nativeKeys","extraErrorInfo","serializedError","_e","_f","e_2_1","splitPathRe","splitPath","basename","ext","f","substr","TRACING_GETTER","BROWSER_TRACING_GETTER","VUE_OP","HOOKS","activate","create","destroy","mount","COMPONENT_NAME_REGEXP","ROOT_COMPONENT_NAME","ANONYMOUS_COMPONENT_NAME","Vue","_componentsCache","_applyTracingHooks","vm","$options","$_sentryPerfHook","_getComponentName","rootMount","spans","rootHandler","hook","now","time","_rootSpan","_finishRootSpan","$once","tracingIntegration","_tracingActivity","pushActivity","startChild","description","op","activeTransaction","getActiveTransaction","childHandler","operation","shouldTrack","tracingOptions","trackComponents","finish","hooks","internalHooks","internalHook","currentValue","attachProps","logErrors","tracing","_attachErrorHandler","_startTracing","$root","_componentTag","__file","unifiedFile","replace","c","toUpperCase","_rootSpanTimer","clearTimeout","popActivity","applyTracingHooks","mixin","beforeCreate","currentErrorHandler","config","errorHandler","info","componentName","propsData","lifecycleHook","util","callOnHub","FINISH_REASON_TAG","IDLE_TRANSACTION_FINISH_REASONS","registerErrorInstrumentation","errorCallback","status_1","setStatus","toTraceparent","sample","samplingContext","sampled","setMetadata","tracesSampler","parentSampled","tracesSampleRate","isValidSampleRate","_startTransaction","transactionContext","initSpanRecorder","maxSpans","startIdleTransaction","idleTimeout","onScope","_addTracingExtensions","_autoloadDatabaseIntegrations","packageToIntegrationMapping","mongodb","module","Mongo","mongoose","mysql","Mysql","pg","Postgres","mappedPackages","moduleName","pkg","p","addExtensionMethods","DEFAULT_IDLE_TIMEOUT","HEARTBEAT_INTERVAL","IdleTransactionSpanRecorder","_pushActivity","_popActivity","transactionSpanId","maxlen","spanId","IdleTransaction","_idleHub","_idleTimeout","_onScope","activities","_heartbeatCounter","_finished","_beforeFinishCallbacks","clearActiveTransaction","_initTimeout","spanRecorder","keepSpan","startTimestamp","registerBeforeFinishCallback","_pingHeartbeat","end_1","_beat","heartbeatString","_prevHeartbeatString","TRACEPARENT_REGEXP","RegExp","extractTraceparentData","traceparent","matches","traceId","parentSpanId","registerBackgroundTabDetection","statusType","bindReporter","metric","reportAllChanges","prevValue","forceReport","delta","generateUniqueID","floor","initMetric","entries","observe","PerformanceObserver","supportedEntryTypes","includes","po","l","getEntries","buffered","onHidden","cb","once","onHiddenOrPageHide","removeEventListener","getCLS","onReport","report","sessionValue","sessionEntries","entryHandler","entry","hadRecentInput","firstSessionEntry","lastSessionEntry","startTime","takeRecords","firstHiddenTime","initHiddenTime","Infinity","trackChanges","timeStamp","getVisibilityWatcher","getFID","visibilityWatcher","processingStart","disconnect","reportedMetricIDs","getLCP","stopListening_1","capture","MetricsInstrumentation","_reportAllChanges","_measurements","_performanceCursor","performance","mark","_trackCLS","_trackLCP","_trackFID","addPerformanceEntries","responseStartTimestamp","requestStartTimestamp","timeOrigin","entryType","addNavigationSpans","responseStart","requestStart","addMeasureSpans","firstHidden","shouldRecord","resourceName","origin","addResourceSpans","max","_trackNavigator","timeOrigin_1","oldValue","measurementTimestamp","normalizedValue","abs","_startChild","cls","setMeasurements","tagMetricInfo","_lcpEntry","_clsEntry","connection","effectiveType","isMeasurementValue","rtt","downlink","deviceMemory","hardwareConcurrency","addPerformanceNavigationTiming","addRequest","measureStartTimestamp","measureEndTimestamp","initiatorType","transferSize","encodedBodySize","decodedBodySize","eventEnd","end","start","responseEnd","ctx","isFinite","lcpEntry","clsEntry","element","trim","size","sources","source","node","DEFAULT_TRACING_ORIGINS","defaultRequestInstrumentationOptions","traceFetch","traceXHR","tracingOrigins","instrumentOutgoingRequests","shouldCreateSpanForRequest","urlMap","defaultShouldCreateSpan","origins","shouldCreateSpan","fetchCallback","xhrCallback","__span","setHttpStatus","Request","append","__sentry_xhr_span_id__","instrumentRoutingWithDefaults","customStartTransaction","startTransactionOnPageLoad","startTransactionOnLocationChange","startingUrl","pathname","DEFAULT_MAX_TRANSACTION_DURATION_SECONDS","DEFAULT_BROWSER_TRACING_OPTIONS","markBackgroundTransactions","maxTransactionDuration","routingInstrumentation","BrowserTracing","_configuredIdleTimeout","_emitOptionsWarning","_metricOptions","_metrics","_getCurrentHub","instrumentRouting","_createRouteTransaction","beforeNavigate","parentContextFromHeader","getHeaderContext","expandedContext","trimEnd","modifiedContext","finalContext","idleTransaction","adjustTransactionDuration","getMetaContent","metaName","el","querySelector","getAttribute","maxDuration","diff","isOutdatedTransaction","SpanRecorder","_maxlen","Span","spanContext","substring","child","childSpan","setData","httpStatus","spanStatus","spanStatusfromHttpCode","isSuccess","sampledString","toContext","updateWithContext","parent_span_id","span_id","trace_id","start_timestamp","Transaction","_hub","_trimEnd","setName","measurements","newMetadata","finishedSpans","s","prev","current","hasMeasurements","hasTracingEnabled","maybeOptions","maybeHub","msToSec","secToMs","Severity","htmlTreeAsString","elem","currentElem","MAX_TRAVERSE_HEIGHT","MAX_OUTPUT_LEN","out","height","len","separator","sepLength","nextStr","_htmlElementAsString","parentNode","reverse","className","classes","attr","tagName","toLowerCase","keyAttrPairs","keyAttr","keyAttrPair","allowedAttrs","getLocationHref","DSN_REGEX","isValidProtocol","dsnToString","withPassword","pass","dsnFromString","str","lastPath","projectMatch","dsnFromComponents","components","validateDsn","requiredComponents","component","makeDsn","createEnvelope","items","getEnvelopeType","firstItemHeader","serializeEnvelope","serializedHeaders","item","itemHeaders","payload","serializedPayload","setPrototypeOf","__proto__","setProtoOf","mixinProperties","obj","SentryError","_newTarget","fallbackGlobalObject","getGlobalObject","g","getGlobalSingleton","creator","singleton","lastHref","handlers","instrumented","instrument","instrumentConsole","instrumentDOM","instrumentXHR","instrumentFetch","instrumentHistory","instrumentError","instrumentUnhandledRejection","addInstrumentationHandler","triggerHandlers","originalConsoleMethod","originalFetch","getFetchMethod","getFetchUrl","fetchArgs","xhrproto","originalOpen","xhrInfo","onreadystatechangeHandler","readyStateArgs","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","debounceTimerID","lastCapturedEvent","debounceDuration","shouldShortcircuitPreviousDebounce","previous","shouldSkipDOMEvent","isContentEditable","makeDOMEventHandler","globalListener","triggerDOMHandler","globalDOMEventHandler","originalAddEventListener","listener","handlers_1","__sentry_instrumentation_handlers__","handlerForType","refCount","handlers_2","_oldOnErrorHandler","_oldOnUnhandledRejectionHandler","objectToString","isError","wat","isInstanceOf","isBuiltin","isErrorEvent","isDOMError","isDOMException","isString","isPrimitive","isPlainObject","isEvent","Event","isElement","Element","isRegExp","isThenable","Boolean","isSyntheticEvent","base","PREFIX","CONSOLE_LEVELS","consoleSandbox","originalConsole","wrappedLevels","originalWrappedFunc","__sentry_original__","makeLogger","disable","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","r","parseUrl","query","fragment","getFirstException","getEventDescription","firstException","addExceptionTypeValue","addExceptionMechanism","newMechanism","defaultMechanism","currentMechanism","mergedData","checkOrSetAlreadyCaught","__sentry_captured__","isBrowserBundle","__SENTRY_BROWSER_BUNDLE__","isNodeEnv","process","dynamicRequire","mod","require","loadModule","cwd","memoBuilder","hasWeakSet","WeakSet","inner","memoize","has","unmemoize","delete","maxProperties","visit","ERROR","normalizeToSize","object","maxSize","jsonSize","memo","valueWithToJSON","stringified","stringifyValue","startsWith","numAdded","visitable","visitKey","visitValue","_events","getPrototypeOf","utf8Length","encodeURI","fill","replacementFactory","wrapped","markFunctionWrapped","addNonEnumerableProperty","writable","getOriginalFunction","urlEncode","convertToPlainObject","newObj","getOwnProperties","event_1","serializeEventTarget","currentTarget","CustomEvent","extractedProps","extractExceptionKeysForMessage","maxLength","sort","includedKeys","serialized","dropUndefinedKeys","val","makePromiseBuffer","isReady","remove","task","taskProducer","counter","capturedSetTimeout","$","DEFAULT_RETRY_AFTER","parseRetryAfterHeader","headerDelay","headerDate","parse","disabledUntil","limits","all","isRateLimited","updateRateLimits","updatedRateLimits","rateLimitHeader","retryAfterHeader","parameters","delay","STACKTRACE_LIMIT","createStackParser","parsers","sortedParsers","a","skipFirst","sortedParsers_1","sortedParsers_1_1","parser","stripSentryFramesAndReverse","localStack","firstFrameFunction","lastFrameFunction","defaultFunctionName","getFunctionName","eventStatusFromHttpCode","truncate","safeJoin","delimiter","output","isMatchingPattern","supportsFetch","Headers","Response","isNativeFetch","supportsNativeFetch","doc","supportsReferrerPolicy","supportsHistory","isChromePackagedApp","app","runtime","hasHistoryApi","pushState","replaceState","resolvedSyncPromise","SyncPromise","rejectedSyncPromise","executor","_state","_handlers","_resolve","_setResult","state","_value","_executeHandlers","cachedHandlers","onfulfilled","onrejected","finally","onfinally","isRejected","dateTimestampSource","nowSeconds","getBrowserPerformance","getNodePerformance","perfHooks","platformPerformance","timestampSource","dateTimestampInSeconds","timestampInSeconds","timestampWithMs","browserPerformanceTimeOrigin","threshold","performanceNow","dateNow","timeOriginDelta","timeOriginIsReliable","navigationStart","timing","hasNavigationStart","navigationStartDelta","navigationStartIsReliable","_global","SENTRY_RELEASES"],"sourceRoot":""}