@ethlete/core 0.2.0-next.7 → 0.2.0-next.9

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 (81) hide show
  1. package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +3 -3
  2. package/esm2020/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +3 -3
  3. package/esm2020/lib/directives/destroy/destroy.directive.mjs +3 -3
  4. package/esm2020/lib/directives/let/let.directive.mjs +3 -3
  5. package/esm2020/lib/directives/observe-content/observe-content.directive.mjs +3 -3
  6. package/esm2020/lib/directives/observe-resize/observe-resize.directive.mjs +3 -3
  7. package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +3 -3
  8. package/esm2020/lib/directives/public-api.mjs +2 -1
  9. package/esm2020/lib/directives/repeat/repeat.directive.mjs +3 -3
  10. package/esm2020/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +3 -3
  11. package/esm2020/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +3 -3
  12. package/esm2020/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +3 -3
  13. package/esm2020/lib/directives/seo/public-api.mjs +5 -0
  14. package/esm2020/lib/directives/seo/seo.directive.constants.mjs +3 -0
  15. package/esm2020/lib/directives/seo/seo.directive.mjs +166 -0
  16. package/esm2020/lib/directives/seo/seo.directive.types.mjs +2 -0
  17. package/esm2020/lib/directives/seo/seo.directive.utils.mjs +7 -0
  18. package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +15 -0
  19. package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.mjs +2 -0
  20. package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.mjs +34 -0
  21. package/esm2020/lib/pipes/normalize-game-result-type/public-api.mjs +4 -0
  22. package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +15 -0
  23. package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.types.mjs +2 -0
  24. package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.util.mjs +47 -0
  25. package/esm2020/lib/pipes/normalize-match-participants/public-api.mjs +4 -0
  26. package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +15 -0
  27. package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.types.mjs +2 -0
  28. package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.util.mjs +126 -0
  29. package/esm2020/lib/pipes/normalize-match-score/public-api.mjs +4 -0
  30. package/esm2020/lib/pipes/normalize-match-state/index.mjs +2 -0
  31. package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.constants.mjs +2 -0
  32. package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +15 -0
  33. package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.util.mjs +19 -0
  34. package/esm2020/lib/pipes/normalize-match-state/public-api.mjs +4 -0
  35. package/esm2020/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +15 -0
  36. package/esm2020/lib/pipes/normalize-match-type/normalize-match-type.util.mjs +38 -0
  37. package/esm2020/lib/pipes/normalize-match-type/public-api.mjs +3 -0
  38. package/esm2020/lib/pipes/public-api.mjs +6 -1
  39. package/esm2020/lib/pipes/to-array/to-array.pipe.mjs +3 -3
  40. package/esm2020/lib/services/click-observer.service.mjs +6 -6
  41. package/esm2020/lib/services/content-observer.service.mjs +6 -6
  42. package/esm2020/lib/services/destroy.service.mjs +3 -3
  43. package/esm2020/lib/services/focus-visible.service.mjs +3 -3
  44. package/esm2020/lib/services/resize-observer.service.mjs +6 -6
  45. package/esm2020/lib/services/viewport.service.mjs +3 -3
  46. package/esm2020/lib/types/i18n.types.mjs +2 -0
  47. package/esm2020/lib/types/public-api.mjs +3 -2
  48. package/fesm2015/ethlete-core.mjs +549 -64
  49. package/fesm2015/ethlete-core.mjs.map +1 -1
  50. package/fesm2020/ethlete-core.mjs +556 -64
  51. package/fesm2020/ethlete-core.mjs.map +1 -1
  52. package/lib/directives/public-api.d.ts +1 -0
  53. package/lib/directives/seo/public-api.d.ts +4 -0
  54. package/lib/directives/seo/seo.directive.constants.d.ts +3 -0
  55. package/lib/directives/seo/seo.directive.d.ts +21 -0
  56. package/lib/directives/seo/seo.directive.types.d.ts +51 -0
  57. package/lib/directives/seo/seo.directive.utils.d.ts +2 -0
  58. package/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.d.ts +7 -0
  59. package/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.d.ts +4 -0
  60. package/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.d.ts +2 -0
  61. package/lib/pipes/normalize-game-result-type/public-api.d.ts +3 -0
  62. package/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.d.ts +7 -0
  63. package/lib/pipes/normalize-match-participants/normalize-match-participants.types.d.ts +21 -0
  64. package/lib/pipes/normalize-match-participants/normalize-match-participants.util.d.ts +4 -0
  65. package/lib/pipes/normalize-match-participants/public-api.d.ts +3 -0
  66. package/lib/pipes/normalize-match-score/normalize-match-score.pipe.d.ts +7 -0
  67. package/lib/pipes/normalize-match-score/normalize-match-score.types.d.ts +12 -0
  68. package/lib/pipes/normalize-match-score/normalize-match-score.util.d.ts +27 -0
  69. package/lib/pipes/normalize-match-score/public-api.d.ts +3 -0
  70. package/lib/pipes/normalize-match-state/index.d.ts +1 -0
  71. package/lib/pipes/normalize-match-state/normalize-match-state.constants.d.ts +7 -0
  72. package/lib/pipes/normalize-match-state/normalize-match-state.pipe.d.ts +7 -0
  73. package/lib/pipes/normalize-match-state/normalize-match-state.util.d.ts +3 -0
  74. package/lib/pipes/normalize-match-state/public-api.d.ts +3 -0
  75. package/lib/pipes/normalize-match-type/normalize-match-type.pipe.d.ts +7 -0
  76. package/lib/pipes/normalize-match-type/normalize-match-type.util.d.ts +3 -0
  77. package/lib/pipes/normalize-match-type/public-api.d.ts +2 -0
  78. package/lib/pipes/public-api.d.ts +5 -0
  79. package/lib/types/i18n.types.d.ts +4 -0
  80. package/lib/types/public-api.d.ts +2 -1
  81. package/package.json +4 -2
@@ -6,6 +6,7 @@ import { DOCUMENT } from '@angular/common';
6
6
  import { __decorate, __metadata } from 'tslib';
7
7
  import * as i1 from '@angular/cdk/layout';
8
8
  import { debounceTime as debounceTime$1 } from 'rxjs/operators';
9
+ import { Meta, Title } from '@angular/platform-browser';
9
10
 
10
11
  const VIEWPORT_CONFIG = new InjectionToken('ViewportConfig');
11
12
  /**
@@ -56,9 +57,9 @@ class ClickObserverFactory {
56
57
  return fromEvent(document, 'click');
57
58
  }
58
59
  }
59
- ClickObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ClickObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
60
- ClickObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ClickObserverFactory, providedIn: 'root' });
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ClickObserverFactory, decorators: [{
60
+ ClickObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
61
+ ClickObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverFactory, providedIn: 'root' });
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverFactory, decorators: [{
62
63
  type: Injectable,
63
64
  args: [{ providedIn: 'root' }]
64
65
  }] });
@@ -112,9 +113,9 @@ class ClickObserverService {
112
113
  }
113
114
  }
114
115
  }
115
- ClickObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ClickObserverService, deps: [{ token: ClickObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
116
- ClickObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ClickObserverService, providedIn: 'root' });
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ClickObserverService, decorators: [{
116
+ ClickObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverService, deps: [{ token: ClickObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
117
+ ClickObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverService, providedIn: 'root' });
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverService, decorators: [{
118
119
  type: Injectable,
119
120
  args: [{ providedIn: 'root' }]
120
121
  }], ctorParameters: function () { return [{ type: ClickObserverFactory }]; } });
@@ -125,9 +126,9 @@ class MutationObserverFactory {
125
126
  return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);
126
127
  }
127
128
  }
128
- MutationObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: MutationObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
129
- MutationObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: MutationObserverFactory, providedIn: 'root' });
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: MutationObserverFactory, decorators: [{
129
+ MutationObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MutationObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
130
+ MutationObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MutationObserverFactory, providedIn: 'root' });
131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MutationObserverFactory, decorators: [{
131
132
  type: Injectable,
132
133
  args: [{ providedIn: 'root' }]
133
134
  }] });
@@ -187,9 +188,9 @@ class ContentObserverService {
187
188
  }
188
189
  }
189
190
  }
190
- ContentObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ContentObserverService, deps: [{ token: MutationObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
191
- ContentObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ContentObserverService, providedIn: 'root' });
192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ContentObserverService, decorators: [{
191
+ ContentObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ContentObserverService, deps: [{ token: MutationObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
192
+ ContentObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ContentObserverService, providedIn: 'root' });
193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ContentObserverService, decorators: [{
193
194
  type: Injectable,
194
195
  args: [{ providedIn: 'root' }]
195
196
  }], ctorParameters: function () { return [{ type: MutationObserverFactory }]; } });
@@ -204,9 +205,9 @@ class DestroyService {
204
205
  this._destroy$.unsubscribe();
205
206
  }
206
207
  }
207
- DestroyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: DestroyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
208
- DestroyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: DestroyService });
209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: DestroyService, decorators: [{
208
+ DestroyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DestroyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
209
+ DestroyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DestroyService });
210
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DestroyService, decorators: [{
210
211
  type: Injectable
211
212
  }] });
212
213
 
@@ -232,9 +233,9 @@ class FocusVisibleService {
232
233
  this._hadKeyboardEvent = false;
233
234
  }
234
235
  }
235
- FocusVisibleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: FocusVisibleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
236
- FocusVisibleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: FocusVisibleService, providedIn: 'root' });
237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: FocusVisibleService, decorators: [{
236
+ FocusVisibleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusVisibleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
237
+ FocusVisibleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusVisibleService, providedIn: 'root' });
238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusVisibleService, decorators: [{
238
239
  type: Injectable,
239
240
  args: [{
240
241
  providedIn: 'root',
@@ -247,9 +248,9 @@ class ResizeObserverFactory {
247
248
  return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);
248
249
  }
249
250
  }
250
- ResizeObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ResizeObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
251
- ResizeObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ResizeObserverFactory, providedIn: 'root' });
252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ResizeObserverFactory, decorators: [{
251
+ ResizeObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
252
+ ResizeObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverFactory, providedIn: 'root' });
253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverFactory, decorators: [{
253
254
  type: Injectable,
254
255
  args: [{ providedIn: 'root' }]
255
256
  }] });
@@ -305,9 +306,9 @@ class ResizeObserverService {
305
306
  }
306
307
  }
307
308
  }
308
- ResizeObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ResizeObserverService, deps: [{ token: ResizeObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
309
- ResizeObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ResizeObserverService, providedIn: 'root' });
310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ResizeObserverService, decorators: [{
309
+ ResizeObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverService, deps: [{ token: ResizeObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
310
+ ResizeObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverService, providedIn: 'root' });
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverService, decorators: [{
311
312
  type: Injectable,
312
313
  args: [{ providedIn: 'root' }]
313
314
  }], ctorParameters: function () { return [{ type: ResizeObserverFactory }]; } });
@@ -442,8 +443,8 @@ class ViewportService {
442
443
  return 'xs';
443
444
  }
444
445
  }
445
- ViewportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ViewportService, deps: [{ token: VIEWPORT_CONFIG, optional: true }, { token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
446
- ViewportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ViewportService, providedIn: 'root' });
446
+ ViewportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ViewportService, deps: [{ token: VIEWPORT_CONFIG, optional: true }, { token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
447
+ ViewportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ViewportService, providedIn: 'root' });
447
448
  __decorate([
448
449
  Memo(),
449
450
  __metadata("design:type", Function),
@@ -461,7 +462,7 @@ __decorate([
461
462
  __metadata("design:paramtypes", [Object]),
462
463
  __metadata("design:returntype", void 0)
463
464
  ], ViewportService.prototype, "_buildMediaQuery", null);
464
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ViewportService, decorators: [{
465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ViewportService, decorators: [{
465
466
  type: Injectable,
466
467
  args: [{
467
468
  providedIn: 'root',
@@ -498,9 +499,9 @@ class ClickOutsideDirective {
498
499
  (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
499
500
  }
500
501
  }
501
- ClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
502
- ClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: ClickOutsideDirective, isStandalone: true, selector: "[etClickOutside]", outputs: { etClickOutside: "etClickOutside" }, ngImport: i0 });
503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ClickOutsideDirective, decorators: [{
502
+ ClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
503
+ ClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClickOutsideDirective, isStandalone: true, selector: "[etClickOutside]", outputs: { etClickOutside: "etClickOutside" }, ngImport: i0 });
504
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickOutsideDirective, decorators: [{
504
505
  type: Directive,
505
506
  args: [{
506
507
  selector: '[etClickOutside]',
@@ -654,9 +655,9 @@ class CursorDragScrollDirective {
654
655
  }
655
656
  }
656
657
  }
657
- CursorDragScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: CursorDragScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
658
- CursorDragScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: CursorDragScrollDirective, isStandalone: true, selector: "[etCursorDragScroll]", inputs: { enabled: ["etCursorDragScroll", "enabled"] }, providers: [DestroyService], exportAs: ["etCursorDragScroll"], ngImport: i0 });
659
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: CursorDragScrollDirective, decorators: [{
658
+ CursorDragScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CursorDragScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
659
+ CursorDragScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: CursorDragScrollDirective, isStandalone: true, selector: "[etCursorDragScroll]", inputs: { enabled: ["etCursorDragScroll", "enabled"] }, providers: [DestroyService], exportAs: ["etCursorDragScroll"], ngImport: i0 });
660
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CursorDragScrollDirective, decorators: [{
660
661
  type: Directive,
661
662
  args: [{
662
663
  selector: '[etCursorDragScroll]',
@@ -679,9 +680,9 @@ class DestroyDirective {
679
680
  this._destroy$.unsubscribe();
680
681
  }
681
682
  }
682
- DestroyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: DestroyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
683
- DestroyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: DestroyDirective, isStandalone: true, ngImport: i0 });
684
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: DestroyDirective, decorators: [{
683
+ DestroyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DestroyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
684
+ DestroyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: DestroyDirective, isStandalone: true, ngImport: i0 });
685
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DestroyDirective, decorators: [{
685
686
  type: Directive,
686
687
  args: [{
687
688
  standalone: true,
@@ -722,9 +723,9 @@ class LetDirective {
722
723
  }
723
724
  }
724
725
  }
725
- LetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: LetDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
726
- LetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: LetDirective, isStandalone: true, selector: "[etLet]", inputs: { etLet: "etLet" }, ngImport: i0 });
727
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: LetDirective, decorators: [{
726
+ LetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: LetDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
727
+ LetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: LetDirective, isStandalone: true, selector: "[etLet]", inputs: { etLet: "etLet" }, ngImport: i0 });
728
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: LetDirective, decorators: [{
728
729
  type: Directive,
729
730
  args: [{
730
731
  selector: '[etLet]',
@@ -778,9 +779,9 @@ class ObserveContentDirective {
778
779
  (_a = this._currentSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
779
780
  }
780
781
  }
781
- ObserveContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ObserveContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
782
- ObserveContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: ObserveContentDirective, isStandalone: true, selector: "[etObserveContent]", inputs: { disabled: ["etObserveContentDisabled", "disabled"], debounce: ["etObserveContentDebounce", "debounce"] }, outputs: { event: "etObserveContent" }, exportAs: ["etObserveContent"], ngImport: i0 });
783
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ObserveContentDirective, decorators: [{
782
+ ObserveContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
783
+ ObserveContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ObserveContentDirective, isStandalone: true, selector: "[etObserveContent]", inputs: { disabled: ["etObserveContentDisabled", "disabled"], debounce: ["etObserveContentDebounce", "debounce"] }, outputs: { event: "etObserveContent" }, exportAs: ["etObserveContent"], ngImport: i0 });
784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveContentDirective, decorators: [{
784
785
  type: Directive,
785
786
  args: [{
786
787
  selector: '[etObserveContent]',
@@ -842,9 +843,9 @@ class ObserveResizeDirective {
842
843
  (_a = this._currentSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
843
844
  }
844
845
  }
845
- ObserveResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ObserveResizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
846
- ObserveResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: ObserveResizeDirective, isStandalone: true, selector: "[etObserveResize]", inputs: { disabled: ["etObserveResizeDisabled", "disabled"], debounce: ["etObserveResizeDebounce", "debounce"] }, outputs: { event: "etObserveResize" }, exportAs: ["etObserveResize"], ngImport: i0 });
847
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ObserveResizeDirective, decorators: [{
846
+ ObserveResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveResizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
847
+ ObserveResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ObserveResizeDirective, isStandalone: true, selector: "[etObserveResize]", inputs: { disabled: ["etObserveResizeDisabled", "disabled"], debounce: ["etObserveResizeDebounce", "debounce"] }, outputs: { event: "etObserveResize" }, exportAs: ["etObserveResize"], ngImport: i0 });
848
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveResizeDirective, decorators: [{
848
849
  type: Directive,
849
850
  args: [{
850
851
  selector: '[etObserveResize]',
@@ -874,9 +875,9 @@ class ScrollObserverFirstElementDirective {
874
875
  this._isFirstElement = coerceBooleanProperty(value);
875
876
  }
876
877
  }
877
- ScrollObserverFirstElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ScrollObserverFirstElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
878
- ScrollObserverFirstElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: ScrollObserverFirstElementDirective, isStandalone: true, selector: "[etScrollObserverFirstElement]", inputs: { isFirstElement: ["etScrollObserverFirstElement", "isFirstElement"] }, host: { properties: { "class.et-scroll-observer-first-element": "this.isFirstElement" } }, ngImport: i0 });
879
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ScrollObserverFirstElementDirective, decorators: [{
878
+ ScrollObserverFirstElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverFirstElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
879
+ ScrollObserverFirstElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ScrollObserverFirstElementDirective, isStandalone: true, selector: "[etScrollObserverFirstElement]", inputs: { isFirstElement: ["etScrollObserverFirstElement", "isFirstElement"] }, host: { properties: { "class.et-scroll-observer-first-element": "this.isFirstElement" } }, ngImport: i0 });
880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverFirstElementDirective, decorators: [{
880
881
  type: Directive,
881
882
  args: [{
882
883
  selector: '[etScrollObserverFirstElement]',
@@ -893,9 +894,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
893
894
  const SCROLL_OBSERVER_IGNORE_TARGET_CLASS = 'et-scroll-observer-ignore-target';
894
895
  class ScrollObserverIgnoreTargetDirective {
895
896
  }
896
- ScrollObserverIgnoreTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
897
- ScrollObserverIgnoreTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: ScrollObserverIgnoreTargetDirective, isStandalone: true, selector: "[etScrollObserverIgnoreTarget]", host: { classAttribute: "et-scroll-observer-ignore-target" }, ngImport: i0 });
898
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, decorators: [{
897
+ ScrollObserverIgnoreTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
898
+ ScrollObserverIgnoreTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ScrollObserverIgnoreTargetDirective, isStandalone: true, selector: "[etScrollObserverIgnoreTarget]", host: { classAttribute: "et-scroll-observer-ignore-target" }, ngImport: i0 });
899
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, decorators: [{
899
900
  type: Directive,
900
901
  args: [{
901
902
  selector: '[etScrollObserverIgnoreTarget]',
@@ -918,9 +919,9 @@ class ScrollObserverLastElementDirective {
918
919
  this._isLastElement = coerceBooleanProperty(value);
919
920
  }
920
921
  }
921
- ScrollObserverLastElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ScrollObserverLastElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
922
- ScrollObserverLastElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: ScrollObserverLastElementDirective, isStandalone: true, selector: "[etScrollObserverLastElement]", inputs: { isLastElement: ["etScrollObserverLastElement", "isLastElement"] }, host: { properties: { "class.et-scroll-observer-last-element": "this.isLastElement" }, classAttribute: "et-scroll-observer-last-element" }, ngImport: i0 });
923
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ScrollObserverLastElementDirective, decorators: [{
922
+ ScrollObserverLastElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverLastElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
923
+ ScrollObserverLastElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ScrollObserverLastElementDirective, isStandalone: true, selector: "[etScrollObserverLastElement]", inputs: { isLastElement: ["etScrollObserverLastElement", "isLastElement"] }, host: { properties: { "class.et-scroll-observer-last-element": "this.isLastElement" }, classAttribute: "et-scroll-observer-last-element" }, ngImport: i0 });
924
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverLastElementDirective, decorators: [{
924
925
  type: Directive,
925
926
  args: [{
926
927
  selector: '[etScrollObserverLastElement]',
@@ -1074,15 +1075,15 @@ class ObserveScrollStateDirective {
1074
1075
  return element;
1075
1076
  }
1076
1077
  }
1077
- ObserveScrollStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ObserveScrollStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1078
- ObserveScrollStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: ObserveScrollStateDirective, isStandalone: true, selector: "[etObserveScrollState]", inputs: { observerRootMargin: "observerRootMargin", observerThreshold: "observerThreshold" }, outputs: { etObserveScrollState: "etObserveScrollState" }, providers: [
1078
+ ObserveScrollStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveScrollStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1079
+ ObserveScrollStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ObserveScrollStateDirective, isStandalone: true, selector: "[etObserveScrollState]", inputs: { observerRootMargin: "observerRootMargin", observerThreshold: "observerThreshold" }, outputs: { etObserveScrollState: "etObserveScrollState" }, providers: [
1079
1080
  {
1080
1081
  provide: OBSERVE_SCROLL_STATE,
1081
1082
  useExisting: ObserveScrollStateDirective,
1082
1083
  },
1083
1084
  DestroyService,
1084
1085
  ], exportAs: ["etObserveScrollState"], ngImport: i0 });
1085
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ObserveScrollStateDirective, decorators: [{
1086
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveScrollStateDirective, decorators: [{
1086
1087
  type: Directive,
1087
1088
  args: [{
1088
1089
  selector: '[etObserveScrollState]',
@@ -1125,9 +1126,9 @@ class RepeatDirective {
1125
1126
  }
1126
1127
  }
1127
1128
  }
1128
- RepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: RepeatDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1129
- RepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: RepeatDirective, isStandalone: true, selector: "[etRepeat]", inputs: { repeatCount: ["etRepeat", "repeatCount"] }, ngImport: i0 });
1130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: RepeatDirective, decorators: [{
1129
+ RepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RepeatDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1130
+ RepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: RepeatDirective, isStandalone: true, selector: "[etRepeat]", inputs: { repeatCount: ["etRepeat", "repeatCount"] }, ngImport: i0 });
1131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RepeatDirective, decorators: [{
1131
1132
  type: Directive,
1132
1133
  args: [{
1133
1134
  selector: '[etRepeat]',
@@ -1138,6 +1139,490 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
1138
1139
  args: ['etRepeat']
1139
1140
  }] } });
1140
1141
 
1142
+ const SEO_DIRECTIVE_TOKEN = new InjectionToken('SEO_DIRECTIVE_TOKEN');
1143
+
1144
+ const mergeSeoConfig = (config, parentConfig) => {
1145
+ return Object.assign(Object.assign({}, parentConfig), config);
1146
+ };
1147
+
1148
+ class SeoDirective {
1149
+ constructor() {
1150
+ this._metaService = inject(Meta);
1151
+ this._titleService = inject(Title);
1152
+ this._onDeactivate$ = new Subject();
1153
+ this._isDeactivated = false;
1154
+ this.parent = inject(SEO_DIRECTIVE_TOKEN, { optional: true, skipSelf: true });
1155
+ this._config = {};
1156
+ }
1157
+ get config() {
1158
+ return this._config;
1159
+ }
1160
+ ngOnInit() {
1161
+ var _a;
1162
+ (_a = this.parent) === null || _a === void 0 ? void 0 : _a._deactivate();
1163
+ }
1164
+ ngOnDestroy() {
1165
+ var _a;
1166
+ this._deactivate();
1167
+ this._cleanUp();
1168
+ (_a = this.parent) === null || _a === void 0 ? void 0 : _a._activate();
1169
+ }
1170
+ // TODO(TRB): This should get split up into multiple methods to make it more readable
1171
+ // - updateTitle
1172
+ // - updateMeta
1173
+ // - updateLink
1174
+ updateConfig(config) {
1175
+ var _a;
1176
+ this._config = mergeSeoConfig(config, ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.config) || {});
1177
+ if (this._isDeactivated) {
1178
+ return;
1179
+ }
1180
+ this._deactivate();
1181
+ this._activate();
1182
+ }
1183
+ _activate() {
1184
+ this._onDeactivate$.next(false);
1185
+ this._isDeactivated = false;
1186
+ for (const [key, value] of Object.entries(this._config)) {
1187
+ if (value instanceof Observable) {
1188
+ value.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(key, value));
1189
+ }
1190
+ else if (Array.isArray(value)) {
1191
+ value.forEach((value) => {
1192
+ if (value instanceof Observable) {
1193
+ value.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(key, value));
1194
+ }
1195
+ else {
1196
+ this._update(key, value);
1197
+ }
1198
+ });
1199
+ }
1200
+ else if (typeof value === 'object' && value !== null) {
1201
+ for (const [subKey, subValue] of Object.entries(value)) {
1202
+ if (subValue instanceof Observable) {
1203
+ subValue.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(`${key}:${subKey}`, value));
1204
+ }
1205
+ else {
1206
+ this._update(`${key}:${subKey}`, subValue);
1207
+ }
1208
+ }
1209
+ }
1210
+ else {
1211
+ this._update(key, value);
1212
+ }
1213
+ }
1214
+ }
1215
+ _deactivate() {
1216
+ this._onDeactivate$.next(true);
1217
+ this._isDeactivated = true;
1218
+ }
1219
+ _update(key, value) {
1220
+ switch (key) {
1221
+ case 'title':
1222
+ if (value && typeof value === 'string') {
1223
+ this._titleService.setTitle(value);
1224
+ }
1225
+ break;
1226
+ case 'canonical':
1227
+ {
1228
+ const link = document.querySelector(`link[rel="${key}"]`);
1229
+ if (link) {
1230
+ link.setAttribute('href', value);
1231
+ }
1232
+ else {
1233
+ const newLink = document.createElement('link');
1234
+ newLink.setAttribute('rel', key);
1235
+ newLink.setAttribute('href', value);
1236
+ document.head.appendChild(newLink);
1237
+ }
1238
+ }
1239
+ break;
1240
+ case 'alternate':
1241
+ {
1242
+ const link = document.querySelector(`link[rel="${key}"][hreflang="${value.hreflang}"]`);
1243
+ if (link) {
1244
+ link.setAttribute('href', value.href);
1245
+ }
1246
+ else {
1247
+ const newLink = document.createElement('link');
1248
+ newLink.setAttribute('rel', key);
1249
+ newLink.setAttribute('hreflang', value.hreflang);
1250
+ newLink.setAttribute('href', value.href);
1251
+ document.head.appendChild(newLink);
1252
+ }
1253
+ }
1254
+ break;
1255
+ default:
1256
+ if (value !== undefined && value !== null) {
1257
+ const val = Array.isArray(value) ? value.join(', ') : value;
1258
+ this._metaService.updateTag({ name: key, content: val });
1259
+ }
1260
+ else {
1261
+ this._metaService.removeTag(`name="${key}"`);
1262
+ }
1263
+ break;
1264
+ }
1265
+ }
1266
+ _cleanUp() {
1267
+ var _a, _b, _c, _d, _e;
1268
+ for (const key in this._config) {
1269
+ if (key === 'alternate') {
1270
+ const links = document.querySelectorAll(`link[rel="${key}"]`);
1271
+ links.forEach((link) => {
1272
+ link.remove();
1273
+ });
1274
+ continue;
1275
+ }
1276
+ if (key === 'canonical') {
1277
+ const link = document.querySelector(`link[rel="${key}"]`);
1278
+ if (link) {
1279
+ link.remove();
1280
+ }
1281
+ continue;
1282
+ }
1283
+ if (typeof this._config[key] === 'object' &&
1284
+ this._config[key] !== null &&
1285
+ !(this._config[key] instanceof Observable)) {
1286
+ for (const subKey in this._config[key]) {
1287
+ const parentValue = (_c = (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b[key]) === null || _c === void 0 ? void 0 : _c[subKey];
1288
+ if (parentValue === undefined) {
1289
+ this._update(`${key}:${subKey}`, undefined);
1290
+ }
1291
+ }
1292
+ }
1293
+ else {
1294
+ const parentValue = (_e = (_d = this.parent) === null || _d === void 0 ? void 0 : _d.config) === null || _e === void 0 ? void 0 : _e[key];
1295
+ if (parentValue === undefined) {
1296
+ this._update(key, null);
1297
+ }
1298
+ }
1299
+ }
1300
+ }
1301
+ }
1302
+ SeoDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SeoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1303
+ SeoDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: SeoDirective, isStandalone: true, providers: [{ provide: SEO_DIRECTIVE_TOKEN, useExisting: SeoDirective }], ngImport: i0 });
1304
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SeoDirective, decorators: [{
1305
+ type: Directive,
1306
+ args: [{
1307
+ standalone: true,
1308
+ providers: [{ provide: SEO_DIRECTIVE_TOKEN, useExisting: SeoDirective }],
1309
+ }]
1310
+ }] });
1311
+
1312
+ // TODO(TRB): Add correct type once provided by API
1313
+ const normalizeGameResultType = (type) => {
1314
+ if (!type) {
1315
+ return null;
1316
+ }
1317
+ switch (type) {
1318
+ case 'extra_time':
1319
+ return {
1320
+ i18n: 'game-result-type.extra-time',
1321
+ shortCode: 'AET',
1322
+ text: 'After Extra Time',
1323
+ };
1324
+ case 'penalty':
1325
+ return {
1326
+ i18n: 'game-result-type.penalty',
1327
+ shortCode: 'PSO',
1328
+ text: 'Penalty shootout',
1329
+ };
1330
+ case 'golden_goal':
1331
+ return {
1332
+ i18n: 'game-result-type.golden-goal',
1333
+ shortCode: 'GG',
1334
+ text: 'Golden Goal',
1335
+ };
1336
+ case 'default':
1337
+ default:
1338
+ return {
1339
+ i18n: 'game-result-type.full-time',
1340
+ shortCode: 'FT',
1341
+ text: 'Full Time',
1342
+ };
1343
+ }
1344
+ };
1345
+
1346
+ class NormalizeGameResultTypePipe {
1347
+ constructor() {
1348
+ this.transform = normalizeGameResultType;
1349
+ }
1350
+ }
1351
+ NormalizeGameResultTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeGameResultTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1352
+ NormalizeGameResultTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NormalizeGameResultTypePipe, isStandalone: true, name: "etNormalizeGameResultType" });
1353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeGameResultTypePipe, decorators: [{
1354
+ type: Pipe,
1355
+ args: [{ name: 'etNormalizeGameResultType', standalone: true }]
1356
+ }] });
1357
+
1358
+ const normalizeMatchState = (match) => {
1359
+ if (match === null || match === void 0 ? void 0 : match.isCompletedByReferee) {
1360
+ return "autoWin" /* MatchStateType.AUTO_WIN */;
1361
+ }
1362
+ else if ((match === null || match === void 0 ? void 0 : match.status) === 'preparing') {
1363
+ return "preMatch" /* MatchStateType.PRE_MATCH */;
1364
+ }
1365
+ else if ((match === null || match === void 0 ? void 0 : match.status) === 'started') {
1366
+ return "live" /* MatchStateType.LIVE */;
1367
+ }
1368
+ else if ((match === null || match === void 0 ? void 0 : match.status) === 'published' || (match === null || match === void 0 ? void 0 : match.status) === 'finished') {
1369
+ return "postMatch" /* MatchStateType.POST_MATCH */;
1370
+ }
1371
+ else if ((match === null || match === void 0 ? void 0 : match.round.state) !== 'preparing') {
1372
+ return "preparingRound" /* MatchStateType.PREPARING_ROUND */;
1373
+ }
1374
+ return null;
1375
+ };
1376
+
1377
+ class NormalizeMatchStatePipe {
1378
+ constructor() {
1379
+ this.transform = normalizeMatchState;
1380
+ }
1381
+ }
1382
+ NormalizeMatchStatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchStatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1383
+ NormalizeMatchStatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchStatePipe, isStandalone: true, name: "etNormalizeMatchState" });
1384
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchStatePipe, decorators: [{
1385
+ type: Pipe,
1386
+ args: [{ name: 'etNormalizeMatchState', standalone: true }]
1387
+ }] });
1388
+
1389
+ const normalizeMatchParticipants = (match) => {
1390
+ const matchState = normalizeMatchState(match);
1391
+ if (!match || !matchState) {
1392
+ return null;
1393
+ }
1394
+ return {
1395
+ home: normalizeMatchParticipant(match, 'home'),
1396
+ away: normalizeMatchParticipant(match, 'away'),
1397
+ };
1398
+ };
1399
+ const normalizeMatchParticipant = (match, side) => {
1400
+ var _a, _b, _c, _d;
1401
+ const matchState = normalizeMatchState(match);
1402
+ if (!match || !matchState) {
1403
+ return null;
1404
+ }
1405
+ const participant = match[side];
1406
+ const participantType = (_d = (_b = (_a = match.home) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : (_c = match.away) === null || _c === void 0 ? void 0 : _c.type) !== null && _d !== void 0 ? _d : 'unknown';
1407
+ if (!participant) {
1408
+ if (matchState === "postMatch" /* MatchStateType.POST_MATCH */ || matchState === "autoWin" /* MatchStateType.AUTO_WIN */) {
1409
+ return {
1410
+ participantType,
1411
+ type: 'none',
1412
+ i18n: 'match-participant.none',
1413
+ text: 'No opponent',
1414
+ data: participant,
1415
+ };
1416
+ }
1417
+ else {
1418
+ return {
1419
+ participantType,
1420
+ type: 'tbd',
1421
+ i18n: 'match-participant.tbd',
1422
+ text: 'TBD',
1423
+ data: participant,
1424
+ };
1425
+ }
1426
+ }
1427
+ else {
1428
+ return {
1429
+ participantType,
1430
+ type: 'participant',
1431
+ data: participant,
1432
+ };
1433
+ }
1434
+ };
1435
+
1436
+ class NormalizeMatchParticipantsPipe {
1437
+ constructor() {
1438
+ this.transform = normalizeMatchParticipants;
1439
+ }
1440
+ }
1441
+ NormalizeMatchParticipantsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchParticipantsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1442
+ NormalizeMatchParticipantsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchParticipantsPipe, isStandalone: true, name: "etNormalizeMatchParticipants" });
1443
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchParticipantsPipe, decorators: [{
1444
+ type: Pipe,
1445
+ args: [{ name: 'etNormalizeMatchParticipants', standalone: true }]
1446
+ }] });
1447
+
1448
+ const EMPTY_SCORE = {
1449
+ home: { score: 'match-score.placeholder', isWinner: false },
1450
+ away: { score: 'match-score.placeholder', isWinner: false },
1451
+ isNumeric: false,
1452
+ subLine: null,
1453
+ };
1454
+ const normalizeMatchScore = (match) => {
1455
+ var _a, _b;
1456
+ if (!match) {
1457
+ return null;
1458
+ }
1459
+ const matchState = normalizeMatchState(match);
1460
+ const subLine = getMatchScoreSubLine(match);
1461
+ if (!match.homeScore && !match.awayScore) {
1462
+ return Object.assign(Object.assign({}, EMPTY_SCORE), { subLine, isNumeric: false });
1463
+ }
1464
+ if (isKnockoutMatch(match)) {
1465
+ if (matchState === "preMatch" /* MatchStateType.PRE_MATCH */ || matchState === "live" /* MatchStateType.LIVE */) {
1466
+ return Object.assign(Object.assign({}, EMPTY_SCORE), { subLine, isNumeric: false });
1467
+ }
1468
+ return {
1469
+ home: {
1470
+ score: getKnockoutMatchScore(match.homeScore),
1471
+ isWinner: ((_a = match.homeScore) === null || _a === void 0 ? void 0 : _a.status) === 'won',
1472
+ },
1473
+ away: {
1474
+ score: getKnockoutMatchScore(match.awayScore),
1475
+ isWinner: ((_b = match.awayScore) === null || _b === void 0 ? void 0 : _b.status) === 'won',
1476
+ },
1477
+ subLine,
1478
+ isNumeric: false,
1479
+ };
1480
+ }
1481
+ else if (isGroupMatch(match)) {
1482
+ if (match.games.length === 1) {
1483
+ // Return the score if only one game has been played
1484
+ return Object.assign(Object.assign({}, getGroupMatchScore(match)), { subLine, isNumeric: true });
1485
+ }
1486
+ else {
1487
+ return Object.assign(Object.assign({}, getGroupMatchPoints(match)), { subLine, isNumeric: true });
1488
+ }
1489
+ }
1490
+ else {
1491
+ return Object.assign(Object.assign({}, getGroupMatchScore(match)), { subLine, isNumeric: true });
1492
+ }
1493
+ };
1494
+ const isKnockoutMatch = (match) => {
1495
+ if (!match) {
1496
+ return false;
1497
+ }
1498
+ return (match.matchType === 'single_elimination' ||
1499
+ match.matchType === 'double_elimination' ||
1500
+ match.matchType === 'fifa_swiss');
1501
+ };
1502
+ const isGroupMatch = (match) => {
1503
+ if (!match) {
1504
+ return false;
1505
+ }
1506
+ return match.matchType === 'groups' || match.matchType === 'league';
1507
+ };
1508
+ const getKnockoutMatchScore = (score) => {
1509
+ if ((score === null || score === void 0 ? void 0 : score.status) === 'won') {
1510
+ return 'match-score.knockout.won';
1511
+ }
1512
+ else if ((score === null || score === void 0 ? void 0 : score.status) === 'lost') {
1513
+ return 'match-score.knockout.lost';
1514
+ }
1515
+ else if ((score === null || score === void 0 ? void 0 : score.status) === 'tie') {
1516
+ return 'match-score.knockout.tie';
1517
+ }
1518
+ return null;
1519
+ };
1520
+ const getMatchScoreSubLine = (match) => {
1521
+ if (isKnockoutMatch(match)) {
1522
+ return null;
1523
+ }
1524
+ else if (isGroupMatch(match)) {
1525
+ return 'match-score.groups.sub-line';
1526
+ }
1527
+ else {
1528
+ return null;
1529
+ }
1530
+ };
1531
+ const getGroupMatchScore = (match) => {
1532
+ var _a, _b, _c, _d;
1533
+ if (!match) {
1534
+ return null;
1535
+ }
1536
+ return {
1537
+ home: {
1538
+ score: ((_a = match.homeScore) === null || _a === void 0 ? void 0 : _a.ownPoints) || 0,
1539
+ isWinner: ((_b = match.homeScore) === null || _b === void 0 ? void 0 : _b.status) === 'won',
1540
+ },
1541
+ away: {
1542
+ score: ((_c = match.awayScore) === null || _c === void 0 ? void 0 : _c.ownPoints) || 0,
1543
+ isWinner: ((_d = match.awayScore) === null || _d === void 0 ? void 0 : _d.status) === 'won',
1544
+ },
1545
+ };
1546
+ };
1547
+ const getGroupMatchPoints = (match) => {
1548
+ var _a, _b, _c, _d;
1549
+ if (!match) {
1550
+ return null;
1551
+ }
1552
+ return {
1553
+ home: {
1554
+ score: ((_a = match.homeScore) === null || _a === void 0 ? void 0 : _a.score) || 0,
1555
+ isWinner: ((_b = match.homeScore) === null || _b === void 0 ? void 0 : _b.status) === 'won',
1556
+ },
1557
+ away: {
1558
+ score: ((_c = match.awayScore) === null || _c === void 0 ? void 0 : _c.score) || 0,
1559
+ isWinner: ((_d = match.awayScore) === null || _d === void 0 ? void 0 : _d.status) === 'won',
1560
+ },
1561
+ };
1562
+ };
1563
+
1564
+ class NormalizeMatchScorePipe {
1565
+ constructor() {
1566
+ this.transform = normalizeMatchScore;
1567
+ }
1568
+ }
1569
+ NormalizeMatchScorePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchScorePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1570
+ NormalizeMatchScorePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchScorePipe, isStandalone: true, name: "etNormalizeMatchScore" });
1571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchScorePipe, decorators: [{
1572
+ type: Pipe,
1573
+ args: [{ name: 'etNormalizeMatchScore', standalone: true }]
1574
+ }] });
1575
+
1576
+ const normalizeMatchType = (matchType) => {
1577
+ if (!matchType) {
1578
+ return null;
1579
+ }
1580
+ switch (matchType) {
1581
+ case 'double_elimination':
1582
+ return {
1583
+ i18n: 'match-type.double-elimination',
1584
+ text: 'Double Elimination',
1585
+ };
1586
+ case 'single_elimination':
1587
+ return {
1588
+ i18n: 'match-type.single-elimination',
1589
+ text: 'Single Elimination',
1590
+ };
1591
+ case 'fifa_swiss':
1592
+ return {
1593
+ i18n: 'match-type.fifa-swiss',
1594
+ text: 'FIFA Swiss',
1595
+ };
1596
+ case 'groups':
1597
+ return {
1598
+ i18n: 'match-type.groups',
1599
+ text: 'Groups',
1600
+ };
1601
+ case 'league':
1602
+ return {
1603
+ i18n: 'match-type.league',
1604
+ text: 'League',
1605
+ };
1606
+ case 'pools':
1607
+ return {
1608
+ i18n: 'match-type.pools',
1609
+ text: 'Pools',
1610
+ };
1611
+ }
1612
+ };
1613
+
1614
+ class NormalizeMatchTypePipe {
1615
+ constructor() {
1616
+ this.transform = normalizeMatchType;
1617
+ }
1618
+ }
1619
+ NormalizeMatchTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1620
+ NormalizeMatchTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchTypePipe, isStandalone: true, name: "etNormalizeMatchType" });
1621
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchTypePipe, decorators: [{
1622
+ type: Pipe,
1623
+ args: [{ name: 'etNormalizeMatchType', standalone: true }]
1624
+ }] });
1625
+
1141
1626
  const toArray = (value) => {
1142
1627
  return Array.from({ length: value }, (_, i) => i);
1143
1628
  };
@@ -1148,9 +1633,9 @@ class ToArrayPipe {
1148
1633
  this.transform = toArray;
1149
1634
  }
1150
1635
  }
1151
- ToArrayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ToArrayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1152
- ToArrayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0", ngImport: i0, type: ToArrayPipe, isStandalone: true, name: "toArray" });
1153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ToArrayPipe, decorators: [{
1636
+ ToArrayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ToArrayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1637
+ ToArrayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: ToArrayPipe, isStandalone: true, name: "toArray" });
1638
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ToArrayPipe, decorators: [{
1154
1639
  type: Pipe,
1155
1640
  args: [{ name: 'toArray', standalone: true }]
1156
1641
  }] });
@@ -1159,5 +1644,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
1159
1644
  * Generated bundle index. Do not edit.
1160
1645
  */
1161
1646
 
1162
- export { ClickObserverFactory, ClickObserverService, ClickOutsideDirective, ContentObserverService, CursorDragScrollDirective, DEFAULT_VIEWPORT_CONFIG, DestroyDirective, DestroyService, FocusVisibleService, LetContext, LetDirective, Memo, MutationObserverFactory, OBSERVE_SCROLL_STATE, ObserveContentDirective, ObserveResizeDirective, ObserveScrollStateDirective, RepeatDirective, ResizeObserverFactory, ResizeObserverService, SCROLL_OBSERVER_FIRST_ELEMENT_CLASS, SCROLL_OBSERVER_IGNORE_TARGET_CLASS, SCROLL_OBSERVER_LAST_ELEMENT_CLASS, ScrollObserverFirstElementDirective, ScrollObserverIgnoreTargetDirective, ScrollObserverLastElementDirective, ToArrayPipe, VIEWPORT_CONFIG, ViewportService, clamp, elementCanScroll, provideViewportConfig, toArray, toArrayTrackByFn };
1647
+ export { ClickObserverFactory, ClickObserverService, ClickOutsideDirective, ContentObserverService, CursorDragScrollDirective, DEFAULT_VIEWPORT_CONFIG, DestroyDirective, DestroyService, FocusVisibleService, LetContext, LetDirective, Memo, MutationObserverFactory, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, OBSERVE_SCROLL_STATE, ObserveContentDirective, ObserveResizeDirective, ObserveScrollStateDirective, RepeatDirective, ResizeObserverFactory, ResizeObserverService, SCROLL_OBSERVER_FIRST_ELEMENT_CLASS, SCROLL_OBSERVER_IGNORE_TARGET_CLASS, SCROLL_OBSERVER_LAST_ELEMENT_CLASS, SEO_DIRECTIVE_TOKEN, ScrollObserverFirstElementDirective, ScrollObserverIgnoreTargetDirective, ScrollObserverLastElementDirective, SeoDirective, ToArrayPipe, VIEWPORT_CONFIG, ViewportService, clamp, elementCanScroll, getGroupMatchPoints, getGroupMatchScore, getKnockoutMatchScore, getMatchScoreSubLine, isGroupMatch, isKnockoutMatch, mergeSeoConfig, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, provideViewportConfig, toArray, toArrayTrackByFn };
1163
1648
  //# sourceMappingURL=ethlete-core.mjs.map