mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
1 line
54 KiB
JSON
1 line
54 KiB
JSON
|
|
{"ast":null,"code":"import * as Sentry from '@sentry/browser';\nimport { SDK_VERSION, init as init$1, setContext, captureException, getCurrentHub } from '@sentry/browser';\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/router';\nexport * from '@sentry/browser';\nimport * as i0 from '@angular/core';\nimport { VERSION, Injectable, Inject, Directive, Input, NgModule } from '@angular/core';\nimport { logger, addExceptionMechanism, getGlobalObject, stripUrlQueryAndFragment, timestampWithMs } from '@sentry/utils';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport * as i1 from '@angular/router';\nimport { NavigationStart, ResolveEnd, NavigationEnd, Router } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { filter, tap } from 'rxjs/operators';\nconst ANGULAR_ROUTING_OP = 'ui.angular.routing';\nconst ANGULAR_INIT_OP = 'ui.angular.init';\nconst ANGULAR_OP = 'ui.angular';\n/**\n * Minimum Angular version this SDK supports\n */\nconst ANGULAR_MINIMUM_VERSION = 10;\n\n/*\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/** Flag that is true for debug builds, false otherwise. */\nconst IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n\n/**\n * Inits the Angular SDK\n */\nfunction init(options) {\n options._metadata = options._metadata || {};\n options._metadata.sdk = {\n name: 'sentry.javascript.angular',\n packages: [{\n name: 'npm:@sentry/angular',\n version: SDK_VERSION\n }],\n version: SDK_VERSION\n };\n checkAndSetAngularVersion();\n init$1(options);\n}\nfunction checkAndSetAngularVersion() {\n const angularVersion = VERSION && VERSION.major ? parseInt(VERSION.major, 10) : undefined;\n if (angularVersion) {\n if (angularVersion < ANGULAR_MINIMUM_VERSION) {\n IS_DEBUG_BUILD && logger.warn(`The Sentry SDK does not officially support Angular ${angularVersion}.`, `This version of the Sentry SDK supports Angular ${ANGULAR_MINIMUM_VERSION} and above.`, 'Please consider upgrading your Angular version or downgrading the Sentry SDK.');\n }\n setContext('angular', {\n version: angularVersion\n });\n }\n}\n\n// There're 2 types of Angular applications:\n// 1) zone-full (by default)\n// 2) zone-less\n// The developer can avoid importing the `zone.js` package and tells Angular that\n// he is responsible for running the change detection by himself. This is done by\n// \"nooping\" the zone through `CompilerOptions` when bootstrapping the root module.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && !!Zone.current;\n/**\n * The function that does the same job as `NgZone.runOutsideAngular`.\n */\nfunction runOutsideAngular(callback) {\n // The `Zone.root.run` basically will run the `callback` in the most parent zone.\n // Any asynchronous API used inside the `callback` won't catch Angular's zone\n // since `Zone.current` will reference `Zone.root`.\n // The Angular's zone is forked from the `Zone.root`. In this case, `zone.js` won't\n // trigger change detection, and `ApplicationRef.tick()` will not be run.\n // Caretaker note: we're using `Zone.root` except `NgZone.runOutsideAngular` since this\n // will require injecting the `NgZone` facade. That will create a breaking change for\n // projects already using the `@sentry/angular`.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return isNgZoneEnabled ? Zone.root.run(callback) : callback();\n}\n\n/**\n * Implementation of Angular's ErrorHandler provider that can be used as a drop-in replacement for the stock one.\n */\nclass SentryErrorHandler {\n cons
|