{"version":3,"sources":["src/app/shared/components/splash-screen/splash-screen.component.ts","src/app/shared/components/splash-screen/splash-screen.component.html","src/app/app.component.ts","src/app/app.component.html","node_modules/@angular/service-worker/fesm2022/service-worker.mjs","node_modules/@ngrx/effects/fesm2022/ngrx-effects.mjs","node_modules/@ngrx/router-store/fesm2022/ngrx-router-store.mjs","src/store/mutations/mutation-selectors.ts","src/app/ops/pubnub-entity-store.effects.ts","src/app/pages/components/four04-page/four04-page.component.ts","src/app/pages/components/four04-page/four04-page.component.html","src/app/shared/tcs-logging/console-logger.ts","src/app/shared/tcs-logging/logging-error-handler.ts","src/app/shared/tcs-logging/multi-logger.ts","src/app/shared/tcs-logging/ngrx-store-logger-actions.ts","src/app/shared/tcs-logging/ngrx-store-logger.ts","src/app/shared/tcs-logging/cache-logger.ts","src/app/shared/tcs-logging/tcs-logging.module.ts","src/lib/tcs-identity/impersonation.interceptor.ts","src/lib/tcs-identity/okta-config.provider.ts","src/lib/tcs-identity/components/tcs-okta-callback/tcs-okta-callback.component.ts","src/lib/tcs-identity/components/tcs-okta-callback/tcs-okta-callback.component.html","src/lib/tcs-identity/tcs-identity.module.ts","src/store/auth/auth-store.actions.ts","src/store/auth/auth-store.effects.ts","src/store/mutations/mutation-state.ts","src/store/mutations/mutations-reducer.ts","src/util/entity-store/entity-store.reducer.ts","src/store/auth/auth-store.model.ts","src/store/auth/auth-store.reducer.ts","src/store/pubnub/pubnub-store.reducer.ts","src/store/reducers.ts","src/store/router/router-store.ts","src/lib/tcs-identity/authentication.interceptor.ts","src/app/shared/app-context/app-context.resolver.ts","src/lib/pubnub-listener-service/pubnub-listener.service.ts","src/features/login/logout-page/logout-page.component.ts","src/app/core/components/unauthorized-page/unauthorized-page.component.ts","src/app/core/components/unauthorized-page/unauthorized-page.component.html","src/app/shared/client-sync/company-code.guard.ts","src/app/app-routing.module.ts","src/app/ops/ops-dialogs/passdown-log-dialog/passdown-log-effects.ts","node_modules/@apollo/client/link/retry/delayFunction.js","node_modules/@apollo/client/link/retry/retryFunction.js","node_modules/@apollo/client/link/retry/retryLink.js","node_modules/@apollo/client/link/error/index.js","src/util/apollo/app-insights-dependeny-tracking.apollo-link.ts","src/util/apollo/app-insights-operation-id.apollo-link.ts","src/util/apollo/auth.apollo-link.ts","src/util/apollo/secondary-source-link.ts","src/util/apollo/apollo-client-links.ts","src/graphql/generated/graphql-possible-types.generated.ts","node_modules/apollo-angular/fesm2022/ngApolloLinkHttp.mjs","src/app/core/apollo-initializer.service.ts","src/app/core/pageview.service.ts","src/app/core/router-loading.service.ts","src/app/shared/route-title.service.ts","src/lib/amg-monitoring/cpu-idle-observer.service.ts","src/app/ops/ops-lib/position-report-alerts/position-report-alert-audible.service.ts","src/app/core/app-bootstrap.service.ts","src/app/core/app-updater.service.ts","src/app/core/app-initializer.service.ts","src/app/core/core.module.ts","src/app/app.module.ts","src/util/observable-tracker.ts","src/main.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { NavigationEnd, Router } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { filter, map, startWith, take } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'tcs-splash-screen',\r\n templateUrl: './splash-screen.component.html',\r\n styleUrls: ['./splash-screen.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SplashScreenComponent {\r\n public isLoading$: Observable;\r\n constructor(router: Router) {\r\n this.isLoading$ = router.events.pipe(\r\n filter((e) => e instanceof NavigationEnd),\r\n take(1),\r\n map(() => false),\r\n startWith(true),\r\n );\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n Loading application, please wait...\r\n
\r\n
\r\n
\r\n","/* eslint-disable @typescript-eslint/naming-convention */\r\nimport {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n OnDestroy,\r\n OnInit,\r\n} from '@angular/core';\r\nimport { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';\r\nimport { MatIconRegistry } from '@angular/material/icon';\r\nimport { DomSanitizer, Title } from '@angular/platform-browser';\r\nimport { Router } from '@angular/router';\r\nimport { Subject } from 'rxjs';\r\nimport { environment } from 'src/environments/environment';\r\nimport { TcsNetworkService } from 'src/lib/tcs-network/tcs-network.service';\r\nimport { registerIcons, registerSVGIcons } from 'src/util/angular/ng-material-icon-helpers';\r\nimport { NewRelicService } from 'src/lib/tcs-new-relic/new-relic-initializer.service';\r\nimport { TcsConfigurationService } from './core/configuration.service';\r\nimport { PubnubService } from './shared/pubnub/pubnub.service';\r\n\r\nconst icons = {\r\n assets: {\r\n 'amgh-logo': '/assets/images/amgh-logo.svg',\r\n 'firstcall-logo': '/assets/images/firstcall-logo.svg',\r\n 'medi-heli': '/assets/images/med-heli-noun_574818_cc.svg',\r\n },\r\n};\r\n\r\n@Component({\r\n selector: 'tcs-app-root',\r\n templateUrl: './app.component.html',\r\n styleUrls: ['./app.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AppComponent implements AfterViewInit, OnInit, OnDestroy {\r\n public environment = clientContext.environment;\r\n\r\n get environmentDisplay() {\r\n return this._tcsConfig.environmentDisplay;\r\n }\r\n\r\n // For debugging purposes - do not remove\r\n public clientInfo = {\r\n clientContext,\r\n buildEnvironment: environment,\r\n };\r\n\r\n private _onDestroy$ = new Subject();\r\n\r\n constructor(\r\n private _changeDetectorRef: ChangeDetectorRef,\r\n private _tcsConfig: TcsConfigurationService,\r\n private _network: TcsNetworkService,\r\n private _pubnub: PubnubService,\r\n private _newRelic: NewRelicService,\r\n _title: Title,\r\n _dialog: MatDialog,\r\n _router: Router,\r\n _iconRegistry: MatIconRegistry,\r\n _domSanitizer: DomSanitizer,\r\n ) {\r\n registerIcons(icons, _iconRegistry, _domSanitizer);\r\n registerSVGIcons(_iconRegistry, _domSanitizer);\r\n }\r\n\r\n public ngAfterViewInit() {\r\n this._changeDetectorRef.detectChanges();\r\n }\r\n\r\n public ngOnInit() {\r\n this._pubnub.init();\r\n this._newRelic.init();\r\n }\r\n\r\n public ngOnDestroy() {\r\n this._onDestroy$.next(null);\r\n this._onDestroy$.complete();\r\n }\r\n}\r\n","\r\n
\r\n \r\n {{ environmentDisplay }}\r\n
\r\n
\r\n\r\n\r\n
\r\n \r\n{{\r\n  clientInfo | json\r\n}}\r\n
\r\n","/**\n * @license Angular v17.3.12\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Injectable, InjectionToken, NgZone, ApplicationRef, makeEnvironmentProviders, PLATFORM_ID, APP_INITIALIZER, Injector, NgModule } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { defer, throwError, fromEvent, of, concat, Subject, NEVER, merge } from 'rxjs';\nimport { map, filter, switchMap, publish, take, tap, delay } from 'rxjs/operators';\nconst ERR_SW_NOT_SUPPORTED = 'Service workers are disabled or not supported by this browser';\nfunction errorObservable(message) {\n return defer(() => throwError(new Error(message)));\n}\n/**\n * @publicApi\n */\nclass NgswCommChannel {\n constructor(serviceWorker) {\n this.serviceWorker = serviceWorker;\n if (!serviceWorker) {\n this.worker = this.events = this.registration = errorObservable(ERR_SW_NOT_SUPPORTED);\n } else {\n const controllerChangeEvents = fromEvent(serviceWorker, 'controllerchange');\n const controllerChanges = controllerChangeEvents.pipe(map(() => serviceWorker.controller));\n const currentController = defer(() => of(serviceWorker.controller));\n const controllerWithChanges = concat(currentController, controllerChanges);\n this.worker = controllerWithChanges.pipe(filter(c => !!c));\n this.registration = this.worker.pipe(switchMap(() => serviceWorker.getRegistration()));\n const rawEvents = fromEvent(serviceWorker, 'message');\n const rawEventPayload = rawEvents.pipe(map(event => event.data));\n const eventsUnconnected = rawEventPayload.pipe(filter(event => event && event.type));\n const events = eventsUnconnected.pipe(publish());\n events.connect();\n this.events = events;\n }\n }\n postMessage(action, payload) {\n return this.worker.pipe(take(1), tap(sw => {\n sw.postMessage({\n action,\n ...payload\n });\n })).toPromise().then(() => undefined);\n }\n postMessageWithOperation(type, payload, operationNonce) {\n const waitForOperationCompleted = this.waitForOperationCompleted(operationNonce);\n const postMessage = this.postMessage(type, payload);\n return Promise.all([postMessage, waitForOperationCompleted]).then(([, result]) => result);\n }\n generateNonce() {\n return Math.round(Math.random() * 10000000);\n }\n eventsOfType(type) {\n let filterFn;\n if (typeof type === 'string') {\n filterFn = event => event.type === type;\n } else {\n filterFn = event => type.includes(event.type);\n }\n return this.events.pipe(filter(filterFn));\n }\n nextEventOfType(type) {\n return this.eventsOfType(type).pipe(take(1));\n }\n waitForOperationCompleted(nonce) {\n return this.eventsOfType('OPERATION_COMPLETED').pipe(filter(event => event.nonce === nonce), take(1), map(event => {\n if (event.result !== undefined) {\n return event.result;\n }\n throw new Error(event.error);\n })).toPromise();\n }\n get isEnabled() {\n return !!this.serviceWorker;\n }\n}\n\n/**\n * Subscribe and listen to\n * [Web Push\n * Notifications](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices) through\n * Angular Service Worker.\n *\n * @usageNotes\n *\n * You can inject a `SwPush` instance into any component or service\n * as a dependency.\n *\n * \n *\n * To subscribe, call `SwPush.requestSubscription()`, which asks the user for permission.\n * The call returns a `Promise` with a new\n * [`PushSubscription`](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription)\n * instance.\n *\n * \n *\n * A request is rejected if the user denies permission, or if the browser\n * blocks or does not support the Push API or ServiceWorkers.\n * Check `SwPush.isEnabled` to confirm status.\n *\n * Invoke Push Notifications by pushing a message with the following payload.\n *\n * ```ts\n * {\n * \"notification\": {\n * \"actions\": NotificationAction[],\n * \"badge\": USVString,\n * \"body\": DOMString,\n * \"data\": any,\n * \"dir\": \"auto\"|\"ltr\"|\"rtl\",\n * \"icon\": USVString,\n * \"image\": USVString,\n * \"lang\": DOMString,\n * \"renotify\": boolean,\n * \"requireInteraction\": boolean,\n * \"silent\": boolean,\n * \"tag\": DOMString,\n * \"timestamp\": DOMTimeStamp,\n * \"title\": DOMString,\n * \"vibrate\": number[]\n * }\n * }\n * ```\n *\n * Only `title` is required. See `Notification`\n * [instance\n * properties](https://developer.mozilla.org/en-US/docs/Web/API/Notification#Instance_properties).\n *\n * While the subscription is active, Service Worker listens for\n * [PushEvent](https://developer.mozilla.org/en-US/docs/Web/API/PushEvent)\n * occurrences and creates\n * [Notification](https://developer.mozilla.org/en-US/docs/Web/API/Notification)\n * instances in response.\n *\n * Unsubscribe using `SwPush.unsubscribe()`.\n *\n * An application can subscribe to `SwPush.notificationClicks` observable to be notified when a user\n * clicks on a notification. For example:\n *\n * \n *\n * You can read more on handling notification clicks in the [Service worker notifications\n * guide](guide/service-worker-notifications).\n *\n * @see [Push Notifications](https://developers.google.com/web/fundamentals/codelabs/push-notifications/)\n * @see [Angular Push Notifications](https://blog.angular-university.io/angular-push-notifications/)\n * @see [MDN: Push API](https://developer.mozilla.org/en-US/docs/Web/API/Push_API)\n * @see [MDN: Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API)\n * @see [MDN: Web Push API Notifications best practices](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices)\n *\n * @publicApi\n */\nlet SwPush = /*#__PURE__*/(() => {\n class SwPush {\n /**\n * True if the Service Worker is enabled (supported by the browser and enabled via\n * `ServiceWorkerModule`).\n */\n get isEnabled() {\n return this.sw.isEnabled;\n }\n constructor(sw) {\n this.sw = sw;\n this.pushManager = null;\n this.subscriptionChanges = new Subject();\n if (!sw.isEnabled) {\n this.messages = NEVER;\n this.notificationClicks = NEVER;\n this.subscription = NEVER;\n return;\n }\n this.messages = this.sw.eventsOfType('PUSH').pipe(map(message => message.data));\n this.notificationClicks = this.sw.eventsOfType('NOTIFICATION_CLICK').pipe(map(message => message.data));\n this.pushManager = this.sw.registration.pipe(map(registration => registration.pushManager));\n const workerDrivenSubscriptions = this.pushManager.pipe(switchMap(pm => pm.getSubscription()));\n this.subscription = merge(workerDrivenSubscriptions, this.subscriptionChanges);\n }\n /**\n * Subscribes to Web Push Notifications,\n * after requesting and receiving user permission.\n *\n * @param options An object containing the `serverPublicKey` string.\n * @returns A Promise that resolves to the new subscription object.\n */\n requestSubscription(options) {\n if (!this.sw.isEnabled || this.pushManager === null) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const pushOptions = {\n userVisibleOnly: true\n };\n let key = this.decodeBase64(options.serverPublicKey.replace(/_/g, '/').replace(/-/g, '+'));\n let applicationServerKey = new Uint8Array(new ArrayBuffer(key.length));\n for (let i = 0; i < key.length; i++) {\n applicationServerKey[i] = key.charCodeAt(i);\n }\n pushOptions.applicationServerKey = applicationServerKey;\n return this.pushManager.pipe(switchMap(pm => pm.subscribe(pushOptions)), take(1)).toPromise().then(sub => {\n this.subscriptionChanges.next(sub);\n return sub;\n });\n }\n /**\n * Unsubscribes from Service Worker push notifications.\n *\n * @returns A Promise that is resolved when the operation succeeds, or is rejected if there is no\n * active subscription or the unsubscribe operation fails.\n */\n unsubscribe() {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const doUnsubscribe = sub => {\n if (sub === null) {\n throw new Error('Not subscribed to push notifications.');\n }\n return sub.unsubscribe().then(success => {\n if (!success) {\n throw new Error('Unsubscribe failed!');\n }\n this.subscriptionChanges.next(null);\n });\n };\n return this.subscription.pipe(take(1), switchMap(doUnsubscribe)).toPromise();\n }\n decodeBase64(input) {\n return atob(input);\n }\n static {\n this.ɵfac = function SwPush_Factory(t) {\n return new (t || SwPush)(i0.ɵɵinject(NgswCommChannel));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SwPush,\n factory: SwPush.ɵfac\n });\n }\n }\n return SwPush;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Subscribe to update notifications from the Service Worker, trigger update\n * checks, and forcibly activate updates.\n *\n * @see {@link guide/service-worker-communications Service worker communication guide}\n *\n * @publicApi\n */\nlet SwUpdate = /*#__PURE__*/(() => {\n class SwUpdate {\n /**\n * True if the Service Worker is enabled (supported by the browser and enabled via\n * `ServiceWorkerModule`).\n */\n get isEnabled() {\n return this.sw.isEnabled;\n }\n constructor(sw) {\n this.sw = sw;\n if (!sw.isEnabled) {\n this.versionUpdates = NEVER;\n this.unrecoverable = NEVER;\n return;\n }\n this.versionUpdates = this.sw.eventsOfType(['VERSION_DETECTED', 'VERSION_INSTALLATION_FAILED', 'VERSION_READY', 'NO_NEW_VERSION_DETECTED']);\n this.unrecoverable = this.sw.eventsOfType('UNRECOVERABLE_STATE');\n }\n /**\n * Checks for an update and waits until the new version is downloaded from the server and ready\n * for activation.\n *\n * @returns a promise that\n * - resolves to `true` if a new version was found and is ready to be activated.\n * - resolves to `false` if no new version was found\n * - rejects if any error occurs\n */\n checkForUpdate() {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const nonce = this.sw.generateNonce();\n return this.sw.postMessageWithOperation('CHECK_FOR_UPDATES', {\n nonce\n }, nonce);\n }\n /**\n * Updates the current client (i.e. browser tab) to the latest version that is ready for\n * activation.\n *\n * In most cases, you should not use this method and instead should update a client by reloading\n * the page.\n *\n *
\n *\n * Updating a client without reloading can easily result in a broken application due to a version\n * mismatch between the [application shell](guide/glossary#app-shell) and other page resources,\n * such as [lazy-loaded chunks](guide/glossary#lazy-loading), whose filenames may change between\n * versions.\n *\n * Only use this method, if you are certain it is safe for your specific use case.\n *\n *
\n *\n * @returns a promise that\n * - resolves to `true` if an update was activated successfully\n * - resolves to `false` if no update was available (for example, the client was already on the\n * latest version).\n * - rejects if any error occurs\n */\n activateUpdate() {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const nonce = this.sw.generateNonce();\n return this.sw.postMessageWithOperation('ACTIVATE_UPDATE', {\n nonce\n }, nonce);\n }\n static {\n this.ɵfac = function SwUpdate_Factory(t) {\n return new (t || SwUpdate)(i0.ɵɵinject(NgswCommChannel));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SwUpdate,\n factory: SwUpdate.ɵfac\n });\n }\n }\n return SwUpdate;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SCRIPT = /*#__PURE__*/new InjectionToken(ngDevMode ? 'NGSW_REGISTER_SCRIPT' : '');\nfunction ngswAppInitializer(injector, script, options, platformId) {\n return () => {\n if (!(isPlatformBrowser(platformId) && 'serviceWorker' in navigator && options.enabled !== false)) {\n return;\n }\n // Wait for service worker controller changes, and fire an INITIALIZE action when a new SW\n // becomes active. This allows the SW to initialize itself even if there is no application\n // traffic.\n navigator.serviceWorker.addEventListener('controllerchange', () => {\n if (navigator.serviceWorker.controller !== null) {\n navigator.serviceWorker.controller.postMessage({\n action: 'INITIALIZE'\n });\n }\n });\n let readyToRegister$;\n if (typeof options.registrationStrategy === 'function') {\n readyToRegister$ = options.registrationStrategy();\n } else {\n const [strategy, ...args] = (options.registrationStrategy || 'registerWhenStable:30000').split(':');\n switch (strategy) {\n case 'registerImmediately':\n readyToRegister$ = of(null);\n break;\n case 'registerWithDelay':\n readyToRegister$ = delayWithTimeout(+args[0] || 0);\n break;\n case 'registerWhenStable':\n readyToRegister$ = !args[0] ? whenStable(injector) : merge(whenStable(injector), delayWithTimeout(+args[0]));\n break;\n default:\n // Unknown strategy.\n throw new Error(`Unknown ServiceWorker registration strategy: ${options.registrationStrategy}`);\n }\n }\n // Don't return anything to avoid blocking the application until the SW is registered.\n // Also, run outside the Angular zone to avoid preventing the app from stabilizing (especially\n // given that some registration strategies wait for the app to stabilize).\n // Catch and log the error if SW registration fails to avoid uncaught rejection warning.\n const ngZone = injector.get(NgZone);\n ngZone.runOutsideAngular(() => readyToRegister$.pipe(take(1)).subscribe(() => navigator.serviceWorker.register(script, {\n scope: options.scope\n }).catch(err => console.error('Service worker registration failed with:', err))));\n };\n}\nfunction delayWithTimeout(timeout) {\n return of(null).pipe(delay(timeout));\n}\nfunction whenStable(injector) {\n const appRef = injector.get(ApplicationRef);\n return appRef.isStable.pipe(filter(stable => stable));\n}\nfunction ngswCommChannelFactory(opts, platformId) {\n return new NgswCommChannel(isPlatformBrowser(platformId) && opts.enabled !== false ? navigator.serviceWorker : undefined);\n}\n/**\n * Token that can be used to provide options for `ServiceWorkerModule` outside of\n * `ServiceWorkerModule.register()`.\n *\n * You can use this token to define a provider that generates the registration options at runtime,\n * for example via a function call:\n *\n * {@example service-worker/registration-options/module.ts region=\"registration-options\"\n * header=\"app.module.ts\"}\n *\n * @publicApi\n */\nclass SwRegistrationOptions {}\n/**\n * @publicApi\n *\n * Sets up providers to register the given Angular Service Worker script.\n *\n * If `enabled` is set to `false` in the given options, the module will behave as if service\n * workers are not supported by the browser, and the service worker will not be registered.\n *\n * Example usage:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideServiceWorker('ngsw-worker.js')\n * ],\n * });\n * ```\n */\nfunction provideServiceWorker(script, options = {}) {\n return makeEnvironmentProviders([SwPush, SwUpdate, {\n provide: SCRIPT,\n useValue: script\n }, {\n provide: SwRegistrationOptions,\n useValue: options\n }, {\n provide: NgswCommChannel,\n useFactory: ngswCommChannelFactory,\n deps: [SwRegistrationOptions, PLATFORM_ID]\n }, {\n provide: APP_INITIALIZER,\n useFactory: ngswAppInitializer,\n deps: [Injector, SCRIPT, SwRegistrationOptions, PLATFORM_ID],\n multi: true\n }]);\n}\n\n/**\n * @publicApi\n */\nlet ServiceWorkerModule = /*#__PURE__*/(() => {\n class ServiceWorkerModule {\n /**\n * Register the given Angular Service Worker script.\n *\n * If `enabled` is set to `false` in the given options, the module will behave as if service\n * workers are not supported by the browser, and the service worker will not be registered.\n */\n static register(script, options = {}) {\n return {\n ngModule: ServiceWorkerModule,\n providers: [provideServiceWorker(script, options)]\n };\n }\n static {\n this.ɵfac = function ServiceWorkerModule_Factory(t) {\n return new (t || ServiceWorkerModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: ServiceWorkerModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [SwPush, SwUpdate]\n });\n }\n }\n return ServiceWorkerModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ServiceWorkerModule, SwPush, SwRegistrationOptions, SwUpdate, provideServiceWorker };\n","import * as operators from '@ngrx/operators';\nimport * as i1 from 'rxjs';\nimport { merge, Observable, Subject, defer } from 'rxjs';\nimport { ignoreElements, materialize, map, catchError, filter, groupBy, mergeMap, exhaustMap, dematerialize, take, concatMap, finalize } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Inject, NgModule, Optional, inject, makeEnvironmentProviders, ENVIRONMENT_INITIALIZER } from '@angular/core';\nimport * as i3 from '@ngrx/store';\nimport { ScannedActionsSubject, createAction, ROOT_STORE_PROVIDER, FEATURE_STATE_PROVIDER, Store } from '@ngrx/store';\nconst DEFAULT_EFFECT_CONFIG = {\n dispatch: true,\n functional: false,\n useEffectsErrorHandler: true\n};\nconst CREATE_EFFECT_METADATA_KEY = '__@ngrx/effects_create__';\n\n/**\n * @description\n *\n * Creates an effect from a source and an `EffectConfig`.\n *\n * @param source A function which returns an observable or observable factory.\n * @param config A `EffectConfig` to configure the effect. By default,\n * `dispatch` is true, `functional` is false, and `useEffectsErrorHandler` is\n * true.\n * @returns If `EffectConfig`#`functional` is true, returns the source function.\n * Else, returns the source function result. When `EffectConfig`#`dispatch` is\n * true, the source function result needs to be `Observable`.\n *\n * @usageNotes\n *\n * ### Class Effects\n *\n * ```ts\n * @Injectable()\n * export class FeatureEffects {\n * // mapping to a different action\n * readonly effect1$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(FeatureActions.actionOne),\n * map(() => FeatureActions.actionTwo())\n * )\n * );\n *\n * // non-dispatching effect\n * readonly effect2$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(FeatureActions.actionTwo),\n * tap(() => console.log('Action Two Dispatched'))\n * ),\n * { dispatch: false } // FeatureActions.actionTwo is not dispatched\n * );\n *\n * constructor(private readonly actions$: Actions) {}\n * }\n * ```\n *\n * ### Functional Effects\n *\n * ```ts\n * // mapping to a different action\n * export const loadUsers = createEffect(\n * (actions$ = inject(Actions), usersService = inject(UsersService)) => {\n * return actions$.pipe(\n * ofType(UsersPageActions.opened),\n * exhaustMap(() => {\n * return usersService.getAll().pipe(\n * map((users) => UsersApiActions.usersLoadedSuccess({ users })),\n * catchError((error) =>\n * of(UsersApiActions.usersLoadedFailure({ error }))\n * )\n * );\n * })\n * );\n * },\n * { functional: true }\n * );\n *\n * // non-dispatching functional effect\n * export const logDispatchedActions = createEffect(\n * () => inject(Actions).pipe(tap(console.log)),\n * { functional: true, dispatch: false }\n * );\n * ```\n */\nfunction createEffect(source, config = {}) {\n const effect = config.functional ? source : source();\n const value = {\n ...DEFAULT_EFFECT_CONFIG,\n ...config // Overrides any defaults if values are provided\n };\n Object.defineProperty(effect, CREATE_EFFECT_METADATA_KEY, {\n value\n });\n return effect;\n}\nfunction getCreateEffectMetadata(instance) {\n const propertyNames = Object.getOwnPropertyNames(instance);\n const metadata = propertyNames.filter(propertyName => {\n if (instance[propertyName] && instance[propertyName].hasOwnProperty(CREATE_EFFECT_METADATA_KEY)) {\n // If the property type has overridden `hasOwnProperty` we need to ensure\n // that the metadata is valid (containing a `dispatch` property)\n // https://github.com/ngrx/platform/issues/2975\n const property = instance[propertyName];\n return property[CREATE_EFFECT_METADATA_KEY].hasOwnProperty('dispatch');\n }\n return false;\n }).map(propertyName => {\n const metaData = instance[propertyName][CREATE_EFFECT_METADATA_KEY];\n return {\n propertyName,\n ...metaData\n };\n });\n return metadata;\n}\nfunction getEffectsMetadata(instance) {\n return getSourceMetadata(instance).reduce((acc, {\n propertyName,\n dispatch,\n useEffectsErrorHandler\n }) => {\n acc[propertyName] = {\n dispatch,\n useEffectsErrorHandler\n };\n return acc;\n }, {});\n}\nfunction getSourceMetadata(instance) {\n return getCreateEffectMetadata(instance);\n}\nfunction getSourceForInstance(instance) {\n return Object.getPrototypeOf(instance);\n}\nfunction isClassInstance(obj) {\n return !!obj.constructor && obj.constructor.name !== 'Object' && obj.constructor.name !== 'Function';\n}\nfunction isClass(classOrRecord) {\n return typeof classOrRecord === 'function';\n}\nfunction getClasses(classesAndRecords) {\n return classesAndRecords.filter(isClass);\n}\nfunction isToken(tokenOrRecord) {\n return tokenOrRecord instanceof InjectionToken || isClass(tokenOrRecord);\n}\nfunction mergeEffects(sourceInstance, globalErrorHandler, effectsErrorHandler) {\n const source = getSourceForInstance(sourceInstance);\n const isClassBasedEffect = !!source && source.constructor.name !== 'Object';\n const sourceName = isClassBasedEffect ? source.constructor.name : null;\n const observables$ = getSourceMetadata(sourceInstance).map(({\n propertyName,\n dispatch,\n useEffectsErrorHandler\n }) => {\n const observable$ = typeof sourceInstance[propertyName] === 'function' ? sourceInstance[propertyName]() : sourceInstance[propertyName];\n const effectAction$ = useEffectsErrorHandler ? effectsErrorHandler(observable$, globalErrorHandler) : observable$;\n if (dispatch === false) {\n return effectAction$.pipe(ignoreElements());\n }\n const materialized$ = effectAction$.pipe(materialize());\n return materialized$.pipe(map(notification => ({\n effect: sourceInstance[propertyName],\n notification,\n propertyName,\n sourceName,\n sourceInstance\n })));\n });\n return merge(...observables$);\n}\nconst MAX_NUMBER_OF_RETRY_ATTEMPTS = 10;\nfunction defaultEffectsErrorHandler(observable$, errorHandler, retryAttemptLeft = MAX_NUMBER_OF_RETRY_ATTEMPTS) {\n return observable$.pipe(catchError(error => {\n if (errorHandler) errorHandler.handleError(error);\n if (retryAttemptLeft <= 1) {\n return observable$; // last attempt\n }\n // Return observable that produces this particular effect\n return defaultEffectsErrorHandler(observable$, errorHandler, retryAttemptLeft - 1);\n }));\n}\nlet Actions = /*#__PURE__*/(() => {\n class Actions extends Observable {\n constructor(source) {\n super();\n if (source) {\n this.source = source;\n }\n }\n lift(operator) {\n const observable = new Actions();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n /** @nocollapse */\n static {\n this.ɵfac = function Actions_Factory(t) {\n return new (t || Actions)(i0.ɵɵinject(ScannedActionsSubject));\n };\n }\n /** @nocollapse */\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: Actions,\n factory: Actions.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return Actions;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * `ofType` filters an Observable of `Actions` into an Observable of the actions\n * whose type strings are passed to it.\n *\n * For example, if `actions` has type `Actions`, and\n * the type of the `Addition` action is `add`, then\n * `actions.pipe(ofType('add'))` returns an `Observable`.\n *\n * Properly typing this function is hard and requires some advanced TS tricks\n * below.\n *\n * Type narrowing automatically works, as long as your `actions` object\n * starts with a `Actions` instead of generic `Actions`.\n *\n * For backwards compatibility, when one passes a single type argument\n * `ofType('something')` the result is an `Observable`. Note, that `T`\n * completely overrides any possible inference from 'something'.\n *\n * Unfortunately, for unknown 'actions: Actions' these types will produce\n * 'Observable'. In such cases one has to manually set the generic type\n * like `actions.ofType('add')`.\n *\n * @usageNotes\n *\n * Filter the Actions stream on the \"customers page loaded\" action\n *\n * ```ts\n * import { ofType } from '@ngrx/effects';\n * import * fromCustomers from '../customers';\n *\n * this.actions$.pipe(\n * ofType(fromCustomers.pageLoaded)\n * )\n * ```\n */\nfunction ofType(...allowedTypes) {\n return filter(action => allowedTypes.some(typeOrActionCreator => {\n if (typeof typeOrActionCreator === 'string') {\n // Comparing the string to type\n return typeOrActionCreator === action.type;\n }\n // We are filtering by ActionCreator\n return typeOrActionCreator.type === action.type;\n }));\n}\nconst _ROOT_EFFECTS_GUARD = new InjectionToken('@ngrx/effects Internal Root Guard');\nconst USER_PROVIDED_EFFECTS = new InjectionToken('@ngrx/effects User Provided Effects');\nconst _ROOT_EFFECTS = new InjectionToken('@ngrx/effects Internal Root Effects');\nconst _ROOT_EFFECTS_INSTANCES = new InjectionToken('@ngrx/effects Internal Root Effects Instances');\nconst _FEATURE_EFFECTS = new InjectionToken('@ngrx/effects Internal Feature Effects');\nconst _FEATURE_EFFECTS_INSTANCE_GROUPS = new InjectionToken('@ngrx/effects Internal Feature Effects Instance Groups');\nconst EFFECTS_ERROR_HANDLER = new InjectionToken('@ngrx/effects Effects Error Handler', {\n providedIn: 'root',\n factory: () => defaultEffectsErrorHandler\n});\nconst ROOT_EFFECTS_INIT = '@ngrx/effects/init';\nconst rootEffectsInit = createAction(ROOT_EFFECTS_INIT);\nfunction reportInvalidActions(output, reporter) {\n if (output.notification.kind === 'N') {\n const action = output.notification.value;\n const isInvalidAction = !isAction(action);\n if (isInvalidAction) {\n reporter.handleError(new Error(`Effect ${getEffectName(output)} dispatched an invalid action: ${stringify(action)}`));\n }\n }\n}\nfunction isAction(action) {\n return typeof action !== 'function' && action && action.type && typeof action.type === 'string';\n}\nfunction getEffectName({\n propertyName,\n sourceInstance,\n sourceName\n}) {\n const isMethod = typeof sourceInstance[propertyName] === 'function';\n const isClassBasedEffect = !!sourceName;\n return isClassBasedEffect ? `\"${sourceName}.${String(propertyName)}${isMethod ? '()' : ''}\"` : `\"${String(propertyName)}()\"`;\n}\nfunction stringify(action) {\n try {\n return JSON.stringify(action);\n } catch {\n return action;\n }\n}\nconst onIdentifyEffectsKey = 'ngrxOnIdentifyEffects';\nfunction isOnIdentifyEffects(instance) {\n return isFunction(instance, onIdentifyEffectsKey);\n}\nconst onRunEffectsKey = 'ngrxOnRunEffects';\nfunction isOnRunEffects(instance) {\n return isFunction(instance, onRunEffectsKey);\n}\nconst onInitEffects = 'ngrxOnInitEffects';\nfunction isOnInitEffects(instance) {\n return isFunction(instance, onInitEffects);\n}\nfunction isFunction(instance, functionName) {\n return instance && functionName in instance && typeof instance[functionName] === 'function';\n}\nlet EffectSources = /*#__PURE__*/(() => {\n class EffectSources extends Subject {\n constructor(errorHandler, effectsErrorHandler) {\n super();\n this.errorHandler = errorHandler;\n this.effectsErrorHandler = effectsErrorHandler;\n }\n addEffects(effectSourceInstance) {\n this.next(effectSourceInstance);\n }\n /**\n * @internal\n */\n toActions() {\n return this.pipe(groupBy(effectsInstance => isClassInstance(effectsInstance) ? getSourceForInstance(effectsInstance) : effectsInstance), mergeMap(source$ => {\n return source$.pipe(groupBy(effectsInstance));\n }), mergeMap(source$ => {\n const effect$ = source$.pipe(exhaustMap(sourceInstance => {\n return resolveEffectSource(this.errorHandler, this.effectsErrorHandler)(sourceInstance);\n }), map(output => {\n reportInvalidActions(output, this.errorHandler);\n return output.notification;\n }), filter(notification => notification.kind === 'N' && notification.value != null), dematerialize());\n // start the stream with an INIT action\n // do this only for the first Effect instance\n const init$ = source$.pipe(take(1), filter(isOnInitEffects), map(instance => instance.ngrxOnInitEffects()));\n return merge(effect$, init$);\n }));\n }\n /** @nocollapse */\n static {\n this.ɵfac = function EffectSources_Factory(t) {\n return new (t || EffectSources)(i0.ɵɵinject(i0.ErrorHandler), i0.ɵɵinject(EFFECTS_ERROR_HANDLER));\n };\n }\n /** @nocollapse */\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: EffectSources,\n factory: EffectSources.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return EffectSources;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction effectsInstance(sourceInstance) {\n if (isOnIdentifyEffects(sourceInstance)) {\n return sourceInstance.ngrxOnIdentifyEffects();\n }\n return '';\n}\nfunction resolveEffectSource(errorHandler, effectsErrorHandler) {\n return sourceInstance => {\n const mergedEffects$ = mergeEffects(sourceInstance, errorHandler, effectsErrorHandler);\n if (isOnRunEffects(sourceInstance)) {\n return sourceInstance.ngrxOnRunEffects(mergedEffects$);\n }\n return mergedEffects$;\n };\n}\nlet EffectsRunner = /*#__PURE__*/(() => {\n class EffectsRunner {\n get isStarted() {\n return !!this.effectsSubscription;\n }\n constructor(effectSources, store) {\n this.effectSources = effectSources;\n this.store = store;\n this.effectsSubscription = null;\n }\n start() {\n if (!this.effectsSubscription) {\n this.effectsSubscription = this.effectSources.toActions().subscribe(this.store);\n }\n }\n ngOnDestroy() {\n if (this.effectsSubscription) {\n this.effectsSubscription.unsubscribe();\n this.effectsSubscription = null;\n }\n }\n /** @nocollapse */\n static {\n this.ɵfac = function EffectsRunner_Factory(t) {\n return new (t || EffectsRunner)(i0.ɵɵinject(EffectSources), i0.ɵɵinject(i3.Store));\n };\n }\n /** @nocollapse */\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: EffectsRunner,\n factory: EffectsRunner.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return EffectsRunner;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet EffectsRootModule = /*#__PURE__*/(() => {\n class EffectsRootModule {\n constructor(sources, runner, store, rootEffectsInstances, storeRootModule, storeFeatureModule, guard) {\n this.sources = sources;\n runner.start();\n for (const effectsInstance of rootEffectsInstances) {\n sources.addEffects(effectsInstance);\n }\n store.dispatch({\n type: ROOT_EFFECTS_INIT\n });\n }\n addEffects(effectsInstance) {\n this.sources.addEffects(effectsInstance);\n }\n /** @nocollapse */\n static {\n this.ɵfac = function EffectsRootModule_Factory(t) {\n return new (t || EffectsRootModule)(i0.ɵɵinject(EffectSources), i0.ɵɵinject(EffectsRunner), i0.ɵɵinject(i3.Store), i0.ɵɵinject(_ROOT_EFFECTS_INSTANCES), i0.ɵɵinject(i3.StoreRootModule, 8), i0.ɵɵinject(i3.StoreFeatureModule, 8), i0.ɵɵinject(_ROOT_EFFECTS_GUARD, 8));\n };\n }\n /** @nocollapse */\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: EffectsRootModule\n });\n }\n /** @nocollapse */\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n }\n return EffectsRootModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet EffectsFeatureModule = /*#__PURE__*/(() => {\n class EffectsFeatureModule {\n constructor(effectsRootModule, effectsInstanceGroups, storeRootModule, storeFeatureModule) {\n const effectsInstances = effectsInstanceGroups.flat();\n for (const effectsInstance of effectsInstances) {\n effectsRootModule.addEffects(effectsInstance);\n }\n }\n /** @nocollapse */\n static {\n this.ɵfac = function EffectsFeatureModule_Factory(t) {\n return new (t || EffectsFeatureModule)(i0.ɵɵinject(EffectsRootModule), i0.ɵɵinject(_FEATURE_EFFECTS_INSTANCE_GROUPS), i0.ɵɵinject(i3.StoreRootModule, 8), i0.ɵɵinject(i3.StoreFeatureModule, 8));\n };\n }\n /** @nocollapse */\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: EffectsFeatureModule\n });\n }\n /** @nocollapse */\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n }\n return EffectsFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet EffectsModule = /*#__PURE__*/(() => {\n class EffectsModule {\n static forFeature(...featureEffects) {\n const effects = featureEffects.flat();\n const effectsClasses = getClasses(effects);\n return {\n ngModule: EffectsFeatureModule,\n providers: [effectsClasses, {\n provide: _FEATURE_EFFECTS,\n multi: true,\n useValue: effects\n }, {\n provide: USER_PROVIDED_EFFECTS,\n multi: true,\n useValue: []\n }, {\n provide: _FEATURE_EFFECTS_INSTANCE_GROUPS,\n multi: true,\n useFactory: createEffectsInstances,\n deps: [_FEATURE_EFFECTS, USER_PROVIDED_EFFECTS]\n }]\n };\n }\n static forRoot(...rootEffects) {\n const effects = rootEffects.flat();\n const effectsClasses = getClasses(effects);\n return {\n ngModule: EffectsRootModule,\n providers: [effectsClasses, {\n provide: _ROOT_EFFECTS,\n useValue: [effects]\n }, {\n provide: _ROOT_EFFECTS_GUARD,\n useFactory: _provideForRootGuard\n }, {\n provide: USER_PROVIDED_EFFECTS,\n multi: true,\n useValue: []\n }, {\n provide: _ROOT_EFFECTS_INSTANCES,\n useFactory: createEffectsInstances,\n deps: [_ROOT_EFFECTS, USER_PROVIDED_EFFECTS]\n }]\n };\n }\n /** @nocollapse */\n static {\n this.ɵfac = function EffectsModule_Factory(t) {\n return new (t || EffectsModule)();\n };\n }\n /** @nocollapse */\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: EffectsModule\n });\n }\n /** @nocollapse */\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n }\n return EffectsModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction createEffectsInstances(effectsGroups, userProvidedEffectsGroups) {\n const effects = [];\n for (const effectsGroup of effectsGroups) {\n effects.push(...effectsGroup);\n }\n for (const userProvidedEffectsGroup of userProvidedEffectsGroups) {\n effects.push(...userProvidedEffectsGroup);\n }\n return effects.map(effectsTokenOrRecord => isToken(effectsTokenOrRecord) ? inject(effectsTokenOrRecord) : effectsTokenOrRecord);\n}\nfunction _provideForRootGuard() {\n const runner = inject(EffectsRunner, {\n optional: true,\n skipSelf: true\n });\n const rootEffects = inject(_ROOT_EFFECTS, {\n self: true\n });\n // check whether any effects are actually passed\n const hasEffects = !(rootEffects.length === 1 && rootEffects[0].length === 0);\n if (hasEffects && runner) {\n throw new TypeError(`EffectsModule.forRoot() called twice. Feature modules should use EffectsModule.forFeature() instead.`);\n }\n return 'guarded';\n}\n\n/**\n * Wraps project fn with error handling making it safe to use in Effects.\n * Takes either a config with named properties that represent different possible\n * callbacks or project/error callbacks that are required.\n */\nfunction act(/** Allow to take either config object or project/error functions */\nconfigOrProject, errorFn) {\n const {\n project,\n error,\n complete,\n operator,\n unsubscribe\n } = typeof configOrProject === 'function' ? {\n project: configOrProject,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n error: errorFn,\n operator: concatMap,\n complete: undefined,\n unsubscribe: undefined\n } : {\n ...configOrProject,\n operator: configOrProject.operator || concatMap\n };\n return source => defer(() => {\n const subject = new Subject();\n return merge(source.pipe(operator((input, index) => defer(() => {\n let completed = false;\n let errored = false;\n let projectedCount = 0;\n return project(input, index).pipe(materialize(), map(notification => {\n switch (notification.kind) {\n case 'E':\n errored = true;\n return {\n kind: 'N',\n value: error(notification.error, input)\n };\n case 'C':\n completed = true;\n return complete ? {\n kind: 'N',\n value: complete(projectedCount, input)\n } : undefined;\n default:\n ++projectedCount;\n return notification;\n }\n }), filter(n => n != null), dematerialize(), finalize(() => {\n if (!completed && !errored && unsubscribe) {\n subject.next(unsubscribe(projectedCount, input));\n }\n }));\n }))), subject);\n });\n}\n\n/**\n * @usageNotes\n *\n * ### Providing effects at the root level\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideEffects(RouterEffects)],\n * });\n * ```\n *\n * ### Providing effects at the feature level\n *\n * ```ts\n * const booksRoutes: Route[] = [\n * {\n * path: '',\n * providers: [provideEffects(BooksApiEffects)],\n * children: [\n * { path: '', component: BookListComponent },\n * { path: ':id', component: BookDetailsComponent },\n * ],\n * },\n * ];\n * ```\n */\nfunction provideEffects(...effects) {\n const effectsClassesAndRecords = effects.flat();\n const effectsClasses = getClasses(effectsClassesAndRecords);\n return makeEnvironmentProviders([effectsClasses, {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: () => {\n inject(ROOT_STORE_PROVIDER);\n inject(FEATURE_STATE_PROVIDER, {\n optional: true\n });\n const effectsRunner = inject(EffectsRunner);\n const effectSources = inject(EffectSources);\n const shouldInitEffects = !effectsRunner.isStarted;\n if (shouldInitEffects) {\n effectsRunner.start();\n }\n for (const effectsClassOrRecord of effectsClassesAndRecords) {\n const effectsInstance = isClass(effectsClassOrRecord) ? inject(effectsClassOrRecord) : effectsClassOrRecord;\n effectSources.addEffects(effectsInstance);\n }\n if (shouldInitEffects) {\n const store = inject(Store);\n store.dispatch(rootEffectsInit());\n }\n }\n }]);\n}\n\n/**\n * @deprecated Use `concatLatestFrom` from `@ngrx/operators` instead.\n */\nconst concatLatestFrom = operators.concatLatestFrom;\n\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Actions, EFFECTS_ERROR_HANDLER, EffectSources, EffectsFeatureModule, EffectsModule, EffectsRootModule, EffectsRunner, ROOT_EFFECTS_INIT, USER_PROVIDED_EFFECTS, act, concatLatestFrom, createEffect, defaultEffectsErrorHandler, getEffectsMetadata, mergeEffects, ofType, provideEffects, rootEffectsInit };\n","import * as i1 from '@ngrx/store';\nimport { createAction, props, isNgrxMockEnvironment, select, ACTIVE_RUNTIME_CHECKS, createFeatureSelector, createSelector } from '@ngrx/store';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, isDevMode, Injectable, Inject, makeEnvironmentProviders, ENVIRONMENT_INITIALIZER, inject, NgModule } from '@angular/core';\nimport * as i2 from '@angular/router';\nimport { NavigationStart, RoutesRecognized, NavigationCancel, NavigationError, NavigationEnd } from '@angular/router';\nimport { withLatestFrom } from 'rxjs/operators';\n\n/**\n * An action dispatched when a router navigation request is fired.\n */\nconst ROUTER_REQUEST = '@ngrx/router-store/request';\nconst routerRequestAction = createAction(ROUTER_REQUEST, props());\n/**\n * An action dispatched when the router navigates.\n */\nconst ROUTER_NAVIGATION = '@ngrx/router-store/navigation';\nconst routerNavigationAction = createAction(ROUTER_NAVIGATION, props());\n/**\n * An action dispatched when the router cancels navigation.\n */\nconst ROUTER_CANCEL = '@ngrx/router-store/cancel';\nconst routerCancelAction = createAction(ROUTER_CANCEL, props());\n/**\n * An action dispatched when the router errors.\n */\nconst ROUTER_ERROR = '@ngrx/router-store/error';\nconst routerErrorAction = createAction(ROUTER_ERROR, props());\n/**\n * An action dispatched after navigation has ended and new route is active.\n */\nconst ROUTER_NAVIGATED = '@ngrx/router-store/navigated';\nconst routerNavigatedAction = createAction(ROUTER_NAVIGATED, props());\nfunction routerReducer(state, action) {\n // Allow compilation with strictFunctionTypes - ref: #1344\n const routerAction = action;\n switch (routerAction.type) {\n case ROUTER_NAVIGATION:\n case ROUTER_ERROR:\n case ROUTER_CANCEL:\n return {\n state: routerAction.payload.routerState,\n navigationId: routerAction.payload.event.id\n };\n default:\n return state;\n }\n}\nclass MinimalRouterStateSerializer {\n serialize(routerState) {\n return {\n root: this.serializeRoute(routerState.root),\n url: routerState.url\n };\n }\n serializeRoute(route) {\n const children = route.children.map(c => this.serializeRoute(c));\n return {\n params: route.params,\n data: route.data,\n url: route.url,\n outlet: route.outlet,\n title: route.title,\n routeConfig: route.routeConfig ? {\n path: route.routeConfig.path,\n pathMatch: route.routeConfig.pathMatch,\n redirectTo: route.routeConfig.redirectTo,\n outlet: route.routeConfig.outlet,\n title: typeof route.routeConfig.title === 'string' ? route.routeConfig.title : undefined\n } : null,\n queryParams: route.queryParams,\n fragment: route.fragment,\n firstChild: children[0],\n children\n };\n }\n}\nvar NavigationActionTiming = /*#__PURE__*/function (NavigationActionTiming) {\n NavigationActionTiming[NavigationActionTiming[\"PreActivation\"] = 1] = \"PreActivation\";\n NavigationActionTiming[NavigationActionTiming[\"PostActivation\"] = 2] = \"PostActivation\";\n return NavigationActionTiming;\n}(NavigationActionTiming || {});\nconst DEFAULT_ROUTER_FEATURENAME = 'router';\nconst _ROUTER_CONFIG = new InjectionToken('@ngrx/router-store Internal Configuration');\nconst ROUTER_CONFIG = new InjectionToken('@ngrx/router-store Configuration');\nfunction _createRouterConfig(config) {\n return {\n stateKey: DEFAULT_ROUTER_FEATURENAME,\n serializer: MinimalRouterStateSerializer,\n navigationActionTiming: NavigationActionTiming.PreActivation,\n ...config\n };\n}\nclass FullRouterStateSerializer {\n serialize(routerState) {\n return {\n root: this.serializeRoute(routerState.root),\n url: routerState.url\n };\n }\n serializeRoute(route) {\n const children = route.children.map(c => this.serializeRoute(c));\n return {\n params: route.params,\n paramMap: route.paramMap,\n data: route.data,\n url: route.url,\n outlet: route.outlet,\n title: route.title,\n routeConfig: route.routeConfig ? {\n component: route.routeConfig.component,\n path: route.routeConfig.path,\n pathMatch: route.routeConfig.pathMatch,\n redirectTo: route.routeConfig.redirectTo,\n outlet: route.routeConfig.outlet,\n title: route.routeConfig.title\n } : null,\n queryParams: route.queryParams,\n queryParamMap: route.queryParamMap,\n fragment: route.fragment,\n component: route.routeConfig ? route.routeConfig.component : undefined,\n root: undefined,\n parent: undefined,\n firstChild: children[0],\n pathFromRoot: undefined,\n children\n };\n }\n}\nclass RouterStateSerializer {}\nvar RouterTrigger = /*#__PURE__*/function (RouterTrigger) {\n RouterTrigger[RouterTrigger[\"NONE\"] = 1] = \"NONE\";\n RouterTrigger[RouterTrigger[\"ROUTER\"] = 2] = \"ROUTER\";\n RouterTrigger[RouterTrigger[\"STORE\"] = 3] = \"STORE\";\n return RouterTrigger;\n}(RouterTrigger || {});\n/**\n * Shared router initialization logic used alongside both the StoreRouterConnectingModule and the provideRouterStore\n * function\n */\nlet StoreRouterConnectingService = /*#__PURE__*/(() => {\n class StoreRouterConnectingService {\n constructor(store, router, serializer, errorHandler, config, activeRuntimeChecks) {\n this.store = store;\n this.router = router;\n this.serializer = serializer;\n this.errorHandler = errorHandler;\n this.config = config;\n this.activeRuntimeChecks = activeRuntimeChecks;\n this.lastEvent = null;\n this.routerState = null;\n this.trigger = RouterTrigger.NONE;\n this.stateKey = this.config.stateKey;\n if (!isNgrxMockEnvironment() && isDevMode() && (activeRuntimeChecks?.strictActionSerializability || activeRuntimeChecks?.strictStateSerializability) && this.serializer instanceof FullRouterStateSerializer) {\n console.warn('@ngrx/router-store: The serializability runtime checks cannot be enabled ' + 'with the FullRouterStateSerializer. The FullRouterStateSerializer ' + 'has an unserializable router state and actions that are not serializable. ' + 'To use the serializability runtime checks either use ' + 'the MinimalRouterStateSerializer or implement a custom router state serializer.');\n }\n this.setUpStoreStateListener();\n this.setUpRouterEventsListener();\n }\n setUpStoreStateListener() {\n this.store.pipe(select(this.stateKey), withLatestFrom(this.store)).subscribe(([routerStoreState, storeState]) => {\n this.navigateIfNeeded(routerStoreState, storeState);\n });\n }\n navigateIfNeeded(routerStoreState, storeState) {\n if (!routerStoreState || !routerStoreState.state) {\n return;\n }\n if (this.trigger === RouterTrigger.ROUTER) {\n return;\n }\n if (this.lastEvent instanceof NavigationStart) {\n return;\n }\n const url = routerStoreState.state.url;\n if (!isSameUrl(this.router.url, url)) {\n this.storeState = storeState;\n this.trigger = RouterTrigger.STORE;\n this.router.navigateByUrl(url).catch(error => {\n this.errorHandler.handleError(error);\n });\n }\n }\n setUpRouterEventsListener() {\n const dispatchNavLate = this.config.navigationActionTiming === NavigationActionTiming.PostActivation;\n let routesRecognized;\n this.router.events.pipe(withLatestFrom(this.store)).subscribe(([event, storeState]) => {\n this.lastEvent = event;\n if (event instanceof NavigationStart) {\n this.routerState = this.serializer.serialize(this.router.routerState.snapshot);\n if (this.trigger !== RouterTrigger.STORE) {\n this.storeState = storeState;\n this.dispatchRouterRequest(event);\n }\n } else if (event instanceof RoutesRecognized) {\n routesRecognized = event;\n if (!dispatchNavLate && this.trigger !== RouterTrigger.STORE) {\n this.dispatchRouterNavigation(event);\n }\n } else if (event instanceof NavigationCancel) {\n this.dispatchRouterCancel(event);\n this.reset();\n } else if (event instanceof NavigationError) {\n this.dispatchRouterError(event);\n this.reset();\n } else if (event instanceof NavigationEnd) {\n if (this.trigger !== RouterTrigger.STORE) {\n if (dispatchNavLate) {\n this.dispatchRouterNavigation(routesRecognized);\n }\n this.dispatchRouterNavigated(event);\n }\n this.reset();\n }\n });\n }\n dispatchRouterRequest(event) {\n this.dispatchRouterAction(ROUTER_REQUEST, {\n event\n });\n }\n dispatchRouterNavigation(lastRoutesRecognized) {\n const nextRouterState = this.serializer.serialize(lastRoutesRecognized.state);\n this.dispatchRouterAction(ROUTER_NAVIGATION, {\n routerState: nextRouterState,\n event: new RoutesRecognized(lastRoutesRecognized.id, lastRoutesRecognized.url, lastRoutesRecognized.urlAfterRedirects, nextRouterState)\n });\n }\n dispatchRouterCancel(event) {\n this.dispatchRouterAction(ROUTER_CANCEL, {\n storeState: this.storeState,\n event\n });\n }\n dispatchRouterError(event) {\n this.dispatchRouterAction(ROUTER_ERROR, {\n storeState: this.storeState,\n event: new NavigationError(event.id, event.url, `${event}`)\n });\n }\n dispatchRouterNavigated(event) {\n const routerState = this.serializer.serialize(this.router.routerState.snapshot);\n this.dispatchRouterAction(ROUTER_NAVIGATED, {\n event,\n routerState\n });\n }\n dispatchRouterAction(type, payload) {\n this.trigger = RouterTrigger.ROUTER;\n try {\n this.store.dispatch({\n type,\n payload: {\n routerState: this.routerState,\n ...payload,\n event: this.config.routerState === 0 /* RouterState.Full */ ? payload.event : {\n id: payload.event.id,\n url: payload.event.url,\n // safe, as it will just be `undefined` for non-NavigationEnd router events\n urlAfterRedirects: payload.event.urlAfterRedirects\n }\n }\n });\n } finally {\n this.trigger = RouterTrigger.NONE;\n }\n }\n reset() {\n this.trigger = RouterTrigger.NONE;\n this.storeState = null;\n this.routerState = null;\n }\n /** @nocollapse */\n static {\n this.ɵfac = function StoreRouterConnectingService_Factory(t) {\n return new (t || StoreRouterConnectingService)(i0.ɵɵinject(i1.Store), i0.ɵɵinject(i2.Router), i0.ɵɵinject(RouterStateSerializer), i0.ɵɵinject(i0.ErrorHandler), i0.ɵɵinject(ROUTER_CONFIG), i0.ɵɵinject(ACTIVE_RUNTIME_CHECKS));\n };\n }\n /** @nocollapse */\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StoreRouterConnectingService,\n factory: StoreRouterConnectingService.ɵfac\n });\n }\n }\n return StoreRouterConnectingService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Check if the URLs are matching. Accounts for the possibility of trailing \"/\" in url.\n */\nfunction isSameUrl(first, second) {\n return stripTrailingSlash(first) === stripTrailingSlash(second);\n}\nfunction stripTrailingSlash(text) {\n if (text?.length > 0 && text[text.length - 1] === '/') {\n return text.substring(0, text.length - 1);\n }\n return text;\n}\n\n/**\n * Connects the Angular Router to the Store.\n *\n * @usageNotes\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideStore({ router: routerReducer }),\n * provideRouterStore(),\n * ],\n * });\n * ```\n */\nfunction provideRouterStore(config = {}) {\n return makeEnvironmentProviders([{\n provide: _ROUTER_CONFIG,\n useValue: config\n }, {\n provide: ROUTER_CONFIG,\n useFactory: _createRouterConfig,\n deps: [_ROUTER_CONFIG]\n }, {\n provide: RouterStateSerializer,\n useClass: config.serializer ? config.serializer : config.routerState === 0 /* RouterState.Full */ ? FullRouterStateSerializer : MinimalRouterStateSerializer\n }, {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory() {\n return () => inject(StoreRouterConnectingService);\n }\n }, StoreRouterConnectingService]);\n}\n\n/**\n * Connects RouterModule with StoreModule.\n *\n * During the navigation, before any guards or resolvers run, the router will dispatch\n * a ROUTER_NAVIGATION action, which has the following signature:\n *\n * ```\n * export type RouterNavigationPayload = {\n * routerState: SerializedRouterStateSnapshot,\n * event: RoutesRecognized\n * }\n * ```\n *\n * Either a reducer or an effect can be invoked in response to this action.\n * If the invoked reducer throws, the navigation will be canceled.\n *\n * If navigation gets canceled because of a guard, a ROUTER_CANCEL action will be\n * dispatched. If navigation results in an error, a ROUTER_ERROR action will be dispatched.\n *\n * Both ROUTER_CANCEL and ROUTER_ERROR contain the store state before the navigation\n * which can be used to restore the consistency of the store.\n *\n * Usage:\n *\n * ```typescript\n * @NgModule({\n * declarations: [AppCmp, SimpleCmp],\n * imports: [\n * BrowserModule,\n * StoreModule.forRoot(mapOfReducers),\n * RouterModule.forRoot([\n * { path: '', component: SimpleCmp },\n * { path: 'next', component: SimpleCmp }\n * ]),\n * StoreRouterConnectingModule.forRoot()\n * ],\n * bootstrap: [AppCmp]\n * })\n * export class AppModule {\n * }\n * ```\n */\nlet StoreRouterConnectingModule = /*#__PURE__*/(() => {\n class StoreRouterConnectingModule {\n static forRoot(config = {}) {\n return {\n ngModule: StoreRouterConnectingModule,\n providers: [provideRouterStore(config)]\n };\n }\n /** @nocollapse */\n static {\n this.ɵfac = function StoreRouterConnectingModule_Factory(t) {\n return new (t || StoreRouterConnectingModule)();\n };\n }\n /** @nocollapse */\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: StoreRouterConnectingModule\n });\n }\n /** @nocollapse */\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n }\n return StoreRouterConnectingModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction createRouterSelector() {\n return createFeatureSelector(DEFAULT_ROUTER_FEATURENAME);\n}\nfunction getRouterSelectors(selectState = createRouterSelector()) {\n const selectRouterState = createSelector(selectState, router => router && router.state);\n const selectRootRoute = createSelector(selectRouterState, routerState => routerState && routerState.root);\n const selectCurrentRoute = createSelector(selectRootRoute, rootRoute => {\n if (!rootRoute) {\n return undefined;\n }\n let route = rootRoute;\n while (route.firstChild) {\n route = route.firstChild;\n }\n return route;\n });\n const selectFragment = createSelector(selectRootRoute, route => route && route.fragment);\n const selectQueryParams = createSelector(selectRootRoute, route => route && route.queryParams);\n const selectQueryParam = param => createSelector(selectQueryParams, params => params && params[param]);\n const selectRouteParams = createSelector(selectCurrentRoute, route => route && route.params);\n const selectRouteParam = param => createSelector(selectRouteParams, params => params && params[param]);\n const selectRouteData = createSelector(selectCurrentRoute, route => route && route.data);\n const selectRouteDataParam = param => createSelector(selectRouteData, data => data && data[param]);\n const selectUrl = createSelector(selectRouterState, routerState => routerState && routerState.url);\n const selectTitle = createSelector(selectCurrentRoute, route => {\n if (!route?.routeConfig) {\n return undefined;\n }\n return typeof route.routeConfig.title === 'string' ? route.routeConfig.title // static title\n : route.title; // resolved title\n });\n return {\n selectCurrentRoute,\n selectFragment,\n selectQueryParams,\n selectQueryParam,\n selectRouteParams,\n selectRouteParam,\n selectRouteData,\n selectRouteDataParam,\n selectUrl,\n selectTitle\n };\n}\n\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DEFAULT_ROUTER_FEATURENAME, FullRouterStateSerializer, MinimalRouterStateSerializer, NavigationActionTiming, ROUTER_CANCEL, ROUTER_CONFIG, ROUTER_ERROR, ROUTER_NAVIGATED, ROUTER_NAVIGATION, ROUTER_REQUEST, RouterStateSerializer, StoreRouterConnectingModule, createRouterSelector, getRouterSelectors, provideRouterStore, routerCancelAction, routerErrorAction, routerNavigatedAction, routerNavigationAction, routerReducer, routerRequestAction };\n","import { createSelector } from '@ngrx/store';\r\nimport { AppState } from 'src/store/appstate';\r\n\r\nconst selectMutations = (state: AppState) => state.mutations;\r\n\r\nexport const selectMutationByOperationId = (operationId: string) =>\r\n createSelector(selectMutations, (mutations) => mutations.get(operationId));\r\n","import { Injectable } from '@angular/core';\r\nimport { SeverityLevel } from '@microsoft/applicationinsights-web';\r\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\r\nimport { Store } from '@ngrx/store';\r\nimport { Observable } from 'rxjs';\r\nimport { distinctUntilChanged, filter, map, switchMap, tap } from 'rxjs/operators';\r\nimport { Logger } from 'src/app/shared/tcs-logging/logger';\r\nimport { AppInsightsService } from 'src/lib/tcs-app-insights/app-insights-initializer.service';\r\nimport { createSafeProps } from 'src/lib/tcs-app-insights/app-insights-util';\r\nimport { NewRelicService } from 'src/lib/tcs-new-relic/new-relic-initializer.service';\r\nimport { AppState } from 'src/store/appstate';\r\nimport { reviveUnsafe } from 'src/store/generated/record-reviver.generated';\r\nimport { selectMutationByOperationId } from 'src/store/mutations/mutation-selectors';\r\nimport * as PubnubStoreActions from 'src/store/pubnub/pubnub-store.actions';\r\nimport { StoreService } from 'src/store/store.service';\r\nimport {\r\n EntitiesReceived,\r\n EntitySnapshot,\r\n EntitySnapshotCollection,\r\n EntitySnapshotDto,\r\n} from 'src/util/entity-store/entity-store.actions';\r\nimport * as MutationActions from 'src/util/graphql/mutation-actions';\r\nimport { MutationEffect, MutationSuccess } from 'src/util/graphql/mutation-actions';\r\nimport { filterNull } from 'src/util/rxjs/operators/filter-null';\r\n\r\nexport function parseOperationId(activityId: string) {\r\n const pipeIndex = activityId.indexOf('|');\r\n\r\n const withoutPrefix = pipeIndex > 0 ? activityId.substring(pipeIndex + 1) : activityId;\r\n\r\n const dotIndex = withoutPrefix.indexOf('.');\r\n const operationId = dotIndex > 0 ? withoutPrefix.substring(0, dotIndex) : withoutPrefix;\r\n\r\n return operationId;\r\n}\r\n\r\nconst effectTimeoutDuration = 5000;\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class PubnubEntityStoreEffects {\r\n public corruptEffects$: Observable = createEffect(\r\n () =>\r\n this._actions$.pipe(\r\n ofType(MutationActions.MUTATION_REQUEST),\r\n switchMap((request) =>\r\n this._store.select(selectMutationByOperationId(request.operationId)),\r\n ),\r\n filter((mutation) => mutation != null && mutation.isError && mutation.hasEffect),\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n map((m) => m!),\r\n tap((mutation) => {\r\n if (this._appInsightsService.appInsights != null) {\r\n this._appInsightsService.appInsights?.trackException({\r\n exception: new Error('CorruptMutationEffect'),\r\n properties: {\r\n operationId: mutation.operationId,\r\n },\r\n severityLevel: SeverityLevel.Error,\r\n });\r\n }\r\n\r\n this._newRelicService.newRelic?.noticeError(new Error('CorruptMutationEffect'), {\r\n operationId: mutation.operationId,\r\n severityLevel: SeverityLevel.Error,\r\n });\r\n }),\r\n ),\r\n { dispatch: false },\r\n );\r\n\r\n public mutationDurations$: Observable = createEffect(\r\n () =>\r\n this._actions$.pipe(\r\n ofType(MutationActions.MUTATION_REQUEST),\r\n switchMap((request) =>\r\n this._store.select(selectMutationByOperationId(request.operationId)),\r\n ),\r\n filterNull(),\r\n filter((mutation) => mutation.hasEffect),\r\n distinctUntilChanged((a, b) => a.operationId === b.operationId),\r\n tap((mutation) => {\r\n if (\r\n mutation != null &&\r\n mutation.effectDuration != null &&\r\n this._appInsightsService.appInsights != null\r\n ) {\r\n this._appInsightsService.appInsights.trackEvent({\r\n name: 'MutationEffectReceived',\r\n properties: createSafeProps({\r\n operationId: mutation.operationId,\r\n effectDuration: mutation.effectDuration,\r\n }),\r\n });\r\n }\r\n if (\r\n mutation != null &&\r\n mutation.effectDuration != null &&\r\n this._newRelicService.newRelic != null\r\n ) {\r\n this._newRelicService.newRelic?.addPageAction('MutationEffectReceived', {\r\n operationId: mutation.operationId,\r\n effectDuration: mutation.effectDuration,\r\n });\r\n }\r\n }),\r\n ),\r\n { dispatch: false },\r\n );\r\n\r\n public mutationEffects$: Observable = createEffect(() =>\r\n this._actions$.pipe(\r\n ofType(PubnubStoreActions.MESSAGE_RECIEVED),\r\n filter((a) => {\r\n const isEntitySnapsnot = a.message.message.type.includes('EntitySnapshot') === true;\r\n const activityId = a.message.message.head.activityId;\r\n return isEntitySnapsnot && activityId != null;\r\n }),\r\n map((a) => {\r\n const activityId = a.message.message.head.activityId as string;\r\n const operationId = parseOperationId(activityId);\r\n return new MutationEffect(operationId);\r\n }),\r\n ),\r\n );\r\n\r\n public mutationSuccessEntities$: Observable = createEffect(() =>\r\n this._actions$.pipe(\r\n ofType(MutationActions.MUTATION_SUCCESS),\r\n map((success) => {\r\n const logPrefix = 'PubnubEntityStoreEffects.mutationSuccessEntities$';\r\n const entityMap = success.result.entities;\r\n const snapshots: EntitySnapshot[] = [];\r\n if (entityMap != null) {\r\n Object.entries(entityMap).forEach(([type, entities]) => {\r\n entities.forEach((state) => {\r\n try {\r\n const [record, errors] = reviveUnsafe({ type, state });\r\n if (record == null) {\r\n throw new Error(`${logPrefix}: unable to revive record of type '${type}'`);\r\n }\r\n\r\n // Entities that are deleted don't return full state, so we expect some errors creating the record.\r\n // The record will be in an invalid state, but it's deleted so it's purged from the store\r\n // If it's not deleted, we should log these errors\r\n if (record.dateDeleted == null && errors.length > 0) {\r\n errors.forEach((e) => {\r\n this._log.error(\r\n `${logPrefix}: error reviving ${type} entity record: ${e}`,\r\n createSafeProps({\r\n state,\r\n mutation: success,\r\n operationId: success.operationId,\r\n }),\r\n );\r\n });\r\n }\r\n\r\n snapshots.push({ key: record.id, source: 'Fetched', state: record, type });\r\n } catch (err: any) {\r\n this._log.error(\r\n `${logPrefix}: Error serializing data to ${type}Record: ${err.message} (id: ${state.id})`,\r\n createSafeProps({\r\n state,\r\n mutation: success,\r\n operationId: success.operationId,\r\n }),\r\n );\r\n }\r\n });\r\n });\r\n if (snapshots.length > 0) {\r\n return new EntitiesReceived(snapshots, success.operationId);\r\n }\r\n }\r\n return undefined;\r\n }),\r\n filterNull(),\r\n ),\r\n );\r\n\r\n public statusUpdates$: Observable = createEffect(\r\n () =>\r\n this._actions$.pipe(\r\n ofType(PubnubStoreActions.STATUS_CHANGE),\r\n tap((a) => {\r\n this._appInsightsService.appInsights?.trackEvent({\r\n name: 'PubNub:StatusChange',\r\n properties: createSafeProps({\r\n ...a.status,\r\n category: a.status.category,\r\n }),\r\n });\r\n this._newRelicService.newRelic?.addPageAction('PubNub:StatusChange', {\r\n ...a.status,\r\n category: a.status.category,\r\n });\r\n }),\r\n ),\r\n { dispatch: false },\r\n );\r\n\r\n public entitySnapshots$: Observable = createEffect(\r\n () =>\r\n this._actions$.pipe(\r\n ofType(PubnubStoreActions.MESSAGE_RECIEVED),\r\n filter((a) => a.message.message.type === 'EntitySnapshot'),\r\n map((a) => a.getMessageBody()),\r\n tap((snapshot: EntitySnapshotDto) => {\r\n try {\r\n this._storeService.upsertFromPubNub([snapshot]);\r\n } catch (err: any) {\r\n this._log.error(`Error upserting EntitySnapshot: ${err.mssage}`);\r\n }\r\n }),\r\n ),\r\n { dispatch: false },\r\n );\r\n\r\n public entitySnapshotsCollections$: Observable = createEffect(\r\n () =>\r\n this._actions$.pipe(\r\n ofType(PubnubStoreActions.MESSAGE_RECIEVED),\r\n filter((a) => a.message.message.type === 'EntitySnapshotCollection'),\r\n tap((a) => {\r\n try {\r\n const collection = a.getMessageBody();\r\n const activityId = a.message.message.head.activityId as string;\r\n const operationId = parseOperationId(activityId);\r\n this._storeService.upsertFromPubNub(collection.entities);\r\n } catch (err) {}\r\n }),\r\n ),\r\n { dispatch: false },\r\n );\r\n\r\n constructor(\r\n private _actions$: Actions,\r\n private _store: Store,\r\n private _storeService: StoreService,\r\n private readonly _log: Logger,\r\n private _appInsightsService: AppInsightsService,\r\n private _newRelicService: NewRelicService,\r\n ) {}\r\n}\r\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\r\n\r\n@Component({\r\n templateUrl: 'four04-page.component.html',\r\n styleUrls: ['four04-page.component.css'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class Four04PageComponent {}\r\n","
\r\n
\r\n \r\n

Page Not Found

\r\n
The resource you are looking for does not exist.
\r\n
\r\n","import { Injectable } from '@angular/core';\r\nimport { Logger, LoggerOptions, LoggerOptionsService } from './logger';\r\n\r\n/* eslint-disable no-console */\r\n@Injectable()\r\nexport class ConsoleLogger implements Logger {\r\n constructor(private _optionsManager: LoggerOptionsService) {}\r\n\r\n public error(\r\n error: Error | string,\r\n properties?: { [name: string]: string },\r\n options?: LoggerOptions,\r\n ) {\r\n if (this._optionsManager.canLogToConsole(options)) {\r\n if (properties != null) {\r\n console.error(error, properties);\r\n } else {\r\n console.error(error);\r\n }\r\n }\r\n }\r\n public info(message: string, properties?: { [name: string]: string }, options?: LoggerOptions) {\r\n if (this._optionsManager.canLogToConsole(options)) {\r\n if (properties != null) {\r\n console.info(message, properties);\r\n } else {\r\n console.info(message);\r\n }\r\n }\r\n }\r\n public warning(\r\n message: string,\r\n properties?: { [name: string]: string },\r\n options?: LoggerOptions,\r\n ) {\r\n if (this._optionsManager.canLogToConsole(options)) {\r\n /* eslint-disable-next-line */\r\n if (properties != null) {\r\n console.warn(message, properties);\r\n } else {\r\n console.warn(message);\r\n }\r\n }\r\n }\r\n}\r\n","import { ErrorHandler, Injectable, Injector } from '@angular/core';\r\nimport { Logger } from './logger';\r\n\r\n@Injectable()\r\nexport class LoggingErrorHandler implements ErrorHandler {\r\n private _loggerVal?: Logger;\r\n\r\n private get logger() {\r\n if (this._loggerVal != null) {\r\n return this._loggerVal;\r\n }\r\n this._loggerVal = this._injector.get(Logger);\r\n return this._loggerVal;\r\n }\r\n constructor(private readonly _injector: Injector) {}\r\n public handleError(error: any): void {\r\n if (this.logger != null) {\r\n this.logger.error(error);\r\n }\r\n }\r\n}\r\n","import { Inject, Injectable, InjectionToken } from '@angular/core';\r\nimport { Logger, LoggerOptions } from './logger';\r\n\r\nexport const LOGGING_ADAPTERS = new InjectionToken('Logger');\r\n@Injectable()\r\nexport class MultiLogger implements Logger {\r\n constructor(@Inject(LOGGING_ADAPTERS) private _loggers: Logger[]) {}\r\n\r\n public error(\r\n error: Error | string,\r\n properties?: { [name: string]: string },\r\n options?: LoggerOptions,\r\n ) {\r\n this._loggers.forEach((l) => {\r\n l.error(error, properties, options);\r\n });\r\n }\r\n\r\n public warning(\r\n message: string,\r\n properties?: { [name: string]: string },\r\n options?: LoggerOptions,\r\n ) {\r\n this._loggers.forEach((l) => {\r\n l.warning(message, properties, options);\r\n });\r\n }\r\n\r\n public info(message: string, properties?: { [name: string]: string }, options?: LoggerOptions) {\r\n this._loggers.forEach((l) => {\r\n l.info(message, properties, options);\r\n });\r\n }\r\n}\r\n","import { Action } from '@ngrx/store';\r\n\r\nexport const INFORMATION = '[Logger] INFORMATION';\r\nexport const ERROR = '[Logger] ERROR';\r\nexport const WARNING = '[Logger] WARNING';\r\n\r\nexport class InformationLogEntry implements Action {\r\n public readonly type = INFORMATION;\r\n constructor(\r\n public readonly message: string,\r\n public readonly properties?: { [name: string]: string },\r\n ) {}\r\n}\r\n\r\nexport class WarningLogEntry implements Action {\r\n public readonly type = WARNING;\r\n constructor(\r\n public readonly message: string,\r\n public readonly properties?: { [name: string]: string },\r\n ) {}\r\n}\r\n\r\nexport class ErrorLogEntry implements Action {\r\n public readonly type = ERROR;\r\n public readonly error: Record;\r\n constructor(error: Error | string, public readonly properties?: { [name: string]: string }) {\r\n // Make error friendly for redux\r\n let errorObj: Record | undefined;\r\n try {\r\n errorObj = JSON.parse(\r\n error instanceof Error\r\n ? JSON.stringify(error, Object.getOwnPropertyNames(error), 2)\r\n : error,\r\n );\r\n } catch (er) {\r\n try {\r\n errorObj =\r\n typeof error === 'string'\r\n ? { message: error }\r\n : {\r\n name: error.name,\r\n message: error.message,\r\n };\r\n } catch (err) {}\r\n }\r\n this.error = errorObj ?? { message: 'error serializing error for redux store' };\r\n }\r\n}\r\n\r\nexport type All = InformationLogEntry | WarningLogEntry | ErrorLogEntry;\r\n","import { Injectable } from '@angular/core';\r\nimport { Store } from '@ngrx/store';\r\nimport { AppState } from 'src/store/appstate';\r\nimport { Logger, LoggerOptions, LoggerOptionsService } from './logger';\r\nimport { ErrorLogEntry, InformationLogEntry, WarningLogEntry } from './ngrx-store-logger-actions';\r\n\r\n@Injectable()\r\nexport class NgrxStoreLogger implements Logger {\r\n constructor(private _store: Store, private _optionsManager: LoggerOptionsService) {}\r\n\r\n public error(\r\n error: Error | string,\r\n properties?: { [name: string]: string },\r\n options?: LoggerOptions,\r\n ) {\r\n if (this._optionsManager.canLogToNgrxStore(options)) {\r\n this._store.dispatch(new ErrorLogEntry(error, properties));\r\n }\r\n }\r\n public info(message: string, properties?: { [name: string]: string }, options?: LoggerOptions) {\r\n if (this._optionsManager.canLogToNgrxStore(options)) {\r\n this._store.dispatch(new InformationLogEntry(message, properties));\r\n }\r\n }\r\n public warning(\r\n message: string,\r\n properties?: { [name: string]: string },\r\n options?: LoggerOptions,\r\n ) {\r\n if (this._optionsManager.canLogToNgrxStore(options)) {\r\n this._store.dispatch(new WarningLogEntry(message, properties));\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { createSafeProps } from 'src/lib/tcs-app-insights/app-insights-util';\r\nimport { Logger, LoggerOptions } from './logger';\r\nimport { AppInsightsLogger } from './app-insights-logger';\r\nimport { CacheLoggerCacheService, LogType } from './cache-logger-cache.service';\r\nimport { NewRelicLogger } from './new-relic-logger';\r\n\r\n/* eslint-disable no-console */\r\n@Injectable()\r\nexport class CacheLogger implements Logger {\r\n constructor(\r\n private _insightsLogger: AppInsightsLogger,\r\n private _newRelicLogger: NewRelicLogger,\r\n private _cacheService: CacheLoggerCacheService,\r\n ) {}\r\n\r\n public info(message: string, properties?: { [name: string]: string }, options?: LoggerOptions) {\r\n this._cacheService.cacheItem(LogType.Information, message, properties, options);\r\n }\r\n\r\n public warning(\r\n message: string,\r\n properties?: { [name: string]: string },\r\n options?: LoggerOptions,\r\n ) {\r\n this._cacheService.cacheItem(LogType.Warning, message, properties, options);\r\n }\r\n\r\n public error(\r\n error: Error | string,\r\n properties?: { [name: string]: string },\r\n options?: LoggerOptions,\r\n ) {\r\n let errorStr: string;\r\n try {\r\n errorStr =\r\n typeof error === 'string'\r\n ? error\r\n : JSON.stringify(error, Object.getOwnPropertyNames(error));\r\n } catch (err: any) {\r\n errorStr = 'error serializing error for cache-logger';\r\n this._insightsLogger.error(errorStr, createSafeProps({ error: err }));\r\n this._newRelicLogger.error(errorStr, createSafeProps({ error: err }));\r\n }\r\n this._cacheService.cacheItem(LogType.Error, errorStr, properties, options);\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { ErrorHandler, NgModule } from '@angular/core';\r\nimport { AppInsightsLogger } from './app-insights-logger';\r\nimport { ConsoleLogger } from './console-logger';\r\nimport { Logger } from './logger';\r\nimport { LoggingErrorHandler } from './logging-error-handler';\r\nimport { LOGGING_ADAPTERS, MultiLogger } from './multi-logger';\r\nimport { NgrxStoreLogger } from './ngrx-store-logger';\r\nimport { CacheLogger } from './cache-logger';\r\nimport { NewRelicLogger } from './new-relic-logger';\r\n\r\n@NgModule({\r\n imports: [CommonModule],\r\n declarations: [],\r\n providers: [\r\n { provide: LOGGING_ADAPTERS, useClass: AppInsightsLogger, multi: true },\r\n { provide: LOGGING_ADAPTERS, useClass: NgrxStoreLogger, multi: true },\r\n { provide: LOGGING_ADAPTERS, useClass: ConsoleLogger, multi: true },\r\n { provide: LOGGING_ADAPTERS, useClass: CacheLogger, multi: true },\r\n { provide: LOGGING_ADAPTERS, useClass: NewRelicLogger, multi: true },\r\n { provide: Logger, useClass: MultiLogger },\r\n { provide: ErrorHandler, useClass: LoggingErrorHandler },\r\n AppInsightsLogger,\r\n NewRelicLogger,\r\n ],\r\n})\r\nexport class TcsLoggingModule {}\r\n","import { HttpEvent, HttpHandler, HttpRequest } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { ImpersonationService } from './impersonation.service';\r\n\r\n@Injectable()\r\nexport class ImpersonationInterceptor {\r\n constructor(private _impersonation: ImpersonationService) {}\r\n\r\n public intercept(req: HttpRequest, next: HttpHandler): Observable> {\r\n const impersonatedUserId = this._impersonation.impersonatedUserId;\r\n if (impersonatedUserId != null) {\r\n req = req.clone({\r\n setHeaders: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n 'x-user-id': impersonatedUserId,\r\n },\r\n });\r\n }\r\n return next.handle(req);\r\n }\r\n}\r\n","import { FactoryProvider } from '@angular/core';\r\nimport { OKTA_CONFIG, OktaConfig } from '@okta/okta-angular';\r\nimport { OktaAuth, OktaAuthOptions } from '@okta/okta-auth-js';\r\nimport { TcsConfigurationService } from 'src/app/core/configuration.service';\r\n\r\nexport function oktaConfigFactory(tcsConfigurationService: TcsConfigurationService): OktaConfig {\r\n const config = tcsConfigurationService.value;\r\n const oktaRedirect =\r\n window.location.protocol + '//' + window.location.host + '/implicit/callback';\r\n const issuer = `${config.okta.tenantUrl}/oauth2/default`;\r\n\r\n const oktaConfig: OktaAuthOptions = {\r\n issuer,\r\n scopes: ['email', 'openid'],\r\n clientId: config.okta.clientId,\r\n redirectUri: oktaRedirect,\r\n };\r\n\r\n return { oktaAuth: new OktaAuth(oktaConfig) };\r\n}\r\n\r\nexport const oktaConfigProvider: FactoryProvider = {\r\n provide: OKTA_CONFIG,\r\n useFactory: oktaConfigFactory,\r\n deps: [TcsConfigurationService],\r\n};\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n Inject,\r\n Injector,\r\n OnDestroy,\r\n OnInit,\r\n Optional,\r\n} from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { OKTA_AUTH, OKTA_CONFIG, OktaAuthStateService, OktaConfig } from '@okta/okta-angular';\r\nimport { OktaAuth } from '@okta/okta-auth-js';\r\nimport { ReplaySubject, Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { countdownInSeconds } from 'src/util/rxjs/observables';\r\n\r\nfunction log(msg: string, ...args: any[]) {\r\n if ((window as any).tcsDebug === true) {\r\n // eslint-disable-next-line no-console\r\n console.log(msg, ...(args ?? []));\r\n }\r\n}\r\n\r\nexport function perfTest(name: string, promise: Promise): Promise {\r\n log(`Executing (${name})...`);\r\n const start = performance.now();\r\n return promise.then((res) => {\r\n const diff = performance.now() - start;\r\n log(`Executed (${name}) in (${diff} ms)`);\r\n return res;\r\n });\r\n}\r\n\r\n@Component({\r\n selector: 'tcs-tcs-okta-callback',\r\n templateUrl: './tcs-okta-callback.component.html',\r\n styleUrls: ['./tcs-okta-callback.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class TcsOktaCallbackComponent implements OnInit, OnDestroy {\r\n public error: string;\r\n public redirectUri = '/';\r\n public loaderContext$ = new ReplaySubject<{ message: string }>(1);\r\n\r\n private _showMessageInSeconds = 6;\r\n private _autoRedirectInSeconds = 20;\r\n private _errorRedirectInSeconds = 1;\r\n private _clearInterval$ = new Subject();\r\n\r\n constructor(\r\n @Inject(OKTA_CONFIG) private oktaConfig: OktaConfig,\r\n @Inject(OKTA_AUTH) private _oktaAuth: OktaAuth,\r\n private _oktaState: OktaAuthStateService,\r\n private _router: Router,\r\n @Optional() private injector?: Injector,\r\n ) {\r\n try {\r\n // keep a copy of orginalUri, since after handleLoginRedirect() is called this function will return null.\r\n const uri = this._oktaAuth.getOriginalUri() ?? '/';\r\n if (!uri.includes('implicit/callback')) {\r\n this.redirectUri = uri;\r\n }\r\n } catch {}\r\n }\r\n\r\n public async ngOnInit() {\r\n try {\r\n this._createCountdownInterval({\r\n countdownFrom: this._autoRedirectInSeconds,\r\n displayMessageIn: this._showMessageInSeconds,\r\n });\r\n\r\n // Parse code or tokens from the URL, store tokens in the TokenManager, and redirect back to the originalUri\r\n await perfTest(\r\n 'TcsOktaCallbackComponent.handleLoginRedirect',\r\n this._oktaAuth.handleLoginRedirect(),\r\n );\r\n } catch (e: any) {\r\n // Callback from social IDP. Show custom login page to continue.\r\n if (this._oktaAuth.idx.isInteractionRequiredError(e) && this.injector != null) {\r\n const { onAuthResume, onAuthRequired } = this.oktaConfig;\r\n const callbackFn = onAuthResume ?? onAuthRequired;\r\n if (callbackFn != null) {\r\n callbackFn(this._oktaAuth, this.injector);\r\n return;\r\n }\r\n }\r\n\r\n this.error = e.toString();\r\n\r\n this._createCountdownInterval({\r\n countdownFrom: this._errorRedirectInSeconds,\r\n displayMessageIn: this._showMessageInSeconds,\r\n });\r\n\r\n // eslint-disable-next-line no-console\r\n console.error('TcsOktaCallbackComponent:', e);\r\n }\r\n }\r\n\r\n public ngOnDestroy() {\r\n this._clearInterval$.next(null);\r\n this._clearInterval$.complete();\r\n }\r\n\r\n private _createCountdownInterval({\r\n countdownFrom,\r\n displayMessageIn,\r\n }: {\r\n countdownFrom: number;\r\n displayMessageIn: number;\r\n }) {\r\n this._clearInterval$.next(null);\r\n countdownInSeconds(countdownFrom)\r\n .pipe(takeUntil(this._clearInterval$))\r\n .subscribe((cnt) => {\r\n if (cnt <= 0) {\r\n window.location.href = this.redirectUri;\r\n } else if (countdownFrom - cnt >= displayMessageIn) {\r\n this.loaderContext$.next({\r\n message: `Redirecting within... (${cnt.toString().padStart(2, '0')} sec)`,\r\n });\r\n }\r\n });\r\n }\r\n}\r\n","\r\n
\r\n

{{ error }}

\r\n
\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { TcsLoadUntilModule } from '../tcs-load-until/tcs-load-until.module';\r\nimport { TcsOktaCallbackComponent } from './components/tcs-okta-callback/tcs-okta-callback.component';\r\n\r\n@NgModule({\r\n declarations: [TcsOktaCallbackComponent],\r\n imports: [CommonModule, TcsLoadUntilModule],\r\n})\r\nexport class TcsIdentityModule {}\r\n","import { Action } from '@ngrx/store';\r\nimport { UserClaims } from '@okta/okta-auth-js';\r\nexport const TOKEN_LOADED = '[Auth] Token Loaded';\r\nexport const LOG_OUT = '[Auth] Log Out';\r\nexport const LOGGED_OUT = '[Auth] Logged Out';\r\n\r\nexport class TokenLoaded implements Action {\r\n public readonly type = TOKEN_LOADED;\r\n constructor(public readonly token: string, public readonly oktaClaims: UserClaims) {}\r\n}\r\n\r\nexport class LoggedOut implements Action {\r\n public readonly type = LOGGED_OUT;\r\n}\r\n\r\nexport class LogOut implements Action {\r\n public readonly type = LOG_OUT;\r\n}\r\n\r\nexport type All = LoggedOut | TokenLoaded | LogOut;\r\n","import { Injectable } from '@angular/core';\r\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\r\nimport { Observable } from 'rxjs';\r\nimport { filter, map, take, timeout } from 'rxjs/operators';\r\nimport { GetUserByEmailGQL } from 'src/graphql/generated/graphql.generated';\r\nimport { StoreService } from 'src/store/store.service';\r\nimport { isNullOrEmpty } from 'src/util/string';\r\nimport { networkTimeout } from 'src/util/rxjs/helper';\r\nimport { firstValueOrUndefined } from 'src/util/rxjs';\r\nimport * as AuthStoreActions from './auth-store.actions';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AuthStoreEffects {\r\n public token$: Observable = createEffect(\r\n () =>\r\n this._actions$.pipe(\r\n ofType(AuthStoreActions.TOKEN_LOADED),\r\n filter((action) => action.oktaClaims != null),\r\n map((action) => action.oktaClaims),\r\n map(async (claims) => {\r\n if (!isNullOrEmpty(claims.sub)) {\r\n const email = claims.sub;\r\n await firstValueOrUndefined(\r\n this._storeService\r\n .upsertEntitiesFromGraphQL(this._userGql, { email })\r\n .pipe(timeout(networkTimeout('AuthStore.AuthStoreEffects')), take(1)),\r\n );\r\n }\r\n }),\r\n ),\r\n { dispatch: false },\r\n );\r\n constructor(\r\n private _actions$: Actions,\r\n private _storeService: StoreService,\r\n private readonly _userGql: GetUserByEmailGQL,\r\n ) {}\r\n}\r\n","import { Record } from 'immutable';\r\nimport {\r\n MutationEffect,\r\n MutationError,\r\n MutationRequest,\r\n MutationSuccess,\r\n} from 'src/util/graphql/mutation-actions';\r\n\r\nexport class MutationStatus extends Record({\r\n request: null as any,\r\n success: null as any,\r\n effect: null as any,\r\n error: null as any,\r\n}) {\r\n public request: MutationRequest;\r\n public success: MutationSuccess | null;\r\n public error: MutationError | null;\r\n public effect: MutationEffect | null;\r\n\r\n get operationId() {\r\n return this.request.operationId;\r\n }\r\n\r\n get isSuccess() {\r\n return this.success != null;\r\n }\r\n\r\n get isError() {\r\n return this.error != null;\r\n }\r\n\r\n get isRequestComplete() {\r\n return this.isError || this.isSuccess;\r\n }\r\n\r\n get hasEffect() {\r\n return this.effect != null;\r\n }\r\n\r\n get effectTime() {\r\n return this.effect != null ? this.effect.timestamp : null;\r\n }\r\n\r\n get startTime() {\r\n return this.request.timestamp;\r\n }\r\n\r\n get effectDuration() {\r\n if (this.effectTime != null) {\r\n return this.effectTime - this.startTime;\r\n }\r\n return null;\r\n }\r\n\r\n constructor(request: MutationRequest) {\r\n super({ request });\r\n }\r\n}\r\n","import { Action, ActionReducer } from '@ngrx/store';\r\nimport { Map } from 'immutable';\r\nimport { MutationStatus } from 'src/store/mutations/mutation-state';\r\nimport * as MutationActions from 'src/util/graphql/mutation-actions';\r\n\r\ntype MutationAction = MutationActions.All;\r\ntype MutationState = Map;\r\n\r\nconst _mutationsReducer: ActionReducer = (\r\n state: MutationState = Map(),\r\n action: MutationAction,\r\n) => {\r\n switch (action.type) {\r\n case MutationActions.MUTATION_REQUEST: {\r\n return state.set(action.operationId, new MutationStatus(action));\r\n }\r\n case MutationActions.MUTATION_SUCCESS: {\r\n if (state.has(action.operationId)) {\r\n return state.updateIn([action.operationId, 'success'], () => action);\r\n }\r\n break;\r\n }\r\n case MutationActions.MUTATION_ERROR: {\r\n if (state.has(action.operationId)) {\r\n return state.updateIn([action.operationId, 'error'], () => action);\r\n }\r\n break;\r\n }\r\n case MutationActions.MUTATION_EFFECT: {\r\n if (state.has(action.operationId)) {\r\n return state.updateIn([action.operationId, 'effect'], () => action);\r\n }\r\n break;\r\n }\r\n }\r\n return state;\r\n};\r\n\r\nexport const mutationsReducer = _mutationsReducer as ActionReducer;\r\n","import { Action, ActionReducer } from '@ngrx/store';\r\nimport { Record } from 'immutable';\r\nimport { camelCase } from 'lodash-es';\r\nimport { Entity } from 'src/util/system-model/generated/traits/entity';\r\nimport * as EntityStoreActions from './entity-store.actions';\r\nimport { EntityMeta } from './entity-store.models';\r\n\r\ntype EntityAction = EntityStoreActions.All;\r\n\r\nfunction metaPath({ type, key }: { type: string; key: string }) {\r\n return [camelCase(type), 'meta', key];\r\n}\r\nfunction entityPath({ type, key }: { type: string; key: string }) {\r\n return [camelCase(type), 'entities', key];\r\n}\r\n\r\nexport type EntityReviver = ({\r\n state,\r\n type,\r\n}: {\r\n state: Entity;\r\n type: string;\r\n}) => Entity | undefined;\r\n\r\nexport function createEntityStoresReducer>(\r\n initialState: T,\r\n): ActionReducer {\r\n function reducer(state: T = initialState, action: EntityAction): T {\r\n switch (action.type) {\r\n case EntityStoreActions.ENTITIES_RECEIVED: {\r\n const result = state.withMutations((mutable) => {\r\n action.entities\r\n .filter((e) => e.source !== 'Removed')\r\n .forEach((changedOrAdded) => {\r\n const newState =\r\n changedOrAdded.source !== 'Removed' ? changedOrAdded.state : undefined;\r\n mutable.updateIn(entityPath(changedOrAdded), (oldState: Entity | undefined) => {\r\n if (\r\n oldState != null &&\r\n typeof oldState === 'object' &&\r\n 'dateLastUpdated' in oldState &&\r\n oldState.dateLastUpdated instanceof Date\r\n ) {\r\n const newStateNewer =\r\n newState == null\r\n ? false\r\n : oldState.dateLastUpdated.getTime() < newState.dateLastUpdated.getTime();\r\n if (!newStateNewer) {\r\n return oldState;\r\n }\r\n }\r\n return newState;\r\n });\r\n mutable.updateIn(metaPath(changedOrAdded), (meta) => {\r\n if (meta instanceof EntityMeta) {\r\n return meta.markAsLoaded();\r\n }\r\n return new EntityMeta().markAsLoaded();\r\n });\r\n });\r\n\r\n action.entities\r\n .filter((e) => e.source === 'Removed')\r\n .forEach((removed) => {\r\n mutable.removeIn(metaPath(removed));\r\n mutable.removeIn(entityPath(removed));\r\n });\r\n });\r\n return result;\r\n }\r\n case EntityStoreActions.FETCH_ENTITIES: {\r\n return state.withMutations((mutable) => {\r\n action.fetched.forEach((fetched) => {\r\n const { type, id } = fetched;\r\n mutable.updateIn([type, 'meta', id], (meta) => {\r\n if (meta instanceof EntityMeta) {\r\n return meta.markAsFetching();\r\n }\r\n return new EntityMeta().markAsFetching();\r\n });\r\n });\r\n });\r\n }\r\n default:\r\n return state;\r\n }\r\n }\r\n return reducer as ActionReducer;\r\n}\r\n","import { UserClaims } from '@okta/okta-auth-js';\r\nimport { Record } from 'immutable';\r\n\r\nexport class AuthStoreState extends Record({\r\n userId: null as string | null,\r\n token: null as string | null,\r\n oktaClaims: null as UserClaims | null,\r\n}) {\r\n public userId: string | null;\r\n public token: string | null;\r\n public oktaClaims: UserClaims | null;\r\n}\r\n","import { Action, ActionReducer } from '@ngrx/store';\r\nimport { cloneDeep } from 'lodash-es';\r\nimport * as AuthStoreActions from './auth-store.actions';\r\nimport { AuthStoreState } from './auth-store.model';\r\n\r\nconst initialState = new AuthStoreState();\r\nexport function reducer(\r\n state: AuthStoreState = initialState,\r\n action: AuthStoreActions.All,\r\n): AuthStoreState {\r\n switch (action.type) {\r\n case AuthStoreActions.TOKEN_LOADED: {\r\n return state.withMutations((s) => {\r\n s.token = action.token;\r\n const oktaClaims = cloneDeep(action.oktaClaims);\r\n Object.freeze(oktaClaims);\r\n s.oktaClaims = oktaClaims;\r\n });\r\n }\r\n case AuthStoreActions.LOGGED_OUT: {\r\n return initialState;\r\n }\r\n }\r\n return state;\r\n}\r\n\r\nexport const authReducer: ActionReducer = reducer as ActionReducer<\r\n AuthStoreState,\r\n Action\r\n>;\r\n","import { Action, ActionReducer } from '@ngrx/store';\r\nimport { List } from 'immutable';\r\nimport * as Pubnub from 'pubnub';\r\nimport * as PubnubActions from './pubnub-store.actions';\r\nimport { PubnubStoreState } from './pubnub-store.model';\r\n\r\nexport function reducer(\r\n state: PubnubStoreState = new PubnubStoreState(),\r\n action: PubnubActions.All,\r\n) {\r\n switch (action.type) {\r\n case PubnubActions.MESSAGE_RECIEVED: {\r\n return state.withMutations((s) => {\r\n s.message = action.message;\r\n });\r\n }\r\n case PubnubActions.STATUS_CHANGE: {\r\n return state.withMutations((s) => {\r\n const status = action.status;\r\n s.status = status;\r\n switch (status.category) {\r\n case Pubnub.CATEGORIES.PNConnectedCategory: {\r\n if (status.subscribedChannels != null) {\r\n s.subscribedChannels = List(status.subscribedChannels);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n case PubnubActions.PRESENCE_CHANGE: {\r\n return state.withMutations((s) => {\r\n s.presence = action.presence;\r\n });\r\n }\r\n }\r\n return state;\r\n}\r\n\r\nexport const pubnubReducer: ActionReducer = reducer as ActionReducer<\r\n PubnubStoreState,\r\n Action\r\n>;\r\n","import { InjectionToken, Provider } from '@angular/core';\r\nimport { routerReducer, RouterReducerState } from '@ngrx/router-store';\r\nimport { Action, ActionReducer, ActionReducerMap } from '@ngrx/store';\r\nimport { mutationsReducer } from 'src/store/mutations/mutations-reducer';\r\nimport { createEntityStoresReducer } from 'src/util/entity-store/entity-store.reducer';\r\nimport { AppState } from './appstate';\r\nimport { authReducer } from './auth/auth-store.reducer';\r\nimport { EntityStores } from './generated/client-sync.generated';\r\nimport { pubnubReducer } from './pubnub/pubnub-store.reducer';\r\nimport { RouterStateUrl } from './router/router-store';\r\n\r\nconst routerReducerTypeAssertion: ActionReducer> = (\r\n state: RouterReducerState | undefined,\r\n action: Action,\r\n) =>\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n routerReducer(state!, action as any);\r\n\r\nexport function createReducers() {\r\n const reducers: ActionReducerMap = {\r\n entityStores: createEntityStoresReducer(new EntityStores()),\r\n pubnub: pubnubReducer,\r\n router: routerReducerTypeAssertion,\r\n mutations: mutationsReducer,\r\n auth: authReducer,\r\n };\r\n return reducers;\r\n}\r\n\r\nexport const reducerToken = new InjectionToken>('reducers');\r\n\r\nexport const reducerProvider: Provider = [{ provide: reducerToken, useFactory: createReducers }];\r\n","import { Injectable } from '@angular/core';\r\nimport { Params, RouterStateSnapshot } from '@angular/router';\r\nimport { RouterStateSerializer } from '@ngrx/router-store';\r\n\r\nexport interface RouterStateUrl {\r\n url: string;\r\n params: Params;\r\n queryParams: Params;\r\n}\r\n\r\n@Injectable()\r\nexport class CustomSerializer implements RouterStateSerializer {\r\n public serialize(routerState: RouterStateSnapshot): RouterStateUrl {\r\n let route = routerState.root;\r\n let params: any = { ...route.params };\r\n\r\n while (route.firstChild != null) {\r\n route = route.firstChild;\r\n params = {\r\n ...params,\r\n ...route.params,\r\n };\r\n }\r\n\r\n const {\r\n url,\r\n root: { queryParams },\r\n } = routerState;\r\n\r\n // Only return an object including the URL, params and query params\r\n // instead of the entire snapshot\r\n return { url, params, queryParams };\r\n }\r\n}\r\n","import {\r\n HttpErrorResponse,\r\n HttpEvent,\r\n HttpHandler,\r\n HttpInterceptor,\r\n HttpRequest,\r\n} from '@angular/common/http';\r\nimport { Injectable, OnDestroy } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { TdDialogService } from '@covalent/core/dialogs';\r\nimport { from, Observable, Subject, throwError } from 'rxjs';\r\nimport { catchError, map, switchMap, take, takeUntil } from 'rxjs/operators';\r\nimport { TcsConfigurationService } from 'src/app/core/configuration.service';\r\nimport { Logger } from 'src/app/shared/tcs-logging/logger';\r\nimport { AuthenticationService } from 'src/lib/tcs-identity/authentication.service';\r\nimport { firstValueOrUndefined } from 'src/util/rxjs';\r\nimport { createSafeProps } from '../tcs-app-insights/app-insights-util';\r\n\r\nconst alertLogout = async (tdDialog: TdDialogService, title: string, message: string) => {\r\n const dialog = tdDialog.openAlert({\r\n title,\r\n disableClose: true,\r\n message,\r\n closeButton: 'Logout',\r\n });\r\n return firstValueOrUndefined(dialog.afterClosed().pipe(take(1)));\r\n};\r\n\r\n@Injectable()\r\nexport class AuthenticationInterceptor implements HttpInterceptor, OnDestroy {\r\n private readonly _forbidden$ = new Subject();\r\n private readonly _unauthorized$ = new Subject>();\r\n private _onDestroy$ = new Subject();\r\n private _tcsGraphQLUrl: string;\r\n constructor(\r\n private _auth: AuthenticationService,\r\n private _tdDialog: TdDialogService,\r\n private _logger: Logger,\r\n private _config: TcsConfigurationService,\r\n private _router: Router,\r\n ) {\r\n this._tcsGraphQLUrl = _config.value.tcs.graphqlUri;\r\n this._unauthorized$\r\n .pipe(\r\n switchMap((req) =>\r\n this._auth.isAuthenticated$.pipe(\r\n map((isAuthenticatedCheck) => ({ req, isAuthenticatedCheck })),\r\n ),\r\n ),\r\n takeUntil(this._onDestroy$),\r\n )\r\n .subscribe(({ req, isAuthenticatedCheck }) => {\r\n _logger.info('Detected unauthorized request', {\r\n url: req.url,\r\n isAuthenticatedCheck: String(isAuthenticatedCheck),\r\n });\r\n if (!isAuthenticatedCheck) {\r\n this._auth.login({\r\n caller: 'AuthenticationInterceptor._unauthorized$',\r\n fromUri: window.location.href,\r\n });\r\n }\r\n });\r\n this._forbidden$.pipe(take(1), takeUntil(this._onDestroy$)).subscribe(async (errResponse) => {\r\n const idClaims = this._auth.idClaims;\r\n const accessClaims = this._auth.accessClaims;\r\n const username = accessClaims?.sub;\r\n const email = idClaims?.email;\r\n const errorMessage = errResponse.error?.message ?? errResponse.message;\r\n const userProps = createSafeProps({ email, username, accessClaims, idClaims });\r\n\r\n await this._router.navigate(['/unauthorized']);\r\n if (/access not enabled/i.test(errorMessage)) {\r\n this._logger.warning(\r\n `Access not enabled (email: ${email}, username: ${username})`,\r\n userProps,\r\n );\r\n await alertLogout(this._tdDialog, 'Access Not Enabled', errorMessage);\r\n } else {\r\n this._logger.warning(`User not found (email: ${email}, username: ${username})`, userProps);\r\n await alertLogout(\r\n this._tdDialog,\r\n 'User Not Found',\r\n `Authentication successful, but no user with the email \"${email}\" and username \"${username}\" has been granted access to this application. If you have used another username or email to access this application before, try logging out and logging in with that username or email instead.`,\r\n );\r\n }\r\n this._auth.logout({ caller: 'AuthenticationInterceptor._forbidden$' });\r\n });\r\n }\r\n public intercept(req: HttpRequest, next: HttpHandler): Observable> {\r\n return from(this._auth.getAccessToken()).pipe(\r\n switchMap((token) => {\r\n if (token != null) {\r\n req = req.clone({\r\n setHeaders: {\r\n Authorization: 'Bearer ' + token,\r\n },\r\n });\r\n }\r\n return next.handle(req);\r\n }),\r\n catchError((err) => {\r\n if (req.url.includes(this._tcsGraphQLUrl) && err instanceof HttpErrorResponse) {\r\n if (err.status === 401) {\r\n this._unauthorized$.next(req);\r\n } else if (err.status === 403) {\r\n this._forbidden$.next(err);\r\n } else if (err.status < 500) {\r\n this._logger.warning(\r\n `[AuthenticationInterceptor.catchError] Unknown graphQL error.`,\r\n createSafeProps(err),\r\n );\r\n }\r\n }\r\n return throwError(err);\r\n }),\r\n );\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this._onDestroy$.next(null);\r\n this._onDestroy$.complete();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\r\nimport { AppContextService } from './app-context.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AppContextResolver {\r\n constructor(private _contextService: AppContextService) {}\r\n\r\n public resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n this._contextService.setContext(route.data.context);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { PubnubService } from 'src/app/shared/pubnub/pubnub.service';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class PubnubListenerService {\r\n constructor(private readonly _pubnub: PubnubService) {}\r\n public resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable {\r\n return this._pubnub.subscribe(['entity-deletes', 'global'], {\r\n timeoutStrategy: 'silentlyContinue',\r\n });\r\n }\r\n}\r\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { AuthenticationService } from 'src/lib/tcs-identity/authentication.service';\r\n\r\n@Component({\r\n selector: 'tcs-logout-page',\r\n templateUrl: './logout-page.component.html',\r\n styleUrls: ['./logout-page.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class LogoutPageComponent implements OnInit {\r\n public isLoading$: Observable;\r\n constructor(private _router: Router, private _auth: AuthenticationService) {}\r\n public async ngOnInit() {\r\n await this._auth.logout({ caller: 'LogoutPageComponent' });\r\n await this._router.navigate(['']);\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { filter, map } from 'rxjs/operators';\r\nimport { isNullOrWhitespace } from 'src/util/string';\r\n\r\n@Component({\r\n selector: 'tcs-unauthorized-page',\r\n templateUrl: './unauthorized-page.component.html',\r\n styleUrls: ['./unauthorized-page.component.scss'],\r\n})\r\nexport class UnauthorizedPageComponent implements OnInit {\r\n public error$: Observable;\r\n\r\n constructor(private route: ActivatedRoute) {\r\n this.error$ = this.route.queryParams.pipe(\r\n filter((params) => params.error),\r\n map((params) => {\r\n if (!isNullOrWhitespace(params.error)) {\r\n return String(params.error);\r\n } else {\r\n return null;\r\n }\r\n }),\r\n );\r\n }\r\n\r\n public ngOnInit() {}\r\n}\r\n","

Unauthorized

\r\n
\r\n

\r\n You do not have any roles granted, please reach out to Comm supervisor for access.\r\n

\r\n

\r\n You do not have access or email address does not exist. Contact Comm Supervisor for permission.\r\n

\r\n
\r\n\r\n

The current user does not have access to the requested resource.

\r\n
\r\n","import { Injectable } from '@angular/core';\r\nimport { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\r\nimport { Store } from '@ngrx/store';\r\nimport { of } from 'rxjs';\r\nimport { switchMap } from 'rxjs/operators';\r\nimport { AppState } from 'src/store/appstate';\r\nimport { selectRouteParam } from 'src/store/router/router-selectors';\r\nimport { CompanyAuthorizationService } from '../company-authorization.service';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class CompanyCodeGuard {\r\n constructor(\r\n private _companyAuthService: CompanyAuthorizationService,\r\n private _store: Store,\r\n ) {}\r\n\r\n public canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n return this.checkCompanyCode();\r\n }\r\n\r\n public canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n return this.checkCompanyCode();\r\n }\r\n\r\n public checkCompanyCode() {\r\n return this._store.select(selectRouteParam('companyCode')).pipe(\r\n switchMap((companyCode) => {\r\n return companyCode == null\r\n ? of(true)\r\n : this._companyAuthService.isAuthorizedForCompany$({ companyCode });\r\n }),\r\n );\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { mapToCanActivate, RouterModule, Routes } from '@angular/router';\r\nimport { OktaAuthGuard } from '@okta/okta-angular';\r\nimport { AppContextResolver } from 'src/app/shared/app-context/app-context.resolver';\r\nimport { PubnubListenerService } from 'src/lib/pubnub-listener-service/pubnub-listener.service';\r\nimport { TcsOktaCallbackComponent } from 'src/lib/tcs-identity/components/tcs-okta-callback/tcs-okta-callback.component';\r\nimport { OpsSummariesSyncService } from 'src/lib/ops-summaries-sync-service/ops-summaries-sync.service';\r\nimport { LogoutPageComponent } from 'src/features/login/logout-page/logout-page.component';\r\nimport { UnauthorizedPageComponent } from './core/components/unauthorized-page/unauthorized-page.component';\r\nimport { GlobalDataContextService } from './global-data-context.service';\r\nimport { Four04PageComponent } from './pages/components/four04-page/four04-page.component';\r\nimport { AppContext } from './shared/app-context/app-context.service';\r\nimport {\r\n AuthorizationGuard,\r\n grantAccess,\r\n grantAccessDeep,\r\n} from './shared/authorization/authorization.guard';\r\nimport { TcsCustomPermission } from './shared/authorization/permissions';\r\nimport { CompanyCodeGuard } from './shared/client-sync/company-code.guard';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: 'logout',\r\n component: LogoutPageComponent,\r\n },\r\n {\r\n path: 'login',\r\n redirectTo: '',\r\n },\r\n {\r\n path: 'implicit/callback',\r\n component: TcsOktaCallbackComponent,\r\n },\r\n {\r\n path: 'unauthorized',\r\n component: UnauthorizedPageComponent,\r\n data: {\r\n title: 'Unauthorized',\r\n },\r\n },\r\n {\r\n path: '',\r\n canActivateChild: [AuthorizationGuard, OktaAuthGuard],\r\n children: [\r\n {\r\n path: '',\r\n resolve: {\r\n pubnub: PubnubListenerService,\r\n global: GlobalDataContextService,\r\n },\r\n children: [\r\n {\r\n path: '',\r\n loadChildren: () => import('src/app/home/home.module').then((m) => m.HomeModule),\r\n data: {\r\n ...grantAccess([\r\n TcsCustomPermission.ManageOperations,\r\n TcsCustomPermission.ManageOrg,\r\n TcsCustomPermission.AccessInsights,\r\n TcsCustomPermission.AccessPublicPages,\r\n TcsCustomPermission.ReadonlyOperations,\r\n ]),\r\n },\r\n },\r\n {\r\n path: 'devkit',\r\n loadChildren: () =>\r\n import('src/features/dev-kit/dev-kit.module').then((m) => m.DevKitModule),\r\n },\r\n {\r\n path: 'fleet-status',\r\n loadChildren: () =>\r\n import('src/features/fleet-status/fleet-status.module').then(\r\n (m) => m.FleetStatusModule,\r\n ),\r\n data: {\r\n authorizationStrategy: 'fleet-status',\r\n context: AppContext.FleetStatus,\r\n },\r\n resolve: {\r\n appContext: AppContextResolver,\r\n },\r\n },\r\n {\r\n path: 'admin',\r\n loadChildren: () => import('src/app/admin/admin.module').then((m) => m.AdminModule),\r\n },\r\n {\r\n path: 'rtt',\r\n loadChildren: () => import('src/app/rtt/rtt.module').then((m) => m.RttModule),\r\n data: {\r\n authorizationStrategy: 'rtt',\r\n context: AppContext.Rtt,\r\n },\r\n resolve: {\r\n appContext: AppContextResolver,\r\n },\r\n },\r\n {\r\n path: 'support',\r\n loadChildren: () =>\r\n import('src/app/support/support.module').then((m) => m.SupportModule),\r\n data: {\r\n authorizationStrategy: 'support',\r\n context: AppContext.Support,\r\n },\r\n resolve: {\r\n appContext: AppContextResolver,\r\n },\r\n },\r\n {\r\n path: ':companyCode',\r\n canActivate: mapToCanActivate([CompanyCodeGuard]),\r\n canActivateChild: [CompanyCodeGuard],\r\n children: [\r\n {\r\n path: 'org',\r\n data: {\r\n ...grantAccessDeep([TcsCustomPermission.ManageOrg]),\r\n context: AppContext.Org,\r\n },\r\n loadChildren: () => import('src/app/org/org.module').then((m) => m.OrgModule),\r\n resolve: {\r\n appContext: AppContextResolver,\r\n },\r\n },\r\n {\r\n path: 'ops',\r\n loadChildren: () => import('src/app/ops/ops.module').then((m) => m.OpsModule),\r\n data: {\r\n ...grantAccessDeep([\r\n TcsCustomPermission.ManageOperations,\r\n TcsCustomPermission.ReadonlyOperations,\r\n ]),\r\n context: AppContext.Ops,\r\n },\r\n resolve: {\r\n appContext: AppContextResolver,\r\n },\r\n },\r\n {\r\n path: 'insights',\r\n loadChildren: () =>\r\n import('src/app/insights/insights.module').then((m) => m.InsightsModule),\r\n data: {\r\n ...grantAccessDeep([TcsCustomPermission.AccessInsights]),\r\n context: AppContext.Insights,\r\n authorizationStrategy: 'insights',\r\n },\r\n resolve: {\r\n appContext: AppContextResolver,\r\n },\r\n },\r\n {\r\n path: 'asb',\r\n loadChildren: () => import('src/app/asb/asb.module').then((m) => m.AsbModule),\r\n data: {\r\n ...grantAccessDeep([TcsCustomPermission.AccessAsb]),\r\n context: AppContext.Asb,\r\n authorizationStrategy: 'asb',\r\n },\r\n resolve: {\r\n appContext: AppContextResolver,\r\n summaries: OpsSummariesSyncService,\r\n },\r\n },\r\n {\r\n path: 'oos-rum',\r\n loadChildren: () =>\r\n import('src/app/oos-rum/oos-rum.module').then((m) => m.OosRumModule),\r\n data: {\r\n ...grantAccessDeep([TcsCustomPermission.AccessOosRum]),\r\n context: AppContext.OosRum,\r\n authorizationStrategy: 'oos-rum',\r\n },\r\n resolve: {\r\n appContext: AppContextResolver,\r\n },\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n // Public Routes:\r\n {\r\n path: '',\r\n data: {\r\n ...grantAccessDeep([TcsCustomPermission.AccessPublicPages]),\r\n },\r\n children: [\r\n {\r\n path: '**',\r\n component: Four04PageComponent,\r\n data: { title: 'Not Found' },\r\n },\r\n ],\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n RouterModule.forRoot(routes, {\r\n onSameUrlNavigation: 'reload',\r\n }),\r\n ],\r\n exports: [RouterModule],\r\n})\r\nexport class AppRoutingModule {}\r\n","import { Injectable } from '@angular/core';\r\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\r\nimport { Observable } from 'rxjs';\r\nimport { filter, switchMap } from 'rxjs/operators';\r\nimport { OpsCommand } from 'src/app/shared/graphql/generated/operations-mutations.generated';\r\nimport { PollingService } from 'src/lib/tcs-polling-service/polling.service';\r\nimport { MUTATION_SUCCESS, MutationRequest } from 'src/util/graphql/mutation-actions';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class PassdownLogEffects {\r\n public fetchPassdownLogCountOnAcknowledge$: Observable = createEffect(\r\n () =>\r\n this._actions$.pipe(\r\n ofType(MUTATION_SUCCESS),\r\n filter(\r\n (m) =>\r\n m.name === OpsCommand.AcknowledgePassdownLog ||\r\n m.name === OpsCommand.AddPassdownLog ||\r\n m.name === OpsCommand.UpdatePassdownLog ||\r\n m.name === OpsCommand.DeletePassdownLog,\r\n ),\r\n switchMap(() => this._polling.fetch({ passdownLogs: { canFetch: true } })),\r\n ),\r\n { dispatch: false },\r\n );\r\n constructor(private _polling: PollingService, private _actions$: Actions) {}\r\n}\r\n","export function buildDelayFunction(delayOptions) {\n var _a = delayOptions || {},\n _b = _a.initial,\n initial = _b === void 0 ? 300 : _b,\n _c = _a.jitter,\n jitter = _c === void 0 ? true : _c,\n _d = _a.max,\n max = _d === void 0 ? Infinity : _d;\n var baseDelay = jitter ? initial : initial / 2;\n return function delayFunction(count) {\n var delay = Math.min(max, baseDelay * Math.pow(2, count));\n if (jitter) {\n delay = Math.random() * delay;\n }\n return delay;\n };\n}\n","export function buildRetryFunction(retryOptions) {\n var _a = retryOptions || {},\n retryIf = _a.retryIf,\n _b = _a.max,\n max = _b === void 0 ? 5 : _b;\n return function retryFunction(count, operation, error) {\n if (count >= max) return false;\n return retryIf ? retryIf(error, operation) : !!error;\n };\n}\n","import { __awaiter, __extends, __generator } from \"tslib\";\nimport { ApolloLink } from \"../core/index.js\";\nimport { Observable } from \"../../utilities/index.js\";\nimport { buildDelayFunction } from \"./delayFunction.js\";\nimport { buildRetryFunction } from \"./retryFunction.js\";\nvar RetryableOperation = function () {\n function RetryableOperation(operation, nextLink, delayFor, retryIf) {\n var _this = this;\n this.operation = operation;\n this.nextLink = nextLink;\n this.delayFor = delayFor;\n this.retryIf = retryIf;\n this.retryCount = 0;\n this.values = [];\n this.complete = false;\n this.canceled = false;\n this.observers = [];\n this.currentSubscription = null;\n this.onNext = function (value) {\n _this.values.push(value);\n for (var _i = 0, _a = _this.observers; _i < _a.length; _i++) {\n var observer = _a[_i];\n if (!observer) continue;\n observer.next(value);\n }\n };\n this.onComplete = function () {\n _this.complete = true;\n for (var _i = 0, _a = _this.observers; _i < _a.length; _i++) {\n var observer = _a[_i];\n if (!observer) continue;\n observer.complete();\n }\n };\n this.onError = function (error) {\n return __awaiter(_this, void 0, void 0, function () {\n var shouldRetry, _i, _a, observer;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n this.retryCount += 1;\n return [4, this.retryIf(this.retryCount, this.operation, error)];\n case 1:\n shouldRetry = _b.sent();\n if (shouldRetry) {\n this.scheduleRetry(this.delayFor(this.retryCount, this.operation, error));\n return [2];\n }\n this.error = error;\n for (_i = 0, _a = this.observers; _i < _a.length; _i++) {\n observer = _a[_i];\n if (!observer) continue;\n observer.error(error);\n }\n return [2];\n }\n });\n });\n };\n }\n RetryableOperation.prototype.subscribe = function (observer) {\n if (this.canceled) {\n throw new Error(\"Subscribing to a retryable link that was canceled is not supported\");\n }\n this.observers.push(observer);\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\n var value = _a[_i];\n observer.next(value);\n }\n if (this.complete) {\n observer.complete();\n } else if (this.error) {\n observer.error(this.error);\n }\n };\n RetryableOperation.prototype.unsubscribe = function (observer) {\n var index = this.observers.indexOf(observer);\n if (index < 0) {\n throw new Error(\"RetryLink BUG! Attempting to unsubscribe unknown observer!\");\n }\n this.observers[index] = null;\n if (this.observers.every(function (o) {\n return o === null;\n })) {\n this.cancel();\n }\n };\n RetryableOperation.prototype.start = function () {\n if (this.currentSubscription) return;\n this.try();\n };\n RetryableOperation.prototype.cancel = function () {\n if (this.currentSubscription) {\n this.currentSubscription.unsubscribe();\n }\n clearTimeout(this.timerId);\n this.timerId = undefined;\n this.currentSubscription = null;\n this.canceled = true;\n };\n RetryableOperation.prototype.try = function () {\n this.currentSubscription = this.nextLink(this.operation).subscribe({\n next: this.onNext,\n error: this.onError,\n complete: this.onComplete\n });\n };\n RetryableOperation.prototype.scheduleRetry = function (delay) {\n var _this = this;\n if (this.timerId) {\n throw new Error(\"RetryLink BUG! Encountered overlapping retries\");\n }\n this.timerId = setTimeout(function () {\n _this.timerId = undefined;\n _this.try();\n }, delay);\n };\n return RetryableOperation;\n}();\nvar RetryLink = function (_super) {\n __extends(RetryLink, _super);\n function RetryLink(options) {\n var _this = _super.call(this) || this;\n var _a = options || {},\n attempts = _a.attempts,\n delay = _a.delay;\n _this.delayFor = typeof delay === 'function' ? delay : buildDelayFunction(delay);\n _this.retryIf = typeof attempts === 'function' ? attempts : buildRetryFunction(attempts);\n return _this;\n }\n RetryLink.prototype.request = function (operation, nextLink) {\n var retryable = new RetryableOperation(operation, nextLink, this.delayFor, this.retryIf);\n retryable.start();\n return new Observable(function (observer) {\n retryable.subscribe(observer);\n return function () {\n retryable.unsubscribe(observer);\n };\n });\n };\n return RetryLink;\n}(ApolloLink);\nexport { RetryLink };\n","import { __extends } from \"tslib\";\nimport { Observable } from \"../../utilities/index.js\";\nimport { ApolloLink } from \"../core/index.js\";\nexport function onError(errorHandler) {\n return new ApolloLink(function (operation, forward) {\n return new Observable(function (observer) {\n var sub;\n var retriedSub;\n var retriedResult;\n try {\n sub = forward(operation).subscribe({\n next: function (result) {\n if (result.errors) {\n retriedResult = errorHandler({\n graphQLErrors: result.errors,\n response: result,\n operation: operation,\n forward: forward\n });\n if (retriedResult) {\n retriedSub = retriedResult.subscribe({\n next: observer.next.bind(observer),\n error: observer.error.bind(observer),\n complete: observer.complete.bind(observer)\n });\n return;\n }\n }\n observer.next(result);\n },\n error: function (networkError) {\n retriedResult = errorHandler({\n operation: operation,\n networkError: networkError,\n graphQLErrors: networkError && networkError.result && networkError.result.errors,\n forward: forward\n });\n if (retriedResult) {\n retriedSub = retriedResult.subscribe({\n next: observer.next.bind(observer),\n error: observer.error.bind(observer),\n complete: observer.complete.bind(observer)\n });\n return;\n }\n observer.error(networkError);\n },\n complete: function () {\n if (!retriedResult) {\n observer.complete.bind(observer)();\n }\n }\n });\n } catch (e) {\n errorHandler({\n networkError: e,\n operation: operation,\n forward: forward\n });\n observer.error(e);\n }\n return function () {\n if (sub) sub.unsubscribe();\n if (retriedSub) sub.unsubscribe();\n };\n });\n });\n}\nvar ErrorLink = function (_super) {\n __extends(ErrorLink, _super);\n function ErrorLink(errorHandler) {\n var _this = _super.call(this) || this;\n _this.link = onError(errorHandler);\n return _this;\n }\n ErrorLink.prototype.request = function (operation, forward) {\n return this.link.request(operation, forward);\n };\n return ErrorLink;\n}(ApolloLink);\nexport { ErrorLink };\n","import { HttpErrorResponse } from '@angular/common/http';\r\nimport { ApolloLink, FetchResult, NextLink, Observable, Operation } from '@apollo/client/core';\r\nimport { ObservableSubscription } from '@apollo/client/utilities/observables/Observable';\r\nimport { OperationDefinitionNode } from 'graphql';\r\nimport { print } from 'graphql/language/printer';\r\nimport { CommandResult, CommandResultStatus } from 'src/graphql/generated/graphql.generated';\r\nimport { AppInsightsService } from 'src/lib/tcs-app-insights/app-insights-initializer.service';\r\nimport { createSafeProps } from 'src/lib/tcs-app-insights/app-insights-util';\r\n\r\nexport class AppInsightsDependencyTrackingLink extends ApolloLink {\r\n constructor(\r\n private readonly _graphQLUrl: string,\r\n private _appInsightsService: AppInsightsService,\r\n ) {\r\n super();\r\n }\r\n\r\n public request(operation: Operation, forward: NextLink): Observable | null {\r\n return new Observable((observer) => {\r\n let sub: ObservableSubscription | undefined;\r\n const begin = performance.now();\r\n const operationId: string | null = operation.getContext().operationId;\r\n const opDefs: OperationDefinitionNode[] = operation.query.definitions\r\n .filter((d) => d.kind === 'OperationDefinition')\r\n .map((n) => n as OperationDefinitionNode);\r\n const graphQLOperationType =\r\n opDefs.length > 1 ? 'multiple' : opDefs.length === 1 ? opDefs[0].operation : 'Multiple';\r\n const operationName = graphQLOperationType + ' ' + operation.operationName;\r\n if (operationId == null) {\r\n throw new Error('Expected non-null operation id');\r\n }\r\n const getDuration = () => performance.now() - begin;\r\n const baseProps = {\r\n __trackMe: true,\r\n variables: operation.variables,\r\n gqlOperationType: graphQLOperationType,\r\n gqlOperationName: operation.operationName,\r\n query: print(operation.query),\r\n };\r\n\r\n try {\r\n sub = forward(operation).subscribe({\r\n next: (result) => {\r\n const duration = getDuration();\r\n const hasErrors = result.errors != null && result.errors.length > 0;\r\n let resultProps = createSafeProps({\r\n ...baseProps,\r\n resultData: result.data,\r\n resultErrors: result.errors,\r\n hasErrors,\r\n });\r\n let resultCode = hasErrors ? 5000 : 200;\r\n let mutationErrorSource: undefined | 'user' | 'system';\r\n if (graphQLOperationType === 'mutation') {\r\n if (result != null && result.data != null) {\r\n const mutationResults = Object.values(result.data).filter(\r\n (r) => r != null,\r\n ) as CommandResult[];\r\n const firstMutationResult = mutationResults.find((r) => r != null);\r\n resultProps = createSafeProps({\r\n ...resultProps,\r\n mutationSuccess: true,\r\n mutationResult: firstMutationResult,\r\n mutationResultStatus:\r\n firstMutationResult != null ? firstMutationResult.status : undefined,\r\n });\r\n const firstMutationWithError = mutationResults.find(\r\n (r) =>\r\n r.status !== CommandResultStatus.Succeeded ||\r\n (r.errors != null && r.errors.length > 0),\r\n );\r\n if (firstMutationWithError != null) {\r\n const firstError = firstMutationWithError.errors[0];\r\n resultCode = firstError.code;\r\n mutationErrorSource =\r\n firstError.code >= 4000 && firstError.code < 5000 ? 'user' : 'system';\r\n\r\n resultProps = createSafeProps({\r\n ...resultProps,\r\n mutationSuccess: false,\r\n mutationErrorMessage: firstError.message,\r\n mutationErrorCode: firstError.code,\r\n mutationErrorSource,\r\n });\r\n }\r\n }\r\n }\r\n\r\n const success = mutationErrorSource !== 'system' && !hasErrors;\r\n this._appInsightsService?.appInsights?.trackDependencyData({\r\n id: operationId,\r\n name: 'GraphQL',\r\n target: this._graphQLUrl,\r\n duration,\r\n success,\r\n responseCode: resultCode,\r\n properties: { operationName, ...resultProps, operationId },\r\n });\r\n\r\n observer.next(result);\r\n },\r\n error: (response: HttpErrorResponse) => {\r\n const duration = getDuration();\r\n const errorProps = createSafeProps({\r\n ...baseProps,\r\n response,\r\n statusText: response.statusText,\r\n });\r\n this._appInsightsService?.appInsights?.trackDependencyData({\r\n id: operationId,\r\n name: 'GraphQL',\r\n target: this._graphQLUrl,\r\n duration,\r\n success: false,\r\n responseCode: response.status,\r\n properties: { operationName, ...errorProps, operationId },\r\n });\r\n observer.error(response);\r\n },\r\n complete: () => {\r\n observer.complete();\r\n },\r\n });\r\n } catch (err) {\r\n observer.error(err);\r\n }\r\n return () => {\r\n if (sub != null) {\r\n sub.unsubscribe();\r\n }\r\n };\r\n });\r\n }\r\n}\r\n","import { ApolloLink } from '@apollo/client/core';\r\nimport { uuid } from '../uuid';\r\nimport { getOrElse } from '../values';\r\n\r\nexport const setAppInsightsOperationIdLink = new ApolloLink((operation, forward) => {\r\n const context = operation.getContext();\r\n const operationId = getOrElse(\r\n operation.getContext().operationId,\r\n operation.operationName + '-' + uuid(),\r\n );\r\n const headers = context.headers != null ? context.headers : {};\r\n headers['request-id'] = operationId;\r\n operation.setContext({ headers, operationId });\r\n return forward != null ? forward(operation) : null;\r\n});\r\n","import { ApolloLink } from '@apollo/client/core';\r\nimport { CompanyContextService } from 'src/app/shared/company-context.service';\r\nimport { isNullOrWhitespace } from 'src/util/string';\r\nexport function createAuthLink(companyContext: CompanyContextService): ApolloLink {\r\n return new ApolloLink((operation, forward) => {\r\n const operationContext = operation.getContext();\r\n const headers = operationContext.headers != null ? operationContext.headers : {};\r\n\r\n if (!isNullOrWhitespace(operation.operationName)) {\r\n headers['x-operation-name'] = operation.operationName;\r\n }\r\n\r\n // Assume we're in a new company context once routing guards have been run\r\n const company = companyContext.postGuardCompany;\r\n if (company != null) {\r\n headers['x-company-code'] = company.companyCode;\r\n headers['x-company-id'] = company.id;\r\n }\r\n\r\n operation.setContext({ headers });\r\n\r\n return forward != null ? forward(operation) : null;\r\n });\r\n}\r\n","import { ApolloLink, DefaultContext } from '@apollo/client/core';\r\n\r\nexport function createSecondarySourceLink(): ApolloLink {\r\n return new ApolloLink((operation, forward) => {\r\n const operationContext = operation.getContext();\r\n const headers = operationContext.headers != null ? operationContext.headers : {};\r\n\r\n if (canUseSecondarySource(operationContext)) {\r\n headers['x-data-source'] = 'Secondary';\r\n operation.setContext({ headers });\r\n }\r\n\r\n return forward != null ? forward(operation) : null;\r\n });\r\n}\r\n\r\nfunction canUseSecondarySource(context: DefaultContext): context is { useSecondarySource: true } {\r\n return context?.useSecondarySource === true;\r\n}\r\n","import { HttpErrorResponse } from '@angular/common/http';\r\nimport { ApolloLink } from '@apollo/client/core';\r\nimport { RetryLink } from '@apollo/client/link/retry';\r\nimport { HttpLink } from 'apollo-angular/http';\r\nimport { TcsConfiguration } from 'src/app/app.config';\r\nimport { CompanyContextService } from 'src/app/shared/company-context.service';\r\nimport { Logger } from 'src/app/shared/tcs-logging/logger';\r\nimport { createSafeProps } from 'src/lib/tcs-app-insights/app-insights-util';\r\nimport { onError } from '@apollo/client/link/error';\r\nimport { AppInsightsService } from 'src/lib/tcs-app-insights/app-insights-initializer.service';\r\nimport { NetworkError } from '@apollo/client/errors';\r\nimport { AppInsightsDependencyTrackingLink } from './app-insights-dependeny-tracking.apollo-link';\r\nimport { setAppInsightsOperationIdLink } from './app-insights-operation-id.apollo-link';\r\nimport { createAuthLink } from './auth.apollo-link';\r\nimport { createSecondarySourceLink } from './secondary-source-link';\r\n\r\nexport function createClientLinks(\r\n configuration: TcsConfiguration,\r\n companyContext: CompanyContextService,\r\n httpLink: HttpLink,\r\n logger: Logger,\r\n appInsights: AppInsightsService,\r\n) {\r\n const http = httpLink.create({\r\n uri: configuration.tcs.graphqlUri,\r\n });\r\n\r\n const retryLink = new RetryLink({\r\n delay: {\r\n initial: 500,\r\n max: Infinity,\r\n jitter: true,\r\n },\r\n attempts: {\r\n max: 5,\r\n retryIf: (error, operation) => {\r\n /*\r\n We should only retry on non-user errors. We want user errors \r\n to surface immediately (and not be delayed by the retry mechanism).\r\n */\r\n const canRetry = error instanceof HttpErrorResponse && error.status >= 500;\r\n const safeProps = createSafeProps({ error, operation });\r\n if (canRetry) {\r\n logger.warning('[Apollo.RetryLink] will retry request', safeProps);\r\n } else {\r\n logger.warning('[Apollo.RetryLink] will NOT retry request', safeProps);\r\n }\r\n return canRetry;\r\n },\r\n },\r\n });\r\n\r\n interface ErrorLookup {\r\n reg: RegExp;\r\n msg: string;\r\n type: 'error' | 'warning' | 'info';\r\n }\r\n const networkErrorMessages: ErrorLookup[] = [\r\n { reg: /0 Unknown Error/i, msg: '0 unknown error', type: 'warning' },\r\n { reg: /400 Bad Request/i, msg: '400 bad request', type: 'warning' },\r\n { reg: /401 Unauthorized/i, msg: '401 unauthorized', type: 'warning' },\r\n { reg: /500 Internal Server Error/i, msg: '500 internal server error', type: 'error' },\r\n { reg: /504 Gateway Timeout/i, msg: '504 gateway timeout', type: 'error' },\r\n // try get unknown error\r\n { reg: /(https?)?.*?: (.*)/i, msg: 'network error ($2)', type: 'error' },\r\n // final catch all\r\n { reg: /(.*)/, msg: 'network error ($1)', type: 'error' },\r\n ];\r\n const DEFAULT_NETWORK_ERROR_MESSAGE = networkErrorMessages[networkErrorMessages.length - 1];\r\n const lookupNetworkErrorMessage = (networkError: NetworkError): ErrorLookup => {\r\n const errorMessage = networkError?.message ?? '';\r\n const error =\r\n networkErrorMessages.find((err) => err.reg.test(errorMessage)) ??\r\n DEFAULT_NETWORK_ERROR_MESSAGE;\r\n return error.msg.indexOf('$') > -1\r\n ? { ...error, msg: errorMessage.replace(error.reg, error.msg) }\r\n : error;\r\n };\r\n\r\n const errorLink = onError(({ graphQLErrors, networkError, operation }) => {\r\n if (graphQLErrors != null) {\r\n const errors: any[] = [];\r\n graphQLErrors.forEach(({ message, locations, path, extensions }) => {\r\n errors.push({ error: { message, locations, path, extensions } });\r\n });\r\n const opName = operation?.operationName;\r\n logger.error(`[GraphQL.onError] Operation: '${opName}'`, createSafeProps(errors));\r\n } else if (networkError != null) {\r\n const message = lookupNetworkErrorMessage(networkError);\r\n const safeProps = createSafeProps(networkError);\r\n const opName = operation?.operationName ?? 'unknown';\r\n logger[message.type](`[GraphQL.onError] ${message.msg}, Operation: ${opName}`, safeProps);\r\n } else {\r\n logger.error(`[GraphQL.onError] unknown error`);\r\n }\r\n });\r\n\r\n return ApolloLink.from([\r\n retryLink,\r\n errorLink,\r\n createAuthLink(companyContext),\r\n createSecondarySourceLink(),\r\n setAppInsightsOperationIdLink,\r\n new AppInsightsDependencyTrackingLink(configuration.tcs.graphqlUri, appInsights),\r\n http,\r\n ]);\r\n}\r\n","/* eslint-disable */\r\n\r\nexport interface PossibleTypesResultData {\r\n possibleTypes: {\r\n [key: string]: string[];\r\n };\r\n}\r\nconst result: PossibleTypesResultData = {\r\n possibleTypes: {\r\n Abbreviated: [],\r\n CollectionMetadata: [\r\n 'AccessibleItemCollectionMetadata',\r\n 'ActivationRuleCollectionMetadata',\r\n 'ActiveAlertCollectionMetadata',\r\n 'ActiveCardUnitOfferingCollectionMetadata',\r\n 'ActiveTimelineCollectionMetadata',\r\n 'AgencyCollectionMetadata',\r\n 'AgencyLocationCollectionMetadata',\r\n 'AirportCollectionMetadata',\r\n 'AlertCollectionMetadata',\r\n 'ApplicationNotificationCollectionMetadata',\r\n 'ArchiveLogCollectionMetadata',\r\n 'AssignmentDelayedReasonCollectionMetadata',\r\n 'BaseCollectionMetadata',\r\n 'BaseControlZoneCollectionMetadata',\r\n 'BaseMedicalControlContactCollectionMetadata',\r\n 'BaseMedicalControlContactStateCollectionMetadata',\r\n 'CancellationCategoryCollectionMetadata',\r\n 'CancellationReasonCollectionMetadata',\r\n 'CancellationSecondaryReasonCollectionMetadata',\r\n 'CapabilityCollectionMetadata',\r\n 'CardCollectionMetadata',\r\n 'CardLinkCollectionMetadata',\r\n 'CardNoteArchiveCollectionMetadata',\r\n 'CardNoteCollectionMetadata',\r\n 'CardReOpenReasonCollectionMetadata',\r\n 'CardSearchResultCollectionMetadata',\r\n 'CardSummaryCollectionMetadata',\r\n 'CommunicationCenterCollectionMetadata',\r\n 'CommunicationCenterTransportOfferOptionCollectionMetadata',\r\n 'CompanyCollectionMetadata',\r\n 'CompleteFlightInstanceCollectionMetadata',\r\n 'ConfigurationSettingCollectionMetadata',\r\n 'ControlZoneCollectionMetadata',\r\n 'DeclineCategoryCollectionMetadata',\r\n 'DeclineReasonCollectionMetadata',\r\n 'DeclineSecondaryReasonCollectionMetadata',\r\n 'DepartmentCollectionMetadata',\r\n 'DevNoteCollectionMetadata',\r\n 'DiversionReasonCollectionMetadata',\r\n 'EntityCapabilityCollectionMetadata',\r\n 'EscortRequestCollectionMetadata',\r\n 'EstimatedDurationCollectionMetadata',\r\n 'EtaCollectionMetadata',\r\n 'ExternalActionCollectionMetadata',\r\n 'ExternalActionTypeCollectionMetadata',\r\n 'ExternalReferenceCollectionMetadata',\r\n 'ExternalSystemUnitCollectionMetadata',\r\n 'FacilityNonAcceptanceReasonCollectionMetadata',\r\n 'FboCollectionMetadata',\r\n 'FirewallRuleCollectionMetadata',\r\n 'FlightFollowingReportCollectionMetadata',\r\n 'FuelTankCollectionMetadata',\r\n 'LandingZoneOutOfServiceReasonCollectionMetadata',\r\n 'LocationCollectionMetadata',\r\n 'LocationHazardAttachmentCollectionMetadata',\r\n 'LocationHazardCollectionMetadata',\r\n 'ManifestEntryCollectionMetadata',\r\n 'MedicalControlContactLogEntryCollectionMetadata',\r\n 'MedicalFacilityCollectionMetadata',\r\n 'MedicalFacilityContactCollectionMetadata',\r\n 'MedicalFacilityPhysicianCollectionMetadata',\r\n 'MedicalFacilityUnitCollectionMetadata',\r\n 'MedicalUnitCollectionMetadata',\r\n 'MessageEnvelopeCollectionMetadata',\r\n 'MessageStatusUpdateCollectionMetadata',\r\n 'NextDueTypeCollectionMetadata',\r\n 'NonReferralReasonCollectionMetadata',\r\n 'NotificationCollectionMetadata',\r\n 'NotificationGroupCollectionMetadata',\r\n 'NotificationGroupMemberCollectionMetadata',\r\n 'NotificationRecipientCollectionMetadata',\r\n 'NotificationSubscriptionCollectionMetadata',\r\n 'NotificationTemplateCollectionMetadata',\r\n 'OemActivityCollectionMetadata',\r\n 'OemAssetCollectionMetadata',\r\n 'OemPlanChangeRequestCollectionMetadata',\r\n 'OemPlanCollectionMetadata',\r\n 'OfferAlgorithmCollectionMetadata',\r\n 'OperationCollectionMetadata',\r\n 'OutOfServiceEventCollectionMetadata',\r\n 'OutOfServiceEventDashboardDataMetadata',\r\n 'OutOfServiceEventNoteCollectionMetadata',\r\n 'OutOfServiceReasonCollectionMetadata',\r\n 'OutOfServiceSecondaryReasonCollectionMetadata',\r\n 'PassdownLogAcknowledgementCollectionMetadata',\r\n 'PassdownLogCollectionMetadata',\r\n 'PatientCollectionMetadata',\r\n 'PersonCollectionMetadata',\r\n 'PhysicianCollectionMetadata',\r\n 'PositionReportAlertCollectionMetadata',\r\n 'PositionReportArchiveCollectionMetadata',\r\n 'PositionReportCollectionMetadata',\r\n 'ProgramBaseCollectionMetadata',\r\n 'ProgramCollectionMetadata',\r\n 'QuestionChoiceCollectionMetadata',\r\n 'QuestionCollectionMetadata',\r\n 'QuestionnaireCollectionMetadata',\r\n 'QuestionnaireQuestionResponseCollectionMetadata',\r\n 'QuestionnaireQuestionResponseNoteCollectionMetadata',\r\n 'QuestionnaireResponseCollectionMetadata',\r\n 'QuestionnaireSectionCollectionMetadata',\r\n 'QuestionnaireSectionQuestionCollectionMetadata',\r\n 'RamcoVehicleConfigurationCollectionMetadata',\r\n 'ReceivingFacilityRequestCollectionMetadata',\r\n 'RegionBaseCollectionMetadata',\r\n 'RegionCollectionMetadata',\r\n 'RegionGroupCollectionMetadata',\r\n 'RendezvousRequestCollectionMetadata',\r\n 'RequestCollectionMetadata',\r\n 'RequestLocationCollectionMetadata',\r\n 'RequestPatientCollectionMetadata',\r\n 'RequesterCollectionMetadata',\r\n 'RequesterReferralReasonCollectionMetadata',\r\n 'RequesterRoleCollectionMetadata',\r\n 'SpecialtyTeamCollectionMetadata',\r\n 'SpecialtyTeamMemberCollectionMetadata',\r\n 'SupportRequestCollectionMetadata',\r\n 'SystemTimerCollectionMetadata',\r\n 'TimelineCollectionMetadata',\r\n 'TimelineItemCollectionMetadata',\r\n 'TimestampCollectionMetadata',\r\n 'TimestampTypeCollectionMetadata',\r\n 'TimezoneCollectionMetadata',\r\n 'TrackedMessageCollectionMetadata',\r\n 'TransferCenterCollectionMetadata',\r\n 'TransferReasonCollectionMetadata',\r\n 'TransportOfferCollectionMetadata',\r\n 'TransportOfferOptionCollectionMetadata',\r\n 'TransportReasonCollectionMetadata',\r\n 'TripCollectionMetadata',\r\n 'TripLegCollectionMetadata',\r\n 'TripPassengerCollectionMetadata',\r\n 'TrmUserAgencyCollectionMetadata',\r\n 'TrmUserCollectionMetadata',\r\n 'TrmUserMedicalFacilityCollectionMetadata',\r\n 'TrmUserProgramCollectionMetadata',\r\n 'UnitActivationRuleCollectionMetadata',\r\n 'UnitCollectionMetadata',\r\n 'UnitEMSystemMappingCollectionMetadata',\r\n 'UnitNoteCollectionMetadata',\r\n 'UnitNoteResultCollectionMetadata',\r\n 'UnitPositionCollectionMetadata',\r\n 'UnitShiftCollectionMetadata',\r\n 'UnitStatusHistoryEntryCollectionMetadata',\r\n 'UnitSummaryCollectionMetadata',\r\n 'VehicleCollectionMetadata',\r\n 'VehicleConfigurationClassCollectionMetadata',\r\n 'VehicleControlZoneCollectionMetadata',\r\n 'VehicleDispositionCollectionMetadata',\r\n 'VehicleMaintenanceCollectionMetadata',\r\n 'VehicleMakeCollectionMetadata',\r\n 'VehicleModelCollectionMetadata',\r\n 'VehiclePositionSummaryCollectionMetadata',\r\n 'VehicleStateInspectionCollectionMetadata',\r\n 'VehicleSummaryCollectionMetadata',\r\n 'WaypointCollectionMetadata',\r\n 'WebOrderLogCollectionMetadata',\r\n ],\r\n Entity: [\r\n 'AccessibleItem',\r\n 'ActivationRule',\r\n 'ActiveAlert',\r\n 'ActiveCardUnitOffering',\r\n 'ActiveTimeline',\r\n 'Agency',\r\n 'AgencyLocation',\r\n 'Airport',\r\n 'Alert',\r\n 'ApplicationNotification',\r\n 'ArchiveLog',\r\n 'AssignmentDelayedReason',\r\n 'Base',\r\n 'BaseControlZone',\r\n 'BaseMedicalControlContact',\r\n 'BaseMedicalControlContactState',\r\n 'CancellationCategory',\r\n 'CancellationReason',\r\n 'CancellationSecondaryReason',\r\n 'Capability',\r\n 'Card',\r\n 'CardLink',\r\n 'CardNote',\r\n 'CardNoteArchive',\r\n 'CardReOpenReason',\r\n 'CardSummary',\r\n 'CommunicationCenter',\r\n 'CommunicationCenterTransportOfferOption',\r\n 'Company',\r\n 'CompleteFlightInstance',\r\n 'ConfigurationSetting',\r\n 'ControlZone',\r\n 'DeclineCategory',\r\n 'DeclineReason',\r\n 'DeclineSecondaryReason',\r\n 'Department',\r\n 'DiversionReason',\r\n 'EntityCapability',\r\n 'EscortRequest',\r\n 'EstimatedDuration',\r\n 'Eta',\r\n 'ExternalAction',\r\n 'ExternalActionType',\r\n 'ExternalReference',\r\n 'ExternalSystemUnit',\r\n 'FacilityNonAcceptanceReason',\r\n 'Fbo',\r\n 'FirewallRule',\r\n 'FlightFollowingReport',\r\n 'FuelTank',\r\n 'LandingZoneOutOfServiceReason',\r\n 'Location',\r\n 'LocationHazard',\r\n 'LocationHazardAttachment',\r\n 'ManifestEntry',\r\n 'MedicalControlContactLogEntry',\r\n 'MedicalFacility',\r\n 'MedicalFacilityContact',\r\n 'MedicalFacilityPhysician',\r\n 'MedicalFacilityUnit',\r\n 'MedicalUnit',\r\n 'MessageStatusUpdate',\r\n 'NextDueType',\r\n 'NonReferralReason',\r\n 'Notification',\r\n 'NotificationGroup',\r\n 'NotificationGroupMember',\r\n 'NotificationRecipient',\r\n 'NotificationSubscription',\r\n 'NotificationTemplate',\r\n 'OemActivity',\r\n 'OemAsset',\r\n 'OemPlan',\r\n 'OemPlanChangeRequest',\r\n 'OfferAlgorithm',\r\n 'Operation',\r\n 'OutOfServiceEvent',\r\n 'OutOfServiceEventNote',\r\n 'OutOfServiceReason',\r\n 'OutOfServiceSecondaryReason',\r\n 'PassdownLog',\r\n 'PassdownLogAcknowledgement',\r\n 'Patient',\r\n 'Person',\r\n 'Physician',\r\n 'PositionReport',\r\n 'PositionReportAlert',\r\n 'PositionReportArchive',\r\n 'Program',\r\n 'ProgramBase',\r\n 'Question',\r\n 'QuestionChoice',\r\n 'Questionnaire',\r\n 'QuestionnaireQuestionResponse',\r\n 'QuestionnaireQuestionResponseNote',\r\n 'QuestionnaireResponse',\r\n 'QuestionnaireSection',\r\n 'QuestionnaireSectionQuestion',\r\n 'RamcoVehicleConfiguration',\r\n 'ReceivingFacilityRequest',\r\n 'Region',\r\n 'RegionBase',\r\n 'RegionGroup',\r\n 'RendezvousRequest',\r\n 'Request',\r\n 'RequestLocation',\r\n 'RequestPatient',\r\n 'Requester',\r\n 'RequesterReferralReason',\r\n 'RequesterRole',\r\n 'SpecialtyTeam',\r\n 'SpecialtyTeamMember',\r\n 'SupportRequest',\r\n 'SystemTimer',\r\n 'Timeline',\r\n 'TimelineItem',\r\n 'Timestamp',\r\n 'TimestampType',\r\n 'Timezone',\r\n 'TrackedMessage',\r\n 'TransferCenter',\r\n 'TransferReason',\r\n 'TransportOffer',\r\n 'TransportOfferOption',\r\n 'TransportReason',\r\n 'Trip',\r\n 'TripLeg',\r\n 'TripPassenger',\r\n 'TrmUser',\r\n 'TrmUserAgency',\r\n 'TrmUserMedicalFacility',\r\n 'TrmUserProgram',\r\n 'Unit',\r\n 'UnitActivationRule',\r\n 'UnitEMSystemMapping',\r\n 'UnitNote',\r\n 'UnitPosition',\r\n 'UnitShift',\r\n 'UnitStatusHistoryEntry',\r\n 'UnitSummary',\r\n 'Vehicle',\r\n 'VehicleConfigurationClass',\r\n 'VehicleControlZone',\r\n 'VehicleDisposition',\r\n 'VehicleMaintenance',\r\n 'VehicleMake',\r\n 'VehicleModel',\r\n 'VehiclePositionSummary',\r\n 'VehicleStateInspection',\r\n 'VehicleSummary',\r\n 'Waypoint',\r\n 'WebOrderLog',\r\n ],\r\n Evented: [\r\n 'AccessibleItem',\r\n 'ActivationRule',\r\n 'ActiveAlert',\r\n 'ActiveCardUnitOffering',\r\n 'ActiveTimeline',\r\n 'Agency',\r\n 'AgencyLocation',\r\n 'Airport',\r\n 'Alert',\r\n 'ApplicationNotification',\r\n 'ArchiveLog',\r\n 'AssignmentDelayedReason',\r\n 'Base',\r\n 'BaseControlZone',\r\n 'BaseMedicalControlContact',\r\n 'BaseMedicalControlContactState',\r\n 'CancellationCategory',\r\n 'CancellationReason',\r\n 'CancellationSecondaryReason',\r\n 'Capability',\r\n 'Card',\r\n 'CardLink',\r\n 'CardNote',\r\n 'CardNoteArchive',\r\n 'CardReOpenReason',\r\n 'CardSummary',\r\n 'CommunicationCenter',\r\n 'CommunicationCenterTransportOfferOption',\r\n 'Company',\r\n 'CompleteFlightInstance',\r\n 'ConfigurationSetting',\r\n 'ControlZone',\r\n 'DeclineCategory',\r\n 'DeclineReason',\r\n 'DeclineSecondaryReason',\r\n 'Department',\r\n 'DiversionReason',\r\n 'EntityCapability',\r\n 'EscortRequest',\r\n 'EstimatedDuration',\r\n 'Eta',\r\n 'ExternalAction',\r\n 'ExternalActionType',\r\n 'ExternalReference',\r\n 'ExternalSystemUnit',\r\n 'FacilityNonAcceptanceReason',\r\n 'Fbo',\r\n 'FirewallRule',\r\n 'FlightFollowingReport',\r\n 'FuelTank',\r\n 'LandingZoneOutOfServiceReason',\r\n 'Location',\r\n 'LocationHazard',\r\n 'LocationHazardAttachment',\r\n 'ManifestEntry',\r\n 'MedicalControlContactLogEntry',\r\n 'MedicalFacility',\r\n 'MedicalFacilityContact',\r\n 'MedicalFacilityPhysician',\r\n 'MedicalFacilityUnit',\r\n 'MedicalUnit',\r\n 'MessageStatusUpdate',\r\n 'NextDueType',\r\n 'NonReferralReason',\r\n 'Notification',\r\n 'NotificationGroup',\r\n 'NotificationGroupMember',\r\n 'NotificationRecipient',\r\n 'NotificationSubscription',\r\n 'NotificationTemplate',\r\n 'OemActivity',\r\n 'OemAsset',\r\n 'OemPlan',\r\n 'OemPlanChangeRequest',\r\n 'OfferAlgorithm',\r\n 'Operation',\r\n 'OutOfServiceEvent',\r\n 'OutOfServiceEventNote',\r\n 'OutOfServiceReason',\r\n 'OutOfServiceSecondaryReason',\r\n 'PassdownLog',\r\n 'PassdownLogAcknowledgement',\r\n 'Patient',\r\n 'Person',\r\n 'Physician',\r\n 'PositionReport',\r\n 'PositionReportAlert',\r\n 'PositionReportArchive',\r\n 'Program',\r\n 'ProgramBase',\r\n 'Question',\r\n 'QuestionChoice',\r\n 'Questionnaire',\r\n 'QuestionnaireQuestionResponse',\r\n 'QuestionnaireQuestionResponseNote',\r\n 'QuestionnaireResponse',\r\n 'QuestionnaireSection',\r\n 'QuestionnaireSectionQuestion',\r\n 'RamcoVehicleConfiguration',\r\n 'ReceivingFacilityRequest',\r\n 'Region',\r\n 'RegionBase',\r\n 'RegionGroup',\r\n 'RendezvousRequest',\r\n 'Request',\r\n 'RequestLocation',\r\n 'RequestPatient',\r\n 'Requester',\r\n 'RequesterReferralReason',\r\n 'RequesterRole',\r\n 'SpecialtyTeam',\r\n 'SpecialtyTeamMember',\r\n 'SupportRequest',\r\n 'SystemTimer',\r\n 'Timeline',\r\n 'TimelineItem',\r\n 'Timestamp',\r\n 'TimestampType',\r\n 'Timezone',\r\n 'TrackedMessage',\r\n 'TransferCenter',\r\n 'TransferReason',\r\n 'TransportOffer',\r\n 'TransportOfferOption',\r\n 'TransportReason',\r\n 'Trip',\r\n 'TripLeg',\r\n 'TripPassenger',\r\n 'TrmUser',\r\n 'TrmUserAgency',\r\n 'TrmUserMedicalFacility',\r\n 'TrmUserProgram',\r\n 'Unit',\r\n 'UnitActivationRule',\r\n 'UnitEMSystemMapping',\r\n 'UnitNote',\r\n 'UnitPosition',\r\n 'UnitShift',\r\n 'UnitStatusHistoryEntry',\r\n 'UnitSummary',\r\n 'Vehicle',\r\n 'VehicleConfigurationClass',\r\n 'VehicleControlZone',\r\n 'VehicleDisposition',\r\n 'VehicleMaintenance',\r\n 'VehicleMake',\r\n 'VehicleModel',\r\n 'VehiclePositionSummary',\r\n 'VehicleStateInspection',\r\n 'VehicleSummary',\r\n 'Waypoint',\r\n 'WebOrderLog',\r\n ],\r\n Lookup: [],\r\n TcsEntity: [\r\n 'AccessibleItem',\r\n 'ActivationRule',\r\n 'ActiveAlert',\r\n 'ActiveCardUnitOffering',\r\n 'ActiveTimeline',\r\n 'Agency',\r\n 'AgencyLocation',\r\n 'Airport',\r\n 'Alert',\r\n 'ApplicationNotification',\r\n 'ArchiveLog',\r\n 'AssignmentDelayedReason',\r\n 'Base',\r\n 'BaseControlZone',\r\n 'BaseMedicalControlContact',\r\n 'BaseMedicalControlContactState',\r\n 'CancellationCategory',\r\n 'CancellationReason',\r\n 'CancellationSecondaryReason',\r\n 'Capability',\r\n 'Card',\r\n 'CardLink',\r\n 'CardNote',\r\n 'CardNoteArchive',\r\n 'CardReOpenReason',\r\n 'CardSummary',\r\n 'CommunicationCenter',\r\n 'CommunicationCenterTransportOfferOption',\r\n 'Company',\r\n 'CompleteFlightInstance',\r\n 'ConfigurationSetting',\r\n 'ControlZone',\r\n 'DeclineCategory',\r\n 'DeclineReason',\r\n 'DeclineSecondaryReason',\r\n 'Department',\r\n 'DiversionReason',\r\n 'EntityCapability',\r\n 'EscortRequest',\r\n 'EstimatedDuration',\r\n 'Eta',\r\n 'ExternalAction',\r\n 'ExternalActionType',\r\n 'ExternalReference',\r\n 'ExternalSystemUnit',\r\n 'FacilityNonAcceptanceReason',\r\n 'Fbo',\r\n 'FirewallRule',\r\n 'FlightFollowingReport',\r\n 'FuelTank',\r\n 'LandingZoneOutOfServiceReason',\r\n 'Location',\r\n 'LocationHazard',\r\n 'LocationHazardAttachment',\r\n 'ManifestEntry',\r\n 'MedicalControlContactLogEntry',\r\n 'MedicalFacility',\r\n 'MedicalFacilityContact',\r\n 'MedicalFacilityPhysician',\r\n 'MedicalFacilityUnit',\r\n 'MedicalUnit',\r\n 'MessageStatusUpdate',\r\n 'NextDueType',\r\n 'NonReferralReason',\r\n 'Notification',\r\n 'NotificationGroup',\r\n 'NotificationGroupMember',\r\n 'NotificationRecipient',\r\n 'NotificationSubscription',\r\n 'NotificationTemplate',\r\n 'OemActivity',\r\n 'OemAsset',\r\n 'OemPlan',\r\n 'OemPlanChangeRequest',\r\n 'OfferAlgorithm',\r\n 'Operation',\r\n 'OutOfServiceEvent',\r\n 'OutOfServiceEventNote',\r\n 'OutOfServiceReason',\r\n 'OutOfServiceSecondaryReason',\r\n 'PassdownLog',\r\n 'PassdownLogAcknowledgement',\r\n 'Patient',\r\n 'Person',\r\n 'Physician',\r\n 'PositionReport',\r\n 'PositionReportAlert',\r\n 'PositionReportArchive',\r\n 'Program',\r\n 'ProgramBase',\r\n 'Question',\r\n 'QuestionChoice',\r\n 'Questionnaire',\r\n 'QuestionnaireQuestionResponse',\r\n 'QuestionnaireQuestionResponseNote',\r\n 'QuestionnaireResponse',\r\n 'QuestionnaireSection',\r\n 'QuestionnaireSectionQuestion',\r\n 'RamcoVehicleConfiguration',\r\n 'ReceivingFacilityRequest',\r\n 'Region',\r\n 'RegionBase',\r\n 'RegionGroup',\r\n 'RendezvousRequest',\r\n 'Request',\r\n 'RequestLocation',\r\n 'RequestPatient',\r\n 'Requester',\r\n 'RequesterReferralReason',\r\n 'RequesterRole',\r\n 'SpecialtyTeam',\r\n 'SpecialtyTeamMember',\r\n 'SupportRequest',\r\n 'SystemTimer',\r\n 'Timeline',\r\n 'TimelineItem',\r\n 'Timestamp',\r\n 'TimestampType',\r\n 'Timezone',\r\n 'TrackedMessage',\r\n 'TransferCenter',\r\n 'TransferReason',\r\n 'TransportOffer',\r\n 'TransportOfferOption',\r\n 'TransportReason',\r\n 'Trip',\r\n 'TripLeg',\r\n 'TripPassenger',\r\n 'TrmUser',\r\n 'TrmUserAgency',\r\n 'TrmUserMedicalFacility',\r\n 'TrmUserProgram',\r\n 'Unit',\r\n 'UnitActivationRule',\r\n 'UnitEMSystemMapping',\r\n 'UnitNote',\r\n 'UnitPosition',\r\n 'UnitShift',\r\n 'UnitStatusHistoryEntry',\r\n 'UnitSummary',\r\n 'Vehicle',\r\n 'VehicleConfigurationClass',\r\n 'VehicleControlZone',\r\n 'VehicleDisposition',\r\n 'VehicleMaintenance',\r\n 'VehicleMake',\r\n 'VehicleModel',\r\n 'VehiclePositionSummary',\r\n 'VehicleStateInspection',\r\n 'VehicleSummary',\r\n 'Waypoint',\r\n 'WebOrderLog',\r\n ],\r\n },\r\n};\r\nexport default result;\r\n","import { print } from 'graphql';\nimport * as i0 from '@angular/core';\nimport { Injectable } from '@angular/core';\nimport { ApolloLink, Observable as Observable$1 } from '@apollo/client/core';\nimport { Observable } from 'rxjs';\nimport * as i1 from '@angular/common/http';\nimport { HttpHeaders } from '@angular/common/http';\nimport { BatchLink } from '@apollo/client/link/batch';\nconst fetch = (req, httpClient, extractFiles) => {\n const shouldUseBody = ['POST', 'PUT', 'PATCH'].indexOf(req.method.toUpperCase()) !== -1;\n const shouldStringify = param => ['variables', 'extensions'].indexOf(param.toLowerCase()) !== -1;\n const isBatching = req.body.length;\n let shouldUseMultipart = req.options && req.options.useMultipart;\n let multipartInfo;\n if (shouldUseMultipart) {\n if (isBatching) {\n return new Observable(observer => observer.error(new Error('File upload is not available when combined with Batching')));\n }\n if (!shouldUseBody) {\n return new Observable(observer => observer.error(new Error('File upload is not available when GET is used')));\n }\n if (!extractFiles) {\n return new Observable(observer => observer.error(new Error(`To use File upload you need to pass \"extractFiles\" function from \"extract-files\" library to HttpLink's options`)));\n }\n multipartInfo = extractFiles(req.body);\n shouldUseMultipart = !!multipartInfo.files.size;\n }\n // `body` for some, `params` for others\n let bodyOrParams = {};\n if (isBatching) {\n if (!shouldUseBody) {\n return new Observable(observer => observer.error(new Error('Batching is not available for GET requests')));\n }\n bodyOrParams = {\n body: req.body\n };\n } else {\n const body = shouldUseMultipart ? multipartInfo.clone : req.body;\n if (shouldUseBody) {\n bodyOrParams = {\n body\n };\n } else {\n const params = Object.keys(req.body).reduce((obj, param) => {\n const value = req.body[param];\n obj[param] = shouldStringify(param) ? JSON.stringify(value) : value;\n return obj;\n }, {});\n bodyOrParams = {\n params: params\n };\n }\n }\n if (shouldUseMultipart && shouldUseBody) {\n const form = new FormData();\n form.append('operations', JSON.stringify(bodyOrParams.body));\n const map = {};\n const files = multipartInfo.files;\n let i = 0;\n files.forEach(paths => {\n map[++i] = paths;\n });\n form.append('map', JSON.stringify(map));\n i = 0;\n files.forEach((_, file) => {\n form.append(++i + '', file, file.name);\n });\n bodyOrParams.body = form;\n }\n // create a request\n return httpClient.request(req.method, req.url, {\n observe: 'response',\n responseType: 'json',\n reportProgress: false,\n ...bodyOrParams,\n ...req.options\n });\n};\nconst mergeHeaders = (source, destination) => {\n if (source && destination) {\n const merged = destination.keys().reduce((headers, name) => headers.set(name, destination.getAll(name)), source);\n return merged;\n }\n return destination || source;\n};\nfunction prioritize(...values) {\n const picked = values.find(val => typeof val !== 'undefined');\n if (typeof picked === 'undefined') {\n return values[values.length - 1];\n }\n return picked;\n}\nfunction createHeadersWithClientAwareness(context) {\n // `apollographql-client-*` headers are automatically set if a\n // `clientAwareness` object is found in the context. These headers are\n // set first, followed by the rest of the headers pulled from\n // `context.headers`.\n let headers = context.headers && context.headers instanceof HttpHeaders ? context.headers : new HttpHeaders(context.headers);\n if (context.clientAwareness) {\n const {\n name,\n version\n } = context.clientAwareness;\n // If desired, `apollographql-client-*` headers set by\n // the `clientAwareness` object can be overridden by\n // `apollographql-client-*` headers set in `context.headers`.\n if (name && !headers.has('apollographql-client-name')) {\n headers = headers.set('apollographql-client-name', name);\n }\n if (version && !headers.has('apollographql-client-version')) {\n headers = headers.set('apollographql-client-version', version);\n }\n }\n return headers;\n}\n\n// XXX find a better name for it\nclass HttpLinkHandler extends ApolloLink {\n httpClient;\n options;\n requester;\n print = print;\n constructor(httpClient, options) {\n super();\n this.httpClient = httpClient;\n this.options = options;\n if (this.options.operationPrinter) {\n this.print = this.options.operationPrinter;\n }\n this.requester = operation => new Observable$1(observer => {\n const context = operation.getContext();\n // decides which value to pick, Context, Options or to just use the default\n const pick = (key, init) => {\n return prioritize(context[key], this.options[key], init);\n };\n let method = pick('method', 'POST');\n const includeQuery = pick('includeQuery', true);\n const includeExtensions = pick('includeExtensions', false);\n const url = pick('uri', 'graphql');\n const withCredentials = pick('withCredentials');\n const useMultipart = pick('useMultipart');\n const useGETForQueries = this.options.useGETForQueries === true;\n const isQuery = operation.query.definitions.some(def => def.kind === 'OperationDefinition' && def.operation === 'query');\n if (useGETForQueries && isQuery) {\n method = 'GET';\n }\n const req = {\n method,\n url: typeof url === 'function' ? url(operation) : url,\n body: {\n operationName: operation.operationName,\n variables: operation.variables\n },\n options: {\n withCredentials,\n useMultipart,\n headers: this.options.headers\n }\n };\n if (includeExtensions) {\n req.body.extensions = operation.extensions;\n }\n if (includeQuery) {\n req.body.query = this.print(operation.query);\n }\n const headers = createHeadersWithClientAwareness(context);\n req.options.headers = mergeHeaders(req.options.headers, headers);\n const sub = fetch(req, this.httpClient, this.options.extractFiles).subscribe({\n next: response => {\n operation.setContext({\n response\n });\n observer.next(response.body);\n },\n error: err => observer.error(err),\n complete: () => observer.complete()\n });\n return () => {\n if (!sub.closed) {\n sub.unsubscribe();\n }\n };\n });\n }\n request(op) {\n return this.requester(op);\n }\n}\nlet HttpLink = /*#__PURE__*/(() => {\n class HttpLink {\n httpClient;\n constructor(httpClient) {\n this.httpClient = httpClient;\n }\n create(options) {\n return new HttpLinkHandler(this.httpClient, options);\n }\n static ɵfac = function HttpLink_Factory(t) {\n return new (t || HttpLink)(i0.ɵɵinject(i1.HttpClient));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: HttpLink,\n factory: HttpLink.ɵfac,\n providedIn: 'root'\n });\n }\n return HttpLink;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst defaults = {\n batchInterval: 10,\n batchMax: 10,\n uri: 'graphql',\n method: 'POST'\n};\nclass HttpBatchLinkHandler extends ApolloLink {\n httpClient;\n options;\n batcher;\n batchInterval;\n batchMax;\n print = print;\n constructor(httpClient, options) {\n super();\n this.httpClient = httpClient;\n this.options = options;\n this.batchInterval = options.batchInterval || defaults.batchInterval;\n this.batchMax = options.batchMax || defaults.batchMax;\n if (this.options.operationPrinter) {\n this.print = this.options.operationPrinter;\n }\n const batchHandler = operations => {\n return new Observable$1(observer => {\n const body = this.createBody(operations);\n const headers = this.createHeaders(operations);\n const {\n method,\n uri,\n withCredentials\n } = this.createOptions(operations);\n if (typeof uri === 'function') {\n throw new Error(`Option 'uri' is a function, should be a string`);\n }\n const req = {\n method,\n url: uri,\n body: body,\n options: {\n withCredentials,\n headers\n }\n };\n const sub = fetch(req, this.httpClient, () => {\n throw new Error('File upload is not available when combined with Batching');\n }).subscribe({\n next: result => observer.next(result.body),\n error: err => observer.error(err),\n complete: () => observer.complete()\n });\n return () => {\n if (!sub.closed) {\n sub.unsubscribe();\n }\n };\n });\n };\n const batchKey = options.batchKey || (operation => {\n return this.createBatchKey(operation);\n });\n this.batcher = new BatchLink({\n batchInterval: this.batchInterval,\n batchMax: this.batchMax,\n batchKey,\n batchHandler\n });\n }\n createOptions(operations) {\n const context = operations[0].getContext();\n return {\n method: prioritize(context.method, this.options.method, defaults.method),\n uri: prioritize(context.uri, this.options.uri, defaults.uri),\n withCredentials: prioritize(context.withCredentials, this.options.withCredentials)\n };\n }\n createBody(operations) {\n return operations.map(operation => {\n const includeExtensions = prioritize(operation.getContext().includeExtensions, this.options.includeExtensions, false);\n const includeQuery = prioritize(operation.getContext().includeQuery, this.options.includeQuery, true);\n const body = {\n operationName: operation.operationName,\n variables: operation.variables\n };\n if (includeExtensions) {\n body.extensions = operation.extensions;\n }\n if (includeQuery) {\n body.query = this.print(operation.query);\n }\n return body;\n });\n }\n createHeaders(operations) {\n return operations.reduce((headers, operation) => {\n return mergeHeaders(headers, operation.getContext().headers);\n }, createHeadersWithClientAwareness({\n headers: this.options.headers,\n clientAwareness: operations[0]?.getContext()?.clientAwareness\n }));\n }\n createBatchKey(operation) {\n const context = operation.getContext();\n if (context.skipBatching) {\n return Math.random().toString(36).substr(2, 9);\n }\n const headers = context.headers && context.headers.keys().map(k => context.headers.get(k));\n const opts = JSON.stringify({\n includeQuery: context.includeQuery,\n includeExtensions: context.includeExtensions,\n headers\n });\n return prioritize(context.uri, this.options.uri) + opts;\n }\n request(op) {\n return this.batcher.request(op);\n }\n}\nlet HttpBatchLink = /*#__PURE__*/(() => {\n class HttpBatchLink {\n httpClient;\n constructor(httpClient) {\n this.httpClient = httpClient;\n }\n create(options) {\n return new HttpBatchLinkHandler(this.httpClient, options);\n }\n static ɵfac = function HttpBatchLink_Factory(t) {\n return new (t || HttpBatchLink)(i0.ɵɵinject(i1.HttpClient));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: HttpBatchLink,\n factory: HttpBatchLink.ɵfac,\n providedIn: 'root'\n });\n }\n return HttpBatchLink;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// http\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { HttpBatchLink, HttpBatchLinkHandler, HttpLink, HttpLinkHandler };\n","import { Injectable } from '@angular/core';\r\nimport { InMemoryCache } from '@apollo/client/core';\r\nimport { Apollo } from 'apollo-angular';\r\nimport { HttpLink } from 'apollo-angular/http';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { TcsConfigurationService } from 'src/app/core/configuration.service';\r\nimport { CompanyContextService } from 'src/app/shared/company-context.service';\r\nimport { createClientLinks } from 'src/util/apollo/apollo-client-links';\r\nimport { AppInsightsService } from 'src/lib/tcs-app-insights/app-insights-initializer.service';\r\nimport possibleTypesResultData from '../../../src/graphql/generated/graphql-possible-types.generated';\r\nimport { Logger } from '../shared/tcs-logging/logger';\r\n\r\nconst { possibleTypes } = possibleTypesResultData;\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class ApolloInitializerService {\r\n private _initialized$ = new BehaviorSubject(false);\r\n\r\n get initialized$() {\r\n return this._initialized$.asObservable();\r\n }\r\n\r\n constructor(\r\n private _apollo: Apollo,\r\n private _tcsConfig: TcsConfigurationService,\r\n private _httpLink: HttpLink,\r\n private _companyContext: CompanyContextService,\r\n private _logger: Logger,\r\n private _appInsightsService: AppInsightsService,\r\n ) {}\r\n\r\n public init() {\r\n this._apollo.create({\r\n link: createClientLinks(\r\n this._tcsConfig.value,\r\n this._companyContext,\r\n this._httpLink,\r\n this._logger,\r\n this._appInsightsService,\r\n ),\r\n cache: new InMemoryCache({ possibleTypes }),\r\n defaultOptions: {\r\n watchQuery: {\r\n fetchPolicy: 'no-cache',\r\n errorPolicy: 'all',\r\n },\r\n query: {\r\n fetchPolicy: 'no-cache',\r\n errorPolicy: 'all',\r\n },\r\n },\r\n });\r\n this._initialized$.next(true);\r\n }\r\n}\r\n","import { Injectable, OnDestroy } from '@angular/core';\r\nimport { ActivatedRoute, NavigationEnd, NavigationStart, Params, Router } from '@angular/router';\r\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\r\nimport { filter, map, switchMap, take, takeUntil } from 'rxjs/operators';\r\nimport { Logger } from 'src/app/shared/tcs-logging/logger';\r\nimport { AppInsightsService } from 'src/lib/tcs-app-insights/app-insights-initializer.service';\r\nimport { createSafeProps } from 'src/lib/tcs-app-insights/app-insights-util';\r\nimport { getInnermostChildOrSelf, getRoutePath } from 'src/util/angular/ng-router-helpers';\r\nimport { filterNull } from 'src/util/rxjs/operators/filter-null';\r\n\r\nexport interface PageView {\r\n title: string;\r\n url: string;\r\n route: string;\r\n startRoute: string;\r\n startUrl: string;\r\n startTime: number;\r\n endTime: number;\r\n durationInMs: number;\r\n firstLoad: boolean;\r\n queryParams: Params;\r\n params: Params;\r\n navigationStart: NavigationStart;\r\n navigationEnd: NavigationEnd;\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class PageViewService implements OnDestroy {\r\n private static initialized = false;\r\n private _onDestroy$ = new Subject();\r\n private readonly _pageviews$ = new ReplaySubject(1);\r\n public get pageviews$(): Observable {\r\n return this._pageviews$.asObservable();\r\n }\r\n constructor(\r\n private _router: Router,\r\n activatedRoute: ActivatedRoute,\r\n private _logger: Logger,\r\n private _appInsightsService: AppInsightsService,\r\n ) {\r\n const pageviews$ = _router.events.pipe(\r\n map((e) => {\r\n if (e instanceof NavigationStart) {\r\n const startTime = Math.round(performance.now());\r\n const startRoute = getRoutePath(activatedRoute.snapshot);\r\n return { navigationStart: e, startUrl: window.location.href, startTime, startRoute };\r\n }\r\n return undefined;\r\n }),\r\n filterNull(),\r\n switchMap(({ navigationStart, startRoute, startUrl, startTime }) => {\r\n return this._router.events.pipe(\r\n filter((e) => e instanceof NavigationEnd && e.id === navigationStart.id),\r\n map((e) => e as NavigationEnd),\r\n take(1),\r\n map((navigationEnd) => {\r\n const endTime = Math.round(performance.now());\r\n const firstLoad = navigationEnd.id === 1;\r\n const endRouteSnapshot = getInnermostChildOrSelf(activatedRoute.snapshot);\r\n const endRoute = getRoutePath(activatedRoute.snapshot);\r\n const durationInMs = Math.round(endTime - startTime);\r\n const params = activatedRoute.snapshot.pathFromRoot\r\n .map((r) => r.params)\r\n .reduce((prev, next) => {\r\n return {\r\n ...prev,\r\n ...next,\r\n };\r\n }, {});\r\n\r\n const queryParams = endRouteSnapshot.pathFromRoot\r\n .map((r) => r.queryParams)\r\n .reduce((prev, next) => {\r\n return {\r\n ...prev,\r\n ...next,\r\n };\r\n }, {});\r\n\r\n let title: string;\r\n const routeTitle = endRouteSnapshot.data.title;\r\n if (routeTitle != null) {\r\n title = routeTitle;\r\n } else {\r\n title = '';\r\n }\r\n const url = window.location.href;\r\n const pv: PageView = {\r\n title,\r\n url,\r\n startTime,\r\n endTime,\r\n durationInMs,\r\n firstLoad,\r\n route: endRoute,\r\n startRoute,\r\n startUrl,\r\n queryParams,\r\n params,\r\n navigationStart,\r\n navigationEnd,\r\n };\r\n return pv;\r\n }),\r\n );\r\n }),\r\n );\r\n\r\n pageviews$.pipe(takeUntil(this._onDestroy$)).subscribe(this._pageviews$);\r\n }\r\n\r\n public init() {\r\n if (!PageViewService.initialized) {\r\n this.pageviews$.pipe(takeUntil(this._onDestroy$)).subscribe((pageView) => {\r\n this._appInsightsService.appInsights?.trackPageView({\r\n name: pageView.route,\r\n uri: pageView.url,\r\n properties: { duration: pageView.durationInMs, ...createSafeProps(pageView) },\r\n });\r\n });\r\n PageViewService.initialized = true;\r\n } else {\r\n this._logger.warning('PageViewService has already been initialized');\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this._onDestroy$.next(null);\r\n this._onDestroy$.complete();\r\n }\r\n}\r\n","import { ComponentRef, Injectable, OnDestroy, ViewContainerRef } from '@angular/core';\r\nimport { NavigationCancel, NavigationError, Router } from '@angular/router';\r\nimport { filter, takeUntil } from 'rxjs/operators';\r\nimport { RouterService } from 'src/app/shared/shared-base/amg-ui/router.service';\r\nimport { Logger } from 'src/app/shared/tcs-logging/logger';\r\nimport { Subject } from 'rxjs';\r\nimport { MatLegacyProgressBar as MatProgressBar } from '@angular/material/legacy-progress-bar';\r\nimport { PageViewService } from './pageview.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class RouterLoadingService implements OnDestroy {\r\n private static initialized = false;\r\n private _onDestroy$ = new Subject();\r\n private _loadingCmp: ComponentRef;\r\n constructor(\r\n private _routerService: RouterService,\r\n private _router: Router,\r\n private _logger: Logger,\r\n private _pageview: PageViewService,\r\n ) {}\r\n\r\n public init(ref: ViewContainerRef) {\r\n if (!RouterLoadingService.initialized) {\r\n this._loadingCmp = ref.createComponent(MatProgressBar, {\r\n injector: ref.injector,\r\n index: 0,\r\n });\r\n const vcr = this._loadingCmp.injector.get(ViewContainerRef);\r\n this._loadingCmp.instance.mode = 'indeterminate';\r\n this._loadingCmp.instance.color = 'accent';\r\n\r\n this._routerService.navigationStart$.pipe(takeUntil(this._onDestroy$)).subscribe(() => {\r\n this.loading(vcr);\r\n });\r\n this._router.events\r\n .pipe(\r\n filter((e) => {\r\n return e instanceof NavigationCancel || e instanceof NavigationError;\r\n }),\r\n takeUntil(this._onDestroy$),\r\n )\r\n .subscribe(() => {\r\n this.loaded(vcr);\r\n });\r\n this._pageview.pageviews$.pipe(takeUntil(this._onDestroy$)).subscribe(() => {\r\n this.loaded(vcr);\r\n });\r\n\r\n RouterLoadingService.initialized = true;\r\n } else {\r\n this._logger.warning('RouterLoadingService has already been initialized');\r\n }\r\n }\r\n\r\n public loading(vcr: ViewContainerRef) {\r\n vcr.element.nativeElement.style = 'z-index:100;position:absolute;top:0';\r\n }\r\n\r\n public loaded(vcr: ViewContainerRef) {\r\n vcr.element.nativeElement.style = 'display:none';\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this._onDestroy$.next(null);\r\n this._onDestroy$.complete();\r\n this._loadingCmp.destroy();\r\n }\r\n}\r\n","import { Injectable, OnDestroy } from '@angular/core';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\r\nimport { combineLatest, of, Subject } from 'rxjs';\r\nimport { filter, map, switchMap, takeUntil } from 'rxjs/operators';\r\nimport { TcsConfigurationService } from 'src/app/core/configuration.service';\r\nimport { BreadcrumbService } from 'src/lib/amg-breadcrumbs/breadcrumb.service';\r\nimport { TabsService } from 'src/lib/tcs-tabs/tabs.service';\r\nimport { combineTitleSegments, getTitleSegments } from 'src/util/angular/ng-router-helpers';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class RouteTitleService implements OnDestroy {\r\n private _onDestroy$ = new Subject();\r\n public enabled = false;\r\n\r\n constructor(\r\n private _titleService: Title,\r\n private _router: Router,\r\n private _activatedRoute: ActivatedRoute,\r\n private _breadcrumbs: BreadcrumbService,\r\n private _config: TcsConfigurationService,\r\n private _tabs: TabsService,\r\n ) {}\r\n\r\n public setTitleOnNavigation() {\r\n if (!this.enabled) {\r\n this.enabled = true;\r\n this._router.events\r\n .pipe(\r\n filter((event: any) => event instanceof NavigationEnd),\r\n map(() => this._activatedRoute.snapshot),\r\n filter((r) => r.outlet === 'primary'),\r\n switchMap((r) =>\r\n this._breadcrumbs.value$.pipe(\r\n map((breadcrumbs) => {\r\n const titleSegments = getTitleSegments(r);\r\n let title: string | undefined;\r\n if (titleSegments.length > 0) {\r\n title = combineTitleSegments(titleSegments);\r\n } else if (breadcrumbs.length > 0) {\r\n title = breadcrumbs\r\n .map((b) => b.name)\r\n .reverse()\r\n .join(' · ');\r\n }\r\n return title;\r\n }),\r\n ),\r\n ),\r\n switchMap((title) => combineLatest([of(title), this._tabs.isTabActive$])),\r\n takeUntil(this._onDestroy$),\r\n )\r\n .subscribe(([title, isTabActive]) => {\r\n const prefix = isTabActive ? '*' : '';\r\n const envSuffix =\r\n this._config.environmentKey === 'prod' ? '' : ` (${this._config.environmentDisplay})`;\r\n const titleStart = title != null ? `${title} | ` : '';\r\n this._titleService.setTitle(`${prefix}${titleStart}TCS${envSuffix}`);\r\n });\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this._onDestroy$.next(null);\r\n this._onDestroy$.complete();\r\n }\r\n}\r\n","import { Injectable, OnDestroy } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { PageViewService } from 'src/app/core/pageview.service';\r\nimport { Logger } from 'src/app/shared/tcs-logging/logger';\r\nimport { getRoutePath } from 'src/util/angular/ng-router-helpers';\r\nimport { race, Subject } from 'rxjs';\r\nimport { TickService } from 'src/app/shared/tick.service';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { createSafeProps } from '../tcs-app-insights/app-insights-util';\r\nimport { AppInsightsService } from '../tcs-app-insights/app-insights-initializer.service';\r\nimport { NewRelicService } from '../tcs-new-relic/new-relic-initializer.service';\r\n\r\ntype RequestIdleCallbackHandle = (handle: number) => void;\r\ntype RequestIdleCallbackOptions = {\r\n timeout?: number;\r\n};\r\ntype RequestIdleCallbackDeadline = {\r\n readonly didTimeout: boolean;\r\n timeRemaining: () => number;\r\n};\r\n\r\ndeclare global {\r\n interface Window {\r\n requestIdleCallback: (\r\n callback: (deadline: RequestIdleCallbackDeadline) => void,\r\n options?: RequestIdleCallbackOptions | undefined,\r\n ) => number;\r\n cancelIdleCallback: RequestIdleCallbackHandle;\r\n }\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class CpuIdleObserverService implements OnDestroy {\r\n private static initialized = false;\r\n private stopInterval$ = new Subject();\r\n private _onDestroy$ = new Subject();\r\n\r\n constructor(\r\n private _pageViews: PageViewService,\r\n private _activatedRoute: ActivatedRoute,\r\n private _log: Logger,\r\n private _tick: TickService,\r\n private _appInsightsService: AppInsightsService,\r\n private _newRelicService: NewRelicService,\r\n ) {}\r\n\r\n public init() {\r\n if (CpuIdleObserverService.initialized) {\r\n this._log.warning('CpuIdleObserverService.init: already initialized');\r\n return;\r\n }\r\n // try {\r\n // this._initPageViewTracking();\r\n // } catch (err) {\r\n // this._log.error(`CpuIdleObserverService_initPageViewTracking(): ${err}`);\r\n // }\r\n\r\n // try {\r\n // this._initRegularCpuObservation();\r\n // } catch (err) {\r\n // this._log.error(`CpuIdleObserverService._initRegularCpuObservation(): ${err}`);\r\n // }\r\n\r\n CpuIdleObserverService.initialized = true;\r\n }\r\n\r\n private _initPageViewTracking() {\r\n const sub = this._pageViews.pageviews$\r\n .pipe(takeUntil(this._onDestroy$))\r\n .subscribe((pageView) => {\r\n if (window.requestIdleCallback == null) {\r\n this._log.warning(\r\n 'CpuIdleObserverService:_initPageViewTracking: browser does not support requestIdleCallback, not observing pageviews',\r\n );\r\n sub.unsubscribe();\r\n return;\r\n }\r\n window.requestIdleCallback(() => {\r\n try {\r\n const timeUntilIdleMs = Math.round(performance.now() - pageView.endTime);\r\n const pageResponsiveInMs = Math.round(timeUntilIdleMs + pageView.durationInMs);\r\n this._appInsightsService.appInsights?.trackEvent({\r\n name: 'cpuIdleAfterPageView',\r\n properties: createSafeProps({ pageView, timeUntilIdleMs, pageResponsiveInMs }),\r\n });\r\n this._newRelicService.newRelic?.addPageAction('cpuIdleAfterPageView', {\r\n ...createSafeProps({ pageView, timeUntilIdleMs, pageResponsiveInMs }),\r\n });\r\n } catch (err) {\r\n this._log.error(`CpuIdleObserverService pageViews$ requestIdleCallback: ${err}`);\r\n }\r\n });\r\n });\r\n }\r\n\r\n private _initRegularCpuObservation() {\r\n const destroy$ = race(this.stopInterval$, this._onDestroy$);\r\n this._tick.everyFiveSeconds$.pipe(takeUntil(destroy$)).subscribe(() => {\r\n if (window.requestIdleCallback == null) {\r\n this._log.warning(\r\n 'CpuIdleObserverService:_initRegularCpuObservation: browser does not support requestIdleCallback, not observing timeUntilCpuIdle',\r\n );\r\n this.stopInterval$.next(null);\r\n this.stopInterval$.complete();\r\n return;\r\n }\r\n\r\n const beginTime = Math.round(performance.now());\r\n const beginUrl = window.location.href;\r\n const beginRoute = getRoutePath(this._activatedRoute.snapshot);\r\n\r\n window.requestIdleCallback(() => {\r\n try {\r\n const endTime = Math.round(performance.now());\r\n const endUrl = window.location.href;\r\n const timeUntilIdle = endTime - beginTime;\r\n const endRoute = getRoutePath(this._activatedRoute.snapshot);\r\n const props = {\r\n beginTime,\r\n beginUrl,\r\n beginRoute,\r\n endTime,\r\n endUrl,\r\n endRoute,\r\n timeUntilIdle,\r\n };\r\n this._appInsightsService.appInsights?.trackMetric({\r\n name: 'timeUntilCpuIdle',\r\n average: timeUntilIdle,\r\n properties: createSafeProps(props),\r\n });\r\n this._newRelicService.newRelic?.addPageAction('cpuIdleAfterPageView', {\r\n ...createSafeProps(props),\r\n });\r\n } catch (err) {\r\n this._log.error(\r\n `CpuIdleObserverService timeUntilCpuIdle interrval requestIdleCallback: ${err}`,\r\n );\r\n }\r\n });\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this._onDestroy$.next(null);\r\n this._onDestroy$.complete();\r\n }\r\n}\r\n","import { Injectable, OnDestroy } from '@angular/core';\r\nimport {\r\n combineLatest,\r\n distinctUntilChanged,\r\n filter,\r\n map,\r\n skip,\r\n startWith,\r\n Subject,\r\n switchMap,\r\n takeUntil,\r\n} from 'rxjs';\r\nimport { TcsAudioPlayer } from 'src/app/shared/audio-player/tcs-audio-player';\r\nimport { TickService } from 'src/app/shared/tick.service';\r\nimport { Store } from '@ngrx/store';\r\nimport { AppState } from 'src/store/appstate';\r\nimport { observeCommunicationCenterFromRouteNavigationEnd } from 'src/models/communication-center-view-model';\r\nimport { RouterService } from 'src/app/shared/shared-base/amg-ui/router.service';\r\nimport { undefinedOrSwitchMap } from 'src/util/rxjs';\r\nimport { selectUnitSummaryEntitiesByCommunicationCenterId } from 'src/store/generated/unit-summary-record.generated';\r\nimport { shareReplaySafe } from 'src/util/rxjs/operators/share-replay-safe';\r\nimport { PositionReportAlertService } from './position-report-alert.service';\r\n\r\nconst soundPath = './assets/media/alarm1.mp3';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class PositionReportAlertAudibleService implements OnDestroy {\r\n private readonly _player: TcsAudioPlayer;\r\n private readonly _playLoop$ = new Subject();\r\n private _onDestroy$ = new Subject();\r\n\r\n constructor(\r\n private _tick: TickService,\r\n private _positionReport: PositionReportAlertService,\r\n private _router: RouterService,\r\n private _store: Store,\r\n ) {\r\n this._player = new TcsAudioPlayer(soundPath, {\r\n load: true,\r\n volume: 0.5,\r\n });\r\n }\r\n\r\n public init() {\r\n const communicationCenter$ = observeCommunicationCenterFromRouteNavigationEnd(\r\n this._router,\r\n this._store,\r\n 'all',\r\n );\r\n\r\n const unitsByCommCenter$ = communicationCenter$.pipe(\r\n undefinedOrSwitchMap((commCenter) =>\r\n this._store.select(selectUnitSummaryEntitiesByCommunicationCenterId(commCenter.id)),\r\n ),\r\n shareReplaySafe(1),\r\n );\r\n\r\n const isRequestPage$ = this._router.navigationEnd$.pipe(\r\n startWith(null),\r\n map((ev) => /\\/cards\\/.*?\\/request/.test(ev?.url ?? '')),\r\n );\r\n\r\n const alertsByCommCenter$ = combineLatest([\r\n unitsByCommCenter$,\r\n this._positionReport.alerts$,\r\n isRequestPage$,\r\n ]).pipe(\r\n map(([units, alerts, isRequestPage]) =>\r\n units != null && alerts != null && units.count() > 0 && alerts.count() > 0 && !isRequestPage\r\n ? alerts.filter((alert) => units.find((u) => u.id === alert.unitId) != null)\r\n : undefined,\r\n ),\r\n );\r\n\r\n const hasAlerts$ = alertsByCommCenter$.pipe(map((alerts) => (alerts?.count() ?? 0) > 0));\r\n\r\n combineLatest([communicationCenter$, hasAlerts$, this._player.ready$])\r\n .pipe(\r\n map(\r\n ([commCenter, hasAlerts, audioReady]) =>\r\n commCenter?.playAlertForManualPositionReports === true && hasAlerts && audioReady,\r\n ),\r\n distinctUntilChanged(),\r\n takeUntil(this._onDestroy$),\r\n )\r\n .subscribe((canPlayAlerts) => {\r\n if (canPlayAlerts) {\r\n this._playLoop$.next(true);\r\n } else {\r\n this._playLoop$.next(false);\r\n }\r\n });\r\n\r\n const stopped$ = this._playLoop$.pipe(filter((play) => !play));\r\n this._playLoop$\r\n .pipe(\r\n distinctUntilChanged(),\r\n filter((play) => play),\r\n switchMap(() => this._tick.everyTenSeconds$.pipe(skip(1), takeUntil(stopped$))),\r\n takeUntil(this._onDestroy$),\r\n )\r\n .subscribe(() => this._player.play());\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this._onDestroy$.next(null);\r\n this._onDestroy$.complete();\r\n }\r\n}\r\n","import { ComponentRef, Injectable, ViewContainerRef } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { AppComponent } from 'src/app/app.component';\r\nimport { RouteTitleService } from 'src/app/shared/route-title.service';\r\nimport { CpuIdleObserverService } from 'src/lib/amg-monitoring/cpu-idle-observer.service';\r\nimport { ActiveAlertObserverService } from 'src/lib/tcs-active-alert/active-alert-observer.service';\r\nimport { UserDataContextService } from 'src/lib/tcs-identity/user-data-context.service';\r\nimport { PollingService } from 'src/lib/tcs-polling-service/polling.service';\r\nimport { PositionReportAlertAudibleService } from '../ops/ops-lib/position-report-alerts/position-report-alert-audible.service';\r\nimport { ApolloInitializerService } from './apollo-initializer.service';\r\nimport { PageViewService } from './pageview.service';\r\nimport { RouterLoadingService } from './router-loading.service';\r\n\r\nexport function bootstrapApp(appBootstrapper: AppBootstrapService) {\r\n return (componentRef: ComponentRef) => {\r\n if (componentRef.instance instanceof AppComponent) {\r\n const ref = componentRef.injector.get(ViewContainerRef);\r\n appBootstrapper.init(ref);\r\n }\r\n };\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AppBootstrapService {\r\n constructor(\r\n private _apollo: ApolloInitializerService,\r\n private _pageView: PageViewService,\r\n private _routerLoading: RouterLoadingService,\r\n private _routeTitle: RouteTitleService,\r\n private _userData: UserDataContextService,\r\n private _router: Router,\r\n private _cpuIdleObserver: CpuIdleObserverService,\r\n private _polling: PollingService,\r\n private _activeAlertObserver: ActiveAlertObserverService,\r\n private _positionReportAlertAudibleService: PositionReportAlertAudibleService,\r\n ) {}\r\n\r\n public async init(ref: ViewContainerRef): Promise {\r\n this._apollo.init();\r\n this._pageView.init();\r\n this._routerLoading.init(ref);\r\n this._routeTitle.setTitleOnNavigation();\r\n this._userData.init();\r\n this._cpuIdleObserver.init();\r\n this._polling.init();\r\n this._positionReportAlertAudibleService.init();\r\n }\r\n}\r\n","import { Injectable, OnDestroy } from '@angular/core';\r\nimport { SwUpdate, VersionReadyEvent } from '@angular/service-worker';\r\nimport { TdDialogService } from '@covalent/core/dialogs';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { TickService } from 'src/app/shared/tick.service';\r\nimport { countdownInSeconds } from 'src/util/rxjs/observables';\r\nimport { firstValueOrUndefined } from 'src/util/rxjs/observables';\r\nimport { AppInsightsService } from 'src/lib/tcs-app-insights/app-insights-initializer.service';\r\nimport { NewRelicService } from 'src/lib/tcs-new-relic/new-relic-initializer.service';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AppUpdaterService implements OnDestroy {\r\n private _onDestroy$ = new Subject();\r\n\r\n constructor(\r\n private readonly _updates: SwUpdate,\r\n private readonly _tick: TickService,\r\n private _dialogService: TdDialogService,\r\n private _appInsightsService: AppInsightsService,\r\n private _newRelicService: NewRelicService,\r\n ) {}\r\n\r\n private pollForUpdates() {\r\n this._tick.everyMinute$.pipe(takeUntil(this._onDestroy$)).subscribe(() => {\r\n this._updates.checkForUpdate().catch((reason) => {\r\n this._appInsightsService.appInsights?.trackEvent({\r\n name: 'ServiceWorker:CheckForUpdateFailed',\r\n properties: { reason },\r\n });\r\n\r\n this._newRelicService.newRelic?.addPageAction('ServiceWorker:CheckForUpdateFailed', {\r\n reason,\r\n });\r\n });\r\n });\r\n }\r\n\r\n private async activateAndReload(event: VersionReadyEvent) {\r\n const isActivated = await this._updates.activateUpdate().catch((error) => {\r\n this._appInsightsService.appInsights?.trackEvent({\r\n name: 'ServiceWorker:UpdateActivatedError',\r\n properties: {\r\n error,\r\n currentHash: event.currentVersion.hash,\r\n latestHash: event.latestVersion.hash,\r\n },\r\n });\r\n\r\n this._newRelicService.newRelic?.addPageAction('ServiceWorker:UpdateActivatedError', {\r\n error,\r\n currentHash: event.currentVersion.hash,\r\n latestHash: event.latestVersion.hash,\r\n });\r\n\r\n return false;\r\n });\r\n this._appInsightsService.appInsights?.trackEvent({\r\n name: 'ServiceWorker:UpdateActivated',\r\n properties: {\r\n currentHash: isActivated ? event.latestVersion.hash : event.currentVersion.hash,\r\n previousHash: isActivated ? event.currentVersion.hash : (null as any),\r\n },\r\n });\r\n\r\n this._newRelicService.newRelic?.addPageAction('ServiceWorker:UpdateActivated', {\r\n currentHash: isActivated ? event.latestVersion.hash : event.currentVersion.hash,\r\n previousHash: isActivated ? event.currentVersion.hash : (null as any),\r\n });\r\n\r\n window.location.reload();\r\n }\r\n\r\n private listenForAvailableUpdates() {\r\n this._updates.versionUpdates.pipe(takeUntil(this._onDestroy$)).subscribe(async (event) => {\r\n if (event.type === 'VERSION_READY') {\r\n this._appInsightsService.appInsights?.trackEvent({\r\n name: 'ServiceWorker:UpdateAvailable',\r\n properties: {\r\n currentHash: event.currentVersion.hash,\r\n availableHash: event.latestVersion.hash,\r\n },\r\n });\r\n\r\n this._newRelicService.newRelic?.addPageAction('ServiceWorker:UpdateAvailable', {\r\n currentHash: event.currentVersion.hash,\r\n availableHash: event.latestVersion.hash,\r\n });\r\n\r\n const secondsTillRefresh = 60;\r\n const message = (seconds: number) =>\r\n `Click \"Update\" to update now. The application will update automatically in ${seconds} seconds.`;\r\n\r\n const alert = this._dialogService.openAlert({\r\n title: 'Application Update Available',\r\n message: message(secondsTillRefresh),\r\n closeButton: 'Update',\r\n });\r\n countdownInSeconds(secondsTillRefresh)\r\n .pipe(takeUntil(this._onDestroy$))\r\n // eslint-disable-next-line rxjs/no-nested-subscribe\r\n .subscribe({\r\n next: (seconds) => {\r\n if (alert != null && alert.componentInstance != null) {\r\n alert.componentInstance.message = message(seconds);\r\n }\r\n },\r\n error: (err) => {},\r\n complete: async () => {\r\n this._appInsightsService.appInsights?.trackEvent({\r\n name: 'ServiceWorker:ActivateTriggeredByTimeout',\r\n properties: {\r\n currentHash: event.currentVersion.hash,\r\n availableHash: event.latestVersion.hash,\r\n },\r\n });\r\n\r\n this._newRelicService.newRelic?.addPageAction(\r\n 'ServiceWorker:ActivateTriggeredByTimeout',\r\n {\r\n currentHash: event.currentVersion.hash,\r\n availableHash: event.latestVersion.hash,\r\n },\r\n );\r\n\r\n await this.activateAndReload(event);\r\n },\r\n });\r\n\r\n await firstValueOrUndefined(alert.beforeClosed().pipe(takeUntil(this._onDestroy$)));\r\n this._appInsightsService.appInsights?.trackEvent({\r\n name: 'ServiceWorker:ActivateTriggeredByUser',\r\n properties: {\r\n currentHash: event.currentVersion.hash,\r\n availableHash: event.latestVersion.hash,\r\n },\r\n });\r\n\r\n this._newRelicService.newRelic?.addPageAction('ServiceWorker:ActivateTriggeredByUser', {\r\n currentHash: event.currentVersion.hash,\r\n availableHash: event.latestVersion.hash,\r\n });\r\n\r\n await this.activateAndReload(event);\r\n } else if (event.type === 'VERSION_INSTALLATION_FAILED') {\r\n this._appInsightsService.appInsights?.trackEvent({\r\n name: 'ServiceWorker:UpdateInstallationFailed',\r\n properties: {\r\n versionHash: event.version.hash,\r\n error: event.error,\r\n },\r\n });\r\n this._newRelicService.newRelic?.addPageAction('ServiceWorker:UpdateInstallationFailed', {\r\n versionHash: event.version.hash,\r\n error: event.error,\r\n });\r\n await this.alertAndReloadPage();\r\n }\r\n });\r\n }\r\n\r\n private listenForUnrecoverableUpdates() {\r\n this._updates.unrecoverable.pipe(takeUntil(this._onDestroy$)).subscribe(async (event) => {\r\n this._appInsightsService.appInsights?.trackEvent({\r\n name: 'ServiceWorker:UnrecoverableUpdate',\r\n properties: { reason: event.reason },\r\n });\r\n this._newRelicService.newRelic?.addPageAction('ServiceWorker:UnrecoverableUpdate', {\r\n reason: event.reason,\r\n });\r\n await this.alertAndReloadPage();\r\n });\r\n }\r\n\r\n private async alertAndReloadPage() {\r\n const alert = this._dialogService.openAlert({\r\n title: 'Update Error',\r\n message: 'An error occurred while updating the application. Click OK to reload the page.',\r\n closeButton: 'OK',\r\n });\r\n await firstValueOrUndefined(alert.beforeClosed().pipe(takeUntil(this._onDestroy$)));\r\n window.location.reload();\r\n }\r\n\r\n public init() {\r\n if (this._updates.isEnabled) {\r\n this.pollForUpdates();\r\n this.listenForAvailableUpdates();\r\n this.listenForUnrecoverableUpdates();\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this._onDestroy$.next(null);\r\n this._onDestroy$.complete();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { AppInsightsService } from 'src/lib/tcs-app-insights/app-insights-initializer.service';\r\nimport { AuthenticationService } from 'src/lib/tcs-identity/authentication.service';\r\nimport { TabsService } from 'src/lib/tcs-tabs/tabs.service';\r\nimport { AppUpdaterService } from './app-updater.service';\r\n\r\nexport function initApp(appInitializer: AppInitializerService) {\r\n return async () => appInitializer.init();\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AppInitializerService {\r\n constructor(\r\n private _updater: AppUpdaterService,\r\n private _appInsights: AppInsightsService,\r\n private _auth: AuthenticationService,\r\n private _tabs: TabsService,\r\n ) {}\r\n\r\n public async init() {\r\n this._tabs.init();\r\n await this._auth.init();\r\n this._appInsights.init();\r\n this._updater.init();\r\n }\r\n}\r\n","import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\r\nimport { APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, NgModule } from '@angular/core';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MatNativeDateModule } from '@angular/material/core';\r\nimport { MatLegacyProgressSpinnerModule as MatProgressSpinnerModule } from '@angular/material/legacy-progress-spinner';\r\nimport { MatLegacySliderModule as MatSliderModule } from '@angular/material/legacy-slider';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { RouterModule } from '@angular/router';\r\nimport { ServiceWorkerModule } from '@angular/service-worker';\r\nimport { CovalentDialogsModule } from '@covalent/core/dialogs';\r\nimport { EffectsModule } from '@ngrx/effects';\r\nimport { RouterStateSerializer, StoreRouterConnectingModule } from '@ngrx/router-store';\r\nimport { StoreModule } from '@ngrx/store';\r\nimport { OktaAuthModule } from '@okta/okta-angular';\r\nimport { ApolloModule } from 'apollo-angular';\r\nimport { TypedReactiveFormsModule } from '@gmrappdev/formsafe';\r\nimport { PubnubEntityStoreEffects } from 'src/app/ops/pubnub-entity-store.effects';\r\nimport { Four04PageComponent } from 'src/app/pages/components/four04-page/four04-page.component';\r\nimport { buildTcsPermissions } from 'src/app/shared/authorization/permissions';\r\nimport { SplashScreenComponent } from 'src/app/shared/components/splash-screen/splash-screen.component';\r\nimport { TcsLoggingModule } from 'src/app/shared/tcs-logging/tcs-logging.module';\r\nimport { environment } from 'src/environments/environment';\r\nimport { AmgAddressModule } from 'src/lib/amg-address/amg-address.module';\r\nimport { PERMISSIONS_CONFIG } from 'src/lib/amg-authorization/permissions.model';\r\nimport { AmgHumanizeModule } from 'src/lib/amg-humanize/amg-humanize.module';\r\nimport { AmgPubnubModule } from 'src/lib/amg-pubnub/amg-pubnub.module';\r\nimport { TcsClientSyncModule } from 'src/lib/tcs-client-sync/tcs-client-sync.module';\r\nimport { ImpersonationInterceptor } from 'src/lib/tcs-identity/impersonation.interceptor';\r\nimport { oktaConfigProvider } from 'src/lib/tcs-identity/okta-config.provider';\r\nimport { TcsIdentityModule } from 'src/lib/tcs-identity/tcs-identity.module';\r\nimport { TcsToastModule } from 'src/lib/tcs-toast/tcs-toast.module';\r\nimport { AuthStoreEffects } from 'src/store/auth/auth-store.effects';\r\nimport { reducerProvider, reducerToken } from 'src/store/reducers';\r\nimport { CustomSerializer } from 'src/store/router/router-store';\r\nimport { TcsLoadingModule } from 'src/lib/tcs-loading/tcs-loading.module';\r\nimport { MonacoEditorModule } from 'ngx-monaco-editor-v2';\r\nimport { monacoConfig } from 'src/lib/tcs-editor/editor/editor.component';\r\nimport { AuthenticationInterceptor } from '../../lib/tcs-identity/authentication.interceptor';\r\nimport { AppRoutingModule } from '../app-routing.module';\r\nimport { PassdownLogEffects } from '../ops/ops-dialogs/passdown-log-dialog/passdown-log-effects';\r\nimport { AppBootstrapService, bootstrapApp } from './app-bootstrap.service';\r\nimport { AppInitializerService, initApp } from './app-initializer.service';\r\nimport { UnauthorizedPageComponent } from './components/unauthorized-page/unauthorized-page.component';\r\n\r\n@NgModule({\r\n imports: [\r\n // Angular\r\n BrowserModule,\r\n BrowserAnimationsModule,\r\n TypedReactiveFormsModule,\r\n HttpClientModule,\r\n RouterModule,\r\n ServiceWorkerModule.register('ngsw-worker.js', {\r\n enabled: environment.production,\r\n }),\r\n\r\n FlexLayoutModule,\r\n\r\n // Angular Material\r\n MatNativeDateModule,\r\n MatProgressSpinnerModule,\r\n MatSliderModule,\r\n\r\n CovalentDialogsModule,\r\n\r\n // Apollo/GraphQL\r\n ApolloModule,\r\n // HttpLinkModule,\r\n\r\n // NGRX\r\n EffectsModule.forRoot([AuthStoreEffects, PubnubEntityStoreEffects, PassdownLogEffects]),\r\n StoreModule.forRoot(reducerToken),\r\n StoreRouterConnectingModule.forRoot(),\r\n // environment.production\r\n // ? []\r\n // : StoreDevtoolsModule.instrument({\r\n // maxAge: 25,\r\n // }),\r\n\r\n // TOOD: Possibly re-enable after memory leak is fixed.\r\n // StoreDevtoolsModule.instrument({\r\n // maxAge: 25,\r\n // }),\r\n\r\n // TCS\r\n\r\n AmgPubnubModule,\r\n AmgHumanizeModule,\r\n AmgAddressModule,\r\n AppRoutingModule,\r\n TcsClientSyncModule,\r\n TcsToastModule.forRoot(),\r\n TcsLoadingModule,\r\n\r\n // App infrastructure\r\n TcsLoggingModule,\r\n\r\n // Okta\r\n OktaAuthModule,\r\n MonacoEditorModule.forRoot(monacoConfig),\r\n ],\r\n declarations: [UnauthorizedPageComponent, Four04PageComponent, SplashScreenComponent],\r\n providers: [\r\n {\r\n provide: APP_BOOTSTRAP_LISTENER,\r\n useFactory: bootstrapApp,\r\n deps: [AppBootstrapService],\r\n multi: true,\r\n },\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: initApp,\r\n deps: [AppInitializerService],\r\n multi: true,\r\n },\r\n reducerProvider,\r\n {\r\n provide: RouterStateSerializer,\r\n useClass: CustomSerializer,\r\n },\r\n {\r\n provide: PERMISSIONS_CONFIG,\r\n useFactory: buildTcsPermissions,\r\n },\r\n oktaConfigProvider,\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: AuthenticationInterceptor,\r\n multi: true,\r\n },\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: ImpersonationInterceptor,\r\n multi: true,\r\n },\r\n ],\r\n exports: [\r\n TcsIdentityModule,\r\n ApolloModule,\r\n SplashScreenComponent,\r\n BrowserModule,\r\n RouterModule,\r\n FlexLayoutModule,\r\n TcsToastModule,\r\n ],\r\n})\r\nexport class CoreModule {}\r\n","import { NgModule } from '@angular/core';\r\nimport { REMOVE_STYLES_ON_COMPONENT_DESTROY } from '@angular/platform-browser';\r\nimport { AppComponent } from './app.component';\r\nimport { CoreModule } from './core/core.module';\r\n\r\n@NgModule({\r\n declarations: [AppComponent],\r\n imports: [CoreModule],\r\n bootstrap: [AppComponent],\r\n providers: [{ provide: REMOVE_STYLES_ON_COMPONENT_DESTROY, useValue: false }],\r\n})\r\nexport class AppModule {}\r\n","/**\r\n * Heavily based off of the 'observable-profiler' library\r\n * Added ability to ignore keywords within the error stack.\r\n * - if a pattern is matched the complete stack (grouped by error id) is removed.\r\n * Ref: https://github.com/awerlang/observable-profiler/blob/master/src/index.ts\r\n */\r\n\r\n/**\r\n * Represents the source of an subscription\r\n */\r\nexport class SubscriptionSource extends Error {\r\n /**\r\n * @param subscription A subscription to an Observable\r\n * @param id The id of the subscription chain\r\n */\r\n constructor(public readonly subscription: object, public readonly id: number) {\r\n super();\r\n }\r\n}\r\n\r\nlet subscribersGlobal: Set;\r\nlet isTracking = false;\r\n\r\n/**\r\n * Call setup() once before any calls to track()\r\n * @param Observable Bring your own Observable class to track\r\n */\r\nexport function setup(Observable: any) {\r\n // eslint-disable-next-line no-console\r\n console.warn(\r\n '================== Running Observable Tracker ==================\\n !!!!!! Be aware this will affect application performance. !!!!!!',\r\n );\r\n const origSubscribe = Observable.prototype.subscribe;\r\n Observable.prototype.subscribe = subscribe;\r\n\r\n let id = 0;\r\n let root = false;\r\n function subscribe(this: any, ...args: any[]) {\r\n let setRoot = false;\r\n if (!root) {\r\n setRoot = true;\r\n root = true;\r\n id++;\r\n }\r\n const subscription = origSubscribe.apply(this, args);\r\n if (isTracking) {\r\n const currentSubscribers = subscribersGlobal;\r\n const sub = new SubscriptionSource(subscription, id);\r\n currentSubscribers.add(sub);\r\n subscription.add(() => {\r\n currentSubscribers.delete(sub);\r\n });\r\n }\r\n if (setRoot) {\r\n root = false;\r\n }\r\n return subscription;\r\n }\r\n}\r\n\r\n/**\r\n * Accessor to the current subscription list.\r\n */\r\nexport class Iterator {\r\n constructor(private readonly subscribers: Set) {}\r\n\r\n /**\r\n * Returns a snapshot of current subscriptions\r\n */\r\n current() {\r\n return [...this.subscribers];\r\n }\r\n}\r\n\r\n/**\r\n * Returns a snapshot of current subscriptions since tracking started\r\n */\r\nexport function getSubscribers() {\r\n return new Iterator(subscribersGlobal);\r\n}\r\n\r\n/**\r\n * Starts/stops tracking of Observable subscriptions\r\n * @param canTrack `true` to start; `false` to stop\r\n */\r\nexport function track(canTrack = true) {\r\n if (isTracking === canTrack) {\r\n return;\r\n }\r\n isTracking = canTrack;\r\n if (canTrack) {\r\n subscribersGlobal = new Set();\r\n }\r\n return getSubscribers();\r\n}\r\n\r\nfunction delay(ms: number) {\r\n return new Promise((resolve) => {\r\n setTimeout(resolve, ms);\r\n });\r\n}\r\n\r\n/**\r\n * Outputs to console the list of active subscriptions\r\n * @param prefix Prints a prefix on each tracked subscription\r\n * @param timeout Give some leeway (in ms) for time-based subscriptions to finish\r\n * @param rewriteStack `true` to remove some noise from stack traces\r\n * @param filterStackRe a custom Regexp object to filter stack frames\r\n * @param reportInnerSubscriptions `true` to report indirect subscriptions\r\n * @param subscribers The result of a previous call to `track(false)`\r\n */\r\nexport async function printSubscribers({\r\n prefix = '',\r\n timeout = 0,\r\n rewriteStack = false,\r\n filterStackRe = undefined,\r\n reportInnerSubscriptions = false,\r\n ignoreStackFilterRe = undefined,\r\n subscribers = undefined,\r\n}: {\r\n prefix?: string;\r\n timeout?: number;\r\n rewriteStack?: boolean;\r\n filterStackRe?: RegExp;\r\n reportInnerSubscriptions?: boolean;\r\n ignoreStackFilterRe?: RegExp;\r\n subscribers?: Iterator;\r\n}) {\r\n const sub = subscribers ?? getSubscribers();\r\n\r\n await delay(timeout);\r\n\r\n const current = sub.current();\r\n if (!current.length) {\r\n return;\r\n }\r\n\r\n // eslint-disable-next-line no-console\r\n console.error(prefix, 'Total subscriptions (including indirect/nested):', current.length);\r\n\r\n const map = new Set();\r\n const errors: { prefix: string; val: SubscriptionSource }[] = [];\r\n current.forEach((val) => {\r\n if (!reportInnerSubscriptions && map.has(val.id)) {\r\n return;\r\n }\r\n if ((rewriteStack || filterStackRe != null) && val.stack != null) {\r\n const frames = val.stack.split('\\n');\r\n const stack =\r\n (filterStackRe != null &&\r\n frames\r\n .filter((it) => !it.includes('Observable.subscribe') && filterStackRe.test(it))\r\n .join('\\n')) ||\r\n frames.join('\\n');\r\n val.stack = stack;\r\n }\r\n errors.push({ prefix, val });\r\n map.add(val.id);\r\n });\r\n if (errors.length > 0) {\r\n if (ignoreStackFilterRe != null) {\r\n // group errors by id\r\n const groupByErrorId = errors.reduce((prev, cur) => {\r\n if (prev[cur.val.id] == null) {\r\n prev[cur.val.id] = [];\r\n }\r\n prev[cur.val.id].push({ prefix, val: cur.val });\r\n return prev;\r\n }, {} as { [key: string]: { prefix: string; val: SubscriptionSource }[] });\r\n\r\n // clear errors\r\n errors.length = 0;\r\n\r\n const ignored: { key: string; error: string }[] = [];\r\n // remove ignored groups\r\n for (const group in groupByErrorId) {\r\n if (group != null) {\r\n groupByErrorId[group].forEach((e) => {\r\n if (e.val.stack != null) {\r\n const matches = ignoreStackFilterRe.exec(e.val.stack);\r\n if (matches != null) {\r\n ignored.push({\r\n key: matches[0],\r\n error: e.val.stack,\r\n });\r\n }\r\n }\r\n });\r\n const canIgnoreGroup =\r\n groupByErrorId[group].find((e) =>\r\n e.val.stack != null ? ignoreStackFilterRe.test(e.val.stack) : false,\r\n ) != null;\r\n if (canIgnoreGroup) {\r\n delete groupByErrorId[group];\r\n }\r\n }\r\n }\r\n\r\n // flatten errors\r\n for (const group in groupByErrorId) {\r\n if (group != null) {\r\n errors.push(...groupByErrorId[group]);\r\n }\r\n }\r\n\r\n // create stats for ignored subscriptions\r\n const sorted = ignored.sort((a1, a2) => a1.key.localeCompare(a2.key));\r\n const normalized = sorted.slice().map((item) => {\r\n item.error = item.error.replace(/:\\d+:\\d+/g, '');\r\n return item;\r\n });\r\n const errorCache: { [key: string]: number } = {};\r\n const cache: { [key: string]: { errors: string[]; count: number } } = {};\r\n const filtered = normalized.filter((item) => {\r\n if (cache[item.key] == null) {\r\n errorCache[item.error] = 1;\r\n cache[item.key] = { errors: [item.error], count: 1 };\r\n return true;\r\n }\r\n if (errorCache[item.error] == null) {\r\n errorCache[item.error] = 1;\r\n cache[item.key].errors.push(item.error);\r\n }\r\n cache[item.key].count += 1;\r\n return false;\r\n });\r\n const stats = filtered\r\n .map((item) => {\r\n return {\r\n ignored: item.key,\r\n stack: cache[item.key].errors.join('\\n'),\r\n count: cache[item.key].count,\r\n errors: cache[item.key].errors,\r\n };\r\n })\r\n .sort((a, b) => b.count - a.count);\r\n\r\n // output ignored unique subscription stats\r\n /* eslint-disable no-console */\r\n console.warn(prefix, 'Ignored unique subscriptions:', ignored.length);\r\n console.table(stats, ['ignored', 'stack', 'count']);\r\n /* eslint-enable no-console */\r\n }\r\n\r\n // output errors\r\n // eslint-disable-next-line no-console\r\n errors.forEach((e) => console.error(e.prefix, `#${e.val.id}:`, e.val));\r\n }\r\n}\r\n","import { ApplicationRef, enableProdMode } from '@angular/core';\r\nimport { enableDebugTools } from '@angular/platform-browser';\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\nimport { Observable } from 'rxjs';\r\nimport { AppModule } from 'src/app/app.module';\r\nimport { environment } from 'src/environments/environment';\r\nimport { printSubscribers, setup, track } from './util/observable-tracker';\r\n\r\nconst observableTrackerEnabled = false;\r\nconst canEnableObservableTracker = !environment.production && observableTrackerEnabled;\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n} else if (canEnableObservableTracker) {\r\n setup(Observable);\r\n}\r\n\r\n// https://github.com/angular/angular-cli/issues/8779#issuecomment-351583429\r\n// https://github.com/angular/angular-cli/issues/8779#issuecomment-447394606\r\nplatformBrowserDynamic()\r\n .bootstrapModule(AppModule)\r\n .then((ref) => {\r\n if ('serviceWorker' in navigator) {\r\n if (environment.production) {\r\n navigator.serviceWorker.register('/ngsw-worker.js');\r\n }\r\n }\r\n if (!environment.production) {\r\n const applicationRef = ref.injector.get(ApplicationRef);\r\n const componentRef = applicationRef.components[0];\r\n enableDebugTools(componentRef);\r\n\r\n if (canEnableObservableTracker) {\r\n track();\r\n // In DevTools console call 'window.stopTracker()' to see results.\r\n (window as any).stopTracker = () => {\r\n ref.destroy();\r\n const subscribers = track(false);\r\n printSubscribers({\r\n ignoreStackFilterRe:\r\n /FocusKeyManager|MatSidenav|MatSelect|MatDrawer|OktaAuthGuard|TdLoadingService/,\r\n reportInnerSubscriptions: true,\r\n subscribers,\r\n });\r\n };\r\n }\r\n }\r\n })\r\n // eslint-disable-next-line no-console\r\n .catch((err) => console.error(err));\r\n"],"mappings":"wnGCAAA,EAAA,EAAA,MAAA,CAAA,EAAsD,EAAA,MAAA,CAAA,EAC5B,EAAA,MAAA,CAAA,EAEpBC,GAAA,EAAA,cAAA,CAAA,EACAD,EAAA,EAAA,MAAA,EAAME,EAAA,EAAA,qCAAA,EAAmCC,EAAA,EAAO,EAC5C,EACF,GDKR,IAAaC,IAAqB,IAAA,CAA5B,MAAOA,CAAqB,CAEhCC,YAAYC,EAAc,CACxB,KAAKC,WAAaD,EAAOE,OAAOC,KAC9BC,EAAQC,GAAMA,aAAaC,EAAa,EACxCC,EAAK,CAAC,EACNC,EAAI,IAAM,EAAK,EACfC,GAAU,EAAI,CAAC,CAEnB,iDATWX,GAAqBY,EAAAC,CAAA,CAAA,CAAA,CAAA,+BAArBb,EAAqBc,UAAA,CAAA,CAAA,mBAAA,CAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,OAAA,CAAA,CAAA,QAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAA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C,EACAkC,EACAa,GAAexD,CAAc,EAC7ByD,GAAyB,EACzBC,GACA,IAAIC,GAAkC5D,EAAcQ,IAAIC,WAAYL,CAAW,EAC/EC,CAAI,CACL,CACH,CCnGA,IAAMwD,GAAkC,CACtCC,cAAe,CACbC,YAAa,CAAA,EACbC,mBAAoB,CAClB,mCACA,mCACA,gCACA,2CACA,mCACA,2BACA,mCACA,4BACA,0BACA,4CACA,+BACA,4CACA,yBACA,oCACA,8CACA,mDACA,yCACA,uCACA,gDACA,+BACA,yBACA,6BACA,oCACA,6BACA,qCACA,qCACA,gCACA,wCACA,4DACA,4BACA,2CACA,yCACA,gCACA,oCACA,kCACA,2CACA,+BACA,4BACA,oCACA,qCACA,kCACA,sCACA,wBACA,mCACA,uCACA,sCACA,uCACA,gDACA,wBACA,iCACA,0CACA,6BACA,kDACA,6BACA,6CACA,mCACA,kCACA,kDACA,oCACA,2CACA,6CACA,wCACA,gCACA,oCACA,wCACA,gCACA,sCACA,iCACA,sCACA,4CACA,0CACA,6CACA,yCACA,gCACA,6BACA,yCACA,4BACA,mCACA,8BACA,sCACA,yCACA,0CACA,uCACA,gDACA,+CACA,gCACA,4BACA,2BACA,8BACA,wCACA,0CACA,mCACA,gCACA,4BACA,mCACA,6BACA,kCACA,kDACA,sDACA,0CACA,yCACA,iDACA,8CACA,6CACA,+BACA,2BACA,gCACA,sCACA,4BACA,oCACA,mCACA,8BACA,4CACA,kCACA,kCACA,wCACA,mCACA,gCACA,6BACA,iCACA,8BACA,kCACA,6BACA,mCACA,mCACA,mCACA,mCACA,yCACA,oCACA,yBACA,4BACA,kCACA,kCACA,4BACA,2CACA,mCACA,uCACA,yBACA,wCACA,6BACA,mCACA,iCACA,8BACA,2CACA,gCACA,4BACA,8CACA,uCACA,uCACA,uCACA,gCACA,iCACA,2CACA,2CACA,mCACA,6BACA,+BAA+B,EAEjCC,OAAQ,CACN,iBACA,iBACA,cACA,yBACA,iBACA,SACA,iBACA,UACA,QACA,0BACA,aACA,0BACA,OACA,kBACA,4BACA,iCACA,uBACA,qBACA,8BACA,aACA,OACA,WACA,WACA,kBACA,mBACA,cACA,sBACA,0CACA,UACA,yBACA,uBACA,cACA,kBACA,gBACA,yBACA,aACA,kBACA,mBACA,gBACA,oBACA,MACA,iBACA,qBACA,oBACA,qBACA,8BACA,MACA,eACA,wBACA,WACA,gCACA,WACA,iBACA,2BACA,gBACA,gCACA,kBACA,yBACA,2BACA,sBACA,cACA,sBACA,cACA,oBACA,eACA,oBACA,0BACA,wBACA,2BACA,uBACA,cACA,WACA,UACA,uBACA,iBACA,YACA,oBACA,wBACA,qBACA,8BACA,cACA,6BACA,UACA,SACA,YACA,iBACA,sBACA,wBACA,UACA,cACA,WACA,iBACA,gBACA,gCACA,oCACA,wBACA,uBACA,+BACA,4BACA,2BACA,SACA,aACA,cACA,oBACA,UACA,kBACA,iBACA,YACA,0BACA,gBACA,gBACA,sBACA,iBACA,cACA,WACA,eACA,YACA,gBACA,WACA,iBACA,iBACA,iBACA,iBACA,uBACA,kBACA,OACA,UACA,gBACA,UACA,gBACA,yBACA,iBACA,OACA,qBACA,sBACA,WACA,eACA,YACA,yBACA,cACA,UACA,4BACA,qBACA,qBACA,qBACA,cACA,eACA,yBACA,yBACA,iBACA,WACA,aAAa,EAEfC,QAAS,CACP,iBACA,iBACA,cACA,yBACA,iBACA,SACA,iBACA,UACA,QACA,0BACA,aACA,0BACA,OACA,kBACA,4BACA,iCACA,uBACA,qBACA,8BACA,aACA,OACA,WACA,WACA,kBACA,mBACA,cACA,sBACA,0CACA,UACA,yBACA,uBACA,cACA,kBACA,gBACA,yBACA,aACA,kBACA,mBACA,gBACA,oBACA,MACA,iBACA,qBACA,oBACA,qBACA,8BACA,MACA,eACA,wBACA,WACA,gCACA,WACA,iBACA,2BACA,gBACA,gCACA,kBACA,yBACA,2BACA,sBACA,cACA,sBACA,cACA,oBACA,eACA,oBACA,0BACA,wBACA,2BACA,uBACA,cACA,WACA,UACA,uBACA,iBACA,YACA,oBACA,wBACA,qBACA,8BACA,cACA,6BACA,UACA,SACA,YACA,iBACA,sBACA,wBACA,UACA,cACA,WACA,iBACA,gBACA,gCACA,oCACA,wBACA,uBACA,+BACA,4BACA,2BACA,SACA,aACA,cACA,oBACA,UACA,kBACA,iBACA,YACA,0BACA,gBACA,gBACA,sBACA,iBACA,cACA,WACA,eACA,YACA,gBACA,WACA,iBACA,iBACA,iBACA,iBACA,uBACA,kBACA,OACA,UACA,gBACA,UACA,gBACA,yBACA,iBACA,OACA,qBACA,sBACA,WACA,eACA,YACA,yBACA,cACA,UACA,4BACA,qBACA,qBACA,qBACA,cACA,eACA,yBACA,yBACA,iBACA,WACA,aAAa,EAEfC,OAAQ,CAAA,EACRC,UAAW,CACT,iBACA,iBACA,cACA,yBACA,iBACA,SACA,iBACA,UACA,QACA,0BACA,aACA,0BACA,OACA,kBACA,4BACA,iCACA,uBACA,qBACA,8BACA,aACA,OACA,WACA,WACA,kBACA,mBACA,cACA,sBACA,0CACA,UACA,yBACA,uBACA,cACA,kBACA,gBACA,yBACA,aACA,kBACA,mBACA,gBACA,oBACA,MACA,iBACA,qBACA,oBACA,qBACA,8BACA,MACA,eACA,wBACA,WACA,gCACA,WACA,iBACA,2BACA,gBACA,gCACA,kBACA,yBACA,2BACA,sBACA,cACA,sBACA,cACA,oBACA,eACA,oBACA,0BACA,wBACA,2BACA,uBACA,cACA,WACA,UACA,uBACA,iBACA,YACA,oBACA,wBACA,qBACA,8BACA,cACA,6BACA,UACA,SACA,YACA,iBACA,sBACA,wBACA,UACA,cACA,WACA,iBACA,gBACA,gCACA,oCACA,wBACA,uBACA,+BACA,4BACA,2BACA,SACA,aACA,cACA,oBACA,UACA,kBACA,iBACA,YACA,0BACA,gBACA,gBACA,sBACA,iBACA,cACA,WACA,eACA,YACA,gBACA,WACA,iBACA,iBACA,iBACA,iBACA,uBACA,kBACA,OACA,UACA,gBACA,UACA,gBACA,yBACA,iBACA,OACA,qBACA,sBACA,WACA,eACA,YACA,yBACA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AC,UAAW,QAAS,OAAO,CAAC,EAMpDlC,EAAOC,QAASkB,GAAMzD,QAAQoC,MAAMqB,EAAE7B,OAAQ,IAAI6B,EAAEjB,IAAI7C,EAAE,IAAK8D,EAAEjB,GAAG,CAAC,EAEzE,GChPA,IAAMqC,GAA2B,GAC3BC,GAA6B,CAACC,GAAYC,YAAcH,GAE1DE,GAAYC,WACdC,OACSH,IACTI,GAAMC,EAAU,EAKlBC,GAAA,EACGC,gBAAgBC,EAAS,EACzBC,KAAMC,GAAO,CAMZ,GALI,kBAAmBC,WACjBV,GAAYC,YACdS,UAAUC,cAAcC,SAAS,iBAAiB,EAGlD,CAACZ,GAAYC,WAAY,CAE3B,IAAMY,EADiBJ,EAAIK,SAASC,IAAIC,EAAc,EAClBC,WAAW,CAAC,EAChDC,GAAiBL,CAAY,EAEzBd,KACFoB,GAAK,EAEJC,OAAeC,YAAc,IAAK,CACjCZ,EAAIa,QAAO,EACX,IAAMC,EAAcJ,GAAM,EAAK,EAC/BK,GAAiB,CACfC,oBACE,gFACFC,yBAA0B,GAC1BH,YAAAA,EACD,CACH,GAGN,CAAC,EAEAI,MAAOC,GAAQC,QAAQC,MAAMF,CAAG,CAAC","names":["ɵɵelementStart","ɵɵelement","ɵɵtext","ɵɵelementEnd","SplashScreenComponent","constructor","router","isLoading$","events","pipe","filter","e","NavigationEnd","take","map","startWith","ɵɵdirectiveInject","Router","selectors","decls","vars","consts","template","rf","ctx","ɵɵtemplate","SplashScreenComponent_div_0_Template","ɵɵproperty","ɵɵpipeBind1","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵclassMapInterpolate1","ctx_r0","environment","ɵɵpropertyInterpolate1","environmentDisplay","ɵɵadvance","ɵɵtextInterpolate1","icons","assets","AppComponent","_tcsConfig","constructor","_changeDetectorRef","_network","_pubnub","_newRelic","_title","_dialog","_router","_iconRegistry","_domSanitizer","clientContext","clientInfo","buildEnvironment","_onDestroy$","Subject","registerIcons","registerSVGIcons","ngAfterViewInit","detectChanges","ngOnInit","init","ngOnDestroy","next","complete","ɵɵdirectiveInject","ChangeDetectorRef","TcsConfigurationService","TcsNetworkService","PubnubService","NewRelicService","Title","MatLegacyDialog","Router","MatIconRegistry","DomSanitizer","selectors","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵtemplate","AppComponent_div_2_Template","ɵɵproperty","ɵɵpipeBind1","ERR_SW_NOT_SUPPORTED","errorObservable","message","defer","throwError","NgswCommChannel","serviceWorker","controllerChanges","fromEvent","map","currentController","of","controllerWithChanges","concat","filter","c","switchMap","events","event","publish","action","payload","take","tap","sw","__spreadValues","type","operationNonce","waitForOperationCompleted","postMessage","result","filterFn","nonce","SwPush","Subject","NEVER","registration","workerDrivenSubscriptions","pm","merge","options","pushOptions","key","applicationServerKey","i","sub","doUnsubscribe","success","input","t","ɵɵinject","ɵɵdefineInjectable","SwUpdate","SCRIPT","InjectionToken","ngswAppInitializer","injector","script","platformId","isPlatformBrowser","readyToRegister$","strategy","args","delayWithTimeout","whenStable","NgZone","err","timeout","delay","ApplicationRef","stable","ngswCommChannelFactory","opts","SwRegistrationOptions","provideServiceWorker","makeEnvironmentProviders","PLATFORM_ID","APP_INITIALIZER","Injector","ServiceWorkerModule","ɵɵdefineNgModule","ɵɵdefineInjector","DEFAULT_EFFECT_CONFIG","CREATE_EFFECT_METADATA_KEY","createEffect","source","config","effect","value","__spreadValues","getCreateEffectMetadata","instance","propertyName","metaData","getSourceMetadata","instance","getCreateEffectMetadata","getSourceForInstance","isClassInstance","obj","isClass","classOrRecord","getClasses","classesAndRecords","isToken","tokenOrRecord","InjectionToken","mergeEffects","sourceInstance","globalErrorHandler","effectsErrorHandler","source","sourceName","observables$","propertyName","dispatch","useEffectsErrorHandler","observable$","effectAction$","ignoreElements","materialize","map","notification","merge","MAX_NUMBER_OF_RETRY_ATTEMPTS","defaultEffectsErrorHandler","errorHandler","retryAttemptLeft","catchError","error","Actions","Observable","operator","observable","t","ɵɵinject","ScannedActionsSubject","ɵɵdefineInjectable","ofType","allowedTypes","filter","action","typeOrActionCreator","_ROOT_EFFECTS_GUARD","USER_PROVIDED_EFFECTS","_ROOT_EFFECTS","_ROOT_EFFECTS_INSTANCES","_FEATURE_EFFECTS","_FEATURE_EFFECTS_INSTANCE_GROUPS","EFFECTS_ERROR_HANDLER","ROOT_EFFECTS_INIT","rootEffectsInit","createAction","reportInvalidActions","output","reporter","isAction","getEffectName","stringify","isMethod","onIdentifyEffectsKey","isOnIdentifyEffects","isFunction","onRunEffectsKey","isOnRunEffects","onInitEffects","isOnInitEffects","functionName","EffectSources","Subject","effectSourceInstance","groupBy","effectsInstance","mergeMap","source$","effect$","exhaustMap","resolveEffectSource","dematerialize","init$","take","ErrorHandler","mergedEffects$","EffectsRunner","effectSources","store","Store","EffectsRootModule","sources","runner","rootEffectsInstances","storeRootModule","storeFeatureModule","guard","StoreRootModule","StoreFeatureModule","ɵɵdefineNgModule","ɵɵdefineInjector","EffectsFeatureModule","effectsRootModule","effectsInstanceGroups","effectsInstances","EffectsModule","featureEffects","effects","effectsClasses","createEffectsInstances","rootEffects","_provideForRootGuard","effectsGroups","userProvidedEffectsGroups","effectsGroup","userProvidedEffectsGroup","effectsTokenOrRecord","inject","ROUTER_REQUEST","routerRequestAction","createAction","props","ROUTER_NAVIGATION","routerNavigationAction","ROUTER_CANCEL","routerCancelAction","ROUTER_ERROR","routerErrorAction","ROUTER_NAVIGATED","routerNavigatedAction","routerReducer","state","action","routerAction","MinimalRouterStateSerializer","routerState","route","children","c","NavigationActionTiming","DEFAULT_ROUTER_FEATURENAME","_ROUTER_CONFIG","InjectionToken","ROUTER_CONFIG","_createRouterConfig","config","__spreadValues","FullRouterStateSerializer","RouterStateSerializer","RouterTrigger","StoreRouterConnectingService","store","router","serializer","errorHandler","activeRuntimeChecks","isNgrxMockEnvironment","isDevMode","select","withLatestFrom","routerStoreState","storeState","NavigationStart","url","isSameUrl","error","dispatchNavLate","routesRecognized","event","RoutesRecognized","NavigationCancel","NavigationError","NavigationEnd","lastRoutesRecognized","nextRouterState","type","payload","__spreadProps","t","ɵɵinject","Store","Router","ErrorHandler","ACTIVE_RUNTIME_CHECKS","ɵɵdefineInjectable","first","second","stripTrailingSlash","text","provideRouterStore","makeEnvironmentProviders","ENVIRONMENT_INITIALIZER","inject","StoreRouterConnectingModule","ɵɵdefineNgModule","ɵɵdefineInjector","selectMutations","state","mutations","selectMutationByOperationId","operationId","createSelector","get","parseOperationId","activityId","pipeIndex","indexOf","withoutPrefix","substring","dotIndex","PubnubEntityStoreEffects","constructor","_actions$","_store","_storeService","_log","_appInsightsService","_newRelicService","corruptEffects$","createEffect","pipe","ofType","MUTATION_REQUEST","switchMap","request","select","selectMutationByOperationId","operationId","filter","mutation","isError","hasEffect","map","m","tap","appInsights","trackException","exception","Error","properties","severityLevel","SeverityLevel","newRelic","noticeError","dispatch","mutationDurations$","filterNull","distinctUntilChanged","a","b","effectDuration","trackEvent","name","createSafeProps","addPageAction","mutationEffects$","MESSAGE_RECIEVED","isEntitySnapsnot","message","type","includes","activityId","head","parseOperationId","MutationEffect","mutationSuccessEntities$","MUTATION_SUCCESS","success","logPrefix","entityMap","result","entities","snapshots","Object","entries","forEach","state","record","errors","reviveUnsafe","dateDeleted","length","e","error","push","key","id","source","err","EntitiesReceived","statusUpdates$","STATUS_CHANGE","__spreadProps","__spreadValues","status","category","entitySnapshots$","getMessageBody","snapshot","upsertFromPubNub","mssage","entitySnapshotsCollections$","collection","ɵɵinject","Actions","Store","StoreService","Logger","AppInsightsService","NewRelicService","factory","ɵfac","providedIn","Four04PageComponent","selectors","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵtext","ConsoleLogger","constructor","_optionsManager","error","properties","options","canLogToConsole","console","info","message","warning","warn","ɵɵinject","LoggerOptionsService","factory","ɵfac","LoggingErrorHandler","logger","_loggerVal","_injector","get","Logger","constructor","handleError","error","ɵɵinject","Injector","factory","ɵfac","LOGGING_ADAPTERS","InjectionToken","MultiLogger","constructor","_loggers","error","properties","options","forEach","l","warning","message","info","ɵɵinject","factory","ɵfac","INFORMATION","ERROR","WARNING","InformationLogEntry","constructor","message","properties","type","WarningLogEntry","ErrorLogEntry","error","errorObj","JSON","parse","Error","stringify","Object","getOwnPropertyNames","name","NgrxStoreLogger","constructor","_store","_optionsManager","error","properties","options","canLogToNgrxStore","dispatch","ErrorLogEntry","info","message","InformationLogEntry","warning","WarningLogEntry","ɵɵinject","Store","LoggerOptionsService","factory","ɵfac","CacheLogger","constructor","_insightsLogger","_newRelicLogger","_cacheService","info","message","properties","options","cacheItem","LogType","Information","warning","Warning","error","errorStr","JSON","stringify","Object","getOwnPropertyNames","err","createSafeProps","Error","ɵɵinject","AppInsightsLogger","NewRelicLogger","CacheLoggerCacheService","factory","ɵfac","TcsLoggingModule","provide","LOGGING_ADAPTERS","useClass","AppInsightsLogger","multi","NgrxStoreLogger","ConsoleLogger","CacheLogger","NewRelicLogger","Logger","MultiLogger","ErrorHandler","LoggingErrorHandler","imports","CommonModule","ImpersonationInterceptor","constructor","_impersonation","intercept","req","next","impersonatedUserId","clone","setHeaders","handle","ɵɵinject","ImpersonationService","factory","ɵfac","oktaConfigFactory","tcsConfigurationService","config","value","oktaRedirect","window","location","protocol","host","oktaConfig","issuer","okta","tenantUrl","scopes","clientId","redirectUri","oktaAuth","OktaAuth","oktaConfigProvider","provide","OKTA_CONFIG","useFactory","deps","TcsConfigurationService","ɵɵelementContainerStart","ɵɵelement","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","ctx_r0","error","log","msg","args","window","tcsDebug","console","perfTest","name","promise","start","performance","now","then","res","diff","TcsOktaCallbackComponent","constructor","oktaConfig","_oktaAuth","_oktaState","_router","injector","redirectUri","loaderContext$","ReplaySubject","_showMessageInSeconds","_autoRedirectInSeconds","_errorRedirectInSeconds","_clearInterval$","Subject","uri","getOriginalUri","includes","ngOnInit","__async","_createCountdownInterval","countdownFrom","displayMessageIn","handleLoginRedirect","e","idx","isInteractionRequiredError","onAuthResume","onAuthRequired","callbackFn","toString","ngOnDestroy","next","complete","countdownInSeconds","pipe","takeUntil","subscribe","cnt","location","href","message","padStart","ɵɵdirectiveInject","OKTA_CONFIG","OKTA_AUTH","OktaAuthStateService","Router","Injector","selectors","decls","vars","consts","template","rf","ctx","ɵɵtemplate","TcsOktaCallbackComponent_ng_container_0_Template","ɵɵproperty","ɵɵpipeBind1","TcsIdentityModule","CommonModule","TcsLoadUntilModule","TOKEN_LOADED","LOGGED_OUT","AuthStoreEffects","constructor","_actions$","_storeService","_userGql","token$","createEffect","pipe","ofType","TOKEN_LOADED","filter","action","oktaClaims","map","claims","__async","isNullOrEmpty","sub","email","firstValueOrUndefined","upsertEntitiesFromGraphQL","timeout","networkTimeout","take","dispatch","ɵɵinject","Actions","StoreService","GetUserByEmailGQL","factory","ɵfac","providedIn","MutationStatus","Record","request","success","effect","error","operationId","isSuccess","isError","isRequestComplete","hasEffect","effectTime","timestamp","startTime","effectDuration","constructor","_mutationsReducer","state","Map","action","type","MUTATION_REQUEST","set","operationId","MutationStatus","MUTATION_SUCCESS","has","updateIn","MUTATION_ERROR","MUTATION_EFFECT","mutationsReducer","metaPath","type","key","camelCase","entityPath","createEntityStoresReducer","initialState","reducer","state","action","ENTITIES_RECEIVED","withMutations","mutable","entities","filter","e","source","forEach","changedOrAdded","newState","undefined","updateIn","oldState","dateLastUpdated","Date","getTime","meta","EntityMeta","markAsLoaded","removed","removeIn","FETCH_ENTITIES","fetched","id","markAsFetching","AuthStoreState","Record","userId","token","oktaClaims","initialState","AuthStoreState","reducer","state","action","type","TOKEN_LOADED","withMutations","s","token","oktaClaims","cloneDeep","Object","freeze","LOGGED_OUT","authReducer","Pubnub","reducer","state","PubnubStoreState","action","type","MESSAGE_RECIEVED","withMutations","s","message","STATUS_CHANGE","status","category","CATEGORIES","PNConnectedCategory","subscribedChannels","List","PRESENCE_CHANGE","presence","pubnubReducer","routerReducerTypeAssertion","state","action","routerReducer","createReducers","entityStores","createEntityStoresReducer","EntityStores","pubnub","pubnubReducer","router","mutations","mutationsReducer","auth","authReducer","reducerToken","InjectionToken","reducerProvider","provide","useFactory","CustomSerializer","serialize","routerState","route","root","params","__spreadValues","firstChild","url","queryParams","factory","ɵfac","alertLogout","tdDialog","title","message","__async","dialog","openAlert","disableClose","closeButton","firstValueOrUndefined","afterClosed","pipe","take","AuthenticationInterceptor","constructor","_auth","_tdDialog","_logger","_config","_router","_forbidden$","Subject","_unauthorized$","_onDestroy$","_tcsGraphQLUrl","value","tcs","graphqlUri","switchMap","req","isAuthenticated$","map","isAuthenticatedCheck","takeUntil","subscribe","info","url","String","login","caller","fromUri","window","location","href","errResponse","idClaims","accessClaims","username","sub","email","errorMessage","error","userProps","createSafeProps","navigate","test","warning","logout","intercept","next","from","getAccessToken","token","clone","setHeaders","Authorization","handle","catchError","err","includes","HttpErrorResponse","status","throwError","ngOnDestroy","complete","ɵɵinject","AuthenticationService","TdDialogService","Logger","TcsConfigurationService","Router","factory","ɵfac","AppContextResolver","constructor","_contextService","resolve","route","state","setContext","data","context","ɵɵinject","AppContextService","factory","ɵfac","providedIn","PubnubListenerService","constructor","_pubnub","resolve","route","state","subscribe","timeoutStrategy","ɵɵinject","PubnubService","factory","ɵfac","providedIn","LogoutPageComponent","constructor","_router","_auth","ngOnInit","__async","logout","caller","navigate","ɵɵdirectiveInject","Router","AuthenticationService","selectors","decls","vars","template","rf","ctx","changeDetection","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵtemplate","UnauthorizedPageComponent_div_2_p_1_Template","UnauthorizedPageComponent_div_2_p_2_Template","ɵɵadvance","ɵɵproperty","error_r1","UnauthorizedPageComponent","constructor","route","error$","queryParams","pipe","filter","params","error","map","isNullOrWhitespace","String","ngOnInit","ɵɵdirectiveInject","ActivatedRoute","selectors","decls","vars","consts","template","rf","ctx","UnauthorizedPageComponent_div_2_Template","UnauthorizedPageComponent_ng_template_4_Template","ɵɵtemplateRefExtractor","ɵɵpipeBind1","default_r2","CompanyCodeGuard","constructor","_companyAuthService","_store","canActivate","next","state","checkCompanyCode","canActivateChild","childRoute","select","selectRouteParam","pipe","switchMap","companyCode","of","isAuthorizedForCompany$","ɵɵinject","CompanyAuthorizationService","Store","factory","ɵfac","providedIn","routes","path","component","LogoutPageComponent","redirectTo","TcsOktaCallbackComponent","UnauthorizedPageComponent","data","title","canActivateChild","AuthorizationGuard","OktaAuthGuard","children","resolve","pubnub","PubnubListenerService","global","GlobalDataContextService","loadChildren","then","m","HomeModule","__spreadValues","grantAccess","TcsCustomPermission","ManageOperations","ManageOrg","AccessInsights","AccessPublicPages","ReadonlyOperations","DevKitModule","FleetStatusModule","authorizationStrategy","context","AppContext","FleetStatus","appContext","AppContextResolver","AdminModule","RttModule","Rtt","SupportModule","Support","canActivate","mapToCanActivate","CompanyCodeGuard","__spreadProps","grantAccessDeep","Org","OrgModule","OpsModule","Ops","InsightsModule","Insights","AsbModule","AccessAsb","Asb","summaries","OpsSummariesSyncService","OosRumModule","AccessOosRum","OosRum","Four04PageComponent","AppRoutingModule","RouterModule","forRoot","onSameUrlNavigation","PassdownLogEffects","constructor","_polling","_actions$","fetchPassdownLogCountOnAcknowledge$","createEffect","pipe","ofType","MUTATION_SUCCESS","filter","m","name","OpsCommand","AcknowledgePassdownLog","AddPassdownLog","UpdatePassdownLog","DeletePassdownLog","switchMap","fetch","passdownLogs","canFetch","dispatch","ɵɵinject","PollingService","Actions","factory","ɵfac","providedIn","buildDelayFunction","delayOptions","_a","_b","initial","_c","jitter","_d","max","baseDelay","count","delay","buildRetryFunction","retryOptions","_a","retryIf","_b","max","count","operation","error","RetryableOperation","operation","nextLink","delayFor","retryIf","_this","value","_i","_a","observer","error","__awaiter","shouldRetry","__generator","_b","index","o","delay","RetryLink","_super","__extends","options","attempts","buildDelayFunction","buildRetryFunction","retryable","Observable","ApolloLink","onError","errorHandler","ApolloLink","operation","forward","Observable","observer","sub","retriedSub","retriedResult","result","networkError","e","ErrorLink","_super","__extends","_this","AppInsightsDependencyTrackingLink","ApolloLink","constructor","_graphQLUrl","_appInsightsService","request","operation","forward","Observable","observer","sub","begin","performance","now","operationId","getContext","opDefs","query","definitions","filter","d","kind","map","n","graphQLOperationType","length","operationName","Error","getDuration","baseProps","__trackMe","variables","gqlOperationType","gqlOperationName","print","subscribe","next","result","duration","hasErrors","errors","resultProps","createSafeProps","__spreadProps","__spreadValues","resultData","data","resultErrors","resultCode","mutationErrorSource","mutationResults","Object","values","r","firstMutationResult","find","mutationSuccess","mutationResult","mutationResultStatus","status","firstMutationWithError","CommandResultStatus","Succeeded","firstError","code","mutationErrorMessage","message","mutationErrorCode","success","appInsights","trackDependencyData","id","name","target","responseCode","properties","error","response","errorProps","statusText","complete","err","unsubscribe","setAppInsightsOperationIdLink","ApolloLink","operation","forward","context","getContext","operationId","getOrElse","operationName","uuid","headers","setContext","createAuthLink","companyContext","ApolloLink","operation","forward","operationContext","getContext","headers","isNullOrWhitespace","operationName","company","postGuardCompany","companyCode","id","setContext","createSecondarySourceLink","ApolloLink","operation","forward","operationContext","getContext","headers","canUseSecondarySource","setContext","context","useSecondarySource","createClientLinks","configuration","companyContext","httpLink","logger","appInsights","http","create","uri","tcs","graphqlUri","retryLink","RetryLink","delay","initial","max","Infinity","jitter","attempts","retryIf","error","operation","canRetry","HttpErrorResponse","status","safeProps","createSafeProps","warning","networkErrorMessages","reg","msg","type","DEFAULT_NETWORK_ERROR_MESSAGE","length","lookupNetworkErrorMessage","networkError","errorMessage","message","find","err","test","indexOf","__spreadProps","__spreadValues","replace","errorLink","onError","graphQLErrors","errors","forEach","locations","path","extensions","push","opName","operationName","ApolloLink","from","createAuthLink","createSecondarySourceLink","setAppInsightsOperationIdLink","AppInsightsDependencyTrackingLink","result","possibleTypes","Abbreviated","CollectionMetadata","Entity","Evented","Lookup","TcsEntity","graphql_possible_types_generated_default","fetch","req","httpClient","extractFiles","shouldUseBody","shouldStringify","param","isBatching","shouldUseMultipart","multipartInfo","Observable","observer","bodyOrParams","body","obj","value","form","map","files","i","paths","_","file","__spreadValues","mergeHeaders","source","destination","headers","name","prioritize","values","picked","val","createHeadersWithClientAwareness","context","HttpHeaders","version","HttpLinkHandler","ApolloLink","print","options","operation","pick","key","init","method","includeQuery","includeExtensions","url","withCredentials","useMultipart","useGETForQueries","isQuery","def","sub","response","err","op","HttpLink","t","ɵɵinject","HttpClient","ɵɵdefineInjectable","possibleTypes","possibleTypesResultData","ApolloInitializerService","initialized$","_initialized$","asObservable","constructor","_apollo","_tcsConfig","_httpLink","_companyContext","_logger","_appInsightsService","BehaviorSubject","init","create","link","createClientLinks","value","cache","InMemoryCache","defaultOptions","watchQuery","fetchPolicy","errorPolicy","query","next","ɵɵinject","Apollo","TcsConfigurationService","HttpLink","CompanyContextService","Logger","AppInsightsService","factory","ɵfac","providedIn","PageViewService","initialized","pageviews$","_pageviews$","asObservable","constructor","_router","activatedRoute","_logger","_appInsightsService","_onDestroy$","Subject","ReplaySubject","events","pipe","map","e","NavigationStart","startTime","Math","round","performance","now","startRoute","getRoutePath","snapshot","navigationStart","startUrl","window","location","href","filterNull","switchMap","filter","NavigationEnd","id","take","navigationEnd","endTime","firstLoad","endRouteSnapshot","getInnermostChildOrSelf","endRoute","durationInMs","params","pathFromRoot","r","reduce","prev","next","__spreadValues","queryParams","title","routeTitle","data","url","route","takeUntil","subscribe","init","warning","pageView","appInsights","trackPageView","name","uri","properties","duration","createSafeProps","ngOnDestroy","complete","ɵɵinject","Router","ActivatedRoute","Logger","AppInsightsService","factory","ɵfac","providedIn","RouterLoadingService","initialized","constructor","_routerService","_router","_logger","_pageview","_onDestroy$","Subject","init","ref","warning","_loadingCmp","createComponent","MatProgressBar","injector","index","vcr","get","ViewContainerRef","instance","mode","color","navigationStart$","pipe","takeUntil","subscribe","loading","events","filter","e","NavigationCancel","NavigationError","loaded","pageviews$","element","nativeElement","style","ngOnDestroy","next","complete","destroy","ɵɵinject","RouterService","Router","Logger","PageViewService","factory","ɵfac","providedIn","RouteTitleService","constructor","_titleService","_router","_activatedRoute","_breadcrumbs","_config","_tabs","_onDestroy$","Subject","enabled","setTitleOnNavigation","events","pipe","filter","event","NavigationEnd","map","snapshot","r","outlet","switchMap","value$","breadcrumbs","titleSegments","getTitleSegments","title","length","combineTitleSegments","b","name","reverse","join","combineLatest","of","isTabActive$","takeUntil","subscribe","isTabActive","prefix","envSuffix","environmentKey","environmentDisplay","titleStart","setTitle","ngOnDestroy","next","complete","ɵɵinject","Title","Router","ActivatedRoute","BreadcrumbService","TcsConfigurationService","TabsService","factory","ɵfac","providedIn","CpuIdleObserverService","initialized","constructor","_pageViews","_activatedRoute","_log","_tick","_appInsightsService","_newRelicService","stopInterval$","Subject","_onDestroy$","init","warning","_initPageViewTracking","sub","pageviews$","pipe","takeUntil","subscribe","pageView","window","requestIdleCallback","unsubscribe","timeUntilIdleMs","Math","round","performance","now","endTime","pageResponsiveInMs","durationInMs","appInsights","trackEvent","name","properties","createSafeProps","newRelic","addPageAction","__spreadValues","err","error","_initRegularCpuObservation","destroy$","race","everyFiveSeconds$","next","complete","beginTime","beginUrl","location","href","beginRoute","getRoutePath","snapshot","endUrl","timeUntilIdle","endRoute","props","trackMetric","average","ngOnDestroy","ɵɵinject","PageViewService","ActivatedRoute","Logger","TickService","AppInsightsService","NewRelicService","factory","ɵfac","providedIn","soundPath","PositionReportAlertAudibleService","constructor","_tick","_positionReport","_router","_store","_playLoop$","Subject","_onDestroy$","_player","TcsAudioPlayer","load","volume","init","communicationCenter$","observeCommunicationCenterFromRouteNavigationEnd","unitsByCommCenter$","pipe","undefinedOrSwitchMap","commCenter","select","selectUnitSummaryEntitiesByCommunicationCenterId","id","shareReplaySafe","isRequestPage$","navigationEnd$","startWith","map","ev","test","url","hasAlerts$","combineLatest","alerts$","units","alerts","isRequestPage","count","filter","alert","find","u","unitId","undefined","ready$","hasAlerts","audioReady","playAlertForManualPositionReports","distinctUntilChanged","takeUntil","subscribe","canPlayAlerts","next","stopped$","play","switchMap","everyTenSeconds$","skip","ngOnDestroy","complete","ɵɵinject","TickService","PositionReportAlertService","RouterService","Store","factory","ɵfac","providedIn","bootstrapApp","appBootstrapper","componentRef","instance","AppComponent","ref","injector","get","ViewContainerRef","init","AppBootstrapService","constructor","_apollo","_pageView","_routerLoading","_routeTitle","_userData","_router","_cpuIdleObserver","_polling","_activeAlertObserver","_positionReportAlertAudibleService","__async","setTitleOnNavigation","ɵɵinject","ApolloInitializerService","PageViewService","RouterLoadingService","RouteTitleService","UserDataContextService","Router","CpuIdleObserverService","PollingService","ActiveAlertObserverService","PositionReportAlertAudibleService","factory","ɵfac","providedIn","AppUpdaterService","constructor","_updates","_tick","_dialogService","_appInsightsService","_newRelicService","_onDestroy$","Subject","pollForUpdates","everyMinute$","pipe","takeUntil","subscribe","checkForUpdate","catch","reason","appInsights","trackEvent","name","properties","newRelic","addPageAction","activateAndReload","event","__async","isActivated","activateUpdate","error","currentHash","currentVersion","hash","latestHash","latestVersion","previousHash","window","location","reload","listenForAvailableUpdates","versionUpdates","type","availableHash","secondsTillRefresh","message","seconds","alert","openAlert","title","closeButton","countdownInSeconds","next","componentInstance","err","complete","firstValueOrUndefined","beforeClosed","versionHash","version","alertAndReloadPage","listenForUnrecoverableUpdates","unrecoverable","init","isEnabled","ngOnDestroy","ɵɵinject","SwUpdate","TickService","TdDialogService","AppInsightsService","NewRelicService","factory","ɵfac","providedIn","initApp","appInitializer","__async","init","AppInitializerService","constructor","_updater","_appInsights","_auth","_tabs","ɵɵinject","AppUpdaterService","AppInsightsService","AuthenticationService","TabsService","factory","ɵfac","providedIn","CoreModule","provide","APP_BOOTSTRAP_LISTENER","useFactory","bootstrapApp","deps","AppBootstrapService","multi","APP_INITIALIZER","initApp","AppInitializerService","reducerProvider","RouterStateSerializer","useClass","CustomSerializer","PERMISSIONS_CONFIG","buildTcsPermissions","oktaConfigProvider","HTTP_INTERCEPTORS","AuthenticationInterceptor","ImpersonationInterceptor","imports","BrowserModule","BrowserAnimationsModule","TypedReactiveFormsModule","HttpClientModule","RouterModule","ServiceWorkerModule","register","enabled","environment","production","FlexLayoutModule","MatNativeDateModule","MatProgressSpinnerModule","MatSliderModule","CovalentDialogsModule","ApolloModule","EffectsModule","forRoot","AuthStoreEffects","PubnubEntityStoreEffects","PassdownLogEffects","StoreModule","reducerToken","StoreRouterConnectingModule","AmgPubnubModule","AmgHumanizeModule","AmgAddressModule","AppRoutingModule","TcsClientSyncModule","TcsToastModule","TcsLoadingModule","TcsLoggingModule","OktaAuthModule","MonacoEditorModule","monacoConfig","TcsIdentityModule","AppModule","bootstrap","AppComponent","provide","REMOVE_STYLES_ON_COMPONENT_DESTROY","useValue","imports","CoreModule","SubscriptionSource","Error","constructor","subscription","id","subscribersGlobal","isTracking","setup","Observable","console","warn","origSubscribe","prototype","subscribe","root","args","setRoot","apply","currentSubscribers","sub","add","delete","Iterator","subscribers","current","getSubscribers","track","canTrack","Set","delay","ms","Promise","resolve","setTimeout","printSubscribers","_0","__async","prefix","timeout","rewriteStack","filterStackRe","undefined","reportInnerSubscriptions","ignoreStackFilterRe","length","error","map","errors","forEach","val","has","stack","frames","split","filter","it","includes","test","join","push","groupByErrorId","reduce","prev","cur","ignored","group","e","matches","exec","key","find","normalized","sort","a1","a2","localeCompare","slice","item","replace","errorCache","cache","stats","count","a","b","table","observableTrackerEnabled","canEnableObservableTracker","environment","production","enableProdMode","setup","Observable","platformBrowser","bootstrapModule","AppModule","then","ref","navigator","serviceWorker","register","componentRef","injector","get","ApplicationRef","components","enableDebugTools","track","window","stopTracker","destroy","subscribers","printSubscribers","ignoreStackFilterRe","reportInnerSubscriptions","catch","err","console","error"],"x_google_ignoreList":[4,5,6,42,43,44,45,52]}