@angular/platform-browser 19.0.0-next.6 → 19.0.0-next.7

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.6
2
+ * @license Angular v19.0.0-next.7
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -7,7 +7,7 @@
7
7
  import { ɵDomAdapter, ɵsetRootDomAdapter, ɵparseCookieValue, ɵgetDOM, isPlatformServer, DOCUMENT, ɵPLATFORM_BROWSER_ID, XhrFactory, CommonModule } from '@angular/common';
8
8
  export { ɵgetDOM } from '@angular/common';
9
9
  import * as i0 from '@angular/core';
10
- import { ɵglobal, ɵRuntimeError, Injectable, InjectionToken, Inject, APP_ID, CSP_NONCE, PLATFORM_ID, Optional, ViewEncapsulation, RendererStyleFlags2, inject, ɵGLOBAL_EVENT_DELEGATION, ɵinternalCreateApplication, ErrorHandler, ɵsetDocument, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, ɵTESTABILITY_GETTER, ɵTESTABILITY, Testability, NgZone, TestabilityRegistry, ɵINJECTOR_SCOPE, RendererFactory2, ApplicationModule, NgModule, SkipSelf, ApplicationRef, ɵConsole, forwardRef, ɵXSS_SECURITY_URL, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵ_sanitizeUrl, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, ɵwithI18nSupport, ɵwithEventReplay, ENVIRONMENT_INITIALIZER, ɵformatRuntimeError, makeEnvironmentProviders, ɵwithDomHydration, Version } from '@angular/core';
10
+ import { ɵglobal, ɵRuntimeError, Injectable, InjectionToken, Inject, APP_ID, CSP_NONCE, PLATFORM_ID, Optional, ViewEncapsulation, RendererStyleFlags2, inject, ɵGLOBAL_EVENT_DELEGATION, ɵinternalCreateApplication, ErrorHandler, ɵsetDocument, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, ɵTESTABILITY_GETTER, ɵTESTABILITY, Testability, NgZone, TestabilityRegistry, ɵINJECTOR_SCOPE, RendererFactory2, ApplicationModule, NgModule, SkipSelf, ApplicationRef, ɵConsole, forwardRef, ɵXSS_SECURITY_URL, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵ_sanitizeUrl, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, ɵwithI18nSupport, ɵwithEventReplay, ENVIRONMENT_INITIALIZER, ɵZONELESS_ENABLED, ɵformatRuntimeError, makeEnvironmentProviders, ɵwithDomHydration, Version } from '@angular/core';
11
11
  import { ɵwithHttpTransferCache } from '@angular/common/http';
12
12
 
13
13
  /**
@@ -155,10 +155,10 @@ class BrowserXhr {
155
155
  build() {
156
156
  return new XMLHttpRequest();
157
157
  }
158
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
159
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: BrowserXhr }); }
158
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
159
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: BrowserXhr }); }
160
160
  }
161
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: BrowserXhr, decorators: [{
161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: BrowserXhr, decorators: [{
162
162
  type: Injectable
163
163
  }] });
164
164
 
@@ -220,10 +220,10 @@ class EventManager {
220
220
  this._eventNameToPlugin.set(eventName, plugin);
221
221
  return plugin;
222
222
  }
223
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: EventManager, deps: [{ token: EVENT_MANAGER_PLUGINS }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
224
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: EventManager }); }
223
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: EventManager, deps: [{ token: EVENT_MANAGER_PLUGINS }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
224
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: EventManager }); }
225
225
  }
226
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: EventManager, decorators: [{
226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: EventManager, decorators: [{
227
227
  type: Injectable
228
228
  }], ctorParameters: () => [{ type: undefined, decorators: [{
229
229
  type: Inject,
@@ -246,94 +246,138 @@ class EventManagerPlugin {
246
246
 
247
247
  /** The style elements attribute name used to set value of `APP_ID` token. */
248
248
  const APP_ID_ATTRIBUTE_NAME = 'ng-app-id';
249
+ /**
250
+ * Removes all provided elements from the document.
251
+ * @param elements An array of HTML Elements.
252
+ */
253
+ function removeAll(elements) {
254
+ for (const element of elements) {
255
+ element.remove();
256
+ }
257
+ }
258
+ /**
259
+ * Searches a DOM document's head element for style elements with a matching application
260
+ * identifier attribute (`ng-app-id`) to the provide identifier.
261
+ * @param doc An HTML DOM document instance.
262
+ * @param appId A string containing an Angular application identifer.
263
+ * @returns A map of style strings to style elements if found; Otherwise, `null`.
264
+ */
265
+ function findServerStyles(doc, appId) {
266
+ const styleElements = doc.head?.querySelectorAll(`style[${APP_ID_ATTRIBUTE_NAME}="${appId}"]`);
267
+ let styles = null;
268
+ if (styleElements) {
269
+ for (const styleElement of styleElements) {
270
+ if (styleElement.textContent) {
271
+ styles ??= new Map();
272
+ styles.set(styleElement.textContent, styleElement);
273
+ }
274
+ }
275
+ }
276
+ return styles;
277
+ }
249
278
  class SharedStylesHost {
250
279
  constructor(doc, appId, nonce, platformId = {}) {
251
280
  this.doc = doc;
252
281
  this.appId = appId;
253
282
  this.nonce = nonce;
254
- this.platformId = platformId;
255
- // Maps all registered host nodes to a list of style nodes that have been added to the host node.
256
- this.styleRef = new Map();
257
- this.hostNodes = new Set();
258
- this.styleNodesInDOM = this.collectServerRenderedStyles();
259
- this.platformIsServer = isPlatformServer(platformId);
260
- this.resetHostNodes();
283
+ /**
284
+ * Provides usage information for active embedded style content and associated HTML <style> elements.
285
+ * Embedded styles typically originate from the `styles` metadata of a rendered component.
286
+ */
287
+ this.embeddedStyles = new Map();
288
+ /**
289
+ * Set of host DOM nodes that will have styles attached.
290
+ */
291
+ this.hosts = new Set();
292
+ this.isServer = isPlatformServer(platformId);
293
+ this.serverStyles = findServerStyles(doc, appId);
294
+ this.hosts.add(doc.head);
261
295
  }
296
+ /**
297
+ * Adds embedded styles to the DOM via HTML `style` elements.
298
+ * @param styles An array of style content strings.
299
+ */
262
300
  addStyles(styles) {
263
- for (const style of styles) {
264
- const usageCount = this.changeUsageCount(style, 1);
265
- if (usageCount === 1) {
266
- this.onStyleAdded(style);
267
- }
301
+ const creator = this.getStyleElement.bind(this);
302
+ for (const value of styles) {
303
+ this.add(value, this.embeddedStyles, creator);
268
304
  }
269
305
  }
306
+ /**
307
+ * Removes embedded styles from the DOM that were added as HTML `style` elements.
308
+ * @param styles An array of style content strings.
309
+ */
270
310
  removeStyles(styles) {
271
- for (const style of styles) {
272
- const usageCount = this.changeUsageCount(style, -1);
273
- if (usageCount <= 0) {
274
- this.onStyleRemoved(style);
311
+ for (const value of styles) {
312
+ this.remove(value, this.embeddedStyles);
313
+ }
314
+ }
315
+ add(value, usages, creator) {
316
+ // Attempt to get any current usage of the value
317
+ const record = usages.get(value);
318
+ // If existing, just increment the usage count
319
+ if (record) {
320
+ record.usage++;
321
+ }
322
+ else {
323
+ // Otherwise, create an entry to track the elements and add element for each host
324
+ usages.set(value, { usage: 1, elements: [...this.hosts].map((host) => creator(host, value)) });
325
+ }
326
+ }
327
+ remove(value, usages) {
328
+ // Attempt to get any current usage of the value
329
+ const record = usages.get(value);
330
+ // If there is a record, reduce the usage count and if no longer used,
331
+ // remove from DOM and delete usage record.
332
+ if (record) {
333
+ record.usage--;
334
+ if (record.usage <= 0) {
335
+ removeAll(record.elements);
336
+ usages.delete(value);
275
337
  }
276
338
  }
277
339
  }
278
340
  ngOnDestroy() {
279
- const styleNodesInDOM = this.styleNodesInDOM;
280
- if (styleNodesInDOM) {
281
- styleNodesInDOM.forEach((node) => node.remove());
282
- styleNodesInDOM.clear();
341
+ const serverStyles = this.serverStyles;
342
+ if (serverStyles) {
343
+ removeAll(serverStyles.values());
344
+ serverStyles.clear();
283
345
  }
284
- for (const style of this.getAllStyles()) {
285
- this.onStyleRemoved(style);
346
+ for (const [, { elements }] of this.embeddedStyles) {
347
+ removeAll(elements);
286
348
  }
287
- this.resetHostNodes();
349
+ this.hosts.clear();
288
350
  }
351
+ /**
352
+ * Adds a host node to the set of style hosts and adds all existing style usage to
353
+ * the newly added host node.
354
+ *
355
+ * This is currently only used for Shadow DOM encapsulation mode.
356
+ */
289
357
  addHost(hostNode) {
290
- this.hostNodes.add(hostNode);
291
- for (const style of this.getAllStyles()) {
292
- this.addStyleToHost(hostNode, style);
358
+ this.hosts.add(hostNode);
359
+ for (const [style, { elements }] of this.embeddedStyles) {
360
+ elements.push(this.getStyleElement(hostNode, style));
293
361
  }
294
362
  }
295
363
  removeHost(hostNode) {
296
- this.hostNodes.delete(hostNode);
297
- }
298
- getAllStyles() {
299
- return this.styleRef.keys();
364
+ this.hosts.delete(hostNode);
300
365
  }
301
- onStyleAdded(style) {
302
- for (const host of this.hostNodes) {
303
- this.addStyleToHost(host, style);
366
+ addElement(host, element) {
367
+ // Add a nonce if present
368
+ if (this.nonce) {
369
+ element.setAttribute('nonce', this.nonce);
304
370
  }
305
- }
306
- onStyleRemoved(style) {
307
- const styleRef = this.styleRef;
308
- styleRef.get(style)?.elements?.forEach((node) => node.remove());
309
- styleRef.delete(style);
310
- }
311
- collectServerRenderedStyles() {
312
- const styles = this.doc.head?.querySelectorAll(`style[${APP_ID_ATTRIBUTE_NAME}="${this.appId}"]`);
313
- if (styles?.length) {
314
- const styleMap = new Map();
315
- styles.forEach((style) => {
316
- if (style.textContent != null) {
317
- styleMap.set(style.textContent, style);
318
- }
319
- });
320
- return styleMap;
371
+ // Add application identifier when on the server to support client-side reuse
372
+ if (this.isServer) {
373
+ element.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId);
321
374
  }
322
- return null;
323
- }
324
- changeUsageCount(style, delta) {
325
- const map = this.styleRef;
326
- if (map.has(style)) {
327
- const styleRefValue = map.get(style);
328
- styleRefValue.usage += delta;
329
- return styleRefValue.usage;
330
- }
331
- map.set(style, { usage: delta, elements: [] });
332
- return delta;
375
+ // Insert the element into the DOM with the host node as parent
376
+ return host.appendChild(element);
333
377
  }
334
378
  getStyleElement(host, style) {
335
- const styleNodesInDOM = this.styleNodesInDOM;
336
- const styleEl = styleNodesInDOM?.get(style);
379
+ const styleNodesInDOM = this.serverStyles;
380
+ let styleEl = styleNodesInDOM?.get(style);
337
381
  if (styleEl?.parentNode === host) {
338
382
  // `styleNodesInDOM` cannot be undefined due to the above `styleNodesInDOM?.get`.
339
383
  styleNodesInDOM.delete(style);
@@ -342,42 +386,18 @@ class SharedStylesHost {
342
386
  // This attribute is solely used for debugging purposes.
343
387
  styleEl.setAttribute('ng-style-reused', '');
344
388
  }
345
- return styleEl;
346
389
  }
347
390
  else {
348
- const styleEl = this.doc.createElement('style');
349
- if (this.nonce) {
350
- styleEl.setAttribute('nonce', this.nonce);
351
- }
391
+ styleEl = this.doc.createElement('style');
352
392
  styleEl.textContent = style;
353
- if (this.platformIsServer) {
354
- styleEl.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId);
355
- }
356
- host.appendChild(styleEl);
357
- return styleEl;
393
+ this.addElement(host, styleEl);
358
394
  }
395
+ return styleEl;
359
396
  }
360
- addStyleToHost(host, style) {
361
- const styleEl = this.getStyleElement(host, style);
362
- const styleRef = this.styleRef;
363
- const styleElRef = styleRef.get(style)?.elements;
364
- if (styleElRef) {
365
- styleElRef.push(styleEl);
366
- }
367
- else {
368
- styleRef.set(style, { elements: [styleEl], usage: 1 });
369
- }
370
- }
371
- resetHostNodes() {
372
- const hostNodes = this.hostNodes;
373
- hostNodes.clear();
374
- // Re-add the head element back since this is the default host.
375
- hostNodes.add(this.doc.head);
376
- }
377
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: SharedStylesHost, deps: [{ token: DOCUMENT }, { token: APP_ID }, { token: CSP_NONCE, optional: true }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
378
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: SharedStylesHost }); }
397
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: SharedStylesHost, deps: [{ token: DOCUMENT }, { token: APP_ID }, { token: CSP_NONCE, optional: true }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
398
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: SharedStylesHost }); }
379
399
  }
380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: SharedStylesHost, decorators: [{
400
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: SharedStylesHost, decorators: [{
381
401
  type: Injectable
382
402
  }], ctorParameters: () => [{ type: Document, decorators: [{
383
403
  type: Inject,
@@ -491,10 +511,10 @@ class DomRendererFactory2 {
491
511
  ngOnDestroy() {
492
512
  this.rendererByCompId.clear();
493
513
  }
494
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: SharedStylesHost }, { token: APP_ID }, { token: REMOVE_STYLES_ON_COMPONENT_DESTROY }, { token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: CSP_NONCE }], target: i0.ɵɵFactoryTarget.Injectable }); }
495
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomRendererFactory2 }); }
514
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: SharedStylesHost }, { token: APP_ID }, { token: REMOVE_STYLES_ON_COMPONENT_DESTROY }, { token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: CSP_NONCE }], target: i0.ɵɵFactoryTarget.Injectable }); }
515
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomRendererFactory2 }); }
496
516
  }
497
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomRendererFactory2, decorators: [{
517
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomRendererFactory2, decorators: [{
498
518
  type: Injectable
499
519
  }], ctorParameters: () => [{ type: EventManager }, { type: SharedStylesHost }, { type: undefined, decorators: [{
500
520
  type: Inject,
@@ -778,10 +798,10 @@ class DomEventsPlugin extends EventManagerPlugin {
778
798
  removeEventListener(target, eventName, callback) {
779
799
  return target.removeEventListener(eventName, callback);
780
800
  }
781
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
782
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomEventsPlugin }); }
801
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
802
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomEventsPlugin }); }
783
803
  }
784
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomEventsPlugin, decorators: [{
804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomEventsPlugin, decorators: [{
785
805
  type: Injectable
786
806
  }], ctorParameters: () => [{ type: undefined, decorators: [{
787
807
  type: Inject,
@@ -804,10 +824,10 @@ class EventDelegationPlugin extends EventManagerPlugin {
804
824
  removeEventListener(element, eventName, callback) {
805
825
  return this.delegate.removeEventListener(element, eventName, callback);
806
826
  }
807
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: EventDelegationPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
808
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: EventDelegationPlugin }); }
827
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: EventDelegationPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
828
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: EventDelegationPlugin }); }
809
829
  }
810
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: EventDelegationPlugin, decorators: [{
830
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: EventDelegationPlugin, decorators: [{
811
831
  type: Injectable
812
832
  }], ctorParameters: () => [{ type: undefined, decorators: [{
813
833
  type: Inject,
@@ -976,10 +996,10 @@ class KeyEventsPlugin extends EventManagerPlugin {
976
996
  static _normalizeKey(keyName) {
977
997
  return keyName === 'esc' ? 'escape' : keyName;
978
998
  }
979
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
980
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: KeyEventsPlugin }); }
999
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1000
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: KeyEventsPlugin }); }
981
1001
  }
982
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: KeyEventsPlugin, decorators: [{
1002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: KeyEventsPlugin, decorators: [{
983
1003
  type: Injectable
984
1004
  }], ctorParameters: () => [{ type: undefined, decorators: [{
985
1005
  type: Inject,
@@ -1189,11 +1209,11 @@ class BrowserModule {
1189
1209
  providers: [{ provide: APP_ID, useValue: params.appId }],
1190
1210
  };
1191
1211
  }
1192
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: BrowserModule, deps: [{ token: BROWSER_MODULE_PROVIDERS_MARKER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
1193
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.6", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] }); }
1194
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: BrowserModule, providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS], imports: [CommonModule, ApplicationModule] }); }
1212
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: BrowserModule, deps: [{ token: BROWSER_MODULE_PROVIDERS_MARKER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
1213
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.7", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] }); }
1214
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: BrowserModule, providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS], imports: [CommonModule, ApplicationModule] }); }
1195
1215
  }
1196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: BrowserModule, decorators: [{
1216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: BrowserModule, decorators: [{
1197
1217
  type: NgModule,
1198
1218
  args: [{
1199
1219
  providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],
@@ -1357,10 +1377,10 @@ class Meta {
1357
1377
  _getMetaKeyMap(prop) {
1358
1378
  return META_KEYS_MAP[prop] || prop;
1359
1379
  }
1360
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1361
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: Meta, providedIn: 'root' }); }
1380
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1381
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: Meta, providedIn: 'root' }); }
1362
1382
  }
1363
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: Meta, decorators: [{
1383
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: Meta, decorators: [{
1364
1384
  type: Injectable,
1365
1385
  args: [{ providedIn: 'root' }]
1366
1386
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -1401,10 +1421,10 @@ class Title {
1401
1421
  setTitle(newTitle) {
1402
1422
  this._doc.title = newTitle || '';
1403
1423
  }
1404
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1405
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: Title, providedIn: 'root' }); }
1424
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1425
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: Title, providedIn: 'root' }); }
1406
1426
  }
1407
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: Title, decorators: [{
1427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: Title, decorators: [{
1408
1428
  type: Injectable,
1409
1429
  args: [{ providedIn: 'root' }]
1410
1430
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -1668,10 +1688,10 @@ class HammerGestureConfig {
1668
1688
  }
1669
1689
  return mc;
1670
1690
  }
1671
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1672
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: HammerGestureConfig }); }
1691
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1692
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: HammerGestureConfig }); }
1673
1693
  }
1674
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: HammerGestureConfig, decorators: [{
1694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: HammerGestureConfig, decorators: [{
1675
1695
  type: Injectable
1676
1696
  }] });
1677
1697
  /**
@@ -1764,10 +1784,10 @@ class HammerGesturesPlugin extends EventManagerPlugin {
1764
1784
  isCustomEvent(eventName) {
1765
1785
  return this._config.events.indexOf(eventName) > -1;
1766
1786
  }
1767
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.ɵConsole }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1768
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: HammerGesturesPlugin }); }
1787
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.ɵConsole }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1788
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: HammerGesturesPlugin }); }
1769
1789
  }
1770
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: HammerGesturesPlugin, decorators: [{
1790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: HammerGesturesPlugin, decorators: [{
1771
1791
  type: Injectable
1772
1792
  }], ctorParameters: () => [{ type: undefined, decorators: [{
1773
1793
  type: Inject,
@@ -1793,9 +1813,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6",
1793
1813
  * @publicApi
1794
1814
  */
1795
1815
  class HammerModule {
1796
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1797
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.6", ngImport: i0, type: HammerModule }); }
1798
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: HammerModule, providers: [
1816
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1817
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.7", ngImport: i0, type: HammerModule }); }
1818
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: HammerModule, providers: [
1799
1819
  {
1800
1820
  provide: EVENT_MANAGER_PLUGINS,
1801
1821
  useClass: HammerGesturesPlugin,
@@ -1805,7 +1825,7 @@ class HammerModule {
1805
1825
  { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },
1806
1826
  ] }); }
1807
1827
  }
1808
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: HammerModule, decorators: [{
1828
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: HammerModule, decorators: [{
1809
1829
  type: NgModule,
1810
1830
  args: [{
1811
1831
  providers: [
@@ -1852,10 +1872,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6",
1852
1872
  * @publicApi
1853
1873
  */
1854
1874
  class DomSanitizer {
1855
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1856
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(() => DomSanitizerImpl) }); }
1875
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1876
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(() => DomSanitizerImpl) }); }
1857
1877
  }
1858
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomSanitizer, decorators: [{
1878
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomSanitizer, decorators: [{
1859
1879
  type: Injectable,
1860
1880
  args: [{ providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl) }]
1861
1881
  }] });
@@ -1917,10 +1937,10 @@ class DomSanitizerImpl extends DomSanitizer {
1917
1937
  bypassSecurityTrustResourceUrl(value) {
1918
1938
  return ɵbypassSanitizationTrustResourceUrl(value);
1919
1939
  }
1920
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1921
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root' }); }
1940
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1941
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root' }); }
1922
1942
  }
1923
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: DomSanitizerImpl, decorators: [{
1943
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.7", ngImport: i0, type: DomSanitizerImpl, decorators: [{
1924
1944
  type: Injectable,
1925
1945
  args: [{ providedIn: 'root' }]
1926
1946
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -1993,7 +2013,6 @@ function withI18nSupport() {
1993
2013
  * providers: [provideClientHydration(withEventReplay())]
1994
2014
  * });
1995
2015
  * ```
1996
- * @developerPreview
1997
2016
  * @publicApi
1998
2017
  * @see {@link provideClientHydration}
1999
2018
  */
@@ -2011,9 +2030,10 @@ function provideZoneJsCompatibilityDetector() {
2011
2030
  provide: ENVIRONMENT_INITIALIZER,
2012
2031
  useValue: () => {
2013
2032
  const ngZone = inject(NgZone);
2033
+ const isZoneless = inject(ɵZONELESS_ENABLED);
2014
2034
  // Checking `ngZone instanceof NgZone` would be insufficient here,
2015
2035
  // because custom implementations might use NgZone as a base class.
2016
- if (ngZone.constructor !== NgZone) {
2036
+ if (!isZoneless && ngZone.constructor !== NgZone) {
2017
2037
  const console = inject(ɵConsole);
2018
2038
  const message = ɵformatRuntimeError(-5000 /* RuntimeErrorCode.UNSUPPORTED_ZONEJS_INSTANCE */, 'Angular detected that hydration was enabled for an application ' +
2019
2039
  'that uses a custom or a noop Zone.js implementation. ' +
@@ -2110,7 +2130,7 @@ function provideClientHydration(...features) {
2110
2130
  /**
2111
2131
  * @publicApi
2112
2132
  */
2113
- const VERSION = new Version('19.0.0-next.6');
2133
+ const VERSION = new Version('19.0.0-next.7');
2114
2134
 
2115
2135
  /**
2116
2136
  * @module