@igo2/core 1.8.2 → 1.9.0

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.
Files changed (147) hide show
  1. package/__ivy_ngcc__/locale/en.common.json +43 -43
  2. package/__ivy_ngcc__/locale/en.core.json +23 -23
  3. package/__ivy_ngcc__/locale/en.geo.json +15 -3
  4. package/__ivy_ngcc__/locale/en.integration.json +31 -3
  5. package/__ivy_ngcc__/locale/en.json +45 -5
  6. package/__ivy_ngcc__/locale/fr.common.json +43 -43
  7. package/__ivy_ngcc__/locale/fr.core.json +23 -23
  8. package/__ivy_ngcc__/locale/fr.geo.json +16 -4
  9. package/__ivy_ngcc__/locale/fr.integration.json +33 -4
  10. package/__ivy_ngcc__/locale/fr.json +46 -6
  11. package/bundles/igo2-core.umd.js +1492 -1441
  12. package/bundles/igo2-core.umd.js.map +1 -1
  13. package/esm2015/igo2-core.js +5 -5
  14. package/esm2015/lib/activity/activity.interceptor.js +30 -31
  15. package/esm2015/lib/activity/activity.module.js +30 -29
  16. package/esm2015/lib/activity/activity.service.js +33 -33
  17. package/esm2015/lib/activity/index.js +3 -3
  18. package/esm2015/lib/analytics/index.js +2 -2
  19. package/esm2015/lib/analytics/shared/analytics.interface.js +2 -1
  20. package/esm2015/lib/analytics/shared/analytics.service.js +74 -75
  21. package/esm2015/lib/analytics/shared/index.js +3 -3
  22. package/esm2015/lib/config/config.interface.js +2 -1
  23. package/esm2015/lib/config/config.module.js +23 -22
  24. package/esm2015/lib/config/config.provider.js +21 -21
  25. package/esm2015/lib/config/config.service.js +52 -52
  26. package/esm2015/lib/config/index.js +4 -4
  27. package/esm2015/lib/config/version.js +5 -5
  28. package/esm2015/lib/core.module.js +71 -72
  29. package/esm2015/lib/gesture/gesture.module.js +30 -29
  30. package/esm2015/lib/gesture/gesture.provider.js +16 -17
  31. package/esm2015/lib/language/index.js +2 -2
  32. package/esm2015/lib/language/language.module.js +41 -40
  33. package/esm2015/lib/language/shared/index.js +5 -5
  34. package/esm2015/lib/language/shared/language.interface.js +2 -1
  35. package/esm2015/lib/language/shared/language.loader.js +28 -28
  36. package/esm2015/lib/language/shared/language.provider.js +22 -22
  37. package/esm2015/lib/language/shared/language.service.js +28 -29
  38. package/esm2015/lib/language/shared/missing-translation.guard.js +16 -16
  39. package/esm2015/lib/media/index.js +3 -3
  40. package/esm2015/lib/media/media.enum.js +12 -12
  41. package/esm2015/lib/media/media.service.js +76 -76
  42. package/esm2015/lib/message/index.js +3 -3
  43. package/esm2015/lib/message/message-center/index.js +2 -2
  44. package/esm2015/lib/message/message-center/message-center.component.js +43 -43
  45. package/esm2015/lib/message/message.module.js +27 -26
  46. package/esm2015/lib/message/shared/index.js +4 -4
  47. package/esm2015/lib/message/shared/message.enum.js +8 -8
  48. package/esm2015/lib/message/shared/message.interface.js +2 -1
  49. package/esm2015/lib/message/shared/message.service.js +130 -132
  50. package/esm2015/lib/network/index.js +3 -3
  51. package/esm2015/lib/network/network.interfaces.js +2 -1
  52. package/esm2015/lib/network/network.service.js +59 -60
  53. package/esm2015/lib/request/error.interceptor.js +62 -63
  54. package/esm2015/lib/request/error.module.js +39 -38
  55. package/esm2015/lib/request/index.js +3 -3
  56. package/esm2015/lib/request/logging.interceptor.js +29 -29
  57. package/esm2015/lib/request/logging.module.js +30 -29
  58. package/esm2015/lib/route/route.interface.js +2 -1
  59. package/esm2015/lib/route/route.service.js +55 -56
  60. package/esm2015/lib/storage/index.js +3 -3
  61. package/esm2015/lib/storage/storage.interface.js +13 -13
  62. package/esm2015/lib/storage/storage.service.js +79 -80
  63. package/esm2015/public_api.js +26 -26
  64. package/fesm2015/igo2-core.js +1029 -1016
  65. package/fesm2015/igo2-core.js.map +1 -1
  66. package/igo2-core.d.ts +5 -5
  67. package/lib/activity/activity.interceptor.d.ts +11 -11
  68. package/lib/activity/activity.module.d.ts +8 -7
  69. package/lib/activity/activity.service.d.ts +11 -11
  70. package/lib/activity/index.d.ts +2 -2
  71. package/lib/analytics/index.d.ts +1 -1
  72. package/lib/analytics/shared/analytics.interface.d.ts +6 -6
  73. package/lib/analytics/shared/analytics.service.d.ts +19 -19
  74. package/lib/analytics/shared/index.d.ts +2 -2
  75. package/lib/config/config.interface.d.ts +6 -6
  76. package/lib/config/config.module.d.ts +8 -7
  77. package/lib/config/config.provider.d.ts +15 -15
  78. package/lib/config/config.service.d.ts +18 -18
  79. package/lib/config/index.d.ts +3 -3
  80. package/lib/config/version.d.ts +5 -5
  81. package/lib/core.module.d.ts +18 -17
  82. package/lib/gesture/gesture.module.d.ts +9 -8
  83. package/lib/gesture/gesture.provider.d.ts +7 -7
  84. package/lib/language/index.d.ts +1 -1
  85. package/lib/language/language.module.d.ts +9 -8
  86. package/lib/language/shared/index.d.ts +4 -4
  87. package/lib/language/shared/language.interface.d.ts +3 -3
  88. package/lib/language/shared/language.loader.d.ts +11 -11
  89. package/lib/language/shared/language.provider.d.ts +15 -15
  90. package/lib/language/shared/language.service.d.ts +11 -11
  91. package/lib/language/shared/missing-translation.guard.d.ts +4 -4
  92. package/lib/media/index.d.ts +2 -2
  93. package/lib/media/media.enum.d.ts +9 -9
  94. package/lib/media/media.service.d.ts +16 -16
  95. package/lib/message/index.d.ts +2 -2
  96. package/lib/message/message-center/index.d.ts +1 -1
  97. package/lib/message/message-center/message-center.component.d.ts +19 -19
  98. package/lib/message/message.module.d.ts +11 -10
  99. package/lib/message/shared/index.d.ts +4 -4
  100. package/lib/message/shared/message.enum.d.ts +6 -6
  101. package/lib/message/shared/message.interface.d.ts +18 -18
  102. package/lib/message/shared/message.service.d.ts +25 -25
  103. package/lib/network/index.d.ts +2 -2
  104. package/lib/network/network.interfaces.d.ts +3 -3
  105. package/lib/network/network.service.d.ts +20 -20
  106. package/lib/request/error.interceptor.d.ts +16 -16
  107. package/lib/request/error.module.d.ts +9 -8
  108. package/lib/request/index.d.ts +2 -2
  109. package/lib/request/logging.interceptor.d.ts +8 -8
  110. package/lib/request/logging.module.d.ts +8 -7
  111. package/lib/route/route.interface.d.ts +22 -22
  112. package/lib/route/route.service.d.ts +18 -18
  113. package/lib/storage/index.d.ts +2 -2
  114. package/lib/storage/storage.interface.d.ts +20 -20
  115. package/lib/storage/storage.service.d.ts +19 -19
  116. package/locale/en.common.json +43 -43
  117. package/locale/en.core.json +23 -23
  118. package/locale/en.geo.json +15 -3
  119. package/locale/en.integration.json +31 -3
  120. package/locale/en.json +45 -5
  121. package/locale/fr.common.json +43 -43
  122. package/locale/fr.core.json +23 -23
  123. package/locale/fr.geo.json +16 -4
  124. package/locale/fr.integration.json +33 -4
  125. package/locale/fr.json +46 -6
  126. package/package.json +8 -8
  127. package/public_api.d.ts +22 -22
  128. package/style/all.theming.scss +0 -7655
  129. package/style/core.theming.scss +0 -43
  130. package/style/foreground.scss +1 -1
  131. package/style/index.theming.scss +1006 -0
  132. package/style/material.font.scss +9 -9
  133. package/style/partial/core.variables.scss +3 -3
  134. package/style/partial/media.scss +80 -80
  135. package/style/setup.scss +1 -0
  136. package/style/themes/blue.theme.scss +16 -11
  137. package/style/themes/bluedq.theme.scss +49 -43
  138. package/style/themes/bluegrey.theme.scss +15 -8
  139. package/style/themes/dark.theme.scss +15 -8
  140. package/style/themes/deeppurple.theme.scss +15 -8
  141. package/style/themes/indigo.theme.scss +15 -8
  142. package/style/themes/orange.theme.scss +15 -8
  143. package/style/themes/teal.theme.scss +15 -8
  144. package/style/theming.scss +2 -7180
  145. package/style/typography.scss +14 -14
  146. package/bundles/igo2-core.umd.min.js +0 -17
  147. package/bundles/igo2-core.umd.min.js.map +0 -1
@@ -1,1508 +1,1559 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@igo2/utils'), require('@ngx-translate/core'), require('angular2-notifications'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/router'), require('@angular/cdk/layout')) :
3
- typeof define === 'function' && define.amd ? define('@igo2/core', ['exports', '@angular/core', '@angular/common', '@angular/common/http', 'rxjs/operators', 'rxjs', '@igo2/utils', '@ngx-translate/core', 'angular2-notifications', '@angular/material/icon', '@angular/platform-browser', '@angular/router', '@angular/cdk/layout'], factory) :
4
- (global = global || self, factory((global.igo2 = global.igo2 || {}, global.igo2.core = {}), global.ng.core, global.ng.common, global.ng.common.http, global.rxjs.operators, global.rxjs, global.utils, global['ngxt-core'], global.ng2notify, global.ng.material.icon, global.ng.platformBrowser, global.ng.router, global.ng.cdk.layout));
5
- }(this, (function (exports, i0, i2, http, operators, rxjs, utils, i1, i1$1, i6, i7, i1$2, i1$3) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@igo2/utils'), require('@ngx-translate/core'), require('@igo2/angular2-notifications'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/router'), require('@angular/cdk/layout')) :
3
+ typeof define === 'function' && define.amd ? define('@igo2/core', ['exports', '@angular/core', '@angular/common', '@angular/common/http', 'rxjs/operators', 'rxjs', '@igo2/utils', '@ngx-translate/core', '@igo2/angular2-notifications', '@angular/material/icon', '@angular/platform-browser', '@angular/router', '@angular/cdk/layout'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.igo2 = global.igo2 || {}, global.igo2.core = {}), global.ng.core, global.ng.common, global.ng.common.http, global.rxjs.operators, global.rxjs, global.utils, global['ngxt-core'], global.ng2notify, global.ng.material.icon, global.ng.platformBrowser, global.ng.router, global.ng.cdk.layout));
5
+ }(this, (function (exports, i0, i2, http, operators, rxjs, utils, i1, i1$1, i1$2, i2$1, i1$3, i1$4) { 'use strict';
6
6
 
7
- var ActivityService = /** @class */ (function () {
8
- function ActivityService() {
9
- this.counter$ = new rxjs.BehaviorSubject(0);
10
- this.ids = [];
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () {
17
+ return e[k];
18
+ }
19
+ });
20
+ }
21
+ });
11
22
  }
12
- ActivityService.prototype.register = function () {
13
- var id = utils.uuid();
14
- this.ids.push(id);
15
- this.counter$.next(this.ids.length);
16
- return id;
17
- };
18
- ActivityService.prototype.unregister = function (id) {
19
- var index = this.ids.indexOf(id);
20
- if (index === -1) {
21
- return;
22
- }
23
- this.ids.splice(index, 1);
24
- this.counter$.next(this.ids.length);
25
- };
26
- return ActivityService;
27
- }());
28
- ActivityService.ɵfac = function ActivityService_Factory(t) { return new (t || ActivityService)(); };
29
- ActivityService.ɵprov = i0.ɵɵdefineInjectable({ token: ActivityService, factory: ActivityService.ɵfac, providedIn: 'root' });
30
- /*@__PURE__*/ (function () {
31
- i0.ɵsetClassMetadata(ActivityService, [{
32
- type: i0.Injectable,
33
- args: [{
34
- providedIn: 'root'
35
- }]
36
- }], function () { return []; }, null);
23
+ n['default'] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
29
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
30
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
31
+ var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
32
+ var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
33
+ var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
34
+ var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
35
+
36
+ var ActivityService = /** @class */ (function () {
37
+ function ActivityService() {
38
+ this.counter$ = new rxjs.BehaviorSubject(0);
39
+ this.ids = [];
40
+ }
41
+ ActivityService.prototype.register = function () {
42
+ var id = utils.uuid();
43
+ this.ids.push(id);
44
+ this.counter$.next(this.ids.length);
45
+ return id;
46
+ };
47
+ ActivityService.prototype.unregister = function (id) {
48
+ var index = this.ids.indexOf(id);
49
+ if (index === -1) {
50
+ return;
51
+ }
52
+ this.ids.splice(index, 1);
53
+ this.counter$.next(this.ids.length);
54
+ };
55
+ return ActivityService;
56
+ }());
57
+ ActivityService.ɵfac = function ActivityService_Factory(t) { return new (t || ActivityService)(); };
58
+ ActivityService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ActivityService, factory: ActivityService.ɵfac, providedIn: 'root' });
59
+ (function () {
60
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ActivityService, [{
61
+ type: i0.Injectable,
62
+ args: [{
63
+ providedIn: 'root'
64
+ }]
65
+ }], function () { return []; }, null);
37
66
  })();
38
67
 
39
- var ActivityInterceptor = /** @class */ (function () {
40
- function ActivityInterceptor(activityService) {
41
- this.activityService = activityService;
42
- }
43
- ActivityInterceptor.prototype.intercept = function (req, next) {
44
- var _this = this;
45
- var activity = req.headers.get('activityInterceptor');
46
- if (activity) {
47
- var actReq = req.clone({
48
- headers: req.headers.delete('activityInterceptor')
49
- });
50
- if (activity === 'false') {
51
- return next.handle(actReq);
52
- }
53
- }
54
- var id = this.activityService.register();
55
- return next.handle(req).pipe(operators.finalize(function () {
56
- _this.activityService.unregister(id);
57
- }));
58
- };
59
- return ActivityInterceptor;
60
- }());
61
- ActivityInterceptor.ɵfac = function ActivityInterceptor_Factory(t) { return new (t || ActivityInterceptor)(i0.ɵɵinject(ActivityService)); };
62
- ActivityInterceptor.ɵprov = i0.ɵɵdefineInjectable({ token: ActivityInterceptor, factory: ActivityInterceptor.ɵfac });
63
- /*@__PURE__*/ (function () {
64
- i0.ɵsetClassMetadata(ActivityInterceptor, [{
65
- type: i0.Injectable
66
- }], function () { return [{ type: ActivityService }]; }, null);
68
+ var ActivityInterceptor = /** @class */ (function () {
69
+ function ActivityInterceptor(activityService) {
70
+ this.activityService = activityService;
71
+ }
72
+ ActivityInterceptor.prototype.intercept = function (req, next) {
73
+ var _this = this;
74
+ var activity = req.headers.get('activityInterceptor');
75
+ if (activity) {
76
+ var actReq = req.clone({
77
+ headers: req.headers.delete('activityInterceptor')
78
+ });
79
+ if (activity === 'false') {
80
+ return next.handle(actReq);
81
+ }
82
+ }
83
+ var id = this.activityService.register();
84
+ return next.handle(req).pipe(operators.finalize(function () {
85
+ _this.activityService.unregister(id);
86
+ }));
87
+ };
88
+ return ActivityInterceptor;
89
+ }());
90
+ ActivityInterceptor.ɵfac = function ActivityInterceptor_Factory(t) { return new (t || ActivityInterceptor)(i0__namespace.ɵɵinject(ActivityService)); };
91
+ ActivityInterceptor.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ActivityInterceptor, factory: ActivityInterceptor.ɵfac });
92
+ (function () {
93
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ActivityInterceptor, [{
94
+ type: i0.Injectable
95
+ }], function () { return [{ type: ActivityService }]; }, null);
67
96
  })();
68
97
 
69
- var IgoActivityModule = /** @class */ (function () {
70
- function IgoActivityModule() {
71
- }
72
- IgoActivityModule.forRoot = function () {
73
- return {
74
- ngModule: IgoActivityModule,
75
- providers: [
76
- {
77
- provide: http.HTTP_INTERCEPTORS,
78
- useClass: ActivityInterceptor,
79
- multi: true
80
- }
81
- ]
82
- };
83
- };
84
- return IgoActivityModule;
85
- }());
86
- IgoActivityModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoActivityModule });
87
- IgoActivityModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoActivityModule_Factory(t) { return new (t || IgoActivityModule)(); }, imports: [[]] });
88
- /*@__PURE__*/ (function () {
89
- i0.ɵsetClassMetadata(IgoActivityModule, [{
90
- type: i0.NgModule,
91
- args: [{
92
- imports: [],
93
- declarations: [],
94
- exports: []
95
- }]
96
- }], null, null);
98
+ var IgoActivityModule = /** @class */ (function () {
99
+ function IgoActivityModule() {
100
+ }
101
+ IgoActivityModule.forRoot = function () {
102
+ return {
103
+ ngModule: IgoActivityModule,
104
+ providers: [
105
+ {
106
+ provide: http.HTTP_INTERCEPTORS,
107
+ useClass: ActivityInterceptor,
108
+ multi: true
109
+ }
110
+ ]
111
+ };
112
+ };
113
+ return IgoActivityModule;
114
+ }());
115
+ IgoActivityModule.ɵfac = function IgoActivityModule_Factory(t) { return new (t || IgoActivityModule)(); };
116
+ IgoActivityModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoActivityModule });
117
+ IgoActivityModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[]] });
118
+ (function () {
119
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoActivityModule, [{
120
+ type: i0.NgModule,
121
+ args: [{
122
+ imports: [],
123
+ declarations: [],
124
+ exports: []
125
+ }]
126
+ }], null, null);
97
127
  })();
98
128
 
99
- var version = {
100
- lib: '1.8.2',
101
- releaseDate: 1628779296901
129
+ var version = {
130
+ lib: '1.9.0',
131
+ releaseDate: 1632149524409
102
132
  };
103
133
 
104
- var ConfigService = /** @class */ (function () {
105
- function ConfigService(injector) {
106
- this.injector = injector;
107
- this.config = {};
108
- }
109
- /**
110
- * Use to get the data found in config file
111
- */
112
- ConfigService.prototype.getConfig = function (key) {
113
- return utils.ObjectUtils.resolve(this.config, key);
114
- };
115
- /**
116
- * This method loads "[path]" to get all config's variables
117
- */
118
- ConfigService.prototype.load = function (options) {
119
- var _this = this;
120
- var baseConfig = options.default || {};
121
- if (!options.path) {
122
- this.config = baseConfig;
123
- return true;
124
- }
125
- var http$1 = this.injector.get(http.HttpClient);
126
- return new Promise(function (resolve, _reject) {
127
- http$1
128
- .get(options.path)
129
- .pipe(operators.catchError(function (error) {
130
- console.log("Configuration file " + options.path + " could not be read");
131
- resolve(true);
132
- return rxjs.throwError(error.error || 'Server error');
133
- }))
134
- .subscribe(function (configResponse) {
135
- _this.config = utils.ObjectUtils.mergeDeep(utils.ObjectUtils.mergeDeep({ version: version }, baseConfig), configResponse);
136
- resolve(true);
137
- });
138
- });
139
- };
140
- return ConfigService;
141
- }());
142
- ConfigService.ɵfac = function ConfigService_Factory(t) { return new (t || ConfigService)(i0.ɵɵinject(i0.Injector)); };
143
- ConfigService.ɵprov = i0.ɵɵdefineInjectable({ token: ConfigService, factory: ConfigService.ɵfac, providedIn: 'root' });
144
- /*@__PURE__*/ (function () {
145
- i0.ɵsetClassMetadata(ConfigService, [{
146
- type: i0.Injectable,
147
- args: [{
148
- providedIn: 'root'
149
- }]
150
- }], function () { return [{ type: i0.Injector }]; }, null);
134
+ var ConfigService = /** @class */ (function () {
135
+ function ConfigService(injector) {
136
+ this.injector = injector;
137
+ this.config = {};
138
+ }
139
+ /**
140
+ * Use to get the data found in config file
141
+ */
142
+ ConfigService.prototype.getConfig = function (key) {
143
+ return utils.ObjectUtils.resolve(this.config, key);
144
+ };
145
+ /**
146
+ * This method loads "[path]" to get all config's variables
147
+ */
148
+ ConfigService.prototype.load = function (options) {
149
+ var _this = this;
150
+ var baseConfig = options.default || {};
151
+ if (!options.path) {
152
+ this.config = baseConfig;
153
+ return true;
154
+ }
155
+ var http$1 = this.injector.get(http.HttpClient);
156
+ return new Promise(function (resolve, _reject) {
157
+ http$1
158
+ .get(options.path)
159
+ .pipe(operators.catchError(function (error) {
160
+ console.log("Configuration file " + options.path + " could not be read");
161
+ resolve(true);
162
+ return rxjs.throwError(error.error || 'Server error');
163
+ }))
164
+ .subscribe(function (configResponse) {
165
+ _this.config = utils.ObjectUtils.mergeDeep(utils.ObjectUtils.mergeDeep({ version: version }, baseConfig), configResponse);
166
+ resolve(true);
167
+ });
168
+ });
169
+ };
170
+ return ConfigService;
171
+ }());
172
+ ConfigService.ɵfac = function ConfigService_Factory(t) { return new (t || ConfigService)(i0__namespace.ɵɵinject(i0__namespace.Injector)); };
173
+ ConfigService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ConfigService, factory: ConfigService.ɵfac, providedIn: 'root' });
174
+ (function () {
175
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ConfigService, [{
176
+ type: i0.Injectable,
177
+ args: [{
178
+ providedIn: 'root'
179
+ }]
180
+ }], function () { return [{ type: i0__namespace.Injector }]; }, null);
151
181
  })();
152
182
 
153
- var CONFIG_OPTIONS = new i0.InjectionToken('configOptions');
154
- function provideConfigOptions(options) {
155
- return {
156
- provide: CONFIG_OPTIONS,
157
- useValue: options
158
- };
159
- }
160
- function configFactory(configService, options) {
161
- return function () { return configService.load(options); };
162
- }
163
- function provideConfigLoader() {
164
- return {
165
- provide: i0.APP_INITIALIZER,
166
- useFactory: configFactory,
167
- multi: true,
168
- deps: [ConfigService, CONFIG_OPTIONS]
169
- };
183
+ var CONFIG_OPTIONS = new i0.InjectionToken('configOptions');
184
+ function provideConfigOptions(options) {
185
+ return {
186
+ provide: CONFIG_OPTIONS,
187
+ useValue: options
188
+ };
189
+ }
190
+ function configFactory(configService, options) {
191
+ return function () { return configService.load(options); };
192
+ }
193
+ function provideConfigLoader() {
194
+ return {
195
+ provide: i0.APP_INITIALIZER,
196
+ useFactory: configFactory,
197
+ multi: true,
198
+ deps: [ConfigService, CONFIG_OPTIONS]
199
+ };
170
200
  }
171
201
 
172
- var IgoConfigModule = /** @class */ (function () {
173
- function IgoConfigModule() {
174
- }
175
- IgoConfigModule.forRoot = function () {
176
- return {
177
- ngModule: IgoConfigModule,
178
- providers: [provideConfigOptions({}), provideConfigLoader()]
179
- };
180
- };
181
- return IgoConfigModule;
182
- }());
183
- IgoConfigModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoConfigModule });
184
- IgoConfigModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoConfigModule_Factory(t) { return new (t || IgoConfigModule)(); }, imports: [[]] });
185
- /*@__PURE__*/ (function () {
186
- i0.ɵsetClassMetadata(IgoConfigModule, [{
187
- type: i0.NgModule,
188
- args: [{
189
- imports: [],
190
- declarations: [],
191
- exports: []
192
- }]
193
- }], null, null);
202
+ var IgoConfigModule = /** @class */ (function () {
203
+ function IgoConfigModule() {
204
+ }
205
+ IgoConfigModule.forRoot = function () {
206
+ return {
207
+ ngModule: IgoConfigModule,
208
+ providers: [provideConfigOptions({}), provideConfigLoader()]
209
+ };
210
+ };
211
+ return IgoConfigModule;
212
+ }());
213
+ IgoConfigModule.ɵfac = function IgoConfigModule_Factory(t) { return new (t || IgoConfigModule)(); };
214
+ IgoConfigModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoConfigModule });
215
+ IgoConfigModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[]] });
216
+ (function () {
217
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoConfigModule, [{
218
+ type: i0.NgModule,
219
+ args: [{
220
+ imports: [],
221
+ declarations: [],
222
+ exports: []
223
+ }]
224
+ }], null, null);
194
225
  })();
195
226
 
196
- /*! *****************************************************************************
197
- Copyright (c) Microsoft Corporation.
198
-
199
- Permission to use, copy, modify, and/or distribute this software for any
200
- purpose with or without fee is hereby granted.
201
-
202
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
203
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
204
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
205
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
206
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
207
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
208
- PERFORMANCE OF THIS SOFTWARE.
209
- ***************************************************************************** */
210
- /* global Reflect, Promise */
211
- var extendStatics = function (d, b) {
212
- extendStatics = Object.setPrototypeOf ||
213
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
214
- function (d, b) { for (var p in b)
215
- if (Object.prototype.hasOwnProperty.call(b, p))
216
- d[p] = b[p]; };
217
- return extendStatics(d, b);
218
- };
219
- function __extends(d, b) {
220
- if (typeof b !== "function" && b !== null)
221
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
222
- extendStatics(d, b);
223
- function __() { this.constructor = d; }
224
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
225
- }
226
- var __assign = function () {
227
- __assign = Object.assign || function __assign(t) {
228
- for (var s, i = 1, n = arguments.length; i < n; i++) {
229
- s = arguments[i];
230
- for (var p in s)
231
- if (Object.prototype.hasOwnProperty.call(s, p))
232
- t[p] = s[p];
233
- }
234
- return t;
235
- };
236
- return __assign.apply(this, arguments);
237
- };
238
- function __rest(s, e) {
239
- var t = {};
240
- for (var p in s)
241
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
242
- t[p] = s[p];
243
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
244
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
245
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
246
- t[p[i]] = s[p[i]];
247
- }
248
- return t;
249
- }
250
- function __decorate(decorators, target, key, desc) {
251
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
252
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
253
- r = Reflect.decorate(decorators, target, key, desc);
254
- else
255
- for (var i = decorators.length - 1; i >= 0; i--)
256
- if (d = decorators[i])
257
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
258
- return c > 3 && r && Object.defineProperty(target, key, r), r;
259
- }
260
- function __param(paramIndex, decorator) {
261
- return function (target, key) { decorator(target, key, paramIndex); };
262
- }
263
- function __metadata(metadataKey, metadataValue) {
264
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
265
- return Reflect.metadata(metadataKey, metadataValue);
266
- }
267
- function __awaiter(thisArg, _arguments, P, generator) {
268
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
269
- return new (P || (P = Promise))(function (resolve, reject) {
270
- function fulfilled(value) { try {
271
- step(generator.next(value));
272
- }
273
- catch (e) {
274
- reject(e);
275
- } }
276
- function rejected(value) { try {
277
- step(generator["throw"](value));
278
- }
279
- catch (e) {
280
- reject(e);
281
- } }
282
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
283
- step((generator = generator.apply(thisArg, _arguments || [])).next());
284
- });
285
- }
286
- function __generator(thisArg, body) {
287
- var _ = { label: 0, sent: function () { if (t[0] & 1)
288
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
289
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
290
- function verb(n) { return function (v) { return step([n, v]); }; }
291
- function step(op) {
292
- if (f)
293
- throw new TypeError("Generator is already executing.");
294
- while (_)
295
- try {
296
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
297
- return t;
298
- if (y = 0, t)
299
- op = [op[0] & 2, t.value];
300
- switch (op[0]) {
301
- case 0:
302
- case 1:
303
- t = op;
304
- break;
305
- case 4:
306
- _.label++;
307
- return { value: op[1], done: false };
308
- case 5:
309
- _.label++;
310
- y = op[1];
311
- op = [0];
312
- continue;
313
- case 7:
314
- op = _.ops.pop();
315
- _.trys.pop();
316
- continue;
317
- default:
318
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
319
- _ = 0;
320
- continue;
321
- }
322
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
323
- _.label = op[1];
324
- break;
325
- }
326
- if (op[0] === 6 && _.label < t[1]) {
327
- _.label = t[1];
328
- t = op;
329
- break;
330
- }
331
- if (t && _.label < t[2]) {
332
- _.label = t[2];
333
- _.ops.push(op);
334
- break;
335
- }
336
- if (t[2])
337
- _.ops.pop();
338
- _.trys.pop();
339
- continue;
340
- }
341
- op = body.call(thisArg, _);
342
- }
343
- catch (e) {
344
- op = [6, e];
345
- y = 0;
346
- }
347
- finally {
348
- f = t = 0;
349
- }
350
- if (op[0] & 5)
351
- throw op[1];
352
- return { value: op[0] ? op[1] : void 0, done: true };
353
- }
354
- }
355
- var __createBinding = Object.create ? (function (o, m, k, k2) {
356
- if (k2 === undefined)
357
- k2 = k;
358
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
359
- }) : (function (o, m, k, k2) {
360
- if (k2 === undefined)
361
- k2 = k;
362
- o[k2] = m[k];
363
- });
364
- function __exportStar(m, o) {
365
- for (var p in m)
366
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
367
- __createBinding(o, m, p);
368
- }
369
- function __values(o) {
370
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
371
- if (m)
372
- return m.call(o);
373
- if (o && typeof o.length === "number")
374
- return {
375
- next: function () {
376
- if (o && i >= o.length)
377
- o = void 0;
378
- return { value: o && o[i++], done: !o };
379
- }
380
- };
381
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
382
- }
383
- function __read(o, n) {
384
- var m = typeof Symbol === "function" && o[Symbol.iterator];
385
- if (!m)
386
- return o;
387
- var i = m.call(o), r, ar = [], e;
388
- try {
389
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
390
- ar.push(r.value);
391
- }
392
- catch (error) {
393
- e = { error: error };
394
- }
395
- finally {
396
- try {
397
- if (r && !r.done && (m = i["return"]))
398
- m.call(i);
399
- }
400
- finally {
401
- if (e)
402
- throw e.error;
403
- }
404
- }
405
- return ar;
406
- }
407
- /** @deprecated */
408
- function __spread() {
409
- for (var ar = [], i = 0; i < arguments.length; i++)
410
- ar = ar.concat(__read(arguments[i]));
411
- return ar;
412
- }
413
- /** @deprecated */
414
- function __spreadArrays() {
415
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
416
- s += arguments[i].length;
417
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
418
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
419
- r[k] = a[j];
420
- return r;
421
- }
422
- function __spreadArray(to, from) {
423
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
424
- to[j] = from[i];
425
- return to;
426
- }
427
- function __await(v) {
428
- return this instanceof __await ? (this.v = v, this) : new __await(v);
429
- }
430
- function __asyncGenerator(thisArg, _arguments, generator) {
431
- if (!Symbol.asyncIterator)
432
- throw new TypeError("Symbol.asyncIterator is not defined.");
433
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
434
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
435
- function verb(n) { if (g[n])
436
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
437
- function resume(n, v) { try {
438
- step(g[n](v));
439
- }
440
- catch (e) {
441
- settle(q[0][3], e);
442
- } }
443
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
444
- function fulfill(value) { resume("next", value); }
445
- function reject(value) { resume("throw", value); }
446
- function settle(f, v) { if (f(v), q.shift(), q.length)
447
- resume(q[0][0], q[0][1]); }
448
- }
449
- function __asyncDelegator(o) {
450
- var i, p;
451
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
452
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
453
- }
454
- function __asyncValues(o) {
455
- if (!Symbol.asyncIterator)
456
- throw new TypeError("Symbol.asyncIterator is not defined.");
457
- var m = o[Symbol.asyncIterator], i;
458
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
459
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
460
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
461
- }
462
- function __makeTemplateObject(cooked, raw) {
463
- if (Object.defineProperty) {
464
- Object.defineProperty(cooked, "raw", { value: raw });
465
- }
466
- else {
467
- cooked.raw = raw;
468
- }
469
- return cooked;
470
- }
471
- ;
472
- var __setModuleDefault = Object.create ? (function (o, v) {
473
- Object.defineProperty(o, "default", { enumerable: true, value: v });
474
- }) : function (o, v) {
475
- o["default"] = v;
476
- };
477
- function __importStar(mod) {
478
- if (mod && mod.__esModule)
479
- return mod;
480
- var result = {};
481
- if (mod != null)
482
- for (var k in mod)
483
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
484
- __createBinding(result, mod, k);
485
- __setModuleDefault(result, mod);
486
- return result;
487
- }
488
- function __importDefault(mod) {
489
- return (mod && mod.__esModule) ? mod : { default: mod };
490
- }
491
- function __classPrivateFieldGet(receiver, privateMap) {
492
- if (!privateMap.has(receiver)) {
493
- throw new TypeError("attempted to get private field on non-instance");
494
- }
495
- return privateMap.get(receiver);
496
- }
497
- function __classPrivateFieldSet(receiver, privateMap, value) {
498
- if (!privateMap.has(receiver)) {
499
- throw new TypeError("attempted to set private field on non-instance");
500
- }
501
- privateMap.set(receiver, value);
502
- return value;
227
+ /*! *****************************************************************************
228
+ Copyright (c) Microsoft Corporation.
229
+
230
+ Permission to use, copy, modify, and/or distribute this software for any
231
+ purpose with or without fee is hereby granted.
232
+
233
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
234
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
235
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
236
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
237
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
238
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
239
+ PERFORMANCE OF THIS SOFTWARE.
240
+ ***************************************************************************** */
241
+ /* global Reflect, Promise */
242
+ var extendStatics = function (d, b) {
243
+ extendStatics = Object.setPrototypeOf ||
244
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
245
+ function (d, b) { for (var p in b)
246
+ if (Object.prototype.hasOwnProperty.call(b, p))
247
+ d[p] = b[p]; };
248
+ return extendStatics(d, b);
249
+ };
250
+ function __extends(d, b) {
251
+ if (typeof b !== "function" && b !== null)
252
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
253
+ extendStatics(d, b);
254
+ function __() { this.constructor = d; }
255
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
256
+ }
257
+ var __assign = function () {
258
+ __assign = Object.assign || function __assign(t) {
259
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
260
+ s = arguments[i];
261
+ for (var p in s)
262
+ if (Object.prototype.hasOwnProperty.call(s, p))
263
+ t[p] = s[p];
264
+ }
265
+ return t;
266
+ };
267
+ return __assign.apply(this, arguments);
268
+ };
269
+ function __rest(s, e) {
270
+ var t = {};
271
+ for (var p in s)
272
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
273
+ t[p] = s[p];
274
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
275
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
276
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
277
+ t[p[i]] = s[p[i]];
278
+ }
279
+ return t;
280
+ }
281
+ function __decorate(decorators, target, key, desc) {
282
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
283
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
284
+ r = Reflect.decorate(decorators, target, key, desc);
285
+ else
286
+ for (var i = decorators.length - 1; i >= 0; i--)
287
+ if (d = decorators[i])
288
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
289
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
290
+ }
291
+ function __param(paramIndex, decorator) {
292
+ return function (target, key) { decorator(target, key, paramIndex); };
293
+ }
294
+ function __metadata(metadataKey, metadataValue) {
295
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
296
+ return Reflect.metadata(metadataKey, metadataValue);
297
+ }
298
+ function __awaiter(thisArg, _arguments, P, generator) {
299
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
300
+ return new (P || (P = Promise))(function (resolve, reject) {
301
+ function fulfilled(value) { try {
302
+ step(generator.next(value));
303
+ }
304
+ catch (e) {
305
+ reject(e);
306
+ } }
307
+ function rejected(value) { try {
308
+ step(generator["throw"](value));
309
+ }
310
+ catch (e) {
311
+ reject(e);
312
+ } }
313
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
314
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
315
+ });
316
+ }
317
+ function __generator(thisArg, body) {
318
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
319
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
320
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
321
+ function verb(n) { return function (v) { return step([n, v]); }; }
322
+ function step(op) {
323
+ if (f)
324
+ throw new TypeError("Generator is already executing.");
325
+ while (_)
326
+ try {
327
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
328
+ return t;
329
+ if (y = 0, t)
330
+ op = [op[0] & 2, t.value];
331
+ switch (op[0]) {
332
+ case 0:
333
+ case 1:
334
+ t = op;
335
+ break;
336
+ case 4:
337
+ _.label++;
338
+ return { value: op[1], done: false };
339
+ case 5:
340
+ _.label++;
341
+ y = op[1];
342
+ op = [0];
343
+ continue;
344
+ case 7:
345
+ op = _.ops.pop();
346
+ _.trys.pop();
347
+ continue;
348
+ default:
349
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
350
+ _ = 0;
351
+ continue;
352
+ }
353
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
354
+ _.label = op[1];
355
+ break;
356
+ }
357
+ if (op[0] === 6 && _.label < t[1]) {
358
+ _.label = t[1];
359
+ t = op;
360
+ break;
361
+ }
362
+ if (t && _.label < t[2]) {
363
+ _.label = t[2];
364
+ _.ops.push(op);
365
+ break;
366
+ }
367
+ if (t[2])
368
+ _.ops.pop();
369
+ _.trys.pop();
370
+ continue;
371
+ }
372
+ op = body.call(thisArg, _);
373
+ }
374
+ catch (e) {
375
+ op = [6, e];
376
+ y = 0;
377
+ }
378
+ finally {
379
+ f = t = 0;
380
+ }
381
+ if (op[0] & 5)
382
+ throw op[1];
383
+ return { value: op[0] ? op[1] : void 0, done: true };
384
+ }
385
+ }
386
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
387
+ if (k2 === undefined)
388
+ k2 = k;
389
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
390
+ }) : (function (o, m, k, k2) {
391
+ if (k2 === undefined)
392
+ k2 = k;
393
+ o[k2] = m[k];
394
+ });
395
+ function __exportStar(m, o) {
396
+ for (var p in m)
397
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
398
+ __createBinding(o, m, p);
399
+ }
400
+ function __values(o) {
401
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
402
+ if (m)
403
+ return m.call(o);
404
+ if (o && typeof o.length === "number")
405
+ return {
406
+ next: function () {
407
+ if (o && i >= o.length)
408
+ o = void 0;
409
+ return { value: o && o[i++], done: !o };
410
+ }
411
+ };
412
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
413
+ }
414
+ function __read(o, n) {
415
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
416
+ if (!m)
417
+ return o;
418
+ var i = m.call(o), r, ar = [], e;
419
+ try {
420
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
421
+ ar.push(r.value);
422
+ }
423
+ catch (error) {
424
+ e = { error: error };
425
+ }
426
+ finally {
427
+ try {
428
+ if (r && !r.done && (m = i["return"]))
429
+ m.call(i);
430
+ }
431
+ finally {
432
+ if (e)
433
+ throw e.error;
434
+ }
435
+ }
436
+ return ar;
437
+ }
438
+ /** @deprecated */
439
+ function __spread() {
440
+ for (var ar = [], i = 0; i < arguments.length; i++)
441
+ ar = ar.concat(__read(arguments[i]));
442
+ return ar;
443
+ }
444
+ /** @deprecated */
445
+ function __spreadArrays() {
446
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
447
+ s += arguments[i].length;
448
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
449
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
450
+ r[k] = a[j];
451
+ return r;
452
+ }
453
+ function __spreadArray(to, from, pack) {
454
+ if (pack || arguments.length === 2)
455
+ for (var i = 0, l = from.length, ar; i < l; i++) {
456
+ if (ar || !(i in from)) {
457
+ if (!ar)
458
+ ar = Array.prototype.slice.call(from, 0, i);
459
+ ar[i] = from[i];
460
+ }
461
+ }
462
+ return to.concat(ar || Array.prototype.slice.call(from));
463
+ }
464
+ function __await(v) {
465
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
466
+ }
467
+ function __asyncGenerator(thisArg, _arguments, generator) {
468
+ if (!Symbol.asyncIterator)
469
+ throw new TypeError("Symbol.asyncIterator is not defined.");
470
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
471
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
472
+ function verb(n) { if (g[n])
473
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
474
+ function resume(n, v) { try {
475
+ step(g[n](v));
476
+ }
477
+ catch (e) {
478
+ settle(q[0][3], e);
479
+ } }
480
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
481
+ function fulfill(value) { resume("next", value); }
482
+ function reject(value) { resume("throw", value); }
483
+ function settle(f, v) { if (f(v), q.shift(), q.length)
484
+ resume(q[0][0], q[0][1]); }
485
+ }
486
+ function __asyncDelegator(o) {
487
+ var i, p;
488
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
489
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
490
+ }
491
+ function __asyncValues(o) {
492
+ if (!Symbol.asyncIterator)
493
+ throw new TypeError("Symbol.asyncIterator is not defined.");
494
+ var m = o[Symbol.asyncIterator], i;
495
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
496
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
497
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
498
+ }
499
+ function __makeTemplateObject(cooked, raw) {
500
+ if (Object.defineProperty) {
501
+ Object.defineProperty(cooked, "raw", { value: raw });
502
+ }
503
+ else {
504
+ cooked.raw = raw;
505
+ }
506
+ return cooked;
507
+ }
508
+ ;
509
+ var __setModuleDefault = Object.create ? (function (o, v) {
510
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
511
+ }) : function (o, v) {
512
+ o["default"] = v;
513
+ };
514
+ function __importStar(mod) {
515
+ if (mod && mod.__esModule)
516
+ return mod;
517
+ var result = {};
518
+ if (mod != null)
519
+ for (var k in mod)
520
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
521
+ __createBinding(result, mod, k);
522
+ __setModuleDefault(result, mod);
523
+ return result;
524
+ }
525
+ function __importDefault(mod) {
526
+ return (mod && mod.__esModule) ? mod : { default: mod };
527
+ }
528
+ function __classPrivateFieldGet(receiver, state, kind, f) {
529
+ if (kind === "a" && !f)
530
+ throw new TypeError("Private accessor was defined without a getter");
531
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
532
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
533
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
534
+ }
535
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
536
+ if (kind === "m")
537
+ throw new TypeError("Private method is not writable");
538
+ if (kind === "a" && !f)
539
+ throw new TypeError("Private accessor was defined without a setter");
540
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
541
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
542
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
503
543
  }
504
544
 
505
- var LanguageLoader = /** @class */ (function () {
506
- function LanguageLoader(http, prefix, suffix, config) {
507
- if (suffix === void 0) { suffix = '.json'; }
508
- this.http = http;
509
- this.prefix = prefix;
510
- this.suffix = suffix;
511
- this.config = config;
512
- }
513
- LanguageLoader.prototype.getTranslation = function (lang) {
514
- var _this = this;
515
- var translation = require("../locale/" + lang + ".json");
516
- var igoLocale$ = rxjs.of(translation);
517
- if (this.config && !this.prefix) {
518
- var prefix = this.config.getConfig('language.prefix');
519
- this.prefix = !prefix || Array.isArray(prefix) ? prefix : [prefix];
520
- }
521
- if (!this.prefix || this.prefix.length === 0) {
522
- return igoLocale$;
523
- }
524
- var appLocale$ = this.prefix.map(function (prefix) { return _this.http.get("" + prefix + lang + _this.suffix); });
525
- var locale$ = rxjs.combineLatest(__spread([igoLocale$], appLocale$));
526
- return locale$.pipe(operators.map(function (translations) {
527
- return translations.reduce(function (acc, current) { return utils.ObjectUtils.mergeDeep(acc, current); }, {});
528
- }));
529
- };
530
- return LanguageLoader;
545
+ var LanguageLoader = /** @class */ (function () {
546
+ function LanguageLoader(http, prefix, suffix, config) {
547
+ if (suffix === void 0) { suffix = '.json'; }
548
+ this.http = http;
549
+ this.prefix = prefix;
550
+ this.suffix = suffix;
551
+ this.config = config;
552
+ }
553
+ LanguageLoader.prototype.getTranslation = function (lang) {
554
+ var _this = this;
555
+ var translation = require("../locale/" + lang + ".json");
556
+ var igoLocale$ = rxjs.of(translation);
557
+ if (this.config && !this.prefix) {
558
+ var prefix = this.config.getConfig('language.prefix');
559
+ this.prefix = !prefix || Array.isArray(prefix) ? prefix : [prefix];
560
+ }
561
+ if (!this.prefix || this.prefix.length === 0) {
562
+ return igoLocale$;
563
+ }
564
+ var appLocale$ = this.prefix.map(function (prefix) { return _this.http.get("" + prefix + lang + _this.suffix); });
565
+ var locale$ = rxjs.combineLatest(__spreadArray([igoLocale$], __read(appLocale$)));
566
+ return locale$.pipe(operators.map(function (translations) {
567
+ return translations.reduce(function (acc, current) { return utils.ObjectUtils.mergeDeep(acc, current); }, {});
568
+ }));
569
+ };
570
+ return LanguageLoader;
531
571
  }());
532
572
 
533
- function defaultLanguageLoader(http, config) {
534
- return new LanguageLoader(http, undefined, undefined, config);
535
- }
536
- function provideLanguageLoader(loader) {
537
- return {
538
- provide: i1.TranslateLoader,
539
- useFactory: loader || defaultLanguageLoader,
540
- deps: [http.HttpClient]
541
- };
542
- }
543
- function provideDefaultLanguageLoader(loader) {
544
- return {
545
- provide: i1.TranslateLoader,
546
- useFactory: loader || defaultLanguageLoader,
547
- deps: [http.HttpClient, ConfigService]
548
- };
573
+ function defaultLanguageLoader(http, config) {
574
+ return new LanguageLoader(http, undefined, undefined, config);
575
+ }
576
+ function provideLanguageLoader(loader) {
577
+ return {
578
+ provide: i1.TranslateLoader,
579
+ useFactory: loader || defaultLanguageLoader,
580
+ deps: [http.HttpClient]
581
+ };
582
+ }
583
+ function provideDefaultLanguageLoader(loader) {
584
+ return {
585
+ provide: i1.TranslateLoader,
586
+ useFactory: loader || defaultLanguageLoader,
587
+ deps: [http.HttpClient, ConfigService]
588
+ };
549
589
  }
550
590
 
551
- var IgoMissingTranslationHandler = /** @class */ (function () {
552
- function IgoMissingTranslationHandler() {
553
- }
554
- IgoMissingTranslationHandler.prototype.handle = function (params) {
555
- if (!params.translateService.langs.length) {
556
- var error = 'Translations are not yet loaded. \
557
- Check that the LanguageService is injected.';
558
- throw new Error(error);
559
- }
560
- if (params.key.substr(0, 4) === 'igo.') {
561
- throw new Error("The Key \"" + params.key + "\" is missing in locale file.");
562
- }
563
- else {
564
- return params.key;
565
- }
566
- };
567
- return IgoMissingTranslationHandler;
591
+ var IgoMissingTranslationHandler = /** @class */ (function () {
592
+ function IgoMissingTranslationHandler() {
593
+ }
594
+ IgoMissingTranslationHandler.prototype.handle = function (params) {
595
+ if (!params.translateService.langs.length) {
596
+ var error = 'Translations are not yet loaded. \
597
+ Check that the LanguageService is injected.';
598
+ throw new Error(error);
599
+ }
600
+ if (params.key.substr(0, 4) === 'igo.') {
601
+ throw new Error("The Key \"" + params.key + "\" is missing in locale file.");
602
+ }
603
+ else {
604
+ return params.key;
605
+ }
606
+ };
607
+ return IgoMissingTranslationHandler;
568
608
  }());
569
609
 
570
- var IgoLanguageModule = /** @class */ (function () {
571
- function IgoLanguageModule() {
572
- }
573
- IgoLanguageModule.forRoot = function () {
574
- return {
575
- ngModule: IgoLanguageModule,
576
- providers: [provideDefaultLanguageLoader()]
577
- };
578
- };
579
- return IgoLanguageModule;
580
- }());
581
- IgoLanguageModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoLanguageModule });
582
- IgoLanguageModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoLanguageModule_Factory(t) { return new (t || IgoLanguageModule)(); }, imports: [[
583
- i1.TranslateModule.forRoot({
584
- missingTranslationHandler: {
585
- provide: i1.MissingTranslationHandler,
586
- useClass: IgoMissingTranslationHandler
587
- }
588
- })
589
- ], i1.TranslateModule] });
590
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoLanguageModule, { imports: [i1.TranslateModule], exports: [i1.TranslateModule] }); })();
591
- /*@__PURE__*/ (function () {
592
- i0.ɵsetClassMetadata(IgoLanguageModule, [{
593
- type: i0.NgModule,
594
- args: [{
595
- imports: [
596
- i1.TranslateModule.forRoot({
597
- missingTranslationHandler: {
598
- provide: i1.MissingTranslationHandler,
599
- useClass: IgoMissingTranslationHandler
600
- }
601
- })
602
- ],
603
- declarations: [],
604
- exports: [i1.TranslateModule]
605
- }]
606
- }], null, null);
607
- })();
610
+ var IgoLanguageModule = /** @class */ (function () {
611
+ function IgoLanguageModule() {
612
+ }
613
+ IgoLanguageModule.forRoot = function () {
614
+ return {
615
+ ngModule: IgoLanguageModule,
616
+ providers: [provideDefaultLanguageLoader()]
617
+ };
618
+ };
619
+ return IgoLanguageModule;
620
+ }());
621
+ IgoLanguageModule.ɵfac = function IgoLanguageModule_Factory(t) { return new (t || IgoLanguageModule)(); };
622
+ IgoLanguageModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoLanguageModule });
623
+ IgoLanguageModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[
624
+ i1.TranslateModule.forRoot({
625
+ missingTranslationHandler: {
626
+ provide: i1.MissingTranslationHandler,
627
+ useClass: IgoMissingTranslationHandler
628
+ }
629
+ })
630
+ ], i1.TranslateModule] });
631
+ (function () {
632
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoLanguageModule, [{
633
+ type: i0.NgModule,
634
+ args: [{
635
+ imports: [
636
+ i1.TranslateModule.forRoot({
637
+ missingTranslationHandler: {
638
+ provide: i1.MissingTranslationHandler,
639
+ useClass: IgoMissingTranslationHandler
640
+ }
641
+ })
642
+ ],
643
+ declarations: [],
644
+ exports: [i1.TranslateModule]
645
+ }]
646
+ }], null, null);
647
+ })();
648
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoLanguageModule, { imports: [i1__namespace.TranslateModule], exports: [i1.TranslateModule] }); })();
608
649
 
609
- var _c0 = function (a0) { return { closeIcon: a0 }; };
610
- var MessageCenterComponent = /** @class */ (function () {
611
- function MessageCenterComponent() {
612
- this._options = {};
613
- }
614
- Object.defineProperty(MessageCenterComponent.prototype, "options", {
615
- get: function () {
616
- return Object.assign({}, MessageCenterComponent.defaultOptions, this._options);
617
- },
618
- set: function (value) {
619
- this._options = value;
620
- },
621
- enumerable: false,
622
- configurable: true
623
- });
624
- return MessageCenterComponent;
625
- }());
626
- MessageCenterComponent.defaultOptions = {
627
- timeOut: 5000,
628
- hasCloseIcon: false,
629
- showProgressBar: true,
630
- pauseOnHover: true,
631
- clickToClose: true,
632
- maxLength: 100,
633
- maxStack: 3,
634
- preventDuplicates: true
635
- };
636
- MessageCenterComponent.ɵfac = function MessageCenterComponent_Factory(t) { return new (t || MessageCenterComponent)(); };
637
- MessageCenterComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MessageCenterComponent, selectors: [["igo-message-center"]], inputs: { options: "options" }, decls: 1, vars: 4, consts: [[1, "mat-typography", 3, "ngClass", "options"]], template: function MessageCenterComponent_Template(rf, ctx) {
638
- if (rf & 1) {
639
- i0.ɵɵelement(0, "simple-notifications", 0);
640
- }
641
- if (rf & 2) {
642
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0, ctx.options.hasCloseIcon))("options", ctx.options);
643
- }
644
- }, directives: [i1$1.SimpleNotificationsComponent, i2.NgClass], styles: ["@charset \"UTF-8\";[_nghost-%COMP%] div.simple-notification-wrapper{bottom:0;right:calc(50% - 150px)}@media only screen and (orientation:landscape) and (max-width:959px),only screen and (orientation:portrait) and (max-width:599px){[_nghost-%COMP%] div.simple-notification-wrapper{left:0;right:0;width:100%}}[_nghost-%COMP%] div.simple-notification{margin-bottom:5px;min-height:50px;padding-left:45px;padding-right:25px}[_nghost-%COMP%] div.simple-notification.noIcon{padding-left:25px}@media only screen and (orientation:landscape) and (max-width:959px),only screen and (orientation:portrait) and (max-width:599px){[_nghost-%COMP%] div.simple-notification{margin-bottom:0}}[_nghost-%COMP%] div.simple-notification .sn-title{font-size:15px;font-weight:700;line-height:23px}[_nghost-%COMP%] div.simple-notification .sn-content{font-size:15px;line-height:18px}[_nghost-%COMP%] div.simple-notification .icon{height:100%;left:0;padding:7px;top:0;width:45px}[_nghost-%COMP%] div.simple-notification .icon\u00A0 mat-icon{align-items:center;display:flex;font-size:32px;height:100%}[_nghost-%COMP%] .closeIcon .sn-title:after{content:\"close\";font-family:Material Icons;font-feature-settings:\"liga\" 1;font-size:24px;font-weight:400;position:absolute;right:5px;top:5px}"] });
645
- /*@__PURE__*/ (function () {
646
- i0.ɵsetClassMetadata(MessageCenterComponent, [{
647
- type: i0.Component,
648
- args: [{
649
- selector: 'igo-message-center',
650
- templateUrl: './message-center.component.html',
651
- styleUrls: ['./message-center.component.scss']
652
- }]
653
- }], function () { return []; }, { options: [{
654
- type: i0.Input
655
- }] });
650
+ var _c0 = function (a0) { return { closeIcon: a0 }; };
651
+ var MessageCenterComponent = /** @class */ (function () {
652
+ function MessageCenterComponent() {
653
+ this._options = {};
654
+ }
655
+ Object.defineProperty(MessageCenterComponent.prototype, "options", {
656
+ get: function () {
657
+ return Object.assign({}, MessageCenterComponent.defaultOptions, this._options);
658
+ },
659
+ set: function (value) {
660
+ this._options = value;
661
+ },
662
+ enumerable: false,
663
+ configurable: true
664
+ });
665
+ return MessageCenterComponent;
666
+ }());
667
+ MessageCenterComponent.defaultOptions = {
668
+ timeOut: 5000,
669
+ hasCloseIcon: false,
670
+ showProgressBar: true,
671
+ pauseOnHover: true,
672
+ clickToClose: true,
673
+ maxLength: 100,
674
+ maxStack: 3,
675
+ preventDuplicates: true
676
+ };
677
+ MessageCenterComponent.ɵfac = function MessageCenterComponent_Factory(t) { return new (t || MessageCenterComponent)(); };
678
+ MessageCenterComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: MessageCenterComponent, selectors: [["igo-message-center"]], inputs: { options: "options" }, decls: 1, vars: 4, consts: [[1, "mat-typography", 3, "ngClass", "options"]], template: function MessageCenterComponent_Template(rf, ctx) {
679
+ if (rf & 1) {
680
+ i0__namespace.ɵɵelement(0, "simple-notifications", 0);
681
+ }
682
+ if (rf & 2) {
683
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0, ctx.options.hasCloseIcon))("options", ctx.options);
684
+ }
685
+ }, directives: [i1__namespace$1.SimpleNotificationsComponent, i2__namespace.NgClass], styles: ["[_nghost-%COMP%] div.simple-notification-wrapper{bottom:0;right:calc(50% - 150px)}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){[_nghost-%COMP%] div.simple-notification-wrapper{right:0;left:0;width:100%}}[_nghost-%COMP%] .closeIcon .sn-title:after{content:\"close\";font-family:\"Material Icons\";font-feature-settings:\"liga\" 1;font-size:24px;font-weight:normal;right:5px;top:5px;position:absolute}[_nghost-%COMP%] .simple-notification .icon{top:0;left:0;width:45px;height:45px;height:100%;padding:7px}[_nghost-%COMP%] .simple-notification .icon mat-icon{display:flex;align-items:center;height:100%;font-size:32px}[_nghost-%COMP%] div.simple-notification{min-height:50px;margin-bottom:5px;padding-left:45px;padding-right:25px}[_nghost-%COMP%] div.simple-notification.noIcon{padding-left:25px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){[_nghost-%COMP%] div.simple-notification{margin-bottom:0}}[_nghost-%COMP%] div.simple-notification .sn-title{line-height:23px;font-size:15px;font-weight:bold}[_nghost-%COMP%] div.simple-notification .sn-content{line-height:18px;font-size:15px}"] });
686
+ (function () {
687
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MessageCenterComponent, [{
688
+ type: i0.Component,
689
+ args: [{
690
+ selector: 'igo-message-center',
691
+ templateUrl: './message-center.component.html',
692
+ styleUrls: ['./message-center.component.scss']
693
+ }]
694
+ }], function () { return []; }, { options: [{
695
+ type: i0.Input
696
+ }] });
656
697
  })();
657
698
 
658
- var IgoMessageModule = /** @class */ (function () {
659
- function IgoMessageModule() {
660
- }
661
- IgoMessageModule.forRoot = function () {
662
- return {
663
- ngModule: IgoMessageModule,
664
- providers: []
665
- };
666
- };
667
- return IgoMessageModule;
668
- }());
669
- IgoMessageModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoMessageModule });
670
- IgoMessageModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoMessageModule_Factory(t) { return new (t || IgoMessageModule)(); }, imports: [[i2.CommonModule, i1$1.SimpleNotificationsModule.forRoot()]] });
671
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoMessageModule, { declarations: [MessageCenterComponent], imports: [i2.CommonModule, i1$1.SimpleNotificationsModule], exports: [MessageCenterComponent] }); })();
672
- /*@__PURE__*/ (function () {
673
- i0.ɵsetClassMetadata(IgoMessageModule, [{
674
- type: i0.NgModule,
675
- args: [{
676
- imports: [i2.CommonModule, i1$1.SimpleNotificationsModule.forRoot()],
677
- declarations: [MessageCenterComponent],
678
- exports: [MessageCenterComponent]
679
- }]
680
- }], null, null);
681
- })();
699
+ var IgoMessageModule = /** @class */ (function () {
700
+ function IgoMessageModule() {
701
+ }
702
+ IgoMessageModule.forRoot = function () {
703
+ return {
704
+ ngModule: IgoMessageModule,
705
+ providers: []
706
+ };
707
+ };
708
+ return IgoMessageModule;
709
+ }());
710
+ IgoMessageModule.ɵfac = function IgoMessageModule_Factory(t) { return new (t || IgoMessageModule)(); };
711
+ IgoMessageModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoMessageModule });
712
+ IgoMessageModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[i2.CommonModule, i1$1.SimpleNotificationsModule.forRoot()]] });
713
+ (function () {
714
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoMessageModule, [{
715
+ type: i0.NgModule,
716
+ args: [{
717
+ imports: [i2.CommonModule, i1$1.SimpleNotificationsModule.forRoot()],
718
+ declarations: [MessageCenterComponent],
719
+ exports: [MessageCenterComponent]
720
+ }]
721
+ }], null, null);
722
+ })();
723
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoMessageModule, { declarations: [MessageCenterComponent], imports: [i2.CommonModule, i1__namespace$1.SimpleNotificationsModule], exports: [MessageCenterComponent] }); })();
682
724
 
683
- var LanguageService = /** @class */ (function () {
684
- function LanguageService(translate) {
685
- this.translate = translate;
686
- this.language = this.translate.getBrowserLang();
687
- var lang = this.getLanguage();
688
- this.translate.setDefaultLang(lang);
689
- }
690
- LanguageService.prototype.getLanguage = function () {
691
- return this.language.match(/en|fr/) ? this.language : 'en';
692
- };
693
- LanguageService.prototype.setLanguage = function (language) {
694
- this.language = language.match(/en|fr/) ? language : 'en';
695
- this.translate.use(this.language);
696
- this.translate.reloadLang(this.language);
697
- };
698
- return LanguageService;
699
- }());
700
- LanguageService.ɵfac = function LanguageService_Factory(t) { return new (t || LanguageService)(i0.ɵɵinject(i1.TranslateService)); };
701
- LanguageService.ɵprov = i0.ɵɵdefineInjectable({ token: LanguageService, factory: LanguageService.ɵfac, providedIn: 'root' });
702
- /*@__PURE__*/ (function () {
703
- i0.ɵsetClassMetadata(LanguageService, [{
704
- type: i0.Injectable,
705
- args: [{
706
- providedIn: 'root'
707
- }]
708
- }], function () { return [{ type: i1.TranslateService }]; }, null);
725
+ var LanguageService = /** @class */ (function () {
726
+ function LanguageService(translate) {
727
+ this.translate = translate;
728
+ this.language = this.translate.getBrowserLang();
729
+ var lang = this.getLanguage();
730
+ this.translate.setDefaultLang(lang);
731
+ }
732
+ LanguageService.prototype.getLanguage = function () {
733
+ return this.language.match(/en|fr/) ? this.language : 'en';
734
+ };
735
+ LanguageService.prototype.setLanguage = function (language) {
736
+ this.language = language.match(/en|fr/) ? language : 'en';
737
+ this.translate.use(this.language);
738
+ this.translate.reloadLang(this.language);
739
+ };
740
+ return LanguageService;
741
+ }());
742
+ LanguageService.ɵfac = function LanguageService_Factory(t) { return new (t || LanguageService)(i0__namespace.ɵɵinject(i1__namespace.TranslateService)); };
743
+ LanguageService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: LanguageService, factory: LanguageService.ɵfac, providedIn: 'root' });
744
+ (function () {
745
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LanguageService, [{
746
+ type: i0.Injectable,
747
+ args: [{
748
+ providedIn: 'root'
749
+ }]
750
+ }], function () { return [{ type: i1__namespace.TranslateService }]; }, null);
709
751
  })();
710
752
 
711
- (function (MessageType) {
712
- MessageType["ERROR"] = "error";
713
- MessageType["ALERT"] = "alert";
714
- MessageType["INFO"] = "info";
715
- MessageType["SUCCESS"] = "success";
753
+ exports.MessageType = void 0;
754
+ (function (MessageType) {
755
+ MessageType["ERROR"] = "error";
756
+ MessageType["ALERT"] = "alert";
757
+ MessageType["INFO"] = "info";
758
+ MessageType["SUCCESS"] = "success";
716
759
  })(exports.MessageType || (exports.MessageType = {}));
717
760
 
718
- var MessageService = /** @class */ (function () {
719
- function MessageService(notificationService, configService) {
720
- this.notificationService = notificationService;
721
- this.configService = configService;
722
- this.messages$ = new rxjs.BehaviorSubject([]);
723
- this.options = this.configService.getConfig('message') || {};
724
- }
725
- MessageService.prototype.showError = function (httpError) {
726
- httpError.error.caught = true;
727
- return this.error(httpError.error.message, httpError.error.title);
728
- };
729
- MessageService.prototype.message = function (message) {
730
- this.messages$.next(this.messages$.value.concat([message]));
731
- message.options = message.options || {};
732
- var currentDate = new Date();
733
- message.options.from = message.options.from ? message.options.from : new Date('1 jan 1900');
734
- message.options.to = message.options.to ? message.options.to : new Date('1 jan 3000');
735
- if (typeof message.options.from === 'string') {
736
- message.options.from = new Date(Date.parse(message.options.from.replace(/-/g, ' ')));
737
- }
738
- if (typeof message.options.to === 'string') {
739
- message.options.to = new Date(Date.parse(message.options.to.replace(/-/g, ' ')));
740
- }
741
- if (currentDate > message.options.from && currentDate < message.options.to) {
742
- message = this.handleTemplate(message);
743
- var notification = void 0;
744
- if (message.text) {
745
- notification = this.notificationService.create(message.title, message.text, message.type, message.options);
746
- }
747
- else if (message.html) {
748
- if (!message.icon) {
749
- message.options.theClass = message.options.theClass
750
- ? message.options.theClass + ' noIcon'
751
- : 'noIcon';
752
- }
753
- notification = this.notificationService.html(message.html, message.type, message.options);
754
- }
755
- else {
756
- return;
757
- }
758
- if (message.icon !== undefined) {
759
- this.addIcon(notification, message.icon);
760
- }
761
- message.options.id = notification.id;
762
- return notification;
763
- }
764
- return;
765
- };
766
- MessageService.prototype.success = function (text, title, options) {
767
- if (options === void 0) { options = {}; }
768
- return this.message({
769
- text: text,
770
- title: title,
771
- icon: options.icon || 'check',
772
- options: options,
773
- type: exports.MessageType.SUCCESS
774
- });
775
- };
776
- MessageService.prototype.error = function (text, title, options) {
777
- if (options === void 0) { options = {}; }
778
- return this.message({
779
- text: text,
780
- title: title,
781
- icon: options.icon || 'error_outline',
782
- options: options,
783
- type: exports.MessageType.ERROR
784
- });
785
- };
786
- MessageService.prototype.info = function (text, title, options) {
787
- if (options === void 0) { options = {}; }
788
- return this.message({
789
- text: text,
790
- title: title,
791
- icon: options.icon || 'info_outline',
792
- options: options,
793
- type: exports.MessageType.INFO
794
- });
795
- };
796
- MessageService.prototype.alert = function (text, title, options) {
797
- if (options === void 0) { options = {}; }
798
- return this.message({
799
- text: text,
800
- title: title,
801
- icon: options.icon || 'access_alarm',
802
- options: options,
803
- type: exports.MessageType.ALERT
804
- });
805
- };
806
- MessageService.prototype.remove = function (id) {
807
- this.notificationService.remove(id);
808
- };
809
- MessageService.prototype.removeAllAreNotError = function () {
810
- var e_1, _a;
811
- try {
812
- for (var _b = __values(this.messages$.value), _c = _b.next(); !_c.done; _c = _b.next()) {
813
- var mess = _c.value;
814
- if (mess.type !== 'error') {
815
- this.remove(mess.options.id);
816
- }
817
- }
818
- }
819
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
820
- finally {
821
- try {
822
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
823
- }
824
- finally { if (e_1) throw e_1.error; }
825
- }
826
- };
827
- MessageService.prototype.addIcon = function (notification, icon) {
828
- // There is no way to add an icon to a notification when reating
829
- // it so we simply set it on the notification directly.
830
- // See https://github.com/flauc/angular2-notifications/issues/165
831
- notification.icon = "\n <mat-icon class=\"material-icons mat-icon mat-list-avatar\" svgIcon=\"" + icon + "\">\n </mat-icon>";
832
- };
833
- MessageService.prototype.handleTemplate = function (message) {
834
- if (!this.options.template || message.html) {
835
- return message;
836
- }
837
- var html = this.options.template;
838
- html = html.replace('${text}', message.text);
839
- html = html.replace('${title}', message.title);
840
- html = html.replace('${icon}', message.icon);
841
- message.html = html;
842
- message.text = undefined;
843
- message.title = undefined;
844
- message.icon = undefined;
845
- return message;
846
- };
847
- return MessageService;
848
- }());
849
- MessageService.ɵfac = function MessageService_Factory(t) { return new (t || MessageService)(i0.ɵɵinject(i1$1.NotificationsService), i0.ɵɵinject(ConfigService)); };
850
- MessageService.ɵprov = i0.ɵɵdefineInjectable({ token: MessageService, factory: MessageService.ɵfac, providedIn: 'root' });
851
- /*@__PURE__*/ (function () {
852
- i0.ɵsetClassMetadata(MessageService, [{
853
- type: i0.Injectable,
854
- args: [{
855
- providedIn: 'root'
856
- }]
857
- }], function () { return [{ type: i1$1.NotificationsService }, { type: ConfigService }]; }, null);
761
+ var MessageService = /** @class */ (function () {
762
+ function MessageService(notificationService, configService) {
763
+ this.notificationService = notificationService;
764
+ this.configService = configService;
765
+ this.messages$ = new rxjs.BehaviorSubject([]);
766
+ this.options = this.configService.getConfig('message') || {};
767
+ }
768
+ MessageService.prototype.showError = function (httpError) {
769
+ httpError.error.caught = true;
770
+ return this.error(httpError.error.message, httpError.error.title);
771
+ };
772
+ MessageService.prototype.message = function (message) {
773
+ this.messages$.next(this.messages$.value.concat([message]));
774
+ message.options = message.options || {};
775
+ var currentDate = new Date();
776
+ message.options.from = message.options.from ? message.options.from : new Date('1 jan 1900');
777
+ message.options.to = message.options.to ? message.options.to : new Date('1 jan 3000');
778
+ if (typeof message.options.from === 'string') {
779
+ message.options.from = new Date(Date.parse(message.options.from.replace(/-/g, ' ')));
780
+ }
781
+ if (typeof message.options.to === 'string') {
782
+ message.options.to = new Date(Date.parse(message.options.to.replace(/-/g, ' ')));
783
+ }
784
+ if (currentDate > message.options.from && currentDate < message.options.to) {
785
+ message = this.handleTemplate(message);
786
+ var notification = void 0;
787
+ if (message.text) {
788
+ notification = this.notificationService.create(message.title, message.text, message.type, message.options);
789
+ }
790
+ else if (message.html) {
791
+ if (!message.icon) {
792
+ message.options.theClass = message.options.theClass
793
+ ? message.options.theClass + ' noIcon'
794
+ : 'noIcon';
795
+ }
796
+ notification = this.notificationService.html(message.html, message.type, message.options);
797
+ }
798
+ else {
799
+ return;
800
+ }
801
+ if (message.icon !== undefined) {
802
+ this.addIcon(notification, message.icon);
803
+ }
804
+ message.options.id = notification.id;
805
+ return notification;
806
+ }
807
+ return;
808
+ };
809
+ MessageService.prototype.success = function (text, title, options) {
810
+ if (options === void 0) { options = {}; }
811
+ return this.message({
812
+ text: text,
813
+ title: title,
814
+ icon: options.icon || 'check',
815
+ options: options,
816
+ type: exports.MessageType.SUCCESS
817
+ });
818
+ };
819
+ MessageService.prototype.error = function (text, title, options) {
820
+ if (options === void 0) { options = {}; }
821
+ return this.message({
822
+ text: text,
823
+ title: title,
824
+ icon: options.icon || 'error_outline',
825
+ options: options,
826
+ type: exports.MessageType.ERROR
827
+ });
828
+ };
829
+ MessageService.prototype.info = function (text, title, options) {
830
+ if (options === void 0) { options = {}; }
831
+ return this.message({
832
+ text: text,
833
+ title: title,
834
+ icon: options.icon || 'info_outline',
835
+ options: options,
836
+ type: exports.MessageType.INFO
837
+ });
838
+ };
839
+ MessageService.prototype.alert = function (text, title, options) {
840
+ if (options === void 0) { options = {}; }
841
+ return this.message({
842
+ text: text,
843
+ title: title,
844
+ icon: options.icon || 'access_alarm',
845
+ options: options,
846
+ type: exports.MessageType.ALERT
847
+ });
848
+ };
849
+ MessageService.prototype.remove = function (id) {
850
+ this.notificationService.remove(id);
851
+ };
852
+ MessageService.prototype.removeAllAreNotError = function () {
853
+ var e_1, _a;
854
+ try {
855
+ for (var _b = __values(this.messages$.value), _c = _b.next(); !_c.done; _c = _b.next()) {
856
+ var mess = _c.value;
857
+ if (mess.type !== 'error') {
858
+ this.remove(mess.options.id);
859
+ }
860
+ }
861
+ }
862
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
863
+ finally {
864
+ try {
865
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
866
+ }
867
+ finally { if (e_1) throw e_1.error; }
868
+ }
869
+ };
870
+ MessageService.prototype.addIcon = function (notification, icon) {
871
+ // There is no way to add an icon to a notification when reating
872
+ // it so we simply set it on the notification directly.
873
+ // See https://github.com/flauc/angular2-notifications/issues/165
874
+ notification.icon = "\n <mat-icon class=\"material-icons mat-icon mat-list-avatar\" svgIcon=\"" + icon + "\">\n </mat-icon>";
875
+ };
876
+ MessageService.prototype.handleTemplate = function (message) {
877
+ if (!this.options.template || message.html) {
878
+ return message;
879
+ }
880
+ var html = this.options.template;
881
+ html = html.replace('${text}', message.text);
882
+ html = html.replace('${title}', message.title);
883
+ html = html.replace('${icon}', message.icon);
884
+ message.html = html;
885
+ message.text = undefined;
886
+ message.title = undefined;
887
+ message.icon = undefined;
888
+ return message;
889
+ };
890
+ return MessageService;
891
+ }());
892
+ MessageService.ɵfac = function MessageService_Factory(t) { return new (t || MessageService)(i0__namespace.ɵɵinject(i1__namespace$1.NotificationsService), i0__namespace.ɵɵinject(ConfigService)); };
893
+ MessageService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: MessageService, factory: MessageService.ɵfac, providedIn: 'root' });
894
+ (function () {
895
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MessageService, [{
896
+ type: i0.Injectable,
897
+ args: [{
898
+ providedIn: 'root'
899
+ }]
900
+ }], function () { return [{ type: i1__namespace$1.NotificationsService }, { type: ConfigService }]; }, null);
858
901
  })();
859
902
 
860
- var ErrorInterceptor = /** @class */ (function () {
861
- function ErrorInterceptor(messageService, injector) {
862
- this.messageService = messageService;
863
- this.injector = injector;
864
- }
865
- ErrorInterceptor.prototype.intercept = function (req, next) {
866
- var _this = this;
867
- var errorContainer = { httpError: undefined };
868
- return next.handle(req).pipe(operators.catchError(function (error) { return _this.handleError(error, errorContainer); }), operators.finalize(function () {
869
- _this.handleCaughtError(errorContainer);
870
- _this.handleUncaughtError(errorContainer);
871
- }));
872
- };
873
- ErrorInterceptor.prototype.handleError = function (httpError, errorContainer) {
874
- if (httpError instanceof http.HttpErrorResponse) {
875
- var errorObj = httpError.error === 'object' ? httpError.error : {};
876
- errorObj.message = httpError.error.message || httpError.statusText;
877
- errorObj.caught = false;
878
- httpError = new http.HttpErrorResponse({
879
- error: errorObj,
880
- headers: httpError.headers,
881
- status: httpError.status,
882
- statusText: httpError.statusText,
883
- url: httpError.url
884
- });
885
- }
886
- errorContainer.httpError = httpError;
887
- return rxjs.throwError(httpError);
888
- };
889
- ErrorInterceptor.prototype.handleCaughtError = function (errorContainer) {
890
- var httpError = errorContainer.httpError;
891
- if (httpError && httpError.error.toDisplay) {
892
- httpError.error.caught = true;
893
- this.messageService.error(httpError.error.message, httpError.error.title);
894
- }
895
- };
896
- ErrorInterceptor.prototype.handleUncaughtError = function (errorContainer) {
897
- var httpError = errorContainer.httpError;
898
- if (httpError && !httpError.error.caught) {
899
- var translate = this.injector.get(LanguageService).translate;
900
- var message = translate.instant('igo.core.errors.uncaught.message');
901
- var title = translate.instant('igo.core.errors.uncaught.title');
902
- httpError.error.caught = true;
903
- this.messageService.error(message, title);
904
- }
905
- };
906
- return ErrorInterceptor;
907
- }());
908
- ErrorInterceptor.ɵfac = function ErrorInterceptor_Factory(t) { return new (t || ErrorInterceptor)(i0.ɵɵinject(MessageService), i0.ɵɵinject(i0.Injector)); };
909
- ErrorInterceptor.ɵprov = i0.ɵɵdefineInjectable({ token: ErrorInterceptor, factory: ErrorInterceptor.ɵfac, providedIn: 'root' });
910
- /*@__PURE__*/ (function () {
911
- i0.ɵsetClassMetadata(ErrorInterceptor, [{
912
- type: i0.Injectable,
913
- args: [{
914
- providedIn: 'root'
915
- }]
916
- }], function () { return [{ type: MessageService }, { type: i0.Injector }]; }, null);
903
+ var ErrorInterceptor = /** @class */ (function () {
904
+ function ErrorInterceptor(messageService, injector) {
905
+ this.messageService = messageService;
906
+ this.injector = injector;
907
+ }
908
+ ErrorInterceptor.prototype.intercept = function (req, next) {
909
+ var _this = this;
910
+ var errorContainer = { httpError: undefined };
911
+ return next.handle(req).pipe(operators.catchError(function (error) { return _this.handleError(error, errorContainer); }), operators.finalize(function () {
912
+ _this.handleCaughtError(errorContainer);
913
+ _this.handleUncaughtError(errorContainer);
914
+ }));
915
+ };
916
+ ErrorInterceptor.prototype.handleError = function (httpError, errorContainer) {
917
+ if (httpError instanceof http.HttpErrorResponse) {
918
+ var errorObj = httpError.error === 'object' ? httpError.error : {};
919
+ errorObj.message = httpError.error.message || httpError.statusText;
920
+ errorObj.caught = false;
921
+ httpError = new http.HttpErrorResponse({
922
+ error: errorObj,
923
+ headers: httpError.headers,
924
+ status: httpError.status,
925
+ statusText: httpError.statusText,
926
+ url: httpError.url
927
+ });
928
+ }
929
+ errorContainer.httpError = httpError;
930
+ return rxjs.throwError(httpError);
931
+ };
932
+ ErrorInterceptor.prototype.handleCaughtError = function (errorContainer) {
933
+ var httpError = errorContainer.httpError;
934
+ if (httpError && httpError.error.toDisplay) {
935
+ httpError.error.caught = true;
936
+ this.messageService.error(httpError.error.message, httpError.error.title);
937
+ }
938
+ };
939
+ ErrorInterceptor.prototype.handleUncaughtError = function (errorContainer) {
940
+ var httpError = errorContainer.httpError;
941
+ if (httpError && !httpError.error.caught) {
942
+ var translate = this.injector.get(LanguageService).translate;
943
+ var message = translate.instant('igo.core.errors.uncaught.message');
944
+ var title = translate.instant('igo.core.errors.uncaught.title');
945
+ httpError.error.caught = true;
946
+ this.messageService.error(message, title);
947
+ }
948
+ };
949
+ return ErrorInterceptor;
950
+ }());
951
+ ErrorInterceptor.ɵfac = function ErrorInterceptor_Factory(t) { return new (t || ErrorInterceptor)(i0__namespace.ɵɵinject(MessageService), i0__namespace.ɵɵinject(i0__namespace.Injector)); };
952
+ ErrorInterceptor.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ErrorInterceptor, factory: ErrorInterceptor.ɵfac, providedIn: 'root' });
953
+ (function () {
954
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ErrorInterceptor, [{
955
+ type: i0.Injectable,
956
+ args: [{
957
+ providedIn: 'root'
958
+ }]
959
+ }], function () { return [{ type: MessageService }, { type: i0__namespace.Injector }]; }, null);
917
960
  })();
918
961
 
919
- var IgoErrorModule = /** @class */ (function () {
920
- function IgoErrorModule(parentModule) {
921
- if (parentModule) {
922
- throw new Error('IgoErrorModule is already loaded. Import it in the AppModule only');
923
- }
924
- }
925
- IgoErrorModule.forRoot = function () {
926
- return {
927
- ngModule: IgoErrorModule,
928
- providers: [
929
- {
930
- provide: http.HTTP_INTERCEPTORS,
931
- useClass: ErrorInterceptor,
932
- multi: true
933
- }
934
- ]
935
- };
936
- };
937
- return IgoErrorModule;
938
- }());
939
- IgoErrorModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoErrorModule });
940
- IgoErrorModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoErrorModule_Factory(t) { return new (t || IgoErrorModule)(i0.ɵɵinject(IgoErrorModule, 12)); }, imports: [[]] });
941
- /*@__PURE__*/ (function () {
942
- i0.ɵsetClassMetadata(IgoErrorModule, [{
943
- type: i0.NgModule,
944
- args: [{
945
- imports: [],
946
- declarations: [],
947
- exports: []
948
- }]
949
- }], function () {
950
- return [{ type: IgoErrorModule, decorators: [{
951
- type: i0.Optional
952
- }, {
953
- type: i0.SkipSelf
954
- }] }];
955
- }, null);
962
+ var IgoErrorModule = /** @class */ (function () {
963
+ function IgoErrorModule(parentModule) {
964
+ if (parentModule) {
965
+ throw new Error('IgoErrorModule is already loaded. Import it in the AppModule only');
966
+ }
967
+ }
968
+ IgoErrorModule.forRoot = function () {
969
+ return {
970
+ ngModule: IgoErrorModule,
971
+ providers: [
972
+ {
973
+ provide: http.HTTP_INTERCEPTORS,
974
+ useClass: ErrorInterceptor,
975
+ multi: true
976
+ }
977
+ ]
978
+ };
979
+ };
980
+ return IgoErrorModule;
981
+ }());
982
+ IgoErrorModule.ɵfac = function IgoErrorModule_Factory(t) { return new (t || IgoErrorModule)(i0__namespace.ɵɵinject(IgoErrorModule, 12)); };
983
+ IgoErrorModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoErrorModule });
984
+ IgoErrorModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[]] });
985
+ (function () {
986
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoErrorModule, [{
987
+ type: i0.NgModule,
988
+ args: [{
989
+ imports: [],
990
+ declarations: [],
991
+ exports: []
992
+ }]
993
+ }], function () {
994
+ return [{ type: IgoErrorModule, decorators: [{
995
+ type: i0.Optional
996
+ }, {
997
+ type: i0.SkipSelf
998
+ }] }];
999
+ }, null);
956
1000
  })();
957
1001
 
958
- var IgoCoreModule = /** @class */ (function () {
959
- function IgoCoreModule(matIconRegistry, domSanitizer) {
960
- matIconRegistry.addSvgIconSet(domSanitizer.bypassSecurityTrustResourceUrl('./assets/igo2/core/icons/mdi.svg'));
961
- }
962
- IgoCoreModule.forRoot = function () {
963
- return {
964
- ngModule: IgoCoreModule,
965
- providers: []
966
- };
967
- };
968
- return IgoCoreModule;
969
- }());
970
- IgoCoreModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoCoreModule });
971
- IgoCoreModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoCoreModule_Factory(t) { return new (t || IgoCoreModule)(i0.ɵɵinject(i6.MatIconRegistry), i0.ɵɵinject(i7.DomSanitizer)); }, imports: [[
972
- i2.CommonModule,
973
- http.HttpClientModule,
974
- IgoActivityModule.forRoot(),
975
- IgoConfigModule.forRoot(),
976
- IgoErrorModule.forRoot(),
977
- IgoLanguageModule.forRoot(),
978
- IgoMessageModule.forRoot()
979
- ], IgoActivityModule,
980
- IgoConfigModule,
981
- IgoErrorModule,
982
- IgoLanguageModule,
983
- IgoMessageModule] });
984
- (function () {
985
- (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoCoreModule, { imports: [i2.CommonModule,
986
- http.HttpClientModule, IgoActivityModule, IgoConfigModule, IgoErrorModule, IgoLanguageModule, IgoMessageModule], exports: [IgoActivityModule,
987
- IgoConfigModule,
988
- IgoErrorModule,
989
- IgoLanguageModule,
990
- IgoMessageModule] });
991
- })();
992
- /*@__PURE__*/ (function () {
993
- i0.ɵsetClassMetadata(IgoCoreModule, [{
994
- type: i0.NgModule,
995
- args: [{
996
- imports: [
997
- i2.CommonModule,
998
- http.HttpClientModule,
999
- IgoActivityModule.forRoot(),
1000
- IgoConfigModule.forRoot(),
1001
- IgoErrorModule.forRoot(),
1002
- IgoLanguageModule.forRoot(),
1003
- IgoMessageModule.forRoot()
1004
- ],
1005
- declarations: [],
1006
- exports: [
1007
- IgoActivityModule,
1008
- IgoConfigModule,
1009
- IgoErrorModule,
1010
- IgoLanguageModule,
1011
- IgoMessageModule
1012
- ]
1013
- }]
1014
- }], function () { return [{ type: i6.MatIconRegistry }, { type: i7.DomSanitizer }]; }, null);
1002
+ var IgoCoreModule = /** @class */ (function () {
1003
+ function IgoCoreModule(matIconRegistry, domSanitizer) {
1004
+ matIconRegistry.addSvgIconSet(domSanitizer.bypassSecurityTrustResourceUrl('./assets/igo2/core/icons/mdi.svg'));
1005
+ }
1006
+ IgoCoreModule.forRoot = function () {
1007
+ return {
1008
+ ngModule: IgoCoreModule,
1009
+ providers: []
1010
+ };
1011
+ };
1012
+ return IgoCoreModule;
1013
+ }());
1014
+ IgoCoreModule.ɵfac = function IgoCoreModule_Factory(t) { return new (t || IgoCoreModule)(i0__namespace.ɵɵinject(i1__namespace$2.MatIconRegistry), i0__namespace.ɵɵinject(i2__namespace$1.DomSanitizer)); };
1015
+ IgoCoreModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoCoreModule });
1016
+ IgoCoreModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[
1017
+ i2.CommonModule,
1018
+ http.HttpClientModule,
1019
+ IgoActivityModule.forRoot(),
1020
+ IgoConfigModule.forRoot(),
1021
+ IgoErrorModule.forRoot(),
1022
+ IgoLanguageModule.forRoot(),
1023
+ IgoMessageModule.forRoot()
1024
+ ], IgoActivityModule,
1025
+ IgoConfigModule,
1026
+ IgoErrorModule,
1027
+ IgoLanguageModule,
1028
+ IgoMessageModule] });
1029
+ (function () {
1030
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoCoreModule, [{
1031
+ type: i0.NgModule,
1032
+ args: [{
1033
+ imports: [
1034
+ i2.CommonModule,
1035
+ http.HttpClientModule,
1036
+ IgoActivityModule.forRoot(),
1037
+ IgoConfigModule.forRoot(),
1038
+ IgoErrorModule.forRoot(),
1039
+ IgoLanguageModule.forRoot(),
1040
+ IgoMessageModule.forRoot()
1041
+ ],
1042
+ declarations: [],
1043
+ exports: [
1044
+ IgoActivityModule,
1045
+ IgoConfigModule,
1046
+ IgoErrorModule,
1047
+ IgoLanguageModule,
1048
+ IgoMessageModule
1049
+ ]
1050
+ }]
1051
+ }], function () { return [{ type: i1__namespace$2.MatIconRegistry }, { type: i2__namespace$1.DomSanitizer }]; }, null);
1052
+ })();
1053
+ (function () {
1054
+ (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoCoreModule, { imports: [i2.CommonModule,
1055
+ http.HttpClientModule, IgoActivityModule, IgoConfigModule, IgoErrorModule, IgoLanguageModule, IgoMessageModule], exports: [IgoActivityModule,
1056
+ IgoConfigModule,
1057
+ IgoErrorModule,
1058
+ IgoLanguageModule,
1059
+ IgoMessageModule] });
1015
1060
  })();
1016
1061
 
1017
- var IgoGestureConfig = /** @class */ (function (_super) {
1018
- __extends(IgoGestureConfig, _super);
1019
- function IgoGestureConfig() {
1020
- return _super !== null && _super.apply(this, arguments) || this;
1021
- }
1022
- IgoGestureConfig.prototype.buildHammer = function (element) {
1023
- var mc = _super.prototype.buildHammer.call(this, element);
1024
- mc.set({ touchAction: 'pan-y' });
1025
- return mc;
1026
- };
1027
- return IgoGestureConfig;
1028
- }(i7.HammerGestureConfig));
1029
- IgoGestureConfig.ɵfac = function IgoGestureConfig_Factory(t) { return ɵIgoGestureConfig_BaseFactory(t || IgoGestureConfig); };
1030
- IgoGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ token: IgoGestureConfig, factory: IgoGestureConfig.ɵfac });
1031
- var ɵIgoGestureConfig_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(IgoGestureConfig);
1032
- /*@__PURE__*/ (function () {
1033
- i0.ɵsetClassMetadata(IgoGestureConfig, [{
1034
- type: i0.Injectable
1035
- }], null, null);
1062
+ var IgoGestureConfig = /** @class */ (function (_super) {
1063
+ __extends(IgoGestureConfig, _super);
1064
+ function IgoGestureConfig() {
1065
+ return _super !== null && _super.apply(this, arguments) || this;
1066
+ }
1067
+ IgoGestureConfig.prototype.buildHammer = function (element) {
1068
+ var mc = _super.prototype.buildHammer.call(this, element);
1069
+ mc.set({ touchAction: 'pan-y' });
1070
+ return mc;
1071
+ };
1072
+ return IgoGestureConfig;
1073
+ }(i2$1.HammerGestureConfig));
1074
+ IgoGestureConfig.ɵfac = /*@__PURE__*/ function () { var ɵIgoGestureConfig_BaseFactory; return function IgoGestureConfig_Factory(t) { return (ɵIgoGestureConfig_BaseFactory || (ɵIgoGestureConfig_BaseFactory = i0__namespace.ɵɵgetInheritedFactory(IgoGestureConfig)))(t || IgoGestureConfig); }; }();
1075
+ IgoGestureConfig.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: IgoGestureConfig, factory: IgoGestureConfig.ɵfac });
1076
+ (function () {
1077
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoGestureConfig, [{
1078
+ type: i0.Injectable
1079
+ }], null, null);
1036
1080
  })();
1037
1081
 
1038
- var IgoGestureModule = /** @class */ (function () {
1039
- function IgoGestureModule() {
1040
- }
1041
- IgoGestureModule.forRoot = function () {
1042
- return {
1043
- ngModule: IgoGestureModule,
1044
- providers: [
1045
- {
1046
- provide: i7.HAMMER_GESTURE_CONFIG,
1047
- useClass: IgoGestureConfig
1048
- }
1049
- ]
1050
- };
1051
- };
1052
- return IgoGestureModule;
1053
- }());
1054
- IgoGestureModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoGestureModule });
1055
- IgoGestureModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoGestureModule_Factory(t) { return new (t || IgoGestureModule)(); }, imports: [[i7.HammerModule]] });
1056
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoGestureModule, { imports: [i7.HammerModule] }); })();
1057
- /*@__PURE__*/ (function () {
1058
- i0.ɵsetClassMetadata(IgoGestureModule, [{
1059
- type: i0.NgModule,
1060
- args: [{
1061
- imports: [i7.HammerModule],
1062
- declarations: [],
1063
- exports: []
1064
- }]
1065
- }], null, null);
1066
- })();
1082
+ var IgoGestureModule = /** @class */ (function () {
1083
+ function IgoGestureModule() {
1084
+ }
1085
+ IgoGestureModule.forRoot = function () {
1086
+ return {
1087
+ ngModule: IgoGestureModule,
1088
+ providers: [
1089
+ {
1090
+ provide: i2$1.HAMMER_GESTURE_CONFIG,
1091
+ useClass: IgoGestureConfig
1092
+ }
1093
+ ]
1094
+ };
1095
+ };
1096
+ return IgoGestureModule;
1097
+ }());
1098
+ IgoGestureModule.ɵfac = function IgoGestureModule_Factory(t) { return new (t || IgoGestureModule)(); };
1099
+ IgoGestureModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoGestureModule });
1100
+ IgoGestureModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[i2$1.HammerModule]] });
1101
+ (function () {
1102
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoGestureModule, [{
1103
+ type: i0.NgModule,
1104
+ args: [{
1105
+ imports: [i2$1.HammerModule],
1106
+ declarations: [],
1107
+ exports: []
1108
+ }]
1109
+ }], null, null);
1110
+ })();
1111
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoGestureModule, { imports: [i2$1.HammerModule] }); })();
1067
1112
 
1068
- var LoggingInterceptor = /** @class */ (function () {
1069
- function LoggingInterceptor() {
1070
- }
1071
- LoggingInterceptor.prototype.intercept = function (req, next) {
1072
- var started = Date.now();
1073
- var ok;
1074
- // extend server response observable with logging
1075
- return next.handle(req).pipe(operators.tap(
1076
- // Succeeds when there is a response; ignore other events
1077
- function (event) { return (ok = event instanceof http.HttpResponse ? 'succeeded' : ''); },
1078
- // Operation failed; error is an HttpErrorResponse
1079
- function (error) { return (ok = 'failed'); }),
1080
- // Log when response observable either completes or errors
1081
- operators.finalize(function () {
1082
- var elapsed = Date.now() - started;
1083
- var msg = req.method + " \"" + req.urlWithParams + "\"\n " + ok + " in " + elapsed + " ms.";
1084
- console.log(msg);
1085
- }));
1086
- };
1087
- return LoggingInterceptor;
1088
- }());
1089
- LoggingInterceptor.ɵfac = function LoggingInterceptor_Factory(t) { return new (t || LoggingInterceptor)(); };
1090
- LoggingInterceptor.ɵprov = i0.ɵɵdefineInjectable({ token: LoggingInterceptor, factory: LoggingInterceptor.ɵfac });
1091
- /*@__PURE__*/ (function () {
1092
- i0.ɵsetClassMetadata(LoggingInterceptor, [{
1093
- type: i0.Injectable
1094
- }], null, null);
1113
+ var LoggingInterceptor = /** @class */ (function () {
1114
+ function LoggingInterceptor() {
1115
+ }
1116
+ LoggingInterceptor.prototype.intercept = function (req, next) {
1117
+ var started = Date.now();
1118
+ var ok;
1119
+ // extend server response observable with logging
1120
+ return next.handle(req).pipe(operators.tap(
1121
+ // Succeeds when there is a response; ignore other events
1122
+ function (event) { return (ok = event instanceof http.HttpResponse ? 'succeeded' : ''); },
1123
+ // Operation failed; error is an HttpErrorResponse
1124
+ function (error) { return (ok = 'failed'); }),
1125
+ // Log when response observable either completes or errors
1126
+ operators.finalize(function () {
1127
+ var elapsed = Date.now() - started;
1128
+ var msg = req.method + " \"" + req.urlWithParams + "\"\n " + ok + " in " + elapsed + " ms.";
1129
+ console.log(msg);
1130
+ }));
1131
+ };
1132
+ return LoggingInterceptor;
1133
+ }());
1134
+ LoggingInterceptor.ɵfac = function LoggingInterceptor_Factory(t) { return new (t || LoggingInterceptor)(); };
1135
+ LoggingInterceptor.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: LoggingInterceptor, factory: LoggingInterceptor.ɵfac });
1136
+ (function () {
1137
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LoggingInterceptor, [{
1138
+ type: i0.Injectable
1139
+ }], null, null);
1095
1140
  })();
1096
1141
 
1097
- var IgoLoggingModule = /** @class */ (function () {
1098
- function IgoLoggingModule() {
1099
- }
1100
- IgoLoggingModule.forRoot = function () {
1101
- return {
1102
- ngModule: IgoLoggingModule,
1103
- providers: [
1104
- {
1105
- provide: http.HTTP_INTERCEPTORS,
1106
- useClass: LoggingInterceptor,
1107
- multi: true
1108
- }
1109
- ]
1110
- };
1111
- };
1112
- return IgoLoggingModule;
1113
- }());
1114
- IgoLoggingModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoLoggingModule });
1115
- IgoLoggingModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoLoggingModule_Factory(t) { return new (t || IgoLoggingModule)(); }, imports: [[]] });
1116
- /*@__PURE__*/ (function () {
1117
- i0.ɵsetClassMetadata(IgoLoggingModule, [{
1118
- type: i0.NgModule,
1119
- args: [{
1120
- imports: [],
1121
- declarations: [],
1122
- exports: []
1123
- }]
1124
- }], null, null);
1142
+ var IgoLoggingModule = /** @class */ (function () {
1143
+ function IgoLoggingModule() {
1144
+ }
1145
+ IgoLoggingModule.forRoot = function () {
1146
+ return {
1147
+ ngModule: IgoLoggingModule,
1148
+ providers: [
1149
+ {
1150
+ provide: http.HTTP_INTERCEPTORS,
1151
+ useClass: LoggingInterceptor,
1152
+ multi: true
1153
+ }
1154
+ ]
1155
+ };
1156
+ };
1157
+ return IgoLoggingModule;
1158
+ }());
1159
+ IgoLoggingModule.ɵfac = function IgoLoggingModule_Factory(t) { return new (t || IgoLoggingModule)(); };
1160
+ IgoLoggingModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoLoggingModule });
1161
+ IgoLoggingModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[]] });
1162
+ (function () {
1163
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoLoggingModule, [{
1164
+ type: i0.NgModule,
1165
+ args: [{
1166
+ imports: [],
1167
+ declarations: [],
1168
+ exports: []
1169
+ }]
1170
+ }], null, null);
1125
1171
  })();
1126
1172
 
1127
- var ROUTE_SERVICE_OPTIONS = new i0.InjectionToken('routeServiceOptions');
1128
- function provideRouteServiceOptions(options) {
1129
- return {
1130
- provide: ROUTE_SERVICE_OPTIONS,
1131
- useValue: options
1132
- };
1133
- }
1134
- var RouteService = /** @class */ (function () {
1135
- function RouteService(route, options) {
1136
- this.route = route;
1137
- var defaultOptions = {
1138
- centerKey: 'center',
1139
- zoomKey: 'zoom',
1140
- projectionKey: 'projection',
1141
- contextKey: 'context',
1142
- searchKey: 'search',
1143
- visibleOnLayersKey: 'visiblelayers',
1144
- visibleOffLayersKey: 'invisiblelayers',
1145
- directionsCoordKey: 'routing',
1146
- toolKey: 'tool',
1147
- wmsUrlKey: 'wmsUrl',
1148
- wmsLayersKey: 'wmsLayers',
1149
- wmtsUrlKey: 'wmtsUrl',
1150
- wmtsLayersKey: 'wmtsLayers',
1151
- arcgisUrlKey: 'arcgisUrl',
1152
- arcgisLayersKey: 'arcgisLayers',
1153
- iarcgisUrlKey: 'iarcgisUrl',
1154
- iarcgisLayersKey: 'iarcgisLayers',
1155
- tarcgisUrlKey: 'tarcgisUrl',
1156
- tarcgisLayersKey: 'tarcgisLayers',
1157
- vectorKey: 'vector'
1158
- };
1159
- this.options = Object.assign({}, defaultOptions, options);
1160
- }
1161
- Object.defineProperty(RouteService.prototype, "queryParams", {
1162
- get: function () {
1163
- return this.route.queryParams;
1164
- },
1165
- enumerable: false,
1166
- configurable: true
1167
- });
1168
- return RouteService;
1169
- }());
1170
- RouteService.ɵfac = function RouteService_Factory(t) { return new (t || RouteService)(i0.ɵɵinject(i1$2.ActivatedRoute), i0.ɵɵinject(ROUTE_SERVICE_OPTIONS, 8)); };
1171
- RouteService.ɵprov = i0.ɵɵdefineInjectable({ token: RouteService, factory: RouteService.ɵfac, providedIn: 'root' });
1172
- /*@__PURE__*/ (function () {
1173
- i0.ɵsetClassMetadata(RouteService, [{
1174
- type: i0.Injectable,
1175
- args: [{
1176
- providedIn: 'root'
1177
- }]
1178
- }], function () {
1179
- return [{ type: i1$2.ActivatedRoute }, { type: undefined, decorators: [{
1180
- type: i0.Inject,
1181
- args: [ROUTE_SERVICE_OPTIONS]
1182
- }, {
1183
- type: i0.Optional
1184
- }] }];
1185
- }, null);
1173
+ var ROUTE_SERVICE_OPTIONS = new i0.InjectionToken('routeServiceOptions');
1174
+ function provideRouteServiceOptions(options) {
1175
+ return {
1176
+ provide: ROUTE_SERVICE_OPTIONS,
1177
+ useValue: options
1178
+ };
1179
+ }
1180
+ var RouteService = /** @class */ (function () {
1181
+ function RouteService(route, options) {
1182
+ this.route = route;
1183
+ var defaultOptions = {
1184
+ centerKey: 'center',
1185
+ zoomKey: 'zoom',
1186
+ projectionKey: 'projection',
1187
+ contextKey: 'context',
1188
+ searchKey: 'search',
1189
+ visibleOnLayersKey: 'visiblelayers',
1190
+ visibleOffLayersKey: 'invisiblelayers',
1191
+ directionsCoordKey: 'routing',
1192
+ toolKey: 'tool',
1193
+ wmsUrlKey: 'wmsUrl',
1194
+ wmsLayersKey: 'wmsLayers',
1195
+ wmtsUrlKey: 'wmtsUrl',
1196
+ wmtsLayersKey: 'wmtsLayers',
1197
+ arcgisUrlKey: 'arcgisUrl',
1198
+ arcgisLayersKey: 'arcgisLayers',
1199
+ iarcgisUrlKey: 'iarcgisUrl',
1200
+ iarcgisLayersKey: 'iarcgisLayers',
1201
+ tarcgisUrlKey: 'tarcgisUrl',
1202
+ tarcgisLayersKey: 'tarcgisLayers',
1203
+ vectorKey: 'vector'
1204
+ };
1205
+ this.options = Object.assign({}, defaultOptions, options);
1206
+ }
1207
+ Object.defineProperty(RouteService.prototype, "queryParams", {
1208
+ get: function () {
1209
+ return this.route.queryParams;
1210
+ },
1211
+ enumerable: false,
1212
+ configurable: true
1213
+ });
1214
+ return RouteService;
1215
+ }());
1216
+ RouteService.ɵfac = function RouteService_Factory(t) { return new (t || RouteService)(i0__namespace.ɵɵinject(i1__namespace$3.ActivatedRoute), i0__namespace.ɵɵinject(ROUTE_SERVICE_OPTIONS, 8)); };
1217
+ RouteService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: RouteService, factory: RouteService.ɵfac, providedIn: 'root' });
1218
+ (function () {
1219
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RouteService, [{
1220
+ type: i0.Injectable,
1221
+ args: [{
1222
+ providedIn: 'root'
1223
+ }]
1224
+ }], function () {
1225
+ return [{ type: i1__namespace$3.ActivatedRoute }, { type: undefined, decorators: [{
1226
+ type: i0.Inject,
1227
+ args: [ROUTE_SERVICE_OPTIONS]
1228
+ }, {
1229
+ type: i0.Optional
1230
+ }] }];
1231
+ }, null);
1186
1232
  })();
1187
1233
 
1188
- var AnalyticsService = /** @class */ (function () {
1189
- function AnalyticsService(config) {
1190
- this.config = config;
1191
- this.options = this.config.getConfig('analytics') || {};
1192
- if (this.options.provider === 'matomo') {
1193
- this.initMatomo();
1194
- }
1195
- }
1196
- Object.defineProperty(AnalyticsService.prototype, "paq", {
1197
- get: function () {
1198
- return (window._paq = window._paq || []);
1199
- },
1200
- enumerable: false,
1201
- configurable: true
1202
- });
1203
- AnalyticsService.prototype.initMatomo = function () {
1204
- var _this = this;
1205
- if (!this.options.url || !this.options.id) {
1206
- return;
1207
- }
1208
- var url = this.options.url.substr(-1) === '/'
1209
- ? this.options.url + 'matomo'
1210
- : this.options.url;
1211
- // this.paq.push(['trackPageView']);
1212
- // this.paq.push(['enableLinkTracking']);
1213
- (function () {
1214
- _this.paq.push(['setTrackerUrl', url + '.php']);
1215
- _this.paq.push(['setSiteId', _this.options.id]);
1216
- var g = document.createElement('script');
1217
- var s = document.getElementsByTagName('script')[0];
1218
- g.type = 'text/javascript';
1219
- g.async = true;
1220
- g.defer = true;
1221
- g.src = url + '.js';
1222
- s.parentNode.insertBefore(g, s);
1223
- })();
1224
- };
1225
- AnalyticsService.prototype.setUser = function (user, profils) {
1226
- if (this.options.provider === 'matomo') {
1227
- if (!user) {
1228
- this.paq.push(['resetUserId']);
1229
- this.paq.push(['deleteCustomVariable', 1, 'user']);
1230
- this.paq.push(['deleteCustomVariable', 2, 'name']);
1231
- this.paq.push(['deleteCustomVariable', 3, 'profils']);
1232
- }
1233
- else {
1234
- this.paq.push(['setUserId', user.id]);
1235
- var name = user.firstName + " " + user.lastName;
1236
- this.paq.push(['setCustomVariable', 1, 'user', user.sourceId, 'visit']);
1237
- this.paq.push(['setCustomVariable', 2, 'name', name, 'visit']);
1238
- this.paq.push(['setCustomVariable', 3, 'profils', profils, 'visit']);
1239
- }
1240
- this.paq.push(['trackPageView']);
1241
- this.paq.push(['enableLinkTracking']);
1242
- }
1243
- };
1244
- AnalyticsService.prototype.trackSearch = function (term, nbResults) {
1245
- if (this.options.provider === 'matomo') {
1246
- this.paq.push(['trackSiteSearch', term, false, nbResults]);
1247
- }
1248
- };
1249
- AnalyticsService.prototype.trackEvent = function (category, action, name) {
1250
- if (this.options.provider === 'matomo') {
1251
- this.paq.push(['trackEvent', category, action, name]);
1252
- }
1253
- };
1254
- return AnalyticsService;
1255
- }());
1256
- AnalyticsService.ɵfac = function AnalyticsService_Factory(t) { return new (t || AnalyticsService)(i0.ɵɵinject(ConfigService)); };
1257
- AnalyticsService.ɵprov = i0.ɵɵdefineInjectable({ token: AnalyticsService, factory: AnalyticsService.ɵfac, providedIn: 'root' });
1258
- /*@__PURE__*/ (function () {
1259
- i0.ɵsetClassMetadata(AnalyticsService, [{
1260
- type: i0.Injectable,
1261
- args: [{
1262
- providedIn: 'root'
1263
- }]
1264
- }], function () { return [{ type: ConfigService }]; }, null);
1234
+ var AnalyticsService = /** @class */ (function () {
1235
+ function AnalyticsService(config) {
1236
+ this.config = config;
1237
+ this.options = this.config.getConfig('analytics') || {};
1238
+ if (this.options.provider === 'matomo') {
1239
+ this.initMatomo();
1240
+ }
1241
+ }
1242
+ Object.defineProperty(AnalyticsService.prototype, "paq", {
1243
+ get: function () {
1244
+ return (window._paq = window._paq || []);
1245
+ },
1246
+ enumerable: false,
1247
+ configurable: true
1248
+ });
1249
+ AnalyticsService.prototype.initMatomo = function () {
1250
+ var _this = this;
1251
+ if (!this.options.url || !this.options.id) {
1252
+ return;
1253
+ }
1254
+ var url = this.options.url.substr(-1) === '/'
1255
+ ? this.options.url + 'matomo'
1256
+ : this.options.url;
1257
+ // this.paq.push(['trackPageView']);
1258
+ // this.paq.push(['enableLinkTracking']);
1259
+ (function () {
1260
+ _this.paq.push(['setTrackerUrl', url + '.php']);
1261
+ _this.paq.push(['setSiteId', _this.options.id]);
1262
+ var g = document.createElement('script');
1263
+ var s = document.getElementsByTagName('script')[0];
1264
+ g.type = 'text/javascript';
1265
+ g.async = true;
1266
+ g.defer = true;
1267
+ g.src = url + '.js';
1268
+ s.parentNode.insertBefore(g, s);
1269
+ })();
1270
+ };
1271
+ AnalyticsService.prototype.setUser = function (user, profils) {
1272
+ if (this.options.provider === 'matomo') {
1273
+ if (!user) {
1274
+ this.paq.push(['resetUserId']);
1275
+ this.paq.push(['deleteCustomVariable', 1, 'user']);
1276
+ this.paq.push(['deleteCustomVariable', 2, 'name']);
1277
+ this.paq.push(['deleteCustomVariable', 3, 'profils']);
1278
+ }
1279
+ else {
1280
+ this.paq.push(['setUserId', user.id]);
1281
+ var name = user.firstName + " " + user.lastName;
1282
+ this.paq.push(['setCustomVariable', 1, 'user', user.sourceId, 'visit']);
1283
+ this.paq.push(['setCustomVariable', 2, 'name', name, 'visit']);
1284
+ this.paq.push(['setCustomVariable', 3, 'profils', profils, 'visit']);
1285
+ }
1286
+ this.paq.push(['trackPageView']);
1287
+ this.paq.push(['enableLinkTracking']);
1288
+ }
1289
+ };
1290
+ AnalyticsService.prototype.trackSearch = function (term, nbResults) {
1291
+ if (this.options.provider === 'matomo') {
1292
+ this.paq.push(['trackSiteSearch', term, false, nbResults]);
1293
+ }
1294
+ };
1295
+ AnalyticsService.prototype.trackEvent = function (category, action, name) {
1296
+ if (this.options.provider === 'matomo') {
1297
+ this.paq.push(['trackEvent', category, action, name]);
1298
+ }
1299
+ };
1300
+ return AnalyticsService;
1301
+ }());
1302
+ AnalyticsService.ɵfac = function AnalyticsService_Factory(t) { return new (t || AnalyticsService)(i0__namespace.ɵɵinject(ConfigService)); };
1303
+ AnalyticsService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: AnalyticsService, factory: AnalyticsService.ɵfac, providedIn: 'root' });
1304
+ (function () {
1305
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(AnalyticsService, [{
1306
+ type: i0.Injectable,
1307
+ args: [{
1308
+ providedIn: 'root'
1309
+ }]
1310
+ }], function () { return [{ type: ConfigService }]; }, null);
1265
1311
  })();
1266
1312
 
1267
- (function (Media) {
1268
- Media["Mobile"] = "mobile";
1269
- Media["Tablet"] = "tablet";
1270
- Media["Desktop"] = "desktop";
1271
- })(exports.Media || (exports.Media = {}));
1272
- (function (MediaOrientation) {
1273
- MediaOrientation["Portrait"] = "portrait";
1274
- MediaOrientation["Landscape"] = "landscape";
1313
+ exports.Media = void 0;
1314
+ (function (Media) {
1315
+ Media["Mobile"] = "mobile";
1316
+ Media["Tablet"] = "tablet";
1317
+ Media["Desktop"] = "desktop";
1318
+ })(exports.Media || (exports.Media = {}));
1319
+ exports.MediaOrientation = void 0;
1320
+ (function (MediaOrientation) {
1321
+ MediaOrientation["Portrait"] = "portrait";
1322
+ MediaOrientation["Landscape"] = "landscape";
1275
1323
  })(exports.MediaOrientation || (exports.MediaOrientation = {}));
1276
1324
 
1277
- var MediaService = /** @class */ (function () {
1278
- function MediaService(breakpointObserver) {
1279
- var _this = this;
1280
- this.media$ = new rxjs.BehaviorSubject(undefined);
1281
- this.orientation$ = new rxjs.BehaviorSubject(undefined);
1282
- breakpointObserver
1283
- .observe([i1$3.Breakpoints.HandsetLandscape])
1284
- .subscribe(function (res) {
1285
- if (res.matches) {
1286
- _this.media$.next(exports.Media.Mobile);
1287
- _this.orientation$.next(exports.MediaOrientation.Landscape);
1288
- }
1289
- });
1290
- breakpointObserver.observe([i1$3.Breakpoints.HandsetPortrait]).subscribe(function (res) {
1291
- if (res.matches) {
1292
- _this.media$.next(exports.Media.Mobile);
1293
- _this.orientation$.next(exports.MediaOrientation.Portrait);
1294
- }
1295
- });
1296
- breakpointObserver.observe([i1$3.Breakpoints.TabletLandscape]).subscribe(function (res) {
1297
- if (res.matches) {
1298
- _this.media$.next(exports.Media.Tablet);
1299
- _this.orientation$.next(exports.MediaOrientation.Landscape);
1300
- }
1301
- });
1302
- breakpointObserver.observe([i1$3.Breakpoints.TabletPortrait]).subscribe(function (res) {
1303
- if (res.matches) {
1304
- _this.media$.next(exports.Media.Tablet);
1305
- _this.orientation$.next(exports.MediaOrientation.Portrait);
1306
- }
1307
- });
1308
- breakpointObserver.observe([i1$3.Breakpoints.WebLandscape]).subscribe(function (res) {
1309
- if (res.matches) {
1310
- _this.media$.next(exports.Media.Desktop);
1311
- _this.orientation$.next(exports.MediaOrientation.Landscape);
1312
- }
1313
- });
1314
- breakpointObserver.observe([i1$3.Breakpoints.WebPortrait]).subscribe(function (res) {
1315
- if (res.matches) {
1316
- _this.media$.next(exports.Media.Desktop);
1317
- _this.orientation$.next(exports.MediaOrientation.Portrait);
1318
- }
1319
- });
1320
- }
1321
- MediaService.prototype.getMedia = function () {
1322
- return this.media$.value;
1323
- };
1324
- MediaService.prototype.getOrientation = function () {
1325
- return this.orientation$.value;
1326
- };
1327
- MediaService.prototype.isTouchScreen = function () {
1328
- return 'ontouchstart' in document.documentElement ? true : false;
1329
- };
1330
- MediaService.prototype.isMobile = function () {
1331
- var media = this.getMedia();
1332
- return media === 'mobile';
1333
- };
1334
- MediaService.prototype.isDesktop = function () {
1335
- var media = this.getMedia();
1336
- return media === 'desktop';
1337
- };
1338
- return MediaService;
1339
- }());
1340
- MediaService.ɵfac = function MediaService_Factory(t) { return new (t || MediaService)(i0.ɵɵinject(i1$3.BreakpointObserver)); };
1341
- MediaService.ɵprov = i0.ɵɵdefineInjectable({ token: MediaService, factory: MediaService.ɵfac, providedIn: 'root' });
1342
- /*@__PURE__*/ (function () {
1343
- i0.ɵsetClassMetadata(MediaService, [{
1344
- type: i0.Injectable,
1345
- args: [{
1346
- providedIn: 'root'
1347
- }]
1348
- }], function () { return [{ type: i1$3.BreakpointObserver }]; }, null);
1325
+ var MediaService = /** @class */ (function () {
1326
+ function MediaService(breakpointObserver) {
1327
+ var _this = this;
1328
+ this.media$ = new rxjs.BehaviorSubject(undefined);
1329
+ this.orientation$ = new rxjs.BehaviorSubject(undefined);
1330
+ breakpointObserver
1331
+ .observe([i1$4.Breakpoints.HandsetLandscape])
1332
+ .subscribe(function (res) {
1333
+ if (res.matches) {
1334
+ _this.media$.next(exports.Media.Mobile);
1335
+ _this.orientation$.next(exports.MediaOrientation.Landscape);
1336
+ }
1337
+ });
1338
+ breakpointObserver.observe([i1$4.Breakpoints.HandsetPortrait]).subscribe(function (res) {
1339
+ if (res.matches) {
1340
+ _this.media$.next(exports.Media.Mobile);
1341
+ _this.orientation$.next(exports.MediaOrientation.Portrait);
1342
+ }
1343
+ });
1344
+ breakpointObserver.observe([i1$4.Breakpoints.TabletLandscape]).subscribe(function (res) {
1345
+ if (res.matches) {
1346
+ _this.media$.next(exports.Media.Tablet);
1347
+ _this.orientation$.next(exports.MediaOrientation.Landscape);
1348
+ }
1349
+ });
1350
+ breakpointObserver.observe([i1$4.Breakpoints.TabletPortrait]).subscribe(function (res) {
1351
+ if (res.matches) {
1352
+ _this.media$.next(exports.Media.Tablet);
1353
+ _this.orientation$.next(exports.MediaOrientation.Portrait);
1354
+ }
1355
+ });
1356
+ breakpointObserver.observe([i1$4.Breakpoints.WebLandscape]).subscribe(function (res) {
1357
+ if (res.matches) {
1358
+ _this.media$.next(exports.Media.Desktop);
1359
+ _this.orientation$.next(exports.MediaOrientation.Landscape);
1360
+ }
1361
+ });
1362
+ breakpointObserver.observe([i1$4.Breakpoints.WebPortrait]).subscribe(function (res) {
1363
+ if (res.matches) {
1364
+ _this.media$.next(exports.Media.Desktop);
1365
+ _this.orientation$.next(exports.MediaOrientation.Portrait);
1366
+ }
1367
+ });
1368
+ }
1369
+ MediaService.prototype.getMedia = function () {
1370
+ return this.media$.value;
1371
+ };
1372
+ MediaService.prototype.getOrientation = function () {
1373
+ return this.orientation$.value;
1374
+ };
1375
+ MediaService.prototype.isTouchScreen = function () {
1376
+ return 'ontouchstart' in document.documentElement ? true : false;
1377
+ };
1378
+ MediaService.prototype.isMobile = function () {
1379
+ var media = this.getMedia();
1380
+ return media === 'mobile';
1381
+ };
1382
+ MediaService.prototype.isDesktop = function () {
1383
+ var media = this.getMedia();
1384
+ return media === 'desktop';
1385
+ };
1386
+ return MediaService;
1387
+ }());
1388
+ MediaService.ɵfac = function MediaService_Factory(t) { return new (t || MediaService)(i0__namespace.ɵɵinject(i1__namespace$4.BreakpointObserver)); };
1389
+ MediaService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: MediaService, factory: MediaService.ɵfac, providedIn: 'root' });
1390
+ (function () {
1391
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MediaService, [{
1392
+ type: i0.Injectable,
1393
+ args: [{
1394
+ providedIn: 'root'
1395
+ }]
1396
+ }], function () { return [{ type: i1__namespace$4.BreakpointObserver }]; }, null);
1349
1397
  })();
1350
1398
 
1351
- (function (StorageScope) {
1352
- StorageScope["SESSION"] = "Session";
1353
- StorageScope["LOCAL"] = "Local";
1354
- })(exports.StorageScope || (exports.StorageScope = {}));
1355
- (function (StorageServiceEventEnum) {
1356
- StorageServiceEventEnum["ADDED"] = "Added";
1357
- StorageServiceEventEnum["MODIFIED"] = "Modified";
1358
- StorageServiceEventEnum["REMOVED"] = "Removed";
1359
- StorageServiceEventEnum["CLEARED"] = "Cleared";
1399
+ exports.StorageScope = void 0;
1400
+ (function (StorageScope) {
1401
+ StorageScope["SESSION"] = "Session";
1402
+ StorageScope["LOCAL"] = "Local";
1403
+ })(exports.StorageScope || (exports.StorageScope = {}));
1404
+ exports.StorageServiceEventEnum = void 0;
1405
+ (function (StorageServiceEventEnum) {
1406
+ StorageServiceEventEnum["ADDED"] = "Added";
1407
+ StorageServiceEventEnum["MODIFIED"] = "Modified";
1408
+ StorageServiceEventEnum["REMOVED"] = "Removed";
1409
+ StorageServiceEventEnum["CLEARED"] = "Cleared";
1360
1410
  })(exports.StorageServiceEventEnum || (exports.StorageServiceEventEnum = {}));
1361
1411
 
1362
- var StorageService = /** @class */ (function () {
1363
- function StorageService(config) {
1364
- this.config = config;
1365
- this.storageChange$ = new rxjs.BehaviorSubject(undefined);
1366
- this.options = this.config.getConfig('storage') || { key: 'igo' };
1367
- }
1368
- /**
1369
- * Use to get the data found in storage file
1370
- */
1371
- StorageService.prototype.get = function (key, scope) {
1372
- var value;
1373
- if (!scope || scope === exports.StorageScope.SESSION) {
1374
- value = sessionStorage.getItem(this.options.key + "." + key);
1375
- }
1376
- if (scope === exports.StorageScope.LOCAL || (!value && !scope)) {
1377
- value = localStorage.getItem(this.options.key + "." + key);
1378
- }
1379
- if (value) {
1380
- try {
1381
- value = JSON.parse(value);
1382
- }
1383
- catch (_a) {
1384
- value = value;
1385
- }
1386
- }
1387
- return value;
1388
- };
1389
- StorageService.prototype.set = function (key, value, scope) {
1390
- if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1391
- var previousValue = this.get(key, scope);
1392
- if (scope === exports.StorageScope.SESSION) {
1393
- sessionStorage.setItem(this.options.key + "." + key, JSON.stringify(value));
1394
- }
1395
- else {
1396
- localStorage.setItem(this.options.key + "." + key, JSON.stringify(value));
1397
- }
1398
- var currentValue = this.get(key, scope);
1399
- if (currentValue !== previousValue) {
1400
- this.storageChange$.next({
1401
- key: key, scope: scope,
1402
- event: previousValue !== undefined ? exports.StorageServiceEventEnum.MODIFIED : exports.StorageServiceEventEnum.ADDED,
1403
- previousValue: previousValue,
1404
- currentValue: currentValue
1405
- });
1406
- }
1407
- };
1408
- StorageService.prototype.remove = function (key, scope) {
1409
- if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1410
- var previousValue = this.get(key, scope);
1411
- if (scope === exports.StorageScope.SESSION) {
1412
- sessionStorage.removeItem(this.options.key + "." + key);
1413
- }
1414
- else {
1415
- localStorage.removeItem(this.options.key + "." + key);
1416
- }
1417
- this.storageChange$.next({ key: key, scope: scope, event: exports.StorageServiceEventEnum.REMOVED, previousValue: previousValue });
1418
- };
1419
- StorageService.prototype.clear = function (scope) {
1420
- if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1421
- if (scope === exports.StorageScope.SESSION) {
1422
- sessionStorage.clear();
1423
- }
1424
- else {
1425
- localStorage.clear();
1426
- }
1427
- this.storageChange$.next({ scope: scope, event: exports.StorageServiceEventEnum.CLEARED });
1428
- };
1429
- return StorageService;
1430
- }());
1431
- StorageService.ɵfac = function StorageService_Factory(t) { return new (t || StorageService)(i0.ɵɵinject(ConfigService)); };
1432
- StorageService.ɵprov = i0.ɵɵdefineInjectable({ token: StorageService, factory: StorageService.ɵfac, providedIn: 'root' });
1433
- /*@__PURE__*/ (function () {
1434
- i0.ɵsetClassMetadata(StorageService, [{
1435
- type: i0.Injectable,
1436
- args: [{
1437
- providedIn: 'root'
1438
- }]
1439
- }], function () { return [{ type: ConfigService }]; }, null);
1412
+ var StorageService = /** @class */ (function () {
1413
+ function StorageService(config) {
1414
+ this.config = config;
1415
+ this.storageChange$ = new rxjs.BehaviorSubject(undefined);
1416
+ this.options = this.config.getConfig('storage') || { key: 'igo' };
1417
+ }
1418
+ /**
1419
+ * Use to get the data found in storage file
1420
+ */
1421
+ StorageService.prototype.get = function (key, scope) {
1422
+ var value;
1423
+ if (!scope || scope === exports.StorageScope.SESSION) {
1424
+ value = sessionStorage.getItem(this.options.key + "." + key);
1425
+ }
1426
+ if (scope === exports.StorageScope.LOCAL || (!value && !scope)) {
1427
+ value = localStorage.getItem(this.options.key + "." + key);
1428
+ }
1429
+ if (value) {
1430
+ try {
1431
+ value = JSON.parse(value);
1432
+ }
1433
+ catch (_a) {
1434
+ value = value;
1435
+ }
1436
+ }
1437
+ return value;
1438
+ };
1439
+ StorageService.prototype.set = function (key, value, scope) {
1440
+ if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1441
+ var previousValue = this.get(key, scope);
1442
+ if (scope === exports.StorageScope.SESSION) {
1443
+ sessionStorage.setItem(this.options.key + "." + key, JSON.stringify(value));
1444
+ }
1445
+ else {
1446
+ localStorage.setItem(this.options.key + "." + key, JSON.stringify(value));
1447
+ }
1448
+ var currentValue = this.get(key, scope);
1449
+ if (currentValue !== previousValue) {
1450
+ this.storageChange$.next({
1451
+ key: key,
1452
+ scope: scope,
1453
+ event: previousValue !== undefined ? exports.StorageServiceEventEnum.MODIFIED : exports.StorageServiceEventEnum.ADDED,
1454
+ previousValue: previousValue,
1455
+ currentValue: currentValue
1456
+ });
1457
+ }
1458
+ };
1459
+ StorageService.prototype.remove = function (key, scope) {
1460
+ if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1461
+ var previousValue = this.get(key, scope);
1462
+ if (scope === exports.StorageScope.SESSION) {
1463
+ sessionStorage.removeItem(this.options.key + "." + key);
1464
+ }
1465
+ else {
1466
+ localStorage.removeItem(this.options.key + "." + key);
1467
+ }
1468
+ this.storageChange$.next({ key: key, scope: scope, event: exports.StorageServiceEventEnum.REMOVED, previousValue: previousValue });
1469
+ };
1470
+ StorageService.prototype.clear = function (scope) {
1471
+ if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1472
+ if (scope === exports.StorageScope.SESSION) {
1473
+ sessionStorage.clear();
1474
+ }
1475
+ else {
1476
+ localStorage.clear();
1477
+ }
1478
+ this.storageChange$.next({ scope: scope, event: exports.StorageServiceEventEnum.CLEARED });
1479
+ };
1480
+ return StorageService;
1481
+ }());
1482
+ StorageService.ɵfac = function StorageService_Factory(t) { return new (t || StorageService)(i0__namespace.ɵɵinject(ConfigService)); };
1483
+ StorageService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: StorageService, factory: StorageService.ɵfac, providedIn: 'root' });
1484
+ (function () {
1485
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(StorageService, [{
1486
+ type: i0.Injectable,
1487
+ args: [{
1488
+ providedIn: 'root'
1489
+ }]
1490
+ }], function () { return [{ type: ConfigService }]; }, null);
1440
1491
  })();
1441
1492
 
1442
- var NetworkService = /** @class */ (function () {
1443
- function NetworkService(messageService, injector) {
1444
- this.messageService = messageService;
1445
- this.injector = injector;
1446
- this.stateChangeEventEmitter = new i0.EventEmitter();
1447
- this.state = {
1448
- connection: window.navigator.onLine
1449
- };
1450
- this.checkNetworkState();
1451
- }
1452
- NetworkService.prototype.checkNetworkState = function () {
1453
- var _this = this;
1454
- this.onlineSubscription = rxjs.fromEvent(window, 'online').subscribe(function () {
1455
- var translate = _this.injector.get(LanguageService).translate;
1456
- var message = translate.instant('igo.core.network.online.message');
1457
- var title = translate.instant('igo.core.network.online.title');
1458
- _this.messageService.info(message, title);
1459
- _this.state.connection = true;
1460
- _this.emitEvent();
1461
- });
1462
- this.offlineSubscription = rxjs.fromEvent(window, 'offline').subscribe(function () {
1463
- var translate = _this.injector.get(LanguageService).translate;
1464
- var message = translate.instant('igo.core.network.offline.message');
1465
- var title = translate.instant('igo.core.network.offline.title');
1466
- _this.messageService.info(message, title);
1467
- _this.state.connection = false;
1468
- _this.emitEvent();
1469
- });
1470
- };
1471
- NetworkService.prototype.emitEvent = function () {
1472
- this.stateChangeEventEmitter.emit(this.state);
1473
- };
1474
- NetworkService.prototype.ngOnDestroy = function () {
1475
- try {
1476
- this.offlineSubscription.unsubscribe();
1477
- this.onlineSubscription.unsubscribe();
1478
- }
1479
- catch (e) { }
1480
- };
1481
- NetworkService.prototype.currentState = function (reportState) {
1482
- if (reportState === void 0) { reportState = true; }
1483
- return reportState
1484
- ? this.stateChangeEventEmitter.pipe(operators.debounceTime(300), operators.startWith(this.state))
1485
- : this.stateChangeEventEmitter.pipe(operators.debounceTime(300));
1486
- };
1487
- return NetworkService;
1488
- }());
1489
- NetworkService.ɵfac = function NetworkService_Factory(t) { return new (t || NetworkService)(i0.ɵɵinject(MessageService), i0.ɵɵinject(i0.Injector)); };
1490
- NetworkService.ɵprov = i0.ɵɵdefineInjectable({ token: NetworkService, factory: NetworkService.ɵfac, providedIn: 'root' });
1491
- /*@__PURE__*/ (function () {
1492
- i0.ɵsetClassMetadata(NetworkService, [{
1493
- type: i0.Injectable,
1494
- args: [{
1495
- providedIn: 'root'
1496
- }]
1497
- }], function () { return [{ type: MessageService }, { type: i0.Injector }]; }, null);
1493
+ var NetworkService = /** @class */ (function () {
1494
+ function NetworkService(messageService, injector) {
1495
+ this.messageService = messageService;
1496
+ this.injector = injector;
1497
+ this.stateChangeEventEmitter = new i0.EventEmitter();
1498
+ this.state = {
1499
+ connection: window.navigator.onLine
1500
+ };
1501
+ this.checkNetworkState();
1502
+ }
1503
+ NetworkService.prototype.checkNetworkState = function () {
1504
+ var _this = this;
1505
+ this.onlineSubscription = rxjs.fromEvent(window, 'online').subscribe(function () {
1506
+ var translate = _this.injector.get(LanguageService).translate;
1507
+ var message = translate.instant('igo.core.network.online.message');
1508
+ var title = translate.instant('igo.core.network.online.title');
1509
+ _this.messageService.info(message, title);
1510
+ _this.state.connection = true;
1511
+ _this.emitEvent();
1512
+ });
1513
+ this.offlineSubscription = rxjs.fromEvent(window, 'offline').subscribe(function () {
1514
+ var translate = _this.injector.get(LanguageService).translate;
1515
+ var message = translate.instant('igo.core.network.offline.message');
1516
+ var title = translate.instant('igo.core.network.offline.title');
1517
+ _this.messageService.info(message, title);
1518
+ _this.state.connection = false;
1519
+ _this.emitEvent();
1520
+ });
1521
+ };
1522
+ NetworkService.prototype.emitEvent = function () {
1523
+ this.stateChangeEventEmitter.emit(this.state);
1524
+ };
1525
+ NetworkService.prototype.ngOnDestroy = function () {
1526
+ try {
1527
+ this.offlineSubscription.unsubscribe();
1528
+ this.onlineSubscription.unsubscribe();
1529
+ }
1530
+ catch (e) { }
1531
+ };
1532
+ NetworkService.prototype.currentState = function (reportState) {
1533
+ if (reportState === void 0) { reportState = true; }
1534
+ return reportState
1535
+ ? this.stateChangeEventEmitter.pipe(operators.debounceTime(300), operators.startWith(this.state))
1536
+ : this.stateChangeEventEmitter.pipe(operators.debounceTime(300));
1537
+ };
1538
+ return NetworkService;
1539
+ }());
1540
+ NetworkService.ɵfac = function NetworkService_Factory(t) { return new (t || NetworkService)(i0__namespace.ɵɵinject(MessageService), i0__namespace.ɵɵinject(i0__namespace.Injector)); };
1541
+ NetworkService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: NetworkService, factory: NetworkService.ɵfac, providedIn: 'root' });
1542
+ (function () {
1543
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(NetworkService, [{
1544
+ type: i0.Injectable,
1545
+ args: [{
1546
+ providedIn: 'root'
1547
+ }]
1548
+ }], function () { return [{ type: MessageService }, { type: i0__namespace.Injector }]; }, null);
1498
1549
  })();
1499
1550
 
1500
- /*
1501
- * Public API Surface of core
1551
+ /*
1552
+ * Public API Surface of core
1502
1553
  */
1503
1554
 
1504
- /**
1505
- * Generated bundle index. Do not edit.
1555
+ /**
1556
+ * Generated bundle index. Do not edit.
1506
1557
  */
1507
1558
 
1508
1559
  exports.ActivityInterceptor = ActivityInterceptor;