{"version":3,"file":"icon.js","sources":["../../packages/material/icon/icon-registry.js","../../packages/material/icon/icon.js","../../packages/material/icon/icon-module.js","../../packages/material/icon/index.js"],"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 */\nimport { catchOperator, doOperator, finallyOperator, map, RxChain, share } from '@angular/cdk/rxjs';\nimport { Injectable, Optional, SecurityContext, SkipSelf } from '@angular/core';\nimport { Http } from '@angular/http';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { Observable } from 'rxjs/Observable';\nimport { forkJoin } from 'rxjs/observable/forkJoin';\nimport { of as observableOf } from 'rxjs/observable/of';\nimport { _throw as observableThrow } from 'rxjs/observable/throw';\n/**\n * Returns an exception to be thrown in the case when attempting to\n * load an icon with a name that cannot be found.\n * \\@docs-private\n * @param {?} iconName\n * @return {?}\n */\nexport function getMatIconNameNotFoundError(iconName) {\n return Error(`Unable to find icon with the name \"${iconName}\"`);\n}\n/**\n * Returns an exception to be thrown when the consumer attempts to use\n * `` without including \\@angular/http.\n * \\@docs-private\n * @return {?}\n */\nexport function getMatIconNoHttpProviderError() {\n return Error('Could not find Http provider for use with Angular Material icons. ' +\n 'Please include the HttpModule from @angular/http in your app imports.');\n}\n/**\n * Returns an exception to be thrown when a URL couldn't be sanitized.\n * \\@docs-private\n * @param {?} url URL that was attempted to be sanitized.\n * @return {?}\n */\nexport function getMatIconFailedToSanitizeError(url) {\n return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL ` +\n `via Angular's DomSanitizer. Attempted URL was \"${url}\".`);\n}\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * \\@docs-private\n */\nclass SvgIconConfig {\n /**\n * @param {?} url\n */\n constructor(url) {\n this.url = url;\n this.svgElement = null;\n }\n}\nfunction SvgIconConfig_tsickle_Closure_declarations() {\n /** @type {?} */\n SvgIconConfig.prototype.svgElement;\n /** @type {?} */\n SvgIconConfig.prototype.url;\n}\n/**\n * Service to register and display icons used by the component.\n * - Registers icon URLs by namespace and name.\n * - Registers icon set URLs by namespace.\n * - Registers aliases for CSS classes, for use with icon fonts.\n * - Loads icons from URLs and extracts individual icons from icon sets.\n */\nexport class MatIconRegistry {\n /**\n * @param {?} _http\n * @param {?} _sanitizer\n */\n constructor(_http, _sanitizer) {\n this._http = _http;\n this._sanitizer = _sanitizer;\n /**\n * URLs and cached SVG elements for individual icons. Keys are of the format \"[namespace]:[icon]\".\n */\n this._svgIconConfigs = new Map();\n /**\n * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.\n * Multiple icon sets can be registered under the same namespace.\n */\n this._iconSetConfigs = new Map();\n /**\n * Cache for icons loaded by direct URLs.\n */\n this._cachedIconsByUrl = new Map();\n /**\n * In-progress icon fetches. Used to coalesce multiple requests to the same URL.\n */\n this._inProgressUrlFetches = new Map();\n /**\n * Map from font identifiers to their CSS class names. Used for icon fonts.\n */\n this._fontCssClassesByAlias = new Map();\n /**\n * The CSS class to apply when an component has no icon name, url, or font specified.\n * The default 'material-icons' value assumes that the material icon font has been loaded as\n * described at http://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n this._defaultFontSetClass = 'material-icons';\n }\n /**\n * Registers an icon by URL in the default namespace.\n * @param {?} iconName Name under which the icon should be registered.\n * @param {?} url\n * @return {?}\n */\n addSvgIcon(iconName, url) {\n return this.addSvgIconInNamespace('', iconName, url);\n }\n /**\n * Registers an icon by URL in the specified namespace.\n * @param {?} namespace Namespace in which the icon should be registered.\n * @param {?} iconName Name under which the icon should be registered.\n * @param {?} url\n * @return {?}\n */\n addSvgIconInNamespace(namespace, iconName, url) {\n const /** @type {?} */ key = iconKey(namespace, iconName);\n this._svgIconConfigs.set(key, new SvgIconConfig(url));\n return this;\n }\n /**\n * Registers an icon set by URL in the default namespace.\n * @param {?} url\n * @return {?}\n */\n addSvgIconSet(url) {\n return this.addSvgIconSetInNamespace('', url);\n }\n /**\n * Registers an icon set by URL in the specified namespace.\n * @param {?} namespace Namespace in which to register the icon set.\n * @param {?} url\n * @return {?}\n */\n addSvgIconSetInNamespace(namespace, url) {\n const /** @type {?} */ config = new SvgIconConfig(url);\n const /** @type {?} */ configNamespace = this._iconSetConfigs.get(namespace);\n if (configNamespace) {\n configNamespace.push(config);\n }\n else {\n this._iconSetConfigs.set(namespace, [config]);\n }\n return this;\n }\n /**\n * Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon\n * component with the alias as the fontSet input will cause the class name to be applied\n * to the element.\n *\n * @param {?} alias Alias for the font.\n * @param {?=} className Class name override to be used instead of the alias.\n * @return {?}\n */\n registerFontClassAlias(alias, className = alias) {\n this._fontCssClassesByAlias.set(alias, className);\n return this;\n }\n /**\n * Returns the CSS class name associated with the alias by a previous call to\n * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.\n * @param {?} alias\n * @return {?}\n */\n classNameForFontAlias(alias) {\n return this._fontCssClassesByAlias.get(alias) || alias;\n }\n /**\n * Sets the CSS class name to be used for icon fonts when an component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n *\n * @param {?} className\n * @return {?}\n */\n setDefaultFontSetClass(className) {\n this._defaultFontSetClass = className;\n return this;\n }\n /**\n * Returns the CSS class name to be used for icon fonts when an component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n * @return {?}\n */\n getDefaultFontSetClass() {\n return this._defaultFontSetClass;\n }\n /**\n * Returns an Observable that produces the icon (as an DOM element) from the given URL.\n * The response from the URL may be cached so this will not always cause an HTTP request, but\n * the produced element will always be a new copy of the originally fetched icon. (That is,\n * it will not contain any modifications made to elements previously returned).\n *\n * @param {?} safeUrl URL from which to fetch the SVG icon.\n * @return {?}\n */\n getSvgIconFromUrl(safeUrl) {\n let /** @type {?} */ url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n if (!url) {\n throw getMatIconFailedToSanitizeError(safeUrl);\n }\n let /** @type {?} */ cachedIcon = this._cachedIconsByUrl.get(url);\n if (cachedIcon) {\n return observableOf(cloneSvg(cachedIcon));\n }\n return RxChain.from(this._loadSvgIconFromConfig(new SvgIconConfig(url)))\n .call(doOperator, svg => this._cachedIconsByUrl.set(/** @type {?} */ ((url)), svg))\n .call(map, svg => cloneSvg(svg))\n .result();\n }\n /**\n * Returns an Observable that produces the icon (as an DOM element) with the given name\n * and namespace. The icon must have been previously registered with addIcon or addIconSet;\n * if not, the Observable will throw an error.\n *\n * @param {?} name Name of the icon to be retrieved.\n * @param {?=} namespace Namespace in which to look for the icon.\n * @return {?}\n */\n getNamedSvgIcon(name, namespace = '') {\n // Return (copy of) cached icon if possible.\n const /** @type {?} */ key = iconKey(namespace, name);\n const /** @type {?} */ config = this._svgIconConfigs.get(key);\n if (config) {\n return this._getSvgFromConfig(config);\n }\n // See if we have any icon sets registered for the namespace.\n const /** @type {?} */ iconSetConfigs = this._iconSetConfigs.get(namespace);\n if (iconSetConfigs) {\n return this._getSvgFromIconSetConfigs(name, iconSetConfigs);\n }\n return observableThrow(getMatIconNameNotFoundError(key));\n }\n /**\n * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.\n * @param {?} config\n * @return {?}\n */\n _getSvgFromConfig(config) {\n if (config.svgElement) {\n // We already have the SVG element for this icon, return a copy.\n return observableOf(cloneSvg(config.svgElement));\n }\n else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return RxChain.from(this._loadSvgIconFromConfig(config))\n .call(doOperator, svg => config.svgElement = svg)\n .call(map, svg => cloneSvg(svg))\n .result();\n }\n }\n /**\n * Attempts to find an icon with the specified name in any of the SVG icon sets.\n * First searches the available cached icons for a nested element with a matching name, and\n * if found copies the element to a new element. If not found, fetches all icon sets\n * that have not been cached, and searches again after all fetches are completed.\n * The returned Observable produces the SVG element if possible, and throws\n * an error if no icon with the specified name can be found.\n * @param {?} name\n * @param {?} iconSetConfigs\n * @return {?}\n */\n _getSvgFromIconSetConfigs(name, iconSetConfigs) {\n // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n // requested name.\n const /** @type {?} */ namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n if (namedIcon) {\n // We could cache namedIcon in _svgIconConfigs, but since we have to make a copy every\n // time anyway, there's probably not much advantage compared to just always extracting\n // it from the icon set.\n return observableOf(namedIcon);\n }\n // Not found in any cached icon sets. If there are icon sets with URLs that we haven't\n // fetched, fetch them now and look for iconName in the results.\n const /** @type {?} */ iconSetFetchRequests = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgElement)\n .map(iconSetConfig => {\n return RxChain.from(this._loadSvgIconSetFromConfig(iconSetConfig))\n .call(catchOperator, (err) => {\n let /** @type {?} */ url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n // Swallow errors fetching individual URLs so the combined Observable won't\n // necessarily fail.\n console.log(`Loading icon set URL: ${url} failed: ${err}`);\n return observableOf(null);\n })\n .call(doOperator, svg => {\n // Cache the SVG element.\n if (svg) {\n iconSetConfig.svgElement = svg;\n }\n })\n .result();\n });\n // Fetch all the icon set URLs. When the requests complete, every IconSet should have a\n // cached SVG element (unless the request failed), and we can check again for the icon.\n return map.call(forkJoin.call(Observable, iconSetFetchRequests), () => {\n const /** @type {?} */ foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n if (!foundIcon) {\n throw getMatIconNameNotFoundError(name);\n }\n return foundIcon;\n });\n }\n /**\n * Searches the cached SVG elements for the given icon sets for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n * @param {?} iconName\n * @param {?} iconSetConfigs\n * @return {?}\n */\n _extractIconWithNameFromAnySet(iconName, iconSetConfigs) {\n // Iterate backwards, so icon sets added later have precedence.\n for (let /** @type {?} */ i = iconSetConfigs.length - 1; i >= 0; i--) {\n const /** @type {?} */ config = iconSetConfigs[i];\n if (config.svgElement) {\n const /** @type {?} */ foundIcon = this._extractSvgIconFromSet(config.svgElement, iconName);\n if (foundIcon) {\n return foundIcon;\n }\n }\n }\n return null;\n }\n /**\n * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n * @param {?} config\n * @return {?}\n */\n _loadSvgIconFromConfig(config) {\n return map.call(this._fetchUrl(config.url), svgText => this._createSvgElementForSingleIcon(svgText));\n }\n /**\n * Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n * @param {?} config\n * @return {?}\n */\n _loadSvgIconSetFromConfig(config) {\n // TODO: Document that icons should only be loaded from trusted sources.\n return map.call(this._fetchUrl(config.url), svgText => this._svgElementFromString(svgText));\n }\n /**\n * Creates a DOM element from the given SVG string, and adds default attributes.\n * @param {?} responseText\n * @return {?}\n */\n _createSvgElementForSingleIcon(responseText) {\n const /** @type {?} */ svg = this._svgElementFromString(responseText);\n this._setSvgAttributes(svg);\n return svg;\n }\n /**\n * Searches the cached element of the given SvgIconConfig for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n * @param {?} iconSet\n * @param {?} iconName\n * @return {?}\n */\n _extractSvgIconFromSet(iconSet, iconName) {\n const /** @type {?} */ iconNode = iconSet.querySelector('#' + iconName);\n if (!iconNode) {\n return null;\n }\n // If the icon node is itself an node, clone and return it directly. If not, set it as\n // the content of a new node.\n if (iconNode.tagName.toLowerCase() === 'svg') {\n return this._setSvgAttributes(/** @type {?} */ (iconNode.cloneNode(true)));\n }\n // If the node is a , it won't be rendered so we have to convert it into . Note\n // that the same could be achieved by referring to it via , however the \n // tag is problematic on Firefox, because it needs to include the current page path.\n if (iconNode.nodeName.toLowerCase() === 'symbol') {\n return this._setSvgAttributes(this._toSvgElement(iconNode));\n }\n // createElement('SVG') doesn't work as expected; the DOM ends up with\n // the correct nodes, but the SVG content doesn't render. Instead we\n // have to create an empty SVG node using innerHTML and append its content.\n // Elements created using DOMParser.parseFromString have the same problem.\n // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display\n const /** @type {?} */ svg = this._svgElementFromString('');\n // Clone the node so we don't remove it from the parent icon set element.\n svg.appendChild(iconNode.cloneNode(true));\n return this._setSvgAttributes(svg);\n }\n /**\n * Creates a DOM element from the given SVG string.\n * @param {?} str\n * @return {?}\n */\n _svgElementFromString(str) {\n // TODO: Is there a better way than innerHTML? Renderer doesn't appear to have a method for\n // creating an element from an HTML string.\n const /** @type {?} */ div = document.createElement('DIV');\n div.innerHTML = str;\n const /** @type {?} */ svg = (div.querySelector('svg'));\n if (!svg) {\n throw Error(' tag not found');\n }\n return svg;\n }\n /**\n * Converts an element into an SVG node by cloning all of its children.\n * @param {?} element\n * @return {?}\n */\n _toSvgElement(element) {\n let /** @type {?} */ svg = this._svgElementFromString('');\n for (let /** @type {?} */ i = 0; i < element.childNodes.length; i++) {\n if (element.childNodes[i].nodeType === Node.ELEMENT_NODE) {\n svg.appendChild(element.childNodes[i].cloneNode(true));\n }\n }\n return svg;\n }\n /**\n * Sets the default attributes for an SVG element to be used as an icon.\n * @param {?} svg\n * @return {?}\n */\n _setSvgAttributes(svg) {\n if (!svg.getAttribute('xmlns')) {\n svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n }\n svg.setAttribute('fit', '');\n svg.setAttribute('height', '100%');\n svg.setAttribute('width', '100%');\n svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n return svg;\n }\n /**\n * Returns an Observable which produces the string contents of the given URL. Results may be\n * cached, so future calls with the same URL may not cause another HTTP request.\n * @param {?} safeUrl\n * @return {?}\n */\n _fetchUrl(safeUrl) {\n if (!this._http) {\n throw getMatIconNoHttpProviderError();\n }\n const /** @type {?} */ url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n if (!url) {\n throw getMatIconFailedToSanitizeError(safeUrl);\n }\n // Store in-progress fetches to avoid sending a duplicate request for a URL when there is\n // already a request in progress for that URL. It's necessary to call share() on the\n // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.\n const /** @type {?} */ inProgressFetch = this._inProgressUrlFetches.get(url);\n if (inProgressFetch) {\n return inProgressFetch;\n }\n // TODO(jelbourn): for some reason, the `finally` operator \"loses\" the generic type on the\n // Observable. Figure out why and fix it.\n const /** @type {?} */ req = RxChain.from(this._http.get(url))\n .call(map, response => response.text())\n .call(finallyOperator, () => this._inProgressUrlFetches.delete(url))\n .call(share)\n .result();\n this._inProgressUrlFetches.set(url, req);\n return req;\n }\n}\nMatIconRegistry.decorators = [\n { type: Injectable },\n];\n/**\n * @nocollapse\n */\nMatIconRegistry.ctorParameters = () => [\n { type: Http, decorators: [{ type: Optional },] },\n { type: DomSanitizer, },\n];\nfunction MatIconRegistry_tsickle_Closure_declarations() {\n /** @type {?} */\n MatIconRegistry.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatIconRegistry.ctorParameters;\n /**\n * URLs and cached SVG elements for individual icons. Keys are of the format \"[namespace]:[icon]\".\n * @type {?}\n */\n MatIconRegistry.prototype._svgIconConfigs;\n /**\n * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.\n * Multiple icon sets can be registered under the same namespace.\n * @type {?}\n */\n MatIconRegistry.prototype._iconSetConfigs;\n /**\n * Cache for icons loaded by direct URLs.\n * @type {?}\n */\n MatIconRegistry.prototype._cachedIconsByUrl;\n /**\n * In-progress icon fetches. Used to coalesce multiple requests to the same URL.\n * @type {?}\n */\n MatIconRegistry.prototype._inProgressUrlFetches;\n /**\n * Map from font identifiers to their CSS class names. Used for icon fonts.\n * @type {?}\n */\n MatIconRegistry.prototype._fontCssClassesByAlias;\n /**\n * The CSS class to apply when an component has no icon name, url, or font specified.\n * The default 'material-icons' value assumes that the material icon font has been loaded as\n * described at http://google.github.io/material-design-icons/#icon-font-for-the-web\n * @type {?}\n */\n MatIconRegistry.prototype._defaultFontSetClass;\n /** @type {?} */\n MatIconRegistry.prototype._http;\n /** @type {?} */\n MatIconRegistry.prototype._sanitizer;\n}\n/**\n * \\@docs-private\n * @param {?} parentRegistry\n * @param {?} http\n * @param {?} sanitizer\n * @return {?}\n */\nexport function ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry, http, sanitizer) {\n return parentRegistry || new MatIconRegistry(http, sanitizer);\n}\n/**\n * \\@docs-private\n */\nexport const ICON_REGISTRY_PROVIDER = {\n // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.\n provide: MatIconRegistry,\n deps: [[new Optional(), new SkipSelf(), MatIconRegistry], [new Optional(), Http], DomSanitizer],\n useFactory: ICON_REGISTRY_PROVIDER_FACTORY\n};\n/**\n * Clones an SVGElement while preserving type information.\n * @param {?} svg\n * @return {?}\n */\nfunction cloneSvg(svg) {\n return (svg.cloneNode(true));\n}\n/**\n * Returns the cache key to use for an icon namespace and name.\n * @param {?} namespace\n * @param {?} name\n * @return {?}\n */\nfunction iconKey(namespace, name) {\n return namespace + ':' + name;\n}\n//# sourceMappingURL=icon-registry.js.map","/**\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 */\nimport { first } from '@angular/cdk/rxjs';\nimport { Attribute, ChangeDetectionStrategy, Component, ElementRef, Input, Renderer2, ViewEncapsulation, } from '@angular/core';\nimport { mixinColor } from '@angular/material/core';\nimport { MatIconRegistry } from './icon-registry';\n/**\n * \\@docs-private\n */\nexport class MatIconBase {\n /**\n * @param {?} _renderer\n * @param {?} _elementRef\n */\n constructor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n }\n}\nfunction MatIconBase_tsickle_Closure_declarations() {\n /** @type {?} */\n MatIconBase.prototype._renderer;\n /** @type {?} */\n MatIconBase.prototype._elementRef;\n}\nexport const /** @type {?} */ _MatIconMixinBase = mixinColor(MatIconBase);\n/**\n * Component to display an icon. It can be used in the following ways:\n *\n * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the\n * addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of\n * MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format\n * \"[namespace]:[name]\", if not the value will be the name of an icon in the default namespace.\n * Examples:\n * \n * \n *\n * - Use a font ligature as an icon by putting the ligature text in the content of the \n * component. By default the Material icons font is used as described at\n * http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an\n * alternate font by setting the fontSet input to either the CSS class to apply to use the\n * desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.\n * Examples:\n * home\n * sun\n *\n * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the\n * font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a\n * CSS class which causes the glyph to be displayed via a :before selector, as in\n * https://fortawesome.github.io/Font-Awesome/examples/\n * Example:\n * \n */\nexport class MatIcon extends _MatIconMixinBase {\n /**\n * @param {?} renderer\n * @param {?} elementRef\n * @param {?} _iconRegistry\n * @param {?} ariaHidden\n */\n constructor(renderer, elementRef, _iconRegistry, ariaHidden) {\n super(renderer, elementRef);\n this._iconRegistry = _iconRegistry;\n // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\n // the right thing to do for the majority of icon use-cases.\n if (!ariaHidden) {\n renderer.setAttribute(elementRef.nativeElement, 'aria-hidden', 'true');\n }\n }\n /**\n * Splits an svgIcon binding value into its icon set and icon name components.\n * Returns a 2-element array of [(icon set), (icon name)].\n * The separator for the two fields is ':'. If there is no separator, an empty\n * string is returned for the icon set and the entire value is returned for\n * the icon name. If the argument is falsy, returns an array of two empty strings.\n * Throws an error if the name contains two or more ':' separators.\n * Examples:\n * 'social:cake' -> ['social', 'cake']\n * 'penguin' -> ['', 'penguin']\n * null -> ['', '']\n * 'a:b:c' -> (throws Error)\n * @param {?} iconName\n * @return {?}\n */\n _splitIconName(iconName) {\n if (!iconName) {\n return ['', ''];\n }\n const /** @type {?} */ parts = iconName.split(':');\n switch (parts.length) {\n case 1: return ['', parts[0]]; // Use default namespace.\n case 2: return (parts);\n default: throw Error(`Invalid icon name: \"${iconName}\"`);\n }\n }\n /**\n * @param {?} changes\n * @return {?}\n */\n ngOnChanges(changes) {\n // Only update the inline SVG icon if the inputs changed, to avoid unnecessary DOM operations.\n if (changes.svgIcon) {\n if (this.svgIcon) {\n const [namespace, iconName] = this._splitIconName(this.svgIcon);\n first.call(this._iconRegistry.getNamedSvgIcon(iconName, namespace)).subscribe(svg => this._setSvgElement(svg), (err) => console.log(`Error retrieving icon: ${err.message}`));\n }\n else {\n this._clearSvgElement();\n }\n }\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n /**\n * @return {?}\n */\n ngOnInit() {\n // Update font classes because ngOnChanges won't be called if none of the inputs are present,\n // e.g. arrow In this case we need to add a CSS class for the default font.\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n /**\n * @return {?}\n */\n _usingFontIcon() {\n return !this.svgIcon;\n }\n /**\n * @param {?} svg\n * @return {?}\n */\n _setSvgElement(svg) {\n this._clearSvgElement();\n this._renderer.appendChild(this._elementRef.nativeElement, svg);\n }\n /**\n * @return {?}\n */\n _clearSvgElement() {\n const /** @type {?} */ layoutElement = this._elementRef.nativeElement;\n const /** @type {?} */ childCount = layoutElement.childNodes.length;\n // Remove existing child nodes and add the new SVG element. Note that we can't\n // use innerHTML, because IE will throw if the element has a data binding.\n for (let /** @type {?} */ i = 0; i < childCount; i++) {\n this._renderer.removeChild(layoutElement, layoutElement.childNodes[i]);\n }\n }\n /**\n * @return {?}\n */\n _updateFontIconClasses() {\n if (!this._usingFontIcon()) {\n return;\n }\n const /** @type {?} */ elem = this._elementRef.nativeElement;\n const /** @type {?} */ fontSetClass = this.fontSet ?\n this._iconRegistry.classNameForFontAlias(this.fontSet) :\n this._iconRegistry.getDefaultFontSetClass();\n if (fontSetClass != this._previousFontSetClass) {\n if (this._previousFontSetClass) {\n this._renderer.removeClass(elem, this._previousFontSetClass);\n }\n if (fontSetClass) {\n this._renderer.addClass(elem, fontSetClass);\n }\n this._previousFontSetClass = fontSetClass;\n }\n if (this.fontIcon != this._previousFontIconClass) {\n if (this._previousFontIconClass) {\n this._renderer.removeClass(elem, this._previousFontIconClass);\n }\n if (this.fontIcon) {\n this._renderer.addClass(elem, this.fontIcon);\n }\n this._previousFontIconClass = this.fontIcon;\n }\n }\n}\nMatIcon.decorators = [\n { type: Component, args: [{template: '',\n selector: 'mat-icon',\n exportAs: 'matIcon',\n styles: [\".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}\"],\n inputs: ['color'],\n host: {\n 'role': 'img',\n 'class': 'mat-icon',\n },\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n },] },\n];\n/**\n * @nocollapse\n */\nMatIcon.ctorParameters = () => [\n { type: Renderer2, },\n { type: ElementRef, },\n { type: MatIconRegistry, },\n { type: undefined, decorators: [{ type: Attribute, args: ['aria-hidden',] },] },\n];\nMatIcon.propDecorators = {\n 'svgIcon': [{ type: Input },],\n 'fontSet': [{ type: Input },],\n 'fontIcon': [{ type: Input },],\n};\nfunction MatIcon_tsickle_Closure_declarations() {\n /** @type {?} */\n MatIcon.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatIcon.ctorParameters;\n /** @type {?} */\n MatIcon.propDecorators;\n /**\n * Name of the icon in the SVG icon set.\n * @type {?}\n */\n MatIcon.prototype.svgIcon;\n /**\n * Font set that the icon is a part of.\n * @type {?}\n */\n MatIcon.prototype.fontSet;\n /**\n * Name of an icon within a font set.\n * @type {?}\n */\n MatIcon.prototype.fontIcon;\n /** @type {?} */\n MatIcon.prototype._previousFontSetClass;\n /** @type {?} */\n MatIcon.prototype._previousFontIconClass;\n /** @type {?} */\n MatIcon.prototype._iconRegistry;\n}\n//# sourceMappingURL=icon.js.map","/**\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 */\nimport { NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatIcon } from './icon';\nimport { ICON_REGISTRY_PROVIDER } from './icon-registry';\nexport class MatIconModule {\n}\nMatIconModule.decorators = [\n { type: NgModule, args: [{\n imports: [MatCommonModule],\n exports: [MatIcon, MatCommonModule],\n declarations: [MatIcon],\n providers: [ICON_REGISTRY_PROVIDER],\n },] },\n];\n/**\n * @nocollapse\n */\nMatIconModule.ctorParameters = () => [];\nfunction MatIconModule_tsickle_Closure_declarations() {\n /** @type {?} */\n MatIconModule.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatIconModule.ctorParameters;\n}\n//# sourceMappingURL=icon-module.js.map","/**\n * Generated bundle index. Do not edit.\n */\nexport { MatIconModule, MatIconBase, _MatIconMixinBase, MatIcon, getMatIconNameNotFoundError, getMatIconNoHttpProviderError, getMatIconFailedToSanitizeError, MatIconRegistry, ICON_REGISTRY_PROVIDER_FACTORY, ICON_REGISTRY_PROVIDER } from './public-api';\n//# sourceMappingURL=index.js.map"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;;;;;;;;;;;AAeA;;;;;;;AAOA,AAAO,SAAS,2BAA2B,CAAC,QAAQ,EAAE;IAClD,OAAO,KAAK,CAAC,CAAC,mCAAmC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;CACnE;;;;;;;AAOD,AAAO,SAAS,6BAA6B,GAAG;IAC5C,OAAO,KAAK,CAAC,oEAAoE;QAC7E,uEAAuE,CAAC,CAAC;CAChF;;;;;;;AAOD,AAAO,SAAS,+BAA+B,CAAC,GAAG,EAAE;IACjD,OAAO,KAAK,CAAC,CAAC,sEAAsE,CAAC;QACjF,CAAC,+CAA+C,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;CAClE;;;;;AAKD,MAAM,aAAa,CAAC;;;;IAIhB,WAAW,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,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