source: trip-planner-front/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js@ 1ad8e64

Last change on this file since 1ad8e64 was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago

primeNG components

  • Property mode set to 100644
File size: 37.1 KB
Line 
1/**
2 * @license Angular v12.2.13
3 * (c) 2010-2021 Google LLC. https://angular.io/
4 * License: MIT
5 */
6
7(function (global, factory) {
8 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/compiler'), require('@angular/core'), require('@angular/common'), require('@angular/platform-browser')) :
9 typeof define === 'function' && define.amd ? define('@angular/platform-browser-dynamic', ['exports', '@angular/compiler', '@angular/core', '@angular/common', '@angular/platform-browser'], factory) :
10 (global = global || self, factory((global.ng = global.ng || {}, global.ng.platformBrowserDynamic = {}), global.ng.compiler, global.ng.core, global.ng.common, global.ng.platformBrowser));
11}(this, (function (exports, compiler, core, common, platformBrowser) { 'use strict';
12
13 /*! *****************************************************************************
14 Copyright (c) Microsoft Corporation.
15
16 Permission to use, copy, modify, and/or distribute this software for any
17 purpose with or without fee is hereby granted.
18
19 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
20 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
21 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
22 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
23 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
24 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
25 PERFORMANCE OF THIS SOFTWARE.
26 ***************************************************************************** */
27 /* global Reflect, Promise */
28 var extendStatics = function (d, b) {
29 extendStatics = Object.setPrototypeOf ||
30 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31 function (d, b) { for (var p in b)
32 if (Object.prototype.hasOwnProperty.call(b, p))
33 d[p] = b[p]; };
34 return extendStatics(d, b);
35 };
36 function __extends(d, b) {
37 if (typeof b !== "function" && b !== null)
38 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
39 extendStatics(d, b);
40 function __() { this.constructor = d; }
41 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42 }
43 var __assign = function () {
44 __assign = Object.assign || function __assign(t) {
45 for (var s, i = 1, n = arguments.length; i < n; i++) {
46 s = arguments[i];
47 for (var p in s)
48 if (Object.prototype.hasOwnProperty.call(s, p))
49 t[p] = s[p];
50 }
51 return t;
52 };
53 return __assign.apply(this, arguments);
54 };
55 function __rest(s, e) {
56 var t = {};
57 for (var p in s)
58 if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
59 t[p] = s[p];
60 if (s != null && typeof Object.getOwnPropertySymbols === "function")
61 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
62 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
63 t[p[i]] = s[p[i]];
64 }
65 return t;
66 }
67 function __decorate(decorators, target, key, desc) {
68 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
69 if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
70 r = Reflect.decorate(decorators, target, key, desc);
71 else
72 for (var i = decorators.length - 1; i >= 0; i--)
73 if (d = decorators[i])
74 r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
75 return c > 3 && r && Object.defineProperty(target, key, r), r;
76 }
77 function __param(paramIndex, decorator) {
78 return function (target, key) { decorator(target, key, paramIndex); };
79 }
80 function __metadata(metadataKey, metadataValue) {
81 if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
82 return Reflect.metadata(metadataKey, metadataValue);
83 }
84 function __awaiter(thisArg, _arguments, P, generator) {
85 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
86 return new (P || (P = Promise))(function (resolve, reject) {
87 function fulfilled(value) { try {
88 step(generator.next(value));
89 }
90 catch (e) {
91 reject(e);
92 } }
93 function rejected(value) { try {
94 step(generator["throw"](value));
95 }
96 catch (e) {
97 reject(e);
98 } }
99 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
100 step((generator = generator.apply(thisArg, _arguments || [])).next());
101 });
102 }
103 function __generator(thisArg, body) {
104 var _ = { label: 0, sent: function () { if (t[0] & 1)
105 throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
106 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
107 function verb(n) { return function (v) { return step([n, v]); }; }
108 function step(op) {
109 if (f)
110 throw new TypeError("Generator is already executing.");
111 while (_)
112 try {
113 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)
114 return t;
115 if (y = 0, t)
116 op = [op[0] & 2, t.value];
117 switch (op[0]) {
118 case 0:
119 case 1:
120 t = op;
121 break;
122 case 4:
123 _.label++;
124 return { value: op[1], done: false };
125 case 5:
126 _.label++;
127 y = op[1];
128 op = [0];
129 continue;
130 case 7:
131 op = _.ops.pop();
132 _.trys.pop();
133 continue;
134 default:
135 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
136 _ = 0;
137 continue;
138 }
139 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
140 _.label = op[1];
141 break;
142 }
143 if (op[0] === 6 && _.label < t[1]) {
144 _.label = t[1];
145 t = op;
146 break;
147 }
148 if (t && _.label < t[2]) {
149 _.label = t[2];
150 _.ops.push(op);
151 break;
152 }
153 if (t[2])
154 _.ops.pop();
155 _.trys.pop();
156 continue;
157 }
158 op = body.call(thisArg, _);
159 }
160 catch (e) {
161 op = [6, e];
162 y = 0;
163 }
164 finally {
165 f = t = 0;
166 }
167 if (op[0] & 5)
168 throw op[1];
169 return { value: op[0] ? op[1] : void 0, done: true };
170 }
171 }
172 var __createBinding = Object.create ? (function (o, m, k, k2) {
173 if (k2 === undefined)
174 k2 = k;
175 Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
176 }) : (function (o, m, k, k2) {
177 if (k2 === undefined)
178 k2 = k;
179 o[k2] = m[k];
180 });
181 function __exportStar(m, o) {
182 for (var p in m)
183 if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
184 __createBinding(o, m, p);
185 }
186 function __values(o) {
187 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
188 if (m)
189 return m.call(o);
190 if (o && typeof o.length === "number")
191 return {
192 next: function () {
193 if (o && i >= o.length)
194 o = void 0;
195 return { value: o && o[i++], done: !o };
196 }
197 };
198 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
199 }
200 function __read(o, n) {
201 var m = typeof Symbol === "function" && o[Symbol.iterator];
202 if (!m)
203 return o;
204 var i = m.call(o), r, ar = [], e;
205 try {
206 while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
207 ar.push(r.value);
208 }
209 catch (error) {
210 e = { error: error };
211 }
212 finally {
213 try {
214 if (r && !r.done && (m = i["return"]))
215 m.call(i);
216 }
217 finally {
218 if (e)
219 throw e.error;
220 }
221 }
222 return ar;
223 }
224 /** @deprecated */
225 function __spread() {
226 for (var ar = [], i = 0; i < arguments.length; i++)
227 ar = ar.concat(__read(arguments[i]));
228 return ar;
229 }
230 /** @deprecated */
231 function __spreadArrays() {
232 for (var s = 0, i = 0, il = arguments.length; i < il; i++)
233 s += arguments[i].length;
234 for (var r = Array(s), k = 0, i = 0; i < il; i++)
235 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
236 r[k] = a[j];
237 return r;
238 }
239 function __spreadArray(to, from, pack) {
240 if (pack || arguments.length === 2)
241 for (var i = 0, l = from.length, ar; i < l; i++) {
242 if (ar || !(i in from)) {
243 if (!ar)
244 ar = Array.prototype.slice.call(from, 0, i);
245 ar[i] = from[i];
246 }
247 }
248 return to.concat(ar || Array.prototype.slice.call(from));
249 }
250 function __await(v) {
251 return this instanceof __await ? (this.v = v, this) : new __await(v);
252 }
253 function __asyncGenerator(thisArg, _arguments, generator) {
254 if (!Symbol.asyncIterator)
255 throw new TypeError("Symbol.asyncIterator is not defined.");
256 var g = generator.apply(thisArg, _arguments || []), i, q = [];
257 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
258 function verb(n) { if (g[n])
259 i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
260 function resume(n, v) { try {
261 step(g[n](v));
262 }
263 catch (e) {
264 settle(q[0][3], e);
265 } }
266 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
267 function fulfill(value) { resume("next", value); }
268 function reject(value) { resume("throw", value); }
269 function settle(f, v) { if (f(v), q.shift(), q.length)
270 resume(q[0][0], q[0][1]); }
271 }
272 function __asyncDelegator(o) {
273 var i, p;
274 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
275 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; }
276 }
277 function __asyncValues(o) {
278 if (!Symbol.asyncIterator)
279 throw new TypeError("Symbol.asyncIterator is not defined.");
280 var m = o[Symbol.asyncIterator], i;
281 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);
282 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); }); }; }
283 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
284 }
285 function __makeTemplateObject(cooked, raw) {
286 if (Object.defineProperty) {
287 Object.defineProperty(cooked, "raw", { value: raw });
288 }
289 else {
290 cooked.raw = raw;
291 }
292 return cooked;
293 }
294 ;
295 var __setModuleDefault = Object.create ? (function (o, v) {
296 Object.defineProperty(o, "default", { enumerable: true, value: v });
297 }) : function (o, v) {
298 o["default"] = v;
299 };
300 function __importStar(mod) {
301 if (mod && mod.__esModule)
302 return mod;
303 var result = {};
304 if (mod != null)
305 for (var k in mod)
306 if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
307 __createBinding(result, mod, k);
308 __setModuleDefault(result, mod);
309 return result;
310 }
311 function __importDefault(mod) {
312 return (mod && mod.__esModule) ? mod : { default: mod };
313 }
314 function __classPrivateFieldGet(receiver, state, kind, f) {
315 if (kind === "a" && !f)
316 throw new TypeError("Private accessor was defined without a getter");
317 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
318 throw new TypeError("Cannot read private member from an object whose class did not declare it");
319 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
320 }
321 function __classPrivateFieldSet(receiver, state, value, kind, f) {
322 if (kind === "m")
323 throw new TypeError("Private method is not writable");
324 if (kind === "a" && !f)
325 throw new TypeError("Private accessor was defined without a setter");
326 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
327 throw new TypeError("Cannot write private member to an object whose class did not declare it");
328 return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
329 }
330
331 /**
332 * @license
333 * Copyright Google LLC All Rights Reserved.
334 *
335 * Use of this source code is governed by an MIT-style license that can be
336 * found in the LICENSE file at https://angular.io/license
337 */
338 var MODULE_SUFFIX = '';
339 var builtinExternalReferences = createBuiltinExternalReferencesMap();
340 var JitReflector = /** @class */ (function () {
341 function JitReflector() {
342 this.reflectionCapabilities = new core.ɵReflectionCapabilities();
343 }
344 JitReflector.prototype.componentModuleUrl = function (type, cmpMetadata) {
345 var moduleId = cmpMetadata.moduleId;
346 if (typeof moduleId === 'string') {
347 var scheme = compiler.getUrlScheme(moduleId);
348 return scheme ? moduleId : "package:" + moduleId + MODULE_SUFFIX;
349 }
350 else if (moduleId !== null && moduleId !== void 0) {
351 throw compiler.syntaxError("moduleId should be a string in \"" + core.ɵstringify(type) + "\". See https://goo.gl/wIDDiL for more information.\n" +
352 "If you're using Webpack you should inline the template and the styles, see https://goo.gl/X2J8zc.");
353 }
354 return "./" + core.ɵstringify(type);
355 };
356 JitReflector.prototype.parameters = function (typeOrFunc) {
357 return this.reflectionCapabilities.parameters(typeOrFunc);
358 };
359 JitReflector.prototype.tryAnnotations = function (typeOrFunc) {
360 return this.annotations(typeOrFunc);
361 };
362 JitReflector.prototype.annotations = function (typeOrFunc) {
363 return this.reflectionCapabilities.annotations(typeOrFunc);
364 };
365 JitReflector.prototype.shallowAnnotations = function (typeOrFunc) {
366 throw new Error('Not supported in JIT mode');
367 };
368 JitReflector.prototype.propMetadata = function (typeOrFunc) {
369 return this.reflectionCapabilities.propMetadata(typeOrFunc);
370 };
371 JitReflector.prototype.hasLifecycleHook = function (type, lcProperty) {
372 return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
373 };
374 JitReflector.prototype.guards = function (type) {
375 return this.reflectionCapabilities.guards(type);
376 };
377 JitReflector.prototype.resolveExternalReference = function (ref) {
378 return builtinExternalReferences.get(ref) || ref.runtime;
379 };
380 return JitReflector;
381 }());
382 function createBuiltinExternalReferencesMap() {
383 var map = new Map();
384 map.set(compiler.Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS, core.ANALYZE_FOR_ENTRY_COMPONENTS);
385 map.set(compiler.Identifiers.ElementRef, core.ElementRef);
386 map.set(compiler.Identifiers.NgModuleRef, core.NgModuleRef);
387 map.set(compiler.Identifiers.ViewContainerRef, core.ViewContainerRef);
388 map.set(compiler.Identifiers.ChangeDetectorRef, core.ChangeDetectorRef);
389 map.set(compiler.Identifiers.Renderer2, core.Renderer2);
390 map.set(compiler.Identifiers.QueryList, core.QueryList);
391 map.set(compiler.Identifiers.TemplateRef, core.TemplateRef);
392 map.set(compiler.Identifiers.CodegenComponentFactoryResolver, core.ɵCodegenComponentFactoryResolver);
393 map.set(compiler.Identifiers.ComponentFactoryResolver, core.ComponentFactoryResolver);
394 map.set(compiler.Identifiers.ComponentFactory, core.ComponentFactory);
395 map.set(compiler.Identifiers.ComponentRef, core.ComponentRef);
396 map.set(compiler.Identifiers.NgModuleFactory, core.NgModuleFactory);
397 map.set(compiler.Identifiers.createModuleFactory, core.ɵcmf);
398 map.set(compiler.Identifiers.moduleDef, core.ɵmod);
399 map.set(compiler.Identifiers.moduleProviderDef, core.ɵmpd);
400 map.set(compiler.Identifiers.RegisterModuleFactoryFn, core.ɵregisterModuleFactory);
401 map.set(compiler.Identifiers.Injector, core.Injector);
402 map.set(compiler.Identifiers.ViewEncapsulation, core.ViewEncapsulation);
403 map.set(compiler.Identifiers.ChangeDetectionStrategy, core.ChangeDetectionStrategy);
404 map.set(compiler.Identifiers.SecurityContext, core.SecurityContext);
405 map.set(compiler.Identifiers.LOCALE_ID, core.LOCALE_ID);
406 map.set(compiler.Identifiers.TRANSLATIONS_FORMAT, core.TRANSLATIONS_FORMAT);
407 map.set(compiler.Identifiers.inlineInterpolate, core.ɵinlineInterpolate);
408 map.set(compiler.Identifiers.interpolate, core.ɵinterpolate);
409 map.set(compiler.Identifiers.EMPTY_ARRAY, core.ɵEMPTY_ARRAY);
410 map.set(compiler.Identifiers.EMPTY_MAP, core.ɵEMPTY_MAP);
411 map.set(compiler.Identifiers.viewDef, core.ɵvid);
412 map.set(compiler.Identifiers.elementDef, core.ɵeld);
413 map.set(compiler.Identifiers.anchorDef, core.ɵand);
414 map.set(compiler.Identifiers.textDef, core.ɵted);
415 map.set(compiler.Identifiers.directiveDef, core.ɵdid);
416 map.set(compiler.Identifiers.providerDef, core.ɵprd);
417 map.set(compiler.Identifiers.queryDef, core.ɵqud);
418 map.set(compiler.Identifiers.pureArrayDef, core.ɵpad);
419 map.set(compiler.Identifiers.pureObjectDef, core.ɵpod);
420 map.set(compiler.Identifiers.purePipeDef, core.ɵppd);
421 map.set(compiler.Identifiers.pipeDef, core.ɵpid);
422 map.set(compiler.Identifiers.nodeValue, core.ɵnov);
423 map.set(compiler.Identifiers.ngContentDef, core.ɵncd);
424 map.set(compiler.Identifiers.unwrapValue, core.ɵunv);
425 map.set(compiler.Identifiers.createRendererType2, core.ɵcrt);
426 map.set(compiler.Identifiers.createComponentFactory, core.ɵccf);
427 return map;
428 }
429
430 var ERROR_COLLECTOR_TOKEN = new core.InjectionToken('ErrorCollector');
431 /**
432 * A default provider for {@link PACKAGE_ROOT_URL} that maps to '/'.
433 */
434 var DEFAULT_PACKAGE_URL_PROVIDER = {
435 provide: core.PACKAGE_ROOT_URL,
436 useValue: '/'
437 };
438 var _NO_RESOURCE_LOADER = {
439 get: function (url) {
440 throw new Error("No ResourceLoader implementation has been provided. Can't read the url \"" + url + "\"");
441 }
442 };
443 var baseHtmlParser = new core.InjectionToken('HtmlParser');
444 var CompilerImpl = /** @class */ (function () {
445 function CompilerImpl(injector, _metadataResolver, templateParser, styleCompiler, viewCompiler, ngModuleCompiler, summaryResolver, compileReflector, jitEvaluator, compilerConfig, console) {
446 this._metadataResolver = _metadataResolver;
447 this._delegate = new compiler.JitCompiler(_metadataResolver, templateParser, styleCompiler, viewCompiler, ngModuleCompiler, summaryResolver, compileReflector, jitEvaluator, compilerConfig, console, this.getExtraNgModuleProviders.bind(this));
448 this.injector = injector;
449 }
450 CompilerImpl.prototype.getExtraNgModuleProviders = function () {
451 return [this._metadataResolver.getProviderMetadata(new compiler.ProviderMeta(core.Compiler, { useValue: this }))];
452 };
453 CompilerImpl.prototype.compileModuleSync = function (moduleType) {
454 return this._delegate.compileModuleSync(moduleType);
455 };
456 CompilerImpl.prototype.compileModuleAsync = function (moduleType) {
457 return this._delegate.compileModuleAsync(moduleType);
458 };
459 CompilerImpl.prototype.compileModuleAndAllComponentsSync = function (moduleType) {
460 var result = this._delegate.compileModuleAndAllComponentsSync(moduleType);
461 return {
462 ngModuleFactory: result.ngModuleFactory,
463 componentFactories: result.componentFactories,
464 };
465 };
466 CompilerImpl.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {
467 return this._delegate.compileModuleAndAllComponentsAsync(moduleType)
468 .then(function (result) { return ({
469 ngModuleFactory: result.ngModuleFactory,
470 componentFactories: result.componentFactories,
471 }); });
472 };
473 CompilerImpl.prototype.loadAotSummaries = function (summaries) {
474 this._delegate.loadAotSummaries(summaries);
475 };
476 CompilerImpl.prototype.hasAotSummary = function (ref) {
477 return this._delegate.hasAotSummary(ref);
478 };
479 CompilerImpl.prototype.getComponentFactory = function (component) {
480 return this._delegate.getComponentFactory(component);
481 };
482 CompilerImpl.prototype.clearCache = function () {
483 this._delegate.clearCache();
484 };
485 CompilerImpl.prototype.clearCacheFor = function (type) {
486 this._delegate.clearCacheFor(type);
487 };
488 CompilerImpl.prototype.getModuleId = function (moduleType) {
489 var meta = this._metadataResolver.getNgModuleMetadata(moduleType);
490 return meta && meta.id || undefined;
491 };
492 return CompilerImpl;
493 }());
494 var ɵ0 = new JitReflector(), ɵ1 = _NO_RESOURCE_LOADER, ɵ2 = function (parser, translations, format, config, console) {
495 translations = translations || '';
496 var missingTranslation = translations ? config.missingTranslation : core.MissingTranslationStrategy.Ignore;
497 return new compiler.I18NHtmlParser(parser, translations, format, missingTranslation, console);
498 }, ɵ3 = new compiler.CompilerConfig();
499 /**
500 * A set of providers that provide `JitCompiler` and its dependencies to use for
501 * template compilation.
502 */
503 var COMPILER_PROVIDERS__PRE_R3__ = [
504 { provide: compiler.CompileReflector, useValue: ɵ0 },
505 { provide: compiler.ResourceLoader, useValue: ɵ1 },
506 { provide: compiler.JitSummaryResolver, deps: [] },
507 { provide: compiler.SummaryResolver, useExisting: compiler.JitSummaryResolver },
508 { provide: core.ɵConsole, deps: [] },
509 { provide: compiler.Lexer, deps: [] },
510 { provide: compiler.Parser, deps: [compiler.Lexer] },
511 {
512 provide: baseHtmlParser,
513 useClass: compiler.HtmlParser,
514 deps: [],
515 },
516 {
517 provide: compiler.I18NHtmlParser,
518 useFactory: ɵ2,
519 deps: [
520 baseHtmlParser,
521 [new core.Optional(), new core.Inject(core.TRANSLATIONS)],
522 [new core.Optional(), new core.Inject(core.TRANSLATIONS_FORMAT)],
523 [compiler.CompilerConfig],
524 [core.ɵConsole],
525 ]
526 },
527 {
528 provide: compiler.HtmlParser,
529 useExisting: compiler.I18NHtmlParser,
530 },
531 {
532 provide: compiler.TemplateParser,
533 deps: [compiler.CompilerConfig, compiler.CompileReflector, compiler.Parser, compiler.ElementSchemaRegistry, compiler.I18NHtmlParser, core.ɵConsole]
534 },
535 { provide: compiler.JitEvaluator, useClass: compiler.JitEvaluator, deps: [] },
536 { provide: compiler.DirectiveNormalizer, deps: [compiler.ResourceLoader, compiler.UrlResolver, compiler.HtmlParser, compiler.CompilerConfig] },
537 {
538 provide: compiler.CompileMetadataResolver,
539 deps: [
540 compiler.CompilerConfig, compiler.HtmlParser, compiler.NgModuleResolver, compiler.DirectiveResolver, compiler.PipeResolver,
541 compiler.SummaryResolver, compiler.ElementSchemaRegistry, compiler.DirectiveNormalizer, core.ɵConsole,
542 [core.Optional, compiler.StaticSymbolCache], compiler.CompileReflector, [core.Optional, ERROR_COLLECTOR_TOKEN]
543 ]
544 },
545 DEFAULT_PACKAGE_URL_PROVIDER,
546 { provide: compiler.StyleCompiler, deps: [compiler.UrlResolver] },
547 { provide: compiler.ViewCompiler, deps: [compiler.CompileReflector] },
548 { provide: compiler.NgModuleCompiler, deps: [compiler.CompileReflector] },
549 { provide: compiler.CompilerConfig, useValue: ɵ3 },
550 {
551 provide: core.Compiler,
552 useClass: CompilerImpl,
553 deps: [
554 core.Injector, compiler.CompileMetadataResolver, compiler.TemplateParser, compiler.StyleCompiler, compiler.ViewCompiler,
555 compiler.NgModuleCompiler, compiler.SummaryResolver, compiler.CompileReflector, compiler.JitEvaluator, compiler.CompilerConfig, core.ɵConsole
556 ]
557 },
558 { provide: compiler.DomElementSchemaRegistry, deps: [] },
559 { provide: compiler.ElementSchemaRegistry, useExisting: compiler.DomElementSchemaRegistry },
560 { provide: compiler.UrlResolver, deps: [core.PACKAGE_ROOT_URL] },
561 { provide: compiler.DirectiveResolver, deps: [compiler.CompileReflector] },
562 { provide: compiler.PipeResolver, deps: [compiler.CompileReflector] },
563 { provide: compiler.NgModuleResolver, deps: [compiler.CompileReflector] },
564 ];
565 var COMPILER_PROVIDERS__POST_R3__ = [{ provide: core.Compiler, useFactory: function () { return new core.Compiler(); } }];
566 var COMPILER_PROVIDERS = COMPILER_PROVIDERS__PRE_R3__;
567 /**
568 * @publicApi
569 */
570 var JitCompilerFactory = /** @class */ (function () {
571 /* @internal */
572 function JitCompilerFactory(defaultOptions) {
573 var compilerOptions = {
574 useJit: true,
575 defaultEncapsulation: core.ViewEncapsulation.Emulated,
576 missingTranslation: core.MissingTranslationStrategy.Warning,
577 };
578 this._defaultOptions = __spreadArray([compilerOptions], __read(defaultOptions));
579 }
580 JitCompilerFactory.prototype.createCompiler = function (options) {
581 if (options === void 0) { options = []; }
582 var opts = _mergeOptions(this._defaultOptions.concat(options));
583 var injector = core.Injector.create([
584 COMPILER_PROVIDERS, {
585 provide: compiler.CompilerConfig,
586 useFactory: function () {
587 return new compiler.CompilerConfig({
588 // let explicit values from the compiler options overwrite options
589 // from the app providers
590 useJit: opts.useJit,
591 jitDevMode: core.isDevMode(),
592 // let explicit values from the compiler options overwrite options
593 // from the app providers
594 defaultEncapsulation: opts.defaultEncapsulation,
595 missingTranslation: opts.missingTranslation,
596 preserveWhitespaces: opts.preserveWhitespaces,
597 });
598 },
599 deps: []
600 },
601 opts.providers
602 ]);
603 return injector.get(core.Compiler);
604 };
605 return JitCompilerFactory;
606 }());
607 function _mergeOptions(optionsArr) {
608 return {
609 useJit: _lastDefined(optionsArr.map(function (options) { return options.useJit; })),
610 defaultEncapsulation: _lastDefined(optionsArr.map(function (options) { return options.defaultEncapsulation; })),
611 providers: _mergeArrays(optionsArr.map(function (options) { return options.providers; })),
612 missingTranslation: _lastDefined(optionsArr.map(function (options) { return options.missingTranslation; })),
613 preserveWhitespaces: _lastDefined(optionsArr.map(function (options) { return options.preserveWhitespaces; })),
614 };
615 }
616 function _lastDefined(args) {
617 for (var i = args.length - 1; i >= 0; i--) {
618 if (args[i] !== undefined) {
619 return args[i];
620 }
621 }
622 return undefined;
623 }
624 function _mergeArrays(parts) {
625 var result = [];
626 parts.forEach(function (part) { return part && result.push.apply(result, __spreadArray([], __read(part))); });
627 return result;
628 }
629
630 /**
631 * @license
632 * Copyright Google LLC All Rights Reserved.
633 *
634 * Use of this source code is governed by an MIT-style license that can be
635 * found in the LICENSE file at https://angular.io/license
636 */
637 var ɵ0$1 = {};
638 /**
639 * A platform that included corePlatform and the compiler.
640 *
641 * @publicApi
642 */
643 var platformCoreDynamic = core.createPlatformFactory(core.platformCore, 'coreDynamic', [
644 { provide: core.COMPILER_OPTIONS, useValue: ɵ0$1, multi: true },
645 { provide: core.CompilerFactory, useClass: JitCompilerFactory, deps: [core.COMPILER_OPTIONS] },
646 ]);
647
648 var ResourceLoaderImpl = /** @class */ (function (_super) {
649 __extends(ResourceLoaderImpl, _super);
650 function ResourceLoaderImpl() {
651 return _super !== null && _super.apply(this, arguments) || this;
652 }
653 ResourceLoaderImpl.prototype.get = function (url) {
654 var resolve;
655 var reject;
656 var promise = new Promise(function (res, rej) {
657 resolve = res;
658 reject = rej;
659 });
660 var xhr = new XMLHttpRequest();
661 xhr.open('GET', url, true);
662 xhr.responseType = 'text';
663 xhr.onload = function () {
664 // responseText is the old-school way of retrieving response (supported by IE8 & 9)
665 // response/responseType properties were introduced in ResourceLoader Level2 spec (supported
666 // by IE10)
667 var response = xhr.response || xhr.responseText;
668 // normalize IE9 bug (https://bugs.jquery.com/ticket/1450)
669 var status = xhr.status === 1223 ? 204 : xhr.status;
670 // fix status code when it is 0 (0 status is undocumented).
671 // Occurs when accessing file resources or on Android 4.1 stock browser
672 // while retrieving files from application cache.
673 if (status === 0) {
674 status = response ? 200 : 0;
675 }
676 if (200 <= status && status <= 300) {
677 resolve(response);
678 }
679 else {
680 reject("Failed to load " + url);
681 }
682 };
683 xhr.onerror = function () {
684 reject("Failed to load " + url);
685 };
686 xhr.send();
687 return promise;
688 };
689 return ResourceLoaderImpl;
690 }(compiler.ResourceLoader));
691 ResourceLoaderImpl.decorators = [
692 { type: core.Injectable }
693 ];
694
695 /**
696 * @license
697 * Copyright Google LLC All Rights Reserved.
698 *
699 * Use of this source code is governed by an MIT-style license that can be
700 * found in the LICENSE file at https://angular.io/license
701 */
702 var ɵ0$2 = { providers: [{ provide: compiler.ResourceLoader, useClass: ResourceLoaderImpl, deps: [] }] }, ɵ1$1 = common.ɵPLATFORM_BROWSER_ID;
703 /**
704 * @publicApi
705 */
706 var INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = [
707 platformBrowser.ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS,
708 {
709 provide: core.COMPILER_OPTIONS,
710 useValue: ɵ0$2,
711 multi: true
712 },
713 { provide: core.PLATFORM_ID, useValue: ɵ1$1 },
714 ];
715
716 /**
717 * An implementation of ResourceLoader that uses a template cache to avoid doing an actual
718 * ResourceLoader.
719 *
720 * The template cache needs to be built and loaded into window.$templateCache
721 * via a separate mechanism.
722 *
723 * @publicApi
724 */
725 var CachedResourceLoader = /** @class */ (function (_super) {
726 __extends(CachedResourceLoader, _super);
727 function CachedResourceLoader() {
728 var _this = _super.call(this) || this;
729 _this._cache = core.ɵglobal.$templateCache;
730 if (_this._cache == null) {
731 throw new Error('CachedResourceLoader: Template cache was not found in $templateCache.');
732 }
733 return _this;
734 }
735 CachedResourceLoader.prototype.get = function (url) {
736 if (this._cache.hasOwnProperty(url)) {
737 return Promise.resolve(this._cache[url]);
738 }
739 else {
740 return Promise.reject('CachedResourceLoader: Did not find cached template for ' + url);
741 }
742 };
743 return CachedResourceLoader;
744 }(compiler.ResourceLoader));
745
746 /**
747 * @license
748 * Copyright Google LLC All Rights Reserved.
749 *
750 * Use of this source code is governed by an MIT-style license that can be
751 * found in the LICENSE file at https://angular.io/license
752 */
753
754 /**
755 * @license
756 * Copyright Google LLC All Rights Reserved.
757 *
758 * Use of this source code is governed by an MIT-style license that can be
759 * found in the LICENSE file at https://angular.io/license
760 */
761 /**
762 * @publicApi
763 */
764 var VERSION = new core.Version('12.2.13');
765
766 /**
767 * @license
768 * Copyright Google LLC All Rights Reserved.
769 *
770 * Use of this source code is governed by an MIT-style license that can be
771 * found in the LICENSE file at https://angular.io/license
772 */
773 /**
774 * @publicApi
775 */
776 var RESOURCE_CACHE_PROVIDER = [{ provide: compiler.ResourceLoader, useClass: CachedResourceLoader, deps: [] }];
777 /**
778 * @publicApi
779 */
780 var platformBrowserDynamic = core.createPlatformFactory(platformCoreDynamic, 'browserDynamic', INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
781
782 /**
783 * @license
784 * Copyright Google LLC All Rights Reserved.
785 *
786 * Use of this source code is governed by an MIT-style license that can be
787 * found in the LICENSE file at https://angular.io/license
788 */
789 // This file only reexports content of the `src` folder. Keep it that way.
790
791 /**
792 * @license
793 * Copyright Google LLC All Rights Reserved.
794 *
795 * Use of this source code is governed by an MIT-style license that can be
796 * found in the LICENSE file at https://angular.io/license
797 */
798
799 /**
800 * Generated bundle index. Do not edit.
801 */
802
803 exports.JitCompilerFactory = JitCompilerFactory;
804 exports.RESOURCE_CACHE_PROVIDER = RESOURCE_CACHE_PROVIDER;
805 exports.VERSION = VERSION;
806 exports.platformBrowserDynamic = platformBrowserDynamic;
807 exports.ɵCOMPILER_PROVIDERS__POST_R3__ = COMPILER_PROVIDERS__POST_R3__;
808 exports.ɵCompilerImpl = CompilerImpl;
809 exports.ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS;
810 exports.ɵResourceLoaderImpl = ResourceLoaderImpl;
811 exports.ɵangular_packages_platform_browser_dynamic_platform_browser_dynamic_a = CachedResourceLoader;
812 exports.ɵplatformCoreDynamic = platformCoreDynamic;
813
814 Object.defineProperty(exports, '__esModule', { value: true });
815
816})));
817//# sourceMappingURL=platform-browser-dynamic.umd.js.map
Note: See TracBrowser for help on using the repository browser.