{"version":3,"file":"js.cookie-81cda694.js","sources":["../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/handlers.js","../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalError.js","../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalUnhandledRejection.js","../../node_modules/@sentry/core/build/esm/tracing/sentryNonRecordingSpan.js","../../node_modules/@sentry/core/build/esm/tracing/logSpans.js","../../node_modules/@sentry/core/build/esm/tracing/sampling.js","../../node_modules/@sentry/core/build/esm/utils-hoist/dsn.js","../../node_modules/@sentry/core/build/esm/utils-hoist/envelope.js","../../node_modules/@sentry/core/build/esm/envelope.js","../../node_modules/@sentry/core/build/esm/tracing/measurement.js","../../node_modules/@sentry/core/build/esm/tracing/sentrySpan.js","../../node_modules/@sentry/core/build/esm/tracing/trace.js","../../node_modules/@sentry/core/build/esm/api.js","../../node_modules/@sentry/core/build/esm/integration.js","../../node_modules/@sentry/core/build/esm/utils-hoist/clientreport.js","../../node_modules/@sentry/core/build/esm/utils-hoist/error.js","../../node_modules/@sentry/core/build/esm/utils/eventUtils.js","../../node_modules/@sentry/core/build/esm/utils/transactionEvent.js","../../node_modules/@sentry/core/build/esm/client.js","../../node_modules/@sentry/core/build/esm/sdk.js","../../node_modules/@sentry/core/build/esm/utils-hoist/promisebuffer.js","../../node_modules/@sentry/core/build/esm/utils-hoist/ratelimit.js","../../node_modules/@sentry/core/build/esm/transports/base.js","../../node_modules/@sentry/core/build/esm/utils/ipAddress.js","../../node_modules/@sentry/core/build/esm/utils/sdkMetadata.js","../../node_modules/@sentry/core/build/esm/breadcrumbs.js","../../node_modules/@sentry/core/build/esm/integrations/functiontostring.js","../../node_modules/@sentry/core/build/esm/integrations/inboundfilters.js","../../node_modules/@sentry/core/build/esm/utils-hoist/aggregate-errors.js","../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/console.js","../../node_modules/@sentry/core/build/esm/utils-hoist/severity.js","../../node_modules/@sentry/core/build/esm/integrations/dedupe.js","../../node_modules/@sentry/core/build/esm/utils-hoist/url.js","../../node_modules/@sentry/core/build/esm/utils-hoist/breadcrumb-log-level.js","../../node_modules/@sentry/core/build/esm/utils-hoist/supports.js","../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/fetch.js","../../node_modules/@sentry/core/build/esm/utils-hoist/env.js","../../node_modules/@sentry/browser/build/npm/esm/helpers.js","../../node_modules/@sentry/browser/build/npm/esm/eventbuilder.js","../../node_modules/@sentry/browser/build/npm/esm/client.js","../../node_modules/@sentry-internal/browser-utils/build/esm/debug-build.js","../../node_modules/@sentry-internal/browser-utils/build/esm/types.js","../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/dom.js","../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/history.js","../../node_modules/@sentry-internal/browser-utils/build/esm/getNativeImplementation.js","../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/xhr.js","../../node_modules/@sentry/browser/build/npm/esm/transports/fetch.js","../../node_modules/@sentry/browser/build/npm/esm/stack-parsers.js","../../node_modules/@sentry/browser/build/npm/esm/debug-build.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/breadcrumbs.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/browserapierrors.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/browsersession.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/globalhandlers.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/httpcontext.js","../../node_modules/@sentry/browser/build/npm/esm/integrations/linkederrors.js","../../node_modules/@sentry/browser/build/npm/esm/sdk.js","../../node_modules/@sentry/vue/build/esm/constants.js","../../node_modules/@sentry/vue/build/esm/debug-build.js","../../node_modules/@sentry/vue/build/esm/vendor/components.js","../../node_modules/@sentry/vue/build/esm/errorhandler.js","../../node_modules/@sentry/vue/build/esm/tracing.js","../../node_modules/@sentry/vue/build/esm/integration.js","../../node_modules/@sentry/vue/build/esm/sdk.js","../../node_modules/vue-router/dist/vue-router.mjs","../../node_modules/js-cookie/dist/js.cookie.mjs"],"sourcesContent":["import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../logger.js';\nimport { getFunctionName } from '../stacktrace.js';\n\n// We keep the handlers globally\nconst handlers = {};\nconst instrumented = {};\n\n/** Add a handler function. */\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach(key => {\n handlers[key ] = undefined;\n });\n}\n\n/** Maybe run an instrumentation function, unless it was already called. */\nfunction maybeInstrument(type, instrumentFn) {\n if (!instrumented[type]) {\n instrumented[type] = true;\n try {\n instrumentFn();\n } catch (e) {\n DEBUG_BUILD && logger.error(`Error while instrumenting ${type}`, e);\n }\n }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = type && handlers[type];\n if (!typeHandlers) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nexport { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers };\n//# sourceMappingURL=handlers.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnErrorHandler = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalErrorInstrumentationHandler(handler) {\n const type = 'error';\n addHandler(type, handler);\n maybeInstrument(type, instrumentError);\n}\n\nfunction instrumentError() {\n _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n\n // Note: The reason we are doing window.onerror instead of window.addEventListener('error')\n // is that we are using this handler in the Loader Script, to handle buffered errors consistently\n GLOBAL_OBJ.onerror = function (\n msg,\n url,\n line,\n column,\n error,\n ) {\n const handlerData = {\n column,\n error,\n line,\n msg,\n url,\n };\n triggerHandlers('error', handlerData);\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalErrorInstrumentationHandler };\n//# sourceMappingURL=globalError.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnUnhandledRejectionHandler = null;\n\n/**\n * Add an instrumentation handler for when an unhandled promise rejection is captured.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalUnhandledRejectionInstrumentationHandler(\n handler,\n) {\n const type = 'unhandledrejection';\n addHandler(type, handler);\n maybeInstrument(type, instrumentUnhandledRejection);\n}\n\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;\n\n // Note: The reason we are doing window.onunhandledrejection instead of window.addEventListener('unhandledrejection')\n // is that we are using this handler in the Loader Script, to handle buffered rejections consistently\n GLOBAL_OBJ.onunhandledrejection = function (e) {\n const handlerData = e;\n triggerHandlers('unhandledrejection', handlerData);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n\n GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalUnhandledRejectionInstrumentationHandler };\n//# sourceMappingURL=globalUnhandledRejection.js.map\n","import { generateTraceId, generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { TRACE_FLAG_NONE } from '../utils/spanUtils.js';\n\n/**\n * A Sentry Span that is non-recording, meaning it will not be sent to Sentry.\n */\nclass SentryNonRecordingSpan {\n\n constructor(spanContext = {}) {\n this._traceId = spanContext.traceId || generateTraceId();\n this._spanId = spanContext.spanId || generateSpanId();\n }\n\n /** @inheritdoc */\n spanContext() {\n return {\n spanId: this._spanId,\n traceId: this._traceId,\n traceFlags: TRACE_FLAG_NONE,\n };\n }\n\n /** @inheritdoc */\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n end(_timestamp) {}\n\n /** @inheritdoc */\n setAttribute(_key, _value) {\n return this;\n }\n\n /** @inheritdoc */\n setAttributes(_values) {\n return this;\n }\n\n /** @inheritdoc */\n setStatus(_status) {\n return this;\n }\n\n /** @inheritdoc */\n updateName(_name) {\n return this;\n }\n\n /** @inheritdoc */\n isRecording() {\n return false;\n }\n\n /** @inheritdoc */\n addEvent(\n _name,\n _attributesOrStartTime,\n _startTime,\n ) {\n return this;\n }\n\n /** @inheritDoc */\n addLink(_link) {\n return this;\n }\n\n /** @inheritDoc */\n addLinks(_links) {\n return this;\n }\n\n /**\n * This should generally not be used,\n * but we need it for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n recordException(_exception, _time) {\n // noop\n }\n}\n\nexport { SentryNonRecordingSpan };\n//# sourceMappingURL=sentryNonRecordingSpan.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { spanToJSON, spanIsSampled, getRootSpan } from '../utils/spanUtils.js';\n\n/**\n * Print a log message for a started span.\n */\nfunction logSpanStart(span) {\n if (!DEBUG_BUILD) return;\n\n const { description = '< unknown name >', op = '< unknown op >', parent_span_id: parentSpanId } = spanToJSON(span);\n const { spanId } = span.spanContext();\n\n const sampled = spanIsSampled(span);\n const rootSpan = getRootSpan(span);\n const isRootSpan = rootSpan === span;\n\n const header = `[Tracing] Starting ${sampled ? 'sampled' : 'unsampled'} ${isRootSpan ? 'root ' : ''}span`;\n\n const infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`];\n\n if (parentSpanId) {\n infoParts.push(`parent ID: ${parentSpanId}`);\n }\n\n if (!isRootSpan) {\n const { op, description } = spanToJSON(rootSpan);\n infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`);\n if (op) {\n infoParts.push(`root op: ${op}`);\n }\n if (description) {\n infoParts.push(`root description: ${description}`);\n }\n }\n\n logger.log(`${header}\n ${infoParts.join('\\n ')}`);\n}\n\n/**\n * Print a log message for an ended span.\n */\nfunction logSpanEnd(span) {\n if (!DEBUG_BUILD) return;\n\n const { description = '< unknown name >', op = '< unknown op >' } = spanToJSON(span);\n const { spanId } = span.spanContext();\n const rootSpan = getRootSpan(span);\n const isRootSpan = rootSpan === span;\n\n const msg = `[Tracing] Finishing \"${op}\" ${isRootSpan ? 'root ' : ''}span \"${description}\" with ID ${spanId}`;\n logger.log(msg);\n}\n\nexport { logSpanEnd, logSpanStart };\n//# sourceMappingURL=logSpans.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled.js';\nimport { parseSampleRate } from '../utils/parseSampleRate.js';\n\n/**\n * Makes a sampling decision for the given options.\n *\n * Called every time a root span is created. Only root spans which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n */\nfunction sampleSpan(\n options,\n samplingContext,\n sampleRand,\n) {\n // nothing to do if span recording is not enabled\n if (!hasSpansEnabled(options)) {\n return [false];\n }\n\n let localSampleRateWasApplied = undefined;\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 let sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler({\n ...samplingContext,\n inheritOrSampleWith: fallbackSampleRate => {\n // If we have an incoming parent sample rate, we'll just use that one.\n // The sampling decision will be inherited because of the sample_rand that was generated when the trace reached the incoming boundaries of the SDK.\n if (typeof samplingContext.parentSampleRate === 'number') {\n return samplingContext.parentSampleRate;\n }\n\n // Fallback if parent sample rate is not on the incoming trace (e.g. if there is no baggage)\n // This is to provide backwards compatibility if there are incoming traces from older SDKs that don't send a parent sample rate or a sample rand. In these cases we just want to force either a sampling decision on the downstream traces via the sample rate.\n if (typeof samplingContext.parentSampled === 'boolean') {\n return Number(samplingContext.parentSampled);\n }\n\n return fallbackSampleRate;\n },\n });\n localSampleRateWasApplied = true;\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n localSampleRateWasApplied = true;\n }\n\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get.\n // (The only valid values are booleans or numbers between 0 and 1.)\n const parsedSampleRate = parseSampleRate(sampleRate);\n\n if (parsedSampleRate === undefined) {\n DEBUG_BUILD &&\n logger.warn(\n `[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n sampleRate,\n )} of type ${JSON.stringify(typeof sampleRate)}.`,\n );\n return [false];\n }\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 (!parsedSampleRate) {\n DEBUG_BUILD &&\n logger.log(\n `[Tracing] Discarding transaction because ${\n typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n }`,\n );\n return [false, parsedSampleRate, localSampleRateWasApplied];\n }\n\n // We always compare the sample rand for the current execution context against the chosen sample rate.\n // Read more: https://develop.sentry.dev/sdk/telemetry/traces/#propagated-random-value\n const shouldSample = sampleRand < parsedSampleRate;\n\n // if we're not going to keep it, we're done\n if (!shouldSample) {\n DEBUG_BUILD &&\n logger.log(\n `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n sampleRate,\n )})`,\n );\n }\n\n return [shouldSample, parsedSampleRate, localSampleRateWasApplied];\n}\n\nexport { sampleSpan };\n//# sourceMappingURL=sampling.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\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 */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host = '', port = '', lastPath = ''] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\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}\n\nfunction validateDsn(dsn) {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n//# sourceMappingURL=dsn.js.map\n","import { getSentryCarrier } from '../carrier.js';\nimport { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\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 */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\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 */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8 array.\n */\nfunction encodeUTF8(input) {\n const carrier = getSentryCarrier(GLOBAL_OBJ);\n return carrier.encodePolyfill ? carrier.encodePolyfill(input) : new TextEncoder().encode(input);\n}\n\n/**\n * Decode a UTF8 array to string.\n */\nfunction decodeUTF8(input) {\n const carrier = getSentryCarrier(GLOBAL_OBJ);\n return carrier.decodePolyfill ? carrier.decodePolyfill(input) : new TextDecoder().decode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.stringify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(env) {\n let buffer = typeof env === 'string' ? encodeUTF8(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(decodeUTF8(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates envelope item for a single span\n */\nfunction createSpanEnvelopeItem(spanJson) {\n const spanHeaders = {\n type: 'span',\n };\n\n return [spanHeaders, spanJson];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(attachment) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n profile_chunk: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n span: 'span',\n raw_security: 'security',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent?.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata?.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext.js';\nimport { dsnToString } from './utils-hoist/dsn.js';\nimport { getSdkMetadataForEnvelopeHeader, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem } from './utils-hoist/envelope.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { spanToJSON, showSpanDropWarning } from './utils/spanUtils.js';\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 = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates an envelope from a Session */\nfunction createSessionEnvelope(\n session,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const envelopeItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nfunction createEventEnvelope(\n event,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjust a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n enhanceEventWithSdkInfo(event, metadata?.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem = [{ type: eventType }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n\n/**\n * Create envelope from Span item.\n *\n * Takes an optional client and runs spans through `beforeSendSpan` if available.\n */\nfunction createSpanEnvelope(spans, client) {\n function dscHasRequiredProps(dsc) {\n return !!dsc.trace_id && !!dsc.public_key;\n }\n\n // For the moment we'll obtain the DSC from the first span in the array\n // This might need to be changed if we permit sending multiple spans from\n // different segments in one envelope\n const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n\n const dsn = client?.getDsn();\n const tunnel = client?.getOptions().tunnel;\n\n const headers = {\n sent_at: new Date().toISOString(),\n ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const beforeSendSpan = client?.getOptions().beforeSendSpan;\n const convertToSpanJSON = beforeSendSpan\n ? (span) => {\n const spanJson = spanToJSON(span);\n const processedSpan = beforeSendSpan(spanJson);\n\n if (!processedSpan) {\n showSpanDropWarning();\n return spanJson;\n }\n\n return processedSpan;\n }\n : spanToJSON;\n\n const items = [];\n for (const span of spans) {\n const spanJson = convertToSpanJSON(span);\n if (spanJson) {\n items.push(createSpanEnvelopeItem(spanJson));\n }\n }\n\n return createEnvelope(headers, items);\n}\n\nexport { createEventEnvelope, createSessionEnvelope, createSpanEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getRootSpan, getActiveSpan } from '../utils/spanUtils.js';\n\n/**\n * Adds a measurement to the active transaction on the current global scope. You can optionally pass in a different span\n * as the 4th parameter.\n */\nfunction setMeasurement(name, value, unit, activeSpan = getActiveSpan()) {\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n if (rootSpan) {\n DEBUG_BUILD && logger.log(`[Measurement] Setting measurement on root span: ${name} = ${value} ${unit}`);\n rootSpan.addEvent(name, {\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value,\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit ,\n });\n }\n}\n\n/**\n * Convert timed events to measurements.\n */\nfunction timedEventsToMeasurements(events) {\n if (!events || events.length === 0) {\n return undefined;\n }\n\n const measurements = {};\n events.forEach(event => {\n const attributes = event.attributes || {};\n const unit = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT] ;\n const value = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE] ;\n\n if (typeof unit === 'string' && typeof value === 'number') {\n measurements[event.name] = { value, unit };\n }\n });\n\n return measurements;\n}\n\nexport { setMeasurement, timedEventsToMeasurements };\n//# sourceMappingURL=measurement.js.map\n","import { getClient, getCurrentScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { createSpanEnvelope } from '../envelope.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport { generateTraceId, generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { TRACE_FLAG_SAMPLED, TRACE_FLAG_NONE, spanTimeInputToSeconds, getStatusMessage, getRootSpan, spanToJSON, getSpanDescendants, spanToTransactionTraceContext } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan } from './dynamicSamplingContext.js';\nimport { logSpanEnd } from './logSpans.js';\nimport { timedEventsToMeasurements } from './measurement.js';\nimport { getCapturedScopesOnSpan } from './utils.js';\n\nconst MAX_SPAN_COUNT = 1000;\n\n/**\n * Span contains all data about a span\n */\nclass SentrySpan {\n\n /** Epoch timestamp in seconds when the span started. */\n\n /** Epoch timestamp in seconds when the span ended. */\n\n /** Internal keeper of the status */\n\n /** The timed events added to this span. */\n\n /** if true, treat span as a standalone span (not part of a transaction) */\n\n /**\n * You should never call the constructor manually, always use `Sentry.startSpan()`\n * or other span methods.\n * @internal\n * @hideconstructor\n * @hidden\n */\n constructor(spanContext = {}) {\n this._traceId = spanContext.traceId || generateTraceId();\n this._spanId = spanContext.spanId || generateSpanId();\n this._startTime = spanContext.startTimestamp || timestampInSeconds();\n\n this._attributes = {};\n this.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'manual',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op,\n ...spanContext.attributes,\n });\n\n this._name = spanContext.name;\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.endTimestamp) {\n this._endTime = spanContext.endTimestamp;\n }\n\n this._events = [];\n\n this._isStandaloneSpan = spanContext.isStandalone;\n\n // If the span is already ended, ensure we finalize the span immediately\n if (this._endTime) {\n this._onSpanEnded();\n }\n }\n\n /** @inheritDoc */\n addLink(_link) {\n return this;\n }\n\n /** @inheritDoc */\n addLinks(_links) {\n return this;\n }\n\n /**\n * This should generally not be used,\n * but it is needed for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n recordException(_exception, _time) {\n // noop\n }\n\n /** @inheritdoc */\n spanContext() {\n const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this;\n return {\n spanId,\n traceId,\n traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE,\n };\n }\n\n /** @inheritdoc */\n setAttribute(key, value) {\n if (value === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._attributes[key];\n } else {\n this._attributes[key] = value;\n }\n\n return this;\n }\n\n /** @inheritdoc */\n setAttributes(attributes) {\n Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key]));\n return this;\n }\n\n /**\n * This should generally not be used,\n * but we need it for browser tracing where we want to adjust the start time afterwards.\n * USE THIS WITH CAUTION!\n *\n * @hidden\n * @internal\n */\n updateStartTime(timeInput) {\n this._startTime = spanTimeInputToSeconds(timeInput);\n }\n\n /**\n * @inheritDoc\n */\n setStatus(value) {\n this._status = value;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n updateName(name) {\n this._name = name;\n this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'custom');\n return this;\n }\n\n /** @inheritdoc */\n end(endTimestamp) {\n // If already ended, skip\n if (this._endTime) {\n return;\n }\n\n this._endTime = spanTimeInputToSeconds(endTimestamp);\n logSpanEnd(this);\n\n this._onSpanEnded();\n }\n\n /**\n * Get JSON representation of this span.\n *\n * @hidden\n * @internal This method is purely for internal purposes and should not be used outside\n * of SDK code. If you need to get a JSON representation of a span,\n * use `spanToJSON(span)` instead.\n */\n getSpanJSON() {\n return dropUndefinedKeys({\n data: this._attributes,\n description: this._name,\n op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n parent_span_id: this._parentSpanId,\n span_id: this._spanId,\n start_timestamp: this._startTime,\n status: getStatusMessage(this._status),\n timestamp: this._endTime,\n trace_id: this._traceId,\n origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,\n profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID] ,\n exclusive_time: this._attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME] ,\n measurements: timedEventsToMeasurements(this._events),\n is_segment: (this._isStandaloneSpan && getRootSpan(this) === this) || undefined,\n segment_id: this._isStandaloneSpan ? getRootSpan(this).spanContext().spanId : undefined,\n });\n }\n\n /** @inheritdoc */\n isRecording() {\n return !this._endTime && !!this._sampled;\n }\n\n /**\n * @inheritdoc\n */\n addEvent(\n name,\n attributesOrStartTime,\n startTime,\n ) {\n DEBUG_BUILD && logger.log('[Tracing] Adding an event to span:', name);\n\n const time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || timestampInSeconds();\n const attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {};\n\n const event = {\n name,\n time: spanTimeInputToSeconds(time),\n attributes,\n };\n\n this._events.push(event);\n\n return this;\n }\n\n /**\n * This method should generally not be used,\n * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set.\n * USE THIS WITH CAUTION!\n * @internal\n * @hidden\n * @experimental\n */\n isStandaloneSpan() {\n return !!this._isStandaloneSpan;\n }\n\n /** Emit `spanEnd` when the span is ended. */\n _onSpanEnded() {\n const client = getClient();\n if (client) {\n client.emit('spanEnd', this);\n }\n\n // A segment span is basically the root span of a local span tree.\n // So for now, this is either what we previously refer to as the root span,\n // or a standalone span.\n const isSegmentSpan = this._isStandaloneSpan || this === getRootSpan(this);\n\n if (!isSegmentSpan) {\n return;\n }\n\n // if this is a standalone span, we send it immediately\n if (this._isStandaloneSpan) {\n if (this._sampled) {\n sendSpanEnvelope(createSpanEnvelope([this], client));\n } else {\n DEBUG_BUILD &&\n logger.log('[Tracing] Discarding standalone span because its trace was not chosen to be sampled.');\n if (client) {\n client.recordDroppedEvent('sample_rate', 'span');\n }\n }\n return;\n }\n\n const transactionEvent = this._convertSpanToTransaction();\n if (transactionEvent) {\n const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope();\n scope.captureEvent(transactionEvent);\n }\n }\n\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */\n _convertSpanToTransaction() {\n // We can only convert finished spans\n if (!isFullFinishedSpan(spanToJSON(this))) {\n return undefined;\n }\n\n if (!this._name) {\n DEBUG_BUILD && logger.warn('Transaction has no name, falling back to ``.');\n this._name = '';\n }\n\n const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = getCapturedScopesOnSpan(this);\n\n if (this._sampled !== true) {\n return undefined;\n }\n\n // The transaction span itself as well as any potential standalone spans should be filtered out\n const finishedSpans = getSpanDescendants(this).filter(span => span !== this && !isStandaloneSpan(span));\n\n const spans = finishedSpans.map(span => spanToJSON(span)).filter(isFullFinishedSpan);\n\n const source = this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ;\n\n // remove internal root span attributes we don't need to send.\n /* eslint-disable @typescript-eslint/no-dynamic-delete */\n delete this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n spans.forEach(span => {\n delete span.data[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n });\n // eslint-enabled-next-line @typescript-eslint/no-dynamic-delete\n\n const transaction = {\n contexts: {\n trace: spanToTransactionTraceContext(this),\n },\n spans:\n // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here\n // we do not use spans anymore after this point\n spans.length > MAX_SPAN_COUNT\n ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT)\n : spans,\n start_timestamp: this._startTime,\n timestamp: this._endTime,\n transaction: this._name,\n type: 'transaction',\n sdkProcessingMetadata: {\n capturedSpanScope,\n capturedSpanIsolationScope,\n ...dropUndefinedKeys({\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(this),\n }),\n },\n ...(source && {\n transaction_info: {\n source,\n },\n }),\n };\n\n const measurements = timedEventsToMeasurements(this._events);\n const hasMeasurements = measurements && Object.keys(measurements).length;\n\n if (hasMeasurements) {\n DEBUG_BUILD &&\n logger.log(\n '[Measurements] Adding measurements to transaction event',\n JSON.stringify(measurements, undefined, 2),\n );\n transaction.measurements = measurements;\n }\n\n return transaction;\n }\n}\n\nfunction isSpanTimeInput(value) {\n return (value && typeof value === 'number') || value instanceof Date || Array.isArray(value);\n}\n\n// We want to filter out any incomplete SpanJSON objects\nfunction isFullFinishedSpan(input) {\n return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id;\n}\n\n/** `SentrySpan`s can be sent as a standalone span rather than belonging to a transaction */\nfunction isStandaloneSpan(span) {\n return span instanceof SentrySpan && span.isStandaloneSpan();\n}\n\n/**\n * Sends a `SpanEnvelope`.\n *\n * Note: If the envelope's spans are dropped, e.g. via `beforeSendSpan`,\n * the envelope will not be sent either.\n */\nfunction sendSpanEnvelope(envelope) {\n const client = getClient();\n if (!client) {\n return;\n }\n\n const spanItems = envelope[1];\n if (!spanItems || spanItems.length === 0) {\n client.recordDroppedEvent('before_send', 'span');\n return;\n }\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n client.sendEnvelope(envelope);\n}\n\nexport { SentrySpan };\n//# sourceMappingURL=sentrySpan.js.map\n","import { getMainCarrier } from '../carrier.js';\nimport { withScope, getCurrentScope, getIsolationScope, getClient } from '../currentScopes.js';\nimport { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { generateTraceId } from '../utils-hoist/propagationContext.js';\nimport { propagationContextFromHeaders } from '../utils-hoist/tracing.js';\nimport { handleCallbackErrors } from '../utils/handleCallbackErrors.js';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled.js';\nimport { parseSampleRate } from '../utils/parseSampleRate.js';\nimport { _setSpanForScope, _getSpanForScope } from '../utils/spanOnScope.js';\nimport { spanToJSON, addChildSpanToSpan, spanIsSampled, spanTimeInputToSeconds, getRootSpan } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan, freezeDscOnSpan } from './dynamicSamplingContext.js';\nimport { logSpanStart } from './logSpans.js';\nimport { sampleSpan } from './sampling.js';\nimport { SentryNonRecordingSpan } from './sentryNonRecordingSpan.js';\nimport { SentrySpan } from './sentrySpan.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\nimport { setCapturedScopesOnSpan } from './utils.js';\n\nconst SUPPRESS_TRACING_KEY = '__SENTRY_SUPPRESS_TRACING__';\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startSpan(options, callback) {\n const acs = getAcs();\n if (acs.startSpan) {\n return acs.startSpan(options, callback);\n }\n\n const spanArguments = parseSentrySpanArguments(options);\n const { forceTransaction, parentSpan: customParentSpan, scope: customScope } = options;\n\n // We still need to fork a potentially passed scope, as we set the active span on it\n // and we need to ensure that it is cleaned up properly once the span ends.\n const customForkedScope = customScope?.clone();\n\n return withScope(customForkedScope, () => {\n // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n const wrapper = getActiveSpanWrapper(customParentSpan);\n\n return wrapper(() => {\n const scope = getCurrentScope();\n const parentSpan = getParentSpan(scope);\n\n const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n const activeSpan = shouldSkipSpan\n ? new SentryNonRecordingSpan()\n : createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n });\n\n _setSpanForScope(scope, activeSpan);\n\n return handleCallbackErrors(\n () => callback(activeSpan),\n () => {\n // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n const { status } = spanToJSON(activeSpan);\n if (activeSpan.isRecording() && (!status || status === 'ok')) {\n activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n },\n () => {\n activeSpan.end();\n },\n );\n });\n });\n}\n\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically. Use `span.end()` to end the span.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startSpanManual(options, callback) {\n const acs = getAcs();\n if (acs.startSpanManual) {\n return acs.startSpanManual(options, callback);\n }\n\n const spanArguments = parseSentrySpanArguments(options);\n const { forceTransaction, parentSpan: customParentSpan, scope: customScope } = options;\n\n const customForkedScope = customScope?.clone();\n\n return withScope(customForkedScope, () => {\n // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n const wrapper = getActiveSpanWrapper(customParentSpan);\n\n return wrapper(() => {\n const scope = getCurrentScope();\n const parentSpan = getParentSpan(scope);\n\n const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n const activeSpan = shouldSkipSpan\n ? new SentryNonRecordingSpan()\n : createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n });\n\n _setSpanForScope(scope, activeSpan);\n\n return handleCallbackErrors(\n // We pass the `finish` function to the callback, so the user can finish the span manually\n // this is mainly here for historic purposes because previously, we instructed users to call\n // `finish` instead of `span.end()` to also clean up the scope. Nowadays, calling `span.end()`\n // or `finish` has the same effect and we simply leave it here to avoid breaking user code.\n () => callback(activeSpan, () => activeSpan.end()),\n () => {\n // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n const { status } = spanToJSON(activeSpan);\n if (activeSpan.isRecording() && (!status || status === 'ok')) {\n activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n },\n );\n });\n });\n}\n\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getActiveSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * This function will always return a span,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startInactiveSpan(options) {\n const acs = getAcs();\n if (acs.startInactiveSpan) {\n return acs.startInactiveSpan(options);\n }\n\n const spanArguments = parseSentrySpanArguments(options);\n const { forceTransaction, parentSpan: customParentSpan } = options;\n\n // If `options.scope` is defined, we use this as as a wrapper,\n // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n const wrapper = options.scope\n ? (callback) => withScope(options.scope, callback)\n : customParentSpan !== undefined\n ? (callback) => withActiveSpan(customParentSpan, callback)\n : (callback) => callback();\n\n return wrapper(() => {\n const scope = getCurrentScope();\n const parentSpan = getParentSpan(scope);\n\n const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n\n if (shouldSkipSpan) {\n return new SentryNonRecordingSpan();\n }\n\n return createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n });\n });\n}\n\n/**\n * Continue a trace from `sentry-trace` and `baggage` values.\n * These values can be obtained from incoming request headers, or in the browser from ``\n * and `` HTML tags.\n *\n * Spans started with `startSpan`, `startSpanManual` and `startInactiveSpan`, within the callback will automatically\n * be attached to the incoming trace.\n */\nconst continueTrace = (\n options\n\n,\n callback,\n) => {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.continueTrace) {\n return acs.continueTrace(options, callback);\n }\n\n const { sentryTrace, baggage } = options;\n\n return withScope(scope => {\n const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n scope.setPropagationContext(propagationContext);\n return callback();\n });\n};\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback. Can be\n * passed `null` to start an entirely new span tree.\n *\n * @param span Spans started in the context of the provided callback will be children of this span. If `null` is passed,\n * spans started within the callback will not be attached to a parent span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nfunction withActiveSpan(span, callback) {\n const acs = getAcs();\n if (acs.withActiveSpan) {\n return acs.withActiveSpan(span, callback);\n }\n\n return withScope(scope => {\n _setSpanForScope(scope, span || undefined);\n return callback(scope);\n });\n}\n\n/** Suppress tracing in the given callback, ensuring no spans are generated inside of it. */\nfunction suppressTracing(callback) {\n const acs = getAcs();\n\n if (acs.suppressTracing) {\n return acs.suppressTracing(callback);\n }\n\n return withScope(scope => {\n scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: true });\n return callback();\n });\n}\n\n/**\n * Starts a new trace for the duration of the provided callback. Spans started within the\n * callback will be part of the new trace instead of a potentially previously started trace.\n *\n * Important: Only use this function if you want to override the default trace lifetime and\n * propagation mechanism of the SDK for the duration and scope of the provided callback.\n * The newly created trace will also be the root of a new distributed trace, for example if\n * you make http requests within the callback.\n * This function might be useful if the operation you want to instrument should not be part\n * of a potentially ongoing trace.\n *\n * Default behavior:\n * - Server-side: A new trace is started for each incoming request.\n * - Browser: A new trace is started for each page our route. Navigating to a new route\n * or page will automatically create a new trace.\n */\nfunction startNewTrace(callback) {\n return withScope(scope => {\n scope.setPropagationContext({\n traceId: generateTraceId(),\n sampleRand: Math.random(),\n });\n DEBUG_BUILD && logger.info(`Starting a new trace with id ${scope.getPropagationContext().traceId}`);\n return withActiveSpan(null, callback);\n });\n}\n\nfunction createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n}\n\n) {\n if (!hasSpansEnabled()) {\n const span = new SentryNonRecordingSpan();\n\n // If this is a root span, we ensure to freeze a DSC\n // So we can have at least partial data here\n if (forceTransaction || !parentSpan) {\n const dsc = {\n sampled: 'false',\n sample_rate: '0',\n transaction: spanArguments.name,\n ...getDynamicSamplingContextFromSpan(span),\n } ;\n freezeDscOnSpan(span, dsc);\n }\n\n return span;\n }\n\n const isolationScope = getIsolationScope();\n\n let span;\n if (parentSpan && !forceTransaction) {\n span = _startChildSpan(parentSpan, scope, spanArguments);\n addChildSpanToSpan(parentSpan, span);\n } else if (parentSpan) {\n // If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope\n const dsc = getDynamicSamplingContextFromSpan(parentSpan);\n const { traceId, spanId: parentSpanId } = parentSpan.spanContext();\n const parentSampled = spanIsSampled(parentSpan);\n\n span = _startRootSpan(\n {\n traceId,\n parentSpanId,\n ...spanArguments,\n },\n scope,\n parentSampled,\n );\n\n freezeDscOnSpan(span, dsc);\n } else {\n const {\n traceId,\n dsc,\n parentSpanId,\n sampled: parentSampled,\n } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n span = _startRootSpan(\n {\n traceId,\n parentSpanId,\n ...spanArguments,\n },\n scope,\n parentSampled,\n );\n\n if (dsc) {\n freezeDscOnSpan(span, dsc);\n }\n }\n\n logSpanStart(span);\n\n setCapturedScopesOnSpan(span, scope, isolationScope);\n\n return span;\n}\n\n/**\n * This converts StartSpanOptions to SentrySpanArguments.\n * For the most part (for now) we accept the same options,\n * but some of them need to be transformed.\n */\nfunction parseSentrySpanArguments(options) {\n const exp = options.experimental || {};\n const initialCtx = {\n isStandalone: exp.standalone,\n ...options,\n };\n\n if (options.startTime) {\n const ctx = { ...initialCtx };\n ctx.startTimestamp = spanTimeInputToSeconds(options.startTime);\n delete ctx.startTime;\n return ctx;\n }\n\n return initialCtx;\n}\n\nfunction getAcs() {\n const carrier = getMainCarrier();\n return getAsyncContextStrategy(carrier);\n}\n\nfunction _startRootSpan(spanArguments, scope, parentSampled) {\n const client = getClient();\n const options = client?.getOptions() || {};\n\n const { name = '', attributes } = spanArguments;\n const currentPropagationContext = scope.getPropagationContext();\n const [sampled, sampleRate, localSampleRateWasApplied] = scope.getScopeData().sdkProcessingMetadata[\n SUPPRESS_TRACING_KEY\n ]\n ? [false]\n : sampleSpan(\n options,\n {\n name,\n parentSampled,\n attributes,\n parentSampleRate: parseSampleRate(currentPropagationContext.dsc?.sample_rate),\n },\n currentPropagationContext.sampleRand,\n );\n\n const rootSpan = new SentrySpan({\n ...spanArguments,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n [SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]:\n sampleRate !== undefined && localSampleRateWasApplied ? sampleRate : undefined,\n ...spanArguments.attributes,\n },\n sampled,\n });\n\n if (!sampled && client) {\n DEBUG_BUILD && logger.log('[Tracing] Discarding root span because its trace was not chosen to be sampled.');\n client.recordDroppedEvent('sample_rate', 'transaction');\n }\n\n if (client) {\n client.emit('spanStart', rootSpan);\n }\n\n return rootSpan;\n}\n\n/**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * This inherits the sampling decision from the parent span.\n */\nfunction _startChildSpan(parentSpan, scope, spanArguments) {\n const { spanId, traceId } = parentSpan.spanContext();\n const sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? false : spanIsSampled(parentSpan);\n\n const childSpan = sampled\n ? new SentrySpan({\n ...spanArguments,\n parentSpanId: spanId,\n traceId,\n sampled,\n })\n : new SentryNonRecordingSpan({ traceId });\n\n addChildSpanToSpan(parentSpan, childSpan);\n\n const client = getClient();\n if (client) {\n client.emit('spanStart', childSpan);\n // If it has an endTimestamp, it's already ended\n if (spanArguments.endTimestamp) {\n client.emit('spanEnd', childSpan);\n }\n }\n\n return childSpan;\n}\n\nfunction getParentSpan(scope) {\n const span = _getSpanForScope(scope) ;\n\n if (!span) {\n return undefined;\n }\n\n const client = getClient();\n const options = client ? client.getOptions() : {};\n if (options.parentSpanIsAlwaysRootSpan) {\n return getRootSpan(span) ;\n }\n\n return span;\n}\n\nfunction getActiveSpanWrapper(parentSpan) {\n return parentSpan !== undefined\n ? (callback) => {\n return withActiveSpan(parentSpan, callback);\n }\n : (callback) => callback();\n}\n\nexport { continueTrace, startInactiveSpan, startNewTrace, startSpan, startSpanManual, suppressTracing, withActiveSpan };\n//# sourceMappingURL=trace.js.map\n","import { makeDsn, dsnToString } from './utils-hoist/dsn.js';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn, sdkInfo) {\n const params = {\n sentry_version: SENTRY_API_VERSION,\n };\n\n if (dsn.publicKey) {\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n params.sentry_key = dsn.publicKey;\n }\n\n if (sdkInfo) {\n params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;\n }\n\n return new URLSearchParams(params).toString();\n}\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 */\nfunction getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) {\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nfunction getReportDialogEndpoint(dsnLike, dialogOptions) {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'onClose') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };\n//# sourceMappingURL=api.js.map\n","import { getClient } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './utils-hoist/logger.js';\n\nconst installedIntegrations = [];\n\n/** Map of integrations assigned to a client */\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preserve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations) {\n const integrationsByName = {};\n\n integrations.forEach((currentInstance) => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.values(integrationsByName);\n}\n\n/** Gets integrations to install */\nfunction getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach((integration) => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n const resolvedUserIntegrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];\n } else {\n integrations = defaultIntegrations;\n }\n\n return filterDuplicates(integrations);\n}\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 */\nfunction setupIntegrations(client, integrations) {\n const integrationIndex = {};\n\n integrations.forEach((integration) => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n}\n\n/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\nfunction afterSetupIntegrations(client, integrations) {\n for (const integration of integrations) {\n // guard against empty provided integrations\n if (integration?.afterAllSetup) {\n integration.afterAllSetup(client);\n }\n }\n}\n\n/** Setup a single integration. */\nfunction setupIntegration(client, integration, integrationIndex) {\n if (integrationIndex[integration.name]) {\n DEBUG_BUILD && logger.log(`Integration skipped because it was already installed: ${integration.name}`);\n return;\n }\n integrationIndex[integration.name] = integration;\n\n // `setupOnce` is only called the first time\n if (installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce === 'function') {\n integration.setupOnce();\n installedIntegrations.push(integration.name);\n }\n\n // `setup` is run for each client\n if (integration.setup && typeof integration.setup === 'function') {\n integration.setup(client);\n }\n\n if (typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration) ;\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n\n if (typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration) ;\n\n const processor = Object.assign((event, hint) => callback(event, hint, client), {\n id: integration.name,\n });\n\n client.addEventProcessor(processor);\n }\n\n DEBUG_BUILD && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current scope's client. */\nfunction addIntegration(integration) {\n const client = getClient();\n\n if (!client) {\n DEBUG_BUILD && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n\n client.addIntegration(integration);\n}\n\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\nfunction defineIntegration(fn) {\n return fn;\n}\n\nexport { addIntegration, afterSetupIntegrations, defineIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n//# sourceMappingURL=integration.js.map\n","import { createEnvelope } from './envelope.js';\nimport { dateTimestampInSeconds } from './time.js';\n\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 */\nfunction createClientReportEnvelope(\n discarded_events,\n dsn,\n timestamp,\n) {\n const clientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n\nexport { createClientReportEnvelope };\n//# sourceMappingURL=clientreport.js.map\n","/** An error emitted by Sentry SDKs and related utilities. */\nclass SentryError extends Error {\n\n constructor(\n message,\n logLevel = 'warn',\n ) {\n super(message);this.message = message;\n this.logLevel = logLevel;\n }\n}\n\nexport { SentryError };\n//# sourceMappingURL=error.js.map\n","/**\n * Get a list of possible event messages from a Sentry event.\n */\nfunction getPossibleEventMessages(event) {\n const possibleMessages = [];\n\n if (event.message) {\n possibleMessages.push(event.message);\n }\n\n try {\n // @ts-expect-error Try catching to save bundle size\n const lastException = event.exception.values[event.exception.values.length - 1];\n if (lastException?.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n } catch (e) {\n // ignore errors here\n }\n\n return possibleMessages;\n}\n\nexport { getPossibleEventMessages };\n//# sourceMappingURL=eventUtils.js.map\n","import { SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME } from '../semanticAttributes.js';\nimport '../utils-hoist/debug-build.js';\nimport '../utils-hoist/logger.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport '../utils-hoist/time.js';\nimport '../utils-hoist/syncpromise.js';\n\n/**\n * Converts a transaction event to a span JSON object.\n */\nfunction convertTransactionEventToSpanJson(event) {\n const { trace_id, parent_span_id, span_id, status, origin, data, op } = event.contexts?.trace ?? {};\n\n return dropUndefinedKeys({\n data: data ?? {},\n description: event.transaction,\n op,\n parent_span_id,\n span_id: span_id ?? '',\n start_timestamp: event.start_timestamp ?? 0,\n status,\n timestamp: event.timestamp,\n trace_id: trace_id ?? '',\n origin,\n profile_id: data?.[SEMANTIC_ATTRIBUTE_PROFILE_ID] ,\n exclusive_time: data?.[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME] ,\n measurements: event.measurements,\n is_segment: true,\n });\n}\n\n/**\n * Converts a span JSON object to a transaction event.\n */\nfunction convertSpanJsonToTransactionEvent(span) {\n const event = {\n type: 'transaction',\n timestamp: span.timestamp,\n start_timestamp: span.start_timestamp,\n transaction: span.description,\n contexts: {\n trace: {\n trace_id: span.trace_id,\n span_id: span.span_id,\n parent_span_id: span.parent_span_id,\n op: span.op,\n status: span.status,\n origin: span.origin,\n data: {\n ...span.data,\n ...(span.profile_id && { [SEMANTIC_ATTRIBUTE_PROFILE_ID]: span.profile_id }),\n ...(span.exclusive_time && { [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: span.exclusive_time }),\n },\n },\n },\n measurements: span.measurements,\n };\n\n return dropUndefinedKeys(event);\n}\n\nexport { convertSpanJsonToTransactionEvent, convertTransactionEventToSpanJson };\n//# sourceMappingURL=transactionEvent.js.map\n","import { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { getTraceContextFromScope, getCurrentScope, getIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { setupIntegration, afterSetupIntegrations, setupIntegrations } from './integration.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromScope } from './tracing/dynamicSamplingContext.js';\nimport { createClientReportEnvelope } from './utils-hoist/clientreport.js';\nimport { makeDsn, dsnToString } from './utils-hoist/dsn.js';\nimport { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils-hoist/envelope.js';\nimport { SentryError } from './utils-hoist/error.js';\nimport { isPrimitive, isThenable, isPlainObject, isParameterizedString } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4, checkOrSetAlreadyCaught } from './utils-hoist/misc.js';\nimport { resolvedSyncPromise, SyncPromise, rejectedSyncPromise } from './utils-hoist/syncpromise.js';\nimport { getPossibleEventMessages } from './utils/eventUtils.js';\nimport { merge } from './utils/merge.js';\nimport { parseSampleRate } from './utils/parseSampleRate.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\nimport { showSpanDropWarning } from './utils/spanUtils.js';\nimport { convertTransactionEventToSpanJson, convertSpanJsonToTransactionEvent } from './utils/transactionEvent.js';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\nconst MISSING_RELEASE_FOR_SESSION_ERROR = 'Discarded session because of missing or non-string release';\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\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, it is passed through\n * {@link Client._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 Client {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nclass Client {\n /** Options passed to the SDK. */\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n\n /** Array of set up integrations. */\n\n /** Number of calls being processed */\n\n /** Holds flushable */\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n constructor(options) {\n this._options = options;\n this._integrations = {};\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n DEBUG_BUILD && logger.warn('No DSN provided, client will not send events.');\n }\n\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(\n this._dsn,\n options.tunnel,\n options._metadata ? options._metadata.sdk : undefined,\n );\n this._transport = options.transport({\n tunnel: this._options.tunnel,\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n }\n }\n\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * Unlike `captureException` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureException(exception, hint, scope) {\n const eventId = uuid4();\n\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n\n const hintWithEventId = {\n event_id: eventId,\n ...hint,\n };\n\n this._process(\n this.eventFromException(exception, hintWithEventId).then(event =>\n this._captureEvent(event, hintWithEventId, scope),\n ),\n );\n\n return hintWithEventId.event_id;\n }\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * Unlike `captureMessage` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureMessage(\n message,\n level,\n hint,\n currentScope,\n ) {\n const hintWithEventId = {\n event_id: uuid4(),\n ...hint,\n };\n\n const eventMessage = isParameterizedString(message) ? message : String(message);\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(eventMessage, level, hintWithEventId)\n : this.eventFromException(message, hintWithEventId);\n\n this._process(promisedEvent.then(event => this._captureEvent(event, hintWithEventId, currentScope)));\n\n return hintWithEventId.event_id;\n }\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * Unlike `captureEvent` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureEvent(event, hint, currentScope) {\n const eventId = uuid4();\n\n // ensure we haven't captured this very object before\n if (hint?.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n\n const hintWithEventId = {\n event_id: eventId,\n ...hint,\n };\n\n const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;\n const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;\n\n this._process(\n this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope, capturedSpanIsolationScope),\n );\n\n return hintWithEventId.event_id;\n }\n\n /**\n * Captures a session.\n */\n captureSession(session) {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n\n /**\n * Create a cron monitor check in and send it to Sentry. This method is not available on all clients.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n * @param scope An optional scope containing event metadata.\n * @returns A string representing the id of the check in.\n */\n\n /**\n * Get the current Dsn.\n */\n getDsn() {\n return this._dsn;\n }\n\n /**\n * Get the current options.\n */\n getOptions() {\n return this._options;\n }\n\n /**\n * Get the SDK metadata.\n * @see SdkMetadata\n */\n getSdkMetadata() {\n return this._options._metadata;\n }\n\n /**\n * Returns the transport that is used by the client.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n */\n getTransport() {\n return this._transport;\n }\n\n /**\n * Wait for all events to be sent or the timeout to expire, whichever comes first.\n *\n * @param timeout Maximum time in ms the client should wait for events to be flushed. Omitting this parameter will\n * cause the client to wait until all events are sent before resolving the promise.\n * @returns A promise that will resolve with `true` if all events are sent before the timeout, or `false` if there are\n * still events in the queue when the timeout is reached.\n */\n flush(timeout) {\n const transport = this._transport;\n if (transport) {\n this.emit('flush');\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * Flush the event queue and set the client to `enabled = false`. See {@link Client.flush}.\n *\n * @param {number} timeout Maximum time in ms the client should wait before shutting down. Omitting this parameter will cause\n * the client to wait until all events are sent before disabling itself.\n * @returns {Promise} A promise which resolves to `true` if the flush completes successfully before the timeout, or `false` if\n * it doesn't.\n */\n close(timeout) {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n this.emit('close');\n return result;\n });\n }\n\n /**\n * Get all installed event processors.\n */\n getEventProcessors() {\n return this._eventProcessors;\n }\n\n /**\n * Adds an event processor that applies to any event processed by this client.\n */\n addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n\n /**\n * Initialize this client.\n * Call this after the client was set on a scope.\n */\n init() {\n if (\n this._isEnabled() ||\n // Force integrations to be setup even if no DSN was set when we have\n // Spotlight enabled. This is particularly important for browser as we\n // don't support the `spotlight` option there and rely on the users\n // adding the `spotlightBrowserIntegration()` to their integrations which\n // wouldn't get initialized with the check below when there's no DSN set.\n this._options.integrations.some(({ name }) => name.startsWith('Spotlight'))\n ) {\n this._setupIntegrations();\n }\n }\n\n /**\n * Gets an installed integration by its name.\n *\n * @returns {Integration|undefined} The installed integration or `undefined` if no integration with that `name` was installed.\n */\n getIntegrationByName(integrationName) {\n return this._integrations[integrationName] ;\n }\n\n /**\n * Add an integration to the client.\n * This can be used to e.g. lazy load integrations.\n * In most cases, this should not be necessary,\n * and you're better off just passing the integrations via `integrations: []` at initialization time.\n * However, if you find the need to conditionally load & add an integration, you can use `addIntegration` to do so.\n */\n addIntegration(integration) {\n const isAlreadyInstalled = this._integrations[integration.name];\n\n // This hook takes care of only installing if not already installed\n setupIntegration(this, integration, this._integrations);\n // Here we need to check manually to make sure to not run this multiple times\n if (!isAlreadyInstalled) {\n afterSetupIntegrations(this, [integration]);\n }\n }\n\n /**\n * Send a fully prepared event to Sentry.\n */\n sendEvent(event, hint = {}) {\n this.emit('beforeSendEvent', event, hint);\n\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));\n }\n\n const promise = this.sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * Send a session or session aggregrates to Sentry.\n */\n sendSession(session) {\n // Backfill release and environment on session\n const { release: clientReleaseOption, environment: clientEnvironmentOption = DEFAULT_ENVIRONMENT } = this._options;\n if ('aggregates' in session) {\n const sessionAttrs = session.attrs || {};\n if (!sessionAttrs.release && !clientReleaseOption) {\n DEBUG_BUILD && logger.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n return;\n }\n sessionAttrs.release = sessionAttrs.release || clientReleaseOption;\n sessionAttrs.environment = sessionAttrs.environment || clientEnvironmentOption;\n session.attrs = sessionAttrs;\n } else {\n if (!session.release && !clientReleaseOption) {\n DEBUG_BUILD && logger.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n return;\n }\n session.release = session.release || clientReleaseOption;\n session.environment = session.environment || clientEnvironmentOption;\n }\n\n this.emit('beforeSendSession', session);\n\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(env);\n }\n\n /**\n * Record on the client that an event got dropped (ie, an event that will not be sent to Sentry).\n */\n recordDroppedEvent(reason, category, count = 1) {\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) 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>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n DEBUG_BUILD && logger.log(`Recording outcome: \"${key}\"${count > 1 ? ` (${count} times)` : ''}`);\n this._outcomes[key] = (this._outcomes[key] || 0) + count;\n }\n }\n\n /* eslint-disable @typescript-eslint/unified-signatures */\n /**\n * Register a callback for whenever a span is started.\n * Receives the span as argument.\n * @returns {() => void} A function that, when executed, removes the registered callback.\n */\n\n /**\n * Register a hook oin this client.\n */\n on(hook, callback) {\n const hooks = (this._hooks[hook] = this._hooks[hook] || []);\n\n // @ts-expect-error We assume the types are correct\n hooks.push(callback);\n\n // This function returns a callback execution handler that, when invoked,\n // deregisters a callback. This is crucial for managing instances where callbacks\n // need to be unregistered to prevent self-referencing in callback closures,\n // ensuring proper garbage collection.\n return () => {\n // @ts-expect-error We assume the types are correct\n const cbIndex = hooks.indexOf(callback);\n if (cbIndex > -1) {\n hooks.splice(cbIndex, 1);\n }\n };\n }\n\n /** Fire a hook whenever a span starts. */\n\n /**\n * Emit a hook that was previously registered via `on()`.\n */\n emit(hook, ...rest) {\n const callbacks = this._hooks[hook];\n if (callbacks) {\n callbacks.forEach(callback => callback(...rest));\n }\n }\n\n /**\n * Send an envelope to Sentry.\n */\n sendEnvelope(envelope) {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n DEBUG_BUILD && logger.error('Error while sending envelope:', reason);\n return reason;\n });\n }\n\n DEBUG_BUILD && logger.error('Transport disabled');\n\n return resolvedSyncPromise({});\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Setup integrations for this client. */\n _setupIntegrations() {\n const { integrations } = this._options;\n this._integrations = setupIntegrations(this, integrations);\n afterSetupIntegrations(this, integrations);\n }\n\n /** Updates existing session based on the provided event */\n _updateSessionFromEvent(session, event) {\n let crashed = event.level === 'fatal';\n let errored = false;\n const exceptions = event.exception?.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism?.handled === false) {\n crashed = true;\n break;\n }\n }\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 const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\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 _isClientDoneProcessing(timeout) {\n return new SyncPromise(resolve => {\n let ticked = 0;\n const tick = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n _isEnabled() {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\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 currentScope A scope containing event metadata.\n * @returns A new event with more information.\n */\n _prepareEvent(\n event,\n hint,\n currentScope,\n isolationScope,\n ) {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations?.length) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n\n if (!event.type) {\n isolationScope.setLastEventId(event.event_id || hint.event_id);\n }\n\n return prepareEvent(options, event, hint, currentScope, this, isolationScope).then(evt => {\n if (evt === null) {\n return evt;\n }\n\n this.emit('postprocessEvent', evt, hint);\n\n evt.contexts = {\n trace: getTraceContextFromScope(currentScope),\n ...evt.contexts,\n };\n\n const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);\n\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata,\n };\n\n return evt;\n });\n }\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 _captureEvent(\n event,\n hint = {},\n currentScope = getCurrentScope(),\n isolationScope = getIsolationScope(),\n ) {\n if (DEBUG_BUILD && isErrorEvent(event)) {\n logger.log(`Captured error event \\`${getPossibleEventMessages(event)[0] || ''}\\``);\n }\n\n return this._processEvent(event, hint, currentScope, isolationScope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if (DEBUG_BUILD) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n if (reason instanceof SentryError && reason.logLevel === 'log') {\n logger.log(reason.message);\n } else {\n logger.warn(reason);\n }\n }\n return undefined;\n },\n );\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 currentScope 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 _processEvent(\n event,\n hint,\n currentScope,\n isolationScope,\n ) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n const parsedSampleRate = typeof sampleRate === 'undefined' ? undefined : parseSampleRate(sampleRate);\n if (isError && typeof parsedSampleRate === 'number' && Math.random() > parsedSampleRate) {\n this.recordDroppedEvent('sample_rate', 'error');\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory = (eventType === 'replay_event' ? 'replay' : eventType) ;\n\n return this._prepareEvent(event, hint, currentScope, isolationScope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(this, options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory);\n if (isTransaction) {\n const spans = event.spans || [];\n // the transaction itself counts as one span, plus all the child spans that are added\n const spanCount = 1 + spans.length;\n this.recordDroppedEvent('before_send', 'span', spanCount);\n }\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = currentScope.getSession() || isolationScope.getSession();\n if (isError && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n if (isTransaction) {\n const spanCountBefore = processedEvent.sdkProcessingMetadata?.spanCountBeforeProcessing || 0;\n const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;\n\n const droppedSpanCount = spanCountBefore - spanCountAfter;\n if (droppedSpanCount > 0) {\n this.recordDroppedEvent('before_send', 'span', droppedSpanCount);\n }\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\n `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\n /**\n * Occupies the client with processing and event\n */\n _process(promise) {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n _clearOutcomes() {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.entries(outcomes).map(([key, quantity]) => {\n const [reason, category] = key.split(':') ;\n return {\n reason,\n category,\n quantity,\n };\n });\n }\n\n /**\n * Sends client reports as an envelope.\n */\n _flushOutcomes() {\n DEBUG_BUILD && logger.log('Flushing outcomes...');\n\n const outcomes = this._clearOutcomes();\n\n if (outcomes.length === 0) {\n DEBUG_BUILD && logger.log('No outcomes to send');\n return;\n }\n\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n DEBUG_BUILD && logger.log('No dsn provided, will not send outcomes');\n return;\n }\n\n DEBUG_BUILD && logger.log('Sending outcomes:', outcomes);\n\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n }\n\n /**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n */\n\n}\n\n/**\n * @deprecated Use `Client` instead. This alias may be removed in a future major version.\n */\n// TODO(v10): Remove\n\n/**\n * @deprecated Use `Client` instead. This alias may be removed in a future major version.\n */\n// TODO(v10): Remove\nconst BaseClient = Client;\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult,\n beforeSendLabel,\n) {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n client,\n options,\n event,\n hint,\n) {\n const { beforeSend, beforeSendTransaction, beforeSendSpan } = options;\n let processedEvent = event;\n\n if (isErrorEvent(processedEvent) && beforeSend) {\n return beforeSend(processedEvent, hint);\n }\n\n if (isTransactionEvent(processedEvent)) {\n if (beforeSendSpan) {\n // process root span\n const processedRootSpanJson = beforeSendSpan(convertTransactionEventToSpanJson(processedEvent));\n if (!processedRootSpanJson) {\n showSpanDropWarning();\n } else {\n // update event with processed root span values\n processedEvent = merge(event, convertSpanJsonToTransactionEvent(processedRootSpanJson));\n }\n\n // process child spans\n if (processedEvent.spans) {\n const processedSpans = [];\n for (const span of processedEvent.spans) {\n const processedSpan = beforeSendSpan(span);\n if (!processedSpan) {\n showSpanDropWarning();\n processedSpans.push(span);\n } else {\n processedSpans.push(processedSpan);\n }\n }\n processedEvent.spans = processedSpans;\n }\n }\n\n if (beforeSendTransaction) {\n if (processedEvent.spans) {\n // We store the # of spans before processing in SDK metadata,\n // so we can compare it afterwards to determine how many spans were dropped\n const spanCountBefore = processedEvent.spans.length;\n processedEvent.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n spanCountBeforeProcessing: spanCountBefore,\n };\n }\n return beforeSendTransaction(processedEvent , hint);\n }\n }\n\n return processedEvent;\n}\n\nfunction isErrorEvent(event) {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n\nexport { BaseClient, Client };\n//# sourceMappingURL=client.js.map\n","import { getCurrentScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger, consoleSandbox } from './utils-hoist/logger.js';\n\n/** A class object that can instantiate Client objects. */\n\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 */\nfunction initAndBind(\n clientClass,\n options,\n) {\n if (options.debug === true) {\n if (DEBUG_BUILD) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n consoleSandbox(() => {\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 }\n const scope = getCurrentScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n setCurrentClient(client);\n client.init();\n return client;\n}\n\n/**\n * Make the given client the current client.\n */\nfunction setCurrentClient(client) {\n getCurrentScope().setClient(client);\n}\n\nexport { initAndBind, setCurrentClient };\n//# sourceMappingURL=sdk.js.map\n","import { SentryError } from './error.js';\nimport { rejectedSyncPromise, SyncPromise, resolvedSyncPromise } from './syncpromise.js';\n\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 */\nfunction makePromiseBuffer(limit) {\n const buffer = [];\n\n function isReady() {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task) {\n return buffer.splice(buffer.indexOf(task), 1)[0] || Promise.resolve(undefined);\n }\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; In previous versions this used to be `task:\n * PromiseLike`, 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 because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => 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, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\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((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n\nexport { makePromiseBuffer };\n//# sourceMappingURL=promisebuffer.js.map\n","// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\n\nconst DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\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 */\nfunction parseRetryAfterHeader(header, now = Date.now()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nfunction disabledUntil(limits, dataCategory) {\n return limits[dataCategory] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nfunction isRateLimited(limits, dataCategory, now = Date.now()) {\n return disabledUntil(limits, dataCategory) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nfunction updateRateLimits(\n limits,\n { statusCode, headers },\n now = Date.now(),\n) {\n const updatedRateLimits = {\n ...limits,\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers?.['x-sentry-rate-limits'];\n const retryAfterHeader = headers?.['retry-after'];\n\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n *
,
,..\n * where each
is of the form\n * : : : : \n * where\n * is a delay in seconds\n * is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * ;;...\n * is what's being limited (org, project, or key) - ignored by SDK\n * is an arbitrary string like \"org_quota\" - ignored by SDK\n * Semicolon-separated list of metric namespace identifiers. Defines which namespace(s) will be affected.\n * Only present if rate limit applies to the metric_bucket data category.\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories, , , namespaces] = limit.split(':', 5) ;\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n if (category === 'metric_bucket') {\n // namespaces will be present when category === 'metric_bucket'\n if (!namespaces || namespaces.split(';').includes('custom')) {\n updatedRateLimits[category] = now + delay;\n }\n } else {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n\n return updatedRateLimits;\n}\n\nexport { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };\n//# sourceMappingURL=ratelimit.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { forEachEnvelopeItem, envelopeItemTypeToDataCategory, createEnvelope, serializeEnvelope } from '../utils-hoist/envelope.js';\nimport { SentryError } from '../utils-hoist/error.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { makePromiseBuffer } from '../utils-hoist/promisebuffer.js';\nimport { isRateLimited, updateRateLimits } from '../utils-hoist/ratelimit.js';\nimport { resolvedSyncPromise } from '../utils-hoist/syncpromise.js';\n\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 64;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nfunction createTransport(\n options,\n makeRequest,\n buffer = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n ),\n) {\n let rateLimits = {};\n const flush = (timeout) => buffer.drain(timeout);\n\n function send(envelope) {\n const filteredEnvelopeItems = [];\n\n // Drop rate limited items from envelope\n forEachEnvelopeItem(envelope, (item, type) => {\n const dataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, dataCategory)) {\n options.recordDroppedEvent('ratelimit_backoff', dataCategory);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise({});\n }\n\n const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems );\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason) => {\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type));\n });\n };\n\n const requestTask = () =>\n makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then(\n response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n DEBUG_BUILD && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n error => {\n recordEnvelopeLoss('network_error');\n throw error;\n },\n );\n\n return buffer.add(requestTask).then(\n result => result,\n error => {\n if (error instanceof SentryError) {\n DEBUG_BUILD && logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return resolvedSyncPromise({});\n } else {\n throw error;\n }\n },\n );\n }\n\n return {\n send,\n flush,\n };\n}\n\nexport { DEFAULT_TRANSPORT_BUFFER_SIZE, createTransport };\n//# sourceMappingURL=base.js.map\n","// By default, we want to infer the IP address, unless this is explicitly set to `null`\n// We do this after all other processing is done\n// If `ip_address` is explicitly set to `null` or a value, we leave it as is\n\n/**\n * @internal\n */\nfunction addAutoIpAddressToUser(objWithMaybeUser) {\n if (objWithMaybeUser.user?.ip_address === undefined) {\n objWithMaybeUser.user = {\n ...objWithMaybeUser.user,\n ip_address: '{{auto}}',\n };\n }\n}\n\n/**\n * @internal\n */\nfunction addAutoIpAddressToSession(session) {\n if ('aggregates' in session) {\n if (session.attrs?.['ip_address'] === undefined) {\n session.attrs = {\n ...session.attrs,\n ip_address: '{{auto}}',\n };\n }\n } else {\n if (session.ipAddress === undefined) {\n session.ipAddress = '{{auto}}';\n }\n }\n}\n\nexport { addAutoIpAddressToSession, addAutoIpAddressToUser };\n//# sourceMappingURL=ipAddress.js.map\n","import { SDK_VERSION } from '../utils-hoist/version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n","import { getClient, getIsolationScope } from './currentScopes.js';\nimport { consoleSandbox } from './utils-hoist/logger.js';\nimport { dateTimestampInSeconds } from './utils-hoist/time.js';\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\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 */\nfunction addBreadcrumb(breadcrumb, hint) {\n const client = getClient();\n const isolationScope = getIsolationScope();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions();\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n}\n\nexport { addBreadcrumb };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { getClient } from '../currentScopes.js';\nimport { defineIntegration } from '../integration.js';\nimport { getOriginalFunction } from '../utils-hoist/object.js';\n\nlet originalFunctionToString;\n\nconst INTEGRATION_NAME = 'FunctionToString';\n\nconst SETUP_CLIENTS = new WeakMap();\n\nconst _functionToStringIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n Function.prototype.toString = function ( ...args) {\n const originalFunction = getOriginalFunction(this);\n const context =\n SETUP_CLIENTS.has(getClient() ) && originalFunction !== undefined ? originalFunction : this;\n return originalFunctionToString.apply(context, args);\n };\n } catch {\n // ignore errors here, just don't patch this\n }\n },\n setup(client) {\n SETUP_CLIENTS.set(client, true);\n },\n };\n}) ;\n\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * ```js\n * Sentry.init({\n * integrations: [\n * functionToStringIntegration(),\n * ],\n * });\n * ```\n */\nconst functionToStringIntegration = defineIntegration(_functionToStringIntegration);\n\nexport { functionToStringIntegration };\n//# sourceMappingURL=functiontostring.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { defineIntegration } from '../integration.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getEventDescription } from '../utils-hoist/misc.js';\nimport { stringMatchesSomePattern } from '../utils-hoist/string.js';\nimport { getPossibleEventMessages } from '../utils/eventUtils.js';\n\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.\nconst DEFAULT_IGNORE_ERRORS = [\n /^Script error\\.?$/,\n /^Javascript error: Script error\\.? on line 0$/,\n /^ResizeObserver loop completed with undelivered notifications.$/, // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.\n /^Cannot redefine property: googletag$/, // This is thrown when google tag manager is used in combination with an ad blocker\n \"undefined is not an object (evaluating 'a.L')\", // Random error that happens but not actionable or noticeable to end-users.\n 'can\\'t redefine non-configurable property \"solana\"', // Probably a browser extension or custom browser (Brave) throwing this error\n \"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)\", // Error thrown by GTM, seemingly not affecting end-users\n \"Can't find variable: _AutofillCallbackHandler\", // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/\n /^Non-Error promise rejection captured with value: Object Not Found Matching Id:\\d+, MethodName:simulateEvent, ParamCount:\\d+$/, // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps\n];\n\n/** Options for the InboundFilters integration */\n\nconst INTEGRATION_NAME = 'InboundFilters';\nconst _inboundFiltersIntegration = ((options = {}) => {\n return {\n name: INTEGRATION_NAME,\n processEvent(event, _hint, client) {\n const clientOptions = client.getOptions();\n const mergedOptions = _mergeOptions(options, clientOptions);\n return _shouldDropEvent(event, mergedOptions) ? null : event;\n },\n };\n}) ;\n\nconst inboundFiltersIntegration = defineIntegration(_inboundFiltersIntegration);\n\nfunction _mergeOptions(\n internalOptions = {},\n clientOptions = {},\n) {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n ],\n ignoreTransactions: [...(internalOptions.ignoreTransactions || []), ...(clientOptions.ignoreTransactions || [])],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\nfunction _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n 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 DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isUselessError(event)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to not having an error message, error type or stacktrace.\\nEvent: ${getEventDescription(\n event,\n )}`,\n );\n return true;\n }\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event, ignoreErrors) {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event, ignoreTransactions) {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n\n const name = event.transaction;\n return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event, denyUrls) {\n if (!denyUrls?.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event, allowUrls) {\n if (!allowUrls?.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _isSentryError(event) {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames = []) {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event) {\n try {\n let frames;\n try {\n // @ts-expect-error we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n DEBUG_BUILD && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\n\nfunction _isUselessError(event) {\n if (event.type) {\n // event is not an error\n return false;\n }\n\n // We only want to consider events for dropping that actually have recorded exception values.\n if (!event.exception?.values?.length) {\n return false;\n }\n\n return (\n // No top-level message\n !event.message &&\n // There are no exception values that have a stacktrace, a non-generic-Error type or value\n !event.exception.values.some(value => value.stacktrace || (value.type && value.type !== 'Error') || value.value)\n );\n}\n\nexport { inboundFiltersIntegration };\n//# sourceMappingURL=inboundfilters.js.map\n","import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception?.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n","import { CONSOLE_LEVELS, originalConsoleMethods } from '../logger.js';\nimport { fill } from '../object.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a console.xxx method is called.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addConsoleInstrumentationHandler(handler) {\n const type = 'console';\n addHandler(type, handler);\n maybeInstrument(type, instrumentConsole);\n}\n\nfunction instrumentConsole() {\n if (!('console' in GLOBAL_OBJ)) {\n return;\n }\n\n CONSOLE_LEVELS.forEach(function (level) {\n if (!(level in GLOBAL_OBJ.console)) {\n return;\n }\n\n fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod) {\n originalConsoleMethods[level] = originalConsoleMethod;\n\n return function (...args) {\n const handlerData = { args, level };\n triggerHandlers('console', handlerData);\n\n const log = originalConsoleMethods[level];\n log?.apply(GLOBAL_OBJ.console, args);\n };\n });\n });\n}\n\nexport { addConsoleInstrumentationHandler };\n//# sourceMappingURL=console.js.map\n","/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nfunction severityLevelFromString(level) {\n return (\n level === 'warn' ? 'warning' : ['fatal', 'error', 'warning', 'log', 'info', 'debug'].includes(level) ? level : 'log'\n ) ;\n}\n\nexport { severityLevelFromString };\n//# sourceMappingURL=severity.js.map\n","import { defineIntegration } from '../integration.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getFramesFromEvent } from '../utils-hoist/stacktrace.js';\n\nconst INTEGRATION_NAME = 'Dedupe';\n\nconst _dedupeIntegration = (() => {\n let previousEvent;\n\n return {\n name: INTEGRATION_NAME,\n processEvent(currentEvent) {\n // We want to ignore any non-error type events, e.g. transactions or replays\n // These should never be deduped, and also not be compared against as _previousEvent.\n if (currentEvent.type) {\n return currentEvent;\n }\n\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, previousEvent)) {\n DEBUG_BUILD && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n return (previousEvent = currentEvent);\n },\n };\n}) ;\n\n/**\n * Deduplication filter.\n */\nconst dedupeIntegration = defineIntegration(_dedupeIntegration);\n\n/** only exported for tests. */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\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\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n let currentFrames = getFramesFromEvent(currentEvent);\n let previousFrames = getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\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\n currentFrames = currentFrames ;\n previousFrames = previousFrames ;\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const frameA = previousFrames[i];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\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\n currentFingerprint = currentFingerprint ;\n previousFingerprint = previousFingerprint ;\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\nfunction _getExceptionFromEvent(event) {\n return event.exception?.values && event.exception.values[0];\n}\n\nexport { _shouldDropEvent, dedupeIntegration };\n//# sourceMappingURL=dedupe.js.map\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 href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nfunction parseUrl(url) {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\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 */\nfunction stripUrlQueryAndFragment(urlPath) {\n return (urlPath.split(/[?#]/, 1) )[0];\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span name\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nfunction getSanitizedUrlString(url) {\n const { protocol, host, path } = url;\n\n const filteredHost =\n host\n // Always filter out authority\n ?.replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n // TODO: Use new URL global if it exists\n .replace(/(:80)$/, '')\n .replace(/(:443)$/, '') || '';\n\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n\nexport { getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment };\n//# sourceMappingURL=url.js.map\n","/**\n * Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.\n */\nfunction getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {\n // NOTE: undefined defaults to 'info' in Sentry\n if (statusCode === undefined) {\n return undefined;\n } else if (statusCode >= 400 && statusCode < 500) {\n return 'warning';\n } else if (statusCode >= 500) {\n return 'error';\n } else {\n return undefined;\n }\n}\n\nexport { getBreadcrumbLogLevelFromHttpStatusCode };\n//# sourceMappingURL=breadcrumb-log-level.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './logger.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ ;\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsHistory() {\n return 'history' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsFetch() {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * isNative checks if the given function is a native implementation\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFunction(func) {\n return func && /^function\\s+\\w+\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\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 */\nfunction supportsNativeFetch() {\n if (typeof EdgeRuntime === 'string') {\n return true;\n }\n\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFunction(WINDOW.fetch)) {\n return true;\n }\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 let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement ) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow?.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFunction(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n DEBUG_BUILD &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReportingObserver() {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nfunction 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\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' ,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\nexport { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n//# sourceMappingURL=supports.js.map\n","import { isError } from '../is.js';\nimport { fill, addNonEnumerableProperty } from '../object.js';\nimport { supportsNativeFetch } from '../supports.js';\nimport { timestampInSeconds } from '../time.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addFetchInstrumentationHandler(\n handler,\n skipNativeFetchCheck,\n) {\n const type = 'fetch';\n addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(undefined, skipNativeFetchCheck));\n}\n\n/**\n * Add an instrumentation handler for long-lived fetch requests, like consuming server-sent events (SSE) via fetch.\n * The handler will resolve the request body and emit the actual `endTimestamp`, so that the\n * span can be updated accordingly.\n *\n * Only used internally\n * @hidden\n */\nfunction addFetchEndInstrumentationHandler(handler) {\n const type = 'fetch-body-resolved';\n addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(streamHandler));\n}\n\nfunction instrumentFetch(onFetchResolved, skipNativeFetchCheck = false) {\n if (skipNativeFetchCheck && !supportsNativeFetch()) {\n return;\n }\n\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch) {\n return function (...args) {\n // We capture the error right here and not in the Promise error callback because Safari (and probably other\n // browsers too) will wipe the stack trace up to this point, only leaving us with this file which is useless.\n\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your fetch call did not\n // have a stack trace, so the SDK backfilled the stack trace so\n // you can see which fetch call failed.\n const virtualError = new Error();\n\n const { method, url } = parseFetchArgs(args);\n const handlerData = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: timestampInSeconds() * 1000,\n // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation\n virtualError,\n };\n\n // if there is no callback, fetch is instrumented directly\n if (!onFetchResolved) {\n triggerHandlers('fetch', {\n ...handlerData,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n async (response) => {\n if (onFetchResolved) {\n onFetchResolved(response);\n } else {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1000,\n response,\n });\n }\n\n return response;\n },\n (error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1000,\n error,\n });\n\n if (isError(error) && error.stack === undefined) {\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your fetch call did not\n // have a stack trace, so the SDK backfilled the stack trace so\n // you can see which fetch call failed.\n error.stack = virtualError.stack;\n addNonEnumerableProperty(error, 'framesToPop', 1);\n }\n\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}\n\nasync function resolveResponse(res, onFinishedResolving) {\n if (res?.body) {\n const body = res.body;\n const responseReader = body.getReader();\n\n // Define a maximum duration after which we just cancel\n const maxFetchDurationTimeout = setTimeout(\n () => {\n body.cancel().then(null, () => {\n // noop\n });\n },\n 90 * 1000, // 90s\n );\n\n let readingActive = true;\n while (readingActive) {\n let chunkTimeout;\n try {\n // abort reading if read op takes more than 5s\n chunkTimeout = setTimeout(() => {\n body.cancel().then(null, () => {\n // noop on error\n });\n }, 5000);\n\n // This .read() call will reject/throw when we abort due to timeouts through `body.cancel()`\n const { done } = await responseReader.read();\n\n clearTimeout(chunkTimeout);\n\n if (done) {\n onFinishedResolving();\n readingActive = false;\n }\n } catch (error) {\n readingActive = false;\n } finally {\n clearTimeout(chunkTimeout);\n }\n }\n\n clearTimeout(maxFetchDurationTimeout);\n\n responseReader.releaseLock();\n body.cancel().then(null, () => {\n // noop on error\n });\n }\n}\n\nfunction streamHandler(response) {\n // clone response for awaiting stream\n let clonedResponseForResolving;\n try {\n clonedResponseForResolving = response.clone();\n } catch {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n resolveResponse(clonedResponseForResolving, () => {\n triggerHandlers('fetch-body-resolved', {\n endTimestamp: timestampInSeconds() * 1000,\n response,\n });\n });\n}\n\nfunction hasProp(obj, prop) {\n return !!obj && typeof obj === 'object' && !!(obj )[prop];\n}\n\nfunction getUrlFromResource(resource) {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request.\n * Exported for tests only.\n */\nfunction parseFetchArgs(fetchArgs) {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs ;\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg ),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n\nexport { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, parseFetchArgs };\n//# sourceMappingURL=fetch.js.map\n","/*\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 flags 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/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nfunction isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nfunction getSDKSource() {\n // This comment is used to identify this line in the CDN bundle build step and replace this with \"return 'cdn';\"\n /* __SENTRY_SDK_SOURCE__ */ return 'npm';\n}\n\nexport { getSDKSource, isBrowserBundle };\n//# sourceMappingURL=env.js.map\n","import { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, withScope, addExceptionTypeValue, addExceptionMechanism, captureException } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nlet ignoreOnError = 0;\n\n/**\n * @hidden\n */\nfunction shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nfunction ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\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. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nfunction wrap(\n fn,\n options\n\n = {},\n) {\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\n function isFunction(fn) {\n return typeof fn === 'function';\n }\n\n if (!isFunction(fn)) {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = (fn ).__sentry_wrapped__;\n if (wrapper) {\n if (typeof wrapper === 'function') {\n return wrapper;\n } else {\n // If we find that the `__sentry_wrapped__` function is not a function at the time of accessing it, it means\n // that something messed with it. In that case we want to return the originally passed function.\n return fn;\n }\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\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\n // Wrap the function itself\n // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n const sentryWrapped = function ( ...args) {\n try {\n // Also wrap arguments that are themselves functions\n const wrappedArguments = args.map(arg => wrap(arg, options));\n\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 } catch (ex) {\n ignoreNextOnError();\n\n withScope(scope => {\n scope.addEventProcessor(event => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n } ;\n\n // Wrap the wrapped function in a proxy, to ensure any other properties of the original function remain available\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property ] = fn[property ];\n }\n }\n } catch {\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n }\n\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\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get() {\n return fn.name;\n },\n });\n }\n } catch {\n // This may throw if e.g. the descriptor does not exist, or a browser does not allow redefining `name`.\n // to save some bytes we simply try-catch this\n }\n\n return sentryWrapped;\n}\n\nexport { WINDOW, ignoreNextOnError, shouldIgnoreOnError, wrap };\n//# sourceMappingURL=helpers.js.map\n","import { addExceptionMechanism, resolvedSyncPromise, isErrorEvent, isDOMError, isDOMException, addExceptionTypeValue, isError, isPlainObject, isEvent, isParameterizedString, getClient, normalizeToSize, extractExceptionKeysForMessage } from '@sentry/core';\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nfunction exceptionFromError(stackParser, ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n\n const exception = {\n type: extractType(ex),\n value: extractMessage(ex),\n };\n\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\nfunction eventFromPlainObject(\n stackParser,\n exception,\n syntheticException,\n isUnhandledRejection,\n) {\n const client = getClient();\n const normalizeDepth = client?.getOptions().normalizeDepth;\n\n // If we can, we extract an exception from the object properties\n const errorFromProp = getErrorPropertyFromObject(exception);\n\n const extra = {\n __serialized__: normalizeToSize(exception, normalizeDepth),\n };\n\n if (errorFromProp) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, errorFromProp)],\n },\n extra,\n };\n }\n\n const event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n } ,\n ],\n },\n extra,\n } ;\n\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].stacktrace = { frames };\n }\n }\n\n return event;\n}\n\nfunction eventFromError(stackParser, ex) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)],\n },\n };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n stackParser,\n ex,\n) {\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 const stacktrace = ex.stacktrace || ex.stack || '';\n\n const skipLines = getSkipFirstStackStringLines(ex);\n const framesToPop = getPopFirstTopFrames(ex);\n\n try {\n return stackParser(stacktrace, skipLines, framesToPop);\n } catch (e) {\n // no-empty\n }\n\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/**\n * Certain known React errors contain links that would be falsely\n * parsed as frames. This function check for these errors and\n * returns number of the stack string lines to skip.\n */\nfunction getSkipFirstStackStringLines(ex) {\n if (ex && reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n\n return 0;\n}\n\n/**\n * If error has `framesToPop` property, it means that the\n * creator tells us the first x frames will be useless\n * and should be discarded. Typically error from wrapper function\n * which don't point to the actual location in the developer's code.\n *\n * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46\n */\nfunction getPopFirstTopFrames(ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n\n return 0;\n}\n\n// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception\n// @ts-expect-error - WebAssembly.Exception is a valid class\nfunction isWebAssemblyException(exception) {\n // Check for support\n // @ts-expect-error - WebAssembly.Exception is a valid class\n if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {\n // @ts-expect-error - WebAssembly.Exception is a valid class\n return exception instanceof WebAssembly.Exception;\n } else {\n return false;\n }\n}\n\n/**\n * Extracts from errors what we use as the exception `type` in error events.\n *\n * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.\n */\nfunction extractType(ex) {\n const name = ex?.name;\n\n // The name for WebAssembly.Exception Errors needs to be extracted differently.\n // Context: https://github.com/getsentry/sentry-javascript/issues/13787\n if (!name && isWebAssemblyException(ex)) {\n // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';\n }\n\n return name;\n}\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 const message = ex?.message;\n\n if (isWebAssemblyException(ex)) {\n // For Node 18, Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n if (Array.isArray(ex.message) && ex.message.length == 2) {\n return ex.message[1];\n }\n return 'wasm exception';\n }\n\n if (!message) {\n return 'No error message';\n }\n\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n\n return message;\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nfunction eventFromException(\n stackParser,\n exception,\n hint,\n attachStacktrace,\n) {\n const syntheticException = hint?.syntheticException || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nfunction eventFromMessage(\n stackParser,\n message,\n level = 'info',\n hint,\n attachStacktrace,\n) {\n const syntheticException = hint?.syntheticException || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nfunction eventFromUnknownInput(\n stackParser,\n exception,\n syntheticException,\n attachStacktrace,\n isUnhandledRejection,\n) {\n let event;\n\n if (isErrorEvent(exception ) && (exception ).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception ;\n return eventFromError(stackParser, errorEvent.error );\n }\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 const domException = exception ;\n\n if ('stack' in (exception )) {\n event = eventFromError(stackParser, exception );\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, 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 const objectException = exception ;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\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(stackParser, exception , syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\nfunction eventFromString(\n stackParser,\n message,\n syntheticException,\n attachStacktrace,\n) {\n const event = {};\n\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: message, stacktrace: { frames } }],\n };\n }\n addExceptionMechanism(event, { synthetic: true });\n }\n\n if (isParameterizedString(message)) {\n const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__,\n };\n return event;\n }\n\n event.message = message;\n return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n exception,\n { isUnhandledRejection },\n) {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch (e) {\n // ignore errors here\n }\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj) {\n for (const prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n const value = obj[prop];\n if (value instanceof Error) {\n return value;\n }\n }\n }\n\n return undefined;\n}\n\nexport { eventFromException, eventFromMessage, eventFromUnknownInput, exceptionFromError, extractMessage, extractType };\n//# sourceMappingURL=eventbuilder.js.map\n","import { Client, getSDKSource, applySdkMetadata, addAutoIpAddressToUser, addAutoIpAddressToSession } from '@sentry/core';\nimport { eventFromException, eventFromMessage } from './eventbuilder.js';\nimport { WINDOW } from './helpers.js';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/core Options for more information.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nclass BrowserClient extends Client {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n constructor(options) {\n const opts = {\n // We default this to true, as it is the safer scenario\n parentSpanIsAlwaysRootSpan: true,\n ...options,\n };\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n applySdkMetadata(opts, 'browser', ['browser'], sdkSource);\n\n super(opts);\n\n if (opts.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n\n if (this._options.sendDefaultPii) {\n this.on('postprocessEvent', addAutoIpAddressToUser);\n this.on('beforeSendSession', addAutoIpAddressToSession);\n }\n }\n\n /**\n * @inheritDoc\n */\n eventFromException(exception, hint) {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n eventFromMessage(\n message,\n level = 'info',\n hint,\n ) {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n _prepareEvent(\n event,\n hint,\n currentScope,\n isolationScope,\n ) {\n event.platform = event.platform || 'javascript';\n\n return super._prepareEvent(event, hint, currentScope, isolationScope);\n }\n}\n\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { GLOBAL_OBJ } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ\n\n;\n\nexport { WINDOW };\n//# sourceMappingURL=types.js.map\n","import { addHandler, maybeInstrument, triggerHandlers, fill, addNonEnumerableProperty, uuid4 } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst DEBOUNCE_DURATION = 1000;\n\nlet debounceTimerID;\nlet lastCapturedEventType;\nlet lastCapturedEventTargetId;\n\n/**\n * Add an instrumentation handler for when a click or a keypress happens.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addClickKeypressInstrumentationHandler(handler) {\n const type = 'dom';\n addHandler(type, handler);\n maybeInstrument(type, instrumentDOM);\n}\n\n/** Exported for tests only. */\nfunction instrumentDOM() {\n if (!WINDOW.document) {\n return;\n }\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 const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\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((target) => {\n const globalObject = WINDOW ;\n const proto = globalObject[target]?.prototype;\n\n // eslint-disable-next-line no-prototype-builtins\n if (!proto?.hasOwnProperty?.('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener) {\n return function ( type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n const handlers = (this.__sentry_instrumentation_handlers__ =\n this.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener) {\n return function ( type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n const handlers = this.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\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[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete this.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event) {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (event.type !== lastCapturedEventType) {\n return false;\n }\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 (!event.target || (event.target )._sentryId !== lastCapturedEventTargetId) {\n return false;\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\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 true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType, target) {\n // We are only interested in filtering `keypress` events for now.\n if (eventType !== 'keypress') {\n return false;\n }\n\n if (!target?.tagName) {\n return true;\n }\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 return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n */\nfunction makeDOMEventHandler(\n handler,\n globalListener = false,\n) {\n return (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 || event['_sentryCaptured']) {\n return;\n }\n\n const target = getEventTarget(event);\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event.type, target)) {\n return;\n }\n\n // Mark event as \"seen\"\n addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n if (target && !target._sentryId) {\n // Add UUID to event target so we can identify if\n addNonEnumerableProperty(target, '_sentryId', uuid4());\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, 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 if (!isSimilarToLastCapturedEvent(event)) {\n const handlerData = { event, name, global: globalListener };\n handler(handlerData);\n lastCapturedEventType = event.type;\n lastCapturedEventTargetId = target ? target._sentryId : undefined;\n }\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 = WINDOW.setTimeout(() => {\n lastCapturedEventTargetId = undefined;\n lastCapturedEventType = undefined;\n }, DEBOUNCE_DURATION);\n };\n}\n\nfunction getEventTarget(event) {\n try {\n return event.target ;\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 return null;\n }\n}\n\nexport { addClickKeypressInstrumentationHandler, instrumentDOM };\n//# sourceMappingURL=dom.js.map\n","import { addHandler, maybeInstrument, triggerHandlers, supportsHistory, fill } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nlet lastHref;\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addHistoryInstrumentationHandler(handler) {\n const type = 'history';\n addHandler(type, handler);\n maybeInstrument(type, instrumentHistory);\n}\n\nfunction instrumentHistory() {\n // The `popstate` event may also be triggered on `pushState`, but it may not always reliably be emitted by the browser\n // Which is why we also monkey-patch methods below, in addition to this\n WINDOW.addEventListener('popstate', () => {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n\n if (from === to) {\n return;\n }\n\n const handlerData = { from, to } ;\n triggerHandlers('history', handlerData);\n });\n\n // Just guard against this not being available, in weird environments\n if (!supportsHistory()) {\n return;\n }\n\n function historyReplacementFunction(originalHistoryFunction) {\n return function ( ...args) {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n\n if (from === to) {\n return;\n }\n\n const handlerData = { from, to } ;\n triggerHandlers('history', handlerData);\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nexport { addHistoryInstrumentationHandler };\n//# sourceMappingURL=history.js.map\n","import { isNativeFunction, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './types.js';\n\n/**\n * We generally want to use window.fetch / window.setTimeout.\n * However, in some cases this may be wrapped (e.g. by Zone.js for Angular),\n * so we try to get an unpatched version of this from a sandboxed iframe.\n */\n\nconst cachedImplementations = {};\n\n/**\n * Get the native implementation of a browser function.\n *\n * This can be used to ensure we get an unwrapped version of a function, in cases where a wrapped function can lead to problems.\n *\n * The following methods can be retrieved:\n * - `setTimeout`: This can be wrapped by e.g. Angular, causing change detection to be triggered.\n * - `fetch`: This can be wrapped by e.g. ad-blockers, causing an infinite loop when a request is blocked.\n */\nfunction getNativeImplementation(\n name,\n) {\n const cached = cachedImplementations[name];\n if (cached) {\n return cached;\n }\n\n let impl = WINDOW[name] ;\n\n // Fast path to avoid DOM I/O\n if (isNativeFunction(impl)) {\n return (cachedImplementations[name] = impl.bind(WINDOW) );\n }\n\n const document = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow?.[name]) {\n impl = contentWindow[name] ;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n // Could not create sandbox iframe, just use window.xxx\n DEBUG_BUILD && logger.warn(`Could not create sandbox iframe for ${name} check, bailing to window.${name}: `, e);\n }\n }\n\n // Sanity check: This _should_ not happen, but if it does, we just skip caching...\n // This can happen e.g. in tests where fetch may not be available in the env, or similar.\n if (!impl) {\n return impl;\n }\n\n return (cachedImplementations[name] = impl.bind(WINDOW) );\n}\n\n/** Clear a cached implementation. */\nfunction clearCachedImplementation(name) {\n cachedImplementations[name] = undefined;\n}\n\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 */\nfunction fetch(...rest) {\n return getNativeImplementation('fetch')(...rest);\n}\n\n/**\n * Get an unwrapped `setTimeout` method.\n * This ensures that even if e.g. Angular wraps `setTimeout`, we get the native implementation,\n * avoiding triggering change detection.\n */\nfunction setTimeout(...rest) {\n return getNativeImplementation('setTimeout')(...rest);\n}\n\nexport { clearCachedImplementation, fetch, getNativeImplementation, setTimeout };\n//# sourceMappingURL=getNativeImplementation.js.map\n","import { addHandler, maybeInstrument, timestampInSeconds, isString, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addXhrInstrumentationHandler(handler) {\n const type = 'xhr';\n addHandler(type, handler);\n maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nfunction instrumentXHR() {\n if (!(WINDOW ).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n xhrproto.open = new Proxy(xhrproto.open, {\n apply(originalOpen, xhrOpenThisArg, xhrOpenArgArray) {\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your XHR call did not\n // have a stack trace. If you are using HttpClient integration,\n // this is the expected behavior, as we are using this virtual error to capture\n // the location of your XHR call, and group your HttpClient events accordingly.\n const virtualError = new Error();\n\n const startTimestamp = timestampInSeconds() * 1000;\n\n // open() should always be called with two or more arguments\n // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n const method = isString(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : undefined;\n const url = parseUrl(xhrOpenArgArray[1]);\n\n if (!method || !url) {\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n }\n\n xhrOpenThisArg[SENTRY_XHR_DATA_KEY] = {\n method,\n url,\n request_headers: {},\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (method === 'POST' && url.match(/sentry_key/)) {\n xhrOpenThisArg.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = xhrOpenThisArg[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (xhrOpenThisArg.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = xhrOpenThisArg.status;\n } catch (e) {\n /* do nothing */\n }\n\n const handlerData = {\n endTimestamp: timestampInSeconds() * 1000,\n startTimestamp,\n xhr: xhrOpenThisArg,\n virtualError,\n };\n triggerHandlers('xhr', handlerData);\n }\n };\n\n if ('onreadystatechange' in xhrOpenThisArg && typeof xhrOpenThisArg.onreadystatechange === 'function') {\n xhrOpenThisArg.onreadystatechange = new Proxy(xhrOpenThisArg.onreadystatechange, {\n apply(originalOnreadystatechange, onreadystatechangeThisArg, onreadystatechangeArgArray) {\n onreadystatechangeHandler();\n return originalOnreadystatechange.apply(onreadystatechangeThisArg, onreadystatechangeArgArray);\n },\n });\n } else {\n xhrOpenThisArg.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n xhrOpenThisArg.setRequestHeader = new Proxy(xhrOpenThisArg.setRequestHeader, {\n apply(\n originalSetRequestHeader,\n setRequestHeaderThisArg,\n setRequestHeaderArgArray,\n ) {\n const [header, value] = setRequestHeaderArgArray;\n\n const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo && isString(header) && isString(value)) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray);\n },\n });\n\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n },\n });\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n xhrproto.send = new Proxy(xhrproto.send, {\n apply(originalSend, sendThisArg, sendArgArray) {\n const sentryXhrData = sendThisArg[SENTRY_XHR_DATA_KEY];\n\n if (!sentryXhrData) {\n return originalSend.apply(sendThisArg, sendArgArray);\n }\n\n if (sendArgArray[0] !== undefined) {\n sentryXhrData.body = sendArgArray[0];\n }\n\n const handlerData = {\n startTimestamp: timestampInSeconds() * 1000,\n xhr: sendThisArg,\n };\n triggerHandlers('xhr', handlerData);\n\n return originalSend.apply(sendThisArg, sendArgArray);\n },\n });\n}\n\nfunction parseUrl(url) {\n if (isString(url)) {\n return url;\n }\n\n try {\n // url can be a string or URL\n // but since URL is not available in IE11, we do not check for it,\n // but simply assume it is an URL and return `toString()` from it (which returns the full URL)\n // If that fails, we just return undefined\n return (url ).toString();\n } catch {} // eslint-disable-line no-empty\n\n return undefined;\n}\n\nexport { SENTRY_XHR_DATA_KEY, addXhrInstrumentationHandler, instrumentXHR };\n//# sourceMappingURL=xhr.js.map\n","import { getNativeImplementation, clearCachedImplementation } from '@sentry-internal/browser-utils';\nimport { createTransport, rejectedSyncPromise } from '@sentry/core';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nfunction makeFetchTransport(\n options,\n nativeFetch = getNativeImplementation('fetch'),\n) {\n let pendingBodySize = 0;\n let pendingCount = 0;\n\n function makeRequest(request) {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n\n const requestOptions = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'strict-origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. when finishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60000 && pendingCount < 15,\n ...options.fetchOptions,\n };\n\n if (!nativeFetch) {\n clearCachedImplementation('fetch');\n return rejectedSyncPromise('No fetch implementation available');\n }\n\n try {\n // TODO: This may need a `suppressTracing` call in the future when we switch the browser SDK to OTEL\n return nativeFetch(options.url, requestOptions).then(response => {\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n };\n });\n } catch (e) {\n clearCachedImplementation('fetch');\n pendingBodySize -= requestSize;\n pendingCount--;\n return rejectedSyncPromise(e);\n }\n }\n\n return createTransport(options, makeRequest);\n}\n\nexport { makeFetchTransport };\n//# sourceMappingURL=fetch.js.map\n","import { createStackParser, UNKNOWN_FUNCTION } from '@sentry/core';\n\n// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename, func, lineno, colno) {\n const frame = {\n filename,\n function: func === '' ? UNKNOWN_FUNCTION : func,\n in_app: true, // All browser frames are considered in_app\n };\n\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n\n if (colno !== undefined) {\n frame.colno = colno;\n }\n\n return frame;\n}\n\n// This regex matches frames that have no function name (ie. are at the top level of a module).\n// For example \"at http://localhost:5000//script.js:1:126\"\n// Frames _with_ function names usually look as follows: \"at commitLayoutEffects (react-dom.development.js:23426:1)\"\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\n\n// This regex matches all the frames that have a function name.\nconst chromeRegex =\n /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\n// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments\n// See: https://github.com/getsentry/sentry-javascript/issues/6880\nconst chromeStackParserFn = line => {\n // If the stack line has no function name, we need to parse it differently\n const noFnParts = chromeRegexNoFnName.exec(line) ;\n\n if (noFnParts) {\n const [, filename, line, col] = noFnParts;\n return createFrame(filename, UNKNOWN_FUNCTION, +line, +col);\n }\n\n const parts = chromeRegex.exec(line) ;\n\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]) ;\n\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\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 const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nconst chromeStackLineParser = [CHROME_PRIORITY, chromeStackParserFn];\n\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.\nconst geckoREgex =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko = line => {\n const parts = geckoREgex.exec(line) ;\n\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]) ;\n\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\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nconst geckoStackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs = line => {\n const parts = winjsRegex.exec(line) ;\n\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\n\nconst winjsStackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10 = line => {\n const parts = opera10Regex.exec(line) ;\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nconst opera10StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11 = line => {\n const parts = opera11Regex.exec(line) ;\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nconst opera11StackLineParser = [OPERA11_PRIORITY, opera11];\n\nconst defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];\n\nconst defaultStackParser = createStackParser(...defaultStackLineParsers);\n\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 */\nconst extractSafariExtensionDetails = (func, filename) => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\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\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };\n//# sourceMappingURL=stack-parsers.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { addClickKeypressInstrumentationHandler, addXhrInstrumentationHandler, addHistoryInstrumentationHandler, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';\nimport { defineIntegration, addConsoleInstrumentationHandler, addFetchInstrumentationHandler, getClient, addBreadcrumb, getEventDescription, logger, htmlTreeAsString, getComponentName, severityLevelFromString, safeJoin, getBreadcrumbLogLevelFromHttpStatusCode, parseUrl } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/* eslint-disable max-lines */\n\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\nconst INTEGRATION_NAME = 'Breadcrumbs';\n\nconst _breadcrumbsIntegration = ((options = {}) => {\n const _options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n if (_options.console) {\n addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));\n }\n if (_options.dom) {\n addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));\n }\n if (_options.xhr) {\n addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));\n }\n if (_options.fetch) {\n addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));\n }\n if (_options.history) {\n addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));\n }\n if (_options.sentry) {\n client.on('beforeSendEvent', _getSentryBreadcrumbHandler(client));\n }\n },\n };\n}) ;\n\nconst breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration);\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction _getSentryBreadcrumbHandler(client) {\n return function addSentryBreadcrumb(event) {\n if (getClient() !== client) {\n return;\n }\n\n addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n };\n}\n\n/**\n * A HOC that creates 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 */\nfunction _getDomBreadcrumbHandler(\n client,\n dom,\n) {\n return function _innerDomBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n let target;\n let componentName;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n let maxStringLength =\n typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event ;\n const element = _isEvent(event) ? event.target : event;\n\n target = htmlTreeAsString(element, { keyAttrs, maxStringLength });\n componentName = getComponentName(element);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n const breadcrumb = {\n category: `ui.${handlerData.name}`,\n message: target,\n };\n\n if (componentName) {\n breadcrumb.data = { 'ui.component_name': componentName };\n }\n\n addBreadcrumb(breadcrumb, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n });\n };\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _getConsoleBreadcrumbHandler(client) {\n return function _consoleBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\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 } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n };\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _getXhrBreadcrumbHandler(client) {\n return function _xhrBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n const { startTimestamp, endTimestamp } = handlerData;\n\n const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n\n const { method, url, status_code, body } = sentryXhrData;\n\n const data = {\n method,\n url,\n status_code,\n };\n\n const hint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp,\n };\n\n const breadcrumb = {\n category: 'xhr',\n data,\n type: 'http',\n level: getBreadcrumbLogLevelFromHttpStatusCode(status_code),\n };\n\n client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint );\n\n addBreadcrumb(breadcrumb, hint);\n };\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _getFetchBreadcrumbHandler(client) {\n return function _fetchBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n const { startTimestamp, endTimestamp } = handlerData;\n\n // We only capture complete fetch requests\n if (!endTimestamp) {\n return;\n }\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\n ({\n method: handlerData.fetchData.method,\n url: handlerData.fetchData.url,\n });\n\n if (handlerData.error) {\n const data = handlerData.fetchData;\n const hint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp,\n };\n\n const breadcrumb = {\n category: 'fetch',\n data,\n level: 'error',\n type: 'http',\n } ;\n\n client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint );\n\n addBreadcrumb(breadcrumb, hint);\n } else {\n const response = handlerData.response ;\n const data = {\n ...handlerData.fetchData,\n status_code: response?.status,\n };\n\n handlerData.fetchData.request_body_size;\n handlerData.fetchData.response_body_size;\n response?.status;\n\n const hint = {\n input: handlerData.args,\n response,\n startTimestamp,\n endTimestamp,\n };\n\n const breadcrumb = {\n category: 'fetch',\n data,\n type: 'http',\n level: getBreadcrumbLogLevelFromHttpStatusCode(data.status_code),\n };\n\n client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint );\n\n addBreadcrumb(breadcrumb, hint);\n }\n };\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _getHistoryBreadcrumbHandler(client) {\n return function _historyBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(WINDOW.location.href);\n let parsedFrom = from ? parseUrl(from) : undefined;\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom?.path) {\n parsedFrom = parsedLoc;\n }\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\n addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n };\n}\n\nfunction _isEvent(event) {\n return !!event && !!(event ).target;\n}\n\nexport { breadcrumbsIntegration };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { defineIntegration, fill, getFunctionName, getOriginalFunction } from '@sentry/core';\nimport { WINDOW, wrap } from '../helpers.js';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'BroadcastChannel',\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 'SharedWorker',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\nconst INTEGRATION_NAME = 'BrowserApiErrors';\n\nconst _browserApiErrorsIntegration = ((options = {}) => {\n const _options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO: This currently only works for the first client this is setup\n // We may want to adjust this to check for client etc.\n setupOnce() {\n if (_options.setTimeout) {\n fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n }\n\n if (_options.setInterval) {\n fill(WINDOW, 'setInterval', _wrapTimeFunction);\n }\n\n if (_options.requestAnimationFrame) {\n fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (_options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n const eventTargetOption = _options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n },\n };\n}) ;\n\n/**\n * Wrap timer functions and event targets to catch errors and provide better meta data.\n */\nconst browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration);\n\nfunction _wrapTimeFunction(original) {\n return function ( ...args) {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: false,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n\nfunction _wrapRAF(original) {\n return function ( callback) {\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n\nfunction _wrapXHR(originalSend) {\n return function ( ...args) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function (original) {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before BrowserApiErrors, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n}\n\nfunction _wrapEventTarget(target) {\n const globalObject = WINDOW ;\n const proto = globalObject[target]?.prototype;\n\n // eslint-disable-next-line no-prototype-builtins\n if (!proto?.hasOwnProperty?.('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original)\n\n {\n return function ( eventName, fn, options) {\n try {\n if (isEventListenerObject(fn)) {\n // ESlint disable explanation:\n // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n // introduce a bug here, because bind returns a new function that doesn't have our\n // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n fn.handleEvent = wrap(fn.handleEvent, {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n });\n }\n } catch {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.apply(this, [\n eventName,\n wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n\n fill(proto, 'removeEventListener', function (originalRemoveEventListener)\n\n {\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 try {\n const originalEventHandler = (fn ).__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, fn, options);\n };\n });\n}\n\nfunction isEventListenerObject(obj) {\n return typeof (obj ).handleEvent === 'function';\n}\n\nexport { browserApiErrorsIntegration };\n//# sourceMappingURL=browserapierrors.js.map\n","import { addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';\nimport { defineIntegration, logger, startSession, captureSession } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * When added, automatically creates sessions which allow you to track adoption and crashes (crash free rate) in your Releases in Sentry.\n * More information: https://docs.sentry.io/product/releases/health/\n *\n * Note: In order for session tracking to work, you need to set up Releases: https://docs.sentry.io/product/releases/\n */\nconst browserSessionIntegration = defineIntegration(() => {\n return {\n name: 'BrowserSession',\n setupOnce() {\n if (typeof WINDOW.document === 'undefined') {\n DEBUG_BUILD &&\n logger.warn('Using the `browserSessionIntegration` in non-browser environments is not supported.');\n return;\n }\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 startSession({ ignoreDuration: true });\n captureSession();\n\n // We want to create a session for every navigation as well\n addHistoryInstrumentationHandler(({ from, 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 startSession({ ignoreDuration: true });\n captureSession();\n }\n });\n },\n };\n});\n\nexport { browserSessionIntegration };\n//# sourceMappingURL=browsersession.js.map\n","import { defineIntegration, addGlobalErrorInstrumentationHandler, getClient, captureEvent, addGlobalUnhandledRejectionInstrumentationHandler, isPrimitive, isString, getLocationHref, UNKNOWN_FUNCTION, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { eventFromUnknownInput } from '../eventbuilder.js';\nimport { shouldIgnoreOnError } from '../helpers.js';\n\nconst INTEGRATION_NAME = 'GlobalHandlers';\n\nconst _globalHandlersIntegration = ((options = {}) => {\n const _options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n Error.stackTraceLimit = 50;\n },\n setup(client) {\n if (_options.onerror) {\n _installGlobalOnErrorHandler(client);\n globalHandlerLog('onerror');\n }\n if (_options.onunhandledrejection) {\n _installGlobalOnUnhandledRejectionHandler(client);\n globalHandlerLog('onunhandledrejection');\n }\n },\n };\n}) ;\n\nconst globalHandlersIntegration = defineIntegration(_globalHandlersIntegration);\n\nfunction _installGlobalOnErrorHandler(client) {\n addGlobalErrorInstrumentationHandler(data => {\n const { stackParser, attachStacktrace } = getOptions();\n\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n\n const { msg, url, line, column, error } = data;\n\n const event = _enhanceEventWithInitialFrame(\n eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n url,\n line,\n column,\n );\n\n event.level = 'error';\n\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onerror',\n },\n });\n });\n}\n\nfunction _installGlobalOnUnhandledRejectionHandler(client) {\n addGlobalUnhandledRejectionInstrumentationHandler(e => {\n const { stackParser, attachStacktrace } = getOptions();\n\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n\n const error = _getUnhandledRejectionError(e );\n\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n event.level = 'error';\n\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onunhandledrejection',\n },\n });\n });\n}\n\nfunction _getUnhandledRejectionError(error) {\n if (isPrimitive(error)) {\n return error;\n }\n\n // dig the object of the rejection out of known event types\n try {\n\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 (error )) {\n return (error ).reason;\n }\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 if ('detail' in (error ) && 'reason' in (error ).detail) {\n return (error ).detail.reason;\n }\n } catch {} // eslint-disable-line no-empty\n\n return error;\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\nfunction _enhanceEventWithInitialFrame(\n event,\n url,\n line,\n column,\n) {\n // event.exception\n const e = (event.exception = event.exception || {});\n // event.exception.values\n const ev = (e.values = e.values || []);\n // event.exception.values[0]\n const ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n const colno = column;\n const lineno = line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: UNKNOWN_FUNCTION,\n in_app: true,\n lineno,\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type) {\n DEBUG_BUILD && logger.log(`Global Handler attached: ${type}`);\n}\n\nfunction getOptions() {\n const client = getClient();\n const options = client?.getOptions() || {\n stackParser: () => [],\n attachStacktrace: false,\n };\n return options;\n}\n\nexport { globalHandlersIntegration };\n//# sourceMappingURL=globalhandlers.js.map\n","import { defineIntegration, getLocationHref } from '@sentry/core';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * Collects information about HTTP request headers and\n * attaches them to the event.\n */\nconst httpContextIntegration = defineIntegration(() => {\n return {\n name: 'HttpContext',\n preprocessEvent(event) {\n // if none of the information we want exists, don't bother\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n\n // grab as much info as exists and add it to the event\n const url = event.request?.url || getLocationHref();\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n\n const headers = {\n ...event.request?.headers,\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = {\n ...event.request,\n ...(url && { url }),\n headers,\n };\n\n event.request = request;\n },\n };\n});\n\nexport { httpContextIntegration };\n//# sourceMappingURL=httpcontext.js.map\n","import { defineIntegration, applyAggregateErrorsToEvent } from '@sentry/core';\nimport { exceptionFromError } from '../eventbuilder.js';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\nconst INTEGRATION_NAME = 'LinkedErrors';\n\nconst _linkedErrorsIntegration = ((options = {}) => {\n const limit = options.limit || DEFAULT_LIMIT;\n const key = options.key || DEFAULT_KEY;\n\n return {\n name: INTEGRATION_NAME,\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n key,\n limit,\n event,\n hint,\n );\n },\n };\n}) ;\n\n/**\n * Aggregrate linked errors in an event.\n */\nconst linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n\nexport { linkedErrorsIntegration };\n//# sourceMappingURL=linkederrors.js.map\n","import { inboundFiltersIntegration, functionToStringIntegration, dedupeIntegration, consoleSandbox, supportsFetch, logger, stackParserFromStackParserOptions, getIntegrationsToSetup, initAndBind, getCurrentScope, lastEventId, getReportDialogEndpoint, getLocationHref } from '@sentry/core';\nimport { BrowserClient } from './client.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './helpers.js';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs.js';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors.js';\nimport { browserSessionIntegration } from './integrations/browsersession.js';\nimport { globalHandlersIntegration } from './integrations/globalhandlers.js';\nimport { httpContextIntegration } from './integrations/httpcontext.js';\nimport { linkedErrorsIntegration } from './integrations/linkederrors.js';\nimport { defaultStackParser } from './stack-parsers.js';\nimport { makeFetchTransport } from './transports/fetch.js';\n\n/** Get the default integrations for the browser SDK. */\nfunction getDefaultIntegrations(_options) {\n /**\n * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n * `getDefaultIntegrations` but with an adjusted set of integrations.\n */\n return [\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n browserApiErrorsIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n browserSessionIntegration(),\n ];\n}\n\n/** Exported only for tests. */\nfunction applyDefaultOptions(optionsArg = {}) {\n const defaultOptions = {\n defaultIntegrations: getDefaultIntegrations(),\n release:\n typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n ? __SENTRY_RELEASE__\n : WINDOW.SENTRY_RELEASE?.id, // This supports the variable that sentry-webpack-plugin injects\n sendClientReports: true,\n };\n\n return {\n ...defaultOptions,\n ...dropTopLevelUndefinedKeys(optionsArg),\n };\n}\n\n/**\n * In contrast to the regular `dropUndefinedKeys` method,\n * this one does not deep-drop keys, but only on the top level.\n */\nfunction dropTopLevelUndefinedKeys(obj) {\n const mutatetedObj = {};\n\n for (const k of Object.getOwnPropertyNames(obj)) {\n const key = k ;\n if (obj[key] !== undefined) {\n mutatetedObj[key] = obj[key];\n }\n }\n\n return mutatetedObj;\n}\n\nfunction shouldShowBrowserExtensionError() {\n const windowWithMaybeExtension =\n typeof WINDOW.window !== 'undefined' && (WINDOW );\n if (!windowWithMaybeExtension) {\n // No need to show the error if we're not in a browser window environment (e.g. service workers)\n return false;\n }\n\n const extensionKey = windowWithMaybeExtension.chrome ? 'chrome' : 'browser';\n const extensionObject = windowWithMaybeExtension[extensionKey];\n\n const runtimeId = extensionObject?.runtime?.id;\n const href = getLocationHref() || '';\n\n const extensionProtocols = ['chrome-extension:', 'moz-extension:', 'ms-browser-extension:', 'safari-web-extension:'];\n\n // Running the SDK in a dedicated extension page and calling Sentry.init is fine; no risk of data leakage\n const isDedicatedExtensionPage =\n !!runtimeId && WINDOW === WINDOW.top && extensionProtocols.some(protocol => href.startsWith(`${protocol}//`));\n\n // Running the SDK in NW.js, which appears like a browser extension but isn't, is also fine\n // see: https://github.com/getsentry/sentry-javascript/issues/12668\n const isNWjs = typeof windowWithMaybeExtension.nw !== 'undefined';\n\n return !!runtimeId && !isDedicatedExtensionPage && !isNWjs;\n}\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\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 { 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 */\nfunction init(browserOptions = {}) {\n const options = applyDefaultOptions(browserOptions);\n\n if (!options.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) {\n if (DEBUG_BUILD) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(\n '[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',\n );\n });\n }\n return;\n }\n\n if (DEBUG_BUILD && !supportsFetch()) {\n logger.warn(\n 'No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.',\n );\n }\n const clientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || makeFetchTransport,\n };\n\n return initAndBind(BrowserClient, clientOptions);\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 */\nfunction showReportDialog(options = {}) {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n DEBUG_BUILD && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const scope = getCurrentScope();\n const client = scope.getClient();\n const dsn = client?.getDsn();\n\n if (!dsn) {\n DEBUG_BUILD && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n const eventId = lastEventId();\n if (eventId) {\n options.eventId = eventId;\n }\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const { onClose } = options;\n if (onClose) {\n const reportDialogClosedMessageHandler = (event) => {\n if (event.data === '__sentry_reportdialog_closed__') {\n try {\n onClose();\n } finally {\n WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n }\n }\n };\n WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n DEBUG_BUILD && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction forceLoad() {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction onLoad(callback) {\n callback();\n}\n\nexport { applyDefaultOptions, forceLoad, getDefaultIntegrations, init, onLoad, showReportDialog };\n//# sourceMappingURL=sdk.js.map\n","const DEFAULT_HOOKS = ['activate', 'mount'];\n\nexport { DEFAULT_HOOKS };\n//# sourceMappingURL=constants.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","// Vendored from https://github.com/vuejs/vue/blob/612fb89547711cacb030a3893a0065b785802860/src/core/util/debug.js\n// with types only changes.\n\n// The MIT License (MIT)\n\n// Copyright (c) 2013-present, Yuxi (Evan) You\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nconst classifyRE = /(?:^|[-_])(\\w)/g;\nconst classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');\n\nconst ROOT_COMPONENT_NAME = '';\nconst ANONYMOUS_COMPONENT_NAME = '';\n\nconst repeat = (str, n) => {\n return str.repeat(n);\n};\n\nconst formatComponentName = (vm, includeFile) => {\n if (!vm) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n if (vm.$root === vm) {\n return ROOT_COMPONENT_NAME;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5204 $options can be undefined\n if (!vm.$options) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n const options = vm.$options;\n\n let name = options.name || options._componentTag || options.__name;\n const file = options.__file;\n if (!name && file) {\n const match = file.match(/([^/\\\\]+)\\.vue$/);\n if (match) {\n name = match[1];\n }\n }\n\n return (\n (name ? `<${classify(name)}>` : ANONYMOUS_COMPONENT_NAME) + (file && includeFile !== false ? ` at ${file}` : '')\n );\n};\n\nconst generateComponentTrace = (vm) => {\n if (vm && (vm._isVue || vm.__isVue) && vm.$parent) {\n const tree = [];\n let currentRecursiveSequence = 0;\n while (vm) {\n if (tree.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const last = tree[tree.length - 1] ;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (last.constructor === vm.constructor) {\n currentRecursiveSequence++;\n vm = vm.$parent; // eslint-disable-line no-param-reassign\n continue;\n } else if (currentRecursiveSequence > 0) {\n tree[tree.length - 1] = [last, currentRecursiveSequence];\n currentRecursiveSequence = 0;\n }\n }\n tree.push(vm);\n vm = vm.$parent; // eslint-disable-line no-param-reassign\n }\n\n const formattedTree = tree\n .map(\n (vm, i) =>\n `${\n (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) +\n (Array.isArray(vm)\n ? `${formatComponentName(vm[0])}... (${vm[1]} recursive calls)`\n : formatComponentName(vm))\n }`,\n )\n .join('\\n');\n\n return `\\n\\nfound in\\n\\n${formattedTree}`;\n }\n\n return `\\n\\n(found in ${formatComponentName(vm)})`;\n};\n\nexport { formatComponentName, generateComponentTrace };\n//# sourceMappingURL=components.js.map\n","import { captureException } from '@sentry/core';\nimport { formatComponentName, generateComponentTrace } from './vendor/components.js';\n\nconst attachErrorHandler = (app, options) => {\n const { errorHandler: originalErrorHandler } = app.config;\n\n app.config.errorHandler = (error, vm, lifecycleHook) => {\n const componentName = formatComponentName(vm, false);\n const trace = vm ? generateComponentTrace(vm) : '';\n const metadata = {\n componentName,\n lifecycleHook,\n trace,\n };\n\n if (options.attachProps && vm) {\n // Vue2 - $options.propsData\n // Vue3 - $props\n if (vm.$options?.propsData) {\n metadata.propsData = vm.$options.propsData;\n } else if (vm.$props) {\n metadata.propsData = vm.$props;\n }\n }\n\n // Capture exception in the next event loop, to make sure that all breadcrumbs are recorded in time.\n setTimeout(() => {\n captureException(error, {\n captureContext: { contexts: { vue: metadata } },\n mechanism: { handled: !!originalErrorHandler, type: 'vue' },\n });\n });\n\n // Check if the current `app.config.errorHandler` is explicitly set by the user before calling it.\n if (typeof originalErrorHandler === 'function' && app.config.errorHandler) {\n (originalErrorHandler ).call(app, error, vm, lifecycleHook);\n } else {\n throw error;\n }\n };\n};\n\nexport { attachErrorHandler };\n//# sourceMappingURL=errorhandler.js.map\n","import { startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getActiveSpan } from '@sentry/browser';\nimport { logger, timestampInSeconds } from '@sentry/core';\nimport { DEFAULT_HOOKS } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { formatComponentName } from './vendor/components.js';\n\nconst VUE_OP = 'ui.vue';\n\n// Mappings from operation to corresponding lifecycle hook.\nconst HOOKS = {\n activate: ['activated', 'deactivated'],\n create: ['beforeCreate', 'created'],\n // Vue 3\n unmount: ['beforeUnmount', 'unmounted'],\n // Vue 2\n destroy: ['beforeDestroy', 'destroyed'],\n mount: ['beforeMount', 'mounted'],\n update: ['beforeUpdate', 'updated'],\n};\n\n/** Finish top-level span and activity with a debounce configured using `timeout` option */\nfunction finishRootSpan(vm, timestamp, timeout) {\n if (vm.$_sentryRootSpanTimer) {\n clearTimeout(vm.$_sentryRootSpanTimer);\n }\n\n vm.$_sentryRootSpanTimer = setTimeout(() => {\n if (vm.$root?.$_sentryRootSpan) {\n vm.$root.$_sentryRootSpan.end(timestamp);\n vm.$root.$_sentryRootSpan = undefined;\n }\n }, timeout);\n}\n\n/** Find if the current component exists in the provided `TracingOptions.trackComponents` array option. */\nfunction findTrackComponent(trackComponents, formattedName) {\n function extractComponentName(name) {\n return name.replace(/^<([^\\s]*)>(?: at [^\\s]*)?$/, '$1');\n }\n\n const isMatched = trackComponents.some(compo => {\n return extractComponentName(formattedName) === extractComponentName(compo);\n });\n\n return isMatched;\n}\n\nconst createTracingMixins = (options = {}) => {\n const hooks = (options.hooks || [])\n .concat(DEFAULT_HOOKS)\n // Removing potential duplicates\n .filter((value, index, self) => self.indexOf(value) === index);\n\n const mixins = {};\n\n for (const operation of hooks) {\n // Retrieve corresponding hooks from Vue lifecycle.\n // eg. mount => ['beforeMount', 'mounted']\n const internalHooks = HOOKS[operation];\n if (!internalHooks) {\n DEBUG_BUILD && logger.warn(`Unknown hook: ${operation}`);\n continue;\n }\n\n for (const internalHook of internalHooks) {\n mixins[internalHook] = function () {\n const isRoot = this.$root === this;\n\n if (isRoot) {\n this.$_sentryRootSpan =\n this.$_sentryRootSpan ||\n startInactiveSpan({\n name: 'Application Render',\n op: `${VUE_OP}.render`,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.vue',\n },\n onlyIfParent: true,\n });\n }\n\n // Skip components that we don't want to track to minimize the noise and give a more granular control to the user\n const name = formatComponentName(this, false);\n\n const shouldTrack = Array.isArray(options.trackComponents)\n ? findTrackComponent(options.trackComponents, name)\n : options.trackComponents;\n\n // We always want to track root component\n if (!isRoot && !shouldTrack) {\n return;\n }\n\n this.$_sentrySpans = this.$_sentrySpans || {};\n\n // Start a new span if current hook is a 'before' hook.\n // Otherwise, retrieve the current span and finish it.\n if (internalHook == internalHooks[0]) {\n const activeSpan = this.$root?.$_sentryRootSpan || getActiveSpan();\n if (activeSpan) {\n // Cancel old span for this hook operation in case it didn't get cleaned up. We're not actually sure if it\n // will ever be the case that cleanup hooks re not called, but we had users report that spans didn't get\n // finished so we finish the span before starting a new one, just to be sure.\n const oldSpan = this.$_sentrySpans[operation];\n if (oldSpan) {\n oldSpan.end();\n }\n\n this.$_sentrySpans[operation] = startInactiveSpan({\n name: `Vue ${name}`,\n op: `${VUE_OP}.${operation}`,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.vue',\n },\n // UI spans should only be created if there is an active root span (transaction)\n onlyIfParent: true,\n });\n }\n } else {\n // The span should already be added via the first handler call (in the 'before' hook)\n const span = this.$_sentrySpans[operation];\n // The before hook did not start the tracking span, so the span was not added.\n // This is probably because it happened before there is an active transaction\n if (!span) return;\n span.end();\n\n finishRootSpan(this, timestampInSeconds(), options.timeout || 2000);\n }\n };\n }\n }\n\n return mixins;\n};\n\nexport { createTracingMixins, findTrackComponent };\n//# sourceMappingURL=tracing.js.map\n","import { defineIntegration, consoleSandbox, hasSpansEnabled, GLOBAL_OBJ } from '@sentry/core';\nimport { DEFAULT_HOOKS } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { attachErrorHandler } from './errorhandler.js';\nimport { createTracingMixins } from './tracing.js';\n\nconst globalWithVue = GLOBAL_OBJ ;\n\nconst DEFAULT_CONFIG = {\n Vue: globalWithVue.Vue,\n attachProps: true,\n attachErrorHandler: true,\n tracingOptions: {\n hooks: DEFAULT_HOOKS,\n timeout: 2000,\n trackComponents: false,\n },\n};\n\nconst INTEGRATION_NAME = 'Vue';\n\nconst vueIntegration = defineIntegration((integrationOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n const options = { ...DEFAULT_CONFIG, ...client.getOptions(), ...integrationOptions };\n if (!options.Vue && !options.app) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).',\n );\n });\n return;\n }\n\n if (options.app) {\n const apps = Array.isArray(options.app) ? options.app : [options.app];\n apps.forEach(app => vueInit(app, options));\n } else if (options.Vue) {\n vueInit(options.Vue, options);\n }\n },\n };\n});\n\nconst vueInit = (app, options) => {\n if (DEBUG_BUILD) {\n // Check app is not mounted yet - should be mounted _after_ init()!\n // This is _somewhat_ private, but in the case that this doesn't exist we simply ignore it\n // See: https://github.com/vuejs/core/blob/eb2a83283caa9de0a45881d860a3cbd9d0bdd279/packages/runtime-core/src/component.ts#L394\n const appWithInstance = app\n\n;\n\n const isMounted = appWithInstance._instance?.isMounted;\n if (isMounted === true) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.',\n );\n });\n }\n }\n\n if (options.attachErrorHandler) {\n attachErrorHandler(app, options);\n }\n\n if (hasSpansEnabled(options)) {\n app.mixin(createTracingMixins(options.tracingOptions));\n }\n};\n\nexport { vueIntegration };\n//# sourceMappingURL=integration.js.map\n","import { getDefaultIntegrations, init as init$1 } from '@sentry/browser';\nimport { applySdkMetadata } from '@sentry/core';\nimport { vueIntegration } from './integration.js';\n\n/**\n * Inits the Vue SDK\n */\nfunction init(options = {}) {\n const opts = {\n defaultIntegrations: [...getDefaultIntegrations(options), vueIntegration()],\n ...options,\n };\n\n applySdkMetadata(opts, 'vue');\n\n return init$1(opts);\n}\n\nexport { init };\n//# sourceMappingURL=sdk.js.map\n","/*!\n * vue-router v4.4.5\n * (c) 2024 Eduardo San Martin Morote\n * @license MIT\n */\nimport { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, shallowReactive, nextTick } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst isBrowser = typeof document !== 'undefined';\n\n/**\n * Allows differentiating lazy components from functional components and vue-class-component\n * @internal\n *\n * @param component\n */\nfunction isRouteComponent(component) {\n return (typeof component === 'object' ||\n 'displayName' in component ||\n 'props' in component ||\n '__vccOpts' in component);\n}\nfunction isESModule(obj) {\n return (obj.__esModule ||\n obj[Symbol.toStringTag] === 'Module' ||\n // support CF with dynamic imports that do not\n // add the Module string tag\n (obj.default && isRouteComponent(obj.default)));\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value)\n ? value.map(fn)\n : fn(value);\n }\n return newParams;\n}\nconst noop = () => { };\n/**\n * Typesafe alternative to Array.isArray\n * https://github.com/microsoft/TypeScript/pull/48228\n */\nconst isArray = Array.isArray;\n\nfunction warn(msg) {\n // avoid using ...args as it breaks in older Edge builds\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, ['[Vue Router warn]: ' + msg].concat(args));\n}\n\n/**\n * Encoding Rules (␣ = Space)\n * - Path: ␣ \" < > # ? { }\n * - Query: ␣ \" < > # & =\n * - Hash: ␣ \" < > `\n *\n * On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n * defines some extra characters to be encoded. Most browsers do not encode them\n * in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n * also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n * plus `-._~`. This extra safety should be applied to query by patching the\n * string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n * should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n * into a `/` if directly typed in. The _backtick_ (`````) should also be\n * encoded everywhere because some browsers like FF encode it when directly\n * written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n */\n// const EXTRA_RESERVED_RE = /[!'()*]/g\n// const encodeReservedReplacer = (c: string) => '%' + c.charCodeAt(0).toString(16)\nconst HASH_RE = /#/g; // %23\nconst AMPERSAND_RE = /&/g; // %26\nconst SLASH_RE = /\\//g; // %2F\nconst EQUAL_RE = /=/g; // %3D\nconst IM_RE = /\\?/g; // %3F\nconst PLUS_RE = /\\+/g; // %2B\n/**\n * NOTE: It's not clear to me if we should encode the + symbol in queries, it\n * seems to be less flexible than not doing so and I can't find out the legacy\n * systems requiring this for regular requests like text/html. In the standard,\n * the encoding of the plus character is only mentioned for\n * application/x-www-form-urlencoded\n * (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n * leave the plus character as is in queries. To be more flexible, we allow the\n * plus character on the query, but it can also be manually encoded by the user.\n *\n * Resources:\n * - https://url.spec.whatwg.org/#urlencoded-parsing\n * - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n */\nconst ENC_BRACKET_OPEN_RE = /%5B/g; // [\nconst ENC_BRACKET_CLOSE_RE = /%5D/g; // ]\nconst ENC_CARET_RE = /%5E/g; // ^\nconst ENC_BACKTICK_RE = /%60/g; // `\nconst ENC_CURLY_OPEN_RE = /%7B/g; // {\nconst ENC_PIPE_RE = /%7C/g; // |\nconst ENC_CURLY_CLOSE_RE = /%7D/g; // }\nconst ENC_SPACE_RE = /%20/g; // }\n/**\n * Encode characters that need to be encoded on the path, search and hash\n * sections of the URL.\n *\n * @internal\n * @param text - string to encode\n * @returns encoded string\n */\nfunction commonEncode(text) {\n return encodeURI('' + text)\n .replace(ENC_PIPE_RE, '|')\n .replace(ENC_BRACKET_OPEN_RE, '[')\n .replace(ENC_BRACKET_CLOSE_RE, ']');\n}\n/**\n * Encode characters that need to be encoded on the hash section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeHash(text) {\n return commonEncode(text)\n .replace(ENC_CURLY_OPEN_RE, '{')\n .replace(ENC_CURLY_CLOSE_RE, '}')\n .replace(ENC_CARET_RE, '^');\n}\n/**\n * Encode characters that need to be encoded query values on the query\n * section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeQueryValue(text) {\n return (commonEncode(text)\n // Encode the space as +, encode the + to differentiate it from the space\n .replace(PLUS_RE, '%2B')\n .replace(ENC_SPACE_RE, '+')\n .replace(HASH_RE, '%23')\n .replace(AMPERSAND_RE, '%26')\n .replace(ENC_BACKTICK_RE, '`')\n .replace(ENC_CURLY_OPEN_RE, '{')\n .replace(ENC_CURLY_CLOSE_RE, '}')\n .replace(ENC_CARET_RE, '^'));\n}\n/**\n * Like `encodeQueryValue` but also encodes the `=` character.\n *\n * @param text - string to encode\n */\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, '%3D');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, '%23').replace(IM_RE, '%3F');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL as a\n * param. This function encodes everything {@link encodePath} does plus the\n * slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n * string instead.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeParam(text) {\n return text == null ? '' : encodePath(text).replace(SLASH_RE, '%2F');\n}\n/**\n * Decode text using `decodeURIComponent`. Returns the original text if it\n * fails.\n *\n * @param text - string to decode\n * @returns decoded string\n */\nfunction decode(text) {\n try {\n return decodeURIComponent('' + text);\n }\n catch (err) {\n (process.env.NODE_ENV !== 'production') && warn(`Error decoding \"${text}\". Using original value`);\n }\n return '' + text;\n}\n\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');\n/**\n * Transforms a URI into a normalized history location\n *\n * @param parseQuery\n * @param location - URI to normalize\n * @param currentLocation - current absolute location. Allows resolving relative\n * paths. Must start with `/`. Defaults to `/`\n * @returns a normalized history location\n */\nfunction parseURL(parseQuery, location, currentLocation = '/') {\n let path, query = {}, searchString = '', hash = '';\n // Could use URL and URLSearchParams but IE 11 doesn't support it\n // TODO: move to new URL()\n const hashPos = location.indexOf('#');\n let searchPos = location.indexOf('?');\n // the hash appears before the search, so it's not part of the search string\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location.slice(0, searchPos);\n searchString = location.slice(searchPos + 1, hashPos > -1 ? hashPos : location.length);\n query = parseQuery(searchString);\n }\n if (hashPos > -1) {\n path = path || location.slice(0, hashPos);\n // keep the # character\n hash = location.slice(hashPos, location.length);\n }\n // no search and no query\n path = resolveRelativePath(path != null ? path : location, currentLocation);\n // empty path means a relative query or hash `?foo=f`, `#thing`\n return {\n fullPath: path + (searchString && '?') + searchString + hash,\n path,\n query,\n hash: decode(hash),\n };\n}\n/**\n * Stringifies a URL object\n *\n * @param stringifyQuery\n * @param location\n */\nfunction stringifyURL(stringifyQuery, location) {\n const query = location.query ? stringifyQuery(location.query) : '';\n return location.path + (query && '?') + query + (location.hash || '');\n}\n/**\n * Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n *\n * @param pathname - location.pathname\n * @param base - base to strip off\n */\nfunction stripBase(pathname, base) {\n // no base or base is not found at the beginning\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || '/';\n}\n/**\n * Checks if two RouteLocation are equal. This means that both locations are\n * pointing towards the same {@link RouteRecord} and that all `params`, `query`\n * parameters and `hash` are the same\n *\n * @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n * @param a - first {@link RouteLocation}\n * @param b - second {@link RouteLocation}\n */\nfunction isSameRouteLocation(stringifyQuery, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return (aLastIndex > -1 &&\n aLastIndex === bLastIndex &&\n isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) &&\n isSameRouteLocationParams(a.params, b.params) &&\n stringifyQuery(a.query) === stringifyQuery(b.query) &&\n a.hash === b.hash);\n}\n/**\n * Check if two `RouteRecords` are equal. Takes into account aliases: they are\n * considered equal to the `RouteRecord` they are aliasing.\n *\n * @param a - first {@link RouteRecord}\n * @param b - second {@link RouteRecord}\n */\nfunction isSameRouteRecord(a, b) {\n // since the original record has an undefined value for aliasOf\n // but all aliases point to the original record, this will always compare\n // the original record\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a)\n ? isEquivalentArray(a, b)\n : isArray(b)\n ? isEquivalentArray(b, a)\n : a === b;\n}\n/**\n * Check if two arrays are the same or if an array with one single entry is the\n * same as another primitive value. Used to check query and parameters\n *\n * @param a - array of values\n * @param b - array of values or a single value\n */\nfunction isEquivalentArray(a, b) {\n return isArray(b)\n ? a.length === b.length && a.every((value, i) => value === b[i])\n : a.length === 1 && a[0] === b;\n}\n/**\n * Resolves a relative path that starts with `.`.\n *\n * @param to - path location we are resolving\n * @param from - currentLocation.path, should start with `/`\n */\nfunction resolveRelativePath(to, from) {\n if (to.startsWith('/'))\n return to;\n if ((process.env.NODE_ENV !== 'production') && !from.startsWith('/')) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split('/');\n const toSegments = to.split('/');\n const lastToSegment = toSegments[toSegments.length - 1];\n // make . and ./ the same (../ === .., ../../ === ../..)\n // this is the same behavior as new URL()\n if (lastToSegment === '..' || lastToSegment === '.') {\n toSegments.push('');\n }\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n // we stay on the same position\n if (segment === '.')\n continue;\n // go up in the from array\n if (segment === '..') {\n // we can't go below zero, but we still need to increment toPosition\n if (position > 1)\n position--;\n // continue\n }\n // we reached a non-relative path, we stop here\n else\n break;\n }\n return (fromSegments.slice(0, position).join('/') +\n '/' +\n toSegments.slice(toPosition).join('/'));\n}\n/**\n * Initial route location where the router is. Can be used in navigation guards\n * to differentiate the initial navigation.\n *\n * @example\n * ```js\n * import { START_LOCATION } from 'vue-router'\n *\n * router.beforeEach((to, from) => {\n * if (from === START_LOCATION) {\n * // initial navigation\n * }\n * })\n * ```\n */\nconst START_LOCATION_NORMALIZED = {\n path: '/',\n // TODO: could we use a symbol in the future?\n name: undefined,\n params: {},\n query: {},\n hash: '',\n fullPath: '/',\n matched: [],\n meta: {},\n redirectedFrom: undefined,\n};\n\nvar NavigationType;\n(function (NavigationType) {\n NavigationType[\"pop\"] = \"pop\";\n NavigationType[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function (NavigationDirection) {\n NavigationDirection[\"back\"] = \"back\";\n NavigationDirection[\"forward\"] = \"forward\";\n NavigationDirection[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\n/**\n * Starting location for Histories\n */\nconst START = '';\n// Generic utils\n/**\n * Normalizes a base by removing any trailing slash and reading the base tag if\n * present.\n *\n * @param base - base to normalize\n */\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n // respect tag\n const baseEl = document.querySelector('base');\n base = (baseEl && baseEl.getAttribute('href')) || '/';\n // strip full URL origin\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, '');\n }\n else {\n base = '/';\n }\n }\n // ensure leading slash when it was removed by the regex above avoid leading\n // slash with hash because the file could be read from the disk like file://\n // and the leading slash would cause problems\n if (base[0] !== '/' && base[0] !== '#')\n base = '/' + base;\n // remove the trailing slash so all other method can just do `base + fullPath`\n // to build an href\n return removeTrailingSlash(base);\n}\n// remove any character before the hash\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n return base.replace(BEFORE_HASH_RE, '#') + location;\n}\n\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0),\n };\n}\nconst computeScrollPosition = () => ({\n left: window.scrollX,\n top: window.scrollY,\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if ('el' in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === 'string' && positionEl.startsWith('#');\n /**\n * `id`s can accept pretty much any characters, including CSS combinators\n * like `>` or `~`. It's still possible to retrieve elements using\n * `document.getElementById('~')` but it needs to be escaped when using\n * `document.querySelector('#\\\\~')` for it to be valid. The only\n * requirements for `id`s are them to be unique on the page and to not be\n * empty (`id=\"\"`). Because of that, when passing an id selector, it should\n * be properly escaped for it to work with `querySelector`. We could check\n * for the id selector to be simple (no CSS combinators `+ >~`) but that\n * would make things inconsistent since they are valid characters for an\n * `id` but would need to be escaped when using `querySelector`, breaking\n * their usage and ending up in no selector returned. Selectors need to be\n * escaped:\n *\n * - `#1-thing` becomes `#\\31 -thing`\n * - `#with~symbols` becomes `#with\\\\~symbols`\n *\n * - More information about the topic can be found at\n * https://mathiasbynens.be/notes/html5-id-class.\n * - Practical example: https://mathiasbynens.be/demo/html5-id\n */\n if ((process.env.NODE_ENV !== 'production') && typeof position.el === 'string') {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n // return to avoid other warnings\n return;\n }\n }\n catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n // return to avoid other warnings\n return;\n }\n }\n }\n const el = typeof positionEl === 'string'\n ? isIdSelector\n ? document.getElementById(positionEl.slice(1))\n : document.querySelector(positionEl)\n : positionEl;\n if (!el) {\n (process.env.NODE_ENV !== 'production') &&\n warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n }\n else {\n scrollToOptions = position;\n }\n if ('scrollBehavior' in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n // consume it so it's not used again\n scrollPositions.delete(key);\n return scroll;\n}\n// TODO: RFC about how to save scroll position\n/**\n * ScrollBehavior instance used by the router to compute and restore the scroll\n * position when navigating.\n */\n// export interface ScrollHandler {\n// // returns a scroll position that can be saved in history\n// compute(): ScrollPositionEntry\n// // can take an extended ScrollPositionEntry\n// scroll(position: ScrollPosition): void\n// }\n// export const scrollHandler: ScrollHandler = {\n// compute: computeScroll,\n// scroll: scrollToPosition,\n// }\n\nlet createBaseLocation = () => location.protocol + '//' + location.host;\n/**\n * Creates a normalized history location from a window.location object\n * @param base - The base path\n * @param location - The window.location object\n */\nfunction createCurrentLocation(base, location) {\n const { pathname, search, hash } = location;\n // allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end\n const hashPos = base.indexOf('#');\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos))\n ? base.slice(hashPos).length\n : 1;\n let pathFromHash = hash.slice(slicePos);\n // prepend the starting slash to hash so the url starts with /#\n if (pathFromHash[0] !== '/')\n pathFromHash = '/' + pathFromHash;\n return stripBase(pathFromHash, '');\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n // TODO: should it be a stack? a Dict. Check if the popstate listener\n // can trigger twice\n let pauseState = null;\n const popStateHandler = ({ state, }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n // ignore the popstate and reset the pauseState\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n }\n else {\n replace(to);\n }\n // Here we could also revert the navigation by calling history.go(-delta)\n // this listener will have to be adapted to not trigger again and to wait for the url\n // to be updated before triggering the listeners. Some kind of validation function would also\n // need to be passed to the listeners so the navigation can be accepted\n // call all listeners\n listeners.forEach(listener => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta\n ? delta > 0\n ? NavigationDirection.forward\n : NavigationDirection.back\n : NavigationDirection.unknown,\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n // set up the listener and prepare teardown callbacks\n listeners.push(callback);\n const teardown = () => {\n const index = listeners.indexOf(callback);\n if (index > -1)\n listeners.splice(index, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history } = window;\n if (!history.state)\n return;\n history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), '');\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener('popstate', popStateHandler);\n window.removeEventListener('beforeunload', beforeUnloadListener);\n }\n // set up the listeners and prepare teardown callbacks\n window.addEventListener('popstate', popStateHandler);\n // TODO: could we use 'pagehide' or 'visibilitychange' instead?\n // https://developer.chrome.com/blog/page-lifecycle-api/\n window.addEventListener('beforeunload', beforeUnloadListener, {\n passive: true,\n });\n return {\n pauseListeners,\n listen,\n destroy,\n };\n}\n/**\n * Creates a state object\n */\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null,\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history, location } = window;\n // private variables\n const currentLocation = {\n value: createCurrentLocation(base, location),\n };\n const historyState = { value: history.state };\n // build current history entry as this is a fresh navigation\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null,\n }, true);\n }\n function changeLocation(to, state, replace) {\n /**\n * if a base tag is provided, and we are on a normal domain, we have to\n * respect the provided `base` attribute because pushState() will use it and\n * potentially erase anything before the `#` like at\n * https://github.com/vuejs/router/issues/685 where a base of\n * `/folder/#` but a base of `/` would erase the `/folder/` section. If\n * there is no host, the `` tag makes no sense and if there isn't a\n * base tag we can just use everything after the `#`.\n */\n const hashIndex = base.indexOf('#');\n const url = hashIndex > -1\n ? (location.host && document.querySelector('base')\n ? base\n : base.slice(hashIndex)) + to\n : createBaseLocation() + base + to;\n try {\n // BROWSER QUIRK\n // NOTE: Safari throws a SecurityError when calling this function 100 times in 30 seconds\n history[replace ? 'replaceState' : 'pushState'](state, '', url);\n historyState.value = state;\n }\n catch (err) {\n if ((process.env.NODE_ENV !== 'production')) {\n warn('Error with push/replace State', err);\n }\n else {\n console.error(err);\n }\n // Force the navigation, this also resets the call count\n location[replace ? 'replace' : 'assign'](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history.state, buildState(historyState.value.back, \n // keep back and forward entries but override current position\n to, historyState.value.forward, true), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n // Add to current entry the information of where we are going\n // as well as saving the current position\n const currentState = assign({}, \n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value, history.state, {\n forward: to,\n scroll: computeScrollPosition(),\n });\n if ((process.env.NODE_ENV !== 'production') && !history.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\n` +\n `history.replaceState(history.state, '', url)\\n\\n` +\n `You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace,\n };\n}\n/**\n * Creates an HTML5 history. Most common history for single page applications.\n *\n * @param base -\n */\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: '',\n base,\n go,\n createHref: createHref.bind(null, base),\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, 'location', {\n enumerable: true,\n get: () => historyNavigation.location.value,\n });\n Object.defineProperty(routerHistory, 'state', {\n enumerable: true,\n get: () => historyNavigation.state.value,\n });\n return routerHistory;\n}\n\n/**\n * Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n *\n * @param base - Base applied to all urls, defaults to '/'\n * @returns a history object that can be passed to the router constructor\n */\nfunction createMemoryHistory(base = '') {\n let listeners = [];\n let queue = [START];\n let position = 0;\n base = normalizeBase(base);\n function setLocation(location) {\n position++;\n if (position !== queue.length) {\n // we are in the middle, we remove everything from here in the queue\n queue.splice(position);\n }\n queue.push(location);\n }\n function triggerListeners(to, from, { direction, delta }) {\n const info = {\n direction,\n delta,\n type: NavigationType.pop,\n };\n for (const callback of listeners) {\n callback(to, from, info);\n }\n }\n const routerHistory = {\n // rewritten by Object.defineProperty\n location: START,\n // TODO: should be kept in queue\n state: {},\n base,\n createHref: createHref.bind(null, base),\n replace(to) {\n // remove current entry and decrement position\n queue.splice(position--, 1);\n setLocation(to);\n },\n push(to, data) {\n setLocation(to);\n },\n listen(callback) {\n listeners.push(callback);\n return () => {\n const index = listeners.indexOf(callback);\n if (index > -1)\n listeners.splice(index, 1);\n };\n },\n destroy() {\n listeners = [];\n queue = [START];\n position = 0;\n },\n go(delta, shouldTrigger = true) {\n const from = this.location;\n const direction = \n // we are considering delta === 0 going forward, but in abstract mode\n // using 0 for the delta doesn't make sense like it does in html5 where\n // it reloads the page\n delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n position = Math.max(0, Math.min(position + delta, queue.length - 1));\n if (shouldTrigger) {\n triggerListeners(this.location, from, {\n direction,\n delta,\n });\n }\n },\n };\n Object.defineProperty(routerHistory, 'location', {\n enumerable: true,\n get: () => queue[position],\n });\n return routerHistory;\n}\n\n/**\n * Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n * handle any URL is not possible.\n *\n * @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `` tag\n * in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n * calls**, meaning that if you use a `` tag, it's `href` value **has to match this parameter** (ignoring anything\n * after the `#`).\n *\n * @example\n * ```js\n * // at https://example.com/folder\n * createWebHashHistory() // gives a url of `https://example.com/folder#`\n * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n * // you should avoid doing this because it changes the original url and breaks copying urls\n * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n *\n * // at file:///usr/etc/folder/index.html\n * // for locations with no `host`, the base is ignored\n * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n * ```\n */\nfunction createWebHashHistory(base) {\n // Make sure this implementation is fine in terms of encoding, specially for IE11\n // for `file://`, directly use the pathname and ignore the base\n // location.pathname contains an initial `/` even at the root: `https://example.com`\n base = location.host ? base || location.pathname + location.search : '';\n // allow the user to provide a `#` in the middle: `/base/#/app`\n if (!base.includes('#'))\n base += '#';\n if ((process.env.NODE_ENV !== 'production') && !base.endsWith('#/') && !base.endsWith('#')) {\n warn(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, '#')}\".`);\n }\n return createWebHistory(base);\n}\n\nfunction isRouteLocation(route) {\n return typeof route === 'string' || (route && typeof route === 'object');\n}\nfunction isRouteName(name) {\n return typeof name === 'string' || typeof name === 'symbol';\n}\n\nconst NavigationFailureSymbol = Symbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : '');\n/**\n * Enumeration with all possible types for navigation failures. Can be passed to\n * {@link isNavigationFailure} to check for specific failures.\n */\nvar NavigationFailureType;\n(function (NavigationFailureType) {\n /**\n * An aborted navigation is a navigation that failed because a navigation\n * guard returned `false` or called `next(false)`\n */\n NavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\n /**\n * A cancelled navigation is a navigation that failed because a more recent\n * navigation finished started (not necessarily finished).\n */\n NavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\n /**\n * A duplicated navigation is a navigation that failed because it was\n * initiated while already being at the exact same location.\n */\n NavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\n// DEV only debug messages\nconst ErrorTypeMessages = {\n [1 /* ErrorTypes.MATCHER_NOT_FOUND */]({ location, currentLocation }) {\n return `No match for\\n ${JSON.stringify(location)}${currentLocation\n ? '\\nwhile being at\\n' + JSON.stringify(currentLocation)\n : ''}`;\n },\n [2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [4 /* ErrorTypes.NAVIGATION_ABORTED */]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [8 /* ErrorTypes.NAVIGATION_CANCELLED */]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [16 /* ErrorTypes.NAVIGATION_DUPLICATED */]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n },\n};\n/**\n * Creates a typed NavigationFailure object.\n * @internal\n * @param type - NavigationFailureType\n * @param params - { from, to }\n */\nfunction createRouterError(type, params) {\n // keep full error messages in cjs versions\n if ((process.env.NODE_ENV !== 'production') || !true) {\n return assign(new Error(ErrorTypeMessages[type](params)), {\n type,\n [NavigationFailureSymbol]: true,\n }, params);\n }\n else {\n return assign(new Error(), {\n type,\n [NavigationFailureSymbol]: true,\n }, params);\n }\n}\nfunction isNavigationFailure(error, type) {\n return (error instanceof Error &&\n NavigationFailureSymbol in error &&\n (type == null || !!(error.type & type)));\n}\nconst propertiesToLog = ['params', 'query', 'hash'];\nfunction stringifyRoute(to) {\n if (typeof to === 'string')\n return to;\n if (to.path != null)\n return to.path;\n const location = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location[key] = to[key];\n }\n return JSON.stringify(location, null, 2);\n}\n\n// default pattern for a param: non-greedy everything but /\nconst BASE_PARAM_PATTERN = '[^/]+?';\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true,\n};\n// Special Regex characters that must be escaped in static tokens\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n * Creates a path parser from an array of Segments (a segment is an array of Tokens)\n *\n * @param segments - array of segments returned by tokenizePath\n * @param extraOptions - optional options for the regexp\n * @returns a PathParser\n */\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n // the amount of scores is the same as the length of segments except for the root segment \"/\"\n const score = [];\n // the regexp as a string\n let pattern = options.start ? '^' : '';\n // extracted keys\n const keys = [];\n for (const segment of segments) {\n // the root segment needs special treatment\n const segmentScores = segment.length ? [] : [90 /* PathScore.Root */];\n // allow trailing slash\n if (options.strict && !segment.length)\n pattern += '/';\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n // resets the score if we are inside a sub-segment /:a-other-:b\n let subSegmentScore = 40 /* PathScore.Segment */ +\n (options.sensitive ? 0.25 /* PathScore.BonusCaseSensitive */ : 0);\n if (token.type === 0 /* TokenType.Static */) {\n // prepend the slash if we are starting a new segment\n if (!tokenIndex)\n pattern += '/';\n pattern += token.value.replace(REGEX_CHARS_RE, '\\\\$&');\n subSegmentScore += 40 /* PathScore.Static */;\n }\n else if (token.type === 1 /* TokenType.Param */) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional,\n });\n const re = regexp ? regexp : BASE_PARAM_PATTERN;\n // the user provided a custom regexp /:id(\\\\d+)\n if (re !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10 /* PathScore.BonusCustomRegExp */;\n // make sure the regexp is valid before using it\n try {\n new RegExp(`(${re})`);\n }\n catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` +\n err.message);\n }\n }\n // when we repeat we must take care of the repeating leading slash\n let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\n // prepend the slash if we are starting a new segment\n if (!tokenIndex)\n subPattern =\n // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2\n ? `(?:/${subPattern})`\n : '/' + subPattern;\n if (optional)\n subPattern += '?';\n pattern += subPattern;\n subSegmentScore += 20 /* PathScore.Dynamic */;\n if (optional)\n subSegmentScore += -8 /* PathScore.BonusOptional */;\n if (repeatable)\n subSegmentScore += -20 /* PathScore.BonusRepeatable */;\n if (re === '.*')\n subSegmentScore += -50 /* PathScore.BonusWildcard */;\n }\n segmentScores.push(subSegmentScore);\n }\n // an empty array like /home/ -> [[{home}], []]\n // if (!segment.length) pattern += '/'\n score.push(segmentScores);\n }\n // only apply the strict bonus to the last score\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001 /* PathScore.BonusStrict */;\n }\n // TODO: dev only warn double trailing slash\n if (!options.strict)\n pattern += '/?';\n if (options.end)\n pattern += '$';\n // allow paths like /dynamic to only match dynamic or dynamic/... but not dynamic_something_else\n else if (options.strict)\n pattern += '(?:/|$)';\n const re = new RegExp(pattern, options.sensitive ? '' : 'i');\n function parse(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || '';\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split('/') : value;\n }\n return params;\n }\n function stringify(params) {\n let path = '';\n // for optional parameters to allow to be empty\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith('/'))\n path += '/';\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0 /* TokenType.Static */) {\n path += token.value;\n }\n else if (token.type === 1 /* TokenType.Param */) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : '';\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param)\n ? param.join('/')\n : param;\n if (!text) {\n if (optional) {\n // if we have more than one optional param like /:a?-static we don't need to care about the optional param\n if (segment.length < 2) {\n // remove the last slash as we could be at the end\n if (path.endsWith('/'))\n path = path.slice(0, -1);\n // do not append a slash on the next iteration\n else\n avoidDuplicatedSlash = true;\n }\n }\n else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n // avoid empty path when we have multiple optional params\n return path || '/';\n }\n return {\n re,\n score,\n keys,\n parse,\n stringify,\n };\n}\n/**\n * Compares an array of numbers as used in PathParser.score and returns a\n * number. This function can be used to `sort` an array\n *\n * @param a - first array of numbers\n * @param b - second array of numbers\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n * should be sorted first\n */\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n // only keep going if diff === 0\n if (diff)\n return diff;\n i++;\n }\n // if the last subsegment was Static, the shorter segments should be sorted first\n // otherwise sort the longest segment first\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n ? -1\n : 1;\n }\n else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n ? 1\n : -1;\n }\n return 0;\n}\n/**\n * Compare function that can be used with `sort` to sort an array of PathParser\n *\n * @param a - first PathParser\n * @param b - second PathParser\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n */\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n // do not return if both are equal\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n // if a and b share the same score entries but b has more, sort b first\n return bScore.length - aScore.length;\n // this is the ternary version\n // return aScore.length < bScore.length\n // ? 1\n // : aScore.length > bScore.length\n // ? -1\n // : 0\n}\n/**\n * This allows detecting splats at the end of a path: /home/:id(.*)*\n *\n * @param score - score to check\n * @returns true if the last entry is negative\n */\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\n\nconst ROOT_TOKEN = {\n type: 0 /* TokenType.Static */,\n value: '',\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\n// After some profiling, the cache seems to be unnecessary because tokenizePath\n// (the slowest part of adding a route) is very fast\n// const tokenCache = new Map()\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === '/')\n return [[ROOT_TOKEN]];\n if (!path.startsWith('/')) {\n throw new Error((process.env.NODE_ENV !== 'production')\n ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".`\n : `Invalid path \"${path}\"`);\n }\n // if (tokenCache.has(path)) return tokenCache.get(path)!\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0 /* TokenizerState.Static */;\n let previousState = state;\n const tokens = [];\n // the segment will always be valid because we get into the initial state\n // with the leading /\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n // index on the path\n let i = 0;\n // char at index\n let char;\n // buffer of the value read\n let buffer = '';\n // custom regexp for a param\n let customRe = '';\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0 /* TokenizerState.Static */) {\n segment.push({\n type: 0 /* TokenType.Static */,\n value: buffer,\n });\n }\n else if (state === 1 /* TokenizerState.Param */ ||\n state === 2 /* TokenizerState.ParamRegExp */ ||\n state === 3 /* TokenizerState.ParamRegExpEnd */) {\n if (segment.length > 1 && (char === '*' || char === '+'))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1 /* TokenType.Param */,\n value: buffer,\n regexp: customRe,\n repeatable: char === '*' || char === '+',\n optional: char === '*' || char === '?',\n });\n }\n else {\n crash('Invalid state to consume buffer');\n }\n buffer = '';\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === '\\\\' && state !== 2 /* TokenizerState.ParamRegExp */) {\n previousState = state;\n state = 4 /* TokenizerState.EscapeNext */;\n continue;\n }\n switch (state) {\n case 0 /* TokenizerState.Static */:\n if (char === '/') {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n }\n else if (char === ':') {\n consumeBuffer();\n state = 1 /* TokenizerState.Param */;\n }\n else {\n addCharToBuffer();\n }\n break;\n case 4 /* TokenizerState.EscapeNext */:\n addCharToBuffer();\n state = previousState;\n break;\n case 1 /* TokenizerState.Param */:\n if (char === '(') {\n state = 2 /* TokenizerState.ParamRegExp */;\n }\n else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n }\n else {\n consumeBuffer();\n state = 0 /* TokenizerState.Static */;\n // go back one character if we were not modifying\n if (char !== '*' && char !== '?' && char !== '+')\n i--;\n }\n break;\n case 2 /* TokenizerState.ParamRegExp */:\n // TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)\n // it already works by escaping the closing )\n // https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#\n // is this really something people need since you can also write\n // /prefix_:p()_suffix\n if (char === ')') {\n // handle the escaped )\n if (customRe[customRe.length - 1] == '\\\\')\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3 /* TokenizerState.ParamRegExpEnd */;\n }\n else {\n customRe += char;\n }\n break;\n case 3 /* TokenizerState.ParamRegExpEnd */:\n // same as finalizing a param\n consumeBuffer();\n state = 0 /* TokenizerState.Static */;\n // go back one character if we were not modifying\n if (char !== '*' && char !== '?' && char !== '+')\n i--;\n customRe = '';\n break;\n default:\n crash('Unknown state');\n break;\n }\n }\n if (state === 2 /* TokenizerState.ParamRegExp */)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n // tokenCache.set(path, tokens)\n return tokens;\n}\n\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n // warn against params with the same name\n if ((process.env.NODE_ENV !== 'production')) {\n const existingKeys = new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: [],\n });\n if (parent) {\n // both are aliases or both are not aliases\n // we don't want to mix them because the order is used when\n // passing originalRecord in Matcher.addRoute\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\n\n/**\n * Creates a Router Matcher.\n *\n * @internal\n * @param routes - array of initial routes\n * @param globalOptions - global route options\n */\nfunction createRouterMatcher(routes, globalOptions) {\n // normalized ordered array of matchers\n const matchers = [];\n const matcherMap = new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n // used later on to remove by name\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if ((process.env.NODE_ENV !== 'production')) {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n // we might be the child of an alias\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n // generate an array of records to correctly handle aliases\n const normalizedRecords = [mainNormalizedRecord];\n if ('alias' in record) {\n const aliases = typeof record.alias === 'string' ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(\n // we need to normalize again to ensure the `mods` property\n // being non enumerable\n normalizeRouteRecord(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord\n ? originalRecord.record.components\n : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord\n ? originalRecord.record\n : mainNormalizedRecord,\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n })));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n // Build up the path for nested routes if the child isn't an absolute\n // route. Only add the / delimiter if the child path isn't empty and if the\n // parent path doesn't have a trailing slash\n if (parent && path[0] !== '/') {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === '/' ? '' : '/';\n normalizedRecord.path =\n parent.record.path + (path && connectingSlash + path);\n }\n if ((process.env.NODE_ENV !== 'production') && normalizedRecord.path === '*') {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\n' +\n 'See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.');\n }\n // create the object beforehand, so it can be passed to children\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if ((process.env.NODE_ENV !== 'production') && parent && path[0] === '/')\n checkMissingParamsInAbsolutePath(matcher, parent);\n // if we are an alias we must tell the original record that we exist,\n // so we can be removed\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if ((process.env.NODE_ENV !== 'production')) {\n checkSameParams(originalRecord, matcher);\n }\n }\n else {\n // otherwise, the first record is the original and others are aliases\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n // remove the route if named and only for the top record (avoid in nested calls)\n // this works because the original record is the first one\n if (isRootAdd && record.name && !isAliasRecord(matcher))\n removeRoute(record.name);\n }\n // Avoid adding a record that doesn't display anything. This allows passing through records without a component to\n // not be reached and pass through the catch all route\n if (isMatchable(matcher)) {\n insertMatcher(matcher);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n // if there was no original record, then the first one was not an alias and all\n // other aliases (if any) need to reference this record when adding children\n originalRecord = originalRecord || matcher;\n // TODO: add normalized records for more flexibility\n // if (parent && isAliasRecord(originalRecord)) {\n // parent.children.push(originalRecord)\n // }\n }\n return originalMatcher\n ? () => {\n // since other matchers are aliases, they should be removed by the original matcher\n removeRoute(originalMatcher);\n }\n : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n }\n else {\n const index = matchers.indexOf(matcherRef);\n if (index > -1) {\n matchers.splice(index, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n const index = findInsertionIndex(matcher, matchers);\n matchers.splice(index, 0, matcher);\n // only add the original record to the name map\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if ('name' in location && location.name) {\n matcher = matcherMap.get(location.name);\n if (!matcher)\n throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n location,\n });\n // warn if the user is passing invalid params so they can debug it better when they get removed\n if ((process.env.NODE_ENV !== 'production')) {\n const invalidParams = Object.keys(location.params || {}).filter(paramName => !matcher.keys.find(k => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(currentLocation.params, \n // only keep params that exist in the resolved location\n // only keep optional params coming from a parent record\n matcher.keys\n .filter(k => !k.optional)\n .concat(matcher.parent ? matcher.parent.keys.filter(k => k.optional) : [])\n .map(k => k.name)), \n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location.params &&\n paramsFromLocation(location.params, matcher.keys.map(k => k.name)));\n // throws if cannot be stringified\n path = matcher.stringify(params);\n }\n else if (location.path != null) {\n // no need to resolve the path with the matcher as it was provided\n // this also allows the user to control the encoding\n path = location.path;\n if ((process.env.NODE_ENV !== 'production') && !path.startsWith('/')) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n }\n matcher = matchers.find(m => m.re.test(path));\n // matcher should have a value after the loop\n if (matcher) {\n // we know the matcher works because we tested the regexp\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n // location is a relative path\n }\n else {\n // match by name or path of current route\n matcher = currentLocation.name\n ? matcherMap.get(currentLocation.name)\n : matchers.find(m => m.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n location,\n currentLocation,\n });\n name = matcher.record.name;\n // since we are navigating to the same location, we don't need to pick the\n // params like when `name` is provided\n params = assign({}, currentLocation.params, location.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n // reversed order so parents are at the beginning\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched),\n };\n }\n // add initial routes\n routes.forEach(route => addRoute(route));\n function clearRoutes() {\n matchers.length = 0;\n matcherMap.clear();\n }\n return {\n addRoute,\n resolve,\n removeRoute,\n clearRoutes,\n getRoutes,\n getRecordMatcher,\n };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\n/**\n * Normalizes a RouteRecordRaw. Creates a copy\n *\n * @param record\n * @returns the normalized version\n */\nfunction normalizeRouteRecord(record) {\n const normalized = {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: record.aliasOf,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: new Set(),\n updateGuards: new Set(),\n enterCallbacks: {},\n // must be declared afterwards\n // mods: {},\n components: 'components' in record\n ? record.components || null\n : record.component && { default: record.component },\n };\n // mods contain modules and shouldn't be copied,\n // logged or anything. It's just used for internal\n // advanced use cases like data loaders\n Object.defineProperty(normalized, 'mods', {\n value: {},\n });\n return normalized;\n}\n/**\n * Normalize the optional `props` in a record to always be an object similar to\n * components. Also accept a boolean for components.\n * @param record\n */\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n // props does not exist on redirect records, but we can set false directly\n const props = record.props || false;\n if ('component' in record) {\n propsObject.default = props;\n }\n else {\n // NOTE: we could also allow a function to be applied to every component.\n // Would need user feedback for use cases\n for (const name in record.components)\n propsObject[name] = typeof props === 'object' ? props[name] : props;\n }\n return propsObject;\n}\n/**\n * Checks if a record or any of its parent is an alias\n * @param record\n */\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\n/**\n * Merge meta fields of an array of records\n *\n * @param matched - array of matched records\n */\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return (a.name === b.name &&\n a.optional === b.optional &&\n a.repeatable === b.repeatable);\n}\n/**\n * Check if a path and its alias have the same required params\n *\n * @param a - original record\n * @param b - alias record\n */\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\n/**\n * A route with a name and a child with an empty path without a name should warn when adding the route\n *\n * @param mainNormalizedRecord - RouteRecordNormalized\n * @param parent - RouteRecordMatcher\n */\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent &&\n parent.record.name &&\n !mainNormalizedRecord.name &&\n !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\n/**\n * Performs a binary search to find the correct insertion index for a new matcher.\n *\n * Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n * with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n *\n * @param matcher - new matcher to be inserted\n * @param matchers - existing matchers\n */\nfunction findInsertionIndex(matcher, matchers) {\n // First phase: binary search based on score\n let lower = 0;\n let upper = matchers.length;\n while (lower !== upper) {\n const mid = (lower + upper) >> 1;\n const sortOrder = comparePathParserScore(matcher, matchers[mid]);\n if (sortOrder < 0) {\n upper = mid;\n }\n else {\n lower = mid + 1;\n }\n }\n // Second phase: check for an ancestor with the same score\n const insertionAncestor = getInsertionAncestor(matcher);\n if (insertionAncestor) {\n upper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n if ((process.env.NODE_ENV !== 'production') && upper < 0) {\n // This should never happen\n warn(`Finding ancestor route \"${insertionAncestor.record.path}\" failed for \"${matcher.record.path}\"`);\n }\n }\n return upper;\n}\nfunction getInsertionAncestor(matcher) {\n let ancestor = matcher;\n while ((ancestor = ancestor.parent)) {\n if (isMatchable(ancestor) &&\n comparePathParserScore(matcher, ancestor) === 0) {\n return ancestor;\n }\n }\n return;\n}\n/**\n * Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n * a component, or name, or redirect, are just used to group other routes.\n * @param matcher\n * @param matcher.record record of the matcher\n * @returns\n */\nfunction isMatchable({ record }) {\n return !!(record.name ||\n (record.components && Object.keys(record.components).length) ||\n record.redirect);\n}\n\n/**\n * Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n * version with the leading `?` and without Should work as URLSearchParams\n\n * @internal\n *\n * @param search - search string to parse\n * @returns a query object\n */\nfunction parseQuery(search) {\n const query = {};\n // avoid creating an object with an empty key and empty value\n // because of split('&')\n if (search === '' || search === '?')\n return query;\n const hasLeadingIM = search[0] === '?';\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\n for (let i = 0; i < searchParams.length; ++i) {\n // pre decode the + into space\n const searchParam = searchParams[i].replace(PLUS_RE, ' ');\n // allow the = character\n const eqPos = searchParam.indexOf('=');\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n // an extra variable for ts types\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n }\n else {\n query[key] = value;\n }\n }\n return query;\n}\n/**\n * Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n * doesn't prepend a `?`\n *\n * @internal\n *\n * @param query - query object to stringify\n * @returns string version of the query without the leading `?`\n */\nfunction stringifyQuery(query) {\n let search = '';\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n // only null adds the value\n if (value !== undefined) {\n search += (search.length ? '&' : '') + key;\n }\n continue;\n }\n // keep null values\n const values = isArray(value)\n ? value.map(v => v && encodeQueryValue(v))\n : [value && encodeQueryValue(value)];\n values.forEach(value => {\n // skip undefined values in arrays as if they were not present\n // smaller code than using filter\n if (value !== undefined) {\n // only append & with non-empty search\n search += (search.length ? '&' : '') + key;\n if (value != null)\n search += '=' + value;\n }\n });\n }\n return search;\n}\n/**\n * Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n * numbers into strings, removing keys with an undefined value and replacing\n * undefined with null in arrays\n *\n * @param query - query object to normalize\n * @returns a normalized query object\n */\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== undefined) {\n normalizedQuery[key] = isArray(value)\n ? value.map(v => (v == null ? null : '' + v))\n : value == null\n ? value\n : '' + value;\n }\n }\n return normalizedQuery;\n}\n\n/**\n * RouteRecord being rendered by the closest ancestor Router View. Used for\n * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\n * Location Matched\n *\n * @internal\n */\nconst matchedRouteKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : '');\n/**\n * Allows overriding the router view depth to control which component in\n * `matched` is rendered. rvd stands for Router View Depth\n *\n * @internal\n */\nconst viewDepthKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : '');\n/**\n * Allows overriding the router instance returned by `useRouter` in tests. r\n * stands for router\n *\n * @internal\n */\nconst routerKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router' : '');\n/**\n * Allows overriding the current route returned by `useRoute` in tests. rl\n * stands for route location\n *\n * @internal\n */\nconst routeLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'route location' : '');\n/**\n * Allows overriding the current route used by router-view. Internally this is\n * used when the `route` prop is passed.\n *\n * @internal\n */\nconst routerViewLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location' : '');\n\n/**\n * Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n */\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers.slice(),\n reset,\n };\n}\n\nfunction registerGuard(record, name, guard) {\n const removeFromList = () => {\n record[name].delete(guard);\n };\n onUnmounted(removeFromList);\n onDeactivated(removeFromList);\n onActivated(() => {\n record[name].add(guard);\n });\n record[name].add(guard);\n}\n/**\n * Add a navigation guard that triggers whenever the component for the current\n * location is about to be left. Similar to {@link beforeRouteLeave} but can be\n * used in any component. The guard is removed when the component is unmounted.\n *\n * @param leaveGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteLeave(leaveGuard) {\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n warn('getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function');\n return;\n }\n const activeRecord = inject(matchedRouteKey, \n // to avoid warning\n {}).value;\n if (!activeRecord) {\n (process.env.NODE_ENV !== 'production') &&\n warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of . Maybe you called it inside of App.vue?');\n return;\n }\n registerGuard(activeRecord, 'leaveGuards', leaveGuard);\n}\n/**\n * Add a navigation guard that triggers whenever the current location is about\n * to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n * component. The guard is removed when the component is unmounted.\n *\n * @param updateGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteUpdate(updateGuard) {\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n warn('getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function');\n return;\n }\n const activeRecord = inject(matchedRouteKey, \n // to avoid warning\n {}).value;\n if (!activeRecord) {\n (process.env.NODE_ENV !== 'production') &&\n warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of . Maybe you called it inside of App.vue?');\n return;\n }\n registerGuard(activeRecord, 'updateGuards', updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = fn => fn()) {\n // keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place\n const enterCallbackArray = record &&\n // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4 /* ErrorTypes.NAVIGATION_ABORTED */, {\n from,\n to,\n }));\n }\n else if (valid instanceof Error) {\n reject(valid);\n }\n else if (isRouteLocation(valid)) {\n reject(createRouterError(2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */, {\n from: to,\n to: valid,\n }));\n }\n else {\n if (enterCallbackArray &&\n // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray &&\n typeof valid === 'function') {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n // wrapping with Promise.resolve allows it to work with both async and sync guards\n const guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, (process.env.NODE_ENV !== 'production') ? canOnlyBeCalledOnce(next, to, from) : next));\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if ((process.env.NODE_ENV !== 'production') && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : ''}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === 'object' && 'then' in guardReturn) {\n guardCall = guardCall.then(resolvedValue => {\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error('Invalid navigation guard'));\n }\n return resolvedValue;\n });\n }\n else if (guardReturn !== undefined) {\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n if (!next._called) {\n warn(message);\n reject(new Error('Invalid navigation guard'));\n return;\n }\n }\n }\n guardCall.catch(err => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function () {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n // @ts-expect-error: we put it in the original one because it's easier to check\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = fn => fn()) {\n const guards = [];\n for (const record of matched) {\n if ((process.env.NODE_ENV !== 'production') && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\"` +\n ` or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if ((process.env.NODE_ENV !== 'production')) {\n if (!rawComponent ||\n (typeof rawComponent !== 'object' &&\n typeof rawComponent !== 'function')) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not` +\n ` a valid component. Received \"${String(rawComponent)}\".`);\n // throw to ensure we stop here but warn to ensure the message isn't\n // missed by the user\n throw new Error('Invalid route component');\n }\n else if ('then' in rawComponent) {\n // warn if user wrote import('/component.vue') instead of () =>\n // import('./component.vue')\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a ` +\n `Promise instead of a function that returns a Promise. Did you ` +\n `write \"import('./MyPage.vue')\" instead of ` +\n `\"() => import('./MyPage.vue')\" ? This will break in ` +\n `production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n }\n else if (rawComponent.__asyncLoader &&\n // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined ` +\n `using \"defineAsyncComponent()\". ` +\n `Write \"() => import('./MyPage.vue')\" instead of ` +\n `\"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n // skip update and leave guards if the route component is not mounted\n if (guardType !== 'beforeRouteEnter' && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n // __vccOpts is added by vue-class-component and contain the regular options\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard &&\n guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n }\n else {\n // start requesting the chunk already\n let componentPromise = rawComponent();\n if ((process.env.NODE_ENV !== 'production') && !('catch' in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then(resolved => {\n if (!resolved)\n throw new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`);\n const resolvedComponent = isESModule(resolved)\n ? resolved.default\n : resolved;\n // keep the resolved module for plugins like data loaders\n record.mods[name] = resolved;\n // replace the function with the resolved component\n // cannot be null or undefined because we went into the for loop\n record.components[name] = resolvedComponent;\n // __vccOpts is added by vue-class-component and contain the regular options\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return (guard &&\n guardToPromiseFn(guard, to, from, record, name, runWithContext)());\n }));\n }\n }\n }\n return guards;\n}\n/**\n * Ensures a route is loaded, so it can be passed as o prop to ``.\n *\n * @param route - resolved route to load\n */\nfunction loadRouteLocation(route) {\n return route.matched.every(record => record.redirect)\n ? Promise.reject(new Error('Cannot load a route that redirects.'))\n : Promise.all(route.matched.map(record => record.components &&\n Promise.all(Object.keys(record.components).reduce((promises, name) => {\n const rawComponent = record.components[name];\n if (typeof rawComponent === 'function' &&\n !('displayName' in rawComponent)) {\n promises.push(rawComponent().then(resolved => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n const resolvedComponent = isESModule(resolved)\n ? resolved.default\n : resolved;\n // keep the resolved module for plugins like data loaders\n record.mods[name] = resolved;\n // replace the function with the resolved component\n // cannot be null or undefined because we went into the for loop\n record.components[name] = resolvedComponent;\n return;\n }));\n }\n return promises;\n }, [])))).then(() => route);\n}\n\n// TODO: we could allow currentRoute as a prop to expose `isActive` and\n// `isExactActive` behavior should go through an RFC\n/**\n * Returns the internal behavior of a {@link RouterLink} without the rendering part.\n *\n * @param props - a `to` location and an optional `replace` flag\n */\nfunction useLink(props) {\n const router = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n let hasPrevious = false;\n let previousTo = null;\n const route = computed(() => {\n const to = unref(props.to);\n if ((process.env.NODE_ENV !== 'production') && (!hasPrevious || to !== previousTo)) {\n if (!isRouteLocation(to)) {\n if (hasPrevious) {\n warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- previous to:`, previousTo, `\\n- props:`, props);\n }\n else {\n warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- props:`, props);\n }\n }\n previousTo = to;\n hasPrevious = true;\n }\n return router.resolve(to);\n });\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index > -1)\n return index;\n // possible parent record\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 &&\n // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath &&\n // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath\n ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2]))\n : index);\n });\n const isActive = computed(() => activeRecordIndex.value > -1 &&\n includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 &&\n activeRecordIndex.value === currentRoute.matched.length - 1 &&\n isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n return router[unref(props.replace) ? 'replace' : 'push'](unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n }\n return Promise.resolve();\n }\n // devtools only\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value,\n error: null,\n };\n // @ts-expect-error: this is internal\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n // @ts-expect-error: this is internal\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n linkContextDevtools.error = isRouteLocation(unref(props.to))\n ? null\n : 'Invalid \"to\" value';\n }, { flush: 'post' });\n }\n }\n /**\n * NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n */\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate,\n };\n}\nconst RouterLinkImpl = /*#__PURE__*/ defineComponent({\n name: 'RouterLink',\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true,\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: 'page',\n },\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, 'router-link-active')]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, 'router-link-exact-active')]: link.isExactActive,\n }));\n return () => {\n const children = slots.default && slots.default(link);\n return props.custom\n ? children\n : h('a', {\n 'aria-current': link.isExactActive\n ? props.ariaCurrentValue\n : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value,\n }, children);\n };\n },\n});\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to render a link that triggers a navigation on click.\n */\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n // don't redirect with control keys\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n // don't redirect when preventDefault called\n if (e.defaultPrevented)\n return;\n // don't redirect on right click\n if (e.button !== undefined && e.button !== 0)\n return;\n // don't redirect if `target=\"_blank\"`\n // @ts-expect-error getAttribute does exist\n if (e.currentTarget && e.currentTarget.getAttribute) {\n // @ts-expect-error getAttribute exists\n const target = e.currentTarget.getAttribute('target');\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n // this may be a Weex event which doesn't have this method\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === 'string') {\n if (innerValue !== outerValue)\n return false;\n }\n else {\n if (!isArray(outerValue) ||\n outerValue.length !== innerValue.length ||\n innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\n/**\n * Get the original path value of a record by following its aliasOf\n * @param record\n */\nfunction getOriginalPath(record) {\n return record ? (record.aliasOf ? record.aliasOf.path : record.path) : '';\n}\n/**\n * Utility class to get the active class based on defaults.\n * @param propClass\n * @param globalClass\n * @param defaultClass\n */\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null\n ? propClass\n : globalClass != null\n ? globalClass\n : defaultClass;\n\nconst RouterViewImpl = /*#__PURE__*/ defineComponent({\n name: 'RouterView',\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: 'default',\n },\n route: Object,\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n (process.env.NODE_ENV !== 'production') && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n // The depth changes based on empty components option, which allows passthrough routes e.g. routes with children\n // that are used to reuse the `path` property\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) &&\n !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n // watch at the same time the component instance, the route record we are\n // rendering, and the name\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n // copy reused instances\n if (to) {\n // this will update the instance for new instances as well as reused\n // instances when navigating to a new route\n to.instances[name] = instance;\n // the component instance is reused for a different route or name, so\n // we copy any saved update or leave guards. With async setup, the\n // mounting component will mount before the matchedRoute changes,\n // making instance === oldInstance, so we check if guards have been\n // added before. This works because we remove guards when\n // unmounting/deactivating components\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n // trigger beforeRouteEnter next callbacks\n if (instance &&\n to &&\n // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach(callback => callback(instance));\n }\n }, { flush: 'post' });\n return () => {\n const route = routeToDisplay.value;\n // we need the value at the time we render because when we unmount, we\n // navigated to a different location so the value is different\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n // props from route configuration\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption\n ? routePropsOption === true\n ? route.params\n : typeof routePropsOption === 'function'\n ? routePropsOption(route)\n : routePropsOption\n : null;\n const onVnodeUnmounted = vnode => {\n // remove the instance reference to prevent leak\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef,\n }));\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n isBrowser &&\n component.ref) {\n // TODO: can display if it's an alias, its props\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta,\n };\n const internalInstances = isArray(component.ref)\n ? component.ref.map(r => r.i)\n : [component.ref.i];\n internalInstances.forEach(instance => {\n // @ts-expect-error\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) ||\n component);\n };\n },\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to display the current route the user is at.\n */\nconst RouterView = RouterViewImpl;\n// warn against deprecated usage with & \n// due to functional component being no longer eager in Vue 3\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n if (parentName &&\n (parentName === 'KeepAlive' || parentName.includes('Transition')) &&\n typeof parentSubTreeType === 'object' &&\n parentSubTreeType.name === 'RouterView') {\n const comp = parentName === 'KeepAlive' ? 'keep-alive' : 'transition';\n warn(` can no longer be used directly inside or .\\n` +\n `Use slot props instead:\\n\\n` +\n `\\n` +\n ` <${comp}>\\n` +\n ` \\n` +\n ` \\n` +\n ``);\n }\n}\n\n/**\n * Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n *\n * @param routeLocation - routeLocation to format\n * @param tooltip - optional tooltip\n * @returns a copy of the routeLocation\n */\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map(matched => omit(matched, ['instances', 'children', 'aliasOf'])),\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy,\n },\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display,\n },\n };\n}\n// to support multiple router instances\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n // Take over router.beforeEach and afterEach\n // make sure we are not registering the devtool twice\n if (router.__hasDevtools)\n return;\n router.__hasDevtools = true;\n // increment to support multiple router instances\n const id = routerId++;\n setupDevtoolsPlugin({\n id: 'org.vuejs.router' + (id ? '.' + id : ''),\n label: 'Vue Router',\n packageName: 'vue-router',\n homepage: 'https://router.vuejs.org',\n logo: 'https://router.vuejs.org/logo.png',\n componentStateTypes: ['Routing'],\n app,\n }, api => {\n if (typeof api.now !== 'function') {\n console.warn('[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n }\n // display state added by the router\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: 'Routing',\n key: '$route',\n editable: false,\n value: formatRouteLocation(router.currentRoute.value, 'Current Route'),\n });\n }\n });\n // mark router-link as active and display tags on router views\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : '') + info.path,\n textColor: 0,\n tooltip: 'This component is rendered by <router-view>',\n backgroundColor: PINK_500,\n });\n }\n // if multiple useLink are used\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach(devtoolsData => {\n let label = devtoolsData.route.path;\n let backgroundColor = ORANGE_400;\n let tooltip = '';\n let textColor = 0;\n if (devtoolsData.error) {\n label = devtoolsData.error;\n backgroundColor = RED_100;\n textColor = RED_700;\n }\n else if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = 'This is exactly active';\n }\n else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = 'This link is active';\n }\n node.tags.push({\n label,\n textColor,\n tooltip,\n backgroundColor,\n });\n });\n }\n });\n watch(router.currentRoute, () => {\n // refresh active state\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = 'router:navigations:' + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? ' ' + id : ''} Navigations`,\n color: 0x40a8c4,\n });\n // const errorsLayerId = 'router:errors'\n // api.addTimelineLayer({\n // id: errorsLayerId,\n // label: 'Router Errors',\n // color: 0xea5455,\n // })\n router.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: 'Error during Navigation',\n subtitle: to.fullPath,\n logType: 'error',\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId,\n },\n });\n });\n // attached to `meta` and used to group events\n let navigationId = 0;\n router.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay('beforeEach'),\n from: formatRouteLocation(from, 'Current Location during this navigation'),\n to: formatRouteLocation(to, 'Target location'),\n };\n // Used to group navigations together, hide from devtools\n Object.defineProperty(to.meta, '__navigationId', {\n value: navigationId++,\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: 'Start of navigation',\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId,\n },\n });\n });\n router.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay('afterEach'),\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : '',\n tooltip: 'Navigation Failure',\n value: failure,\n },\n };\n data.status = formatDisplay('❌');\n }\n else {\n data.status = formatDisplay('✅');\n }\n // we set here to have the right order\n data.from = formatRouteLocation(from, 'Current Location during this navigation');\n data.to = formatRouteLocation(to, 'Target location');\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: 'End of navigation',\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? 'warning' : 'default',\n groupId: to.meta.__navigationId,\n },\n });\n });\n /**\n * Inspector of Existing routes\n */\n const routerInspectorId = 'router-inspector:' + id;\n api.addInspector({\n id: routerInspectorId,\n label: 'Routes' + (id ? ' ' + id : ''),\n icon: 'book',\n treeFilterPlaceholder: 'Search routes',\n });\n function refreshRoutesView() {\n // the routes view isn't active\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n // children routes will appear as nested\n let routes = matcher.getRoutes().filter(route => !route.parent ||\n // these routes have a parent with no component which will not appear in the view\n // therefore we still need to include them\n !route.parent.record.components);\n // reset match state to false\n routes.forEach(resetMatchStateOnRouteRecord);\n // apply a match state if there is a payload\n if (payload.filter) {\n routes = routes.filter(route => \n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase()));\n }\n // mark active routes\n routes.forEach(route => markRouteRecordActive(route, router.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree(payload => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n /**\n * Display information about the currently selected route record\n */\n api.on.getInspectorState(payload => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find(route => route.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route),\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? '*' : '?';\n }\n else {\n return key.repeatable ? '+' : '';\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: 'path', value: record.path },\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: 'name',\n value: record.name,\n });\n }\n fields.push({ editable: false, key: 'regexp', value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: 'keys',\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys\n .map(key => `${key.name}${modifierForKey(key)}`)\n .join(' '),\n tooltip: 'Param keys',\n value: route.keys,\n },\n },\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: 'redirect',\n value: record.redirect,\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: 'aliases',\n value: route.alias.map(alias => alias.record.path),\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: 'meta',\n value: route.record.meta,\n });\n }\n fields.push({\n key: 'score',\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map(score => score.join(', ')).join(' | '),\n tooltip: 'Score used to sort routes',\n value: route.score,\n },\n },\n });\n return fields;\n}\n/**\n * Extracted from tailwind palette\n */\nconst PINK_500 = 0xec4899;\nconst BLUE_600 = 0x2563eb;\nconst LIME_500 = 0x84cc16;\nconst CYAN_400 = 0x22d3ee;\nconst ORANGE_400 = 0xfb923c;\n// const GRAY_100 = 0xf4f4f5\nconst DARK = 0x666666;\nconst RED_100 = 0xfee2e2;\nconst RED_700 = 0xb91c1c;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400,\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: 'alias',\n textColor: 0,\n backgroundColor: ORANGE_400,\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: 'matches',\n textColor: 0,\n backgroundColor: PINK_500,\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: 'exact',\n textColor: 0,\n backgroundColor: LIME_500,\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: 'active',\n textColor: 0,\n backgroundColor: BLUE_600,\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === 'string'\n ? `redirect: ${record.redirect}`\n : 'redirects',\n textColor: 0xffffff,\n backgroundColor: DARK,\n });\n }\n // add an id to be able to select it. Using the `path` is not possible because\n // empty path children would collide with their parents\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector),\n };\n}\n// incremental id for route records and inspector state\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n // no route will be active if matched is empty\n // reset the matching state\n const isExactActive = currentRoute.matched.length &&\n isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some(match => isSameRouteRecord(match, route.record));\n }\n route.children.forEach(childRoute => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n // use a regexp without $ at the end to match nested routes better\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, ''), found[2]);\n if (nonEndingRE.test(filter)) {\n // mark children as matches\n route.children.forEach(child => isRouteMatching(child, filter));\n // exception case: `/`\n if (route.record.path !== '/' || filter === '/') {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n // hide the / route\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n // also allow partial matching on the path\n if (!filter.startsWith('/') &&\n (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some(child => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n // @ts-expect-error\n ret[key] = obj[key];\n }\n }\n return ret;\n}\n\n/**\n * Creates a Router instance that can be used by a Vue app.\n *\n * @param options - {@link RouterOptions}\n */\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if ((process.env.NODE_ENV !== 'production') && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\":' +\n ' https://router.vuejs.org/api/interfaces/RouterOptions.html#history');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n // leave the scrollRestoration if no scrollBehavior is provided\n if (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {\n history.scrollRestoration = 'manual';\n }\n const normalizeParams = applyToParams.bind(null, paramValue => '' + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = \n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode);\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n if ((process.env.NODE_ENV !== 'production') && !parent) {\n warn(`Parent route \"${String(parentOrRoute)}\" not found when adding child route`, route);\n }\n record = route;\n }\n else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n }\n else if ((process.env.NODE_ENV !== 'production')) {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map(routeMatcher => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n // const resolve: Router['resolve'] = (rawLocation: RouteLocationRaw, currentLocation) => {\n // const objectLocation = routerLocationAsObject(rawLocation)\n // we create a copy to modify it later\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === 'string') {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href = routerHistory.createHref(locationNormalized.fullPath);\n if ((process.env.NODE_ENV !== 'production')) {\n if (href.startsWith('//'))\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n // locationNormalized is always a new object\n return assign(locationNormalized, matchedRoute, {\n params: decodeParams(matchedRoute.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: undefined,\n href,\n });\n }\n if ((process.env.NODE_ENV !== 'production') && !isRouteLocation(rawLocation)) {\n warn(`router.resolve() was passed an invalid location. This will fail in production.\\n- Location:`, rawLocation);\n return resolve({});\n }\n let matcherLocation;\n // path could be relative in object as well\n if (rawLocation.path != null) {\n if ((process.env.NODE_ENV !== 'production') &&\n 'params' in rawLocation &&\n !('name' in rawLocation) &&\n // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path,\n });\n }\n else {\n // remove any nullish param\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n // pass encoded values to the matcher, so it can produce encoded path and fullPath\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(targetParams),\n });\n // current location params are decoded, we need to encode them in case the\n // matcher merges the params\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || '';\n if ((process.env.NODE_ENV !== 'production') && hash && !hash.startsWith('#')) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n // the matcher might have merged current location params, so\n // we need to run the decoding again\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path,\n }));\n const href = routerHistory.createHref(fullPath);\n if ((process.env.NODE_ENV !== 'production')) {\n if (href.startsWith('//')) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n }\n else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${rawLocation.path != null ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: \n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery\n ? normalizeQuery(rawLocation.query)\n : (rawLocation.query || {}),\n }, matchedRoute, {\n redirectedFrom: undefined,\n href,\n });\n }\n function locationAsObject(to) {\n return typeof to === 'string'\n ? parseURL(parseQuery$1, to, currentRoute.value.path)\n : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8 /* ErrorTypes.NAVIGATION_CANCELLED */, {\n from,\n to,\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === 'function' ? redirect(to) : redirect;\n if (typeof newTargetLocation === 'string') {\n newTargetLocation =\n newTargetLocation.includes('?') || newTargetLocation.includes('#')\n ? (newTargetLocation = locationAsObject(newTargetLocation))\n : // force empty params\n { path: newTargetLocation };\n // @ts-expect-error: force empty params when a string is passed to let\n // the router parse them again\n newTargetLocation.params = {};\n }\n if ((process.env.NODE_ENV !== 'production') &&\n newTargetLocation.path == null &&\n !('name' in newTargetLocation)) {\n warn(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error('Invalid redirect');\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: newTargetLocation.path != null ? {} : to.params,\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = (pendingLocation = resolve(to));\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n // to could be a string where `replace` is a function\n const replace = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === 'object'\n ? assign({}, data, shouldRedirect.state)\n : data,\n force,\n replace,\n }), \n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation);\n // if it was a redirect we already called `pushWithRedirect` above\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16 /* ErrorTypes.NAVIGATION_DUPLICATED */, { to: toLocation, from });\n // trigger scroll to allow scrolling to the same anchor\n handleScroll(from, from, \n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true, \n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false);\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from))\n .catch((error) => isNavigationFailure(error)\n ? // navigation redirects still mark the router as ready\n isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)\n ? error\n : markAsReady(error) // also returns the error\n : // reject any unknown error\n triggerError(error, toLocation, from))\n .then((failure) => {\n if (failure) {\n if (isNavigationFailure(failure, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n if ((process.env.NODE_ENV !== 'production') &&\n // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) &&\n // and we have done it a couple of times\n redirectedFrom &&\n // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count\n ? // @ts-expect-error\n redirectedFrom._count + 1\n : 1) > 30) {\n warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n return Promise.reject(new Error('Infinite redirect in navigation guard'));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace,\n }, locationAsObject(failure.to), {\n state: typeof failure.to === 'object'\n ? assign({}, data, failure.to.state)\n : data,\n force,\n }), \n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation);\n }\n }\n else {\n // if we fail we don't finalize the navigation\n failure = finalizeNavigation(toLocation, from, true, replace, data);\n }\n triggerAfterEach(toLocation, from, failure);\n return failure;\n });\n }\n /**\n * Helper to reject and skip all navigation guards if a new navigation happened\n * @param to\n * @param from\n */\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function runWithContext(fn) {\n const app = installedApps.values().next().value;\n // support Vue < 3.3\n return app && typeof app.runWithContext === 'function'\n ? app.runWithContext(fn)\n : fn();\n }\n // TODO: refactor the whole before guards by internally using router.beforeEach\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n // all components here have been resolved once because we are leaving\n guards = extractComponentsGuards(leavingRecords.reverse(), 'beforeRouteLeave', to, from);\n // leavingRecords is already reversed\n for (const record of leavingRecords) {\n record.leaveGuards.forEach(guard => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeRouteLeave guards\n return (runGuardQueue(guards)\n .then(() => {\n // check global guards beforeEach\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n })\n .then(() => {\n // check in components beforeRouteUpdate\n guards = extractComponentsGuards(updatingRecords, 'beforeRouteUpdate', to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach(guard => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeEnter guards\n return runGuardQueue(guards);\n })\n .then(() => {\n // check the route beforeEnter\n guards = [];\n for (const record of enteringRecords) {\n // do not trigger beforeEnter on reused views\n if (record.beforeEnter) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n }\n else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeEnter guards\n return runGuardQueue(guards);\n })\n .then(() => {\n // NOTE: at this point to.matched is normalized and does not contain any () => Promise\n // clear existing enterCallbacks, these are added by extractComponentsGuards\n to.matched.forEach(record => (record.enterCallbacks = {}));\n // check in-component beforeRouteEnter\n guards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from, runWithContext);\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeEnter guards\n return runGuardQueue(guards);\n })\n .then(() => {\n // check global guards beforeResolve\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n })\n // catch any navigation canceled\n .catch(err => isNavigationFailure(err, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)\n ? err\n : Promise.reject(err)));\n }\n function triggerAfterEach(to, from, failure) {\n // navigation is confirmed, call afterGuards\n // TODO: wrap with error handlers\n afterGuards\n .list()\n .forEach(guard => runWithContext(() => guard(to, from, failure)));\n }\n /**\n * - Cleans up any navigation guards\n * - Changes the url if necessary\n * - Calls the scrollBehavior\n */\n function finalizeNavigation(toLocation, from, isPush, replace, data) {\n // a more recent navigation took place\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n // only consider as push if it's not the first navigation\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n // change URL only if the user did a push/replace and if it's not the initial navigation because\n // it's just reflecting the url\n if (isPush) {\n // on the initial navigation, we want to reuse the scroll position from\n // history state if it exists\n if (replace || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll,\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n // accept current navigation\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n // attach listener to history to trigger navigations\n function setupListeners() {\n // avoid setting up listeners twice due to an invalid first navigation\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router.listening)\n return;\n // cannot be a redirect route because it was in history\n const toLocation = resolve(to);\n // due to dynamic routing, and to hash history with manual navigation\n // (manually changing the url or calling history.hash = '#/somewhere'),\n // there could be a redirect record in history\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n // TODO: should be moved to web history?\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from)\n .catch((error) => {\n if (isNavigationFailure(error, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n return error;\n }\n if (isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n // Here we could call if (info.delta) routerHistory.go(-info.delta,\n // false) but this is bug prone as we have no way to wait the\n // navigation to be finished before calling pushWithRedirect. Using\n // a setTimeout of 16ms seems to work but there is no guarantee for\n // it to work on every browser. So instead we do not restore the\n // history entry and trigger a new navigation as requested by the\n // navigation guard.\n // the error is already handled by router.push we just want to avoid\n // logging the error\n pushWithRedirect(error.to, toLocation\n // avoid an uncaught rejection, let push call triggerError\n )\n .then(failure => {\n // manual change in hash history #916 ending up in the URL not\n // changing, but it was changed by the manual url change, so we\n // need to manually change it ourselves\n if (isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ |\n 16 /* ErrorTypes.NAVIGATION_DUPLICATED */) &&\n !info.delta &&\n info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n })\n .catch(noop);\n // avoid the then branch\n return Promise.reject();\n }\n // do not restore history on unknown direction\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n // unrecognized error, transfer to the global handler\n return triggerError(error, toLocation, from);\n })\n .then((failure) => {\n failure =\n failure ||\n finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation, from, false);\n // revert the navigation\n if (failure) {\n if (info.delta &&\n // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(failure, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n routerHistory.go(-info.delta, false);\n }\n else if (info.type === NavigationType.pop &&\n isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 16 /* ErrorTypes.NAVIGATION_DUPLICATED */)) {\n // manual change in hash history #916\n // it's like a push but lacks the information of the direction\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n })\n // avoid warnings in the console about uncaught rejections, they are logged by triggerErrors\n .catch(noop);\n });\n }\n // Initialization and Errors\n let readyHandlers = useCallbacks();\n let errorListeners = useCallbacks();\n let ready;\n /**\n * Trigger errorListeners added via onError and throws the error as well\n *\n * @param error - error to throw\n * @param to - location we were navigating to when the error happened\n * @param from - location we were navigating from when the error happened\n * @returns the error as a rejected promise\n */\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorListeners.list();\n if (list.length) {\n list.forEach(handler => handler(error, to, from));\n }\n else {\n if ((process.env.NODE_ENV !== 'production')) {\n warn('uncaught error during route navigation:');\n }\n console.error(error);\n }\n // reject the error no matter there were error listeners or not\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve, reject) => {\n readyHandlers.add([resolve, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n // still not ready if an error happened\n ready = !err;\n setupListeners();\n readyHandlers\n .list()\n .forEach(([resolve, reject]) => (err ? reject(err) : resolve()));\n readyHandlers.reset();\n }\n return err;\n }\n // Scroll behavior\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||\n ((isFirstNavigation || !isPush) &&\n history.state &&\n history.state.scroll) ||\n null;\n return nextTick()\n .then(() => scrollBehavior(to, from, scrollPosition))\n .then(position => position && scrollToPosition(position))\n .catch(err => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = new Set();\n const router = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n clearRoutes: matcher.clearRoutes,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorListeners.add,\n isReady,\n install(app) {\n const router = this;\n app.component('RouterLink', RouterLink);\n app.component('RouterView', RouterView);\n app.config.globalProperties.$router = router;\n Object.defineProperty(app.config.globalProperties, '$route', {\n enumerable: true,\n get: () => unref(currentRoute),\n });\n // this initial navigation is only necessary on client, on server it doesn't\n // make sense because it will create an extra unnecessary navigation and could\n // lead to problems\n if (isBrowser &&\n // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started &&\n currentRoute.value === START_LOCATION_NORMALIZED) {\n // see above\n started = true;\n push(routerHistory.location).catch(err => {\n if ((process.env.NODE_ENV !== 'production'))\n warn('Unexpected error when starting the router:', err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n Object.defineProperty(reactiveRoute, key, {\n get: () => currentRoute.value[key],\n enumerable: true,\n });\n }\n app.provide(routerKey, router);\n app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function () {\n installedApps.delete(app);\n // the router is not attached to an app anymore\n if (installedApps.size < 1) {\n // invalidate the current navigation\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n // TODO: this probably needs to be updated so it can be used by vue-termui\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n addDevtools(app, router, matcher);\n }\n },\n };\n // TODO: type this as NavigationGuardReturn or similar instead of any\n function runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n }\n return router;\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n // the type doesn't matter because we are comparing per reference\n if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\n\n/**\n * Returns the router instance. Equivalent to using `$router` inside\n * templates.\n */\nfunction useRouter() {\n return inject(routerKey);\n}\n/**\n * Returns the current route location. Equivalent to using `$route` inside\n * templates.\n */\nfunction useRoute(_name) {\n return inject(routeLocationKey);\n}\n\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n","/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n"],"names":["handlers","instrumented","addHandler","type","handler","maybeInstrument","instrumentFn","e","DEBUG_BUILD","logger","triggerHandlers","data","typeHandlers","getFunctionName","_oldOnErrorHandler","addGlobalErrorInstrumentationHandler","instrumentError","GLOBAL_OBJ","msg","url","line","column","error","_oldOnUnhandledRejectionHandler","addGlobalUnhandledRejectionInstrumentationHandler","instrumentUnhandledRejection","SentryNonRecordingSpan","spanContext","generateTraceId","generateSpanId","TRACE_FLAG_NONE","_timestamp","_key","_value","_values","_status","_name","_attributesOrStartTime","_startTime","_link","_links","_exception","_time","logSpanStart","span","description","op","parentSpanId","spanToJSON","spanId","sampled","spanIsSampled","rootSpan","getRootSpan","isRootSpan","header","infoParts","logSpanEnd","sampleSpan","options","samplingContext","sampleRand","hasSpansEnabled","localSampleRateWasApplied","sampleRate","fallbackSampleRate","parsedSampleRate","parseSampleRate","shouldSample","DSN_REGEX","isValidProtocol","protocol","dsnToString","dsn","withPassword","host","path","pass","port","projectId","publicKey","dsnFromString","str","match","consoleSandbox","lastPath","split","projectMatch","dsnFromComponents","components","validateDsn","component","makeDsn","from","createEnvelope","headers","items","addItemToEnvelope","envelope","newItem","forEachEnvelopeItem","callback","envelopeItems","envelopeItem","envelopeItemType","encodeUTF8","input","carrier","getSentryCarrier","serializeEnvelope","envHeaders","parts","append","next","item","itemHeaders","payload","stringifiedPayload","normalize","concatBuffers","buffers","totalLength","acc","buf","merged","offset","buffer","createSpanEnvelopeItem","spanJson","createAttachmentEnvelopeItem","attachment","dropUndefinedKeys","ITEM_TYPE_TO_DATA_CATEGORY_MAP","envelopeItemTypeToDataCategory","getSdkMetadataForEnvelopeHeader","metadataOrEvent","name","version","createEventEnvelopeHeaders","event","sdkInfo","tunnel","dynamicSamplingContext","_a","enhanceEventWithSdkInfo","createSessionEnvelope","session","metadata","envelopeHeaders","createEventEnvelope","eventType","createSpanEnvelope","spans","client","dscHasRequiredProps","dsc","getDynamicSamplingContextFromSpan","beforeSendSpan","convertToSpanJSON","processedSpan","showSpanDropWarning","setMeasurement","value","unit","activeSpan","getActiveSpan","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT","timedEventsToMeasurements","events","measurements","attributes","MAX_SPAN_COUNT","SentrySpan","timestampInSeconds","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_SENTRY_OP","traceId","TRACE_FLAG_SAMPLED","key","timeInput","spanTimeInputToSeconds","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","endTimestamp","getStatusMessage","SEMANTIC_ATTRIBUTE_PROFILE_ID","SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME","attributesOrStartTime","startTime","time","isSpanTimeInput","getClient","sendSpanEnvelope","transactionEvent","getCapturedScopesOnSpan","getCurrentScope","isFullFinishedSpan","capturedSpanScope","capturedSpanIsolationScope","getSpanDescendants","isStandaloneSpan","source","SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME","transaction","spanToTransactionTraceContext","a","b","spanItems","SUPPRESS_TRACING_KEY","startInactiveSpan","acs","getAcs","spanArguments","parseSentrySpanArguments","forceTransaction","customParentSpan","withScope","withActiveSpan","scope","parentSpan","getParentSpan","createChildOrRootSpan","_setSpanForScope","freezeDscOnSpan","isolationScope","getIsolationScope","_startChildSpan","addChildSpanToSpan","parentSampled","_startRootSpan","setCapturedScopesOnSpan","initialCtx","ctx","getMainCarrier","getAsyncContextStrategy","currentPropagationContext","SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE","childSpan","_getSpanForScope","SENTRY_API_VERSION","getBaseApiEndpoint","_getIngestEndpoint","_encodedAuth","params","getEnvelopeEndpointWithUrlEncodedAuth","installedIntegrations","filterDuplicates","integrations","integrationsByName","currentInstance","existingInstance","getIntegrationsToSetup","defaultIntegrations","userIntegrations","integration","resolvedUserIntegrations","setupIntegrations","integrationIndex","setupIntegration","afterSetupIntegrations","hint","processor","defineIntegration","fn","createClientReportEnvelope","discarded_events","timestamp","clientReportItem","dateTimestampInSeconds","SentryError","message","logLevel","getPossibleEventMessages","possibleMessages","lastException","convertTransactionEventToSpanJson","trace_id","parent_span_id","span_id","status","origin","convertSpanJsonToTransactionEvent","ALREADY_SEEN_ERROR","MISSING_RELEASE_FOR_SESSION_ERROR","Client","exception","eventId","uuid4","checkOrSetAlreadyCaught","hintWithEventId","level","currentScope","eventMessage","isParameterizedString","promisedEvent","isPrimitive","sdkProcessingMetadata","updateSession","timeout","transport","clientFinished","transportFlushed","resolvedSyncPromise","result","eventProcessor","integrationName","isAlreadyInstalled","env","promise","sendResponse","clientReleaseOption","clientEnvironmentOption","DEFAULT_ENVIRONMENT","sessionAttrs","reason","category","count","hook","hooks","cbIndex","rest","callbacks","crashed","errored","exceptions","ex","mechanism","sessionNonTerminal","SyncPromise","resolve","ticked","tick","interval","prepareEvent","evt","getTraceContextFromScope","getDynamicSamplingContextFromScope","isErrorEvent","finalEvent","isTransaction","isTransactionEvent","isError","beforeSendLabel","rejectedSyncPromise","dataCategory","prepared","processBeforeSend","_validateBeforeSendResult","processedEvent","spanCount","spanCountBefore","spanCountAfter","droppedSpanCount","transactionInfo","outcomes","quantity","beforeSendResult","invalidValueError","isThenable","isPlainObject","beforeSend","beforeSendTransaction","processedRootSpanJson","merge","processedSpans","initAndBind","clientClass","setCurrentClient","makePromiseBuffer","limit","isReady","remove","task","add","taskProducer","drain","reject","counter","capturedSetTimeout","DEFAULT_RETRY_AFTER","parseRetryAfterHeader","now","headerDelay","headerDate","disabledUntil","limits","isRateLimited","updateRateLimits","statusCode","updatedRateLimits","rateLimitHeader","retryAfterHeader","retryAfter","categories","namespaces","delay","DEFAULT_TRANSPORT_BUFFER_SIZE","createTransport","makeRequest","rateLimits","flush","send","filteredEnvelopeItems","filteredEnvelope","recordEnvelopeLoss","requestTask","response","addAutoIpAddressToUser","objWithMaybeUser","addAutoIpAddressToSession","applySdkMetadata","names","SDK_VERSION","DEFAULT_BREADCRUMBS","addBreadcrumb","breadcrumb","beforeBreadcrumb","maxBreadcrumbs","mergedBreadcrumb","finalBreadcrumb","originalFunctionToString","INTEGRATION_NAME","SETUP_CLIENTS","_functionToStringIntegration","args","originalFunction","getOriginalFunction","context","functionToStringIntegration","DEFAULT_IGNORE_ERRORS","_inboundFiltersIntegration","_hint","clientOptions","mergedOptions","_mergeOptions","_shouldDropEvent","inboundFiltersIntegration","internalOptions","_isSentryError","getEventDescription","_isIgnoredError","_isUselessError","_isIgnoredTransaction","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","ignoreErrors","stringMatchesSomePattern","ignoreTransactions","denyUrls","allowUrls","_getLastValidUrl","frames","i","frame","_b","applyAggregateErrorsToEvent","exceptionFromErrorImplementation","parser","maxValueLimit","isInstanceOf","originalException","truncateAggregateExceptions","aggregateExceptionsFromError","prevExceptions","exceptionId","newExceptions","applyExceptionGroupFieldsForParentException","newException","newExceptionId","applyExceptionGroupFieldsForChildException","childError","parentId","maxValueLength","truncate","addConsoleInstrumentationHandler","instrumentConsole","CONSOLE_LEVELS","fill","originalConsoleMethod","originalConsoleMethods","log","severityLevelFromString","_dedupeIntegration","previousEvent","currentEvent","dedupeIntegration","_isSameMessageEvent","_isSameExceptionEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","previousException","_getExceptionFromEvent","currentException","currentFrames","getFramesFromEvent","previousFrames","frameA","frameB","currentFingerprint","previousFingerprint","parseUrl","query","fragment","getBreadcrumbLogLevelFromHttpStatusCode","WINDOW","supportsHistory","supportsFetch","isNativeFunction","func","supportsNativeFetch","doc","sandbox","err","addFetchInstrumentationHandler","skipNativeFetchCheck","instrumentFetch","addFetchEndInstrumentationHandler","streamHandler","onFetchResolved","originalFetch","virtualError","method","parseFetchArgs","handlerData","addNonEnumerableProperty","resolveResponse","res","onFinishedResolving","body","responseReader","maxFetchDurationTimeout","readingActive","chunkTimeout","done","clonedResponseForResolving","hasProp","obj","prop","getUrlFromResource","resource","fetchArgs","arg","getSDKSource","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","wrap","isFunction","wrapper","sentryWrapped","wrappedArguments","addExceptionTypeValue","addExceptionMechanism","captureException","property","markFunctionWrapped","exceptionFromError","stackParser","parseStackFrames","extractType","extractMessage","eventFromPlainObject","syntheticException","isUnhandledRejection","normalizeDepth","errorFromProp","getErrorPropertyFromObject","extra","normalizeToSize","isEvent","getNonErrorObjectExceptionValue","eventFromError","stacktrace","skipLines","getSkipFirstStackStringLines","framesToPop","getPopFirstTopFrames","reactMinifiedRegexp","isWebAssemblyException","eventFromException","attachStacktrace","eventFromUnknownInput","eventFromMessage","eventFromString","isDOMError","isDOMException","domException","__sentry_template_string__","__sentry_template_values__","keys","extractExceptionKeysForMessage","captureType","getObjectClassName","prototype","BrowserClient","opts","sdkSource","DEBOUNCE_DURATION","debounceTimerID","lastCapturedEventType","lastCapturedEventTargetId","addClickKeypressInstrumentationHandler","instrumentDOM","triggerDOMHandler","globalDOMEventHandler","makeDOMEventHandler","target","proto","originalAddEventListener","listener","handlerForType","originalRemoveEventListener","isSimilarToLastCapturedEvent","shouldSkipDOMEvent","globalListener","getEventTarget","lastHref","addHistoryInstrumentationHandler","instrumentHistory","to","historyReplacementFunction","originalHistoryFunction","cachedImplementations","getNativeImplementation","cached","impl","document","contentWindow","clearCachedImplementation","SENTRY_XHR_DATA_KEY","addXhrInstrumentationHandler","instrumentXHR","xhrproto","originalOpen","xhrOpenThisArg","xhrOpenArgArray","startTimestamp","isString","onreadystatechangeHandler","xhrInfo","originalOnreadystatechange","onreadystatechangeThisArg","onreadystatechangeArgArray","originalSetRequestHeader","setRequestHeaderThisArg","setRequestHeaderArgArray","originalSend","sendThisArg","sendArgArray","sentryXhrData","makeFetchTransport","nativeFetch","pendingBodySize","pendingCount","request","requestSize","requestOptions","CHROME_PRIORITY","GECKO_PRIORITY","createFrame","filename","lineno","colno","UNKNOWN_FUNCTION","chromeRegexNoFnName","chromeRegex","chromeEvalRegex","chromeStackParserFn","noFnParts","col","subMatch","extractSafariExtensionDetails","chromeStackLineParser","geckoREgex","geckoEvalRegex","gecko","geckoStackLineParser","defaultStackLineParsers","defaultStackParser","createStackParser","isSafariExtension","isSafariWebExtension","MAX_ALLOWED_STRING_LENGTH","_breadcrumbsIntegration","_options","_getConsoleBreadcrumbHandler","_getDomBreadcrumbHandler","_getXhrBreadcrumbHandler","_getFetchBreadcrumbHandler","_getHistoryBreadcrumbHandler","_getSentryBreadcrumbHandler","breadcrumbsIntegration","dom","componentName","keyAttrs","maxStringLength","element","_isEvent","htmlTreeAsString","getComponentName","safeJoin","status_code","parsedLoc","parsedFrom","parsedTo","DEFAULT_EVENT_TARGET","_browserApiErrorsIntegration","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","_wrapEventTarget","browserApiErrorsIntegration","original","originalCallback","xhr","wrapOptions","eventName","isEventListenerObject","originalEventHandler","browserSessionIntegration","startSession","captureSession","_globalHandlersIntegration","_installGlobalOnErrorHandler","globalHandlerLog","_installGlobalOnUnhandledRejectionHandler","globalHandlersIntegration","getOptions","_enhanceEventWithInitialFrame","captureEvent","_getUnhandledRejectionError","_eventFromRejectionWithPrimitive","ev","ev0","ev0s","ev0sf","getLocationHref","httpContextIntegration","referrer","userAgent","DEFAULT_KEY","DEFAULT_LIMIT","_linkedErrorsIntegration","linkedErrorsIntegration","getDefaultIntegrations","applyDefaultOptions","optionsArg","dropTopLevelUndefinedKeys","mutatetedObj","k","shouldShowBrowserExtensionError","windowWithMaybeExtension","extensionKey","extensionObject","runtimeId","href","extensionProtocols","isDedicatedExtensionPage","isNWjs","init","browserOptions","stackParserFromStackParserOptions","DEFAULT_HOOKS","classifyRE","classify","c","ROOT_COMPONENT_NAME","ANONYMOUS_COMPONENT_NAME","repeat","n","formatComponentName","vm","includeFile","file","generateComponentTrace","tree","currentRecursiveSequence","last","attachErrorHandler","app","originalErrorHandler","lifecycleHook","trace","VUE_OP","HOOKS","finishRootSpan","findTrackComponent","trackComponents","formattedName","extractComponentName","compo","createTracingMixins","index","self","mixins","operation","internalHooks","internalHook","isRoot","shouldTrack","oldSpan","globalWithVue","DEFAULT_CONFIG","vueIntegration","integrationOptions","vueInit","init$1","isBrowser","isRouteComponent","isESModule","assign","applyToParams","newParams","isArray","noop","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","text","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery","location","currentLocation","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery","stripBase","pathname","base","isSameRouteLocation","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","fromSegments","toSegments","lastToSegment","position","toPosition","segment","START_LOCATION_NORMALIZED","NavigationType","NavigationDirection","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","state","fromState","pauseListeners","listen","teardown","beforeUnloadListener","history","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","hashIndex","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","route","isRouteName","NavigationFailureSymbol","NavigationFailureType","createRouterError","isNavigationFailure","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re","subPattern","parse","stringify","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","record","parent","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","isAliasRecord","removeRoute","isMatchable","insertMatcher","children","matcherRef","getRoutes","findInsertionIndex","paramsFromLocation","m","matched","parentMatcher","mergeMetaFields","clearRoutes","normalized","normalizeRecordProps","propsObject","props","meta","defaults","partialOptions","lower","upper","mid","insertionAncestor","getInsertionAncestor","ancestor","searchParams","searchParam","eqPos","currentValue","v","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","reset","guardToPromiseFn","guard","runWithContext","enterCallbackArray","valid","guardReturn","guardCall","extractComponentsGuards","guardType","guards","rawComponent","componentPromise","resolved","resolvedComponent","useLink","router","inject","currentRoute","computed","unref","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","guardEvent","RouterLinkImpl","defineComponent","slots","link","reactive","elClass","getLinkClass","h","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","ref","watch","instance","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","vnode","slot","slotContent","RouterView","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matcherLocation","targetParams","fullPath","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","force","shouldRedirect","toLocation","failure","handleScroll","markAsReady","triggerError","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","info","readyHandlers","errorListeners","ready","list","scrollBehavior","nextTick","started","reactiveRoute","shallowReactive","unmountApp","len","recordFrom","recordTo","useRouter","useRoute","defaultConverter","converter","defaultAttributes","set","stringifiedAttributes","attributeName","get","cookies","jar","found","api"],"mappings":"skDAKA,MAAMA,GAAW,CAAA,EACXC,GAAe,CAAA,EAGrB,SAASC,EAAWC,EAAMC,EAAS,CACjCJ,GAASG,CAAI,EAAIH,GAASG,CAAI,GAAK,CAAA,EAClCH,GAASG,CAAI,EAAI,KAAKC,CAAO,CAChC,CAaA,SAASC,EAAgBF,EAAMG,EAAc,CAC3C,GAAI,CAACL,GAAaE,CAAI,EAAG,CACvBF,GAAaE,CAAI,EAAI,GACrB,GAAI,CACFG,GACD,OAAQC,EAAG,CACVC,IAAeC,EAAO,MAAM,6BAA6BN,CAAI,GAAII,CAAC,CACnE,CACF,CACH,CAGA,SAASG,EAAgBP,EAAMQ,EAAM,CACnC,MAAMC,EAAeT,GAAQH,GAASG,CAAI,EAC1C,GAAKS,EAIL,UAAWR,KAAWQ,EACpB,GAAI,CACFR,EAAQO,CAAI,CACb,OAAQJ,EAAG,CACVC,IACEC,EAAO,MACL;AAAA,QAA0DN,CAAI;AAAA,QAAWU,GAAgBT,CAAO,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