{"version":3,"file":"platform-browser.umd.min.js","sources":["../../../../packages/platform-browser/src/browser/tools/common_tools.ts","../../../../packages/platform-browser/src/security/url_sanitizer.ts","../../../../packages/platform-browser/src/security/html_sanitizer.ts","../../../../packages/platform-browser/src/security/dom_sanitization_service.ts","../../../../packages/platform-browser/src/browser.ts","../../../../packages/platform-browser/src/dom/events/key_events.ts","../../../../packages/platform-browser/src/dom/events/hammer_gestures.ts","../../../../packages/platform-browser/src/dom/dom_renderer.ts","../../../../packages/platform-browser/src/dom/events/dom_events.ts","../../../../packages/platform-browser/src/browser/testability.ts","../../../../packages/platform-browser/src/browser/title.ts","../../../../packages/platform-browser/src/dom/debug/ng_probe.ts","../../../../packages/platform-browser/src/dom/events/event_manager.ts","../../../../packages/platform-browser/src/dom/shared_styles_host.ts","../../../../packages/platform-browser/src/browser/meta.ts","../../../../packages/platform-browser/src/security/style_sanitizer.ts","../../../../node_modules/tslib/tslib.es6.js","../../../../packages/platform-browser/src/dom/dom_adapter.ts","../../../../packages/platform-browser/src/browser/generic_browser_adapter.ts","../../../../packages/platform-browser/src/browser/browser_adapter.ts","../../../../packages/platform-browser/src/browser/location/browser_platform_location.ts","../../../../packages/platform-browser/src/browser/server-transition.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {ApplicationRef, ComponentRef} from '@angular/core';\nimport {getDOM} from '../../dom/dom_adapter';\nimport {window} from './browser';\nexport class ChangeDetectionPerfRecord {\n/**\n * @param {?} msPerTick\n * @param {?} numTicks\n */\nconstructor(public msPerTick: number,\npublic numTicks: number) {}\n}\n\nfunction ChangeDetectionPerfRecord_tsickle_Closure_declarations() {\n/** @type {?} */\nChangeDetectionPerfRecord.prototype.msPerTick;\n/** @type {?} */\nChangeDetectionPerfRecord.prototype.numTicks;\n}\n\n/**\n * Entry point for all Angular profiling-related debug tools. This object\n * corresponds to the `ng.profiler` in the dev console.\n */\nexport class AngularProfiler {\n appRef: ApplicationRef;\n/**\n * @param {?} ref\n */\nconstructor(ref: ComponentRef) { this.appRef = ref.injector.get(ApplicationRef); }\n/**\n * Exercises change detection in a loop and then prints the average amount of\n * time in milliseconds how long a single round of change detection takes for\n * the current state of the UI. It runs a minimum of 5 rounds for a minimum\n * of 500 milliseconds.\n * \n * Optionally, a user may pass a `config` parameter containing a map of\n * options. Supported options are:\n * \n * `record` (boolean) - causes the profiler to record a CPU profile while\n * it exercises the change detector. Example:\n * \n * ```\n * ng.profiler.timeChangeDetection({record: true})\n * ```\n * @param {?} config\n * @return {?}\n */\ntimeChangeDetection(config: any): ChangeDetectionPerfRecord {\n const /** @type {?} */ record = config && config['record'];\n const /** @type {?} */ profileName = 'Change Detection';\n // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened\n const /** @type {?} */ isProfilerAvailable = window.console.profile != null;\n if (record && isProfilerAvailable) {\n window.console.profile(profileName);\n }\n const /** @type {?} */ start = getDOM().performanceNow();\n let /** @type {?} */ numTicks = 0;\n while (numTicks < 5 || (getDOM().performanceNow() - start) < 500) {\n this.appRef.tick();\n numTicks++;\n }\n const /** @type {?} */ end = getDOM().performanceNow();\n if (record && isProfilerAvailable) {\n // need to cast to because type checker thinks there's no argument\n // while in fact there is:\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/Console/profileEnd\n ( /** @type {?} */((window.console.profileEnd)))(profileName);\n }\n const /** @type {?} */ msPerTick = (end - start) / numTicks;\n window.console.log(`ran ${numTicks} change detection cycles`);\n window.console.log(`${msPerTick.toFixed(2)} ms per check`);\n\n return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n }\n}\n\nfunction AngularProfiler_tsickle_Closure_declarations() {\n/** @type {?} */\nAngularProfiler.prototype.appRef;\n}\n\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {isDevMode} from '@angular/core';\n\nimport {getDOM} from '../dom/dom_adapter';\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n * \n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either a protocol in a whitelist (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n * \n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"http\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo<bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript:...\".\n * \n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/* A pattern that matches safe srcset values */\nconst /** @type {?} */ SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n/**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n */\nconst DATA_URL_PATTERN =\n /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\n/**\n * @param {?} url\n * @return {?}\n */\nexport function sanitizeUrl(url: string): string {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url;\n\n if (isDevMode()) {\n getDOM().log(`WARNING: sanitizing unsafe URL value ${url} (see http://g.co/ng/security#xss)`);\n }\n\n return 'unsafe:' + url;\n}\n/**\n * @param {?} srcset\n * @return {?}\n */\nexport function sanitizeSrcset(srcset: string): string {\n srcset = String(srcset);\n return srcset.split(',').map((srcset) => sanitizeUrl(srcset.trim())).join(', ');\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {isDevMode} from '@angular/core';\n\nimport {DomAdapter, getDOM} from '../dom/dom_adapter';\n\nimport {sanitizeSrcset, sanitizeUrl} from './url_sanitizer';\n/**\n * A element that can be safely used to parse untrusted HTML. Lazily initialized below.\n */\nlet inertElement: HTMLElement|null = null;\n/**\n * Lazily initialized to make sure the DOM adapter gets set before use.\n */\nlet DOM: DomAdapter = null !;\n/**\n * Returns an HTML element that is guaranteed to not execute code when creating elements in it.\n * @return {?}\n */\nfunction getInertElement() {\n if (inertElement) return inertElement;\n DOM = getDOM();\n\n // Prefer using