@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/fesm2015/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
|
*/
|
|
@@ -1439,7 +1439,7 @@ const MOVED_VIEWS = 9;
|
|
|
1439
1439
|
const CONTAINER_HEADER_OFFSET = 10;
|
|
1440
1440
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
1441
1441
|
// failure based on types.
|
|
1442
|
-
const unusedValueExportToPlacateAjd$
|
|
1442
|
+
const unusedValueExportToPlacateAjd$4 = 1;
|
|
1443
1443
|
|
|
1444
1444
|
/**
|
|
1445
1445
|
* @license
|
|
@@ -1482,18 +1482,9 @@ const EMBEDDED_VIEW_INJECTOR = 21;
|
|
|
1482
1482
|
* there should be no need to refer to `HEADER_OFFSET` anywhere else.
|
|
1483
1483
|
*/
|
|
1484
1484
|
const HEADER_OFFSET = 22;
|
|
1485
|
-
/**
|
|
1486
|
-
* Converts `TViewType` into human readable text.
|
|
1487
|
-
* Make sure this matches with `TViewType`
|
|
1488
|
-
*/
|
|
1489
|
-
const TViewTypeAsString = [
|
|
1490
|
-
'Root',
|
|
1491
|
-
'Component',
|
|
1492
|
-
'Embedded', // 2
|
|
1493
|
-
];
|
|
1494
1485
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
1495
1486
|
// failure based on types.
|
|
1496
|
-
const unusedValueExportToPlacateAjd$
|
|
1487
|
+
const unusedValueExportToPlacateAjd$3 = 1;
|
|
1497
1488
|
|
|
1498
1489
|
/**
|
|
1499
1490
|
* @license
|
|
@@ -1578,11 +1569,6 @@ function assertHasParent(tNode) {
|
|
|
1578
1569
|
assertDefined(tNode, 'currentTNode should exist!');
|
|
1579
1570
|
assertDefined(tNode.parent, 'currentTNode should have a parent');
|
|
1580
1571
|
}
|
|
1581
|
-
function assertDataNext(lView, index, arr) {
|
|
1582
|
-
if (arr == null)
|
|
1583
|
-
arr = lView;
|
|
1584
|
-
assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);
|
|
1585
|
-
}
|
|
1586
1572
|
function assertLContainer(value) {
|
|
1587
1573
|
assertDefined(value, 'LContainer must be defined');
|
|
1588
1574
|
assertEqual(isLContainer(value), true, 'Expecting LContainer');
|
|
@@ -1613,10 +1599,6 @@ function assertIndexInDeclRange(lView, index) {
|
|
|
1613
1599
|
const tView = lView[1];
|
|
1614
1600
|
assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);
|
|
1615
1601
|
}
|
|
1616
|
-
function assertIndexInVarsRange(lView, index) {
|
|
1617
|
-
const tView = lView[1];
|
|
1618
|
-
assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);
|
|
1619
|
-
}
|
|
1620
1602
|
function assertIndexInExpandoRange(lView, index) {
|
|
1621
1603
|
const tView = lView[1];
|
|
1622
1604
|
assertBetween(tView.expandoStartIndex, lView.length, index);
|
|
@@ -1835,14 +1817,7 @@ const profiler = function (event, instance, hookOrListener) {
|
|
|
1835
1817
|
* found in the LICENSE file at https://angular.io/license
|
|
1836
1818
|
*/
|
|
1837
1819
|
const SVG_NAMESPACE = 'svg';
|
|
1838
|
-
const SVG_NAMESPACE_URI = 'http://www.w3.org/2000/svg';
|
|
1839
1820
|
const MATH_ML_NAMESPACE = 'math';
|
|
1840
|
-
const MATH_ML_NAMESPACE_URI = 'http://www.w3.org/1998/MathML/';
|
|
1841
|
-
function getNamespaceUri(namespace) {
|
|
1842
|
-
const name = namespace.toLowerCase();
|
|
1843
|
-
return name === SVG_NAMESPACE ? SVG_NAMESPACE_URI :
|
|
1844
|
-
(name === MATH_ML_NAMESPACE ? MATH_ML_NAMESPACE_URI : null);
|
|
1845
|
-
}
|
|
1846
1821
|
|
|
1847
1822
|
/**
|
|
1848
1823
|
* @license
|
|
@@ -1891,20 +1866,6 @@ function unwrapLView(value) {
|
|
|
1891
1866
|
}
|
|
1892
1867
|
return null;
|
|
1893
1868
|
}
|
|
1894
|
-
/**
|
|
1895
|
-
* Returns `LContainer` or `null` if not found.
|
|
1896
|
-
* @param value wrapped value of `RNode`, `LView`, `LContainer`
|
|
1897
|
-
*/
|
|
1898
|
-
function unwrapLContainer(value) {
|
|
1899
|
-
while (Array.isArray(value)) {
|
|
1900
|
-
// This check is same as `isLContainer()` but we don't call at as we don't want to call
|
|
1901
|
-
// `Array.isArray()` twice and give JITer more work for inlining.
|
|
1902
|
-
if (value[TYPE] === true)
|
|
1903
|
-
return value;
|
|
1904
|
-
value = value[HOST];
|
|
1905
|
-
}
|
|
1906
|
-
return null;
|
|
1907
|
-
}
|
|
1908
1869
|
/**
|
|
1909
1870
|
* Retrieves an element value from the provided `viewData`, by unwrapping
|
|
1910
1871
|
* from any containers, component views, or style contexts.
|
|
@@ -2164,9 +2125,6 @@ function isCurrentTNodeParent() {
|
|
|
2164
2125
|
function setCurrentTNodeAsNotParent() {
|
|
2165
2126
|
instructionState.lFrame.isParent = false;
|
|
2166
2127
|
}
|
|
2167
|
-
function setCurrentTNodeAsParent() {
|
|
2168
|
-
instructionState.lFrame.isParent = true;
|
|
2169
|
-
}
|
|
2170
2128
|
function getContextLView() {
|
|
2171
2129
|
const contextLView = instructionState.lFrame.contextLView;
|
|
2172
2130
|
ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');
|
|
@@ -2889,7 +2847,7 @@ function isFactory(obj) {
|
|
|
2889
2847
|
}
|
|
2890
2848
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2891
2849
|
// failure based on types.
|
|
2892
|
-
const unusedValueExportToPlacateAjd$
|
|
2850
|
+
const unusedValueExportToPlacateAjd$2 = 1;
|
|
2893
2851
|
|
|
2894
2852
|
/**
|
|
2895
2853
|
* Converts `TNodeType` into human readable text.
|
|
@@ -2908,7 +2866,7 @@ function toTNodeTypeAsString(tNodeType) {
|
|
|
2908
2866
|
}
|
|
2909
2867
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2910
2868
|
// failure based on types.
|
|
2911
|
-
const unusedValueExportToPlacateAjd$
|
|
2869
|
+
const unusedValueExportToPlacateAjd$1 = 1;
|
|
2912
2870
|
/**
|
|
2913
2871
|
* Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.
|
|
2914
2872
|
*
|
|
@@ -4391,17 +4349,6 @@ function isType(v) {
|
|
|
4391
4349
|
* Use of this source code is governed by an MIT-style license that can be
|
|
4392
4350
|
* found in the LICENSE file at https://angular.io/license
|
|
4393
4351
|
*/
|
|
4394
|
-
/**
|
|
4395
|
-
* Equivalent to ES6 spread, add each item to an array.
|
|
4396
|
-
*
|
|
4397
|
-
* @param items The items to add
|
|
4398
|
-
* @param arr The array to which you want to add the items
|
|
4399
|
-
*/
|
|
4400
|
-
function addAllToArray(items, arr) {
|
|
4401
|
-
for (let i = 0; i < items.length; i++) {
|
|
4402
|
-
arr.push(items[i]);
|
|
4403
|
-
}
|
|
4404
|
-
}
|
|
4405
4352
|
/**
|
|
4406
4353
|
* Determines if the contents of two arrays is identical
|
|
4407
4354
|
*
|
|
@@ -4429,25 +4376,8 @@ function arrayEquals(a, b, identityAccessor) {
|
|
|
4429
4376
|
/**
|
|
4430
4377
|
* Flattens an array.
|
|
4431
4378
|
*/
|
|
4432
|
-
function flatten(list
|
|
4433
|
-
|
|
4434
|
-
dst = list;
|
|
4435
|
-
for (let i = 0; i < list.length; i++) {
|
|
4436
|
-
let item = list[i];
|
|
4437
|
-
if (Array.isArray(item)) {
|
|
4438
|
-
// we need to inline it.
|
|
4439
|
-
if (dst === list) {
|
|
4440
|
-
// Our assumption that the list was already flat was wrong and
|
|
4441
|
-
// we need to clone flat since we need to write to it.
|
|
4442
|
-
dst = list.slice(0, i);
|
|
4443
|
-
}
|
|
4444
|
-
flatten(item, dst);
|
|
4445
|
-
}
|
|
4446
|
-
else if (dst !== list) {
|
|
4447
|
-
dst.push(item);
|
|
4448
|
-
}
|
|
4449
|
-
}
|
|
4450
|
-
return dst;
|
|
4379
|
+
function flatten(list) {
|
|
4380
|
+
return list.flat(Number.POSITIVE_INFINITY);
|
|
4451
4381
|
}
|
|
4452
4382
|
function deepForEach(input, fn) {
|
|
4453
4383
|
input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));
|
|
@@ -4557,46 +4487,6 @@ function arrayInsert2(array, index, value1, value2) {
|
|
|
4557
4487
|
array[index + 1] = value2;
|
|
4558
4488
|
}
|
|
4559
4489
|
}
|
|
4560
|
-
/**
|
|
4561
|
-
* Insert a `value` into an `array` so that the array remains sorted.
|
|
4562
|
-
*
|
|
4563
|
-
* NOTE:
|
|
4564
|
-
* - Duplicates are not allowed, and are ignored.
|
|
4565
|
-
* - This uses binary search algorithm for fast inserts.
|
|
4566
|
-
*
|
|
4567
|
-
* @param array A sorted array to insert into.
|
|
4568
|
-
* @param value The value to insert.
|
|
4569
|
-
* @returns index of the inserted value.
|
|
4570
|
-
*/
|
|
4571
|
-
function arrayInsertSorted(array, value) {
|
|
4572
|
-
let index = arrayIndexOfSorted(array, value);
|
|
4573
|
-
if (index < 0) {
|
|
4574
|
-
// if we did not find it insert it.
|
|
4575
|
-
index = ~index;
|
|
4576
|
-
arrayInsert(array, index, value);
|
|
4577
|
-
}
|
|
4578
|
-
return index;
|
|
4579
|
-
}
|
|
4580
|
-
/**
|
|
4581
|
-
* Remove `value` from a sorted `array`.
|
|
4582
|
-
*
|
|
4583
|
-
* NOTE:
|
|
4584
|
-
* - This uses binary search algorithm for fast removals.
|
|
4585
|
-
*
|
|
4586
|
-
* @param array A sorted array to remove from.
|
|
4587
|
-
* @param value The value to remove.
|
|
4588
|
-
* @returns index of the removed value.
|
|
4589
|
-
* - positive index if value found and removed.
|
|
4590
|
-
* - negative index if value not found. (`~index` to get the value where it should have been
|
|
4591
|
-
* inserted)
|
|
4592
|
-
*/
|
|
4593
|
-
function arrayRemoveSorted(array, value) {
|
|
4594
|
-
const index = arrayIndexOfSorted(array, value);
|
|
4595
|
-
if (index >= 0) {
|
|
4596
|
-
arraySplice(array, index, 1);
|
|
4597
|
-
}
|
|
4598
|
-
return index;
|
|
4599
|
-
}
|
|
4600
4490
|
/**
|
|
4601
4491
|
* Get an index of an `value` in a sorted `array`.
|
|
4602
4492
|
*
|
|
@@ -6049,28 +5939,6 @@ function ensureIcuContainerVisitorLoaded(loader) {
|
|
|
6049
5939
|
}
|
|
6050
5940
|
}
|
|
6051
5941
|
|
|
6052
|
-
/**
|
|
6053
|
-
* @license
|
|
6054
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6055
|
-
*
|
|
6056
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6057
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6058
|
-
*/
|
|
6059
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6060
|
-
// failure based on types.
|
|
6061
|
-
const unusedValueExportToPlacateAjd$4 = 1;
|
|
6062
|
-
|
|
6063
|
-
/**
|
|
6064
|
-
* @license
|
|
6065
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6066
|
-
*
|
|
6067
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6068
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6069
|
-
*/
|
|
6070
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6071
|
-
// failure based on types.
|
|
6072
|
-
const unusedValueExportToPlacateAjd$3 = 1;
|
|
6073
|
-
|
|
6074
5942
|
/**
|
|
6075
5943
|
* @license
|
|
6076
5944
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6142,7 +6010,6 @@ function getNearestLContainer(viewOrContainer) {
|
|
|
6142
6010
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6143
6011
|
* found in the LICENSE file at https://angular.io/license
|
|
6144
6012
|
*/
|
|
6145
|
-
const unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$8 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$7;
|
|
6146
6013
|
/**
|
|
6147
6014
|
* NOTE: for performance reasons, the possible actions are inlined within the function instead of
|
|
6148
6015
|
* being passed as an argument.
|
|
@@ -9041,7 +8908,6 @@ function unwrapElementRef(value) {
|
|
|
9041
8908
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9042
8909
|
* found in the LICENSE file at https://angular.io/license
|
|
9043
8910
|
*/
|
|
9044
|
-
const Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');
|
|
9045
8911
|
/**
|
|
9046
8912
|
* Creates and initializes a custom renderer that implements the `Renderer2` base class.
|
|
9047
8913
|
*
|
|
@@ -9125,7 +8991,7 @@ class Version {
|
|
|
9125
8991
|
/**
|
|
9126
8992
|
* @publicApi
|
|
9127
8993
|
*/
|
|
9128
|
-
const VERSION = new Version('15.0.
|
|
8994
|
+
const VERSION = new Version('15.0.3');
|
|
9129
8995
|
|
|
9130
8996
|
/**
|
|
9131
8997
|
* @license
|
|
@@ -9446,7 +9312,6 @@ function classIndexOf(className, classToSearch, startingIndex) {
|
|
|
9446
9312
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9447
9313
|
* found in the LICENSE file at https://angular.io/license
|
|
9448
9314
|
*/
|
|
9449
|
-
const unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4;
|
|
9450
9315
|
const NG_TEMPLATE_SELECTOR = 'ng-template';
|
|
9451
9316
|
/**
|
|
9452
9317
|
* Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)
|
|
@@ -10883,901 +10748,95 @@ class ReflectiveInjector_ {
|
|
|
10883
10748
|
}
|
|
10884
10749
|
/** @internal */
|
|
10885
10750
|
_getByKeyDefault(key, notFoundValue, visibility) {
|
|
10886
|
-
let inj;
|
|
10887
|
-
if (visibility instanceof SkipSelf) {
|
|
10888
|
-
inj = this.parent;
|
|
10889
|
-
}
|
|
10890
|
-
else {
|
|
10891
|
-
inj = this;
|
|
10892
|
-
}
|
|
10893
|
-
while (inj instanceof ReflectiveInjector_) {
|
|
10894
|
-
const inj_ = inj;
|
|
10895
|
-
const obj = inj_._getObjByKeyId(key.id);
|
|
10896
|
-
if (obj !== UNDEFINED)
|
|
10897
|
-
return obj;
|
|
10898
|
-
inj = inj_.parent;
|
|
10899
|
-
}
|
|
10900
|
-
if (inj !== null) {
|
|
10901
|
-
return inj.get(key.token, notFoundValue);
|
|
10902
|
-
}
|
|
10903
|
-
else {
|
|
10904
|
-
return this._throwOrNull(key, notFoundValue);
|
|
10905
|
-
}
|
|
10906
|
-
}
|
|
10907
|
-
get displayName() {
|
|
10908
|
-
const providers = _mapProviders(this, (b) => ' "' + b.key.displayName + '" ')
|
|
10909
|
-
.join(', ');
|
|
10910
|
-
return `ReflectiveInjector(providers: [${providers}])`;
|
|
10911
|
-
}
|
|
10912
|
-
toString() {
|
|
10913
|
-
return this.displayName;
|
|
10914
|
-
}
|
|
10915
|
-
}
|
|
10916
|
-
ReflectiveInjector_.INJECTOR_KEY = ( /* @__PURE__ */ReflectiveKey.get(Injector));
|
|
10917
|
-
function _mapProviders(injector, fn) {
|
|
10918
|
-
const res = [];
|
|
10919
|
-
for (let i = 0; i < injector._providers.length; ++i) {
|
|
10920
|
-
res[i] = fn(injector.getProviderAtIndex(i));
|
|
10921
|
-
}
|
|
10922
|
-
return res;
|
|
10923
|
-
}
|
|
10924
|
-
|
|
10925
|
-
/**
|
|
10926
|
-
* @license
|
|
10927
|
-
* Copyright Google LLC All Rights Reserved.
|
|
10928
|
-
*
|
|
10929
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
10930
|
-
* found in the LICENSE file at https://angular.io/license
|
|
10931
|
-
*/
|
|
10932
|
-
|
|
10933
|
-
/**
|
|
10934
|
-
* @license
|
|
10935
|
-
* Copyright Google LLC All Rights Reserved.
|
|
10936
|
-
*
|
|
10937
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
10938
|
-
* found in the LICENSE file at https://angular.io/license
|
|
10939
|
-
*/
|
|
10940
|
-
|
|
10941
|
-
/**
|
|
10942
|
-
* @license
|
|
10943
|
-
* Copyright Google LLC All Rights Reserved.
|
|
10944
|
-
*
|
|
10945
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
10946
|
-
* found in the LICENSE file at https://angular.io/license
|
|
10947
|
-
*/
|
|
10948
|
-
function ɵɵdirectiveInject(token, flags = InjectFlags.Default) {
|
|
10949
|
-
const lView = getLView();
|
|
10950
|
-
// Fall back to inject() if view hasn't been created. This situation can happen in tests
|
|
10951
|
-
// if inject utilities are used before bootstrapping.
|
|
10952
|
-
if (lView === null) {
|
|
10953
|
-
// Verify that we will not get into infinite loop.
|
|
10954
|
-
ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);
|
|
10955
|
-
return ɵɵinject(token, flags);
|
|
10956
|
-
}
|
|
10957
|
-
const tNode = getCurrentTNode();
|
|
10958
|
-
return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);
|
|
10959
|
-
}
|
|
10960
|
-
/**
|
|
10961
|
-
* Throws an error indicating that a factory function could not be generated by the compiler for a
|
|
10962
|
-
* particular class.
|
|
10963
|
-
*
|
|
10964
|
-
* This instruction allows the actual error message to be optimized away when ngDevMode is turned
|
|
10965
|
-
* off, saving bytes of generated code while still providing a good experience in dev mode.
|
|
10966
|
-
*
|
|
10967
|
-
* The name of the class is not mentioned here, but will be in the generated factory function name
|
|
10968
|
-
* and thus in the stack trace.
|
|
10969
|
-
*
|
|
10970
|
-
* @codeGenApi
|
|
10971
|
-
*/
|
|
10972
|
-
function ɵɵinvalidFactory() {
|
|
10973
|
-
const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';
|
|
10974
|
-
throw new Error(msg);
|
|
10975
|
-
}
|
|
10976
|
-
|
|
10977
|
-
/**
|
|
10978
|
-
* @license
|
|
10979
|
-
* Copyright Google LLC All Rights Reserved.
|
|
10980
|
-
*
|
|
10981
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
10982
|
-
* found in the LICENSE file at https://angular.io/license
|
|
10983
|
-
*/
|
|
10984
|
-
/**
|
|
10985
|
-
* THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!
|
|
10986
|
-
*/
|
|
10987
|
-
/**
|
|
10988
|
-
* Creates an `Array` construction with a given name. This is useful when
|
|
10989
|
-
* looking for memory consumption to see what time of array it is.
|
|
10990
|
-
*
|
|
10991
|
-
*
|
|
10992
|
-
* @param name Name to give to the constructor
|
|
10993
|
-
* @returns A subclass of `Array` if possible. This can only be done in
|
|
10994
|
-
* environments which support `class` construct.
|
|
10995
|
-
*/
|
|
10996
|
-
function createNamedArrayType(name) {
|
|
10997
|
-
// This should never be called in prod mode, so let's verify that is the case.
|
|
10998
|
-
if (ngDevMode) {
|
|
10999
|
-
try {
|
|
11000
|
-
// If this function were compromised the following could lead to arbitrary
|
|
11001
|
-
// script execution. We bless it with Trusted Types anyway since this
|
|
11002
|
-
// function is stripped out of production binaries.
|
|
11003
|
-
return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);
|
|
11004
|
-
}
|
|
11005
|
-
catch (e) {
|
|
11006
|
-
// If it does not work just give up and fall back to regular Array.
|
|
11007
|
-
return Array;
|
|
11008
|
-
}
|
|
11009
|
-
}
|
|
11010
|
-
else {
|
|
11011
|
-
throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code');
|
|
11012
|
-
}
|
|
11013
|
-
}
|
|
11014
|
-
|
|
11015
|
-
/**
|
|
11016
|
-
* @license
|
|
11017
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11018
|
-
*
|
|
11019
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11020
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11021
|
-
*/
|
|
11022
|
-
function toTStylingRange(prev, next) {
|
|
11023
|
-
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11024
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11025
|
-
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11026
|
-
}
|
|
11027
|
-
function getTStylingRangePrev(tStylingRange) {
|
|
11028
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11029
|
-
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
11030
|
-
}
|
|
11031
|
-
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
11032
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11033
|
-
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
11034
|
-
2 /* StylingRange.PREV_DUPLICATE */;
|
|
11035
|
-
}
|
|
11036
|
-
function setTStylingRangePrev(tStylingRange, previous) {
|
|
11037
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11038
|
-
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11039
|
-
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
11040
|
-
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
11041
|
-
}
|
|
11042
|
-
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
11043
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11044
|
-
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
11045
|
-
}
|
|
11046
|
-
function getTStylingRangeNext(tStylingRange) {
|
|
11047
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11048
|
-
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
11049
|
-
}
|
|
11050
|
-
function setTStylingRangeNext(tStylingRange, next) {
|
|
11051
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11052
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11053
|
-
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
11054
|
-
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11055
|
-
}
|
|
11056
|
-
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
11057
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11058
|
-
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
11059
|
-
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
11060
|
-
}
|
|
11061
|
-
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
11062
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11063
|
-
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
11064
|
-
}
|
|
11065
|
-
function getTStylingRangeTail(tStylingRange) {
|
|
11066
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11067
|
-
const next = getTStylingRangeNext(tStylingRange);
|
|
11068
|
-
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
11069
|
-
}
|
|
11070
|
-
|
|
11071
|
-
/**
|
|
11072
|
-
* @license
|
|
11073
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11074
|
-
*
|
|
11075
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11076
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11077
|
-
*/
|
|
11078
|
-
/**
|
|
11079
|
-
* Patch a `debug` property on top of the existing object.
|
|
11080
|
-
*
|
|
11081
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11082
|
-
*
|
|
11083
|
-
* @param obj Object to patch
|
|
11084
|
-
* @param debug Value to patch
|
|
11085
|
-
*/
|
|
11086
|
-
function attachDebugObject(obj, debug) {
|
|
11087
|
-
if (ngDevMode) {
|
|
11088
|
-
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
11089
|
-
}
|
|
11090
|
-
else {
|
|
11091
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11092
|
-
}
|
|
11093
|
-
}
|
|
11094
|
-
/**
|
|
11095
|
-
* Patch a `debug` property getter on top of the existing object.
|
|
11096
|
-
*
|
|
11097
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11098
|
-
*
|
|
11099
|
-
* @param obj Object to patch
|
|
11100
|
-
* @param debugGetter Getter returning a value to patch
|
|
11101
|
-
*/
|
|
11102
|
-
function attachDebugGetter(obj, debugGetter) {
|
|
11103
|
-
if (ngDevMode) {
|
|
11104
|
-
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
11105
|
-
}
|
|
11106
|
-
else {
|
|
11107
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11108
|
-
}
|
|
11109
|
-
}
|
|
11110
|
-
|
|
11111
|
-
/**
|
|
11112
|
-
* @license
|
|
11113
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11114
|
-
*
|
|
11115
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11116
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11117
|
-
*/
|
|
11118
|
-
/*
|
|
11119
|
-
* This file contains conditionally attached classes which provide human readable (debug) level
|
|
11120
|
-
* information for `LView`, `LContainer` and other internal data structures. These data structures
|
|
11121
|
-
* are stored internally as array which makes it very difficult during debugging to reason about the
|
|
11122
|
-
* current state of the system.
|
|
11123
|
-
*
|
|
11124
|
-
* Patching the array with extra property does change the array's hidden class' but it does not
|
|
11125
|
-
* change the cost of access, therefore this patching should not have significant if any impact in
|
|
11126
|
-
* `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)
|
|
11127
|
-
*
|
|
11128
|
-
* So instead of seeing:
|
|
11129
|
-
* ```
|
|
11130
|
-
* Array(30) [Object, 659, null, …]
|
|
11131
|
-
* ```
|
|
11132
|
-
*
|
|
11133
|
-
* You get to see:
|
|
11134
|
-
* ```
|
|
11135
|
-
* LViewDebug {
|
|
11136
|
-
* views: [...],
|
|
11137
|
-
* flags: {attached: true, ...}
|
|
11138
|
-
* nodes: [
|
|
11139
|
-
* {html: '<div id="123">', ..., nodes: [
|
|
11140
|
-
* {html: '<span>', ..., nodes: null}
|
|
11141
|
-
* ]}
|
|
11142
|
-
* ]
|
|
11143
|
-
* }
|
|
11144
|
-
* ```
|
|
11145
|
-
*/
|
|
11146
|
-
let LVIEW_COMPONENT_CACHE;
|
|
11147
|
-
let LVIEW_EMBEDDED_CACHE;
|
|
11148
|
-
let LVIEW_ROOT;
|
|
11149
|
-
let LVIEW_COMPONENT;
|
|
11150
|
-
let LVIEW_EMBEDDED;
|
|
11151
|
-
/**
|
|
11152
|
-
* This function clones a blueprint and creates LView.
|
|
11153
|
-
*
|
|
11154
|
-
* Simple slice will keep the same type, and we need it to be LView
|
|
11155
|
-
*/
|
|
11156
|
-
function cloneToLViewFromTViewBlueprint(tView) {
|
|
11157
|
-
const debugTView = tView;
|
|
11158
|
-
const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);
|
|
11159
|
-
return lView.concat(tView.blueprint);
|
|
11160
|
-
}
|
|
11161
|
-
class LRootView extends Array {
|
|
11162
|
-
}
|
|
11163
|
-
class LComponentView extends Array {
|
|
11164
|
-
}
|
|
11165
|
-
class LEmbeddedView extends Array {
|
|
11166
|
-
}
|
|
11167
|
-
function getLViewToClone(type, name) {
|
|
11168
|
-
switch (type) {
|
|
11169
|
-
case 0 /* TViewType.Root */:
|
|
11170
|
-
if (LVIEW_ROOT === undefined)
|
|
11171
|
-
LVIEW_ROOT = new LRootView();
|
|
11172
|
-
return LVIEW_ROOT;
|
|
11173
|
-
case 1 /* TViewType.Component */:
|
|
11174
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11175
|
-
if (LVIEW_COMPONENT === undefined)
|
|
11176
|
-
LVIEW_COMPONENT = new LComponentView();
|
|
11177
|
-
return LVIEW_COMPONENT;
|
|
11178
|
-
}
|
|
11179
|
-
if (LVIEW_COMPONENT_CACHE === undefined)
|
|
11180
|
-
LVIEW_COMPONENT_CACHE = new Map();
|
|
11181
|
-
let componentArray = LVIEW_COMPONENT_CACHE.get(name);
|
|
11182
|
-
if (componentArray === undefined) {
|
|
11183
|
-
componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();
|
|
11184
|
-
LVIEW_COMPONENT_CACHE.set(name, componentArray);
|
|
11185
|
-
}
|
|
11186
|
-
return componentArray;
|
|
11187
|
-
case 2 /* TViewType.Embedded */:
|
|
11188
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11189
|
-
if (LVIEW_EMBEDDED === undefined)
|
|
11190
|
-
LVIEW_EMBEDDED = new LEmbeddedView();
|
|
11191
|
-
return LVIEW_EMBEDDED;
|
|
11192
|
-
}
|
|
11193
|
-
if (LVIEW_EMBEDDED_CACHE === undefined)
|
|
11194
|
-
LVIEW_EMBEDDED_CACHE = new Map();
|
|
11195
|
-
let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);
|
|
11196
|
-
if (embeddedArray === undefined) {
|
|
11197
|
-
embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();
|
|
11198
|
-
LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);
|
|
11199
|
-
}
|
|
11200
|
-
return embeddedArray;
|
|
11201
|
-
}
|
|
11202
|
-
}
|
|
11203
|
-
function nameSuffix(text) {
|
|
11204
|
-
if (text == null)
|
|
11205
|
-
return '';
|
|
11206
|
-
const index = text.lastIndexOf('_Template');
|
|
11207
|
-
return '_' + (index === -1 ? text : text.slice(0, index));
|
|
11208
|
-
}
|
|
11209
|
-
/**
|
|
11210
|
-
* This class is a debug version of Object literal so that we can have constructor name show up
|
|
11211
|
-
* in
|
|
11212
|
-
* debug tools in ngDevMode.
|
|
11213
|
-
*/
|
|
11214
|
-
const TViewConstructor = class TView {
|
|
11215
|
-
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) {
|
|
11216
|
-
this.type = type;
|
|
11217
|
-
this.blueprint = blueprint;
|
|
11218
|
-
this.template = template;
|
|
11219
|
-
this.queries = queries;
|
|
11220
|
-
this.viewQuery = viewQuery;
|
|
11221
|
-
this.declTNode = declTNode;
|
|
11222
|
-
this.data = data;
|
|
11223
|
-
this.bindingStartIndex = bindingStartIndex;
|
|
11224
|
-
this.expandoStartIndex = expandoStartIndex;
|
|
11225
|
-
this.hostBindingOpCodes = hostBindingOpCodes;
|
|
11226
|
-
this.firstCreatePass = firstCreatePass;
|
|
11227
|
-
this.firstUpdatePass = firstUpdatePass;
|
|
11228
|
-
this.staticViewQueries = staticViewQueries;
|
|
11229
|
-
this.staticContentQueries = staticContentQueries;
|
|
11230
|
-
this.preOrderHooks = preOrderHooks;
|
|
11231
|
-
this.preOrderCheckHooks = preOrderCheckHooks;
|
|
11232
|
-
this.contentHooks = contentHooks;
|
|
11233
|
-
this.contentCheckHooks = contentCheckHooks;
|
|
11234
|
-
this.viewHooks = viewHooks;
|
|
11235
|
-
this.viewCheckHooks = viewCheckHooks;
|
|
11236
|
-
this.destroyHooks = destroyHooks;
|
|
11237
|
-
this.cleanup = cleanup;
|
|
11238
|
-
this.contentQueries = contentQueries;
|
|
11239
|
-
this.components = components;
|
|
11240
|
-
this.directiveRegistry = directiveRegistry;
|
|
11241
|
-
this.pipeRegistry = pipeRegistry;
|
|
11242
|
-
this.firstChild = firstChild;
|
|
11243
|
-
this.schemas = schemas;
|
|
11244
|
-
this.consts = consts;
|
|
11245
|
-
this.incompleteFirstPass = incompleteFirstPass;
|
|
11246
|
-
this._decls = _decls;
|
|
11247
|
-
this._vars = _vars;
|
|
11248
|
-
}
|
|
11249
|
-
get template_() {
|
|
11250
|
-
const buf = [];
|
|
11251
|
-
processTNodeChildren(this.firstChild, buf);
|
|
11252
|
-
return buf.join('');
|
|
11253
|
-
}
|
|
11254
|
-
get type_() {
|
|
11255
|
-
return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`;
|
|
11256
|
-
}
|
|
11257
|
-
};
|
|
11258
|
-
class TNode {
|
|
11259
|
-
constructor(tView_, //
|
|
11260
|
-
type, //
|
|
11261
|
-
index, //
|
|
11262
|
-
insertBeforeIndex, //
|
|
11263
|
-
injectorIndex, //
|
|
11264
|
-
componentOffset, //
|
|
11265
|
-
directiveStart, //
|
|
11266
|
-
directiveEnd, //
|
|
11267
|
-
directiveStylingLast, //
|
|
11268
|
-
propertyBindings, //
|
|
11269
|
-
flags, //
|
|
11270
|
-
providerIndexes, //
|
|
11271
|
-
value, //
|
|
11272
|
-
attrs, //
|
|
11273
|
-
mergedAttrs, //
|
|
11274
|
-
localNames, //
|
|
11275
|
-
initialInputs, //
|
|
11276
|
-
inputs, //
|
|
11277
|
-
outputs, //
|
|
11278
|
-
tViews, //
|
|
11279
|
-
next, //
|
|
11280
|
-
projectionNext, //
|
|
11281
|
-
child, //
|
|
11282
|
-
parent, //
|
|
11283
|
-
projection, //
|
|
11284
|
-
styles, //
|
|
11285
|
-
stylesWithoutHost, //
|
|
11286
|
-
residualStyles, //
|
|
11287
|
-
classes, //
|
|
11288
|
-
classesWithoutHost, //
|
|
11289
|
-
residualClasses, //
|
|
11290
|
-
classBindings, //
|
|
11291
|
-
styleBindings) {
|
|
11292
|
-
this.tView_ = tView_;
|
|
11293
|
-
this.type = type;
|
|
11294
|
-
this.index = index;
|
|
11295
|
-
this.insertBeforeIndex = insertBeforeIndex;
|
|
11296
|
-
this.injectorIndex = injectorIndex;
|
|
11297
|
-
this.componentOffset = componentOffset;
|
|
11298
|
-
this.directiveStart = directiveStart;
|
|
11299
|
-
this.directiveEnd = directiveEnd;
|
|
11300
|
-
this.directiveStylingLast = directiveStylingLast;
|
|
11301
|
-
this.propertyBindings = propertyBindings;
|
|
11302
|
-
this.flags = flags;
|
|
11303
|
-
this.providerIndexes = providerIndexes;
|
|
11304
|
-
this.value = value;
|
|
11305
|
-
this.attrs = attrs;
|
|
11306
|
-
this.mergedAttrs = mergedAttrs;
|
|
11307
|
-
this.localNames = localNames;
|
|
11308
|
-
this.initialInputs = initialInputs;
|
|
11309
|
-
this.inputs = inputs;
|
|
11310
|
-
this.outputs = outputs;
|
|
11311
|
-
this.tViews = tViews;
|
|
11312
|
-
this.next = next;
|
|
11313
|
-
this.projectionNext = projectionNext;
|
|
11314
|
-
this.child = child;
|
|
11315
|
-
this.parent = parent;
|
|
11316
|
-
this.projection = projection;
|
|
11317
|
-
this.styles = styles;
|
|
11318
|
-
this.stylesWithoutHost = stylesWithoutHost;
|
|
11319
|
-
this.residualStyles = residualStyles;
|
|
11320
|
-
this.classes = classes;
|
|
11321
|
-
this.classesWithoutHost = classesWithoutHost;
|
|
11322
|
-
this.residualClasses = residualClasses;
|
|
11323
|
-
this.classBindings = classBindings;
|
|
11324
|
-
this.styleBindings = styleBindings;
|
|
11325
|
-
}
|
|
11326
|
-
/**
|
|
11327
|
-
* Return a human debug version of the set of `NodeInjector`s which will be consulted when
|
|
11328
|
-
* resolving tokens from this `TNode`.
|
|
11329
|
-
*
|
|
11330
|
-
* When debugging applications, it is often difficult to determine which `NodeInjector`s will be
|
|
11331
|
-
* consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be
|
|
11332
|
-
* consulted in order when resolving a token starting at this `TNode`.
|
|
11333
|
-
*
|
|
11334
|
-
* The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is
|
|
11335
|
-
* difficult to reason about.
|
|
11336
|
-
*
|
|
11337
|
-
* @param lView The `LView` instance for this `TNode`.
|
|
11338
|
-
*/
|
|
11339
|
-
debugNodeInjectorPath(lView) {
|
|
11340
|
-
const path = [];
|
|
11341
|
-
let injectorIndex = getInjectorIndex(this, lView);
|
|
11342
|
-
if (injectorIndex === -1) {
|
|
11343
|
-
// Looks like the current `TNode` does not have `NodeInjector` associated with it => look for
|
|
11344
|
-
// parent NodeInjector.
|
|
11345
|
-
const parentLocation = getParentInjectorLocation(this, lView);
|
|
11346
|
-
if (parentLocation !== NO_PARENT_INJECTOR) {
|
|
11347
|
-
// We found a parent, so start searching from the parent location.
|
|
11348
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11349
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11350
|
-
}
|
|
11351
|
-
else {
|
|
11352
|
-
// No parents have been found, so there are no `NodeInjector`s to consult.
|
|
11353
|
-
}
|
|
11354
|
-
}
|
|
11355
|
-
while (injectorIndex !== -1) {
|
|
11356
|
-
ngDevMode && assertNodeInjector(lView, injectorIndex);
|
|
11357
|
-
const tNode = lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];
|
|
11358
|
-
path.push(buildDebugNode(tNode, lView));
|
|
11359
|
-
const parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];
|
|
11360
|
-
if (parentLocation === NO_PARENT_INJECTOR) {
|
|
11361
|
-
injectorIndex = -1;
|
|
11362
|
-
}
|
|
11363
|
-
else {
|
|
11364
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11365
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11366
|
-
}
|
|
11367
|
-
}
|
|
11368
|
-
return path;
|
|
11369
|
-
}
|
|
11370
|
-
get type_() {
|
|
11371
|
-
return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`;
|
|
11372
|
-
}
|
|
11373
|
-
get flags_() {
|
|
11374
|
-
const flags = [];
|
|
11375
|
-
if (this.flags & 8 /* TNodeFlags.hasClassInput */)
|
|
11376
|
-
flags.push('TNodeFlags.hasClassInput');
|
|
11377
|
-
if (this.flags & 4 /* TNodeFlags.hasContentQuery */)
|
|
11378
|
-
flags.push('TNodeFlags.hasContentQuery');
|
|
11379
|
-
if (this.flags & 16 /* TNodeFlags.hasStyleInput */)
|
|
11380
|
-
flags.push('TNodeFlags.hasStyleInput');
|
|
11381
|
-
if (this.flags & 64 /* TNodeFlags.hasHostBindings */)
|
|
11382
|
-
flags.push('TNodeFlags.hasHostBindings');
|
|
11383
|
-
if (this.flags & 1 /* TNodeFlags.isDirectiveHost */)
|
|
11384
|
-
flags.push('TNodeFlags.isDirectiveHost');
|
|
11385
|
-
if (this.flags & 32 /* TNodeFlags.isDetached */)
|
|
11386
|
-
flags.push('TNodeFlags.isDetached');
|
|
11387
|
-
if (this.flags & 2 /* TNodeFlags.isProjected */)
|
|
11388
|
-
flags.push('TNodeFlags.isProjected');
|
|
11389
|
-
return flags.join('|');
|
|
11390
|
-
}
|
|
11391
|
-
get template_() {
|
|
11392
|
-
if (this.type & 1 /* TNodeType.Text */)
|
|
11393
|
-
return this.value;
|
|
11394
|
-
const buf = [];
|
|
11395
|
-
const tagName = typeof this.value === 'string' && this.value || this.type_;
|
|
11396
|
-
buf.push('<', tagName);
|
|
11397
|
-
if (this.flags) {
|
|
11398
|
-
buf.push(' ', this.flags_);
|
|
11399
|
-
}
|
|
11400
|
-
if (this.attrs) {
|
|
11401
|
-
for (let i = 0; i < this.attrs.length;) {
|
|
11402
|
-
const attrName = this.attrs[i++];
|
|
11403
|
-
if (typeof attrName == 'number') {
|
|
11404
|
-
break;
|
|
11405
|
-
}
|
|
11406
|
-
const attrValue = this.attrs[i++];
|
|
11407
|
-
buf.push(' ', attrName, '="', attrValue, '"');
|
|
11408
|
-
}
|
|
11409
|
-
}
|
|
11410
|
-
buf.push('>');
|
|
11411
|
-
processTNodeChildren(this.child, buf);
|
|
11412
|
-
buf.push('</', tagName, '>');
|
|
11413
|
-
return buf.join('');
|
|
11414
|
-
}
|
|
11415
|
-
get styleBindings_() {
|
|
11416
|
-
return toDebugStyleBinding(this, false);
|
|
11417
|
-
}
|
|
11418
|
-
get classBindings_() {
|
|
11419
|
-
return toDebugStyleBinding(this, true);
|
|
11420
|
-
}
|
|
11421
|
-
get providerIndexStart_() {
|
|
11422
|
-
return this.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;
|
|
11423
|
-
}
|
|
11424
|
-
get providerIndexEnd_() {
|
|
11425
|
-
return this.providerIndexStart_ +
|
|
11426
|
-
(this.providerIndexes >>> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */);
|
|
11427
|
-
}
|
|
11428
|
-
}
|
|
11429
|
-
const TNodeDebug = TNode;
|
|
11430
|
-
function toDebugStyleBinding(tNode, isClassBased) {
|
|
11431
|
-
const tData = tNode.tView_.data;
|
|
11432
|
-
const bindings = [];
|
|
11433
|
-
const range = isClassBased ? tNode.classBindings : tNode.styleBindings;
|
|
11434
|
-
const prev = getTStylingRangePrev(range);
|
|
11435
|
-
const next = getTStylingRangeNext(range);
|
|
11436
|
-
let isTemplate = next !== 0;
|
|
11437
|
-
let cursor = isTemplate ? next : prev;
|
|
11438
|
-
while (cursor !== 0) {
|
|
11439
|
-
const itemKey = tData[cursor];
|
|
11440
|
-
const itemRange = tData[cursor + 1];
|
|
11441
|
-
bindings.unshift({
|
|
11442
|
-
key: itemKey,
|
|
11443
|
-
index: cursor,
|
|
11444
|
-
isTemplate: isTemplate,
|
|
11445
|
-
prevDuplicate: getTStylingRangePrevDuplicate(itemRange),
|
|
11446
|
-
nextDuplicate: getTStylingRangeNextDuplicate(itemRange),
|
|
11447
|
-
nextIndex: getTStylingRangeNext(itemRange),
|
|
11448
|
-
prevIndex: getTStylingRangePrev(itemRange),
|
|
11449
|
-
});
|
|
11450
|
-
if (cursor === prev)
|
|
11451
|
-
isTemplate = false;
|
|
11452
|
-
cursor = getTStylingRangePrev(itemRange);
|
|
11453
|
-
}
|
|
11454
|
-
bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);
|
|
11455
|
-
return bindings;
|
|
11456
|
-
}
|
|
11457
|
-
function processTNodeChildren(tNode, buf) {
|
|
11458
|
-
while (tNode) {
|
|
11459
|
-
buf.push(tNode.template_);
|
|
11460
|
-
tNode = tNode.next;
|
|
11461
|
-
}
|
|
11462
|
-
}
|
|
11463
|
-
class TViewData extends Array {
|
|
11464
|
-
}
|
|
11465
|
-
let TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because
|
|
11466
|
-
// `LView` constructor could have side-effects.
|
|
11467
|
-
/**
|
|
11468
|
-
* This function clones a blueprint and creates TData.
|
|
11469
|
-
*
|
|
11470
|
-
* Simple slice will keep the same type, and we need it to be TData
|
|
11471
|
-
*/
|
|
11472
|
-
function cloneToTViewData(list) {
|
|
11473
|
-
if (TVIEWDATA_EMPTY === undefined)
|
|
11474
|
-
TVIEWDATA_EMPTY = new TViewData();
|
|
11475
|
-
return TVIEWDATA_EMPTY.concat(list);
|
|
11476
|
-
}
|
|
11477
|
-
class LViewBlueprint extends Array {
|
|
11478
|
-
}
|
|
11479
|
-
class MatchesArray extends Array {
|
|
11480
|
-
}
|
|
11481
|
-
class TViewComponents extends Array {
|
|
11482
|
-
}
|
|
11483
|
-
class TNodeLocalNames extends Array {
|
|
11484
|
-
}
|
|
11485
|
-
class TNodeInitialInputs extends Array {
|
|
11486
|
-
}
|
|
11487
|
-
class LCleanup extends Array {
|
|
11488
|
-
}
|
|
11489
|
-
class TCleanup extends Array {
|
|
11490
|
-
}
|
|
11491
|
-
function attachLViewDebug(lView) {
|
|
11492
|
-
attachDebugObject(lView, new LViewDebug(lView));
|
|
11493
|
-
}
|
|
11494
|
-
function attachLContainerDebug(lContainer) {
|
|
11495
|
-
attachDebugObject(lContainer, new LContainerDebug(lContainer));
|
|
11496
|
-
}
|
|
11497
|
-
function toDebug(obj) {
|
|
11498
|
-
if (obj) {
|
|
11499
|
-
const debug = obj.debug;
|
|
11500
|
-
assertDefined(debug, 'Object does not have a debug representation.');
|
|
11501
|
-
return debug;
|
|
11502
|
-
}
|
|
11503
|
-
else {
|
|
11504
|
-
return obj;
|
|
11505
|
-
}
|
|
11506
|
-
}
|
|
11507
|
-
/**
|
|
11508
|
-
* Use this method to unwrap a native element in `LView` and convert it into HTML for easier
|
|
11509
|
-
* reading.
|
|
11510
|
-
*
|
|
11511
|
-
* @param value possibly wrapped native DOM node.
|
|
11512
|
-
* @param includeChildren If `true` then the serialized HTML form will include child elements
|
|
11513
|
-
* (same
|
|
11514
|
-
* as `outerHTML`). If `false` then the serialized HTML form will only contain the element
|
|
11515
|
-
* itself
|
|
11516
|
-
* (will not serialize child elements).
|
|
11517
|
-
*/
|
|
11518
|
-
function toHtml(value, includeChildren = false) {
|
|
11519
|
-
const node = unwrapRNode(value);
|
|
11520
|
-
if (node) {
|
|
11521
|
-
switch (node.nodeType) {
|
|
11522
|
-
case Node.TEXT_NODE:
|
|
11523
|
-
return node.textContent;
|
|
11524
|
-
case Node.COMMENT_NODE:
|
|
11525
|
-
return `<!--${node.textContent}-->`;
|
|
11526
|
-
case Node.ELEMENT_NODE:
|
|
11527
|
-
const outerHTML = node.outerHTML;
|
|
11528
|
-
if (includeChildren) {
|
|
11529
|
-
return outerHTML;
|
|
11530
|
-
}
|
|
11531
|
-
else {
|
|
11532
|
-
const innerHTML = '>' + node.innerHTML + '<';
|
|
11533
|
-
return (outerHTML.split(innerHTML)[0]) + '>';
|
|
11534
|
-
}
|
|
11535
|
-
}
|
|
11536
|
-
}
|
|
11537
|
-
return null;
|
|
11538
|
-
}
|
|
11539
|
-
class LViewDebug {
|
|
11540
|
-
constructor(_raw_lView) {
|
|
11541
|
-
this._raw_lView = _raw_lView;
|
|
11542
|
-
}
|
|
11543
|
-
/**
|
|
11544
|
-
* Flags associated with the `LView` unpacked into a more readable state.
|
|
11545
|
-
*/
|
|
11546
|
-
get flags() {
|
|
11547
|
-
const flags = this._raw_lView[FLAGS];
|
|
11548
|
-
return {
|
|
11549
|
-
__raw__flags__: flags,
|
|
11550
|
-
initPhaseState: flags & 3 /* LViewFlags.InitPhaseStateMask */,
|
|
11551
|
-
creationMode: !!(flags & 4 /* LViewFlags.CreationMode */),
|
|
11552
|
-
firstViewPass: !!(flags & 8 /* LViewFlags.FirstLViewPass */),
|
|
11553
|
-
checkAlways: !!(flags & 16 /* LViewFlags.CheckAlways */),
|
|
11554
|
-
dirty: !!(flags & 32 /* LViewFlags.Dirty */),
|
|
11555
|
-
attached: !!(flags & 64 /* LViewFlags.Attached */),
|
|
11556
|
-
destroyed: !!(flags & 128 /* LViewFlags.Destroyed */),
|
|
11557
|
-
isRoot: !!(flags & 256 /* LViewFlags.IsRoot */),
|
|
11558
|
-
indexWithinInitPhase: flags >> 11 /* LViewFlags.IndexWithinInitPhaseShift */,
|
|
11559
|
-
};
|
|
11560
|
-
}
|
|
11561
|
-
get parent() {
|
|
11562
|
-
return toDebug(this._raw_lView[PARENT]);
|
|
11563
|
-
}
|
|
11564
|
-
get hostHTML() {
|
|
11565
|
-
return toHtml(this._raw_lView[HOST], true);
|
|
11566
|
-
}
|
|
11567
|
-
get html() {
|
|
11568
|
-
return (this.nodes || []).map(mapToHTML).join('');
|
|
11569
|
-
}
|
|
11570
|
-
get context() {
|
|
11571
|
-
return this._raw_lView[CONTEXT];
|
|
11572
|
-
}
|
|
11573
|
-
/**
|
|
11574
|
-
* The tree of nodes associated with the current `LView`. The nodes have been normalized into
|
|
11575
|
-
* a tree structure with relevant details pulled out for readability.
|
|
11576
|
-
*/
|
|
11577
|
-
get nodes() {
|
|
11578
|
-
const lView = this._raw_lView;
|
|
11579
|
-
const tNode = lView[TVIEW].firstChild;
|
|
11580
|
-
return toDebugNodes(tNode, lView);
|
|
11581
|
-
}
|
|
11582
|
-
get template() {
|
|
11583
|
-
return this.tView.template_;
|
|
11584
|
-
}
|
|
11585
|
-
get tView() {
|
|
11586
|
-
return this._raw_lView[TVIEW];
|
|
11587
|
-
}
|
|
11588
|
-
get cleanup() {
|
|
11589
|
-
return this._raw_lView[CLEANUP];
|
|
11590
|
-
}
|
|
11591
|
-
get injector() {
|
|
11592
|
-
return this._raw_lView[INJECTOR$1];
|
|
11593
|
-
}
|
|
11594
|
-
get rendererFactory() {
|
|
11595
|
-
return this._raw_lView[RENDERER_FACTORY];
|
|
11596
|
-
}
|
|
11597
|
-
get renderer() {
|
|
11598
|
-
return this._raw_lView[RENDERER];
|
|
11599
|
-
}
|
|
11600
|
-
get sanitizer() {
|
|
11601
|
-
return this._raw_lView[SANITIZER];
|
|
11602
|
-
}
|
|
11603
|
-
get childHead() {
|
|
11604
|
-
return toDebug(this._raw_lView[CHILD_HEAD]);
|
|
11605
|
-
}
|
|
11606
|
-
get next() {
|
|
11607
|
-
return toDebug(this._raw_lView[NEXT]);
|
|
11608
|
-
}
|
|
11609
|
-
get childTail() {
|
|
11610
|
-
return toDebug(this._raw_lView[CHILD_TAIL]);
|
|
11611
|
-
}
|
|
11612
|
-
get declarationView() {
|
|
11613
|
-
return toDebug(this._raw_lView[DECLARATION_VIEW]);
|
|
11614
|
-
}
|
|
11615
|
-
get queries() {
|
|
11616
|
-
return this._raw_lView[QUERIES];
|
|
11617
|
-
}
|
|
11618
|
-
get tHost() {
|
|
11619
|
-
return this._raw_lView[T_HOST];
|
|
11620
|
-
}
|
|
11621
|
-
get id() {
|
|
11622
|
-
return this._raw_lView[ID];
|
|
11623
|
-
}
|
|
11624
|
-
get decls() {
|
|
11625
|
-
return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
|
|
11626
|
-
}
|
|
11627
|
-
get vars() {
|
|
11628
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);
|
|
11629
|
-
}
|
|
11630
|
-
get expando() {
|
|
11631
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);
|
|
11632
|
-
}
|
|
11633
|
-
/**
|
|
11634
|
-
* Normalized view of child views (and containers) attached at this location.
|
|
11635
|
-
*/
|
|
11636
|
-
get childViews() {
|
|
11637
|
-
const childViews = [];
|
|
11638
|
-
let child = this.childHead;
|
|
11639
|
-
while (child) {
|
|
11640
|
-
childViews.push(child);
|
|
11641
|
-
child = child.next;
|
|
10751
|
+
let inj;
|
|
10752
|
+
if (visibility instanceof SkipSelf) {
|
|
10753
|
+
inj = this.parent;
|
|
10754
|
+
}
|
|
10755
|
+
else {
|
|
10756
|
+
inj = this;
|
|
10757
|
+
}
|
|
10758
|
+
while (inj instanceof ReflectiveInjector_) {
|
|
10759
|
+
const inj_ = inj;
|
|
10760
|
+
const obj = inj_._getObjByKeyId(key.id);
|
|
10761
|
+
if (obj !== UNDEFINED)
|
|
10762
|
+
return obj;
|
|
10763
|
+
inj = inj_.parent;
|
|
10764
|
+
}
|
|
10765
|
+
if (inj !== null) {
|
|
10766
|
+
return inj.get(key.token, notFoundValue);
|
|
10767
|
+
}
|
|
10768
|
+
else {
|
|
10769
|
+
return this._throwOrNull(key, notFoundValue);
|
|
11642
10770
|
}
|
|
11643
|
-
return childViews;
|
|
11644
|
-
}
|
|
11645
|
-
}
|
|
11646
|
-
function mapToHTML(node) {
|
|
11647
|
-
if (node.type === 'ElementContainer') {
|
|
11648
|
-
return (node.children || []).map(mapToHTML).join('');
|
|
11649
10771
|
}
|
|
11650
|
-
|
|
11651
|
-
|
|
10772
|
+
get displayName() {
|
|
10773
|
+
const providers = _mapProviders(this, (b) => ' "' + b.key.displayName + '" ')
|
|
10774
|
+
.join(', ');
|
|
10775
|
+
return `ReflectiveInjector(providers: [${providers}])`;
|
|
11652
10776
|
}
|
|
11653
|
-
|
|
11654
|
-
return
|
|
10777
|
+
toString() {
|
|
10778
|
+
return this.displayName;
|
|
11655
10779
|
}
|
|
11656
10780
|
}
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
10781
|
+
ReflectiveInjector_.INJECTOR_KEY = ( /* @__PURE__ */ReflectiveKey.get(Injector));
|
|
10782
|
+
function _mapProviders(injector, fn) {
|
|
10783
|
+
const res = [];
|
|
10784
|
+
for (let i = 0; i < injector._providers.length; ++i) {
|
|
10785
|
+
res[i] = fn(injector.getProviderAtIndex(i));
|
|
11661
10786
|
}
|
|
11662
|
-
return
|
|
10787
|
+
return res;
|
|
11663
10788
|
}
|
|
10789
|
+
|
|
11664
10790
|
/**
|
|
11665
|
-
*
|
|
10791
|
+
* @license
|
|
10792
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11666
10793
|
*
|
|
11667
|
-
*
|
|
11668
|
-
*
|
|
10794
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
10795
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11669
10796
|
*/
|
|
11670
|
-
|
|
11671
|
-
if (tNode) {
|
|
11672
|
-
const debugNodes = [];
|
|
11673
|
-
let tNodeCursor = tNode;
|
|
11674
|
-
while (tNodeCursor) {
|
|
11675
|
-
debugNodes.push(buildDebugNode(tNodeCursor, lView));
|
|
11676
|
-
tNodeCursor = tNodeCursor.next;
|
|
11677
|
-
}
|
|
11678
|
-
return debugNodes;
|
|
11679
|
-
}
|
|
11680
|
-
else {
|
|
11681
|
-
return [];
|
|
11682
|
-
}
|
|
11683
|
-
}
|
|
11684
|
-
function buildDebugNode(tNode, lView) {
|
|
11685
|
-
const rawValue = lView[tNode.index];
|
|
11686
|
-
const native = unwrapRNode(rawValue);
|
|
11687
|
-
const factories = [];
|
|
11688
|
-
const instances = [];
|
|
11689
|
-
const tView = lView[TVIEW];
|
|
11690
|
-
for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {
|
|
11691
|
-
const def = tView.data[i];
|
|
11692
|
-
factories.push(def.type);
|
|
11693
|
-
instances.push(lView[i]);
|
|
11694
|
-
}
|
|
11695
|
-
return {
|
|
11696
|
-
html: toHtml(native),
|
|
11697
|
-
type: toTNodeTypeAsString(tNode.type),
|
|
11698
|
-
tNode,
|
|
11699
|
-
native: native,
|
|
11700
|
-
children: toDebugNodes(tNode.child, lView),
|
|
11701
|
-
factories,
|
|
11702
|
-
instances,
|
|
11703
|
-
injector: buildNodeInjectorDebug(tNode, tView, lView),
|
|
11704
|
-
get injectorResolutionPath() {
|
|
11705
|
-
return tNode.debugNodeInjectorPath(lView);
|
|
11706
|
-
},
|
|
11707
|
-
};
|
|
11708
|
-
}
|
|
11709
|
-
function buildNodeInjectorDebug(tNode, tView, lView) {
|
|
11710
|
-
const viewProviders = [];
|
|
11711
|
-
for (let i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) {
|
|
11712
|
-
viewProviders.push(tView.data[i]);
|
|
11713
|
-
}
|
|
11714
|
-
const providers = [];
|
|
11715
|
-
for (let i = tNode.providerIndexEnd_; i < tNode.directiveEnd; i++) {
|
|
11716
|
-
providers.push(tView.data[i]);
|
|
11717
|
-
}
|
|
11718
|
-
const nodeInjectorDebug = {
|
|
11719
|
-
bloom: toBloom(lView, tNode.injectorIndex),
|
|
11720
|
-
cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),
|
|
11721
|
-
providers,
|
|
11722
|
-
viewProviders,
|
|
11723
|
-
parentInjectorIndex: lView[tNode.providerIndexStart_ - 1],
|
|
11724
|
-
};
|
|
11725
|
-
return nodeInjectorDebug;
|
|
11726
|
-
}
|
|
10797
|
+
|
|
11727
10798
|
/**
|
|
11728
|
-
*
|
|
10799
|
+
* @license
|
|
10800
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11729
10801
|
*
|
|
11730
|
-
*
|
|
11731
|
-
*
|
|
10802
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
10803
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11732
10804
|
*/
|
|
11733
|
-
|
|
11734
|
-
const value = array[idx];
|
|
11735
|
-
// If not a number we print 8 `?` to retain alignment but let user know that it was called on
|
|
11736
|
-
// wrong type.
|
|
11737
|
-
if (typeof value !== 'number')
|
|
11738
|
-
return '????????';
|
|
11739
|
-
// We prefix 0s so that we have constant length number
|
|
11740
|
-
const text = '00000000' + value.toString(2);
|
|
11741
|
-
return text.substring(text.length - 8);
|
|
11742
|
-
}
|
|
10805
|
+
|
|
11743
10806
|
/**
|
|
11744
|
-
*
|
|
10807
|
+
* @license
|
|
10808
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11745
10809
|
*
|
|
11746
|
-
*
|
|
11747
|
-
*
|
|
10810
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
10811
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11748
10812
|
*/
|
|
11749
|
-
function
|
|
11750
|
-
|
|
11751
|
-
|
|
10813
|
+
function ɵɵdirectiveInject(token, flags = InjectFlags.Default) {
|
|
10814
|
+
const lView = getLView();
|
|
10815
|
+
// Fall back to inject() if view hasn't been created. This situation can happen in tests
|
|
10816
|
+
// if inject utilities are used before bootstrapping.
|
|
10817
|
+
if (lView === null) {
|
|
10818
|
+
// Verify that we will not get into infinite loop.
|
|
10819
|
+
ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);
|
|
10820
|
+
return ɵɵinject(token, flags);
|
|
11752
10821
|
}
|
|
11753
|
-
|
|
10822
|
+
const tNode = getCurrentTNode();
|
|
10823
|
+
return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);
|
|
11754
10824
|
}
|
|
11755
|
-
|
|
11756
|
-
|
|
11757
|
-
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
|
|
11765
|
-
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
11770
|
-
return this._raw_lContainer[MOVED_VIEWS];
|
|
11771
|
-
}
|
|
11772
|
-
get host() {
|
|
11773
|
-
return this._raw_lContainer[HOST];
|
|
11774
|
-
}
|
|
11775
|
-
get native() {
|
|
11776
|
-
return this._raw_lContainer[NATIVE];
|
|
11777
|
-
}
|
|
11778
|
-
get next() {
|
|
11779
|
-
return toDebug(this._raw_lContainer[NEXT]);
|
|
11780
|
-
}
|
|
10825
|
+
/**
|
|
10826
|
+
* Throws an error indicating that a factory function could not be generated by the compiler for a
|
|
10827
|
+
* particular class.
|
|
10828
|
+
*
|
|
10829
|
+
* This instruction allows the actual error message to be optimized away when ngDevMode is turned
|
|
10830
|
+
* off, saving bytes of generated code while still providing a good experience in dev mode.
|
|
10831
|
+
*
|
|
10832
|
+
* The name of the class is not mentioned here, but will be in the generated factory function name
|
|
10833
|
+
* and thus in the stack trace.
|
|
10834
|
+
*
|
|
10835
|
+
* @codeGenApi
|
|
10836
|
+
*/
|
|
10837
|
+
function ɵɵinvalidFactory() {
|
|
10838
|
+
const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';
|
|
10839
|
+
throw new Error(msg);
|
|
11781
10840
|
}
|
|
11782
10841
|
|
|
11783
10842
|
/**
|
|
@@ -11853,7 +10912,7 @@ function renderChildComponents(hostLView, components) {
|
|
|
11853
10912
|
}
|
|
11854
10913
|
}
|
|
11855
10914
|
function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
|
|
11856
|
-
const lView =
|
|
10915
|
+
const lView = tView.blueprint.slice();
|
|
11857
10916
|
lView[HOST] = host;
|
|
11858
10917
|
lView[FLAGS] = flags | 4 /* LViewFlags.CreationMode */ | 64 /* LViewFlags.Attached */ | 8 /* LViewFlags.FirstLViewPass */;
|
|
11859
10918
|
if (embeddedViewInjector !== null ||
|
|
@@ -11877,7 +10936,6 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
|
|
|
11877
10936
|
assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
|
|
11878
10937
|
lView[DECLARATION_COMPONENT_VIEW] =
|
|
11879
10938
|
tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;
|
|
11880
|
-
ngDevMode && attachLViewDebug(lView);
|
|
11881
10939
|
return lView;
|
|
11882
10940
|
}
|
|
11883
10941
|
function getOrCreateTNode(tView, index, type, name, attrs) {
|
|
@@ -12260,73 +11318,38 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12260
11318
|
const initialViewLength = bindingStartIndex + vars;
|
|
12261
11319
|
const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
|
|
12262
11320
|
const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;
|
|
12263
|
-
const tView = blueprint[TVIEW] =
|
|
12264
|
-
|
|
12265
|
-
blueprint
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
viewQuery
|
|
12269
|
-
declTNode
|
|
12270
|
-
|
|
12271
|
-
bindingStartIndex
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
typeof directives === 'function' ?
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
|
|
12295
|
-
false, // incompleteFirstPass: boolean
|
|
12296
|
-
decls, // ngDevMode only: decls
|
|
12297
|
-
vars) :
|
|
12298
|
-
{
|
|
12299
|
-
type: type,
|
|
12300
|
-
blueprint: blueprint,
|
|
12301
|
-
template: templateFn,
|
|
12302
|
-
queries: null,
|
|
12303
|
-
viewQuery: viewQuery,
|
|
12304
|
-
declTNode: declTNode,
|
|
12305
|
-
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
12306
|
-
bindingStartIndex: bindingStartIndex,
|
|
12307
|
-
expandoStartIndex: initialViewLength,
|
|
12308
|
-
hostBindingOpCodes: null,
|
|
12309
|
-
firstCreatePass: true,
|
|
12310
|
-
firstUpdatePass: true,
|
|
12311
|
-
staticViewQueries: false,
|
|
12312
|
-
staticContentQueries: false,
|
|
12313
|
-
preOrderHooks: null,
|
|
12314
|
-
preOrderCheckHooks: null,
|
|
12315
|
-
contentHooks: null,
|
|
12316
|
-
contentCheckHooks: null,
|
|
12317
|
-
viewHooks: null,
|
|
12318
|
-
viewCheckHooks: null,
|
|
12319
|
-
destroyHooks: null,
|
|
12320
|
-
cleanup: null,
|
|
12321
|
-
contentQueries: null,
|
|
12322
|
-
components: null,
|
|
12323
|
-
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
12324
|
-
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
12325
|
-
firstChild: null,
|
|
12326
|
-
schemas: schemas,
|
|
12327
|
-
consts: consts,
|
|
12328
|
-
incompleteFirstPass: false
|
|
12329
|
-
};
|
|
11321
|
+
const tView = blueprint[TVIEW] = {
|
|
11322
|
+
type: type,
|
|
11323
|
+
blueprint: blueprint,
|
|
11324
|
+
template: templateFn,
|
|
11325
|
+
queries: null,
|
|
11326
|
+
viewQuery: viewQuery,
|
|
11327
|
+
declTNode: declTNode,
|
|
11328
|
+
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
11329
|
+
bindingStartIndex: bindingStartIndex,
|
|
11330
|
+
expandoStartIndex: initialViewLength,
|
|
11331
|
+
hostBindingOpCodes: null,
|
|
11332
|
+
firstCreatePass: true,
|
|
11333
|
+
firstUpdatePass: true,
|
|
11334
|
+
staticViewQueries: false,
|
|
11335
|
+
staticContentQueries: false,
|
|
11336
|
+
preOrderHooks: null,
|
|
11337
|
+
preOrderCheckHooks: null,
|
|
11338
|
+
contentHooks: null,
|
|
11339
|
+
contentCheckHooks: null,
|
|
11340
|
+
viewHooks: null,
|
|
11341
|
+
viewCheckHooks: null,
|
|
11342
|
+
destroyHooks: null,
|
|
11343
|
+
cleanup: null,
|
|
11344
|
+
contentQueries: null,
|
|
11345
|
+
components: null,
|
|
11346
|
+
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
11347
|
+
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
11348
|
+
firstChild: null,
|
|
11349
|
+
schemas: schemas,
|
|
11350
|
+
consts: consts,
|
|
11351
|
+
incompleteFirstPass: false
|
|
11352
|
+
};
|
|
12330
11353
|
if (ngDevMode) {
|
|
12331
11354
|
// For performance reasons it is important that the tView retains the same shape during runtime.
|
|
12332
11355
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12336,7 +11359,7 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12336
11359
|
return tView;
|
|
12337
11360
|
}
|
|
12338
11361
|
function createViewBlueprint(bindingStartIndex, initialViewLength) {
|
|
12339
|
-
const blueprint =
|
|
11362
|
+
const blueprint = [];
|
|
12340
11363
|
for (let i = 0; i < initialViewLength; i++) {
|
|
12341
11364
|
blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);
|
|
12342
11365
|
}
|
|
@@ -12389,74 +11412,40 @@ function createTNode(tView, tParent, type, index, value, attrs) {
|
|
|
12389
11412
|
ngDevMode && ngDevMode.tNode++;
|
|
12390
11413
|
ngDevMode && tParent && assertTNodeForTView(tParent, tView);
|
|
12391
11414
|
let injectorIndex = tParent ? tParent.injectorIndex : -1;
|
|
12392
|
-
const tNode =
|
|
12393
|
-
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
-1,
|
|
12399
|
-
-1,
|
|
12400
|
-
-1,
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
0,
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
null,
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12422
|
-
|
|
12423
|
-
|
|
12424
|
-
0,
|
|
12425
|
-
|
|
12426
|
-
{
|
|
12427
|
-
type,
|
|
12428
|
-
index,
|
|
12429
|
-
insertBeforeIndex: null,
|
|
12430
|
-
injectorIndex,
|
|
12431
|
-
directiveStart: -1,
|
|
12432
|
-
directiveEnd: -1,
|
|
12433
|
-
directiveStylingLast: -1,
|
|
12434
|
-
componentOffset: -1,
|
|
12435
|
-
propertyBindings: null,
|
|
12436
|
-
flags: 0,
|
|
12437
|
-
providerIndexes: 0,
|
|
12438
|
-
value: value,
|
|
12439
|
-
attrs: attrs,
|
|
12440
|
-
mergedAttrs: null,
|
|
12441
|
-
localNames: null,
|
|
12442
|
-
initialInputs: undefined,
|
|
12443
|
-
inputs: null,
|
|
12444
|
-
outputs: null,
|
|
12445
|
-
tViews: null,
|
|
12446
|
-
next: null,
|
|
12447
|
-
projectionNext: null,
|
|
12448
|
-
child: null,
|
|
12449
|
-
parent: tParent,
|
|
12450
|
-
projection: null,
|
|
12451
|
-
styles: null,
|
|
12452
|
-
stylesWithoutHost: null,
|
|
12453
|
-
residualStyles: undefined,
|
|
12454
|
-
classes: null,
|
|
12455
|
-
classesWithoutHost: null,
|
|
12456
|
-
residualClasses: undefined,
|
|
12457
|
-
classBindings: 0,
|
|
12458
|
-
styleBindings: 0,
|
|
12459
|
-
};
|
|
11415
|
+
const tNode = {
|
|
11416
|
+
type,
|
|
11417
|
+
index,
|
|
11418
|
+
insertBeforeIndex: null,
|
|
11419
|
+
injectorIndex,
|
|
11420
|
+
directiveStart: -1,
|
|
11421
|
+
directiveEnd: -1,
|
|
11422
|
+
directiveStylingLast: -1,
|
|
11423
|
+
componentOffset: -1,
|
|
11424
|
+
propertyBindings: null,
|
|
11425
|
+
flags: 0,
|
|
11426
|
+
providerIndexes: 0,
|
|
11427
|
+
value: value,
|
|
11428
|
+
attrs: attrs,
|
|
11429
|
+
mergedAttrs: null,
|
|
11430
|
+
localNames: null,
|
|
11431
|
+
initialInputs: undefined,
|
|
11432
|
+
inputs: null,
|
|
11433
|
+
outputs: null,
|
|
11434
|
+
tViews: null,
|
|
11435
|
+
next: null,
|
|
11436
|
+
projectionNext: null,
|
|
11437
|
+
child: null,
|
|
11438
|
+
parent: tParent,
|
|
11439
|
+
projection: null,
|
|
11440
|
+
styles: null,
|
|
11441
|
+
stylesWithoutHost: null,
|
|
11442
|
+
residualStyles: undefined,
|
|
11443
|
+
classes: null,
|
|
11444
|
+
classesWithoutHost: null,
|
|
11445
|
+
residualClasses: undefined,
|
|
11446
|
+
classBindings: 0,
|
|
11447
|
+
styleBindings: 0,
|
|
11448
|
+
};
|
|
12460
11449
|
if (ngDevMode) {
|
|
12461
11450
|
// For performance reasons it is important that the tNode retains the same shape during runtime.
|
|
12462
11451
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12513,7 +11502,7 @@ function initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefinitionMa
|
|
|
12513
11502
|
const end = tNode.directiveEnd;
|
|
12514
11503
|
const tViewData = tView.data;
|
|
12515
11504
|
const tNodeAttrs = tNode.attrs;
|
|
12516
|
-
const inputsFromAttrs =
|
|
11505
|
+
const inputsFromAttrs = [];
|
|
12517
11506
|
let inputsStore = null;
|
|
12518
11507
|
let outputsStore = null;
|
|
12519
11508
|
for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {
|
|
@@ -12782,6 +11771,12 @@ function lastSelectedElementIdx(hostBindingOpCodes) {
|
|
|
12782
11771
|
function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
12783
11772
|
const start = tNode.directiveStart;
|
|
12784
11773
|
const end = tNode.directiveEnd;
|
|
11774
|
+
// The component view needs to be created before creating the node injector
|
|
11775
|
+
// since it is used to inject some special symbols like `ChangeDetectorRef`.
|
|
11776
|
+
if (isComponentHost(tNode)) {
|
|
11777
|
+
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
11778
|
+
addComponentLogic(lView, tNode, tView.data[start + tNode.componentOffset]);
|
|
11779
|
+
}
|
|
12785
11780
|
if (!tView.firstCreatePass) {
|
|
12786
11781
|
getOrCreateNodeInjectorForNode(tNode, lView);
|
|
12787
11782
|
}
|
|
@@ -12789,19 +11784,14 @@ function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
|
12789
11784
|
const initialInputs = tNode.initialInputs;
|
|
12790
11785
|
for (let i = start; i < end; i++) {
|
|
12791
11786
|
const def = tView.data[i];
|
|
12792
|
-
const isComponent = isComponentDef(def);
|
|
12793
|
-
if (isComponent) {
|
|
12794
|
-
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
12795
|
-
addComponentLogic(lView, tNode, def);
|
|
12796
|
-
}
|
|
12797
11787
|
const directive = getNodeInjectable(lView, tView, i, tNode);
|
|
12798
11788
|
attachPatchData(directive, lView);
|
|
12799
11789
|
if (initialInputs !== null) {
|
|
12800
11790
|
setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);
|
|
12801
11791
|
}
|
|
12802
|
-
if (
|
|
11792
|
+
if (isComponentDef(def)) {
|
|
12803
11793
|
const componentView = getComponentLViewByIndex(tNode.index, lView);
|
|
12804
|
-
componentView[CONTEXT] =
|
|
11794
|
+
componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);
|
|
12805
11795
|
}
|
|
12806
11796
|
}
|
|
12807
11797
|
}
|
|
@@ -12852,7 +11842,7 @@ function findDirectiveDefMatches(tView, tNode) {
|
|
|
12852
11842
|
for (let i = 0; i < registry.length; i++) {
|
|
12853
11843
|
const def = registry[i];
|
|
12854
11844
|
if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {
|
|
12855
|
-
matches || (matches =
|
|
11845
|
+
matches || (matches = []);
|
|
12856
11846
|
if (isComponentDef(def)) {
|
|
12857
11847
|
if (ngDevMode) {
|
|
12858
11848
|
assertTNodeType(tNode, 2 /* TNodeType.Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
|
|
@@ -12910,13 +11900,12 @@ function markAsComponentHost(tView, hostTNode, componentOffset) {
|
|
|
12910
11900
|
ngDevMode && assertFirstCreatePass(tView);
|
|
12911
11901
|
ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');
|
|
12912
11902
|
hostTNode.componentOffset = componentOffset;
|
|
12913
|
-
(tView.components || (tView.components =
|
|
12914
|
-
.push(hostTNode.index);
|
|
11903
|
+
(tView.components || (tView.components = [])).push(hostTNode.index);
|
|
12915
11904
|
}
|
|
12916
11905
|
/** Caches local names and their matching directive indices for query and template lookups. */
|
|
12917
11906
|
function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
|
|
12918
11907
|
if (localRefs) {
|
|
12919
|
-
const localNames = tNode.localNames =
|
|
11908
|
+
const localNames = tNode.localNames = [];
|
|
12920
11909
|
// Local names must be stored in tNode in the same order that localRefs are defined
|
|
12921
11910
|
// in the template to ensure the data is loaded in the same slots as their refs
|
|
12922
11911
|
// in the template (for template queries).
|
|
@@ -13099,9 +12088,6 @@ function generateInitialInputs(inputs, directiveIndex, attrs) {
|
|
|
13099
12088
|
//////////////////////////
|
|
13100
12089
|
//// ViewContainer & View
|
|
13101
12090
|
//////////////////////////
|
|
13102
|
-
// Not sure why I need to do `any` here but TS complains later.
|
|
13103
|
-
const LContainerArray = class LContainer extends Array {
|
|
13104
|
-
};
|
|
13105
12091
|
/**
|
|
13106
12092
|
* Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
|
|
13107
12093
|
*
|
|
@@ -13114,20 +12100,20 @@ const LContainerArray = class LContainer extends Array {
|
|
|
13114
12100
|
*/
|
|
13115
12101
|
function createLContainer(hostNative, currentView, native, tNode) {
|
|
13116
12102
|
ngDevMode && assertLView(currentView);
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
12103
|
+
const lContainer = [
|
|
12104
|
+
hostNative,
|
|
12105
|
+
true,
|
|
12106
|
+
false,
|
|
12107
|
+
currentView,
|
|
12108
|
+
null,
|
|
12109
|
+
0,
|
|
12110
|
+
tNode,
|
|
12111
|
+
native,
|
|
12112
|
+
null,
|
|
12113
|
+
null, // moved views
|
|
12114
|
+
];
|
|
13128
12115
|
ngDevMode &&
|
|
13129
12116
|
assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');
|
|
13130
|
-
ngDevMode && attachLContainerDebug(lContainer);
|
|
13131
12117
|
return lContainer;
|
|
13132
12118
|
}
|
|
13133
12119
|
/**
|
|
@@ -13401,10 +12387,10 @@ function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex,
|
|
|
13401
12387
|
}
|
|
13402
12388
|
function getOrCreateLViewCleanup(view) {
|
|
13403
12389
|
// top level variables should not be exported for performance reasons (PERF_NOTES.md)
|
|
13404
|
-
return view[CLEANUP] || (view[CLEANUP] =
|
|
12390
|
+
return view[CLEANUP] || (view[CLEANUP] = []);
|
|
13405
12391
|
}
|
|
13406
12392
|
function getOrCreateTViewCleanup(tView) {
|
|
13407
|
-
return tView.cleanup || (tView.cleanup =
|
|
12393
|
+
return tView.cleanup || (tView.cleanup = []);
|
|
13408
12394
|
}
|
|
13409
12395
|
/**
|
|
13410
12396
|
* There are cases where the sub component's renderer needs to be included
|
|
@@ -14016,17 +13002,6 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
14016
13002
|
return new ComponentRef(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);
|
|
14017
13003
|
}
|
|
14018
13004
|
}
|
|
14019
|
-
const componentFactoryResolver = new ComponentFactoryResolver();
|
|
14020
|
-
/**
|
|
14021
|
-
* Creates a ComponentFactoryResolver and stores it on the injector. Or, if the
|
|
14022
|
-
* ComponentFactoryResolver
|
|
14023
|
-
* already exists, retrieves the existing ComponentFactoryResolver.
|
|
14024
|
-
*
|
|
14025
|
-
* @returns The ComponentFactoryResolver instance to use
|
|
14026
|
-
*/
|
|
14027
|
-
function injectComponentFactoryResolver() {
|
|
14028
|
-
return componentFactoryResolver;
|
|
14029
|
-
}
|
|
14030
13005
|
/**
|
|
14031
13006
|
* Represents an instance of a Component created via a {@link ComponentFactory}.
|
|
14032
13007
|
*
|
|
@@ -16612,6 +15587,62 @@ function ɵɵpropertyInterpolateV(propName, values, sanitizer) {
|
|
|
16612
15587
|
return ɵɵpropertyInterpolateV;
|
|
16613
15588
|
}
|
|
16614
15589
|
|
|
15590
|
+
/**
|
|
15591
|
+
* @license
|
|
15592
|
+
* Copyright Google LLC All Rights Reserved.
|
|
15593
|
+
*
|
|
15594
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
15595
|
+
* found in the LICENSE file at https://angular.io/license
|
|
15596
|
+
*/
|
|
15597
|
+
function toTStylingRange(prev, next) {
|
|
15598
|
+
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15599
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15600
|
+
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
15601
|
+
}
|
|
15602
|
+
function getTStylingRangePrev(tStylingRange) {
|
|
15603
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15604
|
+
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
15605
|
+
}
|
|
15606
|
+
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
15607
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15608
|
+
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
15609
|
+
2 /* StylingRange.PREV_DUPLICATE */;
|
|
15610
|
+
}
|
|
15611
|
+
function setTStylingRangePrev(tStylingRange, previous) {
|
|
15612
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15613
|
+
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15614
|
+
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
15615
|
+
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
15616
|
+
}
|
|
15617
|
+
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
15618
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15619
|
+
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
15620
|
+
}
|
|
15621
|
+
function getTStylingRangeNext(tStylingRange) {
|
|
15622
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15623
|
+
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
15624
|
+
}
|
|
15625
|
+
function setTStylingRangeNext(tStylingRange, next) {
|
|
15626
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15627
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15628
|
+
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
15629
|
+
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
15630
|
+
}
|
|
15631
|
+
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
15632
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15633
|
+
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
15634
|
+
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
15635
|
+
}
|
|
15636
|
+
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
15637
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15638
|
+
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
15639
|
+
}
|
|
15640
|
+
function getTStylingRangeTail(tStylingRange) {
|
|
15641
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15642
|
+
const next = getTStylingRangeNext(tStylingRange);
|
|
15643
|
+
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
15644
|
+
}
|
|
15645
|
+
|
|
16615
15646
|
/**
|
|
16616
15647
|
* @license
|
|
16617
15648
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -19664,7 +18695,7 @@ var I18nCreateOpCode;
|
|
|
19664
18695
|
})(I18nCreateOpCode || (I18nCreateOpCode = {}));
|
|
19665
18696
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
19666
18697
|
// failure based on types.
|
|
19667
|
-
const unusedValueExportToPlacateAjd
|
|
18698
|
+
const unusedValueExportToPlacateAjd = 1;
|
|
19668
18699
|
|
|
19669
18700
|
/**
|
|
19670
18701
|
* @license
|
|
@@ -20433,6 +19464,46 @@ function loadIcuContainerVisitor() {
|
|
|
20433
19464
|
return icuContainerIteratorStart;
|
|
20434
19465
|
}
|
|
20435
19466
|
|
|
19467
|
+
/**
|
|
19468
|
+
* @license
|
|
19469
|
+
* Copyright Google LLC All Rights Reserved.
|
|
19470
|
+
*
|
|
19471
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
19472
|
+
* found in the LICENSE file at https://angular.io/license
|
|
19473
|
+
*/
|
|
19474
|
+
/**
|
|
19475
|
+
* Patch a `debug` property on top of the existing object.
|
|
19476
|
+
*
|
|
19477
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19478
|
+
*
|
|
19479
|
+
* @param obj Object to patch
|
|
19480
|
+
* @param debug Value to patch
|
|
19481
|
+
*/
|
|
19482
|
+
function attachDebugObject(obj, debug) {
|
|
19483
|
+
if (ngDevMode) {
|
|
19484
|
+
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
19485
|
+
}
|
|
19486
|
+
else {
|
|
19487
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19488
|
+
}
|
|
19489
|
+
}
|
|
19490
|
+
/**
|
|
19491
|
+
* Patch a `debug` property getter on top of the existing object.
|
|
19492
|
+
*
|
|
19493
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19494
|
+
*
|
|
19495
|
+
* @param obj Object to patch
|
|
19496
|
+
* @param debugGetter Getter returning a value to patch
|
|
19497
|
+
*/
|
|
19498
|
+
function attachDebugGetter(obj, debugGetter) {
|
|
19499
|
+
if (ngDevMode) {
|
|
19500
|
+
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
19501
|
+
}
|
|
19502
|
+
else {
|
|
19503
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19504
|
+
}
|
|
19505
|
+
}
|
|
19506
|
+
|
|
20436
19507
|
/**
|
|
20437
19508
|
* @license
|
|
20438
19509
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -22402,32 +21473,6 @@ function sortListeners(a, b) {
|
|
|
22402
21473
|
function isDirectiveDefHack(obj) {
|
|
22403
21474
|
return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;
|
|
22404
21475
|
}
|
|
22405
|
-
/**
|
|
22406
|
-
* Returns the attached `DebugNode` instance for an element in the DOM.
|
|
22407
|
-
*
|
|
22408
|
-
* @param element DOM element which is owned by an existing component's view.
|
|
22409
|
-
*/
|
|
22410
|
-
function getDebugNode$1(element) {
|
|
22411
|
-
if (ngDevMode && !(element instanceof Node)) {
|
|
22412
|
-
throw new Error('Expecting instance of DOM Element');
|
|
22413
|
-
}
|
|
22414
|
-
const lContext = getLContext(element);
|
|
22415
|
-
const lView = lContext ? lContext.lView : null;
|
|
22416
|
-
if (lView === null) {
|
|
22417
|
-
return null;
|
|
22418
|
-
}
|
|
22419
|
-
const nodeIndex = lContext.nodeIndex;
|
|
22420
|
-
if (nodeIndex !== -1) {
|
|
22421
|
-
const valueInLView = lView[nodeIndex];
|
|
22422
|
-
// this means that value in the lView is a component with its own
|
|
22423
|
-
// data. In this situation the TNode is not accessed at the same spot.
|
|
22424
|
-
const tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex);
|
|
22425
|
-
ngDevMode &&
|
|
22426
|
-
assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');
|
|
22427
|
-
return buildDebugNode(tNode, lView);
|
|
22428
|
-
}
|
|
22429
|
-
return null;
|
|
22430
|
-
}
|
|
22431
21476
|
/**
|
|
22432
21477
|
* Retrieve the component `LView` from component/element.
|
|
22433
21478
|
*
|
|
@@ -23648,29 +22693,6 @@ function createContainerRef(hostTNode, hostLView) {
|
|
|
23648
22693
|
* Use of this source code is governed by an MIT-style license that can be
|
|
23649
22694
|
* found in the LICENSE file at https://angular.io/license
|
|
23650
22695
|
*/
|
|
23651
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
23652
|
-
// failure based on types.
|
|
23653
|
-
const unusedValueExportToPlacateAjd$1 = 1;
|
|
23654
|
-
|
|
23655
|
-
/**
|
|
23656
|
-
* @license
|
|
23657
|
-
* Copyright Google LLC All Rights Reserved.
|
|
23658
|
-
*
|
|
23659
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
23660
|
-
* found in the LICENSE file at https://angular.io/license
|
|
23661
|
-
*/
|
|
23662
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
23663
|
-
// failure based on types.
|
|
23664
|
-
const unusedValueExportToPlacateAjd = 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
|
-
const unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$6 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd;
|
|
23674
22696
|
class LQuery_ {
|
|
23675
22697
|
constructor(queryList) {
|
|
23676
22698
|
this.queryList = queryList;
|