{"version":3,"file":"icon.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/icon/trusted-types.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/icon/icon-registry.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/icon/icon.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/icon/icon.module.ts"],"sourcesContent":["/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * SBB Angular. It lazily constructs the Trusted Types policy, providing\n * helper utilities for promoting strings to Trusted Types. When Trusted Types\n * are not available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nexport declare interface TrustedHTML {\n  __brand__: 'TrustedHTML';\n}\n\nexport declare interface TrustedTypePolicyFactory {\n  createPolicy(\n    policyName: string,\n    policyOptions: {\n      createHTML?: (input: string) => string;\n    },\n  ): TrustedTypePolicy;\n}\n\nexport declare interface TrustedTypePolicy {\n  createHTML(input: string): TrustedHTML;\n}\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy | null | undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy | null {\n  if (policy === undefined) {\n    policy = null;\n    if (typeof window !== 'undefined') {\n      const ttWindow = window as unknown as { trustedTypes?: TrustedTypePolicyFactory };\n      if (ttWindow.trustedTypes !== undefined) {\n        policy = ttWindow.trustedTypes.createPolicy('sbb-esta#angular', {\n          createHTML: (s: string) => s,\n        });\n      }\n    }\n  }\n  return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nexport function trustedHTMLFromString(html: string): TrustedHTML {\n  return getPolicy()?.createHTML(html) || (html as unknown as TrustedHTML);\n}\n","import { DOCUMENT } from '@angular/common';\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\nimport {\n  ErrorHandler,\n  Inject,\n  Injectable,\n  OnDestroy,\n  Optional,\n  SecurityContext,\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml, SafeResourceUrl } from '@angular/platform-browser';\nimport { forkJoin, Observable, of as observableOf, throwError as observableThrow } from 'rxjs';\nimport { catchError, finalize, map, share, tap } from 'rxjs/operators';\n\nimport { TrustedHTML, trustedHTMLFromString } from './trusted-types';\n\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 */\nexport function getSbbIconNameNotFoundError(iconName: string): Error {\n  return Error(`Unable to find icon with the name \"${iconName}\"`);\n}\n\n/**\n * Returns an exception to be thrown when the consumer attempts to use\n * `<sbb-icon>` without including @angular/common/http.\n * @docs-private\n */\nexport function getSbbIconNoHttpProviderError(): Error {\n  // TODO(mhaertwig): Update message, http client is now provided in root.\n  return Error(\n    'Could not find HttpClient provider for use with Sbb Angular icons. ' +\n      'Please include the HttpClientModule from @angular/common/http in your ' +\n      'app imports.',\n  );\n}\n\n/**\n * Returns an exception to be thrown when a URL couldn't be sanitized.\n * @param url URL that was attempted to be sanitized.\n * @docs-private\n */\nexport function getSbbIconFailedToSanitizeUrlError(url: SafeResourceUrl): Error {\n  return Error(\n    `The URL provided to SbbIconRegistry was not trusted as a resource URL ` +\n      `via Angular's DomSanitizer. Attempted URL was \"${url}\".`,\n  );\n}\n\n/**\n * Returns an exception to be thrown when a HTML string couldn't be sanitized.\n * @param literal HTML that was attempted to be sanitized.\n * @docs-private\n */\nexport function getSbbIconFailedToSanitizeLiteralError(literal: SafeHtml): Error {\n  return Error(\n    `The literal provided to SbbIconRegistry was not trusted as safe HTML by ` +\n      `Angular's DomSanitizer. Attempted literal was \"${literal}\".`,\n  );\n}\n\n/** Options that can be used to configure how an icon or the icons in an icon set are presented. */\nexport interface SbbIconOptions {\n  /** View box to set on the icon. */\n  viewBox?: string;\n\n  /** Whether or not to fetch the icon or icon set using HTTP credentials. */\n  withCredentials?: boolean;\n}\n\n/**\n * Function that will be invoked by the icon registry when trying to resolve the\n * URL from which to fetch an icon. The returned URL will be used to make a request for the icon.\n */\nexport type IconResolver = (\n  name: string,\n  namespace: string,\n) => SafeResourceUrl | SafeResourceUrlWithIconOptions | null;\n\n/** Object that specifies a URL from which to fetch an icon and the options to use for it. */\nexport interface SafeResourceUrlWithIconOptions {\n  url: SafeResourceUrl;\n  options: SbbIconOptions;\n}\n\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * @docs-private\n */\nclass SvgIconConfig {\n  svgElement: SVGElement | null;\n\n  constructor(\n    public url: SafeResourceUrl,\n    public svgText: TrustedHTML | null,\n    public options?: SbbIconOptions,\n  ) {}\n}\n\n/** Icon configuration whose content has already been loaded. */\ntype LoadedSvgIconConfig = SvgIconConfig & { svgText: TrustedHTML };\n\n/**\n * Service to register and display icons used by the `<sbb-icon>` 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 */\n@Injectable({ providedIn: 'root' })\nexport class SbbIconRegistry implements OnDestroy {\n  private _document: Document;\n\n  /** URLs and cached SVG elements for individual icons. Keys are of the format \"[namespace]:[icon]\". */\n  private _svgIconConfigs = new Map<string, SvgIconConfig>();\n\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  private _iconSetConfigs = new Map<string, SvgIconConfig[]>();\n\n  /** Cache for icons loaded by direct URLs. */\n  private _cachedIconsByUrl = new Map<string, SVGElement>();\n\n  /** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */\n  private _inProgressUrlFetches = new Map<string, Observable<TrustedHTML>>();\n\n  /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n  private _fontCssClassesByAlias = new Map<string, string>();\n\n  /** Registered icon resolver functions. */\n  private _resolvers: IconResolver[] = [];\n\n  /**\n   * The CSS classes to apply when an `<sbb-icon>` component has no icon name, url, or font\n   * specified.\n   */\n  private _defaultFontSetClass = ['sbb-icons'];\n\n  /**\n   * A list of internally supported namespaces, which can be served from the icon CDN.\n   * (See https://icons.app.sbb.ch/)\n   */\n  private _sbbCdnSupportedNamespaces = ['kom', 'fpl', 'icons', 'picto'];\n\n  constructor(\n    @Optional() private _httpClient: HttpClient,\n    private _sanitizer: DomSanitizer,\n    @Optional() @Inject(DOCUMENT) document: any,\n    private readonly _errorHandler: ErrorHandler,\n  ) {\n    this._document = document;\n  }\n\n  /**\n   * Registers an icon by URL in the default namespace.\n   * @param iconName Name under which the icon should be registered.\n   */\n  addSvgIcon(iconName: string, url: SafeResourceUrl, options?: SbbIconOptions): this {\n    return this.addSvgIconInNamespace('', iconName, url, options);\n  }\n\n  /**\n   * Registers an icon using an HTML string in the default namespace.\n   * @param iconName Name under which the icon should be registered.\n   * @param literal SVG source of the icon.\n   */\n  addSvgIconLiteral(iconName: string, literal: SafeHtml, options?: SbbIconOptions): this {\n    return this.addSvgIconLiteralInNamespace('', iconName, literal, options);\n  }\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   */\n  addSvgIconInNamespace(\n    namespace: string,\n    iconName: string,\n    url: SafeResourceUrl,\n    options?: SbbIconOptions,\n  ): this {\n    return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, null, options));\n  }\n\n  /**\n   * Registers an icon resolver function with the registry. The function will be invoked with the\n   * name and namespace of an icon when the registry tries to resolve the URL from which to fetch\n   * the icon. The resolver is expected to return a `SafeResourceUrl` that points to the icon,\n   * an object with the icon URL and icon options, or `null` if the icon is not supported. Resolvers\n   * will be invoked in the order in which they have been registered.\n   * @param resolver Resolver function to be registered.\n   */\n  addSvgIconResolver(resolver: IconResolver): this {\n    this._resolvers.push(resolver);\n    return this;\n  }\n\n  /**\n   * Registers an icon using an HTML string 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 literal SVG source of the icon.\n   */\n  addSvgIconLiteralInNamespace(\n    namespace: string,\n    iconName: string,\n    literal: SafeHtml,\n    options?: SbbIconOptions,\n  ): this {\n    const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n    // TODO: add an ngDevMode check\n    if (!cleanLiteral) {\n      throw getSbbIconFailedToSanitizeLiteralError(literal);\n    }\n\n    // Security: The literal is passed in as SafeHtml, and is thus trusted.\n    const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n    return this._addSvgIconConfig(\n      namespace,\n      iconName,\n      new SvgIconConfig('', trustedLiteral, options),\n    );\n  }\n\n  /**\n   * Registers an icon set by URL in the default namespace.\n   */\n  addSvgIconSet(url: SafeResourceUrl, options?: SbbIconOptions): this {\n    return this.addSvgIconSetInNamespace('', url, options);\n  }\n\n  /**\n   * Registers an icon set using an HTML string in the default namespace.\n   * @param literal SVG source of the icon set.\n   */\n  addSvgIconSetLiteral(literal: SafeHtml, options?: SbbIconOptions): this {\n    return this.addSvgIconSetLiteralInNamespace('', literal, options);\n  }\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   */\n  addSvgIconSetInNamespace(\n    namespace: string,\n    url: SafeResourceUrl,\n    options?: SbbIconOptions,\n  ): this {\n    return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url, null, options));\n  }\n\n  /**\n   * Registers an icon set using an HTML string in the specified namespace.\n   * @param namespace Namespace in which to register the icon set.\n   * @param literal SVG source of the icon set.\n   */\n  addSvgIconSetLiteralInNamespace(\n    namespace: string,\n    literal: SafeHtml,\n    options?: SbbIconOptions,\n  ): this {\n    const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n    if (!cleanLiteral) {\n      throw getSbbIconFailedToSanitizeLiteralError(literal);\n    }\n\n    // Security: The literal is passed in as SafeHtml, and is thus trusted.\n    const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n    return this._addSvgIconSetConfig(namespace, new SvgIconConfig('', trustedLiteral, options));\n  }\n\n  /**\n   * Defines an alias for a CSS class name to be used for icon fonts. Creating an sbbIcon\n   * component with the alias as the fontSet input will cause the class name to be applied\n   * to the `<sbb-icon>` element.\n   *\n   * @param alias Alias for the font.\n   * @param className Class name override to be used instead of the alias.\n   */\n  registerFontClassAlias(alias: string, className: string = alias): this {\n    this._fontCssClassesByAlias.set(alias, className);\n    return this;\n  }\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   */\n  classNameForFontAlias(alias: string): string {\n    return this._fontCssClassesByAlias.get(alias) || alias;\n  }\n\n  /**\n   * Sets the CSS classes to be used for icon fonts when an `<sbb-icon>` component does not\n   * have a fontSet input value, and is not loading an icon by name or URL.\n   */\n  setDefaultFontSetClass(...classNames: string[]): this {\n    this._defaultFontSetClass = classNames;\n    return this;\n  }\n\n  /**\n   * Returns the CSS classes to be used for icon fonts when an `<sbb-icon>` component does not\n   * have a fontSet input value, and is not loading an icon by name or URL.\n   */\n  getDefaultFontSetClass(): string[] {\n    return this._defaultFontSetClass;\n  }\n\n  /**\n   * Returns an Observable that produces the icon (as an `<svg>` 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   */\n  getSvgIconFromUrl(safeUrl: SafeResourceUrl): Observable<SVGElement> {\n    const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n    if (!url) {\n      throw getSbbIconFailedToSanitizeUrlError(safeUrl);\n    }\n\n    const cachedIcon = this._cachedIconsByUrl.get(url);\n\n    if (cachedIcon) {\n      return observableOf(cloneSvg(cachedIcon));\n    }\n\n    return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl, null)).pipe(\n      tap((svg) => this._cachedIconsByUrl.set(url!, svg)),\n      map((svg) => cloneSvg(svg)),\n    );\n  }\n\n  /**\n   * Returns an Observable that produces the icon (as an `<svg>` 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   */\n  getNamedSvgIcon(name: string, namespace: string = ''): Observable<SVGElement> {\n    const key = iconKey(namespace, name);\n    let config = this._svgIconConfigs.get(key);\n\n    // Return (copy of) cached icon if possible.\n    if (config) {\n      return this._getSvgFromConfig(config);\n    }\n\n    // Otherwise try to resolve the config from one of the resolver functions.\n    config = this._getIconConfigFromResolvers(namespace, name);\n\n    if (config) {\n      this._svgIconConfigs.set(key, config);\n      return this._getSvgFromConfig(config);\n    }\n\n    // See if we have any icon sets registered for the namespace.\n    const iconSetConfigs = this._iconSetConfigs.get(namespace);\n\n    if (iconSetConfigs) {\n      return this._getSvgFromIconSetConfigs(name, iconSetConfigs);\n    }\n\n    // Try fetching the icon from the default 'icons' namespace.\n    if (!namespace) {\n      config = this._getIconConfigFromResolvers('icons', name);\n      if (config) {\n        this._svgIconConfigs.set(key, config);\n        return this._getSvgFromConfig(config);\n      }\n    }\n\n    return observableThrow(getSbbIconNameNotFoundError(key));\n  }\n\n  ngOnDestroy() {\n    this._resolvers = [];\n    this._svgIconConfigs.clear();\n    this._iconSetConfigs.clear();\n    this._cachedIconsByUrl.clear();\n  }\n\n  /**\n   * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.\n   */\n  private _getSvgFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n    if (config.svgText) {\n      // We already have the SVG element for this icon, return a copy.\n      return observableOf(cloneSvg(this._svgElementFromConfig(config as LoadedSvgIconConfig)));\n    } else {\n      // Fetch the icon from the config's URL, cache it, and return a copy.\n      return this._loadSvgIconFromConfig(config).pipe(map((svg) => cloneSvg(svg)));\n    }\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 `<svg>` 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   */\n  private _getSvgFromIconSetConfigs(\n    name: string,\n    iconSetConfigs: SvgIconConfig[],\n  ): Observable<SVGElement> {\n    // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n    // requested name.\n    const namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\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\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 iconSetFetchRequests: Observable<TrustedHTML | null>[] = iconSetConfigs\n      .filter((iconSetConfig) => !iconSetConfig.svgText)\n      .map((iconSetConfig) => {\n        return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(\n          catchError((err: HttpErrorResponse) => {\n            const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n\n            // Swallow errors fetching individual URLs so the\n            // combined Observable won't necessarily fail.\n            const errorMessage = `Loading icon set URL: ${url} failed: ${err.message}`;\n            this._errorHandler.handleError(new Error(errorMessage));\n            return observableOf(null);\n          }),\n        );\n      });\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 forkJoin(iconSetFetchRequests).pipe(\n      map(() => {\n        const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n        // TODO: add an ngDevMode check\n        if (!foundIcon) {\n          throw getSbbIconNameNotFoundError(name);\n        }\n\n        return foundIcon;\n      }),\n    );\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   */\n  private _extractIconWithNameFromAnySet(\n    iconName: string,\n    iconSetConfigs: SvgIconConfig[],\n  ): SVGElement | null {\n    // Iterate backwards, so icon sets added later have precedence.\n    for (let i = iconSetConfigs.length - 1; i >= 0; i--) {\n      const config = iconSetConfigs[i];\n\n      // Parsing the icon set's text into an SVG element can be expensive. We can avoid some of\n      // the parsing by doing a quick check using `indexOf` to see if there's any chance for the\n      // icon to be in the set. This won't be 100% accurate, but it should help us avoid at least\n      // some of the parsing.\n      if (config.svgText && config.svgText.toString().indexOf(iconName) > -1) {\n        const svg = this._svgElementFromConfig(config as LoadedSvgIconConfig);\n        const foundIcon = this._extractSvgIconFromSet(svg, iconName, config.options);\n        if (foundIcon) {\n          return foundIcon;\n        }\n      }\n    }\n    return null;\n  }\n\n  /**\n   * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element\n   * from it.\n   */\n  private _loadSvgIconFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n    return this._fetchIcon(config).pipe(\n      tap((svgText) => (config.svgText = svgText)),\n      map(() => this._svgElementFromConfig(config as LoadedSvgIconConfig)),\n    );\n  }\n\n  /**\n   * Loads the content of the icon set URL specified in the\n   * SvgIconConfig and attaches it to the config.\n   */\n  private _loadSvgIconSetFromConfig(config: SvgIconConfig): Observable<TrustedHTML | null> {\n    if (config.svgText) {\n      return observableOf(null);\n    }\n\n    return this._fetchIcon(config).pipe(tap((svgText) => (config.svgText = svgText)));\n  }\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   */\n  private _extractSvgIconFromSet(\n    iconSet: SVGElement,\n    iconName: string,\n    options?: SbbIconOptions,\n  ): SVGElement | null {\n    // Use the `id=\"iconName\"` syntax in order to escape special\n    // characters in the ID (versus using the #iconName syntax).\n    const iconSource = iconSet.querySelector(`[id=\"${iconName}\"]`);\n\n    if (!iconSource) {\n      return null;\n    }\n\n    // Clone the element and remove the ID to prevent multiple elements from being added\n    // to the page with the same ID.\n    const iconElement = iconSource.cloneNode(true) as Element;\n    iconElement.removeAttribute('id');\n\n    // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as\n    // the content of a new <svg> node.\n    if (iconElement.nodeName.toLowerCase() === 'svg') {\n      return this._setSvgAttributes(iconElement as SVGElement, options);\n    }\n\n    // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note\n    // that the same could be achieved by referring to it via <use href=\"#id\">, however the <use>\n    // tag is problematic on Firefox, because it needs to include the current page path.\n    if (iconElement.nodeName.toLowerCase() === 'symbol') {\n      return this._setSvgAttributes(this._toSvgElement(iconElement), options);\n    }\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 svg = this._svgElementFromString(trustedHTMLFromString('<svg></svg>'));\n    // Clone the node so we don't remove it from the parent icon set element.\n    svg.appendChild(iconElement);\n\n    return this._setSvgAttributes(svg, options);\n  }\n\n  /** Creates a DOM element from the given SVG string. */\n  private _svgElementFromString(str: TrustedHTML): SVGElement {\n    const div = this._document.createElement('DIV');\n    div.innerHTML = str as unknown as string;\n    const svg = div.querySelector('svg') as SVGElement;\n\n    // TODO: add an ngDevMode check\n    if (!svg) {\n      throw Error('<svg> tag not found');\n    }\n\n    return svg;\n  }\n\n  /** Converts an element into an SVG node by cloning all of its children. */\n  private _toSvgElement(element: Element): SVGElement {\n    const svg = this._svgElementFromString(trustedHTMLFromString('<svg></svg>'));\n    const attributes = element.attributes;\n\n    // Copy over all the attributes from the `symbol` to the new SVG, except the id.\n    for (let i = 0; i < attributes.length; i++) {\n      const { name, value } = attributes[i];\n\n      if (name !== 'id') {\n        svg.setAttribute(name, value);\n      }\n    }\n\n    for (let i = 0; i < element.childNodes.length; i++) {\n      if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {\n        svg.appendChild(element.childNodes[i].cloneNode(true));\n      }\n    }\n\n    return svg;\n  }\n\n  /** Sets the default attributes for an SVG element to be used as an icon. */\n  private _setSvgAttributes(svg: SVGElement, options?: SbbIconOptions): SVGElement {\n    svg.setAttribute('fit', '');\n    svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n    svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n\n    if (options && options.viewBox) {\n      svg.setAttribute('viewBox', options.viewBox);\n    }\n\n    return svg;\n  }\n\n  /**\n   * Returns an Observable which produces the string contents of the given icon. Results may be\n   * cached, so future calls with the same URL may not cause another HTTP request.\n   */\n  private _fetchIcon(iconConfig: SvgIconConfig): Observable<TrustedHTML> {\n    const { url: safeUrl, options } = iconConfig;\n    const withCredentials = options?.withCredentials ?? false;\n\n    if (!this._httpClient) {\n      throw getSbbIconNoHttpProviderError();\n    }\n\n    // TODO: add an ngDevMode check\n    if (safeUrl == null) {\n      throw Error(`Cannot fetch icon from URL \"${safeUrl}\".`);\n    }\n\n    const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n    // TODO: add an ngDevMode check\n    if (!url) {\n      throw getSbbIconFailedToSanitizeUrlError(safeUrl);\n    }\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 inProgressFetch = this._inProgressUrlFetches.get(url);\n\n    if (inProgressFetch) {\n      return inProgressFetch;\n    }\n\n    const req = this._httpClient.get(url, { responseType: 'text', withCredentials }).pipe(\n      map((svg) => {\n        // Security: This SVG is fetched from a SafeResourceUrl, and is thus\n        // trusted HTML.\n        return trustedHTMLFromString(svg);\n      }),\n      finalize(() => this._inProgressUrlFetches.delete(url)),\n      share(),\n    );\n\n    this._inProgressUrlFetches.set(url, req);\n    return req;\n  }\n\n  /**\n   * Registers an icon config by name in the specified namespace.\n   * @param namespace Namespace in which to register the icon config.\n   * @param iconName Name under which to register the config.\n   * @param config Config to be registered.\n   */\n  private _addSvgIconConfig(namespace: string, iconName: string, config: SvgIconConfig): this {\n    this._svgIconConfigs.set(iconKey(namespace, iconName), config);\n    return this;\n  }\n\n  /**\n   * Registers an icon set config in the specified namespace.\n   * @param namespace Namespace in which to register the icon config.\n   * @param config Config to be registered.\n   */\n  private _addSvgIconSetConfig(namespace: string, config: SvgIconConfig): this {\n    const configNamespace = this._iconSetConfigs.get(namespace);\n\n    if (configNamespace) {\n      configNamespace.push(config);\n    } else {\n      this._iconSetConfigs.set(namespace, [config]);\n    }\n\n    return this;\n  }\n\n  /** Parses a config's text into an SVG element. */\n  private _svgElementFromConfig(config: LoadedSvgIconConfig): SVGElement {\n    if (!config.svgElement) {\n      const svg = this._svgElementFromString(config.svgText);\n      this._setSvgAttributes(svg, config.options);\n      config.svgElement = svg;\n    }\n\n    return config.svgElement;\n  }\n\n  /** Tries to create an icon config through the registered resolver functions. */\n  private _getIconConfigFromResolvers(namespace: string, name: string): SvgIconConfig | undefined {\n    for (let i = 0; i < this._resolvers.length; i++) {\n      const result = this._resolvers[i](name, namespace);\n\n      if (result) {\n        return isSafeUrlWithOptions(result)\n          ? new SvgIconConfig(result.url, null, result.options)\n          : new SvgIconConfig(result, null);\n      }\n    }\n\n    // If the namespace is one from our supported list, we return the CDN config.\n    if (this._sbbCdnSupportedNamespaces.indexOf(namespace) !== -1) {\n      const url = this._sanitizer.bypassSecurityTrustResourceUrl(\n        `https://icons.app.sbb.ch/${namespace}/${name}.svg`,\n      );\n      return new SvgIconConfig(url, null);\n    }\n\n    return undefined;\n  }\n}\n\n/** Clones an SVGElement while preserving type information. */\nfunction cloneSvg(svg: SVGElement): SVGElement {\n  return svg.cloneNode(true) as SVGElement;\n}\n\n/** Returns the cache key to use for an icon namespace and name. */\nfunction iconKey(namespace: string, name: string) {\n  return namespace + ':' + name;\n}\n\nfunction isSafeUrlWithOptions(value: any): value is SafeResourceUrlWithIconOptions {\n  return !!(value.url && value.options);\n}\n","import { _IdGenerator } from '@angular/cdk/a11y';\nimport { DOCUMENT } from '@angular/common';\nimport {\n  AfterViewChecked,\n  Attribute,\n  booleanAttribute,\n  ChangeDetectionStrategy,\n  Component,\n  ElementRef,\n  ErrorHandler,\n  inject,\n  Inject,\n  InjectionToken,\n  Input,\n  OnDestroy,\n  OnInit,\n  ViewEncapsulation,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport { SbbIconRegistry } from './icon-registry';\n\n/**\n * Injection token used to provide the current location to `SbbIcon`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const SBB_ICON_LOCATION = new InjectionToken<SbbIconLocation>('sbb-icon-location', {\n  providedIn: 'root',\n  factory: SBB_ICON_LOCATION_FACTORY,\n});\n\n/**\n * Stubbed out location for `SbbIcon`.\n * @docs-private\n */\nexport interface SbbIconLocation {\n  getPathname: () => string;\n}\n\n/** @docs-private */\nexport function SBB_ICON_LOCATION_FACTORY(): SbbIconLocation {\n  const document = inject(DOCUMENT);\n  const location = document ? document.location : null;\n\n  return {\n    // Note that this needs to be a function, rather than a property, because Angular\n    // will only resolve it once, but we want the current path on each call.\n    getPathname: () => (location ? location.pathname + location.search : ''),\n  };\n}\n\n/** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */\nconst funcIriAttributes = [\n  'clip-path',\n  'color-profile',\n  'src',\n  'cursor',\n  'fill',\n  'filter',\n  'marker',\n  'marker-start',\n  'marker-mid',\n  'marker-end',\n  'mask',\n  'stroke',\n];\n\n/** Selector that can be used to find all elements that are using a `FuncIRI`. */\nconst funcIriAttributeSelector = funcIriAttributes.map((attr) => `[${attr}]`).join(', ');\n\n/** Regex that can be used to extract the id out of a FuncIRI. */\nconst funcIriPattern = /^url\\(['\"]?#(.*?)['\"]?\\)$/;\n\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 *   SbbIconRegistry. 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 *     `<sbb-icon svgIcon=\"example\"></sbb-icon>\n *     <sbb-icon svgIcon=\"cloud-ice-medium\"></sbb-icon>`\n *\n * - Use a font ligature as an icon by putting the ligature text in the content of the `<sbb-icon>`\n *   component. You can specify a font by setting the fontSet input to either the CSS class to\n *   apply to use the desired font, or to an alias previously registered with\n *   SbbIconRegistry.registerFontClassAlias.\n *   Examples:\n *     `<sbb-icon>home</sbb-icon>\n *     <sbb-icon fontSet=\"myfont\">sun</sbb-icon>`\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 *     `<sbb-icon fontSet=\"fa\" fontIcon=\"alarm\"></sbb-icon>`\n */\n@Component({\n  template: '<ng-content></ng-content>',\n  selector: 'sbb-icon',\n  exportAs: 'sbbIcon',\n  styleUrls: ['icon.css'],\n  inputs: ['color'],\n  host: {\n    role: 'img',\n    class: 'sbb-icon notranslate',\n    '[id]': 'id',\n    '[attr.data-sbb-icon-type]': '_usingFontIcon() ? \"font\" : \"svg\"',\n    '[attr.data-sbb-icon-name]': '_svgName || fontIcon',\n    '[attr.data-sbb-icon-namespace]': '_svgNamespace || fontSet',\n    '[class.sbb-icon-inline]': 'inline',\n  },\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SbbIcon implements OnInit, AfterViewChecked, OnDestroy {\n  /**\n   * Whether the icon should be inlined, automatically sizing the icon to match the font size of\n   * the element the icon is contained in.\n   */\n  @Input({ transform: booleanAttribute })\n  inline: boolean = false;\n\n  /** Name of the icon in the SVG icon set. */\n  @Input()\n  get svgIcon(): string {\n    return this._svgIcon;\n  }\n  set svgIcon(value: string) {\n    if (value !== this._svgIcon) {\n      if (value) {\n        this._updateSvgIcon(value);\n      } else if (this._svgIcon) {\n        this._clearSvgElement();\n      }\n      this._svgIcon = value;\n    }\n  }\n  private _svgIcon: string;\n\n  /** Font set that the icon is a part of. */\n  @Input()\n  get fontSet(): string {\n    return this._fontSet;\n  }\n  set fontSet(value: string) {\n    const newValue = this._cleanupFontValue(value);\n\n    if (newValue !== this._fontSet) {\n      this._fontSet = newValue;\n      this._updateFontIconClasses();\n    }\n  }\n  private _fontSet: string;\n\n  /** Name of an icon within a font set. */\n  @Input()\n  get fontIcon(): string {\n    return this._fontIcon;\n  }\n  set fontIcon(value: string) {\n    const newValue = this._cleanupFontValue(value);\n\n    if (newValue !== this._fontIcon) {\n      this._fontIcon = newValue;\n      this._updateFontIconClasses();\n    }\n  }\n  private _fontIcon: string;\n\n  @Input() id: string = inject(_IdGenerator).getId('sbb-icon-');\n\n  private _previousFontSetClass: string[] = [];\n  private _previousFontIconClass: string;\n\n  _svgName: string | null;\n  _svgNamespace: string | null;\n\n  /** Keeps track of the current page path. */\n  private _previousPath?: string;\n\n  /** Keeps track of the elements and attributes that we've prefixed with the current path. */\n  private _elementsWithExternalReferences?: Map<Element, { name: string; value: string }[]>;\n\n  /** Subscription to the current in-progress SVG icon request. */\n  private _currentIconFetch = Subscription.EMPTY;\n\n  constructor(\n    private _elementRef: ElementRef<HTMLElement>,\n    private _iconRegistry: SbbIconRegistry,\n    @Attribute('aria-hidden') ariaHidden: string,\n    @Inject(SBB_ICON_LOCATION) private _location: SbbIconLocation,\n    private readonly _errorHandler: ErrorHandler,\n  ) {\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      this._elementRef.nativeElement.setAttribute('aria-hidden', 'true');\n    }\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   *   `'kom:cloud-ice-medium' -> ['kom', 'cloud-ice-medium']\n   *   'custom-icon' -> ['', 'custom-icon']\n   *   null -> ['', '']\n   *   'a:b:c' -> (throws Error)`\n   */\n  private _splitIconName(iconName: string): [string, string] {\n    if (!iconName) {\n      return ['', ''];\n    }\n    const parts = iconName.split(':');\n    switch (parts.length) {\n      case 1:\n        return ['', parts[0]]; // Use default namespace.\n      case 2:\n        return <[string, string]>parts;\n      default:\n        throw Error(`Invalid icon name: \"${iconName}\"`); // TODO: add an ngDevMode check\n    }\n  }\n\n  ngOnInit() {\n    // Update font classes because ngOnChanges won't be called if none of the inputs are present,\n    // e.g. <sbb-icon>arrow</sbb-icon> In this case we need to add a CSS class for the default font.\n    this._updateFontIconClasses();\n  }\n\n  ngAfterViewChecked() {\n    const cachedElements = this._elementsWithExternalReferences;\n\n    if (cachedElements && cachedElements.size) {\n      const newPath = this._location.getPathname();\n\n      // We need to check whether the URL has changed on each change detection since\n      // the browser doesn't have an API that will let us react on link clicks and\n      // we can't depend on the Angular router. The references need to be updated,\n      // because while most browsers don't care whether the URL is correct after\n      // the first render, Safari will break if the user navigates to a different\n      // page and the SVG isn't re-rendered.\n      if (newPath !== this._previousPath) {\n        this._previousPath = newPath;\n        this._prependPathToReferences(\n          newPath,\n          this._elementRef.nativeElement.querySelector('svg') as SVGElement,\n        );\n      }\n    }\n  }\n\n  ngOnDestroy() {\n    this._currentIconFetch.unsubscribe();\n\n    if (this._elementsWithExternalReferences) {\n      this._elementsWithExternalReferences.clear();\n    }\n  }\n\n  _usingFontIcon(): boolean {\n    return !this.svgIcon;\n  }\n\n  private _setSvgElement(svg: SVGElement) {\n    this._clearSvgElement();\n\n    // Note: we do this fix here, rather than the icon registry, because the\n    // references have to point to the URL at the time that the icon was created.\n    const path = this._location.getPathname();\n    this._previousPath = path;\n    this._cacheChildrenWithExternalReferences(svg);\n    this._prependPathToReferences(path, svg);\n    this._elementRef.nativeElement.appendChild(svg);\n  }\n\n  private _clearSvgElement() {\n    const layoutElement: HTMLElement = this._elementRef.nativeElement;\n    let childCount = layoutElement.childNodes.length;\n\n    if (this._elementsWithExternalReferences) {\n      this._elementsWithExternalReferences.clear();\n    }\n\n    // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n    // we can't use innerHTML, because IE will throw if the element has a data binding.\n    while (childCount--) {\n      const child = layoutElement.childNodes[childCount];\n\n      // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n      // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n      if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n        child.remove();\n      }\n    }\n  }\n\n  private _updateFontIconClasses() {\n    if (!this._usingFontIcon()) {\n      return;\n    }\n\n    const elem: HTMLElement = this._elementRef.nativeElement;\n    const fontSetClasses = (\n      this.fontSet\n        ? [this._iconRegistry.classNameForFontAlias(this.fontSet)]\n        : this._iconRegistry.getDefaultFontSetClass()\n    ).filter((className) => className.length > 0);\n\n    this._previousFontSetClass.forEach((className) => elem.classList.remove(className));\n    fontSetClasses.forEach((className) => elem.classList.add(className));\n    this._previousFontSetClass = fontSetClasses;\n\n    if (this.fontIcon !== this._previousFontIconClass) {\n      if (this._previousFontIconClass) {\n        elem.classList.remove(this._previousFontIconClass);\n      }\n      if (this.fontIcon) {\n        elem.classList.add(this.fontIcon);\n      }\n      this._previousFontIconClass = this.fontIcon;\n    }\n  }\n\n  /**\n   * Cleans up a value to be used as a fontIcon or fontSet.\n   * Since the value ends up being assigned as a CSS class, we\n   * have to trim the value and omit space-separated values.\n   */\n  private _cleanupFontValue(value: string) {\n    return typeof value === 'string' ? value.trim().split(' ')[0] : value;\n  }\n\n  /**\n   * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`\n   * reference. This is required because WebKit browsers require references to be prefixed with\n   * the current path, if the page has a `base` tag.\n   */\n  private _prependPathToReferences(path: string, svg: SVGElement | null) {\n    const elements = this._elementsWithExternalReferences;\n\n    if (elements) {\n      elements.forEach((attrs, element) => {\n        attrs.forEach((attr) => {\n          // If the selector references an element inside the svg, we prepend the icon id for unambiguity.\n          // This is necessary because mutliple SBB pictograms use `clip-path=url('#a')` together with\n          // an internal `<defs><clipPath id=\"a\">...</clipPath></defs>` definition.\n          // TODO(mhaertwig): Remove after pictograms have been updated to use a unique reference.\n          if (svg?.querySelector(`#${attr.value}`)) {\n            element.setAttribute(attr.name, `url('${path}#${this.id} #${attr.value}')`);\n          } else {\n            element.setAttribute(attr.name, `url('${path}#${attr.value}')`);\n          }\n        });\n      });\n    }\n  }\n\n  /**\n   * Caches the children of an SVG element that have `url()`\n   * references that we need to prefix with the current path.\n   */\n  private _cacheChildrenWithExternalReferences(element: SVGElement) {\n    const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);\n    const elements = (this._elementsWithExternalReferences =\n      this._elementsWithExternalReferences || new Map());\n\n    for (let i = 0; i < elementsWithFuncIri.length; i++) {\n      funcIriAttributes.forEach((attr) => {\n        const elementWithReference = elementsWithFuncIri[i];\n        const value = elementWithReference.getAttribute(attr);\n        const match = value ? value.match(funcIriPattern) : null;\n\n        if (match) {\n          let attributes = elements.get(elementWithReference);\n\n          if (!attributes) {\n            attributes = [];\n            elements.set(elementWithReference, attributes);\n          }\n\n          attributes!.push({ name: attr, value: match[1] });\n        }\n      });\n    }\n  }\n\n  /** Sets a new SVG icon with a particular name. */\n  private _updateSvgIcon(rawName: string | undefined) {\n    this._svgNamespace = null;\n    this._svgName = null;\n    this._currentIconFetch.unsubscribe();\n\n    if (rawName) {\n      const [namespace, iconName] = this._splitIconName(rawName);\n\n      if (namespace) {\n        this._svgNamespace = namespace;\n      }\n\n      if (iconName) {\n        this._svgName = iconName;\n      }\n\n      this._currentIconFetch = this._iconRegistry\n        .getNamedSvgIcon(iconName, namespace)\n        .pipe(take(1))\n        .subscribe(\n          (svg) => this._setSvgElement(svg),\n          (err: Error) => {\n            const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;\n            this._errorHandler.handleError(new Error(errorMessage));\n          },\n        );\n    }\n  }\n}\n","import { NgModule } from '@angular/core';\nimport { SbbCommonModule } from '@sbb-esta/angular/core';\n\nimport { SbbIcon } from './icon';\n\n@NgModule({\n  imports: [SbbCommonModule, SbbIcon],\n  exports: [SbbIcon],\n})\nexport class SbbIconModule {}\n"],"names":["policy","getPolicy","undefined","window","ttWindow","trustedTypes","createPolicy","createHTML","s","trustedHTMLFromString","html","getSbbIconNameNotFoundError","iconName","Error","getSbbIconNoHttpProviderError","getSbbIconFailedToSanitizeUrlError","url","getSbbIconFailedToSanitizeLiteralError","literal","SvgIconConfig","svgText","options","svgElement","constructor","SbbIconRegistry","_httpClient","_sanitizer","_errorHandler","_document","_svgIconConfigs","Map","_iconSetConfigs","_cachedIconsByUrl","_inProgressUrlFetches","_fontCssClassesByAlias","_resolvers","_defaultFontSetClass","_sbbCdnSupportedNamespaces","document","addSvgIcon","addSvgIconInNamespace","addSvgIconLiteral","addSvgIconLiteralInNamespace","namespace","_addSvgIconConfig","addSvgIconResolver","resolver","push","cleanLiteral","sanitize","SecurityContext","HTML","trustedLiteral","addSvgIconSet","addSvgIconSetInNamespace","addSvgIconSetLiteral","addSvgIconSetLiteralInNamespace","_addSvgIconSetConfig","registerFontClassAlias","alias","className","set","classNameForFontAlias","get","setDefaultFontSetClass","classNames","getDefaultFontSetClass","getSvgIconFromUrl","safeUrl","RESOURCE_URL","cachedIcon","observableOf","cloneSvg","_loadSvgIconFromConfig","pipe","tap","svg","map","getNamedSvgIcon","name","key","iconKey","config","_getSvgFromConfig","_getIconConfigFromResolvers","iconSetConfigs","_getSvgFromIconSetConfigs","observableThrow","ngOnDestroy","clear","_svgElementFromConfig","namedIcon","_extractIconWithNameFromAnySet","iconSetFetchRequests","filter","iconSetConfig","_loadSvgIconSetFromConfig","catchError","err","errorMessage","message","handleError","forkJoin","foundIcon","i","length","toString","indexOf","_extractSvgIconFromSet","_fetchIcon","iconSet","iconSource","querySelector","iconElement","cloneNode","removeAttribute","nodeName","toLowerCase","_setSvgAttributes","_toSvgElement","_svgElementFromString","appendChild","str","div","createElement","innerHTML","element","attributes","value","setAttribute","childNodes","nodeType","ELEMENT_NODE","viewBox","iconConfig","withCredentials","inProgressFetch","req","responseType","finalize","delete","share","configNamespace","result","isSafeUrlWithOptions","bypassSecurityTrustResourceUrl","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","type","DOCUMENT","optional","token","ErrorHandler","target","ɵɵFactoryTarget","Injectable","ɵprov","ɵɵngDeclareInjectable","decorators","providedIn","Optional","Inject","SBB_ICON_LOCATION","InjectionToken","factory","SBB_ICON_LOCATION_FACTORY","inject","location","getPathname","pathname","search","funcIriAttributes","funcIriAttributeSelector","attr","join","funcIriPattern","SbbIcon","_elementRef","_iconRegistry","_location","inline","svgIcon","_svgIcon","_updateSvgIcon","_clearSvgElement","fontSet","_fontSet","newValue","_cleanupFontValue","_updateFontIconClasses","fontIcon","_fontIcon","id","_IdGenerator","getId","_previousFontSetClass","_previousFontIconClass","_svgName","_svgNamespace","_previousPath","_elementsWithExternalReferences","_currentIconFetch","Subscription","EMPTY","ariaHidden","nativeElement","_splitIconName","parts","split","ngOnInit","ngAfterViewChecked","cachedElements","size","newPath","_prependPathToReferences","unsubscribe","_usingFontIcon","_setSvgElement","path","_cacheChildrenWithExternalReferences","layoutElement","childCount","child","remove","elem","fontSetClasses","forEach","classList","add","trim","elements","attrs","elementsWithFuncIri","querySelectorAll","elementWithReference","getAttribute","match","rawName","take","subscribe","deps","ElementRef","i1","attribute","Component","isStandalone","selector","inputs","color","booleanAttribute","host","properties","classAttribute","exportAs","template","isInline","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","role","class","Attribute","Input","transform","SbbIconModule","NgModule","ɵmod","ɵɵngDeclareNgModule","imports","SbbCommonModule","ɵinj","ɵɵngDeclareInjector","args","exports"],"mappings":";;;;;;;;;;AA+BA,IAAIA,MAA4C;AAMhD,SAASC,SAASA,GAAA;EAChB,IAAID,MAAM,KAAKE,SAAS,EAAE;AACxBF,IAAAA,MAAM,GAAG,IAAI;AACb,IAAA,IAAI,OAAOG,MAAM,KAAK,WAAW,EAAE;MACjC,MAAMC,QAAQ,GAAGD,MAAgE;AACjF,MAAA,IAAIC,QAAQ,CAACC,YAAY,KAAKH,SAAS,EAAE;QACvCF,MAAM,GAAGI,QAAQ,CAACC,YAAY,CAACC,YAAY,CAAC,kBAAkB,EAAE;UAC9DC,UAAU,EAAGC,CAAS,IAAKA;AAC5B,SAAA,CAAC;AACJ;AACF;AACF;AACA,EAAA,OAAOR,MAAM;AACf;AAWM,SAAUS,qBAAqBA,CAACC,IAAY,EAAA;EAChD,OAAOT,SAAS,EAAE,EAAEM,UAAU,CAACG,IAAI,CAAC,IAAKA,IAA+B;AAC1E;;AC1CM,SAAUC,2BAA2BA,CAACC,QAAgB,EAAA;AAC1D,EAAA,OAAOC,KAAK,CAAC,CAAsCD,mCAAAA,EAAAA,QAAQ,GAAG,CAAC;AACjE;SAOgBE,6BAA6BA,GAAA;AAE3C,EAAA,OAAOD,KAAK,CACV,qEAAqE,GACnE,wEAAwE,GACxE,cAAc,CACjB;AACH;AAOM,SAAUE,kCAAkCA,CAACC,GAAoB,EAAA;AACrE,EAAA,OAAOH,KAAK,CACV,CAAA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