{"version":3,"file":"sentry-angular.mjs","sources":["../../src/flags.ts","../../src/sdk.ts","../../src/zone.ts","../../src/errorhandler.ts","../../src/constants.ts","../../src/tracing.ts","../../src/sentry-angular.ts"],"sourcesContent":["/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * We define \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during our, or the user's\n * build process. Take care when introducing new flags - they must not throw if they are not replaced. See the Debug\n * Build Flags section in CONTRIBUTING.md.\n */\n\ndeclare const __SENTRY_DEBUG__: boolean;\n\n/** Flag that is true for debug builds, false otherwise. */\nexport const IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n","import { VERSION } from '@angular/core';\nimport type { BrowserOptions } from '@sentry/browser';\nimport {\n  breadcrumbsIntegration,\n  browserSessionIntegration,\n  cultureContextIntegration,\n  globalHandlersIntegration,\n  httpContextIntegration,\n  init as browserInit,\n  linkedErrorsIntegration,\n  setContext,\n} from '@sentry/browser';\nimport type { Client, Integration } from '@sentry/core';\nimport {\n  applySdkMetadata,\n  conversationIdIntegration,\n  debug,\n  dedupeIntegration,\n  functionToStringIntegration,\n  inboundFiltersIntegration,\n} from '@sentry/core';\nimport { IS_DEBUG_BUILD } from './flags';\n\n/**\n * Get the default integrations for the Angular SDK.\n */\nexport function getDefaultIntegrations(_options: BrowserOptions = {}): Integration[] {\n  // Don't include the BrowserApiErrors integration as it interferes with the Angular SDK's `ErrorHandler`:\n  // BrowserApiErrors would catch certain errors before they reach the `ErrorHandler` and\n  // thus provide a lower fidelity error than what `SentryErrorHandler`\n  // (see errorhandler.ts) would provide.\n  //\n  // see:\n  //  - https://github.com/getsentry/sentry-javascript/issues/5417#issuecomment-1453407097\n  //  - https://github.com/getsentry/sentry-javascript/issues/2744\n  return [\n    // TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`\n    // eslint-disable-next-line deprecation/deprecation\n    inboundFiltersIntegration(),\n    functionToStringIntegration(),\n    conversationIdIntegration(),\n    breadcrumbsIntegration(),\n    globalHandlersIntegration(),\n    linkedErrorsIntegration(),\n    dedupeIntegration(),\n    httpContextIntegration(),\n    cultureContextIntegration(),\n    browserSessionIntegration(),\n  ];\n}\n\n/**\n * Inits the Angular SDK\n */\nexport function init(options: BrowserOptions): Client | undefined {\n  const opts = {\n    defaultIntegrations: getDefaultIntegrations(),\n    ...options,\n  };\n\n  applySdkMetadata(opts, 'angular');\n\n  checkAndSetAngularVersion();\n  return browserInit(opts);\n}\n\nfunction checkAndSetAngularVersion(): void {\n  const ANGULAR_MINIMUM_VERSION = 14;\n\n  const angularVersion = VERSION?.major && parseInt(VERSION.major, 10);\n\n  if (angularVersion) {\n    if (angularVersion < ANGULAR_MINIMUM_VERSION) {\n      IS_DEBUG_BUILD &&\n        debug.warn(\n          `This Sentry SDK does not officially support Angular ${angularVersion}.`,\n          `This SDK only supports Angular ${ANGULAR_MINIMUM_VERSION} and above.`,\n          \"If you're using lower Angular versions, check the Angular Version Compatibility table in our docs: https://docs.sentry.io/platforms/javascript/guides/angular/#angular-version-compatibility.\",\n          'Otherwise, please consider upgrading your Angular version.',\n        );\n    }\n    setContext('angular', { version: angularVersion });\n  }\n}\n","// This would be exposed in the global environment whenever `zone.js` is\n// included in the `polyfills` configuration property. Starting from Angular 17,\n// users can opt-in to use zoneless change detection.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare const Zone: any;\n\n// In Angular 17 and future versions, zoneless support is forthcoming.\n// Therefore, it's advisable to safely check whether the `run` function is\n// available in the `<root>` context.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && Zone.root?.run;\n\n/**\n * The function that does the same job as `NgZone.runOutsideAngular`.\n *\n * ⚠️ Note: All of the Sentry functionality called from inside the Angular\n * execution context must be wrapped in this function. Angular's rendering\n * relies on asynchronous tasks being scheduled within its execution context.\n * Since Sentry schedules tasks that do not interact with Angular's rendering,\n * it may prevent Angular from functioning reliably. Consequently, it may disrupt\n * processes such as server-side rendering or client-side hydration.\n */\nexport function runOutsideAngular<T>(callback: () => T): T {\n  // Running the `callback` within the root execution context enables Angular\n  // processes (such as SSR and hydration) to continue functioning normally without\n  // timeouts and delays that could affect the user experience. This approach is\n  // necessary because some of the Sentry functionality continues to run in the background.\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n  return isNgZoneEnabled ? Zone.root.run(callback) : callback();\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport type { ErrorHandler as AngularErrorHandler, OnDestroy } from '@angular/core';\nimport { Inject, Injectable } from '@angular/core';\nimport type { ReportDialogOptions } from '@sentry/browser';\nimport * as Sentry from '@sentry/browser';\nimport type { Event } from '@sentry/core';\nimport { consoleSandbox, isString } from '@sentry/core';\nimport { runOutsideAngular } from './zone';\n\n/**\n * Options used to configure the behavior of the Angular ErrorHandler.\n */\nexport interface ErrorHandlerOptions {\n  logErrors?: boolean;\n  showDialog?: boolean;\n  dialogOptions?: ReportDialogOptions;\n  /**\n   * Custom implementation of error extraction from the raw value captured by the Angular.\n   * @param error Value captured by Angular's ErrorHandler provider\n   * @param defaultExtractor Default implementation that can be used as the fallback in case of custom implementation\n   */\n  extractor?(error: unknown, defaultExtractor: (error: unknown) => unknown): unknown;\n}\n\n// https://github.com/angular/angular/blob/master/packages/core/src/util/errors.ts\nfunction tryToUnwrapZonejsError(error: unknown): unknown | Error {\n  // TODO: once Angular14 is the minimum requirement ERROR_ORIGINAL_ERROR and\n  //  getOriginalError from error.ts can be used directly.\n  return (error as { ngOriginalError?: Error })?.ngOriginalError\n    ? (error as { ngOriginalError: Error }).ngOriginalError\n    : error;\n}\n\nfunction extractHttpModuleError(error: HttpErrorResponse): string | Error {\n  // The `error` property of http exception can be either an `Error` object, which we can use directly...\n  if (isErrorOrErrorLikeObject(error.error)) {\n    return error.error;\n  }\n\n  // ... or an`ErrorEvent`, which can provide us with the message but no stack...\n  // guarding `ErrorEvent` against `undefined` as it's not defined in Node environments\n  // oxlint-disable-next-line typescript/prefer-optional-chain\n  if (typeof ErrorEvent !== 'undefined' && error.error instanceof ErrorEvent && error.error.message) {\n    return error.error.message;\n  }\n\n  // ...or the request body itself, which we can use as a message instead.\n  if (typeof error.error === 'string') {\n    return `Server returned code ${error.status} with body \"${error.error}\"`;\n  }\n\n  // If we don't have any detailed information, fallback to the request message itself.\n  return error.message;\n}\n\ntype ErrorCandidate = {\n  name?: unknown;\n  message?: unknown;\n  stack?: unknown;\n};\n\nfunction isErrorOrErrorLikeObject(value: unknown): value is Error {\n  if (value instanceof Error) {\n    return true;\n  }\n\n  if (value === null || typeof value !== 'object') {\n    return false;\n  }\n\n  const candidate = value as ErrorCandidate;\n\n  return (\n    isString(candidate.name) &&\n    isString(candidate.message) &&\n    (undefined === candidate.stack || isString(candidate.stack))\n  );\n}\n\n/**\n * Implementation of Angular's ErrorHandler provider that can be used as a drop-in replacement for the stock one.\n */\n@Injectable({ providedIn: 'root' })\nclass SentryErrorHandler implements AngularErrorHandler, OnDestroy {\n  protected readonly _options: ErrorHandlerOptions;\n\n  /** The cleanup function is executed when the injector is destroyed. */\n  private _removeAfterSendEventListener?: () => void;\n\n  public constructor(@Inject('errorHandlerOptions') options?: ErrorHandlerOptions) {\n    this._options = {\n      logErrors: true,\n      ...options,\n    };\n  }\n\n  /**\n   * Method executed when the injector is destroyed.\n   */\n  public ngOnDestroy(): void {\n    if (this._removeAfterSendEventListener) {\n      this._removeAfterSendEventListener();\n    }\n  }\n\n  /**\n   * Method called for every value captured through the ErrorHandler\n   */\n  public handleError(error: unknown): void {\n    const extractedError = this._extractError(error) || 'Handled unknown error';\n\n    // Capture handled exception and send it to Sentry.\n    const eventId = runOutsideAngular(() =>\n      Sentry.captureException(extractedError, {\n        mechanism: { type: 'auto.function.angular.error_handler', handled: false },\n      }),\n    );\n\n    // When in development mode, log the error to console for immediate feedback.\n    if (this._options.logErrors) {\n      // eslint-disable-next-line no-console\n      consoleSandbox(() => console.error(extractedError));\n    }\n\n    // Optionally show user dialog to provide details on what happened.\n    if (this._options.showDialog) {\n      const client = Sentry.getClient();\n\n      if (client && !this._removeAfterSendEventListener) {\n        this._removeAfterSendEventListener = client.on('afterSendEvent', (event: Event) => {\n          if (!event.type && event.event_id) {\n            runOutsideAngular(() => {\n              Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });\n            });\n          }\n        });\n      } else if (!client) {\n        runOutsideAngular(() => {\n          Sentry.showReportDialog({ ...this._options.dialogOptions, eventId });\n        });\n      }\n    }\n  }\n\n  /**\n   * Used to pull a desired value that will be used to capture an event out of the raw value captured by ErrorHandler.\n   */\n  protected _extractError(error: unknown): unknown {\n    // Allow custom overrides of extracting function\n    if (this._options.extractor) {\n      const defaultExtractor = this._defaultExtractor.bind(this);\n      return this._options.extractor(error, defaultExtractor);\n    }\n\n    return this._defaultExtractor(error);\n  }\n\n  /**\n   * Default implementation of error extraction that handles default error wrapping, HTTP responses, ErrorEvent and few other known cases.\n   */\n  protected _defaultExtractor(errorCandidate: unknown): unknown {\n    const error = tryToUnwrapZonejsError(errorCandidate);\n\n    // If it's http module error, extract as much information from it as we can.\n    if (error instanceof HttpErrorResponse) {\n      return extractHttpModuleError(error);\n    }\n\n    // We can handle messages and Error objects directly.\n    if (typeof error === 'string' || isErrorOrErrorLikeObject(error)) {\n      return error;\n    }\n\n    // Nothing was extracted, fallback to default error message.\n    return null;\n  }\n}\n\n/**\n * Factory function that creates an instance of a preconfigured ErrorHandler provider.\n */\nfunction createErrorHandler(config?: ErrorHandlerOptions): SentryErrorHandler {\n  return new SentryErrorHandler(config);\n}\n\nexport { createErrorHandler, SentryErrorHandler };\n","export const ANGULAR_ROUTING_OP = 'ui.angular.routing';\n\nexport const ANGULAR_INIT_OP = 'ui.angular.init';\n\nexport const ANGULAR_OP = 'ui.angular';\n","import type { AfterViewInit, OnDestroy, OnInit } from '@angular/core';\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nimport { ElementRef } from '@angular/core';\nimport { Directive, Injectable, Input, NgModule } from '@angular/core';\nimport type { ActivatedRouteSnapshot, Event, RouterState } from '@angular/router';\n// Duplicated import to work around a TypeScript bug where it'd complain that `Router` isn't imported as a type.\n// We need to import it as a value to satisfy Angular dependency injection. So:\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nimport { NavigationCancel, NavigationError, Router } from '@angular/router';\nimport { NavigationEnd, NavigationStart, ResolveEnd } from '@angular/router';\nimport {\n  browserTracingIntegration as originalBrowserTracingIntegration,\n  getActiveSpan,\n  getClient,\n  getCurrentScope,\n  getRootSpan,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n  spanToJSON,\n  startBrowserTracingNavigationSpan,\n  startInactiveSpan,\n} from '@sentry/browser';\nimport type { Integration, Span } from '@sentry/core';\nimport { debug, stripUrlQueryAndFragment, timestampInSeconds } from '@sentry/core';\nimport type { Observable } from 'rxjs';\nimport { Subscription } from 'rxjs';\nimport { filter, tap } from 'rxjs/operators';\nimport { ANGULAR_INIT_OP, ANGULAR_OP, ANGULAR_ROUTING_OP } from './constants';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { runOutsideAngular } from './zone';\n\nlet instrumentationInitialized: boolean;\n\n/**\n * A custom browser tracing integration for Angular.\n *\n * Use this integration in combination with `TraceService`\n */\nexport function browserTracingIntegration(\n  options: Parameters<typeof originalBrowserTracingIntegration>[0] = {},\n): Integration {\n  // If the user opts out to set this up, we just don't initialize this.\n  // That way, the TraceService will not actually do anything, functionally disabling this.\n  if (options.instrumentNavigation !== false) {\n    instrumentationInitialized = true;\n  }\n\n  return originalBrowserTracingIntegration({\n    ...options,\n    instrumentNavigation: false,\n  });\n}\n\n/**\n * This function is extracted to make unit testing easier.\n */\nexport function _updateSpanAttributesForParametrizedUrl(route: string, span?: Span): void {\n  const attributes = (span && spanToJSON(span).data) || {};\n\n  if (span && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {\n    span.updateName(route);\n    span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n    span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, `auto.${spanToJSON(span).op}.angular`);\n  }\n}\n\n/**\n * Angular's Service responsible for hooking into Angular Router and tracking current navigation process.\n * Creates a new transaction for every route change and measures a duration of routing process.\n */\n@Injectable({ providedIn: 'root' })\nexport class TraceService implements OnDestroy {\n  public navStart$: Observable<Event> = this._router.events.pipe(\n    filter((event): event is NavigationStart => event instanceof NavigationStart),\n    tap(navigationEvent => {\n      if (!instrumentationInitialized) {\n        IS_DEBUG_BUILD &&\n          debug.error('Angular integration has tracing enabled, but Tracing integration is not configured');\n        return;\n      }\n\n      if (this._routingSpan) {\n        this._routingSpan.end();\n        this._routingSpan = null;\n      }\n\n      const client = getClient();\n      const strippedUrl = stripUrlQueryAndFragment(navigationEvent.url);\n\n      if (client) {\n        // see comment in `_isPageloadOngoing` for rationale\n        if (!this._isPageloadOngoing()) {\n          runOutsideAngular(() => {\n            startBrowserTracingNavigationSpan(client, {\n              name: strippedUrl,\n              attributes: {\n                [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.angular',\n                [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n              },\n            });\n          });\n        } else {\n          // The first time we end up here, we set the pageload flag to false\n          // Subsequent navigations are going to get their own navigation root span\n          // even if the pageload root span is still ongoing.\n          this._pageloadOngoing = false;\n        }\n\n        this._routingSpan =\n          runOutsideAngular(() =>\n            startInactiveSpan({\n              name: `${navigationEvent.url}`,\n              op: ANGULAR_ROUTING_OP,\n              attributes: {\n                [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular',\n                [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n                url: strippedUrl,\n                ...(navigationEvent.navigationTrigger && {\n                  navigationTrigger: navigationEvent.navigationTrigger,\n                }),\n              },\n            }),\n          ) || null;\n\n        return;\n      }\n    }),\n  );\n\n  // The ResolveEnd event is fired when the Angular router has resolved the URL and\n  // the parameter<->value mapping. It holds the new resolved router state with\n  // the mapping and the new URL.\n  // Only After this event, the route is activated, meaning that the transaction\n  // can be updated with the parameterized route name before e.g. the route's root\n  // component is initialized. This should be early enough before outgoing requests\n  // are made from the new route, with the exceptions of requests being made during\n  // a navigation.\n  public resEnd$: Observable<Event> = this._router.events.pipe(\n    filter((event): event is ResolveEnd => event instanceof ResolveEnd),\n    tap(event => {\n      const route = getParameterizedRouteFromSnapshot(\n        (event.state as unknown as RouterState & { root: ActivatedRouteSnapshot }).root,\n      );\n\n      if (route) {\n        getCurrentScope().setTransactionName(route);\n      }\n\n      const activeSpan = getActiveSpan();\n      const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n      _updateSpanAttributesForParametrizedUrl(route, rootSpan);\n    }),\n  );\n\n  public navEnd$: Observable<Event> = this._router.events.pipe(\n    filter(\n      event => event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError,\n    ),\n    tap(() => {\n      if (this._routingSpan) {\n        runOutsideAngular(() => {\n          // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n          this._routingSpan!.end();\n        });\n        this._routingSpan = null;\n      }\n    }),\n  );\n\n  private _routingSpan: Span | null;\n\n  private _subscription: Subscription;\n\n  /**\n   * @see _isPageloadOngoing()\n   */\n  private _pageloadOngoing: boolean;\n\n  public constructor(private readonly _router: Router) {\n    this._routingSpan = null;\n    this._pageloadOngoing = true;\n\n    this._subscription = new Subscription();\n\n    this._subscription.add(this.navStart$.subscribe());\n    this._subscription.add(this.resEnd$.subscribe());\n    this._subscription.add(this.navEnd$.subscribe());\n  }\n\n  /**\n   * This is used to prevent memory leaks when the root view is created and destroyed multiple times,\n   * since `subscribe` callbacks capture `this` and prevent many resources from being GC'd.\n   */\n  public ngOnDestroy(): void {\n    this._subscription.unsubscribe();\n  }\n\n  /**\n   * We only _avoid_ creating a navigation root span in one case:\n   *\n   * There is an ongoing pageload span AND the router didn't yet emit the first navigation start event\n   *\n   * The first navigation start event will create the child routing span\n   * and update the pageload root span name on ResolveEnd.\n   *\n   * There's an edge case we need to avoid here: If the router fires the first navigation start event\n   * _after_ the pageload root span finished. This is why we check for the pageload root span.\n   * Possible real-world scenario: Angular application and/or router is bootstrapped after the pageload\n   * idle root span finished\n   *\n   * The overall rationale is:\n   * - if we already avoided creating a navigation root span once, we don't avoid it again\n   *   (i.e. set `_pageloadOngoing` to `false`)\n   * - if `_pageloadOngoing` is already `false`, create a navigation root span\n   * - if there's no active/pageload root span, create a navigation root span\n   * - only if there's an ongoing pageload root span AND `_pageloadOngoing` is still `true,\n   *   don't create a navigation root span\n   */\n  private _isPageloadOngoing(): boolean {\n    if (!this._pageloadOngoing) {\n      // pageload is already finished, no need to update\n      return false;\n    }\n\n    const activeSpan = getActiveSpan();\n    if (!activeSpan) {\n      this._pageloadOngoing = false;\n      return false;\n    }\n\n    const rootSpan = getRootSpan(activeSpan);\n\n    this._pageloadOngoing = spanToJSON(rootSpan).op === 'pageload';\n    return this._pageloadOngoing;\n  }\n}\n\n/**\n * Captures the initialization lifecycle of the component this directive is applied to.\n * Specifically, this directive measures the time between `ngOnInit` and `ngAfterViewInit`\n * of the component.\n *\n * Falls back to the component's selector if no name is provided.\n *\n * @example\n * ```html\n * <app-my-component trace=\"myComponent\"></app-my-component>\n * ```\n */\n@Directive({ selector: '[trace]' })\nexport class TraceDirective implements OnInit, AfterViewInit {\n  @Input('trace') public componentName?: string;\n\n  private _tracingSpan?: Span;\n\n  public constructor(private readonly _host: ElementRef<HTMLElement>) {}\n\n  /**\n   * Implementation of OnInit lifecycle method\n   * @inheritdoc\n   */\n  public ngOnInit(): void {\n    if (!this.componentName) {\n      // Technically, the `trace` binding should always be provided.\n      // However, if it is incorrectly declared on the element without a\n      // value (e.g., `<app-component trace />`), we fall back to using `tagName`\n      // (which is e.g. `APP-COMPONENT`).\n      this.componentName = this._host.nativeElement.tagName.toLowerCase();\n    }\n\n    if (getActiveSpan()) {\n      this._tracingSpan = runOutsideAngular(() =>\n        startInactiveSpan({\n          name: `<${this.componentName}>`,\n          op: ANGULAR_INIT_OP,\n          attributes: { [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_directive' },\n        }),\n      );\n    }\n  }\n\n  /**\n   * Implementation of AfterViewInit lifecycle method\n   * @inheritdoc\n   */\n  public ngAfterViewInit(): void {\n    const span = this._tracingSpan;\n    if (span) {\n      runOutsideAngular(() => span.end());\n    }\n  }\n}\n\n/**\n * A module serves as a single compilation unit for the `TraceDirective` and can be re-used by any other module.\n */\n@NgModule({\n  declarations: [TraceDirective],\n  exports: [TraceDirective],\n})\nexport class TraceModule {}\n\ninterface TraceClassOptions {\n  /**\n   * Name of the class\n   */\n  name?: string;\n}\n\n/**\n * Decorator function that can be used to capture initialization lifecycle of the whole component.\n */\nexport function TraceClass(options?: TraceClassOptions): ClassDecorator {\n  let tracingSpan: Span;\n\n  /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n  return target => {\n    const originalOnInit = target.prototype.ngOnInit;\n    target.prototype.ngOnInit = function (...args: unknown[]): ReturnType<typeof originalOnInit> {\n      tracingSpan = runOutsideAngular(() =>\n        startInactiveSpan({\n          onlyIfParent: true,\n          name: `<${options?.name || 'unnamed'}>`,\n          op: ANGULAR_INIT_OP,\n          attributes: {\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_class_decorator',\n          },\n        }),\n      );\n\n      if (originalOnInit) {\n        return originalOnInit.apply(this, args);\n      }\n    };\n\n    const originalAfterViewInit = target.prototype.ngAfterViewInit;\n    target.prototype.ngAfterViewInit = function (...args: unknown[]): ReturnType<typeof originalAfterViewInit> {\n      if (tracingSpan) {\n        runOutsideAngular(() => tracingSpan.end());\n      }\n      if (originalAfterViewInit) {\n        return originalAfterViewInit.apply(this, args);\n      }\n    };\n  };\n  /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n}\n\ninterface TraceMethodOptions {\n  /**\n   * Name of the method (is added to the tracing span)\n   */\n  name?: string;\n}\n\n/**\n * Decorator function that can be used to capture a single lifecycle methods of the component.\n */\nexport function TraceMethod(options?: TraceMethodOptions): MethodDecorator {\n  return (_target: unknown, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n    const originalMethod = descriptor.value;\n    descriptor.value = function (...args: unknown[]): ReturnType<typeof originalMethod> {\n      const now = timestampInSeconds();\n\n      runOutsideAngular(() => {\n        startInactiveSpan({\n          onlyIfParent: true,\n          name: `<${options?.name ? options.name : 'unnamed'}>`,\n          op: `${ANGULAR_OP}.${String(propertyKey)}`,\n          startTime: now,\n          attributes: {\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_method_decorator',\n          },\n        }).end(now);\n      });\n\n      if (originalMethod) {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n        return originalMethod.apply(this, args);\n      }\n    };\n    return descriptor;\n  };\n}\n\n/**\n * Takes the parameterized route from a given ActivatedRouteSnapshot and concatenates the snapshot's\n * child route with its parent to produce the complete parameterized URL of the activated route.\n * This happens recursively until the last child (i.e. the end of the URL) is reached.\n *\n * @param route the ActivatedRouteSnapshot of which its path and its child's path is concatenated\n *\n * @returns the concatenated parameterized route string\n */\nexport function getParameterizedRouteFromSnapshot(route?: ActivatedRouteSnapshot | null): string {\n  const parts: string[] = [];\n\n  let currentRoute = route?.firstChild;\n  while (currentRoute) {\n    const path = currentRoute?.routeConfig && currentRoute.routeConfig.path;\n    if (path === null || path === undefined) {\n      break;\n    }\n\n    parts.push(path);\n    currentRoute = currentRoute.firstChild;\n  }\n\n  const fullPath = parts.filter(part => part).join('/');\n  return fullPath ? `/${fullPath}/` : '/';\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["browserInit","originalBrowserTracingIntegration"],"m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