@angular/common 17.1.1 → 17.1.3

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 (107) hide show
  1. package/esm2022/http/public_api.mjs +6 -6
  2. package/esm2022/http/src/client.mjs +6 -6
  3. package/esm2022/http/src/fetch.mjs +12 -11
  4. package/esm2022/http/src/headers.mjs +7 -9
  5. package/esm2022/http/src/interceptor.mjs +11 -10
  6. package/esm2022/http/src/jsonp.mjs +11 -13
  7. package/esm2022/http/src/module.mjs +18 -28
  8. package/esm2022/http/src/params.mjs +15 -14
  9. package/esm2022/http/src/private_export.mjs +2 -2
  10. package/esm2022/http/src/provider.mjs +13 -13
  11. package/esm2022/http/src/request.mjs +19 -21
  12. package/esm2022/http/src/response.mjs +3 -3
  13. package/esm2022/http/src/transfer_cache.mjs +15 -11
  14. package/esm2022/http/src/xhr.mjs +11 -10
  15. package/esm2022/http/src/xsrf.mjs +17 -14
  16. package/esm2022/http/testing/src/api.mjs +1 -1
  17. package/esm2022/http/testing/src/backend.mjs +11 -11
  18. package/esm2022/http/testing/src/module.mjs +7 -13
  19. package/esm2022/http/testing/src/provider.mjs +1 -1
  20. package/esm2022/http/testing/src/request.mjs +11 -8
  21. package/esm2022/src/common.mjs +6 -6
  22. package/esm2022/src/common_module.mjs +5 -5
  23. package/esm2022/src/cookie.mjs +1 -1
  24. package/esm2022/src/directives/index.mjs +1 -1
  25. package/esm2022/src/directives/ng_class.mjs +6 -6
  26. package/esm2022/src/directives/ng_component_outlet.mjs +11 -13
  27. package/esm2022/src/directives/ng_for_of.mjs +5 -5
  28. package/esm2022/src/directives/ng_if.mjs +7 -9
  29. package/esm2022/src/directives/ng_optimized_image/asserts.mjs +1 -1
  30. package/esm2022/src/directives/ng_optimized_image/error_helper.mjs +4 -2
  31. package/esm2022/src/directives/ng_optimized_image/image_loaders/cloudflare_loader.mjs +1 -1
  32. package/esm2022/src/directives/ng_optimized_image/image_loaders/cloudinary_loader.mjs +9 -8
  33. package/esm2022/src/directives/ng_optimized_image/image_loaders/image_loader.mjs +2 -2
  34. package/esm2022/src/directives/ng_optimized_image/image_loaders/imagekit_loader.mjs +1 -1
  35. package/esm2022/src/directives/ng_optimized_image/image_loaders/imgix_loader.mjs +2 -2
  36. package/esm2022/src/directives/ng_optimized_image/lcp_image_observer.mjs +6 -6
  37. package/esm2022/src/directives/ng_optimized_image/ng_optimized_image.mjs +35 -28
  38. package/esm2022/src/directives/ng_optimized_image/preconnect_link_checker.mjs +12 -14
  39. package/esm2022/src/directives/ng_optimized_image/preload-link-creator.mjs +4 -4
  40. package/esm2022/src/directives/ng_optimized_image/tokens.mjs +5 -2
  41. package/esm2022/src/directives/ng_optimized_image/url.mjs +2 -2
  42. package/esm2022/src/directives/ng_plural.mjs +7 -7
  43. package/esm2022/src/directives/ng_style.mjs +5 -5
  44. package/esm2022/src/directives/ng_switch.mjs +17 -15
  45. package/esm2022/src/directives/ng_switch_equality.mjs +1 -1
  46. package/esm2022/src/directives/ng_template_outlet.mjs +5 -5
  47. package/esm2022/src/dom_adapter.mjs +2 -4
  48. package/esm2022/src/dom_tokens.mjs +2 -2
  49. package/esm2022/src/i18n/format_date.mjs +62 -43
  50. package/esm2022/src/i18n/format_number.mjs +14 -13
  51. package/esm2022/src/i18n/locale_data.mjs +1 -1
  52. package/esm2022/src/i18n/locale_data_api.mjs +14 -8
  53. package/esm2022/src/i18n/localization.mjs +7 -7
  54. package/esm2022/src/location/hash_location_strategy.mjs +6 -8
  55. package/esm2022/src/location/index.mjs +2 -2
  56. package/esm2022/src/location/location.mjs +9 -11
  57. package/esm2022/src/location/location_strategy.mjs +14 -11
  58. package/esm2022/src/location/platform_location.mjs +9 -9
  59. package/esm2022/src/location/util.mjs +2 -2
  60. package/esm2022/src/navigation/platform_navigation.mjs +4 -4
  61. package/esm2022/src/pipes/async_pipe.mjs +7 -7
  62. package/esm2022/src/pipes/case_conversion_pipes.mjs +11 -11
  63. package/esm2022/src/pipes/date_pipe.mjs +70 -71
  64. package/esm2022/src/pipes/i18n_plural_pipe.mjs +4 -5
  65. package/esm2022/src/pipes/i18n_select_pipe.mjs +4 -5
  66. package/esm2022/src/pipes/index.mjs +1 -1
  67. package/esm2022/src/pipes/invalid_pipe_argument_error.mjs +1 -1
  68. package/esm2022/src/pipes/json_pipe.mjs +3 -3
  69. package/esm2022/src/pipes/keyvalue_pipe.mjs +7 -9
  70. package/esm2022/src/pipes/number_pipe.mjs +13 -13
  71. package/esm2022/src/pipes/slice_pipe.mjs +4 -4
  72. package/esm2022/src/private_export.mjs +2 -2
  73. package/esm2022/src/version.mjs +1 -1
  74. package/esm2022/src/viewport_scroller.mjs +6 -5
  75. package/esm2022/testing/src/location_mock.mjs +34 -19
  76. package/esm2022/testing/src/mock_location_strategy.mjs +6 -6
  77. package/esm2022/testing/src/mock_platform_location.mjs +33 -12
  78. package/esm2022/testing/src/navigation/fake_navigation.mjs +11 -9
  79. package/esm2022/testing/src/navigation/provide_fake_platform_navigation.mjs +2 -2
  80. package/esm2022/testing/src/testing.mjs +2 -2
  81. package/esm2022/upgrade/src/index.mjs +2 -2
  82. package/esm2022/upgrade/src/location_shim.mjs +11 -13
  83. package/esm2022/upgrade/src/location_upgrade_module.mjs +15 -18
  84. package/esm2022/upgrade/src/params.mjs +6 -6
  85. package/esm2022/upgrade/src/utils.mjs +2 -2
  86. package/fesm2022/common.mjs +366 -338
  87. package/fesm2022/common.mjs.map +1 -1
  88. package/fesm2022/http/testing.mjs +26 -29
  89. package/fesm2022/http/testing.mjs.map +1 -1
  90. package/fesm2022/http.mjs +133 -138
  91. package/fesm2022/http.mjs.map +1 -1
  92. package/fesm2022/testing.mjs +70 -34
  93. package/fesm2022/testing.mjs.map +1 -1
  94. package/fesm2022/upgrade.mjs +30 -35
  95. package/fesm2022/upgrade.mjs.map +1 -1
  96. package/http/index.d.ts +2 -2
  97. package/http/testing/index.d.ts +3 -3
  98. package/index.d.ts +69 -69
  99. package/locales/ff-CM.mjs +31 -11
  100. package/locales/ff-GN.mjs +31 -11
  101. package/locales/ff-MR.mjs +31 -11
  102. package/locales/global/ff-CM.js +58 -44
  103. package/locales/global/ff-GN.js +58 -44
  104. package/locales/global/ff-MR.js +58 -44
  105. package/package.json +2 -2
  106. package/testing/index.d.ts +1 -1
  107. package/upgrade/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.1.1
2
+ * @license Angular v17.1.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -13,9 +13,7 @@ function getDOM() {
13
13
  return _DOM;
14
14
  }
15
15
  function setRootDomAdapter(adapter) {
16
- if (!_DOM) {
17
- _DOM = adapter;
18
- }
16
+ _DOM ??= adapter;
19
17
  }
20
18
  /* tslint:disable:requireParameterType */
21
19
  /**
@@ -34,7 +32,7 @@ class DomAdapter {
34
32
  *
35
33
  * @publicApi
36
34
  */
37
- const DOCUMENT = new InjectionToken('DocumentToken');
35
+ const DOCUMENT = new InjectionToken(ngDevMode ? 'DocumentToken' : '');
38
36
 
39
37
  /**
40
38
  * This class should not be used directly by an application developer. Instead, use
@@ -60,12 +58,12 @@ const DOCUMENT = new InjectionToken('DocumentToken');
60
58
  */
61
59
  class PlatformLocation {
62
60
  historyGo(relativePosition) {
63
- throw new Error('Not implemented');
61
+ throw new Error(ngDevMode ? 'Not implemented' : '');
64
62
  }
65
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
66
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) }); }
63
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
64
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) }); }
67
65
  }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PlatformLocation, decorators: [{
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PlatformLocation, decorators: [{
69
67
  type: Injectable,
70
68
  args: [{ providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) }]
71
69
  }] });
@@ -75,7 +73,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImpor
75
73
  *
76
74
  * @publicApi
77
75
  */
78
- const LOCATION_INITIALIZED = new InjectionToken('Location Initialized');
76
+ const LOCATION_INITIALIZED = new InjectionToken(ngDevMode ? 'Location Initialized' : '');
79
77
  /**
80
78
  * `PlatformLocation` encapsulates all of the direct calls to platform APIs.
81
79
  * This class should not be used directly by an application developer. Instead, use
@@ -145,10 +143,10 @@ class BrowserPlatformLocation extends PlatformLocation {
145
143
  getState() {
146
144
  return this._history.state;
147
145
  }
148
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: BrowserPlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
149
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: () => new BrowserPlatformLocation() }); }
146
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: BrowserPlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
147
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: () => new BrowserPlatformLocation() }); }
150
148
  }
151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
152
150
  type: Injectable,
153
151
  args: [{
154
152
  providedIn: 'platform',
@@ -198,7 +196,7 @@ function joinWithSlash(start, end) {
198
196
  */
199
197
  function stripTrailingSlash(url) {
200
198
  const match = url.match(/#|\?|$/);
201
- const pathEndIdx = match && match.index || url.length;
199
+ const pathEndIdx = (match && match.index) || url.length;
202
200
  const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);
203
201
  return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);
204
202
  }
@@ -232,12 +230,12 @@ function normalizeQueryParams(params) {
232
230
  */
233
231
  class LocationStrategy {
234
232
  historyGo(relativePosition) {
235
- throw new Error('Not implemented');
233
+ throw new Error(ngDevMode ? 'Not implemented' : '');
236
234
  }
237
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
238
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }); }
235
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
236
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }); }
239
237
  }
240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: LocationStrategy, decorators: [{
238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: LocationStrategy, decorators: [{
241
239
  type: Injectable,
242
240
  args: [{ providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }]
243
241
  }] });
@@ -264,7 +262,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImpor
264
262
  *
265
263
  * @publicApi
266
264
  */
267
- const APP_BASE_HREF = new InjectionToken('appBaseHref');
265
+ const APP_BASE_HREF = new InjectionToken(ngDevMode ? 'appBaseHref' : '');
268
266
  /**
269
267
  * @description
270
268
  * A {@link LocationStrategy} used to configure the {@link Location} service to
@@ -301,8 +299,11 @@ class PathLocationStrategy extends LocationStrategy {
301
299
  super();
302
300
  this._platformLocation = _platformLocation;
303
301
  this._removeListenerFns = [];
304
- this._baseHref = href ?? this._platformLocation.getBaseHrefFromDOM() ??
305
- inject(DOCUMENT).location?.origin ?? '';
302
+ this._baseHref =
303
+ href ??
304
+ this._platformLocation.getBaseHrefFromDOM() ??
305
+ inject(DOCUMENT).location?.origin ??
306
+ '';
306
307
  }
307
308
  /** @nodoc */
308
309
  ngOnDestroy() {
@@ -344,10 +345,10 @@ class PathLocationStrategy extends LocationStrategy {
344
345
  historyGo(relativePosition = 0) {
345
346
  this._platformLocation.historyGo?.(relativePosition);
346
347
  }
347
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
348
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' }); }
348
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
349
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' }); }
349
350
  }
350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PathLocationStrategy, decorators: [{
351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PathLocationStrategy, decorators: [{
351
352
  type: Injectable,
352
353
  args: [{ providedIn: 'root' }]
353
354
  }], ctorParameters: () => [{ type: PlatformLocation }, { type: undefined, decorators: [{
@@ -400,14 +401,12 @@ class HashLocationStrategy extends LocationStrategy {
400
401
  path(includeHash = false) {
401
402
  // the hash value is always prefixed with a `#`
402
403
  // and if it is empty then it will stay empty
403
- let path = this._platformLocation.hash;
404
- if (path == null)
405
- path = '#';
404
+ const path = this._platformLocation.hash ?? '#';
406
405
  return path.length > 0 ? path.substring(1) : path;
407
406
  }
408
407
  prepareExternalUrl(internal) {
409
408
  const url = joinWithSlash(this._baseHref, internal);
410
- return url.length > 0 ? ('#' + url) : url;
409
+ return url.length > 0 ? '#' + url : url;
411
410
  }
412
411
  pushState(state, title, path, queryParams) {
413
412
  let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));
@@ -435,10 +434,10 @@ class HashLocationStrategy extends LocationStrategy {
435
434
  historyGo(relativePosition = 0) {
436
435
  this._platformLocation.historyGo?.(relativePosition);
437
436
  }
438
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
439
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: HashLocationStrategy }); }
437
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
438
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HashLocationStrategy }); }
440
439
  }
441
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: HashLocationStrategy, decorators: [{
440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HashLocationStrategy, decorators: [{
442
441
  type: Injectable
443
442
  }], ctorParameters: () => [{ type: PlatformLocation }, { type: undefined, decorators: [{
444
443
  type: Optional
@@ -625,11 +624,9 @@ class Location {
625
624
  */
626
625
  onUrlChange(fn) {
627
626
  this._urlChangeListeners.push(fn);
628
- if (!this._urlChangeSubscription) {
629
- this._urlChangeSubscription = this.subscribe(v => {
630
- this._notifyUrlChangeListeners(v.url, v.state);
631
- });
632
- }
627
+ this._urlChangeSubscription ??= this.subscribe((v) => {
628
+ this._notifyUrlChangeListeners(v.url, v.state);
629
+ });
633
630
  return () => {
634
631
  const fnIndex = this._urlChangeListeners.indexOf(fn);
635
632
  this._urlChangeListeners.splice(fnIndex, 1);
@@ -641,7 +638,7 @@ class Location {
641
638
  }
642
639
  /** @internal */
643
640
  _notifyUrlChangeListeners(url = '', state) {
644
- this._urlChangeListeners.forEach(fn => fn(url, state));
641
+ this._urlChangeListeners.forEach((fn) => fn(url, state));
645
642
  }
646
643
  /**
647
644
  * Subscribes to the platform's `popState` events.
@@ -687,10 +684,10 @@ class Location {
687
684
  * @returns The URL string, modified if needed.
688
685
  */
689
686
  static { this.stripTrailingSlash = stripTrailingSlash; }
690
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable }); }
691
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation }); }
687
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable }); }
688
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation }); }
692
689
  }
693
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: Location, decorators: [{
690
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: Location, decorators: [{
694
691
  type: Injectable,
695
692
  args: [{
696
693
  providedIn: 'root',
@@ -720,7 +717,7 @@ function _stripOrigin(baseHref) {
720
717
  // syntactically incorrect code after Closure Compiler minification.
721
718
  // This was likely caused by a bug in Closure Compiler, but
722
719
  // for now, the check is rewritten to use `new RegExp` instead.
723
- const isAbsoluteUrl = (new RegExp('^(https?:)?//')).test(baseHref);
720
+ const isAbsoluteUrl = new RegExp('^(https?:)?//').test(baseHref);
724
721
  if (isAbsoluteUrl) {
725
722
  const [, pathname] = baseHref.split(/\/\/[^\/]+/);
726
723
  return pathname;
@@ -954,7 +951,8 @@ function getLocaleId(locale) {
954
951
  function getLocaleDayPeriods(locale, formStyle, width) {
955
952
  const data = ɵfindLocaleData(locale);
956
953
  const amPmData = [
957
- data[ɵLocaleDataIndex.DayPeriodsFormat], data[ɵLocaleDataIndex.DayPeriodsStandalone]
954
+ data[ɵLocaleDataIndex.DayPeriodsFormat],
955
+ data[ɵLocaleDataIndex.DayPeriodsStandalone],
958
956
  ];
959
957
  const amPm = getLastDefinedValue(amPmData, formStyle);
960
958
  return getLastDefinedValue(amPm, width);
@@ -973,7 +971,10 @@ function getLocaleDayPeriods(locale, formStyle, width) {
973
971
  */
974
972
  function getLocaleDayNames(locale, formStyle, width) {
975
973
  const data = ɵfindLocaleData(locale);
976
- const daysData = [data[ɵLocaleDataIndex.DaysFormat], data[ɵLocaleDataIndex.DaysStandalone]];
974
+ const daysData = [
975
+ data[ɵLocaleDataIndex.DaysFormat],
976
+ data[ɵLocaleDataIndex.DaysStandalone],
977
+ ];
977
978
  const days = getLastDefinedValue(daysData, formStyle);
978
979
  return getLastDefinedValue(days, width);
979
980
  }
@@ -991,7 +992,10 @@ function getLocaleDayNames(locale, formStyle, width) {
991
992
  */
992
993
  function getLocaleMonthNames(locale, formStyle, width) {
993
994
  const data = ɵfindLocaleData(locale);
994
- const monthsData = [data[ɵLocaleDataIndex.MonthsFormat], data[ɵLocaleDataIndex.MonthsStandalone]];
995
+ const monthsData = [
996
+ data[ɵLocaleDataIndex.MonthsFormat],
997
+ data[ɵLocaleDataIndex.MonthsStandalone],
998
+ ];
995
999
  const months = getLastDefinedValue(monthsData, formStyle);
996
1000
  return getLastDefinedValue(months, width);
997
1001
  }
@@ -1206,8 +1210,7 @@ function getLocaleCurrencies(locale) {
1206
1210
  const getLocalePluralCase = ɵgetLocalePluralCase;
1207
1211
  function checkFullData(data) {
1208
1212
  if (!data[ɵLocaleDataIndex.ExtraData]) {
1209
- throw new Error(`Missing extra locale data for the locale "${data[ɵLocaleDataIndex
1210
- .LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`);
1213
+ throw new Error(`Missing extra locale data for the locale "${data[ɵLocaleDataIndex.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`);
1211
1214
  }
1212
1215
  }
1213
1216
  /**
@@ -1265,7 +1268,7 @@ function getLocaleExtraDayPeriods(locale, formStyle, width) {
1265
1268
  checkFullData(data);
1266
1269
  const dayPeriodsData = [
1267
1270
  data[ɵLocaleDataIndex.ExtraData][0 /* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */],
1268
- data[ɵLocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */]
1271
+ data[ɵLocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */],
1269
1272
  ];
1270
1273
  const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];
1271
1274
  return getLastDefinedValue(dayPeriods, width) || [];
@@ -1430,11 +1433,13 @@ function formatDate(value, format, locale, timezone) {
1430
1433
  date = convertTimezoneToLocal(date, timezone, true);
1431
1434
  }
1432
1435
  let text = '';
1433
- parts.forEach(value => {
1436
+ parts.forEach((value) => {
1434
1437
  const dateFormatter = getDateFormatter(value);
1435
- text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) :
1436
- value === '\'\'' ? '\'' :
1437
- value.replace(/(^'|'$)/g, '').replace(/''/g, '\'');
1438
+ text += dateFormatter
1439
+ ? dateFormatter(date, locale, dateTimezoneOffset)
1440
+ : value === "''"
1441
+ ? "'"
1442
+ : value.replace(/(^'|'$)/g, '').replace(/''/g, "'");
1438
1443
  });
1439
1444
  return text;
1440
1445
  }
@@ -1468,7 +1473,7 @@ function createDate(year, month, date) {
1468
1473
  }
1469
1474
  function getNamedFormat(locale, format) {
1470
1475
  const localeId = getLocaleId(locale);
1471
- NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};
1476
+ NAMED_FORMATS[localeId] ??= {};
1472
1477
  if (NAMED_FORMATS[localeId][format]) {
1473
1478
  return NAMED_FORMATS[localeId][format];
1474
1479
  }
@@ -1501,24 +1506,34 @@ function getNamedFormat(locale, format) {
1501
1506
  case 'short':
1502
1507
  const shortTime = getNamedFormat(locale, 'shortTime');
1503
1508
  const shortDate = getNamedFormat(locale, 'shortDate');
1504
- formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);
1509
+ formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [
1510
+ shortTime,
1511
+ shortDate,
1512
+ ]);
1505
1513
  break;
1506
1514
  case 'medium':
1507
1515
  const mediumTime = getNamedFormat(locale, 'mediumTime');
1508
1516
  const mediumDate = getNamedFormat(locale, 'mediumDate');
1509
- formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);
1517
+ formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [
1518
+ mediumTime,
1519
+ mediumDate,
1520
+ ]);
1510
1521
  break;
1511
1522
  case 'long':
1512
1523
  const longTime = getNamedFormat(locale, 'longTime');
1513
1524
  const longDate = getNamedFormat(locale, 'longDate');
1514
- formatValue =
1515
- formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);
1525
+ formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [
1526
+ longTime,
1527
+ longDate,
1528
+ ]);
1516
1529
  break;
1517
1530
  case 'full':
1518
1531
  const fullTime = getNamedFormat(locale, 'fullTime');
1519
1532
  const fullDate = getNamedFormat(locale, 'fullDate');
1520
- formatValue =
1521
- formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);
1533
+ formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [
1534
+ fullTime,
1535
+ fullDate,
1536
+ ]);
1522
1537
  break;
1523
1538
  }
1524
1539
  if (formatValue) {
@@ -1529,7 +1544,7 @@ function getNamedFormat(locale, format) {
1529
1544
  function formatDateTime(str, opt_values) {
1530
1545
  if (opt_values) {
1531
1546
  str = str.replace(/\{([^}]+)}/g, function (match, key) {
1532
- return (opt_values != null && key in opt_values) ? opt_values[key] : match;
1547
+ return opt_values != null && key in opt_values ? opt_values[key] : match;
1533
1548
  });
1534
1549
  }
1535
1550
  return str;
@@ -1624,13 +1639,12 @@ function getDateTranslation(date, locale, name, width, form, extended) {
1624
1639
  if (extended) {
1625
1640
  const rules = getLocaleExtraDayPeriodRules(locale);
1626
1641
  const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);
1627
- const index = rules.findIndex(rule => {
1642
+ const index = rules.findIndex((rule) => {
1628
1643
  if (Array.isArray(rule)) {
1629
1644
  // morning, afternoon, evening, night
1630
1645
  const [from, to] = rule;
1631
1646
  const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;
1632
- const beforeTo = (currentHours < to.hours ||
1633
- (currentHours === to.hours && currentMinutes < to.minutes));
1647
+ const beforeTo = currentHours < to.hours || (currentHours === to.hours && currentMinutes < to.minutes);
1634
1648
  // We must account for normal rules that span a period during the day (e.g. 6am-9am)
1635
1649
  // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.
1636
1650
  // 10pm - 5am) where `from` is greater (later!) than `to`.
@@ -1650,7 +1664,8 @@ function getDateTranslation(date, locale, name, width, form, extended) {
1650
1664
  return true;
1651
1665
  }
1652
1666
  }
1653
- else { // noon or midnight
1667
+ else {
1668
+ // noon or midnight
1654
1669
  if (rule.hours === currentHours && rule.minutes === currentMinutes) {
1655
1670
  return true;
1656
1671
  }
@@ -1686,20 +1701,26 @@ function timeZoneGetter(width) {
1686
1701
  const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);
1687
1702
  switch (width) {
1688
1703
  case ZoneWidth.Short:
1689
- return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) +
1690
- padNumber(Math.abs(zone % 60), 2, minusSign);
1704
+ return ((zone >= 0 ? '+' : '') +
1705
+ padNumber(hours, 2, minusSign) +
1706
+ padNumber(Math.abs(zone % 60), 2, minusSign));
1691
1707
  case ZoneWidth.ShortGMT:
1692
- return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign);
1708
+ return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 1, minusSign);
1693
1709
  case ZoneWidth.Long:
1694
- return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +
1695
- padNumber(Math.abs(zone % 60), 2, minusSign);
1710
+ return ('GMT' +
1711
+ (zone >= 0 ? '+' : '') +
1712
+ padNumber(hours, 2, minusSign) +
1713
+ ':' +
1714
+ padNumber(Math.abs(zone % 60), 2, minusSign));
1696
1715
  case ZoneWidth.Extended:
1697
1716
  if (offset === 0) {
1698
1717
  return 'Z';
1699
1718
  }
1700
1719
  else {
1701
- return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +
1702
- padNumber(Math.abs(zone % 60), 2, minusSign);
1720
+ return ((zone >= 0 ? '+' : '') +
1721
+ padNumber(hours, 2, minusSign) +
1722
+ ':' +
1723
+ padNumber(Math.abs(zone % 60), 2, minusSign));
1703
1724
  }
1704
1725
  default:
1705
1726
  throw new Error(`Unknown zone width "${width}"`);
@@ -1710,10 +1731,17 @@ const JANUARY = 0;
1710
1731
  const THURSDAY = 4;
1711
1732
  function getFirstThursdayOfYear(year) {
1712
1733
  const firstDayOfYear = createDate(year, JANUARY, 1).getDay();
1713
- return createDate(year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear);
1734
+ return createDate(year, 0, 1 + (firstDayOfYear <= THURSDAY ? THURSDAY : THURSDAY + 7) - firstDayOfYear);
1714
1735
  }
1715
- function getThursdayThisWeek(datetime) {
1716
- return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));
1736
+ /**
1737
+ * ISO Week starts on day 1 (Monday) and ends with day 0 (Sunday)
1738
+ */
1739
+ function getThursdayThisIsoWeek(datetime) {
1740
+ // getDay returns 0-6 range with sunday as 0.
1741
+ const currentDay = datetime.getDay();
1742
+ // On a Sunday, read the previous Thursday since ISO weeks start on Monday.
1743
+ const deltaToThursday = currentDay === 0 ? -3 : THURSDAY - currentDay;
1744
+ return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + deltaToThursday);
1717
1745
  }
1718
1746
  function weekGetter(size, monthBased = false) {
1719
1747
  return function (date, locale) {
@@ -1724,7 +1752,7 @@ function weekGetter(size, monthBased = false) {
1724
1752
  result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);
1725
1753
  }
1726
1754
  else {
1727
- const thisThurs = getThursdayThisWeek(date);
1755
+ const thisThurs = getThursdayThisIsoWeek(date);
1728
1756
  // Some days of a year are part of next year according to ISO 8601.
1729
1757
  // Compute the firstThurs from the year of this week's Thursday
1730
1758
  const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());
@@ -1739,7 +1767,7 @@ function weekGetter(size, monthBased = false) {
1739
1767
  */
1740
1768
  function weekNumberingYearGetter(size, trim = false) {
1741
1769
  return function (date, locale) {
1742
- const thisThurs = getThursdayThisWeek(date);
1770
+ const thisThurs = getThursdayThisIsoWeek(date);
1743
1771
  const weekNumberingYear = thisThurs.getFullYear();
1744
1772
  return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim);
1745
1773
  };
@@ -1822,16 +1850,13 @@ function getDateFormatter(format) {
1822
1850
  break;
1823
1851
  // Month of the year (January, ...), string, standalone
1824
1852
  case 'LLL':
1825
- formatter =
1826
- dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);
1853
+ formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);
1827
1854
  break;
1828
1855
  case 'LLLL':
1829
- formatter =
1830
- dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);
1856
+ formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);
1831
1857
  break;
1832
1858
  case 'LLLLL':
1833
- formatter =
1834
- dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);
1859
+ formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);
1835
1860
  break;
1836
1861
  // Week of the year (1, ... 52)
1837
1862
  case 'w':
@@ -1857,15 +1882,13 @@ function getDateFormatter(format) {
1857
1882
  formatter = dateGetter(DateType.Day, 1);
1858
1883
  break;
1859
1884
  case 'ccc':
1860
- formatter =
1861
- dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);
1885
+ formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);
1862
1886
  break;
1863
1887
  case 'cccc':
1864
1888
  formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide, FormStyle.Standalone);
1865
1889
  break;
1866
1890
  case 'ccccc':
1867
- formatter =
1868
- dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);
1891
+ formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);
1869
1892
  break;
1870
1893
  case 'cccccc':
1871
1894
  formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short, FormStyle.Standalone);
@@ -1916,8 +1939,7 @@ function getDateFormatter(format) {
1916
1939
  formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);
1917
1940
  break;
1918
1941
  case 'BBBB':
1919
- formatter =
1920
- dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);
1942
+ formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);
1921
1943
  break;
1922
1944
  case 'BBBBB':
1923
1945
  formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);
@@ -2050,7 +2072,7 @@ function toDate(value) {
2050
2072
  return new Date(parsedNb);
2051
2073
  }
2052
2074
  let match;
2053
- if (match = value.match(ISO8601_DATE_REGEX)) {
2075
+ if ((match = value.match(ISO8601_DATE_REGEX))) {
2054
2076
  return isoStringToDate(match);
2055
2077
  }
2056
2078
  }
@@ -2143,7 +2165,7 @@ function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimal
2143
2165
  let integerLen = parsedNumber.integerLen;
2144
2166
  const exponent = parsedNumber.exponent;
2145
2167
  let decimals = [];
2146
- isZero = digits.every(d => !d);
2168
+ isZero = digits.every((d) => !d);
2147
2169
  // pad zeros for small numbers
2148
2170
  for (; integerLen < minInt; integerLen++) {
2149
2171
  digits.unshift(0);
@@ -2219,7 +2241,7 @@ function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
2219
2241
  pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);
2220
2242
  pattern.maxFrac = pattern.minFrac;
2221
2243
  const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);
2222
- return res
2244
+ return (res
2223
2245
  .replace(CURRENCY_CHAR, currency)
2224
2246
  // if we have 2 time the currency character, the second one is ignored
2225
2247
  .replace(CURRENCY_CHAR, '')
@@ -2227,7 +2249,7 @@ function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
2227
2249
  // the currency character is suppressed by passing an empty string, the
2228
2250
  // spacing character would remain as part of the string. Then we
2229
2251
  // should remove it.
2230
- .trim();
2252
+ .trim());
2231
2253
  }
2232
2254
  /**
2233
2255
  * @ngModule CommonModule
@@ -2286,16 +2308,16 @@ function parseNumberFormat(format, minusSign = '-') {
2286
2308
  negPre: '',
2287
2309
  negSuf: '',
2288
2310
  gSize: 0,
2289
- lgSize: 0
2311
+ lgSize: 0,
2290
2312
  };
2291
2313
  const patternParts = format.split(PATTERN_SEP);
2292
2314
  const positive = patternParts[0];
2293
2315
  const negative = patternParts[1];
2294
- const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ?
2295
- positive.split(DECIMAL_SEP) :
2296
- [
2316
+ const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1
2317
+ ? positive.split(DECIMAL_SEP)
2318
+ : [
2297
2319
  positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),
2298
- positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)
2320
+ positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1),
2299
2321
  ], integer = positiveParts[0], fraction = positiveParts[1] || '';
2300
2322
  p.posPre = integer.substring(0, integer.indexOf(DIGIT_CHAR));
2301
2323
  for (let i = 0; i < fraction.length; i++) {
@@ -2312,7 +2334,7 @@ function parseNumberFormat(format, minusSign = '-') {
2312
2334
  }
2313
2335
  const groups = integer.split(GROUP_SEP);
2314
2336
  p.gSize = groups[1] ? groups[1].length : 0;
2315
- p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0;
2337
+ p.lgSize = groups[2] || groups[1] ? (groups[2] || groups[1]).length : 0;
2316
2338
  if (negative) {
2317
2339
  const trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);
2318
2340
  p.negPre = negative.substring(0, pos).replace(/'/g, '');
@@ -2371,7 +2393,8 @@ function parseNumber(num) {
2371
2393
  integerLen = numStr.length;
2372
2394
  }
2373
2395
  // Count the number of leading zeros.
2374
- for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */
2396
+ for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) {
2397
+ /* empty */
2375
2398
  }
2376
2399
  if (i === (zeros = numStr.length)) {
2377
2400
  // The digits are all zero.
@@ -2425,7 +2448,7 @@ function roundNumber(parsedNumber, minFrac, maxFrac) {
2425
2448
  // We rounded to zero so reset the parsedNumber
2426
2449
  fractionLen = Math.max(0, fractionLen);
2427
2450
  parsedNumber.integerLen = 1;
2428
- digits.length = Math.max(1, roundAt = fractionSize + 1);
2451
+ digits.length = Math.max(1, (roundAt = fractionSize + 1));
2429
2452
  digits[0] = 0;
2430
2453
  for (let i = 1; i < roundAt; i++)
2431
2454
  digits[i] = 0;
@@ -2482,10 +2505,10 @@ function parseIntAutoRadix(text) {
2482
2505
  * @publicApi
2483
2506
  */
2484
2507
  class NgLocalization {
2485
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2486
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] }); }
2508
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2509
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] }); }
2487
2510
  }
2488
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgLocalization, decorators: [{
2511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgLocalization, decorators: [{
2489
2512
  type: Injectable,
2490
2513
  args: [{
2491
2514
  providedIn: 'root',
@@ -2539,10 +2562,10 @@ class NgLocaleLocalization extends NgLocalization {
2539
2562
  return 'other';
2540
2563
  }
2541
2564
  }
2542
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
2543
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgLocaleLocalization }); }
2565
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
2566
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgLocaleLocalization }); }
2544
2567
  }
2545
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2568
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2546
2569
  type: Injectable
2547
2570
  }], ctorParameters: () => [{ type: undefined, decorators: [{
2548
2571
  type: Inject,
@@ -2701,7 +2724,7 @@ class NgClass {
2701
2724
  }
2702
2725
  klass = klass.trim();
2703
2726
  if (klass.length > 0) {
2704
- klass.split(WS_REGEXP).forEach(klass => {
2727
+ klass.split(WS_REGEXP).forEach((klass) => {
2705
2728
  if (enabled) {
2706
2729
  this._renderer.addClass(this._ngEl.nativeElement, klass);
2707
2730
  }
@@ -2711,10 +2734,10 @@ class NgClass {
2711
2734
  });
2712
2735
  }
2713
2736
  }
2714
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgClass, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
2715
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 }); }
2737
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgClass, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
2738
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 }); }
2716
2739
  }
2717
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgClass, decorators: [{
2740
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgClass, decorators: [{
2718
2741
  type: Directive,
2719
2742
  args: [{
2720
2743
  selector: '[ngClass]',
@@ -2812,17 +2835,17 @@ class NgComponentOutlet {
2812
2835
  // Note: square brackets property accessor is safe for Closure compiler optimizations (the
2813
2836
  // `changes` argument of the `ngOnChanges` lifecycle hook retains the names of the fields that
2814
2837
  // were changed).
2815
- return changes['ngComponentOutletNgModule'] !== undefined ||
2816
- changes['ngComponentOutletNgModuleFactory'] !== undefined;
2838
+ return (changes['ngComponentOutletNgModule'] !== undefined ||
2839
+ changes['ngComponentOutletNgModuleFactory'] !== undefined);
2817
2840
  }
2818
2841
  _needToReCreateComponentInstance(changes) {
2819
2842
  // Note: square brackets property accessor is safe for Closure compiler optimizations (the
2820
2843
  // `changes` argument of the `ngOnChanges` lifecycle hook retains the names of the fields that
2821
2844
  // were changed).
2822
- return changes['ngComponentOutlet'] !== undefined ||
2845
+ return (changes['ngComponentOutlet'] !== undefined ||
2823
2846
  changes['ngComponentOutletContent'] !== undefined ||
2824
2847
  changes['ngComponentOutletInjector'] !== undefined ||
2825
- this._needToReCreateNgModuleInstance(changes);
2848
+ this._needToReCreateNgModuleInstance(changes));
2826
2849
  }
2827
2850
  /** @nodoc */
2828
2851
  ngOnChanges(changes) {
@@ -2835,12 +2858,10 @@ class NgComponentOutlet {
2835
2858
  if (this._needToReCreateNgModuleInstance(changes)) {
2836
2859
  this._moduleRef?.destroy();
2837
2860
  if (this.ngComponentOutletNgModule) {
2838
- this._moduleRef =
2839
- createNgModule(this.ngComponentOutletNgModule, getParentInjector(injector));
2861
+ this._moduleRef = createNgModule(this.ngComponentOutletNgModule, getParentInjector(injector));
2840
2862
  }
2841
2863
  else if (this.ngComponentOutletNgModuleFactory) {
2842
- this._moduleRef =
2843
- this.ngComponentOutletNgModuleFactory.create(getParentInjector(injector));
2864
+ this._moduleRef = this.ngComponentOutletNgModuleFactory.create(getParentInjector(injector));
2844
2865
  }
2845
2866
  else {
2846
2867
  this._moduleRef = undefined;
@@ -2883,10 +2904,10 @@ class NgComponentOutlet {
2883
2904
  }
2884
2905
  }
2885
2906
  }
2886
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2887
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInputs: "ngComponentOutletInputs", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 }); }
2907
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2908
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInputs: "ngComponentOutletInputs", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 }); }
2888
2909
  }
2889
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgComponentOutlet, decorators: [{
2910
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgComponentOutlet, decorators: [{
2890
2911
  type: Directive,
2891
2912
  args: [{
2892
2913
  selector: '[ngComponentOutlet]',
@@ -3166,10 +3187,10 @@ class NgForOf {
3166
3187
  static ngTemplateContextGuard(dir, ctx) {
3167
3188
  return true;
3168
3189
  }
3169
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive }); }
3170
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 }); }
3190
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive }); }
3191
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 }); }
3171
3192
  }
3172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgForOf, decorators: [{
3193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgForOf, decorators: [{
3173
3194
  type: Directive,
3174
3195
  args: [{
3175
3196
  selector: '[ngFor][ngForOf]',
@@ -3369,8 +3390,7 @@ class NgIf {
3369
3390
  this._viewContainer.clear();
3370
3391
  this._elseViewRef = null;
3371
3392
  if (this._thenTemplateRef) {
3372
- this._thenViewRef =
3373
- this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);
3393
+ this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);
3374
3394
  }
3375
3395
  }
3376
3396
  }
@@ -3379,8 +3399,7 @@ class NgIf {
3379
3399
  this._viewContainer.clear();
3380
3400
  this._thenViewRef = null;
3381
3401
  if (this._elseTemplateRef) {
3382
- this._elseViewRef =
3383
- this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);
3402
+ this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);
3384
3403
  }
3385
3404
  }
3386
3405
  }
@@ -3394,10 +3413,10 @@ class NgIf {
3394
3413
  static ngTemplateContextGuard(dir, ctx) {
3395
3414
  return true;
3396
3415
  }
3397
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
3398
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 }); }
3416
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
3417
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 }); }
3399
3418
  }
3400
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgIf, decorators: [{
3419
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgIf, decorators: [{
3401
3420
  type: Directive,
3402
3421
  args: [{
3403
3422
  selector: '[ngIf]',
@@ -3545,13 +3564,15 @@ class NgSwitch {
3545
3564
  }
3546
3565
  /** @internal */
3547
3566
  _matchCase(value) {
3548
- const matched = NG_SWITCH_USE_STRICT_EQUALS ? value === this._ngSwitch : value == this._ngSwitch;
3567
+ const matched = NG_SWITCH_USE_STRICT_EQUALS
3568
+ ? value === this._ngSwitch
3569
+ : value == this._ngSwitch;
3549
3570
  if ((typeof ngDevMode === 'undefined' || ngDevMode) && matched !== (value == this._ngSwitch)) {
3550
3571
  console.warn(ɵformatRuntimeError(2001 /* RuntimeErrorCode.EQUALITY_NG_SWITCH_DIFFERENCE */, 'As of Angular v17 the NgSwitch directive uses strict equality comparison === instead of == to match different cases. ' +
3551
3572
  `Previously the case value "${stringifyValue(value)}" matched switch expression value "${stringifyValue(this._ngSwitch)}", but this is no longer the case with the stricter equality check. ` +
3552
3573
  'Your comparison results return different results using === vs. == and you should adjust your ngSwitch expression and / or values to conform with the strict equality requirements.'));
3553
3574
  }
3554
- this._lastCasesMatched = this._lastCasesMatched || matched;
3575
+ this._lastCasesMatched ||= matched;
3555
3576
  this._lastCaseCheckIndex++;
3556
3577
  if (this._lastCaseCheckIndex === this._caseCount) {
3557
3578
  this._updateDefaultCases(!this._lastCasesMatched);
@@ -3568,10 +3589,10 @@ class NgSwitch {
3568
3589
  }
3569
3590
  }
3570
3591
  }
3571
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3572
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 }); }
3592
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3593
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 }); }
3573
3594
  }
3574
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgSwitch, decorators: [{
3595
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgSwitch, decorators: [{
3575
3596
  type: Directive,
3576
3597
  args: [{
3577
3598
  selector: '[ngSwitch]',
@@ -3605,8 +3626,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImpor
3605
3626
  * that defines the subtree to be selected if the value of the match expression
3606
3627
  * matches the value of the switch expression.
3607
3628
  *
3608
- * Unlike JavaScript, which uses strict equality, Angular uses loose equality.
3609
- * This means that the empty string, `""` matches 0.
3629
+ * As of Angular v17 the NgSwitch directive uses strict equality comparison (`===`) instead of
3630
+ * loose equality (`==`) to match different cases.
3610
3631
  *
3611
3632
  * @publicApi
3612
3633
  * @see {@link NgSwitch}
@@ -3629,10 +3650,10 @@ class NgSwitchCase {
3629
3650
  ngDoCheck() {
3630
3651
  this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
3631
3652
  }
3632
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3633
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 }); }
3653
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3654
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 }); }
3634
3655
  }
3635
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgSwitchCase, decorators: [{
3656
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgSwitchCase, decorators: [{
3636
3657
  type: Directive,
3637
3658
  args: [{
3638
3659
  selector: '[ngSwitchCase]',
@@ -3666,10 +3687,10 @@ class NgSwitchDefault {
3666
3687
  }
3667
3688
  ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
3668
3689
  }
3669
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3670
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 }); }
3690
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3691
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 }); }
3671
3692
  }
3672
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgSwitchDefault, decorators: [{
3693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgSwitchDefault, decorators: [{
3673
3694
  type: Directive,
3674
3695
  args: [{
3675
3696
  selector: '[ngSwitchDefault]',
@@ -3747,10 +3768,10 @@ class NgPlural {
3747
3768
  this._activeView.create();
3748
3769
  }
3749
3770
  }
3750
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive }); }
3751
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 }); }
3771
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive }); }
3772
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 }); }
3752
3773
  }
3753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgPlural, decorators: [{
3774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgPlural, decorators: [{
3754
3775
  type: Directive,
3755
3776
  args: [{
3756
3777
  selector: '[ngPlural]',
@@ -3785,10 +3806,10 @@ class NgPluralCase {
3785
3806
  const isANumber = !isNaN(Number(value));
3786
3807
  ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));
3787
3808
  }
3788
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3789
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 }); }
3809
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3810
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 }); }
3790
3811
  }
3791
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgPluralCase, decorators: [{
3812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgPluralCase, decorators: [{
3792
3813
  type: Directive,
3793
3814
  args: [{
3794
3815
  selector: '[ngPluralCase]',
@@ -3874,10 +3895,10 @@ class NgStyle {
3874
3895
  changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));
3875
3896
  changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));
3876
3897
  }
3877
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
3878
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 }); }
3898
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
3899
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 }); }
3879
3900
  }
3880
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgStyle, decorators: [{
3901
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgStyle, decorators: [{
3881
3902
  type: Directive,
3882
3903
  args: [{
3883
3904
  selector: '[ngStyle]',
@@ -3978,10 +3999,10 @@ class NgTemplateOutlet {
3978
3999
  },
3979
4000
  });
3980
4001
  }
3981
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
3982
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 }); }
4002
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
4003
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 }); }
3983
4004
  }
3984
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgTemplateOutlet, decorators: [{
4005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgTemplateOutlet, decorators: [{
3985
4006
  type: Directive,
3986
4007
  args: [{
3987
4008
  selector: '[ngTemplateOutlet]',
@@ -4030,7 +4051,7 @@ class SubscribableStrategy {
4030
4051
  next: updateLatestValue,
4031
4052
  error: (e) => {
4032
4053
  throw e;
4033
- }
4054
+ },
4034
4055
  }));
4035
4056
  }
4036
4057
  dispose(subscription) {
@@ -4040,7 +4061,7 @@ class SubscribableStrategy {
4040
4061
  }
4041
4062
  class PromiseStrategy {
4042
4063
  createSubscription(async, updateLatestValue) {
4043
- return async.then(updateLatestValue, e => {
4064
+ return async.then(updateLatestValue, (e) => {
4044
4065
  throw e;
4045
4066
  });
4046
4067
  }
@@ -4139,10 +4160,10 @@ class AsyncPipe {
4139
4160
  this._ref.markForCheck();
4140
4161
  }
4141
4162
  }
4142
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
4143
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false }); }
4163
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
4164
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false }); }
4144
4165
  }
4145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: AsyncPipe, decorators: [{
4166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AsyncPipe, decorators: [{
4146
4167
  type: Pipe,
4147
4168
  args: [{
4148
4169
  name: 'async',
@@ -4175,10 +4196,10 @@ class LowerCasePipe {
4175
4196
  }
4176
4197
  return value.toLowerCase();
4177
4198
  }
4178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4179
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" }); }
4199
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4200
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" }); }
4180
4201
  }
4181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: LowerCasePipe, decorators: [{
4202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: LowerCasePipe, decorators: [{
4182
4203
  type: Pipe,
4183
4204
  args: [{
4184
4205
  name: 'lowercase',
@@ -4218,12 +4239,12 @@ class TitleCasePipe {
4218
4239
  if (typeof value !== 'string') {
4219
4240
  throw invalidPipeArgumentError(TitleCasePipe, value);
4220
4241
  }
4221
- return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase()));
4242
+ return value.replace(unicodeWordMatch, (txt) => txt[0].toUpperCase() + txt.slice(1).toLowerCase());
4222
4243
  }
4223
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4224
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" }); }
4244
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4245
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" }); }
4225
4246
  }
4226
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: TitleCasePipe, decorators: [{
4247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TitleCasePipe, decorators: [{
4227
4248
  type: Pipe,
4228
4249
  args: [{
4229
4250
  name: 'titlecase',
@@ -4247,10 +4268,10 @@ class UpperCasePipe {
4247
4268
  }
4248
4269
  return value.toUpperCase();
4249
4270
  }
4250
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4251
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" }); }
4271
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4272
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" }); }
4252
4273
  }
4253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: UpperCasePipe, decorators: [{
4274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: UpperCasePipe, decorators: [{
4254
4275
  type: Pipe,
4255
4276
  args: [{
4256
4277
  name: 'uppercase',
@@ -4270,7 +4291,7 @@ const DEFAULT_DATE_FORMAT = 'mediumDate';
4270
4291
  *
4271
4292
  * @deprecated use DATE_PIPE_DEFAULT_OPTIONS token to configure DatePipe
4272
4293
  */
4273
- const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZONE');
4294
+ const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken(ngDevMode ? 'DATE_PIPE_DEFAULT_TIMEZONE' : '');
4274
4295
  /**
4275
4296
  * DI token that allows to provide default configuration for the `DatePipe` instances in an
4276
4297
  * application. The value is an object which can include the following fields:
@@ -4302,7 +4323,7 @@ const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZON
4302
4323
  * ]
4303
4324
  * ```
4304
4325
  */
4305
- const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken('DATE_PIPE_DEFAULT_OPTIONS');
4326
+ const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken(ngDevMode ? 'DATE_PIPE_DEFAULT_OPTIONS' : '');
4306
4327
  // clang-format off
4307
4328
  /**
4308
4329
  * @ngModule CommonModule
@@ -4360,70 +4381,70 @@ const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken('DATE_PIPE_DEFAULT_OPTIONS'
4360
4381
  * Format details depend on the locale.
4361
4382
  * Fields marked with (*) are only available in the extra data set for the given locale.
4362
4383
  *
4363
- * | Field type | Format | Description | Example Value |
4364
- * |-------------------- |-------------|---------------------------------------------------------------|------------------------------------------------------------|
4365
- * | Era | G, GG & GGG | Abbreviated | AD |
4366
- * | | GGGG | Wide | Anno Domini |
4367
- * | | GGGGG | Narrow | A |
4368
- * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
4369
- * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
4370
- * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
4371
- * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
4372
- * | Week-numbering year | Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
4373
- * | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
4374
- * | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
4375
- * | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
4376
- * | Month | M | Numeric: 1 digit | 9, 12 |
4377
- * | | MM | Numeric: 2 digits + zero padded | 09, 12 |
4378
- * | | MMM | Abbreviated | Sep |
4379
- * | | MMMM | Wide | September |
4380
- * | | MMMMM | Narrow | S |
4381
- * | Month standalone | L | Numeric: 1 digit | 9, 12 |
4382
- * | | LL | Numeric: 2 digits + zero padded | 09, 12 |
4383
- * | | LLL | Abbreviated | Sep |
4384
- * | | LLLL | Wide | September |
4385
- * | | LLLLL | Narrow | S |
4386
- * | Week of year | w | Numeric: minimum digits | 1... 53 |
4387
- * | | ww | Numeric: 2 digits + zero padded | 01... 53 |
4388
- * | Week of month | W | Numeric: 1 digit | 1... 5 |
4389
- * | Day of month | d | Numeric: minimum digits | 1 |
4390
- * | | dd | Numeric: 2 digits + zero padded | 01 |
4391
- * | Week day | E, EE & EEE | Abbreviated | Tue |
4392
- * | | EEEE | Wide | Tuesday |
4393
- * | | EEEEE | Narrow | T |
4394
- * | | EEEEEE | Short | Tu |
4395
- * | Week day standalone | c, cc | Numeric: 1 digit | 2 |
4396
- * | | ccc | Abbreviated | Tue |
4397
- * | | cccc | Wide | Tuesday |
4398
- * | | ccccc | Narrow | T |
4399
- * | | cccccc | Short | Tu |
4400
- * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |
4401
- * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |
4402
- * | | aaaaa | Narrow | a/p |
4403
- * | Period* | B, BB & BBB | Abbreviated | mid. |
4404
- * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
4405
- * | | BBBBB | Narrow | md |
4406
- * | Period standalone* | b, bb & bbb | Abbreviated | mid. |
4407
- * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
4408
- * | | bbbbb | Narrow | md |
4409
- * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |
4410
- * | | hh | Numeric: 2 digits + zero padded | 01, 12 |
4411
- * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |
4412
- * | | HH | Numeric: 2 digits + zero padded | 00, 23 |
4413
- * | Minute | m | Numeric: minimum digits | 8, 59 |
4414
- * | | mm | Numeric: 2 digits + zero padded | 08, 59 |
4415
- * | Second | s | Numeric: minimum digits | 0... 59 |
4416
- * | | ss | Numeric: 2 digits + zero padded | 00... 59 |
4417
- * | Fractional seconds | S | Numeric: 1 digit | 0... 9 |
4418
- * | | SS | Numeric: 2 digits + zero padded | 00... 99 |
4419
- * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |
4420
- * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |
4421
- * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |
4422
- * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |
4423
- * | | ZZZZ | Long localized GMT format | GMT-8:00 |
4424
- * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |
4425
- * | | O, OO & OOO | Short localized GMT format | GMT-8 |
4426
- * | | OOOO | Long localized GMT format | GMT-08:00 |
4384
+ * | Field type | Format | Description | Example Value |
4385
+ * |-------------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------|
4386
+ * | Era | G, GG & GGG | Abbreviated | AD |
4387
+ * | | GGGG | Wide | Anno Domini |
4388
+ * | | GGGGG | Narrow | A |
4389
+ * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
4390
+ * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
4391
+ * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
4392
+ * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
4393
+ * | ISO Week-numbering year | Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
4394
+ * | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
4395
+ * | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
4396
+ * | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
4397
+ * | Month | M | Numeric: 1 digit | 9, 12 |
4398
+ * | | MM | Numeric: 2 digits + zero padded | 09, 12 |
4399
+ * | | MMM | Abbreviated | Sep |
4400
+ * | | MMMM | Wide | September |
4401
+ * | | MMMMM | Narrow | S |
4402
+ * | Month standalone | L | Numeric: 1 digit | 9, 12 |
4403
+ * | | LL | Numeric: 2 digits + zero padded | 09, 12 |
4404
+ * | | LLL | Abbreviated | Sep |
4405
+ * | | LLLL | Wide | September |
4406
+ * | | LLLLL | Narrow | S |
4407
+ * | ISO Week of year | w | Numeric: minimum digits | 1... 53 |
4408
+ * | | ww | Numeric: 2 digits + zero padded | 01... 53 |
4409
+ * | Week of month | W | Numeric: 1 digit | 1... 5 |
4410
+ * | Day of month | d | Numeric: minimum digits | 1 |
4411
+ * | | dd | Numeric: 2 digits + zero padded | 01 |
4412
+ * | Week day | E, EE & EEE | Abbreviated | Tue |
4413
+ * | | EEEE | Wide | Tuesday |
4414
+ * | | EEEEE | Narrow | T |
4415
+ * | | EEEEEE | Short | Tu |
4416
+ * | Week day standalone | c, cc | Numeric: 1 digit | 2 |
4417
+ * | | ccc | Abbreviated | Tue |
4418
+ * | | cccc | Wide | Tuesday |
4419
+ * | | ccccc | Narrow | T |
4420
+ * | | cccccc | Short | Tu |
4421
+ * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |
4422
+ * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |
4423
+ * | | aaaaa | Narrow | a/p |
4424
+ * | Period* | B, BB & BBB | Abbreviated | mid. |
4425
+ * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
4426
+ * | | BBBBB | Narrow | md |
4427
+ * | Period standalone* | b, bb & bbb | Abbreviated | mid. |
4428
+ * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
4429
+ * | | bbbbb | Narrow | md |
4430
+ * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |
4431
+ * | | hh | Numeric: 2 digits + zero padded | 01, 12 |
4432
+ * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |
4433
+ * | | HH | Numeric: 2 digits + zero padded | 00, 23 |
4434
+ * | Minute | m | Numeric: minimum digits | 8, 59 |
4435
+ * | | mm | Numeric: 2 digits + zero padded | 08, 59 |
4436
+ * | Second | s | Numeric: minimum digits | 0... 59 |
4437
+ * | | ss | Numeric: 2 digits + zero padded | 00... 59 |
4438
+ * | Fractional seconds | S | Numeric: 1 digit | 0... 9 |
4439
+ * | | SS | Numeric: 2 digits + zero padded | 00... 99 |
4440
+ * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |
4441
+ * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |
4442
+ * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |
4443
+ * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |
4444
+ * | | ZZZZ | Long localized GMT format | GMT-8:00 |
4445
+ * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |
4446
+ * | | O, OO & OOO | Short localized GMT format | GMT-8 |
4447
+ * | | OOOO | Long localized GMT format | GMT-08:00 |
4427
4448
  *
4428
4449
  *
4429
4450
  * ### Format examples
@@ -4481,14 +4502,13 @@ class DatePipe {
4481
4502
  throw invalidPipeArgumentError(DatePipe, error.message);
4482
4503
  }
4483
4504
  }
4484
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }, { token: DATE_PIPE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
4485
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" }); }
4505
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }, { token: DATE_PIPE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
4506
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" }); }
4486
4507
  }
4487
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DatePipe, decorators: [{
4508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DatePipe, decorators: [{
4488
4509
  type: Pipe,
4489
4510
  args: [{
4490
4511
  name: 'date',
4491
- pure: true,
4492
4512
  standalone: true,
4493
4513
  }]
4494
4514
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -4541,14 +4561,13 @@ class I18nPluralPipe {
4541
4561
  const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);
4542
4562
  return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
4543
4563
  }
4544
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe }); }
4545
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" }); }
4564
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe }); }
4565
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" }); }
4546
4566
  }
4547
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: I18nPluralPipe, decorators: [{
4567
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: I18nPluralPipe, decorators: [{
4548
4568
  type: Pipe,
4549
4569
  args: [{
4550
4570
  name: 'i18nPlural',
4551
- pure: true,
4552
4571
  standalone: true,
4553
4572
  }]
4554
4573
  }], ctorParameters: () => [{ type: NgLocalization }] });
@@ -4590,14 +4609,13 @@ class I18nSelectPipe {
4590
4609
  }
4591
4610
  return '';
4592
4611
  }
4593
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4594
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" }); }
4612
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4613
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" }); }
4595
4614
  }
4596
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: I18nSelectPipe, decorators: [{
4615
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: I18nSelectPipe, decorators: [{
4597
4616
  type: Pipe,
4598
4617
  args: [{
4599
4618
  name: 'i18nSelect',
4600
- pure: true,
4601
4619
  standalone: true,
4602
4620
  }]
4603
4621
  }] });
@@ -4624,10 +4642,10 @@ class JsonPipe {
4624
4642
  transform(value) {
4625
4643
  return JSON.stringify(value, null, 2);
4626
4644
  }
4627
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4628
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false }); }
4645
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4646
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false }); }
4629
4647
  }
4630
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: JsonPipe, decorators: [{
4648
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: JsonPipe, decorators: [{
4631
4649
  type: Pipe,
4632
4650
  args: [{
4633
4651
  name: 'json',
@@ -4669,10 +4687,8 @@ class KeyValuePipe {
4669
4687
  if (!input || (!(input instanceof Map) && typeof input !== 'object')) {
4670
4688
  return null;
4671
4689
  }
4672
- if (!this.differ) {
4673
- // make a differ for whatever type we've been passed in
4674
- this.differ = this.differs.find(input).create();
4675
- }
4690
+ // make a differ for whatever type we've been passed in
4691
+ this.differ ??= this.differs.find(input).create();
4676
4692
  const differChanges = this.differ.diff(input);
4677
4693
  const compareFnChanged = compareFn !== this.compareFn;
4678
4694
  if (differChanges) {
@@ -4687,10 +4703,10 @@ class KeyValuePipe {
4687
4703
  }
4688
4704
  return this.keyValues;
4689
4705
  }
4690
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe }); }
4691
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false }); }
4706
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe }); }
4707
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false }); }
4692
4708
  }
4693
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: KeyValuePipe, decorators: [{
4709
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: KeyValuePipe, decorators: [{
4694
4710
  type: Pipe,
4695
4711
  args: [{
4696
4712
  name: 'keyvalue',
@@ -4806,7 +4822,7 @@ class DecimalPipe {
4806
4822
  transform(value, digitsInfo, locale) {
4807
4823
  if (!isValue(value))
4808
4824
  return null;
4809
- locale = locale || this._locale;
4825
+ locale ||= this._locale;
4810
4826
  try {
4811
4827
  const num = strToNumber(value);
4812
4828
  return formatNumber(num, locale, digitsInfo);
@@ -4815,10 +4831,10 @@ class DecimalPipe {
4815
4831
  throw invalidPipeArgumentError(DecimalPipe, error.message);
4816
4832
  }
4817
4833
  }
4818
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
4819
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" }); }
4834
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
4835
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" }); }
4820
4836
  }
4821
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DecimalPipe, decorators: [{
4837
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DecimalPipe, decorators: [{
4822
4838
  type: Pipe,
4823
4839
  args: [{
4824
4840
  name: 'number',
@@ -4871,7 +4887,7 @@ class PercentPipe {
4871
4887
  transform(value, digitsInfo, locale) {
4872
4888
  if (!isValue(value))
4873
4889
  return null;
4874
- locale = locale || this._locale;
4890
+ locale ||= this._locale;
4875
4891
  try {
4876
4892
  const num = strToNumber(value);
4877
4893
  return formatPercent(num, locale, digitsInfo);
@@ -4880,10 +4896,10 @@ class PercentPipe {
4880
4896
  throw invalidPipeArgumentError(PercentPipe, error.message);
4881
4897
  }
4882
4898
  }
4883
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
4884
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" }); }
4899
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
4900
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" }); }
4885
4901
  }
4886
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PercentPipe, decorators: [{
4902
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PercentPipe, decorators: [{
4887
4903
  type: Pipe,
4888
4904
  args: [{
4889
4905
  name: 'percent',
@@ -4955,7 +4971,7 @@ class CurrencyPipe {
4955
4971
  transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) {
4956
4972
  if (!isValue(value))
4957
4973
  return null;
4958
- locale = locale || this._locale;
4974
+ locale ||= this._locale;
4959
4975
  if (typeof display === 'boolean') {
4960
4976
  if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {
4961
4977
  console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".`);
@@ -4979,10 +4995,10 @@ class CurrencyPipe {
4979
4995
  throw invalidPipeArgumentError(CurrencyPipe, error.message);
4980
4996
  }
4981
4997
  }
4982
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe }); }
4983
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" }); }
4998
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe }); }
4999
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" }); }
4984
5000
  }
4985
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: CurrencyPipe, decorators: [{
5001
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: CurrencyPipe, decorators: [{
4986
5002
  type: Pipe,
4987
5003
  args: [{
4988
5004
  name: 'currency',
@@ -5059,10 +5075,10 @@ class SlicePipe {
5059
5075
  supports(obj) {
5060
5076
  return typeof obj === 'string' || Array.isArray(obj);
5061
5077
  }
5062
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
5063
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false }); }
5078
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
5079
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false }); }
5064
5080
  }
5065
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: SlicePipe, decorators: [{
5081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SlicePipe, decorators: [{
5066
5082
  type: Pipe,
5067
5083
  args: [{
5068
5084
  name: 'slice',
@@ -5106,11 +5122,11 @@ const COMMON_PIPES = [
5106
5122
  * @publicApi
5107
5123
  */
5108
5124
  class CommonModule {
5109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5110
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: CommonModule, imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] }); }
5111
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: CommonModule }); }
5125
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5126
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: CommonModule, imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] }); }
5127
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: CommonModule }); }
5112
5128
  }
5113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: CommonModule, decorators: [{
5129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: CommonModule, decorators: [{
5114
5130
  type: NgModule,
5115
5131
  args: [{
5116
5132
  imports: [COMMON_DIRECTIVES, COMMON_PIPES],
@@ -5163,7 +5179,7 @@ function isPlatformWorkerUi(platformId) {
5163
5179
  /**
5164
5180
  * @publicApi
5165
5181
  */
5166
- const VERSION = new Version('17.1.1');
5182
+ const VERSION = new Version('17.1.3');
5167
5183
 
5168
5184
  /**
5169
5185
  * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
@@ -5177,9 +5193,9 @@ class ViewportScroller {
5177
5193
  static { this.ɵprov = ɵɵdefineInjectable({
5178
5194
  token: ViewportScroller,
5179
5195
  providedIn: 'root',
5180
- factory: () => isPlatformBrowser(inject(PLATFORM_ID)) ?
5181
- new BrowserViewportScroller(inject(DOCUMENT), window) :
5182
- new NullViewportScroller()
5196
+ factory: () => isPlatformBrowser(inject(PLATFORM_ID))
5197
+ ? new BrowserViewportScroller(inject(DOCUMENT), window)
5198
+ : new NullViewportScroller(),
5183
5199
  }); }
5184
5200
  }
5185
5201
  /**
@@ -5270,7 +5286,8 @@ function findAnchorFromDocument(document, target) {
5270
5286
  }
5271
5287
  // `getElementById` and `getElementsByName` won't pierce through the shadow DOM so we
5272
5288
  // have to traverse the DOM manually and do the lookup through the shadow roots.
5273
- if (typeof document.createTreeWalker === 'function' && document.body &&
5289
+ if (typeof document.createTreeWalker === 'function' &&
5290
+ document.body &&
5274
5291
  typeof document.body.attachShadow === 'function') {
5275
5292
  const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
5276
5293
  let currentNode = treeWalker.currentNode;
@@ -5337,7 +5354,7 @@ function isAbsoluteUrl(src) {
5337
5354
  // Given a URL, extract the hostname part.
5338
5355
  // If a URL is a relative one - the URL is returned as is.
5339
5356
  function extractHostname(url) {
5340
- return isAbsoluteUrl(url) ? (new URL(url)).hostname : url;
5357
+ return isAbsoluteUrl(url) ? new URL(url).hostname : url;
5341
5358
  }
5342
5359
  function isValidPath(path) {
5343
5360
  const isString = typeof path === 'string';
@@ -5375,7 +5392,7 @@ const noopImageLoader = (config) => config.src;
5375
5392
  * @see {@link NgOptimizedImage}
5376
5393
  * @publicApi
5377
5394
  */
5378
- const IMAGE_LOADER = new InjectionToken('ImageLoader', {
5395
+ const IMAGE_LOADER = new InjectionToken(ngDevMode ? 'ImageLoader' : '', {
5379
5396
  providedIn: 'root',
5380
5397
  factory: () => noopImageLoader,
5381
5398
  });
@@ -5452,7 +5469,7 @@ function createCloudflareUrl(path, config) {
5452
5469
  */
5453
5470
  const cloudinaryLoaderInfo = {
5454
5471
  name: 'Cloudinary',
5455
- testUrl: isCloudinaryUrl
5472
+ testUrl: isCloudinaryUrl,
5456
5473
  };
5457
5474
  const CLOUDINARY_LOADER_REGEX = /https?\:\/\/[^\/]+\.cloudinary\.com\/.+/;
5458
5475
  /**
@@ -5473,12 +5490,13 @@ function isCloudinaryUrl(url) {
5473
5490
  *
5474
5491
  * @publicApi
5475
5492
  */
5476
- const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ?
5477
- [
5478
- 'https://res.cloudinary.com/mysite', 'https://mysite.cloudinary.com',
5479
- 'https://subdomain.mysite.com'
5480
- ] :
5481
- undefined);
5493
+ const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode
5494
+ ? [
5495
+ 'https://res.cloudinary.com/mysite',
5496
+ 'https://mysite.cloudinary.com',
5497
+ 'https://subdomain.mysite.com',
5498
+ ]
5499
+ : undefined);
5482
5500
  function createCloudinaryUrl(path, config) {
5483
5501
  // Cloudinary image URLformat:
5484
5502
  // https://cloudinary.com/documentation/image_transformations#transformation_url_structure
@@ -5537,7 +5555,7 @@ function createImagekitUrl(path, config) {
5537
5555
  */
5538
5556
  const imgixLoaderInfo = {
5539
5557
  name: 'Imgix',
5540
- testUrl: isImgixUrl
5558
+ testUrl: isImgixUrl,
5541
5559
  };
5542
5560
  const IMGIX_LOADER_REGEX = /https?\:\/\/[^\/]+\.imgix\.net\/.+/;
5543
5561
  /**
@@ -5568,7 +5586,9 @@ function createImgixUrl(path, config) {
5568
5586
 
5569
5587
  // Assembles directive details string, useful for error messages.
5570
5588
  function imgDirectiveDetails(ngSrc, includeNgSrc = true) {
5571
- const ngSrcInfo = includeNgSrc ? `(activated on an <img> element with the \`ngSrc="${ngSrc}"\`) ` : '';
5589
+ const ngSrcInfo = includeNgSrc
5590
+ ? `(activated on an <img> element with the \`ngSrc="${ngSrc}"\`) `
5591
+ : '';
5572
5592
  return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;
5573
5593
  }
5574
5594
 
@@ -5649,7 +5669,7 @@ class LCPImageObserver {
5649
5669
  priority: isPriority,
5650
5670
  modified: false,
5651
5671
  alreadyWarnedModified: false,
5652
- alreadyWarnedPriority: false
5672
+ alreadyWarnedPriority: false,
5653
5673
  };
5654
5674
  this.images.set(getUrl(rewrittenSrc, this.window).href, newObservedImageState);
5655
5675
  }
@@ -5673,10 +5693,10 @@ class LCPImageObserver {
5673
5693
  this.observer.disconnect();
5674
5694
  this.images.clear();
5675
5695
  }
5676
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5677
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: LCPImageObserver, providedIn: 'root' }); }
5696
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5697
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: LCPImageObserver, providedIn: 'root' }); }
5678
5698
  }
5679
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: LCPImageObserver, decorators: [{
5699
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: LCPImageObserver, decorators: [{
5680
5700
  type: Injectable,
5681
5701
  args: [{ providedIn: 'root' }]
5682
5702
  }], ctorParameters: () => [] });
@@ -5715,7 +5735,7 @@ const INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '
5715
5735
  *
5716
5736
  * @publicApi
5717
5737
  */
5718
- const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');
5738
+ const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken(ngDevMode ? 'PRECONNECT_CHECK_BLOCKLIST' : '');
5719
5739
  /**
5720
5740
  * Contains the logic to detect whether an image, marked with the "priority" attribute
5721
5741
  * has a corresponding `<link rel="preconnect">` tag in the `document.head`.
@@ -5749,7 +5769,7 @@ class PreconnectLinkChecker {
5749
5769
  }
5750
5770
  populateBlocklist(origins) {
5751
5771
  if (Array.isArray(origins)) {
5752
- deepForEach(origins, origin => {
5772
+ deepForEach(origins, (origin) => {
5753
5773
  this.blocklist.add(extractHostname(origin));
5754
5774
  });
5755
5775
  }
@@ -5772,13 +5792,11 @@ class PreconnectLinkChecker {
5772
5792
  return;
5773
5793
  // Register this origin as seen, so we don't check it again later.
5774
5794
  this.alreadySeen.add(imgUrl.origin);
5775
- if (!this.preconnectLinks) {
5776
- // Note: we query for preconnect links only *once* and cache the results
5777
- // for the entire lifespan of an application, since it's unlikely that the
5778
- // list would change frequently. This allows to make sure there are no
5779
- // performance implications of making extra DOM lookups for each image.
5780
- this.preconnectLinks = this.queryPreconnectLinks();
5781
- }
5795
+ // Note: we query for preconnect links only *once* and cache the results
5796
+ // for the entire lifespan of an application, since it's unlikely that the
5797
+ // list would change frequently. This allows to make sure there are no
5798
+ // performance implications of making extra DOM lookups for each image.
5799
+ this.preconnectLinks ??= this.queryPreconnectLinks();
5782
5800
  if (!this.preconnectLinks.has(imgUrl.origin)) {
5783
5801
  console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +
5784
5802
  `image. Preconnecting to the origin(s) that serve priority images ensures that these ` +
@@ -5801,10 +5819,10 @@ class PreconnectLinkChecker {
5801
5819
  this.preconnectLinks?.clear();
5802
5820
  this.alreadySeen.clear();
5803
5821
  }
5804
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5805
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' }); }
5822
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5823
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' }); }
5806
5824
  }
5807
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
5825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
5808
5826
  type: Injectable,
5809
5827
  args: [{ providedIn: 'root' }]
5810
5828
  }], ctorParameters: () => [] });
@@ -5832,7 +5850,10 @@ const DEFAULT_PRELOADED_IMAGES_LIMIT = 5;
5832
5850
  * This Set tracks the original src passed into the `ngSrc` input not the src after it has been
5833
5851
  * run through the specified `IMAGE_LOADER`.
5834
5852
  */
5835
- const PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', { providedIn: 'root', factory: () => new Set() });
5853
+ const PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', {
5854
+ providedIn: 'root',
5855
+ factory: () => new Set(),
5856
+ });
5836
5857
 
5837
5858
  /**
5838
5859
  * @description Contains the logic needed to track and add preload link tags to the `<head>` tag. It
@@ -5890,10 +5911,10 @@ class PreloadLinkCreator {
5890
5911
  }
5891
5912
  renderer.appendChild(this.document.head, preload);
5892
5913
  }
5893
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5894
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' }); }
5914
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5915
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' }); }
5895
5916
  }
5896
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: PreloadLinkCreator, decorators: [{
5917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PreloadLinkCreator, decorators: [{
5897
5918
  type: Injectable,
5898
5919
  args: [{ providedIn: 'root' }]
5899
5920
  }] });
@@ -5938,7 +5959,7 @@ const VIEWPORT_BREAKPOINT_CUTOFF = 640;
5938
5959
  /**
5939
5960
  * Used to determine whether two aspect ratios are similar in value.
5940
5961
  */
5941
- const ASPECT_RATIO_TOLERANCE = .1;
5962
+ const ASPECT_RATIO_TOLERANCE = 0.1;
5942
5963
  /**
5943
5964
  * Used to determine whether the image has been requested at an overly
5944
5965
  * large size compared to the actual rendered image size (after taking
@@ -6138,9 +6159,7 @@ class NgOptimizedImage {
6138
6159
  // Must set width/height explicitly in case they are bound (in which case they will
6139
6160
  // only be reflected and not found by the browser)
6140
6161
  if (this.fill) {
6141
- if (!this.sizes) {
6142
- this.sizes = '100vw';
6143
- }
6162
+ this.sizes ||= '100vw';
6144
6163
  }
6145
6164
  else {
6146
6165
  this.setHostAttribute('width', this.width.toString());
@@ -6217,7 +6236,10 @@ class NgOptimizedImage {
6217
6236
  }
6218
6237
  getRewrittenSrcset() {
6219
6238
  const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);
6220
- const finalSrcs = this.ngSrcset.split(',').filter(src => src !== '').map(srcStr => {
6239
+ const finalSrcs = this.ngSrcset
6240
+ .split(',')
6241
+ .filter((src) => src !== '')
6242
+ .map((srcStr) => {
6221
6243
  srcStr = srcStr.trim();
6222
6244
  const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;
6223
6245
  return `${this.callImageLoader({ src: this.ngSrc, width })} ${srcStr}`;
@@ -6238,9 +6260,9 @@ class NgOptimizedImage {
6238
6260
  if (this.sizes?.trim() === '100vw') {
6239
6261
  // Since this is a full-screen-width image, our srcset only needs to include
6240
6262
  // breakpoints with full viewport widths.
6241
- filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF);
6263
+ filteredBreakpoints = breakpoints.filter((bp) => bp >= VIEWPORT_BREAKPOINT_CUTOFF);
6242
6264
  }
6243
- const finalSrcs = filteredBreakpoints.map(bp => `${this.callImageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);
6265
+ const finalSrcs = filteredBreakpoints.map((bp) => `${this.callImageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);
6244
6266
  return finalSrcs.join(', ');
6245
6267
  }
6246
6268
  updateSrcAndSrcset(forceSrcRecalc = false) {
@@ -6264,9 +6286,9 @@ class NgOptimizedImage {
6264
6286
  return rewrittenSrcset;
6265
6287
  }
6266
6288
  getFixedSrcset() {
6267
- const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => `${this.callImageLoader({
6289
+ const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map((multiplier) => `${this.callImageLoader({
6268
6290
  src: this.ngSrc,
6269
- width: this.width * multiplier
6291
+ width: this.width * multiplier,
6270
6292
  })} ${multiplier}x`);
6271
6293
  return finalSrcs.join(', ');
6272
6294
  }
@@ -6276,8 +6298,10 @@ class NgOptimizedImage {
6276
6298
  oversizedImage =
6277
6299
  this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT;
6278
6300
  }
6279
- return !this.disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader &&
6280
- !oversizedImage;
6301
+ return (!this.disableOptimizedSrcset &&
6302
+ !this.srcset &&
6303
+ this.imageLoader !== noopImageLoader &&
6304
+ !oversizedImage);
6281
6305
  }
6282
6306
  /** @nodoc */
6283
6307
  ngOnDestroy() {
@@ -6290,10 +6314,10 @@ class NgOptimizedImage {
6290
6314
  setHostAttribute(name, value) {
6291
6315
  this.renderer.setAttribute(this.imgElement, name, value);
6292
6316
  }
6293
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
6294
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.1.1", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc]", inputs: { ngSrc: ["ngSrc", "ngSrc", unwrapSafeUrl], ngSrcset: "ngSrcset", sizes: "sizes", width: ["width", "width", numberAttribute], height: ["height", "height", numberAttribute], loading: "loading", priority: ["priority", "priority", booleanAttribute], loaderParams: "loaderParams", disableOptimizedSrcset: ["disableOptimizedSrcset", "disableOptimizedSrcset", booleanAttribute], fill: ["fill", "fill", booleanAttribute], src: "src", srcset: "srcset" }, host: { properties: { "style.position": "fill ? \"absolute\" : null", "style.width": "fill ? \"100%\" : null", "style.height": "fill ? \"100%\" : null", "style.inset": "fill ? \"0px\" : null" } }, usesOnChanges: true, ngImport: i0 }); }
6317
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
6318
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.1.3", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc]", inputs: { ngSrc: ["ngSrc", "ngSrc", unwrapSafeUrl], ngSrcset: "ngSrcset", sizes: "sizes", width: ["width", "width", numberAttribute], height: ["height", "height", numberAttribute], loading: "loading", priority: ["priority", "priority", booleanAttribute], loaderParams: "loaderParams", disableOptimizedSrcset: ["disableOptimizedSrcset", "disableOptimizedSrcset", booleanAttribute], fill: ["fill", "fill", booleanAttribute], src: "src", srcset: "srcset" }, host: { properties: { "style.position": "fill ? \"absolute\" : null", "style.width": "fill ? \"100%\" : null", "style.height": "fill ? \"100%\" : null", "style.inset": "fill ? \"0px\" : null" } }, usesOnChanges: true, ngImport: i0 }); }
6295
6319
  }
6296
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgOptimizedImage, decorators: [{
6320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: NgOptimizedImage, decorators: [{
6297
6321
  type: Directive,
6298
6322
  args: [{
6299
6323
  standalone: true,
@@ -6302,8 +6326,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImpor
6302
6326
  '[style.position]': 'fill ? "absolute" : null',
6303
6327
  '[style.width]': 'fill ? "100%" : null',
6304
6328
  '[style.height]': 'fill ? "100%" : null',
6305
- '[style.inset]': 'fill ? "0px" : null'
6306
- }
6329
+ '[style.inset]': 'fill ? "0px" : null',
6330
+ },
6307
6331
  }]
6308
6332
  }], propDecorators: { ngSrc: [{
6309
6333
  type: Input,
@@ -6441,7 +6465,9 @@ function assertValidNgSrcset(dir, value) {
6441
6465
  }
6442
6466
  }
6443
6467
  function assertUnderDensityCap(dir, value) {
6444
- const underDensityCap = value.split(',').every(num => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
6468
+ const underDensityCap = value
6469
+ .split(',')
6470
+ .every((num) => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
6445
6471
  if (!underDensityCap) {
6446
6472
  throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` contains an unsupported image density:` +
6447
6473
  `\`${value}\`. NgOptimizedImage generally recommends a max image density of ` +
@@ -6459,12 +6485,14 @@ function assertUnderDensityCap(dir, value) {
6459
6485
  function postInitInputChangeError(dir, inputName) {
6460
6486
  let reason;
6461
6487
  if (inputName === 'width' || inputName === 'height') {
6462
- reason = `Changing \`${inputName}\` may result in different attribute value ` +
6463
- `applied to the underlying image element and cause layout shifts on a page.`;
6488
+ reason =
6489
+ `Changing \`${inputName}\` may result in different attribute value ` +
6490
+ `applied to the underlying image element and cause layout shifts on a page.`;
6464
6491
  }
6465
6492
  else {
6466
- reason = `Changing the \`${inputName}\` would have no effect on the underlying ` +
6467
- `image element, because the resource loading has already occurred.`;
6493
+ reason =
6494
+ `Changing the \`${inputName}\` would have no effect on the underlying ` +
6495
+ `image element, because the resource loading has already occurred.`;
6468
6496
  }
6469
6497
  return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. ` +
6470
6498
  `The NgOptimizedImage directive will not react to this input change. ${reason} ` +
@@ -6475,7 +6503,7 @@ function postInitInputChangeError(dir, inputName) {
6475
6503
  * Verify that none of the listed inputs has changed.
6476
6504
  */
6477
6505
  function assertNoPostInitInputChange(dir, changes, inputs) {
6478
- inputs.forEach(input => {
6506
+ inputs.forEach((input) => {
6479
6507
  const isUpdated = changes.hasOwnProperty(input);
6480
6508
  if (isUpdated && !changes[input].isFirstChange()) {
6481
6509
  if (input === 'ngSrc') {
@@ -6561,8 +6589,8 @@ function assertNoImageDistortion(dir, img, renderer) {
6561
6589
  // If `ngSrcset` hasn't been set, sanity check the intrinsic size.
6562
6590
  const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;
6563
6591
  const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;
6564
- const oversizedWidth = (intrinsicWidth - recommendedWidth) >= OVERSIZED_IMAGE_TOLERANCE;
6565
- const oversizedHeight = (intrinsicHeight - recommendedHeight) >= OVERSIZED_IMAGE_TOLERANCE;
6592
+ const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;
6593
+ const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
6566
6594
  if (oversizedWidth || oversizedHeight) {
6567
6595
  console.warn(ɵformatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` +
6568
6596
  `larger than necessary. ` +
@@ -6595,7 +6623,7 @@ function assertNonEmptyWidthAndHeight(dir) {
6595
6623
  missingAttributes.push('height');
6596
6624
  if (missingAttributes.length > 0) {
6597
6625
  throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +
6598
- `are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` +
6626
+ `are missing: ${missingAttributes.map((attr) => `"${attr}"`).join(', ')}. ` +
6599
6627
  `Including "width" and "height" attributes will prevent image-related layout shifts. ` +
6600
6628
  `To fix this, include "width" and "height" attributes on the image tag or turn on ` +
6601
6629
  `"fill" mode with the \`fill\` attribute.`);