@angular/platform-browser 7.2.0-beta.0 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/animations/animations.d.ts +2 -2
  2. package/animations/animations.metadata.json +1 -1
  3. package/animations/src/private_export.d.ts +1 -0
  4. package/animations.d.ts +5 -0
  5. package/bundles/platform-browser-animations.umd.js +9 -9
  6. package/bundles/platform-browser-animations.umd.js.map +1 -1
  7. package/bundles/platform-browser-animations.umd.min.js +2 -2
  8. package/bundles/platform-browser-animations.umd.min.js.map +1 -1
  9. package/bundles/platform-browser-testing.umd.js +6 -1
  10. package/bundles/platform-browser-testing.umd.js.map +1 -1
  11. package/bundles/platform-browser-testing.umd.min.js +2 -2
  12. package/bundles/platform-browser-testing.umd.min.js.map +1 -1
  13. package/bundles/platform-browser.umd.js +4 -4
  14. package/bundles/platform-browser.umd.js.map +1 -1
  15. package/bundles/platform-browser.umd.min.js +2 -2
  16. package/bundles/platform-browser.umd.min.js.map +1 -1
  17. package/esm2015/animations/animations.js +3 -4
  18. package/esm2015/animations/index.js +3 -4
  19. package/esm2015/animations/public_api.js +3 -4
  20. package/esm2015/animations/src/animation_builder.js +38 -12
  21. package/esm2015/animations/src/animation_renderer.js +51 -18
  22. package/esm2015/animations/src/animations.js +8 -4
  23. package/esm2015/animations/src/module.js +9 -3
  24. package/esm2015/animations/src/private_export.js +10 -3
  25. package/esm2015/animations/src/providers.js +11 -9
  26. package/esm2015/index.js +2 -3
  27. package/esm2015/platform-browser.js +1 -2
  28. package/esm2015/public_api.js +2 -4
  29. package/esm2015/src/browser/browser_adapter.js +25 -18
  30. package/esm2015/src/browser/generic_browser_adapter.js +13 -8
  31. package/esm2015/src/browser/location/browser_platform_location.js +13 -7
  32. package/esm2015/src/browser/location/history.js +2 -3
  33. package/esm2015/src/browser/meta.js +19 -13
  34. package/esm2015/src/browser/server-transition.js +5 -5
  35. package/esm2015/src/browser/testability.js +2 -3
  36. package/esm2015/src/browser/title.js +6 -4
  37. package/esm2015/src/browser/tools/browser.js +3 -4
  38. package/esm2015/src/browser/tools/common_tools.js +4 -3
  39. package/esm2015/src/browser/tools/tools.js +2 -3
  40. package/esm2015/src/browser/transfer_state.js +14 -10
  41. package/esm2015/src/browser.js +8 -7
  42. package/esm2015/src/dom/debug/by.js +3 -4
  43. package/esm2015/src/dom/debug/ng_probe.js +5 -5
  44. package/esm2015/src/dom/dom_adapter.js +5 -5
  45. package/esm2015/src/dom/dom_renderer.js +56 -20
  46. package/esm2015/src/dom/dom_tokens.js +5 -5
  47. package/esm2015/src/dom/events/dom_events.js +37 -20
  48. package/esm2015/src/dom/events/event_manager.js +21 -9
  49. package/esm2015/src/dom/events/hammer_gestures.js +49 -25
  50. package/esm2015/src/dom/events/key_events.js +10 -9
  51. package/esm2015/src/dom/shared_styles_host.js +16 -6
  52. package/esm2015/src/dom/util.js +7 -4
  53. package/esm2015/src/platform-browser.js +2 -3
  54. package/esm2015/src/private_export.js +2 -3
  55. package/esm2015/src/security/dom_sanitization_service.js +10 -7
  56. package/esm2015/src/version.js +11 -6
  57. package/esm2015/testing/index.js +2 -3
  58. package/esm2015/testing/public_api.js +4 -3
  59. package/esm2015/testing/src/browser.js +12 -5
  60. package/esm2015/testing/src/browser_util.js +24 -9
  61. package/esm2015/testing/src/matchers.js +99 -89
  62. package/esm2015/testing/src/testing.js +2 -3
  63. package/esm2015/testing/testing.js +1 -2
  64. package/esm5/animations/animations.js +3 -4
  65. package/esm5/animations/index.js +1 -2
  66. package/esm5/animations/public_api.js +1 -2
  67. package/esm5/animations/src/animation_builder.js +1 -2
  68. package/esm5/animations/src/animation_renderer.js +2 -3
  69. package/esm5/animations/src/animations.js +1 -2
  70. package/esm5/animations/src/module.js +1 -2
  71. package/esm5/animations/src/private_export.js +2 -2
  72. package/esm5/animations/src/providers.js +1 -2
  73. package/esm5/index.js +1 -2
  74. package/esm5/platform-browser.js +1 -2
  75. package/esm5/public_api.js +1 -2
  76. package/esm5/src/browser/browser_adapter.js +2 -3
  77. package/esm5/src/browser/generic_browser_adapter.js +2 -3
  78. package/esm5/src/browser/location/browser_platform_location.js +1 -2
  79. package/esm5/src/browser/location/history.js +1 -2
  80. package/esm5/src/browser/meta.js +1 -2
  81. package/esm5/src/browser/server-transition.js +1 -2
  82. package/esm5/src/browser/testability.js +1 -2
  83. package/esm5/src/browser/title.js +1 -2
  84. package/esm5/src/browser/tools/browser.js +1 -2
  85. package/esm5/src/browser/tools/common_tools.js +1 -2
  86. package/esm5/src/browser/tools/tools.js +1 -2
  87. package/esm5/src/browser/transfer_state.js +1 -2
  88. package/esm5/src/browser.js +1 -2
  89. package/esm5/src/dom/debug/by.js +1 -2
  90. package/esm5/src/dom/debug/ng_probe.js +1 -2
  91. package/esm5/src/dom/dom_adapter.js +1 -2
  92. package/esm5/src/dom/dom_renderer.js +1 -2
  93. package/esm5/src/dom/dom_tokens.js +1 -2
  94. package/esm5/src/dom/events/dom_events.js +1 -2
  95. package/esm5/src/dom/events/event_manager.js +1 -2
  96. package/esm5/src/dom/events/hammer_gestures.js +1 -2
  97. package/esm5/src/dom/events/key_events.js +1 -2
  98. package/esm5/src/dom/shared_styles_host.js +1 -2
  99. package/esm5/src/dom/util.js +1 -2
  100. package/esm5/src/platform-browser.js +1 -2
  101. package/esm5/src/private_export.js +1 -2
  102. package/esm5/src/security/dom_sanitization_service.js +1 -2
  103. package/esm5/src/version.js +2 -3
  104. package/esm5/testing/index.js +1 -2
  105. package/esm5/testing/public_api.js +1 -2
  106. package/esm5/testing/src/browser.js +1 -2
  107. package/esm5/testing/src/browser_util.js +6 -2
  108. package/esm5/testing/src/matchers.js +1 -2
  109. package/esm5/testing/src/testing.js +1 -2
  110. package/esm5/testing/testing.js +1 -2
  111. package/fesm2015/animations.js +33 -24
  112. package/fesm2015/animations.js.map +1 -1
  113. package/fesm2015/platform-browser.js +165 -113
  114. package/fesm2015/platform-browser.js.map +1 -1
  115. package/fesm2015/testing.js +24 -12
  116. package/fesm2015/testing.js.map +1 -1
  117. package/fesm5/animations.js +3 -3
  118. package/fesm5/animations.js.map +1 -1
  119. package/fesm5/platform-browser.js +4 -4
  120. package/fesm5/platform-browser.js.map +1 -1
  121. package/fesm5/testing.js +6 -1
  122. package/fesm5/testing.js.map +1 -1
  123. package/package.json +3 -3
  124. package/platform-browser.metadata.json +1 -1
  125. package/testing/src/browser_util.d.ts +1 -0
  126. package/testing/testing.metadata.json +1 -1
  127. package/testing.d.ts +5 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v7.2.0-beta.0
2
+ * @license Angular v7.2.0
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -9,7 +9,7 @@ import { ɵglobal, Inject, Injectable, APP_INITIALIZER, ApplicationInitStatus, I
9
9
 
10
10
  /**
11
11
  * @fileoverview added by tsickle
12
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
12
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
13
13
  */
14
14
  /**
15
15
  * @license
@@ -19,7 +19,7 @@ import { ɵglobal, Inject, Injectable, APP_INITIALIZER, ApplicationInitStatus, I
19
19
  * found in the LICENSE file at https://angular.io/license
20
20
  */
21
21
  /** @type {?} */
22
- let _DOM = /** @type {?} */ ((null));
22
+ let _DOM = (/** @type {?} */ (null));
23
23
  /**
24
24
  * @return {?}
25
25
  */
@@ -35,6 +35,7 @@ function setRootDomAdapter(adapter) {
35
35
  _DOM = adapter;
36
36
  }
37
37
  }
38
+ /* tslint:disable:requireParameterType */
38
39
  /**
39
40
  * Provides DOM operations in an environment-agnostic way.
40
41
  *
@@ -44,7 +45,7 @@ function setRootDomAdapter(adapter) {
44
45
  */
45
46
  class DomAdapter {
46
47
  constructor() {
47
- this.resourceLoaderType = /** @type {?} */ ((null));
48
+ this.resourceLoaderType = (/** @type {?} */ (null));
48
49
  }
49
50
  /**
50
51
  * Maps attribute names to their corresponding property names for cases
@@ -61,7 +62,7 @@ class DomAdapter {
61
62
 
62
63
  /**
63
64
  * @fileoverview added by tsickle
64
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
65
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
65
66
  */
66
67
  /**
67
68
  * Provides DOM operations in any browser environment.
@@ -104,7 +105,7 @@ class GenericBrowserDomAdapter extends DomAdapter {
104
105
  }
105
106
  });
106
107
  }
107
- catch (e) {
108
+ catch (_a) {
108
109
  this._animationPrefix = null;
109
110
  this._transitionEnd = null;
110
111
  }
@@ -113,7 +114,7 @@ class GenericBrowserDomAdapter extends DomAdapter {
113
114
  * @param {?} el
114
115
  * @return {?}
115
116
  */
116
- getDistributedNodes(el) { return (/** @type {?} */ (el)).getDistributedNodes(); }
117
+ getDistributedNodes(el) { return ((/** @type {?} */ (el))).getDistributedNodes(); }
117
118
  /**
118
119
  * @param {?} el
119
120
  * @param {?} baseUrl
@@ -131,7 +132,7 @@ class GenericBrowserDomAdapter extends DomAdapter {
131
132
  * @return {?}
132
133
  */
133
134
  supportsNativeShadowDOM() {
134
- return typeof (/** @type {?} */ (document.body)).createShadowRoot === 'function';
135
+ return typeof ((/** @type {?} */ (document.body))).createShadowRoot === 'function';
135
136
  }
136
137
  /**
137
138
  * @return {?}
@@ -151,7 +152,7 @@ class GenericBrowserDomAdapter extends DomAdapter {
151
152
 
152
153
  /**
153
154
  * @fileoverview added by tsickle
154
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
155
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
155
156
  */
156
157
  /** @type {?} */
157
158
  const _attrToPropMap = {
@@ -162,6 +163,7 @@ const _attrToPropMap = {
162
163
  };
163
164
  /** @type {?} */
164
165
  const DOM_KEY_LOCATION_NUMPAD = 3;
166
+ // Map to convert some key or keyIdentifier values to what will be returned by getEventKey
165
167
  /** @type {?} */
166
168
  const _keyMap = {
167
169
  // The following values are here for cross-browser compatibility and to match the W3C standard
@@ -180,6 +182,9 @@ const _keyMap = {
180
182
  'Scroll': 'ScrollLock',
181
183
  'Win': 'OS'
182
184
  };
185
+ // There is a bug in Chrome for numeric keypad keys:
186
+ // https://code.google.com/p/chromium/issues/detail?id=155654
187
+ // 1, 2, 3 ... are reported as A, B, C ...
183
188
  /** @type {?} */
184
189
  const _chromeNumKeyPadMap = {
185
190
  'A': '1',
@@ -212,6 +217,7 @@ if (ɵglobal['Node']) {
212
217
  * \@security Tread carefully! Interacting with the DOM directly is dangerous and
213
218
  * can introduce XSS risks.
214
219
  */
220
+ /* tslint:disable:requireParameterType no-console */
215
221
  class BrowserDomAdapter extends GenericBrowserDomAdapter {
216
222
  /**
217
223
  * @param {?} templateHtml
@@ -234,20 +240,21 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
234
240
  * @param {?} value
235
241
  * @return {?}
236
242
  */
237
- setProperty(el, name, value) { (/** @type {?} */ (el))[name] = value; }
243
+ setProperty(el, name, value) { ((/** @type {?} */ (el)))[name] = value; }
238
244
  /**
239
245
  * @param {?} el
240
246
  * @param {?} name
241
247
  * @return {?}
242
248
  */
243
- getProperty(el, name) { return (/** @type {?} */ (el))[name]; }
249
+ getProperty(el, name) { return ((/** @type {?} */ (el)))[name]; }
244
250
  /**
245
251
  * @param {?} el
246
252
  * @param {?} methodName
247
253
  * @param {?} args
248
254
  * @return {?}
249
255
  */
250
- invoke(el, methodName, args) { (/** @type {?} */ (el))[methodName](...args); }
256
+ invoke(el, methodName, args) { ((/** @type {?} */ (el)))[methodName](...args); }
257
+ // TODO(tbosch): move this into a separate environment class once we have it
251
258
  /**
252
259
  * @param {?} error
253
260
  * @return {?}
@@ -380,7 +387,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
380
387
  * @return {?}
381
388
  */
382
389
  getTemplateContent(el) {
383
- return 'content' in el && this.isTemplateElement(el) ? (/** @type {?} */ (el)).content : null;
390
+ return 'content' in el && this.isTemplateElement(el) ? ((/** @type {?} */ (el))).content : null;
384
391
  }
385
392
  /**
386
393
  * @param {?} el
@@ -408,7 +415,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
408
415
  */
409
416
  content(node) {
410
417
  if (this.hasProperty(node, 'content')) {
411
- return (/** @type {?} */ (node)).content;
418
+ return ((/** @type {?} */ (node))).content;
412
419
  }
413
420
  else {
414
421
  return node;
@@ -600,7 +607,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
600
607
  createScriptTag(attrName, attrValue, doc) {
601
608
  doc = doc || this.getDefaultDocument();
602
609
  /** @type {?} */
603
- const el = /** @type {?} */ (doc.createElement('SCRIPT'));
610
+ const el = (/** @type {?} */ (doc.createElement('SCRIPT')));
604
611
  el.setAttribute(attrName, attrValue);
605
612
  return el;
606
613
  }
@@ -612,7 +619,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
612
619
  createStyleElement(css, doc) {
613
620
  doc = doc || this.getDefaultDocument();
614
621
  /** @type {?} */
615
- const style = /** @type {?} */ (doc.createElement('style'));
622
+ const style = (/** @type {?} */ (doc.createElement('style')));
616
623
  this.appendChild(style, this.createTextNode(css, doc));
617
624
  return style;
618
625
  }
@@ -620,17 +627,17 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
620
627
  * @param {?} el
621
628
  * @return {?}
622
629
  */
623
- createShadowRoot(el) { return (/** @type {?} */ (el)).createShadowRoot(); }
630
+ createShadowRoot(el) { return ((/** @type {?} */ (el))).createShadowRoot(); }
624
631
  /**
625
632
  * @param {?} el
626
633
  * @return {?}
627
634
  */
628
- getShadowRoot(el) { return (/** @type {?} */ (el)).shadowRoot; }
635
+ getShadowRoot(el) { return ((/** @type {?} */ (el))).shadowRoot; }
629
636
  /**
630
637
  * @param {?} el
631
638
  * @return {?}
632
639
  */
633
- getHost(el) { return (/** @type {?} */ (el)).host; }
640
+ getHost(el) { return ((/** @type {?} */ (el))).host; }
634
641
  /**
635
642
  * @param {?} node
636
643
  * @return {?}
@@ -823,7 +830,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
823
830
  try {
824
831
  return el.getBoundingClientRect();
825
832
  }
826
- catch (e) {
833
+ catch (_a) {
827
834
  return { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 };
828
835
  }
829
836
  }
@@ -899,7 +906,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
899
906
  * @param {?} el
900
907
  * @return {?}
901
908
  */
902
- getHref(el) { return /** @type {?} */ ((el.getAttribute('href'))); }
909
+ getHref(el) { return (/** @type {?} */ (el.getAttribute('href'))); }
903
910
  /**
904
911
  * @param {?} event
905
912
  * @return {?}
@@ -921,7 +928,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
921
928
  // There is a bug in Chrome for numeric keypad keys:
922
929
  // https://code.google.com/p/chromium/issues/detail?id=155654
923
930
  // 1, 2, 3 ... are reported as A, B, C ...
924
- key = (/** @type {?} */ (_chromeNumKeyPadMap))[key];
931
+ key = ((/** @type {?} */ (_chromeNumKeyPadMap)))[key];
925
932
  }
926
933
  }
927
934
  }
@@ -991,11 +998,12 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
991
998
  * @return {?}
992
999
  */
993
1000
  getComputedStyle(element) { return getComputedStyle(element); }
1001
+ // TODO(tbosch): move this into a separate environment class once we have it
994
1002
  /**
995
1003
  * @return {?}
996
1004
  */
997
1005
  supportsWebAnimation() {
998
- return typeof (/** @type {?} */ (Element)).prototype['animate'] === 'function';
1006
+ return typeof ((/** @type {?} */ (Element))).prototype['animate'] === 'function';
999
1007
  }
1000
1008
  /**
1001
1009
  * @return {?}
@@ -1033,13 +1041,14 @@ let baseElement = null;
1033
1041
  */
1034
1042
  function getBaseElementHref() {
1035
1043
  if (!baseElement) {
1036
- baseElement = /** @type {?} */ ((document.querySelector('base')));
1044
+ baseElement = (/** @type {?} */ (document.querySelector('base')));
1037
1045
  if (!baseElement) {
1038
1046
  return null;
1039
1047
  }
1040
1048
  }
1041
1049
  return baseElement.getAttribute('href');
1042
1050
  }
1051
+ // based on urlUtils.js in AngularJS 1
1043
1052
  /** @type {?} */
1044
1053
  let urlParsingNode;
1045
1054
  /**
@@ -1057,9 +1066,9 @@ function relativePath(url) {
1057
1066
 
1058
1067
  /**
1059
1068
  * @fileoverview added by tsickle
1060
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1069
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1061
1070
  */
1062
- /** *
1071
+ /**
1063
1072
  * A DI Token representing the main rendering context. In a browser this is the DOM Document.
1064
1073
  *
1065
1074
  * Note: Document might not be available in the Application Context when Application and Rendering
@@ -1067,12 +1076,13 @@ function relativePath(url) {
1067
1076
  *
1068
1077
  * @deprecated import from `\@angular/common` instead.
1069
1078
  * \@publicApi
1070
- @type {?} */
1079
+ * @type {?}
1080
+ */
1071
1081
  const DOCUMENT$1 = DOCUMENT;
1072
1082
 
1073
1083
  /**
1074
1084
  * @fileoverview added by tsickle
1075
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1085
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1076
1086
  */
1077
1087
  /**
1078
1088
  * @license
@@ -1090,7 +1100,7 @@ function supportsState() {
1090
1100
 
1091
1101
  /**
1092
1102
  * @fileoverview added by tsickle
1093
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1103
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1094
1104
  */
1095
1105
  /**
1096
1106
  * `PlatformLocation` encapsulates all of the direct calls to platform APIs.
@@ -1106,18 +1116,19 @@ class BrowserPlatformLocation extends PlatformLocation {
1106
1116
  this._doc = _doc;
1107
1117
  this._init();
1108
1118
  }
1119
+ // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
1109
1120
  /**
1110
1121
  * \@internal
1111
1122
  * @return {?}
1112
1123
  */
1113
1124
  _init() {
1114
- (/** @type {?} */ (this)).location = getDOM().getLocation();
1125
+ ((/** @type {?} */ (this))).location = getDOM().getLocation();
1115
1126
  this._history = getDOM().getHistory();
1116
1127
  }
1117
1128
  /**
1118
1129
  * @return {?}
1119
1130
  */
1120
- getBaseHrefFromDOM() { return /** @type {?} */ ((getDOM().getBaseHref(this._doc))); }
1131
+ getBaseHrefFromDOM() { return (/** @type {?} */ (getDOM().getBaseHref(this._doc))); }
1121
1132
  /**
1122
1133
  * @param {?} fn
1123
1134
  * @return {?}
@@ -1196,12 +1207,13 @@ BrowserPlatformLocation.ctorParameters = () => [
1196
1207
 
1197
1208
  /**
1198
1209
  * @fileoverview added by tsickle
1199
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1210
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1200
1211
  */
1201
- /** *
1212
+ /**
1202
1213
  * An id that identifies a particular application being bootstrapped, that should
1203
1214
  * match across the client/server boundary.
1204
- @type {?} */
1215
+ * @type {?}
1216
+ */
1205
1217
  const TRANSITION_ID = new InjectionToken('TRANSITION_ID');
1206
1218
  /**
1207
1219
  * @param {?} transitionId
@@ -1235,7 +1247,7 @@ const SERVER_TRANSITION_PROVIDERS = [
1235
1247
 
1236
1248
  /**
1237
1249
  * @fileoverview added by tsickle
1238
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1250
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1239
1251
  */
1240
1252
  class BrowserGetTestability {
1241
1253
  /**
@@ -1309,7 +1321,7 @@ class BrowserGetTestability {
1309
1321
 
1310
1322
  /**
1311
1323
  * @fileoverview added by tsickle
1312
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1324
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1313
1325
  */
1314
1326
  /**
1315
1327
  * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if
@@ -1321,15 +1333,19 @@ class BrowserGetTestability {
1321
1333
  */
1322
1334
  function exportNgVar(name, value) {
1323
1335
  if (typeof COMPILED === 'undefined' || !COMPILED) {
1336
+ // Note: we can't export `ng` when using closure enhanced optimization as:
1337
+ // - closure declares globals itself for minified names, which sometimes clobber our `ng` global
1338
+ // - we can't declare a closure extern as the namespace `ng` is already used within Google
1339
+ // for typings for angularJS (via `goog.provide('ng....')`).
1324
1340
  /** @type {?} */
1325
- const ng = ɵglobal['ng'] = (/** @type {?} */ (ɵglobal['ng'])) || {};
1341
+ const ng = ɵglobal['ng'] = ((/** @type {?} */ (ɵglobal['ng']))) || {};
1326
1342
  ng[name] = value;
1327
1343
  }
1328
1344
  }
1329
1345
 
1330
1346
  /**
1331
1347
  * @fileoverview added by tsickle
1332
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1348
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1333
1349
  */
1334
1350
  /** @type {?} */
1335
1351
  const CORE_TOKENS = {
@@ -1366,9 +1382,10 @@ function _createNgProbe(coreTokens) {
1366
1382
  function _ngProbeTokensToMap(tokens) {
1367
1383
  return tokens.reduce((prev, t) => (prev[t.name] = t.token, prev), {});
1368
1384
  }
1369
- /** *
1385
+ /**
1370
1386
  * Providers which support debugging Angular applications (e.g. via `ng.probe`).
1371
- @type {?} */
1387
+ * @type {?}
1388
+ */
1372
1389
  const ELEMENT_PROBE_PROVIDERS = [
1373
1390
  {
1374
1391
  provide: APP_INITIALIZER,
@@ -1382,13 +1399,14 @@ const ELEMENT_PROBE_PROVIDERS = [
1382
1399
 
1383
1400
  /**
1384
1401
  * @fileoverview added by tsickle
1385
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1402
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1386
1403
  */
1387
- /** *
1404
+ /**
1388
1405
  * The injection token for the event-manager plug-in service.
1389
1406
  *
1390
1407
  * \@publicApi
1391
- @type {?} */
1408
+ * @type {?}
1409
+ */
1392
1410
  const EVENT_MANAGER_PLUGINS = new InjectionToken('EventManagerPlugins');
1393
1411
  /**
1394
1412
  * An injectable service that provides event management for Angular
@@ -1501,7 +1519,7 @@ class EventManagerPlugin {
1501
1519
 
1502
1520
  /**
1503
1521
  * @fileoverview added by tsickle
1504
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1522
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1505
1523
  */
1506
1524
  class SharedStylesHost {
1507
1525
  constructor() {
@@ -1550,6 +1568,7 @@ class DomSharedStylesHost extends SharedStylesHost {
1550
1568
  this._hostNodes.add(_doc.head);
1551
1569
  }
1552
1570
  /**
1571
+ * @private
1553
1572
  * @param {?} styles
1554
1573
  * @param {?} host
1555
1574
  * @return {?}
@@ -1597,7 +1616,7 @@ DomSharedStylesHost.ctorParameters = () => [
1597
1616
 
1598
1617
  /**
1599
1618
  * @fileoverview added by tsickle
1600
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1619
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1601
1620
  */
1602
1621
  /** @type {?} */
1603
1622
  const NAMESPACE_URIS = {
@@ -1693,7 +1712,7 @@ class DomRendererFactory2 {
1693
1712
  new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type);
1694
1713
  this.rendererByCompId.set(type.id, renderer);
1695
1714
  }
1696
- (/** @type {?} */ (renderer)).applyToHost(element);
1715
+ ((/** @type {?} */ (renderer))).applyToHost(element);
1697
1716
  return renderer;
1698
1717
  }
1699
1718
  case ViewEncapsulation.Native:
@@ -1926,9 +1945,9 @@ class DefaultDomRenderer2 {
1926
1945
  listen(target, event, callback) {
1927
1946
  checkNoSyntheticProp(event, 'listener');
1928
1947
  if (typeof target === 'string') {
1929
- return /** @type {?} */ (this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback)));
1948
+ return (/** @type {?} */ (this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback))));
1930
1949
  }
1931
- return /** @type {?} */ ((this.eventManager.addEventListener(target, event, decoratePreventDefault(callback))));
1950
+ return (/** @type {?} */ ((/** @type {?} */ (this.eventManager.addEventListener(target, event, decoratePreventDefault(callback))))));
1932
1951
  }
1933
1952
  }
1934
1953
  /** @type {?} */
@@ -1988,10 +2007,10 @@ class ShadowDomRenderer extends DefaultDomRenderer2 {
1988
2007
  this.hostEl = hostEl;
1989
2008
  this.component = component;
1990
2009
  if (component.encapsulation === ViewEncapsulation.ShadowDom) {
1991
- this.shadowRoot = (/** @type {?} */ (hostEl)).attachShadow({ mode: 'open' });
2010
+ this.shadowRoot = ((/** @type {?} */ (hostEl))).attachShadow({ mode: 'open' });
1992
2011
  }
1993
2012
  else {
1994
- this.shadowRoot = (/** @type {?} */ (hostEl)).createShadowRoot();
2013
+ this.shadowRoot = ((/** @type {?} */ (hostEl))).createShadowRoot();
1995
2014
  }
1996
2015
  this.sharedStylesHost.addHost(this.shadowRoot);
1997
2016
  /** @type {?} */
@@ -2004,6 +2023,7 @@ class ShadowDomRenderer extends DefaultDomRenderer2 {
2004
2023
  }
2005
2024
  }
2006
2025
  /**
2026
+ * @private
2007
2027
  * @param {?} node
2008
2028
  * @return {?}
2009
2029
  */
@@ -2048,18 +2068,19 @@ class ShadowDomRenderer extends DefaultDomRenderer2 {
2048
2068
 
2049
2069
  /**
2050
2070
  * @fileoverview added by tsickle
2051
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2071
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2052
2072
  */
2053
2073
  const ɵ0 = function (v) {
2054
2074
  return '__zone_symbol__' + v;
2055
2075
  };
2056
- /** *
2076
+ /**
2057
2077
  * Detect if Zone is present. If it is then use simple zone aware 'addEventListener'
2058
2078
  * since Angular can do much more
2059
2079
  * efficient bookkeeping than Zone can, because we have additional information. This speeds up
2060
2080
  * addEventListener by 3x.
2061
- @type {?} */
2062
- const __symbol__ = (typeof Zone !== 'undefined') && (/** @type {?} */ (Zone))['__symbol__'] || ɵ0;
2081
+ * @type {?}
2082
+ */
2083
+ const __symbol__ = (typeof Zone !== 'undefined') && ((/** @type {?} */ (Zone)))['__symbol__'] || ɵ0;
2063
2084
  /** @type {?} */
2064
2085
  const ADD_EVENT_LISTENER = __symbol__('addEventListener');
2065
2086
  /** @type {?} */
@@ -2074,12 +2095,13 @@ const ANGULAR = 'ANGULAR';
2074
2095
  const NATIVE_ADD_LISTENER = 'addEventListener';
2075
2096
  /** @type {?} */
2076
2097
  const NATIVE_REMOVE_LISTENER = 'removeEventListener';
2098
+ // use the same symbol string which is used in zone.js
2077
2099
  /** @type {?} */
2078
2100
  const stopSymbol = '__zone_symbol__propagationStopped';
2079
2101
  /** @type {?} */
2080
2102
  const stopMethodSymbol = '__zone_symbol__stopImmediatePropagation';
2081
2103
  /** @type {?} */
2082
- const blackListedEvents = (typeof Zone !== 'undefined') && (/** @type {?} */ (Zone))[__symbol__('BLACK_LISTED_EVENTS')];
2104
+ const blackListedEvents = (typeof Zone !== 'undefined') && ((/** @type {?} */ (Zone)))[__symbol__('BLACK_LISTED_EVENTS')];
2083
2105
  /** @type {?} */
2084
2106
  let blackListedMap;
2085
2107
  if (blackListedEvents) {
@@ -2093,6 +2115,8 @@ const isBlackListedEvent = function (eventName) {
2093
2115
  }
2094
2116
  return blackListedMap.hasOwnProperty(eventName);
2095
2117
  };
2118
+ // a global listener to handle all dom event,
2119
+ // so we do not need to create a closure every time
2096
2120
  /** @type {?} */
2097
2121
  const globalListener = function (event) {
2098
2122
  /** @type {?} */
@@ -2108,6 +2132,7 @@ const globalListener = function (event) {
2108
2132
  /** @type {?} */
2109
2133
  const args = [event];
2110
2134
  if (taskDatas.length === 1) {
2135
+ // if taskDatas only have one element, just invoke it
2111
2136
  /** @type {?} */
2112
2137
  const taskData = taskDatas[0];
2113
2138
  if (taskData.zone !== Zone.current) {
@@ -2119,12 +2144,14 @@ const globalListener = function (event) {
2119
2144
  }
2120
2145
  }
2121
2146
  else {
2147
+ // copy tasks as a snapshot to avoid event handlers remove
2148
+ // itself or others
2122
2149
  /** @type {?} */
2123
2150
  const copiedTasks = taskDatas.slice();
2124
2151
  for (let i = 0; i < copiedTasks.length; i++) {
2125
2152
  // if other listener call event.stopImmediatePropagation
2126
2153
  // just break
2127
- if ((/** @type {?} */ (event))[stopSymbol] === true) {
2154
+ if (((/** @type {?} */ (event)))[stopSymbol] === true) {
2128
2155
  break;
2129
2156
  }
2130
2157
  /** @type {?} */
@@ -2153,18 +2180,19 @@ class DomEventsPlugin extends EventManagerPlugin {
2153
2180
  }
2154
2181
  }
2155
2182
  /**
2183
+ * @private
2156
2184
  * @return {?}
2157
2185
  */
2158
2186
  patchEvent() {
2159
2187
  if (typeof Event === 'undefined' || !Event || !Event.prototype) {
2160
2188
  return;
2161
2189
  }
2162
- if ((/** @type {?} */ (Event.prototype))[stopMethodSymbol]) {
2190
+ if (((/** @type {?} */ (Event.prototype)))[stopMethodSymbol]) {
2163
2191
  // already patched by zone.js
2164
2192
  return;
2165
2193
  }
2166
2194
  /** @type {?} */
2167
- const delegate = (/** @type {?} */ (Event.prototype))[stopMethodSymbol] =
2195
+ const delegate = ((/** @type {?} */ (Event.prototype)))[stopMethodSymbol] =
2168
2196
  Event.prototype.stopImmediatePropagation;
2169
2197
  Event.prototype.stopImmediatePropagation = function () {
2170
2198
  if (this) {
@@ -2176,6 +2204,8 @@ class DomEventsPlugin extends EventManagerPlugin {
2176
2204
  delegate && delegate.apply(this, arguments);
2177
2205
  };
2178
2206
  }
2207
+ // This plugin should come last in the list of plugins, because it accepts all
2208
+ // events.
2179
2209
  /**
2180
2210
  * @param {?} eventName
2181
2211
  * @return {?}
@@ -2191,7 +2221,7 @@ class DomEventsPlugin extends EventManagerPlugin {
2191
2221
  /** @type {?} */
2192
2222
  const zoneJsLoaded = element[ADD_EVENT_LISTENER];
2193
2223
  /** @type {?} */
2194
- let callback = /** @type {?} */ (handler);
2224
+ let callback = (/** @type {?} */ (handler));
2195
2225
  // if zonejs is loaded and current zone is not ngZone
2196
2226
  // we keep Zone.current on target for later restoration.
2197
2227
  if (zoneJsLoaded && (!NgZone.isInAngularZone() || isBlackListedEvent(eventName))) {
@@ -2201,11 +2231,11 @@ class DomEventsPlugin extends EventManagerPlugin {
2201
2231
  symbolName = symbolNames[eventName] = __symbol__(ANGULAR + eventName + FALSE);
2202
2232
  }
2203
2233
  /** @type {?} */
2204
- let taskDatas = (/** @type {?} */ (element))[symbolName];
2234
+ let taskDatas = ((/** @type {?} */ (element)))[symbolName];
2205
2235
  /** @type {?} */
2206
2236
  const globalListenerRegistered = taskDatas && taskDatas.length > 0;
2207
2237
  if (!taskDatas) {
2208
- taskDatas = (/** @type {?} */ (element))[symbolName] = [];
2238
+ taskDatas = ((/** @type {?} */ (element)))[symbolName] = [];
2209
2239
  }
2210
2240
  /** @type {?} */
2211
2241
  const zone = isBlackListedEvent(eventName) ? Zone.root : Zone.current;
@@ -2256,6 +2286,8 @@ class DomEventsPlugin extends EventManagerPlugin {
2256
2286
  // just call native removeEventListener
2257
2287
  return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
2258
2288
  }
2289
+ // fix issue 20532, should be able to remove
2290
+ // listener which was added inside of ngZone
2259
2291
  /** @type {?} */
2260
2292
  let found = false;
2261
2293
  for (let i = 0; i < taskDatas.length; i++) {
@@ -2291,11 +2323,12 @@ DomEventsPlugin.ctorParameters = () => [
2291
2323
 
2292
2324
  /**
2293
2325
  * @fileoverview added by tsickle
2294
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2326
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2295
2327
  */
2296
- /** *
2328
+ /**
2297
2329
  * Supported HammerJS recognizer event names.
2298
- @type {?} */
2330
+ * @type {?}
2331
+ */
2299
2332
  const EVENT_NAMES = {
2300
2333
  // pan
2301
2334
  'pan': true,
@@ -2333,18 +2366,20 @@ const EVENT_NAMES = {
2333
2366
  // tap
2334
2367
  'tap': true,
2335
2368
  };
2336
- /** *
2369
+ /**
2337
2370
  * DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.
2338
2371
  * @see `HammerGestureConfig`
2339
2372
  *
2340
2373
  * \@publicApi
2341
- @type {?} */
2374
+ * @type {?}
2375
+ */
2342
2376
  const HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');
2343
- /** *
2377
+ /**
2344
2378
  * Injection token used to provide a {\@link HammerLoader} to Angular.
2345
2379
  *
2346
2380
  * \@publicApi
2347
- @type {?} */
2381
+ * @type {?}
2382
+ */
2348
2383
  const HAMMER_LOADER = new InjectionToken('HammerLoader');
2349
2384
  /**
2350
2385
  * An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
@@ -2385,7 +2420,7 @@ class HammerGestureConfig {
2385
2420
  */
2386
2421
  buildHammer(element) {
2387
2422
  /** @type {?} */
2388
- const mc = new /** @type {?} */ ((Hammer))(element, this.options);
2423
+ const mc = new (/** @type {?} */ (Hammer))(element, this.options);
2389
2424
  mc.get('pinch').set({ enable: true });
2390
2425
  mc.get('rotate').set({ enable: true });
2391
2426
  for (const eventName in this.overrides) {
@@ -2418,7 +2453,7 @@ class HammerGesturesPlugin extends EventManagerPlugin {
2418
2453
  if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {
2419
2454
  return false;
2420
2455
  }
2421
- if (!(/** @type {?} */ (window)).Hammer && !this.loader) {
2456
+ if (!((/** @type {?} */ (window))).Hammer && !this.loader) {
2422
2457
  this.console.warn(`The "${eventName}" event cannot be bound because Hammer.JS is not ` +
2423
2458
  `loaded and no custom loader has been specified.`);
2424
2459
  return false;
@@ -2437,7 +2472,10 @@ class HammerGesturesPlugin extends EventManagerPlugin {
2437
2472
  eventName = eventName.toLowerCase();
2438
2473
  // If Hammer is not present but a loader is specified, we defer adding the event listener
2439
2474
  // until Hammer is loaded.
2440
- if (!(/** @type {?} */ (window)).Hammer && this.loader) {
2475
+ if (!((/** @type {?} */ (window))).Hammer && this.loader) {
2476
+ // This `addEventListener` method returns a function to remove the added listener.
2477
+ // Until Hammer is loaded, the returned function needs to *cancel* the registration rather
2478
+ // than remove anything.
2441
2479
  /** @type {?} */
2442
2480
  let cancelRegistration = false;
2443
2481
  /** @type {?} */
@@ -2445,7 +2483,7 @@ class HammerGesturesPlugin extends EventManagerPlugin {
2445
2483
  this.loader()
2446
2484
  .then(() => {
2447
2485
  // If Hammer isn't actually loaded when the custom loader resolves, give up.
2448
- if (!(/** @type {?} */ (window)).Hammer) {
2486
+ if (!((/** @type {?} */ (window))).Hammer) {
2449
2487
  this.console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);
2450
2488
  deregister = () => { };
2451
2489
  return;
@@ -2467,6 +2505,7 @@ class HammerGesturesPlugin extends EventManagerPlugin {
2467
2505
  return () => { deregister(); };
2468
2506
  }
2469
2507
  return zone.runOutsideAngular(() => {
2508
+ // Creating the manager bind events, must be done outside of angular
2470
2509
  /** @type {?} */
2471
2510
  const mc = this._config.buildHammer(element);
2472
2511
  /** @type {?} */
@@ -2502,16 +2541,18 @@ HammerGesturesPlugin.ctorParameters = () => [
2502
2541
 
2503
2542
  /**
2504
2543
  * @fileoverview added by tsickle
2505
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2544
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2506
2545
  */
2507
- /** *
2546
+ /**
2508
2547
  * Defines supported modifiers for key events.
2509
- @type {?} */
2548
+ * @type {?}
2549
+ */
2510
2550
  const MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];
2511
2551
  const ɵ0$1 = (event) => event.altKey, ɵ1$1 = (event) => event.ctrlKey, ɵ2$1 = (event) => event.metaKey, ɵ3 = (event) => event.shiftKey;
2512
- /** *
2552
+ /**
2513
2553
  * Retrieves modifiers from key-event objects.
2514
- @type {?} */
2554
+ * @type {?}
2555
+ */
2515
2556
  const MODIFIER_KEY_GETTERS = {
2516
2557
  'alt': ɵ0$1,
2517
2558
  'control': ɵ1$1,
@@ -2544,7 +2585,7 @@ class KeyEventsPlugin extends EventManagerPlugin {
2544
2585
  */
2545
2586
  addEventListener(element, eventName, handler) {
2546
2587
  /** @type {?} */
2547
- const parsedEvent = /** @type {?} */ ((KeyEventsPlugin.parseEventName(eventName)));
2588
+ const parsedEvent = (/** @type {?} */ (KeyEventsPlugin.parseEventName(eventName)));
2548
2589
  /** @type {?} */
2549
2590
  const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
2550
2591
  return this.manager.getZone().runOutsideAngular(() => {
@@ -2564,7 +2605,7 @@ class KeyEventsPlugin extends EventManagerPlugin {
2564
2605
  return null;
2565
2606
  }
2566
2607
  /** @type {?} */
2567
- const key = KeyEventsPlugin._normalizeKey(/** @type {?} */ ((parts.pop())));
2608
+ const key = KeyEventsPlugin._normalizeKey((/** @type {?} */ (parts.pop())));
2568
2609
  /** @type {?} */
2569
2610
  let fullKey = '';
2570
2611
  MODIFIER_KEYS.forEach(modifierName => {
@@ -2653,7 +2694,7 @@ KeyEventsPlugin.ctorParameters = () => [
2653
2694
 
2654
2695
  /**
2655
2696
  * @fileoverview added by tsickle
2656
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2697
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2657
2698
  */
2658
2699
  /**
2659
2700
  * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
@@ -2707,7 +2748,7 @@ class DomSanitizerImpl extends DomSanitizer {
2707
2748
  return null;
2708
2749
  switch (ctx) {
2709
2750
  case SecurityContext.NONE:
2710
- return /** @type {?} */ (value);
2751
+ return (/** @type {?} */ (value));
2711
2752
  case SecurityContext.HTML:
2712
2753
  if (value instanceof SafeHtmlImpl)
2713
2754
  return value.changingThisBreaksApplicationSecurity;
@@ -2717,7 +2758,7 @@ class DomSanitizerImpl extends DomSanitizer {
2717
2758
  if (value instanceof SafeStyleImpl)
2718
2759
  return value.changingThisBreaksApplicationSecurity;
2719
2760
  this.checkNotSafeValue(value, 'Style');
2720
- return ɵ_sanitizeStyle(/** @type {?} */ (value));
2761
+ return ɵ_sanitizeStyle((/** @type {?} */ (value)));
2721
2762
  case SecurityContext.SCRIPT:
2722
2763
  if (value instanceof SafeScriptImpl)
2723
2764
  return value.changingThisBreaksApplicationSecurity;
@@ -2741,6 +2782,7 @@ class DomSanitizerImpl extends DomSanitizer {
2741
2782
  }
2742
2783
  }
2743
2784
  /**
2785
+ * @private
2744
2786
  * @param {?} value
2745
2787
  * @param {?} expectedType
2746
2788
  * @return {?}
@@ -2794,8 +2836,8 @@ class SafeValueImpl {
2794
2836
  * @param {?} changingThisBreaksApplicationSecurity
2795
2837
  */
2796
2838
  constructor(changingThisBreaksApplicationSecurity) {
2797
- // empty
2798
2839
  this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;
2840
+ // empty
2799
2841
  }
2800
2842
  /**
2801
2843
  * @return {?}
@@ -2838,7 +2880,7 @@ class SafeResourceUrlImpl extends SafeValueImpl {
2838
2880
 
2839
2881
  /**
2840
2882
  * @fileoverview added by tsickle
2841
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2883
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2842
2884
  */
2843
2885
  /** @type {?} */
2844
2886
  const INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
@@ -2847,19 +2889,21 @@ const INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
2847
2889
  { provide: PlatformLocation, useClass: BrowserPlatformLocation, deps: [DOCUMENT$1] },
2848
2890
  { provide: DOCUMENT$1, useFactory: _document, deps: [] },
2849
2891
  ];
2850
- /** *
2892
+ /**
2851
2893
  * \@security Replacing built-in sanitization providers exposes the application to XSS risks.
2852
2894
  * Attacker-controlled data introduced by an unsanitized provider could expose your
2853
2895
  * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).
2854
2896
  * \@publicApi
2855
- @type {?} */
2897
+ * @type {?}
2898
+ */
2856
2899
  const BROWSER_SANITIZATION_PROVIDERS = [
2857
2900
  { provide: Sanitizer, useExisting: DomSanitizer },
2858
2901
  { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [DOCUMENT$1] },
2859
2902
  ];
2860
- /** *
2903
+ /**
2861
2904
  * \@publicApi
2862
- @type {?} */
2905
+ * @type {?}
2906
+ */
2863
2907
  const platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);
2864
2908
  /**
2865
2909
  * @return {?}
@@ -2958,7 +3002,7 @@ BrowserModule.ctorParameters = () => [
2958
3002
 
2959
3003
  /**
2960
3004
  * @fileoverview added by tsickle
2961
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3005
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2962
3006
  */
2963
3007
  /**
2964
3008
  * Factory to create Meta service.
@@ -3022,7 +3066,7 @@ class Meta {
3022
3066
  if (!attrSelector)
3023
3067
  return [];
3024
3068
  /** @type {?} */
3025
- const list = this._dom.querySelectorAll(this._doc, `meta[${attrSelector}]`);
3069
+ const list /*NodeList*/ = this._dom.querySelectorAll(this._doc, `meta[${attrSelector}]`);
3026
3070
  return list ? [].slice.call(list) : [];
3027
3071
  }
3028
3072
  /**
@@ -3035,7 +3079,7 @@ class Meta {
3035
3079
  return null;
3036
3080
  selector = selector || this._parseSelector(tag);
3037
3081
  /** @type {?} */
3038
- const meta = /** @type {?} */ ((this.getTag(selector)));
3082
+ const meta = (/** @type {?} */ (this.getTag(selector)));
3039
3083
  if (meta) {
3040
3084
  return this._setMetaElementAttributes(tag, meta);
3041
3085
  }
@@ -3045,7 +3089,7 @@ class Meta {
3045
3089
  * @param {?} attrSelector
3046
3090
  * @return {?}
3047
3091
  */
3048
- removeTag(attrSelector) { this.removeTagElement(/** @type {?} */ ((this.getTag(attrSelector)))); }
3092
+ removeTag(attrSelector) { this.removeTagElement((/** @type {?} */ (this.getTag(attrSelector)))); }
3049
3093
  /**
3050
3094
  * @param {?} meta
3051
3095
  * @return {?}
@@ -3056,6 +3100,7 @@ class Meta {
3056
3100
  }
3057
3101
  }
3058
3102
  /**
3103
+ * @private
3059
3104
  * @param {?} meta
3060
3105
  * @param {?=} forceCreation
3061
3106
  * @return {?}
@@ -3065,7 +3110,7 @@ class Meta {
3065
3110
  /** @type {?} */
3066
3111
  const selector = this._parseSelector(meta);
3067
3112
  /** @type {?} */
3068
- const elem = /** @type {?} */ ((this.getTag(selector)));
3113
+ const elem = (/** @type {?} */ (this.getTag(selector)));
3069
3114
  // It's allowed to have multiple elements with the same name so it's not enough to
3070
3115
  // just check that element with the same name already present on the page. We also need to
3071
3116
  // check if element has tag attributes
@@ -3073,7 +3118,7 @@ class Meta {
3073
3118
  return elem;
3074
3119
  }
3075
3120
  /** @type {?} */
3076
- const element = /** @type {?} */ (this._dom.createElement('meta'));
3121
+ const element = (/** @type {?} */ (this._dom.createElement('meta')));
3077
3122
  this._setMetaElementAttributes(meta, element);
3078
3123
  /** @type {?} */
3079
3124
  const head = this._dom.getElementsByTagName(this._doc, 'head')[0];
@@ -3081,6 +3126,7 @@ class Meta {
3081
3126
  return element;
3082
3127
  }
3083
3128
  /**
3129
+ * @private
3084
3130
  * @param {?} tag
3085
3131
  * @param {?} el
3086
3132
  * @return {?}
@@ -3090,6 +3136,7 @@ class Meta {
3090
3136
  return el;
3091
3137
  }
3092
3138
  /**
3139
+ * @private
3093
3140
  * @param {?} tag
3094
3141
  * @return {?}
3095
3142
  */
@@ -3099,6 +3146,7 @@ class Meta {
3099
3146
  return `${attr}="${tag[attr]}"`;
3100
3147
  }
3101
3148
  /**
3149
+ * @private
3102
3150
  * @param {?} tag
3103
3151
  * @param {?} elem
3104
3152
  * @return {?}
@@ -3118,7 +3166,7 @@ Meta.ctorParameters = () => [
3118
3166
 
3119
3167
  /**
3120
3168
  * @fileoverview added by tsickle
3121
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3169
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3122
3170
  */
3123
3171
  /**
3124
3172
  * Factory to create Title service.
@@ -3167,7 +3215,7 @@ Title.ctorParameters = () => [
3167
3215
 
3168
3216
  /**
3169
3217
  * @fileoverview added by tsickle
3170
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3218
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3171
3219
  */
3172
3220
  /**
3173
3221
  * @license
@@ -3177,11 +3225,11 @@ Title.ctorParameters = () => [
3177
3225
  * found in the LICENSE file at https://angular.io/license
3178
3226
  */
3179
3227
  /** @type {?} */
3180
- const win = typeof window !== 'undefined' && window || /** @type {?} */ ({});
3228
+ const win = typeof window !== 'undefined' && window || (/** @type {?} */ ({}));
3181
3229
 
3182
3230
  /**
3183
3231
  * @fileoverview added by tsickle
3184
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3232
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3185
3233
  */
3186
3234
  class ChangeDetectionPerfRecord {
3187
3235
  /**
@@ -3202,6 +3250,7 @@ class AngularProfiler {
3202
3250
  * @param {?} ref
3203
3251
  */
3204
3252
  constructor(ref) { this.appRef = ref.injector.get(ApplicationRef); }
3253
+ // tslint:disable:no-console
3205
3254
  /**
3206
3255
  * Exercises change detection in a loop and then prints the average amount of
3207
3256
  * time in milliseconds how long a single round of change detection takes for
@@ -3225,6 +3274,7 @@ class AngularProfiler {
3225
3274
  const record = config && config['record'];
3226
3275
  /** @type {?} */
3227
3276
  const profileName = 'Change Detection';
3277
+ // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened
3228
3278
  /** @type {?} */
3229
3279
  const isProfilerAvailable = win.console.profile != null;
3230
3280
  if (record && isProfilerAvailable) {
@@ -3253,7 +3303,7 @@ class AngularProfiler {
3253
3303
 
3254
3304
  /**
3255
3305
  * @fileoverview added by tsickle
3256
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3306
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3257
3307
  */
3258
3308
  /** @type {?} */
3259
3309
  const PROFILER_GLOBAL_NAME = 'profiler';
@@ -3289,7 +3339,7 @@ function disableDebugTools() {
3289
3339
 
3290
3340
  /**
3291
3341
  * @fileoverview added by tsickle
3292
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3342
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3293
3343
  */
3294
3344
  /**
3295
3345
  * @param {?} text
@@ -3339,7 +3389,7 @@ function unescapeHtml(text) {
3339
3389
  * @return {?}
3340
3390
  */
3341
3391
  function makeStateKey(key) {
3342
- return /** @type {?} */ (key);
3392
+ return (/** @type {?} */ (key));
3343
3393
  }
3344
3394
  /**
3345
3395
  * A key value store that is transferred from the application on the server side to the application
@@ -3378,7 +3428,7 @@ class TransferState {
3378
3428
  * @return {?}
3379
3429
  */
3380
3430
  get(key, defaultValue) {
3381
- return this.store[key] !== undefined ? /** @type {?} */ (this.store[key]) : defaultValue;
3431
+ return this.store[key] !== undefined ? (/** @type {?} */ (this.store[key])) : defaultValue;
3382
3432
  }
3383
3433
  /**
3384
3434
  * Set the value corresponding to a key.
@@ -3440,6 +3490,8 @@ TransferState.decorators = [
3440
3490
  * @return {?}
3441
3491
  */
3442
3492
  function initTransferState(doc, appId) {
3493
+ // Locate the script tag with the JSON data transferred from the server.
3494
+ // The id of the script tag is set to the Angular appId + 'state'.
3443
3495
  /** @type {?} */
3444
3496
  const script = doc.getElementById(appId + '-state');
3445
3497
  /** @type {?} */
@@ -3470,7 +3522,7 @@ BrowserTransferStateModule.decorators = [
3470
3522
 
3471
3523
  /**
3472
3524
  * @fileoverview added by tsickle
3473
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3525
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3474
3526
  */
3475
3527
  /**
3476
3528
  * Predicates for use with {\@link DebugElement}'s query functions.
@@ -3516,38 +3568,38 @@ class By {
3516
3568
  * @return {?}
3517
3569
  */
3518
3570
  static directive(type) {
3519
- return (debugElement) => /** @type {?} */ ((debugElement.providerTokens)).indexOf(type) !== -1;
3571
+ return (debugElement) => (/** @type {?} */ (debugElement.providerTokens)).indexOf(type) !== -1;
3520
3572
  }
3521
3573
  }
3522
3574
 
3523
3575
  /**
3524
3576
  * @fileoverview added by tsickle
3525
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3577
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3526
3578
  */
3527
3579
 
3528
3580
  /**
3529
3581
  * @fileoverview added by tsickle
3530
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3582
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3531
3583
  */
3532
- /** *
3584
+ /**
3533
3585
  * \@publicApi
3534
- @type {?} */
3535
- const VERSION = new Version('7.2.0-beta.0');
3586
+ * @type {?}
3587
+ */
3588
+ const VERSION = new Version('7.2.0');
3536
3589
 
3537
3590
  /**
3538
3591
  * @fileoverview added by tsickle
3539
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3592
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3540
3593
  */
3541
3594
 
3542
3595
  /**
3543
3596
  * @fileoverview added by tsickle
3544
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3597
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3545
3598
  */
3546
- // This file only reexports content of the `src` folder. Keep it that way.
3547
3599
 
3548
3600
  /**
3549
3601
  * @fileoverview added by tsickle
3550
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
3602
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3551
3603
  */
3552
3604
 
3553
3605
  /**