@sunbird-cb/utils 0.0.1-ang-17-20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4437 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Output, Inject, Component, NgModule, HostBinding, Input, Directive, HostListener, ViewChild, Pipe, LOCALE_ID } from '@angular/core';
3
+ import * as i1$1 from '@angular/material/dialog';
4
+ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
5
+ import { BehaviorSubject, ReplaySubject, fromEvent, timer, of, forkJoin, Subject } from 'rxjs';
6
+ import * as i3 from '@angular/material/snack-bar';
7
+ import * as i1 from '@angular/cdk/layout';
8
+ import { Breakpoints } from '@angular/cdk/layout';
9
+ import { map, debounceTime, distinctUntilChanged, throttleTime, catchError, mergeMap, retry, filter } from 'rxjs/operators';
10
+ import * as i1$2 from '@angular/common';
11
+ import { CommonModule } from '@angular/common';
12
+ import * as i6 from 'ngx-image-cropper';
13
+ import { ImageCropperModule } from 'ngx-image-cropper';
14
+ import * as i7 from '@angular/material/icon';
15
+ import { MatIconModule } from '@angular/material/icon';
16
+ import * as i8 from '@angular/material/button';
17
+ import { MatButtonModule } from '@angular/material/button';
18
+ import * as i9 from '@angular/material/card';
19
+ import { MatCardModule } from '@angular/material/card';
20
+ import * as i10 from '@angular/material/slider';
21
+ import { MatSliderModule } from '@angular/material/slider';
22
+ import { MatToolbarModule } from '@angular/material/toolbar';
23
+ import { MatTooltipModule } from '@angular/material/tooltip';
24
+ import * as i4 from '@angular/material/progress-spinner';
25
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
26
+ import * as i3$1 from '@angular/router';
27
+ import { NavigationEnd } from '@angular/router';
28
+ import * as i1$3 from '@angular/common/http';
29
+ import * as i2 from '@angular/cdk/platform';
30
+ import moment from 'moment';
31
+ import * as _ from 'lodash';
32
+ import { orderBy } from 'lodash';
33
+ import * as i1$4 from '@angular/platform-browser';
34
+
35
+ // const instanceConfigPath: string | null = window.location.host
36
+ // const locationHost: string | null = window.location.host
37
+ // if (!environment.production && Boolean(environment.sitePath)) {
38
+ // locationHost = environment.sitePath
39
+ // instanceConfigPath = environment.sitePath
40
+ // }
41
+ class ConfigurationsService {
42
+ // update as the single source of truth
43
+ constructor() {
44
+ this.appSetup = true;
45
+ // The url the user tried to access while landing in the app before accepting tnc
46
+ this.userUrl = '';
47
+ this.baseUrl = `assets/configurations`;
48
+ this.sitePath = `assets/configurations`;
49
+ this.hostPath = (window.location.host).replace(':', '_');
50
+ this.userRoles = null;
51
+ this.eventBufferTimeInMinutes = null;
52
+ this.userGroups = null;
53
+ this.restrictedFeatures = null;
54
+ this.restrictedWidgets = null;
55
+ this.instanceConfig = null;
56
+ this.appsConfig = null;
57
+ this.rootOrg = null;
58
+ this.org = null;
59
+ this.activeOrg = '';
60
+ this.isProduction = false;
61
+ this.hasAcceptedTnc = false;
62
+ this.profileDetailsStatus = false;
63
+ this.userPreference = null;
64
+ this.userProfile = null;
65
+ this.userProfileV2 = null;
66
+ this.isAuthenticated = false;
67
+ this.isNewUser = false;
68
+ this.isActive = true;
69
+ // pinnedApps
70
+ this.pinnedApps = new BehaviorSubject(new Set());
71
+ // Notifier
72
+ this.prefChangeNotifier = new ReplaySubject(1);
73
+ this.tourGuideNotifier = new ReplaySubject();
74
+ this.authChangeNotifier = new ReplaySubject(1);
75
+ // Preference Related Values
76
+ this.activeThemeObject = null;
77
+ this.activeFontObject = null;
78
+ this.isDarkMode = false;
79
+ this.isIntranetAllowed = false;
80
+ this.isRTL = false;
81
+ this.activeLocale = null;
82
+ this.activeLocaleGroup = '';
83
+ this.completedActivity = null;
84
+ this.completedTour = false;
85
+ this.profileSettings = ['profilePicture', 'learningTime', 'learningPoints'];
86
+ this.primaryNavBar = {
87
+ color: 'primary',
88
+ };
89
+ this.pageNavBar = {
90
+ color: 'primary',
91
+ };
92
+ this.primaryNavBarConfig = null;
93
+ this.updateOrgReadData = new BehaviorSubject('');
94
+ this.updateOrgReadDataObservable = this.updateOrgReadData.asObservable();
95
+ // @Inject('env') env: any
96
+ // if (!env.production && Boolean(env.sitePath)) {
97
+ // locationHost = env.sitePath
98
+ // instanceConfigPath = env.sitePath
99
+ // }
100
+ }
101
+ updateOrgData(id) {
102
+ this.updateOrgReadData.next(id);
103
+ }
104
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
105
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationsService, providedIn: 'root' }); }
106
+ }
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationsService, decorators: [{
108
+ type: Injectable,
109
+ args: [{
110
+ providedIn: 'root',
111
+ }]
112
+ }], ctorParameters: () => [] });
113
+
114
+ class ValueService {
115
+ constructor(breakpointObserver) {
116
+ this.breakpointObserver = breakpointObserver;
117
+ this.isXSmall$ = this.breakpointObserver
118
+ .observe([Breakpoints.XSmall])
119
+ .pipe(map((res) => res.matches));
120
+ this.isLtMedium$ = this.breakpointObserver
121
+ .observe([Breakpoints.XSmall, Breakpoints.Small])
122
+ .pipe(map((res) => res.matches));
123
+ }
124
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ValueService, deps: [{ token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable }); }
125
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ValueService, providedIn: 'root' }); }
126
+ }
127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ValueService, decorators: [{
128
+ type: Injectable,
129
+ args: [{
130
+ providedIn: 'root',
131
+ }]
132
+ }], ctorParameters: () => [{ type: i1.BreakpointObserver }] });
133
+
134
+ class ImageCropComponent {
135
+ constructor(dialogRef, configSvc, snackBar, valueSvc, data) {
136
+ this.dialogRef = dialogRef;
137
+ this.configSvc = configSvc;
138
+ this.snackBar = snackBar;
139
+ this.valueSvc = valueSvc;
140
+ // need to set for creator Logo
141
+ this.data = new EventEmitter();
142
+ this.isRoundCrop = false;
143
+ this.isNotOfRequiredSize = false;
144
+ this.imageFileBase64 = '';
145
+ this.width = '';
146
+ this.height = '';
147
+ this.imageDimensions = '';
148
+ this.croppedHeight = '';
149
+ this.croppedWidth = '';
150
+ this.cropperReadyToStart = false;
151
+ this.fileName = '';
152
+ this.canvasRotation = 0;
153
+ this.transform = {};
154
+ this.resetValue = false;
155
+ this.isXSmall = false;
156
+ this.isThumbnail = true;
157
+ this.isRoundCrop = data.isRoundCrop;
158
+ if (data.imageFile) {
159
+ this.imageFile = data.imageFile;
160
+ }
161
+ if (data.imageFileName) {
162
+ this.fileName = data.imageFileName;
163
+ }
164
+ if (!data.isRoundCrop) {
165
+ if (data.height) {
166
+ this.opHeight = data.height;
167
+ }
168
+ if (data.width) {
169
+ this.opWidth = data.width;
170
+ }
171
+ }
172
+ }
173
+ ngOnInit() {
174
+ this.thumbnailSizeDetection();
175
+ this.valueSvc.isXSmall$.subscribe((isXSmall) => {
176
+ this.isXSmall = isXSmall;
177
+ if (this.isXSmall) {
178
+ this.dialogRef.updateSize('90%');
179
+ }
180
+ else {
181
+ this.dialogRef.updateSize('70%');
182
+ }
183
+ });
184
+ }
185
+ // displays the default image
186
+ changeToDefaultImg($event) {
187
+ $event.target.src = this.configSvc.instanceConfig ?
188
+ this.configSvc.instanceConfig.logos.defaultContent : '';
189
+ }
190
+ // image cropping event
191
+ imageCropped(event) {
192
+ this.imageFileBase64 = event.base64; // store the cropped image as a base64 value
193
+ this.cropimageFile = this.base64ImageToBlob(this.imageFileBase64); // convert the cropped image as a file
194
+ this.croppedHeight = event.height;
195
+ this.croppedWidth = event.width;
196
+ }
197
+ openSnackBar(message) {
198
+ this.snackBar.open(message, 'X', {
199
+ duration: 2000,
200
+ });
201
+ }
202
+ continueToImageCrop() {
203
+ this.isNotOfRequiredSize = false;
204
+ }
205
+ // checks if the image is of the correct dimensions
206
+ thumbnailSizeDetection() {
207
+ const fr = new FileReader();
208
+ fr.readAsDataURL(this.imageFile);
209
+ fr.onload = () => {
210
+ const img = new Image();
211
+ img.src = fr.result;
212
+ img.onload = () => {
213
+ this.width = img.width;
214
+ this.height = img.height;
215
+ if (!this.isRoundCrop) {
216
+ if ((this.height === this.opHeight) && (this.width === this.opWidth)) {
217
+ this.openSnackBar('Image is of the required dimensions of the thumbnail, croping is not available!');
218
+ return;
219
+ }
220
+ if ((this.height < this.opHeight) || (this.width < this.opWidth)) {
221
+ this.isNotOfRequiredSize = true;
222
+ }
223
+ }
224
+ };
225
+ };
226
+ }
227
+ base64ImageToBlob(str) {
228
+ // extract content type and base64 payload from original string
229
+ const pos = str.indexOf(';base64,');
230
+ // var type = str.substring(5, pos);
231
+ const b64 = str.substr(pos + 8);
232
+ // decode base64
233
+ const imageContent = atob(b64);
234
+ // create an ArrayBuffer and a view (as unsigned 8-bit)
235
+ const buffer = new ArrayBuffer(imageContent.length);
236
+ const view = new Uint8Array(buffer);
237
+ // fill the view, using the decoded base64
238
+ for (let n = 0; n < imageContent.length; n = n + 1) {
239
+ view[n] = imageContent.charCodeAt(n);
240
+ }
241
+ // convert ArrayBuffer to Blob
242
+ const blob = new Blob([view], { type: 'image/png' });
243
+ const b = blob;
244
+ // Cast to a File() type
245
+ b.lastModifiedDate = new Date();
246
+ b.name = this.fileName;
247
+ const file = new File([blob], this.fileName, { type: 'image/jpeg' });
248
+ return file;
249
+ }
250
+ flipAfterRotate() {
251
+ const flippedH = this.transform.flipH;
252
+ const flippedV = this.transform.flipV;
253
+ this.transform = {
254
+ ...this.transform,
255
+ flipH: flippedV,
256
+ flipV: flippedH,
257
+ };
258
+ }
259
+ rotateLeft() {
260
+ this.canvasRotation = this.canvasRotation - 1;
261
+ this.flipAfterRotate();
262
+ }
263
+ rotateRight() {
264
+ this.canvasRotation = this.canvasRotation + 1;
265
+ this.flipAfterRotate();
266
+ }
267
+ flipHorizontal() {
268
+ this.transform = {
269
+ ...this.transform,
270
+ flipH: !this.transform.flipH,
271
+ };
272
+ }
273
+ zoom(event) {
274
+ this.resetValue = false;
275
+ this.transform = {
276
+ ...this.transform,
277
+ scale: event.value,
278
+ };
279
+ }
280
+ // calls when apply button is clicked,and returns the cropped image
281
+ croppingImage() {
282
+ this.dialogRef.close(this.cropimageFile);
283
+ }
284
+ reset() {
285
+ this.resetValue = true;
286
+ this.canvasRotation = 0;
287
+ this.transform = {};
288
+ }
289
+ // closes the dialog box
290
+ close() {
291
+ this.dialogRef.close();
292
+ }
293
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageCropComponent, deps: [{ token: i1$1.MatDialogRef }, { token: ConfigurationsService }, { token: i3.MatSnackBar }, { token: ValueService }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
294
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: ImageCropComponent, isStandalone: false, selector: "ws-utils-image-crop", outputs: { data: "data" }, ngImport: i0, template: "<ng-container *ngIf=\"isNotOfRequiredSize\">\r\n <mat-dialog-content>\r\n <div class=\"flex pl-4\">\r\n <mat-icon class=\"ws-mat-warn-text largeicon padding-remove-left\">warning</mat-icon>\r\n <h2 class=\"text-xl\" i18n>This image will appear stretched as it is not in proper dimension. Do you want to\r\n continue?</h2>\r\n </div>\r\n <div class=\"text-sm pl-4\">\r\n <div i18n class=\"pb-2\">Note:</div>\r\n <div i18n class=\"pb-2\">Required dimensions : 265 * 150</div>\r\n <div class=\"flex flex-wrap items-baseline\">\r\n <div>Current dimensions:</div>\r\n <div class=\"pl-1\">{{ width }} * {{ height }} px</div>\r\n </div>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions class=\"flex flex-end\">\r\n <div class=\"flex flex-end\">\r\n <button mat-raised-button autofocus type=\"button\" (click)=\" close()\">\r\n <span i18n>No</span>\r\n </button>\r\n <button mat-raised-button type=\"button\" class=\"text-white ws-mat-primary-background text-white\"\r\n (click)=\" continueToImageCrop()\">\r\n <span class=\"text-white\" i18n>Yes</span>\r\n </button>\r\n </div>\r\n </mat-dialog-actions>\r\n</ng-container>\r\n<ng-container *ngIf=\"isRoundCrop\">\r\n <!-- For Profile image - start -->\r\n <div class=\"flex flex-between\">\r\n <mat-icon class=\" ws-mat-primary-text margin-bottom-xxs\">crop</mat-icon>\r\n <p mat-dialog-title class=\"text-3xl font-weight-bold ws-mat-primary-text\" i18n>Profile Photo</p>\r\n <mat-icon class=\"float-right flex-end cursor-pointer\" (click)=\"close()\" i18n>close</mat-icon>\r\n\r\n </div>\r\n <mat-dialog-content class=\"p-0 overflow-hidden \" *ngIf=\"isRoundCrop\">\r\n <div class=\"flex flex-between\">\r\n <div class=\"profile-slides\">\r\n <image-cropper #imageCropper class=\"image-cropper-profile\" [imageFile]=\"imageFile\" [maintainAspectRatio]=\"true\"\r\n [aspectRatio]=\"250 / 250\" [resizeToWidth]=\"100\" [roundCropper]=\"isRoundCrop\" [resizeToHeight]=\"120\"\r\n [cropperMinWidth]=\"500\" [format]=\"'jpeg'\" [transform]=\"transform\" [canvasRotation]=\"canvasRotation\"\r\n (imageCropped)=\"imageCropped($event)\">\r\n </image-cropper>\r\n </div>\r\n </div>\r\n <ul class=\"toolbar cf\">\r\n <li><button mat-raised-button class=\"mat-button\" (click)=\"rotateLeft()\">\r\n <mat-icon class=\"text-white large-icon ws-mat-primary-text\">rotate_left</mat-icon>\r\n <span class=\"button-text\" i18n>Rotate Left</span>\r\n </button>\r\n </li>\r\n <li><button mat-raised-button class=\"mat-button\" (click)=\"rotateRight()\">\r\n <mat-icon class=\"text-white medium-icon ws-mat-primary-text\">rotate_right</mat-icon>\r\n <span class=\"button-text\" i18n>Rotate Right</span>\r\n </button></li>\r\n <li><button mat-raised-button class=\"mat-button\" (click)=\"flipHorizontal()\">\r\n <mat-icon class=\"text-white medium-icon ws-mat-primary-text\">flip</mat-icon>\r\n <span class=\"button-text\" i18n>Flip Horizontal</span>\r\n </button></li>\r\n <li><a href=\"#\"><i class=\"icon-cloud\"></i></a></li>\r\n </ul>\r\n </mat-dialog-content>\r\n</ng-container> <!-- For Profile image - end -->\r\n<ng-container>\r\n <ng-container *ngIf=\"!isNotOfRequiredSize && !isRoundCrop \">\r\n <div class=\"flex flex-between\">\r\n <mat-icon class=\" ws-mat-primary-text margin-bottom-xxs\">crop</mat-icon>\r\n <p mat-dialog-title class=\"text-3xl title-margin font-weight-bold ws-mat-primary-text\" i18n>Edit Image</p>\r\n <mat-icon class=\"float-right flex-end cursor-pointer\" (click)=\"close()\" i18n>\r\n close</mat-icon>\r\n </div>\r\n <mat-dialog-content *ngIf=\"!isRoundCrop\">\r\n <div class=\"flex flex-between\">\r\n <div class=\"Slides\">\r\n <image-cropper #imageCropper class=\"image-cropper padding-remove\" [imageFile]=\"imageFile\"\r\n [maintainAspectRatio]=\"true\" [aspectRatio]=\"opWidth / opHeight\" [resizeToWidth]=\"opWidth\"\r\n [roundCropper]=\"isRoundCrop\" [resizeToHeight]=\"opHeight\" [cropperMinWidth]=\"opWidth\" [format]=\"'jpeg'\"\r\n [transform]=\"transform\" [canvasRotation]=\"canvasRotation\" (imageCropped)=\"imageCropped($event)\">\r\n </image-cropper>\r\n <div class=\"flex flex-between\">\r\n <span class=\"my-3\" i18n>Zoom</span>\r\n <mat-slider class=\"w-full mx-3\" color=\"primary\" (input)=\"zoom($event)\" min=\"1\" max=\"2.5\" step=\"0.1\">\r\n </mat-slider>\r\n </div>\r\n <div class=\"edit-feature-window \" *ngIf=\"!isXSmall\">\r\n <div class=\"flex flex-between\">\r\n <button mat-raised-button class=\"mat-button\" (click)=\"rotateLeft()\">\r\n <mat-icon class=\"text-white large-icon ws-mat-primary-text\">rotate_left</mat-icon>\r\n <span class=\"button-text\" i18n>Rotate Left</span>\r\n </button>\r\n <button mat-raised-button class=\"mat-button\" (click)=\"rotateRight()\">\r\n <mat-icon class=\"text-white medium-icon ws-mat-primary-text\">rotate_right</mat-icon>\r\n <span class=\"button-text\" i18n>Rotate Right</span>\r\n </button>\r\n <button mat-raised-button class=\"mat-button\" (click)=\"flipHorizontal()\">\r\n <mat-icon class=\"text-white medium-icon ws-mat-primary-text\">flip</mat-icon>\r\n <span class=\"button-text\" i18n>Flip Horizontal</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <mat-card class=\"ws-mat-primary-border-top-bolder mat-elevation-z6 margin-bottom-l button-text\"\r\n *ngIf=\"isThumbnail\">\r\n <img [src]=\"imageFileBase64\" height=\"auto\" width=\"100%\" (error)=\"changeToDefaultImg($event)\" />\r\n <div class=\"flex flex-middle justify-center margin-bottom-s padding-top-s\">\r\n <mat-icon class=\"ws-mat-primary-text padding-right-s\">image</mat-icon>\r\n <b class=\"mat-title margin-remove ws-mat-primary-text\" i18n>Preview</b>\r\n </div>\r\n </mat-card>\r\n </div>\r\n <div class=\"edit-feature-window heightwidth\">\r\n <!-- <div class=\"flex flex-middle margin-left-l margin-bottom-s padding-top-s\">\r\n <mat-icon class=\"ws-mat-primary-text padding-right-s\">swap_horiz</mat-icon>\r\n <b class=\"mat-body margin-remove \" i18n>Cropped dimensions: {{ opWidth }} * {{ opHeight }} px</b>\r\n </div> -->\r\n <div class=\"flex flex-middle margin-left-l margin-bottom-s padding-top-s\">\r\n <mat-icon class=\"ws-mat-primary-text padding-right-s\">swap_horiz</mat-icon>\r\n <b class=\"mat-body margin-remove \">\r\n <span i18n>Cropped Width: </span>\r\n <span>{{ croppedWidth }}</span>\r\n <span i18n>px</span>\r\n </b>\r\n </div>\r\n <div class=\"flex flex-middle margin-left-l margin-bottom-s padding-top-s\">\r\n <mat-icon class=\"ws-mat-primary-text padding-right-s\">swap_vert</mat-icon>\r\n <b class=\"mat-body margin-remove \">\r\n <span i18n>Cropped Height: </span>\r\n <span>{{ croppedHeight }}</span>\r\n <span i18n>px</span>\r\n </b>\r\n </div>\r\n </div>\r\n </mat-dialog-content>\r\n </ng-container>\r\n <mat-dialog-actions align=\"end\" *ngIf=\"!isNotOfRequiredSize \">\r\n <div class=\"flex flex-end margin-bottom-s\">\r\n <!-- <button mat-raised-button type=\"button\" (click)=\" reset()\">\r\n <span i18n>Reset</span>\r\n </button> -->\r\n <button mat-raised-button type=\"button\" class=\"text-white ws-mat-primary-background text-white\"\r\n (click)=\" croppingImage()\">\r\n <span class=\"text-white\" i18n>Apply</span>\r\n </button>\r\n </div>\r\n </mat-dialog-actions>\r\n</ng-container>\r\n", styles: [".image-cropper{max-height:55vh}::ng-deep image-cropper .overlay{background-color:transparent!important}.Slides{display:block;height:auto;width:50%;position:relative;margin-left:auto;margin-right:auto;padding:0 1.25em}@media only screen and (max-width:1030px){.Slides{padding:0;width:100%}}.cursor{cursor:pointer}.edit-feature-window{background:transparent;justify-content:center}mat-toolbar{background-color:#fff!important;z-index:1!important}mat-dialog-content{padding:1.25em!important}@media only screen and (max-width:1030px){mat-dialog-content{padding:.25em .5em!important}}.heightwidth{display:flex}@media only screen and (max-width:1030px){.heightwidth{display:block}}@media only screen and (max-width:1030px){.mat-button{min-width:auto;padding:0 14px}}.largeicon{font-size:2em;padding:.13em .5em}.tooltip{background:#b71c1c}.dimension-icon{position:relative;top:.35em;padding:0 0 0 .3em}@media only screen and (max-width:1030px){.button-text{display:none}}.image-cropper-profile{max-height:55vh}.profile-slides{box-shadow:0 10px 20px #00000030,0 6px 6px #0000003b;display:block;height:auto;width:50%;position:relative;margin-left:auto;margin-right:auto}@media only screen and (max-width:1030px){.profile-slides{padding:0;width:100%}}.toolbar{left:50%;margin:1em 0 0 -10em;position:absolute;width:auto;border-radius:4px}.cf:before,.cf:after{content:\"\";display:table}.cf:after{clear:both}.toolbar li{float:left;list-style:none}.toolbar a{border-left:0px solid rgba(79,123,170,.4);border-right:1px solid rgba(255,255,255,.3)}.toolbar li:first-child a{border-left:none;border-radius:4px 0 0 4px}.toolbar li:last-child a{border-right:none;border-radius:0 4px 4px 0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "format", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "autoCrop", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "cropper", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i10.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }] }); }
295
+ }
296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageCropComponent, decorators: [{
297
+ type: Component,
298
+ args: [{ selector: 'ws-utils-image-crop', standalone: false, template: "<ng-container *ngIf=\"isNotOfRequiredSize\">\r\n <mat-dialog-content>\r\n <div class=\"flex pl-4\">\r\n <mat-icon class=\"ws-mat-warn-text largeicon padding-remove-left\">warning</mat-icon>\r\n <h2 class=\"text-xl\" i18n>This image will appear stretched as it is not in proper dimension. Do you want to\r\n continue?</h2>\r\n </div>\r\n <div class=\"text-sm pl-4\">\r\n <div i18n class=\"pb-2\">Note:</div>\r\n <div i18n class=\"pb-2\">Required dimensions : 265 * 150</div>\r\n <div class=\"flex flex-wrap items-baseline\">\r\n <div>Current dimensions:</div>\r\n <div class=\"pl-1\">{{ width }} * {{ height }} px</div>\r\n </div>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions class=\"flex flex-end\">\r\n <div class=\"flex flex-end\">\r\n <button mat-raised-button autofocus type=\"button\" (click)=\" close()\">\r\n <span i18n>No</span>\r\n </button>\r\n <button mat-raised-button type=\"button\" class=\"text-white ws-mat-primary-background text-white\"\r\n (click)=\" continueToImageCrop()\">\r\n <span class=\"text-white\" i18n>Yes</span>\r\n </button>\r\n </div>\r\n </mat-dialog-actions>\r\n</ng-container>\r\n<ng-container *ngIf=\"isRoundCrop\">\r\n <!-- For Profile image - start -->\r\n <div class=\"flex flex-between\">\r\n <mat-icon class=\" ws-mat-primary-text margin-bottom-xxs\">crop</mat-icon>\r\n <p mat-dialog-title class=\"text-3xl font-weight-bold ws-mat-primary-text\" i18n>Profile Photo</p>\r\n <mat-icon class=\"float-right flex-end cursor-pointer\" (click)=\"close()\" i18n>close</mat-icon>\r\n\r\n </div>\r\n <mat-dialog-content class=\"p-0 overflow-hidden \" *ngIf=\"isRoundCrop\">\r\n <div class=\"flex flex-between\">\r\n <div class=\"profile-slides\">\r\n <image-cropper #imageCropper class=\"image-cropper-profile\" [imageFile]=\"imageFile\" [maintainAspectRatio]=\"true\"\r\n [aspectRatio]=\"250 / 250\" [resizeToWidth]=\"100\" [roundCropper]=\"isRoundCrop\" [resizeToHeight]=\"120\"\r\n [cropperMinWidth]=\"500\" [format]=\"'jpeg'\" [transform]=\"transform\" [canvasRotation]=\"canvasRotation\"\r\n (imageCropped)=\"imageCropped($event)\">\r\n </image-cropper>\r\n </div>\r\n </div>\r\n <ul class=\"toolbar cf\">\r\n <li><button mat-raised-button class=\"mat-button\" (click)=\"rotateLeft()\">\r\n <mat-icon class=\"text-white large-icon ws-mat-primary-text\">rotate_left</mat-icon>\r\n <span class=\"button-text\" i18n>Rotate Left</span>\r\n </button>\r\n </li>\r\n <li><button mat-raised-button class=\"mat-button\" (click)=\"rotateRight()\">\r\n <mat-icon class=\"text-white medium-icon ws-mat-primary-text\">rotate_right</mat-icon>\r\n <span class=\"button-text\" i18n>Rotate Right</span>\r\n </button></li>\r\n <li><button mat-raised-button class=\"mat-button\" (click)=\"flipHorizontal()\">\r\n <mat-icon class=\"text-white medium-icon ws-mat-primary-text\">flip</mat-icon>\r\n <span class=\"button-text\" i18n>Flip Horizontal</span>\r\n </button></li>\r\n <li><a href=\"#\"><i class=\"icon-cloud\"></i></a></li>\r\n </ul>\r\n </mat-dialog-content>\r\n</ng-container> <!-- For Profile image - end -->\r\n<ng-container>\r\n <ng-container *ngIf=\"!isNotOfRequiredSize && !isRoundCrop \">\r\n <div class=\"flex flex-between\">\r\n <mat-icon class=\" ws-mat-primary-text margin-bottom-xxs\">crop</mat-icon>\r\n <p mat-dialog-title class=\"text-3xl title-margin font-weight-bold ws-mat-primary-text\" i18n>Edit Image</p>\r\n <mat-icon class=\"float-right flex-end cursor-pointer\" (click)=\"close()\" i18n>\r\n close</mat-icon>\r\n </div>\r\n <mat-dialog-content *ngIf=\"!isRoundCrop\">\r\n <div class=\"flex flex-between\">\r\n <div class=\"Slides\">\r\n <image-cropper #imageCropper class=\"image-cropper padding-remove\" [imageFile]=\"imageFile\"\r\n [maintainAspectRatio]=\"true\" [aspectRatio]=\"opWidth / opHeight\" [resizeToWidth]=\"opWidth\"\r\n [roundCropper]=\"isRoundCrop\" [resizeToHeight]=\"opHeight\" [cropperMinWidth]=\"opWidth\" [format]=\"'jpeg'\"\r\n [transform]=\"transform\" [canvasRotation]=\"canvasRotation\" (imageCropped)=\"imageCropped($event)\">\r\n </image-cropper>\r\n <div class=\"flex flex-between\">\r\n <span class=\"my-3\" i18n>Zoom</span>\r\n <mat-slider class=\"w-full mx-3\" color=\"primary\" (input)=\"zoom($event)\" min=\"1\" max=\"2.5\" step=\"0.1\">\r\n </mat-slider>\r\n </div>\r\n <div class=\"edit-feature-window \" *ngIf=\"!isXSmall\">\r\n <div class=\"flex flex-between\">\r\n <button mat-raised-button class=\"mat-button\" (click)=\"rotateLeft()\">\r\n <mat-icon class=\"text-white large-icon ws-mat-primary-text\">rotate_left</mat-icon>\r\n <span class=\"button-text\" i18n>Rotate Left</span>\r\n </button>\r\n <button mat-raised-button class=\"mat-button\" (click)=\"rotateRight()\">\r\n <mat-icon class=\"text-white medium-icon ws-mat-primary-text\">rotate_right</mat-icon>\r\n <span class=\"button-text\" i18n>Rotate Right</span>\r\n </button>\r\n <button mat-raised-button class=\"mat-button\" (click)=\"flipHorizontal()\">\r\n <mat-icon class=\"text-white medium-icon ws-mat-primary-text\">flip</mat-icon>\r\n <span class=\"button-text\" i18n>Flip Horizontal</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <mat-card class=\"ws-mat-primary-border-top-bolder mat-elevation-z6 margin-bottom-l button-text\"\r\n *ngIf=\"isThumbnail\">\r\n <img [src]=\"imageFileBase64\" height=\"auto\" width=\"100%\" (error)=\"changeToDefaultImg($event)\" />\r\n <div class=\"flex flex-middle justify-center margin-bottom-s padding-top-s\">\r\n <mat-icon class=\"ws-mat-primary-text padding-right-s\">image</mat-icon>\r\n <b class=\"mat-title margin-remove ws-mat-primary-text\" i18n>Preview</b>\r\n </div>\r\n </mat-card>\r\n </div>\r\n <div class=\"edit-feature-window heightwidth\">\r\n <!-- <div class=\"flex flex-middle margin-left-l margin-bottom-s padding-top-s\">\r\n <mat-icon class=\"ws-mat-primary-text padding-right-s\">swap_horiz</mat-icon>\r\n <b class=\"mat-body margin-remove \" i18n>Cropped dimensions: {{ opWidth }} * {{ opHeight }} px</b>\r\n </div> -->\r\n <div class=\"flex flex-middle margin-left-l margin-bottom-s padding-top-s\">\r\n <mat-icon class=\"ws-mat-primary-text padding-right-s\">swap_horiz</mat-icon>\r\n <b class=\"mat-body margin-remove \">\r\n <span i18n>Cropped Width: </span>\r\n <span>{{ croppedWidth }}</span>\r\n <span i18n>px</span>\r\n </b>\r\n </div>\r\n <div class=\"flex flex-middle margin-left-l margin-bottom-s padding-top-s\">\r\n <mat-icon class=\"ws-mat-primary-text padding-right-s\">swap_vert</mat-icon>\r\n <b class=\"mat-body margin-remove \">\r\n <span i18n>Cropped Height: </span>\r\n <span>{{ croppedHeight }}</span>\r\n <span i18n>px</span>\r\n </b>\r\n </div>\r\n </div>\r\n </mat-dialog-content>\r\n </ng-container>\r\n <mat-dialog-actions align=\"end\" *ngIf=\"!isNotOfRequiredSize \">\r\n <div class=\"flex flex-end margin-bottom-s\">\r\n <!-- <button mat-raised-button type=\"button\" (click)=\" reset()\">\r\n <span i18n>Reset</span>\r\n </button> -->\r\n <button mat-raised-button type=\"button\" class=\"text-white ws-mat-primary-background text-white\"\r\n (click)=\" croppingImage()\">\r\n <span class=\"text-white\" i18n>Apply</span>\r\n </button>\r\n </div>\r\n </mat-dialog-actions>\r\n</ng-container>\r\n", styles: [".image-cropper{max-height:55vh}::ng-deep image-cropper .overlay{background-color:transparent!important}.Slides{display:block;height:auto;width:50%;position:relative;margin-left:auto;margin-right:auto;padding:0 1.25em}@media only screen and (max-width:1030px){.Slides{padding:0;width:100%}}.cursor{cursor:pointer}.edit-feature-window{background:transparent;justify-content:center}mat-toolbar{background-color:#fff!important;z-index:1!important}mat-dialog-content{padding:1.25em!important}@media only screen and (max-width:1030px){mat-dialog-content{padding:.25em .5em!important}}.heightwidth{display:flex}@media only screen and (max-width:1030px){.heightwidth{display:block}}@media only screen and (max-width:1030px){.mat-button{min-width:auto;padding:0 14px}}.largeicon{font-size:2em;padding:.13em .5em}.tooltip{background:#b71c1c}.dimension-icon{position:relative;top:.35em;padding:0 0 0 .3em}@media only screen and (max-width:1030px){.button-text{display:none}}.image-cropper-profile{max-height:55vh}.profile-slides{box-shadow:0 10px 20px #00000030,0 6px 6px #0000003b;display:block;height:auto;width:50%;position:relative;margin-left:auto;margin-right:auto}@media only screen and (max-width:1030px){.profile-slides{padding:0;width:100%}}.toolbar{left:50%;margin:1em 0 0 -10em;position:absolute;width:auto;border-radius:4px}.cf:before,.cf:after{content:\"\";display:table}.cf:after{clear:both}.toolbar li{float:left;list-style:none}.toolbar a{border-left:0px solid rgba(79,123,170,.4);border-right:1px solid rgba(255,255,255,.3)}.toolbar li:first-child a{border-left:none;border-radius:4px 0 0 4px}.toolbar li:last-child a{border-right:none;border-radius:0 4px 4px 0}\n"] }]
299
+ }], ctorParameters: () => [{ type: i1$1.MatDialogRef }, { type: ConfigurationsService }, { type: i3.MatSnackBar }, { type: ValueService }, { type: undefined, decorators: [{
300
+ type: Inject,
301
+ args: [MAT_DIALOG_DATA]
302
+ }] }], propDecorators: { data: [{
303
+ type: Output
304
+ }] } });
305
+
306
+ // @dynamic
307
+ class ImageCropModule {
308
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageCropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
309
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: ImageCropModule, declarations: [ImageCropComponent], imports: [CommonModule,
310
+ ImageCropperModule,
311
+ MatIconModule,
312
+ MatButtonModule,
313
+ MatDialogModule,
314
+ MatToolbarModule,
315
+ MatDialogModule,
316
+ MatCardModule,
317
+ MatTooltipModule,
318
+ MatSliderModule], exports: [ImageCropComponent] }); }
319
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageCropModule, imports: [CommonModule,
320
+ ImageCropperModule,
321
+ MatIconModule,
322
+ MatButtonModule,
323
+ MatDialogModule,
324
+ MatToolbarModule,
325
+ MatDialogModule,
326
+ MatCardModule,
327
+ MatTooltipModule,
328
+ MatSliderModule] }); }
329
+ }
330
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageCropModule, decorators: [{
331
+ type: NgModule,
332
+ args: [{
333
+ declarations: [ImageCropComponent],
334
+ imports: [
335
+ CommonModule,
336
+ ImageCropperModule,
337
+ MatIconModule,
338
+ MatButtonModule,
339
+ MatDialogModule,
340
+ MatToolbarModule,
341
+ MatDialogModule,
342
+ MatCardModule,
343
+ MatTooltipModule,
344
+ MatSliderModule,
345
+ ],
346
+ exports: [ImageCropComponent]
347
+ }]
348
+ }] });
349
+
350
+ var EFeatures;
351
+ (function (EFeatures) {
352
+ // Playlists
353
+ EFeatures["PLAYLIST"] = "playlist";
354
+ EFeatures["PLAYLIST_CREATE"] = "playlistCreate";
355
+ EFeatures["PLAYLIST_ADD_NEW_CONTENT"] = "playlistAddNewContent";
356
+ EFeatures["PLAYLIST_REMOVE_EXISTING_CONTENT"] = "playlistRemoveExistingContent";
357
+ EFeatures["PLAYLIST_DELETE"] = "playlistDelete";
358
+ EFeatures["PLAYLIST_SHARE"] = "playlistShare";
359
+ // Goals
360
+ EFeatures["GOAL"] = "goal";
361
+ EFeatures["GOAL_CREATE_OWN"] = "goalCreateOwn";
362
+ EFeatures["GOAL_CREATE_SUGGESTED"] = "goalCreateSuggested";
363
+ EFeatures["GOAL_EDIT_EXISTING_GOAL"] = "goalEditExistingGoal";
364
+ EFeatures["GOAL_DELETE_EXISTING_GOAL"] = "goalDeleteExistingGoal";
365
+ EFeatures["GOAL_SHARE_GOAL_WITH_OTHERS"] = "goalShareGoalWithOthers";
366
+ EFeatures["GOAL_VIEW_ALL_GOALS_SECTION"] = "goalViewAllGoalsSection";
367
+ EFeatures["GOAL_VIEW_IN_PROGRESS_GOALS_SECTION"] = "goalViewInProgressGoalsSection";
368
+ EFeatures["GOAL_VIEW_COMPLETED_GOALS_SECTION"] = "goalViewCompletedGoalsSection";
369
+ // Navigator
370
+ EFeatures["NAVIGATOR"] = "navigator";
371
+ EFeatures["NAVIGATOR_VIEW_NAVIGATOR_CAROUSEL"] = "navigatorViewNavigatorCarousel";
372
+ EFeatures["NAVIGATOR_VIEW_ROLES_PAGE"] = "navigatorViewRolesPage";
373
+ EFeatures["NAVIGATOR_SELECT_ANY_PILLAR"] = "navigatorSelectAnyPillar";
374
+ EFeatures["NAVIGATOR_PURSUE_ANY_OFFERING"] = "navigatorPursueAnyOffering";
375
+ EFeatures["NAVIGATOR_CREATE_GOAL_FROM_OFFERING"] = "navigatorCreateGoalFromOffering";
376
+ EFeatures["NAVIGATOR_VIEW_EXPLORE_PAGE"] = "navigatorViewExplorePage";
377
+ EFeatures["NAVIGATOR_SELECT_ANY_LEARNING_PATH"] = "navigatorSelectAnyLearningPath";
378
+ EFeatures["NAVIGATOR_CREATE_GOAL_FROM_LEARNING_PATH"] = "navigatorCreateGoalFromLearningPath";
379
+ EFeatures["NAVIGATOR_VIEW_SUGGESTIONS_PAGE"] = "navigatorViewSuggestionsPage";
380
+ EFeatures["NAVIGATOR_SELECT_SUGGESTED_TOPICS"] = "navigatorSelectSuggestedTopics";
381
+ EFeatures["NAVIGATOR_GET_SUGGESTIONS_OF_SELECTED_TOPICS"] = "navigatorGetSuggestionsOfSelectedTopics";
382
+ EFeatures["NAVIGATOR_CREATE_GOAL_FROM_SELECTED_LEARNING_PATHS"] = "navigatorCreateGoalFromSelectedLearningPaths";
383
+ EFeatures["NAVIGATOR_VIEW_INDUSTRIES_PAGE"] = "navigatorViewIndustriesPage";
384
+ EFeatures["NAVIGATOR_VIEW_CME_PAGE"] = "navigatorViewCmePage";
385
+ EFeatures["NAVIGATOR_SELECT_SUBDOMAIN"] = "navigatorSelectSubdomain";
386
+ EFeatures["NAVIGATOR_SELECT_PILLAR"] = "navigatorSelectPillar";
387
+ EFeatures["NAVIGATOR_SELECT_THEME"] = "navigatorSelectTheme";
388
+ EFeatures["NAVIGATOR_VIEW_CPG_PAGE"] = "navigatorViewCpgPage";
389
+ EFeatures["NAVIGATOR_VIEW_ENERGY_PAGE"] = "navigatorViewEnergyPage";
390
+ EFeatures["NAVIGATOR_VIEW_FINANCIAL_SERVICES_PAGE"] = "navigatorViewFinancialServicesPage";
391
+ EFeatures["NAVIGATOR_VIEW_HEALTH_CARE_PAGE"] = "navigatorViewHealthCarePage";
392
+ EFeatures["NAVIGATOR_VIEW_INSURANCE_PAGE"] = "navigatorViewInsurancePage";
393
+ EFeatures["NAVIGATOR_VIEW_LIFE_SCIENCES_PAGE"] = "navigatorViewLifeSciencesPage";
394
+ EFeatures["NAVIGATOR_VIEW_MFG_PAGE"] = "navigatorViewMfgPage";
395
+ EFeatures["NAVIGATOR_VIEW_RETAIL_PAGE"] = "navigatorViewRetailPage";
396
+ EFeatures["NAVIGATOR_VIEW_TRAVEL_AND_HOSPITALITY_PAGE"] = "navigatorViewTravelAndHospitalityPage";
397
+ EFeatures["NAVIGATOR_VIEW_UTILITIES_PAGE"] = "navigatorViewUtilitiesPage";
398
+ EFeatures["NAVIGATOR_VIEW_CME_ANALYTICS"] = "navigatorViewCmeAnalytics";
399
+ EFeatures["NAVIGATOR_VIEW_GPG_ANALYTICS"] = "navigatorViewGpgAnalytics";
400
+ EFeatures["NAVIGATOR_VIEW_ENERGY_ANALYTICS"] = "navigatorViewEnergyAnalytics";
401
+ EFeatures["NAVIGATOR_VIEW_FINANCIAL_SERVICES_ANALYTICS"] = "navigatorViewFinancialServicesAnalytics";
402
+ EFeatures["NAVIGATOR_VIEW_HEALTH_CARE_ANALYTICS"] = "navigatorViewHealthCareAnalytics";
403
+ EFeatures["NAVIGATOR_VIEW_INSURANCE_ANALYTICS"] = "navigatorViewInsuranceAnalytics";
404
+ EFeatures["NAVIGATOR_VIEW_LIFE_SCIENCES_ANALYTICS"] = "navigatorViewLifeSciencesAnalytics";
405
+ EFeatures["NAVIGATOR_VIEW_MFG_ANALYTICS"] = "navigatorViewMfgAnalytics";
406
+ EFeatures["NAVIGATOR_VIEW_RETAIL_ANALYTICS"] = "navigatorViewRetailAnalytics";
407
+ EFeatures["NAVIGATOR_VIEW_TRAVEL_AND_HOSPITALITY_ANALYTICS"] = "navigatorViewTravelAndHospitalityAnalytics";
408
+ EFeatures["NAVIGATOR_VIEW_UTILITIES_ANALYTICS"] = "navigatorViewUtilitiesAnalytics";
409
+ EFeatures["NAVIGATOR_VIEW_PILLARS_PAGE"] = "navigatorViewPillarsPage";
410
+ EFeatures["NAVIGATOR_VIEW_DIFFERENT_COURSES_IN_PILLAR"] = "navigatorViewDifferentCoursesInPillar";
411
+ EFeatures["NAVIGATOR_VIEW_FULL_STACK_PAGE"] = "navigatorViewFullStackPage";
412
+ EFeatures["NAVIGATOR_VIEW_DIFFERENT_FULL_STACK_PROGRAMS"] = "navigatorViewDifferentFullStackPrograms";
413
+ // Catalog
414
+ EFeatures["CATALOG"] = "catalog";
415
+ EFeatures["CATALOG_VIEW_CATALOG_LIST"] = "catalogViewCatalogList";
416
+ EFeatures["CATALOG_SELECT_ITEM_FROM_CATALOG_LIST"] = "catalogSelectItemFromCatalogList";
417
+ EFeatures["CATALOG_VIEW_PROGRAMS_STRIP"] = "catalogViewProgramsStrip";
418
+ EFeatures["CATALOG_VIEW_COURSES_STRIP"] = "catalogViewCoursesStrip";
419
+ EFeatures["CATALOG_VIEW_LEARNING_MODULES_STRIP"] = "catalogViewLearningModulesStrip";
420
+ EFeatures["CATALOG_VIEW_RESOURCES_STRIP"] = "catalogViewResourcesStrip";
421
+ // Marketing Page
422
+ EFeatures["MARKETING_PAGE"] = "marketingPage";
423
+ EFeatures["MARKETING_PAGE_VIEW_BRAND_ASSETS_PAGE"] = "marketingPageViewBrandAssetsPage";
424
+ EFeatures["MARKETING_PAGE_VIEW_CORPORATE_STRIP"] = "marketingPageViewCorporateStrip";
425
+ EFeatures["MARKETING_PAGE_VIEW_EMPLOYEE_STRIP"] = "marketingPageViewEmployeeStrip";
426
+ EFeatures["MARKETING_PAGE_VIEW_EXPERIMENTAL_SHOWCASE_PAGE"] = "marketingPageViewExperimentalShowcasePage";
427
+ EFeatures["MARKETING_PAGE_VIEW_HUBS_PAGE"] = "marketingPageViewHubsPage";
428
+ EFeatures["MARKETING_PAGE_VIEW_CONNECTICUT_STRIP"] = "marketingPageViewConnecticutStrip";
429
+ EFeatures["MARKETING_PAGE_VIEW_INDIANA_STRIP"] = "marketingPageViewIndianaStrip";
430
+ EFeatures["MARKETING_PAGE_VIEW_RHODE_ISLAND_STRIP"] = "marketingPageViewRhodeIslandStrip";
431
+ EFeatures["MARKETING_PAGE_VIEW_CLIENT_STORIES_PAGE"] = "marketingPageViewClientStoriesPage";
432
+ EFeatures["MARKETING_PAGE_VIEW_AGILE_SCALE_AT_DIGITAL_STRIP"] = "marketingPageViewAgileScaleAtDigitalStrip";
433
+ EFeatures["MARKETING_PAGE_VIEW_AI_POWERED_CORE_STRIP"] = "marketingPageViewAiPoweredCoreStrip";
434
+ EFeatures["MARKETING_PAGE_VIEW_ALWAYS_ON_LEAVING_STRIP"] = "marketingPageViewAlwaysOnLeavingStrip";
435
+ EFeatures["MARKETING_PAGE_VIEW_SERVICES_PAGE"] = "marketingPageViewServicesPage";
436
+ EFeatures["MARKETING_PAGE_VIEW_SERVICES_PENTAGON"] = "marketingPageViewServicesPentagon";
437
+ EFeatures["MARKETING_PAGE_VIEW_OFFERINGS_LIST"] = "marketingPageViewOfferingsList";
438
+ EFeatures["MARKETING_PAGE_SELECT_ANY_OFFERING"] = "marketingPageSelectAnyOffering";
439
+ EFeatures["MARKETING_PAGE_SELECT_ANY_PILLAR_FROM_PENTAGON"] = "marketingPageSelectAnyPillarFromPentagon";
440
+ EFeatures["MARKETING_PAGE_VIEW_INDUSTRIES_PAGE"] = "marketingPageViewIndustriesPage";
441
+ EFeatures["MARKETING_PAGE_VIEW_INDUSTRIES_LIST"] = "marketingPageViewIndustriesList";
442
+ EFeatures["MARKETING_PAGE_SELECT_ANY_INDUSTRY"] = "marketingPageSelectAnyIndustry";
443
+ EFeatures["MARKETING_PAGE_VIEW_PRODUCT_AND_SUBSIDIARIES_PAGE"] = "marketingPageViewProductAndSubsidiariesPage";
444
+ EFeatures["MARKETING_PAGE_VIEW_PRODUCT_AND_SUBSIDIARIES_LIST"] = "marketingPageViewProductAndSubsidiariesList";
445
+ EFeatures["MARKETING_PAGE_SELECT_ANY_PRODUCT_AND_SUBSIDIARY"] = "marketingPageSelectAnyProductAndSubsidiary";
446
+ // Interests
447
+ EFeatures["INTERESTS"] = "interests";
448
+ EFeatures["INTERESTS_ADD_INTERESTS_FROM_SEARCH"] = "interestsAddInterestsFromSearch";
449
+ EFeatures["INTERESTS_ADD_INTERESTS_FROM_OUR_SUGGESTIONS_SECTION"] = "interestsAddInterestsFromOurSuggestionsSection";
450
+ EFeatures["INTERESTS_REMOVE_INTERESTS_FROM_MY_INTERESTS_SECTION"] = "interestsRemoveInterestsFromMyInterestsSection";
451
+ EFeatures["INTERESTS_VIEW_INTERESTS_SEARCH_FIELD"] = "interestsViewInterestsSearchField";
452
+ EFeatures["INTERESTS_VIEW_MY_INTERESTS_SECTION"] = "interestsViewMyInterestsSection";
453
+ EFeatures["INTERESTS_VIEW_OWN_SUGGESTIONS_SECTION"] = "interestsViewOwnSuggestionsSection";
454
+ EFeatures["INTERESTS_VIEW_MORE_SUGGESTIONS_BUTTON"] = "interestsViewMoreSuggestionsButton";
455
+ // Feedback
456
+ EFeatures["FEEDBACK"] = "feedback";
457
+ EFeatures["FEEDBACK_VIEW_PLATFORM_FEEDBACK_SECTION"] = "feedbackViewPlatformFeedbackSection";
458
+ EFeatures["FEEDBACK_STAR_RATING_FOR_PLATFORM"] = "feedbackStarRatingForPlatform";
459
+ EFeatures["FEEDBACK_WRITE_PLATFORM_FEEDBACK"] = "feedbackWritePlatformFeedback";
460
+ EFeatures["FEEDBACK_RESET_PLATFORM_FEEDBACK"] = "feedbackResetPlatformFeedback";
461
+ EFeatures["FEEDBACK_SUBMIT_PLATFORM_FEEDBACK"] = "feedbackSubmitPlatformFeedback";
462
+ EFeatures["FEEDBACK_VIEW_CONTENT_FEEDBACK_SECTION"] = "feedbackViewContentFeedbackSection";
463
+ EFeatures["FEEDBACK_STAR_RATING_FOR_CONTENT"] = "feedbackStarRatingForContent";
464
+ EFeatures["FEEDBACK_WRITE_CONTENT_FEEDBACK"] = "feedbackWriteContentFeedback";
465
+ EFeatures["FEEDBACK_RESET_CONTENT_FEEDBACK"] = "feedbackResetContentFeedback";
466
+ EFeatures["FEEDBACK_SUBMIT_CONTENT_FEEDBACK"] = "feedbackSubmitContentFeedback";
467
+ EFeatures["FEEDBACK_VIEW_ISSUE_REPORTING_SECTION"] = "feedbackViewIssueReportingSection";
468
+ EFeatures["FEEDBACK_WRITING_ISSUE"] = "feedbackWritingIssue";
469
+ EFeatures["FEEDBACK_RESET_ISSUE"] = "feedbackResetIssue";
470
+ EFeatures["FEEDBACK_SUBMIT_ISSUE"] = "feedbackSubmitIssue";
471
+ // Contact Us
472
+ EFeatures["CONTACT_US"] = "contactUs";
473
+ EFeatures["CONTACT_US_VIEW_RAISE_AHD_SECTION"] = "contactUsViewRaiseAhdSection";
474
+ EFeatures["CONTACT_US_VIEW_MAIL_US_SECTION"] = "contactUsViewMailUsSection";
475
+ EFeatures["CONTACT_US_VIEW_TALK_TO_US_SECTION"] = "contactUsViewTalkToUsSection";
476
+ EFeatures["CONTACT_US_RAISE_AHD"] = "contactUsRaiseAhd";
477
+ EFeatures["CONTACT_US_WRITE_EMAIL"] = "contactUsWriteEmail";
478
+ EFeatures["CONTACT_US_DIAL_FROM_PHONE"] = "contactUsDialFromPhone";
479
+ // FAQs
480
+ EFeatures["FAQ"] = "faq";
481
+ EFeatures["FAQ_VIEW_LOGIN_FAQS"] = "faqViewLoginFaqs";
482
+ EFeatures["FAQ_VIEW_ODC_ACCESS_FAQS"] = "faqViewOdcAccessFaqs";
483
+ EFeatures["FAQ_VIEW_COMPATIBILITY_FAQS"] = "faqViewCompatibilityFaqs";
484
+ EFeatures["FAQ_VIEW_INSTALLATION_FAQS"] = "faqViewInstallationFaqs";
485
+ EFeatures["FAQ_VIEW_PROGRESS_COMPLETION_FAQS"] = "faqViewProgressCompletionFaqs";
486
+ EFeatures["FAQ_VIEW_VIDEO_FAQS"] = "faqViewVideoFaqs";
487
+ EFeatures["FAQ_VIEW_AUTHORING_FAQS"] = "faqViewAuthoringFaqs";
488
+ // Mobile Apps
489
+ EFeatures["MOBILE_APPS"] = "mobileApps";
490
+ EFeatures["MOBILE_APPS_VIEW_ANDROID_APP_SECTION"] = "mobileAppsViewAndroidAppSection";
491
+ EFeatures["MOBILE_APPS_DOWNLOAD_APP_FROM_PLAY_STORE"] = "mobileAppsDownloadAppFromPlayStore";
492
+ EFeatures["MOBILE_APPS_DOWNLOAD_APP_FROM_OUR_SERVER"] = "mobileAppsDownloadAppFromOurServer";
493
+ EFeatures["MOBILE_APPS_VIEW_QR_CODE_FOR_ANDROID_APP"] = "mobileAppsViewQrCodeForAndroidApp";
494
+ EFeatures["MOBILE_APPS_VIEW_IOS_APP_SECTION"] = "mobileAppsViewIosAppSection";
495
+ EFeatures["MOBILE_APPS_DOWNLOAD_IOS_APP"] = "mobileAppsDownloadIosApp";
496
+ EFeatures["MOBILE_APPS_VIEW_QR_CODE_FOR_IOS_APP"] = "mobileAppsViewQrCodeForIosApp";
497
+ // About Us
498
+ EFeatures["ABOUT_US"] = "aboutUs";
499
+ EFeatures["ABOUT_US_VIEW_ABOUT_US_PAGE_SECTIONS"] = "aboutUsViewAboutUsPageSections";
500
+ // Settings
501
+ EFeatures["SETTINGS"] = "settings";
502
+ EFeatures["SETTINGS_VIEW_LANGUAGE_SECTION"] = "settingsViewLanguageSection";
503
+ EFeatures["SETTINGS_VIEW_FONT_SIZE_SECTION"] = "settingsViewFontSizeSection";
504
+ EFeatures["SETTINGS_VIEW_THEME_SECTION"] = "settingsViewThemeSection";
505
+ EFeatures["SETTINGS_CHANGE_LANGUAGE"] = "settingsChangeLanguage";
506
+ EFeatures["SETTINGS_CHANGE_FONT_SIZE"] = "settingsChangeFontSize";
507
+ EFeatures["SETTINGS_CHANGE_THEME"] = "settingsChangeTheme";
508
+ // Login Page
509
+ EFeatures["LOGIN_PAGE"] = "loginPage";
510
+ EFeatures["LOGIN_PAGE_LOGIN_FOR_INFOSCIONS"] = "loginPageLoginForInfoscions";
511
+ EFeatures["LOGIN_PAGE_LOGIN_FOR_SUBSIDIARIES"] = "loginPageLoginForSubsidiaries";
512
+ EFeatures["LOGIN_PAGE_LOGIN_FOR_NEW_RECRUITS"] = "loginPageLoginForNewRecruits";
513
+ EFeatures["LOGIN_PAGE_ABOUT_US"] = "loginPageAboutUs";
514
+ EFeatures["LOGIN_PAGE_TERMS_OF_USE"] = "loginPageTermsOfUse";
515
+ EFeatures["LOGIN_PAGE_FAQS"] = "loginPageFaqs";
516
+ EFeatures["LOGIN_PAGE_CONTACT_US"] = "loginPageContactUs";
517
+ // TOC Page
518
+ EFeatures["TOC_PAGE"] = "tocPage";
519
+ EFeatures["TOC_PAGE_VIEW_OVERVIEW_SECTION"] = "tocPageViewOverviewSection";
520
+ EFeatures["TOC_PAGE_VIEW_INSTRUCTOR_LED_SECTION"] = "tocPageViewInstructorLedSection";
521
+ EFeatures["TOC_PAGE_VIEW_COHORTS_SECTION"] = "tocPageViewCohortsSection";
522
+ EFeatures["TOC_PAGE_VIEW_DISCUSSION_FORUM_SECTION"] = "tocPageViewDiscussionForumSection";
523
+ EFeatures["TOC_PAGE_VIEW_COURSE_ANALYTICS_SECTION"] = "tocPageViewCourseAnalyticsSection";
524
+ EFeatures["TOC_PAGE_VIEW_WHATS_NEXT_SECTION"] = "tocPageViewWhatsNextSection";
525
+ EFeatures["TOC_PAGE_VIEW_PART_OF_SECTION"] = "tocPageViewPartOfSection";
526
+ EFeatures["TOC_PAGE_REGISTER_FOR_UPCOMING_TRAINING"] = "tocPageRegisterForUpcomingTraining";
527
+ EFeatures["TOC_PAGE_UNREGISTER_FROM_REGISTERED_TRAINING"] = "tocPageUnregisterFromRegisteredTraining";
528
+ EFeatures["TOC_PAGE_SHARE_INSTRUCTOR_LED_TRAININGS"] = "tocPageShareInstructorLedTrainings";
529
+ EFeatures["TOC_PAGE_VIEW_EDUCATORS_OF_TRAININGS"] = "tocPageViewEducatorsOfTrainings";
530
+ EFeatures["TOC_PAGE_NOMINATE_OTHERS_FOR_TRAININGS"] = "tocPageNominateOthersForTrainings";
531
+ EFeatures["TOC_PAGE_REQUEST_TRAINING"] = "tocPageRequestTraining";
532
+ EFeatures["TOC_PAGE_VIEW_ACTIVE_LEARNERS_SECTION"] = "tocPageViewActiveLearnersSection";
533
+ EFeatures["TOC_PAGE_VIEW_ALL_ACTIVE_LEARNERS"] = "tocPageViewAllActiveLearners";
534
+ EFeatures["TOC_PAGE_VIEW_CURRENTLY_ACTIVE_LEARNERS"] = "tocPageViewCurrentlyActiveLearners";
535
+ EFeatures["TOC_PAGE_VIEW_LEARNERS_SHARING_THE_SAME_GOALS"] = "tocPageViewLearnersSharingTheSameGoals";
536
+ EFeatures["TOC_PAGE_VIEW_EXPERTS_AND_TUTORS_SECTION"] = "tocPageViewExpertsAndTutorsSection";
537
+ EFeatures["TOC_PAGE_VIEW_ALL_EXPERTS_AND_TUTORS"] = "tocPageViewAllExpertsAndTutors";
538
+ EFeatures["TOC_PAGE_VIEW_AUTHORS_OF_COURSE"] = "tocPageViewAuthorsOfCourse";
539
+ EFeatures["TOC_PAGE_VIEW_EDUCATORS_OF_COURSE"] = "tocPageViewEducatorsOfCourse";
540
+ EFeatures["TOC_PAGE_VIEW_TOPPERS_OF_COURSE"] = "tocPageViewToppersOfCourse";
541
+ EFeatures["TOC_PAGE_MAIL_THE_PERSON"] = "tocPageMailThePerson";
542
+ EFeatures["TOC_PAGE_CALL_THE_PERSON"] = "tocPageCallThePerson";
543
+ EFeatures["TOC_PAGE_POST_VIEWS_IN_DISCUSSION_FORUM"] = "tocPagePostViewsInDiscussionForum";
544
+ EFeatures["TOC_PAGE_LEARN_THE_COURSE"] = "tocPageLearnTheCourse";
545
+ EFeatures["TOC_PAGE_LIKE_THE_COURSE"] = "tocPageLikeTheCourse";
546
+ EFeatures["TOC_PAGE_SHARE_THE_COURSE"] = "tocPageShareTheCourse";
547
+ EFeatures["TOC_PAGE_ADD_COURSE_TO_GOALS"] = "tocPageAddCourseToGoals";
548
+ EFeatures["TOC_PAGE_ADD_COURSE_TO_PLAYLIST"] = "tocPageAddCourseToPlaylist";
549
+ EFeatures["TOC_PAGE_ADD_COURSE_TO_WATCHLIST"] = "tocPageAddCourseToWatchlist";
550
+ EFeatures["TOC_PAGE_GIVE_COURSE_FEEDBACK"] = "tocPageGiveCourseFeedback";
551
+ EFeatures["TOC_PAGE_RESUME_THE_COURSE"] = "tocPageResumeTheCourse";
552
+ EFeatures["TOC_PAGE_START_OVER_THE_COURSE"] = "tocPageStartOverTheCourse";
553
+ EFeatures["TOC_PAGE_GO_TO_COURSE_QUIZ"] = "tocPageGoToCourseQuiz";
554
+ EFeatures["TOC_PAGE_GO_TO_COURSE_HANDS_ON"] = "tocPageGoToCourseHandsOn";
555
+ // Navbar
556
+ EFeatures["NAVBAR"] = "navbar";
557
+ EFeatures["NAVBAR_VIEW_LOGO"] = "navbarViewLogo";
558
+ EFeatures["NAVBAR_CATALOG_ICON"] = "navbarCatalogIcon";
559
+ EFeatures["NAVBAR_NAVIGATOR_ICON"] = "navbarNavigatorIcon";
560
+ EFeatures["NAVBAR_NOTIFICATION_ICON"] = "navbarNotificationIcon";
561
+ EFeatures["NAVBAR_SETTINGS_ICON"] = "navbarSettingsIcon";
562
+ EFeatures["NAVBAR_SEARCH_ICON"] = "navbarSearchIcon";
563
+ EFeatures["NAVBAR_APPS_ICON"] = "navbarAppsIcon";
564
+ // Home Page
565
+ EFeatures["HOME_PAGE"] = "homePage";
566
+ EFeatures["HOME_PAGE_VIEW_CAROUSEL"] = "homePageViewCarousel";
567
+ EFeatures["HOME_PAGE_VIEW_CONTINUE_LEARNING_STRIP"] = "homePageViewContinueLearningStrip";
568
+ EFeatures["HOME_PAGE_VIEW_FEATURED_APPS_STRIP"] = "homePageViewFeaturedAppsStrip";
569
+ EFeatures["HOME_PAGE_VIEW_RECENT_ADDITION_TO_PLAYLISTS_STRIP"] = "homePageViewRecentAdditionToPlaylistsStrip";
570
+ EFeatures["HOME_PAGE_VIEW_BASED_ON_YOUR_INTERESTS_STRIP"] = "homePageViewBasedOnYourInterestsStrip";
571
+ EFeatures["HOME_PAGE_VIEW_BASED_ON_WHAT_YOU_VIEWED_STRIP"] = "homePageViewBasedOnWhatYouViewedStrip";
572
+ EFeatures["HOME_PAGE_VIEW_LATEST_STRIP"] = "homePageViewLatestStrip";
573
+ EFeatures["HOME_PAGE_VIEW_TRENDING_STRIP"] = "homePageViewTrendingStrip";
574
+ EFeatures["HOME_PAGE_SHOW_COMPLETED_FILTER"] = "homePageShowCompletedFilter";
575
+ EFeatures["HOME_PAGE_SHOW_RESOURCES_FILTER"] = "homePageShowResourcesFilter";
576
+ // TNC Page
577
+ EFeatures["TNC_PAGE"] = "tncPage";
578
+ EFeatures["TNC_PAGE_VIEW_CONTEST_RULES_SECTION"] = "tncPageViewContestRulesSection";
579
+ EFeatures["TNC_PAGE_VIEW_DATA_PRIVACY_SECTION"] = "tncPageViewDataPrivacySection";
580
+ EFeatures["TNC_PAGE_ACCEPT_TERMS_AND_CONDITIONS"] = "tncPageAcceptTermsAndConditions";
581
+ // Blogs
582
+ EFeatures["BLOGS"] = "blogs";
583
+ EFeatures["BLOG_VIEW_OTHERS_BLOGS"] = "blogViewOthersBlogs";
584
+ EFeatures["BLOGS_LIKE_OTHER_BLOGS"] = "blogsLikeOtherBlogs";
585
+ EFeatures["BLOGS_VIEW_MY_BLOGS"] = "blogsViewMyBlogs";
586
+ EFeatures["BLOGS_WRITE_NEW_BLOG"] = "blogsWriteNewBlog";
587
+ EFeatures["BLOGS_SAVE_BLOG_AS_DRAFT"] = "blogsSaveBlogAsDraft";
588
+ EFeatures["BLOGS_EDIT_MY_SAVED_BLOG"] = "blogsEditMySavedBlog";
589
+ EFeatures["BLOGS_PUBLISH_MY_BLOG"] = "blogsPublishMyBlog";
590
+ EFeatures["BLOGS_UPVOTE_FOR_BLOG"] = "blogsUpvoteForBlog";
591
+ EFeatures["BLOGS_DOWNVOTE_FOR_BLOG"] = "blogsDownvoteForBlog";
592
+ EFeatures["BLOGS_WRITE_RESPONSE_FOR_BLOG"] = "blogsWriteResponseForBlog";
593
+ EFeatures["BLOGS_DELETE_MY_BLOG"] = "blogsDeleteMyBlog";
594
+ EFeatures["BLOGS_EDIT_MY_RESPONSE"] = "blogsEditMyResponse";
595
+ EFeatures["BLOGS_DELETE_MY_RESPONSE"] = "blogsDeleteMyResponse";
596
+ EFeatures["BLOGS_VIEW_DRAFTS_SECTION"] = "blogsViewDraftsSection";
597
+ EFeatures["BLOGS_VIEW_PUBLISHED_SECTION"] = "blogsViewPublishedSection";
598
+ // Question and Answer
599
+ EFeatures["QUESTION_AND_ANSWER"] = "questionAndAnswer";
600
+ EFeatures["QUESTION_AND_ANSWER_VIEW_ALL_QUESTIONS_AND_ANSWERS"] = "questionAndAnswerViewAllQuestionsAndAnswers";
601
+ EFeatures["QUESTION_AND_ANSWER_VIEW_ONLY_UNANSWERED_QUESTIONS"] = "questionAndAnswerViewOnlyUnansweredQuestions";
602
+ EFeatures["QUESTION_AND_ANSWER_VIEW_MY_TIMELINE"] = "questionAndAnswerViewMyTimeline";
603
+ EFeatures["QUESTION_AND_ANSWER_ASK_NEW_QUESTION"] = "questionAndAnswerAskNewQuestion";
604
+ EFeatures["QUESTION_AND_ANSWER_VIEW_SPECIFIC_QUESTION"] = "questionAndAnswerViewSpecificQuestion";
605
+ EFeatures["QUESTION_AND_ANSWER_UPVOTE_FOR_ANSWER"] = "questionAndAnswerUpvoteForAnswer";
606
+ EFeatures["QUESTION_AND_ANSWER_DOWNVOTE_FOR_ANSWER"] = "questionAndAnswerDownvoteForAnswer";
607
+ EFeatures["QUESTION_AND_ANSWER_LIKE_AN_ANSWER"] = "questionAndAnswerLikeAnAnswer";
608
+ EFeatures["QUESTION_AND_ANSWER_ADD_COMMENT_FOR_ANY_ANSWER"] = "questionAndAnswerAddCommentForAnyAnswer";
609
+ EFeatures["QUESTION_AND_ANSWER_ADD_ANSWER_FOR_ANY_QUESTION"] = "questionAndAnswerAddAnswerForAnyQuestion";
610
+ EFeatures["QUESTION_AND_ANSWER_SAVE_QUESTION_AS_DRAFT"] = "questionAndAnswerSaveQuestionAsDraft";
611
+ EFeatures["QUESTION_AND_ANSWER_PUBLISH_SAVED_QUESTION"] = "questionAndAnswerPublishedSavedQuestion";
612
+ EFeatures["QUESTION_AND_ANSWER_VIEW_DRAFTS_SECTION"] = "questionAndAnswerViewDraftsSection";
613
+ EFeatures["QUESTION_AND_ANSWER_VIEW_PUBLISHED_SECTION"] = "questionAndAnswerViewPublishedSection";
614
+ // Badges
615
+ EFeatures["BADGES"] = "badges";
616
+ EFeatures["BADGES_VIEW_RECENTLY_EARNED_BADGE"] = "badgesViewRecentlyEarnedBadge";
617
+ EFeatures["BADGES_VIEW_ALL_EARNED_BADGES"] = "badgesViewAllEarnedBadges";
618
+ EFeatures["BADGES_VIEW_NEXT_TARGETTED_BADGES"] = "badgesViewNextTargettedBadges";
619
+ // Hands on Dashboard
620
+ EFeatures["HANDS_ON_DASHBOARD"] = "handsOnDashboard";
621
+ EFeatures["HANDS_ON_DASHBOARD_VIEW_MY_DASHBOARD"] = "handsOnDashboardViewMyDashboard";
622
+ EFeatures["HANDS_ON_DASHBOARD_VIEW_SHARED_PROFILE_SECTION"] = "handsOnDashboardViewSharedProfileSection";
623
+ // Learning History
624
+ EFeatures["LEARNING_HISTORY"] = "learningHistory";
625
+ EFeatures["LEARNING_HISTORY_VIEW_PROGRAMS_SECTION"] = "learningHistoryViewProgramsSection";
626
+ EFeatures["LEARNING_HISTORY_VIEW_COURSES_SECTION"] = "learningHistoryViewCoursesSection";
627
+ EFeatures["LEARNING_HISTORY_VIEW_LEARNING_MODULES_SECTION"] = "learningHistoryViewLearningModulesSection";
628
+ EFeatures["LEARNING_HISTORY_VIEW_RESOURCES_SECTION"] = "learningHistoryViewResourcesSection";
629
+ EFeatures["LEARNING_HISTORY_VIEW_CERTIFICATIONS_SECTION"] = "learningHistoryViewCertificationsSection";
630
+ EFeatures["LEARNING_HISTORY_APPLY_COMPLETED_FILTER"] = "learningHistoryApplyCompletedFilter";
631
+ EFeatures["LEARNING_HISTORY_VIEW_MORE_BUTTON"] = "learningHistoryViewMoreButton";
632
+ // Learning Time
633
+ EFeatures["LEARNING_TIME"] = "learningTime";
634
+ EFeatures["LEARNING_TIME_VIEW_LEARNING_TIME_GRAPH"] = "learningTimeViewLearningTimeGraph";
635
+ EFeatures["LEARNING_TIME_APPLY_BAR_GRAPH_FILTER"] = "learningTimeApplyBarGraphFilter";
636
+ EFeatures["LEARNING_TIME_APPLY_DATE_RANGE_FILTER"] = "learningTimeApplyDateRangeFilter";
637
+ EFeatures["LEARNING_TIME_APPLY_TIME_SPENT_FILTER"] = "learningTimeApplyTimeSpentFilter";
638
+ EFeatures["LEARNING_TIME_APPLY_APP_AVERAGE_FILTER"] = "learningTimeApplyAppAverageFilter";
639
+ EFeatures["LEARNING_TIME_APPLY_USER_AVERAGE_OVER_PERIOD_FILTER"] = "learningTimeApplyUserAverageOverPeriodFilter";
640
+ // Notification
641
+ EFeatures["NOTIFICATION"] = "notification";
642
+ EFeatures["NOTIFICATION_VIEW_RECENT_BADGE_EARNED"] = "notificationViewRecentBadgeEarned";
643
+ EFeatures["NOTIFICATION_VIEW_SHARED_PLAYLIST"] = "notificationViewSharedPlaylist";
644
+ EFeatures["NOTIFICATION_VIEW_SHARED_GOALS"] = "notificationViewSharedGoals";
645
+ // Profile
646
+ EFeatures["PROFILE"] = "profile";
647
+ EFeatures["PROFILE_VIEW_BASIC_INFORMATION"] = "profileViewBasicInformation";
648
+ EFeatures["PROFILE_VIEW_RECENTLY_LEARNED_COURSES"] = "profileViewRecentlyLearnedCourses";
649
+ EFeatures["PROFILE_VIEW_LIKED_ITEMS"] = "profileViewLikedItems";
650
+ EFeatures["PROFILE_VIEW_BADGES_EARNED"] = "profileViewBadgesEarned";
651
+ // Behavioural Skills
652
+ EFeatures["BEHAVIORAL_SKILLS"] = "behavioralSkills";
653
+ EFeatures["BEHAVIORAL_SKILLS_VIEW_MODEL_CLIENT_INTERACTIONS"] = "behavioralSkillsViewModalClientInteractions";
654
+ EFeatures["BEHAVIORAL_SKILLS_VIEW_CLIENT_INTERACTION_TESTS"] = "behavioralSkillsViewClientInteractionTests";
655
+ // Certifications
656
+ EFeatures["CERTIFICATIONS"] = "certifications";
657
+ EFeatures["CERTIFICATIONS_VIEW_MY_APPROVALS_SECTION"] = "certificationsViewMyApprovalsSection";
658
+ EFeatures["CERTIFICATIONS_VIEW_MY_REQUESTS_SECTION"] = "certificationsViewMyRequestsSection";
659
+ EFeatures["CERTIFICATIONS_VIEW_MY_CERTIFICATIONS_SECTION"] = "certificationsViewMyCertificationsSection";
660
+ EFeatures["CERTIFICATIONS_APPLY_COMPLETION_STATUS_FILTER"] = "certificationsApplyCompletionStatusFilter";
661
+ // Code Crack
662
+ EFeatures["CODE_CRACK"] = "codeCrack";
663
+ EFeatures["CODE_CRACK_VIEW_PUZZLE_MANIA"] = "codeCrackViewPuzzleMania";
664
+ EFeatures["CODE_CRACK_VIEW_CODE_CRACK"] = "codeCrackViewCodeCrack";
665
+ EFeatures["CODE_CRACK_VIEW_TECHNOLOGY_PLAYGROUND"] = "codeCrackViewTechnologyPlayground";
666
+ EFeatures["CODE_CRACK_WATCH_PROGRAMMING_CHALLENGES_VIDEO"] = "codeCrackWatchProgrammingChallengesVideo";
667
+ EFeatures["CODE_CRACK_VIEW_ACCELERATE"] = "codeCrackViewAccelerate";
668
+ EFeatures["CODE_CRACK_START_CODE_CRACK_TEST"] = "codeCrackStartCodeCrackTest";
669
+ EFeatures["CODE_CRACK_START_PUZZLE_MANIA"] = "codeCrackStartPuzzleMania";
670
+ EFeatures["CODE_CRACK_START_TECHNOLOGY_PLAYGROUND"] = "codeCrackStartTechnologyPlayground";
671
+ // Instructor Led Training
672
+ EFeatures["INSTRUCTOR_LED_TRAINING"] = "instructorLedTraining";
673
+ EFeatures["INSTRUCTOR_LED_TRAINING_VIEW_TRAINING_SCHEDULE_SECTION"] = "instructorLedTrainingViewTrainingScheduleSection";
674
+ EFeatures["INSTRUCTOR_LED_TRAINING_VIEW_FEEDBACK_SECTION"] = "instructorLedTrainingViewFeedbackSection";
675
+ EFeatures["INSTRUCTOR_LED_TRAINING_VIEW_TRAININGS_PLANNED_BY_YOUR_TEAM_SECTION"] = "instructorLedTrainingViewTrainingsPlannedByYourTeamSection";
676
+ EFeatures["INSTRUCTOR_LED_TRAINING_SEARCH_TRAINING"] = "instructorLedTrainingSearchTraining";
677
+ EFeatures["INSTRUCTOR_LED_TRAINING_REGISTER_FOR_TRAINING"] = "instructorLedTrainingRegisterForTraining";
678
+ EFeatures["INSTRUCTOR_LED_TRAINING_GIVE_TRAINING_FEEDBACK"] = "instructorLedTrainingGiveTrainingFeedback";
679
+ // LeaderBoard
680
+ EFeatures["LEADERBOARD"] = "leaderboard";
681
+ EFeatures["LEADERBOARD_VIEW_WEEKLY_SECTION"] = "leaderboardViewWeeklySection";
682
+ EFeatures["LEADERBOARD_VIEW_MONTHLY_SECTION"] = "leaderboardViewMonthlySection";
683
+ EFeatures["LEADERBOARD_VIEW_HALL_OF_FAME_SECTION"] = "leaderboardViewHallOfSection";
684
+ EFeatures["LEADERBOARD_APPLY_LEARNER_COLLABORATOR_FILTER"] = "leaderboardApplyLearnerCollaboratorFilter";
685
+ EFeatures["LEADERBOARD_BACK_DATE_BUTTON"] = "leaderboardBackDatebutton";
686
+ EFeatures["LEADERBOARD_FORWARD_DATE_BUTTON"] = "leaderboardForwardDateButton";
687
+ // Playground
688
+ EFeatures["PLAYGROUND"] = "playground";
689
+ EFeatures["PLAYGROUND_VIEW_TECHNOLOGY_PLAYGROUNDS_STRIP"] = "playgroundViewTechnologyPlaygorundsStrip";
690
+ EFeatures["PLAYGROUND_VIEW_ASSESSMENTS_PLAYGROUNDS_STRIP"] = "playgroundViewAssessmentsPlaygroundsStrip";
691
+ // Puzzle Mania
692
+ EFeatures["PUZZLE_MANIA"] = "puzzleMania";
693
+ EFeatures["PUZZLE_MANIA_VIEW_PUZZLE_MANIA"] = "puzzleManiaViewPuzzleMania";
694
+ EFeatures["PUZZLE_MANIA_VIEW_CODE_CRACK"] = "puzzleManiaViewCodeCrack";
695
+ EFeatures["PUZZLE_MANIA_VIEW_TECHNOLOGY_PLAYGROUND"] = "puzzleManiaViewTechnologyPlayground";
696
+ EFeatures["PUZZLE_MANIA_WATCH_PROGRAMMING_CHALLENGES_VIDEO"] = "puzzleManiaWatchProgrammingChallengesVideo";
697
+ EFeatures["PUZZLE_MANIA_VIEW_ACCELERATE"] = "puzzleManiaViewAccelerate";
698
+ EFeatures["PUZZLE_MANIA_START_CODE_CRACK_TEST"] = "puzzleManiaStartCodeCrackTest";
699
+ EFeatures["PUZZLE_MANIA_START_PUZZLE_MANIA"] = "puzzleManiaStartPuzzleMania";
700
+ EFeatures["PUZZLE_MANIA_START_TECHNOLOGY_PLAYGROUND"] = "puzzleManiaStartTechnologyPlayground";
701
+ // Full Stack Sales Leader
702
+ EFeatures["FULL_STACK_SALES_LEADER"] = "fullStackSalesLeader";
703
+ EFeatures["FULL_STACK_SALES_LEADER_WATCH_LEADER_VIDEO"] = "fullStackSalesLeaderWatchLeaderVideo";
704
+ EFeatures["FULL_STACK_SALES_LEADER_EMBARK_ON_THIS_LEARNING_JOURNEY_BUTTON"] = "fullStackSalesLeaderEmbarkOnThisLearningJourneyButton";
705
+ EFeatures["FULL_STACK_SALES_LEADER_QUICK_TOUR_VIDEO_LINK"] = "fullStackSalesLeaderQuickTourVideoLink";
706
+ EFeatures["FULL_STACK_SALES_LEADER_FEEDBACK_LINK"] = "fullStackSalesLeaderFeedbackLink";
707
+ EFeatures["FULL_STACK_SALES_LEADER_DROP_NOTE_LINK"] = "fullStackSalesLeaderDropNoteLink";
708
+ // Onboarding
709
+ EFeatures["ONBOARDING"] = "onboarding";
710
+ EFeatures["ONBOARDING_VIEW_DC_ONBOARDING_PROGRAMS_STRIP"] = "onboardingViewDcOnboardingProgramsStrip";
711
+ EFeatures["ONBOARDING_VIEW_ORGANISATIONAL_ONBOARDING_PROGRAMS_STRIP"] = "onboardingViewOrganisationalOnboardingProgramsStrip";
712
+ EFeatures["ONBOARDING_VIEW_ROLE_BASED_ONBOARDING_PROGRAMS_STRIP"] = "onboardingViewRoleBasedOnboardingProgramsStrip";
713
+ EFeatures["ONBOARDING_VIEW_UNIT_AND_PROJECT_ONBOARDING_PROGRAMS_STRIP"] = "onboardingViewUnitAndProjectOnboardingProgramsStrip";
714
+ // Search
715
+ EFeatures["SEARCH"] = "search";
716
+ EFeatures["SEARCH_SEARCHING_CONTENT"] = "searchSearchingContent";
717
+ // Knowledge Hub
718
+ EFeatures["KNOWLEDGE_HUB"] = "knowledgeHub";
719
+ EFeatures["KNOWLEDGE_HUB_SUBMIT_KNOWLEDGE_ARTIFACTS"] = "knowledgeHubSubmitKnowledgeArtifacts";
720
+ EFeatures["KNOWLEDGE_HUB_VIEW_TOP_PROJECTS_SECTION"] = "knowledgeHubViewTopProjectsSection";
721
+ EFeatures["KNOWLEDGE_HUB_VIEW_INTERESTING_READS_SECTION"] = "knowledgeHubViewInterestingReadsSection";
722
+ EFeatures["KNOWLEDGE_HUB_VIEW_MARKETING_SECTION"] = "knowledgeHubViewMarketingSection";
723
+ EFeatures["KNOWLEDGE_HUB_VIEW_KSHOP_CLASSIC_SECTION"] = "knowledgeHubViewKshopClassicSection";
724
+ EFeatures["KNOWLEDGE_HUB_VIEW_TRENDING_TOOLS_SECTION"] = "knowledgeHubViewTrendingToolsSection";
725
+ EFeatures["KNOWLEDGE_HUB_VIEW_DOCUMENTS_STRIP"] = "knowledgeHubViewDocumentsStrip";
726
+ EFeatures["KNOWLEDGE_HUB_VIEW_TOOLS_STRIP"] = "knowledgeHubViewProjectReferencesStrip";
727
+ EFeatures["KNOWLEDGE_HUB_VIEW_MARKETING_STRIP"] = "knowledgeHubViewMarketingStrip";
728
+ // Channels
729
+ EFeatures["CHANNELS"] = "channels";
730
+ EFeatures["CHANNELS_VIEW_LEADERSHIP_SECTION"] = "channelsViewLeadershipSection";
731
+ EFeatures["CHANNELS_VIEW_RAVI_KUMAR_PAGE"] = "channelsViewRaviKumarPage";
732
+ EFeatures["CHANNELS_VIEW_MOHIT_JOSHI_PAGE"] = "channelsViewMohitJoshiPage";
733
+ EFeatures["CHANNELS_FOLLOW_RAVI_KUMAR"] = "channelsFollowRaviKumar";
734
+ EFeatures["CHANNELS_MAIL_TO_RAVI_KUMAR"] = "channelsMailToRaviKumar";
735
+ EFeatures["CHANNELS_VIEW_ABOUT_RAVI_KUMAR_SECTION"] = "channelsViewAboutRaviKumarSection";
736
+ EFeatures["CHANNELS_VIEW_RAVI_KUMAR_TWEETS_SECTION"] = "channelsViewRaviKumarTweetsSection";
737
+ EFeatures["CHANNELS_VIEW_RAVI_KUMAR_ARTICLES_SECTION"] = "channelsViewRaviKumarArticlesSection";
738
+ EFeatures["CHANNELS_VIEW_RAVI_KUMAR_TRAILBLAZERS_SECTION"] = "channelsViewRaviKumarTrailblazersSection";
739
+ EFeatures["CHANNELS_VIEW_RAVI_KUMAR_COMMUNICATIONS_SECTION"] = "channelsViewRaviKumarCommunicationsSection";
740
+ EFeatures["CHANNELS_VIEW_RAVI_KUMAR_DISCUSSION_SECTION"] = "channelsViewraviKumarDiscussionSection";
741
+ EFeatures["CHANNELS_LIKE_TWEET_RAVI_KUMAR"] = "channelsLikeTweetRaviKumar";
742
+ EFeatures["CHANNELS_SHARE_TWEET_RAVI_KUMAR"] = "channelsShareTweetRaviKumar";
743
+ EFeatures["CHANNELS_POST_YOUR_THOUGHTS_IN_DISCUSSION_RAVI_KUMAR"] = "channelsPostYourThoughtsInDiscussionRaviKumar";
744
+ EFeatures["CHANNELS_FOLLOW_MOHIT_JOSHI"] = "channelsFollowMohitJoshi";
745
+ EFeatures["CHANNELS_MAIL_TO_MOHIT_JOSHI"] = "channelsMailToMohitJoshi";
746
+ EFeatures["CHANNELS_VIEW_ABOUT_MOHIT_JOSHI_SECTION"] = "channelsViewAboutMohitJoshiSection";
747
+ EFeatures["CHANNELS_VIEW_MOHIT_JOSHI_TWEETS_SECTION"] = "channelsViewMohitJoshiTweetsSection";
748
+ EFeatures["CHANNELS_VIEW_MOHIT_JOSHI_ARTICLES_SECTION"] = "channelsViewMohitJoshiArticlesSection";
749
+ EFeatures["CHANNELS_VIEW_MOHIT_JOSHI_TRAILBLAZERS_SECTION"] = "channelsViewMohitJoshiTrailblazersSection";
750
+ EFeatures["CHANNELS_VIEW_MOHIT_JOSHI_COMMUNICATIONS_SECTION"] = "channelsViewMohitJoshiCommunicationsSection";
751
+ EFeatures["CHANNELS_VIEW_MOHIT_JOSHI_DISCUSSION_SECTION"] = "channelsViewMohitJoshiDiscussionSection";
752
+ EFeatures["CHANNELS_LIKE_TWEET_MOHIT_JOSHI"] = "channelsLikeTweetMohitJoshi";
753
+ EFeatures["CHANNELS_SHARE_TWEET_MOHIT_JOSHI"] = "channelsShareTweetMohitJoshi";
754
+ EFeatures["CHANNELS_POST_YOUR_THOUGHTS_IN_DISCUSSION_MOHIT_JOSHI"] = "channelsPostYourThoughtsInDiscussionMohitJoshi";
755
+ EFeatures["CHANNELS_VIEW_CORPORATE_SECTION"] = "channelsViewCorporateSection";
756
+ EFeatures["CHANNELS_VIEW_EXPERIENCE_WOW_PAGE"] = "channelsViewExperienceWowPage";
757
+ EFeatures["CHANNELS_VIEW_INFOSYS_KNOWLEDGE_INSTITUTE_PAGE"] = "channelsViewInfosysKnowledgeInstitutePage";
758
+ EFeatures["CHANNELS_VIEW_CMT_LEARNING_HUB_PAGE"] = "channelsViewCmtLearningHubPage";
759
+ EFeatures["CHANNELS_VIEW_FULL_STACK_SALES_LEADERS_PAGE"] = "channelsViewFullStackSalesLeaderPage";
760
+ // Experience Wow Page
761
+ EFeatures["EXPERIENCE_WOW_PAGE"] = "experienceWowPage";
762
+ EFeatures["EXPERIENCE_WOW_PAGE_VIEW_PAGE_SECTIONS"] = "experienceWowPageViewPageSections";
763
+ EFeatures["EXPERIENCE_WOW_PAGE_CHECK_Wingspan_STATISTICS"] = "experienceWowPageCheckWingspanStatistics";
764
+ EFeatures["EXPERIENCE_WOW_PAGE_CHECK_INFY_ME_STATISTICS"] = "experienceWowPageCheckInfyMeStatistics";
765
+ EFeatures["EXPERIENCE_WOW_PAGE_PROVIDE_SUGGESTIONS"] = "experienceWowPageProvideSuggestions";
766
+ EFeatures["EXPERIENCE_WOW_PAGE_SEND_MAIL_FOR_BECOMING_COCREATOR"] = "experienceWowPageSendMailForBecomingCocreator";
767
+ // Infy Radio
768
+ EFeatures["INFY_RADIO"] = "infyRadio";
769
+ EFeatures["INFY_RADIO_VIEW_PODCASTS_STRIP"] = "infyRadioViewPodcastsStrip";
770
+ // Infy TV
771
+ EFeatures["INFY_TV"] = "infyTv";
772
+ EFeatures["INFY_TV_VIEW_JUST_FOR_YOU_SECTION"] = "infyTvViewJustForYouSection";
773
+ EFeatures["INFY_TV_VIEW_MUST_VIEW_STRIP"] = "infyTvViewMustViewStrip";
774
+ EFeatures["INFY_TV_VIEW_LATEST_STRIP"] = "infyTvViewLatestStrip";
775
+ EFeatures["INFY_TV_VIEW_CHANNELS_SECTION"] = "infyTvViewChannelsSection";
776
+ EFeatures["INFY_TV_VIEW_CHANNELS_STRIP"] = "infyTvViewChannelsStrip";
777
+ EFeatures["INFY_TV_VIEW_BROADCAST_SECTION"] = "infyTvViewBroadcastSection";
778
+ EFeatures["INFY_TV_VIEW_PREVIOUS_EVENTS_LIST"] = "infyTvViewPreviousEventsList";
779
+ EFeatures["INFY_TV_VIEW_LIVE_EVENTS_LIST"] = "infyTvViewLiveEventsList";
780
+ EFeatures["INFY_TV_VIEW_UPCOMING_EVENTS_LIST"] = "infyTvViewUpcomingEventsList";
781
+ // Leadership Messages
782
+ EFeatures["LEADERSHIP_MESSAGES"] = "leadershipMessages";
783
+ EFeatures["LEADERSHIP_MESSAGES_VIEW_LEADERSHIP_VIDEO"] = "leadershipMessagesViewLeadershipVideo";
784
+ // Living Labs
785
+ EFeatures["LIVING_LABS"] = "livingLabs";
786
+ EFeatures["LIVING_LABS_VIEW_LIVING_LABS_STRIP"] = "livingLabsViewLivingLabsStrip";
787
+ // Americas Confluence 2018
788
+ EFeatures["AMERICAS_CONFLUENECE"] = "americasConfluence";
789
+ EFeatures["AMERICAS_CONFLUENECE_VIEW_CONFLUENCE_VIDEOS_STRIPS"] = "americasConfluenceViewConfluenceVideosStrips";
790
+ // APAC Confluence 2019
791
+ EFeatures["APAC_CONFLUENECE"] = "apacConfluence";
792
+ EFeatures["APAC_CONFLUENECE_VIEW_CONFLUENCE_VIDEOS_STRIPS"] = "apacConfluenceViewConfluenceVideosStrips";
793
+ // EMEA Confluence 2018
794
+ EFeatures["EMEA_CONFLUENECE"] = "emeaConfluence";
795
+ EFeatures["EMEA_CONFLUENECE_VIEW_CONFLUENCE_VIDEOS_STRIPS"] = "emeaConfluenceViewConfluenceVideosStrips";
796
+ // Connect 2019
797
+ EFeatures["CONNECT"] = "connect";
798
+ EFeatures["CONNECT_VIEW_CONTENT_STRIP"] = "connectViewContentStrip";
799
+ // Live Events
800
+ EFeatures["LIVE_EVENTS"] = "liveEvents";
801
+ EFeatures["LIVE_EVENTS_WATCH_LIVE"] = "liveEventsWatchLive";
802
+ EFeatures["LIVE_EVENTS_WATCH_CLASSROOM_BROADCAST"] = "liveEventsWatchClassroomBroadcast";
803
+ EFeatures["LIVE_EVENTS_WATCH_THREE_SIXTY_VIDEO"] = "liveEventsWatchThreeSixtyVideo";
804
+ EFeatures["LIVE_EVENTS_WATCH_FAMILY_MATTERS_VIDEO"] = "liveEventsWatchFamilyMattersVideo";
805
+ EFeatures["LIVE_EVENTS_WATCH_CONFLUENCE_EVENTS"] = "liveEventsWatchConfluenceEvents";
806
+ // Digital Assistant Tour
807
+ EFeatures["DIGITAL_ASSISTANT_TOUR"] = "digitalAssistantTour";
808
+ EFeatures["DIGITAL_ASSISTANT_TOUR_WATCH_TOUR_VIDEO"] = "digitalAssistantTourWatchTourVideo";
809
+ // Quick Tour
810
+ EFeatures["QUICK_TOUR"] = "quickTour";
811
+ EFeatures["QUICK_TOUR_WATCH_TOUR_VIDEO"] = "quickTourWatchTourVideo";
812
+ // Logout
813
+ EFeatures["LOGOUT"] = "logout";
814
+ EFeatures["LOGOUT_LOGS_OUT_FROM_APPLICATION"] = "logoutLogsOutFromApplication";
815
+ // My Analytics
816
+ EFeatures["MY_ANALYTICS"] = "myAnalytics";
817
+ EFeatures["MY_ANALYTICS_APPLY_QUARTER_FILTERS"] = "myAnalyticsApplyQuarterFilters";
818
+ EFeatures["MY_ANALYTICS_VIEW_MY_LEARNING_SECTION"] = "myAnalyticsViewMyLearningSection";
819
+ EFeatures["MY_ANALYTICS_VIEW_MY_ASSESSMENT_SECTION"] = "myAnalyticsViewMyAssessmentSection";
820
+ EFeatures["MY_ANALYTICS_VIEW_MY_REFACTORING_SECTION"] = "myAnalyticsViewMyRefactoringSection";
821
+ EFeatures["MY_ANALYTICS_VIEW_MY_PLANS_SECTION"] = "myAnalyticsViewMyPlansSection";
822
+ EFeatures["MY_ANALYTICS_VIEW_MY_COLLABORATORS_SECTION"] = "myAnalyticsViewMyCollaboratorsSection";
823
+ EFeatures["MY_ANALYTICS_VIEW_MY_FEATURES_USAGE_SECTION"] = "myAnalyticsViewTopCoursesSection";
824
+ EFeatures["MY_ANALYTICS_VIEW_MY_LEARNING_MINUTES"] = "myAnalyticsViewMyLearningMinutes";
825
+ EFeatures["MY_ANALYTICS_VIEW_MY_LEARNING_POINTS"] = "myAnalyticsViewMyLearningPoints";
826
+ EFeatures["MY_ANALYTICS_VIEW_BADGES"] = "myAnalyticsViewBadges";
827
+ EFeatures["MY_ANALYTICS_VIEW_TIME_SPENT_BY_USER"] = "myAnalyticsViewTimeSpentByUser";
828
+ EFeatures["MY_ANALYTICS_VIEW_AVERAGE_MINUTES_ON_Wingspan"] = "myAnalyticsViewAverageMinutesOnWingspan";
829
+ EFeatures["MY_ANALYTICS_VIEW_AVERAGE_MINUTES_ACROSS_DIMENSIONS"] = "myAnalyticsViewAverageMinutesAcrossDimensions";
830
+ EFeatures["MY_ANALYTICS_VIEW_PERCENTAGE_TIME_SPENT_BY_USER"] = "myAnalyticsViewPercentageTimeSpentByUser";
831
+ EFeatures["MY_ANALYTICS_VIEW_PERCENTAGE_TIME_SPENT_BY_INFOSCIONS"] = "myAnalyticsViewPercentageTimeSpentByInfoscions";
832
+ EFeatures["MY_ANALYTICS_VIEW_PERCENTAGE_TIME_SPENT_BY_PEERS"] = "myAnalyticsViewPercentageTimeSpentByPeers";
833
+ EFeatures["MY_ANALYTICS_VIEW_TOTAL_ASSESSMENTS"] = "myAnalyticsViewTotalAssessments";
834
+ EFeatures["MY_ANALYTICS_VIEW_PENDING_ASSESSMENTS"] = "myAnalyticsViewPendingAssessments";
835
+ EFeatures["MY_ANALYTICS_VIEW_CERTIFICATIONS"] = "myAnalyticsViewCertifications";
836
+ EFeatures["MY_ANALYTICS_VIEW_ASSESSMENTS"] = "myAnalyticsViewAssessments";
837
+ EFeatures["MY_ANALYTICS_VIEW_RECENT_ASSESSMENTS"] = "myAnalyticsViewRecentAssessments";
838
+ EFeatures["MY_ANALYTICS_VIEW_ASSESSMENT_DETAILS"] = "myAnalyticsViewAssessmentDetails";
839
+ EFeatures["MY_ANALYTICS_VIEW_RECENT_ASSESSMENT"] = "myAnalyticsViewRecentAssessment";
840
+ EFeatures["MY_ANALYTICS_VIEW_MY_REFACTORING_PROGRAM"] = "myAnalyticsViewMyRefactoringProgram";
841
+ EFeatures["MY_ANALYTICS_VIEW_NAVIGATOR"] = "myAnalyticsViewNavigator";
842
+ EFeatures["MY_ANALYTICS_VIEW_AI_AND_AUTOMATION_PROGRESS"] = "myAnalyticsViewAiAndAutomationProcess";
843
+ EFeatures["MY_ANALYTICS_VIEW_MY_GOALS"] = "myAnalyticsViewMyGoals";
844
+ EFeatures["MY_ANALYTICS_VIEW_PLAYLIST"] = "myAnalyticsViewPlaylist";
845
+ EFeatures["MY_ANALYTICS_VIEW_GOALS_SHARED_WITH_USER"] = "myAnalyticsViewGoalsSharedWithUser";
846
+ EFeatures["MY_ANALYTICS_VIEW_DETAILED_COURSES_PROGRESS"] = "myAnalyticsViewDetailedCoursesProgress";
847
+ EFeatures["MY_ANALYTICS_VIEW_GOALS_SHARED_BY_USER"] = "myAnalyticsViewGoalsSharedByUser";
848
+ EFeatures["MY_ANALYTICS_VIEW_ARTIFACTS_SHARED_BY_USER"] = "myAnalyticsViewArtifactsSharedByUser";
849
+ EFeatures["MY_ANALYTICS_VIEW_EXPERTS_USER_CONTACTED"] = "myAnalyticsViewExpertsUserContacted";
850
+ EFeatures["MY_ANALYTICS_VIEW_DETAILED_GOALS_SHARING"] = "myAnalyticsViewDetailedGoalsSharing";
851
+ EFeatures["MY_ANALYTICS_VIEW_PLAYGROUNDS"] = "myAnalyticsViewPlaygrounds";
852
+ EFeatures["MY_ANALYTICS_VIEW_LIKES"] = "myAnalyticsViewLikes";
853
+ EFeatures["MY_ANALYTICS_VIEW_SEARCH"] = "myAnalyticsViewSearch";
854
+ EFeatures["MY_ANALYTICS_VIEW_INFY_TV"] = "myAnalyticsViewInfyTv";
855
+ EFeatures["MY_ANALYTICS_VIEW_INFY_RADIO"] = "myAnalyticsViewInfyRadio";
856
+ EFeatures["MY_ANALYTICS_VIEW_INFY_LIVE"] = "myAnalyticsViewInfyLive";
857
+ EFeatures["MY_ANALYTICS_VIEW_TOP_COURSES_BY_USER_UNIT"] = "myAnalyticsViewTopCoursesByUserUnit";
858
+ EFeatures["MY_ANALYTICS_VIEW_TOP_COURSES_BY_USER_PEERS"] = "myAnalyticsViewTopCoursesbyUserPeers";
859
+ // Learning Analytics
860
+ EFeatures["LEARNING_ANALYTICS"] = "learningAnalytics";
861
+ EFeatures["LEARNING_ANALYTICS_SEARCH_FOR_PARTICIPANTS_AND_EDUCATORS"] = "learningAnalyticsSearchForParticipantsAndEducators";
862
+ EFeatures["LEARNING_ANALYTICS_UNIT_FILTER"] = "learningAnalyticsUnitFilter";
863
+ EFeatures["LEARNING_ANALYTICS_PU_FILTER"] = "learningAnalyticsPuFilter";
864
+ EFeatures["LEARNING_ANALYTICS_DU_FILTER"] = "learningAnalyticsDuFilter";
865
+ EFeatures["LEARNING_ANALYTICS_ACCOUNT_FILTER"] = "learningAnalyticsAccountFilter";
866
+ EFeatures["LEARNING_ANALYTICS_LOCATION_FILTER"] = "learningAnalyticsLocationFilter";
867
+ EFeatures["LEARNING_ANALYTICS_QUARTER_FILTER"] = "learningAnalyticsQuarterFilter";
868
+ EFeatures["LEARNING_ANALYTICS_COMPLETED_FILTER"] = "learningAnalyticsCompletedFilter";
869
+ EFeatures["LEARNING_ANALYTICS_ETA_FILTER"] = "learningAnalyticsEtaFilter";
870
+ EFeatures["LEARNING_ANALYTICS_UNIQUE_USERS_DATA"] = "learningAnalyticsUniqueUsersData";
871
+ EFeatures["LEARNING_ANALYTICS_USERS_BY_ONSITE_OFFSHORE"] = "learningAnalyticsUsersByOnsiteOffshore";
872
+ EFeatures["LEARNING_ANALYTICS_USERS_BY_DEVICE_TYPE"] = "learningAnalyticsUsersByDeviceType";
873
+ EFeatures["LEARNING_ANALYTICS_USERS_BY_UNIT"] = "learningAnalyticsUsersByUnit";
874
+ EFeatures["LEARNING_ANALYTICS_USERS_BY_TRACK"] = "learningAnalyticsUsersByTrack";
875
+ EFeatures["LEARNING_ANALYTICS_USERS_BY_PU_SALES"] = "learningAnalyticsUsersByPuSales";
876
+ EFeatures["LEARNING_ANALYTICS_USERS_BY_CU_TYPE"] = "learningAnalyticsUsersByCuType";
877
+ EFeatures["LEARNING_ANALYTICS_USERS_BY_SKILL"] = "learningAnalyticsUsersBySkill";
878
+ EFeatures["LEARNING_ANALYTICS_USERS_BY_TOPICS"] = "learningAnalyticsUsersByTopics";
879
+ EFeatures["LEARNING_ANALYTICS_USERS_BY_HORIZON"] = "learningAnalyticsUsersByHorizon";
880
+ EFeatures["LEARNING_ANALYTICS_USERS_GROWTH"] = "learningAnalyticsUsersGrowth";
881
+ EFeatures["LEARNING_ANALYTICS_USERS_DETAILS"] = "learningAnalyticsUsersDetails";
882
+ EFeatures["LEARNING_ANALYTICS_VIEW_ALL_TRAININGS_SECTION"] = "learningAnalyticsViewAllTrainingsSection";
883
+ EFeatures["LEARNING_ANALYTICS_TALENT_GRID_FILTER"] = "learningAnalyticstalentGridFilter";
884
+ EFeatures["LEARNING_ANALYTICS_STACK_FILTER"] = "learningAnalyticsStackFilter";
885
+ EFeatures["LEARNING_ANALYTICS_UNIQUE_PARTICIPANTS"] = "learningAnalyticsUniqueParticipants";
886
+ EFeatures["LEARNING_ANALYTICS_OVERALL_PARTICIPANTS"] = "learningAnalyticsOverallParticipants";
887
+ EFeatures["LEARNING_ANALYTICS_AVERAGE_DAYS"] = "learningAnalyticsAverageDays";
888
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_BY_ONSITE_ONSHORE"] = "learningAnalyticsParticipantsByOnsiteOnshore";
889
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_BY_UNIT"] = "learningAnalyticsParticipantsByUnit";
890
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_BY_PU"] = "learningAnalyticsParticipantsByPu";
891
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_BY_SKILL_TYPE"] = "learningAnalyticsParticipantsBySkillType";
892
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_BY_SKILL"] = "learningAnalyticsParticipantsBySkill";
893
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_BY_STACKS"] = "learningAnalyticsParticipantsByStacks";
894
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_BY_NEW_SERVICES"] = "learningAnalyticsParticipantsByNewServices";
895
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_BY_LEARNING_TRACK"] = "learningAnalyticsParticipantsByLearningTrack";
896
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_BY_OFFERING_MODE"] = "learningAnalyticsParticipantsByOfferingMode";
897
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_BY_TOPICS"] = "learningAnalyticsParticipantsByTopics";
898
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_BY_ABCD"] = "learningAnalyticsParticipantsByAbcd";
899
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS_DETAILS"] = "learningAnalyticsParticipantsDetails";
900
+ EFeatures["LEARNING_ANALYTICS_SCHEDULES_SECTION"] = "learningAnalyticsSchedulesSection";
901
+ EFeatures["LEARNING_ANALYTICS_SCHEDULE_DATE_FILTER"] = "learningAnalyticsScheduleDateFilter";
902
+ EFeatures["LEARNING_ANALYTICS_PARTICIPANTS"] = "learningAnalyticsParticipants";
903
+ EFeatures["LEARNING_ANALYTICS_EDUCATORS"] = "learningAnalyticsEducators";
904
+ EFeatures["LEARNING_ANALYTICS_COURSES"] = "learningAnalyticsCourses";
905
+ EFeatures["LEARNING_ANALYTICS_SCHEDULES"] = "learningAnalyticsSchedules";
906
+ EFeatures["LEARNING_ANALYTICS_VIEW_TRAINING_SCHEDULES_SECTION"] = "learningAnalyticsTrainingSchedulesSection";
907
+ EFeatures["LEARNING_ANALYTICS_COURSES_BY_OFFERING_MODE"] = "learningAnalyticsCoursesByOfferingMode";
908
+ EFeatures["LEARNING_ANALYTICS_COURSES_BY_TRACK"] = "learningAnalyticsCoursesByTrack";
909
+ EFeatures["LEARNING_ANALYTICS_COURSES_BY_TOPIC"] = "learningAnalyticsCoursesByTopic";
910
+ EFeatures["LEARNING_ANALYTICS_COURSES_BY_ABCD"] = "learningAnalyticsCoursesByAbcd";
911
+ EFeatures["LEARNING_ANALYTICS_COURSES_BY_SKILL"] = "learningAnalyticsCoursesBySkill";
912
+ // Apps Page
913
+ EFeatures["APPS_PAGE"] = "appsPage";
914
+ EFeatures["APPS_PAGE_VIEW_DIFFERENT_APPS_ICONS"] = "appsPageViewDifferentAppsIcons";
915
+ // Course Card
916
+ EFeatures["COURSE_CARD"] = "courseCard";
917
+ EFeatures["COURSE_CARD_LIKE_THE_COURSE_BUTTON"] = "courseCardLikeTheCourseButton";
918
+ EFeatures["COURSE_CARD_SHARE_THE_COURSE_BUTTON"] = "courseCardShareTheCourseButton";
919
+ EFeatures["COURSE_CARD_ADD_COURSE_TO_GOALS_BUTTON"] = "courseCardAddCourseToGoalsButton";
920
+ EFeatures["COURSE_CARD_ADD_COURSE_TO_PLAYLIST_BUTTON"] = "courseCardAddCourseToPlaylistButton";
921
+ EFeatures["COURSE_CARD_VIEW_MORE_OPTIONS_BUTTON"] = "courseCardViewMoreOptionsButton";
922
+ EFeatures["COURSE_CARD_START_COURSE_OPTION"] = "courseCardStartCourseOption";
923
+ EFeatures["COURSE_CARD_VIEW_TOC_OPTION"] = "courseCardViewTocOption";
924
+ EFeatures["COURSE_CARD_COHORTS_OPTION"] = "courseCardCohortsOption";
925
+ EFeatures["COURSE_CARD_ANALYTICS_OPTION"] = "courseCardAnalyticsOption";
926
+ // Search Results Page
927
+ EFeatures["SEARCH_RESULTS_PAGE"] = "searchResultsPage";
928
+ EFeatures["SEARCH_RESULTS_PAGE_VIEW_LEARNING_SECTION"] = "searchResultsPageViewLearningSection";
929
+ EFeatures["SEARCH_RESULTS_PAGE_VIEW_CERTIFICATIONS_SECTION"] = "searchResultsPageViewCertificationsSection";
930
+ EFeatures["SEARCH_RESULTS_PAGE_VIEW_KNOWLEDGE_SECTION"] = "searchResultsPageViewKnowledgeSection";
931
+ EFeatures["SEARCH_RESULTS_PAGE_VIEW_PROJECTS_SECTION"] = "searchResultsPageViewProjectsSection";
932
+ EFeatures["SEARCH_RESULTS_PAGE_VIEW_SOCIAL_SECTION"] = "searchResultsPageViewSocialSection";
933
+ EFeatures["SEARCH_RESULTS_PAGE_CATALOG_FILTER"] = "searchResultsPageCatalogFilter";
934
+ EFeatures["SEARCH_RESULTS_PAGE_DURATION_FILTER"] = "searchResultsPageDurationFilter";
935
+ EFeatures["SEARCH_RESULTS_PAGE_CONTENT_TYPE_FILTER"] = "searchResultsPageContentTypeFilter";
936
+ EFeatures["SEARCH_RESULTS_PAGE_LEVEL_FILTER"] = "searchResultsPageLevelFilter";
937
+ EFeatures["SEARCH_RESULTS_PAGE_SOURCE_FILTER"] = "searchResultsPageSourceFilter";
938
+ EFeatures["SEARCH_RESULTS_PAGE_UNIT_FILTER"] = "searchResultsPageUnitFilter";
939
+ EFeatures["SEARCH_RESULTS_PAGE_TYPE_FILTER"] = "searchResultsPageTypeFilter";
940
+ EFeatures["SEARCH_RESULTS_PAGE_PUBLISHED_DATE_FILTER"] = "searchResultsPagePublishedDateFilter";
941
+ EFeatures["SEARCH_RESULTS_PAGE_CATEGORY_FILTER"] = "searchResultsPageCategoryFilter";
942
+ EFeatures["SEARCH_RESULTS_PAGE_ITEM_TYPE_FILTER"] = "searchResultsPageItemTypeFilter";
943
+ EFeatures["SEARCH_RESULTS_PAGE_TOPICS_FILTER"] = "searchResultsPageTopicsFilter";
944
+ EFeatures["SEARCH_RESULTS_PAGE_AUTHORS_FILTER"] = "searchResultsPageAuthorsFilter";
945
+ EFeatures["SEARCH_RESULTS_PAGE_TAGS_FILTER"] = "searchResultsPageTagsFilter";
946
+ EFeatures["SEARCH_RESULTS_PAGE_GROUPS_FILTER"] = "searchResultsPageGroupsFilter";
947
+ EFeatures["SEARCH_RESULTS_PAGE_VIEW_RESULT_CARDS"] = "searchResultsPageViewResultCards";
948
+ EFeatures["SEARCH_RESULTS_PAGE_VIEW_RELATED_CONCEPTS"] = "searchResultsPageViewRelatedConcepts";
949
+ // Lab42 Pages
950
+ EFeatures["LAB_42_INTERVIEW"] = "interview";
951
+ EFeatures["LAB_42_DIALOGUE"] = "dialogue";
952
+ EFeatures["LAB_42_STRATEGY_MAP"] = "strategyMap";
953
+ EFeatures["LAB_42_VIRTUAL_CLASSROOM"] = "virtualClassroom";
954
+ EFeatures["LAB_42_PROJECT_STACK"] = "projectStack";
955
+ EFeatures["LAB_42_LIVE_TRANSCRIBE"] = "liveTranscribe";
956
+ EFeatures["LAB_42_EPOCH"] = "epoch";
957
+ // Learning Assistant Pages
958
+ EFeatures["LEARNING_ASSISTANT_MAQ"] = "learning-assistant-maq";
959
+ EFeatures["LEARNING_ASSISTANT_ILIPDP"] = "learning-assistant-ilipdp";
960
+ })(EFeatures || (EFeatures = {}));
961
+
962
+ var EInstance;
963
+ (function (EInstance) {
964
+ EInstance["INSTANCE"] = "RootOrg";
965
+ })(EInstance || (EInstance = {}));
966
+
967
+ var ScrollingStateEnum;
968
+ (function (ScrollingStateEnum) {
969
+ ScrollingStateEnum[ScrollingStateEnum["ScrollingUp"] = 0] = "ScrollingUp";
970
+ ScrollingStateEnum[ScrollingStateEnum["ScrollingDown"] = 1] = "ScrollingDown";
971
+ ScrollingStateEnum[ScrollingStateEnum["NoScrolling"] = 2] = "NoScrolling";
972
+ })(ScrollingStateEnum || (ScrollingStateEnum = {}));
973
+ class ClassChangeOnScrollDirective {
974
+ get isScrollingDown() {
975
+ return this.currState === ScrollingStateEnum.ScrollingDown;
976
+ }
977
+ get isScrollingUp() {
978
+ return this.currState === ScrollingStateEnum.ScrollingUp;
979
+ }
980
+ get isNotScrolling() {
981
+ return this.currState === ScrollingStateEnum.NoScrolling;
982
+ }
983
+ constructor() {
984
+ this.wsClassOnScrollDirChange = 5000;
985
+ this.hasScrolledDown = false;
986
+ this.windowScrollSubscription = null;
987
+ this.lastScreenTop = 0;
988
+ this.currState = ScrollingStateEnum.NoScrolling;
989
+ }
990
+ ngOnInit() {
991
+ this.windowScrollSubscription = fromEvent(window, 'scroll')
992
+ .pipe(debounceTime(50))
993
+ .subscribe(() => {
994
+ clearTimeout(this.timeoutTimer);
995
+ const curr = window.scrollY;
996
+ this.hasScrolledDown = curr > 56;
997
+ this.setScrollState(this.lastScreenTop, curr);
998
+ this.lastScreenTop = curr;
999
+ });
1000
+ }
1001
+ ngAfterViewInit() { }
1002
+ ngOnDestroy() {
1003
+ if (this.windowScrollSubscription) {
1004
+ this.windowScrollSubscription.unsubscribe();
1005
+ }
1006
+ }
1007
+ setScrollState(prev = 0, curr = 0) {
1008
+ if (prev > curr) {
1009
+ this.currState = ScrollingStateEnum.ScrollingUp;
1010
+ }
1011
+ else if (prev < curr) {
1012
+ this.currState = ScrollingStateEnum.ScrollingDown;
1013
+ }
1014
+ else {
1015
+ this.currState = ScrollingStateEnum.NoScrolling;
1016
+ }
1017
+ if (this.currState !== ScrollingStateEnum.NoScrolling) {
1018
+ this.resetScrollingState();
1019
+ }
1020
+ }
1021
+ resetScrollingState() {
1022
+ this.timeoutTimer = setTimeout(() => {
1023
+ this.setScrollState();
1024
+ }, this.wsClassOnScrollDirChange || 5000);
1025
+ }
1026
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ClassChangeOnScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1027
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: ClassChangeOnScrollDirective, isStandalone: false, selector: "[wsUtilsClassChangeOnScroll]", inputs: { wsClassOnScrollDirChange: "wsClassOnScrollDirChange" }, host: { properties: { "class.scrolling-down": "this.isScrollingDown", "class.scrolling-up": "this.isScrollingUp", "class.scrolling-no": "this.isNotScrolling", "class.scrolled-down": "this.hasScrolledDown" } }, ngImport: i0 }); }
1028
+ }
1029
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ClassChangeOnScrollDirective, decorators: [{
1030
+ type: Directive,
1031
+ args: [{
1032
+ selector: '[wsUtilsClassChangeOnScroll]',
1033
+ standalone: false
1034
+ }]
1035
+ }], ctorParameters: () => [], propDecorators: { wsClassOnScrollDirChange: [{
1036
+ type: Input
1037
+ }], isScrollingDown: [{
1038
+ type: HostBinding,
1039
+ args: ['class.scrolling-down']
1040
+ }], isScrollingUp: [{
1041
+ type: HostBinding,
1042
+ args: ['class.scrolling-up']
1043
+ }], isNotScrolling: [{
1044
+ type: HostBinding,
1045
+ args: ['class.scrolling-no']
1046
+ }], hasScrolledDown: [{
1047
+ type: HostBinding,
1048
+ args: ['class.scrolled-down']
1049
+ }] } });
1050
+
1051
+ class ClassChangeOnScrollModule {
1052
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ClassChangeOnScrollModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1053
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: ClassChangeOnScrollModule, declarations: [ClassChangeOnScrollDirective], imports: [CommonModule], exports: [ClassChangeOnScrollDirective] }); }
1054
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ClassChangeOnScrollModule, imports: [CommonModule] }); }
1055
+ }
1056
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ClassChangeOnScrollModule, decorators: [{
1057
+ type: NgModule,
1058
+ args: [{
1059
+ declarations: [ClassChangeOnScrollDirective],
1060
+ imports: [
1061
+ CommonModule,
1062
+ ],
1063
+ exports: [ClassChangeOnScrollDirective],
1064
+ }]
1065
+ }] });
1066
+
1067
+ class DefaultThumbnailDirective {
1068
+ constructor() {
1069
+ this.wsUtilsDefaultThumbnail = '';
1070
+ this.src = '';
1071
+ this.isSrcUpdateAttemptedForDefault = false;
1072
+ this.srcUrl = '';
1073
+ }
1074
+ updateSrc() {
1075
+ if (!this.isSrcUpdateAttemptedForDefault) {
1076
+ this.srcUrl = this.wsUtilsDefaultThumbnail;
1077
+ this.isSrcUpdateAttemptedForDefault = true;
1078
+ }
1079
+ }
1080
+ ngOnChanges() {
1081
+ if (this.src) {
1082
+ this.srcUrl = this.src;
1083
+ }
1084
+ }
1085
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DefaultThumbnailDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1086
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: DefaultThumbnailDirective, isStandalone: false, selector: "[wsUtilsDefaultThumbnail]", inputs: { wsUtilsDefaultThumbnail: "wsUtilsDefaultThumbnail", src: "src" }, host: { listeners: { "error": "updateSrc()" }, properties: { "src": "this.srcUrl" } }, usesOnChanges: true, ngImport: i0 }); }
1087
+ }
1088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DefaultThumbnailDirective, decorators: [{
1089
+ type: Directive,
1090
+ args: [{
1091
+ selector: '[wsUtilsDefaultThumbnail]',
1092
+ standalone: false
1093
+ }]
1094
+ }], propDecorators: { wsUtilsDefaultThumbnail: [{
1095
+ type: Input
1096
+ }], src: [{
1097
+ type: Input
1098
+ }], srcUrl: [{
1099
+ type: HostBinding,
1100
+ args: ['src']
1101
+ }], updateSrc: [{
1102
+ type: HostListener,
1103
+ args: ['error']
1104
+ }] } });
1105
+
1106
+ class DefaultThumbnailModule {
1107
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DefaultThumbnailModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1108
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: DefaultThumbnailModule, declarations: [DefaultThumbnailDirective], imports: [CommonModule], exports: [DefaultThumbnailDirective] }); }
1109
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DefaultThumbnailModule, imports: [CommonModule] }); }
1110
+ }
1111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DefaultThumbnailModule, decorators: [{
1112
+ type: NgModule,
1113
+ args: [{
1114
+ declarations: [DefaultThumbnailDirective],
1115
+ imports: [
1116
+ CommonModule,
1117
+ ],
1118
+ exports: [DefaultThumbnailDirective],
1119
+ }]
1120
+ }] });
1121
+
1122
+ const customBreakPoints = {
1123
+ xs: '(max-width: 450px)',
1124
+ s: '(min-width: 450.001px) and (max-width: 768px)',
1125
+ m: '(min-width: 768.001px) and (max-width: 1024px)',
1126
+ l: '(min-width: 1024.001px) and (max-width: 1400px)',
1127
+ xl: '(min-width: 1400.001px) and (max-width: 1920px)',
1128
+ xxl: '(min-width: 1920.001px)',
1129
+ };
1130
+ class ImageResponsiveDirective {
1131
+ constructor(breakpointObserver) {
1132
+ this.breakpointObserver = breakpointObserver;
1133
+ this.src = null;
1134
+ this.srcBindUrl = '';
1135
+ this.currentSize = '';
1136
+ this.breakpointSubscription = null;
1137
+ this.breakpointSubscription = this.breakpointObserver
1138
+ .observe([
1139
+ customBreakPoints.xs,
1140
+ customBreakPoints.s,
1141
+ customBreakPoints.m,
1142
+ customBreakPoints.l,
1143
+ customBreakPoints.xl,
1144
+ customBreakPoints.xxl,
1145
+ ])
1146
+ .pipe(distinctUntilChanged())
1147
+ .subscribe(data => {
1148
+ // //console.log('data >', data)
1149
+ if (data.breakpoints[customBreakPoints.xxl]) {
1150
+ this.currentSize = 'xxl';
1151
+ }
1152
+ else if (data.breakpoints[customBreakPoints.xl]) {
1153
+ this.currentSize = 'xl';
1154
+ }
1155
+ else if (data.breakpoints[customBreakPoints.l]) {
1156
+ this.currentSize = 'l';
1157
+ }
1158
+ else if (data.breakpoints[customBreakPoints.m]) {
1159
+ this.currentSize = 'm';
1160
+ }
1161
+ else if (data.breakpoints[customBreakPoints.s]) {
1162
+ this.currentSize = 's';
1163
+ }
1164
+ else if (data.breakpoints[customBreakPoints.xs]) {
1165
+ this.currentSize = 'xs';
1166
+ }
1167
+ else {
1168
+ this.currentSize = 'xl';
1169
+ }
1170
+ this.setSrc();
1171
+ });
1172
+ }
1173
+ ngOnChanges() {
1174
+ if (this.src) {
1175
+ this.setSrc();
1176
+ }
1177
+ }
1178
+ ngOnDestroy() {
1179
+ if (this.breakpointSubscription) {
1180
+ this.breakpointSubscription.unsubscribe();
1181
+ }
1182
+ }
1183
+ setSrc() {
1184
+ if (this.currentSize &&
1185
+ this.src &&
1186
+ this.src[this.currentSize]) {
1187
+ this.srcBindUrl = this.src[this.currentSize];
1188
+ }
1189
+ }
1190
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageResponsiveDirective, deps: [{ token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Directive }); }
1191
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: ImageResponsiveDirective, isStandalone: false, selector: "[wsUtilsImageResponsive]", inputs: { src: "src" }, host: { properties: { "src": "this.srcBindUrl" } }, usesOnChanges: true, ngImport: i0 }); }
1192
+ }
1193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageResponsiveDirective, decorators: [{
1194
+ type: Directive,
1195
+ args: [{
1196
+ selector: '[wsUtilsImageResponsive]',
1197
+ standalone: false
1198
+ }]
1199
+ }], ctorParameters: () => [{ type: i1.BreakpointObserver }], propDecorators: { src: [{
1200
+ type: Input
1201
+ }], srcBindUrl: [{
1202
+ type: HostBinding,
1203
+ args: ['src']
1204
+ }] } });
1205
+
1206
+ class ImageResponsiveModule {
1207
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageResponsiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1208
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: ImageResponsiveModule, declarations: [ImageResponsiveDirective], imports: [CommonModule], exports: [ImageResponsiveDirective] }); }
1209
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageResponsiveModule, imports: [CommonModule] }); }
1210
+ }
1211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageResponsiveModule, decorators: [{
1212
+ type: NgModule,
1213
+ args: [{
1214
+ declarations: [ImageResponsiveDirective],
1215
+ imports: [
1216
+ CommonModule,
1217
+ ],
1218
+ exports: [ImageResponsiveDirective],
1219
+ }]
1220
+ }] });
1221
+
1222
+ class InViewPortDirective {
1223
+ constructor(_el) {
1224
+ this._el = _el;
1225
+ this.inViewport = new EventEmitter();
1226
+ }
1227
+ ngOnInit() {
1228
+ this.check();
1229
+ this.scroll =
1230
+ fromEvent(window, 'scroll').pipe(debounceTime(100)).subscribe(() => {
1231
+ this.check();
1232
+ });
1233
+ this.resize =
1234
+ fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe(() => {
1235
+ this.check();
1236
+ });
1237
+ // let limit = 1
1238
+ // this.scroll =
1239
+ // fromEvent(window, 'scroll').pipe(debounceTime(100)).subscribe(() => {
1240
+ // if (limit) {
1241
+ // this.check()
1242
+ // limit -= 1
1243
+ // }
1244
+ // })
1245
+ // this.resize =
1246
+ // fromEvent(window, 'resize').toPromise().then(() => {
1247
+ // this.check()
1248
+ // })
1249
+ }
1250
+ ngOnDestroy() {
1251
+ this.scroll.unsubscribe();
1252
+ this.resize.unsubscribe();
1253
+ }
1254
+ check(partial = true, direction = 'both') {
1255
+ const el = this._el.nativeElement;
1256
+ const elSize = (el.offsetWidth * el.offsetHeight);
1257
+ const rec = el.getBoundingClientRect();
1258
+ const vp = {
1259
+ width: window.innerWidth,
1260
+ height: window.innerHeight,
1261
+ };
1262
+ const tViz = rec.top >= 0 && rec.top < vp.height;
1263
+ const bViz = rec.bottom > 0 && rec.bottom <= vp.height;
1264
+ const lViz = rec.left >= 0 && rec.left < vp.width;
1265
+ const rViz = rec.right > 0 && rec.right <= vp.width;
1266
+ const vVisible = partial ? tViz || bViz : tViz && bViz;
1267
+ const hVisible = partial ? lViz || rViz : lViz && rViz;
1268
+ let event = false;
1269
+ if (direction === 'both') {
1270
+ event = (elSize && vVisible && hVisible) ? true : false;
1271
+ }
1272
+ else if (direction === 'vertical') {
1273
+ event = (elSize && vVisible) ? true : false;
1274
+ }
1275
+ else if (direction === 'horizontal') {
1276
+ event = (elSize && hVisible) ? true : false;
1277
+ }
1278
+ this.inViewport.emit(event);
1279
+ }
1280
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InViewPortDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1281
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: InViewPortDirective, isStandalone: false, selector: "[wsUtilsInViewPort]", outputs: { inViewport: "inViewport" }, ngImport: i0 }); }
1282
+ }
1283
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InViewPortDirective, decorators: [{
1284
+ type: Directive,
1285
+ args: [{
1286
+ selector: '[wsUtilsInViewPort]',
1287
+ standalone: false
1288
+ }]
1289
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { inViewport: [{
1290
+ type: Output
1291
+ }] } });
1292
+
1293
+ class InViewPortModule {
1294
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InViewPortModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1295
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: InViewPortModule, declarations: [InViewPortDirective], imports: [CommonModule], exports: [InViewPortDirective] }); }
1296
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InViewPortModule, imports: [CommonModule] }); }
1297
+ }
1298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: InViewPortModule, decorators: [{
1299
+ type: NgModule,
1300
+ args: [{
1301
+ declarations: [InViewPortDirective],
1302
+ exports: [InViewPortDirective],
1303
+ imports: [
1304
+ CommonModule,
1305
+ ],
1306
+ }]
1307
+ }] });
1308
+
1309
+ class NavigationDirective {
1310
+ onMouseEnter($event) {
1311
+ if (this.openInNewTab || this.wsUtilsNavigation.includes('mailto')) {
1312
+ $event.preventDefault();
1313
+ $event.stopPropagation();
1314
+ this.routeUrl = './';
1315
+ window.open(this.wsUtilsNavigation);
1316
+ }
1317
+ }
1318
+ constructor() {
1319
+ this.wsUtilsNavigation = '';
1320
+ this.openInNewTab = false;
1321
+ this.routeUrl = '';
1322
+ }
1323
+ ngOnChanges() {
1324
+ if (this.openInNewTab || this.wsUtilsNavigation.includes('mailto')) {
1325
+ this.routeUrl = './';
1326
+ }
1327
+ }
1328
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NavigationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1329
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: NavigationDirective, isStandalone: false, selector: "[wsUtilsNavigation]", inputs: { wsUtilsNavigation: "wsUtilsNavigation", openInNewTab: "openInNewTab", routeUrl: "routeUrl" }, host: { listeners: { "mousedown": "onMouseEnter($event)" }, properties: { "attr.routerLink": "this.routeUrl" } }, usesOnChanges: true, ngImport: i0 }); }
1330
+ }
1331
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NavigationDirective, decorators: [{
1332
+ type: Directive,
1333
+ args: [{
1334
+ selector: '[wsUtilsNavigation]',
1335
+ standalone: false
1336
+ }]
1337
+ }], ctorParameters: () => [], propDecorators: { wsUtilsNavigation: [{
1338
+ type: Input
1339
+ }], openInNewTab: [{
1340
+ type: Input
1341
+ }], routeUrl: [{
1342
+ type: Input
1343
+ }, {
1344
+ type: HostBinding,
1345
+ args: ['attr.routerLink']
1346
+ }], onMouseEnter: [{
1347
+ type: HostListener,
1348
+ args: ['mousedown', ['$event']]
1349
+ }] } });
1350
+
1351
+ class NavigationModule {
1352
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1353
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: NavigationModule, declarations: [NavigationDirective], imports: [CommonModule], exports: [NavigationDirective] }); }
1354
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NavigationModule, imports: [CommonModule] }); }
1355
+ }
1356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NavigationModule, decorators: [{
1357
+ type: NgModule,
1358
+ args: [{
1359
+ declarations: [NavigationDirective],
1360
+ imports: [
1361
+ CommonModule,
1362
+ ],
1363
+ exports: [NavigationDirective],
1364
+ }]
1365
+ }] });
1366
+
1367
+ class PermissionDirective {
1368
+ constructor() { }
1369
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PermissionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1370
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: PermissionDirective, isStandalone: false, selector: "[wsUtilsPermission]", ngImport: i0 }); }
1371
+ }
1372
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PermissionDirective, decorators: [{
1373
+ type: Directive,
1374
+ args: [{
1375
+ selector: '[wsUtilsPermission]',
1376
+ standalone: false
1377
+ }]
1378
+ }], ctorParameters: () => [] });
1379
+
1380
+ class PermissionModule {
1381
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PermissionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1382
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PermissionModule, declarations: [PermissionDirective], imports: [CommonModule], exports: [PermissionDirective] }); }
1383
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PermissionModule, imports: [CommonModule] }); }
1384
+ }
1385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PermissionModule, decorators: [{
1386
+ type: NgModule,
1387
+ args: [{
1388
+ declarations: [PermissionDirective],
1389
+ imports: [
1390
+ CommonModule,
1391
+ ],
1392
+ exports: [PermissionDirective],
1393
+ }]
1394
+ }] });
1395
+
1396
+ function getStringifiedQueryParams(obj) {
1397
+ return Object.entries(obj)
1398
+ .filter(u => u[1])
1399
+ .map(u => {
1400
+ return `${u[0]}=${u[1]}`;
1401
+ })
1402
+ .join('&');
1403
+ }
1404
+
1405
+ class HorizontalScrollerComponent {
1406
+ constructor() {
1407
+ this.loadStatus = 'none';
1408
+ this.onHover = false;
1409
+ this.loadNext = new EventEmitter();
1410
+ this.horizontalScrollElem = null;
1411
+ this.enablePrev = false;
1412
+ this.enableNext = false;
1413
+ this.scrollObserver = null;
1414
+ }
1415
+ ngOnInit() {
1416
+ if (this.horizontalScrollElem) {
1417
+ const horizontalScrollElem = this.horizontalScrollElem;
1418
+ this.scrollObserver = fromEvent(horizontalScrollElem.nativeElement, 'scroll')
1419
+ .pipe(debounceTime(100), throttleTime(100))
1420
+ .subscribe(_ => {
1421
+ this.updateNavigationBtnStatus(horizontalScrollElem
1422
+ .nativeElement);
1423
+ });
1424
+ }
1425
+ }
1426
+ ngOnChanges() {
1427
+ timer(100).subscribe(() => {
1428
+ if (this.horizontalScrollElem) {
1429
+ this.updateNavigationBtnStatus(this.horizontalScrollElem
1430
+ .nativeElement);
1431
+ }
1432
+ });
1433
+ }
1434
+ ngOnDestroy() {
1435
+ if (this.scrollObserver) {
1436
+ this.scrollObserver.unsubscribe();
1437
+ }
1438
+ }
1439
+ showPrev() {
1440
+ if (this.horizontalScrollElem) {
1441
+ // const elem = this.horizontalScrollElem.nativeElement
1442
+ // elem.scrollLeft -= 0.20 * elem.clientWidth
1443
+ if (this.horizontalScrollElem) {
1444
+ // const clientWidth = (this.horizontalScrollElem.nativeElement.clientWidth * 0.24)
1445
+ const clientWidth = (this.horizontalScrollElem.nativeElement.clientWidth);
1446
+ this.horizontalScrollElem.nativeElement.scrollTo({
1447
+ left: this.horizontalScrollElem.nativeElement.scrollLeft - clientWidth,
1448
+ behavior: 'smooth',
1449
+ });
1450
+ }
1451
+ }
1452
+ }
1453
+ showNext() {
1454
+ if (this.horizontalScrollElem) {
1455
+ // const elem = this.horizontalScrollElem.nativeElement
1456
+ // elem.scrollLeft += 0.20 * elem.clientWidth
1457
+ if (this.horizontalScrollElem) {
1458
+ // const clientWidth = (this.horizontalScrollElem.nativeElement.clientWidth * 0.24)
1459
+ const clientWidth = (this.horizontalScrollElem.nativeElement.clientWidth);
1460
+ this.horizontalScrollElem.nativeElement.scrollTo({
1461
+ left: this.horizontalScrollElem.nativeElement.scrollLeft + clientWidth,
1462
+ behavior: 'smooth',
1463
+ });
1464
+ }
1465
+ }
1466
+ }
1467
+ updateNavigationBtnStatus(elem) {
1468
+ this.enablePrev = true;
1469
+ this.enableNext = true;
1470
+ if (elem.scrollLeft === 0) {
1471
+ this.enablePrev = false;
1472
+ }
1473
+ if (elem.scrollWidth === elem.clientWidth + elem.scrollLeft) {
1474
+ if (this.loadStatus === 'hasMore') {
1475
+ this.loadNext.emit();
1476
+ }
1477
+ else {
1478
+ this.enableNext = false;
1479
+ }
1480
+ }
1481
+ }
1482
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HorizontalScrollerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1483
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: HorizontalScrollerComponent, isStandalone: false, selector: "ws-utils-horizontal-scroller", inputs: { loadStatus: "loadStatus", onHover: "onHover" }, outputs: { loadNext: "loadNext" }, viewQueries: [{ propertyName: "horizontalScrollElem", first: true, predicate: ["horizontalScrollElem"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<section class=\"horizontal-scroll-container h-full\">\r\n <button i18n-aria-label name=\"content-backward-button\" mat-mini-fab color=\"primary\" (click)=\"showPrev()\"\r\n class=\"prevBtn hidden-touch border-radius-xs\" [hidden]=\"!enablePrev\" [ngClass]=\"{'prevBtnHover': onHover}\">\r\n <mat-icon>navigate_before</mat-icon>\r\n </button>\r\n <div name=\"horizontal-scroll-content-strip\" class=\"horizontal-scroll-content\" #horizontalScrollElem>\r\n <ng-content></ng-content>\r\n </div>\r\n <button i18n-aria-label name=\"content-forward-button\" mat-mini-fab (click)=\"showNext()\" color=\"primary\"\r\n class=\"nextBtn hidden-touch border-radius-xs\" [ngClass]=\"{'nextBtnHover': onHover}\"\r\n [hidden]=\"!enableNext || loadStatus === 'fetching'\">\r\n <mat-icon>navigate_next</mat-icon>\r\n </button>\r\n <div class=\"nextLoading\" *ngIf=\"loadStatus === 'fetching'\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n</section>", styles: [".horizontal-scroll-container{position:relative;width:100%;min-height:100px}.nextLoading,.nextBtn,.prevBtn{position:absolute;top:50%;transform:translateY(-50%);z-index:999}.border-radius-xs{border-radius:8px!important}.prevBtn{left:-16px}.nextBtn{right:-16px}.nextLoading{padding:0;right:-16px}.horizontal-scroll-content{overflow-x:auto;-webkit-overflow-scrolling:touch;height:100%;flex-wrap:nowrap;display:flex;align-items:stretch;-ms-overflow-style:none}.horizontal-scroll-content::-webkit-scrollbar{width:0px;height:0px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
1484
+ }
1485
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HorizontalScrollerComponent, decorators: [{
1486
+ type: Component,
1487
+ args: [{ selector: 'ws-utils-horizontal-scroller', standalone: false, template: "<section class=\"horizontal-scroll-container h-full\">\r\n <button i18n-aria-label name=\"content-backward-button\" mat-mini-fab color=\"primary\" (click)=\"showPrev()\"\r\n class=\"prevBtn hidden-touch border-radius-xs\" [hidden]=\"!enablePrev\" [ngClass]=\"{'prevBtnHover': onHover}\">\r\n <mat-icon>navigate_before</mat-icon>\r\n </button>\r\n <div name=\"horizontal-scroll-content-strip\" class=\"horizontal-scroll-content\" #horizontalScrollElem>\r\n <ng-content></ng-content>\r\n </div>\r\n <button i18n-aria-label name=\"content-forward-button\" mat-mini-fab (click)=\"showNext()\" color=\"primary\"\r\n class=\"nextBtn hidden-touch border-radius-xs\" [ngClass]=\"{'nextBtnHover': onHover}\"\r\n [hidden]=\"!enableNext || loadStatus === 'fetching'\">\r\n <mat-icon>navigate_next</mat-icon>\r\n </button>\r\n <div class=\"nextLoading\" *ngIf=\"loadStatus === 'fetching'\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n</section>", styles: [".horizontal-scroll-container{position:relative;width:100%;min-height:100px}.nextLoading,.nextBtn,.prevBtn{position:absolute;top:50%;transform:translateY(-50%);z-index:999}.border-radius-xs{border-radius:8px!important}.prevBtn{left:-16px}.nextBtn{right:-16px}.nextLoading{padding:0;right:-16px}.horizontal-scroll-content{overflow-x:auto;-webkit-overflow-scrolling:touch;height:100%;flex-wrap:nowrap;display:flex;align-items:stretch;-ms-overflow-style:none}.horizontal-scroll-content::-webkit-scrollbar{width:0px;height:0px}\n"] }]
1488
+ }], ctorParameters: () => [], propDecorators: { loadStatus: [{
1489
+ type: Input
1490
+ }], onHover: [{
1491
+ type: Input
1492
+ }], loadNext: [{
1493
+ type: Output
1494
+ }], horizontalScrollElem: [{
1495
+ type: ViewChild,
1496
+ args: ['horizontalScrollElem', { static: true }]
1497
+ }] } });
1498
+
1499
+ class HorizontalScrollerModule {
1500
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HorizontalScrollerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1501
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: HorizontalScrollerModule, declarations: [HorizontalScrollerComponent], imports: [CommonModule,
1502
+ MatButtonModule,
1503
+ MatIconModule,
1504
+ MatProgressSpinnerModule], exports: [HorizontalScrollerComponent] }); }
1505
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HorizontalScrollerModule, imports: [CommonModule,
1506
+ MatButtonModule,
1507
+ MatIconModule,
1508
+ MatProgressSpinnerModule] }); }
1509
+ }
1510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HorizontalScrollerModule, decorators: [{
1511
+ type: NgModule,
1512
+ args: [{
1513
+ declarations: [HorizontalScrollerComponent],
1514
+ imports: [
1515
+ CommonModule,
1516
+ MatButtonModule,
1517
+ MatIconModule,
1518
+ MatProgressSpinnerModule,
1519
+ ],
1520
+ exports: [HorizontalScrollerComponent],
1521
+ }]
1522
+ }] });
1523
+
1524
+ // import { filter } from 'rxjs/operators'
1525
+ // import { AuthMicrosoftService } from './auth-microsoft.service'
1526
+ // import { ConfigurationsService } from './configurations.service'
1527
+ // interface IParsedToken {
1528
+ // email?: string
1529
+ // encEmail?: string
1530
+ // name?: string
1531
+ // preferred_username?: string
1532
+ // }
1533
+ const storage$1 = localStorage;
1534
+ const storageKey$1 = 'kc';
1535
+ class AuthKeycloakService {
1536
+ constructor() {
1537
+ this.loginChangeSubject = new ReplaySubject(1);
1538
+ // this.loginChangeSubject.subscribe((isLoggedIn: boolean) => {
1539
+ // this.configSvc.isAuthenticated = isLoggedIn
1540
+ // if (
1541
+ // isLoggedIn &&
1542
+ // this.configSvc.instanceConfig &&
1543
+ // Boolean(this.configSvc.instanceConfig.disablePidCheck)
1544
+ // ) {
1545
+ // this.configSvc.userProfile = {
1546
+ // email: this.userEmail,
1547
+ // userName: this.userName,
1548
+ // userId: this.userId || '',
1549
+ // }
1550
+ // }
1551
+ // })
1552
+ }
1553
+ // Getters
1554
+ get isLoggedIn$() {
1555
+ return this.loginChangeSubject.asObservable();
1556
+ }
1557
+ // get isLoggedIn(): Promise<boolean> {
1558
+ // return this.keycloakSvc.isLoggedIn()
1559
+ // }
1560
+ // get isAuthenticated(): boolean | undefined {
1561
+ // return this.keycloakSvc.getKeycloakInstance().authenticated
1562
+ // }
1563
+ // get token(): string | undefined {
1564
+ // return this.keycloakSvc.getKeycloakInstance().token
1565
+ // }
1566
+ // get sessionId(): string | undefined {
1567
+ // return this.keycloakSvc.getKeycloakInstance().sessionId
1568
+ // }
1569
+ // get userId(): string | undefined {
1570
+ // const kc = this.keycloakSvc.getKeycloakInstance()
1571
+ // if (!kc) {
1572
+ // return
1573
+ // }
1574
+ // return (kc.tokenParsed && kc.tokenParsed.sub) || (kc.idTokenParsed && kc.idTokenParsed.sub)
1575
+ // }
1576
+ // get userEmail(): string | undefined {
1577
+ // const kc = this.keycloakSvc.getKeycloakInstance()
1578
+ // const tokenParsed = kc.tokenParsed as IParsedToken
1579
+ // const idTokenParsed = kc.idTokenParsed as IParsedToken
1580
+ // return (
1581
+ // (tokenParsed && tokenParsed.email) ||
1582
+ // (idTokenParsed && idTokenParsed.email) ||
1583
+ // (idTokenParsed && idTokenParsed.encEmail) ||
1584
+ // (tokenParsed && tokenParsed.preferred_username) ||
1585
+ // (idTokenParsed && idTokenParsed.preferred_username)
1586
+ // )
1587
+ // }
1588
+ // get userName(): string | undefined {
1589
+ // const kc = this.keycloakSvc.getKeycloakInstance()
1590
+ // return (
1591
+ // (kc.tokenParsed && (kc.tokenParsed as IParsedToken).name) ||
1592
+ // (kc.idTokenParsed && (kc.idTokenParsed as IParsedToken).name)
1593
+ // )
1594
+ // }
1595
+ // async initAuth(): Promise<boolean> {
1596
+ // if (!this.configSvc.instanceConfig) {
1597
+ // return false
1598
+ // }
1599
+ // const instanceConfig = this.configSvc.instanceConfig
1600
+ // if (instanceConfig.microsoft.isConfigured) {
1601
+ // this.msAuthSvc.init({ microsoft: instanceConfig.microsoft })
1602
+ // }
1603
+ // try {
1604
+ // this.setupGlobalAuthResponder()
1605
+ // this.addKeycloakEventListener()
1606
+ // return await this.keycloakSvc.init({
1607
+ // config: {
1608
+ // url: instanceConfig.keycloak.url,
1609
+ // realm: instanceConfig.keycloak.realm,
1610
+ // clientId: instanceConfig.keycloak.clientId,
1611
+ // },
1612
+ // initOptions: {
1613
+ // ...this.getSavedKcConfig(),
1614
+ // onLoad: instanceConfig.keycloak.onLoad || 'check-sso',
1615
+ // checkLoginIframe: false,
1616
+ // },
1617
+ // enableBearerInterceptor: true,
1618
+ // loadUserProfileAtStartUp: false,
1619
+ // bearerExcludedUrls: instanceConfig.keycloak.bearerExcludedUrls,
1620
+ // })
1621
+ // } catch (err) {
1622
+ // return false
1623
+ // }
1624
+ // }
1625
+ // login(
1626
+ // idpHint: 'E' | 'N' | 'S' = 'E',
1627
+ // redirectUrl: string = this.defaultRedirectUrl,
1628
+ // ): Promise<void> {
1629
+ // return this.keycloakSvc.login({
1630
+ // idpHint,
1631
+ // redirectUri: redirectUrl,
1632
+ // })
1633
+ // }
1634
+ // register(
1635
+ // redirectUrl: string = this.defaultRedirectUrl,
1636
+ // ): Promise<void> {
1637
+ // return this.keycloakSvc.register({
1638
+ // redirectUri: redirectUrl,
1639
+ // })
1640
+ // }
1641
+ /**
1642
+ * @deprecated this will be depricated
1643
+ */
1644
+ async logout(_redirectUrl = this.defaultRedirectUrl) {
1645
+ // window.location.href = `${_redirectUrl}apis/reset`
1646
+ window.location.href = `${_redirectUrl}public/logout`;
1647
+ // storage.removeItem(storageKey)
1648
+ // await this.http.get('/apis/reset').toPromise()
1649
+ // if (this.msAuthSvc.isLogoutRequired) {
1650
+ // this.keycloakSvc.logout(this.msAuthSvc.logoutUrl(redirectUrl))
1651
+ // } else {
1652
+ // this.keycloakSvc.logout(redirectUrl)
1653
+ // }
1654
+ }
1655
+ async force_logout() {
1656
+ // const headers = new HttpHeaders({
1657
+ // 'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
1658
+ // Pragma: 'no-cache',
1659
+ // Expires: '0',
1660
+ // })
1661
+ if (storage$1.getItem('telemetrySessionId')) {
1662
+ storage$1.removeItem('telemetrySessionId');
1663
+ }
1664
+ // try {
1665
+ // sessionStorage.clear()
1666
+ // localStorage.clear()
1667
+ // } catch {
1668
+ // }
1669
+ storage$1.removeItem(storageKey$1);
1670
+ if (localStorage.getItem('login') === 'true') {
1671
+ try {
1672
+ sessionStorage.clear();
1673
+ localStorage.clear();
1674
+ }
1675
+ catch {
1676
+ }
1677
+ window.location.href = `${this.defaultRedirectUrl}apis/reset`;
1678
+ }
1679
+ else {
1680
+ window.location.href = `${this.defaultRedirectUrl}public/logout`;
1681
+ }
1682
+ // window.location.href = '/public/logout'
1683
+ // await this.http.get('/apis/reset', { headers }).toPromise()
1684
+ }
1685
+ // private addKeycloakEventListener() {
1686
+ // this.keycloakSvc.keycloakEvents$.subscribe((event: KeycloakEvent) => {
1687
+ // switch (event.type) {
1688
+ // case KeycloakEventType.OnAuthError:
1689
+ // this.loginChangeSubject.next(false)
1690
+ // break
1691
+ // case KeycloakEventType.OnAuthLogout:
1692
+ // this.loginChangeSubject.next(false)
1693
+ // storage.removeItem(storageKey)
1694
+ // break
1695
+ // case KeycloakEventType.OnAuthRefreshError:
1696
+ // break
1697
+ // case KeycloakEventType.OnAuthRefreshSuccess:
1698
+ // break
1699
+ // case KeycloakEventType.OnAuthSuccess:
1700
+ // break
1701
+ // case KeycloakEventType.OnReady:
1702
+ // this.loginChangeSubject.next(event.args)
1703
+ // if (event.args) {
1704
+ // this.saveKeycloakConfig()
1705
+ // }
1706
+ // break
1707
+ // case KeycloakEventType.OnTokenExpired:
1708
+ // this.keycloakSvc.updateToken(60)
1709
+ // break
1710
+ // }
1711
+ // })
1712
+ // }
1713
+ // private setupGlobalAuthResponder() {
1714
+ // fromEvent<MessageEvent>(window, 'message')
1715
+ // .pipe(
1716
+ // filter(
1717
+ // (event: MessageEvent) =>
1718
+ // Boolean(event) &&
1719
+ // Boolean(event.data) &&
1720
+ // event.data.type === 'AUTH_REQUEST' &&
1721
+ // Boolean(event.source && typeof event.source.postMessage === 'function'),
1722
+ // ),
1723
+ // )
1724
+ // .subscribe(async (event: MessageEvent) => {
1725
+ // const contentWindow = event.source as Window
1726
+ // const token = await this.keycloakSvc.getToken()
1727
+ // const response = {
1728
+ // app: 'WEB_PORTAL',
1729
+ // type: 'AUTH_RESPONSE',
1730
+ // state: 'NONE',
1731
+ // plugin: 'NONE',
1732
+ // data: {
1733
+ // token,
1734
+ // id: event.data && event.data.data && event.data.data.id,
1735
+ // },
1736
+ // }
1737
+ // contentWindow.postMessage(response, '*')
1738
+ // })
1739
+ // }
1740
+ // Utility Methods
1741
+ // private saveKeycloakConfig() {
1742
+ // const kc = this.keycloakSvc.getKeycloakInstance()
1743
+ // const kcInitOptions: KeycloakInitOptions = {
1744
+ // idToken: kc.idToken,
1745
+ // refreshToken: kc.refreshToken,
1746
+ // timeSkew: kc.timeSkew,
1747
+ // token: kc.token,
1748
+ // }
1749
+ // storage.setItem(storageKey, JSON.stringify(kcInitOptions))
1750
+ // }
1751
+ // private getSavedKcConfig(): KeycloakInitOptions {
1752
+ // try {
1753
+ // // const lastSaved = KEYCLOAK_STORAGE.getItem(key);
1754
+ // const lastSaved = storage.getItem(storageKey)
1755
+ // if (lastSaved) {
1756
+ // const processed = JSON.parse(lastSaved)
1757
+ // if (
1758
+ // 'idToken' in processed &&
1759
+ // 'refreshToken' in processed &&
1760
+ // 'timeSkew' in processed &&
1761
+ // 'token' in processed
1762
+ // ) {
1763
+ // return processed
1764
+ // }
1765
+ // }
1766
+ // } catch (e) { }
1767
+ // return {}
1768
+ // }
1769
+ get defaultRedirectUrl() {
1770
+ try {
1771
+ const baseUrl = document.baseURI;
1772
+ return baseUrl || location.origin;
1773
+ }
1774
+ catch (error) {
1775
+ return location.origin;
1776
+ }
1777
+ }
1778
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthKeycloakService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1779
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthKeycloakService, providedIn: 'root' }); }
1780
+ }
1781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthKeycloakService, decorators: [{
1782
+ type: Injectable,
1783
+ args: [{
1784
+ providedIn: 'root',
1785
+ }]
1786
+ }], ctorParameters: () => [] });
1787
+
1788
+ const RANDOM_ID_PER_USER = 0;
1789
+ class UtilityService {
1790
+ constructor(http, platform, router, route) {
1791
+ this.http = http;
1792
+ this.platform = platform;
1793
+ this.router = router;
1794
+ this.route = route;
1795
+ this.currentRouteData = [];
1796
+ this.router.events.subscribe((event) => {
1797
+ if (event instanceof NavigationEnd) {
1798
+ // let snapshot = this.router.routerState.firstChild(this.activatedRoute).snapshot
1799
+ // console.log('this.route.snapshot :: ', this.route.snapshot)
1800
+ const snapshot = this.route.snapshot;
1801
+ // console.log('root.snapshot.root.firstChild ', snapshot.root.firstChild)
1802
+ // console.log('firstChild ', snapshot.firstChild)
1803
+ const firstChild = snapshot.root.firstChild;
1804
+ this.getChildRouteData(snapshot, firstChild);
1805
+ }
1806
+ });
1807
+ }
1808
+ getChildRouteData(snapshot, firstChild) {
1809
+ if (firstChild) {
1810
+ if (firstChild.data) {
1811
+ // console.log('firstChild.data', firstChild.data)
1812
+ this.currentRouteData.push(firstChild.data);
1813
+ }
1814
+ if (firstChild.firstChild) {
1815
+ this.getChildRouteData(snapshot, firstChild.firstChild);
1816
+ }
1817
+ }
1818
+ }
1819
+ get randomId() {
1820
+ return RANDOM_ID_PER_USER + 1;
1821
+ }
1822
+ getJson(url) {
1823
+ return this.http.get(url);
1824
+ }
1825
+ getLeafNodes(node, nodes) {
1826
+ if ((node.children || []).length === 0) {
1827
+ nodes.push(node);
1828
+ }
1829
+ else {
1830
+ if (node.children) {
1831
+ node.children.forEach(child => {
1832
+ this.getLeafNodes(child, nodes);
1833
+ });
1834
+ }
1835
+ }
1836
+ return nodes;
1837
+ }
1838
+ getPath(node, id) {
1839
+ const path = [];
1840
+ this.hasPath(node, path, id);
1841
+ return path;
1842
+ }
1843
+ hasPath(node, pathArr, id) {
1844
+ if (node == null) {
1845
+ return false;
1846
+ }
1847
+ pathArr.push(node);
1848
+ if (node.identifier === id) {
1849
+ return true;
1850
+ }
1851
+ const children = node.children || [];
1852
+ if (children.some(u => this.hasPath(u, pathArr, id))) {
1853
+ return true;
1854
+ }
1855
+ pathArr.pop();
1856
+ return false;
1857
+ }
1858
+ get isMobile() {
1859
+ if (this.isIos || this.isAndroid) {
1860
+ return true;
1861
+ }
1862
+ return false;
1863
+ }
1864
+ get isIos() {
1865
+ return this.platform.IOS;
1866
+ }
1867
+ get isAndroid() {
1868
+ return this.platform.ANDROID;
1869
+ }
1870
+ get isAndroidApp() {
1871
+ return Boolean(window.appRef);
1872
+ }
1873
+ get iOsAppRef() {
1874
+ if (window.webkit &&
1875
+ window.webkit.messageHandlers &&
1876
+ window.webkit.messageHandlers.appRef) {
1877
+ return window.webkit.messageHandlers.appRef;
1878
+ }
1879
+ return null;
1880
+ }
1881
+ setRouteData(data) {
1882
+ this.currentRouteData = data;
1883
+ }
1884
+ get routeData() {
1885
+ const data = {
1886
+ module: '',
1887
+ pageId: '',
1888
+ };
1889
+ // tslint:disable-next-line: no-console
1890
+ // console.log('Final currentDataRoute get routeData()', this.currentRouteData)
1891
+ this.currentRouteData.map((rd) => {
1892
+ if (rd.pageId) {
1893
+ data.pageId = `${data.pageId}/${rd.pageId}`;
1894
+ }
1895
+ if (rd.module) {
1896
+ data.module = rd.module;
1897
+ }
1898
+ });
1899
+ return data;
1900
+ }
1901
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UtilityService, deps: [{ token: i1$3.HttpClient }, { token: i2.Platform }, { token: i3$1.Router }, { token: i3$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable }); }
1902
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UtilityService, providedIn: 'root' }); }
1903
+ }
1904
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UtilityService, decorators: [{
1905
+ type: Injectable,
1906
+ args: [{
1907
+ providedIn: 'root',
1908
+ }]
1909
+ }], ctorParameters: () => [{ type: i1$3.HttpClient }, { type: i2.Platform }, { type: i3$1.Router }, { type: i3$1.ActivatedRoute }] });
1910
+
1911
+ class LogoutComponent {
1912
+ constructor(dialogRef, authSvc, configSvc, utilitySvc) {
1913
+ this.dialogRef = dialogRef;
1914
+ this.authSvc = authSvc;
1915
+ this.configSvc = configSvc;
1916
+ this.utilitySvc = utilitySvc;
1917
+ this.disabled = false;
1918
+ this.isDownloadableIos = false;
1919
+ this.isDownloadableAndroid = false;
1920
+ }
1921
+ ngOnInit() {
1922
+ if (this.configSvc.restrictedFeatures) {
1923
+ this.isDownloadableIos = !this.configSvc.restrictedFeatures.has('iosDownload');
1924
+ this.isDownloadableAndroid = !this.configSvc.restrictedFeatures.has('androidDownload');
1925
+ }
1926
+ }
1927
+ confirmed() {
1928
+ this.disabled = true;
1929
+ this.dialogRef.close();
1930
+ this.authSvc.force_logout();
1931
+ // this.router.navigate(['public', 'logout'])
1932
+ // this.router.logout()
1933
+ }
1934
+ get isDownloadable() {
1935
+ if (this.configSvc.instanceConfig && this.configSvc.instanceConfig.isContentDownloadAvailable &&
1936
+ (this.utilitySvc.iOsAppRef || this.utilitySvc.isAndroidApp)) {
1937
+ return true;
1938
+ }
1939
+ return false;
1940
+ }
1941
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LogoutComponent, deps: [{ token: i1$1.MatDialogRef }, { token: AuthKeycloakService }, { token: ConfigurationsService }, { token: UtilityService }], target: i0.ɵɵFactoryTarget.Component }); }
1942
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: LogoutComponent, isStandalone: false, selector: "ws-utils-logout", ngImport: i0, template: "<div class=\"logout-outer\">\r\n <h1 mat-dialog-title i18n>Logout Now</h1>\r\n <div class=\"ws-mat-primary-text text-base pb-2 title-text\" *ngIf=\"isDownloadable\" i18n>\r\n Note: On logging out all the downloaded content will be deleted.\r\n </div>\r\n <div mat-dialog-content class=\"text-base hide-overflow\" i18n>\r\n Are you sure?\r\n </div>\r\n <div mat-dialog-actions class=\"flex-row-reverse\">\r\n <button mat-flat-button color=\"warn\" [disabled]=\"disabled\" (click)=\"confirmed()\" i18n>\r\n Yes\r\n </button>\r\n <button mat-button class=\"margin-right-xs\" [mat-dialog-close] cdkFocusInitial i18n>No</button>\r\n </div>\r\n</div>", styles: [".hide-overflow{overflow:hidden}.logout-outer{padding:16px 0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] }); }
1943
+ }
1944
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LogoutComponent, decorators: [{
1945
+ type: Component,
1946
+ args: [{ selector: 'ws-utils-logout', standalone: false, template: "<div class=\"logout-outer\">\r\n <h1 mat-dialog-title i18n>Logout Now</h1>\r\n <div class=\"ws-mat-primary-text text-base pb-2 title-text\" *ngIf=\"isDownloadable\" i18n>\r\n Note: On logging out all the downloaded content will be deleted.\r\n </div>\r\n <div mat-dialog-content class=\"text-base hide-overflow\" i18n>\r\n Are you sure?\r\n </div>\r\n <div mat-dialog-actions class=\"flex-row-reverse\">\r\n <button mat-flat-button color=\"warn\" [disabled]=\"disabled\" (click)=\"confirmed()\" i18n>\r\n Yes\r\n </button>\r\n <button mat-button class=\"margin-right-xs\" [mat-dialog-close] cdkFocusInitial i18n>No</button>\r\n </div>\r\n</div>", styles: [".hide-overflow{overflow:hidden}.logout-outer{padding:16px 0}\n"] }]
1947
+ }], ctorParameters: () => [{ type: i1$1.MatDialogRef }, { type: AuthKeycloakService }, { type: ConfigurationsService }, { type: UtilityService }] });
1948
+
1949
+ class LogoutModule {
1950
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LogoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1951
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: LogoutModule, declarations: [LogoutComponent], imports: [CommonModule,
1952
+ MatButtonModule,
1953
+ MatDialogModule] }); }
1954
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LogoutModule, imports: [CommonModule,
1955
+ MatButtonModule,
1956
+ MatDialogModule] }); }
1957
+ }
1958
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LogoutModule, decorators: [{
1959
+ type: NgModule,
1960
+ args: [{
1961
+ declarations: [LogoutComponent],
1962
+ imports: [
1963
+ CommonModule,
1964
+ MatButtonModule,
1965
+ MatDialogModule,
1966
+ ]
1967
+ }]
1968
+ }] });
1969
+
1970
+ class PipeConciseDateRangePipe {
1971
+ transform(dateRange) {
1972
+ try {
1973
+ let conciseRange;
1974
+ let prefix;
1975
+ let suffix;
1976
+ const fromDate = new Date(dateRange.fromDate);
1977
+ const toDate = new Date(dateRange.toDate);
1978
+ const fromDateObj = {
1979
+ day: fromDate.getDate(),
1980
+ month: fromDate.toLocaleString('default', { month: 'short' }),
1981
+ year: fromDate.getFullYear(),
1982
+ time: fromDate.getTime(),
1983
+ };
1984
+ const toDateObj = {
1985
+ day: toDate.getDate(),
1986
+ month: toDate.toLocaleString('default', { month: 'short' }),
1987
+ year: toDate.getFullYear(),
1988
+ time: toDate.getTime(),
1989
+ };
1990
+ if (fromDateObj.time === toDateObj.time) {
1991
+ conciseRange = `${fromDateObj.day} ${fromDateObj.month} ${fromDateObj.year}`;
1992
+ return conciseRange;
1993
+ }
1994
+ if (fromDateObj.year !== fromDateObj.year) {
1995
+ prefix = `${fromDateObj.day} ${fromDateObj.month} ${fromDateObj.year}`;
1996
+ suffix = `${toDateObj.day} ${toDateObj.month} ${toDateObj.year}`;
1997
+ conciseRange = `${prefix} - ${suffix}`;
1998
+ return conciseRange;
1999
+ }
2000
+ if (fromDateObj.month === toDateObj.month) {
2001
+ prefix = `${fromDateObj.day}`;
2002
+ suffix = `${toDateObj.day} ${toDateObj.month} ${toDateObj.year}`;
2003
+ }
2004
+ else {
2005
+ prefix = `${fromDateObj.day} ${fromDateObj.month}`;
2006
+ suffix = `${toDateObj.day} ${toDateObj.month} ${toDateObj.year}`;
2007
+ }
2008
+ conciseRange = `${prefix} - ${suffix}`;
2009
+ return conciseRange;
2010
+ }
2011
+ catch (e) {
2012
+ return `${dateRange.fromDate} - ${dateRange.toDate}`;
2013
+ }
2014
+ }
2015
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeConciseDateRangePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2016
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeConciseDateRangePipe, isStandalone: false, name: "pipeConciseDateRange" }); }
2017
+ }
2018
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeConciseDateRangePipe, decorators: [{
2019
+ type: Pipe,
2020
+ args: [{
2021
+ name: 'pipeConciseDateRange',
2022
+ standalone: false
2023
+ }]
2024
+ }] });
2025
+
2026
+ class PipeConciseDateRangeModule {
2027
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeConciseDateRangeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2028
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeConciseDateRangeModule, declarations: [PipeConciseDateRangePipe], imports: [CommonModule], exports: [PipeConciseDateRangePipe] }); }
2029
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeConciseDateRangeModule, imports: [CommonModule] }); }
2030
+ }
2031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeConciseDateRangeModule, decorators: [{
2032
+ type: NgModule,
2033
+ args: [{
2034
+ declarations: [PipeConciseDateRangePipe],
2035
+ imports: [CommonModule],
2036
+ exports: [PipeConciseDateRangePipe],
2037
+ }]
2038
+ }] });
2039
+
2040
+ class PipeCountTransformPipe {
2041
+ transform(value) {
2042
+ const thousand = 1000;
2043
+ const million = 1000000;
2044
+ if (value > 0) {
2045
+ if (value < thousand) {
2046
+ return String(value);
2047
+ }
2048
+ if (value >= thousand && value < million) {
2049
+ const views = (value / thousand).toFixed(1);
2050
+ if (views.endsWith('0')) {
2051
+ return `${views.split('.')[0]}K`;
2052
+ }
2053
+ return `${views}K`;
2054
+ }
2055
+ {
2056
+ const views = (value / million).toFixed(1);
2057
+ if (views.endsWith('0')) {
2058
+ return `${views.split('.')[0]}M`;
2059
+ }
2060
+ return `${views}M`;
2061
+ }
2062
+ }
2063
+ return '0';
2064
+ }
2065
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeCountTransformPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2066
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeCountTransformPipe, isStandalone: false, name: "pipeCountTransform" }); }
2067
+ }
2068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeCountTransformPipe, decorators: [{
2069
+ type: Pipe,
2070
+ args: [{
2071
+ name: 'pipeCountTransform',
2072
+ standalone: false
2073
+ }]
2074
+ }] });
2075
+
2076
+ class PipeCountTransformModule {
2077
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeCountTransformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2078
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeCountTransformModule, declarations: [PipeCountTransformPipe], imports: [CommonModule], exports: [PipeCountTransformPipe] }); }
2079
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeCountTransformModule, imports: [CommonModule] }); }
2080
+ }
2081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeCountTransformModule, decorators: [{
2082
+ type: NgModule,
2083
+ args: [{
2084
+ declarations: [PipeCountTransformPipe],
2085
+ imports: [
2086
+ CommonModule,
2087
+ ],
2088
+ exports: [PipeCountTransformPipe],
2089
+ }]
2090
+ }] });
2091
+
2092
+ class PipeDateConcatPipe {
2093
+ constructor() {
2094
+ this.months = [
2095
+ 'Jan',
2096
+ 'Feb',
2097
+ 'Mar',
2098
+ 'Apr',
2099
+ 'May',
2100
+ 'Jun',
2101
+ 'Jul',
2102
+ 'Aug',
2103
+ 'Sep',
2104
+ 'Oct',
2105
+ 'Nov',
2106
+ 'Dec',
2107
+ ];
2108
+ }
2109
+ transform(value) {
2110
+ let dateStr = `${value.day} ${this.months[value.month - 1]} ${value.year}`;
2111
+ if (value.timeZone) {
2112
+ dateStr += ` ${value.timeZone}`;
2113
+ }
2114
+ return dateStr;
2115
+ }
2116
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeDateConcatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2117
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeDateConcatPipe, isStandalone: false, name: "pipeDateConcat" }); }
2118
+ }
2119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeDateConcatPipe, decorators: [{
2120
+ type: Pipe,
2121
+ args: [{
2122
+ name: 'pipeDateConcat',
2123
+ standalone: false
2124
+ }]
2125
+ }], ctorParameters: () => [] });
2126
+
2127
+ class PipeDateConcatModule {
2128
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeDateConcatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2129
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeDateConcatModule, declarations: [PipeDateConcatPipe], imports: [CommonModule], exports: [PipeDateConcatPipe] }); }
2130
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeDateConcatModule, imports: [CommonModule] }); }
2131
+ }
2132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeDateConcatModule, decorators: [{
2133
+ type: NgModule,
2134
+ args: [{
2135
+ declarations: [PipeDateConcatPipe],
2136
+ imports: [
2137
+ CommonModule,
2138
+ ],
2139
+ exports: [PipeDateConcatPipe],
2140
+ }]
2141
+ }] });
2142
+
2143
+ class PipeDurationTransformPipe {
2144
+ transform(data, type) {
2145
+ if (data <= 0) {
2146
+ return '';
2147
+ }
2148
+ const h = Math.floor(data / 3600);
2149
+ const m = Math.floor((data % 3600) / 60);
2150
+ const s = Math.floor((data % 3600) % 60);
2151
+ let duration = '';
2152
+ let space = '';
2153
+ switch (type) {
2154
+ case 'time24':
2155
+ return this.defaultDuration(h, m, s);
2156
+ case 'hms':
2157
+ if (h > 0) {
2158
+ duration += type === 'hms' ? `${h}h` : `${h} hr`;
2159
+ }
2160
+ if (m > 0) {
2161
+ if (h > 0) {
2162
+ space = ' ';
2163
+ }
2164
+ duration += type === 'hms' ? `${space}${m}m` : `${space}${m} min`;
2165
+ }
2166
+ if (s > 0 && h === 0) {
2167
+ if (m > 0) {
2168
+ space = ' ';
2169
+ }
2170
+ duration += type === 'hms' ? `${space}${s}s` : `${space}${s} sec`;
2171
+ }
2172
+ return duration;
2173
+ case 'hour':
2174
+ if (h === 0) {
2175
+ duration += 'less than an hour';
2176
+ }
2177
+ if (h === 1) {
2178
+ duration += `${h} hour`;
2179
+ }
2180
+ if (h > 1) {
2181
+ duration += `${h} hours`;
2182
+ }
2183
+ return duration;
2184
+ default:
2185
+ return this.defaultDuration(h, m, s);
2186
+ }
2187
+ }
2188
+ defaultDuration(h, m, s) {
2189
+ let duration = '';
2190
+ duration += h > 0 ? `${h.toString().padStart(2)}:` : '';
2191
+ duration += m > 0 ? `${m.toString().padStart(2)}:` : '00:';
2192
+ duration += s > 0 ? s.toString().padStart(2) : '00';
2193
+ return duration;
2194
+ }
2195
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeDurationTransformPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2196
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeDurationTransformPipe, isStandalone: false, name: "pipeDurationTransform" }); }
2197
+ }
2198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeDurationTransformPipe, decorators: [{
2199
+ type: Pipe,
2200
+ args: [{
2201
+ name: 'pipeDurationTransform',
2202
+ standalone: false
2203
+ }]
2204
+ }] });
2205
+
2206
+ class PipeDurationTransformModule {
2207
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeDurationTransformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2208
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeDurationTransformModule, declarations: [PipeDurationTransformPipe], imports: [CommonModule], exports: [PipeDurationTransformPipe] }); }
2209
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeDurationTransformModule, imports: [CommonModule] }); }
2210
+ }
2211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeDurationTransformModule, decorators: [{
2212
+ type: NgModule,
2213
+ args: [{
2214
+ declarations: [PipeDurationTransformPipe],
2215
+ imports: [
2216
+ CommonModule,
2217
+ ],
2218
+ exports: [PipeDurationTransformPipe],
2219
+ }]
2220
+ }] });
2221
+
2222
+ class PipeHtmlTagRemovalPipe {
2223
+ transform(htmlString) {
2224
+ return htmlString ? String(htmlString).replace(/<[^>]+>/gm, '') : '';
2225
+ }
2226
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeHtmlTagRemovalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2227
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeHtmlTagRemovalPipe, isStandalone: false, name: "pipeHtmlTagRemoval" }); }
2228
+ }
2229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeHtmlTagRemovalPipe, decorators: [{
2230
+ type: Pipe,
2231
+ args: [{
2232
+ name: 'pipeHtmlTagRemoval',
2233
+ standalone: false
2234
+ }]
2235
+ }] });
2236
+
2237
+ class PipeHtmlTagRemovalModule {
2238
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeHtmlTagRemovalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2239
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeHtmlTagRemovalModule, declarations: [PipeHtmlTagRemovalPipe], imports: [CommonModule], exports: [PipeHtmlTagRemovalPipe] }); }
2240
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeHtmlTagRemovalModule, imports: [CommonModule] }); }
2241
+ }
2242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeHtmlTagRemovalModule, decorators: [{
2243
+ type: NgModule,
2244
+ args: [{
2245
+ declarations: [PipeHtmlTagRemovalPipe],
2246
+ imports: [
2247
+ CommonModule,
2248
+ ],
2249
+ exports: [PipeHtmlTagRemovalPipe],
2250
+ }]
2251
+ }] });
2252
+
2253
+ class PipeFilterPipe {
2254
+ transform(value, keys, term) {
2255
+ if (!term) {
2256
+ return value;
2257
+ }
2258
+ return (value || []).filter((item) => keys.split(',')
2259
+ .some(key => item.hasOwnProperty(key) && new RegExp(`^${term}$`, 'gi').test(item[key])));
2260
+ }
2261
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2262
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterPipe, isStandalone: false, name: "pipeFilter" }); }
2263
+ }
2264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterPipe, decorators: [{
2265
+ type: Pipe,
2266
+ args: [{
2267
+ name: 'pipeFilter',
2268
+ standalone: false
2269
+ }]
2270
+ }] });
2271
+
2272
+ class PipeFilterModule {
2273
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2274
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterModule, declarations: [PipeFilterPipe], imports: [CommonModule], exports: [PipeFilterPipe] }); }
2275
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterModule, imports: [CommonModule] }); }
2276
+ }
2277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterModule, decorators: [{
2278
+ type: NgModule,
2279
+ args: [{
2280
+ declarations: [PipeFilterPipe],
2281
+ imports: [
2282
+ CommonModule,
2283
+ ],
2284
+ exports: [PipeFilterPipe],
2285
+ }]
2286
+ }] });
2287
+
2288
+ class PipeFilterSearchPipe {
2289
+ transform(items, searchText, ...keys) {
2290
+ if (!items) {
2291
+ return [];
2292
+ }
2293
+ if (!searchText) {
2294
+ return items;
2295
+ }
2296
+ const searchTextLowerCase = searchText.toLowerCase();
2297
+ if (keys && keys.length) {
2298
+ const result = items.filter(it => {
2299
+ return it['personalDetails'][keys[0]].toLowerCase().includes(searchTextLowerCase);
2300
+ // keys.map((key: any) => {
2301
+ // console.log('key:', key)
2302
+ // console.log(`it['personalDetails'][key]`, it['personalDetails'][key])
2303
+ // return it['personalDetails'][key].toLowerCase().includes(searchTextLowerCase)
2304
+ // })
2305
+ });
2306
+ if (result && result.length <= 0) {
2307
+ return [-1];
2308
+ }
2309
+ return result;
2310
+ }
2311
+ return items.filter(it => {
2312
+ return it.title.toLowerCase().includes(searchTextLowerCase);
2313
+ });
2314
+ }
2315
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterSearchPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2316
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterSearchPipe, isStandalone: false, name: "pipeFilterSearch" }); }
2317
+ }
2318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterSearchPipe, decorators: [{
2319
+ type: Pipe,
2320
+ args: [{
2321
+ name: 'pipeFilterSearch',
2322
+ standalone: false
2323
+ }]
2324
+ }] });
2325
+
2326
+ class PipeFilterSearchModule {
2327
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterSearchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2328
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterSearchModule, declarations: [PipeFilterSearchPipe], imports: [CommonModule], exports: [PipeFilterSearchPipe] }); }
2329
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterSearchModule, imports: [CommonModule] }); }
2330
+ }
2331
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeFilterSearchModule, decorators: [{
2332
+ type: NgModule,
2333
+ args: [{
2334
+ declarations: [PipeFilterSearchPipe],
2335
+ imports: [
2336
+ CommonModule,
2337
+ ],
2338
+ exports: [PipeFilterSearchPipe],
2339
+ }]
2340
+ }] });
2341
+
2342
+ class PipeListFilterPipe {
2343
+ transform(value, keys, term) {
2344
+ if (!term) {
2345
+ return value;
2346
+ }
2347
+ return (value || []).filter((item) => keys.split(',')
2348
+ .some(key => item.hasOwnProperty(key)
2349
+ && item[key] && (`${item[key]} `).toLocaleLowerCase().includes(term.toLocaleLowerCase())));
2350
+ // new RegExp(`^${term}$`, 'gi').test(item[key])
2351
+ }
2352
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeListFilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2353
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeListFilterPipe, isStandalone: false, name: "pipeListFilter" }); }
2354
+ }
2355
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeListFilterPipe, decorators: [{
2356
+ type: Pipe,
2357
+ args: [{
2358
+ name: 'pipeListFilter',
2359
+ standalone: false
2360
+ }]
2361
+ }] });
2362
+
2363
+ class PipeListFilterModule {
2364
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeListFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2365
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeListFilterModule, declarations: [PipeListFilterPipe], imports: [CommonModule], exports: [PipeListFilterPipe] }); }
2366
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeListFilterModule, imports: [CommonModule] }); }
2367
+ }
2368
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeListFilterModule, decorators: [{
2369
+ type: NgModule,
2370
+ args: [{
2371
+ declarations: [PipeListFilterPipe],
2372
+ imports: [
2373
+ CommonModule,
2374
+ ],
2375
+ exports: [PipeListFilterPipe],
2376
+ }]
2377
+ }] });
2378
+
2379
+ // const moment = _moment
2380
+ class PipeRelativeTimePipe {
2381
+ transform(value) {
2382
+ if (value) {
2383
+ return moment((new Date(value))).fromNow();
2384
+ }
2385
+ return moment().startOf('hour').fromNow();
2386
+ }
2387
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeRelativeTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2388
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeRelativeTimePipe, isStandalone: false, name: "pipeRelativeTime" }); }
2389
+ }
2390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeRelativeTimePipe, decorators: [{
2391
+ type: Pipe,
2392
+ args: [{
2393
+ name: 'pipeRelativeTime',
2394
+ standalone: false
2395
+ }]
2396
+ }] });
2397
+
2398
+ class PipeRelativeTimeModule {
2399
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeRelativeTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2400
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeRelativeTimeModule, declarations: [PipeRelativeTimePipe], imports: [CommonModule], exports: [PipeRelativeTimePipe] }); }
2401
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeRelativeTimeModule, imports: [CommonModule] }); }
2402
+ }
2403
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeRelativeTimeModule, decorators: [{
2404
+ type: NgModule,
2405
+ args: [{
2406
+ declarations: [PipeRelativeTimePipe],
2407
+ imports: [
2408
+ CommonModule,
2409
+ ],
2410
+ exports: [PipeRelativeTimePipe],
2411
+ }]
2412
+ }] });
2413
+
2414
+ class OrderByPipe {
2415
+ constructor() {
2416
+ this.transform = orderBy;
2417
+ }
2418
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: OrderByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2419
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: OrderByPipe, isStandalone: false, name: "orderBy" }); }
2420
+ }
2421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: OrderByPipe, decorators: [{
2422
+ type: Pipe,
2423
+ args: [{
2424
+ name: 'orderBy',
2425
+ standalone: false
2426
+ }]
2427
+ }] });
2428
+
2429
+ class PipeOrderByModule {
2430
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeOrderByModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2431
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeOrderByModule, declarations: [OrderByPipe], imports: [CommonModule], exports: [OrderByPipe] }); }
2432
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeOrderByModule, imports: [CommonModule] }); }
2433
+ }
2434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeOrderByModule, decorators: [{
2435
+ type: NgModule,
2436
+ args: [{
2437
+ declarations: [OrderByPipe],
2438
+ imports: [
2439
+ CommonModule,
2440
+ ],
2441
+ exports: [OrderByPipe],
2442
+ }]
2443
+ }] });
2444
+
2445
+ class PipeLimitToPipe {
2446
+ transform(data, limit = 5) {
2447
+ if (!data || !data.length) {
2448
+ return null;
2449
+ }
2450
+ if (Array.isArray(data)) {
2451
+ return data.slice(0, limit);
2452
+ }
2453
+ if (typeof data === 'string') {
2454
+ const slicedString = data.substr(0, limit);
2455
+ if (limit < data.length) {
2456
+ return `${slicedString}...`;
2457
+ }
2458
+ return slicedString;
2459
+ }
2460
+ return null;
2461
+ }
2462
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeLimitToPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2463
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeLimitToPipe, isStandalone: false, name: "pipeLimitTo" }); }
2464
+ }
2465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeLimitToPipe, decorators: [{
2466
+ type: Pipe,
2467
+ args: [{
2468
+ name: 'pipeLimitTo',
2469
+ standalone: false
2470
+ }]
2471
+ }] });
2472
+
2473
+ class PipeLimitToModule {
2474
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeLimitToModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2475
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeLimitToModule, declarations: [PipeLimitToPipe], imports: [CommonModule], exports: [PipeLimitToPipe] }); }
2476
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeLimitToModule, imports: [CommonModule] }); }
2477
+ }
2478
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeLimitToModule, decorators: [{
2479
+ type: NgModule,
2480
+ args: [{
2481
+ declarations: [PipeLimitToPipe],
2482
+ imports: [
2483
+ CommonModule,
2484
+ ],
2485
+ exports: [PipeLimitToPipe],
2486
+ }]
2487
+ }] });
2488
+
2489
+ class PipeNameTransformPipe {
2490
+ transform(value) {
2491
+ let result = '';
2492
+ if (value.firstName) {
2493
+ result += value.firstName;
2494
+ }
2495
+ if (value.lastName && value.lastName !== value.firstName) {
2496
+ result += ` ${value.lastName}`;
2497
+ }
2498
+ if (result.trim() !== '') {
2499
+ return result;
2500
+ }
2501
+ if (value.email) {
2502
+ return value.email;
2503
+ }
2504
+ return 'Anonymous User';
2505
+ }
2506
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeNameTransformPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2507
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeNameTransformPipe, isStandalone: false, name: "pipeNameTransform" }); }
2508
+ }
2509
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeNameTransformPipe, decorators: [{
2510
+ type: Pipe,
2511
+ args: [{
2512
+ name: 'pipeNameTransform',
2513
+ standalone: false
2514
+ }]
2515
+ }] });
2516
+
2517
+ class PipeNameTransformModule {
2518
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeNameTransformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2519
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeNameTransformModule, declarations: [PipeNameTransformPipe], imports: [CommonModule], exports: [PipeNameTransformPipe] }); }
2520
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeNameTransformModule, imports: [CommonModule] }); }
2521
+ }
2522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeNameTransformModule, decorators: [{
2523
+ type: NgModule,
2524
+ args: [{
2525
+ declarations: [PipeNameTransformPipe],
2526
+ imports: [
2527
+ CommonModule,
2528
+ ],
2529
+ exports: [PipeNameTransformPipe],
2530
+ }]
2531
+ }] });
2532
+
2533
+ class PipePartialContentPipe {
2534
+ transform(value, keys) {
2535
+ const result = {};
2536
+ for (const key of keys) {
2537
+ if (value[key]) {
2538
+ result[key] = value[key];
2539
+ }
2540
+ }
2541
+ return result;
2542
+ }
2543
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipePartialContentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2544
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipePartialContentPipe, isStandalone: false, name: "pipePartialContent" }); }
2545
+ }
2546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipePartialContentPipe, decorators: [{
2547
+ type: Pipe,
2548
+ args: [{
2549
+ name: 'pipePartialContent',
2550
+ standalone: false
2551
+ }]
2552
+ }] });
2553
+
2554
+ class PipePartialContentModule {
2555
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipePartialContentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2556
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipePartialContentModule, declarations: [PipePartialContentPipe], imports: [CommonModule], exports: [PipePartialContentPipe] }); }
2557
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipePartialContentModule, imports: [CommonModule] }); }
2558
+ }
2559
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipePartialContentModule, decorators: [{
2560
+ type: NgModule,
2561
+ args: [{
2562
+ declarations: [PipePartialContentPipe],
2563
+ imports: [
2564
+ CommonModule,
2565
+ ],
2566
+ exports: [PipePartialContentPipe],
2567
+ }]
2568
+ }] });
2569
+
2570
+ class PipeSafeSanitizerPipe {
2571
+ constructor(sanitizer) {
2572
+ this.sanitizer = sanitizer;
2573
+ }
2574
+ transform(value, type = 'html') {
2575
+ switch (type) {
2576
+ case 'html':
2577
+ return this.sanitizer.bypassSecurityTrustHtml(value);
2578
+ case 'style':
2579
+ return this.sanitizer.bypassSecurityTrustStyle(value);
2580
+ case 'script':
2581
+ return this.sanitizer.bypassSecurityTrustScript(value);
2582
+ case 'url':
2583
+ return this.sanitizer.bypassSecurityTrustUrl(value);
2584
+ case 'resourceUrl':
2585
+ return this.sanitizer.bypassSecurityTrustResourceUrl(value);
2586
+ default:
2587
+ throw new Error(`Invalid safe type specified: ${type}`);
2588
+ }
2589
+ }
2590
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeSafeSanitizerPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
2591
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeSafeSanitizerPipe, isStandalone: false, name: "pipeSafeSanitizer" }); }
2592
+ }
2593
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeSafeSanitizerPipe, decorators: [{
2594
+ type: Pipe,
2595
+ args: [{
2596
+ name: 'pipeSafeSanitizer',
2597
+ standalone: false
2598
+ }]
2599
+ }], ctorParameters: () => [{ type: i1$4.DomSanitizer }] });
2600
+
2601
+ class PipeSafeSanitizerModule {
2602
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeSafeSanitizerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2603
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipeSafeSanitizerModule, declarations: [PipeSafeSanitizerPipe], imports: [CommonModule], exports: [PipeSafeSanitizerPipe] }); }
2604
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeSafeSanitizerModule, imports: [CommonModule] }); }
2605
+ }
2606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipeSafeSanitizerModule, decorators: [{
2607
+ type: NgModule,
2608
+ args: [{
2609
+ declarations: [PipeSafeSanitizerPipe],
2610
+ imports: [
2611
+ CommonModule,
2612
+ ],
2613
+ exports: [PipeSafeSanitizerPipe],
2614
+ }]
2615
+ }] });
2616
+
2617
+ class ExploreDetailResolve {
2618
+ constructor(http, configSvc, utilitySvc) {
2619
+ this.http = http;
2620
+ this.configSvc = configSvc;
2621
+ this.utilitySvc = utilitySvc;
2622
+ this.baseUrl = this.configSvc.sitePath;
2623
+ this.isIntranetAllowedSettings = false;
2624
+ }
2625
+ resolve(route, _state) {
2626
+ this.isIntranetAllowedSettings = this.configSvc.isIntranetAllowed;
2627
+ const tag = decodeURIComponent(route.params.tags);
2628
+ let url = '';
2629
+ if (route.data.pageUrl) {
2630
+ url = route.data.pageUrl;
2631
+ }
2632
+ if (route.data.pageType === 'page' && route.data.pageKey) {
2633
+ url = `${this.baseUrl}/page/${route.data.pageKey}.json`;
2634
+ }
2635
+ return this.http.get(url).pipe(map(pageData => ({ data: this.transformPageData(pageData, tag), error: null })), catchError(err => of({ data: null, error: err })));
2636
+ }
2637
+ transformPageData(pageData, tag) {
2638
+ const DELIMITER = '>';
2639
+ const path = tag.split(DELIMITER);
2640
+ pageData.pageLayout.widgetData.widgets = pageData.pageLayout.widgetData.widgets.map((widget) => {
2641
+ if (pageData.navigationBar && pageData.navigationBar.links) {
2642
+ pageData.navigationBar.links = pageData.navigationBar.links
2643
+ .filter((link) => link.widgetData.tags === tag);
2644
+ }
2645
+ if (widget.widgetSubType === 'cardBreadcrumb') {
2646
+ widget.widgetData.path = [{
2647
+ text: pageData.navigationBar.pageTitle,
2648
+ clickUrl: pageData.navigationBar.pageBackLink,
2649
+ }].concat(path.map((edge, idx) => ({
2650
+ text: edge,
2651
+ clickUrl: `/page/explore/${path.slice(0, idx + 1).join(DELIMITER)}`,
2652
+ })));
2653
+ }
2654
+ if (widget.widgetSubType === 'contentStripMultiple') {
2655
+ widget.widgetData.strips = widget.widgetData.strips.map((strip) => {
2656
+ strip.request.searchV6.filters[0].andFilters.push({ catalogPaths: [tag] });
2657
+ if (this.utilitySvc.isMobile && !this.isIntranetAllowedSettings) {
2658
+ strip.request.searchV6.filters[0].andFilters.push({ isInIntranet: ['false'] });
2659
+ }
2660
+ return strip;
2661
+ });
2662
+ if (widget.widgetData.noDataWidget && widget.widgetData.noDataWidget.widgetData.strips) {
2663
+ widget.widgetData.noDataWidget.widgetData.strips = widget.widgetData.noDataWidget.widgetData.strips.map((strip) => {
2664
+ strip.request.searchV6.filters[0].andFilters.push({ catalogPaths: [tag] });
2665
+ if (this.utilitySvc.isMobile && !this.isIntranetAllowedSettings) {
2666
+ strip.request.searchV6.filters[0].andFilters.push({ isInIntranet: ['false'] });
2667
+ }
2668
+ return strip;
2669
+ });
2670
+ }
2671
+ }
2672
+ return widget;
2673
+ });
2674
+ return pageData;
2675
+ }
2676
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ExploreDetailResolve, deps: [{ token: i1$3.HttpClient }, { token: ConfigurationsService }, { token: UtilityService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2677
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ExploreDetailResolve, providedIn: 'root' }); }
2678
+ }
2679
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ExploreDetailResolve, decorators: [{
2680
+ type: Injectable,
2681
+ args: [{
2682
+ providedIn: 'root',
2683
+ }]
2684
+ }], ctorParameters: () => [{ type: i1$3.HttpClient }, { type: ConfigurationsService }, { type: UtilityService }] });
2685
+
2686
+ class MarketingOfferingResolve {
2687
+ constructor(http) {
2688
+ this.http = http;
2689
+ }
2690
+ resolve(route, _state) {
2691
+ const tag = route.params.tag;
2692
+ return this.http.get(route.data.pageUrl).pipe(map(pageData => ({ data: this.transformPageData(pageData, tag), error: null })), catchError(err => of({ data: null, error: err })));
2693
+ }
2694
+ transformPageData(pageData, tag) {
2695
+ pageData.pageLayout.widgetData.widgets = pageData.pageLayout.widgetData.widgets.map((widget) => {
2696
+ if (widget.widgetSubType === 'contentStripMultiple') {
2697
+ widget.widgetData.strips = widget.widgetData.strips.map((strip) => {
2698
+ strip.request.search.filters.catalogPaths = [decodeURIComponent(tag)];
2699
+ return strip;
2700
+ });
2701
+ }
2702
+ return widget;
2703
+ });
2704
+ return pageData;
2705
+ }
2706
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MarketingOfferingResolve, deps: [{ token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
2707
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MarketingOfferingResolve, providedIn: 'root' }); }
2708
+ }
2709
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MarketingOfferingResolve, decorators: [{
2710
+ type: Injectable,
2711
+ args: [{
2712
+ providedIn: 'root',
2713
+ }]
2714
+ }], ctorParameters: () => [{ type: i1$3.HttpClient }] });
2715
+
2716
+ const JSON_MAP = {
2717
+ pagename: 'lexid',
2718
+ };
2719
+
2720
+ class PageResolve {
2721
+ constructor(configSvc, http, locale) {
2722
+ this.configSvc = configSvc;
2723
+ this.http = http;
2724
+ this.locale = locale;
2725
+ this.baseUrl = this.configSvc.sitePath;
2726
+ }
2727
+ resolve(route) {
2728
+ if (route.data.pageUrl) {
2729
+ return this.getData(route.data.pageUrl);
2730
+ }
2731
+ if (route.data.pageType === 'feature' && route.data.pageKey) {
2732
+ return this.getData(`${this.baseUrl}/feature/${route.data.pageKey}`);
2733
+ }
2734
+ if (route.data.pageType === 'page' &&
2735
+ route.data.pageKey &&
2736
+ route.paramMap.has(route.data.pageKey)) {
2737
+ return this.getData(`${this.baseUrl}/page/${route.paramMap.get(route.data.pageKey)}`);
2738
+ }
2739
+ if (route.data.pageType === 'page' &&
2740
+ route.data.pageKey &&
2741
+ route.data.pageKey === 'toc') {
2742
+ return this.getData(`${this.baseUrl}/page/${route.data.pageKey}`);
2743
+ }
2744
+ return {
2745
+ data: null,
2746
+ error: 'CONFIGURATION_ERROR_PAGE_URL_NOT_FORMED',
2747
+ };
2748
+ }
2749
+ setS3Cookie(contentId) {
2750
+ return this.http.post(`/apis/protected/v8/content/setCookie`, { contentId }).pipe(catchError(_err => of(true)));
2751
+ }
2752
+ getContent(id) {
2753
+ return this.http
2754
+ .post(`/apis/protected/v8/content/${id}?hierarchyType=minimal`, ['status', 'artifactUrl']);
2755
+ }
2756
+ getData(url) {
2757
+ const id = url.split('/').pop().split('.')[0] || '';
2758
+ const equivalentId = id.startsWith('lex_auth_') ? id : JSON_MAP[id];
2759
+ if (equivalentId) {
2760
+ return forkJoin([this.setS3Cookie(equivalentId), this.getContent(equivalentId)]).pipe(mergeMap(([_, v]) => {
2761
+ if (v.status === 'Expired' || v.status === 'Deleted' || !v.artifactUrl) {
2762
+ return of({ data: null, error: 'NoContent' });
2763
+ }
2764
+ return this.http
2765
+ .get(`${v.artifactUrl}?ts=${new Date().getTime()}`)
2766
+ .pipe(map(data => ({ data, error: null })), catchError(err => of({ data: null, error: err })));
2767
+ }), catchError(err => of({ data: null, error: err })));
2768
+ }
2769
+ const pageRequest = [
2770
+ (equivalentId ? this.setS3Cookie(equivalentId) : of(true)).pipe(mergeMap(() => this.http.get(`${url}.json`).pipe(map(data => ({ data, error: null })), catchError(err => of({ data: null, error: err }))))),
2771
+ this.locale === 'en' || this.locale === 'en-US' ?
2772
+ of({ data: undefined, error: null }) :
2773
+ this.http.get(`${url}.${this.locale}.json`).pipe(map(data => ({ data, error: null })), catchError(err => of({ data: null, error: err }))),
2774
+ ];
2775
+ return forkJoin(pageRequest).pipe(map(([general, withLocale]) => {
2776
+ if (withLocale.data) {
2777
+ return withLocale;
2778
+ }
2779
+ return general;
2780
+ }));
2781
+ }
2782
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PageResolve, deps: [{ token: ConfigurationsService }, { token: i1$3.HttpClient }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
2783
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PageResolve, providedIn: 'root' }); }
2784
+ }
2785
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PageResolve, decorators: [{
2786
+ type: Injectable,
2787
+ args: [{
2788
+ providedIn: 'root',
2789
+ }]
2790
+ }], ctorParameters: () => [{ type: ConfigurationsService }, { type: i1$3.HttpClient }, { type: undefined, decorators: [{
2791
+ type: Inject,
2792
+ args: [LOCALE_ID]
2793
+ }] }] });
2794
+
2795
+ // tslint:disable:no-console
2796
+ class LoggerService {
2797
+ constructor(configSvc) {
2798
+ this.configSvc = configSvc;
2799
+ this.consoleError = console.error;
2800
+ this.consoleInfo = console.info;
2801
+ this.consoleLog = console.log;
2802
+ this.consoleWarn = console.warn;
2803
+ this.noConsole = () => { };
2804
+ }
2805
+ get error() {
2806
+ return this.consoleError;
2807
+ }
2808
+ get info() {
2809
+ return this.configSvc.isProduction ? this.noConsole : this.consoleInfo;
2810
+ }
2811
+ get log() {
2812
+ return this.configSvc.isProduction ? this.noConsole : this.consoleLog;
2813
+ }
2814
+ get warn() {
2815
+ return this.configSvc.isProduction ? this.noConsole : this.consoleWarn;
2816
+ }
2817
+ removeConsoleAccess() {
2818
+ if (this.configSvc.isProduction) {
2819
+ return;
2820
+ }
2821
+ const noConsoleWithError = () => {
2822
+ throw new Error('Console Functions Usage Are Not Allowed.');
2823
+ };
2824
+ // console.log = noConsoleWithError
2825
+ console.warn = noConsoleWithError;
2826
+ console.info = noConsoleWithError;
2827
+ console.error = noConsoleWithError;
2828
+ }
2829
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LoggerService, deps: [{ token: ConfigurationsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2830
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LoggerService, providedIn: 'root' }); }
2831
+ }
2832
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LoggerService, decorators: [{
2833
+ type: Injectable,
2834
+ args: [{
2835
+ providedIn: 'root',
2836
+ }]
2837
+ }], ctorParameters: () => [{ type: ConfigurationsService }] });
2838
+
2839
+ // TODO: Use a url-search-polyfill if the site didnot work in IE 11
2840
+ const msTokenExpiryDuration = 600;
2841
+ const storageKey = 'msLoginRequested';
2842
+ const storage = localStorage;
2843
+ const API_ENDPOINTS = {
2844
+ sharePointToken: '/apis/protected/v8/user/token',
2845
+ };
2846
+ class AuthMicrosoftService {
2847
+ constructor(loggerSvc, http) {
2848
+ this.loggerSvc = loggerSvc;
2849
+ this.http = http;
2850
+ this.msConfig = {
2851
+ clientId: '',
2852
+ tenant: '',
2853
+ defaultEmailId: '',
2854
+ validEmailExtensions: [],
2855
+ isConfigured: false,
2856
+ };
2857
+ this.emailUsed = null;
2858
+ this.code = null;
2859
+ this.msToken = {
2860
+ accessToken: '',
2861
+ expiresOn: '',
2862
+ resource: '',
2863
+ tokenType: '',
2864
+ };
2865
+ }
2866
+ get isLogoutRequired() {
2867
+ return Boolean(this.msConfig.isConfigured && this.msConfig.clientId && this.emailUsed);
2868
+ }
2869
+ get loginUrl() {
2870
+ if (this.msConfig.isConfigured && this.msConfig.clientId) {
2871
+ const base = 'https://login.windows.net/common/oauth2/authorize';
2872
+ const searchParam = new URLSearchParams({
2873
+ response_type: 'code',
2874
+ client_id: this.msConfig.clientId,
2875
+ redirect_uri: window.location.href,
2876
+ });
2877
+ const fragment = location.search.substring(1);
2878
+ if (fragment) {
2879
+ return `${base}?${searchParam.toString()}#${fragment}`;
2880
+ }
2881
+ return `${base}?${searchParam.toString()}`;
2882
+ }
2883
+ return null;
2884
+ }
2885
+ logoutUrl(redirectUrl) {
2886
+ if (this.isValidEmail(this.emailUsed || '')) {
2887
+ return `https://login.microsoftonline.com/common/oauth2/logout?post_logout_redirect_uri=${redirectUrl}`;
2888
+ }
2889
+ return redirectUrl;
2890
+ }
2891
+ // Behavior Methods
2892
+ async init(config) {
2893
+ if (!config || !config.microsoft || !config.microsoft.isConfigured) {
2894
+ this.loggerSvc.warn('Empty/No Configuration passed, ignoring Microsoft Authentication');
2895
+ }
2896
+ this.msConfig = config.microsoft;
2897
+ const queryParams = new URLSearchParams(location.search);
2898
+ if (queryParams.has('code') && queryParams.has('session_state')) {
2899
+ this.code = queryParams.get('code');
2900
+ if (!this.code) {
2901
+ return;
2902
+ }
2903
+ let url = location.origin + location.pathname;
2904
+ await this.exchangeTokenForCode(this.code, url);
2905
+ if (location.hash) {
2906
+ url += location.hash.substring(1);
2907
+ }
2908
+ history.replaceState(null, '', url);
2909
+ }
2910
+ }
2911
+ async login(email) {
2912
+ if (!this.isValidEmail(email)) {
2913
+ this.loggerSvc.warn(`Microsoft Login is not allowed for your emailId (${email})`);
2914
+ return;
2915
+ }
2916
+ const loginUrl = this.loginUrl;
2917
+ if (loginUrl) {
2918
+ location.assign(loginUrl);
2919
+ }
2920
+ else {
2921
+ this.loggerSvc.warn('Unable to identify Office Login URL, Ignoring login request');
2922
+ }
2923
+ }
2924
+ async getToken(email) {
2925
+ if (this.msToken &&
2926
+ this.isValid(this.msToken.accessToken, this.msToken.expiresOn) &&
2927
+ this.msToken.accessToken) {
2928
+ return this.msToken.accessToken;
2929
+ }
2930
+ if (this.isValidEmail(email)) {
2931
+ try {
2932
+ this.msToken = await this.getTokenForEmail(email);
2933
+ if (this.msToken.accessToken) {
2934
+ this.emailUsed = email;
2935
+ return this.msToken.accessToken;
2936
+ }
2937
+ }
2938
+ catch (error) {
2939
+ if (!this.code) {
2940
+ this.login(email);
2941
+ }
2942
+ }
2943
+ }
2944
+ if (this.msConfig.defaultEmailId && this.isValidEmail(this.msConfig.defaultEmailId)) {
2945
+ try {
2946
+ this.msToken = await this.getTokenForEmail(this.msConfig.defaultEmailId);
2947
+ if (this.msToken.accessToken) {
2948
+ this.emailUsed = this.msConfig.defaultEmailId;
2949
+ return this.msToken.accessToken;
2950
+ }
2951
+ }
2952
+ catch (error) { }
2953
+ }
2954
+ throw new Error('UNABLE TO FETCH MS AUTH TOKEN');
2955
+ }
2956
+ loginForSSOEnabledEmbed(email) {
2957
+ if (!this.isValidEmail(email)) {
2958
+ this.loggerSvc.warn('SSO Login request Ignored. Invalid Email Id for SSO Enabled Content');
2959
+ }
2960
+ let msPrevTS = 0;
2961
+ try {
2962
+ msPrevTS = parseInt(storage.getItem(storageKey) || '0', 10);
2963
+ }
2964
+ catch (error) { }
2965
+ if (!msPrevTS || (msPrevTS && (Date.now() - msPrevTS) / 1000 > msTokenExpiryDuration)) {
2966
+ this.loggerSvc.info(`last login exceeded ${msTokenExpiryDuration} duration. Redirecting to O365 login`);
2967
+ storage.setItem(storageKey, Date.now().toString());
2968
+ this.login(email);
2969
+ }
2970
+ }
2971
+ isValidEmail(email) {
2972
+ return this.msConfig.validEmailExtensions.some(ext => email.endsWith(ext));
2973
+ }
2974
+ isValid(accessToken, expiresOn) {
2975
+ if (accessToken && expiresOn) {
2976
+ // TODO: Implement expiredOn and Date comparison based validity
2977
+ return true;
2978
+ }
2979
+ return false;
2980
+ }
2981
+ async exchangeTokenForCode(code, redirectUrl) {
2982
+ const response = await this.http
2983
+ .get(`${API_ENDPOINTS}?code=${code}&redirectUrl=${redirectUrl}`)
2984
+ .toPromise();
2985
+ return this.getInstanceFromResponse(response);
2986
+ }
2987
+ async getTokenForEmail(email) {
2988
+ const response = await this.http
2989
+ .get(`${API_ENDPOINTS.sharePointToken}?email=${email}`)
2990
+ .toPromise();
2991
+ return this.getInstanceFromResponse(response);
2992
+ }
2993
+ getInstanceFromResponse(token) {
2994
+ return {
2995
+ accessToken: token.accessToken,
2996
+ expiresOn: token.expiresOn,
2997
+ resource: token.resource,
2998
+ tokenType: token.tokenType,
2999
+ };
3000
+ }
3001
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthMicrosoftService, deps: [{ token: LoggerService }, { token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
3002
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthMicrosoftService, providedIn: 'root' }); }
3003
+ }
3004
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthMicrosoftService, decorators: [{
3005
+ type: Injectable,
3006
+ args: [{
3007
+ providedIn: 'root',
3008
+ }]
3009
+ }], ctorParameters: () => [{ type: LoggerService }, { type: i1$3.HttpClient }] });
3010
+
3011
+ var WsEvents;
3012
+ (function (WsEvents) {
3013
+ let WsEventType;
3014
+ (function (WsEventType) {
3015
+ WsEventType["Action"] = "Action";
3016
+ WsEventType["Telemetry"] = "Telemetry";
3017
+ WsEventType["PageNavigation"] = "PageNavigation";
3018
+ WsEventType["AccessRestrictedContentAccessed"] = "AccessRestrictedContentAccessed";
3019
+ WsEventType["PageSlow"] = "PageSlow";
3020
+ WsEventType["ErrorOccurred"] = "ErrorOccurred";
3021
+ WsEventType["WidgetResolveError"] = "WidgetResolveError";
3022
+ })(WsEventType = WsEvents.WsEventType || (WsEvents.WsEventType = {}));
3023
+ let WsEventLogLevel;
3024
+ (function (WsEventLogLevel) {
3025
+ WsEventLogLevel["Warn"] = "Warn";
3026
+ WsEventLogLevel["Error"] = "Error";
3027
+ WsEventLogLevel["Info"] = "Info";
3028
+ WsEventLogLevel["Log"] = "Log";
3029
+ WsEventLogLevel["Trace"] = "Trace";
3030
+ })(WsEventLogLevel = WsEvents.WsEventLogLevel || (WsEvents.WsEventLogLevel = {}));
3031
+ let WsAuditTypes;
3032
+ (function (WsAuditTypes) {
3033
+ WsAuditTypes["Created"] = "Created";
3034
+ WsAuditTypes["Updated"] = "Updated";
3035
+ WsAuditTypes["Deleted"] = "Deleted";
3036
+ })(WsAuditTypes = WsEvents.WsAuditTypes || (WsEvents.WsAuditTypes = {}));
3037
+ let WsTimeSpentType;
3038
+ (function (WsTimeSpentType) {
3039
+ WsTimeSpentType["Page"] = "Page";
3040
+ WsTimeSpentType["Player"] = "Player";
3041
+ })(WsTimeSpentType = WsEvents.WsTimeSpentType || (WsEvents.WsTimeSpentType = {}));
3042
+ let WsTimeSpentMode;
3043
+ (function (WsTimeSpentMode) {
3044
+ WsTimeSpentMode["Play"] = "Play";
3045
+ WsTimeSpentMode["View"] = "View";
3046
+ })(WsTimeSpentMode = WsEvents.WsTimeSpentMode || (WsEvents.WsTimeSpentMode = {}));
3047
+ let externalTelemetrypdata;
3048
+ (function (externalTelemetrypdata) {
3049
+ externalTelemetrypdata["RBCP"] = "rbcp-web-ui";
3050
+ })(externalTelemetrypdata = WsEvents.externalTelemetrypdata || (WsEvents.externalTelemetrypdata = {}));
3051
+ let EnumTelemetrySubType;
3052
+ (function (EnumTelemetrySubType) {
3053
+ EnumTelemetrySubType["Init"] = "Init";
3054
+ EnumTelemetrySubType["Interact"] = "Interact";
3055
+ EnumTelemetrySubType["Loaded"] = "Loaded";
3056
+ EnumTelemetrySubType["Unloaded"] = "Unloaded";
3057
+ EnumTelemetrySubType["StateChange"] = "StateChange";
3058
+ EnumTelemetrySubType["HeartBeat"] = "HeartBeat";
3059
+ EnumTelemetrySubType["Search"] = "Search";
3060
+ EnumTelemetrySubType["Feedback"] = "Feedback";
3061
+ EnumTelemetrySubType["Impression"] = "Impression";
3062
+ })(EnumTelemetrySubType = WsEvents.EnumTelemetrySubType || (WsEvents.EnumTelemetrySubType = {}));
3063
+ // PDF Telemetry Event
3064
+ let EnumTelemetryPdfActivity;
3065
+ (function (EnumTelemetryPdfActivity) {
3066
+ EnumTelemetryPdfActivity["PAGE_CHANGED"] = "PAGE_CHANGED";
3067
+ EnumTelemetryPdfActivity["FULLSCREEN_ACTIVATED"] = "FULLSCREEN_ACTIVATED";
3068
+ EnumTelemetryPdfActivity["FULLSCREEN_DEACTIVATED"] = "FULLSCREEN_DEACTIVATED";
3069
+ EnumTelemetryPdfActivity["ZOOM_CHANGE"] = "ZOOM_CHANGE";
3070
+ EnumTelemetryPdfActivity["NONE"] = "NONE";
3071
+ })(EnumTelemetryPdfActivity = WsEvents.EnumTelemetryPdfActivity || (WsEvents.EnumTelemetryPdfActivity = {}));
3072
+ // Multimedia Telemetry Data
3073
+ let EnumTelemetryMediaActivity;
3074
+ (function (EnumTelemetryMediaActivity) {
3075
+ EnumTelemetryMediaActivity["PLAYED"] = "PLAYED";
3076
+ EnumTelemetryMediaActivity["PAUSED"] = "PAUSED";
3077
+ EnumTelemetryMediaActivity["SEEKED"] = "SEEKED";
3078
+ EnumTelemetryMediaActivity["ENDED"] = "ENDED";
3079
+ EnumTelemetryMediaActivity["VOLUME_CHANGE"] = "VOLUME_CHANGE";
3080
+ EnumTelemetryMediaActivity["MUTE"] = "MUTE";
3081
+ EnumTelemetryMediaActivity["UNMUTE"] = "UNMUTE";
3082
+ EnumTelemetryMediaActivity["PLAYBACK_SPEED_CHANGE"] = "PLAYBACK_SPEED_CHANGE";
3083
+ EnumTelemetryMediaActivity["FULLSCREEN_ACTIVATED"] = "FULLSCREEN_ACTIVATED";
3084
+ EnumTelemetryMediaActivity["FULLSCREEN_DEACTIVATED"] = "FULLSCREEN_DEACTIVATED";
3085
+ EnumTelemetryMediaActivity["PICTURE_IN_PICTURE_ACTIVATED"] = "PICTURE_IN_PICTURE_ACTIVATED";
3086
+ EnumTelemetryMediaActivity["PICTURE_IN_PICTURE_DEACTIVATED"] = "PICTURE_IN_PICTURE_DEACTIVATED";
3087
+ EnumTelemetryMediaActivity["NONE"] = "NONE";
3088
+ })(EnumTelemetryMediaActivity = WsEvents.EnumTelemetryMediaActivity || (WsEvents.EnumTelemetryMediaActivity = {}));
3089
+ let EnumTelemetryMediaState;
3090
+ (function (EnumTelemetryMediaState) {
3091
+ EnumTelemetryMediaState["PLAYING"] = "PLAYING";
3092
+ EnumTelemetryMediaState["PAUSED"] = "PAUSED";
3093
+ EnumTelemetryMediaState["ENDED"] = "ENDED";
3094
+ EnumTelemetryMediaState["BUFFERING"] = "BUFFERING";
3095
+ EnumTelemetryMediaState["NOT_STARTED"] = "NOT_STARTED";
3096
+ })(EnumTelemetryMediaState = WsEvents.EnumTelemetryMediaState || (WsEvents.EnumTelemetryMediaState = {}));
3097
+ let EnumTelemetrymodules;
3098
+ (function (EnumTelemetrymodules) {
3099
+ EnumTelemetrymodules["CONTENT"] = "content";
3100
+ EnumTelemetrymodules["FEEDBACK"] = "feedback";
3101
+ EnumTelemetrymodules["COURSE"] = "course";
3102
+ EnumTelemetrymodules["PROGRAM"] = "program";
3103
+ EnumTelemetrymodules["EXPLORE"] = "explore";
3104
+ EnumTelemetrymodules["LEARN"] = "learn";
3105
+ EnumTelemetrymodules["HOME"] = "home";
3106
+ EnumTelemetrymodules["DASHBOARD"] = "dashboard";
3107
+ EnumTelemetrymodules["SEARCH"] = "search";
3108
+ EnumTelemetrymodules["DISCUSS"] = "discuss";
3109
+ EnumTelemetrymodules["COMPETENCY"] = "competency";
3110
+ EnumTelemetrymodules["EVENTS"] = "events";
3111
+ EnumTelemetrymodules["CAREER"] = "career";
3112
+ EnumTelemetrymodules["PROFILE"] = "profile";
3113
+ EnumTelemetrymodules["NETWORK"] = "network";
3114
+ EnumTelemetrymodules["SUPPORT"] = "support";
3115
+ })(EnumTelemetrymodules = WsEvents.EnumTelemetrymodules || (WsEvents.EnumTelemetrymodules = {}));
3116
+ let EnumInteractTypes;
3117
+ (function (EnumInteractTypes) {
3118
+ EnumInteractTypes["CLICK"] = "click";
3119
+ })(EnumInteractTypes = WsEvents.EnumInteractTypes || (WsEvents.EnumInteractTypes = {}));
3120
+ let EnumInteractSubTypes;
3121
+ (function (EnumInteractSubTypes) {
3122
+ EnumInteractSubTypes["COURSE_TAB"] = "course-tab";
3123
+ EnumInteractSubTypes["CAREER_TAB"] = "career-tab";
3124
+ EnumInteractSubTypes["NETWORK_TAB"] = "network-tab";
3125
+ EnumInteractSubTypes["COMPETENCY_TAB"] = "competency-tab";
3126
+ EnumInteractSubTypes["PROFILE_EDIT_TAB"] = "profile-edit-tab";
3127
+ EnumInteractSubTypes["DISCUSS_TAB"] = "discuss-tab";
3128
+ EnumInteractSubTypes["EVENTS_TAB"] = "events-tab";
3129
+ EnumInteractSubTypes["SIDE_MENU"] = "side-menu";
3130
+ EnumInteractSubTypes["HOME_PAGE_STRIP_TABS"] = "home-page-strip-tabs";
3131
+ })(EnumInteractSubTypes = WsEvents.EnumInteractSubTypes || (WsEvents.EnumInteractSubTypes = {}));
3132
+ })(WsEvents || (WsEvents = {}));
3133
+
3134
+ class EventService {
3135
+ constructor(utilitySvc, environment) {
3136
+ this.utilitySvc = utilitySvc;
3137
+ this.todaysEvents = [];
3138
+ this.eventsSubject = new Subject();
3139
+ this.events$ = this.eventsSubject.asObservable();
3140
+ this.eventsChatbotSubject = new Subject();
3141
+ this.chatbotEvents$ = this.eventsChatbotSubject.asObservable();
3142
+ this.eventsGetStartSubject = new Subject();
3143
+ this.getStartEvents$ = this.eventsGetStartSubject.asObservable();
3144
+ this.eventsPRSubject = new Subject();
3145
+ this.getPREvents$ = this.eventsPRSubject.asObservable();
3146
+ this.environment = environment;
3147
+ // this.focusChangeEventListener()
3148
+ }
3149
+ dispatchEvent(event) {
3150
+ event.pageContext = this.getContext(event.pageContext);
3151
+ this.eventsSubject.next(event);
3152
+ }
3153
+ dispatchChatbotEvent(event) {
3154
+ this.eventsChatbotSubject.next(event);
3155
+ }
3156
+ dispatchGetStartedEvent(event) {
3157
+ this.eventsGetStartSubject.next(event);
3158
+ }
3159
+ dispatchPlatformRatingEvent(event) {
3160
+ this.eventsPRSubject.next(event);
3161
+ }
3162
+ // helper functions
3163
+ raiseInteractTelemetry(edata, object, pageContext) {
3164
+ this.dispatchEvent({
3165
+ eventType: WsEvents.WsEventType.Telemetry,
3166
+ eventLogLevel: WsEvents.WsEventLogLevel.Info,
3167
+ data: {
3168
+ edata,
3169
+ object,
3170
+ pageContext: this.getContext(pageContext),
3171
+ eventSubType: WsEvents.EnumTelemetrySubType.Interact,
3172
+ },
3173
+ from: '',
3174
+ to: 'Telemetry',
3175
+ });
3176
+ }
3177
+ raiseFeedbackTelemetry(edata, object, from) {
3178
+ this.dispatchEvent({
3179
+ eventType: WsEvents.WsEventType.Telemetry,
3180
+ eventLogLevel: WsEvents.WsEventLogLevel.Info,
3181
+ data: {
3182
+ edata,
3183
+ object,
3184
+ eventSubType: WsEvents.EnumTelemetrySubType.Feedback,
3185
+ },
3186
+ from: from || '',
3187
+ to: 'Telemetry',
3188
+ });
3189
+ }
3190
+ // Raise custom impression events eg:on tab change
3191
+ raiseCustomImpression(object, pageContext) {
3192
+ this.dispatchEvent({
3193
+ eventType: WsEvents.WsEventType.Telemetry,
3194
+ eventLogLevel: WsEvents.WsEventLogLevel.Info,
3195
+ data: {
3196
+ object,
3197
+ pageContext: this.getContext(pageContext),
3198
+ eventSubType: WsEvents.EnumTelemetrySubType.Impression,
3199
+ },
3200
+ from: '',
3201
+ to: 'Telemetry',
3202
+ });
3203
+ }
3204
+ // private focusChangeEventListener() {
3205
+ // fromEvent(window, 'focus').subscribe(() => {
3206
+ // this.raiseInteractTelemetry('focus', 'gained', {})
3207
+ // })
3208
+ // fromEvent(window, 'blur').subscribe(() => {
3209
+ // this.raiseInteractTelemetry('focus', 'lost', {})
3210
+ // })
3211
+ // }
3212
+ // Method to get the context information about the telemetry interact event
3213
+ getContext(pageContext) {
3214
+ const routeDataContext = this.utilitySvc.routeData;
3215
+ // initialize with the route data configuration - current route's pageID & module
3216
+ const finalContext = {
3217
+ pageId: routeDataContext.pageId,
3218
+ module: routeDataContext.module,
3219
+ };
3220
+ if (pageContext) {
3221
+ // if context has pageIdExt, append it to the route's pageId
3222
+ if (pageContext.pageIdExt) {
3223
+ finalContext.pageId = `${routeDataContext.pageId}_${pageContext.pageIdExt}`;
3224
+ }
3225
+ else if (pageContext.pageId) {
3226
+ // else context has pageId, override it to the final pageID
3227
+ finalContext.pageId = pageContext.pageId;
3228
+ }
3229
+ // if context has module, override it to the final module
3230
+ if (pageContext.module) {
3231
+ finalContext.module = pageContext.module;
3232
+ }
3233
+ }
3234
+ return finalContext;
3235
+ }
3236
+ handleTabTelemetry(subType, data, object) {
3237
+ // raise a tab click interact event
3238
+ this.raiseInteractTelemetry({
3239
+ subType,
3240
+ type: WsEvents.EnumInteractTypes.CLICK,
3241
+ id: `${_.camelCase(data.label)}-tab`,
3242
+ }, {
3243
+ // context: {
3244
+ // position: data.index,
3245
+ // },
3246
+ ...object
3247
+ }, {
3248
+ pageIdExt: `${_.camelCase(data.label)}-tab`,
3249
+ });
3250
+ // raise a tab click impression event
3251
+ this.raiseCustomImpression({
3252
+ context: {
3253
+ position: data.index,
3254
+ },
3255
+ ...object
3256
+ }, {
3257
+ pageIdExt: `${_.camelCase(data.label)}-tab`,
3258
+ });
3259
+ }
3260
+ getPublicUrl(url) {
3261
+ const mainUrl = url.split('/content').pop() || '';
3262
+ return `${this.environment.contentHost}/${this.environment.contentBucket}/content${mainUrl}`;
3263
+ }
3264
+ allEventDateFormat(datetime) {
3265
+ const date = new Date(datetime).getDate();
3266
+ const year = new Date(datetime).getFullYear();
3267
+ const month = new Date(datetime).getMonth();
3268
+ const hours = new Date(datetime).getHours();
3269
+ const minutes = new Date(datetime).getMinutes();
3270
+ const seconds = new Date(datetime).getSeconds();
3271
+ const formatedDate = new Date(year, month, date, hours, minutes, seconds, 0);
3272
+ // let format = 'YYYY-MM-DD hh:mm a'
3273
+ // if (!timeAllow) {
3274
+ const format = 'YYYY-MM-DD';
3275
+ // }
3276
+ const readableDateMonth = moment(formatedDate).format(format);
3277
+ const finalDateTimeValue = `${readableDateMonth}`;
3278
+ return finalDateTimeValue;
3279
+ }
3280
+ compareDate(startDate) {
3281
+ const now = new Date();
3282
+ // tslint:disable-next-line:prefer-template
3283
+ const day = ('0' + (new Date().getDate())).slice(-2);
3284
+ const year = new Date().getFullYear();
3285
+ // tslint:disable-next-line:prefer-template
3286
+ const month = ('0' + (now.getMonth() + 1)).slice(-2);
3287
+ const todaysdate = `${year}-${month}-${day}`;
3288
+ if (startDate === todaysdate) {
3289
+ return true;
3290
+ }
3291
+ return false;
3292
+ }
3293
+ customDateFormat(date, time) {
3294
+ const stime = time.split('+')[0];
3295
+ const hour = stime.substr(0, 2);
3296
+ const min = stime.substr(2, 3);
3297
+ return `${date} ${hour}${min}`;
3298
+ }
3299
+ setEventListData(eventObj) {
3300
+ if (eventObj !== undefined) {
3301
+ this.todaysEvents = [];
3302
+ const data = eventObj;
3303
+ // console.log('strip comp', data)
3304
+ Object.keys(data).forEach((index) => {
3305
+ const obj = data[index];
3306
+ const floor = Math.floor;
3307
+ const hours = floor(obj.duration / 60);
3308
+ const minutes = obj.duration % 60;
3309
+ const duration = (hours === 0) ? ((minutes === 0) ? '---' : `${minutes} minutes`) : (minutes === 0) ? (hours === 1) ?
3310
+ `${hours} hour` : `${hours} hours` : (hours === 1) ? `${hours} hour ${minutes} minutes` :
3311
+ `${hours} hours ${minutes} minutes`;
3312
+ const creatordata = obj.creatorDetails !== undefined ? obj.creatorDetails : [];
3313
+ const str = creatordata && creatordata.length > 0 ? creatordata.replace(/\\/g, '') : [];
3314
+ const creatorDetails = str && str.length > 0 ? JSON.parse(str) : creatordata;
3315
+ const stime = obj.startTime.split('+')[0];
3316
+ const hour = stime.substr(0, 2);
3317
+ const min = stime.substr(2, 3);
3318
+ const starttime = `${hour}${min}`;
3319
+ const etime = obj.endTime.split('+')[0];
3320
+ const ehour = etime.substr(0, 2);
3321
+ const emin = etime.substr(2, 3);
3322
+ const endtime = `${ehour}${emin}`;
3323
+ const eventDataObj = {
3324
+ event: obj,
3325
+ eventName: obj.name,
3326
+ eventStartTime: starttime,
3327
+ eventEndTime: endtime,
3328
+ eventStartDate: obj.startDate,
3329
+ eventCreatedOn: this.allEventDateFormat(obj.createdOn),
3330
+ eventDuration: duration,
3331
+ eventjoined: creatorDetails.length,
3332
+ eventThumbnail: obj.appIcon && (obj.appIcon !== null || obj.appIcon !== undefined) ?
3333
+ this.getPublicUrl(obj.appIcon) :
3334
+ '/assets/icons/Events_default.png',
3335
+ pastevent: false,
3336
+ };
3337
+ const isToday = this.compareDate(obj.startDate);
3338
+ if (isToday) {
3339
+ this.todaysEvents.push(eventDataObj);
3340
+ }
3341
+ });
3342
+ }
3343
+ }
3344
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EventService, deps: [{ token: UtilityService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
3345
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EventService, providedIn: 'root' }); }
3346
+ }
3347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EventService, decorators: [{
3348
+ type: Injectable,
3349
+ args: [{
3350
+ providedIn: 'root',
3351
+ }]
3352
+ }], ctorParameters: () => [{ type: UtilityService }, { type: undefined, decorators: [{
3353
+ type: Inject,
3354
+ args: ['environment']
3355
+ }] }] });
3356
+
3357
+ // TODO: move this in some common place
3358
+ const PROTECTED_SLAG_V8 = '/apis/protected/v8';
3359
+ const API_END_POINTS = {
3360
+ CONTENT: `${PROTECTED_SLAG_V8}/content`,
3361
+ AUTHORING_CONTENT: `/apis/authApi/hierarchy`,
3362
+ CONTENT_LIKES: `${PROTECTED_SLAG_V8}/content/likeCount`,
3363
+ SET_S3_COOKIE: `${PROTECTED_SLAG_V8}/content/setCookie`,
3364
+ SET_S3_IMAGE_COOKIE: `${PROTECTED_SLAG_V8}/content/setImageCookie`,
3365
+ FETCH_MANIFEST: `${PROTECTED_SLAG_V8}/content/getWebModuleManifest`,
3366
+ FETCH_WEB_MODULE_FILES: `${PROTECTED_SLAG_V8}/content/getWebModuleFiles`,
3367
+ MULTIPLE_CONTENT: `${PROTECTED_SLAG_V8}/content/multiple`,
3368
+ CONTENT_SEARCH_V5: `${PROTECTED_SLAG_V8}/content/searchV5`,
3369
+ CONTENT_SEARCH_V6: `${PROTECTED_SLAG_V8}/content/searchV6`,
3370
+ CONTENT_SEARCH_REGION_RECOMMENDATION: `${PROTECTED_SLAG_V8}/content/searchRegionRecommendation`,
3371
+ CONTENT_HISTORY: `${PROTECTED_SLAG_V8}/user/history`,
3372
+ USER_CONTINUE_LEARNING: `${PROTECTED_SLAG_V8}/user/history/continue`,
3373
+ CONTENT_RATING: `${PROTECTED_SLAG_V8}/user/rating`,
3374
+ CONTENT_RATING_V2: `${PROTECTED_SLAG_V8}/user/rating/content/average-ratingInfo`,
3375
+ COLLECTION_HIERARCHY: (type, id) => `${PROTECTED_SLAG_V8}/content/collection/${type}/${id}`,
3376
+ REGISTRATION_STATUS: `${PROTECTED_SLAG_V8}/admin/userRegistration/checkUserRegistrationContent`,
3377
+ MARK_AS_COMPLETE_META: (contentId) => `${PROTECTED_SLAG_V8}/user/progress/${contentId}`,
3378
+ };
3379
+ class WidgetContentService {
3380
+ constructor(http, configSvc) {
3381
+ this.http = http;
3382
+ this.configSvc = configSvc;
3383
+ }
3384
+ fetchMarkAsCompleteMeta(identifier) {
3385
+ const url = API_END_POINTS.MARK_AS_COMPLETE_META(identifier);
3386
+ return this.http.get(url).toPromise();
3387
+ }
3388
+ fetchContent(contentId, hierarchyType = 'detail', additionalFields = []) {
3389
+ const url = `${API_END_POINTS.CONTENT}/${contentId}?hierarchyType=${hierarchyType}`;
3390
+ return this.http
3391
+ .post(url, { additionalFields })
3392
+ .pipe(retry(1));
3393
+ }
3394
+ fetchAuthoringContent(contentId) {
3395
+ const url = `${API_END_POINTS.AUTHORING_CONTENT}/${contentId}`;
3396
+ return this.http.get(url).pipe(retry(1));
3397
+ }
3398
+ fetchMultipleContent(ids) {
3399
+ return this.http.get(`${API_END_POINTS.MULTIPLE_CONTENT}/${ids.join(',')}`);
3400
+ }
3401
+ fetchCollectionHierarchy(type, id, pageNumber = 0, pageSize = 1) {
3402
+ return this.http.get(`${API_END_POINTS.COLLECTION_HIERARCHY(type, id)}?pageNumber=${pageNumber}&pageSize=${pageSize}`);
3403
+ }
3404
+ fetchContentLikes(contentIds) {
3405
+ return this.http
3406
+ .post(API_END_POINTS.CONTENT_LIKES, contentIds)
3407
+ .toPromise();
3408
+ }
3409
+ fetchContentRatings(contentIds) {
3410
+ return this.http
3411
+ .post(`${API_END_POINTS.CONTENT_RATING}/rating`, contentIds)
3412
+ .toPromise();
3413
+ }
3414
+ fetchContentRatingsV2(contentId) {
3415
+ return this.http
3416
+ .get(`${API_END_POINTS.CONTENT_RATING_V2}/${contentId}`);
3417
+ }
3418
+ fetchContentHistory(contentId) {
3419
+ return this.http.get(`${API_END_POINTS.CONTENT_HISTORY}/${contentId}`);
3420
+ }
3421
+ async continueLearning(id, collectionId, collectionType) {
3422
+ return new Promise(async (resolve) => {
3423
+ if (collectionType &&
3424
+ collectionType.toLowerCase() === 'playlist') {
3425
+ const reqBody = {
3426
+ contextPathId: collectionId ? collectionId : id,
3427
+ resourceId: id,
3428
+ data: JSON.stringify({
3429
+ timestamp: Date.now(),
3430
+ contextFullPath: [collectionId, id],
3431
+ }),
3432
+ dateAccessed: Date.now(),
3433
+ contextType: 'playlist',
3434
+ };
3435
+ await this.saveContinueLearning(reqBody).toPromise().catch().finally(() => {
3436
+ resolve(true);
3437
+ });
3438
+ }
3439
+ else {
3440
+ const reqBody = {
3441
+ contextPathId: collectionId ? collectionId : id,
3442
+ resourceId: id,
3443
+ data: JSON.stringify({ timestamp: Date.now() }),
3444
+ dateAccessed: Date.now(),
3445
+ };
3446
+ await this.saveContinueLearning(reqBody).toPromise().catch().finally(() => {
3447
+ resolve(true);
3448
+ });
3449
+ }
3450
+ });
3451
+ }
3452
+ saveContinueLearning(content) {
3453
+ const url = API_END_POINTS.USER_CONTINUE_LEARNING;
3454
+ return this.http.post(url, content);
3455
+ }
3456
+ setS3Cookie(contentId) {
3457
+ return this.http
3458
+ .post(API_END_POINTS.SET_S3_COOKIE, { contentId })
3459
+ .pipe(catchError(_err => of(true)));
3460
+ }
3461
+ setS3ImageCookie() {
3462
+ return this.http.post(API_END_POINTS.SET_S3_IMAGE_COOKIE, {}).pipe(catchError(_err => of(true)));
3463
+ }
3464
+ fetchManifest(url) {
3465
+ return this.http.post(API_END_POINTS.FETCH_MANIFEST, { url });
3466
+ }
3467
+ fetchWebModuleContent(url) {
3468
+ return this.http.get(`${API_END_POINTS.FETCH_WEB_MODULE_FILES}?url=${encodeURIComponent(url)}`);
3469
+ }
3470
+ search(req) {
3471
+ req.query = req.query || '';
3472
+ return this.http.post(API_END_POINTS.CONTENT_SEARCH_V5, {
3473
+ request: req,
3474
+ });
3475
+ }
3476
+ searchRegionRecommendation(req) {
3477
+ req.query = req.query || '';
3478
+ req.preLabelValue =
3479
+ (req.preLabelValue || '') +
3480
+ ((this.configSvc.userProfile && this.configSvc.userProfile.country) || '');
3481
+ req.filters = {
3482
+ ...req.filters,
3483
+ labels: [req.preLabelValue || ''],
3484
+ };
3485
+ return this.http.post(API_END_POINTS.CONTENT_SEARCH_REGION_RECOMMENDATION, { request: req });
3486
+ }
3487
+ searchV6(req) {
3488
+ req.query = req.query || '';
3489
+ return this.http.post(API_END_POINTS.CONTENT_SEARCH_V6, req);
3490
+ }
3491
+ fetchContentRating(contentId) {
3492
+ return this.http.get(`${API_END_POINTS.CONTENT_RATING}/${contentId}`);
3493
+ }
3494
+ deleteContentRating(contentId) {
3495
+ return this.http.delete(`${API_END_POINTS.CONTENT_RATING}/${contentId}`);
3496
+ }
3497
+ addContentRating(contentId, data) {
3498
+ return this.http.post(`${API_END_POINTS.CONTENT_RATING}/${contentId}`, data);
3499
+ }
3500
+ getFirstChildInHierarchy(content) {
3501
+ if (!(content.children || []).length) {
3502
+ return content;
3503
+ }
3504
+ if (content.contentType === 'Learning Path' &&
3505
+ !(content.artifactUrl && content.artifactUrl.length)) {
3506
+ const child = content.children[0];
3507
+ return this.getFirstChildInHierarchy(child);
3508
+ }
3509
+ if (content.contentType === 'Resource' ||
3510
+ content.contentType === 'Knowledge Artifact' ||
3511
+ content.contentType === 'Learning Path') {
3512
+ return content;
3513
+ }
3514
+ const firstChild = content.children[0];
3515
+ const resultContent = this.getFirstChildInHierarchy(firstChild);
3516
+ return resultContent;
3517
+ }
3518
+ getRegistrationStatus(source) {
3519
+ return this.http.get(`${API_END_POINTS.REGISTRATION_STATUS}/${source}`).toPromise();
3520
+ }
3521
+ fetchConfig(url) {
3522
+ return this.http.get(url);
3523
+ }
3524
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WidgetContentService, deps: [{ token: i1$3.HttpClient }, { token: ConfigurationsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3525
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WidgetContentService, providedIn: 'root' }); }
3526
+ }
3527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WidgetContentService, decorators: [{
3528
+ type: Injectable,
3529
+ args: [{
3530
+ providedIn: 'root',
3531
+ }]
3532
+ }], ctorParameters: () => [{ type: i1$3.HttpClient }, { type: ConfigurationsService }] });
3533
+
3534
+ class TelemetryService {
3535
+ constructor(environment, configSvc, eventsSvc,
3536
+ // private authSvc: AuthKeycloakService,
3537
+ logger) {
3538
+ this.configSvc = configSvc;
3539
+ this.eventsSvc = eventsSvc;
3540
+ this.logger = logger;
3541
+ this.previousUrl = null;
3542
+ this.telemetryConfig = null;
3543
+ this.pData = null;
3544
+ this.contextCdata = [];
3545
+ this.externalApps = {
3546
+ RBCP: 'rbcp-web-ui',
3547
+ };
3548
+ this.environment = environment;
3549
+ const instanceConfig = this.configSvc.instanceConfig;
3550
+ if (instanceConfig) {
3551
+ this.telemetryConfig = instanceConfig.telemetryConfig;
3552
+ this.telemetryConfig = {
3553
+ ...this.telemetryConfig,
3554
+ pdata: {
3555
+ ...this.telemetryConfig.pdata,
3556
+ // pid: navigator.userAgent,
3557
+ id: `${environment.name}.${this.telemetryConfig.pdata.id}`,
3558
+ },
3559
+ uid: this.configSvc.userProfile && this.configSvc.userProfile.userId,
3560
+ // authtoken: this.authSvc.token,
3561
+ // tslint:disable-next-line: no-non-null-assertion
3562
+ channel: this.rootOrgId || this.telemetryConfig.channel,
3563
+ sid: this.getTelemetrySessionId,
3564
+ };
3565
+ this.pData = this.telemetryConfig.pdata;
3566
+ this.addPlayerListener();
3567
+ this.addCustomEventListener();
3568
+ this.addInteractListener();
3569
+ this.addFeedbackListener();
3570
+ this.addTimeSpentListener();
3571
+ this.addSearchListener();
3572
+ this.addHearbeatListener();
3573
+ this.addCustomImpressionListener();
3574
+ }
3575
+ }
3576
+ get getTelemetrySessionId() {
3577
+ return localStorage.getItem('telemetrySessionId') || '';
3578
+ }
3579
+ get rootOrgId() {
3580
+ if (this.configSvc && this.configSvc.userProfile && this.configSvc.userProfile.rootOrgId) {
3581
+ return this.configSvc.userProfile.rootOrgId;
3582
+ }
3583
+ return '';
3584
+ }
3585
+ start(edata, data, pageContext) {
3586
+ try {
3587
+ if (this.telemetryConfig) {
3588
+ $t.start(this.telemetryConfig, (pageContext && pageContext.pageId) ?
3589
+ pageContext.pageId
3590
+ : '', '1.0', {
3591
+ // id,
3592
+ type: edata.type,
3593
+ mode: edata.mode,
3594
+ pageid: (pageContext && pageContext.pageId) ?
3595
+ pageContext.pageId
3596
+ : '',
3597
+ duration: 1,
3598
+ }, {
3599
+ context: {
3600
+ pdata: {
3601
+ ...this.pData,
3602
+ id: this.pData.id,
3603
+ },
3604
+ ...(pageContext && pageContext.module ? { env: pageContext.module } : null),
3605
+ },
3606
+ object: {
3607
+ ...(data) && data,
3608
+ },
3609
+ });
3610
+ }
3611
+ else {
3612
+ this.logger.error('Error Initializing Telemetry. Config missing.');
3613
+ }
3614
+ }
3615
+ catch (e) {
3616
+ // tslint:disable-next-line: no-console
3617
+ console.log('Error in telemetry start', e);
3618
+ }
3619
+ }
3620
+ end(edata, data, pageContext) {
3621
+ try {
3622
+ $t.end({
3623
+ type: edata.type,
3624
+ mode: edata.mode,
3625
+ pageid: (pageContext && pageContext.pageId) ?
3626
+ pageContext.pageId
3627
+ : '',
3628
+ }, {
3629
+ context: {
3630
+ pdata: {
3631
+ ...this.pData,
3632
+ id: this.pData.id,
3633
+ },
3634
+ ...(pageContext && pageContext.module ? { env: pageContext.module } : null),
3635
+ },
3636
+ object: {
3637
+ ...(data) && data,
3638
+ },
3639
+ });
3640
+ }
3641
+ catch (e) {
3642
+ // tslint:disable-next-line: no-console
3643
+ console.log('Error in telemetry end', e);
3644
+ }
3645
+ }
3646
+ audit(type, props, data) {
3647
+ try {
3648
+ $t.audit({
3649
+ type,
3650
+ props,
3651
+ // data,
3652
+ state: data, // Optional. Current State
3653
+ prevstate: '', // Optional. Previous State
3654
+ duration: '', // Optional.
3655
+ }, {
3656
+ context: {
3657
+ pdata: {
3658
+ ...this.pData,
3659
+ id: this.pData.id,
3660
+ },
3661
+ },
3662
+ });
3663
+ }
3664
+ catch (e) {
3665
+ // tslint:disable-next-line: no-console
3666
+ console.log('Error in telemetry audit', e);
3667
+ }
3668
+ }
3669
+ heartbeat(type, id) {
3670
+ try {
3671
+ $t.heartbeat({
3672
+ id,
3673
+ // mode,
3674
+ type,
3675
+ });
3676
+ }
3677
+ catch (e) {
3678
+ // tslint:disable-next-line: no-console
3679
+ console.log('Error in telemetry heartbeat', e);
3680
+ }
3681
+ }
3682
+ impression(data) {
3683
+ try {
3684
+ const page = this.getPageDetails();
3685
+ if (data && data.pageContext) {
3686
+ // page.pageid = data.pageContext.pageId
3687
+ page.module = data.pageContext.module;
3688
+ }
3689
+ const edata = {
3690
+ pageid: page.pageid, // Required. Unique page id
3691
+ type: page.pageUrlParts[0], // Required. Impression type (list, detail, view, edit, workflow, search)
3692
+ uri: page.pageUrl,
3693
+ };
3694
+ if (page.objectId) {
3695
+ const config = {
3696
+ context: {
3697
+ pdata: {
3698
+ ...this.pData,
3699
+ id: this.pData.id,
3700
+ },
3701
+ env: page.module || (this.telemetryConfig && this.telemetryConfig.env),
3702
+ },
3703
+ object: {
3704
+ id: page.objectId,
3705
+ // This will override above id if the data has object in it.
3706
+ ...((data) ? data.object : {}),
3707
+ },
3708
+ };
3709
+ $t.impression(edata, config);
3710
+ }
3711
+ else {
3712
+ $t.impression(edata, {
3713
+ context: {
3714
+ pdata: {
3715
+ ...this.pData,
3716
+ id: this.pData.id,
3717
+ },
3718
+ env: page.module || '',
3719
+ },
3720
+ object: {
3721
+ ...((data) ? data.object : {}),
3722
+ },
3723
+ });
3724
+ }
3725
+ this.previousUrl = page.pageUrl;
3726
+ }
3727
+ catch (e) {
3728
+ // tslint:disable-next-line: no-console
3729
+ console.log('Error in telemetry impression', e);
3730
+ }
3731
+ }
3732
+ externalImpression(impressionData) {
3733
+ try {
3734
+ const page = this.getPageDetails();
3735
+ if (this.externalApps[impressionData.subApplicationName]) {
3736
+ const externalConfig = page.objectId ? {
3737
+ context: {
3738
+ pdata: {
3739
+ ...this.pData,
3740
+ id: this.externalApps[impressionData.subApplicationName],
3741
+ },
3742
+ },
3743
+ object: {
3744
+ id: page.objectId,
3745
+ },
3746
+ } : {
3747
+ context: {
3748
+ pdata: {
3749
+ ...this.pData,
3750
+ id: this.externalApps[impressionData.subApplicationName],
3751
+ },
3752
+ },
3753
+ };
3754
+ $t.impression(impressionData.data, externalConfig);
3755
+ }
3756
+ }
3757
+ catch (e) {
3758
+ // tslint:disable-next-line: no-console
3759
+ console.log('Error in telemetry externalImpression', e);
3760
+ }
3761
+ }
3762
+ addCustomImpressionListener() {
3763
+ this.eventsSvc.events$
3764
+ .pipe(filter((event) => event &&
3765
+ event.data &&
3766
+ event.eventType === WsEvents.WsEventType.Telemetry &&
3767
+ event.data.eventSubType === WsEvents.EnumTelemetrySubType.Impression))
3768
+ .subscribe(event => {
3769
+ try {
3770
+ // console.log('event.data::', event.data)
3771
+ this.impression(event.data);
3772
+ }
3773
+ catch (e) {
3774
+ // tslint:disable-next-line: no-console
3775
+ console.log('Error in telemetry impression', e);
3776
+ }
3777
+ });
3778
+ }
3779
+ addTimeSpentListener() {
3780
+ this.eventsSvc.events$
3781
+ .pipe(filter(event => event &&
3782
+ event.eventType === WsEvents.WsEventType.Telemetry &&
3783
+ event.data.type === WsEvents.WsTimeSpentType.Page &&
3784
+ event.data.mode &&
3785
+ event.data))
3786
+ .subscribe(event => {
3787
+ if (event.data.state === WsEvents.EnumTelemetrySubType.Loaded) {
3788
+ this.start({
3789
+ type: event.data.type || WsEvents.WsTimeSpentType.Player,
3790
+ mode: event.data.mode || WsEvents.WsTimeSpentMode.Play,
3791
+ }, {}, event.pageContext);
3792
+ }
3793
+ if (event.data.state === WsEvents.EnumTelemetrySubType.Unloaded) {
3794
+ this.end({
3795
+ type: event.data.type || WsEvents.WsTimeSpentType.Player,
3796
+ mode: event.data.mode || WsEvents.WsTimeSpentMode.Play,
3797
+ }, {}, event.pageContext);
3798
+ }
3799
+ });
3800
+ }
3801
+ addCustomEventListener() {
3802
+ this.eventsSvc.events$
3803
+ .pipe(filter(event => event &&
3804
+ event.eventType === WsEvents.WsEventType.Telemetry))
3805
+ .subscribe(event => {
3806
+ if (event.data.state === WsEvents.EnumTelemetrySubType.Loaded &&
3807
+ event.data.type !== WsEvents.WsTimeSpentType.Player) {
3808
+ this.start({
3809
+ type: event.data.type,
3810
+ mode: event.data.mode || WsEvents.WsTimeSpentMode.Play,
3811
+ }, event.data.object, event.pageContext);
3812
+ }
3813
+ if (event.data.state === WsEvents.EnumTelemetrySubType.Unloaded &&
3814
+ event.data.type !== WsEvents.WsTimeSpentType.Player) {
3815
+ this.end({
3816
+ type: event.data.type || WsEvents.WsTimeSpentType.Player,
3817
+ mode: event.data.mode || WsEvents.WsTimeSpentMode.Play,
3818
+ }, event.data.object, event.pageContext);
3819
+ }
3820
+ });
3821
+ }
3822
+ addPlayerListener() {
3823
+ this.eventsSvc.events$
3824
+ .pipe(filter(event => event &&
3825
+ event.eventType === WsEvents.WsEventType.Telemetry &&
3826
+ event.data.type === WsEvents.WsTimeSpentType.Player &&
3827
+ event.data.mode &&
3828
+ event.data))
3829
+ .subscribe(event => {
3830
+ const content = event.data.content;
3831
+ if (event.data.state === WsEvents.EnumTelemetrySubType.Loaded &&
3832
+ (!content ||
3833
+ (content.isIframeSupported || '').toLowerCase() === 'maybe' ||
3834
+ (content.isIframeSupported || '').toLowerCase() === 'yes' ||
3835
+ (content.mimeType === 'application/pdf' || 'application/json'))) {
3836
+ this.start({
3837
+ type: event.data.type || WsEvents.WsTimeSpentType.Player,
3838
+ mode: event.data.mode || WsEvents.WsTimeSpentMode.Play,
3839
+ }, event.data.object, event.pageContext);
3840
+ }
3841
+ if (event.data.state === WsEvents.EnumTelemetrySubType.Unloaded &&
3842
+ (!content ||
3843
+ (content.isIframeSupported || '').toLowerCase() === 'maybe' ||
3844
+ (content.isIframeSupported || '').toLowerCase() === 'yes' ||
3845
+ (content.mimeType === 'application/pdf' || 'application/json'))) {
3846
+ this.end({
3847
+ type: event.data.type || WsEvents.WsTimeSpentType.Player,
3848
+ mode: event.data.mode || WsEvents.WsTimeSpentMode.Play,
3849
+ }, event.data.object, event.pageContext);
3850
+ }
3851
+ });
3852
+ }
3853
+ addInteractListener() {
3854
+ this.eventsSvc.events$
3855
+ .pipe(filter((event) => event &&
3856
+ event.data &&
3857
+ event.eventType === WsEvents.WsEventType.Telemetry &&
3858
+ event.data.eventSubType === WsEvents.EnumTelemetrySubType.Interact))
3859
+ .subscribe(event => {
3860
+ const page = this.getPageDetails();
3861
+ if (typeof event.from === 'string' && this.externalApps[event.from]) {
3862
+ const externalConfig = {
3863
+ context: {
3864
+ pdata: {
3865
+ ...this.pData,
3866
+ id: this.externalApps[event.from],
3867
+ },
3868
+ },
3869
+ };
3870
+ try {
3871
+ $t.interact(event.data, externalConfig);
3872
+ }
3873
+ catch (e) {
3874
+ // tslint:disable-next-line: no-console
3875
+ console.log('Error in telemetry interact', e);
3876
+ }
3877
+ }
3878
+ else {
3879
+ // let interactid
3880
+ // if (event.data.edata.type === 'goal') {
3881
+ // interactid = page.pageUrlParts[4]
3882
+ // }
3883
+ try {
3884
+ $t.interact({
3885
+ type: event.data.edata.type,
3886
+ subtype: event.data.edata.subType,
3887
+ // object: event.data.object,
3888
+ id: (event.data.edata && event.data.edata.id) ?
3889
+ event.data.edata.id
3890
+ : '',
3891
+ pageid: event.data.pageContext && event.data.pageContext.pageId || page.pageid,
3892
+ // target: { page },
3893
+ }, {
3894
+ context: {
3895
+ pdata: {
3896
+ ...this.pData,
3897
+ id: this.pData.id,
3898
+ },
3899
+ ...(event.data.pageContext && event.data.pageContext.module ? { env: event.data.pageContext.module } : null),
3900
+ },
3901
+ object: {
3902
+ ...event.data.object,
3903
+ },
3904
+ });
3905
+ }
3906
+ catch (e) {
3907
+ // tslint:disable-next-line: no-console
3908
+ console.log('Error in telemetry interact', e);
3909
+ }
3910
+ }
3911
+ });
3912
+ }
3913
+ addFeedbackListener() {
3914
+ this.eventsSvc.events$
3915
+ .pipe(filter((event) => event &&
3916
+ event.data &&
3917
+ event.eventType === WsEvents.WsEventType.Telemetry &&
3918
+ event.data.eventSubType === WsEvents.EnumTelemetrySubType.Feedback))
3919
+ .subscribe(event => {
3920
+ const page = this.getPageDetails();
3921
+ try {
3922
+ $t.feedback({
3923
+ rating: event.data.object.rating || 0,
3924
+ commentid: event.data.object.commentid || '',
3925
+ commenttxt: event.data.object.commenttxt || '',
3926
+ pageid: page.pageid,
3927
+ }, {
3928
+ context: {
3929
+ pdata: {
3930
+ ...this.pData,
3931
+ id: this.pData.id,
3932
+ },
3933
+ },
3934
+ object: {
3935
+ id: event.data.object.contentId || event.data.object.id || '',
3936
+ type: event.data.edata.type || '',
3937
+ ver: `${(event.data.object.version || '1')}${''}`,
3938
+ rollup: {},
3939
+ },
3940
+ });
3941
+ }
3942
+ catch (e) {
3943
+ // tslint:disable-next-line: no-console
3944
+ console.log('Error in telemetry interact', e);
3945
+ }
3946
+ });
3947
+ }
3948
+ addHearbeatListener() {
3949
+ this.eventsSvc.events$
3950
+ .pipe(filter((event) => event &&
3951
+ event.data &&
3952
+ event.eventType === WsEvents.WsEventType.Telemetry &&
3953
+ event.data.eventSubType === WsEvents.EnumTelemetrySubType.HeartBeat))
3954
+ .subscribe(event => {
3955
+ if (typeof event.from === 'string' && this.externalApps[event.from]) {
3956
+ const externalConfig = {
3957
+ context: {
3958
+ pdata: {
3959
+ ...this.pData,
3960
+ id: this.externalApps[event.from],
3961
+ },
3962
+ },
3963
+ };
3964
+ try {
3965
+ $t.heartbeat(event.data, externalConfig);
3966
+ }
3967
+ catch (e) {
3968
+ // tslint:disable-next-line: no-console
3969
+ console.log('Error in telemetry heartbeat', e);
3970
+ }
3971
+ }
3972
+ else {
3973
+ try {
3974
+ $t.heartbeat({
3975
+ type: event.data.type,
3976
+ // subtype: event.data.eventSubType,
3977
+ id: event.data.id,
3978
+ // mimeType: event.data.mimeType,
3979
+ // mode: event.data.mode,
3980
+ }, {
3981
+ context: {
3982
+ pdata: {
3983
+ ...this.pData,
3984
+ id: this.pData.id,
3985
+ },
3986
+ },
3987
+ });
3988
+ }
3989
+ catch (e) {
3990
+ // tslint:disable-next-line: no-console
3991
+ console.log('Error in telemetry heartbeat', e);
3992
+ }
3993
+ }
3994
+ });
3995
+ }
3996
+ addSearchListener() {
3997
+ this.eventsSvc.events$
3998
+ .pipe(filter((event) => event &&
3999
+ event.data &&
4000
+ event.eventType === WsEvents.WsEventType.Telemetry &&
4001
+ event.data.eventSubType === WsEvents.EnumTelemetrySubType.Search))
4002
+ .subscribe(event => {
4003
+ try {
4004
+ $t.search({
4005
+ query: event.data.query,
4006
+ filters: event.data.filters,
4007
+ size: event.data.size,
4008
+ }, {
4009
+ context: {
4010
+ pdata: {
4011
+ ...this.pData,
4012
+ id: this.pData.id,
4013
+ },
4014
+ },
4015
+ });
4016
+ }
4017
+ catch (e) {
4018
+ // tslint:disable-next-line: no-console
4019
+ console.log('Error in telemetry search', e);
4020
+ }
4021
+ });
4022
+ }
4023
+ getPageDetails() {
4024
+ const path = window.location.pathname.replace('/', '');
4025
+ const url = path + window.location.search;
4026
+ return {
4027
+ pageid: path,
4028
+ pageUrl: url,
4029
+ pageUrlParts: path.split('/'),
4030
+ refferUrl: this.previousUrl,
4031
+ objectId: this.extractContentIdFromUrlParts(path.split('/')),
4032
+ module: '',
4033
+ };
4034
+ }
4035
+ extractContentIdFromUrlParts(urlParts) {
4036
+ // TODO: pick toc and viewer url from some configuration
4037
+ const tocIdx = urlParts.indexOf('toc');
4038
+ const viewerIdx = urlParts.indexOf('viewer');
4039
+ if (tocIdx === -1 && viewerIdx === -1) {
4040
+ return null;
4041
+ }
4042
+ if (tocIdx !== -1 && tocIdx < urlParts.length - 1) {
4043
+ return urlParts[tocIdx + 1]; // e.g. url /app/toc/<content_id>
4044
+ }
4045
+ if (viewerIdx !== -1 && viewerIdx < urlParts.length - 2) {
4046
+ return urlParts[viewerIdx + 2]; // e.g. url /app/viewer/<content_type>/<content_id>
4047
+ }
4048
+ return null;
4049
+ }
4050
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TelemetryService, deps: [{ token: 'environment' }, { token: ConfigurationsService }, { token: EventService }, { token: LoggerService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4051
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TelemetryService, providedIn: 'root' }); }
4052
+ }
4053
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TelemetryService, decorators: [{
4054
+ type: Injectable,
4055
+ args: [{
4056
+ providedIn: 'root',
4057
+ }]
4058
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
4059
+ type: Inject,
4060
+ args: ['environment']
4061
+ }] }, { type: ConfigurationsService }, { type: EventService }, { type: LoggerService }] });
4062
+
4063
+ class SubapplicationRespondService {
4064
+ constructor(
4065
+ // private configSvc: ConfigurationsService,
4066
+ contentSvc,
4067
+ // private keyCloakSvc: AuthKeycloakService,
4068
+ // private activatedRoute: ActivatedRoute,
4069
+ // private router: Router,
4070
+ eventSvc, teleSvc) {
4071
+ this.contentSvc = contentSvc;
4072
+ this.eventSvc = eventSvc;
4073
+ this.teleSvc = teleSvc;
4074
+ this.subAppname = '';
4075
+ this.continueLearningData = null;
4076
+ this.loaded = false;
4077
+ // this.changeContextrespond()
4078
+ // this.configSvc.prefChangeNotifier.subscribe(() => {
4079
+ // this.changeContextrespond()
4080
+ // })
4081
+ }
4082
+ // loadedRespond(contentWindow: any, applicationName: string, id?: string) {
4083
+ // if (id && this.activatedRoute.snapshot.queryParams.viewMode && this.activatedRoute.snapshot.queryParams.viewMode === 'RESUME') {
4084
+ // this.continueLearningData = null
4085
+ // this.contentSvc.fetchContentHistory(id).subscribe(
4086
+ // data => {
4087
+ // this.continueLearningData = data.continueData
4088
+ // if (this.configSvc && this.configSvc.userProfile) {
4089
+ // const firstName = this.configSvc.userProfile.userName ?
4090
+ // this.configSvc.userProfile.userName.split(' ', 2)[0] : ''
4091
+ // const lastName = this.configSvc.userProfile.userName ?
4092
+ // this.configSvc.userProfile.userName.split(' ', 2)[1] : ''
4093
+ // const viewMode: string = this.activatedRoute.snapshot.queryParams.viewMode ?
4094
+ // this.activatedRoute.snapshot.queryParams.viewMode : ''
4095
+ // const token = this.keyCloakSvc.token
4096
+ // const response = {
4097
+ // subApplicationName: applicationName,
4098
+ // requestId: 'LOADED',
4099
+ // parentContext: {
4100
+ // domainName: window.location.host,
4101
+ // url: this.router.url,
4102
+ // rootOrg: this.configSvc.rootOrg,
4103
+ // theme: this.configSvc.activeThemeObject ? {
4104
+ // name: this.configSvc.activeThemeObject.themeName,
4105
+ // ...this.configSvc.activeThemeObject.color,
4106
+ // } : '',
4107
+ // fontSize: this.configSvc.activeFontObject ? this.configSvc.activeFontObject.baseFontSize : '14px',
4108
+ // locale: (this.configSvc.userPreference && this.configSvc.userPreference.selectedLocale) || 'en',
4109
+ // darkMode: this.configSvc.isDarkMode,
4110
+ // subApplicationStartMode: viewMode.toUpperCase(),
4111
+ // user: {
4112
+ // firstName,
4113
+ // lastName,
4114
+ // token,
4115
+ // userId: this.configSvc.userProfile.userId ? this.configSvc.userProfile.userId : '',
4116
+ // roles: this.configSvc.userRoles ? Array.from(this.configSvc.userRoles) : [],
4117
+ // },
4118
+ // heartbeatFrequency: '200',
4119
+ // },
4120
+ // data: this.continueLearningData.data ? {
4121
+ // continueLearning: this.continueLearningData.data,
4122
+ // } : null,
4123
+ // }
4124
+ // contentWindow.postMessage(response, '*')
4125
+ // this.contentWindowinfo = contentWindow
4126
+ // this.loaded = true
4127
+ // this.subAppname = applicationName
4128
+ // }
4129
+ // })
4130
+ // } else {
4131
+ // if (this.configSvc && this.configSvc.userProfile) {
4132
+ // const firstName = this.configSvc.userProfile.userName ?
4133
+ // this.configSvc.userProfile.userName.split(' ', 2)[0] : ''
4134
+ // const lastName = this.configSvc.userProfile.userName ?
4135
+ // this.configSvc.userProfile.userName.split(' ', 2)[1] : ''
4136
+ // const viewMode: string = this.activatedRoute.snapshot.queryParams.viewMode ?
4137
+ // this.activatedRoute.snapshot.queryParams.viewMode : ''
4138
+ // const token = this.keyCloakSvc.token
4139
+ // const response = {
4140
+ // subApplicationName: applicationName,
4141
+ // requestId: 'LOADED',
4142
+ // parentContext: {
4143
+ // domainName: window.location.host,
4144
+ // url: this.router.url,
4145
+ // rootOrg: this.configSvc.rootOrg,
4146
+ // theme: this.configSvc.activeThemeObject ? {
4147
+ // name: this.configSvc.activeThemeObject.themeName,
4148
+ // ...this.configSvc.activeThemeObject.color,
4149
+ // } : '',
4150
+ // fontSize: this.configSvc.activeFontObject ? this.configSvc.activeFontObject.baseFontSize : '14px',
4151
+ // locale: (this.configSvc.userPreference && this.configSvc.userPreference.selectedLocale) || 'en',
4152
+ // darkMode: this.configSvc.isDarkMode,
4153
+ // subApplicationStartMode: viewMode.toUpperCase(),
4154
+ // user: {
4155
+ // firstName,
4156
+ // lastName,
4157
+ // token,
4158
+ // userId: this.configSvc.userProfile.userId ? this.configSvc.userProfile.userId : '',
4159
+ // roles: this.configSvc.userRoles ? Array.from(this.configSvc.userRoles) : [],
4160
+ // },
4161
+ // heartbeatFrequency: '200',
4162
+ // },
4163
+ // data: null,
4164
+ // }
4165
+ // contentWindow.postMessage(response, '*')
4166
+ // this.contentWindowinfo = contentWindow
4167
+ // this.loaded = true
4168
+ // this.subAppname = applicationName
4169
+ // }
4170
+ // }
4171
+ // }
4172
+ continueLearningRespond(id, continueLearning) {
4173
+ this.contentSvc.saveContinueLearning({
4174
+ contextPathId: id,
4175
+ resourceId: id,
4176
+ data: JSON.stringify({ timestamp: Date.now(), data: continueLearning }),
4177
+ dateAccessed: Date.now(),
4178
+ })
4179
+ .toPromise()
4180
+ .catch();
4181
+ }
4182
+ telemetryEvents(tData) {
4183
+ if (tData) {
4184
+ switch (tData.eventId) {
4185
+ case 'INTERACT':
4186
+ this.eventSvc.dispatchEvent({
4187
+ eventType: WsEvents.WsEventType.Telemetry,
4188
+ eventLogLevel: WsEvents.WsEventLogLevel.Warn,
4189
+ data: {
4190
+ ...tData.data,
4191
+ eventSubType: WsEvents.EnumTelemetrySubType.Interact,
4192
+ },
4193
+ from: tData.subApplicationName,
4194
+ to: 'Telemetry',
4195
+ });
4196
+ break;
4197
+ case 'HEARTBEAT':
4198
+ this.eventSvc.dispatchEvent({
4199
+ eventType: WsEvents.WsEventType.Telemetry,
4200
+ eventLogLevel: WsEvents.WsEventLogLevel.Trace,
4201
+ data: {
4202
+ ...tData.data,
4203
+ eventSubType: WsEvents.EnumTelemetrySubType.HeartBeat,
4204
+ },
4205
+ from: tData.subApplicationName,
4206
+ to: 'Telemetry',
4207
+ });
4208
+ break;
4209
+ case 'IMPRESSION':
4210
+ this.teleSvc.externalImpression(tData.data);
4211
+ break;
4212
+ default:
4213
+ break;
4214
+ }
4215
+ }
4216
+ }
4217
+ unsubscribeResponse() {
4218
+ this.subAppname = '';
4219
+ this.continueLearningData = null;
4220
+ this.contentWindowinfo = null;
4221
+ this.loaded = false;
4222
+ }
4223
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SubapplicationRespondService, deps: [{ token: WidgetContentService }, { token: EventService }, { token: TelemetryService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4224
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SubapplicationRespondService, providedIn: 'root' }); }
4225
+ }
4226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SubapplicationRespondService, decorators: [{
4227
+ type: Injectable,
4228
+ args: [{
4229
+ providedIn: 'root',
4230
+ }]
4231
+ }], ctorParameters: () => [{ type: WidgetContentService }, { type: EventService }, { type: TelemetryService }] });
4232
+
4233
+ const endpoints = {
4234
+ userPref: '/apis/protected/v8/user/preference',
4235
+ };
4236
+ class UserPreferenceService {
4237
+ // do changes in the backend and update the store
4238
+ constructor(http, configurationSvc) {
4239
+ this.http = http;
4240
+ this.configurationSvc = configurationSvc;
4241
+ }
4242
+ initialize() {
4243
+ this.configurationSvc.prefChangeNotifier
4244
+ .pipe(debounceTime(250))
4245
+ .subscribe((changedUserPref) => {
4246
+ if (this.configurationSvc.isAuthenticated) {
4247
+ this.saveUserPreference(changedUserPref);
4248
+ }
4249
+ });
4250
+ }
4251
+ async fetchUserPreference() {
4252
+ const pref = await this.http.get(endpoints.userPref).toPromise();
4253
+ return pref;
4254
+ }
4255
+ async saveUserPreference(changedUserPref) {
4256
+ try {
4257
+ if (!changedUserPref) {
4258
+ return false;
4259
+ }
4260
+ const newUserPref = {
4261
+ ...this.configurationSvc.userPreference,
4262
+ pinnedApps: (changedUserPref && changedUserPref.pinnedApps) ||
4263
+ (this.configurationSvc.userPreference &&
4264
+ this.configurationSvc.userPreference.pinnedApps) ||
4265
+ '',
4266
+ isDarkMode: this.configurationSvc.isDarkMode,
4267
+ isRTL: this.configurationSvc.isRTL,
4268
+ selectedTheme: (this.configurationSvc.activeThemeObject &&
4269
+ this.configurationSvc.activeThemeObject.themeClass) ||
4270
+ '',
4271
+ selectedFont: (this.configurationSvc.activeFontObject &&
4272
+ this.configurationSvc.activeFontObject.fontClass) ||
4273
+ '',
4274
+ selectedLangGroup: (this.configurationSvc.userPreference &&
4275
+ this.configurationSvc.userPreference.selectedLangGroup) ||
4276
+ '',
4277
+ selectedLocale: (this.configurationSvc.userPreference &&
4278
+ this.configurationSvc.userPreference.selectedLocale) ||
4279
+ '',
4280
+ colorPallet: (this.configurationSvc.userPreference &&
4281
+ this.configurationSvc.userPreference.colorPallet) ||
4282
+ [],
4283
+ defaultCardType: (this.configurationSvc.userPreference &&
4284
+ this.configurationSvc.userPreference.defaultCardType) ||
4285
+ '',
4286
+ completedActivity: (this.configurationSvc.userPreference &&
4287
+ this.configurationSvc.userPreference.completedActivity) ||
4288
+ [],
4289
+ ...(changedUserPref || {}),
4290
+ completedTour: this.configurationSvc.completedTour,
4291
+ profileSettings: (this.configurationSvc.userPreference &&
4292
+ this.configurationSvc.userPreference.profileSettings) ||
4293
+ this.configurationSvc.profileSettings,
4294
+ };
4295
+ const oldUserPref = this.configurationSvc.userPreference;
4296
+ this.configurationSvc.userPreference = newUserPref;
4297
+ await this.http
4298
+ .put(endpoints.userPref, newUserPref)
4299
+ .pipe(retry(3), catchError(err => {
4300
+ this.configurationSvc.userPreference = oldUserPref;
4301
+ return of(err);
4302
+ }))
4303
+ .toPromise();
4304
+ return true;
4305
+ }
4306
+ catch (err) {
4307
+ return false;
4308
+ }
4309
+ }
4310
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserPreferenceService, deps: [{ token: i1$3.HttpClient }, { token: ConfigurationsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4311
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserPreferenceService, providedIn: 'root' }); }
4312
+ }
4313
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserPreferenceService, decorators: [{
4314
+ type: Injectable,
4315
+ args: [{
4316
+ providedIn: 'root',
4317
+ }]
4318
+ }], ctorParameters: () => [{ type: i1$3.HttpClient }, { type: ConfigurationsService }] });
4319
+
4320
+ var NsContent;
4321
+ (function (NsContent) {
4322
+ let EContentTypes;
4323
+ (function (EContentTypes) {
4324
+ EContentTypes["PROGRAM"] = "Learning Path";
4325
+ EContentTypes["CHANNEL"] = "Channel";
4326
+ EContentTypes["COURSE"] = "Course";
4327
+ EContentTypes["KNOWLEDGE_ARTIFACT"] = "Knowledge Artifact";
4328
+ EContentTypes["KNOWLEDGE_BOARD"] = "Knowledge Board";
4329
+ EContentTypes["LEARNING_JOURNEY"] = "Learning Journeys";
4330
+ EContentTypes["MODULE"] = "Collection";
4331
+ EContentTypes["RESOURCE"] = "Resource";
4332
+ })(EContentTypes = NsContent.EContentTypes || (NsContent.EContentTypes = {}));
4333
+ let EMiscPlayerSupportedCollectionTypes;
4334
+ (function (EMiscPlayerSupportedCollectionTypes) {
4335
+ EMiscPlayerSupportedCollectionTypes["PLAYLIST"] = "Playlist";
4336
+ })(EMiscPlayerSupportedCollectionTypes = NsContent.EMiscPlayerSupportedCollectionTypes || (NsContent.EMiscPlayerSupportedCollectionTypes = {}));
4337
+ NsContent.PLAYER_SUPPORTED_COLLECTION_TYPES = [
4338
+ EContentTypes.COURSE,
4339
+ EContentTypes.MODULE,
4340
+ EContentTypes.PROGRAM,
4341
+ EMiscPlayerSupportedCollectionTypes.PLAYLIST,
4342
+ ];
4343
+ NsContent.KB_SUPPORTED_CONTENT_TYPES = [
4344
+ EContentTypes.COURSE,
4345
+ EContentTypes.MODULE,
4346
+ EContentTypes.PROGRAM,
4347
+ EContentTypes.RESOURCE,
4348
+ ];
4349
+ NsContent.PLAYLIST_SUPPORTED_CONTENT_TYPES = [
4350
+ EContentTypes.COURSE,
4351
+ EContentTypes.MODULE,
4352
+ EContentTypes.PROGRAM,
4353
+ EContentTypes.RESOURCE,
4354
+ ];
4355
+ let EMimeTypes;
4356
+ (function (EMimeTypes) {
4357
+ EMimeTypes["COLLECTION"] = "application/vnd.ekstep.content-collection";
4358
+ EMimeTypes["HTML"] = "application/html";
4359
+ EMimeTypes["ILP_FP"] = "application/ilpfp";
4360
+ EMimeTypes["IAP"] = "application/iap-assessment";
4361
+ EMimeTypes["M4A"] = "audio/m4a";
4362
+ EMimeTypes["MP3"] = "audio/mpeg";
4363
+ EMimeTypes["MP4"] = "video/mp4";
4364
+ EMimeTypes["M3U8"] = "application/x-mpegURL";
4365
+ EMimeTypes["INTERACTION"] = "video/interactive";
4366
+ EMimeTypes["PDF"] = "application/pdf";
4367
+ EMimeTypes["QUIZ"] = "application/quiz";
4368
+ EMimeTypes["DRAG_DROP"] = "application/drag-drop";
4369
+ EMimeTypes["HTML_PICKER"] = "application/htmlpicker";
4370
+ EMimeTypes["WEB_MODULE"] = "application/web-module";
4371
+ EMimeTypes["WEB_MODULE_EXERCISE"] = "application/web-module-exercise";
4372
+ EMimeTypes["YOUTUBE"] = "video/x-youtube";
4373
+ EMimeTypes["HANDS_ON"] = "application/integrated-hands-on";
4374
+ EMimeTypes["RDBMS_HANDS_ON"] = "application/rdbms";
4375
+ EMimeTypes["CLASS_DIAGRAM"] = "application/class-diagram";
4376
+ EMimeTypes["CHANNEL"] = "application/channel";
4377
+ EMimeTypes["COLLECTION_RESOURCE"] = "resource/collection";
4378
+ // Added on UI Only
4379
+ EMimeTypes["CERTIFICATION"] = "application/certification";
4380
+ EMimeTypes["PLAYLIST"] = "application/playlist";
4381
+ EMimeTypes["UNKNOWN"] = "application/unknown";
4382
+ })(EMimeTypes = NsContent.EMimeTypes || (NsContent.EMimeTypes = {}));
4383
+ let EDisplayContentTypes;
4384
+ (function (EDisplayContentTypes) {
4385
+ EDisplayContentTypes["ASSESSMENT"] = "ASSESSMENT";
4386
+ EDisplayContentTypes["AUDIO"] = "AUDIO";
4387
+ EDisplayContentTypes["CERTIFICATION"] = "CERTIFICATION";
4388
+ EDisplayContentTypes["CHANNEL"] = "Channel";
4389
+ EDisplayContentTypes["CLASS_DIAGRAM"] = "CLASS_DIAGRAM";
4390
+ EDisplayContentTypes["COURSE"] = "COURSE";
4391
+ EDisplayContentTypes["DEFAULT"] = "DEFAULT";
4392
+ EDisplayContentTypes["DRAG_DROP"] = "DRAG_DROP";
4393
+ EDisplayContentTypes["EXTERNAL_CERTIFICATION"] = "EXTERNAL_CERTIFICATION";
4394
+ EDisplayContentTypes["EXTERNAL_COURSE"] = "EXTERNAL_COURSE";
4395
+ EDisplayContentTypes["GOALS"] = "GOALS";
4396
+ EDisplayContentTypes["HANDS_ON"] = "HANDS_ON";
4397
+ EDisplayContentTypes["IAP"] = "IAP";
4398
+ EDisplayContentTypes["INSTRUCTOR_LED"] = "INSTRUCTOR_LED";
4399
+ EDisplayContentTypes["INTERACTIVE_VIDEO"] = "INTERACTIVE_VIDEO";
4400
+ EDisplayContentTypes["KNOWLEDGE_ARTIFACT"] = "KNOWLEDGE_ARTIFACT";
4401
+ EDisplayContentTypes["MODULE"] = "MODULE";
4402
+ EDisplayContentTypes["PDF"] = "PDF";
4403
+ EDisplayContentTypes["PLAYLIST"] = "PLAYLIST";
4404
+ EDisplayContentTypes["PROGRAM"] = "PROGRAM";
4405
+ EDisplayContentTypes["QUIZ"] = "QUIZ";
4406
+ EDisplayContentTypes["RESOURCE"] = "RESOURCE";
4407
+ EDisplayContentTypes["RDBMS_HANDS_ON"] = "RDBMS_HANDS_ON";
4408
+ EDisplayContentTypes["VIDEO"] = "VIDEO";
4409
+ EDisplayContentTypes["WEB_MODULE"] = "WEB_MODULE";
4410
+ EDisplayContentTypes["WEB_PAGE"] = "WEB_PAGE";
4411
+ EDisplayContentTypes["YOUTUBE"] = "YOUTUBE";
4412
+ EDisplayContentTypes["KNOWLEDGE_BOARD"] = "Knowledge Board";
4413
+ EDisplayContentTypes["LEARNING_JOURNEY"] = "Learning Journeys";
4414
+ })(EDisplayContentTypes = NsContent.EDisplayContentTypes || (NsContent.EDisplayContentTypes = {}));
4415
+ // for UI
4416
+ let EFilterCategory;
4417
+ (function (EFilterCategory) {
4418
+ EFilterCategory["ALL"] = "ALL";
4419
+ EFilterCategory["LEARN"] = "LEARN";
4420
+ EFilterCategory["PRACTICE"] = "PRACTICE";
4421
+ EFilterCategory["ASSESS"] = "ASSESS";
4422
+ })(EFilterCategory = NsContent.EFilterCategory || (NsContent.EFilterCategory = {}));
4423
+ // for UI
4424
+ let ETagType;
4425
+ (function (ETagType) {
4426
+ ETagType["NEWLY_ADDED"] = "NEWLY ADDED";
4427
+ })(ETagType = NsContent.ETagType || (NsContent.ETagType = {}));
4428
+ })(NsContent || (NsContent = {}));
4429
+
4430
+ // constants
4431
+
4432
+ /**
4433
+ * Generated bundle index. Do not edit.
4434
+ */
4435
+
4436
+ export { AuthKeycloakService, AuthMicrosoftService, ClassChangeOnScrollDirective, ClassChangeOnScrollModule, ConfigurationsService, DefaultThumbnailDirective, DefaultThumbnailModule, EFeatures, EInstance, EventService, ExploreDetailResolve, HorizontalScrollerComponent, HorizontalScrollerModule, ImageCropComponent, ImageCropModule, ImageResponsiveDirective, ImageResponsiveModule, InViewPortDirective, InViewPortModule, LoggerService, LogoutComponent, LogoutModule, MarketingOfferingResolve, NavigationDirective, NavigationModule, NsContent, OrderByPipe, PageResolve, PermissionDirective, PermissionModule, PipeConciseDateRangeModule, PipeConciseDateRangePipe, PipeCountTransformModule, PipeCountTransformPipe, PipeDateConcatModule, PipeDateConcatPipe, PipeDurationTransformModule, PipeDurationTransformPipe, PipeFilterModule, PipeFilterPipe, PipeFilterSearchModule, PipeFilterSearchPipe, PipeHtmlTagRemovalModule, PipeHtmlTagRemovalPipe, PipeLimitToModule, PipeLimitToPipe, PipeListFilterModule, PipeListFilterPipe, PipeNameTransformModule, PipeNameTransformPipe, PipeOrderByModule, PipePartialContentModule, PipePartialContentPipe, PipeRelativeTimeModule, PipeRelativeTimePipe, PipeSafeSanitizerModule, PipeSafeSanitizerPipe, SubapplicationRespondService, TelemetryService, UserPreferenceService, UtilityService, ValueService, WidgetContentService, WsEvents, getStringifiedQueryParams };
4437
+ //# sourceMappingURL=sunbird-cb-utils.mjs.map