{"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,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAC3B,YAAoB,iBAA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