@angular/core 11.2.0-rc.0 → 11.2.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/bundles/core-testing.umd.js +2 -2
- package/bundles/core-testing.umd.min.js +2 -2
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +467 -435
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +148 -148
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +36 -20
- package/core.metadata.json +1 -1
- package/esm2015/src/application_module.js +2 -3
- package/esm2015/src/application_ref.js +7 -6
- package/esm2015/src/change_detection/pipe_transform.js +1 -1
- package/esm2015/src/compiler/compiler_facade_interface.js +1 -1
- package/esm2015/src/core_render3_private_export.js +2 -2
- package/esm2015/src/di/inject_switch.js +3 -2
- package/esm2015/src/di/injector_compatibility.js +2 -2
- package/esm2015/src/di/metadata.js +1 -1
- package/esm2015/src/metadata/directives.js +1 -1
- package/esm2015/src/render3/assert.js +10 -2
- package/esm2015/src/render3/collect_native_nodes.js +7 -12
- package/esm2015/src/render3/jit/partial.js +10 -1
- package/esm2015/src/render3/node_manipulation.js +20 -8
- package/esm2015/src/util/security/trusted_types.js +9 -2
- package/esm2015/src/version.js +1 -1
- package/fesm2015/core.js +163 -132
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +2 -2
- package/package.json +1 -1
- package/src/r3_symbols.d.ts +2 -2
- package/testing/testing.d.ts +2 -2
- package/testing.d.ts +2 -2
package/bundles/core.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v11.2.
|
|
3
|
-
* (c) 2010-
|
|
2
|
+
* @license Angular v11.2.3
|
|
3
|
+
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -132,6 +132,414 @@
|
|
|
132
132
|
fn.__forward_ref__ === forwardRef;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
/*! *****************************************************************************
|
|
136
|
+
Copyright (c) Microsoft Corporation.
|
|
137
|
+
|
|
138
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
139
|
+
purpose with or without fee is hereby granted.
|
|
140
|
+
|
|
141
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
142
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
143
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
144
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
145
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
146
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
147
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
148
|
+
***************************************************************************** */
|
|
149
|
+
/* global Reflect, Promise */
|
|
150
|
+
var extendStatics = function (d, b) {
|
|
151
|
+
extendStatics = Object.setPrototypeOf ||
|
|
152
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
153
|
+
function (d, b) { for (var p in b)
|
|
154
|
+
if (b.hasOwnProperty(p))
|
|
155
|
+
d[p] = b[p]; };
|
|
156
|
+
return extendStatics(d, b);
|
|
157
|
+
};
|
|
158
|
+
function __extends(d, b) {
|
|
159
|
+
extendStatics(d, b);
|
|
160
|
+
function __() { this.constructor = d; }
|
|
161
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
162
|
+
}
|
|
163
|
+
var __assign = function () {
|
|
164
|
+
__assign = Object.assign || function __assign(t) {
|
|
165
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
166
|
+
s = arguments[i];
|
|
167
|
+
for (var p in s)
|
|
168
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
169
|
+
t[p] = s[p];
|
|
170
|
+
}
|
|
171
|
+
return t;
|
|
172
|
+
};
|
|
173
|
+
return __assign.apply(this, arguments);
|
|
174
|
+
};
|
|
175
|
+
function __rest(s, e) {
|
|
176
|
+
var t = {};
|
|
177
|
+
for (var p in s)
|
|
178
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
179
|
+
t[p] = s[p];
|
|
180
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
181
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
182
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
183
|
+
t[p[i]] = s[p[i]];
|
|
184
|
+
}
|
|
185
|
+
return t;
|
|
186
|
+
}
|
|
187
|
+
function __decorate(decorators, target, key, desc) {
|
|
188
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
189
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
190
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
191
|
+
else
|
|
192
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
193
|
+
if (d = decorators[i])
|
|
194
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
195
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
196
|
+
}
|
|
197
|
+
function __param(paramIndex, decorator) {
|
|
198
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
199
|
+
}
|
|
200
|
+
function __metadata(metadataKey, metadataValue) {
|
|
201
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
202
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
203
|
+
}
|
|
204
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
205
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
206
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
207
|
+
function fulfilled(value) { try {
|
|
208
|
+
step(generator.next(value));
|
|
209
|
+
}
|
|
210
|
+
catch (e) {
|
|
211
|
+
reject(e);
|
|
212
|
+
} }
|
|
213
|
+
function rejected(value) { try {
|
|
214
|
+
step(generator["throw"](value));
|
|
215
|
+
}
|
|
216
|
+
catch (e) {
|
|
217
|
+
reject(e);
|
|
218
|
+
} }
|
|
219
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
220
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
function __generator(thisArg, body) {
|
|
224
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
225
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
226
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
227
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
228
|
+
function step(op) {
|
|
229
|
+
if (f)
|
|
230
|
+
throw new TypeError("Generator is already executing.");
|
|
231
|
+
while (_)
|
|
232
|
+
try {
|
|
233
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
234
|
+
return t;
|
|
235
|
+
if (y = 0, t)
|
|
236
|
+
op = [op[0] & 2, t.value];
|
|
237
|
+
switch (op[0]) {
|
|
238
|
+
case 0:
|
|
239
|
+
case 1:
|
|
240
|
+
t = op;
|
|
241
|
+
break;
|
|
242
|
+
case 4:
|
|
243
|
+
_.label++;
|
|
244
|
+
return { value: op[1], done: false };
|
|
245
|
+
case 5:
|
|
246
|
+
_.label++;
|
|
247
|
+
y = op[1];
|
|
248
|
+
op = [0];
|
|
249
|
+
continue;
|
|
250
|
+
case 7:
|
|
251
|
+
op = _.ops.pop();
|
|
252
|
+
_.trys.pop();
|
|
253
|
+
continue;
|
|
254
|
+
default:
|
|
255
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
256
|
+
_ = 0;
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
260
|
+
_.label = op[1];
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
264
|
+
_.label = t[1];
|
|
265
|
+
t = op;
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
if (t && _.label < t[2]) {
|
|
269
|
+
_.label = t[2];
|
|
270
|
+
_.ops.push(op);
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
if (t[2])
|
|
274
|
+
_.ops.pop();
|
|
275
|
+
_.trys.pop();
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
op = body.call(thisArg, _);
|
|
279
|
+
}
|
|
280
|
+
catch (e) {
|
|
281
|
+
op = [6, e];
|
|
282
|
+
y = 0;
|
|
283
|
+
}
|
|
284
|
+
finally {
|
|
285
|
+
f = t = 0;
|
|
286
|
+
}
|
|
287
|
+
if (op[0] & 5)
|
|
288
|
+
throw op[1];
|
|
289
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
293
|
+
if (k2 === undefined)
|
|
294
|
+
k2 = k;
|
|
295
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
296
|
+
}) : (function (o, m, k, k2) {
|
|
297
|
+
if (k2 === undefined)
|
|
298
|
+
k2 = k;
|
|
299
|
+
o[k2] = m[k];
|
|
300
|
+
});
|
|
301
|
+
function __exportStar(m, exports) {
|
|
302
|
+
for (var p in m)
|
|
303
|
+
if (p !== "default" && !exports.hasOwnProperty(p))
|
|
304
|
+
__createBinding(exports, m, p);
|
|
305
|
+
}
|
|
306
|
+
function __values(o) {
|
|
307
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
308
|
+
if (m)
|
|
309
|
+
return m.call(o);
|
|
310
|
+
if (o && typeof o.length === "number")
|
|
311
|
+
return {
|
|
312
|
+
next: function () {
|
|
313
|
+
if (o && i >= o.length)
|
|
314
|
+
o = void 0;
|
|
315
|
+
return { value: o && o[i++], done: !o };
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
319
|
+
}
|
|
320
|
+
function __read(o, n) {
|
|
321
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
322
|
+
if (!m)
|
|
323
|
+
return o;
|
|
324
|
+
var i = m.call(o), r, ar = [], e;
|
|
325
|
+
try {
|
|
326
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
327
|
+
ar.push(r.value);
|
|
328
|
+
}
|
|
329
|
+
catch (error) {
|
|
330
|
+
e = { error: error };
|
|
331
|
+
}
|
|
332
|
+
finally {
|
|
333
|
+
try {
|
|
334
|
+
if (r && !r.done && (m = i["return"]))
|
|
335
|
+
m.call(i);
|
|
336
|
+
}
|
|
337
|
+
finally {
|
|
338
|
+
if (e)
|
|
339
|
+
throw e.error;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return ar;
|
|
343
|
+
}
|
|
344
|
+
function __spread() {
|
|
345
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
346
|
+
ar = ar.concat(__read(arguments[i]));
|
|
347
|
+
return ar;
|
|
348
|
+
}
|
|
349
|
+
function __spreadArrays() {
|
|
350
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
351
|
+
s += arguments[i].length;
|
|
352
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
353
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
354
|
+
r[k] = a[j];
|
|
355
|
+
return r;
|
|
356
|
+
}
|
|
357
|
+
;
|
|
358
|
+
function __await(v) {
|
|
359
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
360
|
+
}
|
|
361
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
362
|
+
if (!Symbol.asyncIterator)
|
|
363
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
364
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
365
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
366
|
+
function verb(n) { if (g[n])
|
|
367
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
368
|
+
function resume(n, v) { try {
|
|
369
|
+
step(g[n](v));
|
|
370
|
+
}
|
|
371
|
+
catch (e) {
|
|
372
|
+
settle(q[0][3], e);
|
|
373
|
+
} }
|
|
374
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
375
|
+
function fulfill(value) { resume("next", value); }
|
|
376
|
+
function reject(value) { resume("throw", value); }
|
|
377
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
378
|
+
resume(q[0][0], q[0][1]); }
|
|
379
|
+
}
|
|
380
|
+
function __asyncDelegator(o) {
|
|
381
|
+
var i, p;
|
|
382
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
383
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
384
|
+
}
|
|
385
|
+
function __asyncValues(o) {
|
|
386
|
+
if (!Symbol.asyncIterator)
|
|
387
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
388
|
+
var m = o[Symbol.asyncIterator], i;
|
|
389
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
390
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
391
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
392
|
+
}
|
|
393
|
+
function __makeTemplateObject(cooked, raw) {
|
|
394
|
+
if (Object.defineProperty) {
|
|
395
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
cooked.raw = raw;
|
|
399
|
+
}
|
|
400
|
+
return cooked;
|
|
401
|
+
}
|
|
402
|
+
;
|
|
403
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
404
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
405
|
+
}) : function (o, v) {
|
|
406
|
+
o["default"] = v;
|
|
407
|
+
};
|
|
408
|
+
function __importStar(mod) {
|
|
409
|
+
if (mod && mod.__esModule)
|
|
410
|
+
return mod;
|
|
411
|
+
var result = {};
|
|
412
|
+
if (mod != null)
|
|
413
|
+
for (var k in mod)
|
|
414
|
+
if (Object.hasOwnProperty.call(mod, k))
|
|
415
|
+
__createBinding(result, mod, k);
|
|
416
|
+
__setModuleDefault(result, mod);
|
|
417
|
+
return result;
|
|
418
|
+
}
|
|
419
|
+
function __importDefault(mod) {
|
|
420
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
421
|
+
}
|
|
422
|
+
function __classPrivateFieldGet(receiver, privateMap) {
|
|
423
|
+
if (!privateMap.has(receiver)) {
|
|
424
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
425
|
+
}
|
|
426
|
+
return privateMap.get(receiver);
|
|
427
|
+
}
|
|
428
|
+
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
429
|
+
if (!privateMap.has(receiver)) {
|
|
430
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
431
|
+
}
|
|
432
|
+
privateMap.set(receiver, value);
|
|
433
|
+
return value;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* @license
|
|
438
|
+
* Copyright Google LLC All Rights Reserved.
|
|
439
|
+
*
|
|
440
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
441
|
+
* found in the LICENSE file at https://angular.io/license
|
|
442
|
+
*/
|
|
443
|
+
// Base URL for the error details page.
|
|
444
|
+
// Keep this value in sync with a similar const in
|
|
445
|
+
// `packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts`.
|
|
446
|
+
var ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';
|
|
447
|
+
var RuntimeError = /** @class */ (function (_super) {
|
|
448
|
+
__extends(RuntimeError, _super);
|
|
449
|
+
function RuntimeError(code, message) {
|
|
450
|
+
var _this = _super.call(this, formatRuntimeError(code, message)) || this;
|
|
451
|
+
_this.code = code;
|
|
452
|
+
return _this;
|
|
453
|
+
}
|
|
454
|
+
return RuntimeError;
|
|
455
|
+
}(Error));
|
|
456
|
+
// Contains a set of error messages that have details guides at angular.io.
|
|
457
|
+
// Full list of available error guides can be found at https://angular.io/errors
|
|
458
|
+
/* tslint:disable:no-toplevel-property-access */
|
|
459
|
+
var RUNTIME_ERRORS_WITH_GUIDES = new Set([
|
|
460
|
+
"100" /* EXPRESSION_CHANGED_AFTER_CHECKED */,
|
|
461
|
+
"200" /* CYCLIC_DI_DEPENDENCY */,
|
|
462
|
+
"201" /* PROVIDER_NOT_FOUND */,
|
|
463
|
+
"300" /* MULTIPLE_COMPONENTS_MATCH */,
|
|
464
|
+
"301" /* EXPORT_NOT_FOUND */,
|
|
465
|
+
"302" /* PIPE_NOT_FOUND */,
|
|
466
|
+
]);
|
|
467
|
+
/* tslint:enable:no-toplevel-property-access */
|
|
468
|
+
/** Called to format a runtime error */
|
|
469
|
+
function formatRuntimeError(code, message) {
|
|
470
|
+
var fullCode = code ? "NG0" + code + ": " : '';
|
|
471
|
+
var errorMessage = "" + fullCode + message;
|
|
472
|
+
// Some runtime errors are still thrown without `ngDevMode` (for example
|
|
473
|
+
// `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling
|
|
474
|
+
// `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles.
|
|
475
|
+
// TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added
|
|
476
|
+
// there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check
|
|
477
|
+
// from this code).
|
|
478
|
+
if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) {
|
|
479
|
+
errorMessage = errorMessage + ". Find more at " + ERROR_DETAILS_PAGE_BASE_URL + "/NG0" + code;
|
|
480
|
+
}
|
|
481
|
+
return errorMessage;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* @license
|
|
486
|
+
* Copyright Google LLC All Rights Reserved.
|
|
487
|
+
*
|
|
488
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
489
|
+
* found in the LICENSE file at https://angular.io/license
|
|
490
|
+
*/
|
|
491
|
+
/**
|
|
492
|
+
* Used for stringify render output in Ivy.
|
|
493
|
+
* Important! This function is very performance-sensitive and we should
|
|
494
|
+
* be extra careful not to introduce megamorphic reads in it.
|
|
495
|
+
* Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.
|
|
496
|
+
*/
|
|
497
|
+
function renderStringify(value) {
|
|
498
|
+
if (typeof value === 'string')
|
|
499
|
+
return value;
|
|
500
|
+
if (value == null)
|
|
501
|
+
return '';
|
|
502
|
+
// Use `String` so that it invokes the `toString` method of the value. Note that this
|
|
503
|
+
// appears to be faster than calling `value.toString` (see `render_stringify` benchmark).
|
|
504
|
+
return String(value);
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Used to stringify a value so that it can be displayed in an error message.
|
|
508
|
+
* Important! This function contains a megamorphic read and should only be
|
|
509
|
+
* used for error messages.
|
|
510
|
+
*/
|
|
511
|
+
function stringifyForError(value) {
|
|
512
|
+
if (typeof value === 'function')
|
|
513
|
+
return value.name || value.toString();
|
|
514
|
+
if (typeof value === 'object' && value != null && typeof value.type === 'function') {
|
|
515
|
+
return value.type.name || value.type.toString();
|
|
516
|
+
}
|
|
517
|
+
return renderStringify(value);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/** Called when directives inject each other (creating a circular dependency) */
|
|
521
|
+
function throwCyclicDependencyError(token, path) {
|
|
522
|
+
var depPath = path ? ". Dependency path: " + path.join(' > ') + " > " + token : '';
|
|
523
|
+
throw new RuntimeError("200" /* CYCLIC_DI_DEPENDENCY */, "Circular dependency in DI detected for " + token + depPath);
|
|
524
|
+
}
|
|
525
|
+
function throwMixedMultiProviderError() {
|
|
526
|
+
throw new Error("Cannot mix multi providers and regular providers");
|
|
527
|
+
}
|
|
528
|
+
function throwInvalidProviderError(ngModuleType, providers, provider) {
|
|
529
|
+
var ngModuleDetail = '';
|
|
530
|
+
if (ngModuleType && providers) {
|
|
531
|
+
var providerDetail = providers.map(function (v) { return v == provider ? '?' + provider + '?' : '...'; });
|
|
532
|
+
ngModuleDetail =
|
|
533
|
+
" - only instances of Provider and Type are allowed, got: [" + providerDetail.join(', ') + "]";
|
|
534
|
+
}
|
|
535
|
+
throw new Error("Invalid provider for the NgModule '" + stringify(ngModuleType) + "'" + ngModuleDetail);
|
|
536
|
+
}
|
|
537
|
+
/** Throws an error when a token is not found in DI. */
|
|
538
|
+
function throwProviderNotFoundError(token, injectorName) {
|
|
539
|
+
var injectorDetails = injectorName ? " in " + injectorName : '';
|
|
540
|
+
throw new RuntimeError("201" /* PROVIDER_NOT_FOUND */, "No provider for " + stringifyForError(token) + " found" + injectorDetails);
|
|
541
|
+
}
|
|
542
|
+
|
|
135
543
|
/**
|
|
136
544
|
* @license
|
|
137
545
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -441,7 +849,7 @@
|
|
|
441
849
|
return null;
|
|
442
850
|
if (notFoundValue !== undefined)
|
|
443
851
|
return notFoundValue;
|
|
444
|
-
|
|
852
|
+
throwProviderNotFoundError(stringify(token), 'Injector');
|
|
445
853
|
}
|
|
446
854
|
/**
|
|
447
855
|
* Assert that `_injectImplementation` is not `fn`.
|
|
@@ -1225,6 +1633,14 @@
|
|
|
1225
1633
|
throwError("Index out of range (expecting " + lower + " <= " + index + " < " + upper + ")");
|
|
1226
1634
|
}
|
|
1227
1635
|
}
|
|
1636
|
+
function assertProjectionSlots(lView, errMessage) {
|
|
1637
|
+
assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');
|
|
1638
|
+
assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage ||
|
|
1639
|
+
'Components with projection nodes (<ng-content>) must have projection slots defined.');
|
|
1640
|
+
}
|
|
1641
|
+
function assertParentView(lView, errMessage) {
|
|
1642
|
+
assertDefined(lView, errMessage || 'Component views should always have a parent view (component\'s host view)');
|
|
1643
|
+
}
|
|
1228
1644
|
/**
|
|
1229
1645
|
* This is a basic sanity check that the `injectorIndex` seems to point to what looks like a
|
|
1230
1646
|
* NodeInjector data structure.
|
|
@@ -1261,414 +1677,6 @@
|
|
|
1261
1677
|
return hasFactoryDef ? type[NG_FACTORY_DEF] : null;
|
|
1262
1678
|
}
|
|
1263
1679
|
|
|
1264
|
-
/*! *****************************************************************************
|
|
1265
|
-
Copyright (c) Microsoft Corporation.
|
|
1266
|
-
|
|
1267
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1268
|
-
purpose with or without fee is hereby granted.
|
|
1269
|
-
|
|
1270
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1271
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1272
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1273
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1274
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1275
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1276
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1277
|
-
***************************************************************************** */
|
|
1278
|
-
/* global Reflect, Promise */
|
|
1279
|
-
var extendStatics = function (d, b) {
|
|
1280
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1281
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1282
|
-
function (d, b) { for (var p in b)
|
|
1283
|
-
if (b.hasOwnProperty(p))
|
|
1284
|
-
d[p] = b[p]; };
|
|
1285
|
-
return extendStatics(d, b);
|
|
1286
|
-
};
|
|
1287
|
-
function __extends(d, b) {
|
|
1288
|
-
extendStatics(d, b);
|
|
1289
|
-
function __() { this.constructor = d; }
|
|
1290
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1291
|
-
}
|
|
1292
|
-
var __assign = function () {
|
|
1293
|
-
__assign = Object.assign || function __assign(t) {
|
|
1294
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1295
|
-
s = arguments[i];
|
|
1296
|
-
for (var p in s)
|
|
1297
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
1298
|
-
t[p] = s[p];
|
|
1299
|
-
}
|
|
1300
|
-
return t;
|
|
1301
|
-
};
|
|
1302
|
-
return __assign.apply(this, arguments);
|
|
1303
|
-
};
|
|
1304
|
-
function __rest(s, e) {
|
|
1305
|
-
var t = {};
|
|
1306
|
-
for (var p in s)
|
|
1307
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1308
|
-
t[p] = s[p];
|
|
1309
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1310
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1311
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1312
|
-
t[p[i]] = s[p[i]];
|
|
1313
|
-
}
|
|
1314
|
-
return t;
|
|
1315
|
-
}
|
|
1316
|
-
function __decorate(decorators, target, key, desc) {
|
|
1317
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1318
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1319
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1320
|
-
else
|
|
1321
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1322
|
-
if (d = decorators[i])
|
|
1323
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1324
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1325
|
-
}
|
|
1326
|
-
function __param(paramIndex, decorator) {
|
|
1327
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
1328
|
-
}
|
|
1329
|
-
function __metadata(metadataKey, metadataValue) {
|
|
1330
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1331
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
1332
|
-
}
|
|
1333
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1334
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1335
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1336
|
-
function fulfilled(value) { try {
|
|
1337
|
-
step(generator.next(value));
|
|
1338
|
-
}
|
|
1339
|
-
catch (e) {
|
|
1340
|
-
reject(e);
|
|
1341
|
-
} }
|
|
1342
|
-
function rejected(value) { try {
|
|
1343
|
-
step(generator["throw"](value));
|
|
1344
|
-
}
|
|
1345
|
-
catch (e) {
|
|
1346
|
-
reject(e);
|
|
1347
|
-
} }
|
|
1348
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
1349
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1350
|
-
});
|
|
1351
|
-
}
|
|
1352
|
-
function __generator(thisArg, body) {
|
|
1353
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
1354
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
1355
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
1356
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
1357
|
-
function step(op) {
|
|
1358
|
-
if (f)
|
|
1359
|
-
throw new TypeError("Generator is already executing.");
|
|
1360
|
-
while (_)
|
|
1361
|
-
try {
|
|
1362
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
1363
|
-
return t;
|
|
1364
|
-
if (y = 0, t)
|
|
1365
|
-
op = [op[0] & 2, t.value];
|
|
1366
|
-
switch (op[0]) {
|
|
1367
|
-
case 0:
|
|
1368
|
-
case 1:
|
|
1369
|
-
t = op;
|
|
1370
|
-
break;
|
|
1371
|
-
case 4:
|
|
1372
|
-
_.label++;
|
|
1373
|
-
return { value: op[1], done: false };
|
|
1374
|
-
case 5:
|
|
1375
|
-
_.label++;
|
|
1376
|
-
y = op[1];
|
|
1377
|
-
op = [0];
|
|
1378
|
-
continue;
|
|
1379
|
-
case 7:
|
|
1380
|
-
op = _.ops.pop();
|
|
1381
|
-
_.trys.pop();
|
|
1382
|
-
continue;
|
|
1383
|
-
default:
|
|
1384
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
1385
|
-
_ = 0;
|
|
1386
|
-
continue;
|
|
1387
|
-
}
|
|
1388
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
1389
|
-
_.label = op[1];
|
|
1390
|
-
break;
|
|
1391
|
-
}
|
|
1392
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
1393
|
-
_.label = t[1];
|
|
1394
|
-
t = op;
|
|
1395
|
-
break;
|
|
1396
|
-
}
|
|
1397
|
-
if (t && _.label < t[2]) {
|
|
1398
|
-
_.label = t[2];
|
|
1399
|
-
_.ops.push(op);
|
|
1400
|
-
break;
|
|
1401
|
-
}
|
|
1402
|
-
if (t[2])
|
|
1403
|
-
_.ops.pop();
|
|
1404
|
-
_.trys.pop();
|
|
1405
|
-
continue;
|
|
1406
|
-
}
|
|
1407
|
-
op = body.call(thisArg, _);
|
|
1408
|
-
}
|
|
1409
|
-
catch (e) {
|
|
1410
|
-
op = [6, e];
|
|
1411
|
-
y = 0;
|
|
1412
|
-
}
|
|
1413
|
-
finally {
|
|
1414
|
-
f = t = 0;
|
|
1415
|
-
}
|
|
1416
|
-
if (op[0] & 5)
|
|
1417
|
-
throw op[1];
|
|
1418
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
1422
|
-
if (k2 === undefined)
|
|
1423
|
-
k2 = k;
|
|
1424
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
1425
|
-
}) : (function (o, m, k, k2) {
|
|
1426
|
-
if (k2 === undefined)
|
|
1427
|
-
k2 = k;
|
|
1428
|
-
o[k2] = m[k];
|
|
1429
|
-
});
|
|
1430
|
-
function __exportStar(m, exports) {
|
|
1431
|
-
for (var p in m)
|
|
1432
|
-
if (p !== "default" && !exports.hasOwnProperty(p))
|
|
1433
|
-
__createBinding(exports, m, p);
|
|
1434
|
-
}
|
|
1435
|
-
function __values(o) {
|
|
1436
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1437
|
-
if (m)
|
|
1438
|
-
return m.call(o);
|
|
1439
|
-
if (o && typeof o.length === "number")
|
|
1440
|
-
return {
|
|
1441
|
-
next: function () {
|
|
1442
|
-
if (o && i >= o.length)
|
|
1443
|
-
o = void 0;
|
|
1444
|
-
return { value: o && o[i++], done: !o };
|
|
1445
|
-
}
|
|
1446
|
-
};
|
|
1447
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1448
|
-
}
|
|
1449
|
-
function __read(o, n) {
|
|
1450
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1451
|
-
if (!m)
|
|
1452
|
-
return o;
|
|
1453
|
-
var i = m.call(o), r, ar = [], e;
|
|
1454
|
-
try {
|
|
1455
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
1456
|
-
ar.push(r.value);
|
|
1457
|
-
}
|
|
1458
|
-
catch (error) {
|
|
1459
|
-
e = { error: error };
|
|
1460
|
-
}
|
|
1461
|
-
finally {
|
|
1462
|
-
try {
|
|
1463
|
-
if (r && !r.done && (m = i["return"]))
|
|
1464
|
-
m.call(i);
|
|
1465
|
-
}
|
|
1466
|
-
finally {
|
|
1467
|
-
if (e)
|
|
1468
|
-
throw e.error;
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
return ar;
|
|
1472
|
-
}
|
|
1473
|
-
function __spread() {
|
|
1474
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
1475
|
-
ar = ar.concat(__read(arguments[i]));
|
|
1476
|
-
return ar;
|
|
1477
|
-
}
|
|
1478
|
-
function __spreadArrays() {
|
|
1479
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
1480
|
-
s += arguments[i].length;
|
|
1481
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
1482
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
1483
|
-
r[k] = a[j];
|
|
1484
|
-
return r;
|
|
1485
|
-
}
|
|
1486
|
-
;
|
|
1487
|
-
function __await(v) {
|
|
1488
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
1489
|
-
}
|
|
1490
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
1491
|
-
if (!Symbol.asyncIterator)
|
|
1492
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1493
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
1494
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
1495
|
-
function verb(n) { if (g[n])
|
|
1496
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
1497
|
-
function resume(n, v) { try {
|
|
1498
|
-
step(g[n](v));
|
|
1499
|
-
}
|
|
1500
|
-
catch (e) {
|
|
1501
|
-
settle(q[0][3], e);
|
|
1502
|
-
} }
|
|
1503
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
1504
|
-
function fulfill(value) { resume("next", value); }
|
|
1505
|
-
function reject(value) { resume("throw", value); }
|
|
1506
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
1507
|
-
resume(q[0][0], q[0][1]); }
|
|
1508
|
-
}
|
|
1509
|
-
function __asyncDelegator(o) {
|
|
1510
|
-
var i, p;
|
|
1511
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
1512
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
1513
|
-
}
|
|
1514
|
-
function __asyncValues(o) {
|
|
1515
|
-
if (!Symbol.asyncIterator)
|
|
1516
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1517
|
-
var m = o[Symbol.asyncIterator], i;
|
|
1518
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
1519
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
1520
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
1521
|
-
}
|
|
1522
|
-
function __makeTemplateObject(cooked, raw) {
|
|
1523
|
-
if (Object.defineProperty) {
|
|
1524
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
1525
|
-
}
|
|
1526
|
-
else {
|
|
1527
|
-
cooked.raw = raw;
|
|
1528
|
-
}
|
|
1529
|
-
return cooked;
|
|
1530
|
-
}
|
|
1531
|
-
;
|
|
1532
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
1533
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1534
|
-
}) : function (o, v) {
|
|
1535
|
-
o["default"] = v;
|
|
1536
|
-
};
|
|
1537
|
-
function __importStar(mod) {
|
|
1538
|
-
if (mod && mod.__esModule)
|
|
1539
|
-
return mod;
|
|
1540
|
-
var result = {};
|
|
1541
|
-
if (mod != null)
|
|
1542
|
-
for (var k in mod)
|
|
1543
|
-
if (Object.hasOwnProperty.call(mod, k))
|
|
1544
|
-
__createBinding(result, mod, k);
|
|
1545
|
-
__setModuleDefault(result, mod);
|
|
1546
|
-
return result;
|
|
1547
|
-
}
|
|
1548
|
-
function __importDefault(mod) {
|
|
1549
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
1550
|
-
}
|
|
1551
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
1552
|
-
if (!privateMap.has(receiver)) {
|
|
1553
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
1554
|
-
}
|
|
1555
|
-
return privateMap.get(receiver);
|
|
1556
|
-
}
|
|
1557
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
1558
|
-
if (!privateMap.has(receiver)) {
|
|
1559
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
1560
|
-
}
|
|
1561
|
-
privateMap.set(receiver, value);
|
|
1562
|
-
return value;
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
/**
|
|
1566
|
-
* @license
|
|
1567
|
-
* Copyright Google LLC All Rights Reserved.
|
|
1568
|
-
*
|
|
1569
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
1570
|
-
* found in the LICENSE file at https://angular.io/license
|
|
1571
|
-
*/
|
|
1572
|
-
// Base URL for the error details page.
|
|
1573
|
-
// Keep this value in sync with a similar const in
|
|
1574
|
-
// `packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts`.
|
|
1575
|
-
var ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';
|
|
1576
|
-
var RuntimeError = /** @class */ (function (_super) {
|
|
1577
|
-
__extends(RuntimeError, _super);
|
|
1578
|
-
function RuntimeError(code, message) {
|
|
1579
|
-
var _this = _super.call(this, formatRuntimeError(code, message)) || this;
|
|
1580
|
-
_this.code = code;
|
|
1581
|
-
return _this;
|
|
1582
|
-
}
|
|
1583
|
-
return RuntimeError;
|
|
1584
|
-
}(Error));
|
|
1585
|
-
// Contains a set of error messages that have details guides at angular.io.
|
|
1586
|
-
// Full list of available error guides can be found at https://angular.io/errors
|
|
1587
|
-
/* tslint:disable:no-toplevel-property-access */
|
|
1588
|
-
var RUNTIME_ERRORS_WITH_GUIDES = new Set([
|
|
1589
|
-
"100" /* EXPRESSION_CHANGED_AFTER_CHECKED */,
|
|
1590
|
-
"200" /* CYCLIC_DI_DEPENDENCY */,
|
|
1591
|
-
"201" /* PROVIDER_NOT_FOUND */,
|
|
1592
|
-
"300" /* MULTIPLE_COMPONENTS_MATCH */,
|
|
1593
|
-
"301" /* EXPORT_NOT_FOUND */,
|
|
1594
|
-
"302" /* PIPE_NOT_FOUND */,
|
|
1595
|
-
]);
|
|
1596
|
-
/* tslint:enable:no-toplevel-property-access */
|
|
1597
|
-
/** Called to format a runtime error */
|
|
1598
|
-
function formatRuntimeError(code, message) {
|
|
1599
|
-
var fullCode = code ? "NG0" + code + ": " : '';
|
|
1600
|
-
var errorMessage = "" + fullCode + message;
|
|
1601
|
-
// Some runtime errors are still thrown without `ngDevMode` (for example
|
|
1602
|
-
// `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling
|
|
1603
|
-
// `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles.
|
|
1604
|
-
// TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added
|
|
1605
|
-
// there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check
|
|
1606
|
-
// from this code).
|
|
1607
|
-
if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) {
|
|
1608
|
-
errorMessage = errorMessage + ". Find more at " + ERROR_DETAILS_PAGE_BASE_URL + "/NG0" + code;
|
|
1609
|
-
}
|
|
1610
|
-
return errorMessage;
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
/**
|
|
1614
|
-
* @license
|
|
1615
|
-
* Copyright Google LLC All Rights Reserved.
|
|
1616
|
-
*
|
|
1617
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
1618
|
-
* found in the LICENSE file at https://angular.io/license
|
|
1619
|
-
*/
|
|
1620
|
-
/**
|
|
1621
|
-
* Used for stringify render output in Ivy.
|
|
1622
|
-
* Important! This function is very performance-sensitive and we should
|
|
1623
|
-
* be extra careful not to introduce megamorphic reads in it.
|
|
1624
|
-
* Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.
|
|
1625
|
-
*/
|
|
1626
|
-
function renderStringify(value) {
|
|
1627
|
-
if (typeof value === 'string')
|
|
1628
|
-
return value;
|
|
1629
|
-
if (value == null)
|
|
1630
|
-
return '';
|
|
1631
|
-
// Use `String` so that it invokes the `toString` method of the value. Note that this
|
|
1632
|
-
// appears to be faster than calling `value.toString` (see `render_stringify` benchmark).
|
|
1633
|
-
return String(value);
|
|
1634
|
-
}
|
|
1635
|
-
/**
|
|
1636
|
-
* Used to stringify a value so that it can be displayed in an error message.
|
|
1637
|
-
* Important! This function contains a megamorphic read and should only be
|
|
1638
|
-
* used for error messages.
|
|
1639
|
-
*/
|
|
1640
|
-
function stringifyForError(value) {
|
|
1641
|
-
if (typeof value === 'function')
|
|
1642
|
-
return value.name || value.toString();
|
|
1643
|
-
if (typeof value === 'object' && value != null && typeof value.type === 'function') {
|
|
1644
|
-
return value.type.name || value.type.toString();
|
|
1645
|
-
}
|
|
1646
|
-
return renderStringify(value);
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
/** Called when directives inject each other (creating a circular dependency) */
|
|
1650
|
-
function throwCyclicDependencyError(token, path) {
|
|
1651
|
-
var depPath = path ? ". Dependency path: " + path.join(' > ') + " > " + token : '';
|
|
1652
|
-
throw new RuntimeError("200" /* CYCLIC_DI_DEPENDENCY */, "Circular dependency in DI detected for " + token + depPath);
|
|
1653
|
-
}
|
|
1654
|
-
function throwMixedMultiProviderError() {
|
|
1655
|
-
throw new Error("Cannot mix multi providers and regular providers");
|
|
1656
|
-
}
|
|
1657
|
-
function throwInvalidProviderError(ngModuleType, providers, provider) {
|
|
1658
|
-
var ngModuleDetail = '';
|
|
1659
|
-
if (ngModuleType && providers) {
|
|
1660
|
-
var providerDetail = providers.map(function (v) { return v == provider ? '?' + provider + '?' : '...'; });
|
|
1661
|
-
ngModuleDetail =
|
|
1662
|
-
" - only instances of Provider and Type are allowed, got: [" + providerDetail.join(', ') + "]";
|
|
1663
|
-
}
|
|
1664
|
-
throw new Error("Invalid provider for the NgModule '" + stringify(ngModuleType) + "'" + ngModuleDetail);
|
|
1665
|
-
}
|
|
1666
|
-
/** Throws an error when a token is not found in DI. */
|
|
1667
|
-
function throwProviderNotFoundError(token, injectorName) {
|
|
1668
|
-
var injectorDetails = injectorName ? " in " + injectorName : '';
|
|
1669
|
-
throw new RuntimeError("201" /* PROVIDER_NOT_FOUND */, "No provider for " + stringifyForError(token) + " found" + injectorDetails);
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
1680
|
/**
|
|
1673
1681
|
* @license
|
|
1674
1682
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -5050,7 +5058,7 @@
|
|
|
5050
5058
|
* @param flags Optional flags that control how injection is executed.
|
|
5051
5059
|
* The flags correspond to injection strategies that can be specified with
|
|
5052
5060
|
* parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.
|
|
5053
|
-
* @returns
|
|
5061
|
+
* @returns the injected value if injection is successful, `null` otherwise.
|
|
5054
5062
|
*
|
|
5055
5063
|
* @usageNotes
|
|
5056
5064
|
*
|
|
@@ -5495,12 +5503,19 @@
|
|
|
5495
5503
|
// below, where the Chromium bug is also referenced:
|
|
5496
5504
|
// https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor
|
|
5497
5505
|
var fnArgs = args.slice(0, -1).join(',');
|
|
5498
|
-
var fnBody = args.
|
|
5506
|
+
var fnBody = args[args.length - 1];
|
|
5499
5507
|
var body = "(function anonymous(" + fnArgs + "\n) { " + fnBody + "\n})";
|
|
5500
5508
|
// Using eval directly confuses the compiler and prevents this module from
|
|
5501
5509
|
// being stripped out of JS binaries even if not used. The global['eval']
|
|
5502
5510
|
// indirection fixes that.
|
|
5503
5511
|
var fn = _global['eval'](trustedScriptFromString(body));
|
|
5512
|
+
if (fn.bind === undefined) {
|
|
5513
|
+
// Workaround for a browser bug that only exists in Chrome 83, where passing
|
|
5514
|
+
// a TrustedScript to eval just returns the TrustedScript back without
|
|
5515
|
+
// evaluating it. In that case, fall back to the most straightforward
|
|
5516
|
+
// implementation:
|
|
5517
|
+
return new (Function.bind.apply(Function, __spread([void 0], args)))();
|
|
5518
|
+
}
|
|
5504
5519
|
// To completely mimic the behavior of calling "new Function", two more
|
|
5505
5520
|
// things need to happen:
|
|
5506
5521
|
// 1. Stringifying the resulting function should return its source code
|
|
@@ -7896,12 +7911,14 @@
|
|
|
7896
7911
|
return rNode || unwrapRNode(lView[tNode.index]);
|
|
7897
7912
|
}
|
|
7898
7913
|
else {
|
|
7899
|
-
var
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7914
|
+
var projectionNodes = getProjectionNodes(lView, tNode);
|
|
7915
|
+
if (projectionNodes !== null) {
|
|
7916
|
+
if (Array.isArray(projectionNodes)) {
|
|
7917
|
+
return projectionNodes[0];
|
|
7918
|
+
}
|
|
7919
|
+
var parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);
|
|
7920
|
+
ngDevMode && assertParentView(parentView);
|
|
7921
|
+
return getFirstNativeNode(parentView, projectionNodes);
|
|
7905
7922
|
}
|
|
7906
7923
|
else {
|
|
7907
7924
|
return getFirstNativeNode(lView, tNode.next);
|
|
@@ -7910,6 +7927,16 @@
|
|
|
7910
7927
|
}
|
|
7911
7928
|
return null;
|
|
7912
7929
|
}
|
|
7930
|
+
function getProjectionNodes(lView, tNode) {
|
|
7931
|
+
if (tNode !== null) {
|
|
7932
|
+
var componentView = lView[DECLARATION_COMPONENT_VIEW];
|
|
7933
|
+
var componentHost = componentView[T_HOST];
|
|
7934
|
+
var slotIdx = tNode.projection;
|
|
7935
|
+
ngDevMode && assertProjectionSlots(lView);
|
|
7936
|
+
return componentHost.projection[slotIdx];
|
|
7937
|
+
}
|
|
7938
|
+
return null;
|
|
7939
|
+
}
|
|
7913
7940
|
function getBeforeNodeForView(viewIndexInContainer, lContainer) {
|
|
7914
7941
|
var nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;
|
|
7915
7942
|
if (nextViewIndex < lContainer.length) {
|
|
@@ -21933,7 +21960,7 @@
|
|
|
21933
21960
|
/**
|
|
21934
21961
|
* @publicApi
|
|
21935
21962
|
*/
|
|
21936
|
-
var VERSION = new Version('11.2.
|
|
21963
|
+
var VERSION = new Version('11.2.3');
|
|
21937
21964
|
|
|
21938
21965
|
/**
|
|
21939
21966
|
* @license
|
|
@@ -23055,19 +23082,13 @@
|
|
|
23055
23082
|
}
|
|
23056
23083
|
}
|
|
23057
23084
|
else if (tNodeType & 16 /* Projection */) {
|
|
23058
|
-
var
|
|
23059
|
-
var componentHost = componentView[T_HOST];
|
|
23060
|
-
var slotIdx = tNode.projection;
|
|
23061
|
-
ngDevMode &&
|
|
23062
|
-
assertDefined(componentHost.projection, 'Components with projection nodes (<ng-content>) must have projection slots defined.');
|
|
23063
|
-
var nodesInSlot = componentHost.projection[slotIdx];
|
|
23085
|
+
var nodesInSlot = getProjectionNodes(lView, tNode);
|
|
23064
23086
|
if (Array.isArray(nodesInSlot)) {
|
|
23065
23087
|
result.push.apply(result, __spread(nodesInSlot));
|
|
23066
23088
|
}
|
|
23067
23089
|
else {
|
|
23068
|
-
var parentView = getLViewParent(
|
|
23069
|
-
ngDevMode &&
|
|
23070
|
-
assertDefined(parentView, 'Component views should always have a parent view (component\'s host view)');
|
|
23090
|
+
var parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);
|
|
23091
|
+
ngDevMode && assertParentView(parentView);
|
|
23071
23092
|
collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);
|
|
23072
23093
|
}
|
|
23073
23094
|
}
|
|
@@ -30038,10 +30059,9 @@
|
|
|
30038
30059
|
*/
|
|
30039
30060
|
var ApplicationRef = /** @class */ (function () {
|
|
30040
30061
|
/** @internal */
|
|
30041
|
-
function ApplicationRef(_zone,
|
|
30062
|
+
function ApplicationRef(_zone, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {
|
|
30042
30063
|
var _this = this;
|
|
30043
30064
|
this._zone = _zone;
|
|
30044
|
-
this._console = _console;
|
|
30045
30065
|
this._injector = _injector;
|
|
30046
30066
|
this._exceptionHandler = _exceptionHandler;
|
|
30047
30067
|
this._componentFactoryResolver = _componentFactoryResolver;
|
|
@@ -30158,8 +30178,11 @@
|
|
|
30158
30178
|
}
|
|
30159
30179
|
});
|
|
30160
30180
|
this._loadComponent(compRef);
|
|
30161
|
-
|
|
30162
|
-
|
|
30181
|
+
// Note that we have still left the `isDevMode()` condition in order to avoid
|
|
30182
|
+
// creating a breaking change for projects that still use the View Engine.
|
|
30183
|
+
if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {
|
|
30184
|
+
var _console = this._injector.get(Console);
|
|
30185
|
+
_console.log("Angular is running in development mode. Call enableProdMode() to enable production mode.");
|
|
30163
30186
|
}
|
|
30164
30187
|
return compRef;
|
|
30165
30188
|
};
|
|
@@ -30268,7 +30291,6 @@
|
|
|
30268
30291
|
];
|
|
30269
30292
|
ApplicationRef.ctorParameters = function () { return [
|
|
30270
30293
|
{ type: NgZone },
|
|
30271
|
-
{ type: Console },
|
|
30272
30294
|
{ type: Injector },
|
|
30273
30295
|
{ type: ErrorHandler },
|
|
30274
30296
|
{ type: ComponentFactoryResolver },
|
|
@@ -31315,7 +31337,7 @@
|
|
|
31315
31337
|
{
|
|
31316
31338
|
provide: ApplicationRef,
|
|
31317
31339
|
useClass: ApplicationRef,
|
|
31318
|
-
deps: [NgZone,
|
|
31340
|
+
deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]
|
|
31319
31341
|
},
|
|
31320
31342
|
{ provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },
|
|
31321
31343
|
{
|
|
@@ -33719,6 +33741,15 @@
|
|
|
33719
33741
|
var compiler = getCompilerFacade();
|
|
33720
33742
|
return compiler.compileComponentDeclaration(angularCoreEnv, "ng:///" + decl.type.name + "/\u0275cmp.js", decl);
|
|
33721
33743
|
}
|
|
33744
|
+
/**
|
|
33745
|
+
* Compiles a partial pipe declaration object into a full pipe definition object.
|
|
33746
|
+
*
|
|
33747
|
+
* @codeGenApi
|
|
33748
|
+
*/
|
|
33749
|
+
function ɵɵngDeclarePipe(decl) {
|
|
33750
|
+
var compiler = getCompilerFacade();
|
|
33751
|
+
return compiler.compilePipeDeclaration(angularCoreEnv, "ng:///" + decl.type.name + "/\u0275pipe.js", decl);
|
|
33752
|
+
}
|
|
33722
33753
|
|
|
33723
33754
|
/**
|
|
33724
33755
|
* @license
|
|
@@ -34124,6 +34155,7 @@
|
|
|
34124
34155
|
exports.ɵɵnextContext = ɵɵnextContext;
|
|
34125
34156
|
exports.ɵɵngDeclareComponent = ɵɵngDeclareComponent;
|
|
34126
34157
|
exports.ɵɵngDeclareDirective = ɵɵngDeclareDirective;
|
|
34158
|
+
exports.ɵɵngDeclarePipe = ɵɵngDeclarePipe;
|
|
34127
34159
|
exports.ɵɵpipe = ɵɵpipe;
|
|
34128
34160
|
exports.ɵɵpipeBind1 = ɵɵpipeBind1;
|
|
34129
34161
|
exports.ɵɵpipeBind2 = ɵɵpipeBind2;
|