/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/ng2-alfresco-userinfo@1.9.0/bundles/ng2-alfresco-userinfo.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
/*!
 * @license
 * Copyright 2016 Alfresco Software, Ltd.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core"),require("ng2-alfresco-core"),require("rxjs/Rx"),require("@angular/material")):"function"==typeof define&&define.amd?define(["@angular/core","ng2-alfresco-core","rxjs/Rx","@angular/material"],t):"object"==typeof exports?exports["ng2-alfresco-userinfo"]=t(require("@angular/core"),require("ng2-alfresco-core"),require("rxjs/Rx"),require("@angular/material")):e["ng2-alfresco-userinfo"]=t(e["@angular/core"],e["ng2-alfresco-core"],e["rxjs/Rx"],e["@angular/material"])}(this,(function(e,t,r,n){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=16)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){"use strict";
/*!
 * @license
 * Copyright 2016 Alfresco Software, Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),a=r(1),s=r(5),c=function(){function e(e,t){this.apiService=e,this.logService=t}return e.prototype.getCurrentUserInfo=function(){var e=this;return s.Observable.fromPromise(this.apiService.getInstance().activiti.profileApi.getProfile()).map((function(e){return e})).catch((function(t){return e.handleError(t)}))},e.prototype.getCurrentUserProfileImage=function(){return this.apiService.getInstance().activiti.profileApi.getProfilePictureUrl()},e.prototype.handleError=function(e){return this.logService.error(e),s.Observable.throw(e||"Server error")},e=n([o.Injectable(),i("design:paramtypes",["function"==typeof(t=void 0!==a.AlfrescoApiService&&a.AlfrescoApiService)&&t||Object,"function"==typeof(r=void 0!==a.LogService&&a.LogService)&&r||Object])],e);var t,r}();t.BpmUserService=c},function(e,t,r){"use strict";
/*!
 * @license
 * Copyright 2016 Alfresco Software, Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),a=r(1),s=r(5),c=function(){function e(e,t,r){this.apiService=e,this.contentService=t,this.logService=r}return e.prototype.getUserInfo=function(e){var t=this;return s.Observable.fromPromise(this.callApiGetPersonInfo(e)).map((function(e){return e.entry})).catch((function(e){return t.handleError(e)}))},e.prototype.getCurrentUserInfo=function(){return this.getUserInfo("-me-")},e.prototype.callApiGetPersonInfo=function(e,t){return this.apiService.getInstance().core.peopleApi.getPerson(e,t)},e.prototype.getUserProfileImage=function(e){if(e){var t={entry:{id:e}};return this.contentService.getContentUrl(t)}},e.prototype.handleError=function(e){return this.logService.error(e),s.Observable.throw(e||"Server error")},e=n([o.Injectable(),i("design:paramtypes",["function"==typeof(t=void 0!==a.AlfrescoApiService&&a.AlfrescoApiService)&&t||Object,"function"==typeof(r=void 0!==a.AlfrescoContentService&&a.AlfrescoContentService)&&r||Object,"function"==typeof(c=void 0!==a.LogService&&a.LogService)&&c||Object])],e);var t,r,c}();t.EcmUserService=c},function(e,t,r){"use strict";
/*!
 * @license
 * Copyright 2016 Alfresco Software, Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),a=r(1),s=r(10),c=r(11),u=r(2),l=r(3),f=function(){function e(e,t,n){var i=this;this.ecmUserService=e,this.bpmUserService=t,this.authService=n,this.ecmBackgroundImage=r(9),this.bpmBackgroundImage=r(8),this.menuPositionX="after",this.menuPositionY="below",this.anonymousImageUrl=r(7),n.onLogin.subscribe((function(e){i.getUserInfo()}))}return e.prototype.ngOnInit=function(){this.getUserInfo()},e.prototype.getUserInfo=function(){this.getEcmUserInfo(),this.getBpmUserInfo()},e.prototype.isLoggedIn=function(){return this.authService.isLoggedIn()},e.prototype.getEcmUserInfo=function(){var e=this;this.authService.isEcmLoggedIn()?this.ecmUserService.getCurrentUserInfo().subscribe((function(t){e.ecmUser=new c.EcmUserModel(t),e.getEcmAvatar()})):(this.ecmUser=null,this.ecmUserImage=null)},e.prototype.getBpmUserInfo=function(){var e=this;this.authService.isBpmLoggedIn()?(this.bpmUserService.getCurrentUserInfo().subscribe((function(t){e.bpmUser=new s.BpmUserModel(t)})),this.bpmUserImage=this.bpmUserService.getCurrentUserProfileImage()):(this.bpmUser=null,this.bpmUserImage=null)},e.prototype.onImageLoadingError=function(e){e&&(e.target.src=this.fallBackThumbnailImage||this.anonymousImageUrl)},e.prototype.stopClosing=function(e){e.stopPropagation()},e.prototype.getEcmAvatar=function(){this.ecmUserImage=this.ecmUserService.getUserProfileImage(this.ecmUser.avatarId)},e.prototype.getUserAvatar=function(){return this.ecmUserImage||this.bpmUserImage},e.prototype.getBpmUserAvatar=function(){return this.bpmUserImage},e.prototype.getEcmUserAvatar=function(){return this.ecmUserImage},n([o.Input(),i("design:type",String)],e.prototype,"ecmBackgroundImage",void 0),n([o.Input(),i("design:type",String)],e.prototype,"bpmBackgroundImage",void 0),n([o.Input(),i("design:type",String)],e.prototype,"menuPositionX",void 0),n([o.Input(),i("design:type",String)],e.prototype,"menuPositionY",void 0),n([o.Input(),i("design:type",String)],e.prototype,"fallBackThumbnailImage",void 0),e=n([o.Component({selector:"adf-userinfo, ng2-alfresco-userinfo",styles:[r(14)],template:r(12),encapsulation:o.ViewEncapsulation.None}),i("design:paramtypes",["function"==typeof(t=void 0!==l.EcmUserService&&l.EcmUserService)&&t||Object,"function"==typeof(f=void 0!==u.BpmUserService&&u.BpmUserService)&&f||Object,"function"==typeof(p=void 0!==a.AlfrescoAuthenticationService&&a.AlfrescoAuthenticationService)&&p||Object])],e);var t,f,p}();t.UserInfoComponent=f},function(e,t){e.exports=r},function(e,t,r){"use strict";
/*!
 * @license
 * Copyright 2016 Alfresco Software, Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0});var i=r(0),o=r(15);function a(){return[o.MdButtonModule,o.MdMenuModule,o.MdTabsModule,o.MdCardModule]}t.modules=a;var s=function(){function e(){}return e=n([i.NgModule({imports:a(),exports:a()})],e)}();t.MaterialModule=s},function(e,t,r){e.exports=r.p+"assets/images/anonymous.6de44e6eb9dc32187635b13868e6b2fc.gif"},function(e,t,r){e.exports=r.p+"assets/images/bpm-background.ee4a55539eeb9762ca6b7b037664b192.png"},function(e,t,r){e.exports=r.p+"assets/images/ecm-background.84de3762880d8e6b7d94ab283b026d3a.png"},function(e,t,r){"use strict";
/*!
 * @license
 * Copyright 2016 Alfresco Software, Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){e&&(this.apps=e.apps,this.capabilities=e.capabilities,this.company=e.company,this.created=e.created,this.email=e.email,this.externalId=e.externalId,this.firstName=e.firstName,this.lastName=e.lastName,this.fullname=e.fullname,this.fullNameDisplay=e?this.formatValue(e.firstName).trim()+" "+this.formatValue(e.lastName).trim():null,this.groups=e.groups,this.id=e.id,this.lastUpdate=e.lastUpdate,this.latestSyncTimeStamp=e.latestSyncTimeStamp,this.password=e.password,this.pictureId=e.pictureId,this.status=e.status,this.tenantId=e.tenantId,this.tenantName=e.tenantName,this.tenantPictureId=e.tenantPictureId,this.type=e.type)}return e.prototype.formatValue=function(e){return e&&"null"!==e?e:"N/A"},e}();t.BpmUserModel=n},function(e,t,r){"use strict";
/*!
 * @license
 * Copyright 2016 Alfresco Software, Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.id=e&&e.id||null,this.firstName=e&&e.firstName,this.lastName=e&&e.lastName,this.fullNameDisplay=e?this.formatValue(e.firstName).trim()+" "+this.formatValue(e.lastName).trim():null,this.description=e&&e.description||null,this.avatarId=e&&e.avatarId||null,this.email=e&&e.email||null,this.skypeId=e&&e.skypeId,this.googleId=e&&e.googleId,this.instantMessageId=e&&e.instantMessageId,this.jobTitle=e&&e.jobTitle||null,this.location=e&&e.location||null,this.company=e&&e.company,this.mobile=e&&e.mobile,this.telephone=e&&e.telephone,this.statusUpdatedAt=e&&e.statusUpdatedAt,this.userStatus=e&&e.userStatus,this.enabled=e&&e.enabled,this.emailNotificationsEnabled=e&&e.emailNotificationsEnabled}return e.prototype.formatValue=function(e){return e&&"null"!==e?e:"N/A"},e}();t.EcmUserModel=n},function(e,t){e.exports='<div id="userinfo_container" *ngIf="isLoggedIn()">\n    <button md-button [mdMenuTriggerFor]="menu" class="adf-userinfo-menu_button">\n    <div class="adf-userinfo-button-profile" id="user-profile" data-automation-id="user-profile">\n        <img id="logged-user-img" [src]="getUserAvatar()"\n             alt="user-info-profile-button"\n             (error)="onImageLoadingError($event)" class="adf-userinfo-profile-image"/>\n    </div>\n</button>\n    <md-menu #menu="mdMenu" id="user-profile-lists" [xPosition]="menuPositionX" [yPosition]="menuPositionY" [overlapTrigger]="false" class="adf-userinfo-menu">\n        <md-tab-group id="tab-group-env" (click)="stopClosing($event)"\n            class="adf-userinfo-tab" [class.adf-hide-tab]="!bpmUser || !ecmUser">\n            <md-tab id="ecm-panel" label="Content Services" *ngIf="ecmUser">\n                <md-card class="adf-userinfo-card">\n                    <md-card-header class="adf-userinfo-card-header" [style.background-image]="\'url(\' + ecmBackgroundImage + \')\'">\n                        <img class="adf-userinfo-profile-picture"\n                            id="ecm-user-detail-image"\n                            alt="ecm-profile-image"\n                            (error)="onImageLoadingError($event)"\n                            [src]="getEcmUserAvatar()" />\n                       <div class="adf-userinfo-title" id="ecm-username">{{ecmUser.fullNameDisplay}}</div>\n                    </md-card-header>\n                    <md-card-content>\n                        <div class="adf-userinfo-supporting-text">\n                                <div class="adf-userinfo-detail">\n                                    <span id="ecm-full-name" class="adf-userinfo__detail-title">{{ecmUser.fullNameDisplay}}</span>\n                                    <span class="adf-userinfo__detail-profile" id="ecm-email"> {{ecmUser.email}} </span>\n                                </div>\n                                <div class="adf-userinfo-detail">\n                                    <span class="adf-userinfo__secondary-info">\n                                        {{ \'USER_PROFILE.LABELS.ECM.JOB_TITLE\' | translate }}\n                                        <span id="ecm-job-title" class="adf-userinfo__detail-profile"> {{ ecmUser.jobTitle ? ecmUser.jobTitle : \'N/A\' }} </span>\n                                    </span>\n                                </div>\n                        </div>\n                    </md-card-content>\n                </md-card>\n            </md-tab>\n            <md-tab label="Process Services" id="bpm-panel" *ngIf="bpmUser">\n            <md-card class="adf-userinfo-card">\n                <md-card-header class="adf-userinfo-card-header" [style.background-image]="\'url(\' + bpmBackgroundImage + \')\'">\n                    <img class="adf-userinfo-profile-picture"\n                        id="bpm-user-detail-image"\n                        alt="bpm-profile-image"\n                        (error)="onImageLoadingError($event)"\n                        [src]="getBpmUserAvatar()"/>\n                   <div class="adf-userinfo-title" id="bpm-username">{{bpmUser.fullNameDisplay}}</div>\n                </md-card-header>\n                <md-card-content>\n                    <div class="adf-userinfo-supporting-text">\n                            <div class="adf-userinfo-detail">\n                                <span id="bpm-full-name" class="adf-userinfo__detail-title">{{ bpmUser.fullNameDisplay }}</span>\n                                <span class="adf-userinfo__detail-profile" id="bpm-email"> {{bpmUser.email}} </span>\n                            </div>\n                            <div class="adf-userinfo-detail">\n                                <span id="bpm-tenant" class="adf-userinfo__secondary-info">\n                                    {{ \'USER_PROFILE.LABELS.BPM.TENANT\' | translate }}\n                                    <span class="adf-userinfo__detail-profile">{{ bpmUser.tenantName ? bpmUser.tenantName : \'N/A\' }}</span>\n                                </span>\n                            </div>\n                    </div>\n                </md-card-content>\n            </md-card>\n            </md-tab>\n        </md-tab-group>\n    </md-menu>\n</div>\n'},function(e,t){e.exports=""},function(e,t,r){var n=r(13);e.exports="string"==typeof n?n:n.toString()},function(e,t){e.exports=n},function(e,t,r){"use strict";
/*!
 * @license
 * Copyright 2016 Alfresco Software, Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};function i(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),a=r(1),s=r(6),c=r(4),u=r(2),l=r(3);i(r(4)),i(r(2)),i(r(3)),t.USER_INFO_DIRECTIVES=[c.UserInfoComponent],t.USER_INFO_PROVIDERS=[l.EcmUserService,u.BpmUserService];var f=function(){function e(){}return e=n([o.NgModule({imports:[a.CoreModule,s.MaterialModule],declarations:t.USER_INFO_DIRECTIVES.slice(),providers:t.USER_INFO_PROVIDERS.concat([{provide:a.TRANSLATION_PROVIDER,multi:!0,useValue:{name:"ng2-alfresco-userinfo",source:"assets/ng2-alfresco-userinfo"}}]),exports:t.USER_INFO_DIRECTIVES.slice()})],e)}();t.UserInfoModule=f;var p=function(){};t.UserInfoComponentModule=p}])}));
//# sourceMappingURL=/sm/ca9b0b2fdc9c32e5e1318a467d63af1ea23d60d9a671fadbf0e68cc3f2edac99.map