text: !function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs/operators"),require("rxjs/internal/operators"),require("@angular/core"),require("@angular/router"),require("@angular/common"),require("@angular/platform-browser/animations"),require("@angular/material/toolbar"),require("@angular/material/list")):"function"==typeof define&&define.amd?define("ng7-mat-breadcrumb",["exports","rxjs/operators","rxjs/internal/operators","@angular/core","@angular/router","@angular/common","@angular/platform-browser/animations","@angular/material/toolbar","@angular/material/list"],e):e(r["ng7-mat-breadcrumb"]={},r.rxjs.operators,r.rxjs["internal/operators"],r.ng.core,r.ng.router,r.ng.common,r.ng.platformBrowser.animations,r.ng.material.toolbar,r.ng.material.list)}(this,function(r,t,a,e,n,o,i,u,l){"use strict";var s=function(){function r(){}return r.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[]},r.ngInjectableDef=e.defineInjectable({factory:function(){return new r},token:r,providedIn:"root"}),r}();var m=function(){function r(r,e){this.activatedRoute=r,this.router=e,this.breadcrumb=[],this.breadCrumbData()}return r.prototype.ngOnInit=function(){},r.prototype.breadCrumbData=function(){var e=this;this.router.events.pipe(t.filter(function(r){return r instanceof n.NavigationEnd})).pipe(a.map(function(){return e.activatedRoute})).pipe(a.map(function(r){for(;r.firstChild;)r=r.firstChild;return r})).pipe(t.filter(function(r){return r.outlet===n.PRIMARY_OUTLET})).subscribe(function(c){if(c.snapshot.data.breadcrumb){var r=JSON.parse(JSON.stringify(c.snapshot.data.breadcrumb));r.map(function(r){var e,t,a=r.url.split("/");try{for(var n=function s(r){var e="function"==typeof Symbol&&r[Symbol.iterator],t=0;return e?e.call(r):{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}}}(a),o=n.next();!o.done;o=n.next()){var i=o.value;if(i.includes(":")){var u=i.replace(":",""),l=c.snapshot.params[u];r.url=r.url.replace(":"+u,l)}}}catch(m){e={error:m}}finally{try{o&&!o.done&&(t=n["return"])&&t.call(n)}finally{if(e)throw e.error}}}),e.breadcrumb=r}else e.breadcrumb=[]})},r.decorators=[{type:e.Component,args:[{selector:"app-ng7-mat-breadcrumb",template:'<mat-toolbar class="mat-bread-crumb">\n    <mat-list class="mat-bread-crumb-list" *ngIf="breadcrumb.length">\n        <mat-list-item>\n            <span class="mat-bread-crumb-spacer">\n                <span *ngFor="let item of breadcrumb; let i = index">\n                    <a *ngIf="item?.url" [routerLink]="item?.url" class="mat-bread-crumb-list-item">{{ item.label }}</a>\n                    <span *ngIf="!item?.url" class="mat-bread-crumb-list-item">{{ item.label }}</span>\n                    <span *ngIf="breadcrumb.length !== i+1"> / </span>\n                </span>\n            </span>\n        </mat-list-item>\n    </mat-list>\n</mat-toolbar>',styles:[".mat-bread-crumb{height:30px;background-color:#f1efeb}.mat-bread-crumb-list{padding-bottom:10px}.mat-bread-crumb-list-item{font-size:15px}.mat-bread-crumb-spacer{margin-left:-20px}"]}]}],r.ctorParameters=function(){return[{type:n.ActivatedRoute},{type:n.Router}]},r}(),c=function(){function r(){}return r.decorators=[{type:e.NgModule,args:[{declarations:[m],imports:[n.RouterModule,o.CommonModule,i.BrowserAnimationsModule,u.MatToolbarModule,l.MatListModule],exports:[m]}]}],r}();r.Ng7MatBreadcrumbService=s,r.Ng7MatBreadcrumbComponent=m,r.Ng7MatBreadcrumbModule=c,Object.defineProperty(r,"__esModule",{value:!0})});
  //# sourceMappingURL=ng7-mat-breadcrumb.umd.min.js.map