{"version":3,"file":"angulartics2-uiroutermodule.js","sources":["ng://angulartics2/uiroutermodule/uirouter.ts","ng://angulartics2/uiroutermodule/uirouter.module.ts","ng://angulartics2/uiroutermodule/angulartics2-uiroutermodule.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Transition, TransitionService } from '@uirouter/core';\n\nimport { Observable, Subject } from 'rxjs';\n\nimport { RouterlessTracking, TrackNavigationEnd } from 'angulartics2';\n\n/**\n * Track Route changes for applications using UI-Router\n *\n * @link https://ui-router.github.io/ng2/docs/latest/\n *\n * referenced: https://github.com/ui-router/sample-app-angular/blob/9adb533b85c0f0fccef23968489cca0a5ec84654/src/app/util/ga.ts\n */\n@Injectable({ providedIn: 'root' })\nexport class UIRouterTracking implements RouterlessTracking {\n constructor(private transitionService: TransitionService) {}\n\n path(trans: Transition) {\n return trans.$to().url.format(trans.params());\n }\n\n trackLocation(settings): Observable {\n const subject = new Subject();\n this.transitionService.onSuccess(\n {},\n trans => {\n return subject.next({ url: this.path(trans) });\n },\n {\n priority: -10000,\n },\n );\n return subject;\n }\n\n prepareExternalUrl(url: string): string {\n return url;\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport {\n Angulartics2,\n Angulartics2OnModule,\n Angulartics2Settings,\n ANGULARTICS2_TOKEN,\n RouterlessTracking,\n} from 'angulartics2';\nimport { UIRouterTracking } from './uirouter';\n\n@NgModule({\n imports: [Angulartics2OnModule],\n})\nexport class Angulartics2UirouterModule {\n static forRoot(\n settings: Partial = {},\n ): ModuleWithProviders {\n return {\n ngModule: Angulartics2UirouterModule,\n providers: [\n { provide: ANGULARTICS2_TOKEN, useValue: { settings } },\n { provide: RouterlessTracking, useClass: UIRouterTracking },\n Angulartics2,\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAOA;;;;;;;AAQA;IACE,0BAAoB,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAA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