@angular/core 15.0.1 → 15.0.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.
- package/esm2020/src/di/create_injector.mjs +1 -1
- package/esm2020/src/render/api.mjs +1 -3
- package/esm2020/src/render3/assert.mjs +1 -10
- package/esm2020/src/render3/component_ref.mjs +1 -12
- package/esm2020/src/render3/index.mjs +2 -2
- package/esm2020/src/render3/instructions/shared.mjs +95 -169
- package/esm2020/src/render3/interfaces/view.mjs +1 -10
- package/esm2020/src/render3/namespaces.mjs +1 -8
- package/esm2020/src/render3/node_manipulation.mjs +3 -7
- package/esm2020/src/render3/node_selector_matcher.mjs +1 -4
- package/esm2020/src/render3/query.mjs +1 -6
- package/esm2020/src/render3/state.mjs +1 -4
- package/esm2020/src/render3/util/discovery_utils.mjs +3 -32
- package/esm2020/src/render3/util/view_utils.mjs +1 -15
- package/esm2020/src/util/array_utils.mjs +3 -71
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/fesm2015/core.mjs +270 -1248
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +273 -1251
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +270 -1248
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +273 -1251
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +1 -222
- package/package.json +1 -1
- package/testing/index.d.ts +1 -1
- package/esm2020/src/render3/instructions/lview_debug.mjs +0 -684
- package/esm2020/src/util/named_array_type.mjs +0 -40
package/fesm2020/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.
|
|
2
|
+
* @license Angular v15.0.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1444,18 +1444,9 @@ const EMBEDDED_VIEW_INJECTOR = 21;
|
|
|
1444
1444
|
* there should be no need to refer to `HEADER_OFFSET` anywhere else.
|
|
1445
1445
|
*/
|
|
1446
1446
|
const HEADER_OFFSET = 22;
|
|
1447
|
-
/**
|
|
1448
|
-
* Converts `TViewType` into human readable text.
|
|
1449
|
-
* Make sure this matches with `TViewType`
|
|
1450
|
-
*/
|
|
1451
|
-
const TViewTypeAsString = [
|
|
1452
|
-
'Root',
|
|
1453
|
-
'Component',
|
|
1454
|
-
'Embedded', // 2
|
|
1455
|
-
];
|
|
1456
1447
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
1457
1448
|
// failure based on types.
|
|
1458
|
-
const unusedValueExportToPlacateAjd$
|
|
1449
|
+
const unusedValueExportToPlacateAjd$4 = 1;
|
|
1459
1450
|
|
|
1460
1451
|
/**
|
|
1461
1452
|
* @license
|
|
@@ -1500,7 +1491,7 @@ const MOVED_VIEWS = 9;
|
|
|
1500
1491
|
const CONTAINER_HEADER_OFFSET = 10;
|
|
1501
1492
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
1502
1493
|
// failure based on types.
|
|
1503
|
-
const unusedValueExportToPlacateAjd$
|
|
1494
|
+
const unusedValueExportToPlacateAjd$3 = 1;
|
|
1504
1495
|
|
|
1505
1496
|
/**
|
|
1506
1497
|
* @license
|
|
@@ -1585,11 +1576,6 @@ function assertHasParent(tNode) {
|
|
|
1585
1576
|
assertDefined(tNode, 'currentTNode should exist!');
|
|
1586
1577
|
assertDefined(tNode.parent, 'currentTNode should have a parent');
|
|
1587
1578
|
}
|
|
1588
|
-
function assertDataNext(lView, index, arr) {
|
|
1589
|
-
if (arr == null)
|
|
1590
|
-
arr = lView;
|
|
1591
|
-
assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);
|
|
1592
|
-
}
|
|
1593
1579
|
function assertLContainer(value) {
|
|
1594
1580
|
assertDefined(value, 'LContainer must be defined');
|
|
1595
1581
|
assertEqual(isLContainer(value), true, 'Expecting LContainer');
|
|
@@ -1620,10 +1606,6 @@ function assertIndexInDeclRange(lView, index) {
|
|
|
1620
1606
|
const tView = lView[1];
|
|
1621
1607
|
assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);
|
|
1622
1608
|
}
|
|
1623
|
-
function assertIndexInVarsRange(lView, index) {
|
|
1624
|
-
const tView = lView[1];
|
|
1625
|
-
assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);
|
|
1626
|
-
}
|
|
1627
1609
|
function assertIndexInExpandoRange(lView, index) {
|
|
1628
1610
|
const tView = lView[1];
|
|
1629
1611
|
assertBetween(tView.expandoStartIndex, lView.length, index);
|
|
@@ -1842,14 +1824,7 @@ const profiler = function (event, instance, hookOrListener) {
|
|
|
1842
1824
|
* found in the LICENSE file at https://angular.io/license
|
|
1843
1825
|
*/
|
|
1844
1826
|
const SVG_NAMESPACE = 'svg';
|
|
1845
|
-
const SVG_NAMESPACE_URI = 'http://www.w3.org/2000/svg';
|
|
1846
1827
|
const MATH_ML_NAMESPACE = 'math';
|
|
1847
|
-
const MATH_ML_NAMESPACE_URI = 'http://www.w3.org/1998/MathML/';
|
|
1848
|
-
function getNamespaceUri(namespace) {
|
|
1849
|
-
const name = namespace.toLowerCase();
|
|
1850
|
-
return name === SVG_NAMESPACE ? SVG_NAMESPACE_URI :
|
|
1851
|
-
(name === MATH_ML_NAMESPACE ? MATH_ML_NAMESPACE_URI : null);
|
|
1852
|
-
}
|
|
1853
1828
|
|
|
1854
1829
|
/**
|
|
1855
1830
|
* @license
|
|
@@ -1898,20 +1873,6 @@ function unwrapLView(value) {
|
|
|
1898
1873
|
}
|
|
1899
1874
|
return null;
|
|
1900
1875
|
}
|
|
1901
|
-
/**
|
|
1902
|
-
* Returns `LContainer` or `null` if not found.
|
|
1903
|
-
* @param value wrapped value of `RNode`, `LView`, `LContainer`
|
|
1904
|
-
*/
|
|
1905
|
-
function unwrapLContainer(value) {
|
|
1906
|
-
while (Array.isArray(value)) {
|
|
1907
|
-
// This check is same as `isLContainer()` but we don't call at as we don't want to call
|
|
1908
|
-
// `Array.isArray()` twice and give JITer more work for inlining.
|
|
1909
|
-
if (value[TYPE] === true)
|
|
1910
|
-
return value;
|
|
1911
|
-
value = value[HOST];
|
|
1912
|
-
}
|
|
1913
|
-
return null;
|
|
1914
|
-
}
|
|
1915
1876
|
/**
|
|
1916
1877
|
* Retrieves an element value from the provided `viewData`, by unwrapping
|
|
1917
1878
|
* from any containers, component views, or style contexts.
|
|
@@ -2171,9 +2132,6 @@ function isCurrentTNodeParent() {
|
|
|
2171
2132
|
function setCurrentTNodeAsNotParent() {
|
|
2172
2133
|
instructionState.lFrame.isParent = false;
|
|
2173
2134
|
}
|
|
2174
|
-
function setCurrentTNodeAsParent() {
|
|
2175
|
-
instructionState.lFrame.isParent = true;
|
|
2176
|
-
}
|
|
2177
2135
|
function getContextLView() {
|
|
2178
2136
|
const contextLView = instructionState.lFrame.contextLView;
|
|
2179
2137
|
ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');
|
|
@@ -2896,7 +2854,7 @@ function isFactory(obj) {
|
|
|
2896
2854
|
}
|
|
2897
2855
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2898
2856
|
// failure based on types.
|
|
2899
|
-
const unusedValueExportToPlacateAjd$
|
|
2857
|
+
const unusedValueExportToPlacateAjd$2 = 1;
|
|
2900
2858
|
|
|
2901
2859
|
/**
|
|
2902
2860
|
* Converts `TNodeType` into human readable text.
|
|
@@ -2915,7 +2873,7 @@ function toTNodeTypeAsString(tNodeType) {
|
|
|
2915
2873
|
}
|
|
2916
2874
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2917
2875
|
// failure based on types.
|
|
2918
|
-
const unusedValueExportToPlacateAjd$
|
|
2876
|
+
const unusedValueExportToPlacateAjd$1 = 1;
|
|
2919
2877
|
/**
|
|
2920
2878
|
* Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.
|
|
2921
2879
|
*
|
|
@@ -4412,17 +4370,6 @@ function isType(v) {
|
|
|
4412
4370
|
* Use of this source code is governed by an MIT-style license that can be
|
|
4413
4371
|
* found in the LICENSE file at https://angular.io/license
|
|
4414
4372
|
*/
|
|
4415
|
-
/**
|
|
4416
|
-
* Equivalent to ES6 spread, add each item to an array.
|
|
4417
|
-
*
|
|
4418
|
-
* @param items The items to add
|
|
4419
|
-
* @param arr The array to which you want to add the items
|
|
4420
|
-
*/
|
|
4421
|
-
function addAllToArray(items, arr) {
|
|
4422
|
-
for (let i = 0; i < items.length; i++) {
|
|
4423
|
-
arr.push(items[i]);
|
|
4424
|
-
}
|
|
4425
|
-
}
|
|
4426
4373
|
/**
|
|
4427
4374
|
* Determines if the contents of two arrays is identical
|
|
4428
4375
|
*
|
|
@@ -4450,25 +4397,8 @@ function arrayEquals(a, b, identityAccessor) {
|
|
|
4450
4397
|
/**
|
|
4451
4398
|
* Flattens an array.
|
|
4452
4399
|
*/
|
|
4453
|
-
function flatten(list
|
|
4454
|
-
|
|
4455
|
-
dst = list;
|
|
4456
|
-
for (let i = 0; i < list.length; i++) {
|
|
4457
|
-
let item = list[i];
|
|
4458
|
-
if (Array.isArray(item)) {
|
|
4459
|
-
// we need to inline it.
|
|
4460
|
-
if (dst === list) {
|
|
4461
|
-
// Our assumption that the list was already flat was wrong and
|
|
4462
|
-
// we need to clone flat since we need to write to it.
|
|
4463
|
-
dst = list.slice(0, i);
|
|
4464
|
-
}
|
|
4465
|
-
flatten(item, dst);
|
|
4466
|
-
}
|
|
4467
|
-
else if (dst !== list) {
|
|
4468
|
-
dst.push(item);
|
|
4469
|
-
}
|
|
4470
|
-
}
|
|
4471
|
-
return dst;
|
|
4400
|
+
function flatten(list) {
|
|
4401
|
+
return list.flat(Number.POSITIVE_INFINITY);
|
|
4472
4402
|
}
|
|
4473
4403
|
function deepForEach(input, fn) {
|
|
4474
4404
|
input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));
|
|
@@ -4578,46 +4508,6 @@ function arrayInsert2(array, index, value1, value2) {
|
|
|
4578
4508
|
array[index + 1] = value2;
|
|
4579
4509
|
}
|
|
4580
4510
|
}
|
|
4581
|
-
/**
|
|
4582
|
-
* Insert a `value` into an `array` so that the array remains sorted.
|
|
4583
|
-
*
|
|
4584
|
-
* NOTE:
|
|
4585
|
-
* - Duplicates are not allowed, and are ignored.
|
|
4586
|
-
* - This uses binary search algorithm for fast inserts.
|
|
4587
|
-
*
|
|
4588
|
-
* @param array A sorted array to insert into.
|
|
4589
|
-
* @param value The value to insert.
|
|
4590
|
-
* @returns index of the inserted value.
|
|
4591
|
-
*/
|
|
4592
|
-
function arrayInsertSorted(array, value) {
|
|
4593
|
-
let index = arrayIndexOfSorted(array, value);
|
|
4594
|
-
if (index < 0) {
|
|
4595
|
-
// if we did not find it insert it.
|
|
4596
|
-
index = ~index;
|
|
4597
|
-
arrayInsert(array, index, value);
|
|
4598
|
-
}
|
|
4599
|
-
return index;
|
|
4600
|
-
}
|
|
4601
|
-
/**
|
|
4602
|
-
* Remove `value` from a sorted `array`.
|
|
4603
|
-
*
|
|
4604
|
-
* NOTE:
|
|
4605
|
-
* - This uses binary search algorithm for fast removals.
|
|
4606
|
-
*
|
|
4607
|
-
* @param array A sorted array to remove from.
|
|
4608
|
-
* @param value The value to remove.
|
|
4609
|
-
* @returns index of the removed value.
|
|
4610
|
-
* - positive index if value found and removed.
|
|
4611
|
-
* - negative index if value not found. (`~index` to get the value where it should have been
|
|
4612
|
-
* inserted)
|
|
4613
|
-
*/
|
|
4614
|
-
function arrayRemoveSorted(array, value) {
|
|
4615
|
-
const index = arrayIndexOfSorted(array, value);
|
|
4616
|
-
if (index >= 0) {
|
|
4617
|
-
arraySplice(array, index, 1);
|
|
4618
|
-
}
|
|
4619
|
-
return index;
|
|
4620
|
-
}
|
|
4621
4511
|
/**
|
|
4622
4512
|
* Get an index of an `value` in a sorted `array`.
|
|
4623
4513
|
*
|
|
@@ -6069,28 +5959,6 @@ function ensureIcuContainerVisitorLoaded(loader) {
|
|
|
6069
5959
|
}
|
|
6070
5960
|
}
|
|
6071
5961
|
|
|
6072
|
-
/**
|
|
6073
|
-
* @license
|
|
6074
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6075
|
-
*
|
|
6076
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6077
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6078
|
-
*/
|
|
6079
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6080
|
-
// failure based on types.
|
|
6081
|
-
const unusedValueExportToPlacateAjd$4 = 1;
|
|
6082
|
-
|
|
6083
|
-
/**
|
|
6084
|
-
* @license
|
|
6085
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6086
|
-
*
|
|
6087
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6088
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6089
|
-
*/
|
|
6090
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6091
|
-
// failure based on types.
|
|
6092
|
-
const unusedValueExportToPlacateAjd$3 = 1;
|
|
6093
|
-
|
|
6094
5962
|
/**
|
|
6095
5963
|
* @license
|
|
6096
5964
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6162,7 +6030,6 @@ function getNearestLContainer(viewOrContainer) {
|
|
|
6162
6030
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6163
6031
|
* found in the LICENSE file at https://angular.io/license
|
|
6164
6032
|
*/
|
|
6165
|
-
const unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$8;
|
|
6166
6033
|
/**
|
|
6167
6034
|
* NOTE: for performance reasons, the possible actions are inlined within the function instead of
|
|
6168
6035
|
* being passed as an argument.
|
|
@@ -9055,7 +8922,6 @@ function unwrapElementRef(value) {
|
|
|
9055
8922
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9056
8923
|
* found in the LICENSE file at https://angular.io/license
|
|
9057
8924
|
*/
|
|
9058
|
-
const Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');
|
|
9059
8925
|
/**
|
|
9060
8926
|
* Creates and initializes a custom renderer that implements the `Renderer2` base class.
|
|
9061
8927
|
*
|
|
@@ -9139,7 +9005,7 @@ class Version {
|
|
|
9139
9005
|
/**
|
|
9140
9006
|
* @publicApi
|
|
9141
9007
|
*/
|
|
9142
|
-
const VERSION = new Version('15.0.
|
|
9008
|
+
const VERSION = new Version('15.0.3');
|
|
9143
9009
|
|
|
9144
9010
|
/**
|
|
9145
9011
|
* @license
|
|
@@ -9460,7 +9326,6 @@ function classIndexOf(className, classToSearch, startingIndex) {
|
|
|
9460
9326
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9461
9327
|
* found in the LICENSE file at https://angular.io/license
|
|
9462
9328
|
*/
|
|
9463
|
-
const unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4;
|
|
9464
9329
|
const NG_TEMPLATE_SELECTOR = 'ng-template';
|
|
9465
9330
|
/**
|
|
9466
9331
|
* Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)
|
|
@@ -10896,901 +10761,95 @@ class ReflectiveInjector_ {
|
|
|
10896
10761
|
}
|
|
10897
10762
|
/** @internal */
|
|
10898
10763
|
_getByKeyDefault(key, notFoundValue, visibility) {
|
|
10899
|
-
let inj;
|
|
10900
|
-
if (visibility instanceof SkipSelf) {
|
|
10901
|
-
inj = this.parent;
|
|
10902
|
-
}
|
|
10903
|
-
else {
|
|
10904
|
-
inj = this;
|
|
10905
|
-
}
|
|
10906
|
-
while (inj instanceof ReflectiveInjector_) {
|
|
10907
|
-
const inj_ = inj;
|
|
10908
|
-
const obj = inj_._getObjByKeyId(key.id);
|
|
10909
|
-
if (obj !== UNDEFINED)
|
|
10910
|
-
return obj;
|
|
10911
|
-
inj = inj_.parent;
|
|
10912
|
-
}
|
|
10913
|
-
if (inj !== null) {
|
|
10914
|
-
return inj.get(key.token, notFoundValue);
|
|
10915
|
-
}
|
|
10916
|
-
else {
|
|
10917
|
-
return this._throwOrNull(key, notFoundValue);
|
|
10918
|
-
}
|
|
10919
|
-
}
|
|
10920
|
-
get displayName() {
|
|
10921
|
-
const providers = _mapProviders(this, (b) => ' "' + b.key.displayName + '" ')
|
|
10922
|
-
.join(', ');
|
|
10923
|
-
return `ReflectiveInjector(providers: [${providers}])`;
|
|
10924
|
-
}
|
|
10925
|
-
toString() {
|
|
10926
|
-
return this.displayName;
|
|
10927
|
-
}
|
|
10928
|
-
}
|
|
10929
|
-
ReflectiveInjector_.INJECTOR_KEY = ( /* @__PURE__ */ReflectiveKey.get(Injector));
|
|
10930
|
-
function _mapProviders(injector, fn) {
|
|
10931
|
-
const res = [];
|
|
10932
|
-
for (let i = 0; i < injector._providers.length; ++i) {
|
|
10933
|
-
res[i] = fn(injector.getProviderAtIndex(i));
|
|
10934
|
-
}
|
|
10935
|
-
return res;
|
|
10936
|
-
}
|
|
10937
|
-
|
|
10938
|
-
/**
|
|
10939
|
-
* @license
|
|
10940
|
-
* Copyright Google LLC All Rights Reserved.
|
|
10941
|
-
*
|
|
10942
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
10943
|
-
* found in the LICENSE file at https://angular.io/license
|
|
10944
|
-
*/
|
|
10945
|
-
|
|
10946
|
-
/**
|
|
10947
|
-
* @license
|
|
10948
|
-
* Copyright Google LLC All Rights Reserved.
|
|
10949
|
-
*
|
|
10950
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
10951
|
-
* found in the LICENSE file at https://angular.io/license
|
|
10952
|
-
*/
|
|
10953
|
-
|
|
10954
|
-
/**
|
|
10955
|
-
* @license
|
|
10956
|
-
* Copyright Google LLC All Rights Reserved.
|
|
10957
|
-
*
|
|
10958
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
10959
|
-
* found in the LICENSE file at https://angular.io/license
|
|
10960
|
-
*/
|
|
10961
|
-
function ɵɵdirectiveInject(token, flags = InjectFlags.Default) {
|
|
10962
|
-
const lView = getLView();
|
|
10963
|
-
// Fall back to inject() if view hasn't been created. This situation can happen in tests
|
|
10964
|
-
// if inject utilities are used before bootstrapping.
|
|
10965
|
-
if (lView === null) {
|
|
10966
|
-
// Verify that we will not get into infinite loop.
|
|
10967
|
-
ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);
|
|
10968
|
-
return ɵɵinject(token, flags);
|
|
10969
|
-
}
|
|
10970
|
-
const tNode = getCurrentTNode();
|
|
10971
|
-
return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);
|
|
10972
|
-
}
|
|
10973
|
-
/**
|
|
10974
|
-
* Throws an error indicating that a factory function could not be generated by the compiler for a
|
|
10975
|
-
* particular class.
|
|
10976
|
-
*
|
|
10977
|
-
* This instruction allows the actual error message to be optimized away when ngDevMode is turned
|
|
10978
|
-
* off, saving bytes of generated code while still providing a good experience in dev mode.
|
|
10979
|
-
*
|
|
10980
|
-
* The name of the class is not mentioned here, but will be in the generated factory function name
|
|
10981
|
-
* and thus in the stack trace.
|
|
10982
|
-
*
|
|
10983
|
-
* @codeGenApi
|
|
10984
|
-
*/
|
|
10985
|
-
function ɵɵinvalidFactory() {
|
|
10986
|
-
const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';
|
|
10987
|
-
throw new Error(msg);
|
|
10988
|
-
}
|
|
10989
|
-
|
|
10990
|
-
/**
|
|
10991
|
-
* @license
|
|
10992
|
-
* Copyright Google LLC All Rights Reserved.
|
|
10993
|
-
*
|
|
10994
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
10995
|
-
* found in the LICENSE file at https://angular.io/license
|
|
10996
|
-
*/
|
|
10997
|
-
/**
|
|
10998
|
-
* THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!
|
|
10999
|
-
*/
|
|
11000
|
-
/**
|
|
11001
|
-
* Creates an `Array` construction with a given name. This is useful when
|
|
11002
|
-
* looking for memory consumption to see what time of array it is.
|
|
11003
|
-
*
|
|
11004
|
-
*
|
|
11005
|
-
* @param name Name to give to the constructor
|
|
11006
|
-
* @returns A subclass of `Array` if possible. This can only be done in
|
|
11007
|
-
* environments which support `class` construct.
|
|
11008
|
-
*/
|
|
11009
|
-
function createNamedArrayType(name) {
|
|
11010
|
-
// This should never be called in prod mode, so let's verify that is the case.
|
|
11011
|
-
if (ngDevMode) {
|
|
11012
|
-
try {
|
|
11013
|
-
// If this function were compromised the following could lead to arbitrary
|
|
11014
|
-
// script execution. We bless it with Trusted Types anyway since this
|
|
11015
|
-
// function is stripped out of production binaries.
|
|
11016
|
-
return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);
|
|
11017
|
-
}
|
|
11018
|
-
catch (e) {
|
|
11019
|
-
// If it does not work just give up and fall back to regular Array.
|
|
11020
|
-
return Array;
|
|
11021
|
-
}
|
|
11022
|
-
}
|
|
11023
|
-
else {
|
|
11024
|
-
throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code');
|
|
11025
|
-
}
|
|
11026
|
-
}
|
|
11027
|
-
|
|
11028
|
-
/**
|
|
11029
|
-
* @license
|
|
11030
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11031
|
-
*
|
|
11032
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11033
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11034
|
-
*/
|
|
11035
|
-
function toTStylingRange(prev, next) {
|
|
11036
|
-
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11037
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11038
|
-
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11039
|
-
}
|
|
11040
|
-
function getTStylingRangePrev(tStylingRange) {
|
|
11041
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11042
|
-
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
11043
|
-
}
|
|
11044
|
-
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
11045
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11046
|
-
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
11047
|
-
2 /* StylingRange.PREV_DUPLICATE */;
|
|
11048
|
-
}
|
|
11049
|
-
function setTStylingRangePrev(tStylingRange, previous) {
|
|
11050
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11051
|
-
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11052
|
-
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
11053
|
-
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
11054
|
-
}
|
|
11055
|
-
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
11056
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11057
|
-
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
11058
|
-
}
|
|
11059
|
-
function getTStylingRangeNext(tStylingRange) {
|
|
11060
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11061
|
-
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
11062
|
-
}
|
|
11063
|
-
function setTStylingRangeNext(tStylingRange, next) {
|
|
11064
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11065
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11066
|
-
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
11067
|
-
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11068
|
-
}
|
|
11069
|
-
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
11070
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11071
|
-
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
11072
|
-
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
11073
|
-
}
|
|
11074
|
-
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
11075
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11076
|
-
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
11077
|
-
}
|
|
11078
|
-
function getTStylingRangeTail(tStylingRange) {
|
|
11079
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11080
|
-
const next = getTStylingRangeNext(tStylingRange);
|
|
11081
|
-
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
11082
|
-
}
|
|
11083
|
-
|
|
11084
|
-
/**
|
|
11085
|
-
* @license
|
|
11086
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11087
|
-
*
|
|
11088
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11089
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11090
|
-
*/
|
|
11091
|
-
/**
|
|
11092
|
-
* Patch a `debug` property on top of the existing object.
|
|
11093
|
-
*
|
|
11094
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11095
|
-
*
|
|
11096
|
-
* @param obj Object to patch
|
|
11097
|
-
* @param debug Value to patch
|
|
11098
|
-
*/
|
|
11099
|
-
function attachDebugObject(obj, debug) {
|
|
11100
|
-
if (ngDevMode) {
|
|
11101
|
-
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
11102
|
-
}
|
|
11103
|
-
else {
|
|
11104
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11105
|
-
}
|
|
11106
|
-
}
|
|
11107
|
-
/**
|
|
11108
|
-
* Patch a `debug` property getter on top of the existing object.
|
|
11109
|
-
*
|
|
11110
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11111
|
-
*
|
|
11112
|
-
* @param obj Object to patch
|
|
11113
|
-
* @param debugGetter Getter returning a value to patch
|
|
11114
|
-
*/
|
|
11115
|
-
function attachDebugGetter(obj, debugGetter) {
|
|
11116
|
-
if (ngDevMode) {
|
|
11117
|
-
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
11118
|
-
}
|
|
11119
|
-
else {
|
|
11120
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11121
|
-
}
|
|
11122
|
-
}
|
|
11123
|
-
|
|
11124
|
-
/**
|
|
11125
|
-
* @license
|
|
11126
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11127
|
-
*
|
|
11128
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11129
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11130
|
-
*/
|
|
11131
|
-
/*
|
|
11132
|
-
* This file contains conditionally attached classes which provide human readable (debug) level
|
|
11133
|
-
* information for `LView`, `LContainer` and other internal data structures. These data structures
|
|
11134
|
-
* are stored internally as array which makes it very difficult during debugging to reason about the
|
|
11135
|
-
* current state of the system.
|
|
11136
|
-
*
|
|
11137
|
-
* Patching the array with extra property does change the array's hidden class' but it does not
|
|
11138
|
-
* change the cost of access, therefore this patching should not have significant if any impact in
|
|
11139
|
-
* `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)
|
|
11140
|
-
*
|
|
11141
|
-
* So instead of seeing:
|
|
11142
|
-
* ```
|
|
11143
|
-
* Array(30) [Object, 659, null, …]
|
|
11144
|
-
* ```
|
|
11145
|
-
*
|
|
11146
|
-
* You get to see:
|
|
11147
|
-
* ```
|
|
11148
|
-
* LViewDebug {
|
|
11149
|
-
* views: [...],
|
|
11150
|
-
* flags: {attached: true, ...}
|
|
11151
|
-
* nodes: [
|
|
11152
|
-
* {html: '<div id="123">', ..., nodes: [
|
|
11153
|
-
* {html: '<span>', ..., nodes: null}
|
|
11154
|
-
* ]}
|
|
11155
|
-
* ]
|
|
11156
|
-
* }
|
|
11157
|
-
* ```
|
|
11158
|
-
*/
|
|
11159
|
-
let LVIEW_COMPONENT_CACHE;
|
|
11160
|
-
let LVIEW_EMBEDDED_CACHE;
|
|
11161
|
-
let LVIEW_ROOT;
|
|
11162
|
-
let LVIEW_COMPONENT;
|
|
11163
|
-
let LVIEW_EMBEDDED;
|
|
11164
|
-
/**
|
|
11165
|
-
* This function clones a blueprint and creates LView.
|
|
11166
|
-
*
|
|
11167
|
-
* Simple slice will keep the same type, and we need it to be LView
|
|
11168
|
-
*/
|
|
11169
|
-
function cloneToLViewFromTViewBlueprint(tView) {
|
|
11170
|
-
const debugTView = tView;
|
|
11171
|
-
const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);
|
|
11172
|
-
return lView.concat(tView.blueprint);
|
|
11173
|
-
}
|
|
11174
|
-
class LRootView extends Array {
|
|
11175
|
-
}
|
|
11176
|
-
class LComponentView extends Array {
|
|
11177
|
-
}
|
|
11178
|
-
class LEmbeddedView extends Array {
|
|
11179
|
-
}
|
|
11180
|
-
function getLViewToClone(type, name) {
|
|
11181
|
-
switch (type) {
|
|
11182
|
-
case 0 /* TViewType.Root */:
|
|
11183
|
-
if (LVIEW_ROOT === undefined)
|
|
11184
|
-
LVIEW_ROOT = new LRootView();
|
|
11185
|
-
return LVIEW_ROOT;
|
|
11186
|
-
case 1 /* TViewType.Component */:
|
|
11187
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11188
|
-
if (LVIEW_COMPONENT === undefined)
|
|
11189
|
-
LVIEW_COMPONENT = new LComponentView();
|
|
11190
|
-
return LVIEW_COMPONENT;
|
|
11191
|
-
}
|
|
11192
|
-
if (LVIEW_COMPONENT_CACHE === undefined)
|
|
11193
|
-
LVIEW_COMPONENT_CACHE = new Map();
|
|
11194
|
-
let componentArray = LVIEW_COMPONENT_CACHE.get(name);
|
|
11195
|
-
if (componentArray === undefined) {
|
|
11196
|
-
componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();
|
|
11197
|
-
LVIEW_COMPONENT_CACHE.set(name, componentArray);
|
|
11198
|
-
}
|
|
11199
|
-
return componentArray;
|
|
11200
|
-
case 2 /* TViewType.Embedded */:
|
|
11201
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11202
|
-
if (LVIEW_EMBEDDED === undefined)
|
|
11203
|
-
LVIEW_EMBEDDED = new LEmbeddedView();
|
|
11204
|
-
return LVIEW_EMBEDDED;
|
|
11205
|
-
}
|
|
11206
|
-
if (LVIEW_EMBEDDED_CACHE === undefined)
|
|
11207
|
-
LVIEW_EMBEDDED_CACHE = new Map();
|
|
11208
|
-
let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);
|
|
11209
|
-
if (embeddedArray === undefined) {
|
|
11210
|
-
embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();
|
|
11211
|
-
LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);
|
|
11212
|
-
}
|
|
11213
|
-
return embeddedArray;
|
|
11214
|
-
}
|
|
11215
|
-
}
|
|
11216
|
-
function nameSuffix(text) {
|
|
11217
|
-
if (text == null)
|
|
11218
|
-
return '';
|
|
11219
|
-
const index = text.lastIndexOf('_Template');
|
|
11220
|
-
return '_' + (index === -1 ? text : text.slice(0, index));
|
|
11221
|
-
}
|
|
11222
|
-
/**
|
|
11223
|
-
* This class is a debug version of Object literal so that we can have constructor name show up
|
|
11224
|
-
* in
|
|
11225
|
-
* debug tools in ngDevMode.
|
|
11226
|
-
*/
|
|
11227
|
-
const TViewConstructor = class TView {
|
|
11228
|
-
constructor(type, blueprint, template, queries, viewQuery, declTNode, data, bindingStartIndex, expandoStartIndex, hostBindingOpCodes, firstCreatePass, firstUpdatePass, staticViewQueries, staticContentQueries, preOrderHooks, preOrderCheckHooks, contentHooks, contentCheckHooks, viewHooks, viewCheckHooks, destroyHooks, cleanup, contentQueries, components, directiveRegistry, pipeRegistry, firstChild, schemas, consts, incompleteFirstPass, _decls, _vars) {
|
|
11229
|
-
this.type = type;
|
|
11230
|
-
this.blueprint = blueprint;
|
|
11231
|
-
this.template = template;
|
|
11232
|
-
this.queries = queries;
|
|
11233
|
-
this.viewQuery = viewQuery;
|
|
11234
|
-
this.declTNode = declTNode;
|
|
11235
|
-
this.data = data;
|
|
11236
|
-
this.bindingStartIndex = bindingStartIndex;
|
|
11237
|
-
this.expandoStartIndex = expandoStartIndex;
|
|
11238
|
-
this.hostBindingOpCodes = hostBindingOpCodes;
|
|
11239
|
-
this.firstCreatePass = firstCreatePass;
|
|
11240
|
-
this.firstUpdatePass = firstUpdatePass;
|
|
11241
|
-
this.staticViewQueries = staticViewQueries;
|
|
11242
|
-
this.staticContentQueries = staticContentQueries;
|
|
11243
|
-
this.preOrderHooks = preOrderHooks;
|
|
11244
|
-
this.preOrderCheckHooks = preOrderCheckHooks;
|
|
11245
|
-
this.contentHooks = contentHooks;
|
|
11246
|
-
this.contentCheckHooks = contentCheckHooks;
|
|
11247
|
-
this.viewHooks = viewHooks;
|
|
11248
|
-
this.viewCheckHooks = viewCheckHooks;
|
|
11249
|
-
this.destroyHooks = destroyHooks;
|
|
11250
|
-
this.cleanup = cleanup;
|
|
11251
|
-
this.contentQueries = contentQueries;
|
|
11252
|
-
this.components = components;
|
|
11253
|
-
this.directiveRegistry = directiveRegistry;
|
|
11254
|
-
this.pipeRegistry = pipeRegistry;
|
|
11255
|
-
this.firstChild = firstChild;
|
|
11256
|
-
this.schemas = schemas;
|
|
11257
|
-
this.consts = consts;
|
|
11258
|
-
this.incompleteFirstPass = incompleteFirstPass;
|
|
11259
|
-
this._decls = _decls;
|
|
11260
|
-
this._vars = _vars;
|
|
11261
|
-
}
|
|
11262
|
-
get template_() {
|
|
11263
|
-
const buf = [];
|
|
11264
|
-
processTNodeChildren(this.firstChild, buf);
|
|
11265
|
-
return buf.join('');
|
|
11266
|
-
}
|
|
11267
|
-
get type_() {
|
|
11268
|
-
return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`;
|
|
11269
|
-
}
|
|
11270
|
-
};
|
|
11271
|
-
class TNode {
|
|
11272
|
-
constructor(tView_, //
|
|
11273
|
-
type, //
|
|
11274
|
-
index, //
|
|
11275
|
-
insertBeforeIndex, //
|
|
11276
|
-
injectorIndex, //
|
|
11277
|
-
componentOffset, //
|
|
11278
|
-
directiveStart, //
|
|
11279
|
-
directiveEnd, //
|
|
11280
|
-
directiveStylingLast, //
|
|
11281
|
-
propertyBindings, //
|
|
11282
|
-
flags, //
|
|
11283
|
-
providerIndexes, //
|
|
11284
|
-
value, //
|
|
11285
|
-
attrs, //
|
|
11286
|
-
mergedAttrs, //
|
|
11287
|
-
localNames, //
|
|
11288
|
-
initialInputs, //
|
|
11289
|
-
inputs, //
|
|
11290
|
-
outputs, //
|
|
11291
|
-
tViews, //
|
|
11292
|
-
next, //
|
|
11293
|
-
projectionNext, //
|
|
11294
|
-
child, //
|
|
11295
|
-
parent, //
|
|
11296
|
-
projection, //
|
|
11297
|
-
styles, //
|
|
11298
|
-
stylesWithoutHost, //
|
|
11299
|
-
residualStyles, //
|
|
11300
|
-
classes, //
|
|
11301
|
-
classesWithoutHost, //
|
|
11302
|
-
residualClasses, //
|
|
11303
|
-
classBindings, //
|
|
11304
|
-
styleBindings) {
|
|
11305
|
-
this.tView_ = tView_;
|
|
11306
|
-
this.type = type;
|
|
11307
|
-
this.index = index;
|
|
11308
|
-
this.insertBeforeIndex = insertBeforeIndex;
|
|
11309
|
-
this.injectorIndex = injectorIndex;
|
|
11310
|
-
this.componentOffset = componentOffset;
|
|
11311
|
-
this.directiveStart = directiveStart;
|
|
11312
|
-
this.directiveEnd = directiveEnd;
|
|
11313
|
-
this.directiveStylingLast = directiveStylingLast;
|
|
11314
|
-
this.propertyBindings = propertyBindings;
|
|
11315
|
-
this.flags = flags;
|
|
11316
|
-
this.providerIndexes = providerIndexes;
|
|
11317
|
-
this.value = value;
|
|
11318
|
-
this.attrs = attrs;
|
|
11319
|
-
this.mergedAttrs = mergedAttrs;
|
|
11320
|
-
this.localNames = localNames;
|
|
11321
|
-
this.initialInputs = initialInputs;
|
|
11322
|
-
this.inputs = inputs;
|
|
11323
|
-
this.outputs = outputs;
|
|
11324
|
-
this.tViews = tViews;
|
|
11325
|
-
this.next = next;
|
|
11326
|
-
this.projectionNext = projectionNext;
|
|
11327
|
-
this.child = child;
|
|
11328
|
-
this.parent = parent;
|
|
11329
|
-
this.projection = projection;
|
|
11330
|
-
this.styles = styles;
|
|
11331
|
-
this.stylesWithoutHost = stylesWithoutHost;
|
|
11332
|
-
this.residualStyles = residualStyles;
|
|
11333
|
-
this.classes = classes;
|
|
11334
|
-
this.classesWithoutHost = classesWithoutHost;
|
|
11335
|
-
this.residualClasses = residualClasses;
|
|
11336
|
-
this.classBindings = classBindings;
|
|
11337
|
-
this.styleBindings = styleBindings;
|
|
11338
|
-
}
|
|
11339
|
-
/**
|
|
11340
|
-
* Return a human debug version of the set of `NodeInjector`s which will be consulted when
|
|
11341
|
-
* resolving tokens from this `TNode`.
|
|
11342
|
-
*
|
|
11343
|
-
* When debugging applications, it is often difficult to determine which `NodeInjector`s will be
|
|
11344
|
-
* consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be
|
|
11345
|
-
* consulted in order when resolving a token starting at this `TNode`.
|
|
11346
|
-
*
|
|
11347
|
-
* The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is
|
|
11348
|
-
* difficult to reason about.
|
|
11349
|
-
*
|
|
11350
|
-
* @param lView The `LView` instance for this `TNode`.
|
|
11351
|
-
*/
|
|
11352
|
-
debugNodeInjectorPath(lView) {
|
|
11353
|
-
const path = [];
|
|
11354
|
-
let injectorIndex = getInjectorIndex(this, lView);
|
|
11355
|
-
if (injectorIndex === -1) {
|
|
11356
|
-
// Looks like the current `TNode` does not have `NodeInjector` associated with it => look for
|
|
11357
|
-
// parent NodeInjector.
|
|
11358
|
-
const parentLocation = getParentInjectorLocation(this, lView);
|
|
11359
|
-
if (parentLocation !== NO_PARENT_INJECTOR) {
|
|
11360
|
-
// We found a parent, so start searching from the parent location.
|
|
11361
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11362
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11363
|
-
}
|
|
11364
|
-
else {
|
|
11365
|
-
// No parents have been found, so there are no `NodeInjector`s to consult.
|
|
11366
|
-
}
|
|
11367
|
-
}
|
|
11368
|
-
while (injectorIndex !== -1) {
|
|
11369
|
-
ngDevMode && assertNodeInjector(lView, injectorIndex);
|
|
11370
|
-
const tNode = lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];
|
|
11371
|
-
path.push(buildDebugNode(tNode, lView));
|
|
11372
|
-
const parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];
|
|
11373
|
-
if (parentLocation === NO_PARENT_INJECTOR) {
|
|
11374
|
-
injectorIndex = -1;
|
|
11375
|
-
}
|
|
11376
|
-
else {
|
|
11377
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11378
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11379
|
-
}
|
|
11380
|
-
}
|
|
11381
|
-
return path;
|
|
11382
|
-
}
|
|
11383
|
-
get type_() {
|
|
11384
|
-
return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`;
|
|
11385
|
-
}
|
|
11386
|
-
get flags_() {
|
|
11387
|
-
const flags = [];
|
|
11388
|
-
if (this.flags & 8 /* TNodeFlags.hasClassInput */)
|
|
11389
|
-
flags.push('TNodeFlags.hasClassInput');
|
|
11390
|
-
if (this.flags & 4 /* TNodeFlags.hasContentQuery */)
|
|
11391
|
-
flags.push('TNodeFlags.hasContentQuery');
|
|
11392
|
-
if (this.flags & 16 /* TNodeFlags.hasStyleInput */)
|
|
11393
|
-
flags.push('TNodeFlags.hasStyleInput');
|
|
11394
|
-
if (this.flags & 64 /* TNodeFlags.hasHostBindings */)
|
|
11395
|
-
flags.push('TNodeFlags.hasHostBindings');
|
|
11396
|
-
if (this.flags & 1 /* TNodeFlags.isDirectiveHost */)
|
|
11397
|
-
flags.push('TNodeFlags.isDirectiveHost');
|
|
11398
|
-
if (this.flags & 32 /* TNodeFlags.isDetached */)
|
|
11399
|
-
flags.push('TNodeFlags.isDetached');
|
|
11400
|
-
if (this.flags & 2 /* TNodeFlags.isProjected */)
|
|
11401
|
-
flags.push('TNodeFlags.isProjected');
|
|
11402
|
-
return flags.join('|');
|
|
11403
|
-
}
|
|
11404
|
-
get template_() {
|
|
11405
|
-
if (this.type & 1 /* TNodeType.Text */)
|
|
11406
|
-
return this.value;
|
|
11407
|
-
const buf = [];
|
|
11408
|
-
const tagName = typeof this.value === 'string' && this.value || this.type_;
|
|
11409
|
-
buf.push('<', tagName);
|
|
11410
|
-
if (this.flags) {
|
|
11411
|
-
buf.push(' ', this.flags_);
|
|
11412
|
-
}
|
|
11413
|
-
if (this.attrs) {
|
|
11414
|
-
for (let i = 0; i < this.attrs.length;) {
|
|
11415
|
-
const attrName = this.attrs[i++];
|
|
11416
|
-
if (typeof attrName == 'number') {
|
|
11417
|
-
break;
|
|
11418
|
-
}
|
|
11419
|
-
const attrValue = this.attrs[i++];
|
|
11420
|
-
buf.push(' ', attrName, '="', attrValue, '"');
|
|
11421
|
-
}
|
|
11422
|
-
}
|
|
11423
|
-
buf.push('>');
|
|
11424
|
-
processTNodeChildren(this.child, buf);
|
|
11425
|
-
buf.push('</', tagName, '>');
|
|
11426
|
-
return buf.join('');
|
|
11427
|
-
}
|
|
11428
|
-
get styleBindings_() {
|
|
11429
|
-
return toDebugStyleBinding(this, false);
|
|
11430
|
-
}
|
|
11431
|
-
get classBindings_() {
|
|
11432
|
-
return toDebugStyleBinding(this, true);
|
|
11433
|
-
}
|
|
11434
|
-
get providerIndexStart_() {
|
|
11435
|
-
return this.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;
|
|
11436
|
-
}
|
|
11437
|
-
get providerIndexEnd_() {
|
|
11438
|
-
return this.providerIndexStart_ +
|
|
11439
|
-
(this.providerIndexes >>> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */);
|
|
11440
|
-
}
|
|
11441
|
-
}
|
|
11442
|
-
const TNodeDebug = TNode;
|
|
11443
|
-
function toDebugStyleBinding(tNode, isClassBased) {
|
|
11444
|
-
const tData = tNode.tView_.data;
|
|
11445
|
-
const bindings = [];
|
|
11446
|
-
const range = isClassBased ? tNode.classBindings : tNode.styleBindings;
|
|
11447
|
-
const prev = getTStylingRangePrev(range);
|
|
11448
|
-
const next = getTStylingRangeNext(range);
|
|
11449
|
-
let isTemplate = next !== 0;
|
|
11450
|
-
let cursor = isTemplate ? next : prev;
|
|
11451
|
-
while (cursor !== 0) {
|
|
11452
|
-
const itemKey = tData[cursor];
|
|
11453
|
-
const itemRange = tData[cursor + 1];
|
|
11454
|
-
bindings.unshift({
|
|
11455
|
-
key: itemKey,
|
|
11456
|
-
index: cursor,
|
|
11457
|
-
isTemplate: isTemplate,
|
|
11458
|
-
prevDuplicate: getTStylingRangePrevDuplicate(itemRange),
|
|
11459
|
-
nextDuplicate: getTStylingRangeNextDuplicate(itemRange),
|
|
11460
|
-
nextIndex: getTStylingRangeNext(itemRange),
|
|
11461
|
-
prevIndex: getTStylingRangePrev(itemRange),
|
|
11462
|
-
});
|
|
11463
|
-
if (cursor === prev)
|
|
11464
|
-
isTemplate = false;
|
|
11465
|
-
cursor = getTStylingRangePrev(itemRange);
|
|
11466
|
-
}
|
|
11467
|
-
bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);
|
|
11468
|
-
return bindings;
|
|
11469
|
-
}
|
|
11470
|
-
function processTNodeChildren(tNode, buf) {
|
|
11471
|
-
while (tNode) {
|
|
11472
|
-
buf.push(tNode.template_);
|
|
11473
|
-
tNode = tNode.next;
|
|
11474
|
-
}
|
|
11475
|
-
}
|
|
11476
|
-
class TViewData extends Array {
|
|
11477
|
-
}
|
|
11478
|
-
let TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because
|
|
11479
|
-
// `LView` constructor could have side-effects.
|
|
11480
|
-
/**
|
|
11481
|
-
* This function clones a blueprint and creates TData.
|
|
11482
|
-
*
|
|
11483
|
-
* Simple slice will keep the same type, and we need it to be TData
|
|
11484
|
-
*/
|
|
11485
|
-
function cloneToTViewData(list) {
|
|
11486
|
-
if (TVIEWDATA_EMPTY === undefined)
|
|
11487
|
-
TVIEWDATA_EMPTY = new TViewData();
|
|
11488
|
-
return TVIEWDATA_EMPTY.concat(list);
|
|
11489
|
-
}
|
|
11490
|
-
class LViewBlueprint extends Array {
|
|
11491
|
-
}
|
|
11492
|
-
class MatchesArray extends Array {
|
|
11493
|
-
}
|
|
11494
|
-
class TViewComponents extends Array {
|
|
11495
|
-
}
|
|
11496
|
-
class TNodeLocalNames extends Array {
|
|
11497
|
-
}
|
|
11498
|
-
class TNodeInitialInputs extends Array {
|
|
11499
|
-
}
|
|
11500
|
-
class LCleanup extends Array {
|
|
11501
|
-
}
|
|
11502
|
-
class TCleanup extends Array {
|
|
11503
|
-
}
|
|
11504
|
-
function attachLViewDebug(lView) {
|
|
11505
|
-
attachDebugObject(lView, new LViewDebug(lView));
|
|
11506
|
-
}
|
|
11507
|
-
function attachLContainerDebug(lContainer) {
|
|
11508
|
-
attachDebugObject(lContainer, new LContainerDebug(lContainer));
|
|
11509
|
-
}
|
|
11510
|
-
function toDebug(obj) {
|
|
11511
|
-
if (obj) {
|
|
11512
|
-
const debug = obj.debug;
|
|
11513
|
-
assertDefined(debug, 'Object does not have a debug representation.');
|
|
11514
|
-
return debug;
|
|
11515
|
-
}
|
|
11516
|
-
else {
|
|
11517
|
-
return obj;
|
|
11518
|
-
}
|
|
11519
|
-
}
|
|
11520
|
-
/**
|
|
11521
|
-
* Use this method to unwrap a native element in `LView` and convert it into HTML for easier
|
|
11522
|
-
* reading.
|
|
11523
|
-
*
|
|
11524
|
-
* @param value possibly wrapped native DOM node.
|
|
11525
|
-
* @param includeChildren If `true` then the serialized HTML form will include child elements
|
|
11526
|
-
* (same
|
|
11527
|
-
* as `outerHTML`). If `false` then the serialized HTML form will only contain the element
|
|
11528
|
-
* itself
|
|
11529
|
-
* (will not serialize child elements).
|
|
11530
|
-
*/
|
|
11531
|
-
function toHtml(value, includeChildren = false) {
|
|
11532
|
-
const node = unwrapRNode(value);
|
|
11533
|
-
if (node) {
|
|
11534
|
-
switch (node.nodeType) {
|
|
11535
|
-
case Node.TEXT_NODE:
|
|
11536
|
-
return node.textContent;
|
|
11537
|
-
case Node.COMMENT_NODE:
|
|
11538
|
-
return `<!--${node.textContent}-->`;
|
|
11539
|
-
case Node.ELEMENT_NODE:
|
|
11540
|
-
const outerHTML = node.outerHTML;
|
|
11541
|
-
if (includeChildren) {
|
|
11542
|
-
return outerHTML;
|
|
11543
|
-
}
|
|
11544
|
-
else {
|
|
11545
|
-
const innerHTML = '>' + node.innerHTML + '<';
|
|
11546
|
-
return (outerHTML.split(innerHTML)[0]) + '>';
|
|
11547
|
-
}
|
|
11548
|
-
}
|
|
11549
|
-
}
|
|
11550
|
-
return null;
|
|
11551
|
-
}
|
|
11552
|
-
class LViewDebug {
|
|
11553
|
-
constructor(_raw_lView) {
|
|
11554
|
-
this._raw_lView = _raw_lView;
|
|
11555
|
-
}
|
|
11556
|
-
/**
|
|
11557
|
-
* Flags associated with the `LView` unpacked into a more readable state.
|
|
11558
|
-
*/
|
|
11559
|
-
get flags() {
|
|
11560
|
-
const flags = this._raw_lView[FLAGS];
|
|
11561
|
-
return {
|
|
11562
|
-
__raw__flags__: flags,
|
|
11563
|
-
initPhaseState: flags & 3 /* LViewFlags.InitPhaseStateMask */,
|
|
11564
|
-
creationMode: !!(flags & 4 /* LViewFlags.CreationMode */),
|
|
11565
|
-
firstViewPass: !!(flags & 8 /* LViewFlags.FirstLViewPass */),
|
|
11566
|
-
checkAlways: !!(flags & 16 /* LViewFlags.CheckAlways */),
|
|
11567
|
-
dirty: !!(flags & 32 /* LViewFlags.Dirty */),
|
|
11568
|
-
attached: !!(flags & 64 /* LViewFlags.Attached */),
|
|
11569
|
-
destroyed: !!(flags & 128 /* LViewFlags.Destroyed */),
|
|
11570
|
-
isRoot: !!(flags & 256 /* LViewFlags.IsRoot */),
|
|
11571
|
-
indexWithinInitPhase: flags >> 11 /* LViewFlags.IndexWithinInitPhaseShift */,
|
|
11572
|
-
};
|
|
11573
|
-
}
|
|
11574
|
-
get parent() {
|
|
11575
|
-
return toDebug(this._raw_lView[PARENT]);
|
|
11576
|
-
}
|
|
11577
|
-
get hostHTML() {
|
|
11578
|
-
return toHtml(this._raw_lView[HOST], true);
|
|
11579
|
-
}
|
|
11580
|
-
get html() {
|
|
11581
|
-
return (this.nodes || []).map(mapToHTML).join('');
|
|
11582
|
-
}
|
|
11583
|
-
get context() {
|
|
11584
|
-
return this._raw_lView[CONTEXT];
|
|
11585
|
-
}
|
|
11586
|
-
/**
|
|
11587
|
-
* The tree of nodes associated with the current `LView`. The nodes have been normalized into
|
|
11588
|
-
* a tree structure with relevant details pulled out for readability.
|
|
11589
|
-
*/
|
|
11590
|
-
get nodes() {
|
|
11591
|
-
const lView = this._raw_lView;
|
|
11592
|
-
const tNode = lView[TVIEW].firstChild;
|
|
11593
|
-
return toDebugNodes(tNode, lView);
|
|
11594
|
-
}
|
|
11595
|
-
get template() {
|
|
11596
|
-
return this.tView.template_;
|
|
11597
|
-
}
|
|
11598
|
-
get tView() {
|
|
11599
|
-
return this._raw_lView[TVIEW];
|
|
11600
|
-
}
|
|
11601
|
-
get cleanup() {
|
|
11602
|
-
return this._raw_lView[CLEANUP];
|
|
11603
|
-
}
|
|
11604
|
-
get injector() {
|
|
11605
|
-
return this._raw_lView[INJECTOR$1];
|
|
11606
|
-
}
|
|
11607
|
-
get rendererFactory() {
|
|
11608
|
-
return this._raw_lView[RENDERER_FACTORY];
|
|
11609
|
-
}
|
|
11610
|
-
get renderer() {
|
|
11611
|
-
return this._raw_lView[RENDERER];
|
|
11612
|
-
}
|
|
11613
|
-
get sanitizer() {
|
|
11614
|
-
return this._raw_lView[SANITIZER];
|
|
11615
|
-
}
|
|
11616
|
-
get childHead() {
|
|
11617
|
-
return toDebug(this._raw_lView[CHILD_HEAD]);
|
|
11618
|
-
}
|
|
11619
|
-
get next() {
|
|
11620
|
-
return toDebug(this._raw_lView[NEXT]);
|
|
11621
|
-
}
|
|
11622
|
-
get childTail() {
|
|
11623
|
-
return toDebug(this._raw_lView[CHILD_TAIL]);
|
|
11624
|
-
}
|
|
11625
|
-
get declarationView() {
|
|
11626
|
-
return toDebug(this._raw_lView[DECLARATION_VIEW]);
|
|
11627
|
-
}
|
|
11628
|
-
get queries() {
|
|
11629
|
-
return this._raw_lView[QUERIES];
|
|
11630
|
-
}
|
|
11631
|
-
get tHost() {
|
|
11632
|
-
return this._raw_lView[T_HOST];
|
|
11633
|
-
}
|
|
11634
|
-
get id() {
|
|
11635
|
-
return this._raw_lView[ID];
|
|
11636
|
-
}
|
|
11637
|
-
get decls() {
|
|
11638
|
-
return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
|
|
11639
|
-
}
|
|
11640
|
-
get vars() {
|
|
11641
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);
|
|
11642
|
-
}
|
|
11643
|
-
get expando() {
|
|
11644
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);
|
|
11645
|
-
}
|
|
11646
|
-
/**
|
|
11647
|
-
* Normalized view of child views (and containers) attached at this location.
|
|
11648
|
-
*/
|
|
11649
|
-
get childViews() {
|
|
11650
|
-
const childViews = [];
|
|
11651
|
-
let child = this.childHead;
|
|
11652
|
-
while (child) {
|
|
11653
|
-
childViews.push(child);
|
|
11654
|
-
child = child.next;
|
|
10764
|
+
let inj;
|
|
10765
|
+
if (visibility instanceof SkipSelf) {
|
|
10766
|
+
inj = this.parent;
|
|
10767
|
+
}
|
|
10768
|
+
else {
|
|
10769
|
+
inj = this;
|
|
10770
|
+
}
|
|
10771
|
+
while (inj instanceof ReflectiveInjector_) {
|
|
10772
|
+
const inj_ = inj;
|
|
10773
|
+
const obj = inj_._getObjByKeyId(key.id);
|
|
10774
|
+
if (obj !== UNDEFINED)
|
|
10775
|
+
return obj;
|
|
10776
|
+
inj = inj_.parent;
|
|
10777
|
+
}
|
|
10778
|
+
if (inj !== null) {
|
|
10779
|
+
return inj.get(key.token, notFoundValue);
|
|
10780
|
+
}
|
|
10781
|
+
else {
|
|
10782
|
+
return this._throwOrNull(key, notFoundValue);
|
|
11655
10783
|
}
|
|
11656
|
-
return childViews;
|
|
11657
|
-
}
|
|
11658
|
-
}
|
|
11659
|
-
function mapToHTML(node) {
|
|
11660
|
-
if (node.type === 'ElementContainer') {
|
|
11661
|
-
return (node.children || []).map(mapToHTML).join('');
|
|
11662
10784
|
}
|
|
11663
|
-
|
|
11664
|
-
|
|
10785
|
+
get displayName() {
|
|
10786
|
+
const providers = _mapProviders(this, (b) => ' "' + b.key.displayName + '" ')
|
|
10787
|
+
.join(', ');
|
|
10788
|
+
return `ReflectiveInjector(providers: [${providers}])`;
|
|
11665
10789
|
}
|
|
11666
|
-
|
|
11667
|
-
return
|
|
10790
|
+
toString() {
|
|
10791
|
+
return this.displayName;
|
|
11668
10792
|
}
|
|
11669
10793
|
}
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
10794
|
+
ReflectiveInjector_.INJECTOR_KEY = ( /* @__PURE__ */ReflectiveKey.get(Injector));
|
|
10795
|
+
function _mapProviders(injector, fn) {
|
|
10796
|
+
const res = [];
|
|
10797
|
+
for (let i = 0; i < injector._providers.length; ++i) {
|
|
10798
|
+
res[i] = fn(injector.getProviderAtIndex(i));
|
|
11674
10799
|
}
|
|
11675
|
-
return
|
|
10800
|
+
return res;
|
|
11676
10801
|
}
|
|
10802
|
+
|
|
11677
10803
|
/**
|
|
11678
|
-
*
|
|
10804
|
+
* @license
|
|
10805
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11679
10806
|
*
|
|
11680
|
-
*
|
|
11681
|
-
*
|
|
10807
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
10808
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11682
10809
|
*/
|
|
11683
|
-
|
|
11684
|
-
if (tNode) {
|
|
11685
|
-
const debugNodes = [];
|
|
11686
|
-
let tNodeCursor = tNode;
|
|
11687
|
-
while (tNodeCursor) {
|
|
11688
|
-
debugNodes.push(buildDebugNode(tNodeCursor, lView));
|
|
11689
|
-
tNodeCursor = tNodeCursor.next;
|
|
11690
|
-
}
|
|
11691
|
-
return debugNodes;
|
|
11692
|
-
}
|
|
11693
|
-
else {
|
|
11694
|
-
return [];
|
|
11695
|
-
}
|
|
11696
|
-
}
|
|
11697
|
-
function buildDebugNode(tNode, lView) {
|
|
11698
|
-
const rawValue = lView[tNode.index];
|
|
11699
|
-
const native = unwrapRNode(rawValue);
|
|
11700
|
-
const factories = [];
|
|
11701
|
-
const instances = [];
|
|
11702
|
-
const tView = lView[TVIEW];
|
|
11703
|
-
for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {
|
|
11704
|
-
const def = tView.data[i];
|
|
11705
|
-
factories.push(def.type);
|
|
11706
|
-
instances.push(lView[i]);
|
|
11707
|
-
}
|
|
11708
|
-
return {
|
|
11709
|
-
html: toHtml(native),
|
|
11710
|
-
type: toTNodeTypeAsString(tNode.type),
|
|
11711
|
-
tNode,
|
|
11712
|
-
native: native,
|
|
11713
|
-
children: toDebugNodes(tNode.child, lView),
|
|
11714
|
-
factories,
|
|
11715
|
-
instances,
|
|
11716
|
-
injector: buildNodeInjectorDebug(tNode, tView, lView),
|
|
11717
|
-
get injectorResolutionPath() {
|
|
11718
|
-
return tNode.debugNodeInjectorPath(lView);
|
|
11719
|
-
},
|
|
11720
|
-
};
|
|
11721
|
-
}
|
|
11722
|
-
function buildNodeInjectorDebug(tNode, tView, lView) {
|
|
11723
|
-
const viewProviders = [];
|
|
11724
|
-
for (let i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) {
|
|
11725
|
-
viewProviders.push(tView.data[i]);
|
|
11726
|
-
}
|
|
11727
|
-
const providers = [];
|
|
11728
|
-
for (let i = tNode.providerIndexEnd_; i < tNode.directiveEnd; i++) {
|
|
11729
|
-
providers.push(tView.data[i]);
|
|
11730
|
-
}
|
|
11731
|
-
const nodeInjectorDebug = {
|
|
11732
|
-
bloom: toBloom(lView, tNode.injectorIndex),
|
|
11733
|
-
cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),
|
|
11734
|
-
providers,
|
|
11735
|
-
viewProviders,
|
|
11736
|
-
parentInjectorIndex: lView[tNode.providerIndexStart_ - 1],
|
|
11737
|
-
};
|
|
11738
|
-
return nodeInjectorDebug;
|
|
11739
|
-
}
|
|
10810
|
+
|
|
11740
10811
|
/**
|
|
11741
|
-
*
|
|
10812
|
+
* @license
|
|
10813
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11742
10814
|
*
|
|
11743
|
-
*
|
|
11744
|
-
*
|
|
10815
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
10816
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11745
10817
|
*/
|
|
11746
|
-
|
|
11747
|
-
const value = array[idx];
|
|
11748
|
-
// If not a number we print 8 `?` to retain alignment but let user know that it was called on
|
|
11749
|
-
// wrong type.
|
|
11750
|
-
if (typeof value !== 'number')
|
|
11751
|
-
return '????????';
|
|
11752
|
-
// We prefix 0s so that we have constant length number
|
|
11753
|
-
const text = '00000000' + value.toString(2);
|
|
11754
|
-
return text.substring(text.length - 8);
|
|
11755
|
-
}
|
|
10818
|
+
|
|
11756
10819
|
/**
|
|
11757
|
-
*
|
|
10820
|
+
* @license
|
|
10821
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11758
10822
|
*
|
|
11759
|
-
*
|
|
11760
|
-
*
|
|
10823
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
10824
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11761
10825
|
*/
|
|
11762
|
-
function
|
|
11763
|
-
|
|
11764
|
-
|
|
10826
|
+
function ɵɵdirectiveInject(token, flags = InjectFlags.Default) {
|
|
10827
|
+
const lView = getLView();
|
|
10828
|
+
// Fall back to inject() if view hasn't been created. This situation can happen in tests
|
|
10829
|
+
// if inject utilities are used before bootstrapping.
|
|
10830
|
+
if (lView === null) {
|
|
10831
|
+
// Verify that we will not get into infinite loop.
|
|
10832
|
+
ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);
|
|
10833
|
+
return ɵɵinject(token, flags);
|
|
11765
10834
|
}
|
|
11766
|
-
|
|
10835
|
+
const tNode = getCurrentTNode();
|
|
10836
|
+
return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);
|
|
11767
10837
|
}
|
|
11768
|
-
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
|
|
11776
|
-
|
|
11777
|
-
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
return this._raw_lContainer[MOVED_VIEWS];
|
|
11784
|
-
}
|
|
11785
|
-
get host() {
|
|
11786
|
-
return this._raw_lContainer[HOST];
|
|
11787
|
-
}
|
|
11788
|
-
get native() {
|
|
11789
|
-
return this._raw_lContainer[NATIVE];
|
|
11790
|
-
}
|
|
11791
|
-
get next() {
|
|
11792
|
-
return toDebug(this._raw_lContainer[NEXT]);
|
|
11793
|
-
}
|
|
10838
|
+
/**
|
|
10839
|
+
* Throws an error indicating that a factory function could not be generated by the compiler for a
|
|
10840
|
+
* particular class.
|
|
10841
|
+
*
|
|
10842
|
+
* This instruction allows the actual error message to be optimized away when ngDevMode is turned
|
|
10843
|
+
* off, saving bytes of generated code while still providing a good experience in dev mode.
|
|
10844
|
+
*
|
|
10845
|
+
* The name of the class is not mentioned here, but will be in the generated factory function name
|
|
10846
|
+
* and thus in the stack trace.
|
|
10847
|
+
*
|
|
10848
|
+
* @codeGenApi
|
|
10849
|
+
*/
|
|
10850
|
+
function ɵɵinvalidFactory() {
|
|
10851
|
+
const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';
|
|
10852
|
+
throw new Error(msg);
|
|
11794
10853
|
}
|
|
11795
10854
|
|
|
11796
10855
|
/**
|
|
@@ -11866,7 +10925,7 @@ function renderChildComponents(hostLView, components) {
|
|
|
11866
10925
|
}
|
|
11867
10926
|
}
|
|
11868
10927
|
function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
|
|
11869
|
-
const lView =
|
|
10928
|
+
const lView = tView.blueprint.slice();
|
|
11870
10929
|
lView[HOST] = host;
|
|
11871
10930
|
lView[FLAGS] = flags | 4 /* LViewFlags.CreationMode */ | 64 /* LViewFlags.Attached */ | 8 /* LViewFlags.FirstLViewPass */;
|
|
11872
10931
|
if (embeddedViewInjector !== null ||
|
|
@@ -11890,7 +10949,6 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
|
|
|
11890
10949
|
assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
|
|
11891
10950
|
lView[DECLARATION_COMPONENT_VIEW] =
|
|
11892
10951
|
tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;
|
|
11893
|
-
ngDevMode && attachLViewDebug(lView);
|
|
11894
10952
|
return lView;
|
|
11895
10953
|
}
|
|
11896
10954
|
function getOrCreateTNode(tView, index, type, name, attrs) {
|
|
@@ -12273,73 +11331,38 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12273
11331
|
const initialViewLength = bindingStartIndex + vars;
|
|
12274
11332
|
const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
|
|
12275
11333
|
const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;
|
|
12276
|
-
const tView = blueprint[TVIEW] =
|
|
12277
|
-
|
|
12278
|
-
blueprint
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
viewQuery
|
|
12282
|
-
declTNode
|
|
12283
|
-
|
|
12284
|
-
bindingStartIndex
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
|
|
12295
|
-
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
typeof directives === 'function' ?
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
false, // incompleteFirstPass: boolean
|
|
12309
|
-
decls, // ngDevMode only: decls
|
|
12310
|
-
vars) :
|
|
12311
|
-
{
|
|
12312
|
-
type: type,
|
|
12313
|
-
blueprint: blueprint,
|
|
12314
|
-
template: templateFn,
|
|
12315
|
-
queries: null,
|
|
12316
|
-
viewQuery: viewQuery,
|
|
12317
|
-
declTNode: declTNode,
|
|
12318
|
-
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
12319
|
-
bindingStartIndex: bindingStartIndex,
|
|
12320
|
-
expandoStartIndex: initialViewLength,
|
|
12321
|
-
hostBindingOpCodes: null,
|
|
12322
|
-
firstCreatePass: true,
|
|
12323
|
-
firstUpdatePass: true,
|
|
12324
|
-
staticViewQueries: false,
|
|
12325
|
-
staticContentQueries: false,
|
|
12326
|
-
preOrderHooks: null,
|
|
12327
|
-
preOrderCheckHooks: null,
|
|
12328
|
-
contentHooks: null,
|
|
12329
|
-
contentCheckHooks: null,
|
|
12330
|
-
viewHooks: null,
|
|
12331
|
-
viewCheckHooks: null,
|
|
12332
|
-
destroyHooks: null,
|
|
12333
|
-
cleanup: null,
|
|
12334
|
-
contentQueries: null,
|
|
12335
|
-
components: null,
|
|
12336
|
-
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
12337
|
-
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
12338
|
-
firstChild: null,
|
|
12339
|
-
schemas: schemas,
|
|
12340
|
-
consts: consts,
|
|
12341
|
-
incompleteFirstPass: false
|
|
12342
|
-
};
|
|
11334
|
+
const tView = blueprint[TVIEW] = {
|
|
11335
|
+
type: type,
|
|
11336
|
+
blueprint: blueprint,
|
|
11337
|
+
template: templateFn,
|
|
11338
|
+
queries: null,
|
|
11339
|
+
viewQuery: viewQuery,
|
|
11340
|
+
declTNode: declTNode,
|
|
11341
|
+
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
11342
|
+
bindingStartIndex: bindingStartIndex,
|
|
11343
|
+
expandoStartIndex: initialViewLength,
|
|
11344
|
+
hostBindingOpCodes: null,
|
|
11345
|
+
firstCreatePass: true,
|
|
11346
|
+
firstUpdatePass: true,
|
|
11347
|
+
staticViewQueries: false,
|
|
11348
|
+
staticContentQueries: false,
|
|
11349
|
+
preOrderHooks: null,
|
|
11350
|
+
preOrderCheckHooks: null,
|
|
11351
|
+
contentHooks: null,
|
|
11352
|
+
contentCheckHooks: null,
|
|
11353
|
+
viewHooks: null,
|
|
11354
|
+
viewCheckHooks: null,
|
|
11355
|
+
destroyHooks: null,
|
|
11356
|
+
cleanup: null,
|
|
11357
|
+
contentQueries: null,
|
|
11358
|
+
components: null,
|
|
11359
|
+
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
11360
|
+
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
11361
|
+
firstChild: null,
|
|
11362
|
+
schemas: schemas,
|
|
11363
|
+
consts: consts,
|
|
11364
|
+
incompleteFirstPass: false
|
|
11365
|
+
};
|
|
12343
11366
|
if (ngDevMode) {
|
|
12344
11367
|
// For performance reasons it is important that the tView retains the same shape during runtime.
|
|
12345
11368
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12349,7 +11372,7 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12349
11372
|
return tView;
|
|
12350
11373
|
}
|
|
12351
11374
|
function createViewBlueprint(bindingStartIndex, initialViewLength) {
|
|
12352
|
-
const blueprint =
|
|
11375
|
+
const blueprint = [];
|
|
12353
11376
|
for (let i = 0; i < initialViewLength; i++) {
|
|
12354
11377
|
blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);
|
|
12355
11378
|
}
|
|
@@ -12402,74 +11425,40 @@ function createTNode(tView, tParent, type, index, value, attrs) {
|
|
|
12402
11425
|
ngDevMode && ngDevMode.tNode++;
|
|
12403
11426
|
ngDevMode && tParent && assertTNodeForTView(tParent, tView);
|
|
12404
11427
|
let injectorIndex = tParent ? tParent.injectorIndex : -1;
|
|
12405
|
-
const tNode =
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
-1,
|
|
12412
|
-
-1,
|
|
12413
|
-
-1,
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
0,
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
null,
|
|
12421
|
-
|
|
12422
|
-
|
|
12423
|
-
|
|
12424
|
-
|
|
12425
|
-
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
0,
|
|
12438
|
-
|
|
12439
|
-
{
|
|
12440
|
-
type,
|
|
12441
|
-
index,
|
|
12442
|
-
insertBeforeIndex: null,
|
|
12443
|
-
injectorIndex,
|
|
12444
|
-
directiveStart: -1,
|
|
12445
|
-
directiveEnd: -1,
|
|
12446
|
-
directiveStylingLast: -1,
|
|
12447
|
-
componentOffset: -1,
|
|
12448
|
-
propertyBindings: null,
|
|
12449
|
-
flags: 0,
|
|
12450
|
-
providerIndexes: 0,
|
|
12451
|
-
value: value,
|
|
12452
|
-
attrs: attrs,
|
|
12453
|
-
mergedAttrs: null,
|
|
12454
|
-
localNames: null,
|
|
12455
|
-
initialInputs: undefined,
|
|
12456
|
-
inputs: null,
|
|
12457
|
-
outputs: null,
|
|
12458
|
-
tViews: null,
|
|
12459
|
-
next: null,
|
|
12460
|
-
projectionNext: null,
|
|
12461
|
-
child: null,
|
|
12462
|
-
parent: tParent,
|
|
12463
|
-
projection: null,
|
|
12464
|
-
styles: null,
|
|
12465
|
-
stylesWithoutHost: null,
|
|
12466
|
-
residualStyles: undefined,
|
|
12467
|
-
classes: null,
|
|
12468
|
-
classesWithoutHost: null,
|
|
12469
|
-
residualClasses: undefined,
|
|
12470
|
-
classBindings: 0,
|
|
12471
|
-
styleBindings: 0,
|
|
12472
|
-
};
|
|
11428
|
+
const tNode = {
|
|
11429
|
+
type,
|
|
11430
|
+
index,
|
|
11431
|
+
insertBeforeIndex: null,
|
|
11432
|
+
injectorIndex,
|
|
11433
|
+
directiveStart: -1,
|
|
11434
|
+
directiveEnd: -1,
|
|
11435
|
+
directiveStylingLast: -1,
|
|
11436
|
+
componentOffset: -1,
|
|
11437
|
+
propertyBindings: null,
|
|
11438
|
+
flags: 0,
|
|
11439
|
+
providerIndexes: 0,
|
|
11440
|
+
value: value,
|
|
11441
|
+
attrs: attrs,
|
|
11442
|
+
mergedAttrs: null,
|
|
11443
|
+
localNames: null,
|
|
11444
|
+
initialInputs: undefined,
|
|
11445
|
+
inputs: null,
|
|
11446
|
+
outputs: null,
|
|
11447
|
+
tViews: null,
|
|
11448
|
+
next: null,
|
|
11449
|
+
projectionNext: null,
|
|
11450
|
+
child: null,
|
|
11451
|
+
parent: tParent,
|
|
11452
|
+
projection: null,
|
|
11453
|
+
styles: null,
|
|
11454
|
+
stylesWithoutHost: null,
|
|
11455
|
+
residualStyles: undefined,
|
|
11456
|
+
classes: null,
|
|
11457
|
+
classesWithoutHost: null,
|
|
11458
|
+
residualClasses: undefined,
|
|
11459
|
+
classBindings: 0,
|
|
11460
|
+
styleBindings: 0,
|
|
11461
|
+
};
|
|
12473
11462
|
if (ngDevMode) {
|
|
12474
11463
|
// For performance reasons it is important that the tNode retains the same shape during runtime.
|
|
12475
11464
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12526,7 +11515,7 @@ function initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefinitionMa
|
|
|
12526
11515
|
const end = tNode.directiveEnd;
|
|
12527
11516
|
const tViewData = tView.data;
|
|
12528
11517
|
const tNodeAttrs = tNode.attrs;
|
|
12529
|
-
const inputsFromAttrs =
|
|
11518
|
+
const inputsFromAttrs = [];
|
|
12530
11519
|
let inputsStore = null;
|
|
12531
11520
|
let outputsStore = null;
|
|
12532
11521
|
for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {
|
|
@@ -12795,6 +11784,12 @@ function lastSelectedElementIdx(hostBindingOpCodes) {
|
|
|
12795
11784
|
function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
12796
11785
|
const start = tNode.directiveStart;
|
|
12797
11786
|
const end = tNode.directiveEnd;
|
|
11787
|
+
// The component view needs to be created before creating the node injector
|
|
11788
|
+
// since it is used to inject some special symbols like `ChangeDetectorRef`.
|
|
11789
|
+
if (isComponentHost(tNode)) {
|
|
11790
|
+
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
11791
|
+
addComponentLogic(lView, tNode, tView.data[start + tNode.componentOffset]);
|
|
11792
|
+
}
|
|
12798
11793
|
if (!tView.firstCreatePass) {
|
|
12799
11794
|
getOrCreateNodeInjectorForNode(tNode, lView);
|
|
12800
11795
|
}
|
|
@@ -12802,19 +11797,14 @@ function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
|
12802
11797
|
const initialInputs = tNode.initialInputs;
|
|
12803
11798
|
for (let i = start; i < end; i++) {
|
|
12804
11799
|
const def = tView.data[i];
|
|
12805
|
-
const isComponent = isComponentDef(def);
|
|
12806
|
-
if (isComponent) {
|
|
12807
|
-
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
12808
|
-
addComponentLogic(lView, tNode, def);
|
|
12809
|
-
}
|
|
12810
11800
|
const directive = getNodeInjectable(lView, tView, i, tNode);
|
|
12811
11801
|
attachPatchData(directive, lView);
|
|
12812
11802
|
if (initialInputs !== null) {
|
|
12813
11803
|
setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);
|
|
12814
11804
|
}
|
|
12815
|
-
if (
|
|
11805
|
+
if (isComponentDef(def)) {
|
|
12816
11806
|
const componentView = getComponentLViewByIndex(tNode.index, lView);
|
|
12817
|
-
componentView[CONTEXT] =
|
|
11807
|
+
componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);
|
|
12818
11808
|
}
|
|
12819
11809
|
}
|
|
12820
11810
|
}
|
|
@@ -12864,7 +11854,7 @@ function findDirectiveDefMatches(tView, tNode) {
|
|
|
12864
11854
|
for (let i = 0; i < registry.length; i++) {
|
|
12865
11855
|
const def = registry[i];
|
|
12866
11856
|
if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {
|
|
12867
|
-
matches || (matches =
|
|
11857
|
+
matches || (matches = []);
|
|
12868
11858
|
if (isComponentDef(def)) {
|
|
12869
11859
|
if (ngDevMode) {
|
|
12870
11860
|
assertTNodeType(tNode, 2 /* TNodeType.Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
|
|
@@ -12922,13 +11912,12 @@ function markAsComponentHost(tView, hostTNode, componentOffset) {
|
|
|
12922
11912
|
ngDevMode && assertFirstCreatePass(tView);
|
|
12923
11913
|
ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');
|
|
12924
11914
|
hostTNode.componentOffset = componentOffset;
|
|
12925
|
-
(tView.components || (tView.components =
|
|
12926
|
-
.push(hostTNode.index);
|
|
11915
|
+
(tView.components || (tView.components = [])).push(hostTNode.index);
|
|
12927
11916
|
}
|
|
12928
11917
|
/** Caches local names and their matching directive indices for query and template lookups. */
|
|
12929
11918
|
function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
|
|
12930
11919
|
if (localRefs) {
|
|
12931
|
-
const localNames = tNode.localNames =
|
|
11920
|
+
const localNames = tNode.localNames = [];
|
|
12932
11921
|
// Local names must be stored in tNode in the same order that localRefs are defined
|
|
12933
11922
|
// in the template to ensure the data is loaded in the same slots as their refs
|
|
12934
11923
|
// in the template (for template queries).
|
|
@@ -13111,9 +12100,6 @@ function generateInitialInputs(inputs, directiveIndex, attrs) {
|
|
|
13111
12100
|
//////////////////////////
|
|
13112
12101
|
//// ViewContainer & View
|
|
13113
12102
|
//////////////////////////
|
|
13114
|
-
// Not sure why I need to do `any` here but TS complains later.
|
|
13115
|
-
const LContainerArray = class LContainer extends Array {
|
|
13116
|
-
};
|
|
13117
12103
|
/**
|
|
13118
12104
|
* Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
|
|
13119
12105
|
*
|
|
@@ -13126,20 +12112,20 @@ const LContainerArray = class LContainer extends Array {
|
|
|
13126
12112
|
*/
|
|
13127
12113
|
function createLContainer(hostNative, currentView, native, tNode) {
|
|
13128
12114
|
ngDevMode && assertLView(currentView);
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
12115
|
+
const lContainer = [
|
|
12116
|
+
hostNative,
|
|
12117
|
+
true,
|
|
12118
|
+
false,
|
|
12119
|
+
currentView,
|
|
12120
|
+
null,
|
|
12121
|
+
0,
|
|
12122
|
+
tNode,
|
|
12123
|
+
native,
|
|
12124
|
+
null,
|
|
12125
|
+
null, // moved views
|
|
12126
|
+
];
|
|
13140
12127
|
ngDevMode &&
|
|
13141
12128
|
assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');
|
|
13142
|
-
ngDevMode && attachLContainerDebug(lContainer);
|
|
13143
12129
|
return lContainer;
|
|
13144
12130
|
}
|
|
13145
12131
|
/**
|
|
@@ -13413,10 +12399,10 @@ function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex,
|
|
|
13413
12399
|
}
|
|
13414
12400
|
function getOrCreateLViewCleanup(view) {
|
|
13415
12401
|
// top level variables should not be exported for performance reasons (PERF_NOTES.md)
|
|
13416
|
-
return view[CLEANUP] || (view[CLEANUP] =
|
|
12402
|
+
return view[CLEANUP] || (view[CLEANUP] = []);
|
|
13417
12403
|
}
|
|
13418
12404
|
function getOrCreateTViewCleanup(tView) {
|
|
13419
|
-
return tView.cleanup || (tView.cleanup =
|
|
12405
|
+
return tView.cleanup || (tView.cleanup = []);
|
|
13420
12406
|
}
|
|
13421
12407
|
/**
|
|
13422
12408
|
* There are cases where the sub component's renderer needs to be included
|
|
@@ -14028,17 +13014,6 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
14028
13014
|
return new ComponentRef(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);
|
|
14029
13015
|
}
|
|
14030
13016
|
}
|
|
14031
|
-
const componentFactoryResolver = new ComponentFactoryResolver();
|
|
14032
|
-
/**
|
|
14033
|
-
* Creates a ComponentFactoryResolver and stores it on the injector. Or, if the
|
|
14034
|
-
* ComponentFactoryResolver
|
|
14035
|
-
* already exists, retrieves the existing ComponentFactoryResolver.
|
|
14036
|
-
*
|
|
14037
|
-
* @returns The ComponentFactoryResolver instance to use
|
|
14038
|
-
*/
|
|
14039
|
-
function injectComponentFactoryResolver() {
|
|
14040
|
-
return componentFactoryResolver;
|
|
14041
|
-
}
|
|
14042
13017
|
/**
|
|
14043
13018
|
* Represents an instance of a Component created via a {@link ComponentFactory}.
|
|
14044
13019
|
*
|
|
@@ -16624,6 +15599,62 @@ function ɵɵpropertyInterpolateV(propName, values, sanitizer) {
|
|
|
16624
15599
|
return ɵɵpropertyInterpolateV;
|
|
16625
15600
|
}
|
|
16626
15601
|
|
|
15602
|
+
/**
|
|
15603
|
+
* @license
|
|
15604
|
+
* Copyright Google LLC All Rights Reserved.
|
|
15605
|
+
*
|
|
15606
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
15607
|
+
* found in the LICENSE file at https://angular.io/license
|
|
15608
|
+
*/
|
|
15609
|
+
function toTStylingRange(prev, next) {
|
|
15610
|
+
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15611
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15612
|
+
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
15613
|
+
}
|
|
15614
|
+
function getTStylingRangePrev(tStylingRange) {
|
|
15615
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15616
|
+
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
15617
|
+
}
|
|
15618
|
+
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
15619
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15620
|
+
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
15621
|
+
2 /* StylingRange.PREV_DUPLICATE */;
|
|
15622
|
+
}
|
|
15623
|
+
function setTStylingRangePrev(tStylingRange, previous) {
|
|
15624
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15625
|
+
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15626
|
+
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
15627
|
+
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
15628
|
+
}
|
|
15629
|
+
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
15630
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15631
|
+
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
15632
|
+
}
|
|
15633
|
+
function getTStylingRangeNext(tStylingRange) {
|
|
15634
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15635
|
+
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
15636
|
+
}
|
|
15637
|
+
function setTStylingRangeNext(tStylingRange, next) {
|
|
15638
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15639
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15640
|
+
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
15641
|
+
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
15642
|
+
}
|
|
15643
|
+
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
15644
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15645
|
+
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
15646
|
+
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
15647
|
+
}
|
|
15648
|
+
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
15649
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15650
|
+
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
15651
|
+
}
|
|
15652
|
+
function getTStylingRangeTail(tStylingRange) {
|
|
15653
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15654
|
+
const next = getTStylingRangeNext(tStylingRange);
|
|
15655
|
+
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
15656
|
+
}
|
|
15657
|
+
|
|
16627
15658
|
/**
|
|
16628
15659
|
* @license
|
|
16629
15660
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -19676,7 +18707,7 @@ var I18nCreateOpCode;
|
|
|
19676
18707
|
})(I18nCreateOpCode || (I18nCreateOpCode = {}));
|
|
19677
18708
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
19678
18709
|
// failure based on types.
|
|
19679
|
-
const unusedValueExportToPlacateAjd
|
|
18710
|
+
const unusedValueExportToPlacateAjd = 1;
|
|
19680
18711
|
|
|
19681
18712
|
/**
|
|
19682
18713
|
* @license
|
|
@@ -20445,6 +19476,46 @@ function loadIcuContainerVisitor() {
|
|
|
20445
19476
|
return icuContainerIteratorStart;
|
|
20446
19477
|
}
|
|
20447
19478
|
|
|
19479
|
+
/**
|
|
19480
|
+
* @license
|
|
19481
|
+
* Copyright Google LLC All Rights Reserved.
|
|
19482
|
+
*
|
|
19483
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
19484
|
+
* found in the LICENSE file at https://angular.io/license
|
|
19485
|
+
*/
|
|
19486
|
+
/**
|
|
19487
|
+
* Patch a `debug` property on top of the existing object.
|
|
19488
|
+
*
|
|
19489
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19490
|
+
*
|
|
19491
|
+
* @param obj Object to patch
|
|
19492
|
+
* @param debug Value to patch
|
|
19493
|
+
*/
|
|
19494
|
+
function attachDebugObject(obj, debug) {
|
|
19495
|
+
if (ngDevMode) {
|
|
19496
|
+
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
19497
|
+
}
|
|
19498
|
+
else {
|
|
19499
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19500
|
+
}
|
|
19501
|
+
}
|
|
19502
|
+
/**
|
|
19503
|
+
* Patch a `debug` property getter on top of the existing object.
|
|
19504
|
+
*
|
|
19505
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19506
|
+
*
|
|
19507
|
+
* @param obj Object to patch
|
|
19508
|
+
* @param debugGetter Getter returning a value to patch
|
|
19509
|
+
*/
|
|
19510
|
+
function attachDebugGetter(obj, debugGetter) {
|
|
19511
|
+
if (ngDevMode) {
|
|
19512
|
+
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
19513
|
+
}
|
|
19514
|
+
else {
|
|
19515
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19516
|
+
}
|
|
19517
|
+
}
|
|
19518
|
+
|
|
20448
19519
|
/**
|
|
20449
19520
|
* @license
|
|
20450
19521
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -22414,32 +21485,6 @@ function sortListeners(a, b) {
|
|
|
22414
21485
|
function isDirectiveDefHack(obj) {
|
|
22415
21486
|
return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;
|
|
22416
21487
|
}
|
|
22417
|
-
/**
|
|
22418
|
-
* Returns the attached `DebugNode` instance for an element in the DOM.
|
|
22419
|
-
*
|
|
22420
|
-
* @param element DOM element which is owned by an existing component's view.
|
|
22421
|
-
*/
|
|
22422
|
-
function getDebugNode$1(element) {
|
|
22423
|
-
if (ngDevMode && !(element instanceof Node)) {
|
|
22424
|
-
throw new Error('Expecting instance of DOM Element');
|
|
22425
|
-
}
|
|
22426
|
-
const lContext = getLContext(element);
|
|
22427
|
-
const lView = lContext ? lContext.lView : null;
|
|
22428
|
-
if (lView === null) {
|
|
22429
|
-
return null;
|
|
22430
|
-
}
|
|
22431
|
-
const nodeIndex = lContext.nodeIndex;
|
|
22432
|
-
if (nodeIndex !== -1) {
|
|
22433
|
-
const valueInLView = lView[nodeIndex];
|
|
22434
|
-
// this means that value in the lView is a component with its own
|
|
22435
|
-
// data. In this situation the TNode is not accessed at the same spot.
|
|
22436
|
-
const tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex);
|
|
22437
|
-
ngDevMode &&
|
|
22438
|
-
assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');
|
|
22439
|
-
return buildDebugNode(tNode, lView);
|
|
22440
|
-
}
|
|
22441
|
-
return null;
|
|
22442
|
-
}
|
|
22443
21488
|
/**
|
|
22444
21489
|
* Retrieve the component `LView` from component/element.
|
|
22445
21490
|
*
|
|
@@ -23659,29 +22704,6 @@ function createContainerRef(hostTNode, hostLView) {
|
|
|
23659
22704
|
* Use of this source code is governed by an MIT-style license that can be
|
|
23660
22705
|
* found in the LICENSE file at https://angular.io/license
|
|
23661
22706
|
*/
|
|
23662
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
23663
|
-
// failure based on types.
|
|
23664
|
-
const unusedValueExportToPlacateAjd$1 = 1;
|
|
23665
|
-
|
|
23666
|
-
/**
|
|
23667
|
-
* @license
|
|
23668
|
-
* Copyright Google LLC All Rights Reserved.
|
|
23669
|
-
*
|
|
23670
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
23671
|
-
* found in the LICENSE file at https://angular.io/license
|
|
23672
|
-
*/
|
|
23673
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
23674
|
-
// failure based on types.
|
|
23675
|
-
const unusedValueExportToPlacateAjd = 1;
|
|
23676
|
-
|
|
23677
|
-
/**
|
|
23678
|
-
* @license
|
|
23679
|
-
* Copyright Google LLC All Rights Reserved.
|
|
23680
|
-
*
|
|
23681
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
23682
|
-
* found in the LICENSE file at https://angular.io/license
|
|
23683
|
-
*/
|
|
23684
|
-
const unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$6 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd;
|
|
23685
22707
|
class LQuery_ {
|
|
23686
22708
|
constructor(queryList) {
|
|
23687
22709
|
this.queryList = queryList;
|