{"ast":null,"code":"import _defineProperty from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport _possibleConstructorReturn from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _toArray from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/toArray\";\nimport _construct from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/construct\";\nimport _slicedToArray from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nimport _assertThisInitialized from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _createForOfIteratorHelper from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper\";\nimport _get from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/get\";\nimport _getPrototypeOf from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _inherits from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createSuper\";\nimport _toConsumableArray from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createClass\";\n\nvar _BoundPropertyMapping;\n\nimport _regeneratorRuntime from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/regenerator\";\n\n/**\n * @license Angular v12.2.16\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * @license\n * Copyright Google LLC 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 */\nvar TagContentType = /*@__PURE__*/function (TagContentType) {\n  TagContentType[TagContentType[\"RAW_TEXT\"] = 0] = \"RAW_TEXT\";\n  TagContentType[TagContentType[\"ESCAPABLE_RAW_TEXT\"] = 1] = \"ESCAPABLE_RAW_TEXT\";\n  TagContentType[TagContentType[\"PARSABLE_DATA\"] = 2] = \"PARSABLE_DATA\";\n  return TagContentType;\n}({});\n\nfunction splitNsName(elementName) {\n  if (elementName[0] != ':') {\n    return [null, elementName];\n  }\n\n  var colonIndex = elementName.indexOf(':', 1);\n\n  if (colonIndex === -1) {\n    throw new Error(\"Unsupported format \\\"\".concat(elementName, \"\\\" expecting \\\":namespace:name\\\"\"));\n  }\n\n  return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];\n} // `<ng-container>` tags work the same regardless the namespace\n\n\nfunction isNgContainer(tagName) {\n  return splitNsName(tagName)[1] === 'ng-container';\n} // `<ng-content>` tags work the same regardless the namespace\n\n\nfunction isNgContent(tagName) {\n  return splitNsName(tagName)[1] === 'ng-content';\n} // `<ng-template>` tags work the same regardless the namespace\n\n\nfunction isNgTemplate(tagName) {\n  return splitNsName(tagName)[1] === 'ng-template';\n}\n\nfunction getNsPrefix(fullName) {\n  return fullName === null ? null : splitNsName(fullName)[0];\n}\n\nfunction mergeNsAndName(prefix, localName) {\n  return prefix ? \":\".concat(prefix, \":\").concat(localName) : localName;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar HtmlTagDefinition = /*#__PURE__*/function () {\n  function HtmlTagDefinition() {\n    var _this = this;\n\n    var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n        closedByChildren = _ref2.closedByChildren,\n        implicitNamespacePrefix = _ref2.implicitNamespacePrefix,\n        _ref2$contentType = _ref2.contentType,\n        contentType = _ref2$contentType === void 0 ? TagContentType.PARSABLE_DATA : _ref2$contentType,\n        _ref2$closedByParent = _ref2.closedByParent,\n        closedByParent = _ref2$closedByParent === void 0 ? false : _ref2$closedByParent,\n        _ref2$isVoid = _ref2.isVoid,\n        isVoid = _ref2$isVoid === void 0 ? false : _ref2$isVoid,\n        _ref2$ignoreFirstLf = _ref2.ignoreFirstLf,\n        ignoreFirstLf = _ref2$ignoreFirstLf === void 0 ? false : _ref2$ignoreFirstLf,\n        _ref2$preventNamespac = _ref2.preventNamespaceInheritance,\n        preventNamespaceInheritance = _ref2$preventNamespac === void 0 ? false : _ref2$preventNamespac;\n\n    _classCallCheck(this, HtmlTagDefinition);\n\n    this.closedByChildren = {};\n    this.closedByParent = false;\n    this.canSelfClose = false;\n\n    if (closedByChildren && closedByChildren.length > 0) {\n      closedByChildren.forEach(function (tagName) {\n        return _this.closedByChildren[tagName] = true;\n      });\n    }\n\n    this.isVoid = isVoid;\n    this.closedByParent = closedByParent || isVoid;\n    this.implicitNamespacePrefix = implicitNamespacePrefix || null;\n    this.contentType = contentType;\n    this.ignoreFirstLf = ignoreFirstLf;\n    this.preventNamespaceInheritance = preventNamespaceInheritance;\n  }\n\n  _createClass(HtmlTagDefinition, [{\n    key: \"isClosedByChild\",\n    value: function isClosedByChild(name) {\n      return this.isVoid || name.toLowerCase() in this.closedByChildren;\n    }\n  }, {\n    key: \"getContentType\",\n    value: function getContentType(prefix) {\n      if (typeof this.contentType === 'object') {\n        var overrideType = prefix === undefined ? undefined : this.contentType[prefix];\n        return overrideType !== null && overrideType !== void 0 ? overrideType : this.contentType.default;\n      }\n\n      return this.contentType;\n    }\n  }]);\n\n  return HtmlTagDefinition;\n}();\n\nvar _DEFAULT_TAG_DEFINITION; // see https://www.w3.org/TR/html51/syntax.html#optional-tags\n// This implementation does not fully conform to the HTML5 spec.\n\n\nvar TAG_DEFINITIONS;\n\nfunction getHtmlTagDefinition(tagName) {\n  var _a, _b;\n\n  if (!TAG_DEFINITIONS) {\n    _DEFAULT_TAG_DEFINITION = new HtmlTagDefinition();\n    TAG_DEFINITIONS = {\n      'base': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'meta': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'area': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'embed': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'link': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'img': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'input': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'param': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'hr': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'br': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'source': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'track': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'wbr': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'p': new HtmlTagDefinition({\n        closedByChildren: ['address', 'article', 'aside', 'blockquote', 'div', 'dl', 'fieldset', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'],\n        closedByParent: true\n      }),\n      'thead': new HtmlTagDefinition({\n        closedByChildren: ['tbody', 'tfoot']\n      }),\n      'tbody': new HtmlTagDefinition({\n        closedByChildren: ['tbody', 'tfoot'],\n        closedByParent: true\n      }),\n      'tfoot': new HtmlTagDefinition({\n        closedByChildren: ['tbody'],\n        closedByParent: true\n      }),\n      'tr': new HtmlTagDefinition({\n        closedByChildren: ['tr'],\n        closedByParent: true\n      }),\n      'td': new HtmlTagDefinition({\n        closedByChildren: ['td', 'th'],\n        closedByParent: true\n      }),\n      'th': new HtmlTagDefinition({\n        closedByChildren: ['td', 'th'],\n        closedByParent: true\n      }),\n      'col': new HtmlTagDefinition({\n        isVoid: true\n      }),\n      'svg': new HtmlTagDefinition({\n        implicitNamespacePrefix: 'svg'\n      }),\n      'foreignObject': new HtmlTagDefinition({\n        // Usually the implicit namespace here would be redundant since it will be inherited from\n        // the parent `svg`, but we have to do it for `foreignObject`, because the way the parser\n        // works is that the parent node of an end tag is its own start tag which means that\n        // the `preventNamespaceInheritance` on `foreignObject` would have it default to the\n        // implicit namespace which is `html`, unless specified otherwise.\n        implicitNamespacePrefix: 'svg',\n        // We want to prevent children of foreignObject from inheriting its namespace, because\n        // the point of the element is to allow nodes from other namespaces to be inserted.\n        preventNamespaceInheritance: true\n      }),\n      'math': new HtmlTagDefinition({\n        implicitNamespacePrefix: 'math'\n      }),\n      'li': new HtmlTagDefinition({\n        closedByChildren: ['li'],\n        closedByParent: true\n      }),\n      'dt': new HtmlTagDefinition({\n        closedByChildren: ['dt', 'dd']\n      }),\n      'dd': new HtmlTagDefinition({\n        closedByChildren: ['dt', 'dd'],\n        closedByParent: true\n      }),\n      'rb': new HtmlTagDefinition({\n        closedByChildren: ['rb', 'rt', 'rtc', 'rp'],\n        closedByParent: true\n      }),\n      'rt': new HtmlTagDefinition({\n        closedByChildren: ['rb', 'rt', 'rtc', 'rp'],\n        closedByParent: true\n      }),\n      'rtc': new HtmlTagDefinition({\n        closedByChildren: ['rb', 'rtc', 'rp'],\n        closedByParent: true\n      }),\n      'rp': new HtmlTagDefinition({\n        closedByChildren: ['rb', 'rt', 'rtc', 'rp'],\n        closedByParent: true\n      }),\n      'optgroup': new HtmlTagDefinition({\n        closedByChildren: ['optgroup'],\n        closedByParent: true\n      }),\n      'option': new HtmlTagDefinition({\n        closedByChildren: ['option', 'optgroup'],\n        closedByParent: true\n      }),\n      'pre': new HtmlTagDefinition({\n        ignoreFirstLf: true\n      }),\n      'listing': new HtmlTagDefinition({\n        ignoreFirstLf: true\n      }),\n      'style': new HtmlTagDefinition({\n        contentType: TagContentType.RAW_TEXT\n      }),\n      'script': new HtmlTagDefinition({\n        contentType: TagContentType.RAW_TEXT\n      }),\n      'title': new HtmlTagDefinition({\n        // The browser supports two separate `title` tags which have to use\n        // a different content type: `HTMLTitleElement` and `SVGTitleElement`\n        contentType: {\n          default: TagContentType.ESCAPABLE_RAW_TEXT,\n          svg: TagContentType.PARSABLE_DATA\n        }\n      }),\n      'textarea': new HtmlTagDefinition({\n        contentType: TagContentType.ESCAPABLE_RAW_TEXT,\n        ignoreFirstLf: true\n      })\n    };\n  } // We have to make both a case-sensitive and a case-insesitive lookup, because\n  // HTML tag names are case insensitive, whereas some SVG tags are case sensitive.\n\n\n  return (_b = (_a = TAG_DEFINITIONS[tagName]) !== null && _a !== void 0 ? _a : TAG_DEFINITIONS[tagName.toLowerCase()]) !== null && _b !== void 0 ? _b : _DEFAULT_TAG_DEFINITION;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar _SELECTOR_REGEXP = /*@__PURE__*/new RegExp('(\\\\:not\\\\()|' + // 1: \":not(\"\n'(([\\\\.\\\\#]?)[-\\\\w]+)|' + // 2: \"tag\"; 3: \".\"/\"#\";\n// \"-\" should appear first in the regexp below as FF31 parses \"[.-\\w]\" as a range\n// 4: attribute; 5: attribute_string; 6: attribute_value\n'(?:\\\\[([-.\\\\w*\\\\\\\\$]+)(?:=([\\\"\\']?)([^\\\\]\\\"\\']*)\\\\5)?\\\\])|' + // \"[name]\", \"[name=value]\",\n// \"[name=\"value\"]\",\n// \"[name='value']\"\n'(\\\\))|' + // 7: \")\"\n'(\\\\s*,\\\\s*)', // 8: \",\"\n'g');\n/**\n * A css selector contains an element name,\n * css classes and attribute/value pairs with the purpose\n * of selecting subsets out of them.\n */\n\n\nvar CssSelector = /*#__PURE__*/function () {\n  function CssSelector() {\n    _classCallCheck(this, CssSelector);\n\n    this.element = null;\n    this.classNames = [];\n    /**\n     * The selectors are encoded in pairs where:\n     * - even locations are attribute names\n     * - odd locations are attribute values.\n     *\n     * Example:\n     * Selector: `[key1=value1][key2]` would parse to:\n     * ```\n     * ['key1', 'value1', 'key2', '']\n     * ```\n     */\n\n    this.attrs = [];\n    this.notSelectors = [];\n  }\n\n  _createClass(CssSelector, [{\n    key: \"unescapeAttribute\",\n    value:\n    /**\n     * Unescape `\\$` sequences from the CSS attribute selector.\n     *\n     * This is needed because `$` can have a special meaning in CSS selectors,\n     * but we might want to match an attribute that contains `$`.\n     * [MDN web link for more\n     * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).\n     * @param attr the attribute to unescape.\n     * @returns the unescaped string.\n     */\n    function unescapeAttribute(attr) {\n      var result = '';\n      var escaping = false;\n\n      for (var i = 0; i < attr.length; i++) {\n        var char = attr.charAt(i);\n\n        if (char === '\\\\') {\n          escaping = true;\n          continue;\n        }\n\n        if (char === '$' && !escaping) {\n          throw new Error(\"Error in attribute selector \\\"\".concat(attr, \"\\\". \") + \"Unescaped \\\"$\\\" is not supported. Please escape with \\\"\\\\$\\\".\");\n        }\n\n        escaping = false;\n        result += char;\n      }\n\n      return result;\n    }\n    /**\n     * Escape `$` sequences from the CSS attribute selector.\n     *\n     * This is needed because `$` can have a special meaning in CSS selectors,\n     * with this method we are escaping `$` with `\\$'.\n     * [MDN web link for more\n     * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).\n     * @param attr the attribute to escape.\n     * @returns the escaped string.\n     */\n\n  }, {\n    key: \"escapeAttribute\",\n    value: function escapeAttribute(attr) {\n      return attr.replace(/\\\\/g, '\\\\\\\\').replace(/\\$/g, '\\\\$');\n    }\n  }, {\n    key: \"isElementSelector\",\n    value: function isElementSelector() {\n      return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 && this.notSelectors.length === 0;\n    }\n  }, {\n    key: \"hasElementSelector\",\n    value: function hasElementSelector() {\n      return !!this.element;\n    }\n  }, {\n    key: \"setElement\",\n    value: function setElement() {\n      var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      this.element = element;\n    }\n    /** Gets a template string for an element that matches the selector. */\n\n  }, {\n    key: \"getMatchingElementTemplate\",\n    value: function getMatchingElementTemplate() {\n      var tagName = this.element || 'div';\n      var classAttr = this.classNames.length > 0 ? \" class=\\\"\".concat(this.classNames.join(' '), \"\\\"\") : '';\n      var attrs = '';\n\n      for (var i = 0; i < this.attrs.length; i += 2) {\n        var attrName = this.attrs[i];\n        var attrValue = this.attrs[i + 1] !== '' ? \"=\\\"\".concat(this.attrs[i + 1], \"\\\"\") : '';\n        attrs += \" \".concat(attrName).concat(attrValue);\n      }\n\n      return getHtmlTagDefinition(tagName).isVoid ? \"<\".concat(tagName).concat(classAttr).concat(attrs, \"/>\") : \"<\".concat(tagName).concat(classAttr).concat(attrs, \"></\").concat(tagName, \">\");\n    }\n  }, {\n    key: \"getAttrs\",\n    value: function getAttrs() {\n      var result = [];\n\n      if (this.classNames.length > 0) {\n        result.push('class', this.classNames.join(' '));\n      }\n\n      return result.concat(this.attrs);\n    }\n  }, {\n    key: \"addAttribute\",\n    value: function addAttribute(name) {\n      var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n      this.attrs.push(name, value && value.toLowerCase() || '');\n    }\n  }, {\n    key: \"addClassName\",\n    value: function addClassName(name) {\n      this.classNames.push(name.toLowerCase());\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var res = this.element || '';\n\n      if (this.classNames) {\n        this.classNames.forEach(function (klass) {\n          return res += \".\".concat(klass);\n        });\n      }\n\n      if (this.attrs) {\n        for (var i = 0; i < this.attrs.length; i += 2) {\n          var name = this.escapeAttribute(this.attrs[i]);\n          var value = this.attrs[i + 1];\n          res += \"[\".concat(name).concat(value ? '=' + value : '', \"]\");\n        }\n      }\n\n      this.notSelectors.forEach(function (notSelector) {\n        return res += \":not(\".concat(notSelector, \")\");\n      });\n      return res;\n    }\n  }], [{\n    key: \"parse\",\n    value: function parse(selector) {\n      var results = [];\n\n      var _addResult = function _addResult(res, cssSel) {\n        if (cssSel.notSelectors.length > 0 && !cssSel.element && cssSel.classNames.length == 0 && cssSel.attrs.length == 0) {\n          cssSel.element = '*';\n        }\n\n        res.push(cssSel);\n      };\n\n      var cssSelector = new CssSelector();\n      var match;\n      var current = cssSelector;\n      var inNot = false;\n      _SELECTOR_REGEXP.lastIndex = 0;\n\n      while (match = _SELECTOR_REGEXP.exec(selector)) {\n        if (match[1\n        /* NOT */\n        ]) {\n          if (inNot) {\n            throw new Error('Nesting :not in a selector is not allowed');\n          }\n\n          inNot = true;\n          current = new CssSelector();\n          cssSelector.notSelectors.push(current);\n        }\n\n        var tag = match[2\n        /* TAG */\n        ];\n\n        if (tag) {\n          var prefix = match[3\n          /* PREFIX */\n          ];\n\n          if (prefix === '#') {\n            // #hash\n            current.addAttribute('id', tag.substr(1));\n          } else if (prefix === '.') {\n            // Class\n            current.addClassName(tag.substr(1));\n          } else {\n            // Element\n            current.setElement(tag);\n          }\n        }\n\n        var attribute = match[4\n        /* ATTRIBUTE */\n        ];\n\n        if (attribute) {\n          current.addAttribute(current.unescapeAttribute(attribute), match[6\n          /* ATTRIBUTE_VALUE */\n          ]);\n        }\n\n        if (match[7\n        /* NOT_END */\n        ]) {\n          inNot = false;\n          current = cssSelector;\n        }\n\n        if (match[8\n        /* SEPARATOR */\n        ]) {\n          if (inNot) {\n            throw new Error('Multiple selectors in :not are not supported');\n          }\n\n          _addResult(results, cssSelector);\n\n          cssSelector = current = new CssSelector();\n        }\n      }\n\n      _addResult(results, cssSelector);\n\n      return results;\n    }\n  }]);\n\n  return CssSelector;\n}();\n/**\n * Reads a list of CssSelectors and allows to calculate which ones\n * are contained in a given CssSelector.\n */\n\n\nvar SelectorMatcher = /*#__PURE__*/function () {\n  function SelectorMatcher() {\n    _classCallCheck(this, SelectorMatcher);\n\n    this._elementMap = new Map();\n    this._elementPartialMap = new Map();\n    this._classMap = new Map();\n    this._classPartialMap = new Map();\n    this._attrValueMap = new Map();\n    this._attrValuePartialMap = new Map();\n    this._listContexts = [];\n  }\n\n  _createClass(SelectorMatcher, [{\n    key: \"addSelectables\",\n    value: function addSelectables(cssSelectors, callbackCtxt) {\n      var listContext = null;\n\n      if (cssSelectors.length > 1) {\n        listContext = new SelectorListContext(cssSelectors);\n\n        this._listContexts.push(listContext);\n      }\n\n      for (var i = 0; i < cssSelectors.length; i++) {\n        this._addSelectable(cssSelectors[i], callbackCtxt, listContext);\n      }\n    }\n    /**\n     * Add an object that can be found later on by calling `match`.\n     * @param cssSelector A css selector\n     * @param callbackCtxt An opaque object that will be given to the callback of the `match` function\n     */\n\n  }, {\n    key: \"_addSelectable\",\n    value: function _addSelectable(cssSelector, callbackCtxt, listContext) {\n      var matcher = this;\n      var element = cssSelector.element;\n      var classNames = cssSelector.classNames;\n      var attrs = cssSelector.attrs;\n      var selectable = new SelectorContext(cssSelector, callbackCtxt, listContext);\n\n      if (element) {\n        var isTerminal = attrs.length === 0 && classNames.length === 0;\n\n        if (isTerminal) {\n          this._addTerminal(matcher._elementMap, element, selectable);\n        } else {\n          matcher = this._addPartial(matcher._elementPartialMap, element);\n        }\n      }\n\n      if (classNames) {\n        for (var i = 0; i < classNames.length; i++) {\n          var _isTerminal = attrs.length === 0 && i === classNames.length - 1;\n\n          var className = classNames[i];\n\n          if (_isTerminal) {\n            this._addTerminal(matcher._classMap, className, selectable);\n          } else {\n            matcher = this._addPartial(matcher._classPartialMap, className);\n          }\n        }\n      }\n\n      if (attrs) {\n        for (var _i = 0; _i < attrs.length; _i += 2) {\n          var _isTerminal2 = _i === attrs.length - 2;\n\n          var name = attrs[_i];\n          var value = attrs[_i + 1];\n\n          if (_isTerminal2) {\n            var terminalMap = matcher._attrValueMap;\n            var terminalValuesMap = terminalMap.get(name);\n\n            if (!terminalValuesMap) {\n              terminalValuesMap = new Map();\n              terminalMap.set(name, terminalValuesMap);\n            }\n\n            this._addTerminal(terminalValuesMap, value, selectable);\n          } else {\n            var partialMap = matcher._attrValuePartialMap;\n            var partialValuesMap = partialMap.get(name);\n\n            if (!partialValuesMap) {\n              partialValuesMap = new Map();\n              partialMap.set(name, partialValuesMap);\n            }\n\n            matcher = this._addPartial(partialValuesMap, value);\n          }\n        }\n      }\n    }\n  }, {\n    key: \"_addTerminal\",\n    value: function _addTerminal(map, name, selectable) {\n      var terminalList = map.get(name);\n\n      if (!terminalList) {\n        terminalList = [];\n        map.set(name, terminalList);\n      }\n\n      terminalList.push(selectable);\n    }\n  }, {\n    key: \"_addPartial\",\n    value: function _addPartial(map, name) {\n      var matcher = map.get(name);\n\n      if (!matcher) {\n        matcher = new SelectorMatcher();\n        map.set(name, matcher);\n      }\n\n      return matcher;\n    }\n    /**\n     * Find the objects that have been added via `addSelectable`\n     * whose css selector is contained in the given css selector.\n     * @param cssSelector A css selector\n     * @param matchedCallback This callback will be called with the object handed into `addSelectable`\n     * @return boolean true if a match was found\n     */\n\n  }, {\n    key: \"match\",\n    value: function match(cssSelector, matchedCallback) {\n      var result = false;\n      var element = cssSelector.element;\n      var classNames = cssSelector.classNames;\n      var attrs = cssSelector.attrs;\n\n      for (var i = 0; i < this._listContexts.length; i++) {\n        this._listContexts[i].alreadyMatched = false;\n      }\n\n      result = this._matchTerminal(this._elementMap, element, cssSelector, matchedCallback) || result;\n      result = this._matchPartial(this._elementPartialMap, element, cssSelector, matchedCallback) || result;\n\n      if (classNames) {\n        for (var _i2 = 0; _i2 < classNames.length; _i2++) {\n          var className = classNames[_i2];\n          result = this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result;\n          result = this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) || result;\n        }\n      }\n\n      if (attrs) {\n        for (var _i3 = 0; _i3 < attrs.length; _i3 += 2) {\n          var name = attrs[_i3];\n          var value = attrs[_i3 + 1];\n\n          var terminalValuesMap = this._attrValueMap.get(name);\n\n          if (value) {\n            result = this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result;\n          }\n\n          result = this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result;\n\n          var partialValuesMap = this._attrValuePartialMap.get(name);\n\n          if (value) {\n            result = this._matchPartial(partialValuesMap, '', cssSelector, matchedCallback) || result;\n          }\n\n          result = this._matchPartial(partialValuesMap, value, cssSelector, matchedCallback) || result;\n        }\n      }\n\n      return result;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_matchTerminal\",\n    value: function _matchTerminal(map, name, cssSelector, matchedCallback) {\n      if (!map || typeof name !== 'string') {\n        return false;\n      }\n\n      var selectables = map.get(name) || [];\n      var starSelectables = map.get('*');\n\n      if (starSelectables) {\n        selectables = selectables.concat(starSelectables);\n      }\n\n      if (selectables.length === 0) {\n        return false;\n      }\n\n      var selectable;\n      var result = false;\n\n      for (var i = 0; i < selectables.length; i++) {\n        selectable = selectables[i];\n        result = selectable.finalize(cssSelector, matchedCallback) || result;\n      }\n\n      return result;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_matchPartial\",\n    value: function _matchPartial(map, name, cssSelector, matchedCallback) {\n      if (!map || typeof name !== 'string') {\n        return false;\n      }\n\n      var nestedSelector = map.get(name);\n\n      if (!nestedSelector) {\n        return false;\n      } // TODO(perf): get rid of recursion and measure again\n      // TODO(perf): don't pass the whole selector into the recursion,\n      // but only the not processed parts\n\n\n      return nestedSelector.match(cssSelector, matchedCallback);\n    }\n  }], [{\n    key: \"createNotMatcher\",\n    value: function createNotMatcher(notSelectors) {\n      var notMatcher = new SelectorMatcher();\n      notMatcher.addSelectables(notSelectors, null);\n      return notMatcher;\n    }\n  }]);\n\n  return SelectorMatcher;\n}();\n\nvar SelectorListContext = /*#__PURE__*/_createClass(function SelectorListContext(selectors) {\n  _classCallCheck(this, SelectorListContext);\n\n  this.selectors = selectors;\n  this.alreadyMatched = false;\n}); // Store context to pass back selector and context when a selector is matched\n\n\nvar SelectorContext = /*#__PURE__*/function () {\n  function SelectorContext(selector, cbContext, listContext) {\n    _classCallCheck(this, SelectorContext);\n\n    this.selector = selector;\n    this.cbContext = cbContext;\n    this.listContext = listContext;\n    this.notSelectors = selector.notSelectors;\n  }\n\n  _createClass(SelectorContext, [{\n    key: \"finalize\",\n    value: function finalize(cssSelector, callback) {\n      var result = true;\n\n      if (this.notSelectors.length > 0 && (!this.listContext || !this.listContext.alreadyMatched)) {\n        var notMatcher = SelectorMatcher.createNotMatcher(this.notSelectors);\n        result = !notMatcher.match(cssSelector, null);\n      }\n\n      if (result && callback && (!this.listContext || !this.listContext.alreadyMatched)) {\n        if (this.listContext) {\n          this.listContext.alreadyMatched = true;\n        }\n\n        callback(this.selector, this.cbContext);\n      }\n\n      return result;\n    }\n  }]);\n\n  return SelectorContext;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar createInject = /*@__PURE__*/makeMetadataFactory('Inject', function (token) {\n  return {\n    token: token\n  };\n});\nvar createInjectionToken = /*@__PURE__*/makeMetadataFactory('InjectionToken', function (desc) {\n  return {\n    _desc: desc,\n    ɵprov: undefined\n  };\n});\nvar createAttribute = /*@__PURE__*/makeMetadataFactory('Attribute', function (attributeName) {\n  return {\n    attributeName: attributeName\n  };\n}); // Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\n\nvar emitDistinctChangesOnlyDefaultValue = true;\nvar createContentChildren = /*@__PURE__*/makeMetadataFactory('ContentChildren', function (selector) {\n  var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return Object.assign({\n    selector: selector,\n    first: false,\n    isViewQuery: false,\n    descendants: false,\n    emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue\n  }, data);\n});\nvar createContentChild = /*@__PURE__*/makeMetadataFactory('ContentChild', function (selector) {\n  var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return Object.assign({\n    selector: selector,\n    first: true,\n    isViewQuery: false,\n    descendants: true\n  }, data);\n});\nvar createViewChildren = /*@__PURE__*/makeMetadataFactory('ViewChildren', function (selector) {\n  var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return Object.assign({\n    selector: selector,\n    first: false,\n    isViewQuery: true,\n    descendants: true,\n    emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue\n  }, data);\n});\nvar createViewChild = /*@__PURE__*/makeMetadataFactory('ViewChild', function (selector, data) {\n  return Object.assign({\n    selector: selector,\n    first: true,\n    isViewQuery: true,\n    descendants: true\n  }, data);\n});\nvar createDirective = /*@__PURE__*/makeMetadataFactory('Directive', function () {\n  var dir = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return dir;\n});\n\nvar ViewEncapsulation = /*@__PURE__*/function (ViewEncapsulation) {\n  ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\"; // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n\n  ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n  ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n  return ViewEncapsulation;\n}({});\n\nvar ChangeDetectionStrategy = /*@__PURE__*/function (ChangeDetectionStrategy) {\n  ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n  ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n  return ChangeDetectionStrategy;\n}({});\n\nvar createComponent = /*@__PURE__*/makeMetadataFactory('Component', function () {\n  var c = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return Object.assign({\n    changeDetection: ChangeDetectionStrategy.Default\n  }, c);\n});\nvar createPipe = /*@__PURE__*/makeMetadataFactory('Pipe', function (p) {\n  return Object.assign({\n    pure: true\n  }, p);\n});\nvar createInput = /*@__PURE__*/makeMetadataFactory('Input', function (bindingPropertyName) {\n  return {\n    bindingPropertyName: bindingPropertyName\n  };\n});\nvar createOutput = /*@__PURE__*/makeMetadataFactory('Output', function (bindingPropertyName) {\n  return {\n    bindingPropertyName: bindingPropertyName\n  };\n});\nvar createHostBinding = /*@__PURE__*/makeMetadataFactory('HostBinding', function (hostPropertyName) {\n  return {\n    hostPropertyName: hostPropertyName\n  };\n});\nvar createHostListener = /*@__PURE__*/makeMetadataFactory('HostListener', function (eventName, args) {\n  return {\n    eventName: eventName,\n    args: args\n  };\n});\nvar createNgModule = /*@__PURE__*/makeMetadataFactory('NgModule', function (ngModule) {\n  return ngModule;\n});\nvar createInjectable = /*@__PURE__*/makeMetadataFactory('Injectable', function () {\n  var injectable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return injectable;\n});\nvar CUSTOM_ELEMENTS_SCHEMA = {\n  name: 'custom-elements'\n};\nvar NO_ERRORS_SCHEMA = {\n  name: 'no-errors-schema'\n};\nvar createOptional = /*@__PURE__*/makeMetadataFactory('Optional');\nvar createSelf = /*@__PURE__*/makeMetadataFactory('Self');\nvar createSkipSelf = /*@__PURE__*/makeMetadataFactory('SkipSelf');\nvar createHost = /*@__PURE__*/makeMetadataFactory('Host');\nvar Type = Function;\n\nvar SecurityContext = /*@__PURE__*/function (SecurityContext) {\n  SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n  SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n  SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n  SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n  SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n  SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n  return SecurityContext;\n}({});\n\nvar MissingTranslationStrategy = /*@__PURE__*/function (MissingTranslationStrategy) {\n  MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n  MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n  MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n  return MissingTranslationStrategy;\n}({});\n\nfunction makeMetadataFactory(name, props) {\n  // This must be declared as a function, not a fat arrow, so that ES2015 devmode produces code\n  // that works with the static_reflector.ts in the ViewEngine compiler.\n  // In particular, `_registerDecoratorOrConstructor` assumes that the value returned here can be\n  // new'ed.\n  function factory() {\n    var values = props ? props.apply(void 0, arguments) : {};\n    return Object.assign({\n      ngMetadataName: name\n    }, values);\n  }\n\n  factory.isTypeOf = function (obj) {\n    return obj && obj.ngMetadataName === name;\n  };\n\n  factory.ngMetadataName = name;\n  return factory;\n}\n\nfunction parserSelectorToSimpleSelector(selector) {\n  var classes = selector.classNames && selector.classNames.length ? [8\n  /* CLASS */\n  ].concat(_toConsumableArray(selector.classNames)) : [];\n  var elementName = selector.element && selector.element !== '*' ? selector.element : '';\n  return [elementName].concat(_toConsumableArray(selector.attrs), _toConsumableArray(classes));\n}\n\nfunction parserSelectorToNegativeSelector(selector) {\n  var classes = selector.classNames && selector.classNames.length ? [8\n  /* CLASS */\n  ].concat(_toConsumableArray(selector.classNames)) : [];\n\n  if (selector.element) {\n    return [1\n    /* NOT */\n    | 4\n    /* ELEMENT */\n    , selector.element].concat(_toConsumableArray(selector.attrs), _toConsumableArray(classes));\n  } else if (selector.attrs.length) {\n    return [1\n    /* NOT */\n    | 2\n    /* ATTRIBUTE */\n    ].concat(_toConsumableArray(selector.attrs), _toConsumableArray(classes));\n  } else {\n    return selector.classNames && selector.classNames.length ? [1\n    /* NOT */\n    | 8\n    /* CLASS */\n    ].concat(_toConsumableArray(selector.classNames)) : [];\n  }\n}\n\nfunction parserSelectorToR3Selector(selector) {\n  var positive = parserSelectorToSimpleSelector(selector);\n  var negative = selector.notSelectors && selector.notSelectors.length ? selector.notSelectors.map(function (notSelector) {\n    return parserSelectorToNegativeSelector(notSelector);\n  }) : [];\n  return positive.concat.apply(positive, _toConsumableArray(negative));\n}\n\nfunction parseSelectorToR3Selector(selector) {\n  return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];\n}\n\nvar core =\n/*#__PURE__*/\n\n/*@__PURE__*/\nObject.freeze({\n  __proto__: null,\n  createInject: createInject,\n  createInjectionToken: createInjectionToken,\n  createAttribute: createAttribute,\n  emitDistinctChangesOnlyDefaultValue: emitDistinctChangesOnlyDefaultValue,\n  createContentChildren: createContentChildren,\n  createContentChild: createContentChild,\n  createViewChildren: createViewChildren,\n  createViewChild: createViewChild,\n  createDirective: createDirective,\n\n  get ViewEncapsulation() {\n    return ViewEncapsulation;\n  },\n\n  get ChangeDetectionStrategy() {\n    return ChangeDetectionStrategy;\n  },\n\n  createComponent: createComponent,\n  createPipe: createPipe,\n  createInput: createInput,\n  createOutput: createOutput,\n  createHostBinding: createHostBinding,\n  createHostListener: createHostListener,\n  createNgModule: createNgModule,\n  createInjectable: createInjectable,\n  CUSTOM_ELEMENTS_SCHEMA: CUSTOM_ELEMENTS_SCHEMA,\n  NO_ERRORS_SCHEMA: NO_ERRORS_SCHEMA,\n  createOptional: createOptional,\n  createSelf: createSelf,\n  createSkipSelf: createSkipSelf,\n  createHost: createHost,\n  Type: Type,\n\n  get SecurityContext() {\n    return SecurityContext;\n  },\n\n  get MissingTranslationStrategy() {\n    return MissingTranslationStrategy;\n  },\n\n  parseSelectorToR3Selector: parseSelectorToR3Selector\n});\n/**\n * @license\n * Copyright Google LLC 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//// Types\n\nvar TypeModifier = /*@__PURE__*/function (TypeModifier) {\n  TypeModifier[TypeModifier[\"Const\"] = 0] = \"Const\";\n  return TypeModifier;\n}({});\n\nvar Type$1 = /*#__PURE__*/function () {\n  function Type$1() {\n    var modifiers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n    _classCallCheck(this, Type$1);\n\n    this.modifiers = modifiers;\n  }\n\n  _createClass(Type$1, [{\n    key: \"hasModifier\",\n    value: function hasModifier(modifier) {\n      return this.modifiers.indexOf(modifier) !== -1;\n    }\n  }]);\n\n  return Type$1;\n}();\n\nvar BuiltinTypeName = /*@__PURE__*/function (BuiltinTypeName) {\n  BuiltinTypeName[BuiltinTypeName[\"Dynamic\"] = 0] = \"Dynamic\";\n  BuiltinTypeName[BuiltinTypeName[\"Bool\"] = 1] = \"Bool\";\n  BuiltinTypeName[BuiltinTypeName[\"String\"] = 2] = \"String\";\n  BuiltinTypeName[BuiltinTypeName[\"Int\"] = 3] = \"Int\";\n  BuiltinTypeName[BuiltinTypeName[\"Number\"] = 4] = \"Number\";\n  BuiltinTypeName[BuiltinTypeName[\"Function\"] = 5] = \"Function\";\n  BuiltinTypeName[BuiltinTypeName[\"Inferred\"] = 6] = \"Inferred\";\n  BuiltinTypeName[BuiltinTypeName[\"None\"] = 7] = \"None\";\n  return BuiltinTypeName;\n}({});\n\nvar BuiltinType = /*#__PURE__*/function (_Type$) {\n  _inherits(BuiltinType, _Type$);\n\n  var _super = _createSuper(BuiltinType);\n\n  function BuiltinType(name, modifiers) {\n    var _this2;\n\n    _classCallCheck(this, BuiltinType);\n\n    _this2 = _super.call(this, modifiers);\n    _this2.name = name;\n    return _this2;\n  }\n\n  _createClass(BuiltinType, [{\n    key: \"visitType\",\n    value: function visitType(visitor, context) {\n      return visitor.visitBuiltinType(this, context);\n    }\n  }]);\n\n  return BuiltinType;\n}(Type$1);\n\nvar ExpressionType = /*#__PURE__*/function (_Type$2) {\n  _inherits(ExpressionType, _Type$2);\n\n  var _super2 = _createSuper(ExpressionType);\n\n  function ExpressionType(value, modifiers) {\n    var _this3;\n\n    var typeParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n    _classCallCheck(this, ExpressionType);\n\n    _this3 = _super2.call(this, modifiers);\n    _this3.value = value;\n    _this3.typeParams = typeParams;\n    return _this3;\n  }\n\n  _createClass(ExpressionType, [{\n    key: \"visitType\",\n    value: function visitType(visitor, context) {\n      return visitor.visitExpressionType(this, context);\n    }\n  }]);\n\n  return ExpressionType;\n}(Type$1);\n\nvar ArrayType = /*#__PURE__*/function (_Type$3) {\n  _inherits(ArrayType, _Type$3);\n\n  var _super3 = _createSuper(ArrayType);\n\n  function ArrayType(of, modifiers) {\n    var _this4;\n\n    _classCallCheck(this, ArrayType);\n\n    _this4 = _super3.call(this, modifiers);\n    _this4.of = of;\n    return _this4;\n  }\n\n  _createClass(ArrayType, [{\n    key: \"visitType\",\n    value: function visitType(visitor, context) {\n      return visitor.visitArrayType(this, context);\n    }\n  }]);\n\n  return ArrayType;\n}(Type$1);\n\nvar MapType = /*#__PURE__*/function (_Type$4) {\n  _inherits(MapType, _Type$4);\n\n  var _super4 = _createSuper(MapType);\n\n  function MapType(valueType, modifiers) {\n    var _this5;\n\n    _classCallCheck(this, MapType);\n\n    _this5 = _super4.call(this, modifiers);\n    _this5.valueType = valueType || null;\n    return _this5;\n  }\n\n  _createClass(MapType, [{\n    key: \"visitType\",\n    value: function visitType(visitor, context) {\n      return visitor.visitMapType(this, context);\n    }\n  }]);\n\n  return MapType;\n}(Type$1);\n\nvar DYNAMIC_TYPE = /*@__PURE__*/new BuiltinType(BuiltinTypeName.Dynamic);\nvar INFERRED_TYPE = /*@__PURE__*/new BuiltinType(BuiltinTypeName.Inferred);\nvar BOOL_TYPE = /*@__PURE__*/new BuiltinType(BuiltinTypeName.Bool);\nvar INT_TYPE = /*@__PURE__*/new BuiltinType(BuiltinTypeName.Int);\nvar NUMBER_TYPE = /*@__PURE__*/new BuiltinType(BuiltinTypeName.Number);\nvar STRING_TYPE = /*@__PURE__*/new BuiltinType(BuiltinTypeName.String);\nvar FUNCTION_TYPE = /*@__PURE__*/new BuiltinType(BuiltinTypeName.Function);\nvar NONE_TYPE = /*@__PURE__*/new BuiltinType(BuiltinTypeName.None); ///// Expressions\n\nvar UnaryOperator = /*@__PURE__*/function (UnaryOperator) {\n  UnaryOperator[UnaryOperator[\"Minus\"] = 0] = \"Minus\";\n  UnaryOperator[UnaryOperator[\"Plus\"] = 1] = \"Plus\";\n  return UnaryOperator;\n}({});\n\nvar BinaryOperator = /*@__PURE__*/function (BinaryOperator) {\n  BinaryOperator[BinaryOperator[\"Equals\"] = 0] = \"Equals\";\n  BinaryOperator[BinaryOperator[\"NotEquals\"] = 1] = \"NotEquals\";\n  BinaryOperator[BinaryOperator[\"Identical\"] = 2] = \"Identical\";\n  BinaryOperator[BinaryOperator[\"NotIdentical\"] = 3] = \"NotIdentical\";\n  BinaryOperator[BinaryOperator[\"Minus\"] = 4] = \"Minus\";\n  BinaryOperator[BinaryOperator[\"Plus\"] = 5] = \"Plus\";\n  BinaryOperator[BinaryOperator[\"Divide\"] = 6] = \"Divide\";\n  BinaryOperator[BinaryOperator[\"Multiply\"] = 7] = \"Multiply\";\n  BinaryOperator[BinaryOperator[\"Modulo\"] = 8] = \"Modulo\";\n  BinaryOperator[BinaryOperator[\"And\"] = 9] = \"And\";\n  BinaryOperator[BinaryOperator[\"Or\"] = 10] = \"Or\";\n  BinaryOperator[BinaryOperator[\"BitwiseAnd\"] = 11] = \"BitwiseAnd\";\n  BinaryOperator[BinaryOperator[\"Lower\"] = 12] = \"Lower\";\n  BinaryOperator[BinaryOperator[\"LowerEquals\"] = 13] = \"LowerEquals\";\n  BinaryOperator[BinaryOperator[\"Bigger\"] = 14] = \"Bigger\";\n  BinaryOperator[BinaryOperator[\"BiggerEquals\"] = 15] = \"BiggerEquals\";\n  BinaryOperator[BinaryOperator[\"NullishCoalesce\"] = 16] = \"NullishCoalesce\";\n  return BinaryOperator;\n}({});\n\nfunction nullSafeIsEquivalent(base, other) {\n  if (base == null || other == null) {\n    return base == other;\n  }\n\n  return base.isEquivalent(other);\n}\n\nfunction areAllEquivalentPredicate(base, other, equivalentPredicate) {\n  var len = base.length;\n\n  if (len !== other.length) {\n    return false;\n  }\n\n  for (var i = 0; i < len; i++) {\n    if (!equivalentPredicate(base[i], other[i])) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction areAllEquivalent(base, other) {\n  return areAllEquivalentPredicate(base, other, function (baseElement, otherElement) {\n    return baseElement.isEquivalent(otherElement);\n  });\n}\n\nvar Expression = /*#__PURE__*/function () {\n  function Expression(type, sourceSpan) {\n    _classCallCheck(this, Expression);\n\n    this.type = type || null;\n    this.sourceSpan = sourceSpan || null;\n  }\n\n  _createClass(Expression, [{\n    key: \"prop\",\n    value: function prop(name, sourceSpan) {\n      return new ReadPropExpr(this, name, null, sourceSpan);\n    }\n  }, {\n    key: \"key\",\n    value: function key(index, type, sourceSpan) {\n      return new ReadKeyExpr(this, index, type, sourceSpan);\n    }\n  }, {\n    key: \"callMethod\",\n    value: function callMethod(name, params, sourceSpan) {\n      return new InvokeMethodExpr(this, name, params, null, sourceSpan);\n    }\n  }, {\n    key: \"callFn\",\n    value: function callFn(params, sourceSpan, pure) {\n      return new InvokeFunctionExpr(this, params, null, sourceSpan, pure);\n    }\n  }, {\n    key: \"instantiate\",\n    value: function instantiate(params, type, sourceSpan) {\n      return new InstantiateExpr(this, params, type, sourceSpan);\n    }\n  }, {\n    key: \"conditional\",\n    value: function conditional(trueCase) {\n      var falseCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      var sourceSpan = arguments.length > 2 ? arguments[2] : undefined;\n      return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);\n    }\n  }, {\n    key: \"equals\",\n    value: function equals(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"notEquals\",\n    value: function notEquals(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"identical\",\n    value: function identical(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"notIdentical\",\n    value: function notIdentical(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"minus\",\n    value: function minus(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"plus\",\n    value: function plus(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"divide\",\n    value: function divide(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"multiply\",\n    value: function multiply(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"modulo\",\n    value: function modulo(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"and\",\n    value: function and(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"bitwiseAnd\",\n    value: function bitwiseAnd(rhs, sourceSpan) {\n      var parens = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n      return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);\n    }\n  }, {\n    key: \"or\",\n    value: function or(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"lower\",\n    value: function lower(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"lowerEquals\",\n    value: function lowerEquals(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"bigger\",\n    value: function bigger(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"biggerEquals\",\n    value: function biggerEquals(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"isBlank\",\n    value: function isBlank(sourceSpan) {\n      // Note: We use equals by purpose here to compare to null and undefined in JS.\n      // We use the typed null to allow strictNullChecks to narrow types.\n      return this.equals(TYPED_NULL_EXPR, sourceSpan);\n    }\n  }, {\n    key: \"cast\",\n    value: function cast(type, sourceSpan) {\n      return new CastExpr(this, type, sourceSpan);\n    }\n  }, {\n    key: \"nullishCoalesce\",\n    value: function nullishCoalesce(rhs, sourceSpan) {\n      return new BinaryOperatorExpr(BinaryOperator.NullishCoalesce, this, rhs, null, sourceSpan);\n    }\n  }, {\n    key: \"toStmt\",\n    value: function toStmt() {\n      return new ExpressionStatement(this, null);\n    }\n  }]);\n\n  return Expression;\n}();\n\nvar BuiltinVar = /*@__PURE__*/function (BuiltinVar) {\n  BuiltinVar[BuiltinVar[\"This\"] = 0] = \"This\";\n  BuiltinVar[BuiltinVar[\"Super\"] = 1] = \"Super\";\n  BuiltinVar[BuiltinVar[\"CatchError\"] = 2] = \"CatchError\";\n  BuiltinVar[BuiltinVar[\"CatchStack\"] = 3] = \"CatchStack\";\n  return BuiltinVar;\n}({});\n\nvar ReadVarExpr = /*#__PURE__*/function (_Expression) {\n  _inherits(ReadVarExpr, _Expression);\n\n  var _super5 = _createSuper(ReadVarExpr);\n\n  function ReadVarExpr(name, type, sourceSpan) {\n    var _this6;\n\n    _classCallCheck(this, ReadVarExpr);\n\n    _this6 = _super5.call(this, type, sourceSpan);\n\n    if (typeof name === 'string') {\n      _this6.name = name;\n      _this6.builtin = null;\n    } else {\n      _this6.name = null;\n      _this6.builtin = name;\n    }\n\n    return _this6;\n  }\n\n  _createClass(ReadVarExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof ReadVarExpr && this.name === e.name && this.builtin === e.builtin;\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitReadVarExpr(this, context);\n    }\n  }, {\n    key: \"set\",\n    value: function set(value) {\n      if (!this.name) {\n        throw new Error(\"Built in variable \".concat(this.builtin, \" can not be assigned to.\"));\n      }\n\n      return new WriteVarExpr(this.name, value, null, this.sourceSpan);\n    }\n  }]);\n\n  return ReadVarExpr;\n}(Expression);\n\nvar TypeofExpr = /*#__PURE__*/function (_Expression2) {\n  _inherits(TypeofExpr, _Expression2);\n\n  var _super6 = _createSuper(TypeofExpr);\n\n  function TypeofExpr(expr, type, sourceSpan) {\n    var _this7;\n\n    _classCallCheck(this, TypeofExpr);\n\n    _this7 = _super6.call(this, type, sourceSpan);\n    _this7.expr = expr;\n    return _this7;\n  }\n\n  _createClass(TypeofExpr, [{\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitTypeofExpr(this, context);\n    }\n  }, {\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return this.expr.isConstant();\n    }\n  }]);\n\n  return TypeofExpr;\n}(Expression);\n\nvar WrappedNodeExpr = /*#__PURE__*/function (_Expression3) {\n  _inherits(WrappedNodeExpr, _Expression3);\n\n  var _super7 = _createSuper(WrappedNodeExpr);\n\n  function WrappedNodeExpr(node, type, sourceSpan) {\n    var _this8;\n\n    _classCallCheck(this, WrappedNodeExpr);\n\n    _this8 = _super7.call(this, type, sourceSpan);\n    _this8.node = node;\n    return _this8;\n  }\n\n  _createClass(WrappedNodeExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof WrappedNodeExpr && this.node === e.node;\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitWrappedNodeExpr(this, context);\n    }\n  }]);\n\n  return WrappedNodeExpr;\n}(Expression);\n\nvar WriteVarExpr = /*#__PURE__*/function (_Expression4) {\n  _inherits(WriteVarExpr, _Expression4);\n\n  var _super8 = _createSuper(WriteVarExpr);\n\n  function WriteVarExpr(name, value, type, sourceSpan) {\n    var _this9;\n\n    _classCallCheck(this, WriteVarExpr);\n\n    _this9 = _super8.call(this, type || value.type, sourceSpan);\n    _this9.name = name;\n    _this9.value = value;\n    return _this9;\n  }\n\n  _createClass(WriteVarExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitWriteVarExpr(this, context);\n    }\n  }, {\n    key: \"toDeclStmt\",\n    value: function toDeclStmt(type, modifiers) {\n      return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);\n    }\n  }, {\n    key: \"toConstDecl\",\n    value: function toConstDecl() {\n      return this.toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]);\n    }\n  }]);\n\n  return WriteVarExpr;\n}(Expression);\n\nvar WriteKeyExpr = /*#__PURE__*/function (_Expression5) {\n  _inherits(WriteKeyExpr, _Expression5);\n\n  var _super9 = _createSuper(WriteKeyExpr);\n\n  function WriteKeyExpr(receiver, index, value, type, sourceSpan) {\n    var _this10;\n\n    _classCallCheck(this, WriteKeyExpr);\n\n    _this10 = _super9.call(this, type || value.type, sourceSpan);\n    _this10.receiver = receiver;\n    _this10.index = index;\n    _this10.value = value;\n    return _this10;\n  }\n\n  _createClass(WriteKeyExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitWriteKeyExpr(this, context);\n    }\n  }]);\n\n  return WriteKeyExpr;\n}(Expression);\n\nvar WritePropExpr = /*#__PURE__*/function (_Expression6) {\n  _inherits(WritePropExpr, _Expression6);\n\n  var _super10 = _createSuper(WritePropExpr);\n\n  function WritePropExpr(receiver, name, value, type, sourceSpan) {\n    var _this11;\n\n    _classCallCheck(this, WritePropExpr);\n\n    _this11 = _super10.call(this, type || value.type, sourceSpan);\n    _this11.receiver = receiver;\n    _this11.name = name;\n    _this11.value = value;\n    return _this11;\n  }\n\n  _createClass(WritePropExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.value.isEquivalent(e.value);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitWritePropExpr(this, context);\n    }\n  }]);\n\n  return WritePropExpr;\n}(Expression);\n\nvar BuiltinMethod = /*@__PURE__*/function (BuiltinMethod) {\n  BuiltinMethod[BuiltinMethod[\"ConcatArray\"] = 0] = \"ConcatArray\";\n  BuiltinMethod[BuiltinMethod[\"SubscribeObservable\"] = 1] = \"SubscribeObservable\";\n  BuiltinMethod[BuiltinMethod[\"Bind\"] = 2] = \"Bind\";\n  return BuiltinMethod;\n}({});\n\nvar InvokeMethodExpr = /*#__PURE__*/function (_Expression7) {\n  _inherits(InvokeMethodExpr, _Expression7);\n\n  var _super11 = _createSuper(InvokeMethodExpr);\n\n  function InvokeMethodExpr(receiver, method, args, type, sourceSpan) {\n    var _this12;\n\n    _classCallCheck(this, InvokeMethodExpr);\n\n    _this12 = _super11.call(this, type, sourceSpan);\n    _this12.receiver = receiver;\n    _this12.args = args;\n\n    if (typeof method === 'string') {\n      _this12.name = method;\n      _this12.builtin = null;\n    } else {\n      _this12.name = null;\n      _this12.builtin = method;\n    }\n\n    return _this12;\n  }\n\n  _createClass(InvokeMethodExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof InvokeMethodExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.builtin === e.builtin && areAllEquivalent(this.args, e.args);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitInvokeMethodExpr(this, context);\n    }\n  }]);\n\n  return InvokeMethodExpr;\n}(Expression);\n\nvar InvokeFunctionExpr = /*#__PURE__*/function (_Expression8) {\n  _inherits(InvokeFunctionExpr, _Expression8);\n\n  var _super12 = _createSuper(InvokeFunctionExpr);\n\n  function InvokeFunctionExpr(fn, args, type, sourceSpan) {\n    var _this13;\n\n    var pure = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n    _classCallCheck(this, InvokeFunctionExpr);\n\n    _this13 = _super12.call(this, type, sourceSpan);\n    _this13.fn = fn;\n    _this13.args = args;\n    _this13.pure = pure;\n    return _this13;\n  }\n\n  _createClass(InvokeFunctionExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) && areAllEquivalent(this.args, e.args) && this.pure === e.pure;\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitInvokeFunctionExpr(this, context);\n    }\n  }]);\n\n  return InvokeFunctionExpr;\n}(Expression);\n\nvar TaggedTemplateExpr = /*#__PURE__*/function (_Expression9) {\n  _inherits(TaggedTemplateExpr, _Expression9);\n\n  var _super13 = _createSuper(TaggedTemplateExpr);\n\n  function TaggedTemplateExpr(tag, template, type, sourceSpan) {\n    var _this14;\n\n    _classCallCheck(this, TaggedTemplateExpr);\n\n    _this14 = _super13.call(this, type, sourceSpan);\n    _this14.tag = tag;\n    _this14.template = template;\n    return _this14;\n  }\n\n  _createClass(TaggedTemplateExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof TaggedTemplateExpr && this.tag.isEquivalent(e.tag) && areAllEquivalentPredicate(this.template.elements, e.template.elements, function (a, b) {\n        return a.text === b.text;\n      }) && areAllEquivalent(this.template.expressions, e.template.expressions);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitTaggedTemplateExpr(this, context);\n    }\n  }]);\n\n  return TaggedTemplateExpr;\n}(Expression);\n\nvar InstantiateExpr = /*#__PURE__*/function (_Expression10) {\n  _inherits(InstantiateExpr, _Expression10);\n\n  var _super14 = _createSuper(InstantiateExpr);\n\n  function InstantiateExpr(classExpr, args, type, sourceSpan) {\n    var _this15;\n\n    _classCallCheck(this, InstantiateExpr);\n\n    _this15 = _super14.call(this, type, sourceSpan);\n    _this15.classExpr = classExpr;\n    _this15.args = args;\n    return _this15;\n  }\n\n  _createClass(InstantiateExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) && areAllEquivalent(this.args, e.args);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitInstantiateExpr(this, context);\n    }\n  }]);\n\n  return InstantiateExpr;\n}(Expression);\n\nvar LiteralExpr = /*#__PURE__*/function (_Expression11) {\n  _inherits(LiteralExpr, _Expression11);\n\n  var _super15 = _createSuper(LiteralExpr);\n\n  function LiteralExpr(value, type, sourceSpan) {\n    var _this16;\n\n    _classCallCheck(this, LiteralExpr);\n\n    _this16 = _super15.call(this, type, sourceSpan);\n    _this16.value = value;\n    return _this16;\n  }\n\n  _createClass(LiteralExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof LiteralExpr && this.value === e.value;\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return true;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitLiteralExpr(this, context);\n    }\n  }]);\n\n  return LiteralExpr;\n}(Expression);\n\nvar TemplateLiteral = /*#__PURE__*/_createClass(function TemplateLiteral(elements, expressions) {\n  _classCallCheck(this, TemplateLiteral);\n\n  this.elements = elements;\n  this.expressions = expressions;\n});\n\nvar TemplateLiteralElement = /*#__PURE__*/_createClass(function TemplateLiteralElement(text, sourceSpan, rawText) {\n  _classCallCheck(this, TemplateLiteralElement);\n\n  var _a;\n\n  this.text = text;\n  this.sourceSpan = sourceSpan; // If `rawText` is not provided, try to extract the raw string from its\n  // associated `sourceSpan`. If that is also not available, \"fake\" the raw\n  // string instead by escaping the following control sequences:\n  // - \"\\\" would otherwise indicate that the next character is a control character.\n  // - \"`\" and \"${\" are template string control sequences that would otherwise prematurely\n  // indicate the end of the template literal element.\n\n  this.rawText = (_a = rawText !== null && rawText !== void 0 ? rawText : sourceSpan === null || sourceSpan === void 0 ? void 0 : sourceSpan.toString()) !== null && _a !== void 0 ? _a : escapeForTemplateLiteral(escapeSlashes(text));\n});\n\nvar MessagePiece = /*#__PURE__*/_createClass(function MessagePiece(text, sourceSpan) {\n  _classCallCheck(this, MessagePiece);\n\n  this.text = text;\n  this.sourceSpan = sourceSpan;\n});\n\nvar LiteralPiece = /*#__PURE__*/function (_MessagePiece) {\n  _inherits(LiteralPiece, _MessagePiece);\n\n  var _super16 = _createSuper(LiteralPiece);\n\n  function LiteralPiece() {\n    _classCallCheck(this, LiteralPiece);\n\n    return _super16.apply(this, arguments);\n  }\n\n  return _createClass(LiteralPiece);\n}(MessagePiece);\n\nvar PlaceholderPiece = /*#__PURE__*/function (_MessagePiece2) {\n  _inherits(PlaceholderPiece, _MessagePiece2);\n\n  var _super17 = _createSuper(PlaceholderPiece);\n\n  function PlaceholderPiece() {\n    _classCallCheck(this, PlaceholderPiece);\n\n    return _super17.apply(this, arguments);\n  }\n\n  return _createClass(PlaceholderPiece);\n}(MessagePiece);\n\nvar LocalizedString = /*#__PURE__*/function (_Expression12) {\n  _inherits(LocalizedString, _Expression12);\n\n  var _super18 = _createSuper(LocalizedString);\n\n  function LocalizedString(metaBlock, messageParts, placeHolderNames, expressions, sourceSpan) {\n    var _this17;\n\n    _classCallCheck(this, LocalizedString);\n\n    _this17 = _super18.call(this, STRING_TYPE, sourceSpan);\n    _this17.metaBlock = metaBlock;\n    _this17.messageParts = messageParts;\n    _this17.placeHolderNames = placeHolderNames;\n    _this17.expressions = expressions;\n    return _this17;\n  }\n\n  _createClass(LocalizedString, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      // return e instanceof LocalizedString && this.message === e.message;\n      return false;\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitLocalizedString(this, context);\n    }\n    /**\n     * Serialize the given `meta` and `messagePart` into \"cooked\" and \"raw\" strings that can be used\n     * in a `$localize` tagged string. The format of the metadata is the same as that parsed by\n     * `parseI18nMeta()`.\n     *\n     * @param meta The metadata to serialize\n     * @param messagePart The first part of the tagged string\n     */\n\n  }, {\n    key: \"serializeI18nHead\",\n    value: function serializeI18nHead() {\n      var MEANING_SEPARATOR = '|';\n      var ID_SEPARATOR = '@@';\n      var LEGACY_ID_INDICATOR = '␟';\n      var metaBlock = this.metaBlock.description || '';\n\n      if (this.metaBlock.meaning) {\n        metaBlock = \"\".concat(this.metaBlock.meaning).concat(MEANING_SEPARATOR).concat(metaBlock);\n      }\n\n      if (this.metaBlock.customId) {\n        metaBlock = \"\".concat(metaBlock).concat(ID_SEPARATOR).concat(this.metaBlock.customId);\n      }\n\n      if (this.metaBlock.legacyIds) {\n        this.metaBlock.legacyIds.forEach(function (legacyId) {\n          metaBlock = \"\".concat(metaBlock).concat(LEGACY_ID_INDICATOR).concat(legacyId);\n        });\n      }\n\n      return createCookedRawString(metaBlock, this.messageParts[0].text, this.getMessagePartSourceSpan(0));\n    }\n  }, {\n    key: \"getMessagePartSourceSpan\",\n    value: function getMessagePartSourceSpan(i) {\n      var _a, _b;\n\n      return (_b = (_a = this.messageParts[i]) === null || _a === void 0 ? void 0 : _a.sourceSpan) !== null && _b !== void 0 ? _b : this.sourceSpan;\n    }\n  }, {\n    key: \"getPlaceholderSourceSpan\",\n    value: function getPlaceholderSourceSpan(i) {\n      var _a, _b, _c, _d;\n\n      return (_d = (_b = (_a = this.placeHolderNames[i]) === null || _a === void 0 ? void 0 : _a.sourceSpan) !== null && _b !== void 0 ? _b : (_c = this.expressions[i]) === null || _c === void 0 ? void 0 : _c.sourceSpan) !== null && _d !== void 0 ? _d : this.sourceSpan;\n    }\n    /**\n     * Serialize the given `placeholderName` and `messagePart` into \"cooked\" and \"raw\" strings that\n     * can be used in a `$localize` tagged string.\n     *\n     * @param placeholderName The placeholder name to serialize\n     * @param messagePart The following message string after this placeholder\n     */\n\n  }, {\n    key: \"serializeI18nTemplatePart\",\n    value: function serializeI18nTemplatePart(partIndex) {\n      var placeholderName = this.placeHolderNames[partIndex - 1].text;\n      var messagePart = this.messageParts[partIndex];\n      return createCookedRawString(placeholderName, messagePart.text, this.getMessagePartSourceSpan(partIndex));\n    }\n  }]);\n\n  return LocalizedString;\n}(Expression);\n\nvar escapeSlashes = function escapeSlashes(str) {\n  return str.replace(/\\\\/g, '\\\\\\\\');\n};\n\nvar escapeStartingColon = function escapeStartingColon(str) {\n  return str.replace(/^:/, '\\\\:');\n};\n\nvar escapeColons = function escapeColons(str) {\n  return str.replace(/:/g, '\\\\:');\n};\n\nvar escapeForTemplateLiteral = function escapeForTemplateLiteral(str) {\n  return str.replace(/`/g, '\\\\`').replace(/\\${/g, '$\\\\{');\n};\n/**\n * Creates a `{cooked, raw}` object from the `metaBlock` and `messagePart`.\n *\n * The `raw` text must have various character sequences escaped:\n * * \"\\\" would otherwise indicate that the next character is a control character.\n * * \"`\" and \"${\" are template string control sequences that would otherwise prematurely indicate\n *   the end of a message part.\n * * \":\" inside a metablock would prematurely indicate the end of the metablock.\n * * \":\" at the start of a messagePart with no metablock would erroneously indicate the start of a\n *   metablock.\n *\n * @param metaBlock Any metadata that should be prepended to the string\n * @param messagePart The message part of the string\n */\n\n\nfunction createCookedRawString(metaBlock, messagePart, range) {\n  if (metaBlock === '') {\n    return {\n      cooked: messagePart,\n      raw: escapeForTemplateLiteral(escapeStartingColon(escapeSlashes(messagePart))),\n      range: range\n    };\n  } else {\n    return {\n      cooked: \":\".concat(metaBlock, \":\").concat(messagePart),\n      raw: escapeForTemplateLiteral(\":\".concat(escapeColons(escapeSlashes(metaBlock)), \":\").concat(escapeSlashes(messagePart))),\n      range: range\n    };\n  }\n}\n\nvar ExternalExpr = /*#__PURE__*/function (_Expression13) {\n  _inherits(ExternalExpr, _Expression13);\n\n  var _super19 = _createSuper(ExternalExpr);\n\n  function ExternalExpr(value, type) {\n    var _this18;\n\n    var typeParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n    var sourceSpan = arguments.length > 3 ? arguments[3] : undefined;\n\n    _classCallCheck(this, ExternalExpr);\n\n    _this18 = _super19.call(this, type, sourceSpan);\n    _this18.value = value;\n    _this18.typeParams = typeParams;\n    return _this18;\n  }\n\n  _createClass(ExternalExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof ExternalExpr && this.value.name === e.value.name && this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime;\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitExternalExpr(this, context);\n    }\n  }]);\n\n  return ExternalExpr;\n}(Expression);\n\nvar ExternalReference = /*#__PURE__*/_createClass(function ExternalReference(moduleName, name, runtime) {\n  _classCallCheck(this, ExternalReference);\n\n  this.moduleName = moduleName;\n  this.name = name;\n  this.runtime = runtime;\n});\n\nvar ConditionalExpr = /*#__PURE__*/function (_Expression14) {\n  _inherits(ConditionalExpr, _Expression14);\n\n  var _super20 = _createSuper(ConditionalExpr);\n\n  function ConditionalExpr(condition, trueCase) {\n    var _this19;\n\n    var falseCase = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n    var type = arguments.length > 3 ? arguments[3] : undefined;\n    var sourceSpan = arguments.length > 4 ? arguments[4] : undefined;\n\n    _classCallCheck(this, ConditionalExpr);\n\n    _this19 = _super20.call(this, type || trueCase.type, sourceSpan);\n    _this19.condition = condition;\n    _this19.falseCase = falseCase;\n    _this19.trueCase = trueCase;\n    return _this19;\n  }\n\n  _createClass(ConditionalExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) && this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitConditionalExpr(this, context);\n    }\n  }]);\n\n  return ConditionalExpr;\n}(Expression);\n\nvar NotExpr = /*#__PURE__*/function (_Expression15) {\n  _inherits(NotExpr, _Expression15);\n\n  var _super21 = _createSuper(NotExpr);\n\n  function NotExpr(condition, sourceSpan) {\n    var _this20;\n\n    _classCallCheck(this, NotExpr);\n\n    _this20 = _super21.call(this, BOOL_TYPE, sourceSpan);\n    _this20.condition = condition;\n    return _this20;\n  }\n\n  _createClass(NotExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof NotExpr && this.condition.isEquivalent(e.condition);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitNotExpr(this, context);\n    }\n  }]);\n\n  return NotExpr;\n}(Expression);\n\nvar AssertNotNull = /*#__PURE__*/function (_Expression16) {\n  _inherits(AssertNotNull, _Expression16);\n\n  var _super22 = _createSuper(AssertNotNull);\n\n  function AssertNotNull(condition, sourceSpan) {\n    var _this21;\n\n    _classCallCheck(this, AssertNotNull);\n\n    _this21 = _super22.call(this, condition.type, sourceSpan);\n    _this21.condition = condition;\n    return _this21;\n  }\n\n  _createClass(AssertNotNull, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof AssertNotNull && this.condition.isEquivalent(e.condition);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitAssertNotNullExpr(this, context);\n    }\n  }]);\n\n  return AssertNotNull;\n}(Expression);\n\nvar CastExpr = /*#__PURE__*/function (_Expression17) {\n  _inherits(CastExpr, _Expression17);\n\n  var _super23 = _createSuper(CastExpr);\n\n  function CastExpr(value, type, sourceSpan) {\n    var _this22;\n\n    _classCallCheck(this, CastExpr);\n\n    _this22 = _super23.call(this, type, sourceSpan);\n    _this22.value = value;\n    return _this22;\n  }\n\n  _createClass(CastExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof CastExpr && this.value.isEquivalent(e.value);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitCastExpr(this, context);\n    }\n  }]);\n\n  return CastExpr;\n}(Expression);\n\nvar FnParam = /*#__PURE__*/function () {\n  function FnParam(name) {\n    var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n    _classCallCheck(this, FnParam);\n\n    this.name = name;\n    this.type = type;\n  }\n\n  _createClass(FnParam, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(param) {\n      return this.name === param.name;\n    }\n  }]);\n\n  return FnParam;\n}();\n\nvar FunctionExpr = /*#__PURE__*/function (_Expression18) {\n  _inherits(FunctionExpr, _Expression18);\n\n  var _super24 = _createSuper(FunctionExpr);\n\n  function FunctionExpr(params, statements, type, sourceSpan, name) {\n    var _this23;\n\n    _classCallCheck(this, FunctionExpr);\n\n    _this23 = _super24.call(this, type, sourceSpan);\n    _this23.params = params;\n    _this23.statements = statements;\n    _this23.name = name;\n    return _this23;\n  }\n\n  _createClass(FunctionExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) && areAllEquivalent(this.statements, e.statements);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitFunctionExpr(this, context);\n    }\n  }, {\n    key: \"toDeclStmt\",\n    value: function toDeclStmt(name, modifiers) {\n      return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);\n    }\n  }]);\n\n  return FunctionExpr;\n}(Expression);\n\nvar UnaryOperatorExpr = /*#__PURE__*/function (_Expression19) {\n  _inherits(UnaryOperatorExpr, _Expression19);\n\n  var _super25 = _createSuper(UnaryOperatorExpr);\n\n  function UnaryOperatorExpr(operator, expr, type, sourceSpan) {\n    var _this24;\n\n    var parens = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n\n    _classCallCheck(this, UnaryOperatorExpr);\n\n    _this24 = _super25.call(this, type || NUMBER_TYPE, sourceSpan);\n    _this24.operator = operator;\n    _this24.expr = expr;\n    _this24.parens = parens;\n    return _this24;\n  }\n\n  _createClass(UnaryOperatorExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof UnaryOperatorExpr && this.operator === e.operator && this.expr.isEquivalent(e.expr);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitUnaryOperatorExpr(this, context);\n    }\n  }]);\n\n  return UnaryOperatorExpr;\n}(Expression);\n\nvar BinaryOperatorExpr = /*#__PURE__*/function (_Expression20) {\n  _inherits(BinaryOperatorExpr, _Expression20);\n\n  var _super26 = _createSuper(BinaryOperatorExpr);\n\n  function BinaryOperatorExpr(operator, lhs, rhs, type, sourceSpan) {\n    var _this25;\n\n    var parens = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n\n    _classCallCheck(this, BinaryOperatorExpr);\n\n    _this25 = _super26.call(this, type || lhs.type, sourceSpan);\n    _this25.operator = operator;\n    _this25.rhs = rhs;\n    _this25.parens = parens;\n    _this25.lhs = lhs;\n    return _this25;\n  }\n\n  _createClass(BinaryOperatorExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof BinaryOperatorExpr && this.operator === e.operator && this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitBinaryOperatorExpr(this, context);\n    }\n  }]);\n\n  return BinaryOperatorExpr;\n}(Expression);\n\nvar ReadPropExpr = /*#__PURE__*/function (_Expression21) {\n  _inherits(ReadPropExpr, _Expression21);\n\n  var _super27 = _createSuper(ReadPropExpr);\n\n  function ReadPropExpr(receiver, name, type, sourceSpan) {\n    var _this26;\n\n    _classCallCheck(this, ReadPropExpr);\n\n    _this26 = _super27.call(this, type, sourceSpan);\n    _this26.receiver = receiver;\n    _this26.name = name;\n    return _this26;\n  }\n\n  _createClass(ReadPropExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name;\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitReadPropExpr(this, context);\n    }\n  }, {\n    key: \"set\",\n    value: function set(value) {\n      return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);\n    }\n  }]);\n\n  return ReadPropExpr;\n}(Expression);\n\nvar ReadKeyExpr = /*#__PURE__*/function (_Expression22) {\n  _inherits(ReadKeyExpr, _Expression22);\n\n  var _super28 = _createSuper(ReadKeyExpr);\n\n  function ReadKeyExpr(receiver, index, type, sourceSpan) {\n    var _this27;\n\n    _classCallCheck(this, ReadKeyExpr);\n\n    _this27 = _super28.call(this, type, sourceSpan);\n    _this27.receiver = receiver;\n    _this27.index = index;\n    return _this27;\n  }\n\n  _createClass(ReadKeyExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitReadKeyExpr(this, context);\n    }\n  }, {\n    key: \"set\",\n    value: function set(value) {\n      return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);\n    }\n  }]);\n\n  return ReadKeyExpr;\n}(Expression);\n\nvar LiteralArrayExpr = /*#__PURE__*/function (_Expression23) {\n  _inherits(LiteralArrayExpr, _Expression23);\n\n  var _super29 = _createSuper(LiteralArrayExpr);\n\n  function LiteralArrayExpr(entries, type, sourceSpan) {\n    var _this28;\n\n    _classCallCheck(this, LiteralArrayExpr);\n\n    _this28 = _super29.call(this, type, sourceSpan);\n    _this28.entries = entries;\n    return _this28;\n  }\n\n  _createClass(LiteralArrayExpr, [{\n    key: \"isConstant\",\n    value: function isConstant() {\n      return this.entries.every(function (e) {\n        return e.isConstant();\n      });\n    }\n  }, {\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitLiteralArrayExpr(this, context);\n    }\n  }]);\n\n  return LiteralArrayExpr;\n}(Expression);\n\nvar LiteralMapEntry = /*#__PURE__*/function () {\n  function LiteralMapEntry(key, value, quoted) {\n    _classCallCheck(this, LiteralMapEntry);\n\n    this.key = key;\n    this.value = value;\n    this.quoted = quoted;\n  }\n\n  _createClass(LiteralMapEntry, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return this.key === e.key && this.value.isEquivalent(e.value);\n    }\n  }]);\n\n  return LiteralMapEntry;\n}();\n\nvar LiteralMapExpr = /*#__PURE__*/function (_Expression24) {\n  _inherits(LiteralMapExpr, _Expression24);\n\n  var _super30 = _createSuper(LiteralMapExpr);\n\n  function LiteralMapExpr(entries, type, sourceSpan) {\n    var _this29;\n\n    _classCallCheck(this, LiteralMapExpr);\n\n    _this29 = _super30.call(this, type, sourceSpan);\n    _this29.entries = entries;\n    _this29.valueType = null;\n\n    if (type) {\n      _this29.valueType = type.valueType;\n    }\n\n    return _this29;\n  }\n\n  _createClass(LiteralMapExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return this.entries.every(function (e) {\n        return e.value.isConstant();\n      });\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitLiteralMapExpr(this, context);\n    }\n  }]);\n\n  return LiteralMapExpr;\n}(Expression);\n\nvar CommaExpr = /*#__PURE__*/function (_Expression25) {\n  _inherits(CommaExpr, _Expression25);\n\n  var _super31 = _createSuper(CommaExpr);\n\n  function CommaExpr(parts, sourceSpan) {\n    var _this30;\n\n    _classCallCheck(this, CommaExpr);\n\n    _this30 = _super31.call(this, parts[parts.length - 1].type, sourceSpan);\n    _this30.parts = parts;\n    return _this30;\n  }\n\n  _createClass(CommaExpr, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return false;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      return visitor.visitCommaExpr(this, context);\n    }\n  }]);\n\n  return CommaExpr;\n}(Expression);\n\nvar THIS_EXPR = /*@__PURE__*/new ReadVarExpr(BuiltinVar.This, null, null);\nvar SUPER_EXPR = /*@__PURE__*/new ReadVarExpr(BuiltinVar.Super, null, null);\nvar CATCH_ERROR_VAR = /*@__PURE__*/new ReadVarExpr(BuiltinVar.CatchError, null, null);\nvar CATCH_STACK_VAR = /*@__PURE__*/new ReadVarExpr(BuiltinVar.CatchStack, null, null);\nvar NULL_EXPR = /*@__PURE__*/new LiteralExpr(null, null, null);\nvar TYPED_NULL_EXPR = /*@__PURE__*/new LiteralExpr(null, INFERRED_TYPE, null); //// Statements\n\nvar StmtModifier = /*@__PURE__*/function (StmtModifier) {\n  StmtModifier[StmtModifier[\"Final\"] = 0] = \"Final\";\n  StmtModifier[StmtModifier[\"Private\"] = 1] = \"Private\";\n  StmtModifier[StmtModifier[\"Exported\"] = 2] = \"Exported\";\n  StmtModifier[StmtModifier[\"Static\"] = 3] = \"Static\";\n  return StmtModifier;\n}({});\n\nvar LeadingComment = /*#__PURE__*/function () {\n  function LeadingComment(text, multiline, trailingNewline) {\n    _classCallCheck(this, LeadingComment);\n\n    this.text = text;\n    this.multiline = multiline;\n    this.trailingNewline = trailingNewline;\n  }\n\n  _createClass(LeadingComment, [{\n    key: \"toString\",\n    value: function toString() {\n      return this.multiline ? \" \".concat(this.text, \" \") : this.text;\n    }\n  }]);\n\n  return LeadingComment;\n}();\n\nvar JSDocComment = /*#__PURE__*/function (_LeadingComment) {\n  _inherits(JSDocComment, _LeadingComment);\n\n  var _super32 = _createSuper(JSDocComment);\n\n  function JSDocComment(tags) {\n    var _this31;\n\n    _classCallCheck(this, JSDocComment);\n\n    _this31 = _super32.call(this, '',\n    /* multiline */\n    true,\n    /* trailingNewline */\n    true);\n    _this31.tags = tags;\n    return _this31;\n  }\n\n  _createClass(JSDocComment, [{\n    key: \"toString\",\n    value: function toString() {\n      return serializeTags(this.tags);\n    }\n  }]);\n\n  return JSDocComment;\n}(LeadingComment);\n\nvar Statement = /*#__PURE__*/function () {\n  function Statement() {\n    var modifiers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n    var sourceSpan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n    var leadingComments = arguments.length > 2 ? arguments[2] : undefined;\n\n    _classCallCheck(this, Statement);\n\n    this.modifiers = modifiers;\n    this.sourceSpan = sourceSpan;\n    this.leadingComments = leadingComments;\n  }\n\n  _createClass(Statement, [{\n    key: \"hasModifier\",\n    value: function hasModifier(modifier) {\n      return this.modifiers.indexOf(modifier) !== -1;\n    }\n  }, {\n    key: \"addLeadingComment\",\n    value: function addLeadingComment(leadingComment) {\n      var _a;\n\n      this.leadingComments = (_a = this.leadingComments) !== null && _a !== void 0 ? _a : [];\n      this.leadingComments.push(leadingComment);\n    }\n  }]);\n\n  return Statement;\n}();\n\nvar DeclareVarStmt = /*#__PURE__*/function (_Statement) {\n  _inherits(DeclareVarStmt, _Statement);\n\n  var _super33 = _createSuper(DeclareVarStmt);\n\n  function DeclareVarStmt(name, value, type, modifiers, sourceSpan, leadingComments) {\n    var _this32;\n\n    _classCallCheck(this, DeclareVarStmt);\n\n    _this32 = _super33.call(this, modifiers, sourceSpan, leadingComments);\n    _this32.name = name;\n    _this32.value = value;\n    _this32.type = type || value && value.type || null;\n    return _this32;\n  }\n\n  _createClass(DeclareVarStmt, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(stmt) {\n      return stmt instanceof DeclareVarStmt && this.name === stmt.name && (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value);\n    }\n  }, {\n    key: \"visitStatement\",\n    value: function visitStatement(visitor, context) {\n      return visitor.visitDeclareVarStmt(this, context);\n    }\n  }]);\n\n  return DeclareVarStmt;\n}(Statement);\n\nvar DeclareFunctionStmt = /*#__PURE__*/function (_Statement2) {\n  _inherits(DeclareFunctionStmt, _Statement2);\n\n  var _super34 = _createSuper(DeclareFunctionStmt);\n\n  function DeclareFunctionStmt(name, params, statements, type, modifiers, sourceSpan, leadingComments) {\n    var _this33;\n\n    _classCallCheck(this, DeclareFunctionStmt);\n\n    _this33 = _super34.call(this, modifiers, sourceSpan, leadingComments);\n    _this33.name = name;\n    _this33.params = params;\n    _this33.statements = statements;\n    _this33.type = type || null;\n    return _this33;\n  }\n\n  _createClass(DeclareFunctionStmt, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(stmt) {\n      return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) && areAllEquivalent(this.statements, stmt.statements);\n    }\n  }, {\n    key: \"visitStatement\",\n    value: function visitStatement(visitor, context) {\n      return visitor.visitDeclareFunctionStmt(this, context);\n    }\n  }]);\n\n  return DeclareFunctionStmt;\n}(Statement);\n\nvar ExpressionStatement = /*#__PURE__*/function (_Statement3) {\n  _inherits(ExpressionStatement, _Statement3);\n\n  var _super35 = _createSuper(ExpressionStatement);\n\n  function ExpressionStatement(expr, sourceSpan, leadingComments) {\n    var _this34;\n\n    _classCallCheck(this, ExpressionStatement);\n\n    _this34 = _super35.call(this, [], sourceSpan, leadingComments);\n    _this34.expr = expr;\n    return _this34;\n  }\n\n  _createClass(ExpressionStatement, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(stmt) {\n      return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);\n    }\n  }, {\n    key: \"visitStatement\",\n    value: function visitStatement(visitor, context) {\n      return visitor.visitExpressionStmt(this, context);\n    }\n  }]);\n\n  return ExpressionStatement;\n}(Statement);\n\nvar ReturnStatement = /*#__PURE__*/function (_Statement4) {\n  _inherits(ReturnStatement, _Statement4);\n\n  var _super36 = _createSuper(ReturnStatement);\n\n  function ReturnStatement(value) {\n    var _this35;\n\n    var sourceSpan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n    var leadingComments = arguments.length > 2 ? arguments[2] : undefined;\n\n    _classCallCheck(this, ReturnStatement);\n\n    _this35 = _super36.call(this, [], sourceSpan, leadingComments);\n    _this35.value = value;\n    return _this35;\n  }\n\n  _createClass(ReturnStatement, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(stmt) {\n      return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);\n    }\n  }, {\n    key: \"visitStatement\",\n    value: function visitStatement(visitor, context) {\n      return visitor.visitReturnStmt(this, context);\n    }\n  }]);\n\n  return ReturnStatement;\n}(Statement);\n\nvar AbstractClassPart = /*#__PURE__*/function () {\n  function AbstractClassPart() {\n    var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n    var modifiers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n    _classCallCheck(this, AbstractClassPart);\n\n    this.type = type;\n    this.modifiers = modifiers;\n  }\n\n  _createClass(AbstractClassPart, [{\n    key: \"hasModifier\",\n    value: function hasModifier(modifier) {\n      return this.modifiers.indexOf(modifier) !== -1;\n    }\n  }]);\n\n  return AbstractClassPart;\n}();\n\nvar ClassField = /*#__PURE__*/function (_AbstractClassPart) {\n  _inherits(ClassField, _AbstractClassPart);\n\n  var _super37 = _createSuper(ClassField);\n\n  function ClassField(name, type, modifiers, initializer) {\n    var _this36;\n\n    _classCallCheck(this, ClassField);\n\n    _this36 = _super37.call(this, type, modifiers);\n    _this36.name = name;\n    _this36.initializer = initializer;\n    return _this36;\n  }\n\n  _createClass(ClassField, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(f) {\n      return this.name === f.name;\n    }\n  }]);\n\n  return ClassField;\n}(AbstractClassPart);\n\nvar ClassMethod = /*#__PURE__*/function (_AbstractClassPart2) {\n  _inherits(ClassMethod, _AbstractClassPart2);\n\n  var _super38 = _createSuper(ClassMethod);\n\n  function ClassMethod(name, params, body, type, modifiers) {\n    var _this37;\n\n    _classCallCheck(this, ClassMethod);\n\n    _this37 = _super38.call(this, type, modifiers);\n    _this37.name = name;\n    _this37.params = params;\n    _this37.body = body;\n    return _this37;\n  }\n\n  _createClass(ClassMethod, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(m) {\n      return this.name === m.name && areAllEquivalent(this.body, m.body);\n    }\n  }]);\n\n  return ClassMethod;\n}(AbstractClassPart);\n\nvar ClassGetter = /*#__PURE__*/function (_AbstractClassPart3) {\n  _inherits(ClassGetter, _AbstractClassPart3);\n\n  var _super39 = _createSuper(ClassGetter);\n\n  function ClassGetter(name, body, type, modifiers) {\n    var _this38;\n\n    _classCallCheck(this, ClassGetter);\n\n    _this38 = _super39.call(this, type, modifiers);\n    _this38.name = name;\n    _this38.body = body;\n    return _this38;\n  }\n\n  _createClass(ClassGetter, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(m) {\n      return this.name === m.name && areAllEquivalent(this.body, m.body);\n    }\n  }]);\n\n  return ClassGetter;\n}(AbstractClassPart);\n\nvar ClassStmt = /*#__PURE__*/function (_Statement5) {\n  _inherits(ClassStmt, _Statement5);\n\n  var _super40 = _createSuper(ClassStmt);\n\n  function ClassStmt(name, parent, fields, getters, constructorMethod, methods, modifiers, sourceSpan, leadingComments) {\n    var _this39;\n\n    _classCallCheck(this, ClassStmt);\n\n    _this39 = _super40.call(this, modifiers, sourceSpan, leadingComments);\n    _this39.name = name;\n    _this39.parent = parent;\n    _this39.fields = fields;\n    _this39.getters = getters;\n    _this39.constructorMethod = constructorMethod;\n    _this39.methods = methods;\n    return _this39;\n  }\n\n  _createClass(ClassStmt, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(stmt) {\n      return stmt instanceof ClassStmt && this.name === stmt.name && nullSafeIsEquivalent(this.parent, stmt.parent) && areAllEquivalent(this.fields, stmt.fields) && areAllEquivalent(this.getters, stmt.getters) && this.constructorMethod.isEquivalent(stmt.constructorMethod) && areAllEquivalent(this.methods, stmt.methods);\n    }\n  }, {\n    key: \"visitStatement\",\n    value: function visitStatement(visitor, context) {\n      return visitor.visitDeclareClassStmt(this, context);\n    }\n  }]);\n\n  return ClassStmt;\n}(Statement);\n\nvar IfStmt = /*#__PURE__*/function (_Statement6) {\n  _inherits(IfStmt, _Statement6);\n\n  var _super41 = _createSuper(IfStmt);\n\n  function IfStmt(condition, trueCase) {\n    var _this40;\n\n    var falseCase = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n    var sourceSpan = arguments.length > 3 ? arguments[3] : undefined;\n    var leadingComments = arguments.length > 4 ? arguments[4] : undefined;\n\n    _classCallCheck(this, IfStmt);\n\n    _this40 = _super41.call(this, [], sourceSpan, leadingComments);\n    _this40.condition = condition;\n    _this40.trueCase = trueCase;\n    _this40.falseCase = falseCase;\n    return _this40;\n  }\n\n  _createClass(IfStmt, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(stmt) {\n      return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) && areAllEquivalent(this.trueCase, stmt.trueCase) && areAllEquivalent(this.falseCase, stmt.falseCase);\n    }\n  }, {\n    key: \"visitStatement\",\n    value: function visitStatement(visitor, context) {\n      return visitor.visitIfStmt(this, context);\n    }\n  }]);\n\n  return IfStmt;\n}(Statement);\n\nvar TryCatchStmt = /*#__PURE__*/function (_Statement7) {\n  _inherits(TryCatchStmt, _Statement7);\n\n  var _super42 = _createSuper(TryCatchStmt);\n\n  function TryCatchStmt(bodyStmts, catchStmts) {\n    var _this41;\n\n    var sourceSpan = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n    var leadingComments = arguments.length > 3 ? arguments[3] : undefined;\n\n    _classCallCheck(this, TryCatchStmt);\n\n    _this41 = _super42.call(this, [], sourceSpan, leadingComments);\n    _this41.bodyStmts = bodyStmts;\n    _this41.catchStmts = catchStmts;\n    return _this41;\n  }\n\n  _createClass(TryCatchStmt, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(stmt) {\n      return stmt instanceof TryCatchStmt && areAllEquivalent(this.bodyStmts, stmt.bodyStmts) && areAllEquivalent(this.catchStmts, stmt.catchStmts);\n    }\n  }, {\n    key: \"visitStatement\",\n    value: function visitStatement(visitor, context) {\n      return visitor.visitTryCatchStmt(this, context);\n    }\n  }]);\n\n  return TryCatchStmt;\n}(Statement);\n\nvar ThrowStmt = /*#__PURE__*/function (_Statement8) {\n  _inherits(ThrowStmt, _Statement8);\n\n  var _super43 = _createSuper(ThrowStmt);\n\n  function ThrowStmt(error) {\n    var _this42;\n\n    var sourceSpan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n    var leadingComments = arguments.length > 2 ? arguments[2] : undefined;\n\n    _classCallCheck(this, ThrowStmt);\n\n    _this42 = _super43.call(this, [], sourceSpan, leadingComments);\n    _this42.error = error;\n    return _this42;\n  }\n\n  _createClass(ThrowStmt, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(stmt) {\n      return stmt instanceof TryCatchStmt && this.error.isEquivalent(stmt.error);\n    }\n  }, {\n    key: \"visitStatement\",\n    value: function visitStatement(visitor, context) {\n      return visitor.visitThrowStmt(this, context);\n    }\n  }]);\n\n  return ThrowStmt;\n}(Statement);\n\nvar AstTransformer = /*#__PURE__*/function () {\n  function AstTransformer() {\n    _classCallCheck(this, AstTransformer);\n  }\n\n  _createClass(AstTransformer, [{\n    key: \"transformExpr\",\n    value: function transformExpr(expr, context) {\n      return expr;\n    }\n  }, {\n    key: \"transformStmt\",\n    value: function transformStmt(stmt, context) {\n      return stmt;\n    }\n  }, {\n    key: \"visitReadVarExpr\",\n    value: function visitReadVarExpr(ast, context) {\n      return this.transformExpr(ast, context);\n    }\n  }, {\n    key: \"visitWrappedNodeExpr\",\n    value: function visitWrappedNodeExpr(ast, context) {\n      return this.transformExpr(ast, context);\n    }\n  }, {\n    key: \"visitTypeofExpr\",\n    value: function visitTypeofExpr(expr, context) {\n      return this.transformExpr(new TypeofExpr(expr.expr.visitExpression(this, context), expr.type, expr.sourceSpan), context);\n    }\n  }, {\n    key: \"visitWriteVarExpr\",\n    value: function visitWriteVarExpr(expr, context) {\n      return this.transformExpr(new WriteVarExpr(expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);\n    }\n  }, {\n    key: \"visitWriteKeyExpr\",\n    value: function visitWriteKeyExpr(expr, context) {\n      return this.transformExpr(new WriteKeyExpr(expr.receiver.visitExpression(this, context), expr.index.visitExpression(this, context), expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);\n    }\n  }, {\n    key: \"visitWritePropExpr\",\n    value: function visitWritePropExpr(expr, context) {\n      return this.transformExpr(new WritePropExpr(expr.receiver.visitExpression(this, context), expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);\n    }\n  }, {\n    key: \"visitInvokeMethodExpr\",\n    value: function visitInvokeMethodExpr(ast, context) {\n      var method = ast.builtin || ast.name;\n      return this.transformExpr(new InvokeMethodExpr(ast.receiver.visitExpression(this, context), method, this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitInvokeFunctionExpr\",\n    value: function visitInvokeFunctionExpr(ast, context) {\n      return this.transformExpr(new InvokeFunctionExpr(ast.fn.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitTaggedTemplateExpr\",\n    value: function visitTaggedTemplateExpr(ast, context) {\n      var _this43 = this;\n\n      return this.transformExpr(new TaggedTemplateExpr(ast.tag.visitExpression(this, context), new TemplateLiteral(ast.template.elements, ast.template.expressions.map(function (e) {\n        return e.visitExpression(_this43, context);\n      })), ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitInstantiateExpr\",\n    value: function visitInstantiateExpr(ast, context) {\n      return this.transformExpr(new InstantiateExpr(ast.classExpr.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitLiteralExpr\",\n    value: function visitLiteralExpr(ast, context) {\n      return this.transformExpr(ast, context);\n    }\n  }, {\n    key: \"visitLocalizedString\",\n    value: function visitLocalizedString(ast, context) {\n      return this.transformExpr(new LocalizedString(ast.metaBlock, ast.messageParts, ast.placeHolderNames, this.visitAllExpressions(ast.expressions, context), ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitExternalExpr\",\n    value: function visitExternalExpr(ast, context) {\n      return this.transformExpr(ast, context);\n    }\n  }, {\n    key: \"visitConditionalExpr\",\n    value: function visitConditionalExpr(ast, context) {\n      return this.transformExpr(new ConditionalExpr(ast.condition.visitExpression(this, context), ast.trueCase.visitExpression(this, context), ast.falseCase.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitNotExpr\",\n    value: function visitNotExpr(ast, context) {\n      return this.transformExpr(new NotExpr(ast.condition.visitExpression(this, context), ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitAssertNotNullExpr\",\n    value: function visitAssertNotNullExpr(ast, context) {\n      return this.transformExpr(new AssertNotNull(ast.condition.visitExpression(this, context), ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitCastExpr\",\n    value: function visitCastExpr(ast, context) {\n      return this.transformExpr(new CastExpr(ast.value.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitFunctionExpr\",\n    value: function visitFunctionExpr(ast, context) {\n      return this.transformExpr(new FunctionExpr(ast.params, this.visitAllStatements(ast.statements, context), ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitUnaryOperatorExpr\",\n    value: function visitUnaryOperatorExpr(ast, context) {\n      return this.transformExpr(new UnaryOperatorExpr(ast.operator, ast.expr.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitBinaryOperatorExpr\",\n    value: function visitBinaryOperatorExpr(ast, context) {\n      return this.transformExpr(new BinaryOperatorExpr(ast.operator, ast.lhs.visitExpression(this, context), ast.rhs.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitReadPropExpr\",\n    value: function visitReadPropExpr(ast, context) {\n      return this.transformExpr(new ReadPropExpr(ast.receiver.visitExpression(this, context), ast.name, ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitReadKeyExpr\",\n    value: function visitReadKeyExpr(ast, context) {\n      return this.transformExpr(new ReadKeyExpr(ast.receiver.visitExpression(this, context), ast.index.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitLiteralArrayExpr\",\n    value: function visitLiteralArrayExpr(ast, context) {\n      return this.transformExpr(new LiteralArrayExpr(this.visitAllExpressions(ast.entries, context), ast.type, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitLiteralMapExpr\",\n    value: function visitLiteralMapExpr(ast, context) {\n      var _this44 = this;\n\n      var entries = ast.entries.map(function (entry) {\n        return new LiteralMapEntry(entry.key, entry.value.visitExpression(_this44, context), entry.quoted);\n      });\n      var mapType = new MapType(ast.valueType);\n      return this.transformExpr(new LiteralMapExpr(entries, mapType, ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitCommaExpr\",\n    value: function visitCommaExpr(ast, context) {\n      return this.transformExpr(new CommaExpr(this.visitAllExpressions(ast.parts, context), ast.sourceSpan), context);\n    }\n  }, {\n    key: \"visitAllExpressions\",\n    value: function visitAllExpressions(exprs, context) {\n      var _this45 = this;\n\n      return exprs.map(function (expr) {\n        return expr.visitExpression(_this45, context);\n      });\n    }\n  }, {\n    key: \"visitDeclareVarStmt\",\n    value: function visitDeclareVarStmt(stmt, context) {\n      var value = stmt.value && stmt.value.visitExpression(this, context);\n      return this.transformStmt(new DeclareVarStmt(stmt.name, value, stmt.type, stmt.modifiers, stmt.sourceSpan, stmt.leadingComments), context);\n    }\n  }, {\n    key: \"visitDeclareFunctionStmt\",\n    value: function visitDeclareFunctionStmt(stmt, context) {\n      return this.transformStmt(new DeclareFunctionStmt(stmt.name, stmt.params, this.visitAllStatements(stmt.statements, context), stmt.type, stmt.modifiers, stmt.sourceSpan, stmt.leadingComments), context);\n    }\n  }, {\n    key: \"visitExpressionStmt\",\n    value: function visitExpressionStmt(stmt, context) {\n      return this.transformStmt(new ExpressionStatement(stmt.expr.visitExpression(this, context), stmt.sourceSpan, stmt.leadingComments), context);\n    }\n  }, {\n    key: \"visitReturnStmt\",\n    value: function visitReturnStmt(stmt, context) {\n      return this.transformStmt(new ReturnStatement(stmt.value.visitExpression(this, context), stmt.sourceSpan, stmt.leadingComments), context);\n    }\n  }, {\n    key: \"visitDeclareClassStmt\",\n    value: function visitDeclareClassStmt(stmt, context) {\n      var _this46 = this;\n\n      var parent = stmt.parent.visitExpression(this, context);\n      var getters = stmt.getters.map(function (getter) {\n        return new ClassGetter(getter.name, _this46.visitAllStatements(getter.body, context), getter.type, getter.modifiers);\n      });\n      var ctorMethod = stmt.constructorMethod && new ClassMethod(stmt.constructorMethod.name, stmt.constructorMethod.params, this.visitAllStatements(stmt.constructorMethod.body, context), stmt.constructorMethod.type, stmt.constructorMethod.modifiers);\n      var methods = stmt.methods.map(function (method) {\n        return new ClassMethod(method.name, method.params, _this46.visitAllStatements(method.body, context), method.type, method.modifiers);\n      });\n      return this.transformStmt(new ClassStmt(stmt.name, parent, stmt.fields, getters, ctorMethod, methods, stmt.modifiers, stmt.sourceSpan), context);\n    }\n  }, {\n    key: \"visitIfStmt\",\n    value: function visitIfStmt(stmt, context) {\n      return this.transformStmt(new IfStmt(stmt.condition.visitExpression(this, context), this.visitAllStatements(stmt.trueCase, context), this.visitAllStatements(stmt.falseCase, context), stmt.sourceSpan, stmt.leadingComments), context);\n    }\n  }, {\n    key: \"visitTryCatchStmt\",\n    value: function visitTryCatchStmt(stmt, context) {\n      return this.transformStmt(new TryCatchStmt(this.visitAllStatements(stmt.bodyStmts, context), this.visitAllStatements(stmt.catchStmts, context), stmt.sourceSpan, stmt.leadingComments), context);\n    }\n  }, {\n    key: \"visitThrowStmt\",\n    value: function visitThrowStmt(stmt, context) {\n      return this.transformStmt(new ThrowStmt(stmt.error.visitExpression(this, context), stmt.sourceSpan, stmt.leadingComments), context);\n    }\n  }, {\n    key: \"visitAllStatements\",\n    value: function visitAllStatements(stmts, context) {\n      var _this47 = this;\n\n      return stmts.map(function (stmt) {\n        return stmt.visitStatement(_this47, context);\n      });\n    }\n  }]);\n\n  return AstTransformer;\n}();\n\nvar RecursiveAstVisitor = /*#__PURE__*/function () {\n  function RecursiveAstVisitor() {\n    _classCallCheck(this, RecursiveAstVisitor);\n  }\n\n  _createClass(RecursiveAstVisitor, [{\n    key: \"visitType\",\n    value: function visitType(ast, context) {\n      return ast;\n    }\n  }, {\n    key: \"visitExpression\",\n    value: function visitExpression(ast, context) {\n      if (ast.type) {\n        ast.type.visitType(this, context);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitBuiltinType\",\n    value: function visitBuiltinType(type, context) {\n      return this.visitType(type, context);\n    }\n  }, {\n    key: \"visitExpressionType\",\n    value: function visitExpressionType(type, context) {\n      var _this48 = this;\n\n      type.value.visitExpression(this, context);\n\n      if (type.typeParams !== null) {\n        type.typeParams.forEach(function (param) {\n          return _this48.visitType(param, context);\n        });\n      }\n\n      return this.visitType(type, context);\n    }\n  }, {\n    key: \"visitArrayType\",\n    value: function visitArrayType(type, context) {\n      return this.visitType(type, context);\n    }\n  }, {\n    key: \"visitMapType\",\n    value: function visitMapType(type, context) {\n      return this.visitType(type, context);\n    }\n  }, {\n    key: \"visitWrappedNodeExpr\",\n    value: function visitWrappedNodeExpr(ast, context) {\n      return ast;\n    }\n  }, {\n    key: \"visitTypeofExpr\",\n    value: function visitTypeofExpr(ast, context) {\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitReadVarExpr\",\n    value: function visitReadVarExpr(ast, context) {\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitWriteVarExpr\",\n    value: function visitWriteVarExpr(ast, context) {\n      ast.value.visitExpression(this, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitWriteKeyExpr\",\n    value: function visitWriteKeyExpr(ast, context) {\n      ast.receiver.visitExpression(this, context);\n      ast.index.visitExpression(this, context);\n      ast.value.visitExpression(this, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitWritePropExpr\",\n    value: function visitWritePropExpr(ast, context) {\n      ast.receiver.visitExpression(this, context);\n      ast.value.visitExpression(this, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitInvokeMethodExpr\",\n    value: function visitInvokeMethodExpr(ast, context) {\n      ast.receiver.visitExpression(this, context);\n      this.visitAllExpressions(ast.args, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitInvokeFunctionExpr\",\n    value: function visitInvokeFunctionExpr(ast, context) {\n      ast.fn.visitExpression(this, context);\n      this.visitAllExpressions(ast.args, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitTaggedTemplateExpr\",\n    value: function visitTaggedTemplateExpr(ast, context) {\n      ast.tag.visitExpression(this, context);\n      this.visitAllExpressions(ast.template.expressions, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitInstantiateExpr\",\n    value: function visitInstantiateExpr(ast, context) {\n      ast.classExpr.visitExpression(this, context);\n      this.visitAllExpressions(ast.args, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitLiteralExpr\",\n    value: function visitLiteralExpr(ast, context) {\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitLocalizedString\",\n    value: function visitLocalizedString(ast, context) {\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitExternalExpr\",\n    value: function visitExternalExpr(ast, context) {\n      var _this49 = this;\n\n      if (ast.typeParams) {\n        ast.typeParams.forEach(function (type) {\n          return type.visitType(_this49, context);\n        });\n      }\n\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitConditionalExpr\",\n    value: function visitConditionalExpr(ast, context) {\n      ast.condition.visitExpression(this, context);\n      ast.trueCase.visitExpression(this, context);\n      ast.falseCase.visitExpression(this, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitNotExpr\",\n    value: function visitNotExpr(ast, context) {\n      ast.condition.visitExpression(this, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitAssertNotNullExpr\",\n    value: function visitAssertNotNullExpr(ast, context) {\n      ast.condition.visitExpression(this, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitCastExpr\",\n    value: function visitCastExpr(ast, context) {\n      ast.value.visitExpression(this, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitFunctionExpr\",\n    value: function visitFunctionExpr(ast, context) {\n      this.visitAllStatements(ast.statements, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitUnaryOperatorExpr\",\n    value: function visitUnaryOperatorExpr(ast, context) {\n      ast.expr.visitExpression(this, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitBinaryOperatorExpr\",\n    value: function visitBinaryOperatorExpr(ast, context) {\n      ast.lhs.visitExpression(this, context);\n      ast.rhs.visitExpression(this, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitReadPropExpr\",\n    value: function visitReadPropExpr(ast, context) {\n      ast.receiver.visitExpression(this, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitReadKeyExpr\",\n    value: function visitReadKeyExpr(ast, context) {\n      ast.receiver.visitExpression(this, context);\n      ast.index.visitExpression(this, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitLiteralArrayExpr\",\n    value: function visitLiteralArrayExpr(ast, context) {\n      this.visitAllExpressions(ast.entries, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitLiteralMapExpr\",\n    value: function visitLiteralMapExpr(ast, context) {\n      var _this50 = this;\n\n      ast.entries.forEach(function (entry) {\n        return entry.value.visitExpression(_this50, context);\n      });\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitCommaExpr\",\n    value: function visitCommaExpr(ast, context) {\n      this.visitAllExpressions(ast.parts, context);\n      return this.visitExpression(ast, context);\n    }\n  }, {\n    key: \"visitAllExpressions\",\n    value: function visitAllExpressions(exprs, context) {\n      var _this51 = this;\n\n      exprs.forEach(function (expr) {\n        return expr.visitExpression(_this51, context);\n      });\n    }\n  }, {\n    key: \"visitDeclareVarStmt\",\n    value: function visitDeclareVarStmt(stmt, context) {\n      if (stmt.value) {\n        stmt.value.visitExpression(this, context);\n      }\n\n      if (stmt.type) {\n        stmt.type.visitType(this, context);\n      }\n\n      return stmt;\n    }\n  }, {\n    key: \"visitDeclareFunctionStmt\",\n    value: function visitDeclareFunctionStmt(stmt, context) {\n      this.visitAllStatements(stmt.statements, context);\n\n      if (stmt.type) {\n        stmt.type.visitType(this, context);\n      }\n\n      return stmt;\n    }\n  }, {\n    key: \"visitExpressionStmt\",\n    value: function visitExpressionStmt(stmt, context) {\n      stmt.expr.visitExpression(this, context);\n      return stmt;\n    }\n  }, {\n    key: \"visitReturnStmt\",\n    value: function visitReturnStmt(stmt, context) {\n      stmt.value.visitExpression(this, context);\n      return stmt;\n    }\n  }, {\n    key: \"visitDeclareClassStmt\",\n    value: function visitDeclareClassStmt(stmt, context) {\n      var _this52 = this;\n\n      stmt.parent.visitExpression(this, context);\n      stmt.getters.forEach(function (getter) {\n        return _this52.visitAllStatements(getter.body, context);\n      });\n\n      if (stmt.constructorMethod) {\n        this.visitAllStatements(stmt.constructorMethod.body, context);\n      }\n\n      stmt.methods.forEach(function (method) {\n        return _this52.visitAllStatements(method.body, context);\n      });\n      return stmt;\n    }\n  }, {\n    key: \"visitIfStmt\",\n    value: function visitIfStmt(stmt, context) {\n      stmt.condition.visitExpression(this, context);\n      this.visitAllStatements(stmt.trueCase, context);\n      this.visitAllStatements(stmt.falseCase, context);\n      return stmt;\n    }\n  }, {\n    key: \"visitTryCatchStmt\",\n    value: function visitTryCatchStmt(stmt, context) {\n      this.visitAllStatements(stmt.bodyStmts, context);\n      this.visitAllStatements(stmt.catchStmts, context);\n      return stmt;\n    }\n  }, {\n    key: \"visitThrowStmt\",\n    value: function visitThrowStmt(stmt, context) {\n      stmt.error.visitExpression(this, context);\n      return stmt;\n    }\n  }, {\n    key: \"visitAllStatements\",\n    value: function visitAllStatements(stmts, context) {\n      var _this53 = this;\n\n      stmts.forEach(function (stmt) {\n        return stmt.visitStatement(_this53, context);\n      });\n    }\n  }]);\n\n  return RecursiveAstVisitor;\n}();\n\nfunction findReadVarNames(stmts) {\n  var visitor = new _ReadVarVisitor();\n  visitor.visitAllStatements(stmts, null);\n  return visitor.varNames;\n}\n\nvar _ReadVarVisitor = /*#__PURE__*/function (_RecursiveAstVisitor) {\n  _inherits(_ReadVarVisitor, _RecursiveAstVisitor);\n\n  var _super44 = _createSuper(_ReadVarVisitor);\n\n  function _ReadVarVisitor() {\n    var _this54;\n\n    _classCallCheck(this, _ReadVarVisitor);\n\n    _this54 = _super44.apply(this, arguments);\n    _this54.varNames = new Set();\n    return _this54;\n  }\n\n  _createClass(_ReadVarVisitor, [{\n    key: \"visitDeclareFunctionStmt\",\n    value: function visitDeclareFunctionStmt(stmt, context) {\n      // Don't descend into nested functions\n      return stmt;\n    }\n  }, {\n    key: \"visitDeclareClassStmt\",\n    value: function visitDeclareClassStmt(stmt, context) {\n      // Don't descend into nested classes\n      return stmt;\n    }\n  }, {\n    key: \"visitReadVarExpr\",\n    value: function visitReadVarExpr(ast, context) {\n      if (ast.name) {\n        this.varNames.add(ast.name);\n      }\n\n      return null;\n    }\n  }]);\n\n  return _ReadVarVisitor;\n}(RecursiveAstVisitor);\n\nfunction collectExternalReferences(stmts) {\n  var visitor = new _FindExternalReferencesVisitor();\n  visitor.visitAllStatements(stmts, null);\n  return visitor.externalReferences;\n}\n\nvar _FindExternalReferencesVisitor = /*#__PURE__*/function (_RecursiveAstVisitor2) {\n  _inherits(_FindExternalReferencesVisitor, _RecursiveAstVisitor2);\n\n  var _super45 = _createSuper(_FindExternalReferencesVisitor);\n\n  function _FindExternalReferencesVisitor() {\n    var _this55;\n\n    _classCallCheck(this, _FindExternalReferencesVisitor);\n\n    _this55 = _super45.apply(this, arguments);\n    _this55.externalReferences = [];\n    return _this55;\n  }\n\n  _createClass(_FindExternalReferencesVisitor, [{\n    key: \"visitExternalExpr\",\n    value: function visitExternalExpr(e, context) {\n      this.externalReferences.push(e.value);\n      return _get(_getPrototypeOf(_FindExternalReferencesVisitor.prototype), \"visitExternalExpr\", this).call(this, e, context);\n    }\n  }]);\n\n  return _FindExternalReferencesVisitor;\n}(RecursiveAstVisitor);\n\nfunction applySourceSpanToStatementIfNeeded(stmt, sourceSpan) {\n  if (!sourceSpan) {\n    return stmt;\n  }\n\n  var transformer = new _ApplySourceSpanTransformer(sourceSpan);\n  return stmt.visitStatement(transformer, null);\n}\n\nfunction applySourceSpanToExpressionIfNeeded(expr, sourceSpan) {\n  if (!sourceSpan) {\n    return expr;\n  }\n\n  var transformer = new _ApplySourceSpanTransformer(sourceSpan);\n  return expr.visitExpression(transformer, null);\n}\n\nvar _ApplySourceSpanTransformer = /*#__PURE__*/function (_AstTransformer) {\n  _inherits(_ApplySourceSpanTransformer, _AstTransformer);\n\n  var _super46 = _createSuper(_ApplySourceSpanTransformer);\n\n  function _ApplySourceSpanTransformer(sourceSpan) {\n    var _this56;\n\n    _classCallCheck(this, _ApplySourceSpanTransformer);\n\n    _this56 = _super46.call(this);\n    _this56.sourceSpan = sourceSpan;\n    return _this56;\n  }\n\n  _createClass(_ApplySourceSpanTransformer, [{\n    key: \"_clone\",\n    value: function _clone(obj) {\n      var clone = Object.create(obj.constructor.prototype);\n\n      for (var _i4 = 0, _Object$keys = Object.keys(obj); _i4 < _Object$keys.length; _i4++) {\n        var prop = _Object$keys[_i4];\n        clone[prop] = obj[prop];\n      }\n\n      return clone;\n    }\n  }, {\n    key: \"transformExpr\",\n    value: function transformExpr(expr, context) {\n      if (!expr.sourceSpan) {\n        expr = this._clone(expr);\n        expr.sourceSpan = this.sourceSpan;\n      }\n\n      return expr;\n    }\n  }, {\n    key: \"transformStmt\",\n    value: function transformStmt(stmt, context) {\n      if (!stmt.sourceSpan) {\n        stmt = this._clone(stmt);\n        stmt.sourceSpan = this.sourceSpan;\n      }\n\n      return stmt;\n    }\n  }]);\n\n  return _ApplySourceSpanTransformer;\n}(AstTransformer);\n\nfunction leadingComment(text) {\n  var multiline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  var trailingNewline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n  return new LeadingComment(text, multiline, trailingNewline);\n}\n\nfunction jsDocComment() {\n  var tags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n  return new JSDocComment(tags);\n}\n\nfunction variable(name, type, sourceSpan) {\n  return new ReadVarExpr(name, type, sourceSpan);\n}\n\nfunction importExpr(id) {\n  var typeParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n  var sourceSpan = arguments.length > 2 ? arguments[2] : undefined;\n  return new ExternalExpr(id, null, typeParams, sourceSpan);\n}\n\nfunction importType(id, typeParams, typeModifiers) {\n  return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;\n}\n\nfunction expressionType(expr, typeModifiers, typeParams) {\n  return new ExpressionType(expr, typeModifiers, typeParams);\n}\n\nfunction typeofExpr(expr) {\n  return new TypeofExpr(expr);\n}\n\nfunction literalArr(values, type, sourceSpan) {\n  return new LiteralArrayExpr(values, type, sourceSpan);\n}\n\nfunction literalMap(values) {\n  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n  return new LiteralMapExpr(values.map(function (e) {\n    return new LiteralMapEntry(e.key, e.value, e.quoted);\n  }), type, null);\n}\n\nfunction unary(operator, expr, type, sourceSpan) {\n  return new UnaryOperatorExpr(operator, expr, type, sourceSpan);\n}\n\nfunction not(expr, sourceSpan) {\n  return new NotExpr(expr, sourceSpan);\n}\n\nfunction assertNotNull(expr, sourceSpan) {\n  return new AssertNotNull(expr, sourceSpan);\n}\n\nfunction fn(params, body, type, sourceSpan, name) {\n  return new FunctionExpr(params, body, type, sourceSpan, name);\n}\n\nfunction ifStmt(condition, thenClause, elseClause, sourceSpan, leadingComments) {\n  return new IfStmt(condition, thenClause, elseClause, sourceSpan, leadingComments);\n}\n\nfunction taggedTemplate(tag, template, type, sourceSpan) {\n  return new TaggedTemplateExpr(tag, template, type, sourceSpan);\n}\n\nfunction literal(value, type, sourceSpan) {\n  return new LiteralExpr(value, type, sourceSpan);\n}\n\nfunction localizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan) {\n  return new LocalizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan);\n}\n\nfunction isNull(exp) {\n  return exp instanceof LiteralExpr && exp.value === null;\n}\n/*\n * Serializes a `Tag` into a string.\n * Returns a string like \" @foo {bar} baz\" (note the leading whitespace before `@foo`).\n */\n\n\nfunction tagToString(tag) {\n  var out = '';\n\n  if (tag.tagName) {\n    out += \" @\".concat(tag.tagName);\n  }\n\n  if (tag.text) {\n    if (tag.text.match(/\\/\\*|\\*\\//)) {\n      throw new Error('JSDoc text cannot contain \"/*\" and \"*/\"');\n    }\n\n    out += ' ' + tag.text.replace(/@/g, '\\\\@');\n  }\n\n  return out;\n}\n\nfunction serializeTags(tags) {\n  if (tags.length === 0) return '';\n\n  if (tags.length === 1 && tags[0].tagName && !tags[0].text) {\n    // The JSDOC comment is a single simple tag: e.g `/** @tagname */`.\n    return \"*\".concat(tagToString(tags[0]), \" \");\n  }\n\n  var out = '*\\n';\n\n  var _iterator = _createForOfIteratorHelper(tags),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var tag = _step.value;\n      out += ' *'; // If the tagToString is multi-line, insert \" * \" prefixes on lines.\n\n      out += tagToString(tag).replace(/\\n/g, '\\n * ');\n      out += '\\n';\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  out += ' ';\n  return out;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar CONSTANT_PREFIX = '_c';\n/**\n * `ConstantPool` tries to reuse literal factories when two or more literals are identical.\n * We determine whether literals are identical by creating a key out of their AST using the\n * `KeyVisitor`. This constant is used to replace dynamic expressions which can't be safely\n * converted into a key. E.g. given an expression `{foo: bar()}`, since we don't know what\n * the result of `bar` will be, we create a key that looks like `{foo: <unknown>}`. Note\n * that we use a variable, rather than something like `null` in order to avoid collisions.\n */\n\nvar UNKNOWN_VALUE_KEY = /*@__PURE__*/variable('<unknown>');\n/**\n * Context to use when producing a key.\n *\n * This ensures we see the constant not the reference variable when producing\n * a key.\n */\n\nvar KEY_CONTEXT = {};\n/**\n * Generally all primitive values are excluded from the `ConstantPool`, but there is an exclusion\n * for strings that reach a certain length threshold. This constant defines the length threshold for\n * strings.\n */\n\nvar POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS = 50;\n/**\n * A node that is a place-holder that allows the node to be replaced when the actual\n * node is known.\n *\n * This allows the constant pool to change an expression from a direct reference to\n * a constant to a shared constant. It returns a fix-up node that is later allowed to\n * change the referenced expression.\n */\n\nvar FixupExpression = /*#__PURE__*/function (_Expression26) {\n  _inherits(FixupExpression, _Expression26);\n\n  var _super47 = _createSuper(FixupExpression);\n\n  function FixupExpression(resolved) {\n    var _this57;\n\n    _classCallCheck(this, FixupExpression);\n\n    _this57 = _super47.call(this, resolved.type);\n    _this57.resolved = resolved;\n    _this57.original = resolved;\n    return _this57;\n  }\n\n  _createClass(FixupExpression, [{\n    key: \"visitExpression\",\n    value: function visitExpression(visitor, context) {\n      if (context === KEY_CONTEXT) {\n        // When producing a key we want to traverse the constant not the\n        // variable used to refer to it.\n        return this.original.visitExpression(visitor, context);\n      } else {\n        return this.resolved.visitExpression(visitor, context);\n      }\n    }\n  }, {\n    key: \"isEquivalent\",\n    value: function isEquivalent(e) {\n      return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved);\n    }\n  }, {\n    key: \"isConstant\",\n    value: function isConstant() {\n      return true;\n    }\n  }, {\n    key: \"fixup\",\n    value: function fixup(expression) {\n      this.resolved = expression;\n      this.shared = true;\n    }\n  }]);\n\n  return FixupExpression;\n}(Expression);\n/**\n * A constant pool allows a code emitter to share constant in an output context.\n *\n * The constant pool also supports sharing access to ivy definitions references.\n */\n\n\nvar ConstantPool = /*#__PURE__*/function () {\n  function ConstantPool() {\n    var isClosureCompilerEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    _classCallCheck(this, ConstantPool);\n\n    this.isClosureCompilerEnabled = isClosureCompilerEnabled;\n    this.statements = [];\n    this.literals = new Map();\n    this.literalFactories = new Map();\n    this.injectorDefinitions = new Map();\n    this.directiveDefinitions = new Map();\n    this.componentDefinitions = new Map();\n    this.pipeDefinitions = new Map();\n    this.nextNameIndex = 0;\n  }\n\n  _createClass(ConstantPool, [{\n    key: \"getConstLiteral\",\n    value: function getConstLiteral(literal, forceShared) {\n      if (literal instanceof LiteralExpr && !isLongStringLiteral(literal) || literal instanceof FixupExpression) {\n        // Do no put simple literals into the constant pool or try to produce a constant for a\n        // reference to a constant.\n        return literal;\n      }\n\n      var key = this.keyOf(literal);\n      var fixup = this.literals.get(key);\n      var newValue = false;\n\n      if (!fixup) {\n        fixup = new FixupExpression(literal);\n        this.literals.set(key, fixup);\n        newValue = true;\n      }\n\n      if (!newValue && !fixup.shared || newValue && forceShared) {\n        // Replace the expression with a variable\n        var name = this.freshName();\n        var definition;\n        var usage;\n\n        if (this.isClosureCompilerEnabled && isLongStringLiteral(literal)) {\n          // For string literals, Closure will **always** inline the string at\n          // **all** usages, duplicating it each time. For large strings, this\n          // unnecessarily bloats bundle size. To work around this restriction, we\n          // wrap the string in a function, and call that function for each usage.\n          // This tricks Closure into using inline logic for functions instead of\n          // string literals. Function calls are only inlined if the body is small\n          // enough to be worth it. By doing this, very large strings will be\n          // shared across multiple usages, rather than duplicating the string at\n          // each usage site.\n          //\n          // const myStr = function() { return \"very very very long string\"; };\n          // const usage1 = myStr();\n          // const usage2 = myStr();\n          definition = variable(name).set(new FunctionExpr([], // Params.\n          [// Statements.\n          new ReturnStatement(literal)]));\n          usage = variable(name).callFn([]);\n        } else {\n          // Just declare and use the variable directly, without a function call\n          // indirection. This saves a few bytes and avoids an unncessary call.\n          definition = variable(name).set(literal);\n          usage = variable(name);\n        }\n\n        this.statements.push(definition.toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n        fixup.fixup(usage);\n      }\n\n      return fixup;\n    }\n  }, {\n    key: \"getDefinition\",\n    value: function getDefinition(type, kind, ctx) {\n      var forceShared = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n      var definitions = this.definitionsOf(kind);\n      var fixup = definitions.get(type);\n      var newValue = false;\n\n      if (!fixup) {\n        var property = this.propertyNameOf(kind);\n        fixup = new FixupExpression(ctx.importExpr(type).prop(property));\n        definitions.set(type, fixup);\n        newValue = true;\n      }\n\n      if (!newValue && !fixup.shared || newValue && forceShared) {\n        var name = this.freshName();\n        this.statements.push(variable(name).set(fixup.resolved).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n        fixup.fixup(variable(name));\n      }\n\n      return fixup;\n    }\n  }, {\n    key: \"getLiteralFactory\",\n    value: function getLiteralFactory(literal) {\n      // Create a pure function that builds an array of a mix of constant and variable expressions\n      if (literal instanceof LiteralArrayExpr) {\n        var argumentsForKey = literal.entries.map(function (e) {\n          return e.isConstant() ? e : UNKNOWN_VALUE_KEY;\n        });\n        var key = this.keyOf(literalArr(argumentsForKey));\n        return this._getLiteralFactory(key, literal.entries, function (entries) {\n          return literalArr(entries);\n        });\n      } else {\n        var expressionForKey = literalMap(literal.entries.map(function (e) {\n          return {\n            key: e.key,\n            value: e.value.isConstant() ? e.value : UNKNOWN_VALUE_KEY,\n            quoted: e.quoted\n          };\n        }));\n\n        var _key = this.keyOf(expressionForKey);\n\n        return this._getLiteralFactory(_key, literal.entries.map(function (e) {\n          return e.value;\n        }), function (entries) {\n          return literalMap(entries.map(function (value, index) {\n            return {\n              key: literal.entries[index].key,\n              value: value,\n              quoted: literal.entries[index].quoted\n            };\n          }));\n        });\n      }\n    }\n  }, {\n    key: \"_getLiteralFactory\",\n    value: function _getLiteralFactory(key, values, resultMap) {\n      var _this58 = this;\n\n      var literalFactory = this.literalFactories.get(key);\n      var literalFactoryArguments = values.filter(function (e) {\n        return !e.isConstant();\n      });\n\n      if (!literalFactory) {\n        var resultExpressions = values.map(function (e, index) {\n          return e.isConstant() ? _this58.getConstLiteral(e, true) : variable(\"a\".concat(index));\n        });\n        var parameters = resultExpressions.filter(isVariable).map(function (e) {\n          return new FnParam(e.name, DYNAMIC_TYPE);\n        });\n        var pureFunctionDeclaration = fn(parameters, [new ReturnStatement(resultMap(resultExpressions))], INFERRED_TYPE);\n        var name = this.freshName();\n        this.statements.push(variable(name).set(pureFunctionDeclaration).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n        literalFactory = variable(name);\n        this.literalFactories.set(key, literalFactory);\n      }\n\n      return {\n        literalFactory: literalFactory,\n        literalFactoryArguments: literalFactoryArguments\n      };\n    }\n    /**\n     * Produce a unique name.\n     *\n     * The name might be unique among different prefixes if any of the prefixes end in\n     * a digit so the prefix should be a constant string (not based on user input) and\n     * must not end in a digit.\n     */\n\n  }, {\n    key: \"uniqueName\",\n    value: function uniqueName(prefix) {\n      return \"\".concat(prefix).concat(this.nextNameIndex++);\n    }\n  }, {\n    key: \"definitionsOf\",\n    value: function definitionsOf(kind) {\n      switch (kind) {\n        case 2\n        /* Component */\n        :\n          return this.componentDefinitions;\n\n        case 1\n        /* Directive */\n        :\n          return this.directiveDefinitions;\n\n        case 0\n        /* Injector */\n        :\n          return this.injectorDefinitions;\n\n        case 3\n        /* Pipe */\n        :\n          return this.pipeDefinitions;\n      }\n    }\n  }, {\n    key: \"propertyNameOf\",\n    value: function propertyNameOf(kind) {\n      switch (kind) {\n        case 2\n        /* Component */\n        :\n          return 'ɵcmp';\n\n        case 1\n        /* Directive */\n        :\n          return 'ɵdir';\n\n        case 0\n        /* Injector */\n        :\n          return 'ɵinj';\n\n        case 3\n        /* Pipe */\n        :\n          return 'ɵpipe';\n      }\n    }\n  }, {\n    key: \"freshName\",\n    value: function freshName() {\n      return this.uniqueName(CONSTANT_PREFIX);\n    }\n  }, {\n    key: \"keyOf\",\n    value: function keyOf(expression) {\n      return expression.visitExpression(new KeyVisitor(), KEY_CONTEXT);\n    }\n  }]);\n\n  return ConstantPool;\n}();\n/**\n * Visitor used to determine if 2 expressions are equivalent and can be shared in the\n * `ConstantPool`.\n *\n * When the id (string) generated by the visitor is equal, expressions are considered equivalent.\n */\n\n\nvar KeyVisitor = /*#__PURE__*/function () {\n  function KeyVisitor() {\n    _classCallCheck(this, KeyVisitor);\n\n    this.visitWrappedNodeExpr = invalid;\n    this.visitWriteVarExpr = invalid;\n    this.visitWriteKeyExpr = invalid;\n    this.visitWritePropExpr = invalid;\n    this.visitInvokeMethodExpr = invalid;\n    this.visitInvokeFunctionExpr = invalid;\n    this.visitTaggedTemplateExpr = invalid;\n    this.visitInstantiateExpr = invalid;\n    this.visitConditionalExpr = invalid;\n    this.visitNotExpr = invalid;\n    this.visitAssertNotNullExpr = invalid;\n    this.visitCastExpr = invalid;\n    this.visitFunctionExpr = invalid;\n    this.visitUnaryOperatorExpr = invalid;\n    this.visitBinaryOperatorExpr = invalid;\n    this.visitReadPropExpr = invalid;\n    this.visitReadKeyExpr = invalid;\n    this.visitCommaExpr = invalid;\n    this.visitLocalizedString = invalid;\n  }\n\n  _createClass(KeyVisitor, [{\n    key: \"visitLiteralExpr\",\n    value: function visitLiteralExpr(ast) {\n      return \"\".concat(typeof ast.value === 'string' ? '\"' + ast.value + '\"' : ast.value);\n    }\n  }, {\n    key: \"visitLiteralArrayExpr\",\n    value: function visitLiteralArrayExpr(ast, context) {\n      var _this59 = this;\n\n      return \"[\".concat(ast.entries.map(function (entry) {\n        return entry.visitExpression(_this59, context);\n      }).join(','), \"]\");\n    }\n  }, {\n    key: \"visitLiteralMapExpr\",\n    value: function visitLiteralMapExpr(ast, context) {\n      var _this60 = this;\n\n      var mapKey = function mapKey(entry) {\n        var quote = entry.quoted ? '\"' : '';\n        return \"\".concat(quote).concat(entry.key).concat(quote);\n      };\n\n      var mapEntry = function mapEntry(entry) {\n        return \"\".concat(mapKey(entry), \":\").concat(entry.value.visitExpression(_this60, context));\n      };\n\n      return \"{\".concat(ast.entries.map(mapEntry).join(','));\n    }\n  }, {\n    key: \"visitExternalExpr\",\n    value: function visitExternalExpr(ast) {\n      return ast.value.moduleName ? \"EX:\".concat(ast.value.moduleName, \":\").concat(ast.value.name) : \"EX:\".concat(ast.value.runtime.name);\n    }\n  }, {\n    key: \"visitReadVarExpr\",\n    value: function visitReadVarExpr(node) {\n      return \"VAR:\".concat(node.name);\n    }\n  }, {\n    key: \"visitTypeofExpr\",\n    value: function visitTypeofExpr(node, context) {\n      return \"TYPEOF:\".concat(node.expr.visitExpression(this, context));\n    }\n  }]);\n\n  return KeyVisitor;\n}();\n\nfunction invalid(arg) {\n  throw new Error(\"Invalid state: Visitor \".concat(this.constructor.name, \" doesn't handle \").concat(arg.constructor.name));\n}\n\nfunction isVariable(e) {\n  return e instanceof ReadVarExpr;\n}\n\nfunction isLongStringLiteral(expr) {\n  return expr instanceof LiteralExpr && typeof expr.value === 'string' && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar CORE = '@angular/core';\n\nvar Identifiers = /*@__PURE__*/function () {\n  var Identifiers = /*#__PURE__*/_createClass(function Identifiers() {\n    _classCallCheck(this, Identifiers);\n  });\n  /* Methods */\n\n\n  Identifiers.NEW_METHOD = 'factory';\n  Identifiers.TRANSFORM_METHOD = 'transform';\n  Identifiers.PATCH_DEPS = 'patchedDeps';\n  Identifiers.core = {\n    name: null,\n    moduleName: CORE\n  };\n  /* Instructions */\n\n  Identifiers.namespaceHTML = {\n    name: 'ɵɵnamespaceHTML',\n    moduleName: CORE\n  };\n  Identifiers.namespaceMathML = {\n    name: 'ɵɵnamespaceMathML',\n    moduleName: CORE\n  };\n  Identifiers.namespaceSVG = {\n    name: 'ɵɵnamespaceSVG',\n    moduleName: CORE\n  };\n  Identifiers.element = {\n    name: 'ɵɵelement',\n    moduleName: CORE\n  };\n  Identifiers.elementStart = {\n    name: 'ɵɵelementStart',\n    moduleName: CORE\n  };\n  Identifiers.elementEnd = {\n    name: 'ɵɵelementEnd',\n    moduleName: CORE\n  };\n  Identifiers.advance = {\n    name: 'ɵɵadvance',\n    moduleName: CORE\n  };\n  Identifiers.syntheticHostProperty = {\n    name: 'ɵɵsyntheticHostProperty',\n    moduleName: CORE\n  };\n  Identifiers.syntheticHostListener = {\n    name: 'ɵɵsyntheticHostListener',\n    moduleName: CORE\n  };\n  Identifiers.attribute = {\n    name: 'ɵɵattribute',\n    moduleName: CORE\n  };\n  Identifiers.attributeInterpolate1 = {\n    name: 'ɵɵattributeInterpolate1',\n    moduleName: CORE\n  };\n  Identifiers.attributeInterpolate2 = {\n    name: 'ɵɵattributeInterpolate2',\n    moduleName: CORE\n  };\n  Identifiers.attributeInterpolate3 = {\n    name: 'ɵɵattributeInterpolate3',\n    moduleName: CORE\n  };\n  Identifiers.attributeInterpolate4 = {\n    name: 'ɵɵattributeInterpolate4',\n    moduleName: CORE\n  };\n  Identifiers.attributeInterpolate5 = {\n    name: 'ɵɵattributeInterpolate5',\n    moduleName: CORE\n  };\n  Identifiers.attributeInterpolate6 = {\n    name: 'ɵɵattributeInterpolate6',\n    moduleName: CORE\n  };\n  Identifiers.attributeInterpolate7 = {\n    name: 'ɵɵattributeInterpolate7',\n    moduleName: CORE\n  };\n  Identifiers.attributeInterpolate8 = {\n    name: 'ɵɵattributeInterpolate8',\n    moduleName: CORE\n  };\n  Identifiers.attributeInterpolateV = {\n    name: 'ɵɵattributeInterpolateV',\n    moduleName: CORE\n  };\n  Identifiers.classProp = {\n    name: 'ɵɵclassProp',\n    moduleName: CORE\n  };\n  Identifiers.elementContainerStart = {\n    name: 'ɵɵelementContainerStart',\n    moduleName: CORE\n  };\n  Identifiers.elementContainerEnd = {\n    name: 'ɵɵelementContainerEnd',\n    moduleName: CORE\n  };\n  Identifiers.elementContainer = {\n    name: 'ɵɵelementContainer',\n    moduleName: CORE\n  };\n  Identifiers.styleMap = {\n    name: 'ɵɵstyleMap',\n    moduleName: CORE\n  };\n  Identifiers.styleMapInterpolate1 = {\n    name: 'ɵɵstyleMapInterpolate1',\n    moduleName: CORE\n  };\n  Identifiers.styleMapInterpolate2 = {\n    name: 'ɵɵstyleMapInterpolate2',\n    moduleName: CORE\n  };\n  Identifiers.styleMapInterpolate3 = {\n    name: 'ɵɵstyleMapInterpolate3',\n    moduleName: CORE\n  };\n  Identifiers.styleMapInterpolate4 = {\n    name: 'ɵɵstyleMapInterpolate4',\n    moduleName: CORE\n  };\n  Identifiers.styleMapInterpolate5 = {\n    name: 'ɵɵstyleMapInterpolate5',\n    moduleName: CORE\n  };\n  Identifiers.styleMapInterpolate6 = {\n    name: 'ɵɵstyleMapInterpolate6',\n    moduleName: CORE\n  };\n  Identifiers.styleMapInterpolate7 = {\n    name: 'ɵɵstyleMapInterpolate7',\n    moduleName: CORE\n  };\n  Identifiers.styleMapInterpolate8 = {\n    name: 'ɵɵstyleMapInterpolate8',\n    moduleName: CORE\n  };\n  Identifiers.styleMapInterpolateV = {\n    name: 'ɵɵstyleMapInterpolateV',\n    moduleName: CORE\n  };\n  Identifiers.classMap = {\n    name: 'ɵɵclassMap',\n    moduleName: CORE\n  };\n  Identifiers.classMapInterpolate1 = {\n    name: 'ɵɵclassMapInterpolate1',\n    moduleName: CORE\n  };\n  Identifiers.classMapInterpolate2 = {\n    name: 'ɵɵclassMapInterpolate2',\n    moduleName: CORE\n  };\n  Identifiers.classMapInterpolate3 = {\n    name: 'ɵɵclassMapInterpolate3',\n    moduleName: CORE\n  };\n  Identifiers.classMapInterpolate4 = {\n    name: 'ɵɵclassMapInterpolate4',\n    moduleName: CORE\n  };\n  Identifiers.classMapInterpolate5 = {\n    name: 'ɵɵclassMapInterpolate5',\n    moduleName: CORE\n  };\n  Identifiers.classMapInterpolate6 = {\n    name: 'ɵɵclassMapInterpolate6',\n    moduleName: CORE\n  };\n  Identifiers.classMapInterpolate7 = {\n    name: 'ɵɵclassMapInterpolate7',\n    moduleName: CORE\n  };\n  Identifiers.classMapInterpolate8 = {\n    name: 'ɵɵclassMapInterpolate8',\n    moduleName: CORE\n  };\n  Identifiers.classMapInterpolateV = {\n    name: 'ɵɵclassMapInterpolateV',\n    moduleName: CORE\n  };\n  Identifiers.styleProp = {\n    name: 'ɵɵstyleProp',\n    moduleName: CORE\n  };\n  Identifiers.stylePropInterpolate1 = {\n    name: 'ɵɵstylePropInterpolate1',\n    moduleName: CORE\n  };\n  Identifiers.stylePropInterpolate2 = {\n    name: 'ɵɵstylePropInterpolate2',\n    moduleName: CORE\n  };\n  Identifiers.stylePropInterpolate3 = {\n    name: 'ɵɵstylePropInterpolate3',\n    moduleName: CORE\n  };\n  Identifiers.stylePropInterpolate4 = {\n    name: 'ɵɵstylePropInterpolate4',\n    moduleName: CORE\n  };\n  Identifiers.stylePropInterpolate5 = {\n    name: 'ɵɵstylePropInterpolate5',\n    moduleName: CORE\n  };\n  Identifiers.stylePropInterpolate6 = {\n    name: 'ɵɵstylePropInterpolate6',\n    moduleName: CORE\n  };\n  Identifiers.stylePropInterpolate7 = {\n    name: 'ɵɵstylePropInterpolate7',\n    moduleName: CORE\n  };\n  Identifiers.stylePropInterpolate8 = {\n    name: 'ɵɵstylePropInterpolate8',\n    moduleName: CORE\n  };\n  Identifiers.stylePropInterpolateV = {\n    name: 'ɵɵstylePropInterpolateV',\n    moduleName: CORE\n  };\n  Identifiers.nextContext = {\n    name: 'ɵɵnextContext',\n    moduleName: CORE\n  };\n  Identifiers.templateCreate = {\n    name: 'ɵɵtemplate',\n    moduleName: CORE\n  };\n  Identifiers.text = {\n    name: 'ɵɵtext',\n    moduleName: CORE\n  };\n  Identifiers.enableBindings = {\n    name: 'ɵɵenableBindings',\n    moduleName: CORE\n  };\n  Identifiers.disableBindings = {\n    name: 'ɵɵdisableBindings',\n    moduleName: CORE\n  };\n  Identifiers.getCurrentView = {\n    name: 'ɵɵgetCurrentView',\n    moduleName: CORE\n  };\n  Identifiers.textInterpolate = {\n    name: 'ɵɵtextInterpolate',\n    moduleName: CORE\n  };\n  Identifiers.textInterpolate1 = {\n    name: 'ɵɵtextInterpolate1',\n    moduleName: CORE\n  };\n  Identifiers.textInterpolate2 = {\n    name: 'ɵɵtextInterpolate2',\n    moduleName: CORE\n  };\n  Identifiers.textInterpolate3 = {\n    name: 'ɵɵtextInterpolate3',\n    moduleName: CORE\n  };\n  Identifiers.textInterpolate4 = {\n    name: 'ɵɵtextInterpolate4',\n    moduleName: CORE\n  };\n  Identifiers.textInterpolate5 = {\n    name: 'ɵɵtextInterpolate5',\n    moduleName: CORE\n  };\n  Identifiers.textInterpolate6 = {\n    name: 'ɵɵtextInterpolate6',\n    moduleName: CORE\n  };\n  Identifiers.textInterpolate7 = {\n    name: 'ɵɵtextInterpolate7',\n    moduleName: CORE\n  };\n  Identifiers.textInterpolate8 = {\n    name: 'ɵɵtextInterpolate8',\n    moduleName: CORE\n  };\n  Identifiers.textInterpolateV = {\n    name: 'ɵɵtextInterpolateV',\n    moduleName: CORE\n  };\n  Identifiers.restoreView = {\n    name: 'ɵɵrestoreView',\n    moduleName: CORE\n  };\n  Identifiers.pureFunction0 = {\n    name: 'ɵɵpureFunction0',\n    moduleName: CORE\n  };\n  Identifiers.pureFunction1 = {\n    name: 'ɵɵpureFunction1',\n    moduleName: CORE\n  };\n  Identifiers.pureFunction2 = {\n    name: 'ɵɵpureFunction2',\n    moduleName: CORE\n  };\n  Identifiers.pureFunction3 = {\n    name: 'ɵɵpureFunction3',\n    moduleName: CORE\n  };\n  Identifiers.pureFunction4 = {\n    name: 'ɵɵpureFunction4',\n    moduleName: CORE\n  };\n  Identifiers.pureFunction5 = {\n    name: 'ɵɵpureFunction5',\n    moduleName: CORE\n  };\n  Identifiers.pureFunction6 = {\n    name: 'ɵɵpureFunction6',\n    moduleName: CORE\n  };\n  Identifiers.pureFunction7 = {\n    name: 'ɵɵpureFunction7',\n    moduleName: CORE\n  };\n  Identifiers.pureFunction8 = {\n    name: 'ɵɵpureFunction8',\n    moduleName: CORE\n  };\n  Identifiers.pureFunctionV = {\n    name: 'ɵɵpureFunctionV',\n    moduleName: CORE\n  };\n  Identifiers.pipeBind1 = {\n    name: 'ɵɵpipeBind1',\n    moduleName: CORE\n  };\n  Identifiers.pipeBind2 = {\n    name: 'ɵɵpipeBind2',\n    moduleName: CORE\n  };\n  Identifiers.pipeBind3 = {\n    name: 'ɵɵpipeBind3',\n    moduleName: CORE\n  };\n  Identifiers.pipeBind4 = {\n    name: 'ɵɵpipeBind4',\n    moduleName: CORE\n  };\n  Identifiers.pipeBindV = {\n    name: 'ɵɵpipeBindV',\n    moduleName: CORE\n  };\n  Identifiers.hostProperty = {\n    name: 'ɵɵhostProperty',\n    moduleName: CORE\n  };\n  Identifiers.property = {\n    name: 'ɵɵproperty',\n    moduleName: CORE\n  };\n  Identifiers.propertyInterpolate = {\n    name: 'ɵɵpropertyInterpolate',\n    moduleName: CORE\n  };\n  Identifiers.propertyInterpolate1 = {\n    name: 'ɵɵpropertyInterpolate1',\n    moduleName: CORE\n  };\n  Identifiers.propertyInterpolate2 = {\n    name: 'ɵɵpropertyInterpolate2',\n    moduleName: CORE\n  };\n  Identifiers.propertyInterpolate3 = {\n    name: 'ɵɵpropertyInterpolate3',\n    moduleName: CORE\n  };\n  Identifiers.propertyInterpolate4 = {\n    name: 'ɵɵpropertyInterpolate4',\n    moduleName: CORE\n  };\n  Identifiers.propertyInterpolate5 = {\n    name: 'ɵɵpropertyInterpolate5',\n    moduleName: CORE\n  };\n  Identifiers.propertyInterpolate6 = {\n    name: 'ɵɵpropertyInterpolate6',\n    moduleName: CORE\n  };\n  Identifiers.propertyInterpolate7 = {\n    name: 'ɵɵpropertyInterpolate7',\n    moduleName: CORE\n  };\n  Identifiers.propertyInterpolate8 = {\n    name: 'ɵɵpropertyInterpolate8',\n    moduleName: CORE\n  };\n  Identifiers.propertyInterpolateV = {\n    name: 'ɵɵpropertyInterpolateV',\n    moduleName: CORE\n  };\n  Identifiers.i18n = {\n    name: 'ɵɵi18n',\n    moduleName: CORE\n  };\n  Identifiers.i18nAttributes = {\n    name: 'ɵɵi18nAttributes',\n    moduleName: CORE\n  };\n  Identifiers.i18nExp = {\n    name: 'ɵɵi18nExp',\n    moduleName: CORE\n  };\n  Identifiers.i18nStart = {\n    name: 'ɵɵi18nStart',\n    moduleName: CORE\n  };\n  Identifiers.i18nEnd = {\n    name: 'ɵɵi18nEnd',\n    moduleName: CORE\n  };\n  Identifiers.i18nApply = {\n    name: 'ɵɵi18nApply',\n    moduleName: CORE\n  };\n  Identifiers.i18nPostprocess = {\n    name: 'ɵɵi18nPostprocess',\n    moduleName: CORE\n  };\n  Identifiers.pipe = {\n    name: 'ɵɵpipe',\n    moduleName: CORE\n  };\n  Identifiers.projection = {\n    name: 'ɵɵprojection',\n    moduleName: CORE\n  };\n  Identifiers.projectionDef = {\n    name: 'ɵɵprojectionDef',\n    moduleName: CORE\n  };\n  Identifiers.reference = {\n    name: 'ɵɵreference',\n    moduleName: CORE\n  };\n  Identifiers.inject = {\n    name: 'ɵɵinject',\n    moduleName: CORE\n  };\n  Identifiers.injectAttribute = {\n    name: 'ɵɵinjectAttribute',\n    moduleName: CORE\n  };\n  Identifiers.directiveInject = {\n    name: 'ɵɵdirectiveInject',\n    moduleName: CORE\n  };\n  Identifiers.invalidFactory = {\n    name: 'ɵɵinvalidFactory',\n    moduleName: CORE\n  };\n  Identifiers.invalidFactoryDep = {\n    name: 'ɵɵinvalidFactoryDep',\n    moduleName: CORE\n  };\n  Identifiers.templateRefExtractor = {\n    name: 'ɵɵtemplateRefExtractor',\n    moduleName: CORE\n  };\n  Identifiers.forwardRef = {\n    name: 'forwardRef',\n    moduleName: CORE\n  };\n  Identifiers.resolveForwardRef = {\n    name: 'resolveForwardRef',\n    moduleName: CORE\n  };\n  Identifiers.ɵɵdefineInjectable = {\n    name: 'ɵɵdefineInjectable',\n    moduleName: CORE\n  };\n  Identifiers.declareInjectable = {\n    name: 'ɵɵngDeclareInjectable',\n    moduleName: CORE\n  };\n  Identifiers.InjectableDeclaration = {\n    name: 'ɵɵInjectableDeclaration',\n    moduleName: CORE\n  };\n  Identifiers.resolveWindow = {\n    name: 'ɵɵresolveWindow',\n    moduleName: CORE\n  };\n  Identifiers.resolveDocument = {\n    name: 'ɵɵresolveDocument',\n    moduleName: CORE\n  };\n  Identifiers.resolveBody = {\n    name: 'ɵɵresolveBody',\n    moduleName: CORE\n  };\n  Identifiers.defineComponent = {\n    name: 'ɵɵdefineComponent',\n    moduleName: CORE\n  };\n  Identifiers.declareComponent = {\n    name: 'ɵɵngDeclareComponent',\n    moduleName: CORE\n  };\n  Identifiers.setComponentScope = {\n    name: 'ɵɵsetComponentScope',\n    moduleName: CORE\n  };\n  Identifiers.ChangeDetectionStrategy = {\n    name: 'ChangeDetectionStrategy',\n    moduleName: CORE\n  };\n  Identifiers.ViewEncapsulation = {\n    name: 'ViewEncapsulation',\n    moduleName: CORE\n  };\n  Identifiers.ComponentDeclaration = {\n    name: 'ɵɵComponentDeclaration',\n    moduleName: CORE\n  };\n  Identifiers.FactoryDeclaration = {\n    name: 'ɵɵFactoryDeclaration',\n    moduleName: CORE\n  };\n  Identifiers.declareFactory = {\n    name: 'ɵɵngDeclareFactory',\n    moduleName: CORE\n  };\n  Identifiers.FactoryTarget = {\n    name: 'ɵɵFactoryTarget',\n    moduleName: CORE\n  };\n  Identifiers.defineDirective = {\n    name: 'ɵɵdefineDirective',\n    moduleName: CORE\n  };\n  Identifiers.declareDirective = {\n    name: 'ɵɵngDeclareDirective',\n    moduleName: CORE\n  };\n  Identifiers.DirectiveDeclaration = {\n    name: 'ɵɵDirectiveDeclaration',\n    moduleName: CORE\n  };\n  Identifiers.InjectorDef = {\n    name: 'ɵɵInjectorDef',\n    moduleName: CORE\n  };\n  Identifiers.InjectorDeclaration = {\n    name: 'ɵɵInjectorDeclaration',\n    moduleName: CORE\n  };\n  Identifiers.defineInjector = {\n    name: 'ɵɵdefineInjector',\n    moduleName: CORE\n  };\n  Identifiers.declareInjector = {\n    name: 'ɵɵngDeclareInjector',\n    moduleName: CORE\n  };\n  Identifiers.NgModuleDeclaration = {\n    name: 'ɵɵNgModuleDeclaration',\n    moduleName: CORE\n  };\n  Identifiers.ModuleWithProviders = {\n    name: 'ModuleWithProviders',\n    moduleName: CORE\n  };\n  Identifiers.defineNgModule = {\n    name: 'ɵɵdefineNgModule',\n    moduleName: CORE\n  };\n  Identifiers.declareNgModule = {\n    name: 'ɵɵngDeclareNgModule',\n    moduleName: CORE\n  };\n  Identifiers.setNgModuleScope = {\n    name: 'ɵɵsetNgModuleScope',\n    moduleName: CORE\n  };\n  Identifiers.PipeDeclaration = {\n    name: 'ɵɵPipeDeclaration',\n    moduleName: CORE\n  };\n  Identifiers.definePipe = {\n    name: 'ɵɵdefinePipe',\n    moduleName: CORE\n  };\n  Identifiers.declarePipe = {\n    name: 'ɵɵngDeclarePipe',\n    moduleName: CORE\n  };\n  Identifiers.declareClassMetadata = {\n    name: 'ɵɵngDeclareClassMetadata',\n    moduleName: CORE\n  };\n  Identifiers.setClassMetadata = {\n    name: 'ɵsetClassMetadata',\n    moduleName: CORE\n  };\n  Identifiers.queryRefresh = {\n    name: 'ɵɵqueryRefresh',\n    moduleName: CORE\n  };\n  Identifiers.viewQuery = {\n    name: 'ɵɵviewQuery',\n    moduleName: CORE\n  };\n  Identifiers.loadQuery = {\n    name: 'ɵɵloadQuery',\n    moduleName: CORE\n  };\n  Identifiers.contentQuery = {\n    name: 'ɵɵcontentQuery',\n    moduleName: CORE\n  };\n  Identifiers.NgOnChangesFeature = {\n    name: 'ɵɵNgOnChangesFeature',\n    moduleName: CORE\n  };\n  Identifiers.InheritDefinitionFeature = {\n    name: 'ɵɵInheritDefinitionFeature',\n    moduleName: CORE\n  };\n  Identifiers.CopyDefinitionFeature = {\n    name: 'ɵɵCopyDefinitionFeature',\n    moduleName: CORE\n  };\n  Identifiers.ProvidersFeature = {\n    name: 'ɵɵProvidersFeature',\n    moduleName: CORE\n  };\n  Identifiers.listener = {\n    name: 'ɵɵlistener',\n    moduleName: CORE\n  };\n  Identifiers.getInheritedFactory = {\n    name: 'ɵɵgetInheritedFactory',\n    moduleName: CORE\n  }; // sanitization-related functions\n\n  Identifiers.sanitizeHtml = {\n    name: 'ɵɵsanitizeHtml',\n    moduleName: CORE\n  };\n  Identifiers.sanitizeStyle = {\n    name: 'ɵɵsanitizeStyle',\n    moduleName: CORE\n  };\n  Identifiers.sanitizeResourceUrl = {\n    name: 'ɵɵsanitizeResourceUrl',\n    moduleName: CORE\n  };\n  Identifiers.sanitizeScript = {\n    name: 'ɵɵsanitizeScript',\n    moduleName: CORE\n  };\n  Identifiers.sanitizeUrl = {\n    name: 'ɵɵsanitizeUrl',\n    moduleName: CORE\n  };\n  Identifiers.sanitizeUrlOrResourceUrl = {\n    name: 'ɵɵsanitizeUrlOrResourceUrl',\n    moduleName: CORE\n  };\n  Identifiers.trustConstantHtml = {\n    name: 'ɵɵtrustConstantHtml',\n    moduleName: CORE\n  };\n  Identifiers.trustConstantResourceUrl = {\n    name: 'ɵɵtrustConstantResourceUrl',\n    moduleName: CORE\n  };\n  return Identifiers;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar DASH_CASE_REGEXP = /-+([a-z0-9])/g;\n\nfunction dashCaseToCamelCase(input) {\n  return input.replace(DASH_CASE_REGEXP, function () {\n    for (var _len = arguments.length, m = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {\n      m[_key2] = arguments[_key2];\n    }\n\n    return m[1].toUpperCase();\n  });\n}\n\nfunction splitAtColon(input, defaultValues) {\n  return _splitAt(input, ':', defaultValues);\n}\n\nfunction splitAtPeriod(input, defaultValues) {\n  return _splitAt(input, '.', defaultValues);\n}\n\nfunction _splitAt(input, character, defaultValues) {\n  var characterIndex = input.indexOf(character);\n  if (characterIndex == -1) return defaultValues;\n  return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];\n}\n\nfunction visitValue(value, visitor, context) {\n  if (Array.isArray(value)) {\n    return visitor.visitArray(value, context);\n  }\n\n  if (isStrictStringMap(value)) {\n    return visitor.visitStringMap(value, context);\n  }\n\n  if (value == null || typeof value == 'string' || typeof value == 'number' || typeof value == 'boolean') {\n    return visitor.visitPrimitive(value, context);\n  }\n\n  return visitor.visitOther(value, context);\n}\n\nfunction isDefined(val) {\n  return val !== null && val !== undefined;\n}\n\nfunction noUndefined(val) {\n  return val === undefined ? null : val;\n}\n\nvar ValueTransformer = /*#__PURE__*/function () {\n  function ValueTransformer() {\n    _classCallCheck(this, ValueTransformer);\n  }\n\n  _createClass(ValueTransformer, [{\n    key: \"visitArray\",\n    value: function visitArray(arr, context) {\n      var _this61 = this;\n\n      return arr.map(function (value) {\n        return visitValue(value, _this61, context);\n      });\n    }\n  }, {\n    key: \"visitStringMap\",\n    value: function visitStringMap(map, context) {\n      var _this62 = this;\n\n      var result = {};\n      Object.keys(map).forEach(function (key) {\n        result[key] = visitValue(map[key], _this62, context);\n      });\n      return result;\n    }\n  }, {\n    key: \"visitPrimitive\",\n    value: function visitPrimitive(value, context) {\n      return value;\n    }\n  }, {\n    key: \"visitOther\",\n    value: function visitOther(value, context) {\n      return value;\n    }\n  }]);\n\n  return ValueTransformer;\n}();\n\nvar SyncAsync = {\n  assertSync: function assertSync(value) {\n    if (isPromise(value)) {\n      throw new Error(\"Illegal state: value cannot be a promise\");\n    }\n\n    return value;\n  },\n  then: function then(value, cb) {\n    return isPromise(value) ? value.then(cb) : cb(value);\n  },\n  all: function all(syncAsyncValues) {\n    return syncAsyncValues.some(isPromise) ? Promise.all(syncAsyncValues) : syncAsyncValues;\n  }\n};\n\nfunction error(msg) {\n  throw new Error(\"Internal Error: \".concat(msg));\n} // Escape characters that have a special meaning in Regular Expressions\n\n\nfunction escapeRegExp(s) {\n  return s.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n}\n\nvar STRING_MAP_PROTO = /*@__PURE__*/Object.getPrototypeOf({});\n\nfunction isStrictStringMap(obj) {\n  return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;\n}\n\nfunction utf8Encode(str) {\n  var encoded = [];\n\n  for (var index = 0; index < str.length; index++) {\n    var codePoint = str.charCodeAt(index); // decode surrogate\n    // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\n    if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > index + 1) {\n      var low = str.charCodeAt(index + 1);\n\n      if (low >= 0xdc00 && low <= 0xdfff) {\n        index++;\n        codePoint = (codePoint - 0xd800 << 10) + low - 0xdc00 + 0x10000;\n      }\n    }\n\n    if (codePoint <= 0x7f) {\n      encoded.push(codePoint);\n    } else if (codePoint <= 0x7ff) {\n      encoded.push(codePoint >> 6 & 0x1F | 0xc0, codePoint & 0x3f | 0x80);\n    } else if (codePoint <= 0xffff) {\n      encoded.push(codePoint >> 12 | 0xe0, codePoint >> 6 & 0x3f | 0x80, codePoint & 0x3f | 0x80);\n    } else if (codePoint <= 0x1fffff) {\n      encoded.push(codePoint >> 18 & 0x07 | 0xf0, codePoint >> 12 & 0x3f | 0x80, codePoint >> 6 & 0x3f | 0x80, codePoint & 0x3f | 0x80);\n    }\n  }\n\n  return encoded;\n}\n\nfunction stringify(token) {\n  if (typeof token === 'string') {\n    return token;\n  }\n\n  if (Array.isArray(token)) {\n    return '[' + token.map(stringify).join(', ') + ']';\n  }\n\n  if (token == null) {\n    return '' + token;\n  }\n\n  if (token.overriddenName) {\n    return \"\".concat(token.overriddenName);\n  }\n\n  if (token.name) {\n    return \"\".concat(token.name);\n  }\n\n  if (!token.toString) {\n    return 'object';\n  } // WARNING: do not try to `JSON.stringify(token)` here\n  // see https://github.com/angular/angular/issues/23440\n\n\n  var res = token.toString();\n\n  if (res == null) {\n    return '' + res;\n  }\n\n  var newLineIndex = res.indexOf('\\n');\n  return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n/**\n * Lazily retrieves the reference value from a forwardRef.\n */\n\n\nfunction resolveForwardRef(type) {\n  if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__')) {\n    return type();\n  } else {\n    return type;\n  }\n}\n/**\n * Determine if the argument is shaped like a Promise\n */\n\n\nfunction isPromise(obj) {\n  // allow any Promise/A+ compliant thenable.\n  // It's up to the caller to ensure that obj.then conforms to the spec\n  return !!obj && typeof obj.then === 'function';\n}\n\nvar Version = /*#__PURE__*/_createClass(function Version(full) {\n  _classCallCheck(this, Version);\n\n  this.full = full;\n  var splits = full.split('.');\n  this.major = splits[0];\n  this.minor = splits[1];\n  this.patch = splits.slice(2).join('.');\n});\n\nvar __window = typeof window !== 'undefined' && window;\n\nvar __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && self;\n\nvar __global = typeof global !== 'undefined' && global; // Check __global first, because in Node tests both __global and __window may be defined and _global\n// should be __global in that case.\n\n\nvar _global = __global || __window || __self;\n\nfunction newArray(size, value) {\n  var list = [];\n\n  for (var i = 0; i < size; i++) {\n    list.push(value);\n  }\n\n  return list;\n}\n/**\n * Partitions a given array into 2 arrays, based on a boolean value returned by the condition\n * function.\n *\n * @param arr Input array that should be partitioned\n * @param conditionFn Condition function that is called for each item in a given array and returns a\n * boolean value.\n */\n\n\nfunction partitionArray(arr, conditionFn) {\n  var truthy = [];\n  var falsy = [];\n\n  var _iterator2 = _createForOfIteratorHelper(arr),\n      _step2;\n\n  try {\n    for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n      var item = _step2.value;\n      (conditionFn(item) ? truthy : falsy).push(item);\n    }\n  } catch (err) {\n    _iterator2.e(err);\n  } finally {\n    _iterator2.f();\n  }\n\n  return [truthy, falsy];\n}\n/**\n * @license\n * Copyright Google LLC 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// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\n\n\nvar VERSION = 3;\nvar JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';\n\nvar SourceMapGenerator = /*#__PURE__*/function () {\n  function SourceMapGenerator() {\n    var file = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n    _classCallCheck(this, SourceMapGenerator);\n\n    this.file = file;\n    this.sourcesContent = new Map();\n    this.lines = [];\n    this.lastCol0 = 0;\n    this.hasMappings = false;\n  } // The content is `null` when the content is expected to be loaded using the URL\n\n\n  _createClass(SourceMapGenerator, [{\n    key: \"addSource\",\n    value: function addSource(url) {\n      var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      if (!this.sourcesContent.has(url)) {\n        this.sourcesContent.set(url, content);\n      }\n\n      return this;\n    }\n  }, {\n    key: \"addLine\",\n    value: function addLine() {\n      this.lines.push([]);\n      this.lastCol0 = 0;\n      return this;\n    }\n  }, {\n    key: \"addMapping\",\n    value: function addMapping(col0, sourceUrl, sourceLine0, sourceCol0) {\n      if (!this.currentLine) {\n        throw new Error(\"A line must be added before mappings can be added\");\n      }\n\n      if (sourceUrl != null && !this.sourcesContent.has(sourceUrl)) {\n        throw new Error(\"Unknown source file \\\"\".concat(sourceUrl, \"\\\"\"));\n      }\n\n      if (col0 == null) {\n        throw new Error(\"The column in the generated code must be provided\");\n      }\n\n      if (col0 < this.lastCol0) {\n        throw new Error(\"Mapping should be added in output order\");\n      }\n\n      if (sourceUrl && (sourceLine0 == null || sourceCol0 == null)) {\n        throw new Error(\"The source location must be provided when a source url is provided\");\n      }\n\n      this.hasMappings = true;\n      this.lastCol0 = col0;\n      this.currentLine.push({\n        col0: col0,\n        sourceUrl: sourceUrl,\n        sourceLine0: sourceLine0,\n        sourceCol0: sourceCol0\n      });\n      return this;\n    }\n    /**\n     * @internal strip this from published d.ts files due to\n     * https://github.com/microsoft/TypeScript/issues/36216\n     */\n\n  }, {\n    key: \"currentLine\",\n    get: function get() {\n      return this.lines.slice(-1)[0];\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON() {\n      var _this63 = this;\n\n      if (!this.hasMappings) {\n        return null;\n      }\n\n      var sourcesIndex = new Map();\n      var sources = [];\n      var sourcesContent = [];\n      Array.from(this.sourcesContent.keys()).forEach(function (url, i) {\n        sourcesIndex.set(url, i);\n        sources.push(url);\n        sourcesContent.push(_this63.sourcesContent.get(url) || null);\n      });\n      var mappings = '';\n      var lastCol0 = 0;\n      var lastSourceIndex = 0;\n      var lastSourceLine0 = 0;\n      var lastSourceCol0 = 0;\n      this.lines.forEach(function (segments) {\n        lastCol0 = 0;\n        mappings += segments.map(function (segment) {\n          // zero-based starting column of the line in the generated code\n          var segAsStr = toBase64VLQ(segment.col0 - lastCol0);\n          lastCol0 = segment.col0;\n\n          if (segment.sourceUrl != null) {\n            // zero-based index into the “sources” list\n            segAsStr += toBase64VLQ(sourcesIndex.get(segment.sourceUrl) - lastSourceIndex);\n            lastSourceIndex = sourcesIndex.get(segment.sourceUrl); // the zero-based starting line in the original source\n\n            segAsStr += toBase64VLQ(segment.sourceLine0 - lastSourceLine0);\n            lastSourceLine0 = segment.sourceLine0; // the zero-based starting column in the original source\n\n            segAsStr += toBase64VLQ(segment.sourceCol0 - lastSourceCol0);\n            lastSourceCol0 = segment.sourceCol0;\n          }\n\n          return segAsStr;\n        }).join(',');\n        mappings += ';';\n      });\n      mappings = mappings.slice(0, -1);\n      return {\n        'file': this.file || '',\n        'version': VERSION,\n        'sourceRoot': '',\n        'sources': sources,\n        'sourcesContent': sourcesContent,\n        'mappings': mappings\n      };\n    }\n  }, {\n    key: \"toJsComment\",\n    value: function toJsComment() {\n      return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 0)) : '';\n    }\n  }]);\n\n  return SourceMapGenerator;\n}();\n\nfunction toBase64String(value) {\n  var b64 = '';\n  var encoded = utf8Encode(value);\n\n  for (var i = 0; i < encoded.length;) {\n    var i1 = encoded[i++];\n    var i2 = i < encoded.length ? encoded[i++] : null;\n    var i3 = i < encoded.length ? encoded[i++] : null;\n    b64 += toBase64Digit(i1 >> 2);\n    b64 += toBase64Digit((i1 & 3) << 4 | (i2 === null ? 0 : i2 >> 4));\n    b64 += i2 === null ? '=' : toBase64Digit((i2 & 15) << 2 | (i3 === null ? 0 : i3 >> 6));\n    b64 += i2 === null || i3 === null ? '=' : toBase64Digit(i3 & 63);\n  }\n\n  return b64;\n}\n\nfunction toBase64VLQ(value) {\n  value = value < 0 ? (-value << 1) + 1 : value << 1;\n  var out = '';\n\n  do {\n    var digit = value & 31;\n    value = value >> 5;\n\n    if (value > 0) {\n      digit = digit | 32;\n    }\n\n    out += toBase64Digit(digit);\n  } while (value > 0);\n\n  return out;\n}\n\nvar B64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nfunction toBase64Digit(value) {\n  if (value < 0 || value >= 64) {\n    throw new Error(\"Can only encode value in the range [0, 63]\");\n  }\n\n  return B64_DIGITS[value];\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\\\|\\n|\\r|\\$/g;\nvar _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;\nvar _INDENT_WITH = '  ';\nvar CATCH_ERROR_VAR$1 = /*@__PURE__*/variable('error', null, null);\nvar CATCH_STACK_VAR$1 = /*@__PURE__*/variable('stack', null, null);\n\nvar _EmittedLine = /*#__PURE__*/_createClass(function _EmittedLine(indent) {\n  _classCallCheck(this, _EmittedLine);\n\n  this.indent = indent;\n  this.partsLength = 0;\n  this.parts = [];\n  this.srcSpans = [];\n});\n\nvar EmitterVisitorContext = /*#__PURE__*/function () {\n  function EmitterVisitorContext(_indent) {\n    _classCallCheck(this, EmitterVisitorContext);\n\n    this._indent = _indent;\n    this._classes = [];\n    this._preambleLineCount = 0;\n    this._lines = [new _EmittedLine(_indent)];\n  }\n\n  _createClass(EmitterVisitorContext, [{\n    key: \"_currentLine\",\n    get:\n    /**\n     * @internal strip this from published d.ts files due to\n     * https://github.com/microsoft/TypeScript/issues/36216\n     */\n    function get() {\n      return this._lines[this._lines.length - 1];\n    }\n  }, {\n    key: \"println\",\n    value: function println(from) {\n      var lastPart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n      this.print(from || null, lastPart, true);\n    }\n  }, {\n    key: \"lineIsEmpty\",\n    value: function lineIsEmpty() {\n      return this._currentLine.parts.length === 0;\n    }\n  }, {\n    key: \"lineLength\",\n    value: function lineLength() {\n      return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength;\n    }\n  }, {\n    key: \"print\",\n    value: function print(from, part) {\n      var newLine = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n      if (part.length > 0) {\n        this._currentLine.parts.push(part);\n\n        this._currentLine.partsLength += part.length;\n\n        this._currentLine.srcSpans.push(from && from.sourceSpan || null);\n      }\n\n      if (newLine) {\n        this._lines.push(new _EmittedLine(this._indent));\n      }\n    }\n  }, {\n    key: \"removeEmptyLastLine\",\n    value: function removeEmptyLastLine() {\n      if (this.lineIsEmpty()) {\n        this._lines.pop();\n      }\n    }\n  }, {\n    key: \"incIndent\",\n    value: function incIndent() {\n      this._indent++;\n\n      if (this.lineIsEmpty()) {\n        this._currentLine.indent = this._indent;\n      }\n    }\n  }, {\n    key: \"decIndent\",\n    value: function decIndent() {\n      this._indent--;\n\n      if (this.lineIsEmpty()) {\n        this._currentLine.indent = this._indent;\n      }\n    }\n  }, {\n    key: \"pushClass\",\n    value: function pushClass(clazz) {\n      this._classes.push(clazz);\n    }\n  }, {\n    key: \"popClass\",\n    value: function popClass() {\n      return this._classes.pop();\n    }\n  }, {\n    key: \"currentClass\",\n    get: function get() {\n      return this._classes.length > 0 ? this._classes[this._classes.length - 1] : null;\n    }\n  }, {\n    key: \"toSource\",\n    value: function toSource() {\n      return this.sourceLines.map(function (l) {\n        return l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : '';\n      }).join('\\n');\n    }\n  }, {\n    key: \"toSourceMapGenerator\",\n    value: function toSourceMapGenerator(genFilePath) {\n      var startsAtLine = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n      var map = new SourceMapGenerator(genFilePath);\n      var firstOffsetMapped = false;\n\n      var mapFirstOffsetIfNeeded = function mapFirstOffsetIfNeeded() {\n        if (!firstOffsetMapped) {\n          // Add a single space so that tools won't try to load the file from disk.\n          // Note: We are using virtual urls like `ng:///`, so we have to\n          // provide a content here.\n          map.addSource(genFilePath, ' ').addMapping(0, genFilePath, 0, 0);\n          firstOffsetMapped = true;\n        }\n      };\n\n      for (var i = 0; i < startsAtLine; i++) {\n        map.addLine();\n        mapFirstOffsetIfNeeded();\n      }\n\n      this.sourceLines.forEach(function (line, lineIdx) {\n        map.addLine();\n        var spans = line.srcSpans;\n        var parts = line.parts;\n        var col0 = line.indent * _INDENT_WITH.length;\n        var spanIdx = 0; // skip leading parts without source spans\n\n        while (spanIdx < spans.length && !spans[spanIdx]) {\n          col0 += parts[spanIdx].length;\n          spanIdx++;\n        }\n\n        if (spanIdx < spans.length && lineIdx === 0 && col0 === 0) {\n          firstOffsetMapped = true;\n        } else {\n          mapFirstOffsetIfNeeded();\n        }\n\n        while (spanIdx < spans.length) {\n          var span = spans[spanIdx];\n          var source = span.start.file;\n          var sourceLine = span.start.line;\n          var sourceCol = span.start.col;\n          map.addSource(source.url, source.content).addMapping(col0, source.url, sourceLine, sourceCol);\n          col0 += parts[spanIdx].length;\n          spanIdx++; // assign parts without span or the same span to the previous segment\n\n          while (spanIdx < spans.length && (span === spans[spanIdx] || !spans[spanIdx])) {\n            col0 += parts[spanIdx].length;\n            spanIdx++;\n          }\n        }\n      });\n      return map;\n    }\n  }, {\n    key: \"setPreambleLineCount\",\n    value: function setPreambleLineCount(count) {\n      return this._preambleLineCount = count;\n    }\n  }, {\n    key: \"spanOf\",\n    value: function spanOf(line, column) {\n      var emittedLine = this._lines[line - this._preambleLineCount];\n\n      if (emittedLine) {\n        var columnsLeft = column - _createIndent(emittedLine.indent).length;\n\n        for (var partIndex = 0; partIndex < emittedLine.parts.length; partIndex++) {\n          var part = emittedLine.parts[partIndex];\n\n          if (part.length > columnsLeft) {\n            return emittedLine.srcSpans[partIndex];\n          }\n\n          columnsLeft -= part.length;\n        }\n      }\n\n      return null;\n    }\n    /**\n     * @internal strip this from published d.ts files due to\n     * https://github.com/microsoft/TypeScript/issues/36216\n     */\n\n  }, {\n    key: \"sourceLines\",\n    get: function get() {\n      if (this._lines.length && this._lines[this._lines.length - 1].parts.length === 0) {\n        return this._lines.slice(0, -1);\n      }\n\n      return this._lines;\n    }\n  }], [{\n    key: \"createRoot\",\n    value: function createRoot() {\n      return new EmitterVisitorContext(0);\n    }\n  }]);\n\n  return EmitterVisitorContext;\n}();\n\nvar AbstractEmitterVisitor = /*#__PURE__*/function () {\n  function AbstractEmitterVisitor(_escapeDollarInStrings) {\n    _classCallCheck(this, AbstractEmitterVisitor);\n\n    this._escapeDollarInStrings = _escapeDollarInStrings;\n  }\n\n  _createClass(AbstractEmitterVisitor, [{\n    key: \"printLeadingComments\",\n    value: function printLeadingComments(stmt, ctx) {\n      if (stmt.leadingComments === undefined) {\n        return;\n      }\n\n      var _iterator3 = _createForOfIteratorHelper(stmt.leadingComments),\n          _step3;\n\n      try {\n        for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n          var comment = _step3.value;\n\n          if (comment instanceof JSDocComment) {\n            ctx.print(stmt, \"/*\".concat(comment.toString(), \"*/\"), comment.trailingNewline);\n          } else {\n            if (comment.multiline) {\n              ctx.print(stmt, \"/* \".concat(comment.text, \" */\"), comment.trailingNewline);\n            } else {\n              comment.text.split('\\n').forEach(function (line) {\n                ctx.println(stmt, \"// \".concat(line));\n              });\n            }\n          }\n        }\n      } catch (err) {\n        _iterator3.e(err);\n      } finally {\n        _iterator3.f();\n      }\n    }\n  }, {\n    key: \"visitExpressionStmt\",\n    value: function visitExpressionStmt(stmt, ctx) {\n      this.printLeadingComments(stmt, ctx);\n      stmt.expr.visitExpression(this, ctx);\n      ctx.println(stmt, ';');\n      return null;\n    }\n  }, {\n    key: \"visitReturnStmt\",\n    value: function visitReturnStmt(stmt, ctx) {\n      this.printLeadingComments(stmt, ctx);\n      ctx.print(stmt, \"return \");\n      stmt.value.visitExpression(this, ctx);\n      ctx.println(stmt, ';');\n      return null;\n    }\n  }, {\n    key: \"visitIfStmt\",\n    value: function visitIfStmt(stmt, ctx) {\n      this.printLeadingComments(stmt, ctx);\n      ctx.print(stmt, \"if (\");\n      stmt.condition.visitExpression(this, ctx);\n      ctx.print(stmt, \") {\");\n      var hasElseCase = stmt.falseCase != null && stmt.falseCase.length > 0;\n\n      if (stmt.trueCase.length <= 1 && !hasElseCase) {\n        ctx.print(stmt, \" \");\n        this.visitAllStatements(stmt.trueCase, ctx);\n        ctx.removeEmptyLastLine();\n        ctx.print(stmt, \" \");\n      } else {\n        ctx.println();\n        ctx.incIndent();\n        this.visitAllStatements(stmt.trueCase, ctx);\n        ctx.decIndent();\n\n        if (hasElseCase) {\n          ctx.println(stmt, \"} else {\");\n          ctx.incIndent();\n          this.visitAllStatements(stmt.falseCase, ctx);\n          ctx.decIndent();\n        }\n      }\n\n      ctx.println(stmt, \"}\");\n      return null;\n    }\n  }, {\n    key: \"visitThrowStmt\",\n    value: function visitThrowStmt(stmt, ctx) {\n      this.printLeadingComments(stmt, ctx);\n      ctx.print(stmt, \"throw \");\n      stmt.error.visitExpression(this, ctx);\n      ctx.println(stmt, \";\");\n      return null;\n    }\n  }, {\n    key: \"visitWriteVarExpr\",\n    value: function visitWriteVarExpr(expr, ctx) {\n      var lineWasEmpty = ctx.lineIsEmpty();\n\n      if (!lineWasEmpty) {\n        ctx.print(expr, '(');\n      }\n\n      ctx.print(expr, \"\".concat(expr.name, \" = \"));\n      expr.value.visitExpression(this, ctx);\n\n      if (!lineWasEmpty) {\n        ctx.print(expr, ')');\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitWriteKeyExpr\",\n    value: function visitWriteKeyExpr(expr, ctx) {\n      var lineWasEmpty = ctx.lineIsEmpty();\n\n      if (!lineWasEmpty) {\n        ctx.print(expr, '(');\n      }\n\n      expr.receiver.visitExpression(this, ctx);\n      ctx.print(expr, \"[\");\n      expr.index.visitExpression(this, ctx);\n      ctx.print(expr, \"] = \");\n      expr.value.visitExpression(this, ctx);\n\n      if (!lineWasEmpty) {\n        ctx.print(expr, ')');\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitWritePropExpr\",\n    value: function visitWritePropExpr(expr, ctx) {\n      var lineWasEmpty = ctx.lineIsEmpty();\n\n      if (!lineWasEmpty) {\n        ctx.print(expr, '(');\n      }\n\n      expr.receiver.visitExpression(this, ctx);\n      ctx.print(expr, \".\".concat(expr.name, \" = \"));\n      expr.value.visitExpression(this, ctx);\n\n      if (!lineWasEmpty) {\n        ctx.print(expr, ')');\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitInvokeMethodExpr\",\n    value: function visitInvokeMethodExpr(expr, ctx) {\n      expr.receiver.visitExpression(this, ctx);\n      var name = expr.name;\n\n      if (expr.builtin != null) {\n        name = this.getBuiltinMethodName(expr.builtin);\n\n        if (name == null) {\n          // some builtins just mean to skip the call.\n          return null;\n        }\n      }\n\n      ctx.print(expr, \".\".concat(name, \"(\"));\n      this.visitAllExpressions(expr.args, ctx, \",\");\n      ctx.print(expr, \")\");\n      return null;\n    }\n  }, {\n    key: \"visitInvokeFunctionExpr\",\n    value: function visitInvokeFunctionExpr(expr, ctx) {\n      expr.fn.visitExpression(this, ctx);\n      ctx.print(expr, \"(\");\n      this.visitAllExpressions(expr.args, ctx, ',');\n      ctx.print(expr, \")\");\n      return null;\n    }\n  }, {\n    key: \"visitTaggedTemplateExpr\",\n    value: function visitTaggedTemplateExpr(expr, ctx) {\n      expr.tag.visitExpression(this, ctx);\n      ctx.print(expr, '`' + expr.template.elements[0].rawText);\n\n      for (var i = 1; i < expr.template.elements.length; i++) {\n        ctx.print(expr, '${');\n        expr.template.expressions[i - 1].visitExpression(this, ctx);\n        ctx.print(expr, \"}\".concat(expr.template.elements[i].rawText));\n      }\n\n      ctx.print(expr, '`');\n      return null;\n    }\n  }, {\n    key: \"visitWrappedNodeExpr\",\n    value: function visitWrappedNodeExpr(ast, ctx) {\n      throw new Error('Abstract emitter cannot visit WrappedNodeExpr.');\n    }\n  }, {\n    key: \"visitTypeofExpr\",\n    value: function visitTypeofExpr(expr, ctx) {\n      ctx.print(expr, 'typeof ');\n      expr.expr.visitExpression(this, ctx);\n    }\n  }, {\n    key: \"visitReadVarExpr\",\n    value: function visitReadVarExpr(ast, ctx) {\n      var varName = ast.name;\n\n      if (ast.builtin != null) {\n        switch (ast.builtin) {\n          case BuiltinVar.Super:\n            varName = 'super';\n            break;\n\n          case BuiltinVar.This:\n            varName = 'this';\n            break;\n\n          case BuiltinVar.CatchError:\n            varName = CATCH_ERROR_VAR$1.name;\n            break;\n\n          case BuiltinVar.CatchStack:\n            varName = CATCH_STACK_VAR$1.name;\n            break;\n\n          default:\n            throw new Error(\"Unknown builtin variable \".concat(ast.builtin));\n        }\n      }\n\n      ctx.print(ast, varName);\n      return null;\n    }\n  }, {\n    key: \"visitInstantiateExpr\",\n    value: function visitInstantiateExpr(ast, ctx) {\n      ctx.print(ast, \"new \");\n      ast.classExpr.visitExpression(this, ctx);\n      ctx.print(ast, \"(\");\n      this.visitAllExpressions(ast.args, ctx, ',');\n      ctx.print(ast, \")\");\n      return null;\n    }\n  }, {\n    key: \"visitLiteralExpr\",\n    value: function visitLiteralExpr(ast, ctx) {\n      var value = ast.value;\n\n      if (typeof value === 'string') {\n        ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings));\n      } else {\n        ctx.print(ast, \"\".concat(value));\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitLocalizedString\",\n    value: function visitLocalizedString(ast, ctx) {\n      var head = ast.serializeI18nHead();\n      ctx.print(ast, '$localize `' + head.raw);\n\n      for (var i = 1; i < ast.messageParts.length; i++) {\n        ctx.print(ast, '${');\n        ast.expressions[i - 1].visitExpression(this, ctx);\n        ctx.print(ast, \"}\".concat(ast.serializeI18nTemplatePart(i).raw));\n      }\n\n      ctx.print(ast, '`');\n      return null;\n    }\n  }, {\n    key: \"visitConditionalExpr\",\n    value: function visitConditionalExpr(ast, ctx) {\n      ctx.print(ast, \"(\");\n      ast.condition.visitExpression(this, ctx);\n      ctx.print(ast, '? ');\n      ast.trueCase.visitExpression(this, ctx);\n      ctx.print(ast, ': ');\n      ast.falseCase.visitExpression(this, ctx);\n      ctx.print(ast, \")\");\n      return null;\n    }\n  }, {\n    key: \"visitNotExpr\",\n    value: function visitNotExpr(ast, ctx) {\n      ctx.print(ast, '!');\n      ast.condition.visitExpression(this, ctx);\n      return null;\n    }\n  }, {\n    key: \"visitAssertNotNullExpr\",\n    value: function visitAssertNotNullExpr(ast, ctx) {\n      ast.condition.visitExpression(this, ctx);\n      return null;\n    }\n  }, {\n    key: \"visitUnaryOperatorExpr\",\n    value: function visitUnaryOperatorExpr(ast, ctx) {\n      var opStr;\n\n      switch (ast.operator) {\n        case UnaryOperator.Plus:\n          opStr = '+';\n          break;\n\n        case UnaryOperator.Minus:\n          opStr = '-';\n          break;\n\n        default:\n          throw new Error(\"Unknown operator \".concat(ast.operator));\n      }\n\n      if (ast.parens) ctx.print(ast, \"(\");\n      ctx.print(ast, opStr);\n      ast.expr.visitExpression(this, ctx);\n      if (ast.parens) ctx.print(ast, \")\");\n      return null;\n    }\n  }, {\n    key: \"visitBinaryOperatorExpr\",\n    value: function visitBinaryOperatorExpr(ast, ctx) {\n      var opStr;\n\n      switch (ast.operator) {\n        case BinaryOperator.Equals:\n          opStr = '==';\n          break;\n\n        case BinaryOperator.Identical:\n          opStr = '===';\n          break;\n\n        case BinaryOperator.NotEquals:\n          opStr = '!=';\n          break;\n\n        case BinaryOperator.NotIdentical:\n          opStr = '!==';\n          break;\n\n        case BinaryOperator.And:\n          opStr = '&&';\n          break;\n\n        case BinaryOperator.BitwiseAnd:\n          opStr = '&';\n          break;\n\n        case BinaryOperator.Or:\n          opStr = '||';\n          break;\n\n        case BinaryOperator.Plus:\n          opStr = '+';\n          break;\n\n        case BinaryOperator.Minus:\n          opStr = '-';\n          break;\n\n        case BinaryOperator.Divide:\n          opStr = '/';\n          break;\n\n        case BinaryOperator.Multiply:\n          opStr = '*';\n          break;\n\n        case BinaryOperator.Modulo:\n          opStr = '%';\n          break;\n\n        case BinaryOperator.Lower:\n          opStr = '<';\n          break;\n\n        case BinaryOperator.LowerEquals:\n          opStr = '<=';\n          break;\n\n        case BinaryOperator.Bigger:\n          opStr = '>';\n          break;\n\n        case BinaryOperator.BiggerEquals:\n          opStr = '>=';\n          break;\n\n        case BinaryOperator.NullishCoalesce:\n          opStr = '??';\n          break;\n\n        default:\n          throw new Error(\"Unknown operator \".concat(ast.operator));\n      }\n\n      if (ast.parens) ctx.print(ast, \"(\");\n      ast.lhs.visitExpression(this, ctx);\n      ctx.print(ast, \" \".concat(opStr, \" \"));\n      ast.rhs.visitExpression(this, ctx);\n      if (ast.parens) ctx.print(ast, \")\");\n      return null;\n    }\n  }, {\n    key: \"visitReadPropExpr\",\n    value: function visitReadPropExpr(ast, ctx) {\n      ast.receiver.visitExpression(this, ctx);\n      ctx.print(ast, \".\");\n      ctx.print(ast, ast.name);\n      return null;\n    }\n  }, {\n    key: \"visitReadKeyExpr\",\n    value: function visitReadKeyExpr(ast, ctx) {\n      ast.receiver.visitExpression(this, ctx);\n      ctx.print(ast, \"[\");\n      ast.index.visitExpression(this, ctx);\n      ctx.print(ast, \"]\");\n      return null;\n    }\n  }, {\n    key: \"visitLiteralArrayExpr\",\n    value: function visitLiteralArrayExpr(ast, ctx) {\n      ctx.print(ast, \"[\");\n      this.visitAllExpressions(ast.entries, ctx, ',');\n      ctx.print(ast, \"]\");\n      return null;\n    }\n  }, {\n    key: \"visitLiteralMapExpr\",\n    value: function visitLiteralMapExpr(ast, ctx) {\n      var _this64 = this;\n\n      ctx.print(ast, \"{\");\n      this.visitAllObjects(function (entry) {\n        ctx.print(ast, \"\".concat(escapeIdentifier(entry.key, _this64._escapeDollarInStrings, entry.quoted), \":\"));\n        entry.value.visitExpression(_this64, ctx);\n      }, ast.entries, ctx, ',');\n      ctx.print(ast, \"}\");\n      return null;\n    }\n  }, {\n    key: \"visitCommaExpr\",\n    value: function visitCommaExpr(ast, ctx) {\n      ctx.print(ast, '(');\n      this.visitAllExpressions(ast.parts, ctx, ',');\n      ctx.print(ast, ')');\n      return null;\n    }\n  }, {\n    key: \"visitAllExpressions\",\n    value: function visitAllExpressions(expressions, ctx, separator) {\n      var _this65 = this;\n\n      this.visitAllObjects(function (expr) {\n        return expr.visitExpression(_this65, ctx);\n      }, expressions, ctx, separator);\n    }\n  }, {\n    key: \"visitAllObjects\",\n    value: function visitAllObjects(handler, expressions, ctx, separator) {\n      var incrementedIndent = false;\n\n      for (var i = 0; i < expressions.length; i++) {\n        if (i > 0) {\n          if (ctx.lineLength() > 80) {\n            ctx.print(null, separator, true);\n\n            if (!incrementedIndent) {\n              // continuation are marked with double indent.\n              ctx.incIndent();\n              ctx.incIndent();\n              incrementedIndent = true;\n            }\n          } else {\n            ctx.print(null, separator, false);\n          }\n        }\n\n        handler(expressions[i]);\n      }\n\n      if (incrementedIndent) {\n        // continuation are marked with double indent.\n        ctx.decIndent();\n        ctx.decIndent();\n      }\n    }\n  }, {\n    key: \"visitAllStatements\",\n    value: function visitAllStatements(statements, ctx) {\n      var _this66 = this;\n\n      statements.forEach(function (stmt) {\n        return stmt.visitStatement(_this66, ctx);\n      });\n    }\n  }]);\n\n  return AbstractEmitterVisitor;\n}();\n\nfunction escapeIdentifier(input, escapeDollar) {\n  var alwaysQuote = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n  if (input == null) {\n    return null;\n  }\n\n  var body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, function () {\n    if ((arguments.length <= 0 ? undefined : arguments[0]) == '$') {\n      return escapeDollar ? '\\\\$' : '$';\n    } else if ((arguments.length <= 0 ? undefined : arguments[0]) == '\\n') {\n      return '\\\\n';\n    } else if ((arguments.length <= 0 ? undefined : arguments[0]) == '\\r') {\n      return '\\\\r';\n    } else {\n      return \"\\\\\".concat(arguments.length <= 0 ? undefined : arguments[0]);\n    }\n  });\n  var requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);\n  return requiresQuotes ? \"'\".concat(body, \"'\") : body;\n}\n\nfunction _createIndent(count) {\n  var res = '';\n\n  for (var i = 0; i < count; i++) {\n    res += _INDENT_WITH;\n  }\n\n  return res;\n}\n/**\n * @license\n * Copyright Google LLC 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\nfunction typeWithParameters(type, numParams) {\n  if (numParams === 0) {\n    return expressionType(type);\n  }\n\n  var params = [];\n\n  for (var i = 0; i < numParams; i++) {\n    params.push(DYNAMIC_TYPE);\n  }\n\n  return expressionType(type, undefined, params);\n}\n\nvar ANIMATE_SYMBOL_PREFIX = '@';\n\nfunction prepareSyntheticPropertyName(name) {\n  return \"\".concat(ANIMATE_SYMBOL_PREFIX).concat(name);\n}\n\nfunction prepareSyntheticListenerName(name, phase) {\n  return \"\".concat(ANIMATE_SYMBOL_PREFIX).concat(name, \".\").concat(phase);\n}\n\nfunction getSafePropertyAccessString(accessor, name) {\n  var escapedName = escapeIdentifier(name, false, false);\n  return escapedName !== name ? \"\".concat(accessor, \"[\").concat(escapedName, \"]\") : \"\".concat(accessor, \".\").concat(name);\n}\n\nfunction prepareSyntheticListenerFunctionName(name, phase) {\n  return \"animation_\".concat(name, \"_\").concat(phase);\n}\n\nfunction jitOnlyGuardedExpression(expr) {\n  return guardedExpression('ngJitMode', expr);\n}\n\nfunction devOnlyGuardedExpression(expr) {\n  return guardedExpression('ngDevMode', expr);\n}\n\nfunction guardedExpression(guard, expr) {\n  var guardExpr = new ExternalExpr({\n    name: guard,\n    moduleName: null\n  });\n  var guardNotDefined = new BinaryOperatorExpr(BinaryOperator.Identical, new TypeofExpr(guardExpr), literal('undefined'));\n  var guardUndefinedOrTrue = new BinaryOperatorExpr(BinaryOperator.Or, guardNotDefined, guardExpr,\n  /* type */\n  undefined,\n  /* sourceSpan */\n  undefined, true);\n  return new BinaryOperatorExpr(BinaryOperator.And, guardUndefinedOrTrue, expr);\n}\n\nfunction wrapReference(value) {\n  var wrapped = new WrappedNodeExpr(value);\n  return {\n    value: wrapped,\n    type: wrapped\n  };\n}\n\nfunction refsToArray(refs, shouldForwardDeclare) {\n  var values = literalArr(refs.map(function (ref) {\n    return ref.value;\n  }));\n  return shouldForwardDeclare ? fn([], [new ReturnStatement(values)]) : values;\n}\n\nfunction createMayBeForwardRefExpression(expression, forwardRef) {\n  return {\n    expression: expression,\n    forwardRef: forwardRef\n  };\n}\n/**\n * Convert a `MaybeForwardRefExpression` to an `Expression`, possibly wrapping its expression in a\n * `forwardRef()` call.\n *\n * If `MaybeForwardRefExpression.forwardRef` is `ForwardRefHandling.Unwrapped` then the expression\n * was originally wrapped in a `forwardRef()` call to prevent the value from being eagerly evaluated\n * in the code.\n *\n * See `packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts` and\n * `packages/compiler/src/jit_compiler_facade.ts` for more information.\n */\n\n\nfunction convertFromMaybeForwardRefExpression(_ref3) {\n  var expression = _ref3.expression,\n      forwardRef = _ref3.forwardRef;\n\n  switch (forwardRef) {\n    case 0\n    /* None */\n    :\n    case 1\n    /* Wrapped */\n    :\n      return expression;\n\n    case 2\n    /* Unwrapped */\n    :\n      return generateForwardRef(expression);\n  }\n}\n/**\n * Generate an expression that has the given `expr` wrapped in the following form:\n *\n * ```\n * forwardRef(() => expr)\n * ```\n */\n\n\nfunction generateForwardRef(expr) {\n  return importExpr(Identifiers.forwardRef).callFn([fn([], [new ReturnStatement(expr)])]);\n}\n\nvar R3FactoryDelegateType = /*@__PURE__*/function (R3FactoryDelegateType) {\n  R3FactoryDelegateType[R3FactoryDelegateType[\"Class\"] = 0] = \"Class\";\n  R3FactoryDelegateType[R3FactoryDelegateType[\"Function\"] = 1] = \"Function\";\n  return R3FactoryDelegateType;\n}({});\n\nvar FactoryTarget = /*@__PURE__*/function (FactoryTarget) {\n  FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n  FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n  FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n  FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n  FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n  return FactoryTarget;\n}({});\n/**\n * Construct a factory function expression for the given `R3FactoryMetadata`.\n */\n\n\nfunction compileFactoryFunction(meta) {\n  var t = variable('t');\n  var baseFactoryVar = null; // The type to instantiate via constructor invocation. If there is no delegated factory, meaning\n  // this type is always created by constructor invocation, then this is the type-to-create\n  // parameter provided by the user (t) if specified, or the current type if not. If there is a\n  // delegated factory (which is used to create the current type) then this is only the type-to-\n  // create parameter (t).\n\n  var typeForCtor = !isDelegatedFactoryMetadata(meta) ? new BinaryOperatorExpr(BinaryOperator.Or, t, meta.internalType) : t;\n  var ctorExpr = null;\n\n  if (meta.deps !== null) {\n    // There is a constructor (either explicitly or implicitly defined).\n    if (meta.deps !== 'invalid') {\n      ctorExpr = new InstantiateExpr(typeForCtor, injectDependencies(meta.deps, meta.target));\n    }\n  } else {\n    // There is no constructor, use the base class' factory to construct typeForCtor.\n    baseFactoryVar = variable(\"\\u0275\".concat(meta.name, \"_BaseFactory\"));\n    ctorExpr = baseFactoryVar.callFn([typeForCtor]);\n  }\n\n  var body = [];\n  var retExpr = null;\n\n  function makeConditionalFactory(nonCtorExpr) {\n    var r = variable('r');\n    body.push(r.set(NULL_EXPR).toDeclStmt());\n    var ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() : importExpr(Identifiers.invalidFactory).callFn([]).toStmt();\n    body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));\n    return r;\n  }\n\n  if (isDelegatedFactoryMetadata(meta)) {\n    // This type is created with a delegated factory. If a type parameter is not specified, call\n    // the factory instead.\n    var delegateArgs = injectDependencies(meta.delegateDeps, meta.target); // Either call `new delegate(...)` or `delegate(...)` depending on meta.delegateType.\n\n    var factoryExpr = new (meta.delegateType === R3FactoryDelegateType.Class ? InstantiateExpr : InvokeFunctionExpr)(meta.delegate, delegateArgs);\n    retExpr = makeConditionalFactory(factoryExpr);\n  } else if (isExpressionFactoryMetadata(meta)) {\n    // TODO(alxhub): decide whether to lower the value here or in the caller\n    retExpr = makeConditionalFactory(meta.expression);\n  } else {\n    retExpr = ctorExpr;\n  }\n\n  if (retExpr === null) {\n    // The expression cannot be formed so render an `ɵɵinvalidFactory()` call.\n    body.push(importExpr(Identifiers.invalidFactory).callFn([]).toStmt());\n  } else if (baseFactoryVar !== null) {\n    // This factory uses a base factory, so call `ɵɵgetInheritedFactory()` to compute it.\n    var getInheritedFactoryCall = importExpr(Identifiers.getInheritedFactory).callFn([meta.internalType]); // Memoize the base factoryFn: `baseFactory || (baseFactory = ɵɵgetInheritedFactory(...))`\n\n    var baseFactory = new BinaryOperatorExpr(BinaryOperator.Or, baseFactoryVar, baseFactoryVar.set(getInheritedFactoryCall));\n    body.push(new ReturnStatement(baseFactory.callFn([typeForCtor])));\n  } else {\n    // This is straightforward factory, just return it.\n    body.push(new ReturnStatement(retExpr));\n  }\n\n  var factoryFn = fn([new FnParam('t', DYNAMIC_TYPE)], body, INFERRED_TYPE, undefined, \"\".concat(meta.name, \"_Factory\"));\n\n  if (baseFactoryVar !== null) {\n    // There is a base factory variable so wrap its declaration along with the factory function into\n    // an IIFE.\n    factoryFn = fn([], [new DeclareVarStmt(baseFactoryVar.name), new ReturnStatement(factoryFn)]).callFn([],\n    /* sourceSpan */\n    undefined,\n    /* pure */\n    true);\n  }\n\n  return {\n    expression: factoryFn,\n    statements: [],\n    type: createFactoryType(meta)\n  };\n}\n\nfunction createFactoryType(meta) {\n  var ctorDepsType = meta.deps !== null && meta.deps !== 'invalid' ? createCtorDepsType(meta.deps) : NONE_TYPE;\n  return expressionType(importExpr(Identifiers.FactoryDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount), ctorDepsType]));\n}\n\nfunction injectDependencies(deps, target) {\n  return deps.map(function (dep, index) {\n    return compileInjectDependency(dep, target, index);\n  });\n}\n\nfunction compileInjectDependency(dep, target, index) {\n  // Interpret the dependency according to its resolved type.\n  if (dep.token === null) {\n    return importExpr(Identifiers.invalidFactoryDep).callFn([literal(index)]);\n  } else if (dep.attributeNameType === null) {\n    // Build up the injection flags according to the metadata.\n    var flags = 0\n    /* Default */\n    | (dep.self ? 2\n    /* Self */\n    : 0) | (dep.skipSelf ? 4\n    /* SkipSelf */\n    : 0) | (dep.host ? 1\n    /* Host */\n    : 0) | (dep.optional ? 8\n    /* Optional */\n    : 0) | (target === FactoryTarget.Pipe ? 16\n    /* ForPipe */\n    : 0); // If this dependency is optional or otherwise has non-default flags, then additional\n    // parameters describing how to inject the dependency must be passed to the inject function\n    // that's being used.\n\n    var flagsParam = flags !== 0\n    /* Default */\n    || dep.optional ? literal(flags) : null; // Build up the arguments to the injectFn call.\n\n    var injectArgs = [dep.token];\n\n    if (flagsParam) {\n      injectArgs.push(flagsParam);\n    }\n\n    var injectFn = getInjectFn(target);\n    return importExpr(injectFn).callFn(injectArgs);\n  } else {\n    // The `dep.attributeTypeName` value is defined, which indicates that this is an `@Attribute()`\n    // type dependency. For the generated JS we still want to use the `dep.token` value in case the\n    // name given for the attribute is not a string literal. For example given `@Attribute(foo())`,\n    // we want to generate `ɵɵinjectAttribute(foo())`.\n    //\n    // The `dep.attributeTypeName` is only actually used (in `createCtorDepType()`) to generate\n    // typings.\n    return importExpr(Identifiers.injectAttribute).callFn([dep.token]);\n  }\n}\n\nfunction createCtorDepsType(deps) {\n  var hasTypes = false;\n  var attributeTypes = deps.map(function (dep) {\n    var type = createCtorDepType(dep);\n\n    if (type !== null) {\n      hasTypes = true;\n      return type;\n    } else {\n      return literal(null);\n    }\n  });\n\n  if (hasTypes) {\n    return expressionType(literalArr(attributeTypes));\n  } else {\n    return NONE_TYPE;\n  }\n}\n\nfunction createCtorDepType(dep) {\n  var entries = [];\n\n  if (dep.attributeNameType !== null) {\n    entries.push({\n      key: 'attribute',\n      value: dep.attributeNameType,\n      quoted: false\n    });\n  }\n\n  if (dep.optional) {\n    entries.push({\n      key: 'optional',\n      value: literal(true),\n      quoted: false\n    });\n  }\n\n  if (dep.host) {\n    entries.push({\n      key: 'host',\n      value: literal(true),\n      quoted: false\n    });\n  }\n\n  if (dep.self) {\n    entries.push({\n      key: 'self',\n      value: literal(true),\n      quoted: false\n    });\n  }\n\n  if (dep.skipSelf) {\n    entries.push({\n      key: 'skipSelf',\n      value: literal(true),\n      quoted: false\n    });\n  }\n\n  return entries.length > 0 ? literalMap(entries) : null;\n}\n\nfunction isDelegatedFactoryMetadata(meta) {\n  return meta.delegateType !== undefined;\n}\n\nfunction isExpressionFactoryMetadata(meta) {\n  return meta.expression !== undefined;\n}\n\nfunction getInjectFn(target) {\n  switch (target) {\n    case FactoryTarget.Component:\n    case FactoryTarget.Directive:\n    case FactoryTarget.Pipe:\n      return Identifiers.directiveInject;\n\n    case FactoryTarget.NgModule:\n    case FactoryTarget.Injectable:\n    default:\n      return Identifiers.inject;\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * This is an R3 `Node`-like wrapper for a raw `html.Comment` node. We do not currently\n * require the implementation of a visitor for Comments as they are only collected at\n * the top-level of the R3 AST, and only if `Render3ParseOptions['collectCommentNodes']`\n * is true.\n */\n\n\nvar Comment = /*#__PURE__*/function () {\n  function Comment(value, sourceSpan) {\n    _classCallCheck(this, Comment);\n\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(Comment, [{\n    key: \"visit\",\n    value: function visit(_visitor) {\n      throw new Error('visit() not implemented for Comment');\n    }\n  }]);\n\n  return Comment;\n}();\n\nvar Text = /*#__PURE__*/function () {\n  function Text(value, sourceSpan) {\n    _classCallCheck(this, Text);\n\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(Text, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitText(this);\n    }\n  }]);\n\n  return Text;\n}();\n\nvar BoundText = /*#__PURE__*/function () {\n  function BoundText(value, sourceSpan, i18n) {\n    _classCallCheck(this, BoundText);\n\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n    this.i18n = i18n;\n  }\n\n  _createClass(BoundText, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitBoundText(this);\n    }\n  }]);\n\n  return BoundText;\n}();\n/**\n * Represents a text attribute in the template.\n *\n * `valueSpan` may not be present in cases where there is no value `<div a></div>`.\n * `keySpan` may also not be present for synthetic attributes from ICU expansions.\n */\n\n\nvar TextAttribute = /*#__PURE__*/function () {\n  function TextAttribute(name, value, sourceSpan, keySpan, valueSpan, i18n) {\n    _classCallCheck(this, TextAttribute);\n\n    this.name = name;\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n    this.keySpan = keySpan;\n    this.valueSpan = valueSpan;\n    this.i18n = i18n;\n  }\n\n  _createClass(TextAttribute, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitTextAttribute(this);\n    }\n  }]);\n\n  return TextAttribute;\n}();\n\nvar BoundAttribute = /*#__PURE__*/function () {\n  function BoundAttribute(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan, i18n) {\n    _classCallCheck(this, BoundAttribute);\n\n    this.name = name;\n    this.type = type;\n    this.securityContext = securityContext;\n    this.value = value;\n    this.unit = unit;\n    this.sourceSpan = sourceSpan;\n    this.keySpan = keySpan;\n    this.valueSpan = valueSpan;\n    this.i18n = i18n;\n  }\n\n  _createClass(BoundAttribute, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitBoundAttribute(this);\n    }\n  }], [{\n    key: \"fromBoundElementProperty\",\n    value: function fromBoundElementProperty(prop, i18n) {\n      if (prop.keySpan === undefined) {\n        throw new Error(\"Unexpected state: keySpan must be defined for bound attributes but was not for \".concat(prop.name, \": \").concat(prop.sourceSpan));\n      }\n\n      return new BoundAttribute(prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan, prop.keySpan, prop.valueSpan, i18n);\n    }\n  }]);\n\n  return BoundAttribute;\n}();\n\nvar BoundEvent = /*#__PURE__*/function () {\n  function BoundEvent(name, type, handler, target, phase, sourceSpan, handlerSpan, keySpan) {\n    _classCallCheck(this, BoundEvent);\n\n    this.name = name;\n    this.type = type;\n    this.handler = handler;\n    this.target = target;\n    this.phase = phase;\n    this.sourceSpan = sourceSpan;\n    this.handlerSpan = handlerSpan;\n    this.keySpan = keySpan;\n  }\n\n  _createClass(BoundEvent, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitBoundEvent(this);\n    }\n  }], [{\n    key: \"fromParsedEvent\",\n    value: function fromParsedEvent(event) {\n      var target = event.type === 0\n      /* Regular */\n      ? event.targetOrPhase : null;\n      var phase = event.type === 1\n      /* Animation */\n      ? event.targetOrPhase : null;\n\n      if (event.keySpan === undefined) {\n        throw new Error(\"Unexpected state: keySpan must be defined for bound event but was not for \".concat(event.name, \": \").concat(event.sourceSpan));\n      }\n\n      return new BoundEvent(event.name, event.type, event.handler, target, phase, event.sourceSpan, event.handlerSpan, event.keySpan);\n    }\n  }]);\n\n  return BoundEvent;\n}();\n\nvar Element = /*#__PURE__*/function () {\n  function Element(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n    _classCallCheck(this, Element);\n\n    this.name = name;\n    this.attributes = attributes;\n    this.inputs = inputs;\n    this.outputs = outputs;\n    this.children = children;\n    this.references = references;\n    this.sourceSpan = sourceSpan;\n    this.startSourceSpan = startSourceSpan;\n    this.endSourceSpan = endSourceSpan;\n    this.i18n = i18n;\n  }\n\n  _createClass(Element, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitElement(this);\n    }\n  }]);\n\n  return Element;\n}();\n\nvar Template = /*#__PURE__*/function () {\n  function Template(tagName, attributes, inputs, outputs, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n    _classCallCheck(this, Template);\n\n    this.tagName = tagName;\n    this.attributes = attributes;\n    this.inputs = inputs;\n    this.outputs = outputs;\n    this.templateAttrs = templateAttrs;\n    this.children = children;\n    this.references = references;\n    this.variables = variables;\n    this.sourceSpan = sourceSpan;\n    this.startSourceSpan = startSourceSpan;\n    this.endSourceSpan = endSourceSpan;\n    this.i18n = i18n;\n  }\n\n  _createClass(Template, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitTemplate(this);\n    }\n  }]);\n\n  return Template;\n}();\n\nvar Content = /*#__PURE__*/function () {\n  function Content(selector, attributes, sourceSpan, i18n) {\n    _classCallCheck(this, Content);\n\n    this.selector = selector;\n    this.attributes = attributes;\n    this.sourceSpan = sourceSpan;\n    this.i18n = i18n;\n    this.name = 'ng-content';\n  }\n\n  _createClass(Content, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitContent(this);\n    }\n  }]);\n\n  return Content;\n}();\n\nvar Variable = /*#__PURE__*/function () {\n  function Variable(name, value, sourceSpan, keySpan, valueSpan) {\n    _classCallCheck(this, Variable);\n\n    this.name = name;\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n    this.keySpan = keySpan;\n    this.valueSpan = valueSpan;\n  }\n\n  _createClass(Variable, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitVariable(this);\n    }\n  }]);\n\n  return Variable;\n}();\n\nvar Reference = /*#__PURE__*/function () {\n  function Reference(name, value, sourceSpan, keySpan, valueSpan) {\n    _classCallCheck(this, Reference);\n\n    this.name = name;\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n    this.keySpan = keySpan;\n    this.valueSpan = valueSpan;\n  }\n\n  _createClass(Reference, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitReference(this);\n    }\n  }]);\n\n  return Reference;\n}();\n\nvar Icu = /*#__PURE__*/function () {\n  function Icu(vars, placeholders, sourceSpan, i18n) {\n    _classCallCheck(this, Icu);\n\n    this.vars = vars;\n    this.placeholders = placeholders;\n    this.sourceSpan = sourceSpan;\n    this.i18n = i18n;\n  }\n\n  _createClass(Icu, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitIcu(this);\n    }\n  }]);\n\n  return Icu;\n}();\n\nvar NullVisitor = /*#__PURE__*/function () {\n  function NullVisitor() {\n    _classCallCheck(this, NullVisitor);\n  }\n\n  _createClass(NullVisitor, [{\n    key: \"visitElement\",\n    value: function visitElement(element) {}\n  }, {\n    key: \"visitTemplate\",\n    value: function visitTemplate(template) {}\n  }, {\n    key: \"visitContent\",\n    value: function visitContent(content) {}\n  }, {\n    key: \"visitVariable\",\n    value: function visitVariable(variable) {}\n  }, {\n    key: \"visitReference\",\n    value: function visitReference(reference) {}\n  }, {\n    key: \"visitTextAttribute\",\n    value: function visitTextAttribute(attribute) {}\n  }, {\n    key: \"visitBoundAttribute\",\n    value: function visitBoundAttribute(attribute) {}\n  }, {\n    key: \"visitBoundEvent\",\n    value: function visitBoundEvent(attribute) {}\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {}\n  }, {\n    key: \"visitBoundText\",\n    value: function visitBoundText(text) {}\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu) {}\n  }]);\n\n  return NullVisitor;\n}();\n\nvar RecursiveVisitor = /*#__PURE__*/function () {\n  function RecursiveVisitor() {\n    _classCallCheck(this, RecursiveVisitor);\n  }\n\n  _createClass(RecursiveVisitor, [{\n    key: \"visitElement\",\n    value: function visitElement(element) {\n      visitAll(this, element.attributes);\n      visitAll(this, element.inputs);\n      visitAll(this, element.outputs);\n      visitAll(this, element.children);\n      visitAll(this, element.references);\n    }\n  }, {\n    key: \"visitTemplate\",\n    value: function visitTemplate(template) {\n      visitAll(this, template.attributes);\n      visitAll(this, template.inputs);\n      visitAll(this, template.outputs);\n      visitAll(this, template.children);\n      visitAll(this, template.references);\n      visitAll(this, template.variables);\n    }\n  }, {\n    key: \"visitContent\",\n    value: function visitContent(content) {}\n  }, {\n    key: \"visitVariable\",\n    value: function visitVariable(variable) {}\n  }, {\n    key: \"visitReference\",\n    value: function visitReference(reference) {}\n  }, {\n    key: \"visitTextAttribute\",\n    value: function visitTextAttribute(attribute) {}\n  }, {\n    key: \"visitBoundAttribute\",\n    value: function visitBoundAttribute(attribute) {}\n  }, {\n    key: \"visitBoundEvent\",\n    value: function visitBoundEvent(attribute) {}\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {}\n  }, {\n    key: \"visitBoundText\",\n    value: function visitBoundText(text) {}\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu) {}\n  }]);\n\n  return RecursiveVisitor;\n}();\n\nvar TransformVisitor = /*#__PURE__*/function () {\n  function TransformVisitor() {\n    _classCallCheck(this, TransformVisitor);\n  }\n\n  _createClass(TransformVisitor, [{\n    key: \"visitElement\",\n    value: function visitElement(element) {\n      var newAttributes = transformAll(this, element.attributes);\n      var newInputs = transformAll(this, element.inputs);\n      var newOutputs = transformAll(this, element.outputs);\n      var newChildren = transformAll(this, element.children);\n      var newReferences = transformAll(this, element.references);\n\n      if (newAttributes != element.attributes || newInputs != element.inputs || newOutputs != element.outputs || newChildren != element.children || newReferences != element.references) {\n        return new Element(element.name, newAttributes, newInputs, newOutputs, newChildren, newReferences, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n      }\n\n      return element;\n    }\n  }, {\n    key: \"visitTemplate\",\n    value: function visitTemplate(template) {\n      var newAttributes = transformAll(this, template.attributes);\n      var newInputs = transformAll(this, template.inputs);\n      var newOutputs = transformAll(this, template.outputs);\n      var newTemplateAttrs = transformAll(this, template.templateAttrs);\n      var newChildren = transformAll(this, template.children);\n      var newReferences = transformAll(this, template.references);\n      var newVariables = transformAll(this, template.variables);\n\n      if (newAttributes != template.attributes || newInputs != template.inputs || newOutputs != template.outputs || newTemplateAttrs != template.templateAttrs || newChildren != template.children || newReferences != template.references || newVariables != template.variables) {\n        return new Template(template.tagName, newAttributes, newInputs, newOutputs, newTemplateAttrs, newChildren, newReferences, newVariables, template.sourceSpan, template.startSourceSpan, template.endSourceSpan);\n      }\n\n      return template;\n    }\n  }, {\n    key: \"visitContent\",\n    value: function visitContent(content) {\n      return content;\n    }\n  }, {\n    key: \"visitVariable\",\n    value: function visitVariable(variable) {\n      return variable;\n    }\n  }, {\n    key: \"visitReference\",\n    value: function visitReference(reference) {\n      return reference;\n    }\n  }, {\n    key: \"visitTextAttribute\",\n    value: function visitTextAttribute(attribute) {\n      return attribute;\n    }\n  }, {\n    key: \"visitBoundAttribute\",\n    value: function visitBoundAttribute(attribute) {\n      return attribute;\n    }\n  }, {\n    key: \"visitBoundEvent\",\n    value: function visitBoundEvent(attribute) {\n      return attribute;\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {\n      return text;\n    }\n  }, {\n    key: \"visitBoundText\",\n    value: function visitBoundText(text) {\n      return text;\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu) {\n      return icu;\n    }\n  }]);\n\n  return TransformVisitor;\n}();\n\nfunction visitAll(visitor, nodes) {\n  var result = [];\n\n  if (visitor.visit) {\n    var _iterator4 = _createForOfIteratorHelper(nodes),\n        _step4;\n\n    try {\n      for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n        var node = _step4.value;\n        var newNode = visitor.visit(node) || node.visit(visitor);\n      }\n    } catch (err) {\n      _iterator4.e(err);\n    } finally {\n      _iterator4.f();\n    }\n  } else {\n    var _iterator5 = _createForOfIteratorHelper(nodes),\n        _step5;\n\n    try {\n      for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n        var _node = _step5.value;\n\n        var _newNode = _node.visit(visitor);\n\n        if (_newNode) {\n          result.push(_newNode);\n        }\n      }\n    } catch (err) {\n      _iterator5.e(err);\n    } finally {\n      _iterator5.f();\n    }\n  }\n\n  return result;\n}\n\nfunction transformAll(visitor, nodes) {\n  var result = [];\n  var changed = false;\n\n  var _iterator6 = _createForOfIteratorHelper(nodes),\n      _step6;\n\n  try {\n    for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n      var node = _step6.value;\n      var newNode = node.visit(visitor);\n\n      if (newNode) {\n        result.push(newNode);\n      }\n\n      changed = changed || newNode != node;\n    }\n  } catch (err) {\n    _iterator6.e(err);\n  } finally {\n    _iterator6.f();\n  }\n\n  return changed ? result : nodes;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar Message = /*#__PURE__*/_createClass(\n/**\n * @param nodes message AST\n * @param placeholders maps placeholder names to static content and their source spans\n * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages)\n * @param meaning\n * @param description\n * @param customId\n */\nfunction Message(nodes, placeholders, placeholderToMessage, meaning, description, customId) {\n  _classCallCheck(this, Message);\n\n  this.nodes = nodes;\n  this.placeholders = placeholders;\n  this.placeholderToMessage = placeholderToMessage;\n  this.meaning = meaning;\n  this.description = description;\n  this.customId = customId;\n  this.id = this.customId;\n  /** The ids to use if there are no custom id and if `i18nLegacyMessageIdFormat` is not empty */\n\n  this.legacyIds = [];\n\n  if (nodes.length) {\n    this.sources = [{\n      filePath: nodes[0].sourceSpan.start.file.url,\n      startLine: nodes[0].sourceSpan.start.line + 1,\n      startCol: nodes[0].sourceSpan.start.col + 1,\n      endLine: nodes[nodes.length - 1].sourceSpan.end.line + 1,\n      endCol: nodes[0].sourceSpan.start.col + 1\n    }];\n  } else {\n    this.sources = [];\n  }\n});\n\nvar Text$1 = /*#__PURE__*/function () {\n  function Text$1(value, sourceSpan) {\n    _classCallCheck(this, Text$1);\n\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(Text$1, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitText(this, context);\n    }\n  }]);\n\n  return Text$1;\n}(); // TODO(vicb): do we really need this node (vs an array) ?\n\n\nvar Container = /*#__PURE__*/function () {\n  function Container(children, sourceSpan) {\n    _classCallCheck(this, Container);\n\n    this.children = children;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(Container, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitContainer(this, context);\n    }\n  }]);\n\n  return Container;\n}();\n\nvar Icu$1 = /*#__PURE__*/function () {\n  function Icu$1(expression, type, cases, sourceSpan) {\n    _classCallCheck(this, Icu$1);\n\n    this.expression = expression;\n    this.type = type;\n    this.cases = cases;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(Icu$1, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitIcu(this, context);\n    }\n  }]);\n\n  return Icu$1;\n}();\n\nvar TagPlaceholder = /*#__PURE__*/function () {\n  function TagPlaceholder(tag, attrs, startName, closeName, children, isVoid, // TODO sourceSpan should cover all (we need a startSourceSpan and endSourceSpan)\n  sourceSpan, startSourceSpan, endSourceSpan) {\n    _classCallCheck(this, TagPlaceholder);\n\n    this.tag = tag;\n    this.attrs = attrs;\n    this.startName = startName;\n    this.closeName = closeName;\n    this.children = children;\n    this.isVoid = isVoid;\n    this.sourceSpan = sourceSpan;\n    this.startSourceSpan = startSourceSpan;\n    this.endSourceSpan = endSourceSpan;\n  }\n\n  _createClass(TagPlaceholder, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitTagPlaceholder(this, context);\n    }\n  }]);\n\n  return TagPlaceholder;\n}();\n\nvar Placeholder = /*#__PURE__*/function () {\n  function Placeholder(value, name, sourceSpan) {\n    _classCallCheck(this, Placeholder);\n\n    this.value = value;\n    this.name = name;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(Placeholder, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitPlaceholder(this, context);\n    }\n  }]);\n\n  return Placeholder;\n}();\n\nvar IcuPlaceholder = /*#__PURE__*/function () {\n  function IcuPlaceholder(value, name, sourceSpan) {\n    _classCallCheck(this, IcuPlaceholder);\n\n    this.value = value;\n    this.name = name;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(IcuPlaceholder, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitIcuPlaceholder(this, context);\n    }\n  }]);\n\n  return IcuPlaceholder;\n}(); // Clone the AST\n\n\nvar CloneVisitor = /*#__PURE__*/function () {\n  function CloneVisitor() {\n    _classCallCheck(this, CloneVisitor);\n  }\n\n  _createClass(CloneVisitor, [{\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      return new Text$1(text.value, text.sourceSpan);\n    }\n  }, {\n    key: \"visitContainer\",\n    value: function visitContainer(container, context) {\n      var _this67 = this;\n\n      var children = container.children.map(function (n) {\n        return n.visit(_this67, context);\n      });\n      return new Container(children, container.sourceSpan);\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu, context) {\n      var _this68 = this;\n\n      var cases = {};\n      Object.keys(icu.cases).forEach(function (key) {\n        return cases[key] = icu.cases[key].visit(_this68, context);\n      });\n      var msg = new Icu$1(icu.expression, icu.type, cases, icu.sourceSpan);\n      msg.expressionPlaceholder = icu.expressionPlaceholder;\n      return msg;\n    }\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph, context) {\n      var _this69 = this;\n\n      var children = ph.children.map(function (n) {\n        return n.visit(_this69, context);\n      });\n      return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph, context) {\n      return new Placeholder(ph.value, ph.name, ph.sourceSpan);\n    }\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, context) {\n      return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan);\n    }\n  }]);\n\n  return CloneVisitor;\n}(); // Visit all the nodes recursively\n\n\nvar RecurseVisitor = /*#__PURE__*/function () {\n  function RecurseVisitor() {\n    _classCallCheck(this, RecurseVisitor);\n  }\n\n  _createClass(RecurseVisitor, [{\n    key: \"visitText\",\n    value: function visitText(text, context) {}\n  }, {\n    key: \"visitContainer\",\n    value: function visitContainer(container, context) {\n      var _this70 = this;\n\n      container.children.forEach(function (child) {\n        return child.visit(_this70);\n      });\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu, context) {\n      var _this71 = this;\n\n      Object.keys(icu.cases).forEach(function (k) {\n        icu.cases[k].visit(_this71);\n      });\n    }\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph, context) {\n      var _this72 = this;\n\n      ph.children.forEach(function (child) {\n        return child.visit(_this72);\n      });\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph, context) {}\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, context) {}\n  }]);\n\n  return RecurseVisitor;\n}();\n/**\n * @license\n * Copyright Google LLC 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/**\n * Represents a big integer using a buffer of its individual digits, with the least significant\n * digit stored at the beginning of the array (little endian).\n *\n * For performance reasons, each instance is mutable. The addition operation can be done in-place\n * to reduce memory pressure of allocation for the digits array.\n */\n\n\nvar BigInteger = /*#__PURE__*/function () {\n  /**\n   * Creates a big integer using its individual digits in little endian storage.\n   */\n  function BigInteger(digits) {\n    _classCallCheck(this, BigInteger);\n\n    this.digits = digits;\n  }\n\n  _createClass(BigInteger, [{\n    key: \"clone\",\n    value:\n    /**\n     * Creates a clone of this instance.\n     */\n    function clone() {\n      return new BigInteger(this.digits.slice());\n    }\n    /**\n     * Returns a new big integer with the sum of `this` and `other` as its value. This does not mutate\n     * `this` but instead returns a new instance, unlike `addToSelf`.\n     */\n\n  }, {\n    key: \"add\",\n    value: function add(other) {\n      var result = this.clone();\n      result.addToSelf(other);\n      return result;\n    }\n    /**\n     * Adds `other` to the instance itself, thereby mutating its value.\n     */\n\n  }, {\n    key: \"addToSelf\",\n    value: function addToSelf(other) {\n      var maxNrOfDigits = Math.max(this.digits.length, other.digits.length);\n      var carry = 0;\n\n      for (var i = 0; i < maxNrOfDigits; i++) {\n        var digitSum = carry;\n\n        if (i < this.digits.length) {\n          digitSum += this.digits[i];\n        }\n\n        if (i < other.digits.length) {\n          digitSum += other.digits[i];\n        }\n\n        if (digitSum >= 10) {\n          this.digits[i] = digitSum - 10;\n          carry = 1;\n        } else {\n          this.digits[i] = digitSum;\n          carry = 0;\n        }\n      } // Apply a remaining carry if needed.\n\n\n      if (carry > 0) {\n        this.digits[maxNrOfDigits] = 1;\n      }\n    }\n    /**\n     * Builds the decimal string representation of the big integer. As this is stored in\n     * little endian, the digits are concatenated in reverse order.\n     */\n\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var res = '';\n\n      for (var i = this.digits.length - 1; i >= 0; i--) {\n        res += this.digits[i];\n      }\n\n      return res;\n    }\n  }], [{\n    key: \"zero\",\n    value: function zero() {\n      return new BigInteger([0]);\n    }\n  }, {\n    key: \"one\",\n    value: function one() {\n      return new BigInteger([1]);\n    }\n  }]);\n\n  return BigInteger;\n}();\n/**\n * Represents a big integer which is optimized for multiplication operations, as its power-of-twos\n * are memoized. See `multiplyBy()` for details on the multiplication algorithm.\n */\n\n\nvar BigIntForMultiplication = /*#__PURE__*/function () {\n  function BigIntForMultiplication(value) {\n    _classCallCheck(this, BigIntForMultiplication);\n\n    this.powerOfTwos = [value];\n  }\n  /**\n   * Returns the big integer itself.\n   */\n\n\n  _createClass(BigIntForMultiplication, [{\n    key: \"getValue\",\n    value: function getValue() {\n      return this.powerOfTwos[0];\n    }\n    /**\n     * Computes the value for `num * b`, where `num` is a JS number and `b` is a big integer. The\n     * value for `b` is represented by a storage model that is optimized for this computation.\n     *\n     * This operation is implemented in N(log2(num)) by continuous halving of the number, where the\n     * least-significant bit (LSB) is tested in each iteration. If the bit is set, the bit's index is\n     * used as exponent into the power-of-two multiplication of `b`.\n     *\n     * As an example, consider the multiplication num=42, b=1337. In binary 42 is 0b00101010 and the\n     * algorithm unrolls into the following iterations:\n     *\n     *  Iteration | num        | LSB  | b * 2^iter | Add? | product\n     * -----------|------------|------|------------|------|--------\n     *  0         | 0b00101010 | 0    | 1337       | No   | 0\n     *  1         | 0b00010101 | 1    | 2674       | Yes  | 2674\n     *  2         | 0b00001010 | 0    | 5348       | No   | 2674\n     *  3         | 0b00000101 | 1    | 10696      | Yes  | 13370\n     *  4         | 0b00000010 | 0    | 21392      | No   | 13370\n     *  5         | 0b00000001 | 1    | 42784      | Yes  | 56154\n     *  6         | 0b00000000 | 0    | 85568      | No   | 56154\n     *\n     * The computed product of 56154 is indeed the correct result.\n     *\n     * The `BigIntForMultiplication` representation for a big integer provides memoized access to the\n     * power-of-two values to reduce the workload in computing those values.\n     */\n\n  }, {\n    key: \"multiplyBy\",\n    value: function multiplyBy(num) {\n      var product = BigInteger.zero();\n      this.multiplyByAndAddTo(num, product);\n      return product;\n    }\n    /**\n     * See `multiplyBy()` for details. This function allows for the computed product to be added\n     * directly to the provided result big integer.\n     */\n\n  }, {\n    key: \"multiplyByAndAddTo\",\n    value: function multiplyByAndAddTo(num, result) {\n      for (var exponent = 0; num !== 0; num = num >>> 1, exponent++) {\n        if (num & 1) {\n          var value = this.getMultipliedByPowerOfTwo(exponent);\n          result.addToSelf(value);\n        }\n      }\n    }\n    /**\n     * Computes and memoizes the big integer value for `this.number * 2^exponent`.\n     */\n\n  }, {\n    key: \"getMultipliedByPowerOfTwo\",\n    value: function getMultipliedByPowerOfTwo(exponent) {\n      // Compute the powers up until the requested exponent, where each value is computed from its\n      // predecessor. This is simple as `this.number * 2^(exponent - 1)` only has to be doubled (i.e.\n      // added to itself) to reach `this.number * 2^exponent`.\n      for (var i = this.powerOfTwos.length; i <= exponent; i++) {\n        var previousPower = this.powerOfTwos[i - 1];\n        this.powerOfTwos[i] = previousPower.add(previousPower);\n      }\n\n      return this.powerOfTwos[exponent];\n    }\n  }]);\n\n  return BigIntForMultiplication;\n}();\n/**\n * Represents an exponentiation operation for the provided base, of which exponents are computed and\n * memoized. The results are represented by a `BigIntForMultiplication` which is tailored for\n * multiplication operations by memoizing the power-of-twos. This effectively results in a matrix\n * representation that is lazily computed upon request.\n */\n\n\nvar BigIntExponentiation = /*#__PURE__*/function () {\n  function BigIntExponentiation(base) {\n    _classCallCheck(this, BigIntExponentiation);\n\n    this.base = base;\n    this.exponents = [new BigIntForMultiplication(BigInteger.one())];\n  }\n  /**\n   * Compute the value for `this.base^exponent`, resulting in a big integer that is optimized for\n   * further multiplication operations.\n   */\n\n\n  _createClass(BigIntExponentiation, [{\n    key: \"toThePowerOf\",\n    value: function toThePowerOf(exponent) {\n      // Compute the results up until the requested exponent, where every value is computed from its\n      // predecessor. This is because `this.base^(exponent - 1)` only has to be multiplied by `base`\n      // to reach `this.base^exponent`.\n      for (var i = this.exponents.length; i <= exponent; i++) {\n        var value = this.exponents[i - 1].multiplyBy(this.base);\n        this.exponents[i] = new BigIntForMultiplication(value);\n      }\n\n      return this.exponents[exponent];\n    }\n  }]);\n\n  return BigIntExponentiation;\n}();\n/**\n * @license\n * Copyright Google LLC 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/**\n * Return the message id or compute it using the XLIFF1 digest.\n */\n\n\nfunction _digest2(message) {\n  return message.id || computeDigest(message);\n}\n/**\n * Compute the message id using the XLIFF1 digest.\n */\n\n\nfunction computeDigest(message) {\n  return sha1(serializeNodes(message.nodes).join('') + \"[\".concat(message.meaning, \"]\"));\n}\n/**\n * Return the message id or compute it using the XLIFF2/XMB/$localize digest.\n */\n\n\nfunction decimalDigest(message) {\n  return message.id || computeDecimalDigest(message);\n}\n/**\n * Compute the message id using the XLIFF2/XMB/$localize digest.\n */\n\n\nfunction computeDecimalDigest(message) {\n  var visitor = new _SerializerIgnoreIcuExpVisitor();\n  var parts = message.nodes.map(function (a) {\n    return a.visit(visitor, null);\n  });\n  return computeMsgId(parts.join(''), message.meaning);\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * The visitor is also used in the i18n parser tests\n *\n * @internal\n */\n\n\nvar _SerializerVisitor = /*#__PURE__*/function () {\n  function _SerializerVisitor() {\n    _classCallCheck(this, _SerializerVisitor);\n  }\n\n  _createClass(_SerializerVisitor, [{\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      return text.value;\n    }\n  }, {\n    key: \"visitContainer\",\n    value: function visitContainer(container, context) {\n      var _this73 = this;\n\n      return \"[\".concat(container.children.map(function (child) {\n        return child.visit(_this73);\n      }).join(', '), \"]\");\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu, context) {\n      var _this74 = this;\n\n      var strCases = Object.keys(icu.cases).map(function (k) {\n        return \"\".concat(k, \" {\").concat(icu.cases[k].visit(_this74), \"}\");\n      });\n      return \"{\".concat(icu.expression, \", \").concat(icu.type, \", \").concat(strCases.join(', '), \"}\");\n    }\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph, context) {\n      var _this75 = this;\n\n      return ph.isVoid ? \"<ph tag name=\\\"\".concat(ph.startName, \"\\\"/>\") : \"<ph tag name=\\\"\".concat(ph.startName, \"\\\">\").concat(ph.children.map(function (child) {\n        return child.visit(_this75);\n      }).join(', '), \"</ph name=\\\"\").concat(ph.closeName, \"\\\">\");\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph, context) {\n      return ph.value ? \"<ph name=\\\"\".concat(ph.name, \"\\\">\").concat(ph.value, \"</ph>\") : \"<ph name=\\\"\".concat(ph.name, \"\\\"/>\");\n    }\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, context) {\n      return \"<ph icu name=\\\"\".concat(ph.name, \"\\\">\").concat(ph.value.visit(this), \"</ph>\");\n    }\n  }]);\n\n  return _SerializerVisitor;\n}();\n\nvar serializerVisitor = /*@__PURE__*/new _SerializerVisitor();\n\nfunction serializeNodes(nodes) {\n  return nodes.map(function (a) {\n    return a.visit(serializerVisitor, null);\n  });\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * Ignore the ICU expressions so that message IDs stays identical if only the expression changes.\n *\n * @internal\n */\n\n\nvar _SerializerIgnoreIcuExpVisitor = /*#__PURE__*/function (_SerializerVisitor2) {\n  _inherits(_SerializerIgnoreIcuExpVisitor, _SerializerVisitor2);\n\n  var _super48 = _createSuper(_SerializerIgnoreIcuExpVisitor);\n\n  function _SerializerIgnoreIcuExpVisitor() {\n    _classCallCheck(this, _SerializerIgnoreIcuExpVisitor);\n\n    return _super48.apply(this, arguments);\n  }\n\n  _createClass(_SerializerIgnoreIcuExpVisitor, [{\n    key: \"visitIcu\",\n    value: function visitIcu(icu, context) {\n      var _this76 = this;\n\n      var strCases = Object.keys(icu.cases).map(function (k) {\n        return \"\".concat(k, \" {\").concat(icu.cases[k].visit(_this76), \"}\");\n      }); // Do not take the expression into account\n\n      return \"{\".concat(icu.type, \", \").concat(strCases.join(', '), \"}\");\n    }\n  }]);\n\n  return _SerializerIgnoreIcuExpVisitor;\n}(_SerializerVisitor);\n/**\n * Compute the SHA1 of the given string\n *\n * see https://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf\n *\n * WARNING: this function has not been designed not tested with security in mind.\n *          DO NOT USE IT IN A SECURITY SENSITIVE CONTEXT.\n */\n\n\nfunction sha1(str) {\n  var utf8 = utf8Encode(str);\n  var words32 = bytesToWords32(utf8, Endian.Big);\n  var len = utf8.length * 8;\n  var w = newArray(80);\n  var a = 0x67452301,\n      b = 0xefcdab89,\n      c = 0x98badcfe,\n      d = 0x10325476,\n      e = 0xc3d2e1f0;\n  words32[len >> 5] |= 0x80 << 24 - len % 32;\n  words32[(len + 64 >> 9 << 4) + 15] = len;\n\n  for (var i = 0; i < words32.length; i += 16) {\n    var h0 = a,\n        h1 = b,\n        h2 = c,\n        h3 = d,\n        h4 = e;\n\n    for (var j = 0; j < 80; j++) {\n      if (j < 16) {\n        w[j] = words32[i + j];\n      } else {\n        w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);\n      }\n\n      var fkVal = fk(j, b, c, d);\n      var f = fkVal[0];\n      var k = fkVal[1];\n      var temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);\n      e = d;\n      d = c;\n      c = rol32(b, 30);\n      b = a;\n      a = temp;\n    }\n\n    a = add32(a, h0);\n    b = add32(b, h1);\n    c = add32(c, h2);\n    d = add32(d, h3);\n    e = add32(e, h4);\n  }\n\n  return bytesToHexString(words32ToByteString([a, b, c, d, e]));\n}\n\nfunction fk(index, b, c, d) {\n  if (index < 20) {\n    return [b & c | ~b & d, 0x5a827999];\n  }\n\n  if (index < 40) {\n    return [b ^ c ^ d, 0x6ed9eba1];\n  }\n\n  if (index < 60) {\n    return [b & c | b & d | c & d, 0x8f1bbcdc];\n  }\n\n  return [b ^ c ^ d, 0xca62c1d6];\n}\n/**\n * Compute the fingerprint of the given string\n *\n * The output is 64 bit number encoded as a decimal string\n *\n * based on:\n * https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/GoogleJsMessageIdGenerator.java\n */\n\n\nfunction fingerprint(str) {\n  var utf8 = utf8Encode(str);\n  var hi = hash32(utf8, 0);\n  var lo = hash32(utf8, 102072);\n\n  if (hi == 0 && (lo == 0 || lo == 1)) {\n    hi = hi ^ 0x130f9bef;\n    lo = lo ^ -0x6b5f56d8;\n  }\n\n  return [hi, lo];\n}\n\nfunction computeMsgId(msg) {\n  var meaning = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n  var msgFingerprint = fingerprint(msg);\n\n  if (meaning) {\n    var meaningFingerprint = fingerprint(meaning);\n    msgFingerprint = add64(rol64(msgFingerprint, 1), meaningFingerprint);\n  }\n\n  var hi = msgFingerprint[0];\n  var lo = msgFingerprint[1];\n  return wordsToDecimalString(hi & 0x7fffffff, lo);\n}\n\nfunction hash32(bytes, c) {\n  var a = 0x9e3779b9,\n      b = 0x9e3779b9;\n  var i;\n  var len = bytes.length;\n\n  for (i = 0; i + 12 <= len; i += 12) {\n    a = add32(a, wordAt(bytes, i, Endian.Little));\n    b = add32(b, wordAt(bytes, i + 4, Endian.Little));\n    c = add32(c, wordAt(bytes, i + 8, Endian.Little));\n    var res = mix(a, b, c);\n    a = res[0], b = res[1], c = res[2];\n  }\n\n  a = add32(a, wordAt(bytes, i, Endian.Little));\n  b = add32(b, wordAt(bytes, i + 4, Endian.Little)); // the first byte of c is reserved for the length\n\n  c = add32(c, len);\n  c = add32(c, wordAt(bytes, i + 8, Endian.Little) << 8);\n  return mix(a, b, c)[2];\n} // clang-format off\n\n\nfunction mix(a, b, c) {\n  a = sub32(a, b);\n  a = sub32(a, c);\n  a ^= c >>> 13;\n  b = sub32(b, c);\n  b = sub32(b, a);\n  b ^= a << 8;\n  c = sub32(c, a);\n  c = sub32(c, b);\n  c ^= b >>> 13;\n  a = sub32(a, b);\n  a = sub32(a, c);\n  a ^= c >>> 12;\n  b = sub32(b, c);\n  b = sub32(b, a);\n  b ^= a << 16;\n  c = sub32(c, a);\n  c = sub32(c, b);\n  c ^= b >>> 5;\n  a = sub32(a, b);\n  a = sub32(a, c);\n  a ^= c >>> 3;\n  b = sub32(b, c);\n  b = sub32(b, a);\n  b ^= a << 10;\n  c = sub32(c, a);\n  c = sub32(c, b);\n  c ^= b >>> 15;\n  return [a, b, c];\n} // clang-format on\n// Utils\n\n\nvar Endian = /*@__PURE__*/function (Endian) {\n  Endian[Endian[\"Little\"] = 0] = \"Little\";\n  Endian[Endian[\"Big\"] = 1] = \"Big\";\n  return Endian;\n}({});\n\nfunction add32(a, b) {\n  return add32to64(a, b)[1];\n}\n\nfunction add32to64(a, b) {\n  var low = (a & 0xffff) + (b & 0xffff);\n  var high = (a >>> 16) + (b >>> 16) + (low >>> 16);\n  return [high >>> 16, high << 16 | low & 0xffff];\n}\n\nfunction add64(a, b) {\n  var ah = a[0],\n      al = a[1];\n  var bh = b[0],\n      bl = b[1];\n  var result = add32to64(al, bl);\n  var carry = result[0];\n  var l = result[1];\n  var h = add32(add32(ah, bh), carry);\n  return [h, l];\n}\n\nfunction sub32(a, b) {\n  var low = (a & 0xffff) - (b & 0xffff);\n  var high = (a >> 16) - (b >> 16) + (low >> 16);\n  return high << 16 | low & 0xffff;\n} // Rotate a 32b number left `count` position\n\n\nfunction rol32(a, count) {\n  return a << count | a >>> 32 - count;\n} // Rotate a 64b number left `count` position\n\n\nfunction rol64(num, count) {\n  var hi = num[0],\n      lo = num[1];\n  var h = hi << count | lo >>> 32 - count;\n  var l = lo << count | hi >>> 32 - count;\n  return [h, l];\n}\n\nfunction bytesToWords32(bytes, endian) {\n  var size = bytes.length + 3 >>> 2;\n  var words32 = [];\n\n  for (var i = 0; i < size; i++) {\n    words32[i] = wordAt(bytes, i * 4, endian);\n  }\n\n  return words32;\n}\n\nfunction byteAt(bytes, index) {\n  return index >= bytes.length ? 0 : bytes[index];\n}\n\nfunction wordAt(bytes, index, endian) {\n  var word = 0;\n\n  if (endian === Endian.Big) {\n    for (var i = 0; i < 4; i++) {\n      word += byteAt(bytes, index + i) << 24 - 8 * i;\n    }\n  } else {\n    for (var _i5 = 0; _i5 < 4; _i5++) {\n      word += byteAt(bytes, index + _i5) << 8 * _i5;\n    }\n  }\n\n  return word;\n}\n\nfunction words32ToByteString(words32) {\n  return words32.reduce(function (bytes, word) {\n    return bytes.concat(word32ToByteString(word));\n  }, []);\n}\n\nfunction word32ToByteString(word) {\n  var bytes = [];\n\n  for (var i = 0; i < 4; i++) {\n    bytes.push(word >>> 8 * (3 - i) & 0xff);\n  }\n\n  return bytes;\n}\n\nfunction bytesToHexString(bytes) {\n  var hex = '';\n\n  for (var i = 0; i < bytes.length; i++) {\n    var b = byteAt(bytes, i);\n    hex += (b >>> 4).toString(16) + (b & 0x0f).toString(16);\n  }\n\n  return hex.toLowerCase();\n}\n/**\n * Create a shared exponentiation pool for base-256 computations. This shared pool provides memoized\n * power-of-256 results with memoized power-of-two computations for efficient multiplication.\n *\n * For our purposes, this can be safely stored as a global without memory concerns. The reason is\n * that we encode two words, so only need the 0th (for the low word) and 4th (for the high word)\n * exponent.\n */\n\n\nvar base256 = /*@__PURE__*/new BigIntExponentiation(256);\n/**\n * Represents two 32-bit words as a single decimal number. This requires a big integer storage\n * model as JS numbers are not accurate enough to represent the 64-bit number.\n *\n * Based on https://www.danvk.org/hex2dec.html\n */\n\nfunction wordsToDecimalString(hi, lo) {\n  // Encode the four bytes in lo in the lower digits of the decimal number.\n  // Note: the multiplication results in lo itself but represented by a big integer using its\n  // decimal digits.\n  var decimal = base256.toThePowerOf(0).multiplyBy(lo); // Encode the four bytes in hi above the four lo bytes. lo is a maximum of (2^8)^4, which is why\n  // this multiplication factor is applied.\n\n  base256.toThePowerOf(4).multiplyByAndAddTo(hi, decimal);\n  return decimal.toString();\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar Serializer = /*#__PURE__*/function () {\n  function Serializer() {\n    _classCallCheck(this, Serializer);\n  }\n\n  _createClass(Serializer, [{\n    key: \"createNameMapper\",\n    value: // Creates a name mapper, see `PlaceholderMapper`\n    // Returning `null` means that no name mapping is used.\n    function createNameMapper(message) {\n      return null;\n    }\n  }]);\n\n  return Serializer;\n}();\n/**\n * A simple mapper that take a function to transform an internal name to a public name\n */\n\n\nvar SimplePlaceholderMapper = /*#__PURE__*/function (_RecurseVisitor) {\n  _inherits(SimplePlaceholderMapper, _RecurseVisitor);\n\n  var _super49 = _createSuper(SimplePlaceholderMapper);\n\n  // create a mapping from the message\n  function SimplePlaceholderMapper(message, mapName) {\n    var _this77;\n\n    _classCallCheck(this, SimplePlaceholderMapper);\n\n    _this77 = _super49.call(this);\n    _this77.mapName = mapName;\n    _this77.internalToPublic = {};\n    _this77.publicToNextId = {};\n    _this77.publicToInternal = {};\n    message.nodes.forEach(function (node) {\n      return node.visit(_assertThisInitialized(_this77));\n    });\n    return _this77;\n  }\n\n  _createClass(SimplePlaceholderMapper, [{\n    key: \"toPublicName\",\n    value: function toPublicName(internalName) {\n      return this.internalToPublic.hasOwnProperty(internalName) ? this.internalToPublic[internalName] : null;\n    }\n  }, {\n    key: \"toInternalName\",\n    value: function toInternalName(publicName) {\n      return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] : null;\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      return null;\n    }\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph, context) {\n      this.visitPlaceholderName(ph.startName);\n\n      _get(_getPrototypeOf(SimplePlaceholderMapper.prototype), \"visitTagPlaceholder\", this).call(this, ph, context);\n\n      this.visitPlaceholderName(ph.closeName);\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph, context) {\n      this.visitPlaceholderName(ph.name);\n    }\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, context) {\n      this.visitPlaceholderName(ph.name);\n    } // XMB placeholders could only contains A-Z, 0-9 and _\n\n  }, {\n    key: \"visitPlaceholderName\",\n    value: function visitPlaceholderName(internalName) {\n      if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) {\n        return;\n      }\n\n      var publicName = this.mapName(internalName);\n\n      if (this.publicToInternal.hasOwnProperty(publicName)) {\n        // Create a new XMB when it has already been used\n        var nextId = this.publicToNextId[publicName];\n        this.publicToNextId[publicName] = nextId + 1;\n        publicName = \"\".concat(publicName, \"_\").concat(nextId);\n      } else {\n        this.publicToNextId[publicName] = 1;\n      }\n\n      this.internalToPublic[internalName] = publicName;\n      this.publicToInternal[publicName] = internalName;\n    }\n  }]);\n\n  return SimplePlaceholderMapper;\n}(RecurseVisitor);\n/**\n * @license\n * Copyright Google LLC 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\nvar _Visitor = /*#__PURE__*/function () {\n  function _Visitor() {\n    _classCallCheck(this, _Visitor);\n  }\n\n  _createClass(_Visitor, [{\n    key: \"visitTag\",\n    value: function visitTag(tag) {\n      var _this78 = this;\n\n      var strAttrs = this._serializeAttributes(tag.attrs);\n\n      if (tag.children.length == 0) {\n        return \"<\".concat(tag.name).concat(strAttrs, \"/>\");\n      }\n\n      var strChildren = tag.children.map(function (node) {\n        return node.visit(_this78);\n      });\n      return \"<\".concat(tag.name).concat(strAttrs, \">\").concat(strChildren.join(''), \"</\").concat(tag.name, \">\");\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {\n      return text.value;\n    }\n  }, {\n    key: \"visitDeclaration\",\n    value: function visitDeclaration(decl) {\n      return \"<?xml\".concat(this._serializeAttributes(decl.attrs), \" ?>\");\n    }\n  }, {\n    key: \"_serializeAttributes\",\n    value: function _serializeAttributes(attrs) {\n      var strAttrs = Object.keys(attrs).map(function (name) {\n        return \"\".concat(name, \"=\\\"\").concat(attrs[name], \"\\\"\");\n      }).join(' ');\n      return strAttrs.length > 0 ? ' ' + strAttrs : '';\n    }\n  }, {\n    key: \"visitDoctype\",\n    value: function visitDoctype(doctype) {\n      return \"<!DOCTYPE \".concat(doctype.rootTag, \" [\\n\").concat(doctype.dtd, \"\\n]>\");\n    }\n  }]);\n\n  return _Visitor;\n}();\n\nvar _visitor = /*@__PURE__*/new _Visitor();\n\nfunction serialize(nodes) {\n  return nodes.map(function (node) {\n    return node.visit(_visitor);\n  }).join('');\n}\n\nvar Declaration = /*#__PURE__*/function () {\n  function Declaration(unescapedAttrs) {\n    var _this79 = this;\n\n    _classCallCheck(this, Declaration);\n\n    this.attrs = {};\n    Object.keys(unescapedAttrs).forEach(function (k) {\n      _this79.attrs[k] = escapeXml(unescapedAttrs[k]);\n    });\n  }\n\n  _createClass(Declaration, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitDeclaration(this);\n    }\n  }]);\n\n  return Declaration;\n}();\n\nvar Doctype = /*#__PURE__*/function () {\n  function Doctype(rootTag, dtd) {\n    _classCallCheck(this, Doctype);\n\n    this.rootTag = rootTag;\n    this.dtd = dtd;\n  }\n\n  _createClass(Doctype, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitDoctype(this);\n    }\n  }]);\n\n  return Doctype;\n}();\n\nvar Tag = /*#__PURE__*/function () {\n  function Tag(name) {\n    var _this80 = this;\n\n    var unescapedAttrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\n    _classCallCheck(this, Tag);\n\n    this.name = name;\n    this.children = children;\n    this.attrs = {};\n    Object.keys(unescapedAttrs).forEach(function (k) {\n      _this80.attrs[k] = escapeXml(unescapedAttrs[k]);\n    });\n  }\n\n  _createClass(Tag, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitTag(this);\n    }\n  }]);\n\n  return Tag;\n}();\n\nvar Text$2 = /*#__PURE__*/function () {\n  function Text$2(unescapedValue) {\n    _classCallCheck(this, Text$2);\n\n    this.value = escapeXml(unescapedValue);\n  }\n\n  _createClass(Text$2, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      return visitor.visitText(this);\n    }\n  }]);\n\n  return Text$2;\n}();\n\nvar CR = /*#__PURE__*/function (_Text$) {\n  _inherits(CR, _Text$);\n\n  var _super50 = _createSuper(CR);\n\n  function CR() {\n    var ws = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n    _classCallCheck(this, CR);\n\n    return _super50.call(this, \"\\n\".concat(new Array(ws + 1).join(' ')));\n  }\n\n  return _createClass(CR);\n}(Text$2);\n\nvar _ESCAPED_CHARS = [[/&/g, '&amp;'], [/\"/g, '&quot;'], [/'/g, '&apos;'], [/</g, '&lt;'], [/>/g, '&gt;']]; // Escape `_ESCAPED_CHARS` characters in the given text with encoded entities\n\nfunction escapeXml(text) {\n  return _ESCAPED_CHARS.reduce(function (text, entry) {\n    return text.replace(entry[0], entry[1]);\n  }, text);\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar _MESSAGES_TAG = 'messagebundle';\nvar _MESSAGE_TAG = 'msg';\nvar _PLACEHOLDER_TAG = 'ph';\nvar _EXAMPLE_TAG = 'ex';\nvar _SOURCE_TAG = 'source';\nvar _DOCTYPE = \"<!ELEMENT messagebundle (msg)*>\\n<!ATTLIST messagebundle class CDATA #IMPLIED>\\n\\n<!ELEMENT msg (#PCDATA|ph|source)*>\\n<!ATTLIST msg id CDATA #IMPLIED>\\n<!ATTLIST msg seq CDATA #IMPLIED>\\n<!ATTLIST msg name CDATA #IMPLIED>\\n<!ATTLIST msg desc CDATA #IMPLIED>\\n<!ATTLIST msg meaning CDATA #IMPLIED>\\n<!ATTLIST msg obsolete (obsolete) #IMPLIED>\\n<!ATTLIST msg xml:space (default|preserve) \\\"default\\\">\\n<!ATTLIST msg is_hidden CDATA #IMPLIED>\\n\\n<!ELEMENT source (#PCDATA)>\\n\\n<!ELEMENT ph (#PCDATA|ex)*>\\n<!ATTLIST ph name CDATA #REQUIRED>\\n\\n<!ELEMENT ex (#PCDATA)>\";\n\nvar Xmb = /*#__PURE__*/function (_Serializer) {\n  _inherits(Xmb, _Serializer);\n\n  var _super51 = _createSuper(Xmb);\n\n  function Xmb() {\n    _classCallCheck(this, Xmb);\n\n    return _super51.apply(this, arguments);\n  }\n\n  _createClass(Xmb, [{\n    key: \"write\",\n    value: function write(messages, locale) {\n      var exampleVisitor = new ExampleVisitor();\n      var visitor = new _Visitor$1();\n      var rootNode = new Tag(_MESSAGES_TAG);\n      messages.forEach(function (message) {\n        var attrs = {\n          id: message.id\n        };\n\n        if (message.description) {\n          attrs['desc'] = message.description;\n        }\n\n        if (message.meaning) {\n          attrs['meaning'] = message.meaning;\n        }\n\n        var sourceTags = [];\n        message.sources.forEach(function (source) {\n          sourceTags.push(new Tag(_SOURCE_TAG, {}, [new Text$2(\"\".concat(source.filePath, \":\").concat(source.startLine).concat(source.endLine !== source.startLine ? ',' + source.endLine : ''))]));\n        });\n        rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, [].concat(sourceTags, _toConsumableArray(visitor.serialize(message.nodes)))));\n      });\n      rootNode.children.push(new CR());\n      return serialize([new Declaration({\n        version: '1.0',\n        encoding: 'UTF-8'\n      }), new CR(), new Doctype(_MESSAGES_TAG, _DOCTYPE), new CR(), exampleVisitor.addDefaultExamples(rootNode), new CR()]);\n    }\n  }, {\n    key: \"load\",\n    value: function load(content, url) {\n      throw new Error('Unsupported');\n    }\n  }, {\n    key: \"digest\",\n    value: function digest(message) {\n      return digest$1(message);\n    }\n  }, {\n    key: \"createNameMapper\",\n    value: function createNameMapper(message) {\n      return new SimplePlaceholderMapper(message, toPublicName);\n    }\n  }]);\n\n  return Xmb;\n}(Serializer);\n\nvar _Visitor$1 = /*#__PURE__*/function () {\n  function _Visitor$1() {\n    _classCallCheck(this, _Visitor$1);\n  }\n\n  _createClass(_Visitor$1, [{\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      return [new Text$2(text.value)];\n    }\n  }, {\n    key: \"visitContainer\",\n    value: function visitContainer(container, context) {\n      var _this81 = this;\n\n      var nodes = [];\n      container.children.forEach(function (node) {\n        return nodes.push.apply(nodes, _toConsumableArray(node.visit(_this81)));\n      });\n      return nodes;\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu, context) {\n      var _this82 = this;\n\n      var nodes = [new Text$2(\"{\".concat(icu.expressionPlaceholder, \", \").concat(icu.type, \", \"))];\n      Object.keys(icu.cases).forEach(function (c) {\n        nodes.push.apply(nodes, [new Text$2(\"\".concat(c, \" {\"))].concat(_toConsumableArray(icu.cases[c].visit(_this82)), [new Text$2(\"} \")]));\n      });\n      nodes.push(new Text$2(\"}\"));\n      return nodes;\n    }\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph, context) {\n      var startTagAsText = new Text$2(\"<\".concat(ph.tag, \">\"));\n      var startEx = new Tag(_EXAMPLE_TAG, {}, [startTagAsText]); // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n\n      var startTagPh = new Tag(_PLACEHOLDER_TAG, {\n        name: ph.startName\n      }, [startEx, startTagAsText]);\n\n      if (ph.isVoid) {\n        // void tags have no children nor closing tags\n        return [startTagPh];\n      }\n\n      var closeTagAsText = new Text$2(\"</\".concat(ph.tag, \">\"));\n      var closeEx = new Tag(_EXAMPLE_TAG, {}, [closeTagAsText]); // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n\n      var closeTagPh = new Tag(_PLACEHOLDER_TAG, {\n        name: ph.closeName\n      }, [closeEx, closeTagAsText]);\n      return [startTagPh].concat(_toConsumableArray(this.serialize(ph.children)), [closeTagPh]);\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph, context) {\n      var interpolationAsText = new Text$2(\"{{\".concat(ph.value, \"}}\")); // Example tag needs to be not-empty for TC.\n\n      var exTag = new Tag(_EXAMPLE_TAG, {}, [interpolationAsText]);\n      return [// TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n      new Tag(_PLACEHOLDER_TAG, {\n        name: ph.name\n      }, [exTag, interpolationAsText])];\n    }\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, context) {\n      var icuExpression = ph.value.expression;\n      var icuType = ph.value.type;\n      var icuCases = Object.keys(ph.value.cases).map(function (value) {\n        return value + ' {...}';\n      }).join(' ');\n      var icuAsText = new Text$2(\"{\".concat(icuExpression, \", \").concat(icuType, \", \").concat(icuCases, \"}\"));\n      var exTag = new Tag(_EXAMPLE_TAG, {}, [icuAsText]);\n      return [// TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n      new Tag(_PLACEHOLDER_TAG, {\n        name: ph.name\n      }, [exTag, icuAsText])];\n    }\n  }, {\n    key: \"serialize\",\n    value: function serialize(nodes) {\n      var _ref4,\n          _this83 = this;\n\n      return (_ref4 = []).concat.apply(_ref4, _toConsumableArray(nodes.map(function (node) {\n        return node.visit(_this83);\n      })));\n    }\n  }]);\n\n  return _Visitor$1;\n}();\n\nfunction digest$1(message) {\n  return decimalDigest(message);\n} // TC requires at least one non-empty example on placeholders\n\n\nvar ExampleVisitor = /*#__PURE__*/function () {\n  function ExampleVisitor() {\n    _classCallCheck(this, ExampleVisitor);\n  }\n\n  _createClass(ExampleVisitor, [{\n    key: \"addDefaultExamples\",\n    value: function addDefaultExamples(node) {\n      node.visit(this);\n      return node;\n    }\n  }, {\n    key: \"visitTag\",\n    value: function visitTag(tag) {\n      var _this84 = this;\n\n      if (tag.name === _PLACEHOLDER_TAG) {\n        if (!tag.children || tag.children.length == 0) {\n          var exText = new Text$2(tag.attrs['name'] || '...');\n          tag.children = [new Tag(_EXAMPLE_TAG, {}, [exText])];\n        }\n      } else if (tag.children) {\n        tag.children.forEach(function (node) {\n          return node.visit(_this84);\n        });\n      }\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {}\n  }, {\n    key: \"visitDeclaration\",\n    value: function visitDeclaration(decl) {}\n  }, {\n    key: \"visitDoctype\",\n    value: function visitDoctype(doctype) {}\n  }]);\n\n  return ExampleVisitor;\n}(); // XMB/XTB placeholders can only contain A-Z, 0-9 and _\n\n\nfunction toPublicName(internalName) {\n  return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, '_');\n}\n/**\n * @license\n * Copyright Google LLC 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/* Closure variables holding messages must be named `MSG_[A-Z0-9]+` */\n\n\nvar CLOSURE_TRANSLATION_VAR_PREFIX = 'MSG_';\n/**\n * Prefix for non-`goog.getMsg` i18n-related vars.\n * Note: the prefix uses lowercase characters intentionally due to a Closure behavior that\n * considers variables like `I18N_0` as constants and throws an error when their value changes.\n */\n\nvar TRANSLATION_VAR_PREFIX = 'i18n_';\n/** Name of the i18n attributes **/\n\nvar I18N_ATTR = 'i18n';\nvar I18N_ATTR_PREFIX = 'i18n-';\n/** Prefix of var expressions used in ICUs */\n\nvar I18N_ICU_VAR_PREFIX = 'VAR_';\n/** Prefix of ICU expressions for post processing */\n\nvar I18N_ICU_MAPPING_PREFIX = 'I18N_EXP_';\n/** Placeholder wrapper for i18n expressions **/\n\nvar I18N_PLACEHOLDER_SYMBOL = '�';\n\nfunction isI18nAttribute(name) {\n  return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX);\n}\n\nfunction isI18nRootNode(meta) {\n  return meta instanceof Message;\n}\n\nfunction isSingleI18nIcu(meta) {\n  return isI18nRootNode(meta) && meta.nodes.length === 1 && meta.nodes[0] instanceof Icu$1;\n}\n\nfunction hasI18nMeta(node) {\n  return !!node.i18n;\n}\n\nfunction hasI18nAttrs(element) {\n  return element.attrs.some(function (attr) {\n    return isI18nAttribute(attr.name);\n  });\n}\n\nfunction icuFromI18nMessage(message) {\n  return message.nodes[0];\n}\n\nfunction wrapI18nPlaceholder(content) {\n  var contextId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  var blockId = contextId > 0 ? \":\".concat(contextId) : '';\n  return \"\".concat(I18N_PLACEHOLDER_SYMBOL).concat(content).concat(blockId).concat(I18N_PLACEHOLDER_SYMBOL);\n}\n\nfunction assembleI18nBoundString(strings) {\n  var bindingStartIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  var contextId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n  if (!strings.length) return '';\n  var acc = '';\n  var lastIdx = strings.length - 1;\n\n  for (var i = 0; i < lastIdx; i++) {\n    acc += \"\".concat(strings[i]).concat(wrapI18nPlaceholder(bindingStartIndex + i, contextId));\n  }\n\n  acc += strings[lastIdx];\n  return acc;\n}\n\nfunction getSeqNumberGenerator() {\n  var startsAt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n  var current = startsAt;\n  return function () {\n    return current++;\n  };\n}\n\nfunction placeholdersToParams(placeholders) {\n  var params = {};\n  placeholders.forEach(function (values, key) {\n    params[key] = literal(values.length > 1 ? \"[\".concat(values.join('|'), \"]\") : values[0]);\n  });\n  return params;\n}\n\nfunction updatePlaceholderMap(map, name) {\n  var current = map.get(name) || [];\n\n  for (var _len2 = arguments.length, values = new Array(_len2 > 2 ? _len2 - 2 : 0), _key3 = 2; _key3 < _len2; _key3++) {\n    values[_key3 - 2] = arguments[_key3];\n  }\n\n  current.push.apply(current, values);\n  map.set(name, current);\n}\n\nfunction assembleBoundTextPlaceholders(meta) {\n  var bindingStartIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  var contextId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n  var startIdx = bindingStartIndex;\n  var placeholders = new Map();\n  var node = meta instanceof Message ? meta.nodes.find(function (node) {\n    return node instanceof Container;\n  }) : meta;\n\n  if (node) {\n    node.children.filter(function (child) {\n      return child instanceof Placeholder;\n    }).forEach(function (child, idx) {\n      var content = wrapI18nPlaceholder(startIdx + idx, contextId);\n      updatePlaceholderMap(placeholders, child.name, content);\n    });\n  }\n\n  return placeholders;\n}\n/**\n * Format the placeholder names in a map of placeholders to expressions.\n *\n * The placeholder names are converted from \"internal\" format (e.g. `START_TAG_DIV_1`) to \"external\"\n * format (e.g. `startTagDiv_1`).\n *\n * @param params A map of placeholder names to expressions.\n * @param useCamelCase whether to camelCase the placeholder name when formatting.\n * @returns A new map of formatted placeholder names to expressions.\n */\n\n\nfunction i18nFormatPlaceholderNames() {\n  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var useCamelCase = arguments.length > 1 ? arguments[1] : undefined;\n  var _params = {};\n\n  if (params && Object.keys(params).length) {\n    Object.keys(params).forEach(function (key) {\n      return _params[formatI18nPlaceholderName(key, useCamelCase)] = params[key];\n    });\n  }\n\n  return _params;\n}\n/**\n * Converts internal placeholder names to public-facing format\n * (for example to use in goog.getMsg call).\n * Example: `START_TAG_DIV_1` is converted to `startTagDiv_1`.\n *\n * @param name The placeholder name that should be formatted\n * @returns Formatted placeholder name\n */\n\n\nfunction formatI18nPlaceholderName(name) {\n  var useCamelCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  var publicName = toPublicName(name);\n\n  if (!useCamelCase) {\n    return publicName;\n  }\n\n  var chunks = publicName.split('_');\n\n  if (chunks.length === 1) {\n    // if no \"_\" found - just lowercase the value\n    return name.toLowerCase();\n  }\n\n  var postfix; // eject last element if it's a number\n\n  if (/^\\d+$/.test(chunks[chunks.length - 1])) {\n    postfix = chunks.pop();\n  }\n\n  var raw = chunks.shift().toLowerCase();\n\n  if (chunks.length) {\n    raw += chunks.map(function (c) {\n      return c.charAt(0).toUpperCase() + c.slice(1).toLowerCase();\n    }).join('');\n  }\n\n  return postfix ? \"\".concat(raw, \"_\").concat(postfix) : raw;\n}\n/**\n * Generates a prefix for translation const name.\n *\n * @param extra Additional local prefix that should be injected into translation var name\n * @returns Complete translation const prefix\n */\n\n\nfunction getTranslationConstPrefix(extra) {\n  return \"\".concat(CLOSURE_TRANSLATION_VAR_PREFIX).concat(extra).toUpperCase();\n}\n/**\n * Generate AST to declare a variable. E.g. `var I18N_1;`.\n * @param variable the name of the variable to declare.\n */\n\n\nfunction declareI18nVariable(variable) {\n  return new DeclareVarStmt(variable.name, undefined, INFERRED_TYPE, undefined, variable.sourceSpan);\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Checks whether an object key contains potentially unsafe chars, thus the key should be wrapped in\n * quotes. Note: we do not wrap all keys into quotes, as it may have impact on minification and may\n * bot work in some cases when object keys are mangled by minifier.\n *\n * TODO(FW-1136): this is a temporary solution, we need to come up with a better way of working with\n * inputs that contain potentially unsafe chars.\n */\n\n\nvar UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;\n/** Name of the temporary to use during data binding */\n\nvar TEMPORARY_NAME = '_t';\n/** Name of the context parameter passed into a template function */\n\nvar CONTEXT_NAME = 'ctx';\n/** Name of the RenderFlag passed into a template function */\n\nvar RENDER_FLAGS = 'rf';\n/** The prefix reference variables */\n\nvar REFERENCE_PREFIX = '_r';\n/** The name of the implicit context reference */\n\nvar IMPLICIT_REFERENCE = '$implicit';\n/** Non bindable attribute name **/\n\nvar NON_BINDABLE_ATTR = 'ngNonBindable';\n/** Name for the variable keeping track of the context returned by `ɵɵrestoreView`. */\n\nvar RESTORED_VIEW_CONTEXT_NAME = 'restoredCtx';\n/**\n * Creates an allocator for a temporary variable.\n *\n * A variable declaration is added to the statements the first time the allocator is invoked.\n */\n\nfunction temporaryAllocator(statements, name) {\n  var temp = null;\n  return function () {\n    if (!temp) {\n      statements.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));\n      temp = variable(name);\n    }\n\n    return temp;\n  };\n}\n\nfunction unsupported(feature) {\n  if (this) {\n    throw new Error(\"Builder \".concat(this.constructor.name, \" doesn't support \").concat(feature, \" yet\"));\n  }\n\n  throw new Error(\"Feature \".concat(feature, \" is not supported yet\"));\n}\n\nfunction invalid$1(arg) {\n  throw new Error(\"Invalid state: Visitor \".concat(this.constructor.name, \" doesn't handle \").concat(arg.constructor.name));\n}\n\nfunction asLiteral(value) {\n  if (Array.isArray(value)) {\n    return literalArr(value.map(asLiteral));\n  }\n\n  return literal(value, INFERRED_TYPE);\n}\n\nfunction conditionallyCreateMapObjectLiteral(keys, keepDeclared) {\n  if (Object.getOwnPropertyNames(keys).length > 0) {\n    return mapToExpression(keys, keepDeclared);\n  }\n\n  return null;\n}\n\nfunction mapToExpression(map, keepDeclared) {\n  return literalMap(Object.getOwnPropertyNames(map).map(function (key) {\n    // canonical syntax: `dirProp: publicProp`\n    // if there is no `:`, use dirProp = elProp\n    var value = map[key];\n    var declaredName;\n    var publicName;\n    var minifiedName;\n    var needsDeclaredName;\n\n    if (Array.isArray(value)) {\n      var _value = _slicedToArray(value, 2);\n\n      publicName = _value[0];\n      declaredName = _value[1];\n      minifiedName = key;\n      needsDeclaredName = publicName !== declaredName;\n    } else {\n      var _splitAtColon = splitAtColon(key, [key, value]);\n\n      var _splitAtColon2 = _slicedToArray(_splitAtColon, 2);\n\n      declaredName = _splitAtColon2[0];\n      publicName = _splitAtColon2[1];\n      minifiedName = declaredName; // Only include the declared name if extracted from the key, i.e. the key contains a colon.\n      // Otherwise the declared name should be omitted even if it is different from the public name,\n      // as it may have already been minified.\n\n      needsDeclaredName = publicName !== declaredName && key.includes(':');\n    }\n\n    return {\n      key: minifiedName,\n      // put quotes around keys that contain potentially unsafe characters\n      quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(minifiedName),\n      value: keepDeclared && needsDeclaredName ? literalArr([asLiteral(publicName), asLiteral(declaredName)]) : asLiteral(publicName)\n    };\n  }));\n}\n/**\n *  Remove trailing null nodes as they are implied.\n */\n\n\nfunction trimTrailingNulls(parameters) {\n  while (isNull(parameters[parameters.length - 1])) {\n    parameters.pop();\n  }\n\n  return parameters;\n}\n\nfunction getQueryPredicate(query, constantPool) {\n  if (Array.isArray(query.predicate)) {\n    var predicate = [];\n    query.predicate.forEach(function (selector) {\n      // Each item in predicates array may contain strings with comma-separated refs\n      // (for ex. 'ref, ref1, ..., refN'), thus we extract individual refs and store them\n      // as separate array entities\n      var selectors = selector.split(',').map(function (token) {\n        return literal(token.trim());\n      });\n      predicate.push.apply(predicate, _toConsumableArray(selectors));\n    });\n    return constantPool.getConstLiteral(literalArr(predicate), true);\n  } else {\n    // The original predicate may have been wrapped in a `forwardRef()` call.\n    switch (query.predicate.forwardRef) {\n      case 0\n      /* None */\n      :\n      case 2\n      /* Unwrapped */\n      :\n        return query.predicate.expression;\n\n      case 1\n      /* Wrapped */\n      :\n        return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);\n    }\n  }\n}\n/**\n * A representation for an object literal used during codegen of definition objects. The generic\n * type `T` allows to reference a documented type of the generated structure, such that the\n * property names that are set can be resolved to their documented declaration.\n */\n\n\nvar DefinitionMap = /*#__PURE__*/function () {\n  function DefinitionMap() {\n    _classCallCheck(this, DefinitionMap);\n\n    this.values = [];\n  }\n\n  _createClass(DefinitionMap, [{\n    key: \"set\",\n    value: function set(key, value) {\n      if (value) {\n        this.values.push({\n          key: key,\n          value: value,\n          quoted: false\n        });\n      }\n    }\n  }, {\n    key: \"toLiteralMap\",\n    value: function toLiteralMap() {\n      return literalMap(this.values);\n    }\n  }]);\n\n  return DefinitionMap;\n}();\n/**\n * Extract a map of properties to values for a given element or template node, which can be used\n * by the directive matching machinery.\n *\n * @param elOrTpl the element or template in question\n * @return an object set up for directive matching. For attributes on the element/template, this\n * object maps a property name to its (static) value. For any bindings, this map simply maps the\n * property name to an empty string.\n */\n\n\nfunction getAttrsForDirectiveMatching(elOrTpl) {\n  var attributesMap = {};\n\n  if (elOrTpl instanceof Template && elOrTpl.tagName !== 'ng-template') {\n    elOrTpl.templateAttrs.forEach(function (a) {\n      return attributesMap[a.name] = '';\n    });\n  } else {\n    elOrTpl.attributes.forEach(function (a) {\n      if (!isI18nAttribute(a.name)) {\n        attributesMap[a.name] = a.value;\n      }\n    });\n    elOrTpl.inputs.forEach(function (i) {\n      attributesMap[i.name] = '';\n    });\n    elOrTpl.outputs.forEach(function (o) {\n      attributesMap[o.name] = '';\n    });\n  }\n\n  return attributesMap;\n}\n/** Returns a call expression to a chained instruction, e.g. `property(params[0])(params[1])`. */\n\n\nfunction chainedInstruction(reference, calls, span) {\n  var expression = importExpr(reference, null, span);\n\n  if (calls.length > 0) {\n    for (var i = 0; i < calls.length; i++) {\n      expression = expression.callFn(calls[i], span);\n    }\n  } else {\n    // Add a blank invocation, in case the `calls` array is empty.\n    expression = expression.callFn([], span);\n  }\n\n  return expression;\n}\n/**\n * Gets the number of arguments expected to be passed to a generated instruction in the case of\n * interpolation instructions.\n * @param interpolation An interpolation ast\n */\n\n\nfunction getInterpolationArgsLength(interpolation) {\n  var expressions = interpolation.expressions,\n      strings = interpolation.strings;\n\n  if (expressions.length === 1 && strings.length === 2 && strings[0] === '' && strings[1] === '') {\n    // If the interpolation has one interpolated value, but the prefix and suffix are both empty\n    // strings, we only pass one argument, to a special instruction like `propertyInterpolate` or\n    // `textInterpolate`.\n    return 1;\n  } else {\n    return expressions.length + strings.length;\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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\nfunction _compileInjectable(meta, resolveForwardRefs) {\n  var result = null;\n  var factoryMeta = {\n    name: meta.name,\n    type: meta.type,\n    internalType: meta.internalType,\n    typeArgumentCount: meta.typeArgumentCount,\n    deps: [],\n    target: FactoryTarget.Injectable\n  };\n\n  if (meta.useClass !== undefined) {\n    // meta.useClass has two modes of operation. Either deps are specified, in which case `new` is\n    // used to instantiate the class with dependencies injected, or deps are not specified and\n    // the factory of the class is used to instantiate it.\n    //\n    // A special case exists for useClass: Type where Type is the injectable type itself and no\n    // deps are specified, in which case 'useClass' is effectively ignored.\n    var useClassOnSelf = meta.useClass.expression.isEquivalent(meta.internalType);\n    var deps = undefined;\n\n    if (meta.deps !== undefined) {\n      deps = meta.deps;\n    }\n\n    if (deps !== undefined) {\n      // factory: () => new meta.useClass(...deps)\n      result = compileFactoryFunction(Object.assign(Object.assign({}, factoryMeta), {\n        delegate: meta.useClass.expression,\n        delegateDeps: deps,\n        delegateType: R3FactoryDelegateType.Class\n      }));\n    } else if (useClassOnSelf) {\n      result = compileFactoryFunction(factoryMeta);\n    } else {\n      result = {\n        statements: [],\n        expression: delegateToFactory(meta.type.value, meta.useClass.expression, resolveForwardRefs)\n      };\n    }\n  } else if (meta.useFactory !== undefined) {\n    if (meta.deps !== undefined) {\n      result = compileFactoryFunction(Object.assign(Object.assign({}, factoryMeta), {\n        delegate: meta.useFactory,\n        delegateDeps: meta.deps || [],\n        delegateType: R3FactoryDelegateType.Function\n      }));\n    } else {\n      result = {\n        statements: [],\n        expression: fn([], [new ReturnStatement(meta.useFactory.callFn([]))])\n      };\n    }\n  } else if (meta.useValue !== undefined) {\n    // Note: it's safe to use `meta.useValue` instead of the `USE_VALUE in meta` check used for\n    // client code because meta.useValue is an Expression which will be defined even if the actual\n    // value is undefined.\n    result = compileFactoryFunction(Object.assign(Object.assign({}, factoryMeta), {\n      expression: meta.useValue.expression\n    }));\n  } else if (meta.useExisting !== undefined) {\n    // useExisting is an `inject` call on the existing token.\n    result = compileFactoryFunction(Object.assign(Object.assign({}, factoryMeta), {\n      expression: importExpr(Identifiers.inject).callFn([meta.useExisting.expression])\n    }));\n  } else {\n    result = {\n      statements: [],\n      expression: delegateToFactory(meta.type.value, meta.internalType, resolveForwardRefs)\n    };\n  }\n\n  var token = meta.internalType;\n  var injectableProps = new DefinitionMap();\n  injectableProps.set('token', token);\n  injectableProps.set('factory', result.expression); // Only generate providedIn property if it has a non-null value\n\n  if (meta.providedIn.expression.value !== null) {\n    injectableProps.set('providedIn', convertFromMaybeForwardRefExpression(meta.providedIn));\n  }\n\n  var expression = importExpr(Identifiers.ɵɵdefineInjectable).callFn([injectableProps.toLiteralMap()], undefined, true);\n  return {\n    expression: expression,\n    type: createInjectableType(meta),\n    statements: result.statements\n  };\n}\n\nfunction createInjectableType(meta) {\n  return new ExpressionType(importExpr(Identifiers.InjectableDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount)]));\n}\n\nfunction delegateToFactory(type, internalType, unwrapForwardRefs) {\n  if (type.node === internalType.node) {\n    // The types are the same, so we can simply delegate directly to the type's factory.\n    // ```\n    // factory: type.ɵfac\n    // ```\n    return internalType.prop('ɵfac');\n  }\n\n  if (!unwrapForwardRefs) {\n    // The type is not wrapped in a `forwardRef()`, so we create a simple factory function that\n    // accepts a sub-type as an argument.\n    // ```\n    // factory: function(t) { return internalType.ɵfac(t); }\n    // ```\n    return createFactoryFunction(internalType);\n  } // The internalType is actually wrapped in a `forwardRef()` so we need to resolve that before\n  // calling its factory.\n  // ```\n  // factory: function(t) { return core.resolveForwardRef(type).ɵfac(t); }\n  // ```\n\n\n  var unwrappedType = importExpr(Identifiers.resolveForwardRef).callFn([internalType]);\n  return createFactoryFunction(unwrappedType);\n}\n\nfunction createFactoryFunction(type) {\n  return fn([new FnParam('t', DYNAMIC_TYPE)], [new ReturnStatement(type.callMethod('ɵfac', [variable('t')]))]);\n}\n/**\n * @license\n * Copyright Google LLC 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\nfunction assertArrayOfStrings(identifier, value) {\n  if (value == null) {\n    return;\n  }\n\n  if (!Array.isArray(value)) {\n    throw new Error(\"Expected '\".concat(identifier, \"' to be an array of strings.\"));\n  }\n\n  for (var i = 0; i < value.length; i += 1) {\n    if (typeof value[i] !== 'string') {\n      throw new Error(\"Expected '\".concat(identifier, \"' to be an array of strings.\"));\n    }\n  }\n}\n\nvar UNUSABLE_INTERPOLATION_REGEXPS = [/^\\s*$/, /[<>]/, /^[{}]$/, /&(#|[a-z])/i, /^\\/\\// // comment\n];\n\nfunction assertInterpolationSymbols(identifier, value) {\n  if (value != null && !(Array.isArray(value) && value.length == 2)) {\n    throw new Error(\"Expected '\".concat(identifier, \"' to be an array, [start, end].\"));\n  } else if (value != null) {\n    var start = value[0];\n    var end = value[1]; // Check for unusable interpolation symbols\n\n    UNUSABLE_INTERPOLATION_REGEXPS.forEach(function (regexp) {\n      if (regexp.test(start) || regexp.test(end)) {\n        throw new Error(\"['\".concat(start, \"', '\").concat(end, \"'] contains unusable interpolation symbol.\"));\n      }\n    });\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar InterpolationConfig = /*#__PURE__*/function () {\n  function InterpolationConfig(start, end) {\n    _classCallCheck(this, InterpolationConfig);\n\n    this.start = start;\n    this.end = end;\n  }\n\n  _createClass(InterpolationConfig, null, [{\n    key: \"fromArray\",\n    value: function fromArray(markers) {\n      if (!markers) {\n        return DEFAULT_INTERPOLATION_CONFIG;\n      }\n\n      assertInterpolationSymbols('interpolation', markers);\n      return new InterpolationConfig(markers[0], markers[1]);\n    }\n  }]);\n\n  return InterpolationConfig;\n}();\n\nvar DEFAULT_INTERPOLATION_CONFIG = /*@__PURE__*/new InterpolationConfig('{{', '}}');\n/**\n * @license\n * Copyright Google LLC 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/**\n * A token representing the a reference to a static type.\n *\n * This token is unique for a filePath and name and can be used as a hash table key.\n */\n\nvar StaticSymbol = /*#__PURE__*/function () {\n  function StaticSymbol(filePath, name, members) {\n    _classCallCheck(this, StaticSymbol);\n\n    this.filePath = filePath;\n    this.name = name;\n    this.members = members;\n  }\n\n  _createClass(StaticSymbol, [{\n    key: \"assertNoMembers\",\n    value: function assertNoMembers() {\n      if (this.members.length) {\n        throw new Error(\"Illegal state: symbol without members expected, but got \".concat(JSON.stringify(this), \".\"));\n      }\n    }\n  }]);\n\n  return StaticSymbol;\n}();\n/**\n * A cache of static symbol used by the StaticReflector to return the same symbol for the\n * same symbol values.\n */\n\n\nvar StaticSymbolCache = /*#__PURE__*/function () {\n  function StaticSymbolCache() {\n    _classCallCheck(this, StaticSymbolCache);\n\n    this.cache = new Map();\n  }\n\n  _createClass(StaticSymbolCache, [{\n    key: \"get\",\n    value: function get(declarationFile, name, members) {\n      members = members || [];\n      var memberSuffix = members.length ? \".\".concat(members.join('.')) : '';\n      var key = \"\\\"\".concat(declarationFile, \"\\\".\").concat(name).concat(memberSuffix);\n      var result = this.cache.get(key);\n\n      if (!result) {\n        result = new StaticSymbol(declarationFile, name, members);\n        this.cache.set(key, result);\n      }\n\n      return result;\n    }\n  }]);\n\n  return StaticSymbolCache;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar $EOF = 0;\nvar $BSPACE = 8;\nvar $TAB = 9;\nvar $LF = 10;\nvar $VTAB = 11;\nvar $FF = 12;\nvar $CR = 13;\nvar $SPACE = 32;\nvar $BANG = 33;\nvar $DQ = 34;\nvar $HASH = 35;\nvar $$ = 36;\nvar $PERCENT = 37;\nvar $AMPERSAND = 38;\nvar $SQ = 39;\nvar $LPAREN = 40;\nvar $RPAREN = 41;\nvar $STAR = 42;\nvar $PLUS = 43;\nvar $COMMA = 44;\nvar $MINUS = 45;\nvar $PERIOD = 46;\nvar $SLASH = 47;\nvar $COLON = 58;\nvar $SEMICOLON = 59;\nvar $LT = 60;\nvar $EQ = 61;\nvar $GT = 62;\nvar $QUESTION = 63;\nvar $0 = 48;\nvar $7 = 55;\nvar $9 = 57;\nvar $A = 65;\nvar $E = 69;\nvar $F = 70;\nvar $X = 88;\nvar $Z = 90;\nvar $LBRACKET = 91;\nvar $BACKSLASH = 92;\nvar $RBRACKET = 93;\nvar $CARET = 94;\nvar $_ = 95;\nvar $a = 97;\nvar $b = 98;\nvar $e = 101;\nvar $f = 102;\nvar $n = 110;\nvar $r = 114;\nvar $t = 116;\nvar $u = 117;\nvar $v = 118;\nvar $x = 120;\nvar $z = 122;\nvar $LBRACE = 123;\nvar $BAR = 124;\nvar $RBRACE = 125;\nvar $NBSP = 160;\nvar $PIPE = 124;\nvar $TILDA = 126;\nvar $AT = 64;\nvar $BT = 96;\n\nfunction isWhitespace(code) {\n  return code >= $TAB && code <= $SPACE || code == $NBSP;\n}\n\nfunction isDigit(code) {\n  return $0 <= code && code <= $9;\n}\n\nfunction isAsciiLetter(code) {\n  return code >= $a && code <= $z || code >= $A && code <= $Z;\n}\n\nfunction isAsciiHexDigit(code) {\n  return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);\n}\n\nfunction isNewLine(code) {\n  return code === $LF || code === $CR;\n}\n\nfunction isOctalDigit(code) {\n  return $0 <= code && code <= $7;\n}\n\nfunction isQuote(code) {\n  return code === $SQ || code === $DQ || code === $BT;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar ParseLocation = /*#__PURE__*/function () {\n  function ParseLocation(file, offset, line, col) {\n    _classCallCheck(this, ParseLocation);\n\n    this.file = file;\n    this.offset = offset;\n    this.line = line;\n    this.col = col;\n  }\n\n  _createClass(ParseLocation, [{\n    key: \"toString\",\n    value: function toString() {\n      return this.offset != null ? \"\".concat(this.file.url, \"@\").concat(this.line, \":\").concat(this.col) : this.file.url;\n    }\n  }, {\n    key: \"moveBy\",\n    value: function moveBy(delta) {\n      var source = this.file.content;\n      var len = source.length;\n      var offset = this.offset;\n      var line = this.line;\n      var col = this.col;\n\n      while (offset > 0 && delta < 0) {\n        offset--;\n        delta++;\n        var ch = source.charCodeAt(offset);\n\n        if (ch == $LF) {\n          line--;\n          var priorLine = source.substr(0, offset - 1).lastIndexOf(String.fromCharCode($LF));\n          col = priorLine > 0 ? offset - priorLine : offset;\n        } else {\n          col--;\n        }\n      }\n\n      while (offset < len && delta > 0) {\n        var _ch = source.charCodeAt(offset);\n\n        offset++;\n        delta--;\n\n        if (_ch == $LF) {\n          line++;\n          col = 0;\n        } else {\n          col++;\n        }\n      }\n\n      return new ParseLocation(this.file, offset, line, col);\n    } // Return the source around the location\n    // Up to `maxChars` or `maxLines` on each side of the location\n\n  }, {\n    key: \"getContext\",\n    value: function getContext(maxChars, maxLines) {\n      var content = this.file.content;\n      var startOffset = this.offset;\n\n      if (startOffset != null) {\n        if (startOffset > content.length - 1) {\n          startOffset = content.length - 1;\n        }\n\n        var endOffset = startOffset;\n        var ctxChars = 0;\n        var ctxLines = 0;\n\n        while (ctxChars < maxChars && startOffset > 0) {\n          startOffset--;\n          ctxChars++;\n\n          if (content[startOffset] == '\\n') {\n            if (++ctxLines == maxLines) {\n              break;\n            }\n          }\n        }\n\n        ctxChars = 0;\n        ctxLines = 0;\n\n        while (ctxChars < maxChars && endOffset < content.length - 1) {\n          endOffset++;\n          ctxChars++;\n\n          if (content[endOffset] == '\\n') {\n            if (++ctxLines == maxLines) {\n              break;\n            }\n          }\n        }\n\n        return {\n          before: content.substring(startOffset, this.offset),\n          after: content.substring(this.offset, endOffset + 1)\n        };\n      }\n\n      return null;\n    }\n  }]);\n\n  return ParseLocation;\n}();\n\nvar ParseSourceFile = /*#__PURE__*/_createClass(function ParseSourceFile(content, url) {\n  _classCallCheck(this, ParseSourceFile);\n\n  this.content = content;\n  this.url = url;\n});\n\nvar ParseSourceSpan = /*#__PURE__*/function () {\n  /**\n   * Create an object that holds information about spans of tokens/nodes captured during\n   * lexing/parsing of text.\n   *\n   * @param start\n   * The location of the start of the span (having skipped leading trivia).\n   * Skipping leading trivia makes source-spans more \"user friendly\", since things like HTML\n   * elements will appear to begin at the start of the opening tag, rather than at the start of any\n   * leading trivia, which could include newlines.\n   *\n   * @param end\n   * The location of the end of the span.\n   *\n   * @param fullStart\n   * The start of the token without skipping the leading trivia.\n   * This is used by tooling that splits tokens further, such as extracting Angular interpolations\n   * from text tokens. Such tooling creates new source-spans relative to the original token's\n   * source-span. If leading trivia characters have been skipped then the new source-spans may be\n   * incorrectly offset.\n   *\n   * @param details\n   * Additional information (such as identifier names) that should be associated with the span.\n   */\n  function ParseSourceSpan(start, end) {\n    var fullStart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : start;\n    var details = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n    _classCallCheck(this, ParseSourceSpan);\n\n    this.start = start;\n    this.end = end;\n    this.fullStart = fullStart;\n    this.details = details;\n  }\n\n  _createClass(ParseSourceSpan, [{\n    key: \"toString\",\n    value: function toString() {\n      return this.start.file.content.substring(this.start.offset, this.end.offset);\n    }\n  }]);\n\n  return ParseSourceSpan;\n}();\n\nvar ParseErrorLevel = /*@__PURE__*/function (ParseErrorLevel) {\n  ParseErrorLevel[ParseErrorLevel[\"WARNING\"] = 0] = \"WARNING\";\n  ParseErrorLevel[ParseErrorLevel[\"ERROR\"] = 1] = \"ERROR\";\n  return ParseErrorLevel;\n}({});\n\nvar ParseError = /*#__PURE__*/function () {\n  function ParseError(span, msg) {\n    var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ParseErrorLevel.ERROR;\n\n    _classCallCheck(this, ParseError);\n\n    this.span = span;\n    this.msg = msg;\n    this.level = level;\n  }\n\n  _createClass(ParseError, [{\n    key: \"contextualMessage\",\n    value: function contextualMessage() {\n      var ctx = this.span.start.getContext(100, 3);\n      return ctx ? \"\".concat(this.msg, \" (\\\"\").concat(ctx.before, \"[\").concat(ParseErrorLevel[this.level], \" ->]\").concat(ctx.after, \"\\\")\") : this.msg;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var details = this.span.details ? \", \".concat(this.span.details) : '';\n      return \"\".concat(this.contextualMessage(), \": \").concat(this.span.start).concat(details);\n    }\n  }]);\n\n  return ParseError;\n}();\n\nfunction typeSourceSpan(kind, type) {\n  var moduleUrl = identifierModuleUrl(type);\n  var sourceFileName = moduleUrl != null ? \"in \".concat(kind, \" \").concat(identifierName(type), \" in \").concat(moduleUrl) : \"in \".concat(kind, \" \").concat(identifierName(type));\n  var sourceFile = new ParseSourceFile('', sourceFileName);\n  return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));\n}\n/**\n * Generates Source Span object for a given R3 Type for JIT mode.\n *\n * @param kind Component or Directive.\n * @param typeName name of the Component or Directive.\n * @param sourceUrl reference to Component or Directive source.\n * @returns instance of ParseSourceSpan that represent a given Component or Directive.\n */\n\n\nfunction r3JitTypeSourceSpan(kind, typeName, sourceUrl) {\n  var sourceFileName = \"in \".concat(kind, \" \").concat(typeName, \" in \").concat(sourceUrl);\n  var sourceFile = new ParseSourceFile('', sourceFileName);\n  return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));\n}\n\nfunction syntaxError(msg, parseErrors) {\n  var error = Error(msg);\n  error[ERROR_SYNTAX_ERROR] = true;\n  if (parseErrors) error[ERROR_PARSE_ERRORS] = parseErrors;\n  return error;\n}\n\nvar ERROR_SYNTAX_ERROR = 'ngSyntaxError';\nvar ERROR_PARSE_ERRORS = 'ngParseErrors';\n\nfunction isSyntaxError(error) {\n  return error[ERROR_SYNTAX_ERROR];\n}\n\nfunction getParseErrors(error) {\n  return error[ERROR_PARSE_ERRORS] || [];\n}\n\nvar _anonymousTypeIndex = 0;\n\nfunction identifierName(compileIdentifier) {\n  if (!compileIdentifier || !compileIdentifier.reference) {\n    return null;\n  }\n\n  var ref = compileIdentifier.reference;\n\n  if (ref instanceof StaticSymbol) {\n    return ref.name;\n  }\n\n  if (ref['__anonymousType']) {\n    return ref['__anonymousType'];\n  }\n\n  if (ref['__forward_ref__']) {\n    // We do not want to try to stringify a `forwardRef()` function because that would cause the\n    // inner function to be evaluated too early, defeating the whole point of the `forwardRef`.\n    return '__forward_ref__';\n  }\n\n  var identifier = stringify(ref);\n\n  if (identifier.indexOf('(') >= 0) {\n    // case: anonymous functions!\n    identifier = \"anonymous_\".concat(_anonymousTypeIndex++);\n    ref['__anonymousType'] = identifier;\n  } else {\n    identifier = sanitizeIdentifier(identifier);\n  }\n\n  return identifier;\n}\n\nfunction identifierModuleUrl(compileIdentifier) {\n  var ref = compileIdentifier.reference;\n\n  if (ref instanceof StaticSymbol) {\n    return ref.filePath;\n  } // Runtime type\n\n\n  return \"./\".concat(stringify(ref));\n}\n\nfunction sanitizeIdentifier(name) {\n  return name.replace(/\\W/g, '_');\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * In TypeScript, tagged template functions expect a \"template object\", which is an array of\n * \"cooked\" strings plus a `raw` property that contains an array of \"raw\" strings. This is\n * typically constructed with a function called `__makeTemplateObject(cooked, raw)`, but it may not\n * be available in all environments.\n *\n * This is a JavaScript polyfill that uses __makeTemplateObject when it's available, but otherwise\n * creates an inline helper with the same functionality.\n *\n * In the inline function, if `Object.defineProperty` is available we use that to attach the `raw`\n * array.\n */\n\n\nvar makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,\"raw\",{value:t}):e.raw=t,e})';\n\nvar AbstractJsEmitterVisitor = /*#__PURE__*/function (_AbstractEmitterVisit) {\n  _inherits(AbstractJsEmitterVisitor, _AbstractEmitterVisit);\n\n  var _super52 = _createSuper(AbstractJsEmitterVisitor);\n\n  function AbstractJsEmitterVisitor() {\n    _classCallCheck(this, AbstractJsEmitterVisitor);\n\n    return _super52.call(this, false);\n  }\n\n  _createClass(AbstractJsEmitterVisitor, [{\n    key: \"visitDeclareClassStmt\",\n    value: function visitDeclareClassStmt(stmt, ctx) {\n      var _this85 = this;\n\n      ctx.pushClass(stmt);\n\n      this._visitClassConstructor(stmt, ctx);\n\n      if (stmt.parent != null) {\n        ctx.print(stmt, \"\".concat(stmt.name, \".prototype = Object.create(\"));\n        stmt.parent.visitExpression(this, ctx);\n        ctx.println(stmt, \".prototype);\");\n      }\n\n      stmt.getters.forEach(function (getter) {\n        return _this85._visitClassGetter(stmt, getter, ctx);\n      });\n      stmt.methods.forEach(function (method) {\n        return _this85._visitClassMethod(stmt, method, ctx);\n      });\n      ctx.popClass();\n      return null;\n    }\n  }, {\n    key: \"_visitClassConstructor\",\n    value: function _visitClassConstructor(stmt, ctx) {\n      ctx.print(stmt, \"function \".concat(stmt.name, \"(\"));\n\n      if (stmt.constructorMethod != null) {\n        this._visitParams(stmt.constructorMethod.params, ctx);\n      }\n\n      ctx.println(stmt, \") {\");\n      ctx.incIndent();\n\n      if (stmt.constructorMethod != null) {\n        if (stmt.constructorMethod.body.length > 0) {\n          ctx.println(stmt, \"var self = this;\");\n          this.visitAllStatements(stmt.constructorMethod.body, ctx);\n        }\n      }\n\n      ctx.decIndent();\n      ctx.println(stmt, \"}\");\n    }\n  }, {\n    key: \"_visitClassGetter\",\n    value: function _visitClassGetter(stmt, getter, ctx) {\n      ctx.println(stmt, \"Object.defineProperty(\".concat(stmt.name, \".prototype, '\").concat(getter.name, \"', { get: function() {\"));\n      ctx.incIndent();\n\n      if (getter.body.length > 0) {\n        ctx.println(stmt, \"var self = this;\");\n        this.visitAllStatements(getter.body, ctx);\n      }\n\n      ctx.decIndent();\n      ctx.println(stmt, \"}});\");\n    }\n  }, {\n    key: \"_visitClassMethod\",\n    value: function _visitClassMethod(stmt, method, ctx) {\n      ctx.print(stmt, \"\".concat(stmt.name, \".prototype.\").concat(method.name, \" = function(\"));\n\n      this._visitParams(method.params, ctx);\n\n      ctx.println(stmt, \") {\");\n      ctx.incIndent();\n\n      if (method.body.length > 0) {\n        ctx.println(stmt, \"var self = this;\");\n        this.visitAllStatements(method.body, ctx);\n      }\n\n      ctx.decIndent();\n      ctx.println(stmt, \"};\");\n    }\n  }, {\n    key: \"visitWrappedNodeExpr\",\n    value: function visitWrappedNodeExpr(ast, ctx) {\n      throw new Error('Cannot emit a WrappedNodeExpr in Javascript.');\n    }\n  }, {\n    key: \"visitReadVarExpr\",\n    value: function visitReadVarExpr(ast, ctx) {\n      if (ast.builtin === BuiltinVar.This) {\n        ctx.print(ast, 'self');\n      } else if (ast.builtin === BuiltinVar.Super) {\n        throw new Error(\"'super' needs to be handled at a parent ast node, not at the variable level!\");\n      } else {\n        _get(_getPrototypeOf(AbstractJsEmitterVisitor.prototype), \"visitReadVarExpr\", this).call(this, ast, ctx);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitDeclareVarStmt\",\n    value: function visitDeclareVarStmt(stmt, ctx) {\n      ctx.print(stmt, \"var \".concat(stmt.name));\n\n      if (stmt.value) {\n        ctx.print(stmt, ' = ');\n        stmt.value.visitExpression(this, ctx);\n      }\n\n      ctx.println(stmt, \";\");\n      return null;\n    }\n  }, {\n    key: \"visitCastExpr\",\n    value: function visitCastExpr(ast, ctx) {\n      ast.value.visitExpression(this, ctx);\n      return null;\n    }\n  }, {\n    key: \"visitInvokeFunctionExpr\",\n    value: function visitInvokeFunctionExpr(expr, ctx) {\n      var fnExpr = expr.fn;\n\n      if (fnExpr instanceof ReadVarExpr && fnExpr.builtin === BuiltinVar.Super) {\n        ctx.currentClass.parent.visitExpression(this, ctx);\n        ctx.print(expr, \".call(this\");\n\n        if (expr.args.length > 0) {\n          ctx.print(expr, \", \");\n          this.visitAllExpressions(expr.args, ctx, ',');\n        }\n\n        ctx.print(expr, \")\");\n      } else {\n        _get(_getPrototypeOf(AbstractJsEmitterVisitor.prototype), \"visitInvokeFunctionExpr\", this).call(this, expr, ctx);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitTaggedTemplateExpr\",\n    value: function visitTaggedTemplateExpr(ast, ctx) {\n      var _this86 = this;\n\n      // The following convoluted piece of code is effectively the downlevelled equivalent of\n      // ```\n      // tag`...`\n      // ```\n      // which is effectively like:\n      // ```\n      // tag(__makeTemplateObject(cooked, raw), expression1, expression2, ...);\n      // ```\n      var elements = ast.template.elements;\n      ast.tag.visitExpression(this, ctx);\n      ctx.print(ast, \"(\".concat(makeTemplateObjectPolyfill, \"(\"));\n      ctx.print(ast, \"[\".concat(elements.map(function (part) {\n        return escapeIdentifier(part.text, false);\n      }).join(', '), \"], \"));\n      ctx.print(ast, \"[\".concat(elements.map(function (part) {\n        return escapeIdentifier(part.rawText, false);\n      }).join(', '), \"])\"));\n      ast.template.expressions.forEach(function (expression) {\n        ctx.print(ast, ', ');\n        expression.visitExpression(_this86, ctx);\n      });\n      ctx.print(ast, ')');\n      return null;\n    }\n  }, {\n    key: \"visitFunctionExpr\",\n    value: function visitFunctionExpr(ast, ctx) {\n      ctx.print(ast, \"function\".concat(ast.name ? ' ' + ast.name : '', \"(\"));\n\n      this._visitParams(ast.params, ctx);\n\n      ctx.println(ast, \") {\");\n      ctx.incIndent();\n      this.visitAllStatements(ast.statements, ctx);\n      ctx.decIndent();\n      ctx.print(ast, \"}\");\n      return null;\n    }\n  }, {\n    key: \"visitDeclareFunctionStmt\",\n    value: function visitDeclareFunctionStmt(stmt, ctx) {\n      ctx.print(stmt, \"function \".concat(stmt.name, \"(\"));\n\n      this._visitParams(stmt.params, ctx);\n\n      ctx.println(stmt, \") {\");\n      ctx.incIndent();\n      this.visitAllStatements(stmt.statements, ctx);\n      ctx.decIndent();\n      ctx.println(stmt, \"}\");\n      return null;\n    }\n  }, {\n    key: \"visitTryCatchStmt\",\n    value: function visitTryCatchStmt(stmt, ctx) {\n      ctx.println(stmt, \"try {\");\n      ctx.incIndent();\n      this.visitAllStatements(stmt.bodyStmts, ctx);\n      ctx.decIndent();\n      ctx.println(stmt, \"} catch (\".concat(CATCH_ERROR_VAR$1.name, \") {\"));\n      ctx.incIndent();\n      var catchStmts = [CATCH_STACK_VAR$1.set(CATCH_ERROR_VAR$1.prop('stack')).toDeclStmt(null, [StmtModifier.Final])].concat(stmt.catchStmts);\n      this.visitAllStatements(catchStmts, ctx);\n      ctx.decIndent();\n      ctx.println(stmt, \"}\");\n      return null;\n    }\n  }, {\n    key: \"visitLocalizedString\",\n    value: function visitLocalizedString(ast, ctx) {\n      var _this87 = this;\n\n      // The following convoluted piece of code is effectively the downlevelled equivalent of\n      // ```\n      // $localize `...`\n      // ```\n      // which is effectively like:\n      // ```\n      // $localize(__makeTemplateObject(cooked, raw), expression1, expression2, ...);\n      // ```\n      ctx.print(ast, \"$localize(\".concat(makeTemplateObjectPolyfill, \"(\"));\n      var parts = [ast.serializeI18nHead()];\n\n      for (var i = 1; i < ast.messageParts.length; i++) {\n        parts.push(ast.serializeI18nTemplatePart(i));\n      }\n\n      ctx.print(ast, \"[\".concat(parts.map(function (part) {\n        return escapeIdentifier(part.cooked, false);\n      }).join(', '), \"], \"));\n      ctx.print(ast, \"[\".concat(parts.map(function (part) {\n        return escapeIdentifier(part.raw, false);\n      }).join(', '), \"])\"));\n      ast.expressions.forEach(function (expression) {\n        ctx.print(ast, ', ');\n        expression.visitExpression(_this87, ctx);\n      });\n      ctx.print(ast, ')');\n      return null;\n    }\n  }, {\n    key: \"_visitParams\",\n    value: function _visitParams(params, ctx) {\n      this.visitAllObjects(function (param) {\n        return ctx.print(null, param.name);\n      }, params, ctx, ',');\n    }\n  }, {\n    key: \"getBuiltinMethodName\",\n    value: function getBuiltinMethodName(method) {\n      var name;\n\n      switch (method) {\n        case BuiltinMethod.ConcatArray:\n          name = 'concat';\n          break;\n\n        case BuiltinMethod.SubscribeObservable:\n          name = 'subscribe';\n          break;\n\n        case BuiltinMethod.Bind:\n          name = 'bind';\n          break;\n\n        default:\n          throw new Error(\"Unknown builtin method: \".concat(method));\n      }\n\n      return name;\n    }\n  }]);\n\n  return AbstractJsEmitterVisitor;\n}(AbstractEmitterVisitor);\n/**\n * @license\n * Copyright Google LLC 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/**\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 */\n\n\nvar policy;\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 */\n\nfunction getPolicy() {\n  if (policy === undefined) {\n    policy = null;\n\n    if (_global.trustedTypes) {\n      try {\n        policy = _global.trustedTypes.createPolicy('angular#unsafe-jit', {\n          createScript: function createScript(s) {\n            return s;\n          }\n        });\n      } catch (_a) {// trustedTypes.createPolicy throws if called with a name that is\n        // already registered, even in report-only mode. Until the API changes,\n        // catch the error not to break the applications functionally. In such\n        // cases, the code will fall back to using strings.\n      }\n    }\n  }\n\n  return policy;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\n\n\nfunction trustedScriptFromString(script) {\n  var _a;\n\n  return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script;\n}\n/**\n * Unsafely call the Function constructor with the given string arguments.\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 it\n * is only called from the JIT compiler, as use in other code can lead to XSS\n * vulnerabilities.\n */\n\n\nfunction newTrustedFunctionForJIT() {\n  for (var _len3 = arguments.length, args = new Array(_len3), _key4 = 0; _key4 < _len3; _key4++) {\n    args[_key4] = arguments[_key4];\n  }\n\n  if (!_global.trustedTypes) {\n    // In environments that don't support Trusted Types, fall back to the most\n    // straightforward implementation:\n    return _construct(Function, args);\n  } // Chrome currently does not support passing TrustedScript to the Function\n  // constructor. The following implements the workaround proposed on the page\n  // below, where the Chromium bug is also referenced:\n  // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n\n\n  var fnArgs = args.slice(0, -1).join(',');\n  var fnBody = args[args.length - 1];\n  var body = \"(function anonymous(\".concat(fnArgs, \"\\n) { \").concat(fnBody, \"\\n})\"); // Using eval directly confuses the compiler and prevents this module from\n  // being stripped out of JS binaries even if not used. The global['eval']\n  // indirection fixes that.\n\n  var fn = _global['eval'](trustedScriptFromString(body));\n\n  if (fn.bind === undefined) {\n    // Workaround for a browser bug that only exists in Chrome 83, where passing\n    // a TrustedScript to eval just returns the TrustedScript back without\n    // evaluating it. In that case, fall back to the most straightforward\n    // implementation:\n    return _construct(Function, args);\n  } // To completely mimic the behavior of calling \"new Function\", two more\n  // things need to happen:\n  // 1. Stringifying the resulting function should return its source code\n\n\n  fn.toString = function () {\n    return body;\n  }; // 2. When calling the resulting function, `this` should refer to `global`\n\n\n  return fn.bind(_global); // When Trusted Types support in Function constructors is widely available,\n  // the implementation of this function can be simplified to:\n  // return new Function(...args.map(a => trustedScriptFromString(a)));\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * A helper class to manage the evaluation of JIT generated code.\n */\n\n\nvar JitEvaluator = /*#__PURE__*/function () {\n  function JitEvaluator() {\n    _classCallCheck(this, JitEvaluator);\n  }\n\n  _createClass(JitEvaluator, [{\n    key: \"evaluateStatements\",\n    value:\n    /**\n     *\n     * @param sourceUrl The URL of the generated code.\n     * @param statements An array of Angular statement AST nodes to be evaluated.\n     * @param reflector A helper used when converting the statements to executable code.\n     * @param createSourceMaps If true then create a source-map for the generated code and include it\n     * inline as a source-map comment.\n     * @returns A map of all the variables in the generated code.\n     */\n    function evaluateStatements(sourceUrl, statements, reflector, createSourceMaps) {\n      var converter = new JitEmitterVisitor(reflector);\n      var ctx = EmitterVisitorContext.createRoot(); // Ensure generated code is in strict mode\n\n      if (statements.length > 0 && !isUseStrictStatement(statements[0])) {\n        statements = [literal('use strict').toStmt()].concat(_toConsumableArray(statements));\n      }\n\n      converter.visitAllStatements(statements, ctx);\n      converter.createReturnStmt(ctx);\n      return this.evaluateCode(sourceUrl, ctx, converter.getArgs(), createSourceMaps);\n    }\n    /**\n     * Evaluate a piece of JIT generated code.\n     * @param sourceUrl The URL of this generated code.\n     * @param ctx A context object that contains an AST of the code to be evaluated.\n     * @param vars A map containing the names and values of variables that the evaluated code might\n     * reference.\n     * @param createSourceMap If true then create a source-map for the generated code and include it\n     * inline as a source-map comment.\n     * @returns The result of evaluating the code.\n     */\n\n  }, {\n    key: \"evaluateCode\",\n    value: function evaluateCode(sourceUrl, ctx, vars, createSourceMap) {\n      var fnBody = \"\\\"use strict\\\";\".concat(ctx.toSource(), \"\\n//# sourceURL=\").concat(sourceUrl);\n      var fnArgNames = [];\n      var fnArgValues = [];\n\n      for (var argName in vars) {\n        fnArgValues.push(vars[argName]);\n        fnArgNames.push(argName);\n      }\n\n      if (createSourceMap) {\n        // using `new Function(...)` generates a header, 1 line of no arguments, 2 lines otherwise\n        // E.g. ```\n        // function anonymous(a,b,c\n        // /**/) { ... }```\n        // We don't want to hard code this fact, so we auto detect it via an empty function first.\n        var emptyFn = newTrustedFunctionForJIT.apply(void 0, _toConsumableArray(fnArgNames.concat('return null;'))).toString();\n        var headerLines = emptyFn.slice(0, emptyFn.indexOf('return null;')).split('\\n').length - 1;\n        fnBody += \"\\n\".concat(ctx.toSourceMapGenerator(sourceUrl, headerLines).toJsComment());\n      }\n\n      var fn = newTrustedFunctionForJIT.apply(void 0, _toConsumableArray(fnArgNames.concat(fnBody)));\n      return this.executeFunction(fn, fnArgValues);\n    }\n    /**\n     * Execute a JIT generated function by calling it.\n     *\n     * This method can be overridden in tests to capture the functions that are generated\n     * by this `JitEvaluator` class.\n     *\n     * @param fn A function to execute.\n     * @param args The arguments to pass to the function being executed.\n     * @returns The return value of the executed function.\n     */\n\n  }, {\n    key: \"executeFunction\",\n    value: function executeFunction(fn, args) {\n      return fn.apply(void 0, _toConsumableArray(args));\n    }\n  }]);\n\n  return JitEvaluator;\n}();\n/**\n * An Angular AST visitor that converts AST nodes into executable JavaScript code.\n */\n\n\nvar JitEmitterVisitor = /*#__PURE__*/function (_AbstractJsEmitterVis) {\n  _inherits(JitEmitterVisitor, _AbstractJsEmitterVis);\n\n  var _super53 = _createSuper(JitEmitterVisitor);\n\n  function JitEmitterVisitor(reflector) {\n    var _this88;\n\n    _classCallCheck(this, JitEmitterVisitor);\n\n    _this88 = _super53.call(this);\n    _this88.reflector = reflector;\n    _this88._evalArgNames = [];\n    _this88._evalArgValues = [];\n    _this88._evalExportedVars = [];\n    return _this88;\n  }\n\n  _createClass(JitEmitterVisitor, [{\n    key: \"createReturnStmt\",\n    value: function createReturnStmt(ctx) {\n      var stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(function (resultVar) {\n        return new LiteralMapEntry(resultVar, variable(resultVar), false);\n      })));\n      stmt.visitStatement(this, ctx);\n    }\n  }, {\n    key: \"getArgs\",\n    value: function getArgs() {\n      var result = {};\n\n      for (var i = 0; i < this._evalArgNames.length; i++) {\n        result[this._evalArgNames[i]] = this._evalArgValues[i];\n      }\n\n      return result;\n    }\n  }, {\n    key: \"visitExternalExpr\",\n    value: function visitExternalExpr(ast, ctx) {\n      this._emitReferenceToExternal(ast, this.reflector.resolveExternalReference(ast.value), ctx);\n\n      return null;\n    }\n  }, {\n    key: \"visitWrappedNodeExpr\",\n    value: function visitWrappedNodeExpr(ast, ctx) {\n      this._emitReferenceToExternal(ast, ast.node, ctx);\n\n      return null;\n    }\n  }, {\n    key: \"visitDeclareVarStmt\",\n    value: function visitDeclareVarStmt(stmt, ctx) {\n      if (stmt.hasModifier(StmtModifier.Exported)) {\n        this._evalExportedVars.push(stmt.name);\n      }\n\n      return _get(_getPrototypeOf(JitEmitterVisitor.prototype), \"visitDeclareVarStmt\", this).call(this, stmt, ctx);\n    }\n  }, {\n    key: \"visitDeclareFunctionStmt\",\n    value: function visitDeclareFunctionStmt(stmt, ctx) {\n      if (stmt.hasModifier(StmtModifier.Exported)) {\n        this._evalExportedVars.push(stmt.name);\n      }\n\n      return _get(_getPrototypeOf(JitEmitterVisitor.prototype), \"visitDeclareFunctionStmt\", this).call(this, stmt, ctx);\n    }\n  }, {\n    key: \"visitDeclareClassStmt\",\n    value: function visitDeclareClassStmt(stmt, ctx) {\n      if (stmt.hasModifier(StmtModifier.Exported)) {\n        this._evalExportedVars.push(stmt.name);\n      }\n\n      return _get(_getPrototypeOf(JitEmitterVisitor.prototype), \"visitDeclareClassStmt\", this).call(this, stmt, ctx);\n    }\n  }, {\n    key: \"_emitReferenceToExternal\",\n    value: function _emitReferenceToExternal(ast, value, ctx) {\n      var id = this._evalArgValues.indexOf(value);\n\n      if (id === -1) {\n        id = this._evalArgValues.length;\n\n        this._evalArgValues.push(value);\n\n        var name = identifierName({\n          reference: value\n        }) || 'val';\n\n        this._evalArgNames.push(\"jit_\".concat(name, \"_\").concat(id));\n      }\n\n      ctx.print(ast, this._evalArgNames[id]);\n    }\n  }]);\n\n  return JitEmitterVisitor;\n}(AbstractJsEmitterVisitor);\n\nfunction isUseStrictStatement(statement) {\n  return statement.isEquivalent(literal('use strict').toStmt());\n}\n/**\n * @license\n * Copyright Google LLC 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\nfunction _compileInjector(meta) {\n  var definitionMap = new DefinitionMap();\n\n  if (meta.providers !== null) {\n    definitionMap.set('providers', meta.providers);\n  }\n\n  if (meta.imports.length > 0) {\n    definitionMap.set('imports', literalArr(meta.imports));\n  }\n\n  var expression = importExpr(Identifiers.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true);\n  var type = createInjectorType(meta);\n  return {\n    expression: expression,\n    type: type,\n    statements: []\n  };\n}\n\nfunction createInjectorType(meta) {\n  return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Implementation of `CompileReflector` which resolves references to @angular/core\n * symbols at runtime, according to a consumer-provided mapping.\n *\n * Only supports `resolveExternalReference`, all other methods throw.\n */\n\n\nvar R3JitReflector = /*#__PURE__*/function () {\n  function R3JitReflector(context) {\n    _classCallCheck(this, R3JitReflector);\n\n    this.context = context;\n  }\n\n  _createClass(R3JitReflector, [{\n    key: \"resolveExternalReference\",\n    value: function resolveExternalReference(ref) {\n      // This reflector only handles @angular/core imports.\n      if (ref.moduleName !== '@angular/core') {\n        throw new Error(\"Cannot resolve external reference to \".concat(ref.moduleName, \", only references to @angular/core are supported.\"));\n      }\n\n      if (!this.context.hasOwnProperty(ref.name)) {\n        throw new Error(\"No value provided for @angular/core symbol '\".concat(ref.name, \"'.\"));\n      }\n\n      return this.context[ref.name];\n    }\n  }, {\n    key: \"parameters\",\n    value: function parameters(typeOrFunc) {\n      throw new Error('Not implemented.');\n    }\n  }, {\n    key: \"annotations\",\n    value: function annotations(typeOrFunc) {\n      throw new Error('Not implemented.');\n    }\n  }, {\n    key: \"shallowAnnotations\",\n    value: function shallowAnnotations(typeOrFunc) {\n      throw new Error('Not implemented.');\n    }\n  }, {\n    key: \"tryAnnotations\",\n    value: function tryAnnotations(typeOrFunc) {\n      throw new Error('Not implemented.');\n    }\n  }, {\n    key: \"propMetadata\",\n    value: function propMetadata(typeOrFunc) {\n      throw new Error('Not implemented.');\n    }\n  }, {\n    key: \"hasLifecycleHook\",\n    value: function hasLifecycleHook(type, lcProperty) {\n      throw new Error('Not implemented.');\n    }\n  }, {\n    key: \"guards\",\n    value: function guards(typeOrFunc) {\n      throw new Error('Not implemented.');\n    }\n  }, {\n    key: \"componentModuleUrl\",\n    value: function componentModuleUrl(type, cmpMetadata) {\n      throw new Error('Not implemented.');\n    }\n  }]);\n\n  return R3JitReflector;\n}();\n/**\n * @license\n * Copyright Google LLC 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/**\n * Construct an `R3NgModuleDef` for the given `R3NgModuleMetadata`.\n */\n\n\nfunction _compileNgModule(meta) {\n  var internalType = meta.internalType,\n      bootstrap = meta.bootstrap,\n      declarations = meta.declarations,\n      imports = meta.imports,\n      exports = meta.exports,\n      schemas = meta.schemas,\n      containsForwardDecls = meta.containsForwardDecls,\n      emitInline = meta.emitInline,\n      id = meta.id;\n  var statements = [];\n  var definitionMap = new DefinitionMap();\n  definitionMap.set('type', internalType);\n\n  if (bootstrap.length > 0) {\n    definitionMap.set('bootstrap', refsToArray(bootstrap, containsForwardDecls));\n  } // If requested to emit scope information inline, pass the `declarations`, `imports` and `exports`\n  // to the `ɵɵdefineNgModule()` call. The JIT compilation uses this.\n\n\n  if (emitInline) {\n    if (declarations.length > 0) {\n      definitionMap.set('declarations', refsToArray(declarations, containsForwardDecls));\n    }\n\n    if (imports.length > 0) {\n      definitionMap.set('imports', refsToArray(imports, containsForwardDecls));\n    }\n\n    if (exports.length > 0) {\n      definitionMap.set('exports', refsToArray(exports, containsForwardDecls));\n    }\n  } // If not emitting inline, the scope information is not passed into `ɵɵdefineNgModule` as it would\n  // prevent tree-shaking of the declarations, imports and exports references.\n  else {\n    var setNgModuleScopeCall = generateSetNgModuleScopeCall(meta);\n\n    if (setNgModuleScopeCall !== null) {\n      statements.push(setNgModuleScopeCall);\n    }\n  }\n\n  if (schemas !== null && schemas.length > 0) {\n    definitionMap.set('schemas', literalArr(schemas.map(function (ref) {\n      return ref.value;\n    })));\n  }\n\n  if (id !== null) {\n    definitionMap.set('id', id);\n  }\n\n  var expression = importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true);\n  var type = createNgModuleType(meta);\n  return {\n    expression: expression,\n    type: type,\n    statements: statements\n  };\n}\n/**\n * This function is used in JIT mode to generate the call to `ɵɵdefineNgModule()` from a call to\n * `ɵɵngDeclareNgModule()`.\n */\n\n\nfunction compileNgModuleDeclarationExpression(meta) {\n  var definitionMap = new DefinitionMap();\n  definitionMap.set('type', new WrappedNodeExpr(meta.type));\n\n  if (meta.bootstrap !== undefined) {\n    definitionMap.set('bootstrap', new WrappedNodeExpr(meta.bootstrap));\n  }\n\n  if (meta.declarations !== undefined) {\n    definitionMap.set('declarations', new WrappedNodeExpr(meta.declarations));\n  }\n\n  if (meta.imports !== undefined) {\n    definitionMap.set('imports', new WrappedNodeExpr(meta.imports));\n  }\n\n  if (meta.exports !== undefined) {\n    definitionMap.set('exports', new WrappedNodeExpr(meta.exports));\n  }\n\n  if (meta.schemas !== undefined) {\n    definitionMap.set('schemas', new WrappedNodeExpr(meta.schemas));\n  }\n\n  if (meta.id !== undefined) {\n    definitionMap.set('id', new WrappedNodeExpr(meta.id));\n  }\n\n  return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]);\n}\n\nfunction createNgModuleType(_ref5) {\n  var moduleType = _ref5.type,\n      declarations = _ref5.declarations,\n      imports = _ref5.imports,\n      exports = _ref5.exports;\n  return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [new ExpressionType(moduleType.type), tupleTypeOf(declarations), tupleTypeOf(imports), tupleTypeOf(exports)]));\n}\n/**\n * Generates a function call to `ɵɵsetNgModuleScope` with all necessary information so that the\n * transitive module scope can be computed during runtime in JIT mode. This call is marked pure\n * such that the references to declarations, imports and exports may be elided causing these\n * symbols to become tree-shakeable.\n */\n\n\nfunction generateSetNgModuleScopeCall(meta) {\n  var moduleType = meta.adjacentType,\n      declarations = meta.declarations,\n      imports = meta.imports,\n      exports = meta.exports,\n      containsForwardDecls = meta.containsForwardDecls;\n  var scopeMap = new DefinitionMap();\n\n  if (declarations.length > 0) {\n    scopeMap.set('declarations', refsToArray(declarations, containsForwardDecls));\n  }\n\n  if (imports.length > 0) {\n    scopeMap.set('imports', refsToArray(imports, containsForwardDecls));\n  }\n\n  if (exports.length > 0) {\n    scopeMap.set('exports', refsToArray(exports, containsForwardDecls));\n  }\n\n  if (Object.keys(scopeMap.values).length === 0) {\n    return null;\n  } // setNgModuleScope(...)\n\n\n  var fnCall = new InvokeFunctionExpr(\n  /* fn */\n  importExpr(Identifiers.setNgModuleScope),\n  /* args */\n  [moduleType, scopeMap.toLiteralMap()]); // (ngJitMode guard) && setNgModuleScope(...)\n\n  var guardedCall = jitOnlyGuardedExpression(fnCall); // function() { (ngJitMode guard) && setNgModuleScope(...); }\n\n  var iife = new FunctionExpr(\n  /* params */\n  [],\n  /* statements */\n  [guardedCall.toStmt()]); // (function() { (ngJitMode guard) && setNgModuleScope(...); })()\n\n  var iifeCall = new InvokeFunctionExpr(\n  /* fn */\n  iife,\n  /* args */\n  []);\n  return iifeCall.toStmt();\n}\n\nfunction tupleTypeOf(exp) {\n  var types = exp.map(function (ref) {\n    return typeofExpr(ref.type);\n  });\n  return exp.length > 0 ? expressionType(literalArr(types)) : NONE_TYPE;\n}\n/**\n * @license\n * Copyright Google LLC 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\nfunction compilePipeFromMetadata(metadata) {\n  var definitionMapValues = []; // e.g. `name: 'myPipe'`\n\n  definitionMapValues.push({\n    key: 'name',\n    value: literal(metadata.pipeName),\n    quoted: false\n  }); // e.g. `type: MyPipe`\n\n  definitionMapValues.push({\n    key: 'type',\n    value: metadata.type.value,\n    quoted: false\n  }); // e.g. `pure: true`\n\n  definitionMapValues.push({\n    key: 'pure',\n    value: literal(metadata.pure),\n    quoted: false\n  });\n  var expression = importExpr(Identifiers.definePipe).callFn([literalMap(definitionMapValues)], undefined, true);\n  var type = createPipeType(metadata);\n  return {\n    expression: expression,\n    type: type,\n    statements: []\n  };\n}\n\nfunction createPipeType(metadata) {\n  return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [typeWithParameters(metadata.type.type, metadata.typeArgumentCount), new ExpressionType(new LiteralExpr(metadata.pipeName))]));\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar ParserError = /*#__PURE__*/_createClass(function ParserError(message, input, errLocation, ctxLocation) {\n  _classCallCheck(this, ParserError);\n\n  this.input = input;\n  this.errLocation = errLocation;\n  this.ctxLocation = ctxLocation;\n  this.message = \"Parser Error: \".concat(message, \" \").concat(errLocation, \" [\").concat(input, \"] in \").concat(ctxLocation);\n});\n\nvar ParseSpan = /*#__PURE__*/function () {\n  function ParseSpan(start, end) {\n    _classCallCheck(this, ParseSpan);\n\n    this.start = start;\n    this.end = end;\n  }\n\n  _createClass(ParseSpan, [{\n    key: \"toAbsolute\",\n    value: function toAbsolute(absoluteOffset) {\n      return new AbsoluteSourceSpan(absoluteOffset + this.start, absoluteOffset + this.end);\n    }\n  }]);\n\n  return ParseSpan;\n}();\n\nvar AST = /*#__PURE__*/function () {\n  function AST(span,\n  /**\n   * Absolute location of the expression AST in a source code file.\n   */\n  sourceSpan) {\n    _classCallCheck(this, AST);\n\n    this.span = span;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(AST, [{\n    key: \"toString\",\n    value: function toString() {\n      return 'AST';\n    }\n  }]);\n\n  return AST;\n}();\n\nvar ASTWithName = /*#__PURE__*/function (_AST) {\n  _inherits(ASTWithName, _AST);\n\n  var _super54 = _createSuper(ASTWithName);\n\n  function ASTWithName(span, sourceSpan, nameSpan) {\n    var _this89;\n\n    _classCallCheck(this, ASTWithName);\n\n    _this89 = _super54.call(this, span, sourceSpan);\n    _this89.nameSpan = nameSpan;\n    return _this89;\n  }\n\n  return _createClass(ASTWithName);\n}(AST);\n/**\n * Represents a quoted expression of the form:\n *\n * quote = prefix `:` uninterpretedExpression\n * prefix = identifier\n * uninterpretedExpression = arbitrary string\n *\n * A quoted expression is meant to be pre-processed by an AST transformer that\n * converts it into another AST that no longer contains quoted expressions.\n * It is meant to allow third-party developers to extend Angular template\n * expression language. The `uninterpretedExpression` part of the quote is\n * therefore not interpreted by the Angular's own expression parser.\n */\n\n\nvar Quote = /*#__PURE__*/function (_AST2) {\n  _inherits(Quote, _AST2);\n\n  var _super55 = _createSuper(Quote);\n\n  function Quote(span, sourceSpan, prefix, uninterpretedExpression, location) {\n    var _this90;\n\n    _classCallCheck(this, Quote);\n\n    _this90 = _super55.call(this, span, sourceSpan);\n    _this90.prefix = prefix;\n    _this90.uninterpretedExpression = uninterpretedExpression;\n    _this90.location = location;\n    return _this90;\n  }\n\n  _createClass(Quote, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitQuote(this, context);\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      return 'Quote';\n    }\n  }]);\n\n  return Quote;\n}(AST);\n\nvar EmptyExpr = /*#__PURE__*/function (_AST3) {\n  _inherits(EmptyExpr, _AST3);\n\n  var _super56 = _createSuper(EmptyExpr);\n\n  function EmptyExpr() {\n    _classCallCheck(this, EmptyExpr);\n\n    return _super56.apply(this, arguments);\n  }\n\n  _createClass(EmptyExpr, [{\n    key: \"visit\",\n    value: function visit(visitor) {// do nothing\n\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n    }\n  }]);\n\n  return EmptyExpr;\n}(AST);\n\nvar ImplicitReceiver = /*#__PURE__*/function (_AST4) {\n  _inherits(ImplicitReceiver, _AST4);\n\n  var _super57 = _createSuper(ImplicitReceiver);\n\n  function ImplicitReceiver() {\n    _classCallCheck(this, ImplicitReceiver);\n\n    return _super57.apply(this, arguments);\n  }\n\n  _createClass(ImplicitReceiver, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitImplicitReceiver(this, context);\n    }\n  }]);\n\n  return ImplicitReceiver;\n}(AST);\n/**\n * Receiver when something is accessed through `this` (e.g. `this.foo`). Note that this class\n * inherits from `ImplicitReceiver`, because accessing something through `this` is treated the\n * same as accessing it implicitly inside of an Angular template (e.g. `[attr.title]=\"this.title\"`\n * is the same as `[attr.title]=\"title\"`.). Inheriting allows for the `this` accesses to be treated\n * the same as implicit ones, except for a couple of exceptions like `$event` and `$any`.\n * TODO: we should find a way for this class not to extend from `ImplicitReceiver` in the future.\n */\n\n\nvar ThisReceiver = /*#__PURE__*/function (_ImplicitReceiver) {\n  _inherits(ThisReceiver, _ImplicitReceiver);\n\n  var _super58 = _createSuper(ThisReceiver);\n\n  function ThisReceiver() {\n    _classCallCheck(this, ThisReceiver);\n\n    return _super58.apply(this, arguments);\n  }\n\n  _createClass(ThisReceiver, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      var _a;\n\n      return (_a = visitor.visitThisReceiver) === null || _a === void 0 ? void 0 : _a.call(visitor, this, context);\n    }\n  }]);\n\n  return ThisReceiver;\n}(ImplicitReceiver);\n/**\n * Multiple expressions separated by a semicolon.\n */\n\n\nvar Chain = /*#__PURE__*/function (_AST5) {\n  _inherits(Chain, _AST5);\n\n  var _super59 = _createSuper(Chain);\n\n  function Chain(span, sourceSpan, expressions) {\n    var _this91;\n\n    _classCallCheck(this, Chain);\n\n    _this91 = _super59.call(this, span, sourceSpan);\n    _this91.expressions = expressions;\n    return _this91;\n  }\n\n  _createClass(Chain, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitChain(this, context);\n    }\n  }]);\n\n  return Chain;\n}(AST);\n\nvar Conditional = /*#__PURE__*/function (_AST6) {\n  _inherits(Conditional, _AST6);\n\n  var _super60 = _createSuper(Conditional);\n\n  function Conditional(span, sourceSpan, condition, trueExp, falseExp) {\n    var _this92;\n\n    _classCallCheck(this, Conditional);\n\n    _this92 = _super60.call(this, span, sourceSpan);\n    _this92.condition = condition;\n    _this92.trueExp = trueExp;\n    _this92.falseExp = falseExp;\n    return _this92;\n  }\n\n  _createClass(Conditional, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitConditional(this, context);\n    }\n  }]);\n\n  return Conditional;\n}(AST);\n\nvar PropertyRead = /*#__PURE__*/function (_ASTWithName) {\n  _inherits(PropertyRead, _ASTWithName);\n\n  var _super61 = _createSuper(PropertyRead);\n\n  function PropertyRead(span, sourceSpan, nameSpan, receiver, name) {\n    var _this93;\n\n    _classCallCheck(this, PropertyRead);\n\n    _this93 = _super61.call(this, span, sourceSpan, nameSpan);\n    _this93.receiver = receiver;\n    _this93.name = name;\n    return _this93;\n  }\n\n  _createClass(PropertyRead, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitPropertyRead(this, context);\n    }\n  }]);\n\n  return PropertyRead;\n}(ASTWithName);\n\nvar PropertyWrite = /*#__PURE__*/function (_ASTWithName2) {\n  _inherits(PropertyWrite, _ASTWithName2);\n\n  var _super62 = _createSuper(PropertyWrite);\n\n  function PropertyWrite(span, sourceSpan, nameSpan, receiver, name, value) {\n    var _this94;\n\n    _classCallCheck(this, PropertyWrite);\n\n    _this94 = _super62.call(this, span, sourceSpan, nameSpan);\n    _this94.receiver = receiver;\n    _this94.name = name;\n    _this94.value = value;\n    return _this94;\n  }\n\n  _createClass(PropertyWrite, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitPropertyWrite(this, context);\n    }\n  }]);\n\n  return PropertyWrite;\n}(ASTWithName);\n\nvar SafePropertyRead = /*#__PURE__*/function (_ASTWithName3) {\n  _inherits(SafePropertyRead, _ASTWithName3);\n\n  var _super63 = _createSuper(SafePropertyRead);\n\n  function SafePropertyRead(span, sourceSpan, nameSpan, receiver, name) {\n    var _this95;\n\n    _classCallCheck(this, SafePropertyRead);\n\n    _this95 = _super63.call(this, span, sourceSpan, nameSpan);\n    _this95.receiver = receiver;\n    _this95.name = name;\n    return _this95;\n  }\n\n  _createClass(SafePropertyRead, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitSafePropertyRead(this, context);\n    }\n  }]);\n\n  return SafePropertyRead;\n}(ASTWithName);\n\nvar KeyedRead = /*#__PURE__*/function (_AST7) {\n  _inherits(KeyedRead, _AST7);\n\n  var _super64 = _createSuper(KeyedRead);\n\n  function KeyedRead(span, sourceSpan, receiver, key) {\n    var _this96;\n\n    _classCallCheck(this, KeyedRead);\n\n    _this96 = _super64.call(this, span, sourceSpan);\n    _this96.receiver = receiver;\n    _this96.key = key;\n    return _this96;\n  }\n\n  _createClass(KeyedRead, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitKeyedRead(this, context);\n    }\n  }]);\n\n  return KeyedRead;\n}(AST);\n\nvar SafeKeyedRead = /*#__PURE__*/function (_AST8) {\n  _inherits(SafeKeyedRead, _AST8);\n\n  var _super65 = _createSuper(SafeKeyedRead);\n\n  function SafeKeyedRead(span, sourceSpan, receiver, key) {\n    var _this97;\n\n    _classCallCheck(this, SafeKeyedRead);\n\n    _this97 = _super65.call(this, span, sourceSpan);\n    _this97.receiver = receiver;\n    _this97.key = key;\n    return _this97;\n  }\n\n  _createClass(SafeKeyedRead, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitSafeKeyedRead(this, context);\n    }\n  }]);\n\n  return SafeKeyedRead;\n}(AST);\n\nvar KeyedWrite = /*#__PURE__*/function (_AST9) {\n  _inherits(KeyedWrite, _AST9);\n\n  var _super66 = _createSuper(KeyedWrite);\n\n  function KeyedWrite(span, sourceSpan, receiver, key, value) {\n    var _this98;\n\n    _classCallCheck(this, KeyedWrite);\n\n    _this98 = _super66.call(this, span, sourceSpan);\n    _this98.receiver = receiver;\n    _this98.key = key;\n    _this98.value = value;\n    return _this98;\n  }\n\n  _createClass(KeyedWrite, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitKeyedWrite(this, context);\n    }\n  }]);\n\n  return KeyedWrite;\n}(AST);\n\nvar BindingPipe = /*#__PURE__*/function (_ASTWithName4) {\n  _inherits(BindingPipe, _ASTWithName4);\n\n  var _super67 = _createSuper(BindingPipe);\n\n  function BindingPipe(span, sourceSpan, exp, name, args, nameSpan) {\n    var _this99;\n\n    _classCallCheck(this, BindingPipe);\n\n    _this99 = _super67.call(this, span, sourceSpan, nameSpan);\n    _this99.exp = exp;\n    _this99.name = name;\n    _this99.args = args;\n    return _this99;\n  }\n\n  _createClass(BindingPipe, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitPipe(this, context);\n    }\n  }]);\n\n  return BindingPipe;\n}(ASTWithName);\n\nvar LiteralPrimitive = /*#__PURE__*/function (_AST10) {\n  _inherits(LiteralPrimitive, _AST10);\n\n  var _super68 = _createSuper(LiteralPrimitive);\n\n  function LiteralPrimitive(span, sourceSpan, value) {\n    var _this100;\n\n    _classCallCheck(this, LiteralPrimitive);\n\n    _this100 = _super68.call(this, span, sourceSpan);\n    _this100.value = value;\n    return _this100;\n  }\n\n  _createClass(LiteralPrimitive, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitLiteralPrimitive(this, context);\n    }\n  }]);\n\n  return LiteralPrimitive;\n}(AST);\n\nvar LiteralArray = /*#__PURE__*/function (_AST11) {\n  _inherits(LiteralArray, _AST11);\n\n  var _super69 = _createSuper(LiteralArray);\n\n  function LiteralArray(span, sourceSpan, expressions) {\n    var _this101;\n\n    _classCallCheck(this, LiteralArray);\n\n    _this101 = _super69.call(this, span, sourceSpan);\n    _this101.expressions = expressions;\n    return _this101;\n  }\n\n  _createClass(LiteralArray, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitLiteralArray(this, context);\n    }\n  }]);\n\n  return LiteralArray;\n}(AST);\n\nvar LiteralMap = /*#__PURE__*/function (_AST12) {\n  _inherits(LiteralMap, _AST12);\n\n  var _super70 = _createSuper(LiteralMap);\n\n  function LiteralMap(span, sourceSpan, keys, values) {\n    var _this102;\n\n    _classCallCheck(this, LiteralMap);\n\n    _this102 = _super70.call(this, span, sourceSpan);\n    _this102.keys = keys;\n    _this102.values = values;\n    return _this102;\n  }\n\n  _createClass(LiteralMap, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitLiteralMap(this, context);\n    }\n  }]);\n\n  return LiteralMap;\n}(AST);\n\nvar Interpolation = /*#__PURE__*/function (_AST13) {\n  _inherits(Interpolation, _AST13);\n\n  var _super71 = _createSuper(Interpolation);\n\n  function Interpolation(span, sourceSpan, strings, expressions) {\n    var _this103;\n\n    _classCallCheck(this, Interpolation);\n\n    _this103 = _super71.call(this, span, sourceSpan);\n    _this103.strings = strings;\n    _this103.expressions = expressions;\n    return _this103;\n  }\n\n  _createClass(Interpolation, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitInterpolation(this, context);\n    }\n  }]);\n\n  return Interpolation;\n}(AST);\n\nvar Binary = /*#__PURE__*/function (_AST14) {\n  _inherits(Binary, _AST14);\n\n  var _super72 = _createSuper(Binary);\n\n  function Binary(span, sourceSpan, operation, left, right) {\n    var _this104;\n\n    _classCallCheck(this, Binary);\n\n    _this104 = _super72.call(this, span, sourceSpan);\n    _this104.operation = operation;\n    _this104.left = left;\n    _this104.right = right;\n    return _this104;\n  }\n\n  _createClass(Binary, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitBinary(this, context);\n    }\n  }]);\n\n  return Binary;\n}(AST);\n/**\n * For backwards compatibility reasons, `Unary` inherits from `Binary` and mimics the binary AST\n * node that was originally used. This inheritance relation can be deleted in some future major,\n * after consumers have been given a chance to fully support Unary.\n */\n\n\nvar Unary = /*#__PURE__*/function (_Binary) {\n  _inherits(Unary, _Binary);\n\n  var _super73 = _createSuper(Unary);\n\n  /**\n   * During the deprecation period this constructor is private, to avoid consumers from creating\n   * a `Unary` with the fallback properties for `Binary`.\n   */\n  function Unary(span, sourceSpan, operator, expr, binaryOp, binaryLeft, binaryRight) {\n    var _this105;\n\n    _classCallCheck(this, Unary);\n\n    _this105 = _super73.call(this, span, sourceSpan, binaryOp, binaryLeft, binaryRight);\n    _this105.operator = operator;\n    _this105.expr = expr;\n    return _this105;\n  }\n  /**\n   * Creates a unary minus expression \"-x\", represented as `Binary` using \"0 - x\".\n   */\n\n\n  _createClass(Unary, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      if (visitor.visitUnary !== undefined) {\n        return visitor.visitUnary(this, context);\n      }\n\n      return visitor.visitBinary(this, context);\n    }\n  }], [{\n    key: \"createMinus\",\n    value: function createMinus(span, sourceSpan, expr) {\n      return new Unary(span, sourceSpan, '-', expr, '-', new LiteralPrimitive(span, sourceSpan, 0), expr);\n    }\n    /**\n     * Creates a unary plus expression \"+x\", represented as `Binary` using \"x - 0\".\n     */\n\n  }, {\n    key: \"createPlus\",\n    value: function createPlus(span, sourceSpan, expr) {\n      return new Unary(span, sourceSpan, '+', expr, '-', expr, new LiteralPrimitive(span, sourceSpan, 0));\n    }\n  }]);\n\n  return Unary;\n}(Binary);\n\nvar PrefixNot = /*#__PURE__*/function (_AST15) {\n  _inherits(PrefixNot, _AST15);\n\n  var _super74 = _createSuper(PrefixNot);\n\n  function PrefixNot(span, sourceSpan, expression) {\n    var _this106;\n\n    _classCallCheck(this, PrefixNot);\n\n    _this106 = _super74.call(this, span, sourceSpan);\n    _this106.expression = expression;\n    return _this106;\n  }\n\n  _createClass(PrefixNot, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitPrefixNot(this, context);\n    }\n  }]);\n\n  return PrefixNot;\n}(AST);\n\nvar NonNullAssert = /*#__PURE__*/function (_AST16) {\n  _inherits(NonNullAssert, _AST16);\n\n  var _super75 = _createSuper(NonNullAssert);\n\n  function NonNullAssert(span, sourceSpan, expression) {\n    var _this107;\n\n    _classCallCheck(this, NonNullAssert);\n\n    _this107 = _super75.call(this, span, sourceSpan);\n    _this107.expression = expression;\n    return _this107;\n  }\n\n  _createClass(NonNullAssert, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitNonNullAssert(this, context);\n    }\n  }]);\n\n  return NonNullAssert;\n}(AST);\n\nvar MethodCall = /*#__PURE__*/function (_ASTWithName5) {\n  _inherits(MethodCall, _ASTWithName5);\n\n  var _super76 = _createSuper(MethodCall);\n\n  function MethodCall(span, sourceSpan, nameSpan, receiver, name, args, argumentSpan) {\n    var _this108;\n\n    _classCallCheck(this, MethodCall);\n\n    _this108 = _super76.call(this, span, sourceSpan, nameSpan);\n    _this108.receiver = receiver;\n    _this108.name = name;\n    _this108.args = args;\n    _this108.argumentSpan = argumentSpan;\n    return _this108;\n  }\n\n  _createClass(MethodCall, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitMethodCall(this, context);\n    }\n  }]);\n\n  return MethodCall;\n}(ASTWithName);\n\nvar SafeMethodCall = /*#__PURE__*/function (_ASTWithName6) {\n  _inherits(SafeMethodCall, _ASTWithName6);\n\n  var _super77 = _createSuper(SafeMethodCall);\n\n  function SafeMethodCall(span, sourceSpan, nameSpan, receiver, name, args, argumentSpan) {\n    var _this109;\n\n    _classCallCheck(this, SafeMethodCall);\n\n    _this109 = _super77.call(this, span, sourceSpan, nameSpan);\n    _this109.receiver = receiver;\n    _this109.name = name;\n    _this109.args = args;\n    _this109.argumentSpan = argumentSpan;\n    return _this109;\n  }\n\n  _createClass(SafeMethodCall, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitSafeMethodCall(this, context);\n    }\n  }]);\n\n  return SafeMethodCall;\n}(ASTWithName);\n\nvar FunctionCall = /*#__PURE__*/function (_AST17) {\n  _inherits(FunctionCall, _AST17);\n\n  var _super78 = _createSuper(FunctionCall);\n\n  function FunctionCall(span, sourceSpan, target, args) {\n    var _this110;\n\n    _classCallCheck(this, FunctionCall);\n\n    _this110 = _super78.call(this, span, sourceSpan);\n    _this110.target = target;\n    _this110.args = args;\n    return _this110;\n  }\n\n  _createClass(FunctionCall, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return visitor.visitFunctionCall(this, context);\n    }\n  }]);\n\n  return FunctionCall;\n}(AST);\n/**\n * Records the absolute position of a text span in a source file, where `start` and `end` are the\n * starting and ending byte offsets, respectively, of the text span in a source file.\n */\n\n\nvar AbsoluteSourceSpan = /*#__PURE__*/_createClass(function AbsoluteSourceSpan(start, end) {\n  _classCallCheck(this, AbsoluteSourceSpan);\n\n  this.start = start;\n  this.end = end;\n});\n\nvar ASTWithSource = /*#__PURE__*/function (_AST18) {\n  _inherits(ASTWithSource, _AST18);\n\n  var _super79 = _createSuper(ASTWithSource);\n\n  function ASTWithSource(ast, source, location, absoluteOffset, errors) {\n    var _this111;\n\n    _classCallCheck(this, ASTWithSource);\n\n    _this111 = _super79.call(this, new ParseSpan(0, source === null ? 0 : source.length), new AbsoluteSourceSpan(absoluteOffset, source === null ? absoluteOffset : absoluteOffset + source.length));\n    _this111.ast = ast;\n    _this111.source = source;\n    _this111.location = location;\n    _this111.errors = errors;\n    return _this111;\n  }\n\n  _createClass(ASTWithSource, [{\n    key: \"visit\",\n    value: function visit(visitor) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      if (visitor.visitASTWithSource) {\n        return visitor.visitASTWithSource(this, context);\n      }\n\n      return this.ast.visit(visitor, context);\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      return \"\".concat(this.source, \" in \").concat(this.location);\n    }\n  }]);\n\n  return ASTWithSource;\n}(AST);\n\nvar VariableBinding = /*#__PURE__*/_createClass(\n/**\n * @param sourceSpan entire span of the binding.\n * @param key name of the LHS along with its span.\n * @param value optional value for the RHS along with its span.\n */\nfunction VariableBinding(sourceSpan, key, value) {\n  _classCallCheck(this, VariableBinding);\n\n  this.sourceSpan = sourceSpan;\n  this.key = key;\n  this.value = value;\n});\n\nvar ExpressionBinding = /*#__PURE__*/_createClass(\n/**\n * @param sourceSpan entire span of the binding.\n * @param key binding name, like ngForOf, ngForTrackBy, ngIf, along with its\n * span. Note that the length of the span may not be the same as\n * `key.source.length`. For example,\n * 1. key.source = ngFor, key.span is for \"ngFor\"\n * 2. key.source = ngForOf, key.span is for \"of\"\n * 3. key.source = ngForTrackBy, key.span is for \"trackBy\"\n * @param value optional expression for the RHS.\n */\nfunction ExpressionBinding(sourceSpan, key, value) {\n  _classCallCheck(this, ExpressionBinding);\n\n  this.sourceSpan = sourceSpan;\n  this.key = key;\n  this.value = value;\n});\n\nvar RecursiveAstVisitor$1 = /*#__PURE__*/function () {\n  function RecursiveAstVisitor$1() {\n    _classCallCheck(this, RecursiveAstVisitor$1);\n  }\n\n  _createClass(RecursiveAstVisitor$1, [{\n    key: \"visit\",\n    value: function visit(ast, context) {\n      // The default implementation just visits every node.\n      // Classes that extend RecursiveAstVisitor should override this function\n      // to selectively visit the specified node.\n      ast.visit(this, context);\n    }\n  }, {\n    key: \"visitUnary\",\n    value: function visitUnary(ast, context) {\n      this.visit(ast.expr, context);\n    }\n  }, {\n    key: \"visitBinary\",\n    value: function visitBinary(ast, context) {\n      this.visit(ast.left, context);\n      this.visit(ast.right, context);\n    }\n  }, {\n    key: \"visitChain\",\n    value: function visitChain(ast, context) {\n      this.visitAll(ast.expressions, context);\n    }\n  }, {\n    key: \"visitConditional\",\n    value: function visitConditional(ast, context) {\n      this.visit(ast.condition, context);\n      this.visit(ast.trueExp, context);\n      this.visit(ast.falseExp, context);\n    }\n  }, {\n    key: \"visitPipe\",\n    value: function visitPipe(ast, context) {\n      this.visit(ast.exp, context);\n      this.visitAll(ast.args, context);\n    }\n  }, {\n    key: \"visitFunctionCall\",\n    value: function visitFunctionCall(ast, context) {\n      if (ast.target) {\n        this.visit(ast.target, context);\n      }\n\n      this.visitAll(ast.args, context);\n    }\n  }, {\n    key: \"visitImplicitReceiver\",\n    value: function visitImplicitReceiver(ast, context) {}\n  }, {\n    key: \"visitThisReceiver\",\n    value: function visitThisReceiver(ast, context) {}\n  }, {\n    key: \"visitInterpolation\",\n    value: function visitInterpolation(ast, context) {\n      this.visitAll(ast.expressions, context);\n    }\n  }, {\n    key: \"visitKeyedRead\",\n    value: function visitKeyedRead(ast, context) {\n      this.visit(ast.receiver, context);\n      this.visit(ast.key, context);\n    }\n  }, {\n    key: \"visitKeyedWrite\",\n    value: function visitKeyedWrite(ast, context) {\n      this.visit(ast.receiver, context);\n      this.visit(ast.key, context);\n      this.visit(ast.value, context);\n    }\n  }, {\n    key: \"visitLiteralArray\",\n    value: function visitLiteralArray(ast, context) {\n      this.visitAll(ast.expressions, context);\n    }\n  }, {\n    key: \"visitLiteralMap\",\n    value: function visitLiteralMap(ast, context) {\n      this.visitAll(ast.values, context);\n    }\n  }, {\n    key: \"visitLiteralPrimitive\",\n    value: function visitLiteralPrimitive(ast, context) {}\n  }, {\n    key: \"visitMethodCall\",\n    value: function visitMethodCall(ast, context) {\n      this.visit(ast.receiver, context);\n      this.visitAll(ast.args, context);\n    }\n  }, {\n    key: \"visitPrefixNot\",\n    value: function visitPrefixNot(ast, context) {\n      this.visit(ast.expression, context);\n    }\n  }, {\n    key: \"visitNonNullAssert\",\n    value: function visitNonNullAssert(ast, context) {\n      this.visit(ast.expression, context);\n    }\n  }, {\n    key: \"visitPropertyRead\",\n    value: function visitPropertyRead(ast, context) {\n      this.visit(ast.receiver, context);\n    }\n  }, {\n    key: \"visitPropertyWrite\",\n    value: function visitPropertyWrite(ast, context) {\n      this.visit(ast.receiver, context);\n      this.visit(ast.value, context);\n    }\n  }, {\n    key: \"visitSafePropertyRead\",\n    value: function visitSafePropertyRead(ast, context) {\n      this.visit(ast.receiver, context);\n    }\n  }, {\n    key: \"visitSafeMethodCall\",\n    value: function visitSafeMethodCall(ast, context) {\n      this.visit(ast.receiver, context);\n      this.visitAll(ast.args, context);\n    }\n  }, {\n    key: \"visitSafeKeyedRead\",\n    value: function visitSafeKeyedRead(ast, context) {\n      this.visit(ast.receiver, context);\n      this.visit(ast.key, context);\n    }\n  }, {\n    key: \"visitQuote\",\n    value: function visitQuote(ast, context) {} // This is not part of the AstVisitor interface, just a helper method\n\n  }, {\n    key: \"visitAll\",\n    value: function visitAll(asts, context) {\n      var _iterator7 = _createForOfIteratorHelper(asts),\n          _step7;\n\n      try {\n        for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n          var ast = _step7.value;\n          this.visit(ast, context);\n        }\n      } catch (err) {\n        _iterator7.e(err);\n      } finally {\n        _iterator7.f();\n      }\n    }\n  }]);\n\n  return RecursiveAstVisitor$1;\n}();\n\nvar AstTransformer$1 = /*#__PURE__*/function () {\n  function AstTransformer$1() {\n    _classCallCheck(this, AstTransformer$1);\n  }\n\n  _createClass(AstTransformer$1, [{\n    key: \"visitImplicitReceiver\",\n    value: function visitImplicitReceiver(ast, context) {\n      return ast;\n    }\n  }, {\n    key: \"visitThisReceiver\",\n    value: function visitThisReceiver(ast, context) {\n      return ast;\n    }\n  }, {\n    key: \"visitInterpolation\",\n    value: function visitInterpolation(ast, context) {\n      return new Interpolation(ast.span, ast.sourceSpan, ast.strings, this.visitAll(ast.expressions));\n    }\n  }, {\n    key: \"visitLiteralPrimitive\",\n    value: function visitLiteralPrimitive(ast, context) {\n      return new LiteralPrimitive(ast.span, ast.sourceSpan, ast.value);\n    }\n  }, {\n    key: \"visitPropertyRead\",\n    value: function visitPropertyRead(ast, context) {\n      return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);\n    }\n  }, {\n    key: \"visitPropertyWrite\",\n    value: function visitPropertyWrite(ast, context) {\n      return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name, ast.value.visit(this));\n    }\n  }, {\n    key: \"visitSafePropertyRead\",\n    value: function visitSafePropertyRead(ast, context) {\n      return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);\n    }\n  }, {\n    key: \"visitMethodCall\",\n    value: function visitMethodCall(ast, context) {\n      return new MethodCall(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name, this.visitAll(ast.args), ast.argumentSpan);\n    }\n  }, {\n    key: \"visitSafeMethodCall\",\n    value: function visitSafeMethodCall(ast, context) {\n      return new SafeMethodCall(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name, this.visitAll(ast.args), ast.argumentSpan);\n    }\n  }, {\n    key: \"visitFunctionCall\",\n    value: function visitFunctionCall(ast, context) {\n      return new FunctionCall(ast.span, ast.sourceSpan, ast.target.visit(this), this.visitAll(ast.args));\n    }\n  }, {\n    key: \"visitLiteralArray\",\n    value: function visitLiteralArray(ast, context) {\n      return new LiteralArray(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));\n    }\n  }, {\n    key: \"visitLiteralMap\",\n    value: function visitLiteralMap(ast, context) {\n      return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, this.visitAll(ast.values));\n    }\n  }, {\n    key: \"visitUnary\",\n    value: function visitUnary(ast, context) {\n      switch (ast.operator) {\n        case '+':\n          return Unary.createPlus(ast.span, ast.sourceSpan, ast.expr.visit(this));\n\n        case '-':\n          return Unary.createMinus(ast.span, ast.sourceSpan, ast.expr.visit(this));\n\n        default:\n          throw new Error(\"Unknown unary operator \".concat(ast.operator));\n      }\n    }\n  }, {\n    key: \"visitBinary\",\n    value: function visitBinary(ast, context) {\n      return new Binary(ast.span, ast.sourceSpan, ast.operation, ast.left.visit(this), ast.right.visit(this));\n    }\n  }, {\n    key: \"visitPrefixNot\",\n    value: function visitPrefixNot(ast, context) {\n      return new PrefixNot(ast.span, ast.sourceSpan, ast.expression.visit(this));\n    }\n  }, {\n    key: \"visitNonNullAssert\",\n    value: function visitNonNullAssert(ast, context) {\n      return new NonNullAssert(ast.span, ast.sourceSpan, ast.expression.visit(this));\n    }\n  }, {\n    key: \"visitConditional\",\n    value: function visitConditional(ast, context) {\n      return new Conditional(ast.span, ast.sourceSpan, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this));\n    }\n  }, {\n    key: \"visitPipe\",\n    value: function visitPipe(ast, context) {\n      return new BindingPipe(ast.span, ast.sourceSpan, ast.exp.visit(this), ast.name, this.visitAll(ast.args), ast.nameSpan);\n    }\n  }, {\n    key: \"visitKeyedRead\",\n    value: function visitKeyedRead(ast, context) {\n      return new KeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));\n    }\n  }, {\n    key: \"visitKeyedWrite\",\n    value: function visitKeyedWrite(ast, context) {\n      return new KeyedWrite(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this), ast.value.visit(this));\n    }\n  }, {\n    key: \"visitAll\",\n    value: function visitAll(asts) {\n      var res = [];\n\n      for (var i = 0; i < asts.length; ++i) {\n        res[i] = asts[i].visit(this);\n      }\n\n      return res;\n    }\n  }, {\n    key: \"visitChain\",\n    value: function visitChain(ast, context) {\n      return new Chain(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));\n    }\n  }, {\n    key: \"visitQuote\",\n    value: function visitQuote(ast, context) {\n      return new Quote(ast.span, ast.sourceSpan, ast.prefix, ast.uninterpretedExpression, ast.location);\n    }\n  }, {\n    key: \"visitSafeKeyedRead\",\n    value: function visitSafeKeyedRead(ast, context) {\n      return new SafeKeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));\n    }\n  }]);\n\n  return AstTransformer$1;\n}(); // A transformer that only creates new nodes if the transformer makes a change or\n// a change is made a child node.\n\n\nvar AstMemoryEfficientTransformer = /*#__PURE__*/function () {\n  function AstMemoryEfficientTransformer() {\n    _classCallCheck(this, AstMemoryEfficientTransformer);\n  }\n\n  _createClass(AstMemoryEfficientTransformer, [{\n    key: \"visitImplicitReceiver\",\n    value: function visitImplicitReceiver(ast, context) {\n      return ast;\n    }\n  }, {\n    key: \"visitThisReceiver\",\n    value: function visitThisReceiver(ast, context) {\n      return ast;\n    }\n  }, {\n    key: \"visitInterpolation\",\n    value: function visitInterpolation(ast, context) {\n      var expressions = this.visitAll(ast.expressions);\n      if (expressions !== ast.expressions) return new Interpolation(ast.span, ast.sourceSpan, ast.strings, expressions);\n      return ast;\n    }\n  }, {\n    key: \"visitLiteralPrimitive\",\n    value: function visitLiteralPrimitive(ast, context) {\n      return ast;\n    }\n  }, {\n    key: \"visitPropertyRead\",\n    value: function visitPropertyRead(ast, context) {\n      var receiver = ast.receiver.visit(this);\n\n      if (receiver !== ast.receiver) {\n        return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitPropertyWrite\",\n    value: function visitPropertyWrite(ast, context) {\n      var receiver = ast.receiver.visit(this);\n      var value = ast.value.visit(this);\n\n      if (receiver !== ast.receiver || value !== ast.value) {\n        return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name, value);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitSafePropertyRead\",\n    value: function visitSafePropertyRead(ast, context) {\n      var receiver = ast.receiver.visit(this);\n\n      if (receiver !== ast.receiver) {\n        return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitMethodCall\",\n    value: function visitMethodCall(ast, context) {\n      var receiver = ast.receiver.visit(this);\n      var args = this.visitAll(ast.args);\n\n      if (receiver !== ast.receiver || args !== ast.args) {\n        return new MethodCall(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name, args, ast.argumentSpan);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitSafeMethodCall\",\n    value: function visitSafeMethodCall(ast, context) {\n      var receiver = ast.receiver.visit(this);\n      var args = this.visitAll(ast.args);\n\n      if (receiver !== ast.receiver || args !== ast.args) {\n        return new SafeMethodCall(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name, args, ast.argumentSpan);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitFunctionCall\",\n    value: function visitFunctionCall(ast, context) {\n      var target = ast.target && ast.target.visit(this);\n      var args = this.visitAll(ast.args);\n\n      if (target !== ast.target || args !== ast.args) {\n        return new FunctionCall(ast.span, ast.sourceSpan, target, args);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitLiteralArray\",\n    value: function visitLiteralArray(ast, context) {\n      var expressions = this.visitAll(ast.expressions);\n\n      if (expressions !== ast.expressions) {\n        return new LiteralArray(ast.span, ast.sourceSpan, expressions);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitLiteralMap\",\n    value: function visitLiteralMap(ast, context) {\n      var values = this.visitAll(ast.values);\n\n      if (values !== ast.values) {\n        return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, values);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitUnary\",\n    value: function visitUnary(ast, context) {\n      var expr = ast.expr.visit(this);\n\n      if (expr !== ast.expr) {\n        switch (ast.operator) {\n          case '+':\n            return Unary.createPlus(ast.span, ast.sourceSpan, expr);\n\n          case '-':\n            return Unary.createMinus(ast.span, ast.sourceSpan, expr);\n\n          default:\n            throw new Error(\"Unknown unary operator \".concat(ast.operator));\n        }\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitBinary\",\n    value: function visitBinary(ast, context) {\n      var left = ast.left.visit(this);\n      var right = ast.right.visit(this);\n\n      if (left !== ast.left || right !== ast.right) {\n        return new Binary(ast.span, ast.sourceSpan, ast.operation, left, right);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitPrefixNot\",\n    value: function visitPrefixNot(ast, context) {\n      var expression = ast.expression.visit(this);\n\n      if (expression !== ast.expression) {\n        return new PrefixNot(ast.span, ast.sourceSpan, expression);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitNonNullAssert\",\n    value: function visitNonNullAssert(ast, context) {\n      var expression = ast.expression.visit(this);\n\n      if (expression !== ast.expression) {\n        return new NonNullAssert(ast.span, ast.sourceSpan, expression);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitConditional\",\n    value: function visitConditional(ast, context) {\n      var condition = ast.condition.visit(this);\n      var trueExp = ast.trueExp.visit(this);\n      var falseExp = ast.falseExp.visit(this);\n\n      if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== ast.falseExp) {\n        return new Conditional(ast.span, ast.sourceSpan, condition, trueExp, falseExp);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitPipe\",\n    value: function visitPipe(ast, context) {\n      var exp = ast.exp.visit(this);\n      var args = this.visitAll(ast.args);\n\n      if (exp !== ast.exp || args !== ast.args) {\n        return new BindingPipe(ast.span, ast.sourceSpan, exp, ast.name, args, ast.nameSpan);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitKeyedRead\",\n    value: function visitKeyedRead(ast, context) {\n      var obj = ast.receiver.visit(this);\n      var key = ast.key.visit(this);\n\n      if (obj !== ast.receiver || key !== ast.key) {\n        return new KeyedRead(ast.span, ast.sourceSpan, obj, key);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitKeyedWrite\",\n    value: function visitKeyedWrite(ast, context) {\n      var obj = ast.receiver.visit(this);\n      var key = ast.key.visit(this);\n      var value = ast.value.visit(this);\n\n      if (obj !== ast.receiver || key !== ast.key || value !== ast.value) {\n        return new KeyedWrite(ast.span, ast.sourceSpan, obj, key, value);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitAll\",\n    value: function visitAll(asts) {\n      var res = [];\n      var modified = false;\n\n      for (var i = 0; i < asts.length; ++i) {\n        var original = asts[i];\n        var value = original.visit(this);\n        res[i] = value;\n        modified = modified || value !== original;\n      }\n\n      return modified ? res : asts;\n    }\n  }, {\n    key: \"visitChain\",\n    value: function visitChain(ast, context) {\n      var expressions = this.visitAll(ast.expressions);\n\n      if (expressions !== ast.expressions) {\n        return new Chain(ast.span, ast.sourceSpan, expressions);\n      }\n\n      return ast;\n    }\n  }, {\n    key: \"visitQuote\",\n    value: function visitQuote(ast, context) {\n      return ast;\n    }\n  }, {\n    key: \"visitSafeKeyedRead\",\n    value: function visitSafeKeyedRead(ast, context) {\n      var obj = ast.receiver.visit(this);\n      var key = ast.key.visit(this);\n\n      if (obj !== ast.receiver || key !== ast.key) {\n        return new SafeKeyedRead(ast.span, ast.sourceSpan, obj, key);\n      }\n\n      return ast;\n    }\n  }]);\n\n  return AstMemoryEfficientTransformer;\n}(); // Bindings\n\n\nvar ParsedProperty = /*#__PURE__*/_createClass(function ParsedProperty(name, expression, type, // TODO(FW-2095): `keySpan` should really be required but allows `undefined` so VE does\n// not need to be updated. Make `keySpan` required when VE is removed.\nsourceSpan, keySpan, valueSpan) {\n  _classCallCheck(this, ParsedProperty);\n\n  this.name = name;\n  this.expression = expression;\n  this.type = type;\n  this.sourceSpan = sourceSpan;\n  this.keySpan = keySpan;\n  this.valueSpan = valueSpan;\n  this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;\n  this.isAnimation = this.type === ParsedPropertyType.ANIMATION;\n});\n\nvar ParsedPropertyType = /*@__PURE__*/function (ParsedPropertyType) {\n  ParsedPropertyType[ParsedPropertyType[\"DEFAULT\"] = 0] = \"DEFAULT\";\n  ParsedPropertyType[ParsedPropertyType[\"LITERAL_ATTR\"] = 1] = \"LITERAL_ATTR\";\n  ParsedPropertyType[ParsedPropertyType[\"ANIMATION\"] = 2] = \"ANIMATION\";\n  return ParsedPropertyType;\n}({});\n\nvar ParsedEvent = /*#__PURE__*/_createClass( // Regular events have a target\n// Animation events have a phase\nfunction ParsedEvent(name, targetOrPhase, type, handler, sourceSpan, // TODO(FW-2095): keySpan should be required but was made optional to avoid changing VE\nhandlerSpan, keySpan) {\n  _classCallCheck(this, ParsedEvent);\n\n  this.name = name;\n  this.targetOrPhase = targetOrPhase;\n  this.type = type;\n  this.handler = handler;\n  this.sourceSpan = sourceSpan;\n  this.handlerSpan = handlerSpan;\n  this.keySpan = keySpan;\n});\n/**\n * ParsedVariable represents a variable declaration in a microsyntax expression.\n */\n\n\nvar ParsedVariable = /*#__PURE__*/_createClass(function ParsedVariable(name, value, sourceSpan, keySpan, valueSpan) {\n  _classCallCheck(this, ParsedVariable);\n\n  this.name = name;\n  this.value = value;\n  this.sourceSpan = sourceSpan;\n  this.keySpan = keySpan;\n  this.valueSpan = valueSpan;\n});\n\nvar BoundElementProperty = /*#__PURE__*/_createClass(function BoundElementProperty(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan) {\n  _classCallCheck(this, BoundElementProperty);\n\n  this.name = name;\n  this.type = type;\n  this.securityContext = securityContext;\n  this.value = value;\n  this.unit = unit;\n  this.sourceSpan = sourceSpan;\n  this.keySpan = keySpan;\n  this.valueSpan = valueSpan;\n});\n/**\n * @license\n * Copyright Google LLC 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\nvar CORE$1 = '@angular/core';\n\nvar Identifiers$1 = /*@__PURE__*/function () {\n  var Identifiers$1 = /*#__PURE__*/_createClass(function Identifiers$1() {\n    _classCallCheck(this, Identifiers$1);\n  });\n\n  Identifiers$1.ANALYZE_FOR_ENTRY_COMPONENTS = {\n    name: 'ANALYZE_FOR_ENTRY_COMPONENTS',\n    moduleName: CORE$1\n  };\n  Identifiers$1.ElementRef = {\n    name: 'ElementRef',\n    moduleName: CORE$1\n  };\n  Identifiers$1.NgModuleRef = {\n    name: 'NgModuleRef',\n    moduleName: CORE$1\n  };\n  Identifiers$1.ViewContainerRef = {\n    name: 'ViewContainerRef',\n    moduleName: CORE$1\n  };\n  Identifiers$1.ChangeDetectorRef = {\n    name: 'ChangeDetectorRef',\n    moduleName: CORE$1\n  };\n  Identifiers$1.QueryList = {\n    name: 'QueryList',\n    moduleName: CORE$1\n  };\n  Identifiers$1.TemplateRef = {\n    name: 'TemplateRef',\n    moduleName: CORE$1\n  };\n  Identifiers$1.Renderer2 = {\n    name: 'Renderer2',\n    moduleName: CORE$1\n  };\n  Identifiers$1.CodegenComponentFactoryResolver = {\n    name: 'ɵCodegenComponentFactoryResolver',\n    moduleName: CORE$1\n  };\n  Identifiers$1.ComponentFactoryResolver = {\n    name: 'ComponentFactoryResolver',\n    moduleName: CORE$1\n  };\n  Identifiers$1.ComponentFactory = {\n    name: 'ComponentFactory',\n    moduleName: CORE$1\n  };\n  Identifiers$1.ComponentRef = {\n    name: 'ComponentRef',\n    moduleName: CORE$1\n  };\n  Identifiers$1.NgModuleFactory = {\n    name: 'NgModuleFactory',\n    moduleName: CORE$1\n  };\n  Identifiers$1.createModuleFactory = {\n    name: 'ɵcmf',\n    moduleName: CORE$1\n  };\n  Identifiers$1.moduleDef = {\n    name: 'ɵmod',\n    moduleName: CORE$1\n  };\n  Identifiers$1.moduleProviderDef = {\n    name: 'ɵmpd',\n    moduleName: CORE$1\n  };\n  Identifiers$1.RegisterModuleFactoryFn = {\n    name: 'ɵregisterModuleFactory',\n    moduleName: CORE$1\n  };\n  Identifiers$1.inject = {\n    name: 'ɵɵinject',\n    moduleName: CORE$1\n  };\n  Identifiers$1.directiveInject = {\n    name: 'ɵɵdirectiveInject',\n    moduleName: CORE$1\n  };\n  Identifiers$1.INJECTOR = {\n    name: 'INJECTOR',\n    moduleName: CORE$1\n  };\n  Identifiers$1.Injector = {\n    name: 'Injector',\n    moduleName: CORE$1\n  };\n  Identifiers$1.ViewEncapsulation = {\n    name: 'ViewEncapsulation',\n    moduleName: CORE$1\n  };\n  Identifiers$1.ChangeDetectionStrategy = {\n    name: 'ChangeDetectionStrategy',\n    moduleName: CORE$1\n  };\n  Identifiers$1.SecurityContext = {\n    name: 'SecurityContext',\n    moduleName: CORE$1\n  };\n  Identifiers$1.LOCALE_ID = {\n    name: 'LOCALE_ID',\n    moduleName: CORE$1\n  };\n  Identifiers$1.TRANSLATIONS_FORMAT = {\n    name: 'TRANSLATIONS_FORMAT',\n    moduleName: CORE$1\n  };\n  Identifiers$1.inlineInterpolate = {\n    name: 'ɵinlineInterpolate',\n    moduleName: CORE$1\n  };\n  Identifiers$1.interpolate = {\n    name: 'ɵinterpolate',\n    moduleName: CORE$1\n  };\n  Identifiers$1.EMPTY_ARRAY = {\n    name: 'ɵEMPTY_ARRAY',\n    moduleName: CORE$1\n  };\n  Identifiers$1.EMPTY_MAP = {\n    name: 'ɵEMPTY_MAP',\n    moduleName: CORE$1\n  };\n  Identifiers$1.Renderer = {\n    name: 'Renderer',\n    moduleName: CORE$1\n  };\n  Identifiers$1.viewDef = {\n    name: 'ɵvid',\n    moduleName: CORE$1\n  };\n  Identifiers$1.elementDef = {\n    name: 'ɵeld',\n    moduleName: CORE$1\n  };\n  Identifiers$1.anchorDef = {\n    name: 'ɵand',\n    moduleName: CORE$1\n  };\n  Identifiers$1.textDef = {\n    name: 'ɵted',\n    moduleName: CORE$1\n  };\n  Identifiers$1.directiveDef = {\n    name: 'ɵdid',\n    moduleName: CORE$1\n  };\n  Identifiers$1.providerDef = {\n    name: 'ɵprd',\n    moduleName: CORE$1\n  };\n  Identifiers$1.queryDef = {\n    name: 'ɵqud',\n    moduleName: CORE$1\n  };\n  Identifiers$1.pureArrayDef = {\n    name: 'ɵpad',\n    moduleName: CORE$1\n  };\n  Identifiers$1.pureObjectDef = {\n    name: 'ɵpod',\n    moduleName: CORE$1\n  };\n  Identifiers$1.purePipeDef = {\n    name: 'ɵppd',\n    moduleName: CORE$1\n  };\n  Identifiers$1.pipeDef = {\n    name: 'ɵpid',\n    moduleName: CORE$1\n  };\n  Identifiers$1.nodeValue = {\n    name: 'ɵnov',\n    moduleName: CORE$1\n  };\n  Identifiers$1.ngContentDef = {\n    name: 'ɵncd',\n    moduleName: CORE$1\n  };\n  Identifiers$1.unwrapValue = {\n    name: 'ɵunv',\n    moduleName: CORE$1\n  };\n  Identifiers$1.createRendererType2 = {\n    name: 'ɵcrt',\n    moduleName: CORE$1\n  }; // type only\n\n  Identifiers$1.RendererType2 = {\n    name: 'RendererType2',\n    moduleName: CORE$1\n  }; // type only\n\n  Identifiers$1.ViewDefinition = {\n    name: 'ɵViewDefinition',\n    moduleName: CORE$1\n  };\n  Identifiers$1.createComponentFactory = {\n    name: 'ɵccf',\n    moduleName: CORE$1\n  };\n  return Identifiers$1;\n}();\n\nfunction createTokenForReference(reference) {\n  return {\n    identifier: {\n      reference: reference\n    }\n  };\n}\n\nfunction createTokenForExternalReference(reflector, reference) {\n  return createTokenForReference(reflector.resolveExternalReference(reference));\n}\n\nvar EventHandlerVars = /*@__PURE__*/function () {\n  var EventHandlerVars = /*#__PURE__*/_createClass(function EventHandlerVars() {\n    _classCallCheck(this, EventHandlerVars);\n  });\n\n  EventHandlerVars.event = /*@__PURE__*/variable('$event');\n  return EventHandlerVars;\n}();\n\nvar ConvertActionBindingResult = /*#__PURE__*/_createClass(function ConvertActionBindingResult(\n/**\n * Render2 compatible statements,\n */\nstmts,\n/**\n * Variable name used with render2 compatible statements.\n */\nallowDefault) {\n  _classCallCheck(this, ConvertActionBindingResult);\n\n  this.stmts = stmts;\n  this.allowDefault = allowDefault;\n  /**\n   * This is bit of a hack. It converts statements which render2 expects to statements which are\n   * expected by render3.\n   *\n   * Example: `<div click=\"doSomething($event)\">` will generate:\n   *\n   * Render3:\n   * ```\n   * const pd_b:any = ((<any>ctx.doSomething($event)) !== false);\n   * return pd_b;\n   * ```\n   *\n   * but render2 expects:\n   * ```\n   * return ctx.doSomething($event);\n   * ```\n   */\n  // TODO(misko): remove this hack once we no longer support ViewEngine.\n\n  this.render3Stmts = stmts.map(function (statement) {\n    if (statement instanceof DeclareVarStmt && statement.name == allowDefault.name && statement.value instanceof BinaryOperatorExpr) {\n      var lhs = statement.value.lhs;\n      return new ReturnStatement(lhs.value);\n    }\n\n    return statement;\n  });\n});\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression is\n * used in an action binding (e.g. an event handler).\n */\n\n\nfunction convertActionBinding(localResolver, implicitReceiver, action, bindingId, interpolationFunction, baseSourceSpan, implicitReceiverAccesses, globals) {\n  if (!localResolver) {\n    localResolver = new DefaultLocalResolver(globals);\n  }\n\n  var actionWithoutBuiltins = convertPropertyBindingBuiltins({\n    createLiteralArrayConverter: function createLiteralArrayConverter(argCount) {\n      // Note: no caching for literal arrays in actions.\n      return function (args) {\n        return literalArr(args);\n      };\n    },\n    createLiteralMapConverter: function createLiteralMapConverter(keys) {\n      // Note: no caching for literal maps in actions.\n      return function (values) {\n        var entries = keys.map(function (k, i) {\n          return {\n            key: k.key,\n            value: values[i],\n            quoted: k.quoted\n          };\n        });\n        return literalMap(entries);\n      };\n    },\n    createPipeConverter: function createPipeConverter(name) {\n      throw new Error(\"Illegal State: Actions are not allowed to contain pipes. Pipe: \".concat(name));\n    }\n  }, action);\n  var visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction, baseSourceSpan, implicitReceiverAccesses);\n  var actionStmts = [];\n  flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);\n  prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);\n\n  if (visitor.usesImplicitReceiver) {\n    localResolver.notifyImplicitReceiverUse();\n  }\n\n  var lastIndex = actionStmts.length - 1;\n  var preventDefaultVar = null;\n\n  if (lastIndex >= 0) {\n    var lastStatement = actionStmts[lastIndex];\n    var returnExpr = convertStmtIntoExpression(lastStatement);\n\n    if (returnExpr) {\n      // Note: We need to cast the result of the method call to dynamic,\n      // as it might be a void method!\n      preventDefaultVar = createPreventDefaultVar(bindingId);\n      actionStmts[lastIndex] = preventDefaultVar.set(returnExpr.cast(DYNAMIC_TYPE).notIdentical(literal(false))).toDeclStmt(null, [StmtModifier.Final]);\n    }\n  }\n\n  return new ConvertActionBindingResult(actionStmts, preventDefaultVar);\n}\n\nfunction convertPropertyBindingBuiltins(converterFactory, ast) {\n  return convertBuiltins(converterFactory, ast);\n}\n\nvar ConvertPropertyBindingResult = /*#__PURE__*/_createClass(function ConvertPropertyBindingResult(stmts, currValExpr) {\n  _classCallCheck(this, ConvertPropertyBindingResult);\n\n  this.stmts = stmts;\n  this.currValExpr = currValExpr;\n});\n\nvar BindingForm = /*@__PURE__*/function (BindingForm) {\n  // The general form of binding expression, supports all expressions.\n  BindingForm[BindingForm[\"General\"] = 0] = \"General\"; // Try to generate a simple binding (no temporaries or statements)\n  // otherwise generate a general binding\n\n  BindingForm[BindingForm[\"TrySimple\"] = 1] = \"TrySimple\"; // Inlines assignment of temporaries into the generated expression. The result may still\n  // have statements attached for declarations of temporary variables.\n  // This is the only relevant form for Ivy, the other forms are only used in ViewEngine.\n\n  BindingForm[BindingForm[\"Expression\"] = 2] = \"Expression\";\n  return BindingForm;\n}({});\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression\n * is used in property binding. The expression has to be preprocessed via\n * `convertPropertyBindingBuiltins`.\n */\n\n\nfunction _convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId, form, interpolationFunction) {\n  if (!localResolver) {\n    localResolver = new DefaultLocalResolver();\n  }\n\n  var visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction);\n  var outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);\n  var stmts = getStatementsFromVisitor(visitor, bindingId);\n\n  if (visitor.usesImplicitReceiver) {\n    localResolver.notifyImplicitReceiverUse();\n  }\n\n  if (visitor.temporaryCount === 0 && form == BindingForm.TrySimple) {\n    return new ConvertPropertyBindingResult([], outputExpr);\n  } else if (form === BindingForm.Expression) {\n    return new ConvertPropertyBindingResult(stmts, outputExpr);\n  }\n\n  var currValExpr = createCurrValueExpr(bindingId);\n  stmts.push(currValExpr.set(outputExpr).toDeclStmt(DYNAMIC_TYPE, [StmtModifier.Final]));\n  return new ConvertPropertyBindingResult(stmts, currValExpr);\n}\n/**\n * Given some expression, such as a binding or interpolation expression, and a context expression to\n * look values up on, visit each facet of the given expression resolving values from the context\n * expression such that a list of arguments can be derived from the found values that can be used as\n * arguments to an external update instruction.\n *\n * @param localResolver The resolver to use to look up expressions by name appropriately\n * @param contextVariableExpression The expression representing the context variable used to create\n * the final argument expressions\n * @param expressionWithArgumentsToExtract The expression to visit to figure out what values need to\n * be resolved and what arguments list to build.\n * @param bindingId A name prefix used to create temporary variable names if they're needed for the\n * arguments generated\n * @returns An array of expressions that can be passed as arguments to instruction expressions like\n * `o.importExpr(R3.propertyInterpolate).callFn(result)`\n */\n\n\nfunction convertUpdateArguments(localResolver, contextVariableExpression, expressionWithArgumentsToExtract, bindingId) {\n  var visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId, undefined);\n  var outputExpr = expressionWithArgumentsToExtract.visit(visitor, _Mode.Expression);\n\n  if (visitor.usesImplicitReceiver) {\n    localResolver.notifyImplicitReceiverUse();\n  }\n\n  var stmts = getStatementsFromVisitor(visitor, bindingId); // Removing the first argument, because it was a length for ViewEngine, not Ivy.\n\n  var args = outputExpr.args.slice(1);\n\n  if (expressionWithArgumentsToExtract instanceof Interpolation) {\n    // If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the\n    // args returned to just the value, because we're going to pass it to a special instruction.\n    var strings = expressionWithArgumentsToExtract.strings;\n\n    if (args.length === 3 && strings[0] === '' && strings[1] === '') {\n      // Single argument interpolate instructions.\n      args = [args[1]];\n    } else if (args.length >= 19) {\n      // 19 or more arguments must be passed to the `interpolateV`-style instructions, which accept\n      // an array of arguments\n      args = [literalArr(args)];\n    }\n  }\n\n  return {\n    stmts: stmts,\n    args: args\n  };\n}\n\nfunction getStatementsFromVisitor(visitor, bindingId) {\n  var stmts = [];\n\n  for (var i = 0; i < visitor.temporaryCount; i++) {\n    stmts.push(temporaryDeclaration(bindingId, i));\n  }\n\n  return stmts;\n}\n\nfunction convertBuiltins(converterFactory, ast) {\n  var visitor = new _BuiltinAstConverter(converterFactory);\n  return ast.visit(visitor);\n}\n\nfunction temporaryName(bindingId, temporaryNumber) {\n  return \"tmp_\".concat(bindingId, \"_\").concat(temporaryNumber);\n}\n\nfunction temporaryDeclaration(bindingId, temporaryNumber) {\n  return new DeclareVarStmt(temporaryName(bindingId, temporaryNumber));\n}\n\nfunction prependTemporaryDecls(temporaryCount, bindingId, statements) {\n  for (var i = temporaryCount - 1; i >= 0; i--) {\n    statements.unshift(temporaryDeclaration(bindingId, i));\n  }\n}\n\nvar _Mode = /*@__PURE__*/function (_Mode) {\n  _Mode[_Mode[\"Statement\"] = 0] = \"Statement\";\n  _Mode[_Mode[\"Expression\"] = 1] = \"Expression\";\n  return _Mode;\n}({});\n\nfunction ensureStatementMode(mode, ast) {\n  if (mode !== _Mode.Statement) {\n    throw new Error(\"Expected a statement, but saw \".concat(ast));\n  }\n}\n\nfunction ensureExpressionMode(mode, ast) {\n  if (mode !== _Mode.Expression) {\n    throw new Error(\"Expected an expression, but saw \".concat(ast));\n  }\n}\n\nfunction convertToStatementIfNeeded(mode, expr) {\n  if (mode === _Mode.Statement) {\n    return expr.toStmt();\n  } else {\n    return expr;\n  }\n}\n\nvar _BuiltinAstConverter = /*#__PURE__*/function (_AstTransformer$) {\n  _inherits(_BuiltinAstConverter, _AstTransformer$);\n\n  var _super80 = _createSuper(_BuiltinAstConverter);\n\n  function _BuiltinAstConverter(_converterFactory) {\n    var _this112;\n\n    _classCallCheck(this, _BuiltinAstConverter);\n\n    _this112 = _super80.call(this);\n    _this112._converterFactory = _converterFactory;\n    return _this112;\n  }\n\n  _createClass(_BuiltinAstConverter, [{\n    key: \"visitPipe\",\n    value: function visitPipe(ast, context) {\n      var _this113 = this;\n\n      var args = [ast.exp].concat(_toConsumableArray(ast.args)).map(function (ast) {\n        return ast.visit(_this113, context);\n      });\n      return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createPipeConverter(ast.name, args.length));\n    }\n  }, {\n    key: \"visitLiteralArray\",\n    value: function visitLiteralArray(ast, context) {\n      var _this114 = this;\n\n      var args = ast.expressions.map(function (ast) {\n        return ast.visit(_this114, context);\n      });\n      return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length));\n    }\n  }, {\n    key: \"visitLiteralMap\",\n    value: function visitLiteralMap(ast, context) {\n      var _this115 = this;\n\n      var args = ast.values.map(function (ast) {\n        return ast.visit(_this115, context);\n      });\n      return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralMapConverter(ast.keys));\n    }\n  }]);\n\n  return _BuiltinAstConverter;\n}(AstTransformer$1);\n\nvar _AstToIrVisitor = /*#__PURE__*/function () {\n  function _AstToIrVisitor(_localResolver, _implicitReceiver, bindingId, interpolationFunction, baseSourceSpan, implicitReceiverAccesses) {\n    _classCallCheck(this, _AstToIrVisitor);\n\n    this._localResolver = _localResolver;\n    this._implicitReceiver = _implicitReceiver;\n    this.bindingId = bindingId;\n    this.interpolationFunction = interpolationFunction;\n    this.baseSourceSpan = baseSourceSpan;\n    this.implicitReceiverAccesses = implicitReceiverAccesses;\n    this._nodeMap = new Map();\n    this._resultMap = new Map();\n    this._currentTemporary = 0;\n    this.temporaryCount = 0;\n    this.usesImplicitReceiver = false;\n  }\n\n  _createClass(_AstToIrVisitor, [{\n    key: \"visitUnary\",\n    value: function visitUnary(ast, mode) {\n      var op;\n\n      switch (ast.operator) {\n        case '+':\n          op = UnaryOperator.Plus;\n          break;\n\n        case '-':\n          op = UnaryOperator.Minus;\n          break;\n\n        default:\n          throw new Error(\"Unsupported operator \".concat(ast.operator));\n      }\n\n      return convertToStatementIfNeeded(mode, new UnaryOperatorExpr(op, this._visit(ast.expr, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));\n    }\n  }, {\n    key: \"visitBinary\",\n    value: function visitBinary(ast, mode) {\n      var op;\n\n      switch (ast.operation) {\n        case '+':\n          op = BinaryOperator.Plus;\n          break;\n\n        case '-':\n          op = BinaryOperator.Minus;\n          break;\n\n        case '*':\n          op = BinaryOperator.Multiply;\n          break;\n\n        case '/':\n          op = BinaryOperator.Divide;\n          break;\n\n        case '%':\n          op = BinaryOperator.Modulo;\n          break;\n\n        case '&&':\n          op = BinaryOperator.And;\n          break;\n\n        case '||':\n          op = BinaryOperator.Or;\n          break;\n\n        case '==':\n          op = BinaryOperator.Equals;\n          break;\n\n        case '!=':\n          op = BinaryOperator.NotEquals;\n          break;\n\n        case '===':\n          op = BinaryOperator.Identical;\n          break;\n\n        case '!==':\n          op = BinaryOperator.NotIdentical;\n          break;\n\n        case '<':\n          op = BinaryOperator.Lower;\n          break;\n\n        case '>':\n          op = BinaryOperator.Bigger;\n          break;\n\n        case '<=':\n          op = BinaryOperator.LowerEquals;\n          break;\n\n        case '>=':\n          op = BinaryOperator.BiggerEquals;\n          break;\n\n        case '??':\n          return this.convertNullishCoalesce(ast, mode);\n\n        default:\n          throw new Error(\"Unsupported operation \".concat(ast.operation));\n      }\n\n      return convertToStatementIfNeeded(mode, new BinaryOperatorExpr(op, this._visit(ast.left, _Mode.Expression), this._visit(ast.right, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));\n    }\n  }, {\n    key: \"visitChain\",\n    value: function visitChain(ast, mode) {\n      ensureStatementMode(mode, ast);\n      return this.visitAll(ast.expressions, mode);\n    }\n  }, {\n    key: \"visitConditional\",\n    value: function visitConditional(ast, mode) {\n      var value = this._visit(ast.condition, _Mode.Expression);\n\n      return convertToStatementIfNeeded(mode, value.conditional(this._visit(ast.trueExp, _Mode.Expression), this._visit(ast.falseExp, _Mode.Expression), this.convertSourceSpan(ast.span)));\n    }\n  }, {\n    key: \"visitPipe\",\n    value: function visitPipe(ast, mode) {\n      throw new Error(\"Illegal state: Pipes should have been converted into functions. Pipe: \".concat(ast.name));\n    }\n  }, {\n    key: \"visitFunctionCall\",\n    value: function visitFunctionCall(ast, mode) {\n      var convertedArgs = this.visitAll(ast.args, _Mode.Expression);\n      var fnResult;\n\n      if (ast instanceof BuiltinFunctionCall) {\n        fnResult = ast.converter(convertedArgs);\n      } else {\n        fnResult = this._visit(ast.target, _Mode.Expression).callFn(convertedArgs, this.convertSourceSpan(ast.span));\n      }\n\n      return convertToStatementIfNeeded(mode, fnResult);\n    }\n  }, {\n    key: \"visitImplicitReceiver\",\n    value: function visitImplicitReceiver(ast, mode) {\n      ensureExpressionMode(mode, ast);\n      this.usesImplicitReceiver = true;\n      return this._implicitReceiver;\n    }\n  }, {\n    key: \"visitThisReceiver\",\n    value: function visitThisReceiver(ast, mode) {\n      return this.visitImplicitReceiver(ast, mode);\n    }\n  }, {\n    key: \"visitInterpolation\",\n    value: function visitInterpolation(ast, mode) {\n      ensureExpressionMode(mode, ast);\n      var args = [literal(ast.expressions.length)];\n\n      for (var i = 0; i < ast.strings.length - 1; i++) {\n        args.push(literal(ast.strings[i]));\n        args.push(this._visit(ast.expressions[i], _Mode.Expression));\n      }\n\n      args.push(literal(ast.strings[ast.strings.length - 1]));\n\n      if (this.interpolationFunction) {\n        return this.interpolationFunction(args);\n      }\n\n      return ast.expressions.length <= 9 ? importExpr(Identifiers$1.inlineInterpolate).callFn(args) : importExpr(Identifiers$1.interpolate).callFn([args[0], literalArr(args.slice(1), undefined, this.convertSourceSpan(ast.span))]);\n    }\n  }, {\n    key: \"visitKeyedRead\",\n    value: function visitKeyedRead(ast, mode) {\n      var leftMostSafe = this.leftMostSafeNode(ast);\n\n      if (leftMostSafe) {\n        return this.convertSafeAccess(ast, leftMostSafe, mode);\n      } else {\n        return convertToStatementIfNeeded(mode, this._visit(ast.receiver, _Mode.Expression).key(this._visit(ast.key, _Mode.Expression)));\n      }\n    }\n  }, {\n    key: \"visitKeyedWrite\",\n    value: function visitKeyedWrite(ast, mode) {\n      var obj = this._visit(ast.receiver, _Mode.Expression);\n\n      var key = this._visit(ast.key, _Mode.Expression);\n\n      var value = this._visit(ast.value, _Mode.Expression);\n\n      if (obj === this._implicitReceiver) {\n        this._localResolver.maybeRestoreView();\n      }\n\n      return convertToStatementIfNeeded(mode, obj.key(key).set(value));\n    }\n  }, {\n    key: \"visitLiteralArray\",\n    value: function visitLiteralArray(ast, mode) {\n      throw new Error(\"Illegal State: literal arrays should have been converted into functions\");\n    }\n  }, {\n    key: \"visitLiteralMap\",\n    value: function visitLiteralMap(ast, mode) {\n      throw new Error(\"Illegal State: literal maps should have been converted into functions\");\n    }\n  }, {\n    key: \"visitLiteralPrimitive\",\n    value: function visitLiteralPrimitive(ast, mode) {\n      // For literal values of null, undefined, true, or false allow type interference\n      // to infer the type.\n      var type = ast.value === null || ast.value === undefined || ast.value === true || ast.value === true ? INFERRED_TYPE : undefined;\n      return convertToStatementIfNeeded(mode, literal(ast.value, type, this.convertSourceSpan(ast.span)));\n    }\n  }, {\n    key: \"_getLocal\",\n    value: function _getLocal(name, receiver) {\n      var _a;\n\n      if (((_a = this._localResolver.globals) === null || _a === void 0 ? void 0 : _a.has(name)) && receiver instanceof ThisReceiver) {\n        return null;\n      }\n\n      return this._localResolver.getLocal(name);\n    }\n  }, {\n    key: \"visitMethodCall\",\n    value: function visitMethodCall(ast, mode) {\n      if (ast.receiver instanceof ImplicitReceiver && !(ast.receiver instanceof ThisReceiver) && ast.name === '$any') {\n        var args = this.visitAll(ast.args, _Mode.Expression);\n\n        if (args.length != 1) {\n          throw new Error(\"Invalid call to $any, expected 1 argument but received \".concat(args.length || 'none'));\n        }\n\n        return args[0].cast(DYNAMIC_TYPE, this.convertSourceSpan(ast.span));\n      }\n\n      var leftMostSafe = this.leftMostSafeNode(ast);\n\n      if (leftMostSafe) {\n        return this.convertSafeAccess(ast, leftMostSafe, mode);\n      } else {\n        var _args = this.visitAll(ast.args, _Mode.Expression);\n\n        var prevUsesImplicitReceiver = this.usesImplicitReceiver;\n        var result = null;\n\n        var receiver = this._visit(ast.receiver, _Mode.Expression);\n\n        if (receiver === this._implicitReceiver) {\n          var varExpr = this._getLocal(ast.name, ast.receiver);\n\n          if (varExpr) {\n            // Restore the previous \"usesImplicitReceiver\" state since the implicit\n            // receiver has been replaced with a resolved local expression.\n            this.usesImplicitReceiver = prevUsesImplicitReceiver;\n            result = varExpr.callFn(_args);\n            this.addImplicitReceiverAccess(ast.name);\n          }\n        }\n\n        if (result == null) {\n          result = receiver.callMethod(ast.name, _args, this.convertSourceSpan(ast.span));\n        }\n\n        return convertToStatementIfNeeded(mode, result);\n      }\n    }\n  }, {\n    key: \"visitPrefixNot\",\n    value: function visitPrefixNot(ast, mode) {\n      return convertToStatementIfNeeded(mode, not(this._visit(ast.expression, _Mode.Expression)));\n    }\n  }, {\n    key: \"visitNonNullAssert\",\n    value: function visitNonNullAssert(ast, mode) {\n      return convertToStatementIfNeeded(mode, assertNotNull(this._visit(ast.expression, _Mode.Expression)));\n    }\n  }, {\n    key: \"visitPropertyRead\",\n    value: function visitPropertyRead(ast, mode) {\n      var leftMostSafe = this.leftMostSafeNode(ast);\n\n      if (leftMostSafe) {\n        return this.convertSafeAccess(ast, leftMostSafe, mode);\n      } else {\n        var result = null;\n        var prevUsesImplicitReceiver = this.usesImplicitReceiver;\n\n        var receiver = this._visit(ast.receiver, _Mode.Expression);\n\n        if (receiver === this._implicitReceiver) {\n          result = this._getLocal(ast.name, ast.receiver);\n\n          if (result) {\n            // Restore the previous \"usesImplicitReceiver\" state since the implicit\n            // receiver has been replaced with a resolved local expression.\n            this.usesImplicitReceiver = prevUsesImplicitReceiver;\n            this.addImplicitReceiverAccess(ast.name);\n          }\n        }\n\n        if (result == null) {\n          result = receiver.prop(ast.name);\n        }\n\n        return convertToStatementIfNeeded(mode, result);\n      }\n    }\n  }, {\n    key: \"visitPropertyWrite\",\n    value: function visitPropertyWrite(ast, mode) {\n      var receiver = this._visit(ast.receiver, _Mode.Expression);\n\n      var prevUsesImplicitReceiver = this.usesImplicitReceiver;\n      var varExpr = null;\n\n      if (receiver === this._implicitReceiver) {\n        var localExpr = this._getLocal(ast.name, ast.receiver);\n\n        if (localExpr) {\n          if (localExpr instanceof ReadPropExpr) {\n            // If the local variable is a property read expression, it's a reference\n            // to a 'context.property' value and will be used as the target of the\n            // write expression.\n            varExpr = localExpr; // Restore the previous \"usesImplicitReceiver\" state since the implicit\n            // receiver has been replaced with a resolved local expression.\n\n            this.usesImplicitReceiver = prevUsesImplicitReceiver;\n            this.addImplicitReceiverAccess(ast.name);\n          } else {\n            // Otherwise it's an error.\n            var _receiver = ast.name;\n            var value = ast.value instanceof PropertyRead ? ast.value.name : undefined;\n            throw new Error(\"Cannot assign value \\\"\".concat(value, \"\\\" to template variable \\\"\").concat(_receiver, \"\\\". Template variables are read-only.\"));\n          }\n        }\n      } // If no local expression could be produced, use the original receiver's\n      // property as the target.\n\n\n      if (varExpr === null) {\n        varExpr = receiver.prop(ast.name);\n      }\n\n      return convertToStatementIfNeeded(mode, varExpr.set(this._visit(ast.value, _Mode.Expression)));\n    }\n  }, {\n    key: \"visitSafePropertyRead\",\n    value: function visitSafePropertyRead(ast, mode) {\n      return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n    }\n  }, {\n    key: \"visitSafeMethodCall\",\n    value: function visitSafeMethodCall(ast, mode) {\n      return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n    }\n  }, {\n    key: \"visitSafeKeyedRead\",\n    value: function visitSafeKeyedRead(ast, mode) {\n      return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n    }\n  }, {\n    key: \"visitAll\",\n    value: function visitAll(asts, mode) {\n      var _this116 = this;\n\n      return asts.map(function (ast) {\n        return _this116._visit(ast, mode);\n      });\n    }\n  }, {\n    key: \"visitQuote\",\n    value: function visitQuote(ast, mode) {\n      throw new Error(\"Quotes are not supported for evaluation!\\n        Statement: \".concat(ast.uninterpretedExpression, \" located at \").concat(ast.location));\n    }\n  }, {\n    key: \"_visit\",\n    value: function _visit(ast, mode) {\n      var result = this._resultMap.get(ast);\n\n      if (result) return result;\n      return (this._nodeMap.get(ast) || ast).visit(this, mode);\n    }\n  }, {\n    key: \"convertSafeAccess\",\n    value: function convertSafeAccess(ast, leftMostSafe, mode) {\n      // If the expression contains a safe access node on the left it needs to be converted to\n      // an expression that guards the access to the member by checking the receiver for blank. As\n      // execution proceeds from left to right, the left most part of the expression must be guarded\n      // first but, because member access is left associative, the right side of the expression is at\n      // the top of the AST. The desired result requires lifting a copy of the left part of the\n      // expression up to test it for blank before generating the unguarded version.\n      // Consider, for example the following expression: a?.b.c?.d.e\n      // This results in the ast:\n      //         .\n      //        / \\\n      //       ?.   e\n      //      /  \\\n      //     .    d\n      //    / \\\n      //   ?.  c\n      //  /  \\\n      // a    b\n      // The following tree should be generated:\n      //\n      //        /---- ? ----\\\n      //       /      |      \\\n      //     a   /--- ? ---\\  null\n      //        /     |     \\\n      //       .      .     null\n      //      / \\    / \\\n      //     .  c   .   e\n      //    / \\    / \\\n      //   a   b  .   d\n      //         / \\\n      //        .   c\n      //       / \\\n      //      a   b\n      //\n      // Notice that the first guard condition is the left hand of the left most safe access node\n      // which comes in as leftMostSafe to this routine.\n      var guardedExpression = this._visit(leftMostSafe.receiver, _Mode.Expression);\n\n      var temporary = undefined;\n\n      if (this.needsTemporaryInSafeAccess(leftMostSafe.receiver)) {\n        // If the expression has method calls or pipes then we need to save the result into a\n        // temporary variable to avoid calling stateful or impure code more than once.\n        temporary = this.allocateTemporary(); // Preserve the result in the temporary variable\n\n        guardedExpression = temporary.set(guardedExpression); // Ensure all further references to the guarded expression refer to the temporary instead.\n\n        this._resultMap.set(leftMostSafe.receiver, temporary);\n      }\n\n      var condition = guardedExpression.isBlank(); // Convert the ast to an unguarded access to the receiver's member. The map will substitute\n      // leftMostNode with its unguarded version in the call to `this.visit()`.\n\n      if (leftMostSafe instanceof SafeMethodCall) {\n        this._nodeMap.set(leftMostSafe, new MethodCall(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.nameSpan, leftMostSafe.receiver, leftMostSafe.name, leftMostSafe.args, leftMostSafe.argumentSpan));\n      } else if (leftMostSafe instanceof SafeKeyedRead) {\n        this._nodeMap.set(leftMostSafe, new KeyedRead(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.receiver, leftMostSafe.key));\n      } else {\n        this._nodeMap.set(leftMostSafe, new PropertyRead(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.nameSpan, leftMostSafe.receiver, leftMostSafe.name));\n      } // Recursively convert the node now without the guarded member access.\n\n\n      var access = this._visit(ast, _Mode.Expression); // Remove the mapping. This is not strictly required as the converter only traverses each node\n      // once but is safer if the conversion is changed to traverse the nodes more than once.\n\n\n      this._nodeMap.delete(leftMostSafe); // If we allocated a temporary, release it.\n\n\n      if (temporary) {\n        this.releaseTemporary(temporary);\n      } // Produce the conditional\n\n\n      return convertToStatementIfNeeded(mode, condition.conditional(NULL_EXPR, access));\n    }\n  }, {\n    key: \"convertNullishCoalesce\",\n    value: function convertNullishCoalesce(ast, mode) {\n      var left = this._visit(ast.left, _Mode.Expression);\n\n      var right = this._visit(ast.right, _Mode.Expression);\n\n      var temporary = this.allocateTemporary();\n      this.releaseTemporary(temporary); // Generate the following expression. It is identical to how TS\n      // transpiles binary expressions with a nullish coalescing operator.\n      // let temp;\n      // (temp = a) !== null && temp !== undefined ? temp : b;\n\n      return convertToStatementIfNeeded(mode, temporary.set(left).notIdentical(NULL_EXPR).and(temporary.notIdentical(literal(undefined))).conditional(temporary, right));\n    } // Given an expression of the form a?.b.c?.d.e then the left most safe node is\n    // the (a?.b). The . and ?. are left associative thus can be rewritten as:\n    // ((((a?.c).b).c)?.d).e. This returns the most deeply nested safe read or\n    // safe method call as this needs to be transformed initially to:\n    //   a == null ? null : a.c.b.c?.d.e\n    // then to:\n    //   a == null ? null : a.b.c == null ? null : a.b.c.d.e\n\n  }, {\n    key: \"leftMostSafeNode\",\n    value: function leftMostSafeNode(ast) {\n      var _this117 = this;\n\n      var visit = function visit(visitor, ast) {\n        return (_this117._nodeMap.get(ast) || ast).visit(visitor);\n      };\n\n      return ast.visit({\n        visitUnary: function visitUnary(ast) {\n          return null;\n        },\n        visitBinary: function visitBinary(ast) {\n          return null;\n        },\n        visitChain: function visitChain(ast) {\n          return null;\n        },\n        visitConditional: function visitConditional(ast) {\n          return null;\n        },\n        visitFunctionCall: function visitFunctionCall(ast) {\n          return null;\n        },\n        visitImplicitReceiver: function visitImplicitReceiver(ast) {\n          return null;\n        },\n        visitThisReceiver: function visitThisReceiver(ast) {\n          return null;\n        },\n        visitInterpolation: function visitInterpolation(ast) {\n          return null;\n        },\n        visitKeyedRead: function visitKeyedRead(ast) {\n          return visit(this, ast.receiver);\n        },\n        visitKeyedWrite: function visitKeyedWrite(ast) {\n          return null;\n        },\n        visitLiteralArray: function visitLiteralArray(ast) {\n          return null;\n        },\n        visitLiteralMap: function visitLiteralMap(ast) {\n          return null;\n        },\n        visitLiteralPrimitive: function visitLiteralPrimitive(ast) {\n          return null;\n        },\n        visitMethodCall: function visitMethodCall(ast) {\n          return visit(this, ast.receiver);\n        },\n        visitPipe: function visitPipe(ast) {\n          return null;\n        },\n        visitPrefixNot: function visitPrefixNot(ast) {\n          return null;\n        },\n        visitNonNullAssert: function visitNonNullAssert(ast) {\n          return null;\n        },\n        visitPropertyRead: function visitPropertyRead(ast) {\n          return visit(this, ast.receiver);\n        },\n        visitPropertyWrite: function visitPropertyWrite(ast) {\n          return null;\n        },\n        visitQuote: function visitQuote(ast) {\n          return null;\n        },\n        visitSafeMethodCall: function visitSafeMethodCall(ast) {\n          return visit(this, ast.receiver) || ast;\n        },\n        visitSafePropertyRead: function visitSafePropertyRead(ast) {\n          return visit(this, ast.receiver) || ast;\n        },\n        visitSafeKeyedRead: function visitSafeKeyedRead(ast) {\n          return visit(this, ast.receiver) || ast;\n        }\n      });\n    } // Returns true of the AST includes a method or a pipe indicating that, if the\n    // expression is used as the target of a safe property or method access then\n    // the expression should be stored into a temporary variable.\n\n  }, {\n    key: \"needsTemporaryInSafeAccess\",\n    value: function needsTemporaryInSafeAccess(ast) {\n      var _this118 = this;\n\n      var visit = function visit(visitor, ast) {\n        return ast && (_this118._nodeMap.get(ast) || ast).visit(visitor);\n      };\n\n      var visitSome = function visitSome(visitor, ast) {\n        return ast.some(function (ast) {\n          return visit(visitor, ast);\n        });\n      };\n\n      return ast.visit({\n        visitUnary: function visitUnary(ast) {\n          return visit(this, ast.expr);\n        },\n        visitBinary: function visitBinary(ast) {\n          return visit(this, ast.left) || visit(this, ast.right);\n        },\n        visitChain: function visitChain(ast) {\n          return false;\n        },\n        visitConditional: function visitConditional(ast) {\n          return visit(this, ast.condition) || visit(this, ast.trueExp) || visit(this, ast.falseExp);\n        },\n        visitFunctionCall: function visitFunctionCall(ast) {\n          return true;\n        },\n        visitImplicitReceiver: function visitImplicitReceiver(ast) {\n          return false;\n        },\n        visitThisReceiver: function visitThisReceiver(ast) {\n          return false;\n        },\n        visitInterpolation: function visitInterpolation(ast) {\n          return visitSome(this, ast.expressions);\n        },\n        visitKeyedRead: function visitKeyedRead(ast) {\n          return false;\n        },\n        visitKeyedWrite: function visitKeyedWrite(ast) {\n          return false;\n        },\n        visitLiteralArray: function visitLiteralArray(ast) {\n          return true;\n        },\n        visitLiteralMap: function visitLiteralMap(ast) {\n          return true;\n        },\n        visitLiteralPrimitive: function visitLiteralPrimitive(ast) {\n          return false;\n        },\n        visitMethodCall: function visitMethodCall(ast) {\n          return true;\n        },\n        visitPipe: function visitPipe(ast) {\n          return true;\n        },\n        visitPrefixNot: function visitPrefixNot(ast) {\n          return visit(this, ast.expression);\n        },\n        visitNonNullAssert: function visitNonNullAssert(ast) {\n          return visit(this, ast.expression);\n        },\n        visitPropertyRead: function visitPropertyRead(ast) {\n          return false;\n        },\n        visitPropertyWrite: function visitPropertyWrite(ast) {\n          return false;\n        },\n        visitQuote: function visitQuote(ast) {\n          return false;\n        },\n        visitSafeMethodCall: function visitSafeMethodCall(ast) {\n          return true;\n        },\n        visitSafePropertyRead: function visitSafePropertyRead(ast) {\n          return false;\n        },\n        visitSafeKeyedRead: function visitSafeKeyedRead(ast) {\n          return false;\n        }\n      });\n    }\n  }, {\n    key: \"allocateTemporary\",\n    value: function allocateTemporary() {\n      var tempNumber = this._currentTemporary++;\n      this.temporaryCount = Math.max(this._currentTemporary, this.temporaryCount);\n      return new ReadVarExpr(temporaryName(this.bindingId, tempNumber));\n    }\n  }, {\n    key: \"releaseTemporary\",\n    value: function releaseTemporary(temporary) {\n      this._currentTemporary--;\n\n      if (temporary.name != temporaryName(this.bindingId, this._currentTemporary)) {\n        throw new Error(\"Temporary \".concat(temporary.name, \" released out of order\"));\n      }\n    }\n    /**\n     * Creates an absolute `ParseSourceSpan` from the relative `ParseSpan`.\n     *\n     * `ParseSpan` objects are relative to the start of the expression.\n     * This method converts these to full `ParseSourceSpan` objects that\n     * show where the span is within the overall source file.\n     *\n     * @param span the relative span to convert.\n     * @returns a `ParseSourceSpan` for the given span or null if no\n     * `baseSourceSpan` was provided to this class.\n     */\n\n  }, {\n    key: \"convertSourceSpan\",\n    value: function convertSourceSpan(span) {\n      if (this.baseSourceSpan) {\n        var _start = this.baseSourceSpan.start.moveBy(span.start);\n\n        var end = this.baseSourceSpan.start.moveBy(span.end);\n        var fullStart = this.baseSourceSpan.fullStart.moveBy(span.start);\n        return new ParseSourceSpan(_start, end, fullStart);\n      } else {\n        return null;\n      }\n    }\n    /** Adds the name of an AST to the list of implicit receiver accesses. */\n\n  }, {\n    key: \"addImplicitReceiverAccess\",\n    value: function addImplicitReceiverAccess(name) {\n      if (this.implicitReceiverAccesses) {\n        this.implicitReceiverAccesses.add(name);\n      }\n    }\n  }]);\n\n  return _AstToIrVisitor;\n}();\n\nfunction flattenStatements(arg, output) {\n  if (Array.isArray(arg)) {\n    arg.forEach(function (entry) {\n      return flattenStatements(entry, output);\n    });\n  } else {\n    output.push(arg);\n  }\n}\n\nvar DefaultLocalResolver = /*#__PURE__*/function () {\n  function DefaultLocalResolver(globals) {\n    _classCallCheck(this, DefaultLocalResolver);\n\n    this.globals = globals;\n  }\n\n  _createClass(DefaultLocalResolver, [{\n    key: \"notifyImplicitReceiverUse\",\n    value: function notifyImplicitReceiverUse() {}\n  }, {\n    key: \"maybeRestoreView\",\n    value: function maybeRestoreView() {}\n  }, {\n    key: \"getLocal\",\n    value: function getLocal(name) {\n      if (name === EventHandlerVars.event.name) {\n        return EventHandlerVars.event;\n      }\n\n      return null;\n    }\n  }]);\n\n  return DefaultLocalResolver;\n}();\n\nfunction createCurrValueExpr(bindingId) {\n  return variable(\"currVal_\".concat(bindingId)); // fix syntax highlighting: `\n}\n\nfunction createPreventDefaultVar(bindingId) {\n  return variable(\"pd_\".concat(bindingId));\n}\n\nfunction convertStmtIntoExpression(stmt) {\n  if (stmt instanceof ExpressionStatement) {\n    return stmt.expr;\n  } else if (stmt instanceof ReturnStatement) {\n    return stmt.value;\n  }\n\n  return null;\n}\n\nvar BuiltinFunctionCall = /*#__PURE__*/function (_FunctionCall) {\n  _inherits(BuiltinFunctionCall, _FunctionCall);\n\n  var _super81 = _createSuper(BuiltinFunctionCall);\n\n  function BuiltinFunctionCall(span, sourceSpan, args, converter) {\n    var _this119;\n\n    _classCallCheck(this, BuiltinFunctionCall);\n\n    _this119 = _super81.call(this, span, sourceSpan, null, args);\n    _this119.converter = converter;\n    return _this119;\n  }\n\n  return _createClass(BuiltinFunctionCall);\n}(FunctionCall);\n/**\n * @license\n * Copyright Google LLC 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/**\n * This file is a port of shadowCSS from webcomponents.js to TypeScript.\n *\n * Please make sure to keep to edits in sync with the source file.\n *\n * Source:\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n *\n * The original file level comment is reproduced below\n */\n\n/*\n  This is a limited shim for ShadowDOM css styling.\n  https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n\r\n  The intention here is to support only the styling features which can be\n  relatively simply implemented. The goal is to allow users to avoid the\n  most obvious pitfalls and do so without compromising performance significantly.\n  For ShadowDOM styling that's not covered here, a set of best practices\n  can be provided that should allow users to accomplish more complex styling.\n\r\n  The following is a list of specific ShadowDOM styling features and a brief\n  discussion of the approach used to shim.\n\r\n  Shimmed features:\n\r\n  * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host\n  element using the :host rule. To shim this feature, the :host styles are\n  reformatted and prefixed with a given scope name and promoted to a\n  document level stylesheet.\n  For example, given a scope name of .foo, a rule like this:\n\r\n    :host {\n        background: red;\n      }\n    }\n\r\n  becomes:\n\r\n    .foo {\n      background: red;\n    }\n\r\n  * encapsulation: Styles defined within ShadowDOM, apply only to\n  dom inside the ShadowDOM. Polymer uses one of two techniques to implement\n  this feature.\n\r\n  By default, rules are prefixed with the host element tag name\n  as a descendant selector. This ensures styling does not leak out of the 'top'\n  of the element's ShadowDOM. For example,\n\r\n  div {\n      font-weight: bold;\n    }\n\r\n  becomes:\n\r\n  x-foo div {\n      font-weight: bold;\n    }\n\r\n  becomes:\n\r\n\r\n  Alternatively, if WebComponents.ShadowCSS.strictStyling is set to true then\n  selectors are scoped by adding an attribute selector suffix to each\n  simple selector that contains the host element tag name. Each element\n  in the element's ShadowDOM template is also given the scope attribute.\n  Thus, these rules match only elements that have the scope attribute.\n  For example, given a scope name of x-foo, a rule like this:\n\r\n    div {\n      font-weight: bold;\n    }\n\r\n  becomes:\n\r\n    div[x-foo] {\n      font-weight: bold;\n    }\n\r\n  Note that elements that are dynamically added to a scope must have the scope\n  selector added to them manually.\n\r\n  * upper/lower bound encapsulation: Styles which are defined outside a\n  shadowRoot should not cross the ShadowDOM boundary and should not apply\n  inside a shadowRoot.\n\r\n  This styling behavior is not emulated. Some possible ways to do this that\n  were rejected due to complexity and/or performance concerns include: (1) reset\n  every possible property for every possible selector for a given scope name;\n  (2) re-implement css in javascript.\n\r\n  As an alternative, users should make sure to use selectors\n  specific to the scope in which they are working.\n\r\n  * ::distributed: This behavior is not emulated. It's often not necessary\n  to style the contents of a specific insertion point and instead, descendants\n  of the host element can be styled selectively. Users can also create an\n  extra node around an insertion point and style that node's contents\n  via descendent selectors. For example, with a shadowRoot like this:\n\r\n    <style>\n      ::content(div) {\n        background: red;\n      }\n    </style>\n    <content></content>\n\r\n  could become:\n\r\n    <style>\n      / *@polyfill .content-container div * /\n      ::content(div) {\n        background: red;\n      }\n    </style>\n    <div class=\"content-container\">\n      <content></content>\n    </div>\n\r\n  Note the use of @polyfill in the comment above a ShadowDOM specific style\n  declaration. This is a directive to the styling shim to use the selector\n  in comments in lieu of the next selector when running under polyfill.\n*/\n\n\nvar ShadowCss = /*#__PURE__*/function () {\n  function ShadowCss() {\n    _classCallCheck(this, ShadowCss);\n\n    this.strictStyling = true;\n  }\n  /*\n   * Shim some cssText with the given selector. Returns cssText that can\n   * be included in the document via WebComponents.ShadowCSS.addCssToDocument(css).\n   *\n   * When strictStyling is true:\n   * - selector is the attribute added to all elements inside the host,\n   * - hostSelector is the attribute added to the host itself.\n   */\n\n\n  _createClass(ShadowCss, [{\n    key: \"shimCssText\",\n    value: function shimCssText(cssText, selector) {\n      var hostSelector = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n      var commentsWithHash = extractCommentsWithHash(cssText);\n      cssText = stripComments(cssText);\n      cssText = this._insertDirectives(cssText);\n\n      var scopedCssText = this._scopeCssText(cssText, selector, hostSelector);\n\n      return [scopedCssText].concat(_toConsumableArray(commentsWithHash)).join('\\n');\n    }\n  }, {\n    key: \"_insertDirectives\",\n    value: function _insertDirectives(cssText) {\n      cssText = this._insertPolyfillDirectivesInCssText(cssText);\n      return this._insertPolyfillRulesInCssText(cssText);\n    }\n    /*\n     * Process styles to convert native ShadowDOM rules that will trip\n     * up the css parser; we rely on decorating the stylesheet with inert rules.\n     *\n     * For example, we convert this rule:\n     *\n     * polyfill-next-selector { content: ':host menu-item'; }\n     * ::content menu-item {\n     *\n     * to this:\n     *\n     * scopeName menu-item {\n     *\n     **/\n\n  }, {\n    key: \"_insertPolyfillDirectivesInCssText\",\n    value: function _insertPolyfillDirectivesInCssText(cssText) {\n      // Difference with webcomponents.js: does not handle comments\n      return cssText.replace(_cssContentNextSelectorRe, function () {\n        return (arguments.length <= 2 ? undefined : arguments[2]) + '{';\n      });\n    }\n    /*\n     * Process styles to add rules which will only apply under the polyfill\n     *\n     * For example, we convert this rule:\n     *\n     * polyfill-rule {\n     *   content: ':host menu-item';\n     * ...\n     * }\n     *\n     * to this:\n     *\n     * scopeName menu-item {...}\n     *\n     **/\n\n  }, {\n    key: \"_insertPolyfillRulesInCssText\",\n    value: function _insertPolyfillRulesInCssText(cssText) {\n      // Difference with webcomponents.js: does not handle comments\n      return cssText.replace(_cssContentRuleRe, function () {\n        for (var _len4 = arguments.length, m = new Array(_len4), _key5 = 0; _key5 < _len4; _key5++) {\n          m[_key5] = arguments[_key5];\n        }\n\n        var rule = m[0].replace(m[1], '').replace(m[2], '');\n        return m[4] + rule;\n      });\n    }\n    /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n     *\n     *  .foo {... }\n     *\n     *  and converts this to\n     *\n     *  scopeName .foo { ... }\n     */\n\n  }, {\n    key: \"_scopeCssText\",\n    value: function _scopeCssText(cssText, scopeSelector, hostSelector) {\n      var unscopedRules = this._extractUnscopedRulesFromCssText(cssText); // replace :host and :host-context -shadowcsshost and -shadowcsshost respectively\n\n\n      cssText = this._insertPolyfillHostInCssText(cssText);\n      cssText = this._convertColonHost(cssText);\n      cssText = this._convertColonHostContext(cssText);\n      cssText = this._convertShadowDOMSelectors(cssText);\n\n      if (scopeSelector) {\n        cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);\n      }\n\n      cssText = cssText + '\\n' + unscopedRules;\n      return cssText.trim();\n    }\n    /*\n     * Process styles to add rules which will only apply under the polyfill\n     * and do not process via CSSOM. (CSSOM is destructive to rules on rare\n     * occasions, e.g. -webkit-calc on Safari.)\n     * For example, we convert this rule:\n     *\n     * @polyfill-unscoped-rule {\n     *   content: 'menu-item';\n     * ... }\n     *\n     * to this:\n     *\n     * menu-item {...}\n     *\n     **/\n\n  }, {\n    key: \"_extractUnscopedRulesFromCssText\",\n    value: function _extractUnscopedRulesFromCssText(cssText) {\n      // Difference with webcomponents.js: does not handle comments\n      var r = '';\n      var m;\n      _cssContentUnscopedRuleRe.lastIndex = 0;\n\n      while ((m = _cssContentUnscopedRuleRe.exec(cssText)) !== null) {\n        var rule = m[0].replace(m[2], '').replace(m[1], m[4]);\n        r += rule + '\\n\\n';\n      }\n\n      return r;\n    }\n    /*\n     * convert a rule like :host(.foo) > .bar { }\n     *\n     * to\n     *\n     * .foo<scopeName> > .bar\n     */\n\n  }, {\n    key: \"_convertColonHost\",\n    value: function _convertColonHost(cssText) {\n      return cssText.replace(_cssColonHostRe, function (_, hostSelectors, otherSelectors) {\n        if (hostSelectors) {\n          var convertedSelectors = [];\n          var hostSelectorArray = hostSelectors.split(',').map(function (p) {\n            return p.trim();\n          });\n\n          var _iterator8 = _createForOfIteratorHelper(hostSelectorArray),\n              _step8;\n\n          try {\n            for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n              var hostSelector = _step8.value;\n              if (!hostSelector) break;\n              var convertedSelector = _polyfillHostNoCombinator + hostSelector.replace(_polyfillHost, '') + otherSelectors;\n              convertedSelectors.push(convertedSelector);\n            }\n          } catch (err) {\n            _iterator8.e(err);\n          } finally {\n            _iterator8.f();\n          }\n\n          return convertedSelectors.join(',');\n        } else {\n          return _polyfillHostNoCombinator + otherSelectors;\n        }\n      });\n    }\n    /*\n     * convert a rule like :host-context(.foo) > .bar { }\n     *\n     * to\n     *\n     * .foo<scopeName> > .bar, .foo <scopeName> > .bar { }\n     *\n     * and\n     *\n     * :host-context(.foo:host) .bar { ... }\n     *\n     * to\n     *\n     * .foo<scopeName> .bar { ... }\n     */\n\n  }, {\n    key: \"_convertColonHostContext\",\n    value: function _convertColonHostContext(cssText) {\n      return cssText.replace(_cssColonHostContextReGlobal, function (selectorText) {\n        // We have captured a selector that contains a `:host-context` rule.\n        var _a; // For backward compatibility `:host-context` may contain a comma separated list of selectors.\n        // Each context selector group will contain a list of host-context selectors that must match\n        // an ancestor of the host.\n        // (Normally `contextSelectorGroups` will only contain a single array of context selectors.)\n\n\n        var contextSelectorGroups = [[]]; // There may be more than `:host-context` in this selector so `selectorText` could look like:\n        // `:host-context(.one):host-context(.two)`.\n        // Execute `_cssColonHostContextRe` over and over until we have extracted all the\n        // `:host-context` selectors from this selector.\n\n        var match;\n\n        while (match = _cssColonHostContextRe.exec(selectorText)) {\n          // `match` = [':host-context(<selectors>)<rest>', <selectors>, <rest>]\n          // The `<selectors>` could actually be a comma separated list: `:host-context(.one, .two)`.\n          var newContextSelectors = ((_a = match[1]) !== null && _a !== void 0 ? _a : '').trim().split(',').map(function (m) {\n            return m.trim();\n          }).filter(function (m) {\n            return m !== '';\n          }); // We must duplicate the current selector group for each of these new selectors.\n          // For example if the current groups are:\n          // ```\n          // [\n          //   ['a', 'b', 'c'],\n          //   ['x', 'y', 'z'],\n          // ]\n          // ```\n          // And we have a new set of comma separated selectors: `:host-context(m,n)` then the new\n          // groups are:\n          // ```\n          // [\n          //   ['a', 'b', 'c', 'm'],\n          //   ['x', 'y', 'z', 'm'],\n          //   ['a', 'b', 'c', 'n'],\n          //   ['x', 'y', 'z', 'n'],\n          // ]\n          // ```\n\n          var contextSelectorGroupsLength = contextSelectorGroups.length;\n          repeatGroups(contextSelectorGroups, newContextSelectors.length);\n\n          for (var i = 0; i < newContextSelectors.length; i++) {\n            for (var j = 0; j < contextSelectorGroupsLength; j++) {\n              contextSelectorGroups[j + i * contextSelectorGroupsLength].push(newContextSelectors[i]);\n            }\n          } // Update the `selectorText` and see repeat to see if there are more `:host-context`s.\n\n\n          selectorText = match[2];\n        } // The context selectors now must be combined with each other to capture all the possible\n        // selectors that `:host-context` can match. See `combineHostContextSelectors()` for more\n        // info about how this is done.\n\n\n        return contextSelectorGroups.map(function (contextSelectors) {\n          return combineHostContextSelectors(contextSelectors, selectorText);\n        }).join(', ');\n      });\n    }\n    /*\n     * Convert combinators like ::shadow and pseudo-elements like ::content\n     * by replacing with space.\n     */\n\n  }, {\n    key: \"_convertShadowDOMSelectors\",\n    value: function _convertShadowDOMSelectors(cssText) {\n      return _shadowDOMSelectorsRe.reduce(function (result, pattern) {\n        return result.replace(pattern, ' ');\n      }, cssText);\n    } // change a selector like 'div' to 'name div'\n\n  }, {\n    key: \"_scopeSelectors\",\n    value: function _scopeSelectors(cssText, scopeSelector, hostSelector) {\n      var _this120 = this;\n\n      return processRules(cssText, function (rule) {\n        var selector = rule.selector;\n        var content = rule.content;\n\n        if (rule.selector[0] !== '@') {\n          selector = _this120._scopeSelector(rule.selector, scopeSelector, hostSelector, _this120.strictStyling);\n        } else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@document')) {\n          content = _this120._scopeSelectors(rule.content, scopeSelector, hostSelector);\n        } else if (rule.selector.startsWith('@font-face') || rule.selector.startsWith('@page')) {\n          content = _this120._stripScopingSelectors(rule.content);\n        }\n\n        return new CssRule(selector, content);\n      });\n    }\n    /**\n     * Handle a css text that is within a rule that should not contain scope selectors by simply\n     * removing them! An example of such a rule is `@font-face`.\n     *\n     * `@font-face` rules cannot contain nested selectors. Nor can they be nested under a selector.\n     * Normally this would be a syntax error by the author of the styles. But in some rare cases, such\n     * as importing styles from a library, and applying `:host ::ng-deep` to the imported styles, we\n     * can end up with broken css if the imported styles happen to contain @font-face rules.\n     *\n     * For example:\n     *\n     * ```\n     * :host ::ng-deep {\n     *   import 'some/lib/containing/font-face';\n     * }\n     *\n     * Similar logic applies to `@page` rules which can contain a particular set of properties,\n     * as well as some specific at-rules. Since they can't be encapsulated, we have to strip\n     * any scoping selectors from them. For more information: https://www.w3.org/TR/css-page-3\n     * ```\n     */\n\n  }, {\n    key: \"_stripScopingSelectors\",\n    value: function _stripScopingSelectors(cssText) {\n      return processRules(cssText, function (rule) {\n        var selector = rule.selector.replace(_shadowDeepSelectors, ' ').replace(_polyfillHostNoCombinatorRe, ' ');\n        return new CssRule(selector, rule.content);\n      });\n    }\n  }, {\n    key: \"_scopeSelector\",\n    value: function _scopeSelector(selector, scopeSelector, hostSelector, strict) {\n      var _this121 = this;\n\n      return selector.split(',').map(function (part) {\n        return part.trim().split(_shadowDeepSelectors);\n      }).map(function (deepParts) {\n        var _deepParts = _toArray(deepParts),\n            shallowPart = _deepParts[0],\n            otherParts = _deepParts.slice(1);\n\n        var applyScope = function applyScope(shallowPart) {\n          if (_this121._selectorNeedsScoping(shallowPart, scopeSelector)) {\n            return strict ? _this121._applyStrictSelectorScope(shallowPart, scopeSelector, hostSelector) : _this121._applySelectorScope(shallowPart, scopeSelector, hostSelector);\n          } else {\n            return shallowPart;\n          }\n        };\n\n        return [applyScope(shallowPart)].concat(_toConsumableArray(otherParts)).join(' ');\n      }).join(', ');\n    }\n  }, {\n    key: \"_selectorNeedsScoping\",\n    value: function _selectorNeedsScoping(selector, scopeSelector) {\n      var re = this._makeScopeMatcher(scopeSelector);\n\n      return !re.test(selector);\n    }\n  }, {\n    key: \"_makeScopeMatcher\",\n    value: function _makeScopeMatcher(scopeSelector) {\n      var lre = /\\[/g;\n      var rre = /\\]/g;\n      scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n      return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n    }\n  }, {\n    key: \"_applySelectorScope\",\n    value: function _applySelectorScope(selector, scopeSelector, hostSelector) {\n      // Difference from webcomponents.js: scopeSelector could not be an array\n      return this._applySimpleSelectorScope(selector, scopeSelector, hostSelector);\n    } // scope via name and [is=name]\n\n  }, {\n    key: \"_applySimpleSelectorScope\",\n    value: function _applySimpleSelectorScope(selector, scopeSelector, hostSelector) {\n      // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n      _polyfillHostRe.lastIndex = 0;\n\n      if (_polyfillHostRe.test(selector)) {\n        var replaceBy = this.strictStyling ? \"[\".concat(hostSelector, \"]\") : scopeSelector;\n        return selector.replace(_polyfillHostNoCombinatorRe, function (hnc, selector) {\n          return selector.replace(/([^:]*)(:*)(.*)/, function (_, before, colon, after) {\n            return before + replaceBy + colon + after;\n          });\n        }).replace(_polyfillHostRe, replaceBy + ' ');\n      }\n\n      return scopeSelector + ' ' + selector;\n    } // return a selector with [name] suffix on each simple selector\n    // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name]  /** @internal */\n\n  }, {\n    key: \"_applyStrictSelectorScope\",\n    value: function _applyStrictSelectorScope(selector, scopeSelector, hostSelector) {\n      var _this122 = this;\n\n      var isRe = /\\[is=([^\\]]*)\\]/g;\n      scopeSelector = scopeSelector.replace(isRe, function (_) {\n        return arguments.length <= 1 ? undefined : arguments[1];\n      });\n      var attrName = '[' + scopeSelector + ']';\n\n      var _scopeSelectorPart = function _scopeSelectorPart(p) {\n        var scopedP = p.trim();\n\n        if (!scopedP) {\n          return '';\n        }\n\n        if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n          scopedP = _this122._applySimpleSelectorScope(p, scopeSelector, hostSelector);\n        } else {\n          // remove :host since it should be unnecessary\n          var t = p.replace(_polyfillHostRe, '');\n\n          if (t.length > 0) {\n            var matches = t.match(/([^:]*)(:*)(.*)/);\n\n            if (matches) {\n              scopedP = matches[1] + attrName + matches[2] + matches[3];\n            }\n          }\n        }\n\n        return scopedP;\n      };\n\n      var safeContent = new SafeSelector(selector);\n      selector = safeContent.content();\n      var scopedSelector = '';\n      var startIndex = 0;\n      var res;\n      var sep = /( |>|\\+|~(?!=))\\s*/g; // If a selector appears before :host it should not be shimmed as it\n      // matches on ancestor elements and not on elements in the host's shadow\n      // `:host-context(div)` is transformed to\n      // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n      // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n      // Historically `component-tag:host` was matching the component so we also want to preserve\n      // this behavior to avoid breaking legacy apps (it should not match).\n      // The behavior should be:\n      // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n      // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n      //   `:host-context(tag)`)\n\n      var hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1; // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n\n      var shouldScope = !hasHost;\n\n      while ((res = sep.exec(selector)) !== null) {\n        var separator = res[1];\n\n        var _part = selector.slice(startIndex, res.index).trim();\n\n        shouldScope = shouldScope || _part.indexOf(_polyfillHostNoCombinator) > -1;\n        var scopedPart = shouldScope ? _scopeSelectorPart(_part) : _part;\n        scopedSelector += \"\".concat(scopedPart, \" \").concat(separator, \" \");\n        startIndex = sep.lastIndex;\n      }\n\n      var part = selector.substring(startIndex);\n      shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n      scopedSelector += shouldScope ? _scopeSelectorPart(part) : part; // replace the placeholders with their original values\n\n      return safeContent.restore(scopedSelector);\n    }\n  }, {\n    key: \"_insertPolyfillHostInCssText\",\n    value: function _insertPolyfillHostInCssText(selector) {\n      return selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost);\n    }\n  }]);\n\n  return ShadowCss;\n}();\n\nvar SafeSelector = /*#__PURE__*/function () {\n  function SafeSelector(selector) {\n    var _this123 = this;\n\n    _classCallCheck(this, SafeSelector);\n\n    this.placeholders = [];\n    this.index = 0; // Replaces attribute selectors with placeholders.\n    // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n\n    selector = this._escapeRegexMatches(selector, /(\\[[^\\]]*\\])/g); // CSS allows for certain special characters to be used in selectors if they're escaped.\n    // E.g. `.foo:blue` won't match a class called `foo:blue`, because the colon denotes a\n    // pseudo-class, but writing `.foo\\:blue` will match, because the colon was escaped.\n    // Replace all escape sequences (`\\` followed by a character) with a placeholder so\n    // that our handling of pseudo-selectors doesn't mess with them.\n\n    selector = this._escapeRegexMatches(selector, /(\\\\.)/g); // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n    // WS and \"+\" would otherwise be interpreted as selector separators.\n\n    this._content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, function (_, pseudo, exp) {\n      var replaceBy = \"__ph-\".concat(_this123.index, \"__\");\n\n      _this123.placeholders.push(exp);\n\n      _this123.index++;\n      return pseudo + replaceBy;\n    });\n  }\n\n  _createClass(SafeSelector, [{\n    key: \"restore\",\n    value: function restore(content) {\n      var _this124 = this;\n\n      return content.replace(/__ph-(\\d+)__/g, function (_ph, index) {\n        return _this124.placeholders[+index];\n      });\n    }\n  }, {\n    key: \"content\",\n    value: function content() {\n      return this._content;\n    }\n    /**\n     * Replaces all of the substrings that match a regex within a\n     * special string (e.g. `__ph-0__`, `__ph-1__`, etc).\n     */\n\n  }, {\n    key: \"_escapeRegexMatches\",\n    value: function _escapeRegexMatches(content, pattern) {\n      var _this125 = this;\n\n      return content.replace(pattern, function (_, keep) {\n        var replaceBy = \"__ph-\".concat(_this125.index, \"__\");\n\n        _this125.placeholders.push(keep);\n\n        _this125.index++;\n        return replaceBy;\n      });\n    }\n  }]);\n\n  return SafeSelector;\n}();\n\nvar _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\\s]*?(['\"])(.*?)\\1[;\\s]*}([^{]*?){/gim;\nvar _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nvar _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nvar _polyfillHost = '-shadowcsshost'; // note: :host-context pre-processed to -shadowcsshostcontext.\n\nvar _polyfillHostContext = '-shadowcsscontext';\n\nvar _parenSuffix = '(?:\\\\((' + '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' + ')\\\\))?([^,{]*)';\n\nvar _cssColonHostRe = /*@__PURE__*/new RegExp(_polyfillHost + _parenSuffix, 'gim');\n\nvar _cssColonHostContextReGlobal = /*@__PURE__*/new RegExp(_polyfillHostContext + _parenSuffix, 'gim');\n\nvar _cssColonHostContextRe = /*@__PURE__*/new RegExp(_polyfillHostContext + _parenSuffix, 'im');\n\nvar _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\n\nvar _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nvar _shadowDOMSelectorsRe = [/::shadow/g, /::content/g, // Deprecated selectors\n/\\/shadow-deep\\//g, /\\/shadow\\//g]; // The deep combinator is deprecated in the CSS spec\n// Support for `>>>`, `deep`, `::ng-deep` is then also deprecated and will be removed in the future.\n// see https://github.com/angular/angular/pull/17677\n\nvar _shadowDeepSelectors = /(?:>>>)|(?:\\/deep\\/)|(?:::ng-deep)/g;\nvar _selectorReSuffix = '([>\\\\s~+[.,{:][\\\\s\\\\S]*)?$';\nvar _polyfillHostRe = /-shadowcsshost/gim;\nvar _colonHostRe = /:host/gim;\nvar _colonHostContextRe = /:host-context/gim;\nvar _commentRe = /\\/\\*[\\s\\S]*?\\*\\//g;\n\nfunction stripComments(input) {\n  return input.replace(_commentRe, '');\n}\n\nvar _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\n\nfunction extractCommentsWithHash(input) {\n  return input.match(_commentWithHashRe) || [];\n}\n\nvar BLOCK_PLACEHOLDER = '%BLOCK%';\nvar QUOTE_PLACEHOLDER = '%QUOTED%';\nvar _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nvar _quotedRe = /%QUOTED%/g;\nvar CONTENT_PAIRS = /*@__PURE__*/new Map([['{', '}']]);\nvar QUOTE_PAIRS = /*@__PURE__*/new Map([[\"\\\"\", \"\\\"\"], [\"'\", \"'\"]]);\n\nvar CssRule = /*#__PURE__*/_createClass(function CssRule(selector, content) {\n  _classCallCheck(this, CssRule);\n\n  this.selector = selector;\n  this.content = content;\n});\n\nfunction processRules(input, ruleCallback) {\n  var inputWithEscapedQuotes = escapeBlocks(input, QUOTE_PAIRS, QUOTE_PLACEHOLDER);\n  var inputWithEscapedBlocks = escapeBlocks(inputWithEscapedQuotes.escapedString, CONTENT_PAIRS, BLOCK_PLACEHOLDER);\n  var nextBlockIndex = 0;\n  var nextQuoteIndex = 0;\n  return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function () {\n    var selector = arguments.length <= 2 ? undefined : arguments[2];\n    var content = '';\n    var suffix = arguments.length <= 4 ? undefined : arguments[4];\n    var contentPrefix = '';\n\n    if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n      content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n      suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n      contentPrefix = '{';\n    }\n\n    var rule = ruleCallback(new CssRule(selector, content));\n    return \"\".concat(arguments.length <= 1 ? undefined : arguments[1]).concat(rule.selector).concat(arguments.length <= 3 ? undefined : arguments[3]).concat(contentPrefix).concat(rule.content).concat(suffix);\n  }).replace(_quotedRe, function () {\n    return inputWithEscapedQuotes.blocks[nextQuoteIndex++];\n  });\n}\n\nvar StringWithEscapedBlocks = /*#__PURE__*/_createClass(function StringWithEscapedBlocks(escapedString, blocks) {\n  _classCallCheck(this, StringWithEscapedBlocks);\n\n  this.escapedString = escapedString;\n  this.blocks = blocks;\n});\n\nfunction escapeBlocks(input, charPairs, placeholder) {\n  var resultParts = [];\n  var escapedBlocks = [];\n  var openCharCount = 0;\n  var nonBlockStartIndex = 0;\n  var blockStartIndex = -1;\n  var openChar;\n  var closeChar;\n\n  for (var i = 0; i < input.length; i++) {\n    var char = input[i];\n\n    if (char === '\\\\') {\n      i++;\n    } else if (char === closeChar) {\n      openCharCount--;\n\n      if (openCharCount === 0) {\n        escapedBlocks.push(input.substring(blockStartIndex, i));\n        resultParts.push(placeholder);\n        nonBlockStartIndex = i;\n        blockStartIndex = -1;\n        openChar = closeChar = undefined;\n      }\n    } else if (char === openChar) {\n      openCharCount++;\n    } else if (openCharCount === 0 && charPairs.has(char)) {\n      openChar = char;\n      closeChar = charPairs.get(char);\n      openCharCount = 1;\n      blockStartIndex = i + 1;\n      resultParts.push(input.substring(nonBlockStartIndex, blockStartIndex));\n    }\n  }\n\n  if (blockStartIndex !== -1) {\n    escapedBlocks.push(input.substring(blockStartIndex));\n    resultParts.push(placeholder);\n  } else {\n    resultParts.push(input.substring(nonBlockStartIndex));\n  }\n\n  return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);\n}\n/**\n * Combine the `contextSelectors` with the `hostMarker` and the `otherSelectors`\n * to create a selector that matches the same as `:host-context()`.\n *\n * Given a single context selector `A` we need to output selectors that match on the host and as an\n * ancestor of the host:\n *\n * ```\n * A <hostMarker>, A<hostMarker> {}\n * ```\n *\n * When there is more than one context selector we also have to create combinations of those\n * selectors with each other. For example if there are `A` and `B` selectors the output is:\n *\n * ```\n * AB<hostMarker>, AB <hostMarker>, A B<hostMarker>,\n * B A<hostMarker>, A B <hostMarker>, B A <hostMarker> {}\n * ```\n *\n * And so on...\n *\n * @param hostMarker the string that selects the host element.\n * @param contextSelectors an array of context selectors that will be combined.\n * @param otherSelectors the rest of the selectors that are not context selectors.\n */\n\n\nfunction combineHostContextSelectors(contextSelectors, otherSelectors) {\n  var hostMarker = _polyfillHostNoCombinator;\n  _polyfillHostRe.lastIndex = 0; // reset the regex to ensure we get an accurate test\n\n  var otherSelectorsHasHost = _polyfillHostRe.test(otherSelectors); // If there are no context selectors then just output a host marker\n\n\n  if (contextSelectors.length === 0) {\n    return hostMarker + otherSelectors;\n  }\n\n  var combined = [contextSelectors.pop() || ''];\n\n  while (contextSelectors.length > 0) {\n    var length = combined.length;\n    var contextSelector = contextSelectors.pop();\n\n    for (var i = 0; i < length; i++) {\n      var previousSelectors = combined[i]; // Add the new selector as a descendant of the previous selectors\n\n      combined[length * 2 + i] = previousSelectors + ' ' + contextSelector; // Add the new selector as an ancestor of the previous selectors\n\n      combined[length + i] = contextSelector + ' ' + previousSelectors; // Add the new selector to act on the same element as the previous selectors\n\n      combined[i] = contextSelector + previousSelectors;\n    }\n  } // Finally connect the selector to the `hostMarker`s: either acting directly on the host\n  // (A<hostMarker>) or as an ancestor (A <hostMarker>).\n\n\n  return combined.map(function (s) {\n    return otherSelectorsHasHost ? \"\".concat(s).concat(otherSelectors) : \"\".concat(s).concat(hostMarker).concat(otherSelectors, \", \").concat(s, \" \").concat(hostMarker).concat(otherSelectors);\n  }).join(',');\n}\n/**\n * Mutate the given `groups` array so that there are `multiples` clones of the original array\n * stored.\n *\n * For example `repeatGroups([a, b], 3)` will result in `[a, b, a, b, a, b]` - but importantly the\n * newly added groups will be clones of the original.\n *\n * @param groups An array of groups of strings that will be repeated. This array is mutated\n *     in-place.\n * @param multiples The number of times the current groups should appear.\n */\n\n\nfunction repeatGroups(groups, multiples) {\n  var length = groups.length;\n\n  for (var i = 1; i < multiples; i++) {\n    for (var j = 0; j < length; j++) {\n      groups[j + i * length] = groups[j].slice(0);\n    }\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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// group 0: \"[prop] or (event) or @trigger\"\n// group 1: \"prop\" from \"[prop]\"\n// group 2: \"event\" from \"(event)\"\n// group 3: \"@trigger\" from \"@trigger\"\n\n\nvar HOST_REG_EXP = /^(?:(?:\\[([^\\]]+)\\])|(?:\\(([^\\)]+)\\)))|(\\@[-\\w]+)$/;\n\nfunction viewClassName(compType, embeddedTemplateIndex) {\n  return \"View_\".concat(identifierName({\n    reference: compType\n  }), \"_\").concat(embeddedTemplateIndex);\n}\n\nfunction rendererTypeName(compType) {\n  return \"RenderType_\".concat(identifierName({\n    reference: compType\n  }));\n}\n\nfunction hostViewClassName(compType) {\n  return \"HostView_\".concat(identifierName({\n    reference: compType\n  }));\n}\n\nfunction componentFactoryName(compType) {\n  return \"\".concat(identifierName({\n    reference: compType\n  }), \"NgFactory\");\n}\n\nvar CompileSummaryKind = /*@__PURE__*/function (CompileSummaryKind) {\n  CompileSummaryKind[CompileSummaryKind[\"Pipe\"] = 0] = \"Pipe\";\n  CompileSummaryKind[CompileSummaryKind[\"Directive\"] = 1] = \"Directive\";\n  CompileSummaryKind[CompileSummaryKind[\"NgModule\"] = 2] = \"NgModule\";\n  CompileSummaryKind[CompileSummaryKind[\"Injectable\"] = 3] = \"Injectable\";\n  return CompileSummaryKind;\n}({});\n\nfunction tokenName(token) {\n  return token.value != null ? sanitizeIdentifier(token.value) : identifierName(token.identifier);\n}\n\nfunction tokenReference(token) {\n  if (token.identifier != null) {\n    return token.identifier.reference;\n  } else {\n    return token.value;\n  }\n}\n/**\n * Metadata about a stylesheet\n */\n\n\nvar CompileStylesheetMetadata = /*#__PURE__*/_createClass(function CompileStylesheetMetadata() {\n  var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n      moduleUrl = _ref6.moduleUrl,\n      styles = _ref6.styles,\n      styleUrls = _ref6.styleUrls;\n\n  _classCallCheck(this, CompileStylesheetMetadata);\n\n  this.moduleUrl = moduleUrl || null;\n  this.styles = _normalizeArray(styles);\n  this.styleUrls = _normalizeArray(styleUrls);\n});\n/**\n * Metadata regarding compilation of a template.\n */\n\n\nvar CompileTemplateMetadata = /*#__PURE__*/function () {\n  function CompileTemplateMetadata(_ref7) {\n    var encapsulation = _ref7.encapsulation,\n        template = _ref7.template,\n        templateUrl = _ref7.templateUrl,\n        htmlAst = _ref7.htmlAst,\n        styles = _ref7.styles,\n        styleUrls = _ref7.styleUrls,\n        externalStylesheets = _ref7.externalStylesheets,\n        animations = _ref7.animations,\n        ngContentSelectors = _ref7.ngContentSelectors,\n        interpolation = _ref7.interpolation,\n        isInline = _ref7.isInline,\n        preserveWhitespaces = _ref7.preserveWhitespaces;\n\n    _classCallCheck(this, CompileTemplateMetadata);\n\n    this.encapsulation = encapsulation;\n    this.template = template;\n    this.templateUrl = templateUrl;\n    this.htmlAst = htmlAst;\n    this.styles = _normalizeArray(styles);\n    this.styleUrls = _normalizeArray(styleUrls);\n    this.externalStylesheets = _normalizeArray(externalStylesheets);\n    this.animations = animations ? flatten(animations) : [];\n    this.ngContentSelectors = ngContentSelectors || [];\n\n    if (interpolation && interpolation.length != 2) {\n      throw new Error(\"'interpolation' should have a start and an end symbol.\");\n    }\n\n    this.interpolation = interpolation;\n    this.isInline = isInline;\n    this.preserveWhitespaces = preserveWhitespaces;\n  }\n\n  _createClass(CompileTemplateMetadata, [{\n    key: \"toSummary\",\n    value: function toSummary() {\n      return {\n        ngContentSelectors: this.ngContentSelectors,\n        encapsulation: this.encapsulation,\n        styles: this.styles,\n        animations: this.animations\n      };\n    }\n  }]);\n\n  return CompileTemplateMetadata;\n}();\n/**\n * Metadata regarding compilation of a directive.\n */\n\n\nvar CompileDirectiveMetadata = /*#__PURE__*/function () {\n  function CompileDirectiveMetadata(_ref8) {\n    var isHost = _ref8.isHost,\n        type = _ref8.type,\n        isComponent = _ref8.isComponent,\n        selector = _ref8.selector,\n        exportAs = _ref8.exportAs,\n        changeDetection = _ref8.changeDetection,\n        inputs = _ref8.inputs,\n        outputs = _ref8.outputs,\n        hostListeners = _ref8.hostListeners,\n        hostProperties = _ref8.hostProperties,\n        hostAttributes = _ref8.hostAttributes,\n        providers = _ref8.providers,\n        viewProviders = _ref8.viewProviders,\n        queries = _ref8.queries,\n        guards = _ref8.guards,\n        viewQueries = _ref8.viewQueries,\n        entryComponents = _ref8.entryComponents,\n        template = _ref8.template,\n        componentViewType = _ref8.componentViewType,\n        rendererType = _ref8.rendererType,\n        componentFactory = _ref8.componentFactory;\n\n    _classCallCheck(this, CompileDirectiveMetadata);\n\n    this.isHost = !!isHost;\n    this.type = type;\n    this.isComponent = isComponent;\n    this.selector = selector;\n    this.exportAs = exportAs;\n    this.changeDetection = changeDetection;\n    this.inputs = inputs;\n    this.outputs = outputs;\n    this.hostListeners = hostListeners;\n    this.hostProperties = hostProperties;\n    this.hostAttributes = hostAttributes;\n    this.providers = _normalizeArray(providers);\n    this.viewProviders = _normalizeArray(viewProviders);\n    this.queries = _normalizeArray(queries);\n    this.guards = guards;\n    this.viewQueries = _normalizeArray(viewQueries);\n    this.entryComponents = _normalizeArray(entryComponents);\n    this.template = template;\n    this.componentViewType = componentViewType;\n    this.rendererType = rendererType;\n    this.componentFactory = componentFactory;\n  }\n\n  _createClass(CompileDirectiveMetadata, [{\n    key: \"toSummary\",\n    value: function toSummary() {\n      return {\n        summaryKind: CompileSummaryKind.Directive,\n        type: this.type,\n        isComponent: this.isComponent,\n        selector: this.selector,\n        exportAs: this.exportAs,\n        inputs: this.inputs,\n        outputs: this.outputs,\n        hostListeners: this.hostListeners,\n        hostProperties: this.hostProperties,\n        hostAttributes: this.hostAttributes,\n        providers: this.providers,\n        viewProviders: this.viewProviders,\n        queries: this.queries,\n        guards: this.guards,\n        viewQueries: this.viewQueries,\n        entryComponents: this.entryComponents,\n        changeDetection: this.changeDetection,\n        template: this.template && this.template.toSummary(),\n        componentViewType: this.componentViewType,\n        rendererType: this.rendererType,\n        componentFactory: this.componentFactory\n      };\n    }\n  }], [{\n    key: \"create\",\n    value: function create(_ref9) {\n      var isHost = _ref9.isHost,\n          type = _ref9.type,\n          isComponent = _ref9.isComponent,\n          selector = _ref9.selector,\n          exportAs = _ref9.exportAs,\n          changeDetection = _ref9.changeDetection,\n          inputs = _ref9.inputs,\n          outputs = _ref9.outputs,\n          host = _ref9.host,\n          providers = _ref9.providers,\n          viewProviders = _ref9.viewProviders,\n          queries = _ref9.queries,\n          guards = _ref9.guards,\n          viewQueries = _ref9.viewQueries,\n          entryComponents = _ref9.entryComponents,\n          template = _ref9.template,\n          componentViewType = _ref9.componentViewType,\n          rendererType = _ref9.rendererType,\n          componentFactory = _ref9.componentFactory;\n      var hostListeners = {};\n      var hostProperties = {};\n      var hostAttributes = {};\n\n      if (host != null) {\n        Object.keys(host).forEach(function (key) {\n          var value = host[key];\n          var matches = key.match(HOST_REG_EXP);\n\n          if (matches === null) {\n            hostAttributes[key] = value;\n          } else if (matches[1] != null) {\n            hostProperties[matches[1]] = value;\n          } else if (matches[2] != null) {\n            hostListeners[matches[2]] = value;\n          }\n        });\n      }\n\n      var inputsMap = {};\n\n      if (inputs != null) {\n        inputs.forEach(function (bindConfig) {\n          // canonical syntax: `dirProp: elProp`\n          // if there is no `:`, use dirProp = elProp\n          var parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);\n          inputsMap[parts[0]] = parts[1];\n        });\n      }\n\n      var outputsMap = {};\n\n      if (outputs != null) {\n        outputs.forEach(function (bindConfig) {\n          // canonical syntax: `dirProp: elProp`\n          // if there is no `:`, use dirProp = elProp\n          var parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);\n          outputsMap[parts[0]] = parts[1];\n        });\n      }\n\n      return new CompileDirectiveMetadata({\n        isHost: isHost,\n        type: type,\n        isComponent: !!isComponent,\n        selector: selector,\n        exportAs: exportAs,\n        changeDetection: changeDetection,\n        inputs: inputsMap,\n        outputs: outputsMap,\n        hostListeners: hostListeners,\n        hostProperties: hostProperties,\n        hostAttributes: hostAttributes,\n        providers: providers,\n        viewProviders: viewProviders,\n        queries: queries,\n        guards: guards,\n        viewQueries: viewQueries,\n        entryComponents: entryComponents,\n        template: template,\n        componentViewType: componentViewType,\n        rendererType: rendererType,\n        componentFactory: componentFactory\n      });\n    }\n  }]);\n\n  return CompileDirectiveMetadata;\n}();\n\nvar CompilePipeMetadata = /*#__PURE__*/function () {\n  function CompilePipeMetadata(_ref10) {\n    var type = _ref10.type,\n        name = _ref10.name,\n        pure = _ref10.pure;\n\n    _classCallCheck(this, CompilePipeMetadata);\n\n    this.type = type;\n    this.name = name;\n    this.pure = !!pure;\n  }\n\n  _createClass(CompilePipeMetadata, [{\n    key: \"toSummary\",\n    value: function toSummary() {\n      return {\n        summaryKind: CompileSummaryKind.Pipe,\n        type: this.type,\n        name: this.name,\n        pure: this.pure\n      };\n    }\n  }]);\n\n  return CompilePipeMetadata;\n}();\n\nvar CompileShallowModuleMetadata = /*#__PURE__*/_createClass(function CompileShallowModuleMetadata() {\n  _classCallCheck(this, CompileShallowModuleMetadata);\n});\n/**\n * Metadata regarding compilation of a module.\n */\n\n\nvar CompileNgModuleMetadata = /*#__PURE__*/function () {\n  function CompileNgModuleMetadata(_ref11) {\n    var type = _ref11.type,\n        providers = _ref11.providers,\n        declaredDirectives = _ref11.declaredDirectives,\n        exportedDirectives = _ref11.exportedDirectives,\n        declaredPipes = _ref11.declaredPipes,\n        exportedPipes = _ref11.exportedPipes,\n        entryComponents = _ref11.entryComponents,\n        bootstrapComponents = _ref11.bootstrapComponents,\n        importedModules = _ref11.importedModules,\n        exportedModules = _ref11.exportedModules,\n        schemas = _ref11.schemas,\n        transitiveModule = _ref11.transitiveModule,\n        id = _ref11.id;\n\n    _classCallCheck(this, CompileNgModuleMetadata);\n\n    this.type = type || null;\n    this.declaredDirectives = _normalizeArray(declaredDirectives);\n    this.exportedDirectives = _normalizeArray(exportedDirectives);\n    this.declaredPipes = _normalizeArray(declaredPipes);\n    this.exportedPipes = _normalizeArray(exportedPipes);\n    this.providers = _normalizeArray(providers);\n    this.entryComponents = _normalizeArray(entryComponents);\n    this.bootstrapComponents = _normalizeArray(bootstrapComponents);\n    this.importedModules = _normalizeArray(importedModules);\n    this.exportedModules = _normalizeArray(exportedModules);\n    this.schemas = _normalizeArray(schemas);\n    this.id = id || null;\n    this.transitiveModule = transitiveModule || null;\n  }\n\n  _createClass(CompileNgModuleMetadata, [{\n    key: \"toSummary\",\n    value: function toSummary() {\n      var module = this.transitiveModule;\n      return {\n        summaryKind: CompileSummaryKind.NgModule,\n        type: this.type,\n        entryComponents: module.entryComponents,\n        providers: module.providers,\n        modules: module.modules,\n        exportedDirectives: module.exportedDirectives,\n        exportedPipes: module.exportedPipes\n      };\n    }\n  }]);\n\n  return CompileNgModuleMetadata;\n}();\n\nvar TransitiveCompileNgModuleMetadata = /*#__PURE__*/function () {\n  function TransitiveCompileNgModuleMetadata() {\n    _classCallCheck(this, TransitiveCompileNgModuleMetadata);\n\n    this.directivesSet = new Set();\n    this.directives = [];\n    this.exportedDirectivesSet = new Set();\n    this.exportedDirectives = [];\n    this.pipesSet = new Set();\n    this.pipes = [];\n    this.exportedPipesSet = new Set();\n    this.exportedPipes = [];\n    this.modulesSet = new Set();\n    this.modules = [];\n    this.entryComponentsSet = new Set();\n    this.entryComponents = [];\n    this.providers = [];\n  }\n\n  _createClass(TransitiveCompileNgModuleMetadata, [{\n    key: \"addProvider\",\n    value: function addProvider(provider, module) {\n      this.providers.push({\n        provider: provider,\n        module: module\n      });\n    }\n  }, {\n    key: \"addDirective\",\n    value: function addDirective(id) {\n      if (!this.directivesSet.has(id.reference)) {\n        this.directivesSet.add(id.reference);\n        this.directives.push(id);\n      }\n    }\n  }, {\n    key: \"addExportedDirective\",\n    value: function addExportedDirective(id) {\n      if (!this.exportedDirectivesSet.has(id.reference)) {\n        this.exportedDirectivesSet.add(id.reference);\n        this.exportedDirectives.push(id);\n      }\n    }\n  }, {\n    key: \"addPipe\",\n    value: function addPipe(id) {\n      if (!this.pipesSet.has(id.reference)) {\n        this.pipesSet.add(id.reference);\n        this.pipes.push(id);\n      }\n    }\n  }, {\n    key: \"addExportedPipe\",\n    value: function addExportedPipe(id) {\n      if (!this.exportedPipesSet.has(id.reference)) {\n        this.exportedPipesSet.add(id.reference);\n        this.exportedPipes.push(id);\n      }\n    }\n  }, {\n    key: \"addModule\",\n    value: function addModule(id) {\n      if (!this.modulesSet.has(id.reference)) {\n        this.modulesSet.add(id.reference);\n        this.modules.push(id);\n      }\n    }\n  }, {\n    key: \"addEntryComponent\",\n    value: function addEntryComponent(ec) {\n      if (!this.entryComponentsSet.has(ec.componentType)) {\n        this.entryComponentsSet.add(ec.componentType);\n        this.entryComponents.push(ec);\n      }\n    }\n  }]);\n\n  return TransitiveCompileNgModuleMetadata;\n}();\n\nfunction _normalizeArray(obj) {\n  return obj || [];\n}\n\nvar ProviderMeta = /*#__PURE__*/_createClass(function ProviderMeta(token, _ref12) {\n  var useClass = _ref12.useClass,\n      useValue = _ref12.useValue,\n      useExisting = _ref12.useExisting,\n      useFactory = _ref12.useFactory,\n      deps = _ref12.deps,\n      multi = _ref12.multi;\n\n  _classCallCheck(this, ProviderMeta);\n\n  this.token = token;\n  this.useClass = useClass || null;\n  this.useValue = useValue;\n  this.useExisting = useExisting;\n  this.useFactory = useFactory || null;\n  this.dependencies = deps || null;\n  this.multi = !!multi;\n});\n\nfunction flatten(list) {\n  return list.reduce(function (flat, item) {\n    var flatItem = Array.isArray(item) ? flatten(item) : item;\n    return flat.concat(flatItem);\n  }, []);\n}\n\nfunction jitSourceUrl(url) {\n  // Note: We need 3 \"/\" so that ng shows up as a separate domain\n  // in the chrome dev tools.\n  return url.replace(/(\\w+:\\/\\/[\\w:-]+)?(\\/+)?/, 'ng:///');\n}\n\nfunction templateSourceUrl(ngModuleType, compMeta, templateMeta) {\n  var url;\n\n  if (templateMeta.isInline) {\n    if (compMeta.type.reference instanceof StaticSymbol) {\n      // Note: a .ts file might contain multiple components with inline templates,\n      // so we need to give them unique urls, as these will be used for sourcemaps.\n      url = \"\".concat(compMeta.type.reference.filePath, \".\").concat(compMeta.type.reference.name, \".html\");\n    } else {\n      url = \"\".concat(identifierName(ngModuleType), \"/\").concat(identifierName(compMeta.type), \".html\");\n    }\n  } else {\n    url = templateMeta.templateUrl;\n  }\n\n  return compMeta.type.reference instanceof StaticSymbol ? url : jitSourceUrl(url);\n}\n\nfunction sharedStylesheetJitUrl(meta, id) {\n  var pathParts = meta.moduleUrl.split(/\\/\\\\/g);\n  var baseName = pathParts[pathParts.length - 1];\n  return jitSourceUrl(\"css/\".concat(id).concat(baseName, \".ngstyle.js\"));\n}\n\nfunction ngModuleJitUrl(moduleMeta) {\n  return jitSourceUrl(\"\".concat(identifierName(moduleMeta.type), \"/module.ngfactory.js\"));\n}\n\nfunction templateJitUrl(ngModuleType, compMeta) {\n  return jitSourceUrl(\"\".concat(identifierName(ngModuleType), \"/\").concat(identifierName(compMeta.type), \".ngfactory.js\"));\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar COMPONENT_VARIABLE = '%COMP%';\nvar HOST_ATTR = \"_nghost-\".concat(COMPONENT_VARIABLE);\nvar CONTENT_ATTR = \"_ngcontent-\".concat(COMPONENT_VARIABLE);\n\nvar StylesCompileDependency = /*#__PURE__*/_createClass(function StylesCompileDependency(name, moduleUrl, setValue) {\n  _classCallCheck(this, StylesCompileDependency);\n\n  this.name = name;\n  this.moduleUrl = moduleUrl;\n  this.setValue = setValue;\n});\n\nvar CompiledStylesheet = /*#__PURE__*/_createClass(function CompiledStylesheet(outputCtx, stylesVar, dependencies, isShimmed, meta) {\n  _classCallCheck(this, CompiledStylesheet);\n\n  this.outputCtx = outputCtx;\n  this.stylesVar = stylesVar;\n  this.dependencies = dependencies;\n  this.isShimmed = isShimmed;\n  this.meta = meta;\n});\n\nvar StyleCompiler = /*#__PURE__*/function () {\n  function StyleCompiler(_urlResolver) {\n    _classCallCheck(this, StyleCompiler);\n\n    this._urlResolver = _urlResolver;\n    this._shadowCss = new ShadowCss();\n  }\n\n  _createClass(StyleCompiler, [{\n    key: \"compileComponent\",\n    value: function compileComponent(outputCtx, comp) {\n      var template = comp.template;\n      return this._compileStyles(outputCtx, comp, new CompileStylesheetMetadata({\n        styles: template.styles,\n        styleUrls: template.styleUrls,\n        moduleUrl: identifierModuleUrl(comp.type)\n      }), this.needsStyleShim(comp), true);\n    }\n  }, {\n    key: \"compileStyles\",\n    value: function compileStyles(outputCtx, comp, stylesheet) {\n      var shim = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.needsStyleShim(comp);\n      return this._compileStyles(outputCtx, comp, stylesheet, shim, false);\n    }\n  }, {\n    key: \"needsStyleShim\",\n    value: function needsStyleShim(comp) {\n      return comp.template.encapsulation === ViewEncapsulation.Emulated;\n    }\n  }, {\n    key: \"_compileStyles\",\n    value: function _compileStyles(outputCtx, comp, stylesheet, shim, isComponentStylesheet) {\n      var _this126 = this;\n\n      var styleExpressions = stylesheet.styles.map(function (plainStyle) {\n        return literal(_this126._shimIfNeeded(plainStyle, shim));\n      });\n      var dependencies = [];\n      stylesheet.styleUrls.forEach(function (styleUrl) {\n        var exprIndex = styleExpressions.length; // Note: This placeholder will be filled later.\n\n        styleExpressions.push(null);\n        dependencies.push(new StylesCompileDependency(getStylesVarName(null), styleUrl, function (value) {\n          return styleExpressions[exprIndex] = outputCtx.importExpr(value);\n        }));\n      }); // styles variable contains plain strings and arrays of other styles arrays (recursive),\n      // so we set its type to dynamic.\n\n      var stylesVar = getStylesVarName(isComponentStylesheet ? comp : null);\n      var stmt = variable(stylesVar).set(literalArr(styleExpressions, new ArrayType(DYNAMIC_TYPE, [TypeModifier.Const]))).toDeclStmt(null, isComponentStylesheet ? [StmtModifier.Final] : [StmtModifier.Final, StmtModifier.Exported]);\n      outputCtx.statements.push(stmt);\n      return new CompiledStylesheet(outputCtx, stylesVar, dependencies, shim, stylesheet);\n    }\n  }, {\n    key: \"_shimIfNeeded\",\n    value: function _shimIfNeeded(style, shim) {\n      return shim ? this._shadowCss.shimCssText(style, CONTENT_ATTR, HOST_ATTR) : style;\n    }\n  }]);\n\n  return StyleCompiler;\n}();\n\nfunction getStylesVarName(component) {\n  var result = \"styles\";\n\n  if (component) {\n    result += \"_\".concat(identifierName(component.type));\n  }\n\n  return result;\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * A path is an ordered set of elements. Typically a path is to  a\n * particular offset in a source file. The head of the list is the top\n * most node. The tail is the node that contains the offset directly.\n *\n * For example, the expression `a + b + c` might have an ast that looks\n * like:\n *     +\n *    / \\\n *   a   +\n *      / \\\n *     b   c\n *\n * The path to the node at offset 9 would be `['+' at 1-10, '+' at 7-10,\n * 'c' at 9-10]` and the path the node at offset 1 would be\n * `['+' at 1-10, 'a' at 1-2]`.\n */\n\n\nvar AstPath = /*#__PURE__*/function () {\n  function AstPath(path) {\n    var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;\n\n    _classCallCheck(this, AstPath);\n\n    this.path = path;\n    this.position = position;\n  }\n\n  _createClass(AstPath, [{\n    key: \"empty\",\n    get: function get() {\n      return !this.path || !this.path.length;\n    }\n  }, {\n    key: \"head\",\n    get: function get() {\n      return this.path[0];\n    }\n  }, {\n    key: \"tail\",\n    get: function get() {\n      return this.path[this.path.length - 1];\n    }\n  }, {\n    key: \"parentOf\",\n    value: function parentOf(node) {\n      return node && this.path[this.path.indexOf(node) - 1];\n    }\n  }, {\n    key: \"childOf\",\n    value: function childOf(node) {\n      return this.path[this.path.indexOf(node) + 1];\n    }\n  }, {\n    key: \"first\",\n    value: function first(ctor) {\n      for (var i = this.path.length - 1; i >= 0; i--) {\n        var item = this.path[i];\n        if (item instanceof ctor) return item;\n      }\n    }\n  }, {\n    key: \"push\",\n    value: function push(node) {\n      this.path.push(node);\n    }\n  }, {\n    key: \"pop\",\n    value: function pop() {\n      return this.path.pop();\n    }\n  }]);\n\n  return AstPath;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar NodeWithI18n = /*#__PURE__*/_createClass(function NodeWithI18n(sourceSpan, i18n) {\n  _classCallCheck(this, NodeWithI18n);\n\n  this.sourceSpan = sourceSpan;\n  this.i18n = i18n;\n});\n\nvar Text$3 = /*#__PURE__*/function (_NodeWithI18n) {\n  _inherits(Text$3, _NodeWithI18n);\n\n  var _super82 = _createSuper(Text$3);\n\n  function Text$3(value, sourceSpan, tokens, i18n) {\n    var _this127;\n\n    _classCallCheck(this, Text$3);\n\n    _this127 = _super82.call(this, sourceSpan, i18n);\n    _this127.value = value;\n    _this127.tokens = tokens;\n    return _this127;\n  }\n\n  _createClass(Text$3, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitText(this, context);\n    }\n  }]);\n\n  return Text$3;\n}(NodeWithI18n);\n\nvar Expansion = /*#__PURE__*/function (_NodeWithI18n2) {\n  _inherits(Expansion, _NodeWithI18n2);\n\n  var _super83 = _createSuper(Expansion);\n\n  function Expansion(switchValue, type, cases, sourceSpan, switchValueSourceSpan, i18n) {\n    var _this128;\n\n    _classCallCheck(this, Expansion);\n\n    _this128 = _super83.call(this, sourceSpan, i18n);\n    _this128.switchValue = switchValue;\n    _this128.type = type;\n    _this128.cases = cases;\n    _this128.switchValueSourceSpan = switchValueSourceSpan;\n    return _this128;\n  }\n\n  _createClass(Expansion, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitExpansion(this, context);\n    }\n  }]);\n\n  return Expansion;\n}(NodeWithI18n);\n\nvar ExpansionCase = /*#__PURE__*/function () {\n  function ExpansionCase(value, expression, sourceSpan, valueSourceSpan, expSourceSpan) {\n    _classCallCheck(this, ExpansionCase);\n\n    this.value = value;\n    this.expression = expression;\n    this.sourceSpan = sourceSpan;\n    this.valueSourceSpan = valueSourceSpan;\n    this.expSourceSpan = expSourceSpan;\n  }\n\n  _createClass(ExpansionCase, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitExpansionCase(this, context);\n    }\n  }]);\n\n  return ExpansionCase;\n}();\n\nvar Attribute = /*#__PURE__*/function (_NodeWithI18n3) {\n  _inherits(Attribute, _NodeWithI18n3);\n\n  var _super84 = _createSuper(Attribute);\n\n  function Attribute(name, value, sourceSpan, keySpan, valueSpan, valueTokens, i18n) {\n    var _this129;\n\n    _classCallCheck(this, Attribute);\n\n    _this129 = _super84.call(this, sourceSpan, i18n);\n    _this129.name = name;\n    _this129.value = value;\n    _this129.keySpan = keySpan;\n    _this129.valueSpan = valueSpan;\n    _this129.valueTokens = valueTokens;\n    return _this129;\n  }\n\n  _createClass(Attribute, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitAttribute(this, context);\n    }\n  }]);\n\n  return Attribute;\n}(NodeWithI18n);\n\nvar Element$1 = /*#__PURE__*/function (_NodeWithI18n4) {\n  _inherits(Element$1, _NodeWithI18n4);\n\n  var _super85 = _createSuper(Element$1);\n\n  function Element$1(name, attrs, children, sourceSpan, startSourceSpan) {\n    var _this130;\n\n    var endSourceSpan = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;\n    var i18n = arguments.length > 6 ? arguments[6] : undefined;\n\n    _classCallCheck(this, Element$1);\n\n    _this130 = _super85.call(this, sourceSpan, i18n);\n    _this130.name = name;\n    _this130.attrs = attrs;\n    _this130.children = children;\n    _this130.startSourceSpan = startSourceSpan;\n    _this130.endSourceSpan = endSourceSpan;\n    return _this130;\n  }\n\n  _createClass(Element$1, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitElement(this, context);\n    }\n  }]);\n\n  return Element$1;\n}(NodeWithI18n);\n\nvar Comment$1 = /*#__PURE__*/function () {\n  function Comment$1(value, sourceSpan) {\n    _classCallCheck(this, Comment$1);\n\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(Comment$1, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitComment(this, context);\n    }\n  }]);\n\n  return Comment$1;\n}();\n\nfunction visitAll$1(visitor, nodes) {\n  var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n  var result = [];\n  var visit = visitor.visit ? function (ast) {\n    return visitor.visit(ast, context) || ast.visit(visitor, context);\n  } : function (ast) {\n    return ast.visit(visitor, context);\n  };\n  nodes.forEach(function (ast) {\n    var astResult = visit(ast);\n\n    if (astResult) {\n      result.push(astResult);\n    }\n  });\n  return result;\n}\n\nvar RecursiveVisitor$1 = /*#__PURE__*/function () {\n  function RecursiveVisitor$1() {\n    _classCallCheck(this, RecursiveVisitor$1);\n  }\n\n  _createClass(RecursiveVisitor$1, [{\n    key: \"visitElement\",\n    value: function visitElement(ast, context) {\n      this.visitChildren(context, function (visit) {\n        visit(ast.attrs);\n        visit(ast.children);\n      });\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(ast, context) {}\n  }, {\n    key: \"visitText\",\n    value: function visitText(ast, context) {}\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(ast, context) {}\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(ast, context) {\n      return this.visitChildren(context, function (visit) {\n        visit(ast.cases);\n      });\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(ast, context) {}\n  }, {\n    key: \"visitChildren\",\n    value: function visitChildren(context, cb) {\n      var results = [];\n      var t = this;\n\n      function visit(children) {\n        if (children) results.push(visitAll$1(t, children, context));\n      }\n\n      cb(visit);\n      return Array.prototype.concat.apply([], results);\n    }\n  }]);\n\n  return RecursiveVisitor$1;\n}();\n\nfunction spanOf(ast) {\n  var start = ast.sourceSpan.start.offset;\n  var end = ast.sourceSpan.end.offset;\n\n  if (ast instanceof Element$1) {\n    if (ast.endSourceSpan) {\n      end = ast.endSourceSpan.end.offset;\n    } else if (ast.children && ast.children.length) {\n      end = spanOf(ast.children[ast.children.length - 1]).end;\n    }\n  }\n\n  return {\n    start: start,\n    end: end\n  };\n}\n\nfunction findNode(nodes, position) {\n  var path = [];\n  var visitor = new ( /*#__PURE__*/function (_RecursiveVisitor$) {\n    _inherits(_class, _RecursiveVisitor$);\n\n    var _super86 = _createSuper(_class);\n\n    function _class() {\n      _classCallCheck(this, _class);\n\n      return _super86.apply(this, arguments);\n    }\n\n    _createClass(_class, [{\n      key: \"visit\",\n      value: function visit(ast, context) {\n        var span = spanOf(ast);\n\n        if (span.start <= position && position < span.end) {\n          path.push(ast);\n        } else {\n          // Returning a value here will result in the children being skipped.\n          return true;\n        }\n      }\n    }]);\n\n    return _class;\n  }(RecursiveVisitor$1))();\n  visitAll$1(visitor, nodes);\n  return new AstPath(path, position);\n}\n/**\n * @license\n * Copyright Google LLC 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// Mapping between all HTML entity names and their unicode representation.\n// Generated from https://html.spec.whatwg.org/multipage/entities.json by stripping\n// the `&` and `;` from the keys and removing the duplicates.\n// see https://www.w3.org/TR/html51/syntax.html#named-character-references\n\n\nvar NAMED_ENTITIES = {\n  'AElig': \"\\xC6\",\n  'AMP': \"&\",\n  'amp': \"&\",\n  'Aacute': \"\\xC1\",\n  'Abreve': \"\\u0102\",\n  'Acirc': \"\\xC2\",\n  'Acy': \"\\u0410\",\n  'Afr': \"\\uD835\\uDD04\",\n  'Agrave': \"\\xC0\",\n  'Alpha': \"\\u0391\",\n  'Amacr': \"\\u0100\",\n  'And': \"\\u2A53\",\n  'Aogon': \"\\u0104\",\n  'Aopf': \"\\uD835\\uDD38\",\n  'ApplyFunction': \"\\u2061\",\n  'af': \"\\u2061\",\n  'Aring': \"\\xC5\",\n  'angst': \"\\xC5\",\n  'Ascr': \"\\uD835\\uDC9C\",\n  'Assign': \"\\u2254\",\n  'colone': \"\\u2254\",\n  'coloneq': \"\\u2254\",\n  'Atilde': \"\\xC3\",\n  'Auml': \"\\xC4\",\n  'Backslash': \"\\u2216\",\n  'setminus': \"\\u2216\",\n  'setmn': \"\\u2216\",\n  'smallsetminus': \"\\u2216\",\n  'ssetmn': \"\\u2216\",\n  'Barv': \"\\u2AE7\",\n  'Barwed': \"\\u2306\",\n  'doublebarwedge': \"\\u2306\",\n  'Bcy': \"\\u0411\",\n  'Because': \"\\u2235\",\n  'becaus': \"\\u2235\",\n  'because': \"\\u2235\",\n  'Bernoullis': \"\\u212C\",\n  'Bscr': \"\\u212C\",\n  'bernou': \"\\u212C\",\n  'Beta': \"\\u0392\",\n  'Bfr': \"\\uD835\\uDD05\",\n  'Bopf': \"\\uD835\\uDD39\",\n  'Breve': \"\\u02D8\",\n  'breve': \"\\u02D8\",\n  'Bumpeq': \"\\u224E\",\n  'HumpDownHump': \"\\u224E\",\n  'bump': \"\\u224E\",\n  'CHcy': \"\\u0427\",\n  'COPY': \"\\xA9\",\n  'copy': \"\\xA9\",\n  'Cacute': \"\\u0106\",\n  'Cap': \"\\u22D2\",\n  'CapitalDifferentialD': \"\\u2145\",\n  'DD': \"\\u2145\",\n  'Cayleys': \"\\u212D\",\n  'Cfr': \"\\u212D\",\n  'Ccaron': \"\\u010C\",\n  'Ccedil': \"\\xC7\",\n  'Ccirc': \"\\u0108\",\n  'Cconint': \"\\u2230\",\n  'Cdot': \"\\u010A\",\n  'Cedilla': \"\\xB8\",\n  'cedil': \"\\xB8\",\n  'CenterDot': \"\\xB7\",\n  'centerdot': \"\\xB7\",\n  'middot': \"\\xB7\",\n  'Chi': \"\\u03A7\",\n  'CircleDot': \"\\u2299\",\n  'odot': \"\\u2299\",\n  'CircleMinus': \"\\u2296\",\n  'ominus': \"\\u2296\",\n  'CirclePlus': \"\\u2295\",\n  'oplus': \"\\u2295\",\n  'CircleTimes': \"\\u2297\",\n  'otimes': \"\\u2297\",\n  'ClockwiseContourIntegral': \"\\u2232\",\n  'cwconint': \"\\u2232\",\n  'CloseCurlyDoubleQuote': \"\\u201D\",\n  'rdquo': \"\\u201D\",\n  'rdquor': \"\\u201D\",\n  'CloseCurlyQuote': \"\\u2019\",\n  'rsquo': \"\\u2019\",\n  'rsquor': \"\\u2019\",\n  'Colon': \"\\u2237\",\n  'Proportion': \"\\u2237\",\n  'Colone': \"\\u2A74\",\n  'Congruent': \"\\u2261\",\n  'equiv': \"\\u2261\",\n  'Conint': \"\\u222F\",\n  'DoubleContourIntegral': \"\\u222F\",\n  'ContourIntegral': \"\\u222E\",\n  'conint': \"\\u222E\",\n  'oint': \"\\u222E\",\n  'Copf': \"\\u2102\",\n  'complexes': \"\\u2102\",\n  'Coproduct': \"\\u2210\",\n  'coprod': \"\\u2210\",\n  'CounterClockwiseContourIntegral': \"\\u2233\",\n  'awconint': \"\\u2233\",\n  'Cross': \"\\u2A2F\",\n  'Cscr': \"\\uD835\\uDC9E\",\n  'Cup': \"\\u22D3\",\n  'CupCap': \"\\u224D\",\n  'asympeq': \"\\u224D\",\n  'DDotrahd': \"\\u2911\",\n  'DJcy': \"\\u0402\",\n  'DScy': \"\\u0405\",\n  'DZcy': \"\\u040F\",\n  'Dagger': \"\\u2021\",\n  'ddagger': \"\\u2021\",\n  'Darr': \"\\u21A1\",\n  'Dashv': \"\\u2AE4\",\n  'DoubleLeftTee': \"\\u2AE4\",\n  'Dcaron': \"\\u010E\",\n  'Dcy': \"\\u0414\",\n  'Del': \"\\u2207\",\n  'nabla': \"\\u2207\",\n  'Delta': \"\\u0394\",\n  'Dfr': \"\\uD835\\uDD07\",\n  'DiacriticalAcute': \"\\xB4\",\n  'acute': \"\\xB4\",\n  'DiacriticalDot': \"\\u02D9\",\n  'dot': \"\\u02D9\",\n  'DiacriticalDoubleAcute': \"\\u02DD\",\n  'dblac': \"\\u02DD\",\n  'DiacriticalGrave': \"`\",\n  'grave': \"`\",\n  'DiacriticalTilde': \"\\u02DC\",\n  'tilde': \"\\u02DC\",\n  'Diamond': \"\\u22C4\",\n  'diam': \"\\u22C4\",\n  'diamond': \"\\u22C4\",\n  'DifferentialD': \"\\u2146\",\n  'dd': \"\\u2146\",\n  'Dopf': \"\\uD835\\uDD3B\",\n  'Dot': \"\\xA8\",\n  'DoubleDot': \"\\xA8\",\n  'die': \"\\xA8\",\n  'uml': \"\\xA8\",\n  'DotDot': \"\\u20DC\",\n  'DotEqual': \"\\u2250\",\n  'doteq': \"\\u2250\",\n  'esdot': \"\\u2250\",\n  'DoubleDownArrow': \"\\u21D3\",\n  'Downarrow': \"\\u21D3\",\n  'dArr': \"\\u21D3\",\n  'DoubleLeftArrow': \"\\u21D0\",\n  'Leftarrow': \"\\u21D0\",\n  'lArr': \"\\u21D0\",\n  'DoubleLeftRightArrow': \"\\u21D4\",\n  'Leftrightarrow': \"\\u21D4\",\n  'hArr': \"\\u21D4\",\n  'iff': \"\\u21D4\",\n  'DoubleLongLeftArrow': \"\\u27F8\",\n  'Longleftarrow': \"\\u27F8\",\n  'xlArr': \"\\u27F8\",\n  'DoubleLongLeftRightArrow': \"\\u27FA\",\n  'Longleftrightarrow': \"\\u27FA\",\n  'xhArr': \"\\u27FA\",\n  'DoubleLongRightArrow': \"\\u27F9\",\n  'Longrightarrow': \"\\u27F9\",\n  'xrArr': \"\\u27F9\",\n  'DoubleRightArrow': \"\\u21D2\",\n  'Implies': \"\\u21D2\",\n  'Rightarrow': \"\\u21D2\",\n  'rArr': \"\\u21D2\",\n  'DoubleRightTee': \"\\u22A8\",\n  'vDash': \"\\u22A8\",\n  'DoubleUpArrow': \"\\u21D1\",\n  'Uparrow': \"\\u21D1\",\n  'uArr': \"\\u21D1\",\n  'DoubleUpDownArrow': \"\\u21D5\",\n  'Updownarrow': \"\\u21D5\",\n  'vArr': \"\\u21D5\",\n  'DoubleVerticalBar': \"\\u2225\",\n  'par': \"\\u2225\",\n  'parallel': \"\\u2225\",\n  'shortparallel': \"\\u2225\",\n  'spar': \"\\u2225\",\n  'DownArrow': \"\\u2193\",\n  'ShortDownArrow': \"\\u2193\",\n  'darr': \"\\u2193\",\n  'downarrow': \"\\u2193\",\n  'DownArrowBar': \"\\u2913\",\n  'DownArrowUpArrow': \"\\u21F5\",\n  'duarr': \"\\u21F5\",\n  'DownBreve': \"\\u0311\",\n  'DownLeftRightVector': \"\\u2950\",\n  'DownLeftTeeVector': \"\\u295E\",\n  'DownLeftVector': \"\\u21BD\",\n  'leftharpoondown': \"\\u21BD\",\n  'lhard': \"\\u21BD\",\n  'DownLeftVectorBar': \"\\u2956\",\n  'DownRightTeeVector': \"\\u295F\",\n  'DownRightVector': \"\\u21C1\",\n  'rhard': \"\\u21C1\",\n  'rightharpoondown': \"\\u21C1\",\n  'DownRightVectorBar': \"\\u2957\",\n  'DownTee': \"\\u22A4\",\n  'top': \"\\u22A4\",\n  'DownTeeArrow': \"\\u21A7\",\n  'mapstodown': \"\\u21A7\",\n  'Dscr': \"\\uD835\\uDC9F\",\n  'Dstrok': \"\\u0110\",\n  'ENG': \"\\u014A\",\n  'ETH': \"\\xD0\",\n  'Eacute': \"\\xC9\",\n  'Ecaron': \"\\u011A\",\n  'Ecirc': \"\\xCA\",\n  'Ecy': \"\\u042D\",\n  'Edot': \"\\u0116\",\n  'Efr': \"\\uD835\\uDD08\",\n  'Egrave': \"\\xC8\",\n  'Element': \"\\u2208\",\n  'in': \"\\u2208\",\n  'isin': \"\\u2208\",\n  'isinv': \"\\u2208\",\n  'Emacr': \"\\u0112\",\n  'EmptySmallSquare': \"\\u25FB\",\n  'EmptyVerySmallSquare': \"\\u25AB\",\n  'Eogon': \"\\u0118\",\n  'Eopf': \"\\uD835\\uDD3C\",\n  'Epsilon': \"\\u0395\",\n  'Equal': \"\\u2A75\",\n  'EqualTilde': \"\\u2242\",\n  'eqsim': \"\\u2242\",\n  'esim': \"\\u2242\",\n  'Equilibrium': \"\\u21CC\",\n  'rightleftharpoons': \"\\u21CC\",\n  'rlhar': \"\\u21CC\",\n  'Escr': \"\\u2130\",\n  'expectation': \"\\u2130\",\n  'Esim': \"\\u2A73\",\n  'Eta': \"\\u0397\",\n  'Euml': \"\\xCB\",\n  'Exists': \"\\u2203\",\n  'exist': \"\\u2203\",\n  'ExponentialE': \"\\u2147\",\n  'ee': \"\\u2147\",\n  'exponentiale': \"\\u2147\",\n  'Fcy': \"\\u0424\",\n  'Ffr': \"\\uD835\\uDD09\",\n  'FilledSmallSquare': \"\\u25FC\",\n  'FilledVerySmallSquare': \"\\u25AA\",\n  'blacksquare': \"\\u25AA\",\n  'squarf': \"\\u25AA\",\n  'squf': \"\\u25AA\",\n  'Fopf': \"\\uD835\\uDD3D\",\n  'ForAll': \"\\u2200\",\n  'forall': \"\\u2200\",\n  'Fouriertrf': \"\\u2131\",\n  'Fscr': \"\\u2131\",\n  'GJcy': \"\\u0403\",\n  'GT': \">\",\n  'gt': \">\",\n  'Gamma': \"\\u0393\",\n  'Gammad': \"\\u03DC\",\n  'Gbreve': \"\\u011E\",\n  'Gcedil': \"\\u0122\",\n  'Gcirc': \"\\u011C\",\n  'Gcy': \"\\u0413\",\n  'Gdot': \"\\u0120\",\n  'Gfr': \"\\uD835\\uDD0A\",\n  'Gg': \"\\u22D9\",\n  'ggg': \"\\u22D9\",\n  'Gopf': \"\\uD835\\uDD3E\",\n  'GreaterEqual': \"\\u2265\",\n  'ge': \"\\u2265\",\n  'geq': \"\\u2265\",\n  'GreaterEqualLess': \"\\u22DB\",\n  'gel': \"\\u22DB\",\n  'gtreqless': \"\\u22DB\",\n  'GreaterFullEqual': \"\\u2267\",\n  'gE': \"\\u2267\",\n  'geqq': \"\\u2267\",\n  'GreaterGreater': \"\\u2AA2\",\n  'GreaterLess': \"\\u2277\",\n  'gl': \"\\u2277\",\n  'gtrless': \"\\u2277\",\n  'GreaterSlantEqual': \"\\u2A7E\",\n  'geqslant': \"\\u2A7E\",\n  'ges': \"\\u2A7E\",\n  'GreaterTilde': \"\\u2273\",\n  'gsim': \"\\u2273\",\n  'gtrsim': \"\\u2273\",\n  'Gscr': \"\\uD835\\uDCA2\",\n  'Gt': \"\\u226B\",\n  'NestedGreaterGreater': \"\\u226B\",\n  'gg': \"\\u226B\",\n  'HARDcy': \"\\u042A\",\n  'Hacek': \"\\u02C7\",\n  'caron': \"\\u02C7\",\n  'Hat': \"^\",\n  'Hcirc': \"\\u0124\",\n  'Hfr': \"\\u210C\",\n  'Poincareplane': \"\\u210C\",\n  'HilbertSpace': \"\\u210B\",\n  'Hscr': \"\\u210B\",\n  'hamilt': \"\\u210B\",\n  'Hopf': \"\\u210D\",\n  'quaternions': \"\\u210D\",\n  'HorizontalLine': \"\\u2500\",\n  'boxh': \"\\u2500\",\n  'Hstrok': \"\\u0126\",\n  'HumpEqual': \"\\u224F\",\n  'bumpe': \"\\u224F\",\n  'bumpeq': \"\\u224F\",\n  'IEcy': \"\\u0415\",\n  'IJlig': \"\\u0132\",\n  'IOcy': \"\\u0401\",\n  'Iacute': \"\\xCD\",\n  'Icirc': \"\\xCE\",\n  'Icy': \"\\u0418\",\n  'Idot': \"\\u0130\",\n  'Ifr': \"\\u2111\",\n  'Im': \"\\u2111\",\n  'image': \"\\u2111\",\n  'imagpart': \"\\u2111\",\n  'Igrave': \"\\xCC\",\n  'Imacr': \"\\u012A\",\n  'ImaginaryI': \"\\u2148\",\n  'ii': \"\\u2148\",\n  'Int': \"\\u222C\",\n  'Integral': \"\\u222B\",\n  'int': \"\\u222B\",\n  'Intersection': \"\\u22C2\",\n  'bigcap': \"\\u22C2\",\n  'xcap': \"\\u22C2\",\n  'InvisibleComma': \"\\u2063\",\n  'ic': \"\\u2063\",\n  'InvisibleTimes': \"\\u2062\",\n  'it': \"\\u2062\",\n  'Iogon': \"\\u012E\",\n  'Iopf': \"\\uD835\\uDD40\",\n  'Iota': \"\\u0399\",\n  'Iscr': \"\\u2110\",\n  'imagline': \"\\u2110\",\n  'Itilde': \"\\u0128\",\n  'Iukcy': \"\\u0406\",\n  'Iuml': \"\\xCF\",\n  'Jcirc': \"\\u0134\",\n  'Jcy': \"\\u0419\",\n  'Jfr': \"\\uD835\\uDD0D\",\n  'Jopf': \"\\uD835\\uDD41\",\n  'Jscr': \"\\uD835\\uDCA5\",\n  'Jsercy': \"\\u0408\",\n  'Jukcy': \"\\u0404\",\n  'KHcy': \"\\u0425\",\n  'KJcy': \"\\u040C\",\n  'Kappa': \"\\u039A\",\n  'Kcedil': \"\\u0136\",\n  'Kcy': \"\\u041A\",\n  'Kfr': \"\\uD835\\uDD0E\",\n  'Kopf': \"\\uD835\\uDD42\",\n  'Kscr': \"\\uD835\\uDCA6\",\n  'LJcy': \"\\u0409\",\n  'LT': \"<\",\n  'lt': \"<\",\n  'Lacute': \"\\u0139\",\n  'Lambda': \"\\u039B\",\n  'Lang': \"\\u27EA\",\n  'Laplacetrf': \"\\u2112\",\n  'Lscr': \"\\u2112\",\n  'lagran': \"\\u2112\",\n  'Larr': \"\\u219E\",\n  'twoheadleftarrow': \"\\u219E\",\n  'Lcaron': \"\\u013D\",\n  'Lcedil': \"\\u013B\",\n  'Lcy': \"\\u041B\",\n  'LeftAngleBracket': \"\\u27E8\",\n  'lang': \"\\u27E8\",\n  'langle': \"\\u27E8\",\n  'LeftArrow': \"\\u2190\",\n  'ShortLeftArrow': \"\\u2190\",\n  'larr': \"\\u2190\",\n  'leftarrow': \"\\u2190\",\n  'slarr': \"\\u2190\",\n  'LeftArrowBar': \"\\u21E4\",\n  'larrb': \"\\u21E4\",\n  'LeftArrowRightArrow': \"\\u21C6\",\n  'leftrightarrows': \"\\u21C6\",\n  'lrarr': \"\\u21C6\",\n  'LeftCeiling': \"\\u2308\",\n  'lceil': \"\\u2308\",\n  'LeftDoubleBracket': \"\\u27E6\",\n  'lobrk': \"\\u27E6\",\n  'LeftDownTeeVector': \"\\u2961\",\n  'LeftDownVector': \"\\u21C3\",\n  'dharl': \"\\u21C3\",\n  'downharpoonleft': \"\\u21C3\",\n  'LeftDownVectorBar': \"\\u2959\",\n  'LeftFloor': \"\\u230A\",\n  'lfloor': \"\\u230A\",\n  'LeftRightArrow': \"\\u2194\",\n  'harr': \"\\u2194\",\n  'leftrightarrow': \"\\u2194\",\n  'LeftRightVector': \"\\u294E\",\n  'LeftTee': \"\\u22A3\",\n  'dashv': \"\\u22A3\",\n  'LeftTeeArrow': \"\\u21A4\",\n  'mapstoleft': \"\\u21A4\",\n  'LeftTeeVector': \"\\u295A\",\n  'LeftTriangle': \"\\u22B2\",\n  'vartriangleleft': \"\\u22B2\",\n  'vltri': \"\\u22B2\",\n  'LeftTriangleBar': \"\\u29CF\",\n  'LeftTriangleEqual': \"\\u22B4\",\n  'ltrie': \"\\u22B4\",\n  'trianglelefteq': \"\\u22B4\",\n  'LeftUpDownVector': \"\\u2951\",\n  'LeftUpTeeVector': \"\\u2960\",\n  'LeftUpVector': \"\\u21BF\",\n  'uharl': \"\\u21BF\",\n  'upharpoonleft': \"\\u21BF\",\n  'LeftUpVectorBar': \"\\u2958\",\n  'LeftVector': \"\\u21BC\",\n  'leftharpoonup': \"\\u21BC\",\n  'lharu': \"\\u21BC\",\n  'LeftVectorBar': \"\\u2952\",\n  'LessEqualGreater': \"\\u22DA\",\n  'leg': \"\\u22DA\",\n  'lesseqgtr': \"\\u22DA\",\n  'LessFullEqual': \"\\u2266\",\n  'lE': \"\\u2266\",\n  'leqq': \"\\u2266\",\n  'LessGreater': \"\\u2276\",\n  'lessgtr': \"\\u2276\",\n  'lg': \"\\u2276\",\n  'LessLess': \"\\u2AA1\",\n  'LessSlantEqual': \"\\u2A7D\",\n  'leqslant': \"\\u2A7D\",\n  'les': \"\\u2A7D\",\n  'LessTilde': \"\\u2272\",\n  'lesssim': \"\\u2272\",\n  'lsim': \"\\u2272\",\n  'Lfr': \"\\uD835\\uDD0F\",\n  'Ll': \"\\u22D8\",\n  'Lleftarrow': \"\\u21DA\",\n  'lAarr': \"\\u21DA\",\n  'Lmidot': \"\\u013F\",\n  'LongLeftArrow': \"\\u27F5\",\n  'longleftarrow': \"\\u27F5\",\n  'xlarr': \"\\u27F5\",\n  'LongLeftRightArrow': \"\\u27F7\",\n  'longleftrightarrow': \"\\u27F7\",\n  'xharr': \"\\u27F7\",\n  'LongRightArrow': \"\\u27F6\",\n  'longrightarrow': \"\\u27F6\",\n  'xrarr': \"\\u27F6\",\n  'Lopf': \"\\uD835\\uDD43\",\n  'LowerLeftArrow': \"\\u2199\",\n  'swarr': \"\\u2199\",\n  'swarrow': \"\\u2199\",\n  'LowerRightArrow': \"\\u2198\",\n  'searr': \"\\u2198\",\n  'searrow': \"\\u2198\",\n  'Lsh': \"\\u21B0\",\n  'lsh': \"\\u21B0\",\n  'Lstrok': \"\\u0141\",\n  'Lt': \"\\u226A\",\n  'NestedLessLess': \"\\u226A\",\n  'll': \"\\u226A\",\n  'Map': \"\\u2905\",\n  'Mcy': \"\\u041C\",\n  'MediumSpace': \"\\u205F\",\n  'Mellintrf': \"\\u2133\",\n  'Mscr': \"\\u2133\",\n  'phmmat': \"\\u2133\",\n  'Mfr': \"\\uD835\\uDD10\",\n  'MinusPlus': \"\\u2213\",\n  'mnplus': \"\\u2213\",\n  'mp': \"\\u2213\",\n  'Mopf': \"\\uD835\\uDD44\",\n  'Mu': \"\\u039C\",\n  'NJcy': \"\\u040A\",\n  'Nacute': \"\\u0143\",\n  'Ncaron': \"\\u0147\",\n  'Ncedil': \"\\u0145\",\n  'Ncy': \"\\u041D\",\n  'NegativeMediumSpace': \"\\u200B\",\n  'NegativeThickSpace': \"\\u200B\",\n  'NegativeThinSpace': \"\\u200B\",\n  'NegativeVeryThinSpace': \"\\u200B\",\n  'ZeroWidthSpace': \"\\u200B\",\n  'NewLine': \"\\n\",\n  'Nfr': \"\\uD835\\uDD11\",\n  'NoBreak': \"\\u2060\",\n  'NonBreakingSpace': \"\\xA0\",\n  'nbsp': \"\\xA0\",\n  'Nopf': \"\\u2115\",\n  'naturals': \"\\u2115\",\n  'Not': \"\\u2AEC\",\n  'NotCongruent': \"\\u2262\",\n  'nequiv': \"\\u2262\",\n  'NotCupCap': \"\\u226D\",\n  'NotDoubleVerticalBar': \"\\u2226\",\n  'npar': \"\\u2226\",\n  'nparallel': \"\\u2226\",\n  'nshortparallel': \"\\u2226\",\n  'nspar': \"\\u2226\",\n  'NotElement': \"\\u2209\",\n  'notin': \"\\u2209\",\n  'notinva': \"\\u2209\",\n  'NotEqual': \"\\u2260\",\n  'ne': \"\\u2260\",\n  'NotEqualTilde': \"\\u2242\\u0338\",\n  'nesim': \"\\u2242\\u0338\",\n  'NotExists': \"\\u2204\",\n  'nexist': \"\\u2204\",\n  'nexists': \"\\u2204\",\n  'NotGreater': \"\\u226F\",\n  'ngt': \"\\u226F\",\n  'ngtr': \"\\u226F\",\n  'NotGreaterEqual': \"\\u2271\",\n  'nge': \"\\u2271\",\n  'ngeq': \"\\u2271\",\n  'NotGreaterFullEqual': \"\\u2267\\u0338\",\n  'ngE': \"\\u2267\\u0338\",\n  'ngeqq': \"\\u2267\\u0338\",\n  'NotGreaterGreater': \"\\u226B\\u0338\",\n  'nGtv': \"\\u226B\\u0338\",\n  'NotGreaterLess': \"\\u2279\",\n  'ntgl': \"\\u2279\",\n  'NotGreaterSlantEqual': \"\\u2A7E\\u0338\",\n  'ngeqslant': \"\\u2A7E\\u0338\",\n  'nges': \"\\u2A7E\\u0338\",\n  'NotGreaterTilde': \"\\u2275\",\n  'ngsim': \"\\u2275\",\n  'NotHumpDownHump': \"\\u224E\\u0338\",\n  'nbump': \"\\u224E\\u0338\",\n  'NotHumpEqual': \"\\u224F\\u0338\",\n  'nbumpe': \"\\u224F\\u0338\",\n  'NotLeftTriangle': \"\\u22EA\",\n  'nltri': \"\\u22EA\",\n  'ntriangleleft': \"\\u22EA\",\n  'NotLeftTriangleBar': \"\\u29CF\\u0338\",\n  'NotLeftTriangleEqual': \"\\u22EC\",\n  'nltrie': \"\\u22EC\",\n  'ntrianglelefteq': \"\\u22EC\",\n  'NotLess': \"\\u226E\",\n  'nless': \"\\u226E\",\n  'nlt': \"\\u226E\",\n  'NotLessEqual': \"\\u2270\",\n  'nle': \"\\u2270\",\n  'nleq': \"\\u2270\",\n  'NotLessGreater': \"\\u2278\",\n  'ntlg': \"\\u2278\",\n  'NotLessLess': \"\\u226A\\u0338\",\n  'nLtv': \"\\u226A\\u0338\",\n  'NotLessSlantEqual': \"\\u2A7D\\u0338\",\n  'nleqslant': \"\\u2A7D\\u0338\",\n  'nles': \"\\u2A7D\\u0338\",\n  'NotLessTilde': \"\\u2274\",\n  'nlsim': \"\\u2274\",\n  'NotNestedGreaterGreater': \"\\u2AA2\\u0338\",\n  'NotNestedLessLess': \"\\u2AA1\\u0338\",\n  'NotPrecedes': \"\\u2280\",\n  'npr': \"\\u2280\",\n  'nprec': \"\\u2280\",\n  'NotPrecedesEqual': \"\\u2AAF\\u0338\",\n  'npre': \"\\u2AAF\\u0338\",\n  'npreceq': \"\\u2AAF\\u0338\",\n  'NotPrecedesSlantEqual': \"\\u22E0\",\n  'nprcue': \"\\u22E0\",\n  'NotReverseElement': \"\\u220C\",\n  'notni': \"\\u220C\",\n  'notniva': \"\\u220C\",\n  'NotRightTriangle': \"\\u22EB\",\n  'nrtri': \"\\u22EB\",\n  'ntriangleright': \"\\u22EB\",\n  'NotRightTriangleBar': \"\\u29D0\\u0338\",\n  'NotRightTriangleEqual': \"\\u22ED\",\n  'nrtrie': \"\\u22ED\",\n  'ntrianglerighteq': \"\\u22ED\",\n  'NotSquareSubset': \"\\u228F\\u0338\",\n  'NotSquareSubsetEqual': \"\\u22E2\",\n  'nsqsube': \"\\u22E2\",\n  'NotSquareSuperset': \"\\u2290\\u0338\",\n  'NotSquareSupersetEqual': \"\\u22E3\",\n  'nsqsupe': \"\\u22E3\",\n  'NotSubset': \"\\u2282\\u20D2\",\n  'nsubset': \"\\u2282\\u20D2\",\n  'vnsub': \"\\u2282\\u20D2\",\n  'NotSubsetEqual': \"\\u2288\",\n  'nsube': \"\\u2288\",\n  'nsubseteq': \"\\u2288\",\n  'NotSucceeds': \"\\u2281\",\n  'nsc': \"\\u2281\",\n  'nsucc': \"\\u2281\",\n  'NotSucceedsEqual': \"\\u2AB0\\u0338\",\n  'nsce': \"\\u2AB0\\u0338\",\n  'nsucceq': \"\\u2AB0\\u0338\",\n  'NotSucceedsSlantEqual': \"\\u22E1\",\n  'nsccue': \"\\u22E1\",\n  'NotSucceedsTilde': \"\\u227F\\u0338\",\n  'NotSuperset': \"\\u2283\\u20D2\",\n  'nsupset': \"\\u2283\\u20D2\",\n  'vnsup': \"\\u2283\\u20D2\",\n  'NotSupersetEqual': \"\\u2289\",\n  'nsupe': \"\\u2289\",\n  'nsupseteq': \"\\u2289\",\n  'NotTilde': \"\\u2241\",\n  'nsim': \"\\u2241\",\n  'NotTildeEqual': \"\\u2244\",\n  'nsime': \"\\u2244\",\n  'nsimeq': \"\\u2244\",\n  'NotTildeFullEqual': \"\\u2247\",\n  'ncong': \"\\u2247\",\n  'NotTildeTilde': \"\\u2249\",\n  'nap': \"\\u2249\",\n  'napprox': \"\\u2249\",\n  'NotVerticalBar': \"\\u2224\",\n  'nmid': \"\\u2224\",\n  'nshortmid': \"\\u2224\",\n  'nsmid': \"\\u2224\",\n  'Nscr': \"\\uD835\\uDCA9\",\n  'Ntilde': \"\\xD1\",\n  'Nu': \"\\u039D\",\n  'OElig': \"\\u0152\",\n  'Oacute': \"\\xD3\",\n  'Ocirc': \"\\xD4\",\n  'Ocy': \"\\u041E\",\n  'Odblac': \"\\u0150\",\n  'Ofr': \"\\uD835\\uDD12\",\n  'Ograve': \"\\xD2\",\n  'Omacr': \"\\u014C\",\n  'Omega': \"\\u03A9\",\n  'ohm': \"\\u03A9\",\n  'Omicron': \"\\u039F\",\n  'Oopf': \"\\uD835\\uDD46\",\n  'OpenCurlyDoubleQuote': \"\\u201C\",\n  'ldquo': \"\\u201C\",\n  'OpenCurlyQuote': \"\\u2018\",\n  'lsquo': \"\\u2018\",\n  'Or': \"\\u2A54\",\n  'Oscr': \"\\uD835\\uDCAA\",\n  'Oslash': \"\\xD8\",\n  'Otilde': \"\\xD5\",\n  'Otimes': \"\\u2A37\",\n  'Ouml': \"\\xD6\",\n  'OverBar': \"\\u203E\",\n  'oline': \"\\u203E\",\n  'OverBrace': \"\\u23DE\",\n  'OverBracket': \"\\u23B4\",\n  'tbrk': \"\\u23B4\",\n  'OverParenthesis': \"\\u23DC\",\n  'PartialD': \"\\u2202\",\n  'part': \"\\u2202\",\n  'Pcy': \"\\u041F\",\n  'Pfr': \"\\uD835\\uDD13\",\n  'Phi': \"\\u03A6\",\n  'Pi': \"\\u03A0\",\n  'PlusMinus': \"\\xB1\",\n  'plusmn': \"\\xB1\",\n  'pm': \"\\xB1\",\n  'Popf': \"\\u2119\",\n  'primes': \"\\u2119\",\n  'Pr': \"\\u2ABB\",\n  'Precedes': \"\\u227A\",\n  'pr': \"\\u227A\",\n  'prec': \"\\u227A\",\n  'PrecedesEqual': \"\\u2AAF\",\n  'pre': \"\\u2AAF\",\n  'preceq': \"\\u2AAF\",\n  'PrecedesSlantEqual': \"\\u227C\",\n  'prcue': \"\\u227C\",\n  'preccurlyeq': \"\\u227C\",\n  'PrecedesTilde': \"\\u227E\",\n  'precsim': \"\\u227E\",\n  'prsim': \"\\u227E\",\n  'Prime': \"\\u2033\",\n  'Product': \"\\u220F\",\n  'prod': \"\\u220F\",\n  'Proportional': \"\\u221D\",\n  'prop': \"\\u221D\",\n  'propto': \"\\u221D\",\n  'varpropto': \"\\u221D\",\n  'vprop': \"\\u221D\",\n  'Pscr': \"\\uD835\\uDCAB\",\n  'Psi': \"\\u03A8\",\n  'QUOT': \"\\\"\",\n  'quot': \"\\\"\",\n  'Qfr': \"\\uD835\\uDD14\",\n  'Qopf': \"\\u211A\",\n  'rationals': \"\\u211A\",\n  'Qscr': \"\\uD835\\uDCAC\",\n  'RBarr': \"\\u2910\",\n  'drbkarow': \"\\u2910\",\n  'REG': \"\\xAE\",\n  'circledR': \"\\xAE\",\n  'reg': \"\\xAE\",\n  'Racute': \"\\u0154\",\n  'Rang': \"\\u27EB\",\n  'Rarr': \"\\u21A0\",\n  'twoheadrightarrow': \"\\u21A0\",\n  'Rarrtl': \"\\u2916\",\n  'Rcaron': \"\\u0158\",\n  'Rcedil': \"\\u0156\",\n  'Rcy': \"\\u0420\",\n  'Re': \"\\u211C\",\n  'Rfr': \"\\u211C\",\n  'real': \"\\u211C\",\n  'realpart': \"\\u211C\",\n  'ReverseElement': \"\\u220B\",\n  'SuchThat': \"\\u220B\",\n  'ni': \"\\u220B\",\n  'niv': \"\\u220B\",\n  'ReverseEquilibrium': \"\\u21CB\",\n  'leftrightharpoons': \"\\u21CB\",\n  'lrhar': \"\\u21CB\",\n  'ReverseUpEquilibrium': \"\\u296F\",\n  'duhar': \"\\u296F\",\n  'Rho': \"\\u03A1\",\n  'RightAngleBracket': \"\\u27E9\",\n  'rang': \"\\u27E9\",\n  'rangle': \"\\u27E9\",\n  'RightArrow': \"\\u2192\",\n  'ShortRightArrow': \"\\u2192\",\n  'rarr': \"\\u2192\",\n  'rightarrow': \"\\u2192\",\n  'srarr': \"\\u2192\",\n  'RightArrowBar': \"\\u21E5\",\n  'rarrb': \"\\u21E5\",\n  'RightArrowLeftArrow': \"\\u21C4\",\n  'rightleftarrows': \"\\u21C4\",\n  'rlarr': \"\\u21C4\",\n  'RightCeiling': \"\\u2309\",\n  'rceil': \"\\u2309\",\n  'RightDoubleBracket': \"\\u27E7\",\n  'robrk': \"\\u27E7\",\n  'RightDownTeeVector': \"\\u295D\",\n  'RightDownVector': \"\\u21C2\",\n  'dharr': \"\\u21C2\",\n  'downharpoonright': \"\\u21C2\",\n  'RightDownVectorBar': \"\\u2955\",\n  'RightFloor': \"\\u230B\",\n  'rfloor': \"\\u230B\",\n  'RightTee': \"\\u22A2\",\n  'vdash': \"\\u22A2\",\n  'RightTeeArrow': \"\\u21A6\",\n  'map': \"\\u21A6\",\n  'mapsto': \"\\u21A6\",\n  'RightTeeVector': \"\\u295B\",\n  'RightTriangle': \"\\u22B3\",\n  'vartriangleright': \"\\u22B3\",\n  'vrtri': \"\\u22B3\",\n  'RightTriangleBar': \"\\u29D0\",\n  'RightTriangleEqual': \"\\u22B5\",\n  'rtrie': \"\\u22B5\",\n  'trianglerighteq': \"\\u22B5\",\n  'RightUpDownVector': \"\\u294F\",\n  'RightUpTeeVector': \"\\u295C\",\n  'RightUpVector': \"\\u21BE\",\n  'uharr': \"\\u21BE\",\n  'upharpoonright': \"\\u21BE\",\n  'RightUpVectorBar': \"\\u2954\",\n  'RightVector': \"\\u21C0\",\n  'rharu': \"\\u21C0\",\n  'rightharpoonup': \"\\u21C0\",\n  'RightVectorBar': \"\\u2953\",\n  'Ropf': \"\\u211D\",\n  'reals': \"\\u211D\",\n  'RoundImplies': \"\\u2970\",\n  'Rrightarrow': \"\\u21DB\",\n  'rAarr': \"\\u21DB\",\n  'Rscr': \"\\u211B\",\n  'realine': \"\\u211B\",\n  'Rsh': \"\\u21B1\",\n  'rsh': \"\\u21B1\",\n  'RuleDelayed': \"\\u29F4\",\n  'SHCHcy': \"\\u0429\",\n  'SHcy': \"\\u0428\",\n  'SOFTcy': \"\\u042C\",\n  'Sacute': \"\\u015A\",\n  'Sc': \"\\u2ABC\",\n  'Scaron': \"\\u0160\",\n  'Scedil': \"\\u015E\",\n  'Scirc': \"\\u015C\",\n  'Scy': \"\\u0421\",\n  'Sfr': \"\\uD835\\uDD16\",\n  'ShortUpArrow': \"\\u2191\",\n  'UpArrow': \"\\u2191\",\n  'uarr': \"\\u2191\",\n  'uparrow': \"\\u2191\",\n  'Sigma': \"\\u03A3\",\n  'SmallCircle': \"\\u2218\",\n  'compfn': \"\\u2218\",\n  'Sopf': \"\\uD835\\uDD4A\",\n  'Sqrt': \"\\u221A\",\n  'radic': \"\\u221A\",\n  'Square': \"\\u25A1\",\n  'squ': \"\\u25A1\",\n  'square': \"\\u25A1\",\n  'SquareIntersection': \"\\u2293\",\n  'sqcap': \"\\u2293\",\n  'SquareSubset': \"\\u228F\",\n  'sqsub': \"\\u228F\",\n  'sqsubset': \"\\u228F\",\n  'SquareSubsetEqual': \"\\u2291\",\n  'sqsube': \"\\u2291\",\n  'sqsubseteq': \"\\u2291\",\n  'SquareSuperset': \"\\u2290\",\n  'sqsup': \"\\u2290\",\n  'sqsupset': \"\\u2290\",\n  'SquareSupersetEqual': \"\\u2292\",\n  'sqsupe': \"\\u2292\",\n  'sqsupseteq': \"\\u2292\",\n  'SquareUnion': \"\\u2294\",\n  'sqcup': \"\\u2294\",\n  'Sscr': \"\\uD835\\uDCAE\",\n  'Star': \"\\u22C6\",\n  'sstarf': \"\\u22C6\",\n  'Sub': \"\\u22D0\",\n  'Subset': \"\\u22D0\",\n  'SubsetEqual': \"\\u2286\",\n  'sube': \"\\u2286\",\n  'subseteq': \"\\u2286\",\n  'Succeeds': \"\\u227B\",\n  'sc': \"\\u227B\",\n  'succ': \"\\u227B\",\n  'SucceedsEqual': \"\\u2AB0\",\n  'sce': \"\\u2AB0\",\n  'succeq': \"\\u2AB0\",\n  'SucceedsSlantEqual': \"\\u227D\",\n  'sccue': \"\\u227D\",\n  'succcurlyeq': \"\\u227D\",\n  'SucceedsTilde': \"\\u227F\",\n  'scsim': \"\\u227F\",\n  'succsim': \"\\u227F\",\n  'Sum': \"\\u2211\",\n  'sum': \"\\u2211\",\n  'Sup': \"\\u22D1\",\n  'Supset': \"\\u22D1\",\n  'Superset': \"\\u2283\",\n  'sup': \"\\u2283\",\n  'supset': \"\\u2283\",\n  'SupersetEqual': \"\\u2287\",\n  'supe': \"\\u2287\",\n  'supseteq': \"\\u2287\",\n  'THORN': \"\\xDE\",\n  'TRADE': \"\\u2122\",\n  'trade': \"\\u2122\",\n  'TSHcy': \"\\u040B\",\n  'TScy': \"\\u0426\",\n  'Tab': \"\\t\",\n  'Tau': \"\\u03A4\",\n  'Tcaron': \"\\u0164\",\n  'Tcedil': \"\\u0162\",\n  'Tcy': \"\\u0422\",\n  'Tfr': \"\\uD835\\uDD17\",\n  'Therefore': \"\\u2234\",\n  'there4': \"\\u2234\",\n  'therefore': \"\\u2234\",\n  'Theta': \"\\u0398\",\n  'ThickSpace': \"\\u205F\\u200A\",\n  'ThinSpace': \"\\u2009\",\n  'thinsp': \"\\u2009\",\n  'Tilde': \"\\u223C\",\n  'sim': \"\\u223C\",\n  'thicksim': \"\\u223C\",\n  'thksim': \"\\u223C\",\n  'TildeEqual': \"\\u2243\",\n  'sime': \"\\u2243\",\n  'simeq': \"\\u2243\",\n  'TildeFullEqual': \"\\u2245\",\n  'cong': \"\\u2245\",\n  'TildeTilde': \"\\u2248\",\n  'ap': \"\\u2248\",\n  'approx': \"\\u2248\",\n  'asymp': \"\\u2248\",\n  'thickapprox': \"\\u2248\",\n  'thkap': \"\\u2248\",\n  'Topf': \"\\uD835\\uDD4B\",\n  'TripleDot': \"\\u20DB\",\n  'tdot': \"\\u20DB\",\n  'Tscr': \"\\uD835\\uDCAF\",\n  'Tstrok': \"\\u0166\",\n  'Uacute': \"\\xDA\",\n  'Uarr': \"\\u219F\",\n  'Uarrocir': \"\\u2949\",\n  'Ubrcy': \"\\u040E\",\n  'Ubreve': \"\\u016C\",\n  'Ucirc': \"\\xDB\",\n  'Ucy': \"\\u0423\",\n  'Udblac': \"\\u0170\",\n  'Ufr': \"\\uD835\\uDD18\",\n  'Ugrave': \"\\xD9\",\n  'Umacr': \"\\u016A\",\n  'UnderBar': \"_\",\n  'lowbar': \"_\",\n  'UnderBrace': \"\\u23DF\",\n  'UnderBracket': \"\\u23B5\",\n  'bbrk': \"\\u23B5\",\n  'UnderParenthesis': \"\\u23DD\",\n  'Union': \"\\u22C3\",\n  'bigcup': \"\\u22C3\",\n  'xcup': \"\\u22C3\",\n  'UnionPlus': \"\\u228E\",\n  'uplus': \"\\u228E\",\n  'Uogon': \"\\u0172\",\n  'Uopf': \"\\uD835\\uDD4C\",\n  'UpArrowBar': \"\\u2912\",\n  'UpArrowDownArrow': \"\\u21C5\",\n  'udarr': \"\\u21C5\",\n  'UpDownArrow': \"\\u2195\",\n  'updownarrow': \"\\u2195\",\n  'varr': \"\\u2195\",\n  'UpEquilibrium': \"\\u296E\",\n  'udhar': \"\\u296E\",\n  'UpTee': \"\\u22A5\",\n  'bot': \"\\u22A5\",\n  'bottom': \"\\u22A5\",\n  'perp': \"\\u22A5\",\n  'UpTeeArrow': \"\\u21A5\",\n  'mapstoup': \"\\u21A5\",\n  'UpperLeftArrow': \"\\u2196\",\n  'nwarr': \"\\u2196\",\n  'nwarrow': \"\\u2196\",\n  'UpperRightArrow': \"\\u2197\",\n  'nearr': \"\\u2197\",\n  'nearrow': \"\\u2197\",\n  'Upsi': \"\\u03D2\",\n  'upsih': \"\\u03D2\",\n  'Upsilon': \"\\u03A5\",\n  'Uring': \"\\u016E\",\n  'Uscr': \"\\uD835\\uDCB0\",\n  'Utilde': \"\\u0168\",\n  'Uuml': \"\\xDC\",\n  'VDash': \"\\u22AB\",\n  'Vbar': \"\\u2AEB\",\n  'Vcy': \"\\u0412\",\n  'Vdash': \"\\u22A9\",\n  'Vdashl': \"\\u2AE6\",\n  'Vee': \"\\u22C1\",\n  'bigvee': \"\\u22C1\",\n  'xvee': \"\\u22C1\",\n  'Verbar': \"\\u2016\",\n  'Vert': \"\\u2016\",\n  'VerticalBar': \"\\u2223\",\n  'mid': \"\\u2223\",\n  'shortmid': \"\\u2223\",\n  'smid': \"\\u2223\",\n  'VerticalLine': \"|\",\n  'verbar': \"|\",\n  'vert': \"|\",\n  'VerticalSeparator': \"\\u2758\",\n  'VerticalTilde': \"\\u2240\",\n  'wr': \"\\u2240\",\n  'wreath': \"\\u2240\",\n  'VeryThinSpace': \"\\u200A\",\n  'hairsp': \"\\u200A\",\n  'Vfr': \"\\uD835\\uDD19\",\n  'Vopf': \"\\uD835\\uDD4D\",\n  'Vscr': \"\\uD835\\uDCB1\",\n  'Vvdash': \"\\u22AA\",\n  'Wcirc': \"\\u0174\",\n  'Wedge': \"\\u22C0\",\n  'bigwedge': \"\\u22C0\",\n  'xwedge': \"\\u22C0\",\n  'Wfr': \"\\uD835\\uDD1A\",\n  'Wopf': \"\\uD835\\uDD4E\",\n  'Wscr': \"\\uD835\\uDCB2\",\n  'Xfr': \"\\uD835\\uDD1B\",\n  'Xi': \"\\u039E\",\n  'Xopf': \"\\uD835\\uDD4F\",\n  'Xscr': \"\\uD835\\uDCB3\",\n  'YAcy': \"\\u042F\",\n  'YIcy': \"\\u0407\",\n  'YUcy': \"\\u042E\",\n  'Yacute': \"\\xDD\",\n  'Ycirc': \"\\u0176\",\n  'Ycy': \"\\u042B\",\n  'Yfr': \"\\uD835\\uDD1C\",\n  'Yopf': \"\\uD835\\uDD50\",\n  'Yscr': \"\\uD835\\uDCB4\",\n  'Yuml': \"\\u0178\",\n  'ZHcy': \"\\u0416\",\n  'Zacute': \"\\u0179\",\n  'Zcaron': \"\\u017D\",\n  'Zcy': \"\\u0417\",\n  'Zdot': \"\\u017B\",\n  'Zeta': \"\\u0396\",\n  'Zfr': \"\\u2128\",\n  'zeetrf': \"\\u2128\",\n  'Zopf': \"\\u2124\",\n  'integers': \"\\u2124\",\n  'Zscr': \"\\uD835\\uDCB5\",\n  'aacute': \"\\xE1\",\n  'abreve': \"\\u0103\",\n  'ac': \"\\u223E\",\n  'mstpos': \"\\u223E\",\n  'acE': \"\\u223E\\u0333\",\n  'acd': \"\\u223F\",\n  'acirc': \"\\xE2\",\n  'acy': \"\\u0430\",\n  'aelig': \"\\xE6\",\n  'afr': \"\\uD835\\uDD1E\",\n  'agrave': \"\\xE0\",\n  'alefsym': \"\\u2135\",\n  'aleph': \"\\u2135\",\n  'alpha': \"\\u03B1\",\n  'amacr': \"\\u0101\",\n  'amalg': \"\\u2A3F\",\n  'and': \"\\u2227\",\n  'wedge': \"\\u2227\",\n  'andand': \"\\u2A55\",\n  'andd': \"\\u2A5C\",\n  'andslope': \"\\u2A58\",\n  'andv': \"\\u2A5A\",\n  'ang': \"\\u2220\",\n  'angle': \"\\u2220\",\n  'ange': \"\\u29A4\",\n  'angmsd': \"\\u2221\",\n  'measuredangle': \"\\u2221\",\n  'angmsdaa': \"\\u29A8\",\n  'angmsdab': \"\\u29A9\",\n  'angmsdac': \"\\u29AA\",\n  'angmsdad': \"\\u29AB\",\n  'angmsdae': \"\\u29AC\",\n  'angmsdaf': \"\\u29AD\",\n  'angmsdag': \"\\u29AE\",\n  'angmsdah': \"\\u29AF\",\n  'angrt': \"\\u221F\",\n  'angrtvb': \"\\u22BE\",\n  'angrtvbd': \"\\u299D\",\n  'angsph': \"\\u2222\",\n  'angzarr': \"\\u237C\",\n  'aogon': \"\\u0105\",\n  'aopf': \"\\uD835\\uDD52\",\n  'apE': \"\\u2A70\",\n  'apacir': \"\\u2A6F\",\n  'ape': \"\\u224A\",\n  'approxeq': \"\\u224A\",\n  'apid': \"\\u224B\",\n  'apos': \"'\",\n  'aring': \"\\xE5\",\n  'ascr': \"\\uD835\\uDCB6\",\n  'ast': \"*\",\n  'midast': \"*\",\n  'atilde': \"\\xE3\",\n  'auml': \"\\xE4\",\n  'awint': \"\\u2A11\",\n  'bNot': \"\\u2AED\",\n  'backcong': \"\\u224C\",\n  'bcong': \"\\u224C\",\n  'backepsilon': \"\\u03F6\",\n  'bepsi': \"\\u03F6\",\n  'backprime': \"\\u2035\",\n  'bprime': \"\\u2035\",\n  'backsim': \"\\u223D\",\n  'bsim': \"\\u223D\",\n  'backsimeq': \"\\u22CD\",\n  'bsime': \"\\u22CD\",\n  'barvee': \"\\u22BD\",\n  'barwed': \"\\u2305\",\n  'barwedge': \"\\u2305\",\n  'bbrktbrk': \"\\u23B6\",\n  'bcy': \"\\u0431\",\n  'bdquo': \"\\u201E\",\n  'ldquor': \"\\u201E\",\n  'bemptyv': \"\\u29B0\",\n  'beta': \"\\u03B2\",\n  'beth': \"\\u2136\",\n  'between': \"\\u226C\",\n  'twixt': \"\\u226C\",\n  'bfr': \"\\uD835\\uDD1F\",\n  'bigcirc': \"\\u25EF\",\n  'xcirc': \"\\u25EF\",\n  'bigodot': \"\\u2A00\",\n  'xodot': \"\\u2A00\",\n  'bigoplus': \"\\u2A01\",\n  'xoplus': \"\\u2A01\",\n  'bigotimes': \"\\u2A02\",\n  'xotime': \"\\u2A02\",\n  'bigsqcup': \"\\u2A06\",\n  'xsqcup': \"\\u2A06\",\n  'bigstar': \"\\u2605\",\n  'starf': \"\\u2605\",\n  'bigtriangledown': \"\\u25BD\",\n  'xdtri': \"\\u25BD\",\n  'bigtriangleup': \"\\u25B3\",\n  'xutri': \"\\u25B3\",\n  'biguplus': \"\\u2A04\",\n  'xuplus': \"\\u2A04\",\n  'bkarow': \"\\u290D\",\n  'rbarr': \"\\u290D\",\n  'blacklozenge': \"\\u29EB\",\n  'lozf': \"\\u29EB\",\n  'blacktriangle': \"\\u25B4\",\n  'utrif': \"\\u25B4\",\n  'blacktriangledown': \"\\u25BE\",\n  'dtrif': \"\\u25BE\",\n  'blacktriangleleft': \"\\u25C2\",\n  'ltrif': \"\\u25C2\",\n  'blacktriangleright': \"\\u25B8\",\n  'rtrif': \"\\u25B8\",\n  'blank': \"\\u2423\",\n  'blk12': \"\\u2592\",\n  'blk14': \"\\u2591\",\n  'blk34': \"\\u2593\",\n  'block': \"\\u2588\",\n  'bne': \"=\\u20E5\",\n  'bnequiv': \"\\u2261\\u20E5\",\n  'bnot': \"\\u2310\",\n  'bopf': \"\\uD835\\uDD53\",\n  'bowtie': \"\\u22C8\",\n  'boxDL': \"\\u2557\",\n  'boxDR': \"\\u2554\",\n  'boxDl': \"\\u2556\",\n  'boxDr': \"\\u2553\",\n  'boxH': \"\\u2550\",\n  'boxHD': \"\\u2566\",\n  'boxHU': \"\\u2569\",\n  'boxHd': \"\\u2564\",\n  'boxHu': \"\\u2567\",\n  'boxUL': \"\\u255D\",\n  'boxUR': \"\\u255A\",\n  'boxUl': \"\\u255C\",\n  'boxUr': \"\\u2559\",\n  'boxV': \"\\u2551\",\n  'boxVH': \"\\u256C\",\n  'boxVL': \"\\u2563\",\n  'boxVR': \"\\u2560\",\n  'boxVh': \"\\u256B\",\n  'boxVl': \"\\u2562\",\n  'boxVr': \"\\u255F\",\n  'boxbox': \"\\u29C9\",\n  'boxdL': \"\\u2555\",\n  'boxdR': \"\\u2552\",\n  'boxdl': \"\\u2510\",\n  'boxdr': \"\\u250C\",\n  'boxhD': \"\\u2565\",\n  'boxhU': \"\\u2568\",\n  'boxhd': \"\\u252C\",\n  'boxhu': \"\\u2534\",\n  'boxminus': \"\\u229F\",\n  'minusb': \"\\u229F\",\n  'boxplus': \"\\u229E\",\n  'plusb': \"\\u229E\",\n  'boxtimes': \"\\u22A0\",\n  'timesb': \"\\u22A0\",\n  'boxuL': \"\\u255B\",\n  'boxuR': \"\\u2558\",\n  'boxul': \"\\u2518\",\n  'boxur': \"\\u2514\",\n  'boxv': \"\\u2502\",\n  'boxvH': \"\\u256A\",\n  'boxvL': \"\\u2561\",\n  'boxvR': \"\\u255E\",\n  'boxvh': \"\\u253C\",\n  'boxvl': \"\\u2524\",\n  'boxvr': \"\\u251C\",\n  'brvbar': \"\\xA6\",\n  'bscr': \"\\uD835\\uDCB7\",\n  'bsemi': \"\\u204F\",\n  'bsol': \"\\\\\",\n  'bsolb': \"\\u29C5\",\n  'bsolhsub': \"\\u27C8\",\n  'bull': \"\\u2022\",\n  'bullet': \"\\u2022\",\n  'bumpE': \"\\u2AAE\",\n  'cacute': \"\\u0107\",\n  'cap': \"\\u2229\",\n  'capand': \"\\u2A44\",\n  'capbrcup': \"\\u2A49\",\n  'capcap': \"\\u2A4B\",\n  'capcup': \"\\u2A47\",\n  'capdot': \"\\u2A40\",\n  'caps': \"\\u2229\\uFE00\",\n  'caret': \"\\u2041\",\n  'ccaps': \"\\u2A4D\",\n  'ccaron': \"\\u010D\",\n  'ccedil': \"\\xE7\",\n  'ccirc': \"\\u0109\",\n  'ccups': \"\\u2A4C\",\n  'ccupssm': \"\\u2A50\",\n  'cdot': \"\\u010B\",\n  'cemptyv': \"\\u29B2\",\n  'cent': \"\\xA2\",\n  'cfr': \"\\uD835\\uDD20\",\n  'chcy': \"\\u0447\",\n  'check': \"\\u2713\",\n  'checkmark': \"\\u2713\",\n  'chi': \"\\u03C7\",\n  'cir': \"\\u25CB\",\n  'cirE': \"\\u29C3\",\n  'circ': \"\\u02C6\",\n  'circeq': \"\\u2257\",\n  'cire': \"\\u2257\",\n  'circlearrowleft': \"\\u21BA\",\n  'olarr': \"\\u21BA\",\n  'circlearrowright': \"\\u21BB\",\n  'orarr': \"\\u21BB\",\n  'circledS': \"\\u24C8\",\n  'oS': \"\\u24C8\",\n  'circledast': \"\\u229B\",\n  'oast': \"\\u229B\",\n  'circledcirc': \"\\u229A\",\n  'ocir': \"\\u229A\",\n  'circleddash': \"\\u229D\",\n  'odash': \"\\u229D\",\n  'cirfnint': \"\\u2A10\",\n  'cirmid': \"\\u2AEF\",\n  'cirscir': \"\\u29C2\",\n  'clubs': \"\\u2663\",\n  'clubsuit': \"\\u2663\",\n  'colon': \":\",\n  'comma': \",\",\n  'commat': \"@\",\n  'comp': \"\\u2201\",\n  'complement': \"\\u2201\",\n  'congdot': \"\\u2A6D\",\n  'copf': \"\\uD835\\uDD54\",\n  'copysr': \"\\u2117\",\n  'crarr': \"\\u21B5\",\n  'cross': \"\\u2717\",\n  'cscr': \"\\uD835\\uDCB8\",\n  'csub': \"\\u2ACF\",\n  'csube': \"\\u2AD1\",\n  'csup': \"\\u2AD0\",\n  'csupe': \"\\u2AD2\",\n  'ctdot': \"\\u22EF\",\n  'cudarrl': \"\\u2938\",\n  'cudarrr': \"\\u2935\",\n  'cuepr': \"\\u22DE\",\n  'curlyeqprec': \"\\u22DE\",\n  'cuesc': \"\\u22DF\",\n  'curlyeqsucc': \"\\u22DF\",\n  'cularr': \"\\u21B6\",\n  'curvearrowleft': \"\\u21B6\",\n  'cularrp': \"\\u293D\",\n  'cup': \"\\u222A\",\n  'cupbrcap': \"\\u2A48\",\n  'cupcap': \"\\u2A46\",\n  'cupcup': \"\\u2A4A\",\n  'cupdot': \"\\u228D\",\n  'cupor': \"\\u2A45\",\n  'cups': \"\\u222A\\uFE00\",\n  'curarr': \"\\u21B7\",\n  'curvearrowright': \"\\u21B7\",\n  'curarrm': \"\\u293C\",\n  'curlyvee': \"\\u22CE\",\n  'cuvee': \"\\u22CE\",\n  'curlywedge': \"\\u22CF\",\n  'cuwed': \"\\u22CF\",\n  'curren': \"\\xA4\",\n  'cwint': \"\\u2231\",\n  'cylcty': \"\\u232D\",\n  'dHar': \"\\u2965\",\n  'dagger': \"\\u2020\",\n  'daleth': \"\\u2138\",\n  'dash': \"\\u2010\",\n  'hyphen': \"\\u2010\",\n  'dbkarow': \"\\u290F\",\n  'rBarr': \"\\u290F\",\n  'dcaron': \"\\u010F\",\n  'dcy': \"\\u0434\",\n  'ddarr': \"\\u21CA\",\n  'downdownarrows': \"\\u21CA\",\n  'ddotseq': \"\\u2A77\",\n  'eDDot': \"\\u2A77\",\n  'deg': \"\\xB0\",\n  'delta': \"\\u03B4\",\n  'demptyv': \"\\u29B1\",\n  'dfisht': \"\\u297F\",\n  'dfr': \"\\uD835\\uDD21\",\n  'diamondsuit': \"\\u2666\",\n  'diams': \"\\u2666\",\n  'digamma': \"\\u03DD\",\n  'gammad': \"\\u03DD\",\n  'disin': \"\\u22F2\",\n  'div': \"\\xF7\",\n  'divide': \"\\xF7\",\n  'divideontimes': \"\\u22C7\",\n  'divonx': \"\\u22C7\",\n  'djcy': \"\\u0452\",\n  'dlcorn': \"\\u231E\",\n  'llcorner': \"\\u231E\",\n  'dlcrop': \"\\u230D\",\n  'dollar': \"$\",\n  'dopf': \"\\uD835\\uDD55\",\n  'doteqdot': \"\\u2251\",\n  'eDot': \"\\u2251\",\n  'dotminus': \"\\u2238\",\n  'minusd': \"\\u2238\",\n  'dotplus': \"\\u2214\",\n  'plusdo': \"\\u2214\",\n  'dotsquare': \"\\u22A1\",\n  'sdotb': \"\\u22A1\",\n  'drcorn': \"\\u231F\",\n  'lrcorner': \"\\u231F\",\n  'drcrop': \"\\u230C\",\n  'dscr': \"\\uD835\\uDCB9\",\n  'dscy': \"\\u0455\",\n  'dsol': \"\\u29F6\",\n  'dstrok': \"\\u0111\",\n  'dtdot': \"\\u22F1\",\n  'dtri': \"\\u25BF\",\n  'triangledown': \"\\u25BF\",\n  'dwangle': \"\\u29A6\",\n  'dzcy': \"\\u045F\",\n  'dzigrarr': \"\\u27FF\",\n  'eacute': \"\\xE9\",\n  'easter': \"\\u2A6E\",\n  'ecaron': \"\\u011B\",\n  'ecir': \"\\u2256\",\n  'eqcirc': \"\\u2256\",\n  'ecirc': \"\\xEA\",\n  'ecolon': \"\\u2255\",\n  'eqcolon': \"\\u2255\",\n  'ecy': \"\\u044D\",\n  'edot': \"\\u0117\",\n  'efDot': \"\\u2252\",\n  'fallingdotseq': \"\\u2252\",\n  'efr': \"\\uD835\\uDD22\",\n  'eg': \"\\u2A9A\",\n  'egrave': \"\\xE8\",\n  'egs': \"\\u2A96\",\n  'eqslantgtr': \"\\u2A96\",\n  'egsdot': \"\\u2A98\",\n  'el': \"\\u2A99\",\n  'elinters': \"\\u23E7\",\n  'ell': \"\\u2113\",\n  'els': \"\\u2A95\",\n  'eqslantless': \"\\u2A95\",\n  'elsdot': \"\\u2A97\",\n  'emacr': \"\\u0113\",\n  'empty': \"\\u2205\",\n  'emptyset': \"\\u2205\",\n  'emptyv': \"\\u2205\",\n  'varnothing': \"\\u2205\",\n  'emsp13': \"\\u2004\",\n  'emsp14': \"\\u2005\",\n  'emsp': \"\\u2003\",\n  'eng': \"\\u014B\",\n  'ensp': \"\\u2002\",\n  'eogon': \"\\u0119\",\n  'eopf': \"\\uD835\\uDD56\",\n  'epar': \"\\u22D5\",\n  'eparsl': \"\\u29E3\",\n  'eplus': \"\\u2A71\",\n  'epsi': \"\\u03B5\",\n  'epsilon': \"\\u03B5\",\n  'epsiv': \"\\u03F5\",\n  'straightepsilon': \"\\u03F5\",\n  'varepsilon': \"\\u03F5\",\n  'equals': \"=\",\n  'equest': \"\\u225F\",\n  'questeq': \"\\u225F\",\n  'equivDD': \"\\u2A78\",\n  'eqvparsl': \"\\u29E5\",\n  'erDot': \"\\u2253\",\n  'risingdotseq': \"\\u2253\",\n  'erarr': \"\\u2971\",\n  'escr': \"\\u212F\",\n  'eta': \"\\u03B7\",\n  'eth': \"\\xF0\",\n  'euml': \"\\xEB\",\n  'euro': \"\\u20AC\",\n  'excl': \"!\",\n  'fcy': \"\\u0444\",\n  'female': \"\\u2640\",\n  'ffilig': \"\\uFB03\",\n  'fflig': \"\\uFB00\",\n  'ffllig': \"\\uFB04\",\n  'ffr': \"\\uD835\\uDD23\",\n  'filig': \"\\uFB01\",\n  'fjlig': \"fj\",\n  'flat': \"\\u266D\",\n  'fllig': \"\\uFB02\",\n  'fltns': \"\\u25B1\",\n  'fnof': \"\\u0192\",\n  'fopf': \"\\uD835\\uDD57\",\n  'fork': \"\\u22D4\",\n  'pitchfork': \"\\u22D4\",\n  'forkv': \"\\u2AD9\",\n  'fpartint': \"\\u2A0D\",\n  'frac12': \"\\xBD\",\n  'half': \"\\xBD\",\n  'frac13': \"\\u2153\",\n  'frac14': \"\\xBC\",\n  'frac15': \"\\u2155\",\n  'frac16': \"\\u2159\",\n  'frac18': \"\\u215B\",\n  'frac23': \"\\u2154\",\n  'frac25': \"\\u2156\",\n  'frac34': \"\\xBE\",\n  'frac35': \"\\u2157\",\n  'frac38': \"\\u215C\",\n  'frac45': \"\\u2158\",\n  'frac56': \"\\u215A\",\n  'frac58': \"\\u215D\",\n  'frac78': \"\\u215E\",\n  'frasl': \"\\u2044\",\n  'frown': \"\\u2322\",\n  'sfrown': \"\\u2322\",\n  'fscr': \"\\uD835\\uDCBB\",\n  'gEl': \"\\u2A8C\",\n  'gtreqqless': \"\\u2A8C\",\n  'gacute': \"\\u01F5\",\n  'gamma': \"\\u03B3\",\n  'gap': \"\\u2A86\",\n  'gtrapprox': \"\\u2A86\",\n  'gbreve': \"\\u011F\",\n  'gcirc': \"\\u011D\",\n  'gcy': \"\\u0433\",\n  'gdot': \"\\u0121\",\n  'gescc': \"\\u2AA9\",\n  'gesdot': \"\\u2A80\",\n  'gesdoto': \"\\u2A82\",\n  'gesdotol': \"\\u2A84\",\n  'gesl': \"\\u22DB\\uFE00\",\n  'gesles': \"\\u2A94\",\n  'gfr': \"\\uD835\\uDD24\",\n  'gimel': \"\\u2137\",\n  'gjcy': \"\\u0453\",\n  'glE': \"\\u2A92\",\n  'gla': \"\\u2AA5\",\n  'glj': \"\\u2AA4\",\n  'gnE': \"\\u2269\",\n  'gneqq': \"\\u2269\",\n  'gnap': \"\\u2A8A\",\n  'gnapprox': \"\\u2A8A\",\n  'gne': \"\\u2A88\",\n  'gneq': \"\\u2A88\",\n  'gnsim': \"\\u22E7\",\n  'gopf': \"\\uD835\\uDD58\",\n  'gscr': \"\\u210A\",\n  'gsime': \"\\u2A8E\",\n  'gsiml': \"\\u2A90\",\n  'gtcc': \"\\u2AA7\",\n  'gtcir': \"\\u2A7A\",\n  'gtdot': \"\\u22D7\",\n  'gtrdot': \"\\u22D7\",\n  'gtlPar': \"\\u2995\",\n  'gtquest': \"\\u2A7C\",\n  'gtrarr': \"\\u2978\",\n  'gvertneqq': \"\\u2269\\uFE00\",\n  'gvnE': \"\\u2269\\uFE00\",\n  'hardcy': \"\\u044A\",\n  'harrcir': \"\\u2948\",\n  'harrw': \"\\u21AD\",\n  'leftrightsquigarrow': \"\\u21AD\",\n  'hbar': \"\\u210F\",\n  'hslash': \"\\u210F\",\n  'planck': \"\\u210F\",\n  'plankv': \"\\u210F\",\n  'hcirc': \"\\u0125\",\n  'hearts': \"\\u2665\",\n  'heartsuit': \"\\u2665\",\n  'hellip': \"\\u2026\",\n  'mldr': \"\\u2026\",\n  'hercon': \"\\u22B9\",\n  'hfr': \"\\uD835\\uDD25\",\n  'hksearow': \"\\u2925\",\n  'searhk': \"\\u2925\",\n  'hkswarow': \"\\u2926\",\n  'swarhk': \"\\u2926\",\n  'hoarr': \"\\u21FF\",\n  'homtht': \"\\u223B\",\n  'hookleftarrow': \"\\u21A9\",\n  'larrhk': \"\\u21A9\",\n  'hookrightarrow': \"\\u21AA\",\n  'rarrhk': \"\\u21AA\",\n  'hopf': \"\\uD835\\uDD59\",\n  'horbar': \"\\u2015\",\n  'hscr': \"\\uD835\\uDCBD\",\n  'hstrok': \"\\u0127\",\n  'hybull': \"\\u2043\",\n  'iacute': \"\\xED\",\n  'icirc': \"\\xEE\",\n  'icy': \"\\u0438\",\n  'iecy': \"\\u0435\",\n  'iexcl': \"\\xA1\",\n  'ifr': \"\\uD835\\uDD26\",\n  'igrave': \"\\xEC\",\n  'iiiint': \"\\u2A0C\",\n  'qint': \"\\u2A0C\",\n  'iiint': \"\\u222D\",\n  'tint': \"\\u222D\",\n  'iinfin': \"\\u29DC\",\n  'iiota': \"\\u2129\",\n  'ijlig': \"\\u0133\",\n  'imacr': \"\\u012B\",\n  'imath': \"\\u0131\",\n  'inodot': \"\\u0131\",\n  'imof': \"\\u22B7\",\n  'imped': \"\\u01B5\",\n  'incare': \"\\u2105\",\n  'infin': \"\\u221E\",\n  'infintie': \"\\u29DD\",\n  'intcal': \"\\u22BA\",\n  'intercal': \"\\u22BA\",\n  'intlarhk': \"\\u2A17\",\n  'intprod': \"\\u2A3C\",\n  'iprod': \"\\u2A3C\",\n  'iocy': \"\\u0451\",\n  'iogon': \"\\u012F\",\n  'iopf': \"\\uD835\\uDD5A\",\n  'iota': \"\\u03B9\",\n  'iquest': \"\\xBF\",\n  'iscr': \"\\uD835\\uDCBE\",\n  'isinE': \"\\u22F9\",\n  'isindot': \"\\u22F5\",\n  'isins': \"\\u22F4\",\n  'isinsv': \"\\u22F3\",\n  'itilde': \"\\u0129\",\n  'iukcy': \"\\u0456\",\n  'iuml': \"\\xEF\",\n  'jcirc': \"\\u0135\",\n  'jcy': \"\\u0439\",\n  'jfr': \"\\uD835\\uDD27\",\n  'jmath': \"\\u0237\",\n  'jopf': \"\\uD835\\uDD5B\",\n  'jscr': \"\\uD835\\uDCBF\",\n  'jsercy': \"\\u0458\",\n  'jukcy': \"\\u0454\",\n  'kappa': \"\\u03BA\",\n  'kappav': \"\\u03F0\",\n  'varkappa': \"\\u03F0\",\n  'kcedil': \"\\u0137\",\n  'kcy': \"\\u043A\",\n  'kfr': \"\\uD835\\uDD28\",\n  'kgreen': \"\\u0138\",\n  'khcy': \"\\u0445\",\n  'kjcy': \"\\u045C\",\n  'kopf': \"\\uD835\\uDD5C\",\n  'kscr': \"\\uD835\\uDCC0\",\n  'lAtail': \"\\u291B\",\n  'lBarr': \"\\u290E\",\n  'lEg': \"\\u2A8B\",\n  'lesseqqgtr': \"\\u2A8B\",\n  'lHar': \"\\u2962\",\n  'lacute': \"\\u013A\",\n  'laemptyv': \"\\u29B4\",\n  'lambda': \"\\u03BB\",\n  'langd': \"\\u2991\",\n  'lap': \"\\u2A85\",\n  'lessapprox': \"\\u2A85\",\n  'laquo': \"\\xAB\",\n  'larrbfs': \"\\u291F\",\n  'larrfs': \"\\u291D\",\n  'larrlp': \"\\u21AB\",\n  'looparrowleft': \"\\u21AB\",\n  'larrpl': \"\\u2939\",\n  'larrsim': \"\\u2973\",\n  'larrtl': \"\\u21A2\",\n  'leftarrowtail': \"\\u21A2\",\n  'lat': \"\\u2AAB\",\n  'latail': \"\\u2919\",\n  'late': \"\\u2AAD\",\n  'lates': \"\\u2AAD\\uFE00\",\n  'lbarr': \"\\u290C\",\n  'lbbrk': \"\\u2772\",\n  'lbrace': \"{\",\n  'lcub': \"{\",\n  'lbrack': \"[\",\n  'lsqb': \"[\",\n  'lbrke': \"\\u298B\",\n  'lbrksld': \"\\u298F\",\n  'lbrkslu': \"\\u298D\",\n  'lcaron': \"\\u013E\",\n  'lcedil': \"\\u013C\",\n  'lcy': \"\\u043B\",\n  'ldca': \"\\u2936\",\n  'ldrdhar': \"\\u2967\",\n  'ldrushar': \"\\u294B\",\n  'ldsh': \"\\u21B2\",\n  'le': \"\\u2264\",\n  'leq': \"\\u2264\",\n  'leftleftarrows': \"\\u21C7\",\n  'llarr': \"\\u21C7\",\n  'leftthreetimes': \"\\u22CB\",\n  'lthree': \"\\u22CB\",\n  'lescc': \"\\u2AA8\",\n  'lesdot': \"\\u2A7F\",\n  'lesdoto': \"\\u2A81\",\n  'lesdotor': \"\\u2A83\",\n  'lesg': \"\\u22DA\\uFE00\",\n  'lesges': \"\\u2A93\",\n  'lessdot': \"\\u22D6\",\n  'ltdot': \"\\u22D6\",\n  'lfisht': \"\\u297C\",\n  'lfr': \"\\uD835\\uDD29\",\n  'lgE': \"\\u2A91\",\n  'lharul': \"\\u296A\",\n  'lhblk': \"\\u2584\",\n  'ljcy': \"\\u0459\",\n  'llhard': \"\\u296B\",\n  'lltri': \"\\u25FA\",\n  'lmidot': \"\\u0140\",\n  'lmoust': \"\\u23B0\",\n  'lmoustache': \"\\u23B0\",\n  'lnE': \"\\u2268\",\n  'lneqq': \"\\u2268\",\n  'lnap': \"\\u2A89\",\n  'lnapprox': \"\\u2A89\",\n  'lne': \"\\u2A87\",\n  'lneq': \"\\u2A87\",\n  'lnsim': \"\\u22E6\",\n  'loang': \"\\u27EC\",\n  'loarr': \"\\u21FD\",\n  'longmapsto': \"\\u27FC\",\n  'xmap': \"\\u27FC\",\n  'looparrowright': \"\\u21AC\",\n  'rarrlp': \"\\u21AC\",\n  'lopar': \"\\u2985\",\n  'lopf': \"\\uD835\\uDD5D\",\n  'loplus': \"\\u2A2D\",\n  'lotimes': \"\\u2A34\",\n  'lowast': \"\\u2217\",\n  'loz': \"\\u25CA\",\n  'lozenge': \"\\u25CA\",\n  'lpar': \"(\",\n  'lparlt': \"\\u2993\",\n  'lrhard': \"\\u296D\",\n  'lrm': \"\\u200E\",\n  'lrtri': \"\\u22BF\",\n  'lsaquo': \"\\u2039\",\n  'lscr': \"\\uD835\\uDCC1\",\n  'lsime': \"\\u2A8D\",\n  'lsimg': \"\\u2A8F\",\n  'lsquor': \"\\u201A\",\n  'sbquo': \"\\u201A\",\n  'lstrok': \"\\u0142\",\n  'ltcc': \"\\u2AA6\",\n  'ltcir': \"\\u2A79\",\n  'ltimes': \"\\u22C9\",\n  'ltlarr': \"\\u2976\",\n  'ltquest': \"\\u2A7B\",\n  'ltrPar': \"\\u2996\",\n  'ltri': \"\\u25C3\",\n  'triangleleft': \"\\u25C3\",\n  'lurdshar': \"\\u294A\",\n  'luruhar': \"\\u2966\",\n  'lvertneqq': \"\\u2268\\uFE00\",\n  'lvnE': \"\\u2268\\uFE00\",\n  'mDDot': \"\\u223A\",\n  'macr': \"\\xAF\",\n  'strns': \"\\xAF\",\n  'male': \"\\u2642\",\n  'malt': \"\\u2720\",\n  'maltese': \"\\u2720\",\n  'marker': \"\\u25AE\",\n  'mcomma': \"\\u2A29\",\n  'mcy': \"\\u043C\",\n  'mdash': \"\\u2014\",\n  'mfr': \"\\uD835\\uDD2A\",\n  'mho': \"\\u2127\",\n  'micro': \"\\xB5\",\n  'midcir': \"\\u2AF0\",\n  'minus': \"\\u2212\",\n  'minusdu': \"\\u2A2A\",\n  'mlcp': \"\\u2ADB\",\n  'models': \"\\u22A7\",\n  'mopf': \"\\uD835\\uDD5E\",\n  'mscr': \"\\uD835\\uDCC2\",\n  'mu': \"\\u03BC\",\n  'multimap': \"\\u22B8\",\n  'mumap': \"\\u22B8\",\n  'nGg': \"\\u22D9\\u0338\",\n  'nGt': \"\\u226B\\u20D2\",\n  'nLeftarrow': \"\\u21CD\",\n  'nlArr': \"\\u21CD\",\n  'nLeftrightarrow': \"\\u21CE\",\n  'nhArr': \"\\u21CE\",\n  'nLl': \"\\u22D8\\u0338\",\n  'nLt': \"\\u226A\\u20D2\",\n  'nRightarrow': \"\\u21CF\",\n  'nrArr': \"\\u21CF\",\n  'nVDash': \"\\u22AF\",\n  'nVdash': \"\\u22AE\",\n  'nacute': \"\\u0144\",\n  'nang': \"\\u2220\\u20D2\",\n  'napE': \"\\u2A70\\u0338\",\n  'napid': \"\\u224B\\u0338\",\n  'napos': \"\\u0149\",\n  'natur': \"\\u266E\",\n  'natural': \"\\u266E\",\n  'ncap': \"\\u2A43\",\n  'ncaron': \"\\u0148\",\n  'ncedil': \"\\u0146\",\n  'ncongdot': \"\\u2A6D\\u0338\",\n  'ncup': \"\\u2A42\",\n  'ncy': \"\\u043D\",\n  'ndash': \"\\u2013\",\n  'neArr': \"\\u21D7\",\n  'nearhk': \"\\u2924\",\n  'nedot': \"\\u2250\\u0338\",\n  'nesear': \"\\u2928\",\n  'toea': \"\\u2928\",\n  'nfr': \"\\uD835\\uDD2B\",\n  'nharr': \"\\u21AE\",\n  'nleftrightarrow': \"\\u21AE\",\n  'nhpar': \"\\u2AF2\",\n  'nis': \"\\u22FC\",\n  'nisd': \"\\u22FA\",\n  'njcy': \"\\u045A\",\n  'nlE': \"\\u2266\\u0338\",\n  'nleqq': \"\\u2266\\u0338\",\n  'nlarr': \"\\u219A\",\n  'nleftarrow': \"\\u219A\",\n  'nldr': \"\\u2025\",\n  'nopf': \"\\uD835\\uDD5F\",\n  'not': \"\\xAC\",\n  'notinE': \"\\u22F9\\u0338\",\n  'notindot': \"\\u22F5\\u0338\",\n  'notinvb': \"\\u22F7\",\n  'notinvc': \"\\u22F6\",\n  'notnivb': \"\\u22FE\",\n  'notnivc': \"\\u22FD\",\n  'nparsl': \"\\u2AFD\\u20E5\",\n  'npart': \"\\u2202\\u0338\",\n  'npolint': \"\\u2A14\",\n  'nrarr': \"\\u219B\",\n  'nrightarrow': \"\\u219B\",\n  'nrarrc': \"\\u2933\\u0338\",\n  'nrarrw': \"\\u219D\\u0338\",\n  'nscr': \"\\uD835\\uDCC3\",\n  'nsub': \"\\u2284\",\n  'nsubE': \"\\u2AC5\\u0338\",\n  'nsubseteqq': \"\\u2AC5\\u0338\",\n  'nsup': \"\\u2285\",\n  'nsupE': \"\\u2AC6\\u0338\",\n  'nsupseteqq': \"\\u2AC6\\u0338\",\n  'ntilde': \"\\xF1\",\n  'nu': \"\\u03BD\",\n  'num': \"#\",\n  'numero': \"\\u2116\",\n  'numsp': \"\\u2007\",\n  'nvDash': \"\\u22AD\",\n  'nvHarr': \"\\u2904\",\n  'nvap': \"\\u224D\\u20D2\",\n  'nvdash': \"\\u22AC\",\n  'nvge': \"\\u2265\\u20D2\",\n  'nvgt': \">\\u20D2\",\n  'nvinfin': \"\\u29DE\",\n  'nvlArr': \"\\u2902\",\n  'nvle': \"\\u2264\\u20D2\",\n  'nvlt': \"<\\u20D2\",\n  'nvltrie': \"\\u22B4\\u20D2\",\n  'nvrArr': \"\\u2903\",\n  'nvrtrie': \"\\u22B5\\u20D2\",\n  'nvsim': \"\\u223C\\u20D2\",\n  'nwArr': \"\\u21D6\",\n  'nwarhk': \"\\u2923\",\n  'nwnear': \"\\u2927\",\n  'oacute': \"\\xF3\",\n  'ocirc': \"\\xF4\",\n  'ocy': \"\\u043E\",\n  'odblac': \"\\u0151\",\n  'odiv': \"\\u2A38\",\n  'odsold': \"\\u29BC\",\n  'oelig': \"\\u0153\",\n  'ofcir': \"\\u29BF\",\n  'ofr': \"\\uD835\\uDD2C\",\n  'ogon': \"\\u02DB\",\n  'ograve': \"\\xF2\",\n  'ogt': \"\\u29C1\",\n  'ohbar': \"\\u29B5\",\n  'olcir': \"\\u29BE\",\n  'olcross': \"\\u29BB\",\n  'olt': \"\\u29C0\",\n  'omacr': \"\\u014D\",\n  'omega': \"\\u03C9\",\n  'omicron': \"\\u03BF\",\n  'omid': \"\\u29B6\",\n  'oopf': \"\\uD835\\uDD60\",\n  'opar': \"\\u29B7\",\n  'operp': \"\\u29B9\",\n  'or': \"\\u2228\",\n  'vee': \"\\u2228\",\n  'ord': \"\\u2A5D\",\n  'order': \"\\u2134\",\n  'orderof': \"\\u2134\",\n  'oscr': \"\\u2134\",\n  'ordf': \"\\xAA\",\n  'ordm': \"\\xBA\",\n  'origof': \"\\u22B6\",\n  'oror': \"\\u2A56\",\n  'orslope': \"\\u2A57\",\n  'orv': \"\\u2A5B\",\n  'oslash': \"\\xF8\",\n  'osol': \"\\u2298\",\n  'otilde': \"\\xF5\",\n  'otimesas': \"\\u2A36\",\n  'ouml': \"\\xF6\",\n  'ovbar': \"\\u233D\",\n  'para': \"\\xB6\",\n  'parsim': \"\\u2AF3\",\n  'parsl': \"\\u2AFD\",\n  'pcy': \"\\u043F\",\n  'percnt': \"%\",\n  'period': \".\",\n  'permil': \"\\u2030\",\n  'pertenk': \"\\u2031\",\n  'pfr': \"\\uD835\\uDD2D\",\n  'phi': \"\\u03C6\",\n  'phiv': \"\\u03D5\",\n  'straightphi': \"\\u03D5\",\n  'varphi': \"\\u03D5\",\n  'phone': \"\\u260E\",\n  'pi': \"\\u03C0\",\n  'piv': \"\\u03D6\",\n  'varpi': \"\\u03D6\",\n  'planckh': \"\\u210E\",\n  'plus': \"+\",\n  'plusacir': \"\\u2A23\",\n  'pluscir': \"\\u2A22\",\n  'plusdu': \"\\u2A25\",\n  'pluse': \"\\u2A72\",\n  'plussim': \"\\u2A26\",\n  'plustwo': \"\\u2A27\",\n  'pointint': \"\\u2A15\",\n  'popf': \"\\uD835\\uDD61\",\n  'pound': \"\\xA3\",\n  'prE': \"\\u2AB3\",\n  'prap': \"\\u2AB7\",\n  'precapprox': \"\\u2AB7\",\n  'precnapprox': \"\\u2AB9\",\n  'prnap': \"\\u2AB9\",\n  'precneqq': \"\\u2AB5\",\n  'prnE': \"\\u2AB5\",\n  'precnsim': \"\\u22E8\",\n  'prnsim': \"\\u22E8\",\n  'prime': \"\\u2032\",\n  'profalar': \"\\u232E\",\n  'profline': \"\\u2312\",\n  'profsurf': \"\\u2313\",\n  'prurel': \"\\u22B0\",\n  'pscr': \"\\uD835\\uDCC5\",\n  'psi': \"\\u03C8\",\n  'puncsp': \"\\u2008\",\n  'qfr': \"\\uD835\\uDD2E\",\n  'qopf': \"\\uD835\\uDD62\",\n  'qprime': \"\\u2057\",\n  'qscr': \"\\uD835\\uDCC6\",\n  'quatint': \"\\u2A16\",\n  'quest': \"?\",\n  'rAtail': \"\\u291C\",\n  'rHar': \"\\u2964\",\n  'race': \"\\u223D\\u0331\",\n  'racute': \"\\u0155\",\n  'raemptyv': \"\\u29B3\",\n  'rangd': \"\\u2992\",\n  'range': \"\\u29A5\",\n  'raquo': \"\\xBB\",\n  'rarrap': \"\\u2975\",\n  'rarrbfs': \"\\u2920\",\n  'rarrc': \"\\u2933\",\n  'rarrfs': \"\\u291E\",\n  'rarrpl': \"\\u2945\",\n  'rarrsim': \"\\u2974\",\n  'rarrtl': \"\\u21A3\",\n  'rightarrowtail': \"\\u21A3\",\n  'rarrw': \"\\u219D\",\n  'rightsquigarrow': \"\\u219D\",\n  'ratail': \"\\u291A\",\n  'ratio': \"\\u2236\",\n  'rbbrk': \"\\u2773\",\n  'rbrace': \"}\",\n  'rcub': \"}\",\n  'rbrack': \"]\",\n  'rsqb': \"]\",\n  'rbrke': \"\\u298C\",\n  'rbrksld': \"\\u298E\",\n  'rbrkslu': \"\\u2990\",\n  'rcaron': \"\\u0159\",\n  'rcedil': \"\\u0157\",\n  'rcy': \"\\u0440\",\n  'rdca': \"\\u2937\",\n  'rdldhar': \"\\u2969\",\n  'rdsh': \"\\u21B3\",\n  'rect': \"\\u25AD\",\n  'rfisht': \"\\u297D\",\n  'rfr': \"\\uD835\\uDD2F\",\n  'rharul': \"\\u296C\",\n  'rho': \"\\u03C1\",\n  'rhov': \"\\u03F1\",\n  'varrho': \"\\u03F1\",\n  'rightrightarrows': \"\\u21C9\",\n  'rrarr': \"\\u21C9\",\n  'rightthreetimes': \"\\u22CC\",\n  'rthree': \"\\u22CC\",\n  'ring': \"\\u02DA\",\n  'rlm': \"\\u200F\",\n  'rmoust': \"\\u23B1\",\n  'rmoustache': \"\\u23B1\",\n  'rnmid': \"\\u2AEE\",\n  'roang': \"\\u27ED\",\n  'roarr': \"\\u21FE\",\n  'ropar': \"\\u2986\",\n  'ropf': \"\\uD835\\uDD63\",\n  'roplus': \"\\u2A2E\",\n  'rotimes': \"\\u2A35\",\n  'rpar': \")\",\n  'rpargt': \"\\u2994\",\n  'rppolint': \"\\u2A12\",\n  'rsaquo': \"\\u203A\",\n  'rscr': \"\\uD835\\uDCC7\",\n  'rtimes': \"\\u22CA\",\n  'rtri': \"\\u25B9\",\n  'triangleright': \"\\u25B9\",\n  'rtriltri': \"\\u29CE\",\n  'ruluhar': \"\\u2968\",\n  'rx': \"\\u211E\",\n  'sacute': \"\\u015B\",\n  'scE': \"\\u2AB4\",\n  'scap': \"\\u2AB8\",\n  'succapprox': \"\\u2AB8\",\n  'scaron': \"\\u0161\",\n  'scedil': \"\\u015F\",\n  'scirc': \"\\u015D\",\n  'scnE': \"\\u2AB6\",\n  'succneqq': \"\\u2AB6\",\n  'scnap': \"\\u2ABA\",\n  'succnapprox': \"\\u2ABA\",\n  'scnsim': \"\\u22E9\",\n  'succnsim': \"\\u22E9\",\n  'scpolint': \"\\u2A13\",\n  'scy': \"\\u0441\",\n  'sdot': \"\\u22C5\",\n  'sdote': \"\\u2A66\",\n  'seArr': \"\\u21D8\",\n  'sect': \"\\xA7\",\n  'semi': \";\",\n  'seswar': \"\\u2929\",\n  'tosa': \"\\u2929\",\n  'sext': \"\\u2736\",\n  'sfr': \"\\uD835\\uDD30\",\n  'sharp': \"\\u266F\",\n  'shchcy': \"\\u0449\",\n  'shcy': \"\\u0448\",\n  'shy': \"\\xAD\",\n  'sigma': \"\\u03C3\",\n  'sigmaf': \"\\u03C2\",\n  'sigmav': \"\\u03C2\",\n  'varsigma': \"\\u03C2\",\n  'simdot': \"\\u2A6A\",\n  'simg': \"\\u2A9E\",\n  'simgE': \"\\u2AA0\",\n  'siml': \"\\u2A9D\",\n  'simlE': \"\\u2A9F\",\n  'simne': \"\\u2246\",\n  'simplus': \"\\u2A24\",\n  'simrarr': \"\\u2972\",\n  'smashp': \"\\u2A33\",\n  'smeparsl': \"\\u29E4\",\n  'smile': \"\\u2323\",\n  'ssmile': \"\\u2323\",\n  'smt': \"\\u2AAA\",\n  'smte': \"\\u2AAC\",\n  'smtes': \"\\u2AAC\\uFE00\",\n  'softcy': \"\\u044C\",\n  'sol': \"/\",\n  'solb': \"\\u29C4\",\n  'solbar': \"\\u233F\",\n  'sopf': \"\\uD835\\uDD64\",\n  'spades': \"\\u2660\",\n  'spadesuit': \"\\u2660\",\n  'sqcaps': \"\\u2293\\uFE00\",\n  'sqcups': \"\\u2294\\uFE00\",\n  'sscr': \"\\uD835\\uDCC8\",\n  'star': \"\\u2606\",\n  'sub': \"\\u2282\",\n  'subset': \"\\u2282\",\n  'subE': \"\\u2AC5\",\n  'subseteqq': \"\\u2AC5\",\n  'subdot': \"\\u2ABD\",\n  'subedot': \"\\u2AC3\",\n  'submult': \"\\u2AC1\",\n  'subnE': \"\\u2ACB\",\n  'subsetneqq': \"\\u2ACB\",\n  'subne': \"\\u228A\",\n  'subsetneq': \"\\u228A\",\n  'subplus': \"\\u2ABF\",\n  'subrarr': \"\\u2979\",\n  'subsim': \"\\u2AC7\",\n  'subsub': \"\\u2AD5\",\n  'subsup': \"\\u2AD3\",\n  'sung': \"\\u266A\",\n  'sup1': \"\\xB9\",\n  'sup2': \"\\xB2\",\n  'sup3': \"\\xB3\",\n  'supE': \"\\u2AC6\",\n  'supseteqq': \"\\u2AC6\",\n  'supdot': \"\\u2ABE\",\n  'supdsub': \"\\u2AD8\",\n  'supedot': \"\\u2AC4\",\n  'suphsol': \"\\u27C9\",\n  'suphsub': \"\\u2AD7\",\n  'suplarr': \"\\u297B\",\n  'supmult': \"\\u2AC2\",\n  'supnE': \"\\u2ACC\",\n  'supsetneqq': \"\\u2ACC\",\n  'supne': \"\\u228B\",\n  'supsetneq': \"\\u228B\",\n  'supplus': \"\\u2AC0\",\n  'supsim': \"\\u2AC8\",\n  'supsub': \"\\u2AD4\",\n  'supsup': \"\\u2AD6\",\n  'swArr': \"\\u21D9\",\n  'swnwar': \"\\u292A\",\n  'szlig': \"\\xDF\",\n  'target': \"\\u2316\",\n  'tau': \"\\u03C4\",\n  'tcaron': \"\\u0165\",\n  'tcedil': \"\\u0163\",\n  'tcy': \"\\u0442\",\n  'telrec': \"\\u2315\",\n  'tfr': \"\\uD835\\uDD31\",\n  'theta': \"\\u03B8\",\n  'thetasym': \"\\u03D1\",\n  'thetav': \"\\u03D1\",\n  'vartheta': \"\\u03D1\",\n  'thorn': \"\\xFE\",\n  'times': \"\\xD7\",\n  'timesbar': \"\\u2A31\",\n  'timesd': \"\\u2A30\",\n  'topbot': \"\\u2336\",\n  'topcir': \"\\u2AF1\",\n  'topf': \"\\uD835\\uDD65\",\n  'topfork': \"\\u2ADA\",\n  'tprime': \"\\u2034\",\n  'triangle': \"\\u25B5\",\n  'utri': \"\\u25B5\",\n  'triangleq': \"\\u225C\",\n  'trie': \"\\u225C\",\n  'tridot': \"\\u25EC\",\n  'triminus': \"\\u2A3A\",\n  'triplus': \"\\u2A39\",\n  'trisb': \"\\u29CD\",\n  'tritime': \"\\u2A3B\",\n  'trpezium': \"\\u23E2\",\n  'tscr': \"\\uD835\\uDCC9\",\n  'tscy': \"\\u0446\",\n  'tshcy': \"\\u045B\",\n  'tstrok': \"\\u0167\",\n  'uHar': \"\\u2963\",\n  'uacute': \"\\xFA\",\n  'ubrcy': \"\\u045E\",\n  'ubreve': \"\\u016D\",\n  'ucirc': \"\\xFB\",\n  'ucy': \"\\u0443\",\n  'udblac': \"\\u0171\",\n  'ufisht': \"\\u297E\",\n  'ufr': \"\\uD835\\uDD32\",\n  'ugrave': \"\\xF9\",\n  'uhblk': \"\\u2580\",\n  'ulcorn': \"\\u231C\",\n  'ulcorner': \"\\u231C\",\n  'ulcrop': \"\\u230F\",\n  'ultri': \"\\u25F8\",\n  'umacr': \"\\u016B\",\n  'uogon': \"\\u0173\",\n  'uopf': \"\\uD835\\uDD66\",\n  'upsi': \"\\u03C5\",\n  'upsilon': \"\\u03C5\",\n  'upuparrows': \"\\u21C8\",\n  'uuarr': \"\\u21C8\",\n  'urcorn': \"\\u231D\",\n  'urcorner': \"\\u231D\",\n  'urcrop': \"\\u230E\",\n  'uring': \"\\u016F\",\n  'urtri': \"\\u25F9\",\n  'uscr': \"\\uD835\\uDCCA\",\n  'utdot': \"\\u22F0\",\n  'utilde': \"\\u0169\",\n  'uuml': \"\\xFC\",\n  'uwangle': \"\\u29A7\",\n  'vBar': \"\\u2AE8\",\n  'vBarv': \"\\u2AE9\",\n  'vangrt': \"\\u299C\",\n  'varsubsetneq': \"\\u228A\\uFE00\",\n  'vsubne': \"\\u228A\\uFE00\",\n  'varsubsetneqq': \"\\u2ACB\\uFE00\",\n  'vsubnE': \"\\u2ACB\\uFE00\",\n  'varsupsetneq': \"\\u228B\\uFE00\",\n  'vsupne': \"\\u228B\\uFE00\",\n  'varsupsetneqq': \"\\u2ACC\\uFE00\",\n  'vsupnE': \"\\u2ACC\\uFE00\",\n  'vcy': \"\\u0432\",\n  'veebar': \"\\u22BB\",\n  'veeeq': \"\\u225A\",\n  'vellip': \"\\u22EE\",\n  'vfr': \"\\uD835\\uDD33\",\n  'vopf': \"\\uD835\\uDD67\",\n  'vscr': \"\\uD835\\uDCCB\",\n  'vzigzag': \"\\u299A\",\n  'wcirc': \"\\u0175\",\n  'wedbar': \"\\u2A5F\",\n  'wedgeq': \"\\u2259\",\n  'weierp': \"\\u2118\",\n  'wp': \"\\u2118\",\n  'wfr': \"\\uD835\\uDD34\",\n  'wopf': \"\\uD835\\uDD68\",\n  'wscr': \"\\uD835\\uDCCC\",\n  'xfr': \"\\uD835\\uDD35\",\n  'xi': \"\\u03BE\",\n  'xnis': \"\\u22FB\",\n  'xopf': \"\\uD835\\uDD69\",\n  'xscr': \"\\uD835\\uDCCD\",\n  'yacute': \"\\xFD\",\n  'yacy': \"\\u044F\",\n  'ycirc': \"\\u0177\",\n  'ycy': \"\\u044B\",\n  'yen': \"\\xA5\",\n  'yfr': \"\\uD835\\uDD36\",\n  'yicy': \"\\u0457\",\n  'yopf': \"\\uD835\\uDD6A\",\n  'yscr': \"\\uD835\\uDCCE\",\n  'yucy': \"\\u044E\",\n  'yuml': \"\\xFF\",\n  'zacute': \"\\u017A\",\n  'zcaron': \"\\u017E\",\n  'zcy': \"\\u0437\",\n  'zdot': \"\\u017C\",\n  'zeta': \"\\u03B6\",\n  'zfr': \"\\uD835\\uDD37\",\n  'zhcy': \"\\u0436\",\n  'zigrarr': \"\\u21DD\",\n  'zopf': \"\\uD835\\uDD6B\",\n  'zscr': \"\\uD835\\uDCCF\",\n  'zwj': \"\\u200D\",\n  'zwnj': \"\\u200C\"\n}; // The &ngsp; pseudo-entity is denoting a space. see:\n// https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart\n\nvar NGSP_UNICODE = \"\\uE500\";\nNAMED_ENTITIES['ngsp'] = NGSP_UNICODE;\n/**\n * @license\n * Copyright Google LLC 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\nvar TokenError = /*#__PURE__*/function (_ParseError) {\n  _inherits(TokenError, _ParseError);\n\n  var _super87 = _createSuper(TokenError);\n\n  function TokenError(errorMsg, tokenType, span) {\n    var _this131;\n\n    _classCallCheck(this, TokenError);\n\n    _this131 = _super87.call(this, span, errorMsg);\n    _this131.tokenType = tokenType;\n    return _this131;\n  }\n\n  return _createClass(TokenError);\n}(ParseError);\n\nvar TokenizeResult = /*#__PURE__*/_createClass(function TokenizeResult(tokens, errors, nonNormalizedIcuExpressions) {\n  _classCallCheck(this, TokenizeResult);\n\n  this.tokens = tokens;\n  this.errors = errors;\n  this.nonNormalizedIcuExpressions = nonNormalizedIcuExpressions;\n});\n\nfunction tokenize(source, url, getTagDefinition) {\n  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  var tokenizer = new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, options);\n  tokenizer.tokenize();\n  return new TokenizeResult(mergeTextTokens(tokenizer.tokens), tokenizer.errors, tokenizer.nonNormalizedIcuExpressions);\n}\n\nvar _CR_OR_CRLF_REGEXP = /\\r\\n?/g;\n\nfunction _unexpectedCharacterErrorMsg(charCode) {\n  var char = charCode === $EOF ? 'EOF' : String.fromCharCode(charCode);\n  return \"Unexpected character \\\"\".concat(char, \"\\\"\");\n}\n\nfunction _unknownEntityErrorMsg(entitySrc) {\n  return \"Unknown entity \\\"\".concat(entitySrc, \"\\\" - use the \\\"&#<decimal>;\\\" or  \\\"&#x<hex>;\\\" syntax\");\n}\n\nfunction _unparsableEntityErrorMsg(type, entityStr) {\n  return \"Unable to parse entity \\\"\".concat(entityStr, \"\\\" - \").concat(type, \" character reference entities must end with \\\";\\\"\");\n}\n\nvar CharacterReferenceType = /*@__PURE__*/function (CharacterReferenceType) {\n  CharacterReferenceType[\"HEX\"] = \"hexadecimal\";\n  CharacterReferenceType[\"DEC\"] = \"decimal\";\n  return CharacterReferenceType;\n}({});\n\nvar _ControlFlowError = /*#__PURE__*/_createClass(function _ControlFlowError(error) {\n  _classCallCheck(this, _ControlFlowError);\n\n  this.error = error;\n}); // See https://www.w3.org/TR/html51/syntax.html#writing-html-documents\n\n\nvar _Tokenizer = /*#__PURE__*/function () {\n  /**\n   * @param _file The html source file being tokenized.\n   * @param _getTagDefinition A function that will retrieve a tag definition for a given tag name.\n   * @param options Configuration of the tokenization.\n   */\n  function _Tokenizer(_file, _getTagDefinition, options) {\n    _classCallCheck(this, _Tokenizer);\n\n    this._getTagDefinition = _getTagDefinition;\n    this._currentTokenStart = null;\n    this._currentTokenType = null;\n    this._expansionCaseStack = [];\n    this._inInterpolation = false;\n    this.tokens = [];\n    this.errors = [];\n    this.nonNormalizedIcuExpressions = [];\n    this._tokenizeIcu = options.tokenizeExpansionForms || false;\n    this._interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;\n    this._leadingTriviaCodePoints = options.leadingTriviaChars && options.leadingTriviaChars.map(function (c) {\n      return c.codePointAt(0) || 0;\n    });\n    var range = options.range || {\n      endPos: _file.content.length,\n      startPos: 0,\n      startLine: 0,\n      startCol: 0\n    };\n    this._cursor = options.escapedString ? new EscapedCharacterCursor(_file, range) : new PlainCharacterCursor(_file, range);\n    this._preserveLineEndings = options.preserveLineEndings || false;\n    this._escapedString = options.escapedString || false;\n    this._i18nNormalizeLineEndingsInICUs = options.i18nNormalizeLineEndingsInICUs || false;\n\n    try {\n      this._cursor.init();\n    } catch (e) {\n      this.handleError(e);\n    }\n  }\n\n  _createClass(_Tokenizer, [{\n    key: \"_processCarriageReturns\",\n    value: function _processCarriageReturns(content) {\n      if (this._preserveLineEndings) {\n        return content;\n      } // https://www.w3.org/TR/html51/syntax.html#preprocessing-the-input-stream\n      // In order to keep the original position in the source, we can not\n      // pre-process it.\n      // Instead CRs are processed right before instantiating the tokens.\n\n\n      return content.replace(_CR_OR_CRLF_REGEXP, '\\n');\n    }\n  }, {\n    key: \"tokenize\",\n    value: function tokenize() {\n      var _this132 = this;\n\n      while (this._cursor.peek() !== $EOF) {\n        var _start2 = this._cursor.clone();\n\n        try {\n          if (this._attemptCharCode($LT)) {\n            if (this._attemptCharCode($BANG)) {\n              if (this._attemptCharCode($LBRACKET)) {\n                this._consumeCdata(_start2);\n              } else if (this._attemptCharCode($MINUS)) {\n                this._consumeComment(_start2);\n              } else {\n                this._consumeDocType(_start2);\n              }\n            } else if (this._attemptCharCode($SLASH)) {\n              this._consumeTagClose(_start2);\n            } else {\n              this._consumeTagOpen(_start2);\n            }\n          } else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {\n            // In (possibly interpolated) text the end of the text is given by `isTextEnd()`, while\n            // the premature end of an interpolation is given by the start of a new HTML element.\n            this._consumeWithInterpolation(5\n            /* TEXT */\n            , 8\n            /* INTERPOLATION */\n            , function () {\n              return _this132._isTextEnd();\n            }, function () {\n              return _this132._isTagStart();\n            });\n          }\n        } catch (e) {\n          this.handleError(e);\n        }\n      }\n\n      this._beginToken(24\n      /* EOF */\n      );\n\n      this._endToken([]);\n    }\n    /**\n     * @returns whether an ICU token has been created\n     * @internal\n     */\n\n  }, {\n    key: \"_tokenizeExpansionForm\",\n    value: function _tokenizeExpansionForm() {\n      if (this.isExpansionFormStart()) {\n        this._consumeExpansionFormStart();\n\n        return true;\n      }\n\n      if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) {\n        this._consumeExpansionCaseStart();\n\n        return true;\n      }\n\n      if (this._cursor.peek() === $RBRACE) {\n        if (this._isInExpansionCase()) {\n          this._consumeExpansionCaseEnd();\n\n          return true;\n        }\n\n        if (this._isInExpansionForm()) {\n          this._consumeExpansionFormEnd();\n\n          return true;\n        }\n      }\n\n      return false;\n    }\n  }, {\n    key: \"_beginToken\",\n    value: function _beginToken(type) {\n      var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._cursor.clone();\n      this._currentTokenStart = start;\n      this._currentTokenType = type;\n    }\n  }, {\n    key: \"_endToken\",\n    value: function _endToken(parts, end) {\n      if (this._currentTokenStart === null) {\n        throw new TokenError('Programming error - attempted to end a token when there was no start to the token', this._currentTokenType, this._cursor.getSpan(end));\n      }\n\n      if (this._currentTokenType === null) {\n        throw new TokenError('Programming error - attempted to end a token which has no token type', null, this._cursor.getSpan(this._currentTokenStart));\n      }\n\n      var token = {\n        type: this._currentTokenType,\n        parts: parts,\n        sourceSpan: (end !== null && end !== void 0 ? end : this._cursor).getSpan(this._currentTokenStart, this._leadingTriviaCodePoints)\n      };\n      this.tokens.push(token);\n      this._currentTokenStart = null;\n      this._currentTokenType = null;\n      return token;\n    }\n  }, {\n    key: \"_createError\",\n    value: function _createError(msg, span) {\n      if (this._isInExpansionForm()) {\n        msg += \" (Do you have an unescaped \\\"{\\\" in your template? Use \\\"{{ '{' }}\\\") to escape it.)\";\n      }\n\n      var error = new TokenError(msg, this._currentTokenType, span);\n      this._currentTokenStart = null;\n      this._currentTokenType = null;\n      return new _ControlFlowError(error);\n    }\n  }, {\n    key: \"handleError\",\n    value: function handleError(e) {\n      if (e instanceof CursorError) {\n        e = this._createError(e.msg, this._cursor.getSpan(e.cursor));\n      }\n\n      if (e instanceof _ControlFlowError) {\n        this.errors.push(e.error);\n      } else {\n        throw e;\n      }\n    }\n  }, {\n    key: \"_attemptCharCode\",\n    value: function _attemptCharCode(charCode) {\n      if (this._cursor.peek() === charCode) {\n        this._cursor.advance();\n\n        return true;\n      }\n\n      return false;\n    }\n  }, {\n    key: \"_attemptCharCodeCaseInsensitive\",\n    value: function _attemptCharCodeCaseInsensitive(charCode) {\n      if (compareCharCodeCaseInsensitive(this._cursor.peek(), charCode)) {\n        this._cursor.advance();\n\n        return true;\n      }\n\n      return false;\n    }\n  }, {\n    key: \"_requireCharCode\",\n    value: function _requireCharCode(charCode) {\n      var location = this._cursor.clone();\n\n      if (!this._attemptCharCode(charCode)) {\n        throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));\n      }\n    }\n  }, {\n    key: \"_attemptStr\",\n    value: function _attemptStr(chars) {\n      var len = chars.length;\n\n      if (this._cursor.charsLeft() < len) {\n        return false;\n      }\n\n      var initialPosition = this._cursor.clone();\n\n      for (var i = 0; i < len; i++) {\n        if (!this._attemptCharCode(chars.charCodeAt(i))) {\n          // If attempting to parse the string fails, we want to reset the parser\n          // to where it was before the attempt\n          this._cursor = initialPosition;\n          return false;\n        }\n      }\n\n      return true;\n    }\n  }, {\n    key: \"_attemptStrCaseInsensitive\",\n    value: function _attemptStrCaseInsensitive(chars) {\n      for (var i = 0; i < chars.length; i++) {\n        if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {\n          return false;\n        }\n      }\n\n      return true;\n    }\n  }, {\n    key: \"_requireStr\",\n    value: function _requireStr(chars) {\n      var location = this._cursor.clone();\n\n      if (!this._attemptStr(chars)) {\n        throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));\n      }\n    }\n  }, {\n    key: \"_attemptCharCodeUntilFn\",\n    value: function _attemptCharCodeUntilFn(predicate) {\n      while (!predicate(this._cursor.peek())) {\n        this._cursor.advance();\n      }\n    }\n  }, {\n    key: \"_requireCharCodeUntilFn\",\n    value: function _requireCharCodeUntilFn(predicate, len) {\n      var start = this._cursor.clone();\n\n      this._attemptCharCodeUntilFn(predicate);\n\n      if (this._cursor.diff(start) < len) {\n        throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));\n      }\n    }\n  }, {\n    key: \"_attemptUntilChar\",\n    value: function _attemptUntilChar(char) {\n      while (this._cursor.peek() !== char) {\n        this._cursor.advance();\n      }\n    }\n  }, {\n    key: \"_readChar\",\n    value: function _readChar() {\n      // Don't rely upon reading directly from `_input` as the actual char value\n      // may have been generated from an escape sequence.\n      var char = String.fromCodePoint(this._cursor.peek());\n\n      this._cursor.advance();\n\n      return char;\n    }\n  }, {\n    key: \"_consumeEntity\",\n    value: function _consumeEntity(textTokenType) {\n      this._beginToken(9\n      /* ENCODED_ENTITY */\n      );\n\n      var start = this._cursor.clone();\n\n      this._cursor.advance();\n\n      if (this._attemptCharCode($HASH)) {\n        var isHex = this._attemptCharCode($x) || this._attemptCharCode($X);\n\n        var codeStart = this._cursor.clone();\n\n        this._attemptCharCodeUntilFn(isDigitEntityEnd);\n\n        if (this._cursor.peek() != $SEMICOLON) {\n          // Advance cursor to include the peeked character in the string provided to the error\n          // message.\n          this._cursor.advance();\n\n          var entityType = isHex ? CharacterReferenceType.HEX : CharacterReferenceType.DEC;\n          throw this._createError(_unparsableEntityErrorMsg(entityType, this._cursor.getChars(start)), this._cursor.getSpan());\n        }\n\n        var strNum = this._cursor.getChars(codeStart);\n\n        this._cursor.advance();\n\n        try {\n          var charCode = parseInt(strNum, isHex ? 16 : 10);\n\n          this._endToken([String.fromCharCode(charCode), this._cursor.getChars(start)]);\n        } catch (_a) {\n          throw this._createError(_unknownEntityErrorMsg(this._cursor.getChars(start)), this._cursor.getSpan());\n        }\n      } else {\n        var nameStart = this._cursor.clone();\n\n        this._attemptCharCodeUntilFn(isNamedEntityEnd);\n\n        if (this._cursor.peek() != $SEMICOLON) {\n          // No semicolon was found so abort the encoded entity token that was in progress, and treat\n          // this as a text token\n          this._beginToken(textTokenType, start);\n\n          this._cursor = nameStart;\n\n          this._endToken(['&']);\n        } else {\n          var name = this._cursor.getChars(nameStart);\n\n          this._cursor.advance();\n\n          var char = NAMED_ENTITIES[name];\n\n          if (!char) {\n            throw this._createError(_unknownEntityErrorMsg(name), this._cursor.getSpan(start));\n          }\n\n          this._endToken([char, \"&\".concat(name, \";\")]);\n        }\n      }\n    }\n  }, {\n    key: \"_consumeRawText\",\n    value: function _consumeRawText(consumeEntities, endMarkerPredicate) {\n      this._beginToken(consumeEntities ? 6\n      /* ESCAPABLE_RAW_TEXT */\n      : 7\n      /* RAW_TEXT */\n      );\n\n      var parts = [];\n\n      while (true) {\n        var tagCloseStart = this._cursor.clone();\n\n        var foundEndMarker = endMarkerPredicate();\n        this._cursor = tagCloseStart;\n\n        if (foundEndMarker) {\n          break;\n        }\n\n        if (consumeEntities && this._cursor.peek() === $AMPERSAND) {\n          this._endToken([this._processCarriageReturns(parts.join(''))]);\n\n          parts.length = 0;\n\n          this._consumeEntity(6\n          /* ESCAPABLE_RAW_TEXT */\n          );\n\n          this._beginToken(6\n          /* ESCAPABLE_RAW_TEXT */\n          );\n        } else {\n          parts.push(this._readChar());\n        }\n      }\n\n      this._endToken([this._processCarriageReturns(parts.join(''))]);\n    }\n  }, {\n    key: \"_consumeComment\",\n    value: function _consumeComment(start) {\n      var _this133 = this;\n\n      this._beginToken(10\n      /* COMMENT_START */\n      , start);\n\n      this._requireCharCode($MINUS);\n\n      this._endToken([]);\n\n      this._consumeRawText(false, function () {\n        return _this133._attemptStr('-->');\n      });\n\n      this._beginToken(11\n      /* COMMENT_END */\n      );\n\n      this._requireStr('-->');\n\n      this._endToken([]);\n    }\n  }, {\n    key: \"_consumeCdata\",\n    value: function _consumeCdata(start) {\n      var _this134 = this;\n\n      this._beginToken(12\n      /* CDATA_START */\n      , start);\n\n      this._requireStr('CDATA[');\n\n      this._endToken([]);\n\n      this._consumeRawText(false, function () {\n        return _this134._attemptStr(']]>');\n      });\n\n      this._beginToken(13\n      /* CDATA_END */\n      );\n\n      this._requireStr(']]>');\n\n      this._endToken([]);\n    }\n  }, {\n    key: \"_consumeDocType\",\n    value: function _consumeDocType(start) {\n      this._beginToken(18\n      /* DOC_TYPE */\n      , start);\n\n      var contentStart = this._cursor.clone();\n\n      this._attemptUntilChar($GT);\n\n      var content = this._cursor.getChars(contentStart);\n\n      this._cursor.advance();\n\n      this._endToken([content]);\n    }\n  }, {\n    key: \"_consumePrefixAndName\",\n    value: function _consumePrefixAndName() {\n      var nameOrPrefixStart = this._cursor.clone();\n\n      var prefix = '';\n\n      while (this._cursor.peek() !== $COLON && !isPrefixEnd(this._cursor.peek())) {\n        this._cursor.advance();\n      }\n\n      var nameStart;\n\n      if (this._cursor.peek() === $COLON) {\n        prefix = this._cursor.getChars(nameOrPrefixStart);\n\n        this._cursor.advance();\n\n        nameStart = this._cursor.clone();\n      } else {\n        nameStart = nameOrPrefixStart;\n      }\n\n      this._requireCharCodeUntilFn(isNameEnd, prefix === '' ? 0 : 1);\n\n      var name = this._cursor.getChars(nameStart);\n\n      return [prefix, name];\n    }\n  }, {\n    key: \"_consumeTagOpen\",\n    value: function _consumeTagOpen(start) {\n      var tagName;\n      var prefix;\n      var openTagToken;\n\n      try {\n        if (!isAsciiLetter(this._cursor.peek())) {\n          throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));\n        }\n\n        openTagToken = this._consumeTagOpenStart(start);\n        prefix = openTagToken.parts[0];\n        tagName = openTagToken.parts[1];\n\n        this._attemptCharCodeUntilFn(isNotWhitespace);\n\n        while (this._cursor.peek() !== $SLASH && this._cursor.peek() !== $GT && this._cursor.peek() !== $LT && this._cursor.peek() !== $EOF) {\n          this._consumeAttributeName();\n\n          this._attemptCharCodeUntilFn(isNotWhitespace);\n\n          if (this._attemptCharCode($EQ)) {\n            this._attemptCharCodeUntilFn(isNotWhitespace);\n\n            this._consumeAttributeValue();\n          }\n\n          this._attemptCharCodeUntilFn(isNotWhitespace);\n        }\n\n        this._consumeTagOpenEnd();\n      } catch (e) {\n        if (e instanceof _ControlFlowError) {\n          if (openTagToken) {\n            // We errored before we could close the opening tag, so it is incomplete.\n            openTagToken.type = 4\n            /* INCOMPLETE_TAG_OPEN */\n            ;\n          } else {\n            // When the start tag is invalid, assume we want a \"<\" as text.\n            // Back to back text tokens are merged at the end.\n            this._beginToken(5\n            /* TEXT */\n            , start);\n\n            this._endToken(['<']);\n          }\n\n          return;\n        }\n\n        throw e;\n      }\n\n      var contentTokenType = this._getTagDefinition(tagName).getContentType(prefix);\n\n      if (contentTokenType === TagContentType.RAW_TEXT) {\n        this._consumeRawTextWithTagClose(prefix, tagName, false);\n      } else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) {\n        this._consumeRawTextWithTagClose(prefix, tagName, true);\n      }\n    }\n  }, {\n    key: \"_consumeRawTextWithTagClose\",\n    value: function _consumeRawTextWithTagClose(prefix, tagName, consumeEntities) {\n      var _this135 = this;\n\n      this._consumeRawText(consumeEntities, function () {\n        if (!_this135._attemptCharCode($LT)) return false;\n        if (!_this135._attemptCharCode($SLASH)) return false;\n\n        _this135._attemptCharCodeUntilFn(isNotWhitespace);\n\n        if (!_this135._attemptStrCaseInsensitive(tagName)) return false;\n\n        _this135._attemptCharCodeUntilFn(isNotWhitespace);\n\n        return _this135._attemptCharCode($GT);\n      });\n\n      this._beginToken(3\n      /* TAG_CLOSE */\n      );\n\n      this._requireCharCodeUntilFn(function (code) {\n        return code === $GT;\n      }, 3);\n\n      this._cursor.advance(); // Consume the `>`\n\n\n      this._endToken([prefix, tagName]);\n    }\n  }, {\n    key: \"_consumeTagOpenStart\",\n    value: function _consumeTagOpenStart(start) {\n      this._beginToken(0\n      /* TAG_OPEN_START */\n      , start);\n\n      var parts = this._consumePrefixAndName();\n\n      return this._endToken(parts);\n    }\n  }, {\n    key: \"_consumeAttributeName\",\n    value: function _consumeAttributeName() {\n      var attrNameStart = this._cursor.peek();\n\n      if (attrNameStart === $SQ || attrNameStart === $DQ) {\n        throw this._createError(_unexpectedCharacterErrorMsg(attrNameStart), this._cursor.getSpan());\n      }\n\n      this._beginToken(14\n      /* ATTR_NAME */\n      );\n\n      var prefixAndName = this._consumePrefixAndName();\n\n      this._endToken(prefixAndName);\n    }\n  }, {\n    key: \"_consumeAttributeValue\",\n    value: function _consumeAttributeValue() {\n      var _this136 = this;\n\n      var value;\n\n      if (this._cursor.peek() === $SQ || this._cursor.peek() === $DQ) {\n        var quoteChar = this._cursor.peek();\n\n        this._consumeQuote(quoteChar); // In an attribute then end of the attribute value and the premature end to an interpolation\n        // are both triggered by the `quoteChar`.\n\n\n        var endPredicate = function endPredicate() {\n          return _this136._cursor.peek() === quoteChar;\n        };\n\n        this._consumeWithInterpolation(16\n        /* ATTR_VALUE_TEXT */\n        , 17\n        /* ATTR_VALUE_INTERPOLATION */\n        , endPredicate, endPredicate);\n\n        this._consumeQuote(quoteChar);\n      } else {\n        var _endPredicate = function _endPredicate() {\n          return isNameEnd(_this136._cursor.peek());\n        };\n\n        this._consumeWithInterpolation(16\n        /* ATTR_VALUE_TEXT */\n        , 17\n        /* ATTR_VALUE_INTERPOLATION */\n        , _endPredicate, _endPredicate);\n      }\n    }\n  }, {\n    key: \"_consumeQuote\",\n    value: function _consumeQuote(quoteChar) {\n      this._beginToken(15\n      /* ATTR_QUOTE */\n      );\n\n      this._requireCharCode(quoteChar);\n\n      this._endToken([String.fromCodePoint(quoteChar)]);\n    }\n  }, {\n    key: \"_consumeTagOpenEnd\",\n    value: function _consumeTagOpenEnd() {\n      var tokenType = this._attemptCharCode($SLASH) ? 2\n      /* TAG_OPEN_END_VOID */\n      : 1\n      /* TAG_OPEN_END */\n      ;\n\n      this._beginToken(tokenType);\n\n      this._requireCharCode($GT);\n\n      this._endToken([]);\n    }\n  }, {\n    key: \"_consumeTagClose\",\n    value: function _consumeTagClose(start) {\n      this._beginToken(3\n      /* TAG_CLOSE */\n      , start);\n\n      this._attemptCharCodeUntilFn(isNotWhitespace);\n\n      var prefixAndName = this._consumePrefixAndName();\n\n      this._attemptCharCodeUntilFn(isNotWhitespace);\n\n      this._requireCharCode($GT);\n\n      this._endToken(prefixAndName);\n    }\n  }, {\n    key: \"_consumeExpansionFormStart\",\n    value: function _consumeExpansionFormStart() {\n      this._beginToken(19\n      /* EXPANSION_FORM_START */\n      );\n\n      this._requireCharCode($LBRACE);\n\n      this._endToken([]);\n\n      this._expansionCaseStack.push(19\n      /* EXPANSION_FORM_START */\n      );\n\n      this._beginToken(7\n      /* RAW_TEXT */\n      );\n\n      var condition = this._readUntil($COMMA);\n\n      var normalizedCondition = this._processCarriageReturns(condition);\n\n      if (this._i18nNormalizeLineEndingsInICUs) {\n        // We explicitly want to normalize line endings for this text.\n        this._endToken([normalizedCondition]);\n      } else {\n        // We are not normalizing line endings.\n        var conditionToken = this._endToken([condition]);\n\n        if (normalizedCondition !== condition) {\n          this.nonNormalizedIcuExpressions.push(conditionToken);\n        }\n      }\n\n      this._requireCharCode($COMMA);\n\n      this._attemptCharCodeUntilFn(isNotWhitespace);\n\n      this._beginToken(7\n      /* RAW_TEXT */\n      );\n\n      var type = this._readUntil($COMMA);\n\n      this._endToken([type]);\n\n      this._requireCharCode($COMMA);\n\n      this._attemptCharCodeUntilFn(isNotWhitespace);\n    }\n  }, {\n    key: \"_consumeExpansionCaseStart\",\n    value: function _consumeExpansionCaseStart() {\n      this._beginToken(20\n      /* EXPANSION_CASE_VALUE */\n      );\n\n      var value = this._readUntil($LBRACE).trim();\n\n      this._endToken([value]);\n\n      this._attemptCharCodeUntilFn(isNotWhitespace);\n\n      this._beginToken(21\n      /* EXPANSION_CASE_EXP_START */\n      );\n\n      this._requireCharCode($LBRACE);\n\n      this._endToken([]);\n\n      this._attemptCharCodeUntilFn(isNotWhitespace);\n\n      this._expansionCaseStack.push(21\n      /* EXPANSION_CASE_EXP_START */\n      );\n    }\n  }, {\n    key: \"_consumeExpansionCaseEnd\",\n    value: function _consumeExpansionCaseEnd() {\n      this._beginToken(22\n      /* EXPANSION_CASE_EXP_END */\n      );\n\n      this._requireCharCode($RBRACE);\n\n      this._endToken([]);\n\n      this._attemptCharCodeUntilFn(isNotWhitespace);\n\n      this._expansionCaseStack.pop();\n    }\n  }, {\n    key: \"_consumeExpansionFormEnd\",\n    value: function _consumeExpansionFormEnd() {\n      this._beginToken(23\n      /* EXPANSION_FORM_END */\n      );\n\n      this._requireCharCode($RBRACE);\n\n      this._endToken([]);\n\n      this._expansionCaseStack.pop();\n    }\n    /**\n     * Consume a string that may contain interpolation expressions.\n     *\n     * The first token consumed will be of `tokenType` and then there will be alternating\n     * `interpolationTokenType` and `tokenType` tokens until the `endPredicate()` returns true.\n     *\n     * If an interpolation token ends prematurely it will have no end marker in its `parts` array.\n     *\n     * @param textTokenType the kind of tokens to interleave around interpolation tokens.\n     * @param interpolationTokenType the kind of tokens that contain interpolation.\n     * @param endPredicate a function that should return true when we should stop consuming.\n     * @param endInterpolation a function that should return true if there is a premature end to an\n     *     interpolation expression - i.e. before we get to the normal interpolation closing marker.\n     */\n\n  }, {\n    key: \"_consumeWithInterpolation\",\n    value: function _consumeWithInterpolation(textTokenType, interpolationTokenType, endPredicate, endInterpolation) {\n      this._beginToken(textTokenType);\n\n      var parts = [];\n\n      while (!endPredicate()) {\n        var current = this._cursor.clone();\n\n        if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {\n          this._endToken([this._processCarriageReturns(parts.join(''))], current);\n\n          parts.length = 0;\n\n          this._consumeInterpolation(interpolationTokenType, current, endInterpolation);\n\n          this._beginToken(textTokenType);\n        } else if (this._cursor.peek() === $AMPERSAND) {\n          this._endToken([this._processCarriageReturns(parts.join(''))]);\n\n          parts.length = 0;\n\n          this._consumeEntity(textTokenType);\n\n          this._beginToken(textTokenType);\n        } else {\n          parts.push(this._readChar());\n        }\n      } // It is possible that an interpolation was started but not ended inside this text token.\n      // Make sure that we reset the state of the lexer correctly.\n\n\n      this._inInterpolation = false;\n\n      this._endToken([this._processCarriageReturns(parts.join(''))]);\n    }\n    /**\n     * Consume a block of text that has been interpreted as an Angular interpolation.\n     *\n     * @param interpolationTokenType the type of the interpolation token to generate.\n     * @param interpolationStart a cursor that points to the start of this interpolation.\n     * @param prematureEndPredicate a function that should return true if the next characters indicate\n     *     an end to the interpolation before its normal closing marker.\n     */\n\n  }, {\n    key: \"_consumeInterpolation\",\n    value: function _consumeInterpolation(interpolationTokenType, interpolationStart, prematureEndPredicate) {\n      var parts = [];\n\n      this._beginToken(interpolationTokenType, interpolationStart);\n\n      parts.push(this._interpolationConfig.start); // Find the end of the interpolation, ignoring content inside quotes.\n\n      var expressionStart = this._cursor.clone();\n\n      var inQuote = null;\n      var inComment = false;\n\n      while (this._cursor.peek() !== $EOF && (prematureEndPredicate === null || !prematureEndPredicate())) {\n        var current = this._cursor.clone();\n\n        if (this._isTagStart()) {\n          // We are starting what looks like an HTML element in the middle of this interpolation.\n          // Reset the cursor to before the `<` character and end the interpolation token.\n          // (This is actually wrong but here for backward compatibility).\n          this._cursor = current;\n          parts.push(this._getProcessedChars(expressionStart, current));\n\n          this._endToken(parts);\n\n          return;\n        }\n\n        if (inQuote === null) {\n          if (this._attemptStr(this._interpolationConfig.end)) {\n            // We are not in a string, and we hit the end interpolation marker\n            parts.push(this._getProcessedChars(expressionStart, current));\n            parts.push(this._interpolationConfig.end);\n\n            this._endToken(parts);\n\n            return;\n          } else if (this._attemptStr('//')) {\n            // Once we are in a comment we ignore any quotes\n            inComment = true;\n          }\n        }\n\n        var char = this._cursor.peek();\n\n        this._cursor.advance();\n\n        if (char === $BACKSLASH) {\n          // Skip the next character because it was escaped.\n          this._cursor.advance();\n        } else if (char === inQuote) {\n          // Exiting the current quoted string\n          inQuote = null;\n        } else if (!inComment && inQuote === null && isQuote(char)) {\n          // Entering a new quoted string\n          inQuote = char;\n        }\n      } // We hit EOF without finding a closing interpolation marker\n\n\n      parts.push(this._getProcessedChars(expressionStart, this._cursor));\n\n      this._endToken(parts);\n    }\n  }, {\n    key: \"_getProcessedChars\",\n    value: function _getProcessedChars(start, end) {\n      return this._processCarriageReturns(end.getChars(start));\n    }\n  }, {\n    key: \"_isTextEnd\",\n    value: function _isTextEnd() {\n      if (this._isTagStart() || this._cursor.peek() === $EOF) {\n        return true;\n      }\n\n      if (this._tokenizeIcu && !this._inInterpolation) {\n        if (this.isExpansionFormStart()) {\n          // start of an expansion form\n          return true;\n        }\n\n        if (this._cursor.peek() === $RBRACE && this._isInExpansionCase()) {\n          // end of and expansion case\n          return true;\n        }\n      }\n\n      return false;\n    }\n    /**\n     * Returns true if the current cursor is pointing to the start of a tag\n     * (opening/closing/comments/cdata/etc).\n     */\n\n  }, {\n    key: \"_isTagStart\",\n    value: function _isTagStart() {\n      if (this._cursor.peek() === $LT) {\n        // We assume that `<` followed by whitespace is not the start of an HTML element.\n        var tmp = this._cursor.clone();\n\n        tmp.advance(); // If the next character is alphabetic, ! nor / then it is a tag start\n\n        var code = tmp.peek();\n\n        if ($a <= code && code <= $z || $A <= code && code <= $Z || code === $SLASH || code === $BANG) {\n          return true;\n        }\n      }\n\n      return false;\n    }\n  }, {\n    key: \"_readUntil\",\n    value: function _readUntil(char) {\n      var start = this._cursor.clone();\n\n      this._attemptUntilChar(char);\n\n      return this._cursor.getChars(start);\n    }\n  }, {\n    key: \"_isInExpansionCase\",\n    value: function _isInExpansionCase() {\n      return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 21\n      /* EXPANSION_CASE_EXP_START */\n      ;\n    }\n  }, {\n    key: \"_isInExpansionForm\",\n    value: function _isInExpansionForm() {\n      return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 19\n      /* EXPANSION_FORM_START */\n      ;\n    }\n  }, {\n    key: \"isExpansionFormStart\",\n    value: function isExpansionFormStart() {\n      if (this._cursor.peek() !== $LBRACE) {\n        return false;\n      }\n\n      if (this._interpolationConfig) {\n        var _start3 = this._cursor.clone();\n\n        var isInterpolation = this._attemptStr(this._interpolationConfig.start);\n\n        this._cursor = _start3;\n        return !isInterpolation;\n      }\n\n      return true;\n    }\n  }]);\n\n  return _Tokenizer;\n}();\n\nfunction isNotWhitespace(code) {\n  return !isWhitespace(code) || code === $EOF;\n}\n\nfunction isNameEnd(code) {\n  return isWhitespace(code) || code === $GT || code === $LT || code === $SLASH || code === $SQ || code === $DQ || code === $EQ || code === $EOF;\n}\n\nfunction isPrefixEnd(code) {\n  return (code < $a || $z < code) && (code < $A || $Z < code) && (code < $0 || code > $9);\n}\n\nfunction isDigitEntityEnd(code) {\n  return code === $SEMICOLON || code === $EOF || !isAsciiHexDigit(code);\n}\n\nfunction isNamedEntityEnd(code) {\n  return code === $SEMICOLON || code === $EOF || !isAsciiLetter(code);\n}\n\nfunction isExpansionCaseStart(peek) {\n  return peek !== $RBRACE;\n}\n\nfunction compareCharCodeCaseInsensitive(code1, code2) {\n  return toUpperCaseCharCode(code1) === toUpperCaseCharCode(code2);\n}\n\nfunction toUpperCaseCharCode(code) {\n  return code >= $a && code <= $z ? code - $a + $A : code;\n}\n\nfunction mergeTextTokens(srcTokens) {\n  var dstTokens = [];\n  var lastDstToken = undefined;\n\n  for (var i = 0; i < srcTokens.length; i++) {\n    var token = srcTokens[i];\n\n    if (lastDstToken && lastDstToken.type === 5\n    /* TEXT */\n    && token.type === 5\n    /* TEXT */\n    || lastDstToken && lastDstToken.type === 16\n    /* ATTR_VALUE_TEXT */\n    && token.type === 16\n    /* ATTR_VALUE_TEXT */\n    ) {\n      lastDstToken.parts[0] += token.parts[0];\n      lastDstToken.sourceSpan.end = token.sourceSpan.end;\n    } else {\n      lastDstToken = token;\n      dstTokens.push(lastDstToken);\n    }\n  }\n\n  return dstTokens;\n}\n\nvar PlainCharacterCursor = /*#__PURE__*/function () {\n  function PlainCharacterCursor(fileOrCursor, range) {\n    _classCallCheck(this, PlainCharacterCursor);\n\n    if (fileOrCursor instanceof PlainCharacterCursor) {\n      this.file = fileOrCursor.file;\n      this.input = fileOrCursor.input;\n      this.end = fileOrCursor.end;\n      var state = fileOrCursor.state; // Note: avoid using `{...fileOrCursor.state}` here as that has a severe performance penalty.\n      // In ES5 bundles the object spread operator is translated into the `__assign` helper, which\n      // is not optimized by VMs as efficiently as a raw object literal. Since this constructor is\n      // called in tight loops, this difference matters.\n\n      this.state = {\n        peek: state.peek,\n        offset: state.offset,\n        line: state.line,\n        column: state.column\n      };\n    } else {\n      if (!range) {\n        throw new Error('Programming error: the range argument must be provided with a file argument.');\n      }\n\n      this.file = fileOrCursor;\n      this.input = fileOrCursor.content;\n      this.end = range.endPos;\n      this.state = {\n        peek: -1,\n        offset: range.startPos,\n        line: range.startLine,\n        column: range.startCol\n      };\n    }\n  }\n\n  _createClass(PlainCharacterCursor, [{\n    key: \"clone\",\n    value: function clone() {\n      return new PlainCharacterCursor(this);\n    }\n  }, {\n    key: \"peek\",\n    value: function peek() {\n      return this.state.peek;\n    }\n  }, {\n    key: \"charsLeft\",\n    value: function charsLeft() {\n      return this.end - this.state.offset;\n    }\n  }, {\n    key: \"diff\",\n    value: function diff(other) {\n      return this.state.offset - other.state.offset;\n    }\n  }, {\n    key: \"advance\",\n    value: function advance() {\n      this.advanceState(this.state);\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      this.updatePeek(this.state);\n    }\n  }, {\n    key: \"getSpan\",\n    value: function getSpan(start, leadingTriviaCodePoints) {\n      start = start || this;\n      var fullStart = start;\n\n      if (leadingTriviaCodePoints) {\n        while (this.diff(start) > 0 && leadingTriviaCodePoints.indexOf(start.peek()) !== -1) {\n          if (fullStart === start) {\n            start = start.clone();\n          }\n\n          start.advance();\n        }\n      }\n\n      var startLocation = this.locationFromCursor(start);\n      var endLocation = this.locationFromCursor(this);\n      var fullStartLocation = fullStart !== start ? this.locationFromCursor(fullStart) : startLocation;\n      return new ParseSourceSpan(startLocation, endLocation, fullStartLocation);\n    }\n  }, {\n    key: \"getChars\",\n    value: function getChars(start) {\n      return this.input.substring(start.state.offset, this.state.offset);\n    }\n  }, {\n    key: \"charAt\",\n    value: function charAt(pos) {\n      return this.input.charCodeAt(pos);\n    }\n  }, {\n    key: \"advanceState\",\n    value: function advanceState(state) {\n      if (state.offset >= this.end) {\n        this.state = state;\n        throw new CursorError('Unexpected character \"EOF\"', this);\n      }\n\n      var currentChar = this.charAt(state.offset);\n\n      if (currentChar === $LF) {\n        state.line++;\n        state.column = 0;\n      } else if (!isNewLine(currentChar)) {\n        state.column++;\n      }\n\n      state.offset++;\n      this.updatePeek(state);\n    }\n  }, {\n    key: \"updatePeek\",\n    value: function updatePeek(state) {\n      state.peek = state.offset >= this.end ? $EOF : this.charAt(state.offset);\n    }\n  }, {\n    key: \"locationFromCursor\",\n    value: function locationFromCursor(cursor) {\n      return new ParseLocation(cursor.file, cursor.state.offset, cursor.state.line, cursor.state.column);\n    }\n  }]);\n\n  return PlainCharacterCursor;\n}();\n\nvar EscapedCharacterCursor = /*#__PURE__*/function (_PlainCharacterCursor) {\n  _inherits(EscapedCharacterCursor, _PlainCharacterCursor);\n\n  var _super88 = _createSuper(EscapedCharacterCursor);\n\n  function EscapedCharacterCursor(fileOrCursor, range) {\n    var _this137;\n\n    _classCallCheck(this, EscapedCharacterCursor);\n\n    if (fileOrCursor instanceof EscapedCharacterCursor) {\n      _this137 = _super88.call(this, fileOrCursor);\n      _this137.internalState = Object.assign({}, fileOrCursor.internalState);\n    } else {\n      _this137 = _super88.call(this, fileOrCursor, range);\n      _this137.internalState = _this137.state;\n    }\n\n    return _possibleConstructorReturn(_this137);\n  }\n\n  _createClass(EscapedCharacterCursor, [{\n    key: \"advance\",\n    value: function advance() {\n      this.state = this.internalState;\n\n      _get(_getPrototypeOf(EscapedCharacterCursor.prototype), \"advance\", this).call(this);\n\n      this.processEscapeSequence();\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      _get(_getPrototypeOf(EscapedCharacterCursor.prototype), \"init\", this).call(this);\n\n      this.processEscapeSequence();\n    }\n  }, {\n    key: \"clone\",\n    value: function clone() {\n      return new EscapedCharacterCursor(this);\n    }\n  }, {\n    key: \"getChars\",\n    value: function getChars(start) {\n      var cursor = start.clone();\n      var chars = '';\n\n      while (cursor.internalState.offset < this.internalState.offset) {\n        chars += String.fromCodePoint(cursor.peek());\n        cursor.advance();\n      }\n\n      return chars;\n    }\n    /**\n     * Process the escape sequence that starts at the current position in the text.\n     *\n     * This method is called to ensure that `peek` has the unescaped value of escape sequences.\n     */\n\n  }, {\n    key: \"processEscapeSequence\",\n    value: function processEscapeSequence() {\n      var _this138 = this;\n\n      var peek = function peek() {\n        return _this138.internalState.peek;\n      };\n\n      if (peek() === $BACKSLASH) {\n        // We have hit an escape sequence so we need the internal state to become independent\n        // of the external state.\n        this.internalState = Object.assign({}, this.state); // Move past the backslash\n\n        this.advanceState(this.internalState); // First check for standard control char sequences\n\n        if (peek() === $n) {\n          this.state.peek = $LF;\n        } else if (peek() === $r) {\n          this.state.peek = $CR;\n        } else if (peek() === $v) {\n          this.state.peek = $VTAB;\n        } else if (peek() === $t) {\n          this.state.peek = $TAB;\n        } else if (peek() === $b) {\n          this.state.peek = $BSPACE;\n        } else if (peek() === $f) {\n          this.state.peek = $FF;\n        } // Now consider more complex sequences\n        else if (peek() === $u) {\n          // Unicode code-point sequence\n          this.advanceState(this.internalState); // advance past the `u` char\n\n          if (peek() === $LBRACE) {\n            // Variable length Unicode, e.g. `\\x{123}`\n            this.advanceState(this.internalState); // advance past the `{` char\n            // Advance past the variable number of hex digits until we hit a `}` char\n\n            var digitStart = this.clone();\n            var length = 0;\n\n            while (peek() !== $RBRACE) {\n              this.advanceState(this.internalState);\n              length++;\n            }\n\n            this.state.peek = this.decodeHexDigits(digitStart, length);\n          } else {\n            // Fixed length Unicode, e.g. `\\u1234`\n            var _digitStart = this.clone();\n\n            this.advanceState(this.internalState);\n            this.advanceState(this.internalState);\n            this.advanceState(this.internalState);\n            this.state.peek = this.decodeHexDigits(_digitStart, 4);\n          }\n        } else if (peek() === $x) {\n          // Hex char code, e.g. `\\x2F`\n          this.advanceState(this.internalState); // advance past the `x` char\n\n          var _digitStart2 = this.clone();\n\n          this.advanceState(this.internalState);\n          this.state.peek = this.decodeHexDigits(_digitStart2, 2);\n        } else if (isOctalDigit(peek())) {\n          // Octal char code, e.g. `\\012`,\n          var octal = '';\n          var _length = 0;\n          var previous = this.clone();\n\n          while (isOctalDigit(peek()) && _length < 3) {\n            previous = this.clone();\n            octal += String.fromCodePoint(peek());\n            this.advanceState(this.internalState);\n            _length++;\n          }\n\n          this.state.peek = parseInt(octal, 8); // Backup one char\n\n          this.internalState = previous.internalState;\n        } else if (isNewLine(this.internalState.peek)) {\n          // Line continuation `\\` followed by a new line\n          this.advanceState(this.internalState); // advance over the newline\n\n          this.state = this.internalState;\n        } else {\n          // If none of the `if` blocks were executed then we just have an escaped normal character.\n          // In that case we just, effectively, skip the backslash from the character.\n          this.state.peek = this.internalState.peek;\n        }\n      }\n    }\n  }, {\n    key: \"decodeHexDigits\",\n    value: function decodeHexDigits(start, length) {\n      var hex = this.input.substr(start.internalState.offset, length);\n      var charCode = parseInt(hex, 16);\n\n      if (!isNaN(charCode)) {\n        return charCode;\n      } else {\n        start.state = start.internalState;\n        throw new CursorError('Invalid hexadecimal escape sequence', start);\n      }\n    }\n  }]);\n\n  return EscapedCharacterCursor;\n}(PlainCharacterCursor);\n\nvar CursorError = /*#__PURE__*/_createClass(function CursorError(msg, cursor) {\n  _classCallCheck(this, CursorError);\n\n  this.msg = msg;\n  this.cursor = cursor;\n});\n/**\n * @license\n * Copyright Google LLC 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\nvar TreeError = /*#__PURE__*/function (_ParseError2) {\n  _inherits(TreeError, _ParseError2);\n\n  var _super89 = _createSuper(TreeError);\n\n  function TreeError(elementName, span, msg) {\n    var _this139;\n\n    _classCallCheck(this, TreeError);\n\n    _this139 = _super89.call(this, span, msg);\n    _this139.elementName = elementName;\n    return _this139;\n  }\n\n  _createClass(TreeError, null, [{\n    key: \"create\",\n    value: function create(elementName, span, msg) {\n      return new TreeError(elementName, span, msg);\n    }\n  }]);\n\n  return TreeError;\n}(ParseError);\n\nvar ParseTreeResult = /*#__PURE__*/_createClass(function ParseTreeResult(rootNodes, errors) {\n  _classCallCheck(this, ParseTreeResult);\n\n  this.rootNodes = rootNodes;\n  this.errors = errors;\n});\n\nvar Parser = /*#__PURE__*/function () {\n  function Parser(getTagDefinition) {\n    _classCallCheck(this, Parser);\n\n    this.getTagDefinition = getTagDefinition;\n  }\n\n  _createClass(Parser, [{\n    key: \"parse\",\n    value: function parse(source, url, options) {\n      var tokenizeResult = tokenize(source, url, this.getTagDefinition, options);\n      var parser = new _TreeBuilder(tokenizeResult.tokens, this.getTagDefinition);\n      parser.build();\n      return new ParseTreeResult(parser.rootNodes, tokenizeResult.errors.concat(parser.errors));\n    }\n  }]);\n\n  return Parser;\n}();\n\nvar _TreeBuilder = /*#__PURE__*/function () {\n  function _TreeBuilder(tokens, getTagDefinition) {\n    _classCallCheck(this, _TreeBuilder);\n\n    this.tokens = tokens;\n    this.getTagDefinition = getTagDefinition;\n    this._index = -1;\n    this._elementStack = [];\n    this.rootNodes = [];\n    this.errors = [];\n\n    this._advance();\n  }\n\n  _createClass(_TreeBuilder, [{\n    key: \"build\",\n    value: function build() {\n      while (this._peek.type !== 24\n      /* EOF */\n      ) {\n        if (this._peek.type === 0\n        /* TAG_OPEN_START */\n        || this._peek.type === 4\n        /* INCOMPLETE_TAG_OPEN */\n        ) {\n          this._consumeStartTag(this._advance());\n        } else if (this._peek.type === 3\n        /* TAG_CLOSE */\n        ) {\n          this._consumeEndTag(this._advance());\n        } else if (this._peek.type === 12\n        /* CDATA_START */\n        ) {\n          this._closeVoidElement();\n\n          this._consumeCdata(this._advance());\n        } else if (this._peek.type === 10\n        /* COMMENT_START */\n        ) {\n          this._closeVoidElement();\n\n          this._consumeComment(this._advance());\n        } else if (this._peek.type === 5\n        /* TEXT */\n        || this._peek.type === 7\n        /* RAW_TEXT */\n        || this._peek.type === 6\n        /* ESCAPABLE_RAW_TEXT */\n        ) {\n          this._closeVoidElement();\n\n          this._consumeText(this._advance());\n        } else if (this._peek.type === 19\n        /* EXPANSION_FORM_START */\n        ) {\n          this._consumeExpansion(this._advance());\n        } else {\n          // Skip all other tokens...\n          this._advance();\n        }\n      }\n    }\n  }, {\n    key: \"_advance\",\n    value: function _advance() {\n      var prev = this._peek;\n\n      if (this._index < this.tokens.length - 1) {\n        // Note: there is always an EOF token at the end\n        this._index++;\n      }\n\n      this._peek = this.tokens[this._index];\n      return prev;\n    }\n  }, {\n    key: \"_advanceIf\",\n    value: function _advanceIf(type) {\n      if (this._peek.type === type) {\n        return this._advance();\n      }\n\n      return null;\n    }\n  }, {\n    key: \"_consumeCdata\",\n    value: function _consumeCdata(_startToken) {\n      this._consumeText(this._advance());\n\n      this._advanceIf(13\n      /* CDATA_END */\n      );\n    }\n  }, {\n    key: \"_consumeComment\",\n    value: function _consumeComment(token) {\n      var text = this._advanceIf(7\n      /* RAW_TEXT */\n      );\n\n      this._advanceIf(11\n      /* COMMENT_END */\n      );\n\n      var value = text != null ? text.parts[0].trim() : null;\n\n      this._addToParent(new Comment$1(value, token.sourceSpan));\n    }\n  }, {\n    key: \"_consumeExpansion\",\n    value: function _consumeExpansion(token) {\n      var switchValue = this._advance();\n\n      var type = this._advance();\n\n      var cases = []; // read =\n\n      while (this._peek.type === 20\n      /* EXPANSION_CASE_VALUE */\n      ) {\n        var expCase = this._parseExpansionCase();\n\n        if (!expCase) return; // error\n\n        cases.push(expCase);\n      } // read the final }\n\n\n      if (this._peek.type !== 23\n      /* EXPANSION_FORM_END */\n      ) {\n        this.errors.push(TreeError.create(null, this._peek.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n        return;\n      }\n\n      var sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end, token.sourceSpan.fullStart);\n\n      this._addToParent(new Expansion(switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan));\n\n      this._advance();\n    }\n  }, {\n    key: \"_parseExpansionCase\",\n    value: function _parseExpansionCase() {\n      var value = this._advance(); // read {\n\n\n      if (this._peek.type !== 21\n      /* EXPANSION_CASE_EXP_START */\n      ) {\n        this.errors.push(TreeError.create(null, this._peek.sourceSpan, \"Invalid ICU message. Missing '{'.\"));\n        return null;\n      } // read until }\n\n\n      var start = this._advance();\n\n      var exp = this._collectExpansionExpTokens(start);\n\n      if (!exp) return null;\n\n      var end = this._advance();\n\n      exp.push({\n        type: 24\n        /* EOF */\n        ,\n        parts: [],\n        sourceSpan: end.sourceSpan\n      }); // parse everything in between { and }\n\n      var expansionCaseParser = new _TreeBuilder(exp, this.getTagDefinition);\n      expansionCaseParser.build();\n\n      if (expansionCaseParser.errors.length > 0) {\n        this.errors = this.errors.concat(expansionCaseParser.errors);\n        return null;\n      }\n\n      var sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end, value.sourceSpan.fullStart);\n      var expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end, start.sourceSpan.fullStart);\n      return new ExpansionCase(value.parts[0], expansionCaseParser.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan);\n    }\n  }, {\n    key: \"_collectExpansionExpTokens\",\n    value: function _collectExpansionExpTokens(start) {\n      var exp = [];\n      var expansionFormStack = [21\n      /* EXPANSION_CASE_EXP_START */\n      ];\n\n      while (true) {\n        if (this._peek.type === 19\n        /* EXPANSION_FORM_START */\n        || this._peek.type === 21\n        /* EXPANSION_CASE_EXP_START */\n        ) {\n          expansionFormStack.push(this._peek.type);\n        }\n\n        if (this._peek.type === 22\n        /* EXPANSION_CASE_EXP_END */\n        ) {\n          if (lastOnStack(expansionFormStack, 21\n          /* EXPANSION_CASE_EXP_START */\n          )) {\n            expansionFormStack.pop();\n            if (expansionFormStack.length === 0) return exp;\n          } else {\n            this.errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n            return null;\n          }\n        }\n\n        if (this._peek.type === 23\n        /* EXPANSION_FORM_END */\n        ) {\n          if (lastOnStack(expansionFormStack, 19\n          /* EXPANSION_FORM_START */\n          )) {\n            expansionFormStack.pop();\n          } else {\n            this.errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n            return null;\n          }\n        }\n\n        if (this._peek.type === 24\n        /* EOF */\n        ) {\n          this.errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n          return null;\n        }\n\n        exp.push(this._advance());\n      }\n    }\n  }, {\n    key: \"_consumeText\",\n    value: function _consumeText(token) {\n      var tokens = [token];\n      var startSpan = token.sourceSpan;\n      var text = token.parts[0];\n\n      if (text.length > 0 && text[0] === '\\n') {\n        var parent = this._getParentElement();\n\n        if (parent != null && parent.children.length === 0 && this.getTagDefinition(parent.name).ignoreFirstLf) {\n          text = text.substring(1);\n          tokens[0] = {\n            type: token.type,\n            sourceSpan: token.sourceSpan,\n            parts: [text]\n          };\n        }\n      }\n\n      while (this._peek.type === 8\n      /* INTERPOLATION */\n      || this._peek.type === 5\n      /* TEXT */\n      || this._peek.type === 9\n      /* ENCODED_ENTITY */\n      ) {\n        token = this._advance();\n        tokens.push(token);\n\n        if (token.type === 8\n        /* INTERPOLATION */\n        ) {\n          // For backward compatibility we decode HTML entities that appear in interpolation\n          // expressions. This is arguably a bug, but it could be a considerable breaking change to\n          // fix it. It should be addressed in a larger project to refactor the entire parser/lexer\n          // chain after View Engine has been removed.\n          text += token.parts.join('').replace(/&([^;]+);/g, decodeEntity);\n        } else if (token.type === 9\n        /* ENCODED_ENTITY */\n        ) {\n          text += token.parts[0];\n        } else {\n          text += token.parts.join('');\n        }\n      }\n\n      if (text.length > 0) {\n        var endSpan = token.sourceSpan;\n\n        this._addToParent(new Text$3(text, new ParseSourceSpan(startSpan.start, endSpan.end, startSpan.fullStart, startSpan.details), tokens));\n      }\n    }\n  }, {\n    key: \"_closeVoidElement\",\n    value: function _closeVoidElement() {\n      var el = this._getParentElement();\n\n      if (el && this.getTagDefinition(el.name).isVoid) {\n        this._elementStack.pop();\n      }\n    }\n  }, {\n    key: \"_consumeStartTag\",\n    value: function _consumeStartTag(startTagToken) {\n      var _startTagToken$parts = _slicedToArray(startTagToken.parts, 2),\n          prefix = _startTagToken$parts[0],\n          name = _startTagToken$parts[1];\n\n      var attrs = [];\n\n      while (this._peek.type === 14\n      /* ATTR_NAME */\n      ) {\n        attrs.push(this._consumeAttr(this._advance()));\n      }\n\n      var fullName = this._getElementFullName(prefix, name, this._getParentElement());\n\n      var selfClosing = false; // Note: There could have been a tokenizer error\n      // so that we don't get a token for the end tag...\n\n      if (this._peek.type === 2\n      /* TAG_OPEN_END_VOID */\n      ) {\n        this._advance();\n\n        selfClosing = true;\n        var tagDef = this.getTagDefinition(fullName);\n\n        if (!(tagDef.canSelfClose || getNsPrefix(fullName) !== null || tagDef.isVoid)) {\n          this.errors.push(TreeError.create(fullName, startTagToken.sourceSpan, \"Only void and foreign elements can be self closed \\\"\".concat(startTagToken.parts[1], \"\\\"\")));\n        }\n      } else if (this._peek.type === 1\n      /* TAG_OPEN_END */\n      ) {\n        this._advance();\n\n        selfClosing = false;\n      }\n\n      var end = this._peek.sourceSpan.fullStart;\n      var span = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart); // Create a separate `startSpan` because `span` will be modified when there is an `end` span.\n\n      var startSpan = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);\n      var el = new Element$1(fullName, attrs, [], span, startSpan, undefined);\n\n      this._pushElement(el);\n\n      if (selfClosing) {\n        // Elements that are self-closed have their `endSourceSpan` set to the full span, as the\n        // element start tag also represents the end tag.\n        this._popElement(fullName, span);\n      } else if (startTagToken.type === 4\n      /* INCOMPLETE_TAG_OPEN */\n      ) {\n        // We already know the opening tag is not complete, so it is unlikely it has a corresponding\n        // close tag. Let's optimistically parse it as a full element and emit an error.\n        this._popElement(fullName, null);\n\n        this.errors.push(TreeError.create(fullName, span, \"Opening tag \\\"\".concat(fullName, \"\\\" not terminated.\")));\n      }\n    }\n  }, {\n    key: \"_pushElement\",\n    value: function _pushElement(el) {\n      var parentEl = this._getParentElement();\n\n      if (parentEl && this.getTagDefinition(parentEl.name).isClosedByChild(el.name)) {\n        this._elementStack.pop();\n      }\n\n      this._addToParent(el);\n\n      this._elementStack.push(el);\n    }\n  }, {\n    key: \"_consumeEndTag\",\n    value: function _consumeEndTag(endTagToken) {\n      var fullName = this._getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getParentElement());\n\n      if (this.getTagDefinition(fullName).isVoid) {\n        this.errors.push(TreeError.create(fullName, endTagToken.sourceSpan, \"Void elements do not have end tags \\\"\".concat(endTagToken.parts[1], \"\\\"\")));\n      } else if (!this._popElement(fullName, endTagToken.sourceSpan)) {\n        var errMsg = \"Unexpected closing tag \\\"\".concat(fullName, \"\\\". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags\");\n        this.errors.push(TreeError.create(fullName, endTagToken.sourceSpan, errMsg));\n      }\n    }\n    /**\n     * Closes the nearest element with the tag name `fullName` in the parse tree.\n     * `endSourceSpan` is the span of the closing tag, or null if the element does\n     * not have a closing tag (for example, this happens when an incomplete\n     * opening tag is recovered).\n     */\n\n  }, {\n    key: \"_popElement\",\n    value: function _popElement(fullName, endSourceSpan) {\n      var unexpectedCloseTagDetected = false;\n\n      for (var stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) {\n        var el = this._elementStack[stackIndex];\n\n        if (el.name === fullName) {\n          // Record the parse span with the element that is being closed. Any elements that are\n          // removed from the element stack at this point are closed implicitly, so they won't get\n          // an end source span (as there is no explicit closing element).\n          el.endSourceSpan = endSourceSpan;\n          el.sourceSpan.end = endSourceSpan !== null ? endSourceSpan.end : el.sourceSpan.end;\n\n          this._elementStack.splice(stackIndex, this._elementStack.length - stackIndex);\n\n          return !unexpectedCloseTagDetected;\n        }\n\n        if (!this.getTagDefinition(el.name).closedByParent) {\n          // Note that we encountered an unexpected close tag but continue processing the element\n          // stack so we can assign an `endSourceSpan` if there is a corresponding start tag for this\n          // end tag in the stack.\n          unexpectedCloseTagDetected = true;\n        }\n      }\n\n      return false;\n    }\n  }, {\n    key: \"_consumeAttr\",\n    value: function _consumeAttr(attrName) {\n      var fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);\n      var attrEnd = attrName.sourceSpan.end; // Consume any quote\n\n      if (this._peek.type === 15\n      /* ATTR_QUOTE */\n      ) {\n        this._advance();\n      } // Consume the attribute value\n\n\n      var value = '';\n      var valueTokens = [];\n      var valueStartSpan = undefined;\n      var valueEnd = undefined; // NOTE: We need to use a new variable `nextTokenType` here to hide the actual type of\n      // `_peek.type` from TS. Otherwise TS will narrow the type of `_peek.type` preventing it from\n      // being able to consider `ATTR_VALUE_INTERPOLATION` as an option. This is because TS is not\n      // able to see that `_advance()` will actually mutate `_peek`.\n\n      var nextTokenType = this._peek.type;\n\n      if (nextTokenType === 16\n      /* ATTR_VALUE_TEXT */\n      ) {\n        valueStartSpan = this._peek.sourceSpan;\n        valueEnd = this._peek.sourceSpan.end;\n\n        while (this._peek.type === 16\n        /* ATTR_VALUE_TEXT */\n        || this._peek.type === 17\n        /* ATTR_VALUE_INTERPOLATION */\n        || this._peek.type === 9\n        /* ENCODED_ENTITY */\n        ) {\n          var valueToken = this._advance();\n\n          valueTokens.push(valueToken);\n\n          if (valueToken.type === 17\n          /* ATTR_VALUE_INTERPOLATION */\n          ) {\n            // For backward compatibility we decode HTML entities that appear in interpolation\n            // expressions. This is arguably a bug, but it could be a considerable breaking change to\n            // fix it. It should be addressed in a larger project to refactor the entire parser/lexer\n            // chain after View Engine has been removed.\n            value += valueToken.parts.join('').replace(/&([^;]+);/g, decodeEntity);\n          } else if (valueToken.type === 9\n          /* ENCODED_ENTITY */\n          ) {\n            value += valueToken.parts[0];\n          } else {\n            value += valueToken.parts.join('');\n          }\n\n          valueEnd = attrEnd = valueToken.sourceSpan.end;\n        }\n      } // Consume any quote\n\n\n      if (this._peek.type === 15\n      /* ATTR_QUOTE */\n      ) {\n        var quoteToken = this._advance();\n\n        attrEnd = quoteToken.sourceSpan.end;\n      }\n\n      var valueSpan = valueStartSpan && valueEnd && new ParseSourceSpan(valueStartSpan.start, valueEnd, valueStartSpan.fullStart);\n      return new Attribute(fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, attrEnd, attrName.sourceSpan.fullStart), attrName.sourceSpan, valueSpan, valueTokens.length > 0 ? valueTokens : undefined, undefined);\n    }\n  }, {\n    key: \"_getParentElement\",\n    value: function _getParentElement() {\n      return this._elementStack.length > 0 ? this._elementStack[this._elementStack.length - 1] : null;\n    }\n  }, {\n    key: \"_addToParent\",\n    value: function _addToParent(node) {\n      var parent = this._getParentElement();\n\n      if (parent != null) {\n        parent.children.push(node);\n      } else {\n        this.rootNodes.push(node);\n      }\n    }\n  }, {\n    key: \"_getElementFullName\",\n    value: function _getElementFullName(prefix, localName, parentElement) {\n      if (prefix === '') {\n        prefix = this.getTagDefinition(localName).implicitNamespacePrefix || '';\n\n        if (prefix === '' && parentElement != null) {\n          var parentTagName = splitNsName(parentElement.name)[1];\n          var parentTagDefinition = this.getTagDefinition(parentTagName);\n\n          if (!parentTagDefinition.preventNamespaceInheritance) {\n            prefix = getNsPrefix(parentElement.name);\n          }\n        }\n      }\n\n      return mergeNsAndName(prefix, localName);\n    }\n  }]);\n\n  return _TreeBuilder;\n}();\n\nfunction lastOnStack(stack, element) {\n  return stack.length > 0 && stack[stack.length - 1] === element;\n}\n/**\n * Decode the `entity` string, which we believe is the contents of an HTML entity.\n *\n * If the string is not actually a valid/known entity then just return the original `match` string.\n */\n\n\nfunction decodeEntity(match, entity) {\n  if (NAMED_ENTITIES[entity] !== undefined) {\n    return NAMED_ENTITIES[entity] || match;\n  }\n\n  if (/^#x[a-f0-9]+$/i.test(entity)) {\n    return String.fromCodePoint(parseInt(entity.slice(2), 16));\n  }\n\n  if (/^#\\d+$/.test(entity)) {\n    return String.fromCodePoint(parseInt(entity.slice(1), 10));\n  }\n\n  return match;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar HtmlParser = /*#__PURE__*/function (_Parser) {\n  _inherits(HtmlParser, _Parser);\n\n  var _super90 = _createSuper(HtmlParser);\n\n  function HtmlParser() {\n    _classCallCheck(this, HtmlParser);\n\n    return _super90.call(this, getHtmlTagDefinition);\n  }\n\n  _createClass(HtmlParser, [{\n    key: \"parse\",\n    value: function parse(source, url, options) {\n      return _get(_getPrototypeOf(HtmlParser.prototype), \"parse\", this).call(this, source, url, options);\n    }\n  }]);\n\n  return HtmlParser;\n}(Parser);\n/**\n * @license\n * Copyright Google LLC 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\nvar PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces';\nvar SKIP_WS_TRIM_TAGS = /*@__PURE__*/new Set(['pre', 'template', 'textarea', 'script', 'style']); // Equivalent to \\s with \\u00a0 (non-breaking space) excluded.\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n\nvar WS_CHARS = \" \\f\\n\\r\\t\\x0B\\u1680\\u180E\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF\";\nvar NO_WS_REGEXP = /*@__PURE__*/new RegExp(\"[^\".concat(WS_CHARS, \"]\"));\nvar WS_REPLACE_REGEXP = /*@__PURE__*/new RegExp(\"[\".concat(WS_CHARS, \"]{2,}\"), 'g');\n\nfunction hasPreserveWhitespacesAttr(attrs) {\n  return attrs.some(function (attr) {\n    return attr.name === PRESERVE_WS_ATTR_NAME;\n  });\n}\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here.\n */\n\n\nfunction replaceNgsp(value) {\n  // lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE\n  return value.replace(new RegExp(NGSP_UNICODE, 'g'), ' ');\n}\n/**\n * This visitor can walk HTML parse tree and remove / trim text nodes using the following rules:\n * - consider spaces, tabs and new lines as whitespace characters;\n * - drop text nodes consisting of whitespace characters only;\n * - for all other text nodes replace consecutive whitespace characters with one space;\n * - convert &ngsp; pseudo-entity to a single space;\n *\n * Removal and trimming of whitespaces have positive performance impact (less code to generate\n * while compiling templates, faster view creation). At the same time it can be \"destructive\"\n * in some cases (whitespaces can influence layout). Because of the potential of breaking layout\n * this visitor is not activated by default in Angular 5 and people need to explicitly opt-in for\n * whitespace removal. The default option for whitespace removal will be revisited in Angular 6\n * and might be changed to \"on\" by default.\n */\n\n\nvar WhitespaceVisitor = /*#__PURE__*/function () {\n  function WhitespaceVisitor() {\n    _classCallCheck(this, WhitespaceVisitor);\n  }\n\n  _createClass(WhitespaceVisitor, [{\n    key: \"visitElement\",\n    value: function visitElement(element, context) {\n      if (SKIP_WS_TRIM_TAGS.has(element.name) || hasPreserveWhitespacesAttr(element.attrs)) {\n        // don't descent into elements where we need to preserve whitespaces\n        // but still visit all attributes to eliminate one used as a market to preserve WS\n        return new Element$1(element.name, visitAll$1(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n      }\n\n      return new Element$1(element.name, element.attrs, visitAllWithSiblings(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {\n      return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null;\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      var isNotBlank = text.value.match(NO_WS_REGEXP);\n      var hasExpansionSibling = context && (context.prev instanceof Expansion || context.next instanceof Expansion);\n\n      if (isNotBlank || hasExpansionSibling) {\n        // Process the whitespace in the tokens of this Text node\n        var tokens = text.tokens.map(function (token) {\n          return token.type === 5\n          /* TEXT */\n          ? createWhitespaceProcessedTextToken(token) : token;\n        }); // Process the whitespace of the value of this Text node\n\n        var value = processWhitespace(text.value);\n        return new Text$3(value, text.sourceSpan, tokens, text.i18n);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {\n      return comment;\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(expansion, context) {\n      return expansion;\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(expansionCase, context) {\n      return expansionCase;\n    }\n  }]);\n\n  return WhitespaceVisitor;\n}();\n\nfunction createWhitespaceProcessedTextToken(_ref13) {\n  var type = _ref13.type,\n      parts = _ref13.parts,\n      sourceSpan = _ref13.sourceSpan;\n  return {\n    type: type,\n    parts: [processWhitespace(parts[0])],\n    sourceSpan: sourceSpan\n  };\n}\n\nfunction processWhitespace(text) {\n  return replaceNgsp(text).replace(WS_REPLACE_REGEXP, ' ');\n}\n\nfunction removeWhitespaces(htmlAstWithErrors) {\n  return new ParseTreeResult(visitAll$1(new WhitespaceVisitor(), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors);\n}\n\nfunction visitAllWithSiblings(visitor, nodes) {\n  var result = [];\n  nodes.forEach(function (ast, i) {\n    var context = {\n      prev: nodes[i - 1],\n      next: nodes[i + 1]\n    };\n    var astResult = ast.visit(visitor, context);\n\n    if (astResult) {\n      result.push(astResult);\n    }\n  });\n  return result;\n}\n/**\n * @license\n * Copyright Google LLC 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// http://cldr.unicode.org/index/cldr-spec/plural-rules\n\n\nvar PLURAL_CASES = ['zero', 'one', 'two', 'few', 'many', 'other'];\n/**\n * Expands special forms into elements.\n *\n * For example,\n *\n * ```\n * { messages.length, plural,\n *   =0 {zero}\n *   =1 {one}\n *   other {more than one}\n * }\n * ```\n *\n * will be expanded into\n *\n * ```\n * <ng-container [ngPlural]=\"messages.length\">\n *   <ng-template ngPluralCase=\"=0\">zero</ng-template>\n *   <ng-template ngPluralCase=\"=1\">one</ng-template>\n *   <ng-template ngPluralCase=\"other\">more than one</ng-template>\n * </ng-container>\n * ```\n */\n\nfunction expandNodes(nodes) {\n  var expander = new _Expander();\n  return new ExpansionResult(visitAll$1(expander, nodes), expander.isExpanded, expander.errors);\n}\n\nvar ExpansionResult = /*#__PURE__*/_createClass(function ExpansionResult(nodes, expanded, errors) {\n  _classCallCheck(this, ExpansionResult);\n\n  this.nodes = nodes;\n  this.expanded = expanded;\n  this.errors = errors;\n});\n\nvar ExpansionError = /*#__PURE__*/function (_ParseError3) {\n  _inherits(ExpansionError, _ParseError3);\n\n  var _super91 = _createSuper(ExpansionError);\n\n  function ExpansionError(span, errorMsg) {\n    _classCallCheck(this, ExpansionError);\n\n    return _super91.call(this, span, errorMsg);\n  }\n\n  return _createClass(ExpansionError);\n}(ParseError);\n/**\n * Expand expansion forms (plural, select) to directives\n *\n * @internal\n */\n\n\nvar _Expander = /*#__PURE__*/function () {\n  function _Expander() {\n    _classCallCheck(this, _Expander);\n\n    this.isExpanded = false;\n    this.errors = [];\n  }\n\n  _createClass(_Expander, [{\n    key: \"visitElement\",\n    value: function visitElement(element, context) {\n      return new Element$1(element.name, element.attrs, visitAll$1(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {\n      return attribute;\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      return text;\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {\n      return comment;\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(icu, context) {\n      this.isExpanded = true;\n      return icu.type === 'plural' ? _expandPluralForm(icu, this.errors) : _expandDefaultForm(icu, this.errors);\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(icuCase, context) {\n      throw new Error('Should not be reached');\n    }\n  }]);\n\n  return _Expander;\n}(); // Plural forms are expanded to `NgPlural` and `NgPluralCase`s\n\n\nfunction _expandPluralForm(ast, errors) {\n  var children = ast.cases.map(function (c) {\n    if (PLURAL_CASES.indexOf(c.value) === -1 && !c.value.match(/^=\\d+$/)) {\n      errors.push(new ExpansionError(c.valueSourceSpan, \"Plural cases should be \\\"=<number>\\\" or one of \".concat(PLURAL_CASES.join(', '))));\n    }\n\n    var expansionResult = expandNodes(c.expression);\n    errors.push.apply(errors, _toConsumableArray(expansionResult.errors));\n    return new Element$1(\"ng-template\", [new Attribute('ngPluralCase', \"\".concat(c.value), c.valueSourceSpan, undefined\n    /* keySpan */\n    , undefined\n    /* valueSpan */\n    , undefined\n    /* valueTokens */\n    , undefined\n    /* i18n */\n    )], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n  });\n  var switchAttr = new Attribute('[ngPlural]', ast.switchValue, ast.switchValueSourceSpan, undefined\n  /* keySpan */\n  , undefined\n  /* valueSpan */\n  , undefined\n  /* valueTokens */\n  , undefined\n  /* i18n */\n  );\n  return new Element$1('ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);\n} // ICU messages (excluding plural form) are expanded to `NgSwitch`  and `NgSwitchCase`s\n\n\nfunction _expandDefaultForm(ast, errors) {\n  var children = ast.cases.map(function (c) {\n    var expansionResult = expandNodes(c.expression);\n    errors.push.apply(errors, _toConsumableArray(expansionResult.errors));\n\n    if (c.value === 'other') {\n      // other is the default case when no values match\n      return new Element$1(\"ng-template\", [new Attribute('ngSwitchDefault', '', c.valueSourceSpan, undefined\n      /* keySpan */\n      , undefined\n      /* valueSpan */\n      , undefined\n      /* valueTokens */\n      , undefined\n      /* i18n */\n      )], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n    }\n\n    return new Element$1(\"ng-template\", [new Attribute('ngSwitchCase', \"\".concat(c.value), c.valueSourceSpan, undefined\n    /* keySpan */\n    , undefined\n    /* valueSpan */\n    , undefined\n    /* valueTokens */\n    , undefined\n    /* i18n */\n    )], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n  });\n  var switchAttr = new Attribute('[ngSwitch]', ast.switchValue, ast.switchValueSourceSpan, undefined\n  /* keySpan */\n  , undefined\n  /* valueSpan */\n  , undefined\n  /* valueTokens */\n  , undefined\n  /* i18n */\n  );\n  return new Element$1('ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * A segment of text within the template.\n */\n\n\nvar TextAst = /*#__PURE__*/function () {\n  function TextAst(value, ngContentIndex, sourceSpan) {\n    _classCallCheck(this, TextAst);\n\n    this.value = value;\n    this.ngContentIndex = ngContentIndex;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(TextAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitText(this, context);\n    }\n  }]);\n\n  return TextAst;\n}();\n/**\n * A bound expression within the text of a template.\n */\n\n\nvar BoundTextAst = /*#__PURE__*/function () {\n  function BoundTextAst(value, ngContentIndex, sourceSpan) {\n    _classCallCheck(this, BoundTextAst);\n\n    this.value = value;\n    this.ngContentIndex = ngContentIndex;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(BoundTextAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitBoundText(this, context);\n    }\n  }]);\n\n  return BoundTextAst;\n}();\n/**\n * A plain attribute on an element.\n */\n\n\nvar AttrAst = /*#__PURE__*/function () {\n  function AttrAst(name, value, sourceSpan) {\n    _classCallCheck(this, AttrAst);\n\n    this.name = name;\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(AttrAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitAttr(this, context);\n    }\n  }]);\n\n  return AttrAst;\n}();\n\nvar BoundPropertyMapping = (_BoundPropertyMapping = {}, _defineProperty(_BoundPropertyMapping, 4\n/* Animation */\n, 4), _defineProperty(_BoundPropertyMapping, 1\n/* Attribute */\n, 1), _defineProperty(_BoundPropertyMapping, 2\n/* Class */\n, 2), _defineProperty(_BoundPropertyMapping, 0\n/* Property */\n, 0), _defineProperty(_BoundPropertyMapping, 3\n/* Style */\n, 3), _BoundPropertyMapping);\n/**\n * A binding for an element property (e.g. `[property]=\"expression\"`) or an animation trigger (e.g.\n * `[@trigger]=\"stateExp\"`)\n */\n\nvar BoundElementPropertyAst = /*#__PURE__*/function () {\n  function BoundElementPropertyAst(name, type, securityContext, value, unit, sourceSpan) {\n    _classCallCheck(this, BoundElementPropertyAst);\n\n    this.name = name;\n    this.type = type;\n    this.securityContext = securityContext;\n    this.value = value;\n    this.unit = unit;\n    this.sourceSpan = sourceSpan;\n    this.isAnimation = this.type === 4\n    /* Animation */\n    ;\n  }\n\n  _createClass(BoundElementPropertyAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitElementProperty(this, context);\n    }\n  }], [{\n    key: \"fromBoundProperty\",\n    value: function fromBoundProperty(prop) {\n      var type = BoundPropertyMapping[prop.type];\n      return new BoundElementPropertyAst(prop.name, type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan);\n    }\n  }]);\n\n  return BoundElementPropertyAst;\n}();\n/**\n * A binding for an element event (e.g. `(event)=\"handler()\"`) or an animation trigger event (e.g.\n * `(@trigger.phase)=\"callback($event)\"`).\n */\n\n\nvar BoundEventAst = /*#__PURE__*/function () {\n  function BoundEventAst(name, target, phase, handler, sourceSpan, handlerSpan) {\n    _classCallCheck(this, BoundEventAst);\n\n    this.name = name;\n    this.target = target;\n    this.phase = phase;\n    this.handler = handler;\n    this.sourceSpan = sourceSpan;\n    this.handlerSpan = handlerSpan;\n    this.fullName = BoundEventAst.calcFullName(this.name, this.target, this.phase);\n    this.isAnimation = !!this.phase;\n  }\n\n  _createClass(BoundEventAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitEvent(this, context);\n    }\n  }], [{\n    key: \"calcFullName\",\n    value: function calcFullName(name, target, phase) {\n      if (target) {\n        return \"\".concat(target, \":\").concat(name);\n      }\n\n      if (phase) {\n        return \"@\".concat(name, \".\").concat(phase);\n      }\n\n      return name;\n    }\n  }, {\n    key: \"fromParsedEvent\",\n    value: function fromParsedEvent(event) {\n      var target = event.type === 0\n      /* Regular */\n      ? event.targetOrPhase : null;\n      var phase = event.type === 1\n      /* Animation */\n      ? event.targetOrPhase : null;\n      return new BoundEventAst(event.name, target, phase, event.handler, event.sourceSpan, event.handlerSpan);\n    }\n  }]);\n\n  return BoundEventAst;\n}();\n/**\n * A reference declaration on an element (e.g. `let someName=\"expression\"`).\n */\n\n\nvar ReferenceAst = /*#__PURE__*/function () {\n  function ReferenceAst(name, value, originalValue, sourceSpan) {\n    _classCallCheck(this, ReferenceAst);\n\n    this.name = name;\n    this.value = value;\n    this.originalValue = originalValue;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(ReferenceAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitReference(this, context);\n    }\n  }]);\n\n  return ReferenceAst;\n}();\n/**\n * A variable declaration on a <ng-template> (e.g. `var-someName=\"someLocalName\"`).\n */\n\n\nvar VariableAst = /*#__PURE__*/function () {\n  function VariableAst(name, value, sourceSpan, valueSpan) {\n    _classCallCheck(this, VariableAst);\n\n    this.name = name;\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n    this.valueSpan = valueSpan;\n  }\n\n  _createClass(VariableAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitVariable(this, context);\n    }\n  }], [{\n    key: \"fromParsedVariable\",\n    value: function fromParsedVariable(v) {\n      return new VariableAst(v.name, v.value, v.sourceSpan, v.valueSpan);\n    }\n  }]);\n\n  return VariableAst;\n}();\n/**\n * An element declaration in a template.\n */\n\n\nvar ElementAst = /*#__PURE__*/function () {\n  function ElementAst(name, attrs, inputs, outputs, references, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan, endSourceSpan) {\n    _classCallCheck(this, ElementAst);\n\n    this.name = name;\n    this.attrs = attrs;\n    this.inputs = inputs;\n    this.outputs = outputs;\n    this.references = references;\n    this.directives = directives;\n    this.providers = providers;\n    this.hasViewContainer = hasViewContainer;\n    this.queryMatches = queryMatches;\n    this.children = children;\n    this.ngContentIndex = ngContentIndex;\n    this.sourceSpan = sourceSpan;\n    this.endSourceSpan = endSourceSpan;\n  }\n\n  _createClass(ElementAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitElement(this, context);\n    }\n  }]);\n\n  return ElementAst;\n}();\n/**\n * A `<ng-template>` element included in an Angular template.\n */\n\n\nvar EmbeddedTemplateAst = /*#__PURE__*/function () {\n  function EmbeddedTemplateAst(attrs, outputs, references, variables, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan) {\n    _classCallCheck(this, EmbeddedTemplateAst);\n\n    this.attrs = attrs;\n    this.outputs = outputs;\n    this.references = references;\n    this.variables = variables;\n    this.directives = directives;\n    this.providers = providers;\n    this.hasViewContainer = hasViewContainer;\n    this.queryMatches = queryMatches;\n    this.children = children;\n    this.ngContentIndex = ngContentIndex;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(EmbeddedTemplateAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitEmbeddedTemplate(this, context);\n    }\n  }]);\n\n  return EmbeddedTemplateAst;\n}();\n/**\n * A directive property with a bound value (e.g. `*ngIf=\"condition\").\n */\n\n\nvar BoundDirectivePropertyAst = /*#__PURE__*/function () {\n  function BoundDirectivePropertyAst(directiveName, templateName, value, sourceSpan) {\n    _classCallCheck(this, BoundDirectivePropertyAst);\n\n    this.directiveName = directiveName;\n    this.templateName = templateName;\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(BoundDirectivePropertyAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitDirectiveProperty(this, context);\n    }\n  }]);\n\n  return BoundDirectivePropertyAst;\n}();\n/**\n * A directive declared on an element.\n */\n\n\nvar DirectiveAst = /*#__PURE__*/function () {\n  function DirectiveAst(directive, inputs, hostProperties, hostEvents, contentQueryStartId, sourceSpan) {\n    _classCallCheck(this, DirectiveAst);\n\n    this.directive = directive;\n    this.inputs = inputs;\n    this.hostProperties = hostProperties;\n    this.hostEvents = hostEvents;\n    this.contentQueryStartId = contentQueryStartId;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(DirectiveAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitDirective(this, context);\n    }\n  }]);\n\n  return DirectiveAst;\n}();\n/**\n * A provider declared on an element\n */\n\n\nvar ProviderAst = /*#__PURE__*/function () {\n  function ProviderAst(token, multiProvider, eager, providers, providerType, lifecycleHooks, sourceSpan, isModule) {\n    _classCallCheck(this, ProviderAst);\n\n    this.token = token;\n    this.multiProvider = multiProvider;\n    this.eager = eager;\n    this.providers = providers;\n    this.providerType = providerType;\n    this.lifecycleHooks = lifecycleHooks;\n    this.sourceSpan = sourceSpan;\n    this.isModule = isModule;\n  }\n\n  _createClass(ProviderAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      // No visit method in the visitor for now...\n      return null;\n    }\n  }]);\n\n  return ProviderAst;\n}();\n\nvar ProviderAstType = /*@__PURE__*/function (ProviderAstType) {\n  ProviderAstType[ProviderAstType[\"PublicService\"] = 0] = \"PublicService\";\n  ProviderAstType[ProviderAstType[\"PrivateService\"] = 1] = \"PrivateService\";\n  ProviderAstType[ProviderAstType[\"Component\"] = 2] = \"Component\";\n  ProviderAstType[ProviderAstType[\"Directive\"] = 3] = \"Directive\";\n  ProviderAstType[ProviderAstType[\"Builtin\"] = 4] = \"Builtin\";\n  return ProviderAstType;\n}({});\n/**\n * Position where content is to be projected (instance of `<ng-content>` in a template).\n */\n\n\nvar NgContentAst = /*#__PURE__*/function () {\n  function NgContentAst(index, ngContentIndex, sourceSpan) {\n    _classCallCheck(this, NgContentAst);\n\n    this.index = index;\n    this.ngContentIndex = ngContentIndex;\n    this.sourceSpan = sourceSpan;\n  }\n\n  _createClass(NgContentAst, [{\n    key: \"visit\",\n    value: function visit(visitor, context) {\n      return visitor.visitNgContent(this, context);\n    }\n  }]);\n\n  return NgContentAst;\n}();\n/**\n * A visitor that accepts each node but doesn't do anything. It is intended to be used\n * as the base class for a visitor that is only interested in a subset of the node types.\n */\n\n\nvar NullTemplateVisitor = /*#__PURE__*/function () {\n  function NullTemplateVisitor() {\n    _classCallCheck(this, NullTemplateVisitor);\n  }\n\n  _createClass(NullTemplateVisitor, [{\n    key: \"visitNgContent\",\n    value: function visitNgContent(ast, context) {}\n  }, {\n    key: \"visitEmbeddedTemplate\",\n    value: function visitEmbeddedTemplate(ast, context) {}\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(ast, context) {}\n  }, {\n    key: \"visitReference\",\n    value: function visitReference(ast, context) {}\n  }, {\n    key: \"visitVariable\",\n    value: function visitVariable(ast, context) {}\n  }, {\n    key: \"visitEvent\",\n    value: function visitEvent(ast, context) {}\n  }, {\n    key: \"visitElementProperty\",\n    value: function visitElementProperty(ast, context) {}\n  }, {\n    key: \"visitAttr\",\n    value: function visitAttr(ast, context) {}\n  }, {\n    key: \"visitBoundText\",\n    value: function visitBoundText(ast, context) {}\n  }, {\n    key: \"visitText\",\n    value: function visitText(ast, context) {}\n  }, {\n    key: \"visitDirective\",\n    value: function visitDirective(ast, context) {}\n  }, {\n    key: \"visitDirectiveProperty\",\n    value: function visitDirectiveProperty(ast, context) {}\n  }]);\n\n  return NullTemplateVisitor;\n}();\n/**\n * Base class that can be used to build a visitor that visits each node\n * in an template ast recursively.\n */\n\n\nvar RecursiveTemplateAstVisitor = /*#__PURE__*/function (_NullTemplateVisitor) {\n  _inherits(RecursiveTemplateAstVisitor, _NullTemplateVisitor);\n\n  var _super92 = _createSuper(RecursiveTemplateAstVisitor);\n\n  function RecursiveTemplateAstVisitor() {\n    _classCallCheck(this, RecursiveTemplateAstVisitor);\n\n    return _super92.call(this);\n  } // Nodes with children\n\n\n  _createClass(RecursiveTemplateAstVisitor, [{\n    key: \"visitEmbeddedTemplate\",\n    value: function visitEmbeddedTemplate(ast, context) {\n      return this.visitChildren(context, function (visit) {\n        visit(ast.attrs);\n        visit(ast.references);\n        visit(ast.variables);\n        visit(ast.directives);\n        visit(ast.providers);\n        visit(ast.children);\n      });\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(ast, context) {\n      return this.visitChildren(context, function (visit) {\n        visit(ast.attrs);\n        visit(ast.inputs);\n        visit(ast.outputs);\n        visit(ast.references);\n        visit(ast.directives);\n        visit(ast.providers);\n        visit(ast.children);\n      });\n    }\n  }, {\n    key: \"visitDirective\",\n    value: function visitDirective(ast, context) {\n      return this.visitChildren(context, function (visit) {\n        visit(ast.inputs);\n        visit(ast.hostProperties);\n        visit(ast.hostEvents);\n      });\n    }\n  }, {\n    key: \"visitChildren\",\n    value: function visitChildren(context, cb) {\n      var results = [];\n      var t = this;\n\n      function visit(children) {\n        if (children && children.length) results.push(templateVisitAll(t, children, context));\n      }\n\n      cb(visit);\n      return Array.prototype.concat.apply([], results);\n    }\n  }]);\n\n  return RecursiveTemplateAstVisitor;\n}(NullTemplateVisitor);\n/**\n * Visit every node in a list of {@link TemplateAst}s with the given {@link TemplateAstVisitor}.\n */\n\n\nfunction templateVisitAll(visitor, asts) {\n  var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n  var result = [];\n  var visit = visitor.visit ? function (ast) {\n    return visitor.visit(ast, context) || ast.visit(visitor, context);\n  } : function (ast) {\n    return ast.visit(visitor, context);\n  };\n  asts.forEach(function (ast) {\n    var astResult = visit(ast);\n\n    if (astResult) {\n      result.push(astResult);\n    }\n  });\n  return result;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar ProviderError = /*#__PURE__*/function (_ParseError4) {\n  _inherits(ProviderError, _ParseError4);\n\n  var _super93 = _createSuper(ProviderError);\n\n  function ProviderError(message, span) {\n    _classCallCheck(this, ProviderError);\n\n    return _super93.call(this, span, message);\n  }\n\n  return _createClass(ProviderError);\n}(ParseError);\n\nvar ProviderViewContext = /*#__PURE__*/_createClass(function ProviderViewContext(reflector, component) {\n  var _this140 = this;\n\n  _classCallCheck(this, ProviderViewContext);\n\n  this.reflector = reflector;\n  this.component = component;\n  this.errors = [];\n  this.viewQueries = _getViewQueries(component);\n  this.viewProviders = new Map();\n  component.viewProviders.forEach(function (provider) {\n    if (_this140.viewProviders.get(tokenReference(provider.token)) == null) {\n      _this140.viewProviders.set(tokenReference(provider.token), true);\n    }\n  });\n});\n\nvar ProviderElementContext = /*#__PURE__*/function () {\n  function ProviderElementContext(viewContext, _parent, _isViewRoot, _directiveAsts, attrs, refs, isTemplate, contentQueryStartId, _sourceSpan) {\n    var _this141 = this;\n\n    _classCallCheck(this, ProviderElementContext);\n\n    this.viewContext = viewContext;\n    this._parent = _parent;\n    this._isViewRoot = _isViewRoot;\n    this._directiveAsts = _directiveAsts;\n    this._sourceSpan = _sourceSpan;\n    this._transformedProviders = new Map();\n    this._seenProviders = new Map();\n    this._queriedTokens = new Map();\n    this.transformedHasViewContainer = false;\n    this._attrs = {};\n    attrs.forEach(function (attrAst) {\n      return _this141._attrs[attrAst.name] = attrAst.value;\n    });\n\n    var directivesMeta = _directiveAsts.map(function (directiveAst) {\n      return directiveAst.directive;\n    });\n\n    this._allProviders = _resolveProvidersFromDirectives(directivesMeta, _sourceSpan, viewContext.errors);\n    this._contentQueries = _getContentQueries(contentQueryStartId, directivesMeta);\n    Array.from(this._allProviders.values()).forEach(function (provider) {\n      _this141._addQueryReadsTo(provider.token, provider.token, _this141._queriedTokens);\n    });\n\n    if (isTemplate) {\n      var templateRefId = createTokenForExternalReference(this.viewContext.reflector, Identifiers$1.TemplateRef);\n\n      this._addQueryReadsTo(templateRefId, templateRefId, this._queriedTokens);\n    }\n\n    refs.forEach(function (refAst) {\n      var defaultQueryValue = refAst.value || createTokenForExternalReference(_this141.viewContext.reflector, Identifiers$1.ElementRef);\n\n      _this141._addQueryReadsTo({\n        value: refAst.name\n      }, defaultQueryValue, _this141._queriedTokens);\n    });\n\n    if (this._queriedTokens.get(this.viewContext.reflector.resolveExternalReference(Identifiers$1.ViewContainerRef))) {\n      this.transformedHasViewContainer = true;\n    } // create the providers that we know are eager first\n\n\n    Array.from(this._allProviders.values()).forEach(function (provider) {\n      var eager = provider.eager || _this141._queriedTokens.get(tokenReference(provider.token));\n\n      if (eager) {\n        _this141._getOrCreateLocalProvider(provider.providerType, provider.token, true);\n      }\n    });\n  }\n\n  _createClass(ProviderElementContext, [{\n    key: \"afterElement\",\n    value: function afterElement() {\n      var _this142 = this;\n\n      // collect lazy providers\n      Array.from(this._allProviders.values()).forEach(function (provider) {\n        _this142._getOrCreateLocalProvider(provider.providerType, provider.token, false);\n      });\n    }\n  }, {\n    key: \"transformProviders\",\n    get: function get() {\n      // Note: Maps keep their insertion order.\n      var lazyProviders = [];\n      var eagerProviders = [];\n\n      this._transformedProviders.forEach(function (provider) {\n        if (provider.eager) {\n          eagerProviders.push(provider);\n        } else {\n          lazyProviders.push(provider);\n        }\n      });\n\n      return lazyProviders.concat(eagerProviders);\n    }\n  }, {\n    key: \"transformedDirectiveAsts\",\n    get: function get() {\n      var sortedProviderTypes = this.transformProviders.map(function (provider) {\n        return provider.token.identifier;\n      });\n\n      var sortedDirectives = this._directiveAsts.slice();\n\n      sortedDirectives.sort(function (dir1, dir2) {\n        return sortedProviderTypes.indexOf(dir1.directive.type) - sortedProviderTypes.indexOf(dir2.directive.type);\n      });\n      return sortedDirectives;\n    }\n  }, {\n    key: \"queryMatches\",\n    get: function get() {\n      var allMatches = [];\n\n      this._queriedTokens.forEach(function (matches) {\n        allMatches.push.apply(allMatches, _toConsumableArray(matches));\n      });\n\n      return allMatches;\n    }\n  }, {\n    key: \"_addQueryReadsTo\",\n    value: function _addQueryReadsTo(token, defaultValue, queryReadTokens) {\n      this._getQueriesFor(token).forEach(function (query) {\n        var queryValue = query.meta.read || defaultValue;\n        var tokenRef = tokenReference(queryValue);\n        var queryMatches = queryReadTokens.get(tokenRef);\n\n        if (!queryMatches) {\n          queryMatches = [];\n          queryReadTokens.set(tokenRef, queryMatches);\n        }\n\n        queryMatches.push({\n          queryId: query.queryId,\n          value: queryValue\n        });\n      });\n    }\n  }, {\n    key: \"_getQueriesFor\",\n    value: function _getQueriesFor(token) {\n      var result = [];\n      var currentEl = this;\n      var distance = 0;\n      var queries;\n\n      while (currentEl !== null) {\n        queries = currentEl._contentQueries.get(tokenReference(token));\n\n        if (queries) {\n          result.push.apply(result, _toConsumableArray(queries.filter(function (query) {\n            return query.meta.descendants || distance <= 1;\n          })));\n        }\n\n        if (currentEl._directiveAsts.length > 0) {\n          distance++;\n        }\n\n        currentEl = currentEl._parent;\n      }\n\n      queries = this.viewContext.viewQueries.get(tokenReference(token));\n\n      if (queries) {\n        result.push.apply(result, _toConsumableArray(queries));\n      }\n\n      return result;\n    }\n  }, {\n    key: \"_getOrCreateLocalProvider\",\n    value: function _getOrCreateLocalProvider(requestingProviderType, token, eager) {\n      var _this143 = this;\n\n      var resolvedProvider = this._allProviders.get(tokenReference(token));\n\n      if (!resolvedProvider || (requestingProviderType === ProviderAstType.Directive || requestingProviderType === ProviderAstType.PublicService) && resolvedProvider.providerType === ProviderAstType.PrivateService || (requestingProviderType === ProviderAstType.PrivateService || requestingProviderType === ProviderAstType.PublicService) && resolvedProvider.providerType === ProviderAstType.Builtin) {\n        return null;\n      }\n\n      var transformedProviderAst = this._transformedProviders.get(tokenReference(token));\n\n      if (transformedProviderAst) {\n        return transformedProviderAst;\n      }\n\n      if (this._seenProviders.get(tokenReference(token)) != null) {\n        this.viewContext.errors.push(new ProviderError(\"Cannot instantiate cyclic dependency! \".concat(tokenName(token)), this._sourceSpan));\n        return null;\n      }\n\n      this._seenProviders.set(tokenReference(token), true);\n\n      var transformedProviders = resolvedProvider.providers.map(function (provider) {\n        var transformedUseValue = provider.useValue;\n        var transformedUseExisting = provider.useExisting;\n        var transformedDeps = undefined;\n\n        if (provider.useExisting != null) {\n          var existingDiDep = _this143._getDependency(resolvedProvider.providerType, {\n            token: provider.useExisting\n          }, eager);\n\n          if (existingDiDep.token != null) {\n            transformedUseExisting = existingDiDep.token;\n          } else {\n            transformedUseExisting = null;\n            transformedUseValue = existingDiDep.value;\n          }\n        } else if (provider.useFactory) {\n          var deps = provider.deps || provider.useFactory.diDeps;\n          transformedDeps = deps.map(function (dep) {\n            return _this143._getDependency(resolvedProvider.providerType, dep, eager);\n          });\n        } else if (provider.useClass) {\n          var _deps = provider.deps || provider.useClass.diDeps;\n\n          transformedDeps = _deps.map(function (dep) {\n            return _this143._getDependency(resolvedProvider.providerType, dep, eager);\n          });\n        }\n\n        return _transformProvider(provider, {\n          useExisting: transformedUseExisting,\n          useValue: transformedUseValue,\n          deps: transformedDeps\n        });\n      });\n      transformedProviderAst = _transformProviderAst(resolvedProvider, {\n        eager: eager,\n        providers: transformedProviders\n      });\n\n      this._transformedProviders.set(tokenReference(token), transformedProviderAst);\n\n      return transformedProviderAst;\n    }\n  }, {\n    key: \"_getLocalDependency\",\n    value: function _getLocalDependency(requestingProviderType, dep) {\n      var eager = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n      if (dep.isAttribute) {\n        var attrValue = this._attrs[dep.token.value];\n        return {\n          isValue: true,\n          value: attrValue == null ? null : attrValue\n        };\n      }\n\n      if (dep.token != null) {\n        // access builtints\n        if (requestingProviderType === ProviderAstType.Directive || requestingProviderType === ProviderAstType.Component) {\n          if (tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers$1.Renderer) || tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers$1.ElementRef) || tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers$1.ChangeDetectorRef) || tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers$1.TemplateRef)) {\n            return dep;\n          }\n\n          if (tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers$1.ViewContainerRef)) {\n            this.transformedHasViewContainer = true;\n          }\n        } // access the injector\n\n\n        if (tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers$1.Injector)) {\n          return dep;\n        } // access providers\n\n\n        if (this._getOrCreateLocalProvider(requestingProviderType, dep.token, eager) != null) {\n          return dep;\n        }\n      }\n\n      return null;\n    }\n  }, {\n    key: \"_getDependency\",\n    value: function _getDependency(requestingProviderType, dep) {\n      var eager = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var currElement = this;\n      var currEager = eager;\n      var result = null;\n\n      if (!dep.isSkipSelf) {\n        result = this._getLocalDependency(requestingProviderType, dep, eager);\n      }\n\n      if (dep.isSelf) {\n        if (!result && dep.isOptional) {\n          result = {\n            isValue: true,\n            value: null\n          };\n        }\n      } else {\n        // check parent elements\n        while (!result && currElement._parent) {\n          var prevElement = currElement;\n          currElement = currElement._parent;\n\n          if (prevElement._isViewRoot) {\n            currEager = false;\n          }\n\n          result = currElement._getLocalDependency(ProviderAstType.PublicService, dep, currEager);\n        } // check @Host restriction\n\n\n        if (!result) {\n          if (!dep.isHost || this.viewContext.component.isHost || this.viewContext.component.type.reference === tokenReference(dep.token) || this.viewContext.viewProviders.get(tokenReference(dep.token)) != null) {\n            result = dep;\n          } else {\n            result = dep.isOptional ? {\n              isValue: true,\n              value: null\n            } : null;\n          }\n        }\n      }\n\n      if (!result) {\n        this.viewContext.errors.push(new ProviderError(\"No provider for \".concat(tokenName(dep.token)), this._sourceSpan));\n      }\n\n      return result;\n    }\n  }]);\n\n  return ProviderElementContext;\n}();\n\nvar NgModuleProviderAnalyzer = /*#__PURE__*/function () {\n  function NgModuleProviderAnalyzer(reflector, ngModule, extraProviders, sourceSpan) {\n    var _this144 = this;\n\n    _classCallCheck(this, NgModuleProviderAnalyzer);\n\n    this.reflector = reflector;\n    this._transformedProviders = new Map();\n    this._seenProviders = new Map();\n    this._errors = [];\n    this._allProviders = new Map();\n    ngModule.transitiveModule.modules.forEach(function (ngModuleType) {\n      var ngModuleProvider = {\n        token: {\n          identifier: ngModuleType\n        },\n        useClass: ngModuleType\n      };\n\n      _resolveProviders([ngModuleProvider], ProviderAstType.PublicService, true, sourceSpan, _this144._errors, _this144._allProviders,\n      /* isModule */\n      true);\n    });\n\n    _resolveProviders(ngModule.transitiveModule.providers.map(function (entry) {\n      return entry.provider;\n    }).concat(extraProviders), ProviderAstType.PublicService, false, sourceSpan, this._errors, this._allProviders,\n    /* isModule */\n    false);\n  }\n\n  _createClass(NgModuleProviderAnalyzer, [{\n    key: \"parse\",\n    value: function parse() {\n      var _this145 = this;\n\n      Array.from(this._allProviders.values()).forEach(function (provider) {\n        _this145._getOrCreateLocalProvider(provider.token, provider.eager);\n      });\n\n      if (this._errors.length > 0) {\n        var errorString = this._errors.join('\\n');\n\n        throw new Error(\"Provider parse errors:\\n\".concat(errorString));\n      } // Note: Maps keep their insertion order.\n\n\n      var lazyProviders = [];\n      var eagerProviders = [];\n\n      this._transformedProviders.forEach(function (provider) {\n        if (provider.eager) {\n          eagerProviders.push(provider);\n        } else {\n          lazyProviders.push(provider);\n        }\n      });\n\n      return lazyProviders.concat(eagerProviders);\n    }\n  }, {\n    key: \"_getOrCreateLocalProvider\",\n    value: function _getOrCreateLocalProvider(token, eager) {\n      var _this146 = this;\n\n      var resolvedProvider = this._allProviders.get(tokenReference(token));\n\n      if (!resolvedProvider) {\n        return null;\n      }\n\n      var transformedProviderAst = this._transformedProviders.get(tokenReference(token));\n\n      if (transformedProviderAst) {\n        return transformedProviderAst;\n      }\n\n      if (this._seenProviders.get(tokenReference(token)) != null) {\n        this._errors.push(new ProviderError(\"Cannot instantiate cyclic dependency! \".concat(tokenName(token)), resolvedProvider.sourceSpan));\n\n        return null;\n      }\n\n      this._seenProviders.set(tokenReference(token), true);\n\n      var transformedProviders = resolvedProvider.providers.map(function (provider) {\n        var transformedUseValue = provider.useValue;\n        var transformedUseExisting = provider.useExisting;\n        var transformedDeps = undefined;\n\n        if (provider.useExisting != null) {\n          var existingDiDep = _this146._getDependency({\n            token: provider.useExisting\n          }, eager, resolvedProvider.sourceSpan);\n\n          if (existingDiDep.token != null) {\n            transformedUseExisting = existingDiDep.token;\n          } else {\n            transformedUseExisting = null;\n            transformedUseValue = existingDiDep.value;\n          }\n        } else if (provider.useFactory) {\n          var deps = provider.deps || provider.useFactory.diDeps;\n          transformedDeps = deps.map(function (dep) {\n            return _this146._getDependency(dep, eager, resolvedProvider.sourceSpan);\n          });\n        } else if (provider.useClass) {\n          var _deps2 = provider.deps || provider.useClass.diDeps;\n\n          transformedDeps = _deps2.map(function (dep) {\n            return _this146._getDependency(dep, eager, resolvedProvider.sourceSpan);\n          });\n        }\n\n        return _transformProvider(provider, {\n          useExisting: transformedUseExisting,\n          useValue: transformedUseValue,\n          deps: transformedDeps\n        });\n      });\n      transformedProviderAst = _transformProviderAst(resolvedProvider, {\n        eager: eager,\n        providers: transformedProviders\n      });\n\n      this._transformedProviders.set(tokenReference(token), transformedProviderAst);\n\n      return transformedProviderAst;\n    }\n  }, {\n    key: \"_getDependency\",\n    value: function _getDependency(dep) {\n      var eager = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var requestorSourceSpan = arguments.length > 2 ? arguments[2] : undefined;\n      var foundLocal = false;\n\n      if (!dep.isSkipSelf && dep.token != null) {\n        // access the injector\n        if (tokenReference(dep.token) === this.reflector.resolveExternalReference(Identifiers$1.Injector) || tokenReference(dep.token) === this.reflector.resolveExternalReference(Identifiers$1.ComponentFactoryResolver)) {\n          foundLocal = true; // access providers\n        } else if (this._getOrCreateLocalProvider(dep.token, eager) != null) {\n          foundLocal = true;\n        }\n      }\n\n      return dep;\n    }\n  }]);\n\n  return NgModuleProviderAnalyzer;\n}();\n\nfunction _transformProvider(provider, _ref14) {\n  var useExisting = _ref14.useExisting,\n      useValue = _ref14.useValue,\n      deps = _ref14.deps;\n  return {\n    token: provider.token,\n    useClass: provider.useClass,\n    useExisting: useExisting,\n    useFactory: provider.useFactory,\n    useValue: useValue,\n    deps: deps,\n    multi: provider.multi\n  };\n}\n\nfunction _transformProviderAst(provider, _ref15) {\n  var eager = _ref15.eager,\n      providers = _ref15.providers;\n  return new ProviderAst(provider.token, provider.multiProvider, provider.eager || eager, providers, provider.providerType, provider.lifecycleHooks, provider.sourceSpan, provider.isModule);\n}\n\nfunction _resolveProvidersFromDirectives(directives, sourceSpan, targetErrors) {\n  var providersByToken = new Map();\n  directives.forEach(function (directive) {\n    var dirProvider = {\n      token: {\n        identifier: directive.type\n      },\n      useClass: directive.type\n    };\n\n    _resolveProviders([dirProvider], directive.isComponent ? ProviderAstType.Component : ProviderAstType.Directive, true, sourceSpan, targetErrors, providersByToken,\n    /* isModule */\n    false);\n  }); // Note: directives need to be able to overwrite providers of a component!\n\n  var directivesWithComponentFirst = directives.filter(function (dir) {\n    return dir.isComponent;\n  }).concat(directives.filter(function (dir) {\n    return !dir.isComponent;\n  }));\n  directivesWithComponentFirst.forEach(function (directive) {\n    _resolveProviders(directive.providers, ProviderAstType.PublicService, false, sourceSpan, targetErrors, providersByToken,\n    /* isModule */\n    false);\n\n    _resolveProviders(directive.viewProviders, ProviderAstType.PrivateService, false, sourceSpan, targetErrors, providersByToken,\n    /* isModule */\n    false);\n  });\n  return providersByToken;\n}\n\nfunction _resolveProviders(providers, providerType, eager, sourceSpan, targetErrors, targetProvidersByToken, isModule) {\n  providers.forEach(function (provider) {\n    var resolvedProvider = targetProvidersByToken.get(tokenReference(provider.token));\n\n    if (resolvedProvider != null && !!resolvedProvider.multiProvider !== !!provider.multi) {\n      targetErrors.push(new ProviderError(\"Mixing multi and non multi provider is not possible for token \".concat(tokenName(resolvedProvider.token)), sourceSpan));\n    }\n\n    if (!resolvedProvider) {\n      var lifecycleHooks = provider.token.identifier && provider.token.identifier.lifecycleHooks ? provider.token.identifier.lifecycleHooks : [];\n      var isUseValue = !(provider.useClass || provider.useExisting || provider.useFactory);\n      resolvedProvider = new ProviderAst(provider.token, !!provider.multi, eager || isUseValue, [provider], providerType, lifecycleHooks, sourceSpan, isModule);\n      targetProvidersByToken.set(tokenReference(provider.token), resolvedProvider);\n    } else {\n      if (!provider.multi) {\n        resolvedProvider.providers.length = 0;\n      }\n\n      resolvedProvider.providers.push(provider);\n    }\n  });\n}\n\nfunction _getViewQueries(component) {\n  // Note: queries start with id 1 so we can use the number in a Bloom filter!\n  var viewQueryId = 1;\n  var viewQueries = new Map();\n\n  if (component.viewQueries) {\n    component.viewQueries.forEach(function (query) {\n      return _addQueryToTokenMap(viewQueries, {\n        meta: query,\n        queryId: viewQueryId++\n      });\n    });\n  }\n\n  return viewQueries;\n}\n\nfunction _getContentQueries(contentQueryStartId, directives) {\n  var contentQueryId = contentQueryStartId;\n  var contentQueries = new Map();\n  directives.forEach(function (directive, directiveIndex) {\n    if (directive.queries) {\n      directive.queries.forEach(function (query) {\n        return _addQueryToTokenMap(contentQueries, {\n          meta: query,\n          queryId: contentQueryId++\n        });\n      });\n    }\n  });\n  return contentQueries;\n}\n\nfunction _addQueryToTokenMap(map, query) {\n  query.meta.selectors.forEach(function (token) {\n    var entry = map.get(tokenReference(token));\n\n    if (!entry) {\n      entry = [];\n      map.set(tokenReference(token), entry);\n    }\n\n    entry.push(query);\n  });\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar StyleWithImports = /*#__PURE__*/_createClass(function StyleWithImports(style, styleUrls) {\n  _classCallCheck(this, StyleWithImports);\n\n  this.style = style;\n  this.styleUrls = styleUrls;\n});\n\nfunction isStyleUrlResolvable(url) {\n  if (url == null || url.length === 0 || url[0] == '/') return false;\n  var schemeMatch = url.match(URL_WITH_SCHEMA_REGEXP);\n  return schemeMatch === null || schemeMatch[1] == 'package' || schemeMatch[1] == 'asset';\n}\n/**\n * Rewrites stylesheets by resolving and removing the @import urls that\n * are either relative or don't have a `package:` scheme\n */\n\n\nfunction extractStyleUrls(resolver, baseUrl, cssText) {\n  var foundUrls = [];\n  var modifiedCssText = cssText.replace(CSS_STRIPPABLE_COMMENT_REGEXP, '').replace(CSS_IMPORT_REGEXP, function () {\n    var url = (arguments.length <= 1 ? undefined : arguments[1]) || (arguments.length <= 2 ? undefined : arguments[2]);\n\n    if (!isStyleUrlResolvable(url)) {\n      // Do not attempt to resolve non-package absolute URLs with URI\n      // scheme\n      return arguments.length <= 0 ? undefined : arguments[0];\n    }\n\n    foundUrls.push(resolver.resolve(baseUrl, url));\n    return '';\n  });\n  return new StyleWithImports(modifiedCssText, foundUrls);\n}\n\nvar CSS_IMPORT_REGEXP = /@import\\s+(?:url\\()?\\s*(?:(?:['\"]([^'\"]*))|([^;\\)\\s]*))[^;]*;?/g;\nvar CSS_STRIPPABLE_COMMENT_REGEXP = /\\/\\*(?!#\\s*(?:sourceURL|sourceMappingURL)=)[\\s\\S]+?\\*\\//g;\nvar URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;\n/**\n * @license\n * Copyright Google LLC 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\nvar PROPERTY_PARTS_SEPARATOR = '.';\nvar ATTRIBUTE_PREFIX = 'attr';\nvar CLASS_PREFIX = 'class';\nvar STYLE_PREFIX = 'style';\nvar TEMPLATE_ATTR_PREFIX = '*';\nvar ANIMATE_PROP_PREFIX = 'animate-';\n/**\n * Parses bindings in templates and in the directive host area.\n */\n\nvar BindingParser = /*#__PURE__*/function () {\n  function BindingParser(_exprParser, _interpolationConfig, _schemaRegistry, pipes, errors) {\n    _classCallCheck(this, BindingParser);\n\n    this._exprParser = _exprParser;\n    this._interpolationConfig = _interpolationConfig;\n    this._schemaRegistry = _schemaRegistry;\n    this.errors = errors;\n    this.pipesByName = null;\n    this._usedPipes = new Map(); // When the `pipes` parameter is `null`, do not check for used pipes\n    // This is used in IVY when we might not know the available pipes at compile time\n\n    if (pipes) {\n      var pipesByName = new Map();\n      pipes.forEach(function (pipe) {\n        return pipesByName.set(pipe.name, pipe);\n      });\n      this.pipesByName = pipesByName;\n    }\n  }\n\n  _createClass(BindingParser, [{\n    key: \"interpolationConfig\",\n    get: function get() {\n      return this._interpolationConfig;\n    }\n  }, {\n    key: \"getUsedPipes\",\n    value: function getUsedPipes() {\n      return Array.from(this._usedPipes.values());\n    }\n  }, {\n    key: \"createBoundHostProperties\",\n    value: function createBoundHostProperties(dirMeta, sourceSpan) {\n      var _this147 = this;\n\n      if (dirMeta.hostProperties) {\n        var boundProps = [];\n        Object.keys(dirMeta.hostProperties).forEach(function (propName) {\n          var expression = dirMeta.hostProperties[propName];\n\n          if (typeof expression === 'string') {\n            _this147.parsePropertyBinding(propName, expression, true, sourceSpan, sourceSpan.start.offset, undefined, [], // Use the `sourceSpan` for  `keySpan`. This isn't really accurate, but neither is the\n            // sourceSpan, as it represents the sourceSpan of the host itself rather than the\n            // source of the host binding (which doesn't exist in the template). Regardless,\n            // neither of these values are used in Ivy but are only here to satisfy the function\n            // signature. This should likely be refactored in the future so that `sourceSpan`\n            // isn't being used inaccurately.\n            boundProps, sourceSpan);\n          } else {\n            _this147._reportError(\"Value of the host property binding \\\"\".concat(propName, \"\\\" needs to be a string representing an expression but got \\\"\").concat(expression, \"\\\" (\").concat(typeof expression, \")\"), sourceSpan);\n          }\n        });\n        return boundProps;\n      }\n\n      return null;\n    }\n  }, {\n    key: \"createDirectiveHostPropertyAsts\",\n    value: function createDirectiveHostPropertyAsts(dirMeta, elementSelector, sourceSpan) {\n      var _this148 = this;\n\n      var boundProps = this.createBoundHostProperties(dirMeta, sourceSpan);\n      return boundProps && boundProps.map(function (prop) {\n        return _this148.createBoundElementProperty(elementSelector, prop);\n      });\n    }\n  }, {\n    key: \"createDirectiveHostEventAsts\",\n    value: function createDirectiveHostEventAsts(dirMeta, sourceSpan) {\n      var _this149 = this;\n\n      if (dirMeta.hostListeners) {\n        var targetEvents = [];\n        Object.keys(dirMeta.hostListeners).forEach(function (propName) {\n          var expression = dirMeta.hostListeners[propName];\n\n          if (typeof expression === 'string') {\n            // Use the `sourceSpan` for  `keySpan` and `handlerSpan`. This isn't really accurate, but\n            // neither is the `sourceSpan`, as it represents the `sourceSpan` of the host itself\n            // rather than the source of the host binding (which doesn't exist in the template).\n            // Regardless, neither of these values are used in Ivy but are only here to satisfy the\n            // function signature. This should likely be refactored in the future so that `sourceSpan`\n            // isn't being used inaccurately.\n            _this149.parseEvent(propName, expression, sourceSpan, sourceSpan, [], targetEvents, sourceSpan);\n          } else {\n            _this149._reportError(\"Value of the host listener \\\"\".concat(propName, \"\\\" needs to be a string representing an expression but got \\\"\").concat(expression, \"\\\" (\").concat(typeof expression, \")\"), sourceSpan);\n          }\n        });\n        return targetEvents;\n      }\n\n      return null;\n    }\n  }, {\n    key: \"parseInterpolation\",\n    value: function parseInterpolation(value, sourceSpan) {\n      var sourceInfo = sourceSpan.start.toString();\n      var absoluteOffset = sourceSpan.fullStart.offset;\n\n      try {\n        var ast = this._exprParser.parseInterpolation(value, sourceInfo, absoluteOffset, this._interpolationConfig);\n\n        if (ast) this._reportExpressionParserErrors(ast.errors, sourceSpan);\n\n        this._checkPipes(ast, sourceSpan);\n\n        return ast;\n      } catch (e) {\n        this._reportError(\"\".concat(e), sourceSpan);\n\n        return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n      }\n    }\n    /**\n     * Similar to `parseInterpolation`, but treats the provided string as a single expression\n     * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).\n     * This is used for parsing the switch expression in ICUs.\n     */\n\n  }, {\n    key: \"parseInterpolationExpression\",\n    value: function parseInterpolationExpression(expression, sourceSpan) {\n      var sourceInfo = sourceSpan.start.toString();\n      var absoluteOffset = sourceSpan.start.offset;\n\n      try {\n        var ast = this._exprParser.parseInterpolationExpression(expression, sourceInfo, absoluteOffset);\n\n        if (ast) this._reportExpressionParserErrors(ast.errors, sourceSpan);\n\n        this._checkPipes(ast, sourceSpan);\n\n        return ast;\n      } catch (e) {\n        this._reportError(\"\".concat(e), sourceSpan);\n\n        return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n      }\n    }\n    /**\n     * Parses the bindings in a microsyntax expression, and converts them to\n     * `ParsedProperty` or `ParsedVariable`.\n     *\n     * @param tplKey template binding name\n     * @param tplValue template binding value\n     * @param sourceSpan span of template binding relative to entire the template\n     * @param absoluteValueOffset start of the tplValue relative to the entire template\n     * @param targetMatchableAttrs potential attributes to match in the template\n     * @param targetProps target property bindings in the template\n     * @param targetVars target variables in the template\n     */\n\n  }, {\n    key: \"parseInlineTemplateBinding\",\n    value: function parseInlineTemplateBinding(tplKey, tplValue, sourceSpan, absoluteValueOffset, targetMatchableAttrs, targetProps, targetVars, isIvyAst) {\n      var absoluteKeyOffset = sourceSpan.start.offset + TEMPLATE_ATTR_PREFIX.length;\n\n      var bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset);\n\n      var _iterator9 = _createForOfIteratorHelper(bindings),\n          _step9;\n\n      try {\n        for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n          var binding = _step9.value;\n          // sourceSpan is for the entire HTML attribute. bindingSpan is for a particular\n          // binding within the microsyntax expression so it's more narrow than sourceSpan.\n          var bindingSpan = moveParseSourceSpan(sourceSpan, binding.sourceSpan);\n          var key = binding.key.source;\n          var keySpan = moveParseSourceSpan(sourceSpan, binding.key.span);\n\n          if (binding instanceof VariableBinding) {\n            var value = binding.value ? binding.value.source : '$implicit';\n            var valueSpan = binding.value ? moveParseSourceSpan(sourceSpan, binding.value.span) : undefined;\n            targetVars.push(new ParsedVariable(key, value, bindingSpan, keySpan, valueSpan));\n          } else if (binding.value) {\n            var srcSpan = isIvyAst ? bindingSpan : sourceSpan;\n\n            var _valueSpan = moveParseSourceSpan(sourceSpan, binding.value.ast.sourceSpan);\n\n            this._parsePropertyAst(key, binding.value, srcSpan, keySpan, _valueSpan, targetMatchableAttrs, targetProps);\n          } else {\n            targetMatchableAttrs.push([key, ''\n            /* value */\n            ]); // Since this is a literal attribute with no RHS, source span should be\n            // just the key span.\n\n            this.parseLiteralAttr(key, null\n            /* value */\n            , keySpan, absoluteValueOffset, undefined\n            /* valueSpan */\n            , targetMatchableAttrs, targetProps, keySpan);\n          }\n        }\n      } catch (err) {\n        _iterator9.e(err);\n      } finally {\n        _iterator9.f();\n      }\n    }\n    /**\n     * Parses the bindings in a microsyntax expression, e.g.\n     * ```\n     *    <tag *tplKey=\"let value1 = prop; let value2 = localVar\">\n     * ```\n     *\n     * @param tplKey template binding name\n     * @param tplValue template binding value\n     * @param sourceSpan span of template binding relative to entire the template\n     * @param absoluteKeyOffset start of the `tplKey`\n     * @param absoluteValueOffset start of the `tplValue`\n     */\n\n  }, {\n    key: \"_parseTemplateBindings\",\n    value: function _parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset) {\n      var _this150 = this;\n\n      var sourceInfo = sourceSpan.start.toString();\n\n      try {\n        var bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceInfo, absoluteKeyOffset, absoluteValueOffset);\n\n        this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);\n\n        bindingsResult.templateBindings.forEach(function (binding) {\n          if (binding.value instanceof ASTWithSource) {\n            _this150._checkPipes(binding.value, sourceSpan);\n          }\n        });\n        bindingsResult.warnings.forEach(function (warning) {\n          _this150._reportError(warning, sourceSpan, ParseErrorLevel.WARNING);\n        });\n        return bindingsResult.templateBindings;\n      } catch (e) {\n        this._reportError(\"\".concat(e), sourceSpan);\n\n        return [];\n      }\n    }\n  }, {\n    key: \"parseLiteralAttr\",\n    value: function parseLiteralAttr(name, value, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, // TODO(atscott): keySpan is only optional here so VE template parser implementation does not\n    // have to change This should be required when VE is removed.\n    targetProps, keySpan) {\n      if (isAnimationLabel(name)) {\n        name = name.substring(1);\n\n        if (keySpan !== undefined) {\n          keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n        }\n\n        if (value) {\n          this._reportError(\"Assigning animation triggers via @prop=\\\"exp\\\" attributes with an expression is invalid.\" + \" Use property bindings (e.g. [@prop]=\\\"exp\\\") or use an attribute without a value (e.g. @prop) instead.\", sourceSpan, ParseErrorLevel.ERROR);\n        }\n\n        this._parseAnimation(name, value, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n      } else {\n        targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, '', absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, keySpan, valueSpan));\n      }\n    }\n  }, {\n    key: \"parsePropertyBinding\",\n    value: function parsePropertyBinding(name, expression, isHost, sourceSpan, absoluteOffset, valueSpan, // TODO(atscott): keySpan is only optional here so VE template parser implementation does not\n    // have to change This should be required when VE is removed.\n    targetMatchableAttrs, targetProps, keySpan) {\n      if (name.length === 0) {\n        this._reportError(\"Property name is missing in binding\", sourceSpan);\n      }\n\n      var isAnimationProp = false;\n\n      if (name.startsWith(ANIMATE_PROP_PREFIX)) {\n        isAnimationProp = true;\n        name = name.substring(ANIMATE_PROP_PREFIX.length);\n\n        if (keySpan !== undefined) {\n          keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + ANIMATE_PROP_PREFIX.length, keySpan.end.offset));\n        }\n      } else if (isAnimationLabel(name)) {\n        isAnimationProp = true;\n        name = name.substring(1);\n\n        if (keySpan !== undefined) {\n          keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n        }\n      }\n\n      if (isAnimationProp) {\n        this._parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n      } else {\n        this._parsePropertyAst(name, this._parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n      }\n    }\n  }, {\n    key: \"parsePropertyInterpolation\",\n    value: function parsePropertyInterpolation(name, value, sourceSpan, valueSpan, targetMatchableAttrs, // TODO(atscott): keySpan is only optional here so VE template parser implementation does not\n    // have to change This should be required when VE is removed.\n    targetProps, keySpan) {\n      var expr = this.parseInterpolation(value, valueSpan || sourceSpan);\n\n      if (expr) {\n        this._parsePropertyAst(name, expr, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);\n\n        return true;\n      }\n\n      return false;\n    }\n  }, {\n    key: \"_parsePropertyAst\",\n    value: function _parsePropertyAst(name, ast, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {\n      targetMatchableAttrs.push([name, ast.source]);\n      targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));\n    }\n  }, {\n    key: \"_parseAnimation\",\n    value: function _parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {\n      if (name.length === 0) {\n        this._reportError('Animation trigger is missing', sourceSpan);\n      } // This will occur when a @trigger is not paired with an expression.\n      // For animations it is valid to not have an expression since */void\n      // states will be applied by angular when the element is attached/detached\n\n\n      var ast = this._parseBinding(expression || 'undefined', false, valueSpan || sourceSpan, absoluteOffset);\n\n      targetMatchableAttrs.push([name, ast.source]);\n      targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan, keySpan, valueSpan));\n    }\n  }, {\n    key: \"_parseBinding\",\n    value: function _parseBinding(value, isHostBinding, sourceSpan, absoluteOffset) {\n      var sourceInfo = (sourceSpan && sourceSpan.start || '(unknown)').toString();\n\n      try {\n        var ast = isHostBinding ? this._exprParser.parseSimpleBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig) : this._exprParser.parseBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig);\n        if (ast) this._reportExpressionParserErrors(ast.errors, sourceSpan);\n\n        this._checkPipes(ast, sourceSpan);\n\n        return ast;\n      } catch (e) {\n        this._reportError(\"\".concat(e), sourceSpan);\n\n        return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n      }\n    }\n  }, {\n    key: \"createBoundElementProperty\",\n    value: function createBoundElementProperty(elementSelector, boundProp) {\n      var skipValidation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var mapPropertyName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n\n      if (boundProp.isAnimation) {\n        return new BoundElementProperty(boundProp.name, 4\n        /* Animation */\n        , SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);\n      }\n\n      var unit = null;\n      var bindingType = undefined;\n      var boundPropertyName = null;\n      var parts = boundProp.name.split(PROPERTY_PARTS_SEPARATOR);\n      var securityContexts = undefined; // Check for special cases (prefix style, attr, class)\n\n      if (parts.length > 1) {\n        if (parts[0] == ATTRIBUTE_PREFIX) {\n          boundPropertyName = parts.slice(1).join(PROPERTY_PARTS_SEPARATOR);\n\n          if (!skipValidation) {\n            this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, true);\n          }\n\n          securityContexts = _calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, true);\n          var nsSeparatorIdx = boundPropertyName.indexOf(':');\n\n          if (nsSeparatorIdx > -1) {\n            var ns = boundPropertyName.substring(0, nsSeparatorIdx);\n            var name = boundPropertyName.substring(nsSeparatorIdx + 1);\n            boundPropertyName = mergeNsAndName(ns, name);\n          }\n\n          bindingType = 1\n          /* Attribute */\n          ;\n        } else if (parts[0] == CLASS_PREFIX) {\n          boundPropertyName = parts[1];\n          bindingType = 2\n          /* Class */\n          ;\n          securityContexts = [SecurityContext.NONE];\n        } else if (parts[0] == STYLE_PREFIX) {\n          unit = parts.length > 2 ? parts[2] : null;\n          boundPropertyName = parts[1];\n          bindingType = 3\n          /* Style */\n          ;\n          securityContexts = [SecurityContext.STYLE];\n        }\n      } // If not a special case, use the full property name\n\n\n      if (boundPropertyName === null) {\n        var mappedPropName = this._schemaRegistry.getMappedPropName(boundProp.name);\n\n        boundPropertyName = mapPropertyName ? mappedPropName : boundProp.name;\n        securityContexts = _calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, mappedPropName, false);\n        bindingType = 0\n        /* Property */\n        ;\n\n        if (!skipValidation) {\n          this._validatePropertyOrAttributeName(mappedPropName, boundProp.sourceSpan, false);\n        }\n      }\n\n      return new BoundElementProperty(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);\n    } // TODO: keySpan should be required but was made optional to avoid changing VE parser.\n\n  }, {\n    key: \"parseEvent\",\n    value: function parseEvent(name, expression, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {\n      if (name.length === 0) {\n        this._reportError(\"Event name is missing in binding\", sourceSpan);\n      }\n\n      if (isAnimationLabel(name)) {\n        name = name.substr(1);\n\n        if (keySpan !== undefined) {\n          keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));\n        }\n\n        this._parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan);\n      } else {\n        this._parseRegularEvent(name, expression, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);\n      }\n    }\n  }, {\n    key: \"calcPossibleSecurityContexts\",\n    value: function calcPossibleSecurityContexts(selector, propName, isAttribute) {\n      var prop = this._schemaRegistry.getMappedPropName(propName);\n\n      return _calcPossibleSecurityContexts(this._schemaRegistry, selector, prop, isAttribute);\n    }\n  }, {\n    key: \"_parseAnimationEvent\",\n    value: function _parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan) {\n      var matches = splitAtPeriod(name, [name, '']);\n      var eventName = matches[0];\n      var phase = matches[1].toLowerCase();\n\n      var ast = this._parseAction(expression, handlerSpan);\n\n      targetEvents.push(new ParsedEvent(eventName, phase, 1\n      /* Animation */\n      , ast, sourceSpan, handlerSpan, keySpan));\n\n      if (eventName.length === 0) {\n        this._reportError(\"Animation event name is missing in binding\", sourceSpan);\n      }\n\n      if (phase) {\n        if (phase !== 'start' && phase !== 'done') {\n          this._reportError(\"The provided animation output phase value \\\"\".concat(phase, \"\\\" for \\\"@\").concat(eventName, \"\\\" is not supported (use start or done)\"), sourceSpan);\n        }\n      } else {\n        this._reportError(\"The animation trigger output event (@\".concat(eventName, \") is missing its phase value name (start or done are currently supported)\"), sourceSpan);\n      }\n    }\n  }, {\n    key: \"_parseRegularEvent\",\n    value: function _parseRegularEvent(name, expression, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {\n      // long format: 'target: eventName'\n      var _splitAtColon3 = splitAtColon(name, [null, name]),\n          _splitAtColon4 = _slicedToArray(_splitAtColon3, 2),\n          target = _splitAtColon4[0],\n          eventName = _splitAtColon4[1];\n\n      var ast = this._parseAction(expression, handlerSpan);\n\n      targetMatchableAttrs.push([name, ast.source]);\n      targetEvents.push(new ParsedEvent(eventName, target, 0\n      /* Regular */\n      , ast, sourceSpan, handlerSpan, keySpan)); // Don't detect directives for event names for now,\n      // so don't add the event name to the matchableAttrs\n    }\n  }, {\n    key: \"_parseAction\",\n    value: function _parseAction(value, sourceSpan) {\n      var sourceInfo = (sourceSpan && sourceSpan.start || '(unknown').toString();\n      var absoluteOffset = sourceSpan && sourceSpan.start ? sourceSpan.start.offset : 0;\n\n      try {\n        var ast = this._exprParser.parseAction(value, sourceInfo, absoluteOffset, this._interpolationConfig);\n\n        if (ast) {\n          this._reportExpressionParserErrors(ast.errors, sourceSpan);\n        }\n\n        if (!ast || ast.ast instanceof EmptyExpr) {\n          this._reportError(\"Empty expressions are not allowed\", sourceSpan);\n\n          return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n        }\n\n        this._checkPipes(ast, sourceSpan);\n\n        return ast;\n      } catch (e) {\n        this._reportError(\"\".concat(e), sourceSpan);\n\n        return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n      }\n    }\n  }, {\n    key: \"_reportError\",\n    value: function _reportError(message, sourceSpan) {\n      var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ParseErrorLevel.ERROR;\n      this.errors.push(new ParseError(sourceSpan, message, level));\n    }\n  }, {\n    key: \"_reportExpressionParserErrors\",\n    value: function _reportExpressionParserErrors(errors, sourceSpan) {\n      var _iterator10 = _createForOfIteratorHelper(errors),\n          _step10;\n\n      try {\n        for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n          var _error = _step10.value;\n\n          this._reportError(_error.message, sourceSpan);\n        }\n      } catch (err) {\n        _iterator10.e(err);\n      } finally {\n        _iterator10.f();\n      }\n    } // Make sure all the used pipes are known in `this.pipesByName`\n\n  }, {\n    key: \"_checkPipes\",\n    value: function _checkPipes(ast, sourceSpan) {\n      var _this151 = this;\n\n      if (ast && this.pipesByName) {\n        var collector = new PipeCollector();\n        ast.visit(collector);\n        collector.pipes.forEach(function (ast, pipeName) {\n          var pipeMeta = _this151.pipesByName.get(pipeName);\n\n          if (!pipeMeta) {\n            _this151._reportError(\"The pipe '\".concat(pipeName, \"' could not be found\"), new ParseSourceSpan(sourceSpan.start.moveBy(ast.span.start), sourceSpan.start.moveBy(ast.span.end)));\n          } else {\n            _this151._usedPipes.set(pipeName, pipeMeta);\n          }\n        });\n      }\n    }\n    /**\n     * @param propName the name of the property / attribute\n     * @param sourceSpan\n     * @param isAttr true when binding to an attribute\n     */\n\n  }, {\n    key: \"_validatePropertyOrAttributeName\",\n    value: function _validatePropertyOrAttributeName(propName, sourceSpan, isAttr) {\n      var report = isAttr ? this._schemaRegistry.validateAttribute(propName) : this._schemaRegistry.validateProperty(propName);\n\n      if (report.error) {\n        this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);\n      }\n    }\n  }]);\n\n  return BindingParser;\n}();\n\nvar PipeCollector = /*#__PURE__*/function (_RecursiveAstVisitor$) {\n  _inherits(PipeCollector, _RecursiveAstVisitor$);\n\n  var _super94 = _createSuper(PipeCollector);\n\n  function PipeCollector() {\n    var _this152;\n\n    _classCallCheck(this, PipeCollector);\n\n    _this152 = _super94.apply(this, arguments);\n    _this152.pipes = new Map();\n    return _this152;\n  }\n\n  _createClass(PipeCollector, [{\n    key: \"visitPipe\",\n    value: function visitPipe(ast, context) {\n      this.pipes.set(ast.name, ast);\n      ast.exp.visit(this);\n      this.visitAll(ast.args, context);\n      return null;\n    }\n  }]);\n\n  return PipeCollector;\n}(RecursiveAstVisitor$1);\n\nfunction isAnimationLabel(name) {\n  return name[0] == '@';\n}\n\nfunction _calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {\n  var ctxs = [];\n  CssSelector.parse(selector).forEach(function (selector) {\n    var elementNames = selector.element ? [selector.element] : registry.allKnownElementNames();\n    var notElementNames = new Set(selector.notSelectors.filter(function (selector) {\n      return selector.isElementSelector();\n    }).map(function (selector) {\n      return selector.element;\n    }));\n    var possibleElementNames = elementNames.filter(function (elementName) {\n      return !notElementNames.has(elementName);\n    });\n    ctxs.push.apply(ctxs, _toConsumableArray(possibleElementNames.map(function (elementName) {\n      return registry.securityContext(elementName, propName, isAttribute);\n    })));\n  });\n  return ctxs.length === 0 ? [SecurityContext.NONE] : Array.from(new Set(ctxs)).sort();\n}\n/**\n * Compute a new ParseSourceSpan based off an original `sourceSpan` by using\n * absolute offsets from the specified `absoluteSpan`.\n *\n * @param sourceSpan original source span\n * @param absoluteSpan absolute source span to move to\n */\n\n\nfunction moveParseSourceSpan(sourceSpan, absoluteSpan) {\n  // The difference of two absolute offsets provide the relative offset\n  var startDiff = absoluteSpan.start - sourceSpan.start.offset;\n  var endDiff = absoluteSpan.end - sourceSpan.end.offset;\n  return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar NG_CONTENT_SELECT_ATTR = 'select';\nvar LINK_ELEMENT = 'link';\nvar LINK_STYLE_REL_ATTR = 'rel';\nvar LINK_STYLE_HREF_ATTR = 'href';\nvar LINK_STYLE_REL_VALUE = 'stylesheet';\nvar STYLE_ELEMENT = 'style';\nvar SCRIPT_ELEMENT = 'script';\nvar NG_NON_BINDABLE_ATTR = 'ngNonBindable';\nvar NG_PROJECT_AS = 'ngProjectAs';\n\nfunction preparseElement(ast) {\n  var selectAttr = null;\n  var hrefAttr = null;\n  var relAttr = null;\n  var nonBindable = false;\n  var projectAs = '';\n  ast.attrs.forEach(function (attr) {\n    var lcAttrName = attr.name.toLowerCase();\n\n    if (lcAttrName == NG_CONTENT_SELECT_ATTR) {\n      selectAttr = attr.value;\n    } else if (lcAttrName == LINK_STYLE_HREF_ATTR) {\n      hrefAttr = attr.value;\n    } else if (lcAttrName == LINK_STYLE_REL_ATTR) {\n      relAttr = attr.value;\n    } else if (attr.name == NG_NON_BINDABLE_ATTR) {\n      nonBindable = true;\n    } else if (attr.name == NG_PROJECT_AS) {\n      if (attr.value.length > 0) {\n        projectAs = attr.value;\n      }\n    }\n  });\n  selectAttr = normalizeNgContentSelect(selectAttr);\n  var nodeName = ast.name.toLowerCase();\n  var type = PreparsedElementType.OTHER;\n\n  if (isNgContent(nodeName)) {\n    type = PreparsedElementType.NG_CONTENT;\n  } else if (nodeName == STYLE_ELEMENT) {\n    type = PreparsedElementType.STYLE;\n  } else if (nodeName == SCRIPT_ELEMENT) {\n    type = PreparsedElementType.SCRIPT;\n  } else if (nodeName == LINK_ELEMENT && relAttr == LINK_STYLE_REL_VALUE) {\n    type = PreparsedElementType.STYLESHEET;\n  }\n\n  return new PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs);\n}\n\nvar PreparsedElementType = /*@__PURE__*/function (PreparsedElementType) {\n  PreparsedElementType[PreparsedElementType[\"NG_CONTENT\"] = 0] = \"NG_CONTENT\";\n  PreparsedElementType[PreparsedElementType[\"STYLE\"] = 1] = \"STYLE\";\n  PreparsedElementType[PreparsedElementType[\"STYLESHEET\"] = 2] = \"STYLESHEET\";\n  PreparsedElementType[PreparsedElementType[\"SCRIPT\"] = 3] = \"SCRIPT\";\n  PreparsedElementType[PreparsedElementType[\"OTHER\"] = 4] = \"OTHER\";\n  return PreparsedElementType;\n}({});\n\nvar PreparsedElement = /*#__PURE__*/_createClass(function PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs) {\n  _classCallCheck(this, PreparsedElement);\n\n  this.type = type;\n  this.selectAttr = selectAttr;\n  this.hrefAttr = hrefAttr;\n  this.nonBindable = nonBindable;\n  this.projectAs = projectAs;\n});\n\nfunction normalizeNgContentSelect(selectAttr) {\n  if (selectAttr === null || selectAttr.length === 0) {\n    return '*';\n  }\n\n  return selectAttr;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar BIND_NAME_REGEXP = /^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*))|\\[\\(([^\\)]+)\\)\\]|\\[([^\\]]+)\\]|\\(([^\\)]+)\\))$/; // Group 1 = \"bind-\"\n\nvar KW_BIND_IDX = 1; // Group 2 = \"let-\"\n\nvar KW_LET_IDX = 2; // Group 3 = \"ref-/#\"\n\nvar KW_REF_IDX = 3; // Group 4 = \"on-\"\n\nvar KW_ON_IDX = 4; // Group 5 = \"bindon-\"\n\nvar KW_BINDON_IDX = 5; // Group 6 = \"@\"\n\nvar KW_AT_IDX = 6; // Group 7 = the identifier after \"bind-\", \"let-\", \"ref-/#\", \"on-\", \"bindon-\" or \"@\"\n\nvar IDENT_KW_IDX = 7; // Group 8 = identifier inside [()]\n\nvar IDENT_BANANA_BOX_IDX = 8; // Group 9 = identifier inside []\n\nvar IDENT_PROPERTY_IDX = 9; // Group 10 = identifier inside ()\n\nvar IDENT_EVENT_IDX = 10;\nvar TEMPLATE_ATTR_PREFIX$1 = '*';\nvar CLASS_ATTR = 'class';\n\nvar _TEXT_CSS_SELECTOR;\n\nfunction TEXT_CSS_SELECTOR() {\n  if (!_TEXT_CSS_SELECTOR) {\n    _TEXT_CSS_SELECTOR = CssSelector.parse('*')[0];\n  }\n\n  return _TEXT_CSS_SELECTOR;\n}\n\nvar TemplateParseError = /*#__PURE__*/function (_ParseError5) {\n  _inherits(TemplateParseError, _ParseError5);\n\n  var _super95 = _createSuper(TemplateParseError);\n\n  function TemplateParseError(message, span, level) {\n    _classCallCheck(this, TemplateParseError);\n\n    return _super95.call(this, span, message, level);\n  }\n\n  return _createClass(TemplateParseError);\n}(ParseError);\n\nvar TemplateParseResult = /*#__PURE__*/_createClass(function TemplateParseResult(templateAst, usedPipes, errors) {\n  _classCallCheck(this, TemplateParseResult);\n\n  this.templateAst = templateAst;\n  this.usedPipes = usedPipes;\n  this.errors = errors;\n});\n\nvar TemplateParser = /*#__PURE__*/function () {\n  function TemplateParser(_config, _reflector, _exprParser, _schemaRegistry, _htmlParser, _console, transforms) {\n    _classCallCheck(this, TemplateParser);\n\n    this._config = _config;\n    this._reflector = _reflector;\n    this._exprParser = _exprParser;\n    this._schemaRegistry = _schemaRegistry;\n    this._htmlParser = _htmlParser;\n    this._console = _console;\n    this.transforms = transforms;\n  }\n\n  _createClass(TemplateParser, [{\n    key: \"expressionParser\",\n    get: function get() {\n      return this._exprParser;\n    }\n  }, {\n    key: \"parse\",\n    value: function parse(component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces) {\n      var _a;\n\n      var result = this.tryParse(component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces);\n      var warnings = result.errors.filter(function (error) {\n        return error.level === ParseErrorLevel.WARNING;\n      });\n      var errors = result.errors.filter(function (error) {\n        return error.level === ParseErrorLevel.ERROR;\n      });\n\n      if (warnings.length > 0) {\n        (_a = this._console) === null || _a === void 0 ? void 0 : _a.warn(\"Template parse warnings:\\n\".concat(warnings.join('\\n')));\n      }\n\n      if (errors.length > 0) {\n        var errorString = errors.join('\\n');\n        throw syntaxError(\"Template parse errors:\\n\".concat(errorString), errors);\n      }\n\n      return {\n        template: result.templateAst,\n        pipes: result.usedPipes\n      };\n    }\n  }, {\n    key: \"tryParse\",\n    value: function tryParse(component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces) {\n      var htmlParseResult = typeof template === 'string' ? this._htmlParser.parse(template, templateUrl, {\n        tokenizeExpansionForms: true,\n        interpolationConfig: this.getInterpolationConfig(component)\n      }) : template;\n\n      if (!preserveWhitespaces) {\n        htmlParseResult = removeWhitespaces(htmlParseResult);\n      }\n\n      return this.tryParseHtml(this.expandHtml(htmlParseResult), component, directives, pipes, schemas);\n    }\n  }, {\n    key: \"tryParseHtml\",\n    value: function tryParseHtml(htmlAstWithErrors, component, directives, pipes, schemas) {\n      var result;\n      var errors = htmlAstWithErrors.errors;\n      var usedPipes = [];\n\n      if (htmlAstWithErrors.rootNodes.length > 0) {\n        var uniqDirectives = removeSummaryDuplicates(directives);\n        var uniqPipes = removeSummaryDuplicates(pipes);\n        var providerViewContext = new ProviderViewContext(this._reflector, component);\n        var interpolationConfig = undefined;\n\n        if (component.template && component.template.interpolation) {\n          interpolationConfig = {\n            start: component.template.interpolation[0],\n            end: component.template.interpolation[1]\n          };\n        }\n\n        var bindingParser = new BindingParser(this._exprParser, interpolationConfig, this._schemaRegistry, uniqPipes, errors);\n        var parseVisitor = new TemplateParseVisitor(this._reflector, this._config, providerViewContext, uniqDirectives, bindingParser, this._schemaRegistry, schemas, errors);\n        result = visitAll$1(parseVisitor, htmlAstWithErrors.rootNodes, EMPTY_ELEMENT_CONTEXT);\n        errors.push.apply(errors, _toConsumableArray(providerViewContext.errors));\n        usedPipes.push.apply(usedPipes, _toConsumableArray(bindingParser.getUsedPipes()));\n      } else {\n        result = [];\n      }\n\n      this._assertNoReferenceDuplicationOnTemplate(result, errors);\n\n      if (errors.length > 0) {\n        return new TemplateParseResult(result, usedPipes, errors);\n      }\n\n      if (this.transforms) {\n        this.transforms.forEach(function (transform) {\n          result = templateVisitAll(transform, result);\n        });\n      }\n\n      return new TemplateParseResult(result, usedPipes, errors);\n    }\n  }, {\n    key: \"expandHtml\",\n    value: function expandHtml(htmlAstWithErrors) {\n      var forced = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var errors = htmlAstWithErrors.errors;\n\n      if (errors.length == 0 || forced) {\n        // Transform ICU messages to angular directives\n        var expandedHtmlAst = expandNodes(htmlAstWithErrors.rootNodes);\n        errors.push.apply(errors, _toConsumableArray(expandedHtmlAst.errors));\n        htmlAstWithErrors = new ParseTreeResult(expandedHtmlAst.nodes, errors);\n      }\n\n      return htmlAstWithErrors;\n    }\n  }, {\n    key: \"getInterpolationConfig\",\n    value: function getInterpolationConfig(component) {\n      if (component.template) {\n        return InterpolationConfig.fromArray(component.template.interpolation);\n      }\n\n      return undefined;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_assertNoReferenceDuplicationOnTemplate\",\n    value: function _assertNoReferenceDuplicationOnTemplate(result, errors) {\n      var existingReferences = [];\n      result.filter(function (element) {\n        return !!element.references;\n      }).forEach(function (element) {\n        return element.references.forEach(function (reference) {\n          var name = reference.name;\n\n          if (existingReferences.indexOf(name) < 0) {\n            existingReferences.push(name);\n          } else {\n            var _error2 = new TemplateParseError(\"Reference \\\"#\".concat(name, \"\\\" is defined several times\"), reference.sourceSpan, ParseErrorLevel.ERROR);\n\n            errors.push(_error2);\n          }\n        });\n      });\n    }\n  }]);\n\n  return TemplateParser;\n}();\n\nvar TemplateParseVisitor = /*#__PURE__*/function () {\n  function TemplateParseVisitor(reflector, config, providerViewContext, directives, _bindingParser, _schemaRegistry, _schemas, _targetErrors) {\n    var _this153 = this;\n\n    _classCallCheck(this, TemplateParseVisitor);\n\n    this.reflector = reflector;\n    this.config = config;\n    this.providerViewContext = providerViewContext;\n    this._bindingParser = _bindingParser;\n    this._schemaRegistry = _schemaRegistry;\n    this._schemas = _schemas;\n    this._targetErrors = _targetErrors;\n    this.selectorMatcher = new SelectorMatcher();\n    this.directivesIndex = new Map();\n    this.ngContentCount = 0; // Note: queries start with id 1 so we can use the number in a Bloom filter!\n\n    this.contentQueryStartId = providerViewContext.component.viewQueries.length + 1;\n    directives.forEach(function (directive, index) {\n      var selector = CssSelector.parse(directive.selector);\n\n      _this153.selectorMatcher.addSelectables(selector, directive);\n\n      _this153.directivesIndex.set(directive, index);\n    });\n  }\n\n  _createClass(TemplateParseVisitor, [{\n    key: \"visitExpansion\",\n    value: function visitExpansion(expansion, context) {\n      return null;\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(expansionCase, context) {\n      return null;\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, parent) {\n      var ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR());\n      var valueNoNgsp = replaceNgsp(text.value);\n\n      var expr = this._bindingParser.parseInterpolation(valueNoNgsp, text.sourceSpan);\n\n      return expr ? new BoundTextAst(expr, ngContentIndex, text.sourceSpan) : new TextAst(valueNoNgsp, ngContentIndex, text.sourceSpan);\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {\n      return new AttrAst(attribute.name, attribute.value, attribute.sourceSpan);\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {\n      return null;\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(element, parent) {\n      var _this154 = this;\n\n      var queryStartIndex = this.contentQueryStartId;\n      var elName = element.name;\n      var preparsedElement = preparseElement(element);\n\n      if (preparsedElement.type === PreparsedElementType.SCRIPT || preparsedElement.type === PreparsedElementType.STYLE) {\n        // Skipping <script> for security reasons\n        // Skipping <style> as we already processed them\n        // in the StyleCompiler\n        return null;\n      }\n\n      if (preparsedElement.type === PreparsedElementType.STYLESHEET && isStyleUrlResolvable(preparsedElement.hrefAttr)) {\n        // Skipping stylesheets with either relative urls or package scheme as we already processed\n        // them in the StyleCompiler\n        return null;\n      }\n\n      var matchableAttrs = [];\n      var elementOrDirectiveProps = [];\n      var elementOrDirectiveRefs = [];\n      var elementVars = [];\n      var events = [];\n      var templateElementOrDirectiveProps = [];\n      var templateMatchableAttrs = [];\n      var templateElementVars = [];\n      var hasInlineTemplates = false;\n      var attrs = [];\n      var isTemplateElement = isNgTemplate(element.name);\n      element.attrs.forEach(function (attr) {\n        var parsedVariables = [];\n\n        var hasBinding = _this154._parseAttr(isTemplateElement, attr, matchableAttrs, elementOrDirectiveProps, events, elementOrDirectiveRefs, elementVars);\n\n        elementVars.push.apply(elementVars, _toConsumableArray(parsedVariables.map(function (v) {\n          return VariableAst.fromParsedVariable(v);\n        })));\n        var templateValue;\n        var templateKey;\n\n        var normalizedName = _this154._normalizeAttributeName(attr.name);\n\n        if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX$1)) {\n          templateValue = attr.value;\n          templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX$1.length);\n        }\n\n        var hasTemplateBinding = templateValue != null;\n\n        if (hasTemplateBinding) {\n          if (hasInlineTemplates) {\n            _this154._reportError(\"Can't have multiple template bindings on one element. Use only one attribute prefixed with *\", attr.sourceSpan);\n          }\n\n          hasInlineTemplates = true;\n          var _parsedVariables = [];\n          var absoluteOffset = (attr.valueSpan || attr.sourceSpan).start.offset;\n\n          _this154._bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attr.sourceSpan, absoluteOffset, templateMatchableAttrs, templateElementOrDirectiveProps, _parsedVariables, false\n          /* isIvyAst */\n          );\n\n          templateElementVars.push.apply(templateElementVars, _toConsumableArray(_parsedVariables.map(function (v) {\n            return VariableAst.fromParsedVariable(v);\n          })));\n        }\n\n        if (!hasBinding && !hasTemplateBinding) {\n          // don't include the bindings as attributes as well in the AST\n          attrs.push(_this154.visitAttribute(attr, null));\n          matchableAttrs.push([attr.name, attr.value]);\n        }\n      });\n      var elementCssSelector = createElementCssSelector(elName, matchableAttrs);\n\n      var _this$_parseDirective = this._parseDirectives(this.selectorMatcher, elementCssSelector),\n          directiveMetas = _this$_parseDirective.directives,\n          matchElement = _this$_parseDirective.matchElement;\n\n      var references = [];\n      var boundDirectivePropNames = new Set();\n\n      var directiveAsts = this._createDirectiveAsts(isTemplateElement, element.name, directiveMetas, elementOrDirectiveProps, elementOrDirectiveRefs, element.sourceSpan, references, boundDirectivePropNames);\n\n      var elementProps = this._createElementPropertyAsts(element.name, elementOrDirectiveProps, boundDirectivePropNames);\n\n      var isViewRoot = parent.isTemplateElement || hasInlineTemplates;\n      var providerContext = new ProviderElementContext(this.providerViewContext, parent.providerContext, isViewRoot, directiveAsts, attrs, references, isTemplateElement, queryStartIndex, element.sourceSpan);\n      var children = visitAll$1(preparsedElement.nonBindable ? NON_BINDABLE_VISITOR : this, element.children, ElementContext.create(isTemplateElement, directiveAsts, isTemplateElement ? parent.providerContext : providerContext));\n      providerContext.afterElement(); // Override the actual selector when the `ngProjectAs` attribute is provided\n\n      var projectionSelector = preparsedElement.projectAs != '' ? CssSelector.parse(preparsedElement.projectAs)[0] : elementCssSelector;\n      var ngContentIndex = parent.findNgContentIndex(projectionSelector);\n      var parsedElement;\n\n      if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {\n        // `<ng-content>` element\n        if (element.children && !element.children.every(_isEmptyTextNode)) {\n          this._reportError(\"<ng-content> element cannot have content.\", element.sourceSpan);\n        }\n\n        parsedElement = new NgContentAst(this.ngContentCount++, hasInlineTemplates ? null : ngContentIndex, element.sourceSpan);\n      } else if (isTemplateElement) {\n        // `<ng-template>` element\n        this._assertAllEventsPublishedByDirectives(directiveAsts, events);\n\n        this._assertNoComponentsNorElementBindingsOnTemplate(directiveAsts, elementProps, element.sourceSpan);\n\n        parsedElement = new EmbeddedTemplateAst(attrs, events, references, elementVars, providerContext.transformedDirectiveAsts, providerContext.transformProviders, providerContext.transformedHasViewContainer, providerContext.queryMatches, children, hasInlineTemplates ? null : ngContentIndex, element.sourceSpan);\n      } else {\n        // element other than `<ng-content>` and `<ng-template>`\n        this._assertElementExists(matchElement, element);\n\n        this._assertOnlyOneComponent(directiveAsts, element.sourceSpan);\n\n        var _ngContentIndex = hasInlineTemplates ? null : parent.findNgContentIndex(projectionSelector);\n\n        parsedElement = new ElementAst(elName, attrs, elementProps, events, references, providerContext.transformedDirectiveAsts, providerContext.transformProviders, providerContext.transformedHasViewContainer, providerContext.queryMatches, children, hasInlineTemplates ? null : _ngContentIndex, element.sourceSpan, element.endSourceSpan || null);\n      }\n\n      if (hasInlineTemplates) {\n        // The element as a *-attribute\n        var templateQueryStartIndex = this.contentQueryStartId;\n        var templateSelector = createElementCssSelector('ng-template', templateMatchableAttrs);\n\n        var _this$_parseDirective2 = this._parseDirectives(this.selectorMatcher, templateSelector),\n            directives = _this$_parseDirective2.directives;\n\n        var templateBoundDirectivePropNames = new Set();\n\n        var templateDirectiveAsts = this._createDirectiveAsts(true, elName, directives, templateElementOrDirectiveProps, [], element.sourceSpan, [], templateBoundDirectivePropNames);\n\n        var templateElementProps = this._createElementPropertyAsts(elName, templateElementOrDirectiveProps, templateBoundDirectivePropNames);\n\n        this._assertNoComponentsNorElementBindingsOnTemplate(templateDirectiveAsts, templateElementProps, element.sourceSpan);\n\n        var templateProviderContext = new ProviderElementContext(this.providerViewContext, parent.providerContext, parent.isTemplateElement, templateDirectiveAsts, [], [], true, templateQueryStartIndex, element.sourceSpan);\n        templateProviderContext.afterElement();\n        parsedElement = new EmbeddedTemplateAst([], [], [], templateElementVars, templateProviderContext.transformedDirectiveAsts, templateProviderContext.transformProviders, templateProviderContext.transformedHasViewContainer, templateProviderContext.queryMatches, [parsedElement], ngContentIndex, element.sourceSpan);\n      }\n\n      return parsedElement;\n    }\n  }, {\n    key: \"_parseAttr\",\n    value: function _parseAttr(isTemplateElement, attr, targetMatchableAttrs, targetProps, targetEvents, targetRefs, targetVars) {\n      var name = this._normalizeAttributeName(attr.name);\n\n      var value = attr.value;\n      var srcSpan = attr.sourceSpan;\n      var absoluteOffset = attr.valueSpan ? attr.valueSpan.start.offset : srcSpan.start.offset;\n      var boundEvents = [];\n      var bindParts = name.match(BIND_NAME_REGEXP);\n      var hasBinding = false;\n\n      if (bindParts !== null) {\n        hasBinding = true;\n\n        if (bindParts[KW_BIND_IDX] != null) {\n          this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);\n        } else if (bindParts[KW_LET_IDX]) {\n          if (isTemplateElement) {\n            var identifier = bindParts[IDENT_KW_IDX];\n\n            this._parseVariable(identifier, value, srcSpan, targetVars);\n          } else {\n            this._reportError(\"\\\"let-\\\" is only supported on ng-template elements.\", srcSpan);\n          }\n        } else if (bindParts[KW_REF_IDX]) {\n          var _identifier = bindParts[IDENT_KW_IDX];\n\n          this._parseReference(_identifier, value, srcSpan, targetRefs);\n        } else if (bindParts[KW_ON_IDX]) {\n          this._bindingParser.parseEvent(bindParts[IDENT_KW_IDX], value, srcSpan, attr.valueSpan || srcSpan, targetMatchableAttrs, boundEvents);\n        } else if (bindParts[KW_BINDON_IDX]) {\n          this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);\n\n          this._parseAssignmentEvent(bindParts[IDENT_KW_IDX], value, srcSpan, attr.valueSpan || srcSpan, targetMatchableAttrs, boundEvents);\n        } else if (bindParts[KW_AT_IDX]) {\n          this._bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);\n        } else if (bindParts[IDENT_BANANA_BOX_IDX]) {\n          this._bindingParser.parsePropertyBinding(bindParts[IDENT_BANANA_BOX_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);\n\n          this._parseAssignmentEvent(bindParts[IDENT_BANANA_BOX_IDX], value, srcSpan, attr.valueSpan || srcSpan, targetMatchableAttrs, boundEvents);\n        } else if (bindParts[IDENT_PROPERTY_IDX]) {\n          this._bindingParser.parsePropertyBinding(bindParts[IDENT_PROPERTY_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);\n        } else if (bindParts[IDENT_EVENT_IDX]) {\n          this._bindingParser.parseEvent(bindParts[IDENT_EVENT_IDX], value, srcSpan, attr.valueSpan || srcSpan, targetMatchableAttrs, boundEvents);\n        }\n      } else {\n        hasBinding = this._bindingParser.parsePropertyInterpolation(name, value, srcSpan, attr.valueSpan, targetMatchableAttrs, targetProps);\n      }\n\n      if (!hasBinding) {\n        this._bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);\n      }\n\n      targetEvents.push.apply(targetEvents, _toConsumableArray(boundEvents.map(function (e) {\n        return BoundEventAst.fromParsedEvent(e);\n      })));\n      return hasBinding;\n    }\n  }, {\n    key: \"_normalizeAttributeName\",\n    value: function _normalizeAttributeName(attrName) {\n      return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;\n    }\n  }, {\n    key: \"_parseVariable\",\n    value: function _parseVariable(identifier, value, sourceSpan, targetVars) {\n      if (identifier.indexOf('-') > -1) {\n        this._reportError(\"\\\"-\\\" is not allowed in variable names\", sourceSpan);\n      } else if (identifier.length === 0) {\n        this._reportError(\"Variable does not have a name\", sourceSpan);\n      }\n\n      targetVars.push(new VariableAst(identifier, value, sourceSpan));\n    }\n  }, {\n    key: \"_parseReference\",\n    value: function _parseReference(identifier, value, sourceSpan, targetRefs) {\n      if (identifier.indexOf('-') > -1) {\n        this._reportError(\"\\\"-\\\" is not allowed in reference names\", sourceSpan);\n      } else if (identifier.length === 0) {\n        this._reportError(\"Reference does not have a name\", sourceSpan);\n      }\n\n      targetRefs.push(new ElementOrDirectiveRef(identifier, value, sourceSpan));\n    }\n  }, {\n    key: \"_parseAssignmentEvent\",\n    value: function _parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, targetEvents) {\n      this._bindingParser.parseEvent(\"\".concat(name, \"Change\"), \"\".concat(expression, \"=$event\"), sourceSpan, valueSpan, targetMatchableAttrs, targetEvents);\n    }\n  }, {\n    key: \"_parseDirectives\",\n    value: function _parseDirectives(selectorMatcher, elementCssSelector) {\n      var _this155 = this;\n\n      // Need to sort the directives so that we get consistent results throughout,\n      // as selectorMatcher uses Maps inside.\n      // Also deduplicate directives as they might match more than one time!\n      var directives = newArray(this.directivesIndex.size); // Whether any directive selector matches on the element name\n\n      var matchElement = false;\n      selectorMatcher.match(elementCssSelector, function (selector, directive) {\n        directives[_this155.directivesIndex.get(directive)] = directive;\n        matchElement = matchElement || selector.hasElementSelector();\n      });\n      return {\n        directives: directives.filter(function (dir) {\n          return !!dir;\n        }),\n        matchElement: matchElement\n      };\n    }\n  }, {\n    key: \"_createDirectiveAsts\",\n    value: function _createDirectiveAsts(isTemplateElement, elementName, directives, props, elementOrDirectiveRefs, elementSourceSpan, targetReferences, targetBoundDirectivePropNames) {\n      var _this156 = this;\n\n      var matchedReferences = new Set();\n      var component = null;\n      var directiveAsts = directives.map(function (directive) {\n        var sourceSpan = new ParseSourceSpan(elementSourceSpan.start, elementSourceSpan.end, elementSourceSpan.fullStart, \"Directive \".concat(identifierName(directive.type)));\n\n        if (directive.isComponent) {\n          component = directive;\n        }\n\n        var directiveProperties = [];\n\n        var boundProperties = _this156._bindingParser.createDirectiveHostPropertyAsts(directive, elementName, sourceSpan);\n\n        var hostProperties = boundProperties.map(function (prop) {\n          return BoundElementPropertyAst.fromBoundProperty(prop);\n        }); // Note: We need to check the host properties here as well,\n        // as we don't know the element name in the DirectiveWrapperCompiler yet.\n\n        hostProperties = _this156._checkPropertiesInSchema(elementName, hostProperties);\n\n        var parsedEvents = _this156._bindingParser.createDirectiveHostEventAsts(directive, sourceSpan);\n\n        _this156._createDirectivePropertyAsts(directive.inputs, props, directiveProperties, targetBoundDirectivePropNames);\n\n        elementOrDirectiveRefs.forEach(function (elOrDirRef) {\n          if (elOrDirRef.value.length === 0 && directive.isComponent || elOrDirRef.isReferenceToDirective(directive)) {\n            targetReferences.push(new ReferenceAst(elOrDirRef.name, createTokenForReference(directive.type.reference), elOrDirRef.value, elOrDirRef.sourceSpan));\n            matchedReferences.add(elOrDirRef.name);\n          }\n        });\n        var hostEvents = parsedEvents.map(function (e) {\n          return BoundEventAst.fromParsedEvent(e);\n        });\n        var contentQueryStartId = _this156.contentQueryStartId;\n        _this156.contentQueryStartId += directive.queries.length;\n        return new DirectiveAst(directive, directiveProperties, hostProperties, hostEvents, contentQueryStartId, sourceSpan);\n      });\n      elementOrDirectiveRefs.forEach(function (elOrDirRef) {\n        if (elOrDirRef.value.length > 0) {\n          if (!matchedReferences.has(elOrDirRef.name)) {\n            _this156._reportError(\"There is no directive with \\\"exportAs\\\" set to \\\"\".concat(elOrDirRef.value, \"\\\"\"), elOrDirRef.sourceSpan);\n          }\n        } else if (!component) {\n          var refToken = null;\n\n          if (isTemplateElement) {\n            refToken = createTokenForExternalReference(_this156.reflector, Identifiers$1.TemplateRef);\n          }\n\n          targetReferences.push(new ReferenceAst(elOrDirRef.name, refToken, elOrDirRef.value, elOrDirRef.sourceSpan));\n        }\n      });\n      return directiveAsts;\n    }\n  }, {\n    key: \"_createDirectivePropertyAsts\",\n    value: function _createDirectivePropertyAsts(directiveProperties, boundProps, targetBoundDirectiveProps, targetBoundDirectivePropNames) {\n      if (directiveProperties) {\n        var boundPropsByName = new Map();\n        boundProps.forEach(function (boundProp) {\n          var prevValue = boundPropsByName.get(boundProp.name);\n\n          if (!prevValue || prevValue.isLiteral) {\n            // give [a]=\"b\" a higher precedence than a=\"b\" on the same element\n            boundPropsByName.set(boundProp.name, boundProp);\n          }\n        });\n        Object.keys(directiveProperties).forEach(function (dirProp) {\n          var elProp = directiveProperties[dirProp];\n          var boundProp = boundPropsByName.get(elProp); // Bindings are optional, so this binding only needs to be set up if an expression is given.\n\n          if (boundProp) {\n            targetBoundDirectivePropNames.add(boundProp.name);\n\n            if (!isEmptyExpression(boundProp.expression)) {\n              targetBoundDirectiveProps.push(new BoundDirectivePropertyAst(dirProp, boundProp.name, boundProp.expression, boundProp.sourceSpan));\n            }\n          }\n        });\n      }\n    }\n  }, {\n    key: \"_createElementPropertyAsts\",\n    value: function _createElementPropertyAsts(elementName, props, boundDirectivePropNames) {\n      var _this157 = this;\n\n      var boundElementProps = [];\n      props.forEach(function (prop) {\n        if (!prop.isLiteral && !boundDirectivePropNames.has(prop.name)) {\n          var boundProp = _this157._bindingParser.createBoundElementProperty(elementName, prop);\n\n          boundElementProps.push(BoundElementPropertyAst.fromBoundProperty(boundProp));\n        }\n      });\n      return this._checkPropertiesInSchema(elementName, boundElementProps);\n    }\n  }, {\n    key: \"_findComponentDirectives\",\n    value: function _findComponentDirectives(directives) {\n      return directives.filter(function (directive) {\n        return directive.directive.isComponent;\n      });\n    }\n  }, {\n    key: \"_findComponentDirectiveNames\",\n    value: function _findComponentDirectiveNames(directives) {\n      return this._findComponentDirectives(directives).map(function (directive) {\n        return identifierName(directive.directive.type);\n      });\n    }\n  }, {\n    key: \"_assertOnlyOneComponent\",\n    value: function _assertOnlyOneComponent(directives, sourceSpan) {\n      var componentTypeNames = this._findComponentDirectiveNames(directives);\n\n      if (componentTypeNames.length > 1) {\n        this._reportError(\"More than one component matched on this element.\\n\" + \"Make sure that only one component's selector can match a given element.\\n\" + \"Conflicting components: \".concat(componentTypeNames.join(',')), sourceSpan);\n      }\n    }\n    /**\n     * Make sure that non-angular tags conform to the schemas.\n     *\n     * Note: An element is considered an angular tag when at least one directive selector matches the\n     * tag name.\n     *\n     * @param matchElement Whether any directive has matched on the tag name\n     * @param element the html element\n     */\n\n  }, {\n    key: \"_assertElementExists\",\n    value: function _assertElementExists(matchElement, element) {\n      var elName = element.name.replace(/^:xhtml:/, '');\n\n      if (!matchElement && !this._schemaRegistry.hasElement(elName, this._schemas)) {\n        var errorMsg = \"'\".concat(elName, \"' is not a known element:\\n\");\n        errorMsg += \"1. If '\".concat(elName, \"' is an Angular component, then verify that it is part of this module.\\n\");\n\n        if (elName.indexOf('-') > -1) {\n          errorMsg += \"2. If '\".concat(elName, \"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\");\n        } else {\n          errorMsg += \"2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.\";\n        }\n\n        this._reportError(errorMsg, element.sourceSpan);\n      }\n    }\n  }, {\n    key: \"_assertNoComponentsNorElementBindingsOnTemplate\",\n    value: function _assertNoComponentsNorElementBindingsOnTemplate(directives, elementProps, sourceSpan) {\n      var _this158 = this;\n\n      var componentTypeNames = this._findComponentDirectiveNames(directives);\n\n      if (componentTypeNames.length > 0) {\n        this._reportError(\"Components on an embedded template: \".concat(componentTypeNames.join(',')), sourceSpan);\n      }\n\n      elementProps.forEach(function (prop) {\n        _this158._reportError(\"Property binding \".concat(prop.name, \" not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the \\\"@NgModule.declarations\\\".\"), sourceSpan);\n      });\n    }\n  }, {\n    key: \"_assertAllEventsPublishedByDirectives\",\n    value: function _assertAllEventsPublishedByDirectives(directives, events) {\n      var _this159 = this;\n\n      var allDirectiveEvents = new Set();\n      directives.forEach(function (directive) {\n        Object.keys(directive.directive.outputs).forEach(function (k) {\n          var eventName = directive.directive.outputs[k];\n          allDirectiveEvents.add(eventName);\n        });\n      });\n      events.forEach(function (event) {\n        if (event.target != null || !allDirectiveEvents.has(event.name)) {\n          _this159._reportError(\"Event binding \".concat(event.fullName, \" not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the \\\"@NgModule.declarations\\\".\"), event.sourceSpan);\n        }\n      });\n    }\n  }, {\n    key: \"_checkPropertiesInSchema\",\n    value: function _checkPropertiesInSchema(elementName, boundProps) {\n      var _this160 = this;\n\n      // Note: We can't filter out empty expressions before this method,\n      // as we still want to validate them!\n      return boundProps.filter(function (boundProp) {\n        if (boundProp.type === 0\n        /* Property */\n        && !_this160._schemaRegistry.hasProperty(elementName, boundProp.name, _this160._schemas)) {\n          var errorMsg = \"Can't bind to '\".concat(boundProp.name, \"' since it isn't a known property of '\").concat(elementName, \"'.\");\n\n          if (elementName.startsWith('ng-')) {\n            errorMsg += \"\\n1. If '\".concat(boundProp.name, \"' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.\") + \"\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.\";\n          } else if (elementName.indexOf('-') > -1) {\n            errorMsg += \"\\n1. If '\".concat(elementName, \"' is an Angular component and it has '\").concat(boundProp.name, \"' input, then verify that it is part of this module.\") + \"\\n2. If '\".concat(elementName, \"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\") + \"\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.\";\n          }\n\n          _this160._reportError(errorMsg, boundProp.sourceSpan);\n        }\n\n        return !isEmptyExpression(boundProp.value);\n      });\n    }\n  }, {\n    key: \"_reportError\",\n    value: function _reportError(message, sourceSpan) {\n      var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ParseErrorLevel.ERROR;\n\n      this._targetErrors.push(new ParseError(sourceSpan, message, level));\n    }\n  }]);\n\n  return TemplateParseVisitor;\n}();\n\nvar NonBindableVisitor = /*#__PURE__*/function () {\n  function NonBindableVisitor() {\n    _classCallCheck(this, NonBindableVisitor);\n  }\n\n  _createClass(NonBindableVisitor, [{\n    key: \"visitElement\",\n    value: function visitElement(ast, parent) {\n      var preparsedElement = preparseElement(ast);\n\n      if (preparsedElement.type === PreparsedElementType.SCRIPT || preparsedElement.type === PreparsedElementType.STYLE || preparsedElement.type === PreparsedElementType.STYLESHEET) {\n        // Skipping <script> for security reasons\n        // Skipping <style> and stylesheets as we already processed them\n        // in the StyleCompiler\n        return null;\n      }\n\n      var attrNameAndValues = ast.attrs.map(function (attr) {\n        return [attr.name, attr.value];\n      });\n      var selector = createElementCssSelector(ast.name, attrNameAndValues);\n      var ngContentIndex = parent.findNgContentIndex(selector);\n      var children = visitAll$1(this, ast.children, EMPTY_ELEMENT_CONTEXT);\n      return new ElementAst(ast.name, visitAll$1(this, ast.attrs), [], [], [], [], [], false, [], children, ngContentIndex, ast.sourceSpan, ast.endSourceSpan);\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {\n      return null;\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {\n      return new AttrAst(attribute.name, attribute.value, attribute.sourceSpan);\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, parent) {\n      var ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR());\n      return new TextAst(text.value, ngContentIndex, text.sourceSpan);\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(expansion, context) {\n      return expansion;\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(expansionCase, context) {\n      return expansionCase;\n    }\n  }]);\n\n  return NonBindableVisitor;\n}();\n/**\n * A reference to an element or directive in a template. E.g., the reference in this template:\n *\n * <div #myMenu=\"coolMenu\">\n *\n * would be {name: 'myMenu', value: 'coolMenu', sourceSpan: ...}\n */\n\n\nvar ElementOrDirectiveRef = /*#__PURE__*/function () {\n  function ElementOrDirectiveRef(name, value, sourceSpan) {\n    _classCallCheck(this, ElementOrDirectiveRef);\n\n    this.name = name;\n    this.value = value;\n    this.sourceSpan = sourceSpan;\n  }\n  /** Gets whether this is a reference to the given directive. */\n\n\n  _createClass(ElementOrDirectiveRef, [{\n    key: \"isReferenceToDirective\",\n    value: function isReferenceToDirective(directive) {\n      return splitExportAs(directive.exportAs).indexOf(this.value) !== -1;\n    }\n  }]);\n\n  return ElementOrDirectiveRef;\n}();\n/** Splits a raw, potentially comma-delimited `exportAs` value into an array of names. */\n\n\nfunction splitExportAs(exportAs) {\n  return exportAs ? exportAs.split(',').map(function (e) {\n    return e.trim();\n  }) : [];\n}\n\nfunction splitClasses(classAttrValue) {\n  return classAttrValue.trim().split(/\\s+/g);\n}\n\nvar ElementContext = /*#__PURE__*/function () {\n  function ElementContext(isTemplateElement, _ngContentIndexMatcher, _wildcardNgContentIndex, providerContext) {\n    _classCallCheck(this, ElementContext);\n\n    this.isTemplateElement = isTemplateElement;\n    this._ngContentIndexMatcher = _ngContentIndexMatcher;\n    this._wildcardNgContentIndex = _wildcardNgContentIndex;\n    this.providerContext = providerContext;\n  }\n\n  _createClass(ElementContext, [{\n    key: \"findNgContentIndex\",\n    value: function findNgContentIndex(selector) {\n      var ngContentIndices = [];\n\n      this._ngContentIndexMatcher.match(selector, function (selector, ngContentIndex) {\n        ngContentIndices.push(ngContentIndex);\n      });\n\n      ngContentIndices.sort();\n\n      if (this._wildcardNgContentIndex != null) {\n        ngContentIndices.push(this._wildcardNgContentIndex);\n      }\n\n      return ngContentIndices.length > 0 ? ngContentIndices[0] : null;\n    }\n  }], [{\n    key: \"create\",\n    value: function create(isTemplateElement, directives, providerContext) {\n      var matcher = new SelectorMatcher();\n      var wildcardNgContentIndex = null;\n      var component = directives.find(function (directive) {\n        return directive.directive.isComponent;\n      });\n\n      if (component) {\n        var ngContentSelectors = component.directive.template.ngContentSelectors;\n\n        for (var i = 0; i < ngContentSelectors.length; i++) {\n          var selector = ngContentSelectors[i];\n\n          if (selector === '*') {\n            wildcardNgContentIndex = i;\n          } else {\n            matcher.addSelectables(CssSelector.parse(ngContentSelectors[i]), i);\n          }\n        }\n      }\n\n      return new ElementContext(isTemplateElement, matcher, wildcardNgContentIndex, providerContext);\n    }\n  }]);\n\n  return ElementContext;\n}();\n\nfunction createElementCssSelector(elementName, attributes) {\n  var cssSelector = new CssSelector();\n  var elNameNoNs = splitNsName(elementName)[1];\n  cssSelector.setElement(elNameNoNs);\n\n  for (var i = 0; i < attributes.length; i++) {\n    var attrName = attributes[i][0];\n    var attrNameNoNs = splitNsName(attrName)[1];\n    var attrValue = attributes[i][1];\n    cssSelector.addAttribute(attrNameNoNs, attrValue);\n\n    if (attrName.toLowerCase() == CLASS_ATTR) {\n      var classes = splitClasses(attrValue);\n      classes.forEach(function (className) {\n        return cssSelector.addClassName(className);\n      });\n    }\n  }\n\n  return cssSelector;\n}\n\nvar EMPTY_ELEMENT_CONTEXT = /*@__PURE__*/new ElementContext(true, /*@__PURE__*/new SelectorMatcher(), null, null);\nvar NON_BINDABLE_VISITOR = /*@__PURE__*/new NonBindableVisitor();\n\nfunction _isEmptyTextNode(node) {\n  return node instanceof Text$3 && node.value.trim().length == 0;\n}\n\nfunction removeSummaryDuplicates(items) {\n  var map = new Map();\n  items.forEach(function (item) {\n    if (!map.get(item.type.reference)) {\n      map.set(item.type.reference, item);\n    }\n  });\n  return Array.from(map.values());\n}\n\nfunction isEmptyExpression(ast) {\n  if (ast instanceof ASTWithSource) {\n    ast = ast.ast;\n  }\n\n  return ast instanceof EmptyExpr;\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Parses string representation of a style and converts it into object literal.\n *\n * @param value string representation of style as used in the `style` attribute in HTML.\n *   Example: `color: red; height: auto`.\n * @returns An array of style property name and value pairs, e.g. `['color', 'red', 'height',\n * 'auto']`\n */\n\n\nfunction parse(value) {\n  // we use a string array here instead of a string map\n  // because a string-map is not guaranteed to retain the\n  // order of the entries whereas a string array can be\n  // constructed in a [key, value, key, value] format.\n  var styles = [];\n  var i = 0;\n  var parenDepth = 0;\n  var quote = 0\n  /* QuoteNone */\n  ;\n  var valueStart = 0;\n  var propStart = 0;\n  var currentProp = null;\n  var valueHasQuotes = false;\n\n  while (i < value.length) {\n    var token = value.charCodeAt(i++);\n\n    switch (token) {\n      case 40\n      /* OpenParen */\n      :\n        parenDepth++;\n        break;\n\n      case 41\n      /* CloseParen */\n      :\n        parenDepth--;\n        break;\n\n      case 39\n      /* QuoteSingle */\n      :\n        // valueStart needs to be there since prop values don't\n        // have quotes in CSS\n        valueHasQuotes = valueHasQuotes || valueStart > 0;\n\n        if (quote === 0\n        /* QuoteNone */\n        ) {\n          quote = 39\n          /* QuoteSingle */\n          ;\n        } else if (quote === 39\n        /* QuoteSingle */\n        && value.charCodeAt(i - 1) !== 92\n        /* BackSlash */\n        ) {\n          quote = 0\n          /* QuoteNone */\n          ;\n        }\n\n        break;\n\n      case 34\n      /* QuoteDouble */\n      :\n        // same logic as above\n        valueHasQuotes = valueHasQuotes || valueStart > 0;\n\n        if (quote === 0\n        /* QuoteNone */\n        ) {\n          quote = 34\n          /* QuoteDouble */\n          ;\n        } else if (quote === 34\n        /* QuoteDouble */\n        && value.charCodeAt(i - 1) !== 92\n        /* BackSlash */\n        ) {\n          quote = 0\n          /* QuoteNone */\n          ;\n        }\n\n        break;\n\n      case 58\n      /* Colon */\n      :\n        if (!currentProp && parenDepth === 0 && quote === 0\n        /* QuoteNone */\n        ) {\n          currentProp = hyphenate(value.substring(propStart, i - 1).trim());\n          valueStart = i;\n        }\n\n        break;\n\n      case 59\n      /* Semicolon */\n      :\n        if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0\n        /* QuoteNone */\n        ) {\n          var styleVal = value.substring(valueStart, i - 1).trim();\n          styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal);\n          propStart = i;\n          valueStart = 0;\n          currentProp = null;\n          valueHasQuotes = false;\n        }\n\n        break;\n    }\n  }\n\n  if (currentProp && valueStart) {\n    var _styleVal = value.substr(valueStart).trim();\n\n    styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(_styleVal) : _styleVal);\n  }\n\n  return styles;\n}\n\nfunction stripUnnecessaryQuotes(value) {\n  var qS = value.charCodeAt(0);\n  var qE = value.charCodeAt(value.length - 1);\n\n  if (qS == qE && (qS == 39\n  /* QuoteSingle */\n  || qS == 34\n  /* QuoteDouble */\n  )) {\n    var tempValue = value.substring(1, value.length - 1); // special case to avoid using a multi-quoted string that was just chomped\n    // (e.g. `font-family: \"Verdana\", \"sans-serif\"`)\n\n    if (tempValue.indexOf('\\'') == -1 && tempValue.indexOf('\"') == -1) {\n      value = tempValue;\n    }\n  }\n\n  return value;\n}\n\nfunction hyphenate(value) {\n  return value.replace(/[a-z][A-Z]/g, function (v) {\n    return v.charAt(0) + '-' + v.charAt(1);\n  }).toLowerCase();\n}\n\nvar IMPORTANT_FLAG = '!important';\n/**\n * Minimum amount of binding slots required in the runtime for style/class bindings.\n *\n * Styling in Angular uses up two slots in the runtime LView/TData data structures to\n * record binding data, property information and metadata.\n *\n * When a binding is registered it will place the following information in the `LView`:\n *\n * slot 1) binding value\n * slot 2) cached value (all other values collected before it in string form)\n *\n * When a binding is registered it will place the following information in the `TData`:\n *\n * slot 1) prop name\n * slot 2) binding index that points to the previous style/class binding (and some extra config\n * values)\n *\n * Let's imagine we have a binding that looks like so:\n *\n * ```\n * <div [style.width]=\"x\" [style.height]=\"y\">\n * ```\n *\n * Our `LView` and `TData` data-structures look like so:\n *\n * ```typescript\n * LView = [\n *   // ...\n *   x, // value of x\n *   \"width: x\",\n *\n *   y, // value of y\n *   \"width: x; height: y\",\n *   // ...\n * ];\n *\n * TData = [\n *   // ...\n *   \"width\", // binding slot 20\n *   0,\n *\n *   \"height\",\n *   20,\n *   // ...\n * ];\n * ```\n *\n * */\n\nvar MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;\n/**\n * Produces creation/update instructions for all styling bindings (class and style)\n *\n * It also produces the creation instruction to register all initial styling values\n * (which are all the static class=\"...\" and style=\"...\" attribute values that exist\n * on an element within a template).\n *\n * The builder class below handles producing instructions for the following cases:\n *\n * - Static style/class attributes (style=\"...\" and class=\"...\")\n * - Dynamic style/class map bindings ([style]=\"map\" and [class]=\"map|string\")\n * - Dynamic style/class property bindings ([style.prop]=\"exp\" and [class.name]=\"exp\")\n *\n * Due to the complex relationship of all of these cases, the instructions generated\n * for these attributes/properties/bindings must be done so in the correct order. The\n * order which these must be generated is as follows:\n *\n * if (createMode) {\n *   styling(...)\n * }\n * if (updateMode) {\n *   styleMap(...)\n *   classMap(...)\n *   styleProp(...)\n *   classProp(...)\n * }\n *\n * The creation/update methods within the builder class produce these instructions.\n */\n\nvar StylingBuilder = /*#__PURE__*/function () {\n  function StylingBuilder(_directiveExpr) {\n    _classCallCheck(this, StylingBuilder);\n\n    this._directiveExpr = _directiveExpr;\n    /** Whether or not there are any static styling values present */\n\n    this._hasInitialValues = false;\n    /**\n     *  Whether or not there are any styling bindings present\n     *  (i.e. `[style]`, `[class]`, `[style.prop]` or `[class.name]`)\n     */\n\n    this.hasBindings = false;\n    this.hasBindingsWithPipes = false;\n    /** the input for [class] (if it exists) */\n\n    this._classMapInput = null;\n    /** the input for [style] (if it exists) */\n\n    this._styleMapInput = null;\n    /** an array of each [style.prop] input */\n\n    this._singleStyleInputs = null;\n    /** an array of each [class.name] input */\n\n    this._singleClassInputs = null;\n    this._lastStylingInput = null;\n    this._firstStylingInput = null; // maps are used instead of hash maps because a Map will\n    // retain the ordering of the keys\n\n    /**\n     * Represents the location of each style binding in the template\n     * (e.g. `<div [style.width]=\"w\" [style.height]=\"h\">` implies\n     * that `width=0` and `height=1`)\n     */\n\n    this._stylesIndex = new Map();\n    /**\n     * Represents the location of each class binding in the template\n     * (e.g. `<div [class.big]=\"b\" [class.hidden]=\"h\">` implies\n     * that `big=0` and `hidden=1`)\n     */\n\n    this._classesIndex = new Map();\n    this._initialStyleValues = [];\n    this._initialClassValues = [];\n  }\n  /**\n   * Registers a given input to the styling builder to be later used when producing AOT code.\n   *\n   * The code below will only accept the input if it is somehow tied to styling (whether it be\n   * style/class bindings or static style/class attributes).\n   */\n\n\n  _createClass(StylingBuilder, [{\n    key: \"registerBoundInput\",\n    value: function registerBoundInput(input) {\n      // [attr.style] or [attr.class] are skipped in the code below,\n      // they should not be treated as styling-based bindings since\n      // they are intended to be written directly to the attr and\n      // will therefore skip all style/class resolution that is present\n      // with style=\"\", [style]=\"\" and [style.prop]=\"\", class=\"\",\n      // [class.prop]=\"\". [class]=\"\" assignments\n      var binding = null;\n      var name = input.name;\n\n      switch (input.type) {\n        case 0\n        /* Property */\n        :\n          binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);\n          break;\n\n        case 3\n        /* Style */\n        :\n          binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);\n          break;\n\n        case 2\n        /* Class */\n        :\n          binding = this.registerClassInput(name, false, input.value, input.sourceSpan);\n          break;\n      }\n\n      return binding ? true : false;\n    }\n  }, {\n    key: \"registerInputBasedOnName\",\n    value: function registerInputBasedOnName(name, expression, sourceSpan) {\n      var binding = null;\n      var prefix = name.substring(0, 6);\n      var isStyle = name === 'style' || prefix === 'style.' || prefix === 'style!';\n      var isClass = !isStyle && (name === 'class' || prefix === 'class.' || prefix === 'class!');\n\n      if (isStyle || isClass) {\n        var isMapBased = name.charAt(5) !== '.'; // style.prop or class.prop makes this a no\n\n        var property = name.substr(isMapBased ? 5 : 6); // the dot explains why there's a +1\n\n        if (isStyle) {\n          binding = this.registerStyleInput(property, isMapBased, expression, sourceSpan);\n        } else {\n          binding = this.registerClassInput(property, isMapBased, expression, sourceSpan);\n        }\n      }\n\n      return binding;\n    }\n  }, {\n    key: \"registerStyleInput\",\n    value: function registerStyleInput(name, isMapBased, value, sourceSpan, suffix) {\n      if (isEmptyExpression(value)) {\n        return null;\n      } // CSS custom properties are case-sensitive so we shouldn't normalize them.\n      // See: https://www.w3.org/TR/css-variables-1/#defining-variables\n\n\n      if (!isCssCustomProperty(name)) {\n        name = hyphenate(name);\n      }\n\n      var _parseProperty = parseProperty(name),\n          property = _parseProperty.property,\n          hasOverrideFlag = _parseProperty.hasOverrideFlag,\n          bindingSuffix = _parseProperty.suffix;\n\n      suffix = typeof suffix === 'string' && suffix.length !== 0 ? suffix : bindingSuffix;\n      var entry = {\n        name: property,\n        suffix: suffix,\n        value: value,\n        sourceSpan: sourceSpan,\n        hasOverrideFlag: hasOverrideFlag\n      };\n\n      if (isMapBased) {\n        this._styleMapInput = entry;\n      } else {\n        (this._singleStyleInputs = this._singleStyleInputs || []).push(entry);\n        registerIntoMap(this._stylesIndex, property);\n      }\n\n      this._lastStylingInput = entry;\n      this._firstStylingInput = this._firstStylingInput || entry;\n\n      this._checkForPipes(value);\n\n      this.hasBindings = true;\n      return entry;\n    }\n  }, {\n    key: \"registerClassInput\",\n    value: function registerClassInput(name, isMapBased, value, sourceSpan) {\n      if (isEmptyExpression(value)) {\n        return null;\n      }\n\n      var _parseProperty2 = parseProperty(name),\n          property = _parseProperty2.property,\n          hasOverrideFlag = _parseProperty2.hasOverrideFlag;\n\n      var entry = {\n        name: property,\n        value: value,\n        sourceSpan: sourceSpan,\n        hasOverrideFlag: hasOverrideFlag,\n        suffix: null\n      };\n\n      if (isMapBased) {\n        this._classMapInput = entry;\n      } else {\n        (this._singleClassInputs = this._singleClassInputs || []).push(entry);\n        registerIntoMap(this._classesIndex, property);\n      }\n\n      this._lastStylingInput = entry;\n      this._firstStylingInput = this._firstStylingInput || entry;\n\n      this._checkForPipes(value);\n\n      this.hasBindings = true;\n      return entry;\n    }\n  }, {\n    key: \"_checkForPipes\",\n    value: function _checkForPipes(value) {\n      if (value instanceof ASTWithSource && value.ast instanceof BindingPipe) {\n        this.hasBindingsWithPipes = true;\n      }\n    }\n    /**\n     * Registers the element's static style string value to the builder.\n     *\n     * @param value the style string (e.g. `width:100px; height:200px;`)\n     */\n\n  }, {\n    key: \"registerStyleAttr\",\n    value: function registerStyleAttr(value) {\n      this._initialStyleValues = parse(value);\n      this._hasInitialValues = true;\n    }\n    /**\n     * Registers the element's static class string value to the builder.\n     *\n     * @param value the className string (e.g. `disabled gold zoom`)\n     */\n\n  }, {\n    key: \"registerClassAttr\",\n    value: function registerClassAttr(value) {\n      this._initialClassValues = value.trim().split(/\\s+/g);\n      this._hasInitialValues = true;\n    }\n    /**\n     * Appends all styling-related expressions to the provided attrs array.\n     *\n     * @param attrs an existing array where each of the styling expressions\n     * will be inserted into.\n     */\n\n  }, {\n    key: \"populateInitialStylingAttrs\",\n    value: function populateInitialStylingAttrs(attrs) {\n      // [CLASS_MARKER, 'foo', 'bar', 'baz' ...]\n      if (this._initialClassValues.length) {\n        attrs.push(literal(1\n        /* Classes */\n        ));\n\n        for (var i = 0; i < this._initialClassValues.length; i++) {\n          attrs.push(literal(this._initialClassValues[i]));\n        }\n      } // [STYLE_MARKER, 'width', '200px', 'height', '100px', ...]\n\n\n      if (this._initialStyleValues.length) {\n        attrs.push(literal(2\n        /* Styles */\n        ));\n\n        for (var _i6 = 0; _i6 < this._initialStyleValues.length; _i6 += 2) {\n          attrs.push(literal(this._initialStyleValues[_i6]), literal(this._initialStyleValues[_i6 + 1]));\n        }\n      }\n    }\n    /**\n     * Builds an instruction with all the expressions and parameters for `elementHostAttrs`.\n     *\n     * The instruction generation code below is used for producing the AOT statement code which is\n     * responsible for registering initial styles (within a directive hostBindings' creation block),\n     * as well as any of the provided attribute values, to the directive host element.\n     */\n\n  }, {\n    key: \"assignHostAttrs\",\n    value: function assignHostAttrs(attrs, definitionMap) {\n      if (this._directiveExpr && (attrs.length || this._hasInitialValues)) {\n        this.populateInitialStylingAttrs(attrs);\n        definitionMap.set('hostAttrs', literalArr(attrs));\n      }\n    }\n    /**\n     * Builds an instruction with all the expressions and parameters for `classMap`.\n     *\n     * The instruction data will contain all expressions for `classMap` to function\n     * which includes the `[class]` expression params.\n     */\n\n  }, {\n    key: \"buildClassMapInstruction\",\n    value: function buildClassMapInstruction(valueConverter) {\n      if (this._classMapInput) {\n        return this._buildMapBasedInstruction(valueConverter, true, this._classMapInput);\n      }\n\n      return null;\n    }\n    /**\n     * Builds an instruction with all the expressions and parameters for `styleMap`.\n     *\n     * The instruction data will contain all expressions for `styleMap` to function\n     * which includes the `[style]` expression params.\n     */\n\n  }, {\n    key: \"buildStyleMapInstruction\",\n    value: function buildStyleMapInstruction(valueConverter) {\n      if (this._styleMapInput) {\n        return this._buildMapBasedInstruction(valueConverter, false, this._styleMapInput);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"_buildMapBasedInstruction\",\n    value: function _buildMapBasedInstruction(valueConverter, isClassBased, stylingInput) {\n      // each styling binding value is stored in the LView\n      // map-based bindings allocate two slots: one for the\n      // previous binding value and another for the previous\n      // className or style attribute value.\n      var totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED; // these values must be outside of the update block so that they can\n      // be evaluated (the AST visit call) during creation time so that any\n      // pipes can be picked up in time before the template is built\n\n      var mapValue = stylingInput.value.visit(valueConverter);\n      var reference;\n\n      if (mapValue instanceof Interpolation) {\n        totalBindingSlotsRequired += mapValue.expressions.length;\n        reference = isClassBased ? getClassMapInterpolationExpression(mapValue) : getStyleMapInterpolationExpression(mapValue);\n      } else {\n        reference = isClassBased ? Identifiers.classMap : Identifiers.styleMap;\n      }\n\n      return {\n        reference: reference,\n        calls: [{\n          supportsInterpolation: true,\n          sourceSpan: stylingInput.sourceSpan,\n          allocateBindingSlots: totalBindingSlotsRequired,\n          params: function params(convertFn) {\n            var convertResult = convertFn(mapValue);\n            var params = Array.isArray(convertResult) ? convertResult : [convertResult];\n            return params;\n          }\n        }]\n      };\n    }\n  }, {\n    key: \"_buildSingleInputs\",\n    value: function _buildSingleInputs(reference, inputs, valueConverter, getInterpolationExpressionFn, isClassBased) {\n      var instructions = [];\n      inputs.forEach(function (input) {\n        var previousInstruction = instructions[instructions.length - 1];\n        var value = input.value.visit(valueConverter);\n        var referenceForCall = reference; // each styling binding value is stored in the LView\n        // but there are two values stored for each binding:\n        //   1) the value itself\n        //   2) an intermediate value (concatenation of style up to this point).\n        //      We need to store the intermediate value so that we don't allocate\n        //      the strings on each CD.\n\n        var totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;\n\n        if (value instanceof Interpolation) {\n          totalBindingSlotsRequired += value.expressions.length;\n\n          if (getInterpolationExpressionFn) {\n            referenceForCall = getInterpolationExpressionFn(value);\n          }\n        }\n\n        var call = {\n          sourceSpan: input.sourceSpan,\n          allocateBindingSlots: totalBindingSlotsRequired,\n          supportsInterpolation: !!getInterpolationExpressionFn,\n          params: function params(convertFn) {\n            // params => stylingProp(propName, value, suffix)\n            var params = [];\n            params.push(literal(input.name));\n            var convertResult = convertFn(value);\n\n            if (Array.isArray(convertResult)) {\n              params.push.apply(params, _toConsumableArray(convertResult));\n            } else {\n              params.push(convertResult);\n            } // [style.prop] bindings may use suffix values (e.g. px, em, etc...), therefore,\n            // if that is detected then we need to pass that in as an optional param.\n\n\n            if (!isClassBased && input.suffix !== null) {\n              params.push(literal(input.suffix));\n            }\n\n            return params;\n          }\n        }; // If we ended up generating a call to the same instruction as the previous styling property\n        // we can chain the calls together safely to save some bytes, otherwise we have to generate\n        // a separate instruction call. This is primarily a concern with interpolation instructions\n        // where we may start off with one `reference`, but end up using another based on the\n        // number of interpolations.\n\n        if (previousInstruction && previousInstruction.reference === referenceForCall) {\n          previousInstruction.calls.push(call);\n        } else {\n          instructions.push({\n            reference: referenceForCall,\n            calls: [call]\n          });\n        }\n      });\n      return instructions;\n    }\n  }, {\n    key: \"_buildClassInputs\",\n    value: function _buildClassInputs(valueConverter) {\n      if (this._singleClassInputs) {\n        return this._buildSingleInputs(Identifiers.classProp, this._singleClassInputs, valueConverter, null, true);\n      }\n\n      return [];\n    }\n  }, {\n    key: \"_buildStyleInputs\",\n    value: function _buildStyleInputs(valueConverter) {\n      if (this._singleStyleInputs) {\n        return this._buildSingleInputs(Identifiers.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);\n      }\n\n      return [];\n    }\n    /**\n     * Constructs all instructions which contain the expressions that will be placed\n     * into the update block of a template function or a directive hostBindings function.\n     */\n\n  }, {\n    key: \"buildUpdateLevelInstructions\",\n    value: function buildUpdateLevelInstructions(valueConverter) {\n      var instructions = [];\n\n      if (this.hasBindings) {\n        var styleMapInstruction = this.buildStyleMapInstruction(valueConverter);\n\n        if (styleMapInstruction) {\n          instructions.push(styleMapInstruction);\n        }\n\n        var classMapInstruction = this.buildClassMapInstruction(valueConverter);\n\n        if (classMapInstruction) {\n          instructions.push(classMapInstruction);\n        }\n\n        instructions.push.apply(instructions, _toConsumableArray(this._buildStyleInputs(valueConverter)));\n        instructions.push.apply(instructions, _toConsumableArray(this._buildClassInputs(valueConverter)));\n      }\n\n      return instructions;\n    }\n  }]);\n\n  return StylingBuilder;\n}();\n\nfunction registerIntoMap(map, key) {\n  if (!map.has(key)) {\n    map.set(key, map.size);\n  }\n}\n\nfunction parseProperty(name) {\n  var hasOverrideFlag = false;\n  var overrideIndex = name.indexOf(IMPORTANT_FLAG);\n\n  if (overrideIndex !== -1) {\n    name = overrideIndex > 0 ? name.substring(0, overrideIndex) : '';\n    hasOverrideFlag = true;\n  }\n\n  var suffix = null;\n  var property = name;\n  var unitIndex = name.lastIndexOf('.');\n\n  if (unitIndex > 0) {\n    suffix = name.substr(unitIndex + 1);\n    property = name.substring(0, unitIndex);\n  }\n\n  return {\n    property: property,\n    suffix: suffix,\n    hasOverrideFlag: hasOverrideFlag\n  };\n}\n/**\n * Gets the instruction to generate for an interpolated class map.\n * @param interpolation An Interpolation AST\n */\n\n\nfunction getClassMapInterpolationExpression(interpolation) {\n  switch (getInterpolationArgsLength(interpolation)) {\n    case 1:\n      return Identifiers.classMap;\n\n    case 3:\n      return Identifiers.classMapInterpolate1;\n\n    case 5:\n      return Identifiers.classMapInterpolate2;\n\n    case 7:\n      return Identifiers.classMapInterpolate3;\n\n    case 9:\n      return Identifiers.classMapInterpolate4;\n\n    case 11:\n      return Identifiers.classMapInterpolate5;\n\n    case 13:\n      return Identifiers.classMapInterpolate6;\n\n    case 15:\n      return Identifiers.classMapInterpolate7;\n\n    case 17:\n      return Identifiers.classMapInterpolate8;\n\n    default:\n      return Identifiers.classMapInterpolateV;\n  }\n}\n/**\n * Gets the instruction to generate for an interpolated style map.\n * @param interpolation An Interpolation AST\n */\n\n\nfunction getStyleMapInterpolationExpression(interpolation) {\n  switch (getInterpolationArgsLength(interpolation)) {\n    case 1:\n      return Identifiers.styleMap;\n\n    case 3:\n      return Identifiers.styleMapInterpolate1;\n\n    case 5:\n      return Identifiers.styleMapInterpolate2;\n\n    case 7:\n      return Identifiers.styleMapInterpolate3;\n\n    case 9:\n      return Identifiers.styleMapInterpolate4;\n\n    case 11:\n      return Identifiers.styleMapInterpolate5;\n\n    case 13:\n      return Identifiers.styleMapInterpolate6;\n\n    case 15:\n      return Identifiers.styleMapInterpolate7;\n\n    case 17:\n      return Identifiers.styleMapInterpolate8;\n\n    default:\n      return Identifiers.styleMapInterpolateV;\n  }\n}\n/**\n * Gets the instruction to generate for an interpolated style prop.\n * @param interpolation An Interpolation AST\n */\n\n\nfunction getStylePropInterpolationExpression(interpolation) {\n  switch (getInterpolationArgsLength(interpolation)) {\n    case 1:\n      return Identifiers.styleProp;\n\n    case 3:\n      return Identifiers.stylePropInterpolate1;\n\n    case 5:\n      return Identifiers.stylePropInterpolate2;\n\n    case 7:\n      return Identifiers.stylePropInterpolate3;\n\n    case 9:\n      return Identifiers.stylePropInterpolate4;\n\n    case 11:\n      return Identifiers.stylePropInterpolate5;\n\n    case 13:\n      return Identifiers.stylePropInterpolate6;\n\n    case 15:\n      return Identifiers.stylePropInterpolate7;\n\n    case 17:\n      return Identifiers.stylePropInterpolate8;\n\n    default:\n      return Identifiers.stylePropInterpolateV;\n  }\n}\n/**\n * Checks whether property name is a custom CSS property.\n * See: https://www.w3.org/TR/css-variables-1\n */\n\n\nfunction isCssCustomProperty(name) {\n  return name.startsWith('--');\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar TokenType = /*@__PURE__*/function (TokenType) {\n  TokenType[TokenType[\"Character\"] = 0] = \"Character\";\n  TokenType[TokenType[\"Identifier\"] = 1] = \"Identifier\";\n  TokenType[TokenType[\"PrivateIdentifier\"] = 2] = \"PrivateIdentifier\";\n  TokenType[TokenType[\"Keyword\"] = 3] = \"Keyword\";\n  TokenType[TokenType[\"String\"] = 4] = \"String\";\n  TokenType[TokenType[\"Operator\"] = 5] = \"Operator\";\n  TokenType[TokenType[\"Number\"] = 6] = \"Number\";\n  TokenType[TokenType[\"Error\"] = 7] = \"Error\";\n  return TokenType;\n}({});\n\nvar KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];\n\nvar Lexer = /*#__PURE__*/function () {\n  function Lexer() {\n    _classCallCheck(this, Lexer);\n  }\n\n  _createClass(Lexer, [{\n    key: \"tokenize\",\n    value: function tokenize(text) {\n      var scanner = new _Scanner(text);\n      var tokens = [];\n      var token = scanner.scanToken();\n\n      while (token != null) {\n        tokens.push(token);\n        token = scanner.scanToken();\n      }\n\n      return tokens;\n    }\n  }]);\n\n  return Lexer;\n}();\n\nvar Token = /*#__PURE__*/function () {\n  function Token(index, end, type, numValue, strValue) {\n    _classCallCheck(this, Token);\n\n    this.index = index;\n    this.end = end;\n    this.type = type;\n    this.numValue = numValue;\n    this.strValue = strValue;\n  }\n\n  _createClass(Token, [{\n    key: \"isCharacter\",\n    value: function isCharacter(code) {\n      return this.type == TokenType.Character && this.numValue == code;\n    }\n  }, {\n    key: \"isNumber\",\n    value: function isNumber() {\n      return this.type == TokenType.Number;\n    }\n  }, {\n    key: \"isString\",\n    value: function isString() {\n      return this.type == TokenType.String;\n    }\n  }, {\n    key: \"isOperator\",\n    value: function isOperator(operator) {\n      return this.type == TokenType.Operator && this.strValue == operator;\n    }\n  }, {\n    key: \"isIdentifier\",\n    value: function isIdentifier() {\n      return this.type == TokenType.Identifier;\n    }\n  }, {\n    key: \"isPrivateIdentifier\",\n    value: function isPrivateIdentifier() {\n      return this.type == TokenType.PrivateIdentifier;\n    }\n  }, {\n    key: \"isKeyword\",\n    value: function isKeyword() {\n      return this.type == TokenType.Keyword;\n    }\n  }, {\n    key: \"isKeywordLet\",\n    value: function isKeywordLet() {\n      return this.type == TokenType.Keyword && this.strValue == 'let';\n    }\n  }, {\n    key: \"isKeywordAs\",\n    value: function isKeywordAs() {\n      return this.type == TokenType.Keyword && this.strValue == 'as';\n    }\n  }, {\n    key: \"isKeywordNull\",\n    value: function isKeywordNull() {\n      return this.type == TokenType.Keyword && this.strValue == 'null';\n    }\n  }, {\n    key: \"isKeywordUndefined\",\n    value: function isKeywordUndefined() {\n      return this.type == TokenType.Keyword && this.strValue == 'undefined';\n    }\n  }, {\n    key: \"isKeywordTrue\",\n    value: function isKeywordTrue() {\n      return this.type == TokenType.Keyword && this.strValue == 'true';\n    }\n  }, {\n    key: \"isKeywordFalse\",\n    value: function isKeywordFalse() {\n      return this.type == TokenType.Keyword && this.strValue == 'false';\n    }\n  }, {\n    key: \"isKeywordThis\",\n    value: function isKeywordThis() {\n      return this.type == TokenType.Keyword && this.strValue == 'this';\n    }\n  }, {\n    key: \"isError\",\n    value: function isError() {\n      return this.type == TokenType.Error;\n    }\n  }, {\n    key: \"toNumber\",\n    value: function toNumber() {\n      return this.type == TokenType.Number ? this.numValue : -1;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      switch (this.type) {\n        case TokenType.Character:\n        case TokenType.Identifier:\n        case TokenType.Keyword:\n        case TokenType.Operator:\n        case TokenType.PrivateIdentifier:\n        case TokenType.String:\n        case TokenType.Error:\n          return this.strValue;\n\n        case TokenType.Number:\n          return this.numValue.toString();\n\n        default:\n          return null;\n      }\n    }\n  }]);\n\n  return Token;\n}();\n\nfunction newCharacterToken(index, end, code) {\n  return new Token(index, end, TokenType.Character, code, String.fromCharCode(code));\n}\n\nfunction newIdentifierToken(index, end, text) {\n  return new Token(index, end, TokenType.Identifier, 0, text);\n}\n\nfunction newPrivateIdentifierToken(index, end, text) {\n  return new Token(index, end, TokenType.PrivateIdentifier, 0, text);\n}\n\nfunction newKeywordToken(index, end, text) {\n  return new Token(index, end, TokenType.Keyword, 0, text);\n}\n\nfunction newOperatorToken(index, end, text) {\n  return new Token(index, end, TokenType.Operator, 0, text);\n}\n\nfunction newStringToken(index, end, text) {\n  return new Token(index, end, TokenType.String, 0, text);\n}\n\nfunction newNumberToken(index, end, n) {\n  return new Token(index, end, TokenType.Number, n, '');\n}\n\nfunction newErrorToken(index, end, message) {\n  return new Token(index, end, TokenType.Error, 0, message);\n}\n\nvar EOF = /*@__PURE__*/new Token(-1, -1, TokenType.Character, 0, '');\n\nvar _Scanner = /*#__PURE__*/function () {\n  function _Scanner(input) {\n    _classCallCheck(this, _Scanner);\n\n    this.input = input;\n    this.peek = 0;\n    this.index = -1;\n    this.length = input.length;\n    this.advance();\n  }\n\n  _createClass(_Scanner, [{\n    key: \"advance\",\n    value: function advance() {\n      this.peek = ++this.index >= this.length ? $EOF : this.input.charCodeAt(this.index);\n    }\n  }, {\n    key: \"scanToken\",\n    value: function scanToken() {\n      var input = this.input,\n          length = this.length;\n      var peek = this.peek,\n          index = this.index; // Skip whitespace.\n\n      while (peek <= $SPACE) {\n        if (++index >= length) {\n          peek = $EOF;\n          break;\n        } else {\n          peek = input.charCodeAt(index);\n        }\n      }\n\n      this.peek = peek;\n      this.index = index;\n\n      if (index >= length) {\n        return null;\n      } // Handle identifiers and numbers.\n\n\n      if (isIdentifierStart(peek)) return this.scanIdentifier();\n      if (isDigit(peek)) return this.scanNumber(index);\n      var start = index;\n\n      switch (peek) {\n        case $PERIOD:\n          this.advance();\n          return isDigit(this.peek) ? this.scanNumber(start) : newCharacterToken(start, this.index, $PERIOD);\n\n        case $LPAREN:\n        case $RPAREN:\n        case $LBRACE:\n        case $RBRACE:\n        case $LBRACKET:\n        case $RBRACKET:\n        case $COMMA:\n        case $COLON:\n        case $SEMICOLON:\n          return this.scanCharacter(start, peek);\n\n        case $SQ:\n        case $DQ:\n          return this.scanString();\n\n        case $HASH:\n          return this.scanPrivateIdentifier();\n\n        case $PLUS:\n        case $MINUS:\n        case $STAR:\n        case $SLASH:\n        case $PERCENT:\n        case $CARET:\n          return this.scanOperator(start, String.fromCharCode(peek));\n\n        case $QUESTION:\n          return this.scanQuestion(start);\n\n        case $LT:\n        case $GT:\n          return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=');\n\n        case $BANG:\n        case $EQ:\n          return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=', $EQ, '=');\n\n        case $AMPERSAND:\n          return this.scanComplexOperator(start, '&', $AMPERSAND, '&');\n\n        case $BAR:\n          return this.scanComplexOperator(start, '|', $BAR, '|');\n\n        case $NBSP:\n          while (isWhitespace(this.peek)) {\n            this.advance();\n          }\n\n          return this.scanToken();\n      }\n\n      this.advance();\n      return this.error(\"Unexpected character [\".concat(String.fromCharCode(peek), \"]\"), 0);\n    }\n  }, {\n    key: \"scanCharacter\",\n    value: function scanCharacter(start, code) {\n      this.advance();\n      return newCharacterToken(start, this.index, code);\n    }\n  }, {\n    key: \"scanOperator\",\n    value: function scanOperator(start, str) {\n      this.advance();\n      return newOperatorToken(start, this.index, str);\n    }\n    /**\n     * Tokenize a 2/3 char long operator\n     *\n     * @param start start index in the expression\n     * @param one first symbol (always part of the operator)\n     * @param twoCode code point for the second symbol\n     * @param two second symbol (part of the operator when the second code point matches)\n     * @param threeCode code point for the third symbol\n     * @param three third symbol (part of the operator when provided and matches source expression)\n     */\n\n  }, {\n    key: \"scanComplexOperator\",\n    value: function scanComplexOperator(start, one, twoCode, two, threeCode, three) {\n      this.advance();\n      var str = one;\n\n      if (this.peek == twoCode) {\n        this.advance();\n        str += two;\n      }\n\n      if (threeCode != null && this.peek == threeCode) {\n        this.advance();\n        str += three;\n      }\n\n      return newOperatorToken(start, this.index, str);\n    }\n  }, {\n    key: \"scanIdentifier\",\n    value: function scanIdentifier() {\n      var start = this.index;\n      this.advance();\n\n      while (isIdentifierPart(this.peek)) {\n        this.advance();\n      }\n\n      var str = this.input.substring(start, this.index);\n      return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, this.index, str) : newIdentifierToken(start, this.index, str);\n    }\n    /** Scans an ECMAScript private identifier. */\n\n  }, {\n    key: \"scanPrivateIdentifier\",\n    value: function scanPrivateIdentifier() {\n      var start = this.index;\n      this.advance();\n\n      if (!isIdentifierStart(this.peek)) {\n        return this.error('Invalid character [#]', -1);\n      }\n\n      while (isIdentifierPart(this.peek)) {\n        this.advance();\n      }\n\n      var identifierName = this.input.substring(start, this.index);\n      return newPrivateIdentifierToken(start, this.index, identifierName);\n    }\n  }, {\n    key: \"scanNumber\",\n    value: function scanNumber(start) {\n      var simple = this.index === start;\n      var hasSeparators = false;\n      this.advance(); // Skip initial digit.\n\n      while (true) {\n        if (isDigit(this.peek)) {// Do nothing.\n        } else if (this.peek === $_) {\n          // Separators are only valid when they're surrounded by digits. E.g. `1_0_1` is\n          // valid while `_101` and `101_` are not. The separator can't be next to the decimal\n          // point or another separator either. Note that it's unlikely that we'll hit a case where\n          // the underscore is at the start, because that's a valid identifier and it will be picked\n          // up earlier in the parsing. We validate for it anyway just in case.\n          if (!isDigit(this.input.charCodeAt(this.index - 1)) || !isDigit(this.input.charCodeAt(this.index + 1))) {\n            return this.error('Invalid numeric separator', 0);\n          }\n\n          hasSeparators = true;\n        } else if (this.peek === $PERIOD) {\n          simple = false;\n        } else if (isExponentStart(this.peek)) {\n          this.advance();\n          if (isExponentSign(this.peek)) this.advance();\n          if (!isDigit(this.peek)) return this.error('Invalid exponent', -1);\n          simple = false;\n        } else {\n          break;\n        }\n\n        this.advance();\n      }\n\n      var str = this.input.substring(start, this.index);\n\n      if (hasSeparators) {\n        str = str.replace(/_/g, '');\n      }\n\n      var value = simple ? parseIntAutoRadix(str) : parseFloat(str);\n      return newNumberToken(start, this.index, value);\n    }\n  }, {\n    key: \"scanString\",\n    value: function scanString() {\n      var start = this.index;\n      var quote = this.peek;\n      this.advance(); // Skip initial quote.\n\n      var buffer = '';\n      var marker = this.index;\n      var input = this.input;\n\n      while (this.peek != quote) {\n        if (this.peek == $BACKSLASH) {\n          buffer += input.substring(marker, this.index);\n          this.advance();\n          var unescapedCode = void 0; // Workaround for TS2.1-introduced type strictness\n\n          this.peek = this.peek;\n\n          if (this.peek == $u) {\n            // 4 character hex code for unicode character.\n            var hex = input.substring(this.index + 1, this.index + 5);\n\n            if (/^[0-9a-f]+$/i.test(hex)) {\n              unescapedCode = parseInt(hex, 16);\n            } else {\n              return this.error(\"Invalid unicode escape [\\\\u\".concat(hex, \"]\"), 0);\n            }\n\n            for (var i = 0; i < 5; i++) {\n              this.advance();\n            }\n          } else {\n            unescapedCode = unescape(this.peek);\n            this.advance();\n          }\n\n          buffer += String.fromCharCode(unescapedCode);\n          marker = this.index;\n        } else if (this.peek == $EOF) {\n          return this.error('Unterminated quote', 0);\n        } else {\n          this.advance();\n        }\n      }\n\n      var last = input.substring(marker, this.index);\n      this.advance(); // Skip terminating quote.\n\n      return newStringToken(start, this.index, buffer + last);\n    }\n  }, {\n    key: \"scanQuestion\",\n    value: function scanQuestion(start) {\n      this.advance();\n      var str = '?'; // Either `a ?? b` or 'a?.b'.\n\n      if (this.peek === $QUESTION || this.peek === $PERIOD) {\n        str += this.peek === $PERIOD ? '.' : '?';\n        this.advance();\n      }\n\n      return newOperatorToken(start, this.index, str);\n    }\n  }, {\n    key: \"error\",\n    value: function error(message, offset) {\n      var position = this.index + offset;\n      return newErrorToken(position, this.index, \"Lexer Error: \".concat(message, \" at column \").concat(position, \" in expression [\").concat(this.input, \"]\"));\n    }\n  }]);\n\n  return _Scanner;\n}();\n\nfunction isIdentifierStart(code) {\n  return $a <= code && code <= $z || $A <= code && code <= $Z || code == $_ || code == $$;\n}\n\nfunction isIdentifier(input) {\n  if (input.length == 0) return false;\n  var scanner = new _Scanner(input);\n  if (!isIdentifierStart(scanner.peek)) return false;\n  scanner.advance();\n\n  while (scanner.peek !== $EOF) {\n    if (!isIdentifierPart(scanner.peek)) return false;\n    scanner.advance();\n  }\n\n  return true;\n}\n\nfunction isIdentifierPart(code) {\n  return isAsciiLetter(code) || isDigit(code) || code == $_ || code == $$;\n}\n\nfunction isExponentStart(code) {\n  return code == $e || code == $E;\n}\n\nfunction isExponentSign(code) {\n  return code == $MINUS || code == $PLUS;\n}\n\nfunction unescape(code) {\n  switch (code) {\n    case $n:\n      return $LF;\n\n    case $f:\n      return $FF;\n\n    case $r:\n      return $CR;\n\n    case $t:\n      return $TAB;\n\n    case $v:\n      return $VTAB;\n\n    default:\n      return code;\n  }\n}\n\nfunction parseIntAutoRadix(text) {\n  var result = parseInt(text);\n\n  if (isNaN(result)) {\n    throw new Error('Invalid integer literal when parsing ' + text);\n  }\n\n  return result;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar SplitInterpolation = /*#__PURE__*/_createClass(function SplitInterpolation(strings, expressions, offsets) {\n  _classCallCheck(this, SplitInterpolation);\n\n  this.strings = strings;\n  this.expressions = expressions;\n  this.offsets = offsets;\n});\n\nvar TemplateBindingParseResult = /*#__PURE__*/_createClass(function TemplateBindingParseResult(templateBindings, warnings, errors) {\n  _classCallCheck(this, TemplateBindingParseResult);\n\n  this.templateBindings = templateBindings;\n  this.warnings = warnings;\n  this.errors = errors;\n});\n\nvar Parser$1 = /*#__PURE__*/function () {\n  function Parser$1(_lexer) {\n    _classCallCheck(this, Parser$1);\n\n    this._lexer = _lexer;\n    this.errors = [];\n    this.simpleExpressionChecker = SimpleExpressionChecker;\n  }\n\n  _createClass(Parser$1, [{\n    key: \"parseAction\",\n    value: function parseAction(input, location, absoluteOffset) {\n      var interpolationConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_INTERPOLATION_CONFIG;\n\n      this._checkNoInterpolation(input, location, interpolationConfig);\n\n      var sourceToLex = this._stripComments(input);\n\n      var tokens = this._lexer.tokenize(this._stripComments(input));\n\n      var ast = new _ParseAST(input, location, absoluteOffset, tokens, sourceToLex.length, true, this.errors, input.length - sourceToLex.length).parseChain();\n      return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n    }\n  }, {\n    key: \"parseBinding\",\n    value: function parseBinding(input, location, absoluteOffset) {\n      var interpolationConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_INTERPOLATION_CONFIG;\n\n      var ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);\n\n      return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n    }\n  }, {\n    key: \"checkSimpleExpression\",\n    value: function checkSimpleExpression(ast) {\n      var checker = new this.simpleExpressionChecker();\n      ast.visit(checker);\n      return checker.errors;\n    }\n  }, {\n    key: \"parseSimpleBinding\",\n    value: function parseSimpleBinding(input, location, absoluteOffset) {\n      var interpolationConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_INTERPOLATION_CONFIG;\n\n      var ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);\n\n      var errors = this.checkSimpleExpression(ast);\n\n      if (errors.length > 0) {\n        this._reportError(\"Host binding expression cannot contain \".concat(errors.join(' ')), input, location);\n      }\n\n      return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n    }\n  }, {\n    key: \"_reportError\",\n    value: function _reportError(message, input, errLocation, ctxLocation) {\n      this.errors.push(new ParserError(message, input, errLocation, ctxLocation));\n    }\n  }, {\n    key: \"_parseBindingAst\",\n    value: function _parseBindingAst(input, location, absoluteOffset, interpolationConfig) {\n      // Quotes expressions use 3rd-party expression language. We don't want to use\n      // our lexer or parser for that, so we check for that ahead of time.\n      var quote = this._parseQuote(input, location, absoluteOffset);\n\n      if (quote != null) {\n        return quote;\n      }\n\n      this._checkNoInterpolation(input, location, interpolationConfig);\n\n      var sourceToLex = this._stripComments(input);\n\n      var tokens = this._lexer.tokenize(sourceToLex);\n\n      return new _ParseAST(input, location, absoluteOffset, tokens, sourceToLex.length, false, this.errors, input.length - sourceToLex.length).parseChain();\n    }\n  }, {\n    key: \"_parseQuote\",\n    value: function _parseQuote(input, location, absoluteOffset) {\n      if (input == null) return null;\n      var prefixSeparatorIndex = input.indexOf(':');\n      if (prefixSeparatorIndex == -1) return null;\n      var prefix = input.substring(0, prefixSeparatorIndex).trim();\n      if (!isIdentifier(prefix)) return null;\n      var uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);\n      var span = new ParseSpan(0, input.length);\n      return new Quote(span, span.toAbsolute(absoluteOffset), prefix, uninterpretedExpression, location);\n    }\n    /**\n     * Parse microsyntax template expression and return a list of bindings or\n     * parsing errors in case the given expression is invalid.\n     *\n     * For example,\n     * ```\n     *   <div *ngFor=\"let item of items\">\n     *         ^      ^ absoluteValueOffset for `templateValue`\n     *         absoluteKeyOffset for `templateKey`\n     * ```\n     * contains three bindings:\n     * 1. ngFor -> null\n     * 2. item -> NgForOfContext.$implicit\n     * 3. ngForOf -> items\n     *\n     * This is apparent from the de-sugared template:\n     * ```\n     *   <ng-template ngFor let-item [ngForOf]=\"items\">\n     * ```\n     *\n     * @param templateKey name of directive, without the * prefix. For example: ngIf, ngFor\n     * @param templateValue RHS of the microsyntax attribute\n     * @param templateUrl template filename if it's external, component filename if it's inline\n     * @param absoluteKeyOffset start of the `templateKey`\n     * @param absoluteValueOffset start of the `templateValue`\n     */\n\n  }, {\n    key: \"parseTemplateBindings\",\n    value: function parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {\n      var tokens = this._lexer.tokenize(templateValue);\n\n      var parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, templateValue.length, false\n      /* parseAction */\n      , this.errors, 0\n      /* relative offset */\n      );\n      return parser.parseTemplateBindings({\n        source: templateKey,\n        span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length)\n      });\n    }\n  }, {\n    key: \"parseInterpolation\",\n    value: function parseInterpolation(input, location, absoluteOffset) {\n      var interpolationConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_INTERPOLATION_CONFIG;\n\n      var _this$splitInterpolat = this.splitInterpolation(input, location, interpolationConfig),\n          strings = _this$splitInterpolat.strings,\n          expressions = _this$splitInterpolat.expressions,\n          offsets = _this$splitInterpolat.offsets;\n\n      if (expressions.length === 0) return null;\n      var expressionNodes = [];\n\n      for (var i = 0; i < expressions.length; ++i) {\n        var expressionText = expressions[i].text;\n\n        var sourceToLex = this._stripComments(expressionText);\n\n        var tokens = this._lexer.tokenize(sourceToLex);\n\n        var ast = new _ParseAST(input, location, absoluteOffset, tokens, sourceToLex.length, false, this.errors, offsets[i] + (expressionText.length - sourceToLex.length)).parseChain();\n        expressionNodes.push(ast);\n      }\n\n      return this.createInterpolationAst(strings.map(function (s) {\n        return s.text;\n      }), expressionNodes, input, location, absoluteOffset);\n    }\n    /**\n     * Similar to `parseInterpolation`, but treats the provided string as a single expression\n     * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).\n     * This is used for parsing the switch expression in ICUs.\n     */\n\n  }, {\n    key: \"parseInterpolationExpression\",\n    value: function parseInterpolationExpression(expression, location, absoluteOffset) {\n      var sourceToLex = this._stripComments(expression);\n\n      var tokens = this._lexer.tokenize(sourceToLex);\n\n      var ast = new _ParseAST(expression, location, absoluteOffset, tokens, sourceToLex.length,\n      /* parseAction */\n      false, this.errors, 0).parseChain();\n      var strings = ['', '']; // The prefix and suffix strings are both empty\n\n      return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset);\n    }\n  }, {\n    key: \"createInterpolationAst\",\n    value: function createInterpolationAst(strings, expressions, input, location, absoluteOffset) {\n      var span = new ParseSpan(0, input.length);\n      var interpolation = new Interpolation(span, span.toAbsolute(absoluteOffset), strings, expressions);\n      return new ASTWithSource(interpolation, input, location, absoluteOffset, this.errors);\n    }\n    /**\n     * Splits a string of text into \"raw\" text segments and expressions present in interpolations in\n     * the string.\n     * Returns `null` if there are no interpolations, otherwise a\n     * `SplitInterpolation` with splits that look like\n     *   <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>\n     */\n\n  }, {\n    key: \"splitInterpolation\",\n    value: function splitInterpolation(input, location) {\n      var interpolationConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_INTERPOLATION_CONFIG;\n      var strings = [];\n      var expressions = [];\n      var offsets = [];\n      var i = 0;\n      var atInterpolation = false;\n      var extendLastString = false;\n      var interpStart = interpolationConfig.start,\n          interpEnd = interpolationConfig.end;\n\n      while (i < input.length) {\n        if (!atInterpolation) {\n          // parse until starting {{\n          var _start4 = i;\n          i = input.indexOf(interpStart, i);\n\n          if (i === -1) {\n            i = input.length;\n          }\n\n          var text = input.substring(_start4, i);\n          strings.push({\n            text: text,\n            start: _start4,\n            end: i\n          });\n          atInterpolation = true;\n        } else {\n          // parse from starting {{ to ending }} while ignoring content inside quotes.\n          var fullStart = i;\n          var exprStart = fullStart + interpStart.length;\n\n          var exprEnd = this._getInterpolationEndIndex(input, interpEnd, exprStart);\n\n          if (exprEnd === -1) {\n            // Could not find the end of the interpolation; do not parse an expression.\n            // Instead we should extend the content on the last raw string.\n            atInterpolation = false;\n            extendLastString = true;\n            break;\n          }\n\n          var fullEnd = exprEnd + interpEnd.length;\n\n          var _text = input.substring(exprStart, exprEnd);\n\n          if (_text.trim().length === 0) {\n            this._reportError('Blank expressions are not allowed in interpolated strings', input, \"at column \".concat(i, \" in\"), location);\n          }\n\n          expressions.push({\n            text: _text,\n            start: fullStart,\n            end: fullEnd\n          });\n          offsets.push(exprStart);\n          i = fullEnd;\n          atInterpolation = false;\n        }\n      }\n\n      if (!atInterpolation) {\n        // If we are now at a text section, add the remaining content as a raw string.\n        if (extendLastString) {\n          var piece = strings[strings.length - 1];\n          piece.text += input.substring(i);\n          piece.end = input.length;\n        } else {\n          strings.push({\n            text: input.substring(i),\n            start: i,\n            end: input.length\n          });\n        }\n      }\n\n      return new SplitInterpolation(strings, expressions, offsets);\n    }\n  }, {\n    key: \"wrapLiteralPrimitive\",\n    value: function wrapLiteralPrimitive(input, location, absoluteOffset) {\n      var span = new ParseSpan(0, input == null ? 0 : input.length);\n      return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, location, absoluteOffset, this.errors);\n    }\n  }, {\n    key: \"_stripComments\",\n    value: function _stripComments(input) {\n      var i = this._commentStart(input);\n\n      return i != null ? input.substring(0, i).trim() : input;\n    }\n  }, {\n    key: \"_commentStart\",\n    value: function _commentStart(input) {\n      var outerQuote = null;\n\n      for (var i = 0; i < input.length - 1; i++) {\n        var char = input.charCodeAt(i);\n        var nextChar = input.charCodeAt(i + 1);\n        if (char === $SLASH && nextChar == $SLASH && outerQuote == null) return i;\n\n        if (outerQuote === char) {\n          outerQuote = null;\n        } else if (outerQuote == null && isQuote(char)) {\n          outerQuote = char;\n        }\n      }\n\n      return null;\n    }\n  }, {\n    key: \"_checkNoInterpolation\",\n    value: function _checkNoInterpolation(input, location, _ref16) {\n      var start = _ref16.start,\n          end = _ref16.end;\n      var startIndex = -1;\n      var endIndex = -1;\n\n      var _iterator11 = _createForOfIteratorHelper(this._forEachUnquotedChar(input, 0)),\n          _step11;\n\n      try {\n        for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n          var charIndex = _step11.value;\n\n          if (startIndex === -1) {\n            if (input.startsWith(start)) {\n              startIndex = charIndex;\n            }\n          } else {\n            endIndex = this._getInterpolationEndIndex(input, end, charIndex);\n\n            if (endIndex > -1) {\n              break;\n            }\n          }\n        }\n      } catch (err) {\n        _iterator11.e(err);\n      } finally {\n        _iterator11.f();\n      }\n\n      if (startIndex > -1 && endIndex > -1) {\n        this._reportError(\"Got interpolation (\".concat(start).concat(end, \") where expression was expected\"), input, \"at column \".concat(startIndex, \" in\"), location);\n      }\n    }\n    /**\n     * Finds the index of the end of an interpolation expression\n     * while ignoring comments and quoted content.\n     */\n\n  }, {\n    key: \"_getInterpolationEndIndex\",\n    value: function _getInterpolationEndIndex(input, expressionEnd, start) {\n      var _iterator12 = _createForOfIteratorHelper(this._forEachUnquotedChar(input, start)),\n          _step12;\n\n      try {\n        for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n          var charIndex = _step12.value;\n\n          if (input.startsWith(expressionEnd, charIndex)) {\n            return charIndex;\n          } // Nothing else in the expression matters after we've\n          // hit a comment so look directly for the end token.\n\n\n          if (input.startsWith('//', charIndex)) {\n            return input.indexOf(expressionEnd, charIndex);\n          }\n        }\n      } catch (err) {\n        _iterator12.e(err);\n      } finally {\n        _iterator12.f();\n      }\n\n      return -1;\n    }\n    /**\n     * Generator used to iterate over the character indexes of a string that are outside of quotes.\n     * @param input String to loop through.\n     * @param start Index within the string at which to start.\n     */\n\n  }, {\n    key: \"_forEachUnquotedChar\",\n    value:\n    /*#__PURE__*/\n    _regeneratorRuntime.mark(function _forEachUnquotedChar(input, start) {\n      var currentQuote, escapeCount, i, char;\n      return _regeneratorRuntime.wrap(function _forEachUnquotedChar$(_context2) {\n        while (1) {\n          switch (_context2.prev = _context2.next) {\n            case 0:\n              currentQuote = null;\n              escapeCount = 0;\n              i = start;\n\n            case 3:\n              if (!(i < input.length)) {\n                _context2.next = 16;\n                break;\n              }\n\n              char = input[i]; // Skip the characters inside quotes. Note that we only care about the outer-most\n              // quotes matching up and we need to account for escape characters.\n\n              if (!(isQuote(input.charCodeAt(i)) && (currentQuote === null || currentQuote === char) && escapeCount % 2 === 0)) {\n                _context2.next = 9;\n                break;\n              }\n\n              currentQuote = currentQuote === null ? char : null;\n              _context2.next = 12;\n              break;\n\n            case 9:\n              if (!(currentQuote === null)) {\n                _context2.next = 12;\n                break;\n              }\n\n              _context2.next = 12;\n              return i;\n\n            case 12:\n              escapeCount = char === '\\\\' ? escapeCount + 1 : 0;\n\n            case 13:\n              i++;\n              _context2.next = 3;\n              break;\n\n            case 16:\n            case \"end\":\n              return _context2.stop();\n          }\n        }\n      }, _forEachUnquotedChar);\n    })\n  }]);\n\n  return Parser$1;\n}();\n\nvar IvyParser = /*#__PURE__*/function (_Parser$) {\n  _inherits(IvyParser, _Parser$);\n\n  var _super96 = _createSuper(IvyParser);\n\n  function IvyParser() {\n    var _this161;\n\n    _classCallCheck(this, IvyParser);\n\n    _this161 = _super96.apply(this, arguments);\n    _this161.simpleExpressionChecker = IvySimpleExpressionChecker;\n    return _this161;\n  }\n\n  return _createClass(IvyParser);\n}(Parser$1);\n/** Describes a stateful context an expression parser is in. */\n\n\nvar ParseContextFlags = /*@__PURE__*/function (ParseContextFlags) {\n  ParseContextFlags[ParseContextFlags[\"None\"] = 0] = \"None\";\n  /**\n   * A Writable context is one in which a value may be written to an lvalue.\n   * For example, after we see a property access, we may expect a write to the\n   * property via the \"=\" operator.\n   *   prop\n   *        ^ possible \"=\" after\n   */\n\n  ParseContextFlags[ParseContextFlags[\"Writable\"] = 1] = \"Writable\";\n  return ParseContextFlags;\n}({});\n\nvar _ParseAST = /*#__PURE__*/function () {\n  function _ParseAST(input, location, absoluteOffset, tokens, inputLength, parseAction, errors, offset) {\n    _classCallCheck(this, _ParseAST);\n\n    this.input = input;\n    this.location = location;\n    this.absoluteOffset = absoluteOffset;\n    this.tokens = tokens;\n    this.inputLength = inputLength;\n    this.parseAction = parseAction;\n    this.errors = errors;\n    this.offset = offset;\n    this.rparensExpected = 0;\n    this.rbracketsExpected = 0;\n    this.rbracesExpected = 0;\n    this.context = ParseContextFlags.None; // Cache of expression start and input indeces to the absolute source span they map to, used to\n    // prevent creating superfluous source spans in `sourceSpan`.\n    // A serial of the expression start and input index is used for mapping because both are stateful\n    // and may change for subsequent expressions visited by the parser.\n\n    this.sourceSpanCache = new Map();\n    this.index = 0;\n  }\n\n  _createClass(_ParseAST, [{\n    key: \"peek\",\n    value: function peek(offset) {\n      var i = this.index + offset;\n      return i < this.tokens.length ? this.tokens[i] : EOF;\n    }\n  }, {\n    key: \"next\",\n    get: function get() {\n      return this.peek(0);\n    }\n    /** Whether all the parser input has been processed. */\n\n  }, {\n    key: \"atEOF\",\n    get: function get() {\n      return this.index >= this.tokens.length;\n    }\n    /**\n     * Index of the next token to be processed, or the end of the last token if all have been\n     * processed.\n     */\n\n  }, {\n    key: \"inputIndex\",\n    get: function get() {\n      return this.atEOF ? this.currentEndIndex : this.next.index + this.offset;\n    }\n    /**\n     * End index of the last processed token, or the start of the first token if none have been\n     * processed.\n     */\n\n  }, {\n    key: \"currentEndIndex\",\n    get: function get() {\n      if (this.index > 0) {\n        var curToken = this.peek(-1);\n        return curToken.end + this.offset;\n      } // No tokens have been processed yet; return the next token's start or the length of the input\n      // if there is no token.\n\n\n      if (this.tokens.length === 0) {\n        return this.inputLength + this.offset;\n      }\n\n      return this.next.index + this.offset;\n    }\n    /**\n     * Returns the absolute offset of the start of the current token.\n     */\n\n  }, {\n    key: \"currentAbsoluteOffset\",\n    get: function get() {\n      return this.absoluteOffset + this.inputIndex;\n    }\n    /**\n     * Retrieve a `ParseSpan` from `start` to the current position (or to `artificialEndIndex` if\n     * provided).\n     *\n     * @param start Position from which the `ParseSpan` will start.\n     * @param artificialEndIndex Optional ending index to be used if provided (and if greater than the\n     *     natural ending index)\n     */\n\n  }, {\n    key: \"span\",\n    value: function span(start, artificialEndIndex) {\n      var endIndex = this.currentEndIndex;\n\n      if (artificialEndIndex !== undefined && artificialEndIndex > this.currentEndIndex) {\n        endIndex = artificialEndIndex;\n      } // In some unusual parsing scenarios (like when certain tokens are missing and an `EmptyExpr` is\n      // being created), the current token may already be advanced beyond the `currentEndIndex`. This\n      // appears to be a deep-seated parser bug.\n      //\n      // As a workaround for now, swap the start and end indices to ensure a valid `ParseSpan`.\n      // TODO(alxhub): fix the bug upstream in the parser state, and remove this workaround.\n\n\n      if (start > endIndex) {\n        var tmp = endIndex;\n        endIndex = start;\n        start = tmp;\n      }\n\n      return new ParseSpan(start, endIndex);\n    }\n  }, {\n    key: \"sourceSpan\",\n    value: function sourceSpan(start, artificialEndIndex) {\n      var serial = \"\".concat(start, \"@\").concat(this.inputIndex, \":\").concat(artificialEndIndex);\n\n      if (!this.sourceSpanCache.has(serial)) {\n        this.sourceSpanCache.set(serial, this.span(start, artificialEndIndex).toAbsolute(this.absoluteOffset));\n      }\n\n      return this.sourceSpanCache.get(serial);\n    }\n  }, {\n    key: \"advance\",\n    value: function advance() {\n      this.index++;\n    }\n    /**\n     * Executes a callback in the provided context.\n     */\n\n  }, {\n    key: \"withContext\",\n    value: function withContext(context, cb) {\n      this.context |= context;\n      var ret = cb();\n      this.context ^= context;\n      return ret;\n    }\n  }, {\n    key: \"consumeOptionalCharacter\",\n    value: function consumeOptionalCharacter(code) {\n      if (this.next.isCharacter(code)) {\n        this.advance();\n        return true;\n      } else {\n        return false;\n      }\n    }\n  }, {\n    key: \"peekKeywordLet\",\n    value: function peekKeywordLet() {\n      return this.next.isKeywordLet();\n    }\n  }, {\n    key: \"peekKeywordAs\",\n    value: function peekKeywordAs() {\n      return this.next.isKeywordAs();\n    }\n    /**\n     * Consumes an expected character, otherwise emits an error about the missing expected character\n     * and skips over the token stream until reaching a recoverable point.\n     *\n     * See `this.error` and `this.skip` for more details.\n     */\n\n  }, {\n    key: \"expectCharacter\",\n    value: function expectCharacter(code) {\n      if (this.consumeOptionalCharacter(code)) return;\n      this.error(\"Missing expected \".concat(String.fromCharCode(code)));\n    }\n  }, {\n    key: \"consumeOptionalOperator\",\n    value: function consumeOptionalOperator(op) {\n      if (this.next.isOperator(op)) {\n        this.advance();\n        return true;\n      } else {\n        return false;\n      }\n    }\n  }, {\n    key: \"expectOperator\",\n    value: function expectOperator(operator) {\n      if (this.consumeOptionalOperator(operator)) return;\n      this.error(\"Missing expected operator \".concat(operator));\n    }\n  }, {\n    key: \"prettyPrintToken\",\n    value: function prettyPrintToken(tok) {\n      return tok === EOF ? 'end of input' : \"token \".concat(tok);\n    }\n  }, {\n    key: \"expectIdentifierOrKeyword\",\n    value: function expectIdentifierOrKeyword() {\n      var n = this.next;\n\n      if (!n.isIdentifier() && !n.isKeyword()) {\n        if (n.isPrivateIdentifier()) {\n          this._reportErrorForPrivateIdentifier(n, 'expected identifier or keyword');\n        } else {\n          this.error(\"Unexpected \".concat(this.prettyPrintToken(n), \", expected identifier or keyword\"));\n        }\n\n        return null;\n      }\n\n      this.advance();\n      return n.toString();\n    }\n  }, {\n    key: \"expectIdentifierOrKeywordOrString\",\n    value: function expectIdentifierOrKeywordOrString() {\n      var n = this.next;\n\n      if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {\n        if (n.isPrivateIdentifier()) {\n          this._reportErrorForPrivateIdentifier(n, 'expected identifier, keyword or string');\n        } else {\n          this.error(\"Unexpected \".concat(this.prettyPrintToken(n), \", expected identifier, keyword, or string\"));\n        }\n\n        return '';\n      }\n\n      this.advance();\n      return n.toString();\n    }\n  }, {\n    key: \"parseChain\",\n    value: function parseChain() {\n      var exprs = [];\n      var start = this.inputIndex;\n\n      while (this.index < this.tokens.length) {\n        var expr = this.parsePipe();\n        exprs.push(expr);\n\n        if (this.consumeOptionalCharacter($SEMICOLON)) {\n          if (!this.parseAction) {\n            this.error('Binding expression cannot contain chained expression');\n          }\n\n          while (this.consumeOptionalCharacter($SEMICOLON)) {} // read all semicolons\n\n        } else if (this.index < this.tokens.length) {\n          this.error(\"Unexpected token '\".concat(this.next, \"'\"));\n        }\n      }\n\n      if (exprs.length == 0) {\n        // We have no expressions so create an empty expression that spans the entire input length\n        var artificialStart = this.offset;\n        var artificialEnd = this.offset + this.inputLength;\n        return new EmptyExpr(this.span(artificialStart, artificialEnd), this.sourceSpan(artificialStart, artificialEnd));\n      }\n\n      if (exprs.length == 1) return exprs[0];\n      return new Chain(this.span(start), this.sourceSpan(start), exprs);\n    }\n  }, {\n    key: \"parsePipe\",\n    value: function parsePipe() {\n      var start = this.inputIndex;\n      var result = this.parseExpression();\n\n      if (this.consumeOptionalOperator('|')) {\n        if (this.parseAction) {\n          this.error('Cannot have a pipe in an action expression');\n        }\n\n        do {\n          var nameStart = this.inputIndex;\n          var nameId = this.expectIdentifierOrKeyword();\n          var nameSpan = void 0;\n          var fullSpanEnd = undefined;\n\n          if (nameId !== null) {\n            nameSpan = this.sourceSpan(nameStart);\n          } else {\n            // No valid identifier was found, so we'll assume an empty pipe name ('').\n            nameId = ''; // However, there may have been whitespace present between the pipe character and the next\n            // token in the sequence (or the end of input). We want to track this whitespace so that\n            // the `BindingPipe` we produce covers not just the pipe character, but any trailing\n            // whitespace beyond it. Another way of thinking about this is that the zero-length name\n            // is assumed to be at the end of any whitespace beyond the pipe character.\n            //\n            // Therefore, we push the end of the `ParseSpan` for this pipe all the way up to the\n            // beginning of the next token, or until the end of input if the next token is EOF.\n\n            fullSpanEnd = this.next.index !== -1 ? this.next.index : this.inputLength + this.offset; // The `nameSpan` for an empty pipe name is zero-length at the end of any whitespace\n            // beyond the pipe character.\n\n            nameSpan = new ParseSpan(fullSpanEnd, fullSpanEnd).toAbsolute(this.absoluteOffset);\n          }\n\n          var args = [];\n\n          while (this.consumeOptionalCharacter($COLON)) {\n            args.push(this.parseExpression()); // If there are additional expressions beyond the name, then the artificial end for the\n            // name is no longer relevant.\n          }\n\n          result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, nameSpan);\n        } while (this.consumeOptionalOperator('|'));\n      }\n\n      return result;\n    }\n  }, {\n    key: \"parseExpression\",\n    value: function parseExpression() {\n      return this.parseConditional();\n    }\n  }, {\n    key: \"parseConditional\",\n    value: function parseConditional() {\n      var start = this.inputIndex;\n      var result = this.parseLogicalOr();\n\n      if (this.consumeOptionalOperator('?')) {\n        var yes = this.parsePipe();\n        var no;\n\n        if (!this.consumeOptionalCharacter($COLON)) {\n          var end = this.inputIndex;\n          var expression = this.input.substring(start, end);\n          this.error(\"Conditional expression \".concat(expression, \" requires all 3 expressions\"));\n          no = new EmptyExpr(this.span(start), this.sourceSpan(start));\n        } else {\n          no = this.parsePipe();\n        }\n\n        return new Conditional(this.span(start), this.sourceSpan(start), result, yes, no);\n      } else {\n        return result;\n      }\n    }\n  }, {\n    key: \"parseLogicalOr\",\n    value: function parseLogicalOr() {\n      // '||'\n      var start = this.inputIndex;\n      var result = this.parseLogicalAnd();\n\n      while (this.consumeOptionalOperator('||')) {\n        var right = this.parseLogicalAnd();\n        result = new Binary(this.span(start), this.sourceSpan(start), '||', result, right);\n      }\n\n      return result;\n    }\n  }, {\n    key: \"parseLogicalAnd\",\n    value: function parseLogicalAnd() {\n      // '&&'\n      var start = this.inputIndex;\n      var result = this.parseNullishCoalescing();\n\n      while (this.consumeOptionalOperator('&&')) {\n        var right = this.parseNullishCoalescing();\n        result = new Binary(this.span(start), this.sourceSpan(start), '&&', result, right);\n      }\n\n      return result;\n    }\n  }, {\n    key: \"parseNullishCoalescing\",\n    value: function parseNullishCoalescing() {\n      // '??'\n      var start = this.inputIndex;\n      var result = this.parseEquality();\n\n      while (this.consumeOptionalOperator('??')) {\n        var right = this.parseEquality();\n        result = new Binary(this.span(start), this.sourceSpan(start), '??', result, right);\n      }\n\n      return result;\n    }\n  }, {\n    key: \"parseEquality\",\n    value: function parseEquality() {\n      // '==','!=','===','!=='\n      var start = this.inputIndex;\n      var result = this.parseRelational();\n\n      while (this.next.type == TokenType.Operator) {\n        var operator = this.next.strValue;\n\n        switch (operator) {\n          case '==':\n          case '===':\n          case '!=':\n          case '!==':\n            this.advance();\n            var right = this.parseRelational();\n            result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n            continue;\n        }\n\n        break;\n      }\n\n      return result;\n    }\n  }, {\n    key: \"parseRelational\",\n    value: function parseRelational() {\n      // '<', '>', '<=', '>='\n      var start = this.inputIndex;\n      var result = this.parseAdditive();\n\n      while (this.next.type == TokenType.Operator) {\n        var operator = this.next.strValue;\n\n        switch (operator) {\n          case '<':\n          case '>':\n          case '<=':\n          case '>=':\n            this.advance();\n            var right = this.parseAdditive();\n            result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n            continue;\n        }\n\n        break;\n      }\n\n      return result;\n    }\n  }, {\n    key: \"parseAdditive\",\n    value: function parseAdditive() {\n      // '+', '-'\n      var start = this.inputIndex;\n      var result = this.parseMultiplicative();\n\n      while (this.next.type == TokenType.Operator) {\n        var operator = this.next.strValue;\n\n        switch (operator) {\n          case '+':\n          case '-':\n            this.advance();\n            var right = this.parseMultiplicative();\n            result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n            continue;\n        }\n\n        break;\n      }\n\n      return result;\n    }\n  }, {\n    key: \"parseMultiplicative\",\n    value: function parseMultiplicative() {\n      // '*', '%', '/'\n      var start = this.inputIndex;\n      var result = this.parsePrefix();\n\n      while (this.next.type == TokenType.Operator) {\n        var operator = this.next.strValue;\n\n        switch (operator) {\n          case '*':\n          case '%':\n          case '/':\n            this.advance();\n            var right = this.parsePrefix();\n            result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);\n            continue;\n        }\n\n        break;\n      }\n\n      return result;\n    }\n  }, {\n    key: \"parsePrefix\",\n    value: function parsePrefix() {\n      if (this.next.type == TokenType.Operator) {\n        var _start5 = this.inputIndex;\n        var operator = this.next.strValue;\n        var result;\n\n        switch (operator) {\n          case '+':\n            this.advance();\n            result = this.parsePrefix();\n            return Unary.createPlus(this.span(_start5), this.sourceSpan(_start5), result);\n\n          case '-':\n            this.advance();\n            result = this.parsePrefix();\n            return Unary.createMinus(this.span(_start5), this.sourceSpan(_start5), result);\n\n          case '!':\n            this.advance();\n            result = this.parsePrefix();\n            return new PrefixNot(this.span(_start5), this.sourceSpan(_start5), result);\n        }\n      }\n\n      return this.parseCallChain();\n    }\n  }, {\n    key: \"parseCallChain\",\n    value: function parseCallChain() {\n      var start = this.inputIndex;\n      var result = this.parsePrimary();\n\n      while (true) {\n        if (this.consumeOptionalCharacter($PERIOD)) {\n          result = this.parseAccessMemberOrMethodCall(result, start, false);\n        } else if (this.consumeOptionalOperator('?.')) {\n          result = this.consumeOptionalCharacter($LBRACKET) ? this.parseKeyedReadOrWrite(result, start, true) : this.parseAccessMemberOrMethodCall(result, start, true);\n        } else if (this.consumeOptionalCharacter($LBRACKET)) {\n          result = this.parseKeyedReadOrWrite(result, start, false);\n        } else if (this.consumeOptionalCharacter($LPAREN)) {\n          this.rparensExpected++;\n          var args = this.parseCallArguments();\n          this.rparensExpected--;\n          this.expectCharacter($RPAREN);\n          result = new FunctionCall(this.span(start), this.sourceSpan(start), result, args);\n        } else if (this.consumeOptionalOperator('!')) {\n          result = new NonNullAssert(this.span(start), this.sourceSpan(start), result);\n        } else {\n          return result;\n        }\n      }\n    }\n  }, {\n    key: \"parsePrimary\",\n    value: function parsePrimary() {\n      var start = this.inputIndex;\n\n      if (this.consumeOptionalCharacter($LPAREN)) {\n        this.rparensExpected++;\n        var result = this.parsePipe();\n        this.rparensExpected--;\n        this.expectCharacter($RPAREN);\n        return result;\n      } else if (this.next.isKeywordNull()) {\n        this.advance();\n        return new LiteralPrimitive(this.span(start), this.sourceSpan(start), null);\n      } else if (this.next.isKeywordUndefined()) {\n        this.advance();\n        return new LiteralPrimitive(this.span(start), this.sourceSpan(start), void 0);\n      } else if (this.next.isKeywordTrue()) {\n        this.advance();\n        return new LiteralPrimitive(this.span(start), this.sourceSpan(start), true);\n      } else if (this.next.isKeywordFalse()) {\n        this.advance();\n        return new LiteralPrimitive(this.span(start), this.sourceSpan(start), false);\n      } else if (this.next.isKeywordThis()) {\n        this.advance();\n        return new ThisReceiver(this.span(start), this.sourceSpan(start));\n      } else if (this.consumeOptionalCharacter($LBRACKET)) {\n        this.rbracketsExpected++;\n        var elements = this.parseExpressionList($RBRACKET);\n        this.rbracketsExpected--;\n        this.expectCharacter($RBRACKET);\n        return new LiteralArray(this.span(start), this.sourceSpan(start), elements);\n      } else if (this.next.isCharacter($LBRACE)) {\n        return this.parseLiteralMap();\n      } else if (this.next.isIdentifier()) {\n        return this.parseAccessMemberOrMethodCall(new ImplicitReceiver(this.span(start), this.sourceSpan(start)), start, false);\n      } else if (this.next.isNumber()) {\n        var value = this.next.toNumber();\n        this.advance();\n        return new LiteralPrimitive(this.span(start), this.sourceSpan(start), value);\n      } else if (this.next.isString()) {\n        var literalValue = this.next.toString();\n        this.advance();\n        return new LiteralPrimitive(this.span(start), this.sourceSpan(start), literalValue);\n      } else if (this.next.isPrivateIdentifier()) {\n        this._reportErrorForPrivateIdentifier(this.next, null);\n\n        return new EmptyExpr(this.span(start), this.sourceSpan(start));\n      } else if (this.index >= this.tokens.length) {\n        this.error(\"Unexpected end of expression: \".concat(this.input));\n        return new EmptyExpr(this.span(start), this.sourceSpan(start));\n      } else {\n        this.error(\"Unexpected token \".concat(this.next));\n        return new EmptyExpr(this.span(start), this.sourceSpan(start));\n      }\n    }\n  }, {\n    key: \"parseExpressionList\",\n    value: function parseExpressionList(terminator) {\n      var result = [];\n\n      do {\n        if (!this.next.isCharacter(terminator)) {\n          result.push(this.parsePipe());\n        } else {\n          break;\n        }\n      } while (this.consumeOptionalCharacter($COMMA));\n\n      return result;\n    }\n  }, {\n    key: \"parseLiteralMap\",\n    value: function parseLiteralMap() {\n      var keys = [];\n      var values = [];\n      var start = this.inputIndex;\n      this.expectCharacter($LBRACE);\n\n      if (!this.consumeOptionalCharacter($RBRACE)) {\n        this.rbracesExpected++;\n\n        do {\n          var keyStart = this.inputIndex;\n          var quoted = this.next.isString();\n          var key = this.expectIdentifierOrKeywordOrString();\n          keys.push({\n            key: key,\n            quoted: quoted\n          }); // Properties with quoted keys can't use the shorthand syntax.\n\n          if (quoted) {\n            this.expectCharacter($COLON);\n            values.push(this.parsePipe());\n          } else if (this.consumeOptionalCharacter($COLON)) {\n            values.push(this.parsePipe());\n          } else {\n            var span = this.span(keyStart);\n            var sourceSpan = this.sourceSpan(keyStart);\n            values.push(new PropertyRead(span, sourceSpan, sourceSpan, new ImplicitReceiver(span, sourceSpan), key));\n          }\n        } while (this.consumeOptionalCharacter($COMMA));\n\n        this.rbracesExpected--;\n        this.expectCharacter($RBRACE);\n      }\n\n      return new LiteralMap(this.span(start), this.sourceSpan(start), keys, values);\n    }\n  }, {\n    key: \"parseAccessMemberOrMethodCall\",\n    value: function parseAccessMemberOrMethodCall(receiver, start, isSafe) {\n      var _this162 = this;\n\n      var nameStart = this.inputIndex;\n      var id = this.withContext(ParseContextFlags.Writable, function () {\n        var _a;\n\n        var id = (_a = _this162.expectIdentifierOrKeyword()) !== null && _a !== void 0 ? _a : '';\n\n        if (id.length === 0) {\n          _this162.error(\"Expected identifier for property access\", receiver.span.end);\n        }\n\n        return id;\n      });\n      var nameSpan = this.sourceSpan(nameStart);\n\n      if (this.consumeOptionalCharacter($LPAREN)) {\n        var argumentStart = this.inputIndex;\n        this.rparensExpected++;\n        var args = this.parseCallArguments();\n        var argumentSpan = this.span(argumentStart, this.inputIndex).toAbsolute(this.absoluteOffset);\n        this.expectCharacter($RPAREN);\n        this.rparensExpected--;\n        var span = this.span(start);\n        var sourceSpan = this.sourceSpan(start);\n        return isSafe ? new SafeMethodCall(span, sourceSpan, nameSpan, receiver, id, args, argumentSpan) : new MethodCall(span, sourceSpan, nameSpan, receiver, id, args, argumentSpan);\n      } else {\n        if (isSafe) {\n          if (this.consumeOptionalOperator('=')) {\n            this.error('The \\'?.\\' operator cannot be used in the assignment');\n            return new EmptyExpr(this.span(start), this.sourceSpan(start));\n          } else {\n            return new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, receiver, id);\n          }\n        } else {\n          if (this.consumeOptionalOperator('=')) {\n            if (!this.parseAction) {\n              this.error('Bindings cannot contain assignments');\n              return new EmptyExpr(this.span(start), this.sourceSpan(start));\n            }\n\n            var value = this.parseConditional();\n            return new PropertyWrite(this.span(start), this.sourceSpan(start), nameSpan, receiver, id, value);\n          } else {\n            return new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, receiver, id);\n          }\n        }\n      }\n    }\n  }, {\n    key: \"parseCallArguments\",\n    value: function parseCallArguments() {\n      if (this.next.isCharacter($RPAREN)) return [];\n      var positionals = [];\n\n      do {\n        positionals.push(this.parsePipe());\n      } while (this.consumeOptionalCharacter($COMMA));\n\n      return positionals;\n    }\n    /**\n     * Parses an identifier, a keyword, a string with an optional `-` in between,\n     * and returns the string along with its absolute source span.\n     */\n\n  }, {\n    key: \"expectTemplateBindingKey\",\n    value: function expectTemplateBindingKey() {\n      var result = '';\n      var operatorFound = false;\n      var start = this.currentAbsoluteOffset;\n\n      do {\n        result += this.expectIdentifierOrKeywordOrString();\n        operatorFound = this.consumeOptionalOperator('-');\n\n        if (operatorFound) {\n          result += '-';\n        }\n      } while (operatorFound);\n\n      return {\n        source: result,\n        span: new AbsoluteSourceSpan(start, start + result.length)\n      };\n    }\n    /**\n     * Parse microsyntax template expression and return a list of bindings or\n     * parsing errors in case the given expression is invalid.\n     *\n     * For example,\n     * ```\n     *   <div *ngFor=\"let item of items; index as i; trackBy: func\">\n     * ```\n     * contains five bindings:\n     * 1. ngFor -> null\n     * 2. item -> NgForOfContext.$implicit\n     * 3. ngForOf -> items\n     * 4. i -> NgForOfContext.index\n     * 5. ngForTrackBy -> func\n     *\n     * For a full description of the microsyntax grammar, see\n     * https://gist.github.com/mhevery/d3530294cff2e4a1b3fe15ff75d08855\n     *\n     * @param templateKey name of the microsyntax directive, like ngIf, ngFor,\n     * without the *, along with its absolute span.\n     */\n\n  }, {\n    key: \"parseTemplateBindings\",\n    value: function parseTemplateBindings(templateKey) {\n      var bindings = []; // The first binding is for the template key itself\n      // In *ngFor=\"let item of items\", key = \"ngFor\", value = null\n      // In *ngIf=\"cond | pipe\", key = \"ngIf\", value = \"cond | pipe\"\n\n      bindings.push.apply(bindings, _toConsumableArray(this.parseDirectiveKeywordBindings(templateKey)));\n\n      while (this.index < this.tokens.length) {\n        // If it starts with 'let', then this must be variable declaration\n        var letBinding = this.parseLetBinding();\n\n        if (letBinding) {\n          bindings.push(letBinding);\n        } else {\n          // Two possible cases here, either `value \"as\" key` or\n          // \"directive-keyword expression\". We don't know which case, but both\n          // \"value\" and \"directive-keyword\" are template binding key, so consume\n          // the key first.\n          var key = this.expectTemplateBindingKey(); // Peek at the next token, if it is \"as\" then this must be variable\n          // declaration.\n\n          var binding = this.parseAsBinding(key);\n\n          if (binding) {\n            bindings.push(binding);\n          } else {\n            // Otherwise the key must be a directive keyword, like \"of\". Transform\n            // the key to actual key. Eg. of -> ngForOf, trackBy -> ngForTrackBy\n            key.source = templateKey.source + key.source.charAt(0).toUpperCase() + key.source.substring(1);\n            bindings.push.apply(bindings, _toConsumableArray(this.parseDirectiveKeywordBindings(key)));\n          }\n        }\n\n        this.consumeStatementTerminator();\n      }\n\n      return new TemplateBindingParseResult(bindings, []\n      /* warnings */\n      , this.errors);\n    }\n  }, {\n    key: \"parseKeyedReadOrWrite\",\n    value: function parseKeyedReadOrWrite(receiver, start, isSafe) {\n      var _this163 = this;\n\n      return this.withContext(ParseContextFlags.Writable, function () {\n        _this163.rbracketsExpected++;\n\n        var key = _this163.parsePipe();\n\n        if (key instanceof EmptyExpr) {\n          _this163.error(\"Key access cannot be empty\");\n        }\n\n        _this163.rbracketsExpected--;\n\n        _this163.expectCharacter($RBRACKET);\n\n        if (_this163.consumeOptionalOperator('=')) {\n          if (isSafe) {\n            _this163.error('The \\'?.\\' operator cannot be used in the assignment');\n          } else {\n            var value = _this163.parseConditional();\n\n            return new KeyedWrite(_this163.span(start), _this163.sourceSpan(start), receiver, key, value);\n          }\n        } else {\n          return isSafe ? new SafeKeyedRead(_this163.span(start), _this163.sourceSpan(start), receiver, key) : new KeyedRead(_this163.span(start), _this163.sourceSpan(start), receiver, key);\n        }\n\n        return new EmptyExpr(_this163.span(start), _this163.sourceSpan(start));\n      });\n    }\n    /**\n     * Parse a directive keyword, followed by a mandatory expression.\n     * For example, \"of items\", \"trackBy: func\".\n     * The bindings are: ngForOf -> items, ngForTrackBy -> func\n     * There could be an optional \"as\" binding that follows the expression.\n     * For example,\n     * ```\n     *   *ngFor=\"let item of items | slice:0:1 as collection\".\n     *                    ^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^\n     *               keyword    bound target   optional 'as' binding\n     * ```\n     *\n     * @param key binding key, for example, ngFor, ngIf, ngForOf, along with its\n     * absolute span.\n     */\n\n  }, {\n    key: \"parseDirectiveKeywordBindings\",\n    value: function parseDirectiveKeywordBindings(key) {\n      var bindings = [];\n      this.consumeOptionalCharacter($COLON); // trackBy: trackByFunction\n\n      var value = this.getDirectiveBoundTarget();\n      var spanEnd = this.currentAbsoluteOffset; // The binding could optionally be followed by \"as\". For example,\n      // *ngIf=\"cond | pipe as x\". In this case, the key in the \"as\" binding\n      // is \"x\" and the value is the template key itself (\"ngIf\"). Note that the\n      // 'key' in the current context now becomes the \"value\" in the next binding.\n\n      var asBinding = this.parseAsBinding(key);\n\n      if (!asBinding) {\n        this.consumeStatementTerminator();\n        spanEnd = this.currentAbsoluteOffset;\n      }\n\n      var sourceSpan = new AbsoluteSourceSpan(key.span.start, spanEnd);\n      bindings.push(new ExpressionBinding(sourceSpan, key, value));\n\n      if (asBinding) {\n        bindings.push(asBinding);\n      }\n\n      return bindings;\n    }\n    /**\n     * Return the expression AST for the bound target of a directive keyword\n     * binding. For example,\n     * ```\n     *   *ngIf=\"condition | pipe\"\n     *          ^^^^^^^^^^^^^^^^ bound target for \"ngIf\"\n     *   *ngFor=\"let item of items\"\n     *                       ^^^^^ bound target for \"ngForOf\"\n     * ```\n     */\n\n  }, {\n    key: \"getDirectiveBoundTarget\",\n    value: function getDirectiveBoundTarget() {\n      if (this.next === EOF || this.peekKeywordAs() || this.peekKeywordLet()) {\n        return null;\n      }\n\n      var ast = this.parsePipe(); // example: \"condition | async\"\n\n      var _ast$span = ast.span,\n          start = _ast$span.start,\n          end = _ast$span.end;\n      var value = this.input.substring(start, end);\n      return new ASTWithSource(ast, value, this.location, this.absoluteOffset + start, this.errors);\n    }\n    /**\n     * Return the binding for a variable declared using `as`. Note that the order\n     * of the key-value pair in this declaration is reversed. For example,\n     * ```\n     *   *ngFor=\"let item of items; index as i\"\n     *                              ^^^^^    ^\n     *                              value    key\n     * ```\n     *\n     * @param value name of the value in the declaration, \"ngIf\" in the example\n     * above, along with its absolute span.\n     */\n\n  }, {\n    key: \"parseAsBinding\",\n    value: function parseAsBinding(value) {\n      if (!this.peekKeywordAs()) {\n        return null;\n      }\n\n      this.advance(); // consume the 'as' keyword\n\n      var key = this.expectTemplateBindingKey();\n      this.consumeStatementTerminator();\n      var sourceSpan = new AbsoluteSourceSpan(value.span.start, this.currentAbsoluteOffset);\n      return new VariableBinding(sourceSpan, key, value);\n    }\n    /**\n     * Return the binding for a variable declared using `let`. For example,\n     * ```\n     *   *ngFor=\"let item of items; let i=index;\"\n     *           ^^^^^^^^           ^^^^^^^^^^^\n     * ```\n     * In the first binding, `item` is bound to `NgForOfContext.$implicit`.\n     * In the second binding, `i` is bound to `NgForOfContext.index`.\n     */\n\n  }, {\n    key: \"parseLetBinding\",\n    value: function parseLetBinding() {\n      if (!this.peekKeywordLet()) {\n        return null;\n      }\n\n      var spanStart = this.currentAbsoluteOffset;\n      this.advance(); // consume the 'let' keyword\n\n      var key = this.expectTemplateBindingKey();\n      var value = null;\n\n      if (this.consumeOptionalOperator('=')) {\n        value = this.expectTemplateBindingKey();\n      }\n\n      this.consumeStatementTerminator();\n      var sourceSpan = new AbsoluteSourceSpan(spanStart, this.currentAbsoluteOffset);\n      return new VariableBinding(sourceSpan, key, value);\n    }\n    /**\n     * Consume the optional statement terminator: semicolon or comma.\n     */\n\n  }, {\n    key: \"consumeStatementTerminator\",\n    value: function consumeStatementTerminator() {\n      this.consumeOptionalCharacter($SEMICOLON) || this.consumeOptionalCharacter($COMMA);\n    }\n    /**\n     * Records an error and skips over the token stream until reaching a recoverable point. See\n     * `this.skip` for more details on token skipping.\n     */\n\n  }, {\n    key: \"error\",\n    value: function error(message) {\n      var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));\n      this.skip();\n    }\n  }, {\n    key: \"locationText\",\n    value: function locationText() {\n      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      if (index == null) index = this.index;\n      return index < this.tokens.length ? \"at column \".concat(this.tokens[index].index + 1, \" in\") : \"at the end of the expression\";\n    }\n    /**\n     * Records an error for an unexpected private identifier being discovered.\n     * @param token Token representing a private identifier.\n     * @param extraMessage Optional additional message being appended to the error.\n     */\n\n  }, {\n    key: \"_reportErrorForPrivateIdentifier\",\n    value: function _reportErrorForPrivateIdentifier(token, extraMessage) {\n      var errorMessage = \"Private identifiers are not supported. Unexpected private identifier: \".concat(token);\n\n      if (extraMessage !== null) {\n        errorMessage += \", \".concat(extraMessage);\n      }\n\n      this.error(errorMessage);\n    }\n    /**\n     * Error recovery should skip tokens until it encounters a recovery point.\n     *\n     * The following are treated as unconditional recovery points:\n     *   - end of input\n     *   - ';' (parseChain() is always the root production, and it expects a ';')\n     *   - '|' (since pipes may be chained and each pipe expression may be treated independently)\n     *\n     * The following are conditional recovery points:\n     *   - ')', '}', ']' if one of calling productions is expecting one of these symbols\n     *     - This allows skip() to recover from errors such as '(a.) + 1' allowing more of the AST to\n     *       be retained (it doesn't skip any tokens as the ')' is retained because of the '(' begins\n     *       an '(' <expr> ')' production).\n     *       The recovery points of grouping symbols must be conditional as they must be skipped if\n     *       none of the calling productions are not expecting the closing token else we will never\n     *       make progress in the case of an extraneous group closing symbol (such as a stray ')').\n     *       That is, we skip a closing symbol if we are not in a grouping production.\n     *   - '=' in a `Writable` context\n     *     - In this context, we are able to recover after seeing the `=` operator, which\n     *       signals the presence of an independent rvalue expression following the `=` operator.\n     *\n     * If a production expects one of these token it increments the corresponding nesting count,\n     * and then decrements it just prior to checking if the token is in the input.\n     */\n\n  }, {\n    key: \"skip\",\n    value: function skip() {\n      var n = this.next;\n\n      while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) && !n.isOperator('|') && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) && (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) && (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) && (!(this.context & ParseContextFlags.Writable) || !n.isOperator('='))) {\n        if (this.next.isError()) {\n          this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));\n        }\n\n        this.advance();\n        n = this.next;\n      }\n    }\n  }]);\n\n  return _ParseAST;\n}();\n\nvar SimpleExpressionChecker = /*#__PURE__*/function () {\n  function SimpleExpressionChecker() {\n    _classCallCheck(this, SimpleExpressionChecker);\n\n    this.errors = [];\n  }\n\n  _createClass(SimpleExpressionChecker, [{\n    key: \"visitImplicitReceiver\",\n    value: function visitImplicitReceiver(ast, context) {}\n  }, {\n    key: \"visitThisReceiver\",\n    value: function visitThisReceiver(ast, context) {}\n  }, {\n    key: \"visitInterpolation\",\n    value: function visitInterpolation(ast, context) {}\n  }, {\n    key: \"visitLiteralPrimitive\",\n    value: function visitLiteralPrimitive(ast, context) {}\n  }, {\n    key: \"visitPropertyRead\",\n    value: function visitPropertyRead(ast, context) {}\n  }, {\n    key: \"visitPropertyWrite\",\n    value: function visitPropertyWrite(ast, context) {}\n  }, {\n    key: \"visitSafePropertyRead\",\n    value: function visitSafePropertyRead(ast, context) {}\n  }, {\n    key: \"visitMethodCall\",\n    value: function visitMethodCall(ast, context) {}\n  }, {\n    key: \"visitSafeMethodCall\",\n    value: function visitSafeMethodCall(ast, context) {}\n  }, {\n    key: \"visitFunctionCall\",\n    value: function visitFunctionCall(ast, context) {}\n  }, {\n    key: \"visitLiteralArray\",\n    value: function visitLiteralArray(ast, context) {\n      this.visitAll(ast.expressions, context);\n    }\n  }, {\n    key: \"visitLiteralMap\",\n    value: function visitLiteralMap(ast, context) {\n      this.visitAll(ast.values, context);\n    }\n  }, {\n    key: \"visitUnary\",\n    value: function visitUnary(ast, context) {}\n  }, {\n    key: \"visitBinary\",\n    value: function visitBinary(ast, context) {}\n  }, {\n    key: \"visitPrefixNot\",\n    value: function visitPrefixNot(ast, context) {}\n  }, {\n    key: \"visitNonNullAssert\",\n    value: function visitNonNullAssert(ast, context) {}\n  }, {\n    key: \"visitConditional\",\n    value: function visitConditional(ast, context) {}\n  }, {\n    key: \"visitPipe\",\n    value: function visitPipe(ast, context) {\n      this.errors.push('pipes');\n    }\n  }, {\n    key: \"visitKeyedRead\",\n    value: function visitKeyedRead(ast, context) {}\n  }, {\n    key: \"visitKeyedWrite\",\n    value: function visitKeyedWrite(ast, context) {}\n  }, {\n    key: \"visitAll\",\n    value: function visitAll(asts, context) {\n      var _this164 = this;\n\n      return asts.map(function (node) {\n        return node.visit(_this164, context);\n      });\n    }\n  }, {\n    key: \"visitChain\",\n    value: function visitChain(ast, context) {}\n  }, {\n    key: \"visitQuote\",\n    value: function visitQuote(ast, context) {}\n  }, {\n    key: \"visitSafeKeyedRead\",\n    value: function visitSafeKeyedRead(ast, context) {}\n  }]);\n\n  return SimpleExpressionChecker;\n}();\n/**\n * This class implements SimpleExpressionChecker used in View Engine and performs more strict checks\n * to make sure host bindings do not contain pipes. In View Engine, having pipes in host bindings is\n * not supported as well, but in some cases (like `!(value | async)`) the error is not triggered at\n * compile time. In order to preserve View Engine behavior, more strict checks are introduced for\n * Ivy mode only.\n */\n\n\nvar IvySimpleExpressionChecker = /*#__PURE__*/function (_RecursiveAstVisitor$2) {\n  _inherits(IvySimpleExpressionChecker, _RecursiveAstVisitor$2);\n\n  var _super97 = _createSuper(IvySimpleExpressionChecker);\n\n  function IvySimpleExpressionChecker() {\n    var _this165;\n\n    _classCallCheck(this, IvySimpleExpressionChecker);\n\n    _this165 = _super97.apply(this, arguments);\n    _this165.errors = [];\n    return _this165;\n  }\n\n  _createClass(IvySimpleExpressionChecker, [{\n    key: \"visitPipe\",\n    value: function visitPipe() {\n      this.errors.push('pipes');\n    }\n  }]);\n\n  return IvySimpleExpressionChecker;\n}(RecursiveAstVisitor$1);\n/**\n * @license\n * Copyright Google LLC 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\nfunction mapEntry(key, value) {\n  return {\n    key: key,\n    value: value,\n    quoted: false\n  };\n}\n\nfunction mapLiteral(obj) {\n  var quoted = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  return literalMap(Object.keys(obj).map(function (key) {\n    return {\n      key: key,\n      quoted: quoted,\n      value: obj[key]\n    };\n  }));\n}\n/**\n * @license\n * Copyright Google LLC 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// =================================================================================================\n// =========== S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P  ===========\n// =================================================================================================\n// =================================================================================================\n//\n//        DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!\n//                               Reach out to mprobst for details.\n//\n// =================================================================================================\n\n/** Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'. */\n\n\nvar _SECURITY_SCHEMA;\n\nfunction SECURITY_SCHEMA() {\n  if (!_SECURITY_SCHEMA) {\n    _SECURITY_SCHEMA = {}; // Case is insignificant below, all element and attribute names are lower-cased for lookup.\n\n    registerContext(SecurityContext.HTML, ['iframe|srcdoc', '*|innerHTML', '*|outerHTML']);\n    registerContext(SecurityContext.STYLE, ['*|style']); // NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.\n\n    registerContext(SecurityContext.URL, ['*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href', 'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action', 'img|src', 'img|srcset', 'input|src', 'ins|cite', 'q|cite', 'source|src', 'source|srcset', 'track|src', 'video|poster', 'video|src']);\n    registerContext(SecurityContext.RESOURCE_URL, ['applet|code', 'applet|codebase', 'base|href', 'embed|src', 'frame|src', 'head|profile', 'html|manifest', 'iframe|src', 'link|href', 'media|src', 'object|codebase', 'object|data', 'script|src']);\n  }\n\n  return _SECURITY_SCHEMA;\n}\n\nfunction registerContext(ctx, specs) {\n  var _iterator13 = _createForOfIteratorHelper(specs),\n      _step13;\n\n  try {\n    for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {\n      var spec = _step13.value;\n      _SECURITY_SCHEMA[spec.toLowerCase()] = ctx;\n    }\n  } catch (err) {\n    _iterator13.e(err);\n  } finally {\n    _iterator13.f();\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar ElementSchemaRegistry = /*#__PURE__*/_createClass(function ElementSchemaRegistry() {\n  _classCallCheck(this, ElementSchemaRegistry);\n});\n/**\n * @license\n * Copyright Google LLC 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\nvar BOOLEAN = 'boolean';\nvar NUMBER = 'number';\nvar STRING = 'string';\nvar OBJECT = 'object';\n/**\n * This array represents the DOM schema. It encodes inheritance, properties, and events.\n *\n * ## Overview\n *\n * Each line represents one kind of element. The `element_inheritance` and properties are joined\n * using `element_inheritance|properties` syntax.\n *\n * ## Element Inheritance\n *\n * The `element_inheritance` can be further subdivided as `element1,element2,...^parentElement`.\n * Here the individual elements are separated by `,` (commas). Every element in the list\n * has identical properties.\n *\n * An `element` may inherit additional properties from `parentElement` If no `^parentElement` is\n * specified then `\"\"` (blank) element is assumed.\n *\n * NOTE: The blank element inherits from root `[Element]` element, the super element of all\n * elements.\n *\n * NOTE an element prefix such as `:svg:` has no special meaning to the schema.\n *\n * ## Properties\n *\n * Each element has a set of properties separated by `,` (commas). Each property can be prefixed\n * by a special character designating its type:\n *\n * - (no prefix): property is a string.\n * - `*`: property represents an event.\n * - `!`: property is a boolean.\n * - `#`: property is a number.\n * - `%`: property is an object.\n *\n * ## Query\n *\n * The class creates an internal squas representation which allows to easily answer the query of\n * if a given property exist on a given element.\n *\n * NOTE: We don't yet support querying for types or events.\n * NOTE: This schema is auto extracted from `schema_extractor.ts` located in the test folder,\n *       see dom_element_schema_registry_spec.ts\n */\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P  ===========\n// =================================================================================================\n// =================================================================================================\n//\n//                       DO NOT EDIT THIS DOM SCHEMA WITHOUT A SECURITY REVIEW!\n//\n// Newly added properties must be security reviewed and assigned an appropriate SecurityContext in\n// dom_security_schema.ts. Reach out to mprobst & rjamet for details.\n//\n// =================================================================================================\n\nvar SCHEMA = ['[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot' +\n/* added manually to avoid breaking changes */\n',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored', '[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate', 'abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate', 'media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume', ':svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex', ':svg:graphics^:svg:|', ':svg:animation^:svg:|*begin,*end,*repeat', ':svg:geometry^:svg:|', ':svg:componentTransferFunction^:svg:|', ':svg:gradient^:svg:|', ':svg:textContent^:svg:graphics|', ':svg:textPositioning^:svg:textContent|', 'a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username', 'area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username', 'audio^media|', 'br^[HTMLElement]|clear', 'base^[HTMLElement]|href,target', 'body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink', 'button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value', 'canvas^[HTMLElement]|#height,#width', 'content^[HTMLElement]|select', 'dl^[HTMLElement]|!compact', 'datalist^[HTMLElement]|', 'details^[HTMLElement]|!open', 'dialog^[HTMLElement]|!open,returnValue', 'dir^[HTMLElement]|!compact', 'div^[HTMLElement]|align', 'embed^[HTMLElement]|align,height,name,src,type,width', 'fieldset^[HTMLElement]|!disabled,name', 'font^[HTMLElement]|color,face,size', 'form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target', 'frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src', 'frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows', 'hr^[HTMLElement]|align,color,!noShade,size,width', 'head^[HTMLElement]|', 'h1,h2,h3,h4,h5,h6^[HTMLElement]|align', 'html^[HTMLElement]|version', 'iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width', 'img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width', 'input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width', 'li^[HTMLElement]|type,#value', 'label^[HTMLElement]|htmlFor', 'legend^[HTMLElement]|align', 'link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type', 'map^[HTMLElement]|name', 'marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width', 'menu^[HTMLElement]|!compact', 'meta^[HTMLElement]|content,httpEquiv,name,scheme', 'meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value', 'ins,del^[HTMLElement]|cite,dateTime', 'ol^[HTMLElement]|!compact,!reversed,#start,type', 'object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width', 'optgroup^[HTMLElement]|!disabled,label', 'option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value', 'output^[HTMLElement]|defaultValue,%htmlFor,name,value', 'p^[HTMLElement]|align', 'param^[HTMLElement]|name,type,value,valueType', 'picture^[HTMLElement]|', 'pre^[HTMLElement]|#width', 'progress^[HTMLElement]|#max,#value', 'q,blockquote,cite^[HTMLElement]|', 'script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type', 'select^[HTMLElement]|autocomplete,!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value', 'shadow^[HTMLElement]|', 'slot^[HTMLElement]|name', 'source^[HTMLElement]|media,sizes,src,srcset,type', 'span^[HTMLElement]|', 'style^[HTMLElement]|!disabled,media,type', 'caption^[HTMLElement]|align', 'th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width', 'col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width', 'table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width', 'tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign', 'tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign', 'template^[HTMLElement]|', 'textarea^[HTMLElement]|autocapitalize,autocomplete,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap', 'title^[HTMLElement]|text', 'track^[HTMLElement]|!default,kind,label,src,srclang', 'ul^[HTMLElement]|!compact,type', 'unknown^[HTMLElement]|', 'video^media|#height,poster,#width', ':svg:a^:svg:graphics|', ':svg:animate^:svg:animation|', ':svg:animateMotion^:svg:animation|', ':svg:animateTransform^:svg:animation|', ':svg:circle^:svg:geometry|', ':svg:clipPath^:svg:graphics|', ':svg:defs^:svg:graphics|', ':svg:desc^:svg:|', ':svg:discard^:svg:|', ':svg:ellipse^:svg:geometry|', ':svg:feBlend^:svg:|', ':svg:feColorMatrix^:svg:|', ':svg:feComponentTransfer^:svg:|', ':svg:feComposite^:svg:|', ':svg:feConvolveMatrix^:svg:|', ':svg:feDiffuseLighting^:svg:|', ':svg:feDisplacementMap^:svg:|', ':svg:feDistantLight^:svg:|', ':svg:feDropShadow^:svg:|', ':svg:feFlood^:svg:|', ':svg:feFuncA^:svg:componentTransferFunction|', ':svg:feFuncB^:svg:componentTransferFunction|', ':svg:feFuncG^:svg:componentTransferFunction|', ':svg:feFuncR^:svg:componentTransferFunction|', ':svg:feGaussianBlur^:svg:|', ':svg:feImage^:svg:|', ':svg:feMerge^:svg:|', ':svg:feMergeNode^:svg:|', ':svg:feMorphology^:svg:|', ':svg:feOffset^:svg:|', ':svg:fePointLight^:svg:|', ':svg:feSpecularLighting^:svg:|', ':svg:feSpotLight^:svg:|', ':svg:feTile^:svg:|', ':svg:feTurbulence^:svg:|', ':svg:filter^:svg:|', ':svg:foreignObject^:svg:graphics|', ':svg:g^:svg:graphics|', ':svg:image^:svg:graphics|', ':svg:line^:svg:geometry|', ':svg:linearGradient^:svg:gradient|', ':svg:mpath^:svg:|', ':svg:marker^:svg:|', ':svg:mask^:svg:|', ':svg:metadata^:svg:|', ':svg:path^:svg:geometry|', ':svg:pattern^:svg:|', ':svg:polygon^:svg:geometry|', ':svg:polyline^:svg:geometry|', ':svg:radialGradient^:svg:gradient|', ':svg:rect^:svg:geometry|', ':svg:svg^:svg:graphics|#currentScale,#zoomAndPan', ':svg:script^:svg:|type', ':svg:set^:svg:animation|', ':svg:stop^:svg:|', ':svg:style^:svg:|!disabled,media,title,type', ':svg:switch^:svg:graphics|', ':svg:symbol^:svg:|', ':svg:tspan^:svg:textPositioning|', ':svg:text^:svg:textPositioning|', ':svg:textPath^:svg:textContent|', ':svg:title^:svg:|', ':svg:use^:svg:graphics|', ':svg:view^:svg:|#zoomAndPan', 'data^[HTMLElement]|value', 'keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name', 'menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default', 'summary^[HTMLElement]|', 'time^[HTMLElement]|dateTime', ':svg:cursor^:svg:|'];\nvar _ATTR_TO_PROP = {\n  'class': 'className',\n  'for': 'htmlFor',\n  'formaction': 'formAction',\n  'innerHtml': 'innerHTML',\n  'readonly': 'readOnly',\n  'tabindex': 'tabIndex'\n}; // Invert _ATTR_TO_PROP.\n\nvar _PROP_TO_ATTR =\n/*@__PURE__*/\n\n/*@__PURE__*/\nObject.keys(_ATTR_TO_PROP).reduce(function (inverted, attr) {\n  inverted[_ATTR_TO_PROP[attr]] = attr;\n  return inverted;\n}, {});\n\nvar DomElementSchemaRegistry = /*#__PURE__*/function (_ElementSchemaRegistr) {\n  _inherits(DomElementSchemaRegistry, _ElementSchemaRegistr);\n\n  var _super98 = _createSuper(DomElementSchemaRegistry);\n\n  function DomElementSchemaRegistry() {\n    var _this166;\n\n    _classCallCheck(this, DomElementSchemaRegistry);\n\n    _this166 = _super98.call(this);\n    _this166._schema = {};\n    SCHEMA.forEach(function (encodedType) {\n      var type = {};\n\n      var _encodedType$split = encodedType.split('|'),\n          _encodedType$split2 = _slicedToArray(_encodedType$split, 2),\n          strType = _encodedType$split2[0],\n          strProperties = _encodedType$split2[1];\n\n      var properties = strProperties.split(',');\n\n      var _strType$split = strType.split('^'),\n          _strType$split2 = _slicedToArray(_strType$split, 2),\n          typeNames = _strType$split2[0],\n          superName = _strType$split2[1];\n\n      typeNames.split(',').forEach(function (tag) {\n        return _this166._schema[tag.toLowerCase()] = type;\n      });\n\n      var superType = superName && _this166._schema[superName.toLowerCase()];\n\n      if (superType) {\n        Object.keys(superType).forEach(function (prop) {\n          type[prop] = superType[prop];\n        });\n      }\n\n      properties.forEach(function (property) {\n        if (property.length > 0) {\n          switch (property[0]) {\n            case '*':\n              // We don't yet support events.\n              // If ever allowing to bind to events, GO THROUGH A SECURITY REVIEW, allowing events\n              // will\n              // almost certainly introduce bad XSS vulnerabilities.\n              // type[property.substring(1)] = EVENT;\n              break;\n\n            case '!':\n              type[property.substring(1)] = BOOLEAN;\n              break;\n\n            case '#':\n              type[property.substring(1)] = NUMBER;\n              break;\n\n            case '%':\n              type[property.substring(1)] = OBJECT;\n              break;\n\n            default:\n              type[property] = STRING;\n          }\n        }\n      });\n    });\n    return _this166;\n  }\n\n  _createClass(DomElementSchemaRegistry, [{\n    key: \"hasProperty\",\n    value: function hasProperty(tagName, propName, schemaMetas) {\n      if (schemaMetas.some(function (schema) {\n        return schema.name === NO_ERRORS_SCHEMA.name;\n      })) {\n        return true;\n      }\n\n      if (tagName.indexOf('-') > -1) {\n        if (isNgContainer(tagName) || isNgContent(tagName)) {\n          return false;\n        }\n\n        if (schemaMetas.some(function (schema) {\n          return schema.name === CUSTOM_ELEMENTS_SCHEMA.name;\n        })) {\n          // Can't tell now as we don't know which properties a custom element will get\n          // once it is instantiated\n          return true;\n        }\n      }\n\n      var elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown'];\n\n      return !!elementProperties[propName];\n    }\n  }, {\n    key: \"hasElement\",\n    value: function hasElement(tagName, schemaMetas) {\n      if (schemaMetas.some(function (schema) {\n        return schema.name === NO_ERRORS_SCHEMA.name;\n      })) {\n        return true;\n      }\n\n      if (tagName.indexOf('-') > -1) {\n        if (isNgContainer(tagName) || isNgContent(tagName)) {\n          return true;\n        }\n\n        if (schemaMetas.some(function (schema) {\n          return schema.name === CUSTOM_ELEMENTS_SCHEMA.name;\n        })) {\n          // Allow any custom elements\n          return true;\n        }\n      }\n\n      return !!this._schema[tagName.toLowerCase()];\n    }\n    /**\n     * securityContext returns the security context for the given property on the given DOM tag.\n     *\n     * Tag and property name are statically known and cannot change at runtime, i.e. it is not\n     * possible to bind a value into a changing attribute or tag name.\n     *\n     * The filtering is based on a list of allowed tags|attributes. All attributes in the schema\n     * above are assumed to have the 'NONE' security context, i.e. that they are safe inert\n     * string values. Only specific well known attack vectors are assigned their appropriate context.\n     */\n\n  }, {\n    key: \"securityContext\",\n    value: function securityContext(tagName, propName, isAttribute) {\n      if (isAttribute) {\n        // NB: For security purposes, use the mapped property name, not the attribute name.\n        propName = this.getMappedPropName(propName);\n      } // Make sure comparisons are case insensitive, so that case differences between attribute and\n      // property names do not have a security impact.\n\n\n      tagName = tagName.toLowerCase();\n      propName = propName.toLowerCase();\n      var ctx = SECURITY_SCHEMA()[tagName + '|' + propName];\n\n      if (ctx) {\n        return ctx;\n      }\n\n      ctx = SECURITY_SCHEMA()['*|' + propName];\n      return ctx ? ctx : SecurityContext.NONE;\n    }\n  }, {\n    key: \"getMappedPropName\",\n    value: function getMappedPropName(propName) {\n      return _ATTR_TO_PROP[propName] || propName;\n    }\n  }, {\n    key: \"getDefaultComponentElementName\",\n    value: function getDefaultComponentElementName() {\n      return 'ng-component';\n    }\n  }, {\n    key: \"validateProperty\",\n    value: function validateProperty(name) {\n      if (name.toLowerCase().startsWith('on')) {\n        var msg = \"Binding to event property '\".concat(name, \"' is disallowed for security reasons, \") + \"please use (\".concat(name.slice(2), \")=...\") + \"\\nIf '\".concat(name, \"' is a directive input, make sure the directive is imported by the\") + \" current module.\";\n        return {\n          error: true,\n          msg: msg\n        };\n      } else {\n        return {\n          error: false\n        };\n      }\n    }\n  }, {\n    key: \"validateAttribute\",\n    value: function validateAttribute(name) {\n      if (name.toLowerCase().startsWith('on')) {\n        var msg = \"Binding to event attribute '\".concat(name, \"' is disallowed for security reasons, \") + \"please use (\".concat(name.slice(2), \")=...\");\n        return {\n          error: true,\n          msg: msg\n        };\n      } else {\n        return {\n          error: false\n        };\n      }\n    }\n  }, {\n    key: \"allKnownElementNames\",\n    value: function allKnownElementNames() {\n      return Object.keys(this._schema);\n    }\n  }, {\n    key: \"allKnownAttributesOfElement\",\n    value: function allKnownAttributesOfElement(tagName) {\n      var elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown']; // Convert properties to attributes.\n\n\n      return Object.keys(elementProperties).map(function (prop) {\n        var _a;\n\n        return (_a = _PROP_TO_ATTR[prop]) !== null && _a !== void 0 ? _a : prop;\n      });\n    }\n  }, {\n    key: \"normalizeAnimationStyleProperty\",\n    value: function normalizeAnimationStyleProperty(propName) {\n      return dashCaseToCamelCase(propName);\n    }\n  }, {\n    key: \"normalizeAnimationStyleValue\",\n    value: function normalizeAnimationStyleValue(camelCaseProp, userProvidedProp, val) {\n      var unit = '';\n      var strVal = val.toString().trim();\n      var errorMsg = null;\n\n      if (_isPixelDimensionStyle(camelCaseProp) && val !== 0 && val !== '0') {\n        if (typeof val === 'number') {\n          unit = 'px';\n        } else {\n          var valAndSuffixMatch = val.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n\n          if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n            errorMsg = \"Please provide a CSS unit value for \".concat(userProvidedProp, \":\").concat(val);\n          }\n        }\n      }\n\n      return {\n        error: errorMsg,\n        value: strVal + unit\n      };\n    }\n  }]);\n\n  return DomElementSchemaRegistry;\n}(ElementSchemaRegistry);\n\nfunction _isPixelDimensionStyle(prop) {\n  switch (prop) {\n    case 'width':\n    case 'height':\n    case 'minWidth':\n    case 'minHeight':\n    case 'maxWidth':\n    case 'maxHeight':\n    case 'left':\n    case 'top':\n    case 'bottom':\n    case 'right':\n    case 'fontSize':\n    case 'outlineWidth':\n    case 'outlineOffset':\n    case 'paddingTop':\n    case 'paddingLeft':\n    case 'paddingBottom':\n    case 'paddingRight':\n    case 'marginTop':\n    case 'marginLeft':\n    case 'marginBottom':\n    case 'marginRight':\n    case 'borderRadius':\n    case 'borderWidth':\n    case 'borderTopWidth':\n    case 'borderLeftWidth':\n    case 'borderRightWidth':\n    case 'borderBottomWidth':\n    case 'textIndent':\n      return true;\n\n    default:\n      return false;\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Set of tagName|propertyName corresponding to Trusted Types sinks. Properties applying to all\n * tags use '*'.\n *\n * Extracted from, and should be kept in sync with\n * https://w3c.github.io/webappsec-trusted-types/dist/spec/#integrations\n */\n\n\nvar TRUSTED_TYPES_SINKS = /*@__PURE__*/new Set([// NOTE: All strings in this set *must* be lowercase!\n// TrustedHTML\n'iframe|srcdoc', '*|innerhtml', '*|outerhtml', // NB: no TrustedScript here, as the corresponding tags are stripped by the compiler.\n// TrustedScriptURL\n'embed|src', 'object|codebase', 'object|data']);\n/**\n * isTrustedTypesSink returns true if the given property on the given DOM tag is a Trusted Types\n * sink. In that case, use `ElementSchemaRegistry.securityContext` to determine which particular\n * Trusted Type is required for values passed to the sink:\n * - SecurityContext.HTML corresponds to TrustedHTML\n * - SecurityContext.RESOURCE_URL corresponds to TrustedScriptURL\n */\n\nfunction isTrustedTypesSink(tagName, propName) {\n  // Make sure comparisons are case insensitive, so that case differences between attribute and\n  // property names do not have a security impact.\n  tagName = tagName.toLowerCase();\n  propName = propName.toLowerCase();\n  return TRUSTED_TYPES_SINKS.has(tagName + '|' + propName) || TRUSTED_TYPES_SINKS.has('*|' + propName);\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar BIND_NAME_REGEXP$1 = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/; // Group 1 = \"bind-\"\n\nvar KW_BIND_IDX$1 = 1; // Group 2 = \"let-\"\n\nvar KW_LET_IDX$1 = 2; // Group 3 = \"ref-/#\"\n\nvar KW_REF_IDX$1 = 3; // Group 4 = \"on-\"\n\nvar KW_ON_IDX$1 = 4; // Group 5 = \"bindon-\"\n\nvar KW_BINDON_IDX$1 = 5; // Group 6 = \"@\"\n\nvar KW_AT_IDX$1 = 6; // Group 7 = the identifier after \"bind-\", \"let-\", \"ref-/#\", \"on-\", \"bindon-\" or \"@\"\n\nvar IDENT_KW_IDX$1 = 7;\nvar BINDING_DELIMS = {\n  BANANA_BOX: {\n    start: '[(',\n    end: ')]'\n  },\n  PROPERTY: {\n    start: '[',\n    end: ']'\n  },\n  EVENT: {\n    start: '(',\n    end: ')'\n  }\n};\nvar TEMPLATE_ATTR_PREFIX$2 = '*';\n\nfunction htmlAstToRender3Ast(htmlNodes, bindingParser, options) {\n  var transformer = new HtmlAstToIvyAst(bindingParser, options);\n  var ivyNodes = visitAll$1(transformer, htmlNodes); // Errors might originate in either the binding parser or the html to ivy transformer\n\n  var allErrors = bindingParser.errors.concat(transformer.errors);\n  var result = {\n    nodes: ivyNodes,\n    errors: allErrors,\n    styleUrls: transformer.styleUrls,\n    styles: transformer.styles,\n    ngContentSelectors: transformer.ngContentSelectors\n  };\n\n  if (options.collectCommentNodes) {\n    result.commentNodes = transformer.commentNodes;\n  }\n\n  return result;\n}\n\nvar HtmlAstToIvyAst = /*#__PURE__*/function () {\n  function HtmlAstToIvyAst(bindingParser, options) {\n    _classCallCheck(this, HtmlAstToIvyAst);\n\n    this.bindingParser = bindingParser;\n    this.options = options;\n    this.errors = [];\n    this.styles = [];\n    this.styleUrls = [];\n    this.ngContentSelectors = []; // This array will be populated if `Render3ParseOptions['collectCommentNodes']` is true\n\n    this.commentNodes = [];\n    this.inI18nBlock = false;\n  } // HTML visitor\n\n\n  _createClass(HtmlAstToIvyAst, [{\n    key: \"visitElement\",\n    value: function visitElement(element) {\n      var _this167 = this;\n\n      var isI18nRootElement = isI18nRootNode(element.i18n);\n\n      if (isI18nRootElement) {\n        if (this.inI18nBlock) {\n          this.reportError('Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.', element.sourceSpan);\n        }\n\n        this.inI18nBlock = true;\n      }\n\n      var preparsedElement = preparseElement(element);\n\n      if (preparsedElement.type === PreparsedElementType.SCRIPT) {\n        return null;\n      } else if (preparsedElement.type === PreparsedElementType.STYLE) {\n        var contents = textContents(element);\n\n        if (contents !== null) {\n          this.styles.push(contents);\n        }\n\n        return null;\n      } else if (preparsedElement.type === PreparsedElementType.STYLESHEET && isStyleUrlResolvable(preparsedElement.hrefAttr)) {\n        this.styleUrls.push(preparsedElement.hrefAttr);\n        return null;\n      } // Whether the element is a `<ng-template>`\n\n\n      var isTemplateElement = isNgTemplate(element.name);\n      var parsedProperties = [];\n      var boundEvents = [];\n      var variables = [];\n      var references = [];\n      var attributes = [];\n      var i18nAttrsMeta = {};\n      var templateParsedProperties = [];\n      var templateVariables = []; // Whether the element has any *-attribute\n\n      var elementHasInlineTemplate = false;\n\n      var _iterator14 = _createForOfIteratorHelper(element.attrs),\n          _step14;\n\n      try {\n        for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {\n          var attribute = _step14.value;\n          var hasBinding = false;\n          var normalizedName = normalizeAttributeName(attribute.name); // `*attr` defines template bindings\n\n          var isTemplateBinding = false;\n\n          if (attribute.i18n) {\n            i18nAttrsMeta[attribute.name] = attribute.i18n;\n          }\n\n          if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX$2)) {\n            // *-attributes\n            if (elementHasInlineTemplate) {\n              this.reportError(\"Can't have multiple template bindings on one element. Use only one attribute prefixed with *\", attribute.sourceSpan);\n            }\n\n            isTemplateBinding = true;\n            elementHasInlineTemplate = true;\n            var templateValue = attribute.value;\n            var templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX$2.length);\n            var parsedVariables = [];\n            var absoluteValueOffset = attribute.valueSpan ? attribute.valueSpan.start.offset : // If there is no value span the attribute does not have a value, like `attr` in\n            //`<div attr></div>`. In this case, point to one character beyond the last character of\n            // the attribute name.\n            attribute.sourceSpan.start.offset + attribute.name.length;\n            this.bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attribute.sourceSpan, absoluteValueOffset, [], templateParsedProperties, parsedVariables, true\n            /* isIvyAst */\n            );\n            templateVariables.push.apply(templateVariables, _toConsumableArray(parsedVariables.map(function (v) {\n              return new Variable(v.name, v.value, v.sourceSpan, v.keySpan, v.valueSpan);\n            })));\n          } else {\n            // Check for variables, events, property bindings, interpolation\n            hasBinding = this.parseAttribute(isTemplateElement, attribute, [], parsedProperties, boundEvents, variables, references);\n          }\n\n          if (!hasBinding && !isTemplateBinding) {\n            // don't include the bindings as attributes as well in the AST\n            attributes.push(this.visitAttribute(attribute));\n          }\n        }\n      } catch (err) {\n        _iterator14.e(err);\n      } finally {\n        _iterator14.f();\n      }\n\n      var children = visitAll$1(preparsedElement.nonBindable ? NON_BINDABLE_VISITOR$1 : this, element.children);\n      var parsedElement;\n\n      if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {\n        // `<ng-content>`\n        if (element.children && !element.children.every(function (node) {\n          return isEmptyTextNode(node) || isCommentNode(node);\n        })) {\n          this.reportError(\"<ng-content> element cannot have content.\", element.sourceSpan);\n        }\n\n        var selector = preparsedElement.selectAttr;\n        var attrs = element.attrs.map(function (attr) {\n          return _this167.visitAttribute(attr);\n        });\n        parsedElement = new Content(selector, attrs, element.sourceSpan, element.i18n);\n        this.ngContentSelectors.push(selector);\n      } else if (isTemplateElement) {\n        // `<ng-template>`\n        var _attrs = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);\n\n        parsedElement = new Template(element.name, attributes, _attrs.bound, boundEvents, [\n          /* no template attributes */\n        ], children, references, variables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n      } else {\n        var _attrs2 = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);\n\n        parsedElement = new Element(element.name, attributes, _attrs2.bound, boundEvents, children, references, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n      }\n\n      if (elementHasInlineTemplate) {\n        // If this node is an inline-template (e.g. has *ngFor) then we need to create a template\n        // node that contains this node.\n        // Moreover, if the node is an element, then we need to hoist its attributes to the template\n        // node for matching against content projection selectors.\n        var _attrs3 = this.extractAttributes('ng-template', templateParsedProperties, i18nAttrsMeta);\n\n        var templateAttrs = [];\n\n        _attrs3.literal.forEach(function (attr) {\n          return templateAttrs.push(attr);\n        });\n\n        _attrs3.bound.forEach(function (attr) {\n          return templateAttrs.push(attr);\n        });\n\n        var hoistedAttrs = parsedElement instanceof Element ? {\n          attributes: parsedElement.attributes,\n          inputs: parsedElement.inputs,\n          outputs: parsedElement.outputs\n        } : {\n          attributes: [],\n          inputs: [],\n          outputs: []\n        }; // For <ng-template>s with structural directives on them, avoid passing i18n information to\n        // the wrapping template to prevent unnecessary i18n instructions from being generated. The\n        // necessary i18n meta information will be extracted from child elements.\n\n        var i18n = isTemplateElement && isI18nRootElement ? undefined : element.i18n; // TODO(pk): test for this case\n\n        parsedElement = new Template(parsedElement.name, hoistedAttrs.attributes, hoistedAttrs.inputs, hoistedAttrs.outputs, templateAttrs, [parsedElement], [\n          /* no references */\n        ], templateVariables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, i18n);\n      }\n\n      if (isI18nRootElement) {\n        this.inI18nBlock = false;\n      }\n\n      return parsedElement;\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute) {\n      return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.keySpan, attribute.valueSpan, attribute.i18n);\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {\n      return this._visitTextWithInterpolation(text.value, text.sourceSpan, text.i18n);\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(expansion) {\n      var _this168 = this;\n\n      if (!expansion.i18n) {\n        // do not generate Icu in case it was created\n        // outside of i18n block in a template\n        return null;\n      }\n\n      if (!isI18nRootNode(expansion.i18n)) {\n        throw new Error(\"Invalid type \\\"\".concat(expansion.i18n.constructor, \"\\\" for \\\"i18n\\\" property of \").concat(expansion.sourceSpan.toString(), \". Expected a \\\"Message\\\"\"));\n      }\n\n      var message = expansion.i18n;\n      var vars = {};\n      var placeholders = {}; // extract VARs from ICUs - we process them separately while\n      // assembling resulting message via goog.getMsg function, since\n      // we need to pass them to top-level goog.getMsg call\n\n      Object.keys(message.placeholders).forEach(function (key) {\n        var value = message.placeholders[key];\n\n        if (key.startsWith(I18N_ICU_VAR_PREFIX)) {\n          // Currently when the `plural` or `select` keywords in an ICU contain trailing spaces (e.g.\n          // `{count, select , ...}`), these spaces are also included into the key names in ICU vars\n          // (e.g. \"VAR_SELECT \"). These trailing spaces are not desirable, since they will later be\n          // converted into `_` symbols while normalizing placeholder names, which might lead to\n          // mismatches at runtime (i.e. placeholder will not be replaced with the correct value).\n          var formattedKey = key.trim();\n\n          var ast = _this168.bindingParser.parseInterpolationExpression(value.text, value.sourceSpan);\n\n          vars[formattedKey] = new BoundText(ast, value.sourceSpan);\n        } else {\n          placeholders[key] = _this168._visitTextWithInterpolation(value.text, value.sourceSpan);\n        }\n      });\n      return new Icu(vars, placeholders, expansion.sourceSpan, message);\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(expansionCase) {\n      return null;\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment) {\n      if (this.options.collectCommentNodes) {\n        this.commentNodes.push(new Comment(comment.value || '', comment.sourceSpan));\n      }\n\n      return null;\n    } // convert view engine `ParsedProperty` to a format suitable for IVY\n\n  }, {\n    key: \"extractAttributes\",\n    value: function extractAttributes(elementName, properties, i18nPropsMeta) {\n      var _this169 = this;\n\n      var bound = [];\n      var literal = [];\n      properties.forEach(function (prop) {\n        var i18n = i18nPropsMeta[prop.name];\n\n        if (prop.isLiteral) {\n          literal.push(new TextAttribute(prop.name, prop.expression.source || '', prop.sourceSpan, prop.keySpan, prop.valueSpan, i18n));\n        } else {\n          // Note that validation is skipped and property mapping is disabled\n          // due to the fact that we need to make sure a given prop is not an\n          // input of a directive and directive matching happens at runtime.\n          var bep = _this169.bindingParser.createBoundElementProperty(elementName, prop,\n          /* skipValidation */\n          true,\n          /* mapPropertyName */\n          false);\n\n          bound.push(BoundAttribute.fromBoundElementProperty(bep, i18n));\n        }\n      });\n      return {\n        bound: bound,\n        literal: literal\n      };\n    }\n  }, {\n    key: \"parseAttribute\",\n    value: function parseAttribute(isTemplateElement, attribute, matchableAttributes, parsedProperties, boundEvents, variables, references) {\n      var name = normalizeAttributeName(attribute.name);\n      var value = attribute.value;\n      var srcSpan = attribute.sourceSpan;\n      var absoluteOffset = attribute.valueSpan ? attribute.valueSpan.start.offset : srcSpan.start.offset;\n\n      function createKeySpan(srcSpan, prefix, identifier) {\n        // We need to adjust the start location for the keySpan to account for the removed 'data-'\n        // prefix from `normalizeAttributeName`.\n        var normalizationAdjustment = attribute.name.length - name.length;\n        var keySpanStart = srcSpan.start.moveBy(prefix.length + normalizationAdjustment);\n        var keySpanEnd = keySpanStart.moveBy(identifier.length);\n        return new ParseSourceSpan(keySpanStart, keySpanEnd, keySpanStart, identifier);\n      }\n\n      var bindParts = name.match(BIND_NAME_REGEXP$1);\n\n      if (bindParts) {\n        if (bindParts[KW_BIND_IDX$1] != null) {\n          var identifier = bindParts[IDENT_KW_IDX$1];\n\n          var _keySpan = createKeySpan(srcSpan, bindParts[KW_BIND_IDX$1], identifier);\n\n          this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, _keySpan);\n        } else if (bindParts[KW_LET_IDX$1]) {\n          if (isTemplateElement) {\n            var _identifier2 = bindParts[IDENT_KW_IDX$1];\n\n            var _keySpan2 = createKeySpan(srcSpan, bindParts[KW_LET_IDX$1], _identifier2);\n\n            this.parseVariable(_identifier2, value, srcSpan, _keySpan2, attribute.valueSpan, variables);\n          } else {\n            this.reportError(\"\\\"let-\\\" is only supported on ng-template elements.\", srcSpan);\n          }\n        } else if (bindParts[KW_REF_IDX$1]) {\n          var _identifier3 = bindParts[IDENT_KW_IDX$1];\n\n          var _keySpan3 = createKeySpan(srcSpan, bindParts[KW_REF_IDX$1], _identifier3);\n\n          this.parseReference(_identifier3, value, srcSpan, _keySpan3, attribute.valueSpan, references);\n        } else if (bindParts[KW_ON_IDX$1]) {\n          var events = [];\n          var _identifier4 = bindParts[IDENT_KW_IDX$1];\n\n          var _keySpan4 = createKeySpan(srcSpan, bindParts[KW_ON_IDX$1], _identifier4);\n\n          this.bindingParser.parseEvent(_identifier4, value, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events, _keySpan4);\n          addEvents(events, boundEvents);\n        } else if (bindParts[KW_BINDON_IDX$1]) {\n          var _identifier5 = bindParts[IDENT_KW_IDX$1];\n\n          var _keySpan5 = createKeySpan(srcSpan, bindParts[KW_BINDON_IDX$1], _identifier5);\n\n          this.bindingParser.parsePropertyBinding(_identifier5, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, _keySpan5);\n          this.parseAssignmentEvent(_identifier5, value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents, _keySpan5);\n        } else if (bindParts[KW_AT_IDX$1]) {\n          var _keySpan6 = createKeySpan(srcSpan, '', name);\n\n          this.bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, _keySpan6);\n        }\n\n        return true;\n      } // We didn't see a kw-prefixed property binding, but we have not yet checked\n      // for the []/()/[()] syntax.\n\n\n      var delims = null;\n\n      if (name.startsWith(BINDING_DELIMS.BANANA_BOX.start)) {\n        delims = BINDING_DELIMS.BANANA_BOX;\n      } else if (name.startsWith(BINDING_DELIMS.PROPERTY.start)) {\n        delims = BINDING_DELIMS.PROPERTY;\n      } else if (name.startsWith(BINDING_DELIMS.EVENT.start)) {\n        delims = BINDING_DELIMS.EVENT;\n      }\n\n      if (delims !== null && // NOTE: older versions of the parser would match a start/end delimited\n      // binding iff the property name was terminated by the ending delimiter\n      // and the identifier in the binding was non-empty.\n      // TODO(ayazhafiz): update this to handle malformed bindings.\n      name.endsWith(delims.end) && name.length > delims.start.length + delims.end.length) {\n        var _identifier6 = name.substring(delims.start.length, name.length - delims.end.length);\n\n        var _keySpan7 = createKeySpan(srcSpan, delims.start, _identifier6);\n\n        if (delims.start === BINDING_DELIMS.BANANA_BOX.start) {\n          this.bindingParser.parsePropertyBinding(_identifier6, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, _keySpan7);\n          this.parseAssignmentEvent(_identifier6, value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents, _keySpan7);\n        } else if (delims.start === BINDING_DELIMS.PROPERTY.start) {\n          this.bindingParser.parsePropertyBinding(_identifier6, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, _keySpan7);\n        } else {\n          var _events = [];\n          this.bindingParser.parseEvent(_identifier6, value, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, _events, _keySpan7);\n          addEvents(_events, boundEvents);\n        }\n\n        return true;\n      } // No explicit binding found.\n\n\n      var keySpan = createKeySpan(srcSpan, ''\n      /* prefix */\n      , name);\n      var hasBinding = this.bindingParser.parsePropertyInterpolation(name, value, srcSpan, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);\n      return hasBinding;\n    }\n  }, {\n    key: \"_visitTextWithInterpolation\",\n    value: function _visitTextWithInterpolation(value, sourceSpan, i18n) {\n      var valueNoNgsp = replaceNgsp(value);\n      var expr = this.bindingParser.parseInterpolation(valueNoNgsp, sourceSpan);\n      return expr ? new BoundText(expr, sourceSpan, i18n) : new Text(valueNoNgsp, sourceSpan);\n    }\n  }, {\n    key: \"parseVariable\",\n    value: function parseVariable(identifier, value, sourceSpan, keySpan, valueSpan, variables) {\n      if (identifier.indexOf('-') > -1) {\n        this.reportError(\"\\\"-\\\" is not allowed in variable names\", sourceSpan);\n      } else if (identifier.length === 0) {\n        this.reportError(\"Variable does not have a name\", sourceSpan);\n      }\n\n      variables.push(new Variable(identifier, value, sourceSpan, keySpan, valueSpan));\n    }\n  }, {\n    key: \"parseReference\",\n    value: function parseReference(identifier, value, sourceSpan, keySpan, valueSpan, references) {\n      if (identifier.indexOf('-') > -1) {\n        this.reportError(\"\\\"-\\\" is not allowed in reference names\", sourceSpan);\n      } else if (identifier.length === 0) {\n        this.reportError(\"Reference does not have a name\", sourceSpan);\n      } else if (references.some(function (reference) {\n        return reference.name === identifier;\n      })) {\n        this.reportError(\"Reference \\\"#\".concat(identifier, \"\\\" is defined more than once\"), sourceSpan);\n      }\n\n      references.push(new Reference(identifier, value, sourceSpan, keySpan, valueSpan));\n    }\n  }, {\n    key: \"parseAssignmentEvent\",\n    value: function parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents, keySpan) {\n      var events = [];\n      this.bindingParser.parseEvent(\"\".concat(name, \"Change\"), \"\".concat(expression, \"=$event\"), sourceSpan, valueSpan || sourceSpan, targetMatchableAttrs, events, keySpan);\n      addEvents(events, boundEvents);\n    }\n  }, {\n    key: \"reportError\",\n    value: function reportError(message, sourceSpan) {\n      var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ParseErrorLevel.ERROR;\n      this.errors.push(new ParseError(sourceSpan, message, level));\n    }\n  }]);\n\n  return HtmlAstToIvyAst;\n}();\n\nvar NonBindableVisitor$1 = /*#__PURE__*/function () {\n  function NonBindableVisitor$1() {\n    _classCallCheck(this, NonBindableVisitor$1);\n  }\n\n  _createClass(NonBindableVisitor$1, [{\n    key: \"visitElement\",\n    value: function visitElement(ast) {\n      var preparsedElement = preparseElement(ast);\n\n      if (preparsedElement.type === PreparsedElementType.SCRIPT || preparsedElement.type === PreparsedElementType.STYLE || preparsedElement.type === PreparsedElementType.STYLESHEET) {\n        // Skipping <script> for security reasons\n        // Skipping <style> and stylesheets as we already processed them\n        // in the StyleCompiler\n        return null;\n      }\n\n      var children = visitAll$1(this, ast.children, null);\n      return new Element(ast.name, visitAll$1(this, ast.attrs),\n      /* inputs */\n      [],\n      /* outputs */\n      [], children,\n      /* references */\n      [], ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment) {\n      return null;\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute) {\n      return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.keySpan, attribute.valueSpan, attribute.i18n);\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {\n      return new Text(text.value, text.sourceSpan);\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(expansion) {\n      return null;\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(expansionCase) {\n      return null;\n    }\n  }]);\n\n  return NonBindableVisitor$1;\n}();\n\nvar NON_BINDABLE_VISITOR$1 = /*@__PURE__*/new NonBindableVisitor$1();\n\nfunction normalizeAttributeName(attrName) {\n  return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;\n}\n\nfunction addEvents(events, boundEvents) {\n  boundEvents.push.apply(boundEvents, _toConsumableArray(events.map(function (e) {\n    return BoundEvent.fromParsedEvent(e);\n  })));\n}\n\nfunction isEmptyTextNode(node) {\n  return node instanceof Text$3 && node.value.trim().length == 0;\n}\n\nfunction isCommentNode(node) {\n  return node instanceof Comment$1;\n}\n\nfunction textContents(node) {\n  if (node.children.length !== 1 || !(node.children[0] instanceof Text$3)) {\n    return null;\n  } else {\n    return node.children[0].value;\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar TagType = /*@__PURE__*/function (TagType) {\n  TagType[TagType[\"ELEMENT\"] = 0] = \"ELEMENT\";\n  TagType[TagType[\"TEMPLATE\"] = 1] = \"TEMPLATE\";\n  return TagType;\n}({});\n/**\n * Generates an object that is used as a shared state between parent and all child contexts.\n */\n\n\nfunction setupRegistry() {\n  return {\n    getUniqueId: getSeqNumberGenerator(),\n    icus: new Map()\n  };\n}\n/**\n * I18nContext is a helper class which keeps track of all i18n-related aspects\n * (accumulates placeholders, bindings, etc) between i18nStart and i18nEnd instructions.\n *\n * When we enter a nested template, the top-level context is being passed down\n * to the nested component, which uses this context to generate a child instance\n * of I18nContext class (to handle nested template) and at the end, reconciles it back\n * with the parent context.\n *\n * @param index Instruction index of i18nStart, which initiates this context\n * @param ref Reference to a translation const that represents the content if thus context\n * @param level Nestng level defined for child contexts\n * @param templateIndex Instruction index of a template which this context belongs to\n * @param meta Meta information (id, meaning, description, etc) associated with this context\n */\n\n\nvar I18nContext = /*#__PURE__*/function () {\n  function I18nContext(index, ref) {\n    var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n    var templateIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n    var meta = arguments.length > 4 ? arguments[4] : undefined;\n    var registry = arguments.length > 5 ? arguments[5] : undefined;\n\n    _classCallCheck(this, I18nContext);\n\n    this.index = index;\n    this.ref = ref;\n    this.level = level;\n    this.templateIndex = templateIndex;\n    this.meta = meta;\n    this.registry = registry;\n    this.bindings = new Set();\n    this.placeholders = new Map();\n    this.isEmitted = false;\n    this._unresolvedCtxCount = 0;\n    this._registry = registry || setupRegistry();\n    this.id = this._registry.getUniqueId();\n  }\n\n  _createClass(I18nContext, [{\n    key: \"appendTag\",\n    value: function appendTag(type, node, index, closed) {\n      if (node.isVoid && closed) {\n        return; // ignore \"close\" for void tags\n      }\n\n      var ph = node.isVoid || !closed ? node.startName : node.closeName;\n      var content = {\n        type: type,\n        index: index,\n        ctx: this.id,\n        isVoid: node.isVoid,\n        closed: closed\n      };\n      updatePlaceholderMap(this.placeholders, ph, content);\n    }\n  }, {\n    key: \"icus\",\n    get: function get() {\n      return this._registry.icus;\n    }\n  }, {\n    key: \"isRoot\",\n    get: function get() {\n      return this.level === 0;\n    }\n  }, {\n    key: \"isResolved\",\n    get: function get() {\n      return this._unresolvedCtxCount === 0;\n    }\n  }, {\n    key: \"getSerializedPlaceholders\",\n    value: function getSerializedPlaceholders() {\n      var result = new Map();\n      this.placeholders.forEach(function (values, key) {\n        return result.set(key, values.map(serializePlaceholderValue));\n      });\n      return result;\n    } // public API to accumulate i18n-related content\n\n  }, {\n    key: \"appendBinding\",\n    value: function appendBinding(binding) {\n      this.bindings.add(binding);\n    }\n  }, {\n    key: \"appendIcu\",\n    value: function appendIcu(name, ref) {\n      updatePlaceholderMap(this._registry.icus, name, ref);\n    }\n  }, {\n    key: \"appendBoundText\",\n    value: function appendBoundText(node) {\n      var _this170 = this;\n\n      var phs = assembleBoundTextPlaceholders(node, this.bindings.size, this.id);\n      phs.forEach(function (values, key) {\n        return updatePlaceholderMap.apply(void 0, [_this170.placeholders, key].concat(_toConsumableArray(values)));\n      });\n    }\n  }, {\n    key: \"appendTemplate\",\n    value: function appendTemplate(node, index) {\n      // add open and close tags at the same time,\n      // since we process nested templates separately\n      this.appendTag(TagType.TEMPLATE, node, index, false);\n      this.appendTag(TagType.TEMPLATE, node, index, true);\n      this._unresolvedCtxCount++;\n    }\n  }, {\n    key: \"appendElement\",\n    value: function appendElement(node, index, closed) {\n      this.appendTag(TagType.ELEMENT, node, index, closed);\n    }\n  }, {\n    key: \"appendProjection\",\n    value: function appendProjection(node, index) {\n      // Add open and close tags at the same time, since `<ng-content>` has no content,\n      // so when we come across `<ng-content>` we can register both open and close tags.\n      // Note: runtime i18n logic doesn't distinguish `<ng-content>` tag placeholders and\n      // regular element tag placeholders, so we generate element placeholders for both types.\n      this.appendTag(TagType.ELEMENT, node, index, false);\n      this.appendTag(TagType.ELEMENT, node, index, true);\n    }\n    /**\n     * Generates an instance of a child context based on the root one,\n     * when we enter a nested template within I18n section.\n     *\n     * @param index Instruction index of corresponding i18nStart, which initiates this context\n     * @param templateIndex Instruction index of a template which this context belongs to\n     * @param meta Meta information (id, meaning, description, etc) associated with this context\n     *\n     * @returns I18nContext instance\n     */\n\n  }, {\n    key: \"forkChildContext\",\n    value: function forkChildContext(index, templateIndex, meta) {\n      return new I18nContext(index, this.ref, this.level + 1, templateIndex, meta, this._registry);\n    }\n    /**\n     * Reconciles child context into parent one once the end of the i18n block is reached (i18nEnd).\n     *\n     * @param context Child I18nContext instance to be reconciled with parent context.\n     */\n\n  }, {\n    key: \"reconcileChildContext\",\n    value: function reconcileChildContext(context) {\n      var _this171 = this;\n\n      // set the right context id for open and close\n      // template tags, so we can use it as sub-block ids\n      ['start', 'close'].forEach(function (op) {\n        var key = context.meta[\"\".concat(op, \"Name\")];\n        var phs = _this171.placeholders.get(key) || [];\n        var tag = phs.find(findTemplateFn(_this171.id, context.templateIndex));\n\n        if (tag) {\n          tag.ctx = context.id;\n        }\n      }); // reconcile placeholders\n\n      var childPhs = context.placeholders;\n      childPhs.forEach(function (values, key) {\n        var phs = _this171.placeholders.get(key);\n\n        if (!phs) {\n          _this171.placeholders.set(key, values);\n\n          return;\n        } // try to find matching template...\n\n\n        var tmplIdx = phs.findIndex(findTemplateFn(context.id, context.templateIndex));\n\n        if (tmplIdx >= 0) {\n          // ... if found - replace it with nested template content\n          var isCloseTag = key.startsWith('CLOSE');\n          var isTemplateTag = key.endsWith('NG-TEMPLATE');\n\n          if (isTemplateTag) {\n            // current template's content is placed before or after\n            // parent template tag, depending on the open/close atrribute\n            phs.splice.apply(phs, [tmplIdx + (isCloseTag ? 0 : 1), 0].concat(_toConsumableArray(values)));\n          } else {\n            var idx = isCloseTag ? values.length - 1 : 0;\n            values[idx].tmpl = phs[tmplIdx];\n            phs.splice.apply(phs, [tmplIdx, 1].concat(_toConsumableArray(values)));\n          }\n        } else {\n          // ... otherwise just append content to placeholder value\n          phs.push.apply(phs, _toConsumableArray(values));\n        }\n\n        _this171.placeholders.set(key, phs);\n      });\n      this._unresolvedCtxCount--;\n    }\n  }]);\n\n  return I18nContext;\n}(); //\n// Helper methods\n//\n\n\nfunction wrap(symbol, index, contextId, closed) {\n  var state = closed ? '/' : '';\n  return wrapI18nPlaceholder(\"\".concat(state).concat(symbol).concat(index), contextId);\n}\n\nfunction wrapTag(symbol, _ref17, closed) {\n  var index = _ref17.index,\n      ctx = _ref17.ctx,\n      isVoid = _ref17.isVoid;\n  return isVoid ? wrap(symbol, index, ctx) + wrap(symbol, index, ctx, true) : wrap(symbol, index, ctx, closed);\n}\n\nfunction findTemplateFn(ctx, templateIndex) {\n  return function (token) {\n    return typeof token === 'object' && token.type === TagType.TEMPLATE && token.index === templateIndex && token.ctx === ctx;\n  };\n}\n\nfunction serializePlaceholderValue(value) {\n  var element = function element(data, closed) {\n    return wrapTag('#', data, closed);\n  };\n\n  var template = function template(data, closed) {\n    return wrapTag('*', data, closed);\n  };\n\n  var projection = function projection(data, closed) {\n    return wrapTag('!', data, closed);\n  };\n\n  switch (value.type) {\n    case TagType.ELEMENT:\n      // close element tag\n      if (value.closed) {\n        return element(value, true) + (value.tmpl ? template(value.tmpl, true) : '');\n      } // open element tag that also initiates a template\n\n\n      if (value.tmpl) {\n        return template(value.tmpl) + element(value) + (value.isVoid ? template(value.tmpl, true) : '');\n      }\n\n      return element(value);\n\n    case TagType.TEMPLATE:\n      return template(value, value.closed);\n\n    default:\n      return value;\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar IcuSerializerVisitor = /*#__PURE__*/function () {\n  function IcuSerializerVisitor() {\n    _classCallCheck(this, IcuSerializerVisitor);\n  }\n\n  _createClass(IcuSerializerVisitor, [{\n    key: \"visitText\",\n    value: function visitText(text) {\n      return text.value;\n    }\n  }, {\n    key: \"visitContainer\",\n    value: function visitContainer(container) {\n      var _this172 = this;\n\n      return container.children.map(function (child) {\n        return child.visit(_this172);\n      }).join('');\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu) {\n      var _this173 = this;\n\n      var strCases = Object.keys(icu.cases).map(function (k) {\n        return \"\".concat(k, \" {\").concat(icu.cases[k].visit(_this173), \"}\");\n      });\n      var result = \"{\".concat(icu.expressionPlaceholder, \", \").concat(icu.type, \", \").concat(strCases.join(' '), \"}\");\n      return result;\n    }\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph) {\n      var _this174 = this;\n\n      return ph.isVoid ? this.formatPh(ph.startName) : \"\".concat(this.formatPh(ph.startName)).concat(ph.children.map(function (child) {\n        return child.visit(_this174);\n      }).join('')).concat(this.formatPh(ph.closeName));\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph) {\n      return this.formatPh(ph.name);\n    }\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, context) {\n      return this.formatPh(ph.name);\n    }\n  }, {\n    key: \"formatPh\",\n    value: function formatPh(value) {\n      return \"{\".concat(formatI18nPlaceholderName(value,\n      /* useCamelCase */\n      false), \"}\");\n    }\n  }]);\n\n  return IcuSerializerVisitor;\n}();\n\nvar serializer = /*@__PURE__*/new IcuSerializerVisitor();\n\nfunction serializeIcuNode(icu) {\n  return icu.visit(serializer);\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar TAG_TO_PLACEHOLDER_NAMES = {\n  'A': 'LINK',\n  'B': 'BOLD_TEXT',\n  'BR': 'LINE_BREAK',\n  'EM': 'EMPHASISED_TEXT',\n  'H1': 'HEADING_LEVEL1',\n  'H2': 'HEADING_LEVEL2',\n  'H3': 'HEADING_LEVEL3',\n  'H4': 'HEADING_LEVEL4',\n  'H5': 'HEADING_LEVEL5',\n  'H6': 'HEADING_LEVEL6',\n  'HR': 'HORIZONTAL_RULE',\n  'I': 'ITALIC_TEXT',\n  'LI': 'LIST_ITEM',\n  'LINK': 'MEDIA_LINK',\n  'OL': 'ORDERED_LIST',\n  'P': 'PARAGRAPH',\n  'Q': 'QUOTATION',\n  'S': 'STRIKETHROUGH_TEXT',\n  'SMALL': 'SMALL_TEXT',\n  'SUB': 'SUBSTRIPT',\n  'SUP': 'SUPERSCRIPT',\n  'TBODY': 'TABLE_BODY',\n  'TD': 'TABLE_CELL',\n  'TFOOT': 'TABLE_FOOTER',\n  'TH': 'TABLE_HEADER_CELL',\n  'THEAD': 'TABLE_HEADER',\n  'TR': 'TABLE_ROW',\n  'TT': 'MONOSPACED_TEXT',\n  'U': 'UNDERLINED_TEXT',\n  'UL': 'UNORDERED_LIST'\n};\n/**\n * Creates unique names for placeholder with different content.\n *\n * Returns the same placeholder name when the content is identical.\n */\n\nvar PlaceholderRegistry = /*#__PURE__*/function () {\n  function PlaceholderRegistry() {\n    _classCallCheck(this, PlaceholderRegistry);\n\n    // Count the occurrence of the base name top generate a unique name\n    this._placeHolderNameCounts = {}; // Maps signature to placeholder names\n\n    this._signatureToName = {};\n  }\n\n  _createClass(PlaceholderRegistry, [{\n    key: \"getStartTagPlaceholderName\",\n    value: function getStartTagPlaceholderName(tag, attrs, isVoid) {\n      var signature = this._hashTag(tag, attrs, isVoid);\n\n      if (this._signatureToName[signature]) {\n        return this._signatureToName[signature];\n      }\n\n      var upperTag = tag.toUpperCase();\n      var baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || \"TAG_\".concat(upperTag);\n\n      var name = this._generateUniqueName(isVoid ? baseName : \"START_\".concat(baseName));\n\n      this._signatureToName[signature] = name;\n      return name;\n    }\n  }, {\n    key: \"getCloseTagPlaceholderName\",\n    value: function getCloseTagPlaceholderName(tag) {\n      var signature = this._hashClosingTag(tag);\n\n      if (this._signatureToName[signature]) {\n        return this._signatureToName[signature];\n      }\n\n      var upperTag = tag.toUpperCase();\n      var baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || \"TAG_\".concat(upperTag);\n\n      var name = this._generateUniqueName(\"CLOSE_\".concat(baseName));\n\n      this._signatureToName[signature] = name;\n      return name;\n    }\n  }, {\n    key: \"getPlaceholderName\",\n    value: function getPlaceholderName(name, content) {\n      var upperName = name.toUpperCase();\n      var signature = \"PH: \".concat(upperName, \"=\").concat(content);\n\n      if (this._signatureToName[signature]) {\n        return this._signatureToName[signature];\n      }\n\n      var uniqueName = this._generateUniqueName(upperName);\n\n      this._signatureToName[signature] = uniqueName;\n      return uniqueName;\n    }\n  }, {\n    key: \"getUniquePlaceholder\",\n    value: function getUniquePlaceholder(name) {\n      return this._generateUniqueName(name.toUpperCase());\n    } // Generate a hash for a tag - does not take attribute order into account\n\n  }, {\n    key: \"_hashTag\",\n    value: function _hashTag(tag, attrs, isVoid) {\n      var start = \"<\".concat(tag);\n      var strAttrs = Object.keys(attrs).sort().map(function (name) {\n        return \" \".concat(name, \"=\").concat(attrs[name]);\n      }).join('');\n      var end = isVoid ? '/>' : \"></\".concat(tag, \">\");\n      return start + strAttrs + end;\n    }\n  }, {\n    key: \"_hashClosingTag\",\n    value: function _hashClosingTag(tag) {\n      return this._hashTag(\"/\".concat(tag), {}, false);\n    }\n  }, {\n    key: \"_generateUniqueName\",\n    value: function _generateUniqueName(base) {\n      var seen = this._placeHolderNameCounts.hasOwnProperty(base);\n\n      if (!seen) {\n        this._placeHolderNameCounts[base] = 1;\n        return base;\n      }\n\n      var id = this._placeHolderNameCounts[base];\n      this._placeHolderNameCounts[base] = id + 1;\n      return \"\".concat(base, \"_\").concat(id);\n    }\n  }]);\n\n  return PlaceholderRegistry;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar _expParser = /*@__PURE__*/new Parser$1( /*@__PURE__*/new Lexer());\n/**\n * Returns a function converting html nodes to an i18n Message given an interpolationConfig\n */\n\n\nfunction createI18nMessageFactory(interpolationConfig) {\n  var visitor = new _I18nVisitor(_expParser, interpolationConfig);\n  return function (nodes, meaning, description, customId, visitNodeFn) {\n    return visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);\n  };\n}\n\nfunction noopVisitNodeFn(_html, i18n) {\n  return i18n;\n}\n\nvar _I18nVisitor = /*#__PURE__*/function () {\n  function _I18nVisitor(_expressionParser, _interpolationConfig) {\n    _classCallCheck(this, _I18nVisitor);\n\n    this._expressionParser = _expressionParser;\n    this._interpolationConfig = _interpolationConfig;\n  }\n\n  _createClass(_I18nVisitor, [{\n    key: \"toI18nMessage\",\n    value: function toI18nMessage(nodes) {\n      var meaning = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n      var description = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n      var customId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n      var visitNodeFn = arguments.length > 4 ? arguments[4] : undefined;\n      var context = {\n        isIcu: nodes.length == 1 && nodes[0] instanceof Expansion,\n        icuDepth: 0,\n        placeholderRegistry: new PlaceholderRegistry(),\n        placeholderToContent: {},\n        placeholderToMessage: {},\n        visitNodeFn: visitNodeFn || noopVisitNodeFn\n      };\n      var i18nodes = visitAll$1(this, nodes, context);\n      return new Message(i18nodes, context.placeholderToContent, context.placeholderToMessage, meaning, description, customId);\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(el, context) {\n      var _a;\n\n      var children = visitAll$1(this, el.children, context);\n      var attrs = {};\n      el.attrs.forEach(function (attr) {\n        // Do not visit the attributes, translatable ones are top-level ASTs\n        attrs[attr.name] = attr.value;\n      });\n      var isVoid = getHtmlTagDefinition(el.name).isVoid;\n      var startPhName = context.placeholderRegistry.getStartTagPlaceholderName(el.name, attrs, isVoid);\n      context.placeholderToContent[startPhName] = {\n        text: el.startSourceSpan.toString(),\n        sourceSpan: el.startSourceSpan\n      };\n      var closePhName = '';\n\n      if (!isVoid) {\n        closePhName = context.placeholderRegistry.getCloseTagPlaceholderName(el.name);\n        context.placeholderToContent[closePhName] = {\n          text: \"</\".concat(el.name, \">\"),\n          sourceSpan: (_a = el.endSourceSpan) !== null && _a !== void 0 ? _a : el.sourceSpan\n        };\n      }\n\n      var node = new TagPlaceholder(el.name, attrs, startPhName, closePhName, children, isVoid, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n      return context.visitNodeFn(el, node);\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {\n      var node = attribute.valueTokens === undefined || attribute.valueTokens.length === 1 ? new Text$1(attribute.value, attribute.valueSpan || attribute.sourceSpan) : this._visitTextWithInterpolation(attribute.valueTokens, attribute.valueSpan || attribute.sourceSpan, context, attribute.i18n);\n      return context.visitNodeFn(attribute, node);\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      var node = text.tokens.length === 1 ? new Text$1(text.value, text.sourceSpan) : this._visitTextWithInterpolation(text.tokens, text.sourceSpan, context, text.i18n);\n      return context.visitNodeFn(text, node);\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {\n      return null;\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(icu, context) {\n      var _this175 = this;\n\n      context.icuDepth++;\n      var i18nIcuCases = {};\n      var i18nIcu = new Icu$1(icu.switchValue, icu.type, i18nIcuCases, icu.sourceSpan);\n      icu.cases.forEach(function (caze) {\n        i18nIcuCases[caze.value] = new Container(caze.expression.map(function (node) {\n          return node.visit(_this175, context);\n        }), caze.expSourceSpan);\n      });\n      context.icuDepth--;\n\n      if (context.isIcu || context.icuDepth > 0) {\n        // Returns an ICU node when:\n        // - the message (vs a part of the message) is an ICU message, or\n        // - the ICU message is nested.\n        var expPh = context.placeholderRegistry.getUniquePlaceholder(\"VAR_\".concat(icu.type));\n        i18nIcu.expressionPlaceholder = expPh;\n        context.placeholderToContent[expPh] = {\n          text: icu.switchValue,\n          sourceSpan: icu.switchValueSourceSpan\n        };\n        return context.visitNodeFn(icu, i18nIcu);\n      } // Else returns a placeholder\n      // ICU placeholders should not be replaced with their original content but with the their\n      // translations.\n      // TODO(vicb): add a html.Node -> i18n.Message cache to avoid having to re-create the msg\n\n\n      var phName = context.placeholderRegistry.getPlaceholderName('ICU', icu.sourceSpan.toString());\n      context.placeholderToMessage[phName] = this.toI18nMessage([icu], '', '', '', undefined);\n      var node = new IcuPlaceholder(i18nIcu, phName, icu.sourceSpan);\n      return context.visitNodeFn(icu, node);\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(_icuCase, _context) {\n      throw new Error('Unreachable code');\n    }\n    /**\n     * Convert, text and interpolated tokens up into text and placeholder pieces.\n     *\n     * @param tokens The text and interpolated tokens.\n     * @param sourceSpan The span of the whole of the `text` string.\n     * @param context The current context of the visitor, used to compute and store placeholders.\n     * @param previousI18n Any i18n metadata associated with this `text` from a previous pass.\n     */\n\n  }, {\n    key: \"_visitTextWithInterpolation\",\n    value: function _visitTextWithInterpolation(tokens, sourceSpan, context, previousI18n) {\n      // Return a sequence of `Text` and `Placeholder` nodes grouped in a `Container`.\n      var nodes = []; // We will only create a container if there are actually interpolations,\n      // so this flag tracks that.\n\n      var hasInterpolation = false;\n\n      var _iterator15 = _createForOfIteratorHelper(tokens),\n          _step15;\n\n      try {\n        for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {\n          var token = _step15.value;\n\n          switch (token.type) {\n            case 8\n            /* INTERPOLATION */\n            :\n            case 17\n            /* ATTR_VALUE_INTERPOLATION */\n            :\n              hasInterpolation = true;\n              var expression = token.parts[1];\n              var baseName = extractPlaceholderName(expression) || 'INTERPOLATION';\n              var phName = context.placeholderRegistry.getPlaceholderName(baseName, expression);\n              context.placeholderToContent[phName] = {\n                text: token.parts.join(''),\n                sourceSpan: token.sourceSpan\n              };\n              nodes.push(new Placeholder(expression, phName, token.sourceSpan));\n              break;\n\n            default:\n              if (token.parts[0].length > 0) {\n                // This token is text or an encoded entity.\n                // If it is following on from a previous text node then merge it into that node\n                // Otherwise, if it is following an interpolation, then add a new node.\n                var previous = nodes[nodes.length - 1];\n\n                if (previous instanceof Text$1) {\n                  previous.value += token.parts[0];\n                  previous.sourceSpan = new ParseSourceSpan(previous.sourceSpan.start, token.sourceSpan.end, previous.sourceSpan.fullStart, previous.sourceSpan.details);\n                } else {\n                  nodes.push(new Text$1(token.parts[0], token.sourceSpan));\n                }\n              }\n\n              break;\n          }\n        }\n      } catch (err) {\n        _iterator15.e(err);\n      } finally {\n        _iterator15.f();\n      }\n\n      if (hasInterpolation) {\n        // Whitespace removal may have invalidated the interpolation source-spans.\n        reusePreviousSourceSpans(nodes, previousI18n);\n        return new Container(nodes, sourceSpan);\n      } else {\n        return nodes[0];\n      }\n    }\n  }]);\n\n  return _I18nVisitor;\n}();\n/**\n * Re-use the source-spans from `previousI18n` metadata for the `nodes`.\n *\n * Whitespace removal can invalidate the source-spans of interpolation nodes, so we\n * reuse the source-span stored from a previous pass before the whitespace was removed.\n *\n * @param nodes The `Text` and `Placeholder` nodes to be processed.\n * @param previousI18n Any i18n metadata for these `nodes` stored from a previous pass.\n */\n\n\nfunction reusePreviousSourceSpans(nodes, previousI18n) {\n  if (previousI18n instanceof Message) {\n    // The `previousI18n` is an i18n `Message`, so we are processing an `Attribute` with i18n\n    // metadata. The `Message` should consist only of a single `Container` that contains the\n    // parts (`Text` and `Placeholder`) to process.\n    assertSingleContainerMessage(previousI18n);\n    previousI18n = previousI18n.nodes[0];\n  }\n\n  if (previousI18n instanceof Container) {\n    // The `previousI18n` is a `Container`, which means that this is a second i18n extraction pass\n    // after whitespace has been removed from the AST nodes.\n    assertEquivalentNodes(previousI18n.children, nodes); // Reuse the source-spans from the first pass.\n\n    for (var i = 0; i < nodes.length; i++) {\n      nodes[i].sourceSpan = previousI18n.children[i].sourceSpan;\n    }\n  }\n}\n/**\n * Asserts that the `message` contains exactly one `Container` node.\n */\n\n\nfunction assertSingleContainerMessage(message) {\n  var nodes = message.nodes;\n\n  if (nodes.length !== 1 || !(nodes[0] instanceof Container)) {\n    throw new Error('Unexpected previous i18n message - expected it to consist of only a single `Container` node.');\n  }\n}\n/**\n * Asserts that the `previousNodes` and `node` collections have the same number of elements and\n * corresponding elements have the same node type.\n */\n\n\nfunction assertEquivalentNodes(previousNodes, nodes) {\n  if (previousNodes.length !== nodes.length) {\n    throw new Error('The number of i18n message children changed between first and second pass.');\n  }\n\n  if (previousNodes.some(function (node, i) {\n    return nodes[i].constructor !== node.constructor;\n  })) {\n    throw new Error('The types of the i18n message children changed between first and second pass.');\n  }\n}\n\nvar _CUSTOM_PH_EXP = /\\/\\/[\\s\\S]*i18n[\\s\\S]*\\([\\s\\S]*ph[\\s\\S]*=[\\s\\S]*(\"|')([\\s\\S]*?)\\1[\\s\\S]*\\)/g;\n\nfunction extractPlaceholderName(input) {\n  return input.split(_CUSTOM_PH_EXP)[2];\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * An i18n error.\n */\n\n\nvar I18nError = /*#__PURE__*/function (_ParseError6) {\n  _inherits(I18nError, _ParseError6);\n\n  var _super99 = _createSuper(I18nError);\n\n  function I18nError(span, msg) {\n    _classCallCheck(this, I18nError);\n\n    return _super99.call(this, span, msg);\n  }\n\n  return _createClass(I18nError);\n}(ParseError);\n/**\n * @license\n * Copyright Google LLC 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\nvar setI18nRefs = function setI18nRefs(htmlNode, i18nNode) {\n  if (htmlNode instanceof NodeWithI18n) {\n    if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {\n      // This html node represents an ICU but this is a second processing pass, and the legacy id\n      // was computed in the previous pass and stored in the `i18n` property as a message.\n      // We are about to wipe out that property so capture the previous message to be reused when\n      // generating the message for this ICU later. See `_generateI18nMessage()`.\n      i18nNode.previousMessage = htmlNode.i18n;\n    }\n\n    htmlNode.i18n = i18nNode;\n  }\n\n  return i18nNode;\n};\n/**\n * This visitor walks over HTML parse tree and converts information stored in\n * i18n-related attributes (\"i18n\" and \"i18n-*\") into i18n meta object that is\n * stored with other element's and attribute's information.\n */\n\n\nvar I18nMetaVisitor = /*#__PURE__*/function () {\n  function I18nMetaVisitor() {\n    var interpolationConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_INTERPOLATION_CONFIG;\n    var keepI18nAttrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    var enableI18nLegacyMessageIdFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n    _classCallCheck(this, I18nMetaVisitor);\n\n    this.interpolationConfig = interpolationConfig;\n    this.keepI18nAttrs = keepI18nAttrs;\n    this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat; // whether visited nodes contain i18n information\n\n    this.hasI18nMeta = false;\n    this._errors = []; // i18n message generation factory\n\n    this._createI18nMessage = createI18nMessageFactory(this.interpolationConfig);\n  }\n\n  _createClass(I18nMetaVisitor, [{\n    key: \"_generateI18nMessage\",\n    value: function _generateI18nMessage(nodes) {\n      var meta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n      var visitNodeFn = arguments.length > 2 ? arguments[2] : undefined;\n\n      var _this$_parseMetadata = this._parseMetadata(meta),\n          meaning = _this$_parseMetadata.meaning,\n          description = _this$_parseMetadata.description,\n          customId = _this$_parseMetadata.customId;\n\n      var message = this._createI18nMessage(nodes, meaning, description, customId, visitNodeFn);\n\n      this._setMessageId(message, meta);\n\n      this._setLegacyIds(message, meta);\n\n      return message;\n    }\n  }, {\n    key: \"visitAllWithErrors\",\n    value: function visitAllWithErrors(nodes) {\n      var _this176 = this;\n\n      var result = nodes.map(function (node) {\n        return node.visit(_this176, null);\n      });\n      return new ParseTreeResult(result, this._errors);\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(element) {\n      if (hasI18nAttrs(element)) {\n        this.hasI18nMeta = true;\n        var attrs = [];\n        var attrsMeta = {};\n\n        var _iterator16 = _createForOfIteratorHelper(element.attrs),\n            _step16;\n\n        try {\n          for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {\n            var _attr = _step16.value;\n\n            if (_attr.name === I18N_ATTR) {\n              // root 'i18n' node attribute\n              var i18n = element.i18n || _attr.value;\n\n              var message = this._generateI18nMessage(element.children, i18n, setI18nRefs); // do not assign empty i18n meta\n\n\n              if (message.nodes.length) {\n                element.i18n = message;\n              }\n            } else if (_attr.name.startsWith(I18N_ATTR_PREFIX)) {\n              // 'i18n-*' attributes\n              var name = _attr.name.slice(I18N_ATTR_PREFIX.length);\n\n              if (isTrustedTypesSink(element.name, name)) {\n                this._reportError(_attr, \"Translating attribute '\".concat(name, \"' is disallowed for security reasons.\"));\n              } else {\n                attrsMeta[name] = _attr.value;\n              }\n            } else {\n              // non-i18n attributes\n              attrs.push(_attr);\n            }\n          } // set i18n meta for attributes\n\n        } catch (err) {\n          _iterator16.e(err);\n        } finally {\n          _iterator16.f();\n        }\n\n        if (Object.keys(attrsMeta).length) {\n          var _iterator17 = _createForOfIteratorHelper(attrs),\n              _step17;\n\n          try {\n            for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {\n              var attr = _step17.value;\n              var meta = attrsMeta[attr.name]; // do not create translation for empty attributes\n\n              if (meta !== undefined && attr.value) {\n                attr.i18n = this._generateI18nMessage([attr], attr.i18n || meta);\n              }\n            }\n          } catch (err) {\n            _iterator17.e(err);\n          } finally {\n            _iterator17.f();\n          }\n        }\n\n        if (!this.keepI18nAttrs) {\n          // update element's attributes,\n          // keeping only non-i18n related ones\n          element.attrs = attrs;\n        }\n      }\n\n      visitAll$1(this, element.children, element.i18n);\n      return element;\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(expansion, currentMessage) {\n      var message;\n      var meta = expansion.i18n;\n      this.hasI18nMeta = true;\n\n      if (meta instanceof IcuPlaceholder) {\n        // set ICU placeholder name (e.g. \"ICU_1\"),\n        // generated while processing root element contents,\n        // so we can reference it when we output translation\n        var name = meta.name;\n        message = this._generateI18nMessage([expansion], meta);\n        var icu = icuFromI18nMessage(message);\n        icu.name = name;\n      } else {\n        // ICU is a top level message, try to use metadata from container element if provided via\n        // `context` argument. Note: context may not be available for standalone ICUs (without\n        // wrapping element), so fallback to ICU metadata in this case.\n        message = this._generateI18nMessage([expansion], currentMessage || meta);\n      }\n\n      expansion.i18n = message;\n      return expansion;\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {\n      return text;\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute) {\n      return attribute;\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment) {\n      return comment;\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(expansionCase) {\n      return expansionCase;\n    }\n    /**\n     * Parse the general form `meta` passed into extract the explicit metadata needed to create a\n     * `Message`.\n     *\n     * There are three possibilities for the `meta` variable\n     * 1) a string from an `i18n` template attribute: parse it to extract the metadata values.\n     * 2) a `Message` from a previous processing pass: reuse the metadata values in the message.\n     * 4) other: ignore this and just process the message metadata as normal\n     *\n     * @param meta the bucket that holds information about the message\n     * @returns the parsed metadata.\n     */\n\n  }, {\n    key: \"_parseMetadata\",\n    value: function _parseMetadata(meta) {\n      return typeof meta === 'string' ? parseI18nMeta(meta) : meta instanceof Message ? meta : {};\n    }\n    /**\n     * Generate (or restore) message id if not specified already.\n     */\n\n  }, {\n    key: \"_setMessageId\",\n    value: function _setMessageId(message, meta) {\n      if (!message.id) {\n        message.id = meta instanceof Message && meta.id || decimalDigest(message);\n      }\n    }\n    /**\n     * Update the `message` with a `legacyId` if necessary.\n     *\n     * @param message the message whose legacy id should be set\n     * @param meta information about the message being processed\n     */\n\n  }, {\n    key: \"_setLegacyIds\",\n    value: function _setLegacyIds(message, meta) {\n      if (this.enableI18nLegacyMessageIdFormat) {\n        message.legacyIds = [computeDigest(message), computeDecimalDigest(message)];\n      } else if (typeof meta !== 'string') {\n        // This occurs if we are doing the 2nd pass after whitespace removal (see `parseTemplate()` in\n        // `packages/compiler/src/render3/view/template.ts`).\n        // In that case we want to reuse the legacy message generated in the 1st pass (see\n        // `setI18nRefs()`).\n        var previousMessage = meta instanceof Message ? meta : meta instanceof IcuPlaceholder ? meta.previousMessage : undefined;\n        message.legacyIds = previousMessage ? previousMessage.legacyIds : [];\n      }\n    }\n  }, {\n    key: \"_reportError\",\n    value: function _reportError(node, msg) {\n      this._errors.push(new I18nError(node.sourceSpan, msg));\n    }\n  }]);\n\n  return I18nMetaVisitor;\n}();\n/** I18n separators for metadata **/\n\n\nvar I18N_MEANING_SEPARATOR = '|';\nvar I18N_ID_SEPARATOR = '@@';\n/**\n * Parses i18n metas like:\n *  - \"@@id\",\n *  - \"description[@@id]\",\n *  - \"meaning|description[@@id]\"\n * and returns an object with parsed output.\n *\n * @param meta String that represents i18n meta\n * @returns Object with id, meaning and description fields\n */\n\nfunction parseI18nMeta() {\n  var meta = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n  var customId;\n  var meaning;\n  var description;\n  meta = meta.trim();\n\n  if (meta) {\n    var idIndex = meta.indexOf(I18N_ID_SEPARATOR);\n    var descIndex = meta.indexOf(I18N_MEANING_SEPARATOR);\n    var meaningAndDesc;\n\n    var _ref18 = idIndex > -1 ? [meta.slice(0, idIndex), meta.slice(idIndex + 2)] : [meta, ''];\n\n    var _ref19 = _slicedToArray(_ref18, 2);\n\n    meaningAndDesc = _ref19[0];\n    customId = _ref19[1];\n\n    var _ref20 = descIndex > -1 ? [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] : ['', meaningAndDesc];\n\n    var _ref21 = _slicedToArray(_ref20, 2);\n\n    meaning = _ref21[0];\n    description = _ref21[1];\n  }\n\n  return {\n    customId: customId,\n    meaning: meaning,\n    description: description\n  };\n} // Converts i18n meta information for a message (id, description, meaning)\n// to a JsDoc statement formatted as expected by the Closure compiler.\n\n\nfunction i18nMetaToJSDoc(meta) {\n  var tags = [];\n\n  if (meta.description) {\n    tags.push({\n      tagName: \"desc\"\n      /* Desc */\n      ,\n      text: meta.description\n    });\n  }\n\n  if (meta.meaning) {\n    tags.push({\n      tagName: \"meaning\"\n      /* Meaning */\n      ,\n      text: meta.meaning\n    });\n  }\n\n  return tags.length == 0 ? null : jsDocComment(tags);\n}\n/** Closure uses `goog.getMsg(message)` to lookup translations */\n\n\nvar GOOG_GET_MSG = 'goog.getMsg';\n\nfunction createGoogleGetMsgStatements(variable$1, message, closureVar, params) {\n  var messageString = serializeI18nMessageForGetMsg(message);\n  var args = [literal(messageString)];\n\n  if (Object.keys(params).length) {\n    args.push(mapLiteral(params, true));\n  } // /**\n  //  * @desc description of message\n  //  * @meaning meaning of message\n  //  */\n  // const MSG_... = goog.getMsg(..);\n  // I18N_X = MSG_...;\n\n\n  var googGetMsgStmt = closureVar.set(variable(GOOG_GET_MSG).callFn(args)).toConstDecl();\n  var metaComment = i18nMetaToJSDoc(message);\n\n  if (metaComment !== null) {\n    googGetMsgStmt.addLeadingComment(metaComment);\n  }\n\n  var i18nAssignmentStmt = new ExpressionStatement(variable$1.set(closureVar));\n  return [googGetMsgStmt, i18nAssignmentStmt];\n}\n/**\n * This visitor walks over i18n tree and generates its string representation, including ICUs and\n * placeholders in `{$placeholder}` (for plain messages) or `{PLACEHOLDER}` (inside ICUs) format.\n */\n\n\nvar GetMsgSerializerVisitor = /*#__PURE__*/function () {\n  function GetMsgSerializerVisitor() {\n    _classCallCheck(this, GetMsgSerializerVisitor);\n  }\n\n  _createClass(GetMsgSerializerVisitor, [{\n    key: \"formatPh\",\n    value: function formatPh(value) {\n      return \"{$\".concat(formatI18nPlaceholderName(value), \"}\");\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {\n      return text.value;\n    }\n  }, {\n    key: \"visitContainer\",\n    value: function visitContainer(container) {\n      var _this177 = this;\n\n      return container.children.map(function (child) {\n        return child.visit(_this177);\n      }).join('');\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu) {\n      return serializeIcuNode(icu);\n    }\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph) {\n      var _this178 = this;\n\n      return ph.isVoid ? this.formatPh(ph.startName) : \"\".concat(this.formatPh(ph.startName)).concat(ph.children.map(function (child) {\n        return child.visit(_this178);\n      }).join('')).concat(this.formatPh(ph.closeName));\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph) {\n      return this.formatPh(ph.name);\n    }\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, context) {\n      return this.formatPh(ph.name);\n    }\n  }]);\n\n  return GetMsgSerializerVisitor;\n}();\n\nvar serializerVisitor$1 = /*@__PURE__*/new GetMsgSerializerVisitor();\n\nfunction serializeI18nMessageForGetMsg(message) {\n  return message.nodes.map(function (node) {\n    return node.visit(serializerVisitor$1, null);\n  }).join('');\n}\n\nfunction createLocalizeStatements(variable, message, params) {\n  var _serializeI18nMessage = serializeI18nMessageForLocalize(message),\n      messageParts = _serializeI18nMessage.messageParts,\n      placeHolders = _serializeI18nMessage.placeHolders;\n\n  var sourceSpan = getSourceSpan(message);\n  var expressions = placeHolders.map(function (ph) {\n    return params[ph.text];\n  });\n  var localizedString$1 = localizedString(message, messageParts, placeHolders, expressions, sourceSpan);\n  var variableInitialization = variable.set(localizedString$1);\n  return [new ExpressionStatement(variableInitialization)];\n}\n/**\n * This visitor walks over an i18n tree, capturing literal strings and placeholders.\n *\n * The result can be used for generating the `$localize` tagged template literals.\n */\n\n\nvar LocalizeSerializerVisitor = /*#__PURE__*/function () {\n  function LocalizeSerializerVisitor() {\n    _classCallCheck(this, LocalizeSerializerVisitor);\n  }\n\n  _createClass(LocalizeSerializerVisitor, [{\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      if (context[context.length - 1] instanceof LiteralPiece) {\n        // Two literal pieces in a row means that there was some comment node in-between.\n        context[context.length - 1].text += text.value;\n      } else {\n        var sourceSpan = new ParseSourceSpan(text.sourceSpan.fullStart, text.sourceSpan.end, text.sourceSpan.fullStart, text.sourceSpan.details);\n        context.push(new LiteralPiece(text.value, sourceSpan));\n      }\n    }\n  }, {\n    key: \"visitContainer\",\n    value: function visitContainer(container, context) {\n      var _this179 = this;\n\n      container.children.forEach(function (child) {\n        return child.visit(_this179, context);\n      });\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu, context) {\n      context.push(new LiteralPiece(serializeIcuNode(icu), icu.sourceSpan));\n    }\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph, context) {\n      var _this180 = this;\n\n      var _a, _b;\n\n      context.push(this.createPlaceholderPiece(ph.startName, (_a = ph.startSourceSpan) !== null && _a !== void 0 ? _a : ph.sourceSpan));\n\n      if (!ph.isVoid) {\n        ph.children.forEach(function (child) {\n          return child.visit(_this180, context);\n        });\n        context.push(this.createPlaceholderPiece(ph.closeName, (_b = ph.endSourceSpan) !== null && _b !== void 0 ? _b : ph.sourceSpan));\n      }\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph, context) {\n      context.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan));\n    }\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, context) {\n      context.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan));\n    }\n  }, {\n    key: \"createPlaceholderPiece\",\n    value: function createPlaceholderPiece(name, sourceSpan) {\n      return new PlaceholderPiece(formatI18nPlaceholderName(name,\n      /* useCamelCase */\n      false), sourceSpan);\n    }\n  }]);\n\n  return LocalizeSerializerVisitor;\n}();\n\nvar serializerVisitor$2 = /*@__PURE__*/new LocalizeSerializerVisitor();\n/**\n * Serialize an i18n message into two arrays: messageParts and placeholders.\n *\n * These arrays will be used to generate `$localize` tagged template literals.\n *\n * @param message The message to be serialized.\n * @returns an object containing the messageParts and placeholders.\n */\n\nfunction serializeI18nMessageForLocalize(message) {\n  var pieces = [];\n  message.nodes.forEach(function (node) {\n    return node.visit(serializerVisitor$2, pieces);\n  });\n  return processMessagePieces(pieces);\n}\n\nfunction getSourceSpan(message) {\n  var startNode = message.nodes[0];\n  var endNode = message.nodes[message.nodes.length - 1];\n  return new ParseSourceSpan(startNode.sourceSpan.fullStart, endNode.sourceSpan.end, startNode.sourceSpan.fullStart, startNode.sourceSpan.details);\n}\n/**\n * Convert the list of serialized MessagePieces into two arrays.\n *\n * One contains the literal string pieces and the other the placeholders that will be replaced by\n * expressions when rendering `$localize` tagged template literals.\n *\n * @param pieces The pieces to process.\n * @returns an object containing the messageParts and placeholders.\n */\n\n\nfunction processMessagePieces(pieces) {\n  var messageParts = [];\n  var placeHolders = [];\n\n  if (pieces[0] instanceof PlaceholderPiece) {\n    // The first piece was a placeholder so we need to add an initial empty message part.\n    messageParts.push(createEmptyMessagePart(pieces[0].sourceSpan.start));\n  }\n\n  for (var i = 0; i < pieces.length; i++) {\n    var part = pieces[i];\n\n    if (part instanceof LiteralPiece) {\n      messageParts.push(part);\n    } else {\n      placeHolders.push(part);\n\n      if (pieces[i - 1] instanceof PlaceholderPiece) {\n        // There were two placeholders in a row, so we need to add an empty message part.\n        messageParts.push(createEmptyMessagePart(pieces[i - 1].sourceSpan.end));\n      }\n    }\n  }\n\n  if (pieces[pieces.length - 1] instanceof PlaceholderPiece) {\n    // The last piece was a placeholder so we need to add a final empty message part.\n    messageParts.push(createEmptyMessagePart(pieces[pieces.length - 1].sourceSpan.end));\n  }\n\n  return {\n    messageParts: messageParts,\n    placeHolders: placeHolders\n  };\n}\n\nfunction createEmptyMessagePart(location) {\n  return new LiteralPiece('', new ParseSourceSpan(location, location));\n}\n/**\n * @license\n * Copyright Google LLC 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// Selector attribute name of `<ng-content>`\n\n\nvar NG_CONTENT_SELECT_ATTR$1 = 'select'; // Attribute name of `ngProjectAs`.\n\nvar NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs'; // Global symbols available only inside event bindings.\n\nvar EVENT_BINDING_SCOPE_GLOBALS = /*@__PURE__*/new Set(['$event']); // List of supported global targets for event listeners\n\nvar GLOBAL_TARGET_RESOLVERS = /*@__PURE__*/new Map([['window', Identifiers.resolveWindow], ['document', Identifiers.resolveDocument], ['body', Identifiers.resolveBody]]);\nvar LEADING_TRIVIA_CHARS = [' ', '\\n', '\\r', '\\t']; //  if (rf & flags) { .. }\n\nfunction renderFlagCheckIfStmt(flags, statements) {\n  return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);\n}\n\nfunction prepareEventListenerParameters(eventAst) {\n  var handlerName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n  var scope = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n  var type = eventAst.type,\n      name = eventAst.name,\n      target = eventAst.target,\n      phase = eventAst.phase,\n      handler = eventAst.handler;\n\n  if (target && !GLOBAL_TARGET_RESOLVERS.has(target)) {\n    throw new Error(\"Unexpected global target '\".concat(target, \"' defined for '\").concat(name, \"' event.\\n        Supported list of global targets: \").concat(Array.from(GLOBAL_TARGET_RESOLVERS.keys()), \".\"));\n  }\n\n  var eventArgumentName = '$event';\n  var implicitReceiverAccesses = new Set();\n  var implicitReceiverExpr = scope === null || scope.bindingLevel === 0 ? variable(CONTEXT_NAME) : scope.getOrCreateSharedContextVar(0);\n  var bindingExpr = convertActionBinding(scope, implicitReceiverExpr, handler, 'b', function () {\n    return error('Unexpected interpolation');\n  }, eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);\n  var statements = [];\n\n  if (scope) {\n    // `variableDeclarations` needs to run first, because\n    // `restoreViewStatement` depends on the result.\n    statements.push.apply(statements, _toConsumableArray(scope.variableDeclarations()));\n    statements.unshift.apply(statements, _toConsumableArray(scope.restoreViewStatement()));\n  }\n\n  statements.push.apply(statements, _toConsumableArray(bindingExpr.render3Stmts));\n  var eventName = type === 1\n  /* Animation */\n  ? prepareSyntheticListenerName(name, phase) : name;\n  var fnName = handlerName && sanitizeIdentifier(handlerName);\n  var fnArgs = [];\n\n  if (implicitReceiverAccesses.has(eventArgumentName)) {\n    fnArgs.push(new FnParam(eventArgumentName, DYNAMIC_TYPE));\n  }\n\n  var handlerFn = fn(fnArgs, statements, INFERRED_TYPE, null, fnName);\n  var params = [literal(eventName), handlerFn];\n\n  if (target) {\n    params.push(literal(false), // `useCapture` flag, defaults to `false`\n    importExpr(GLOBAL_TARGET_RESOLVERS.get(target)));\n  }\n\n  return params;\n}\n\nfunction createComponentDefConsts() {\n  return {\n    prepareStatements: [],\n    constExpressions: [],\n    i18nVarRefsCache: new Map()\n  };\n}\n\nvar TemplateDefinitionBuilder = /*#__PURE__*/function () {\n  function TemplateDefinitionBuilder(constantPool, parentBindingScope) {\n    var _this181 = this;\n\n    var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n    var contextName = arguments.length > 3 ? arguments[3] : undefined;\n    var i18nContext = arguments.length > 4 ? arguments[4] : undefined;\n    var templateIndex = arguments.length > 5 ? arguments[5] : undefined;\n    var templateName = arguments.length > 6 ? arguments[6] : undefined;\n    var directiveMatcher = arguments.length > 7 ? arguments[7] : undefined;\n    var directives = arguments.length > 8 ? arguments[8] : undefined;\n    var pipeTypeByName = arguments.length > 9 ? arguments[9] : undefined;\n    var pipes = arguments.length > 10 ? arguments[10] : undefined;\n\n    var _namespace = arguments.length > 11 ? arguments[11] : undefined;\n\n    var relativeContextFilePath = arguments.length > 12 ? arguments[12] : undefined;\n    var i18nUseExternalIds = arguments.length > 13 ? arguments[13] : undefined;\n\n    var _constants = arguments.length > 14 && arguments[14] !== undefined ? arguments[14] : createComponentDefConsts();\n\n    _classCallCheck(this, TemplateDefinitionBuilder);\n\n    this.constantPool = constantPool;\n    this.level = level;\n    this.contextName = contextName;\n    this.i18nContext = i18nContext;\n    this.templateIndex = templateIndex;\n    this.templateName = templateName;\n    this.directiveMatcher = directiveMatcher;\n    this.directives = directives;\n    this.pipeTypeByName = pipeTypeByName;\n    this.pipes = pipes;\n    this._namespace = _namespace;\n    this.i18nUseExternalIds = i18nUseExternalIds;\n    this._constants = _constants;\n    this._dataIndex = 0;\n    this._bindingContext = 0;\n    this._prefixCode = [];\n    /**\n     * List of callbacks to generate creation mode instructions. We store them here as we process\n     * the template so bindings in listeners are resolved only once all nodes have been visited.\n     * This ensures all local refs and context variables are available for matching.\n     */\n\n    this._creationCodeFns = [];\n    /**\n     * List of callbacks to generate update mode instructions. We store them here as we process\n     * the template so bindings are resolved only once all nodes have been visited. This ensures\n     * all local refs and context variables are available for matching.\n     */\n\n    this._updateCodeFns = [];\n    /** Index of the currently-selected node. */\n\n    this._currentIndex = 0;\n    /** Temporary variable declarations generated from visiting pipes, literals, etc. */\n\n    this._tempVariables = [];\n    /**\n     * List of callbacks to build nested templates. Nested templates must not be visited until\n     * after the parent template has finished visiting all of its nodes. This ensures that all\n     * local ref bindings in nested templates are able to find local ref values if the refs\n     * are defined after the template declaration.\n     */\n\n    this._nestedTemplateFns = [];\n    this._unsupported = unsupported; // i18n context local to this template\n\n    this.i18n = null; // Number of slots to reserve for pureFunctions\n\n    this._pureFunctionSlots = 0; // Number of binding slots\n\n    this._bindingSlots = 0; // Projection slots found in the template. Projection slots can distribute projected\n    // nodes based on a selector, or can just use the wildcard selector to match\n    // all nodes which aren't matching any selector.\n\n    this._ngContentReservedSlots = []; // Number of non-default selectors found in all parent templates of this template. We need to\n    // track it to properly adjust projection slot index in the `projection` instruction.\n\n    this._ngContentSelectorsOffset = 0; // Expression that should be used as implicit receiver when converting template\n    // expressions to output AST.\n\n    this._implicitReceiverExpr = null; // These should be handled in the template or element directly.\n\n    this.visitReference = invalid$1;\n    this.visitVariable = invalid$1;\n    this.visitTextAttribute = invalid$1;\n    this.visitBoundAttribute = invalid$1;\n    this.visitBoundEvent = invalid$1;\n    this._bindingScope = parentBindingScope.nestedScope(level); // Turn the relative context file path into an identifier by replacing non-alphanumeric\n    // characters with underscores.\n\n    this.fileBasedI18nSuffix = relativeContextFilePath.replace(/[^A-Za-z0-9]/g, '_') + '_';\n    this._valueConverter = new ValueConverter(constantPool, function () {\n      return _this181.allocateDataSlot();\n    }, function (numSlots) {\n      return _this181.allocatePureFunctionSlots(numSlots);\n    }, function (name, localName, slot, value) {\n      var pipeType = pipeTypeByName.get(name);\n\n      if (pipeType) {\n        _this181.pipes.add(pipeType);\n      }\n\n      _this181._bindingScope.set(_this181.level, localName, value);\n\n      _this181.creationInstruction(null, Identifiers.pipe, [literal(slot), literal(name)]);\n    });\n  }\n\n  _createClass(TemplateDefinitionBuilder, [{\n    key: \"buildTemplateFunction\",\n    value: function buildTemplateFunction(nodes, variables) {\n      var _this182 = this;\n\n      var ngContentSelectorsOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n      var i18n = arguments.length > 3 ? arguments[3] : undefined;\n      this._ngContentSelectorsOffset = ngContentSelectorsOffset;\n\n      if (this._namespace !== Identifiers.namespaceHTML) {\n        this.creationInstruction(null, this._namespace);\n      } // Create variable bindings\n\n\n      variables.forEach(function (v) {\n        return _this182.registerContextVariables(v);\n      }); // Initiate i18n context in case:\n      // - this template has parent i18n context\n      // - or the template has i18n meta associated with it,\n      //   but it's not initiated by the Element (e.g. <ng-template i18n>)\n\n      var initI18nContext = this.i18nContext || isI18nRootNode(i18n) && !isSingleI18nIcu(i18n) && !(isSingleElementTemplate(nodes) && nodes[0].i18n === i18n);\n      var selfClosingI18nInstruction = hasTextChildrenOnly(nodes);\n\n      if (initI18nContext) {\n        this.i18nStart(null, i18n, selfClosingI18nInstruction);\n      } // This is the initial pass through the nodes of this template. In this pass, we\n      // queue all creation mode and update mode instructions for generation in the second\n      // pass. It's necessary to separate the passes to ensure local refs are defined before\n      // resolving bindings. We also count bindings in this pass as we walk bound expressions.\n\n\n      visitAll(this, nodes); // Add total binding count to pure function count so pure function instructions are\n      // generated with the correct slot offset when update instructions are processed.\n\n      this._pureFunctionSlots += this._bindingSlots; // Pipes are walked in the first pass (to enqueue `pipe()` creation instructions and\n      // `pipeBind` update instructions), so we have to update the slot offsets manually\n      // to account for bindings.\n\n      this._valueConverter.updatePipeSlotOffsets(this._bindingSlots); // Nested templates must be processed before creation instructions so template()\n      // instructions can be generated with the correct internal const count.\n\n\n      this._nestedTemplateFns.forEach(function (buildTemplateFn) {\n        return buildTemplateFn();\n      }); // Output the `projectionDef` instruction when some `<ng-content>` tags are present.\n      // The `projectionDef` instruction is only emitted for the component template and\n      // is skipped for nested templates (<ng-template> tags).\n\n\n      if (this.level === 0 && this._ngContentReservedSlots.length) {\n        var parameters = []; // By default the `projectionDef` instructions creates one slot for the wildcard\n        // selector if no parameters are passed. Therefore we only want to allocate a new\n        // array for the projection slots if the default projection slot is not sufficient.\n\n        if (this._ngContentReservedSlots.length > 1 || this._ngContentReservedSlots[0] !== '*') {\n          var r3ReservedSlots = this._ngContentReservedSlots.map(function (s) {\n            return s !== '*' ? parseSelectorToR3Selector(s) : s;\n          });\n\n          parameters.push(this.constantPool.getConstLiteral(asLiteral(r3ReservedSlots), true));\n        } // Since we accumulate ngContent selectors while processing template elements,\n        // we *prepend* `projectionDef` to creation instructions block, to put it before\n        // any `projection` instructions\n\n\n        this.creationInstruction(null, Identifiers.projectionDef, parameters,\n        /* prepend */\n        true);\n      }\n\n      if (initI18nContext) {\n        this.i18nEnd(null, selfClosingI18nInstruction);\n      } // Generate all the creation mode instructions (e.g. resolve bindings in listeners)\n\n\n      var creationStatements = this._creationCodeFns.map(function (fn) {\n        return fn();\n      }); // Generate all the update mode instructions (e.g. resolve property or text bindings)\n\n\n      var updateStatements = this._updateCodeFns.map(function (fn) {\n        return fn();\n      }); //  Variable declaration must occur after binding resolution so we can generate context\n      //  instructions that build on each other.\n      // e.g. const b = nextContext().$implicit(); const b = nextContext();\n\n\n      var creationVariables = this._bindingScope.viewSnapshotStatements();\n\n      var updateVariables = this._bindingScope.variableDeclarations().concat(this._tempVariables);\n\n      var creationBlock = creationStatements.length > 0 ? [renderFlagCheckIfStmt(1\n      /* Create */\n      , creationVariables.concat(creationStatements))] : [];\n      var updateBlock = updateStatements.length > 0 ? [renderFlagCheckIfStmt(2\n      /* Update */\n      , updateVariables.concat(updateStatements))] : [];\n      return fn( // i.e. (rf: RenderFlags, ctx: any)\n      [new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [].concat(_toConsumableArray(this._prefixCode), creationBlock, updateBlock), INFERRED_TYPE, null, this.templateName);\n    } // LocalResolver\n\n  }, {\n    key: \"getLocal\",\n    value: function getLocal(name) {\n      return this._bindingScope.get(name);\n    } // LocalResolver\n\n  }, {\n    key: \"notifyImplicitReceiverUse\",\n    value: function notifyImplicitReceiverUse() {\n      this._bindingScope.notifyImplicitReceiverUse();\n    } // LocalResolver\n\n  }, {\n    key: \"maybeRestoreView\",\n    value: function maybeRestoreView() {\n      this._bindingScope.maybeRestoreView();\n    }\n  }, {\n    key: \"i18nTranslate\",\n    value: function i18nTranslate(message) {\n      var _this$_constants$prep;\n\n      var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var ref = arguments.length > 2 ? arguments[2] : undefined;\n      var transformFn = arguments.length > 3 ? arguments[3] : undefined;\n\n      var _ref = ref || this.i18nGenerateMainBlockVar(); // Closure Compiler requires const names to start with `MSG_` but disallows any other const to\n      // start with `MSG_`. We define a variable starting with `MSG_` just for the `goog.getMsg` call\n\n\n      var closureVar = this.i18nGenerateClosureVar(message.id);\n      var statements = getTranslationDeclStmts(message, _ref, closureVar, params, transformFn);\n\n      (_this$_constants$prep = this._constants.prepareStatements).push.apply(_this$_constants$prep, _toConsumableArray(statements));\n\n      return _ref;\n    }\n  }, {\n    key: \"registerContextVariables\",\n    value: function registerContextVariables(variable$1) {\n      var scopedName = this._bindingScope.freshReferenceName();\n\n      var retrievalLevel = this.level;\n      var lhs = variable(variable$1.name + scopedName);\n\n      this._bindingScope.set(retrievalLevel, variable$1.name, lhs, 1\n      /* CONTEXT */\n      , function (scope, relativeLevel) {\n        var rhs;\n\n        if (scope.bindingLevel === retrievalLevel) {\n          if (scope.isListenerScope() && scope.hasRestoreViewVariable()) {\n            // e.g. restoredCtx.\n            // We have to get the context from a view reference, if one is available, because\n            // the context that was passed in during creation may not be correct anymore.\n            // For more information see: https://github.com/angular/angular/pull/40360.\n            rhs = variable(RESTORED_VIEW_CONTEXT_NAME);\n            scope.notifyRestoredViewContextUse();\n          } else {\n            // e.g. ctx\n            rhs = variable(CONTEXT_NAME);\n          }\n        } else {\n          var sharedCtxVar = scope.getSharedContextName(retrievalLevel); // e.g. ctx_r0   OR  x(2);\n\n          rhs = sharedCtxVar ? sharedCtxVar : generateNextContextExpr(relativeLevel);\n        } // e.g. const $item$ = x(2).$implicit;\n\n\n        return [lhs.set(rhs.prop(variable$1.value || IMPLICIT_REFERENCE)).toConstDecl()];\n      });\n    }\n  }, {\n    key: \"i18nAppendBindings\",\n    value: function i18nAppendBindings(expressions) {\n      var _this183 = this;\n\n      if (expressions.length > 0) {\n        expressions.forEach(function (expression) {\n          return _this183.i18n.appendBinding(expression);\n        });\n      }\n    }\n  }, {\n    key: \"i18nBindProps\",\n    value: function i18nBindProps(props) {\n      var _this184 = this;\n\n      var bound = {};\n      Object.keys(props).forEach(function (key) {\n        var prop = props[key];\n\n        if (prop instanceof Text) {\n          bound[key] = literal(prop.value);\n        } else {\n          var value = prop.value.visit(_this184._valueConverter);\n\n          _this184.allocateBindingSlots(value);\n\n          if (value instanceof Interpolation) {\n            var strings = value.strings,\n                expressions = value.expressions;\n            var _this184$i18n = _this184.i18n,\n                id = _this184$i18n.id,\n                bindings = _this184$i18n.bindings;\n            var label = assembleI18nBoundString(strings, bindings.size, id);\n\n            _this184.i18nAppendBindings(expressions);\n\n            bound[key] = literal(label);\n          }\n        }\n      });\n      return bound;\n    } // Generates top level vars for i18n blocks (i.e. `i18n_N`).\n\n  }, {\n    key: \"i18nGenerateMainBlockVar\",\n    value: function i18nGenerateMainBlockVar() {\n      return variable(this.constantPool.uniqueName(TRANSLATION_VAR_PREFIX));\n    } // Generates vars with Closure-specific names for i18n blocks (i.e. `MSG_XXX`).\n\n  }, {\n    key: \"i18nGenerateClosureVar\",\n    value: function i18nGenerateClosureVar(messageId) {\n      var name;\n      var suffix = this.fileBasedI18nSuffix.toUpperCase();\n\n      if (this.i18nUseExternalIds) {\n        var prefix = getTranslationConstPrefix(\"EXTERNAL_\");\n        var uniqueSuffix = this.constantPool.uniqueName(suffix);\n        name = \"\".concat(prefix).concat(sanitizeIdentifier(messageId), \"$$\").concat(uniqueSuffix);\n      } else {\n        var _prefix = getTranslationConstPrefix(suffix);\n\n        name = this.constantPool.uniqueName(_prefix);\n      }\n\n      return variable(name);\n    }\n  }, {\n    key: \"i18nUpdateRef\",\n    value: function i18nUpdateRef(context) {\n      var icus = context.icus,\n          meta = context.meta,\n          isRoot = context.isRoot,\n          isResolved = context.isResolved,\n          isEmitted = context.isEmitted;\n\n      if (isRoot && isResolved && !isEmitted && !isSingleI18nIcu(meta)) {\n        context.isEmitted = true;\n        var placeholders = context.getSerializedPlaceholders();\n        var icuMapping = {};\n        var params = placeholders.size ? placeholdersToParams(placeholders) : {};\n\n        if (icus.size) {\n          icus.forEach(function (refs, key) {\n            if (refs.length === 1) {\n              // if we have one ICU defined for a given\n              // placeholder - just output its reference\n              params[key] = refs[0];\n            } else {\n              // ... otherwise we need to activate post-processing\n              // to replace ICU placeholders with proper values\n              var placeholder = wrapI18nPlaceholder(\"\".concat(I18N_ICU_MAPPING_PREFIX).concat(key));\n              params[key] = literal(placeholder);\n              icuMapping[key] = literalArr(refs);\n            }\n          });\n        } // translation requires post processing in 2 cases:\n        // - if we have placeholders with multiple values (ex. `START_DIV`: [�#1�, �#2�, ...])\n        // - if we have multiple ICUs that refer to the same placeholder name\n\n\n        var needsPostprocessing = Array.from(placeholders.values()).some(function (value) {\n          return value.length > 1;\n        }) || Object.keys(icuMapping).length;\n        var transformFn;\n\n        if (needsPostprocessing) {\n          transformFn = function transformFn(raw) {\n            var args = [raw];\n\n            if (Object.keys(icuMapping).length) {\n              args.push(mapLiteral(icuMapping, true));\n            }\n\n            return instruction(null, Identifiers.i18nPostprocess, args);\n          };\n        }\n\n        this.i18nTranslate(meta, params, context.ref, transformFn);\n      }\n    }\n  }, {\n    key: \"i18nStart\",\n    value: function i18nStart() {\n      var span = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var meta = arguments.length > 1 ? arguments[1] : undefined;\n      var selfClosing = arguments.length > 2 ? arguments[2] : undefined;\n      var index = this.allocateDataSlot();\n      this.i18n = this.i18nContext ? this.i18nContext.forkChildContext(index, this.templateIndex, meta) : new I18nContext(index, this.i18nGenerateMainBlockVar(), 0, this.templateIndex, meta); // generate i18nStart instruction\n\n      var _this$i18n = this.i18n,\n          id = _this$i18n.id,\n          ref = _this$i18n.ref;\n      var params = [literal(index), this.addToConsts(ref)];\n\n      if (id > 0) {\n        // do not push 3rd argument (sub-block id)\n        // into i18nStart call for top level i18n context\n        params.push(literal(id));\n      }\n\n      this.creationInstruction(span, selfClosing ? Identifiers.i18n : Identifiers.i18nStart, params);\n    }\n  }, {\n    key: \"i18nEnd\",\n    value: function i18nEnd() {\n      var _this185 = this;\n\n      var span = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var selfClosing = arguments.length > 1 ? arguments[1] : undefined;\n\n      if (!this.i18n) {\n        throw new Error('i18nEnd is executed with no i18n context present');\n      }\n\n      if (this.i18nContext) {\n        this.i18nContext.reconcileChildContext(this.i18n);\n        this.i18nUpdateRef(this.i18nContext);\n      } else {\n        this.i18nUpdateRef(this.i18n);\n      } // setup accumulated bindings\n\n\n      var _this$i18n2 = this.i18n,\n          index = _this$i18n2.index,\n          bindings = _this$i18n2.bindings;\n\n      if (bindings.size) {\n        var chainBindings = [];\n        bindings.forEach(function (binding) {\n          chainBindings.push({\n            sourceSpan: span,\n            value: function value() {\n              return _this185.convertPropertyBinding(binding);\n            }\n          });\n        }); // for i18n block, advance to the most recent element index (by taking the current number of\n        // elements and subtracting one) before invoking `i18nExp` instructions, to make sure the\n        // necessary lifecycle hooks of components/directives are properly flushed.\n\n        this.updateInstructionChainWithAdvance(this.getConstCount() - 1, Identifiers.i18nExp, chainBindings);\n        this.updateInstruction(span, Identifiers.i18nApply, [literal(index)]);\n      }\n\n      if (!selfClosing) {\n        this.creationInstruction(span, Identifiers.i18nEnd);\n      }\n\n      this.i18n = null; // reset local i18n context\n    }\n  }, {\n    key: \"i18nAttributesInstruction\",\n    value: function i18nAttributesInstruction(nodeIndex, attrs, sourceSpan) {\n      var _this186 = this;\n\n      var hasBindings = false;\n      var i18nAttrArgs = [];\n      var bindings = [];\n      attrs.forEach(function (attr) {\n        var message = attr.i18n;\n        var converted = attr.value.visit(_this186._valueConverter);\n\n        _this186.allocateBindingSlots(converted);\n\n        if (converted instanceof Interpolation) {\n          var placeholders = assembleBoundTextPlaceholders(message);\n          var params = placeholdersToParams(placeholders);\n          i18nAttrArgs.push(literal(attr.name), _this186.i18nTranslate(message, params));\n          converted.expressions.forEach(function (expression) {\n            hasBindings = true;\n            bindings.push({\n              sourceSpan: sourceSpan,\n              value: function value() {\n                return _this186.convertPropertyBinding(expression);\n              }\n            });\n          });\n        }\n      });\n\n      if (bindings.length > 0) {\n        this.updateInstructionChainWithAdvance(nodeIndex, Identifiers.i18nExp, bindings);\n      }\n\n      if (i18nAttrArgs.length > 0) {\n        var index = literal(this.allocateDataSlot());\n        var constIndex = this.addToConsts(literalArr(i18nAttrArgs));\n        this.creationInstruction(sourceSpan, Identifiers.i18nAttributes, [index, constIndex]);\n\n        if (hasBindings) {\n          this.updateInstruction(sourceSpan, Identifiers.i18nApply, [index]);\n        }\n      }\n    }\n  }, {\n    key: \"getNamespaceInstruction\",\n    value: function getNamespaceInstruction(namespaceKey) {\n      switch (namespaceKey) {\n        case 'math':\n          return Identifiers.namespaceMathML;\n\n        case 'svg':\n          return Identifiers.namespaceSVG;\n\n        default:\n          return Identifiers.namespaceHTML;\n      }\n    }\n  }, {\n    key: \"addNamespaceInstruction\",\n    value: function addNamespaceInstruction(nsInstruction, element) {\n      this._namespace = nsInstruction;\n      this.creationInstruction(element.startSourceSpan, nsInstruction);\n    }\n    /**\n     * Adds an update instruction for an interpolated property or attribute, such as\n     * `prop=\"{{value}}\"` or `attr.title=\"{{value}}\"`\n     */\n\n  }, {\n    key: \"interpolatedUpdateInstruction\",\n    value: function interpolatedUpdateInstruction(instruction, elementIndex, attrName, input, value, params) {\n      var _this187 = this;\n\n      this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, instruction, function () {\n        return [literal(attrName)].concat(_toConsumableArray(_this187.getUpdateInstructionArguments(value)), _toConsumableArray(params));\n      });\n    }\n  }, {\n    key: \"visitContent\",\n    value: function visitContent(ngContent) {\n      var slot = this.allocateDataSlot();\n      var projectionSlotIdx = this._ngContentSelectorsOffset + this._ngContentReservedSlots.length;\n      var parameters = [literal(slot)];\n\n      this._ngContentReservedSlots.push(ngContent.selector);\n\n      var nonContentSelectAttributes = ngContent.attributes.filter(function (attr) {\n        return attr.name.toLowerCase() !== NG_CONTENT_SELECT_ATTR$1;\n      });\n      var attributes = this.getAttributeExpressions(ngContent.name, nonContentSelectAttributes, [], []);\n\n      if (attributes.length > 0) {\n        parameters.push(literal(projectionSlotIdx), literalArr(attributes));\n      } else if (projectionSlotIdx !== 0) {\n        parameters.push(literal(projectionSlotIdx));\n      }\n\n      this.creationInstruction(ngContent.sourceSpan, Identifiers.projection, parameters);\n\n      if (this.i18n) {\n        this.i18n.appendProjection(ngContent.i18n, slot);\n      }\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(element) {\n      var _this188 = this;\n\n      var _a, _b;\n\n      var elementIndex = this.allocateDataSlot();\n      var stylingBuilder = new StylingBuilder(null);\n      var isNonBindableMode = false;\n      var isI18nRootElement = isI18nRootNode(element.i18n) && !isSingleI18nIcu(element.i18n);\n      var outputAttrs = [];\n\n      var _splitNsName = splitNsName(element.name),\n          _splitNsName2 = _slicedToArray(_splitNsName, 2),\n          namespaceKey = _splitNsName2[0],\n          elementName = _splitNsName2[1];\n\n      var isNgContainer$1 = isNgContainer(element.name); // Handle styling, i18n, ngNonBindable attributes\n\n      var _iterator18 = _createForOfIteratorHelper(element.attributes),\n          _step18;\n\n      try {\n        for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {\n          var attr = _step18.value;\n          var name = attr.name,\n              value = attr.value;\n\n          if (name === NON_BINDABLE_ATTR) {\n            isNonBindableMode = true;\n          } else if (name === 'style') {\n            stylingBuilder.registerStyleAttr(value);\n          } else if (name === 'class') {\n            stylingBuilder.registerClassAttr(value);\n          } else {\n            outputAttrs.push(attr);\n          }\n        } // Match directives on non i18n attributes\n\n      } catch (err) {\n        _iterator18.e(err);\n      } finally {\n        _iterator18.f();\n      }\n\n      this.matchDirectives(element.name, element); // Regular element or ng-container creation mode\n\n      var parameters = [literal(elementIndex)];\n\n      if (!isNgContainer$1) {\n        parameters.push(literal(elementName));\n      } // Add the attributes\n\n\n      var allOtherInputs = [];\n      var boundI18nAttrs = [];\n      element.inputs.forEach(function (input) {\n        var stylingInputWasSet = stylingBuilder.registerBoundInput(input);\n\n        if (!stylingInputWasSet) {\n          if (input.type === 0\n          /* Property */\n          && input.i18n) {\n            boundI18nAttrs.push(input);\n          } else {\n            allOtherInputs.push(input);\n          }\n        }\n      }); // add attributes for directive and projection matching purposes\n\n      var attributes = this.getAttributeExpressions(element.name, outputAttrs, allOtherInputs, element.outputs, stylingBuilder, [], boundI18nAttrs);\n      parameters.push(this.addAttrsToConsts(attributes)); // local refs (ex.: <div #foo #bar=\"baz\">)\n\n      var refs = this.prepareRefsArray(element.references);\n      parameters.push(this.addToConsts(refs));\n      var wasInNamespace = this._namespace;\n      var currentNamespace = this.getNamespaceInstruction(namespaceKey); // If the namespace is changing now, include an instruction to change it\n      // during element creation.\n\n      if (currentNamespace !== wasInNamespace) {\n        this.addNamespaceInstruction(currentNamespace, element);\n      }\n\n      if (this.i18n) {\n        this.i18n.appendElement(element.i18n, elementIndex);\n      } // Note that we do not append text node instructions and ICUs inside i18n section,\n      // so we exclude them while calculating whether current element has children\n\n\n      var hasChildren = !isI18nRootElement && this.i18n ? !hasTextChildrenOnly(element.children) : element.children.length > 0;\n      var createSelfClosingInstruction = !stylingBuilder.hasBindingsWithPipes && element.outputs.length === 0 && boundI18nAttrs.length === 0 && !hasChildren;\n      var createSelfClosingI18nInstruction = !createSelfClosingInstruction && hasTextChildrenOnly(element.children);\n\n      if (createSelfClosingInstruction) {\n        this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers.elementContainer : Identifiers.element, trimTrailingNulls(parameters));\n      } else {\n        this.creationInstruction(element.startSourceSpan, isNgContainer$1 ? Identifiers.elementContainerStart : Identifiers.elementStart, trimTrailingNulls(parameters));\n\n        if (isNonBindableMode) {\n          this.creationInstruction(element.startSourceSpan, Identifiers.disableBindings);\n        }\n\n        if (boundI18nAttrs.length > 0) {\n          this.i18nAttributesInstruction(elementIndex, boundI18nAttrs, (_a = element.startSourceSpan) !== null && _a !== void 0 ? _a : element.sourceSpan);\n        } // Generate Listeners (outputs)\n\n\n        if (element.outputs.length > 0) {\n          var listeners = element.outputs.map(function (outputAst) {\n            return {\n              sourceSpan: outputAst.sourceSpan,\n              params: _this188.prepareListenerParameter(element.name, outputAst, elementIndex)\n            };\n          });\n          this.creationInstructionChain(Identifiers.listener, listeners);\n        } // Note: it's important to keep i18n/i18nStart instructions after i18nAttributes and\n        // listeners, to make sure i18nAttributes instruction targets current element at runtime.\n\n\n        if (isI18nRootElement) {\n          this.i18nStart(element.startSourceSpan, element.i18n, createSelfClosingI18nInstruction);\n        }\n      } // the code here will collect all update-level styling instructions and add them to the\n      // update block of the template function AOT code. Instructions like `styleProp`,\n      // `styleMap`, `classMap`, `classProp`\n      // are all generated and assigned in the code below.\n\n\n      var stylingInstructions = stylingBuilder.buildUpdateLevelInstructions(this._valueConverter);\n      var limit = stylingInstructions.length - 1;\n\n      for (var i = 0; i <= limit; i++) {\n        var _instruction = stylingInstructions[i];\n        this._bindingSlots += this.processStylingUpdateInstruction(elementIndex, _instruction);\n      } // the reason why `undefined` is used is because the renderer understands this as a\n      // special value to symbolize that there is no RHS to this binding\n      // TODO (matsko): revisit this once FW-959 is approached\n\n\n      var emptyValueBindInstruction = literal(undefined);\n      var propertyBindings = [];\n      var attributeBindings = []; // Generate element input bindings\n\n      allOtherInputs.forEach(function (input) {\n        var inputType = input.type;\n\n        if (inputType === 4\n        /* Animation */\n        ) {\n          var _value2 = input.value.visit(_this188._valueConverter); // animation bindings can be presented in the following formats:\n          // 1. [@binding]=\"fooExp\"\n          // 2. [@binding]=\"{value:fooExp, params:{...}}\"\n          // 3. [@binding]\n          // 4. @binding\n          // All formats will be valid for when a synthetic binding is created.\n          // The reasoning for this is because the renderer should get each\n          // synthetic binding value in the order of the array that they are\n          // defined in...\n\n\n          var hasValue = _value2 instanceof LiteralPrimitive ? !!_value2.value : true;\n\n          _this188.allocateBindingSlots(_value2);\n\n          propertyBindings.push({\n            name: prepareSyntheticPropertyName(input.name),\n            sourceSpan: input.sourceSpan,\n            value: function value() {\n              return hasValue ? _this188.convertPropertyBinding(_value2) : emptyValueBindInstruction;\n            }\n          });\n        } else {\n          // we must skip attributes with associated i18n context, since these attributes are handled\n          // separately and corresponding `i18nExp` and `i18nApply` instructions will be generated\n          if (input.i18n) return;\n\n          var _value3 = input.value.visit(_this188._valueConverter);\n\n          if (_value3 !== undefined) {\n            var params = [];\n\n            var _splitNsName3 = splitNsName(input.name),\n                _splitNsName4 = _slicedToArray(_splitNsName3, 2),\n                attrNamespace = _splitNsName4[0],\n                attrName = _splitNsName4[1];\n\n            var isAttributeBinding = inputType === 1\n            /* Attribute */\n            ;\n            var sanitizationRef = resolveSanitizationFn(input.securityContext, isAttributeBinding);\n            if (sanitizationRef) params.push(sanitizationRef);\n\n            if (attrNamespace) {\n              var namespaceLiteral = literal(attrNamespace);\n\n              if (sanitizationRef) {\n                params.push(namespaceLiteral);\n              } else {\n                // If there wasn't a sanitization ref, we need to add\n                // an extra param so that we can pass in the namespace.\n                params.push(literal(null), namespaceLiteral);\n              }\n            }\n\n            _this188.allocateBindingSlots(_value3);\n\n            if (inputType === 0\n            /* Property */\n            ) {\n              if (_value3 instanceof Interpolation) {\n                // prop=\"{{value}}\" and friends\n                _this188.interpolatedUpdateInstruction(getPropertyInterpolationExpression(_value3), elementIndex, attrName, input, _value3, params);\n              } else {\n                // [prop]=\"value\"\n                // Collect all the properties so that we can chain into a single function at the end.\n                propertyBindings.push({\n                  name: attrName,\n                  sourceSpan: input.sourceSpan,\n                  value: function value() {\n                    return _this188.convertPropertyBinding(_value3);\n                  },\n                  params: params\n                });\n              }\n            } else if (inputType === 1\n            /* Attribute */\n            ) {\n              if (_value3 instanceof Interpolation && getInterpolationArgsLength(_value3) > 1) {\n                // attr.name=\"text{{value}}\" and friends\n                _this188.interpolatedUpdateInstruction(getAttributeInterpolationExpression(_value3), elementIndex, attrName, input, _value3, params);\n              } else {\n                var boundValue = _value3 instanceof Interpolation ? _value3.expressions[0] : _value3; // [attr.name]=\"value\" or attr.name=\"{{value}}\"\n                // Collect the attribute bindings so that they can be chained at the end.\n\n                attributeBindings.push({\n                  name: attrName,\n                  sourceSpan: input.sourceSpan,\n                  value: function value() {\n                    return _this188.convertPropertyBinding(boundValue);\n                  },\n                  params: params\n                });\n              }\n            } else {\n              // class prop\n              _this188.updateInstructionWithAdvance(elementIndex, input.sourceSpan, Identifiers.classProp, function () {\n                return [literal(elementIndex), literal(attrName), _this188.convertPropertyBinding(_value3)].concat(params);\n              });\n            }\n          }\n        }\n      });\n\n      if (propertyBindings.length > 0) {\n        this.updateInstructionChainWithAdvance(elementIndex, Identifiers.property, propertyBindings);\n      }\n\n      if (attributeBindings.length > 0) {\n        this.updateInstructionChainWithAdvance(elementIndex, Identifiers.attribute, attributeBindings);\n      } // Traverse element child nodes\n\n\n      visitAll(this, element.children);\n\n      if (!isI18nRootElement && this.i18n) {\n        this.i18n.appendElement(element.i18n, elementIndex, true);\n      }\n\n      if (!createSelfClosingInstruction) {\n        // Finish element construction mode.\n        var span = (_b = element.endSourceSpan) !== null && _b !== void 0 ? _b : element.sourceSpan;\n\n        if (isI18nRootElement) {\n          this.i18nEnd(span, createSelfClosingI18nInstruction);\n        }\n\n        if (isNonBindableMode) {\n          this.creationInstruction(span, Identifiers.enableBindings);\n        }\n\n        this.creationInstruction(span, isNgContainer$1 ? Identifiers.elementContainerEnd : Identifiers.elementEnd);\n      }\n    }\n  }, {\n    key: \"visitTemplate\",\n    value: function visitTemplate(template) {\n      var _this189 = this;\n\n      var _a;\n\n      var NG_TEMPLATE_TAG_NAME = 'ng-template';\n      var templateIndex = this.allocateDataSlot();\n\n      if (this.i18n) {\n        this.i18n.appendTemplate(template.i18n, templateIndex);\n      }\n\n      var tagNameWithoutNamespace = template.tagName ? splitNsName(template.tagName)[1] : template.tagName;\n      var contextName = \"\".concat(this.contextName).concat(template.tagName ? '_' + sanitizeIdentifier(template.tagName) : '', \"_\").concat(templateIndex);\n      var templateName = \"\".concat(contextName, \"_Template\");\n      var parameters = [literal(templateIndex), variable(templateName), // We don't care about the tag's namespace here, because we infer\n      // it based on the parent nodes inside the template instruction.\n      literal(tagNameWithoutNamespace)]; // find directives matching on a given <ng-template> node\n\n      this.matchDirectives(NG_TEMPLATE_TAG_NAME, template); // prepare attributes parameter (including attributes used for directive matching)\n\n      var attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME, template.attributes, template.inputs, template.outputs, undefined\n      /* styles */\n      , template.templateAttrs);\n      parameters.push(this.addAttrsToConsts(attrsExprs)); // local refs (ex.: <ng-template #foo>)\n\n      if (template.references && template.references.length) {\n        var refs = this.prepareRefsArray(template.references);\n        parameters.push(this.addToConsts(refs));\n        parameters.push(importExpr(Identifiers.templateRefExtractor));\n      } // Create the template function\n\n\n      var templateVisitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, templateIndex, templateName, this.directiveMatcher, this.directives, this.pipeTypeByName, this.pipes, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this._constants); // Nested templates must not be visited until after their parent templates have completed\n      // processing, so they are queued here until after the initial pass. Otherwise, we wouldn't\n      // be able to support bindings in nested templates to local refs that occur after the\n      // template definition. e.g. <div *ngIf=\"showing\">{{ foo }}</div>  <div #foo></div>\n\n      this._nestedTemplateFns.push(function () {\n        var templateFunctionExpr = templateVisitor.buildTemplateFunction(template.children, template.variables, _this189._ngContentReservedSlots.length + _this189._ngContentSelectorsOffset, template.i18n);\n\n        _this189.constantPool.statements.push(templateFunctionExpr.toDeclStmt(templateName));\n\n        if (templateVisitor._ngContentReservedSlots.length) {\n          var _this189$_ngContentRe;\n\n          (_this189$_ngContentRe = _this189._ngContentReservedSlots).push.apply(_this189$_ngContentRe, _toConsumableArray(templateVisitor._ngContentReservedSlots));\n        }\n      }); // e.g. template(1, MyComp_Template_1)\n\n\n      this.creationInstruction(template.sourceSpan, Identifiers.templateCreate, function () {\n        parameters.splice(2, 0, literal(templateVisitor.getConstCount()), literal(templateVisitor.getVarCount()));\n        return trimTrailingNulls(parameters);\n      }); // handle property bindings e.g. ɵɵproperty('ngForOf', ctx.items), et al;\n\n      this.templatePropertyBindings(templateIndex, template.templateAttrs); // Only add normal input/output binding instructions on explicit <ng-template> elements.\n\n      if (tagNameWithoutNamespace === NG_TEMPLATE_TAG_NAME) {\n        var _partitionArray = partitionArray(template.inputs, hasI18nMeta),\n            _partitionArray2 = _slicedToArray(_partitionArray, 2),\n            i18nInputs = _partitionArray2[0],\n            inputs = _partitionArray2[1]; // Add i18n attributes that may act as inputs to directives. If such attributes are present,\n        // generate `i18nAttributes` instruction. Note: we generate it only for explicit <ng-template>\n        // elements, in case of inline templates, corresponding instructions will be generated in the\n        // nested template function.\n\n\n        if (i18nInputs.length > 0) {\n          this.i18nAttributesInstruction(templateIndex, i18nInputs, (_a = template.startSourceSpan) !== null && _a !== void 0 ? _a : template.sourceSpan);\n        } // Add the input bindings\n\n\n        if (inputs.length > 0) {\n          this.templatePropertyBindings(templateIndex, inputs);\n        } // Generate listeners for directive output\n\n\n        if (template.outputs.length > 0) {\n          var listeners = template.outputs.map(function (outputAst) {\n            return {\n              sourceSpan: outputAst.sourceSpan,\n              params: _this189.prepareListenerParameter('ng_template', outputAst, templateIndex)\n            };\n          });\n          this.creationInstructionChain(Identifiers.listener, listeners);\n        }\n      }\n    }\n  }, {\n    key: \"visitBoundText\",\n    value: function visitBoundText(text) {\n      var _this190 = this;\n\n      if (this.i18n) {\n        var _value4 = text.value.visit(this._valueConverter);\n\n        this.allocateBindingSlots(_value4);\n\n        if (_value4 instanceof Interpolation) {\n          this.i18n.appendBoundText(text.i18n);\n          this.i18nAppendBindings(_value4.expressions);\n        }\n\n        return;\n      }\n\n      var nodeIndex = this.allocateDataSlot();\n      this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(nodeIndex)]);\n      var value = text.value.visit(this._valueConverter);\n      this.allocateBindingSlots(value);\n\n      if (value instanceof Interpolation) {\n        this.updateInstructionWithAdvance(nodeIndex, text.sourceSpan, getTextInterpolationExpression(value), function () {\n          return _this190.getUpdateInstructionArguments(value);\n        });\n      } else {\n        error('Text nodes should be interpolated and never bound directly.');\n      }\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {\n      // when a text element is located within a translatable\n      // block, we exclude this text element from instructions set,\n      // since it will be captured in i18n content and processed at runtime\n      if (!this.i18n) {\n        this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(this.allocateDataSlot()), literal(text.value)]);\n      }\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu) {\n      var initWasInvoked = false; // if an ICU was created outside of i18n block, we still treat\n      // it as a translatable entity and invoke i18nStart and i18nEnd\n      // to generate i18n context and the necessary instructions\n\n      if (!this.i18n) {\n        initWasInvoked = true;\n        this.i18nStart(null, icu.i18n, true);\n      }\n\n      var i18n = this.i18n;\n      var vars = this.i18nBindProps(icu.vars);\n      var placeholders = this.i18nBindProps(icu.placeholders); // output ICU directly and keep ICU reference in context\n\n      var message = icu.i18n; // we always need post-processing function for ICUs, to make sure that:\n      // - all placeholders in a form of {PLACEHOLDER} are replaced with actual values (note:\n      // `goog.getMsg` does not process ICUs and uses the `{PLACEHOLDER}` format for placeholders\n      // inside ICUs)\n      // - all ICU vars (such as `VAR_SELECT` or `VAR_PLURAL`) are replaced with correct values\n\n      var transformFn = function transformFn(raw) {\n        var params = Object.assign(Object.assign({}, vars), placeholders);\n        var formatted = i18nFormatPlaceholderNames(params,\n        /* useCamelCase */\n        false);\n        return instruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);\n      }; // in case the whole i18n message is a single ICU - we do not need to\n      // create a separate top-level translation, we can use the root ref instead\n      // and make this ICU a top-level translation\n      // note: ICU placeholders are replaced with actual values in `i18nPostprocess` function\n      // separately, so we do not pass placeholders into `i18nTranslate` function.\n\n\n      if (isSingleI18nIcu(i18n.meta)) {\n        this.i18nTranslate(message,\n        /* placeholders */\n        {}, i18n.ref, transformFn);\n      } else {\n        // output ICU directly and keep ICU reference in context\n        var ref = this.i18nTranslate(message,\n        /* placeholders */\n        {},\n        /* ref */\n        undefined, transformFn);\n        i18n.appendIcu(icuFromI18nMessage(message).name, ref);\n      }\n\n      if (initWasInvoked) {\n        this.i18nEnd(null, true);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"allocateDataSlot\",\n    value: function allocateDataSlot() {\n      return this._dataIndex++;\n    }\n  }, {\n    key: \"getConstCount\",\n    value: function getConstCount() {\n      return this._dataIndex;\n    }\n  }, {\n    key: \"getVarCount\",\n    value: function getVarCount() {\n      return this._pureFunctionSlots;\n    }\n  }, {\n    key: \"getConsts\",\n    value: function getConsts() {\n      return this._constants;\n    }\n  }, {\n    key: \"getNgContentSelectors\",\n    value: function getNgContentSelectors() {\n      return this._ngContentReservedSlots.length ? this.constantPool.getConstLiteral(asLiteral(this._ngContentReservedSlots), true) : null;\n    }\n  }, {\n    key: \"bindingContext\",\n    value: function bindingContext() {\n      return \"\".concat(this._bindingContext++);\n    }\n  }, {\n    key: \"templatePropertyBindings\",\n    value: function templatePropertyBindings(templateIndex, attrs) {\n      var _this191 = this;\n\n      var propertyBindings = [];\n      attrs.forEach(function (input) {\n        if (input instanceof BoundAttribute) {\n          var _value5 = input.value.visit(_this191._valueConverter);\n\n          if (_value5 !== undefined) {\n            _this191.allocateBindingSlots(_value5);\n\n            if (_value5 instanceof Interpolation) {\n              // Params typically contain attribute namespace and value sanitizer, which is applicable\n              // for regular HTML elements, but not applicable for <ng-template> (since props act as\n              // inputs to directives), so keep params array empty.\n              var params = []; // prop=\"{{value}}\" case\n\n              _this191.interpolatedUpdateInstruction(getPropertyInterpolationExpression(_value5), templateIndex, input.name, input, _value5, params);\n            } else {\n              // [prop]=\"value\" case\n              propertyBindings.push({\n                name: input.name,\n                sourceSpan: input.sourceSpan,\n                value: function value() {\n                  return _this191.convertPropertyBinding(_value5);\n                }\n              });\n            }\n          }\n        }\n      });\n\n      if (propertyBindings.length > 0) {\n        this.updateInstructionChainWithAdvance(templateIndex, Identifiers.property, propertyBindings);\n      }\n    } // Bindings must only be resolved after all local refs have been visited, so all\n    // instructions are queued in callbacks that execute once the initial pass has completed.\n    // Otherwise, we wouldn't be able to support local refs that are defined after their\n    // bindings. e.g. {{ foo }} <div #foo></div>\n\n  }, {\n    key: \"instructionFn\",\n    value: function instructionFn(fns, span, reference, paramsOrFn) {\n      var prepend = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n      fns[prepend ? 'unshift' : 'push'](function () {\n        var params = Array.isArray(paramsOrFn) ? paramsOrFn : paramsOrFn();\n        return instruction(span, reference, params).toStmt();\n      });\n    }\n  }, {\n    key: \"processStylingUpdateInstruction\",\n    value: function processStylingUpdateInstruction(elementIndex, instruction) {\n      var _this192 = this;\n\n      var allocateBindingSlots = 0;\n\n      if (instruction) {\n        var calls = [];\n        instruction.calls.forEach(function (call) {\n          allocateBindingSlots += call.allocateBindingSlots;\n          calls.push({\n            sourceSpan: call.sourceSpan,\n            value: function value() {\n              return call.params(function (value) {\n                return call.supportsInterpolation && value instanceof Interpolation ? _this192.getUpdateInstructionArguments(value) : _this192.convertPropertyBinding(value);\n              });\n            }\n          });\n        });\n        this.updateInstructionChainWithAdvance(elementIndex, instruction.reference, calls);\n      }\n\n      return allocateBindingSlots;\n    }\n  }, {\n    key: \"creationInstruction\",\n    value: function creationInstruction(span, reference, paramsOrFn, prepend) {\n      this.instructionFn(this._creationCodeFns, span, reference, paramsOrFn || [], prepend);\n    }\n  }, {\n    key: \"creationInstructionChain\",\n    value: function creationInstructionChain(reference, calls) {\n      var span = calls.length ? calls[0].sourceSpan : null;\n\n      this._creationCodeFns.push(function () {\n        return chainedInstruction(reference, calls.map(function (call) {\n          return call.params();\n        }), span).toStmt();\n      });\n    }\n  }, {\n    key: \"updateInstructionWithAdvance\",\n    value: function updateInstructionWithAdvance(nodeIndex, span, reference, paramsOrFn) {\n      this.addAdvanceInstructionIfNecessary(nodeIndex, span);\n      this.updateInstruction(span, reference, paramsOrFn);\n    }\n  }, {\n    key: \"updateInstruction\",\n    value: function updateInstruction(span, reference, paramsOrFn) {\n      this.instructionFn(this._updateCodeFns, span, reference, paramsOrFn || []);\n    }\n  }, {\n    key: \"updateInstructionChain\",\n    value: function updateInstructionChain(reference, bindings) {\n      var span = bindings.length ? bindings[0].sourceSpan : null;\n\n      this._updateCodeFns.push(function () {\n        var calls = bindings.map(function (property) {\n          var value = property.value();\n          var fnParams = Array.isArray(value) ? value : [value];\n\n          if (property.params) {\n            fnParams.push.apply(fnParams, _toConsumableArray(property.params));\n          }\n\n          if (property.name) {\n            // We want the property name to always be the first function parameter.\n            fnParams.unshift(literal(property.name));\n          }\n\n          return fnParams;\n        });\n        return chainedInstruction(reference, calls, span).toStmt();\n      });\n    }\n  }, {\n    key: \"updateInstructionChainWithAdvance\",\n    value: function updateInstructionChainWithAdvance(nodeIndex, reference, bindings) {\n      this.addAdvanceInstructionIfNecessary(nodeIndex, bindings.length ? bindings[0].sourceSpan : null);\n      this.updateInstructionChain(reference, bindings);\n    }\n  }, {\n    key: \"addAdvanceInstructionIfNecessary\",\n    value: function addAdvanceInstructionIfNecessary(nodeIndex, span) {\n      if (nodeIndex !== this._currentIndex) {\n        var delta = nodeIndex - this._currentIndex;\n\n        if (delta < 1) {\n          throw new Error('advance instruction can only go forwards');\n        }\n\n        this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);\n        this._currentIndex = nodeIndex;\n      }\n    }\n  }, {\n    key: \"allocatePureFunctionSlots\",\n    value: function allocatePureFunctionSlots(numSlots) {\n      var originalSlots = this._pureFunctionSlots;\n      this._pureFunctionSlots += numSlots;\n      return originalSlots;\n    }\n  }, {\n    key: \"allocateBindingSlots\",\n    value: function allocateBindingSlots(value) {\n      this._bindingSlots += value instanceof Interpolation ? value.expressions.length : 1;\n    }\n    /**\n     * Gets an expression that refers to the implicit receiver. The implicit\n     * receiver is always the root level context.\n     */\n\n  }, {\n    key: \"getImplicitReceiverExpr\",\n    value: function getImplicitReceiverExpr() {\n      if (this._implicitReceiverExpr) {\n        return this._implicitReceiverExpr;\n      }\n\n      return this._implicitReceiverExpr = this.level === 0 ? variable(CONTEXT_NAME) : this._bindingScope.getOrCreateSharedContextVar(0);\n    }\n  }, {\n    key: \"convertPropertyBinding\",\n    value: function convertPropertyBinding(value) {\n      var _this$_tempVariables;\n\n      var convertedPropertyBinding = _convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext(), BindingForm.Expression, function () {\n        return error('Unexpected interpolation');\n      });\n\n      var valExpr = convertedPropertyBinding.currValExpr;\n\n      (_this$_tempVariables = this._tempVariables).push.apply(_this$_tempVariables, _toConsumableArray(convertedPropertyBinding.stmts));\n\n      return valExpr;\n    }\n    /**\n     * Gets a list of argument expressions to pass to an update instruction expression. Also updates\n     * the temp variables state with temp variables that were identified as needing to be created\n     * while visiting the arguments.\n     * @param value The original expression we will be resolving an arguments list from.\n     */\n\n  }, {\n    key: \"getUpdateInstructionArguments\",\n    value: function getUpdateInstructionArguments(value) {\n      var _this$_tempVariables2;\n\n      var _convertUpdateArgumen = convertUpdateArguments(this, this.getImplicitReceiverExpr(), value, this.bindingContext()),\n          args = _convertUpdateArgumen.args,\n          stmts = _convertUpdateArgumen.stmts;\n\n      (_this$_tempVariables2 = this._tempVariables).push.apply(_this$_tempVariables2, _toConsumableArray(stmts));\n\n      return args;\n    }\n  }, {\n    key: \"matchDirectives\",\n    value: function matchDirectives(elementName, elOrTpl) {\n      var _this193 = this;\n\n      if (this.directiveMatcher) {\n        var selector = createCssSelector(elementName, getAttrsForDirectiveMatching(elOrTpl));\n        this.directiveMatcher.match(selector, function (cssSelector, staticType) {\n          _this193.directives.add(staticType);\n        });\n      }\n    }\n    /**\n     * Prepares all attribute expression values for the `TAttributes` array.\n     *\n     * The purpose of this function is to properly construct an attributes array that\n     * is passed into the `elementStart` (or just `element`) functions. Because there\n     * are many different types of attributes, the array needs to be constructed in a\n     * special way so that `elementStart` can properly evaluate them.\n     *\n     * The format looks like this:\n     *\n     * ```\n     * attrs = [prop, value, prop2, value2,\n     *   PROJECT_AS, selector,\n     *   CLASSES, class1, class2,\n     *   STYLES, style1, value1, style2, value2,\n     *   BINDINGS, name1, name2, name3,\n     *   TEMPLATE, name4, name5, name6,\n     *   I18N, name7, name8, ...]\n     * ```\n     *\n     * Note that this function will fully ignore all synthetic (@foo) attribute values\n     * because those values are intended to always be generated as property instructions.\n     */\n\n  }, {\n    key: \"getAttributeExpressions\",\n    value: function getAttributeExpressions(elementName, renderAttributes, inputs, outputs, styles) {\n      var templateAttrs = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];\n      var boundI18nAttrs = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [];\n      var alreadySeen = new Set();\n      var attrExprs = [];\n      var ngProjectAsAttr;\n\n      var _iterator19 = _createForOfIteratorHelper(renderAttributes),\n          _step19;\n\n      try {\n        for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {\n          var attr = _step19.value;\n\n          if (attr.name === NG_PROJECT_AS_ATTR_NAME) {\n            ngProjectAsAttr = attr;\n          } // Note that static i18n attributes aren't in the i18n array,\n          // because they're treated in the same way as regular attributes.\n\n\n          if (attr.i18n) {\n            // When i18n attributes are present on elements with structural directives\n            // (e.g. `<div *ngIf title=\"Hello\" i18n-title>`), we want to avoid generating\n            // duplicate i18n translation blocks for `ɵɵtemplate` and `ɵɵelement` instruction\n            // attributes. So we do a cache lookup to see if suitable i18n translation block\n            // already exists.\n            var i18nVarRefsCache = this._constants.i18nVarRefsCache;\n            var i18nVarRef = void 0;\n\n            if (i18nVarRefsCache.has(attr.i18n)) {\n              i18nVarRef = i18nVarRefsCache.get(attr.i18n);\n            } else {\n              i18nVarRef = this.i18nTranslate(attr.i18n);\n              i18nVarRefsCache.set(attr.i18n, i18nVarRef);\n            }\n\n            attrExprs.push(literal(attr.name), i18nVarRef);\n          } else {\n            attrExprs.push.apply(attrExprs, _toConsumableArray(getAttributeNameLiterals(attr.name)).concat([trustedConstAttribute(elementName, attr)]));\n          }\n        } // Keep ngProjectAs next to the other name, value pairs so we can verify that we match\n        // ngProjectAs marker in the attribute name slot.\n\n      } catch (err) {\n        _iterator19.e(err);\n      } finally {\n        _iterator19.f();\n      }\n\n      if (ngProjectAsAttr) {\n        attrExprs.push.apply(attrExprs, _toConsumableArray(getNgProjectAsLiteral(ngProjectAsAttr)));\n      }\n\n      function addAttrExpr(key, value) {\n        if (typeof key === 'string') {\n          if (!alreadySeen.has(key)) {\n            attrExprs.push.apply(attrExprs, _toConsumableArray(getAttributeNameLiterals(key)));\n            value !== undefined && attrExprs.push(value);\n            alreadySeen.add(key);\n          }\n        } else {\n          attrExprs.push(literal(key));\n        }\n      } // it's important that this occurs before BINDINGS and TEMPLATE because once `elementStart`\n      // comes across the BINDINGS or TEMPLATE markers then it will continue reading each value as\n      // as single property value cell by cell.\n\n\n      if (styles) {\n        styles.populateInitialStylingAttrs(attrExprs);\n      }\n\n      if (inputs.length || outputs.length) {\n        var attrsLengthBeforeInputs = attrExprs.length;\n\n        for (var i = 0; i < inputs.length; i++) {\n          var input = inputs[i]; // We don't want the animation and attribute bindings in the\n          // attributes array since they aren't used for directive matching.\n\n          if (input.type !== 4\n          /* Animation */\n          && input.type !== 1\n          /* Attribute */\n          ) {\n            addAttrExpr(input.name);\n          }\n        }\n\n        for (var _i7 = 0; _i7 < outputs.length; _i7++) {\n          var output = outputs[_i7];\n\n          if (output.type !== 1\n          /* Animation */\n          ) {\n            addAttrExpr(output.name);\n          }\n        } // this is a cheap way of adding the marker only after all the input/output\n        // values have been filtered (by not including the animation ones) and added\n        // to the expressions. The marker is important because it tells the runtime\n        // code that this is where attributes without values start...\n\n\n        if (attrExprs.length !== attrsLengthBeforeInputs) {\n          attrExprs.splice(attrsLengthBeforeInputs, 0, literal(3\n          /* Bindings */\n          ));\n        }\n      }\n\n      if (templateAttrs.length) {\n        attrExprs.push(literal(4\n        /* Template */\n        ));\n        templateAttrs.forEach(function (attr) {\n          return addAttrExpr(attr.name);\n        });\n      }\n\n      if (boundI18nAttrs.length) {\n        attrExprs.push(literal(6\n        /* I18n */\n        ));\n        boundI18nAttrs.forEach(function (attr) {\n          return addAttrExpr(attr.name);\n        });\n      }\n\n      return attrExprs;\n    }\n  }, {\n    key: \"addToConsts\",\n    value: function addToConsts(expression) {\n      if (isNull(expression)) {\n        return TYPED_NULL_EXPR;\n      }\n\n      var consts = this._constants.constExpressions; // Try to reuse a literal that's already in the array, if possible.\n\n      for (var i = 0; i < consts.length; i++) {\n        if (consts[i].isEquivalent(expression)) {\n          return literal(i);\n        }\n      }\n\n      return literal(consts.push(expression) - 1);\n    }\n  }, {\n    key: \"addAttrsToConsts\",\n    value: function addAttrsToConsts(attrs) {\n      return attrs.length > 0 ? this.addToConsts(literalArr(attrs)) : TYPED_NULL_EXPR;\n    }\n  }, {\n    key: \"prepareRefsArray\",\n    value: function prepareRefsArray(references) {\n      var _this194 = this;\n\n      if (!references || references.length === 0) {\n        return TYPED_NULL_EXPR;\n      }\n\n      var refsParam = flatten(references.map(function (reference) {\n        var slot = _this194.allocateDataSlot(); // Generate the update temporary.\n\n\n        var variableName = _this194._bindingScope.freshReferenceName();\n\n        var retrievalLevel = _this194.level;\n        var lhs = variable(variableName);\n\n        _this194._bindingScope.set(retrievalLevel, reference.name, lhs, 0\n        /* DEFAULT */\n        , function (scope, relativeLevel) {\n          // e.g. nextContext(2);\n          var nextContextStmt = relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : []; // e.g. const $foo$ = reference(1);\n\n          var refExpr = lhs.set(importExpr(Identifiers.reference).callFn([literal(slot)]));\n          return nextContextStmt.concat(refExpr.toConstDecl());\n        }, true);\n\n        return [reference.name, reference.value];\n      }));\n      return asLiteral(refsParam);\n    }\n  }, {\n    key: \"prepareListenerParameter\",\n    value: function prepareListenerParameter(tagName, outputAst, index) {\n      var _this195 = this;\n\n      return function () {\n        var eventName = outputAst.name;\n        var bindingFnName = outputAst.type === 1\n        /* Animation */\n        ? // synthetic @listener.foo values are treated the exact same as are standard listeners\n        prepareSyntheticListenerFunctionName(eventName, outputAst.phase) : sanitizeIdentifier(eventName);\n        var handlerName = \"\".concat(_this195.templateName, \"_\").concat(tagName, \"_\").concat(bindingFnName, \"_\").concat(index, \"_listener\");\n\n        var scope = _this195._bindingScope.nestedScope(_this195._bindingScope.bindingLevel, EVENT_BINDING_SCOPE_GLOBALS);\n\n        return prepareEventListenerParameters(outputAst, handlerName, scope);\n      };\n    }\n  }]);\n\n  return TemplateDefinitionBuilder;\n}();\n\nvar ValueConverter = /*#__PURE__*/function (_AstMemoryEfficientTr) {\n  _inherits(ValueConverter, _AstMemoryEfficientTr);\n\n  var _super100 = _createSuper(ValueConverter);\n\n  function ValueConverter(constantPool, allocateSlot, allocatePureFunctionSlots, definePipe) {\n    var _this196;\n\n    _classCallCheck(this, ValueConverter);\n\n    _this196 = _super100.call(this);\n    _this196.constantPool = constantPool;\n    _this196.allocateSlot = allocateSlot;\n    _this196.allocatePureFunctionSlots = allocatePureFunctionSlots;\n    _this196.definePipe = definePipe;\n    _this196._pipeBindExprs = [];\n    return _this196;\n  } // AstMemoryEfficientTransformer\n\n\n  _createClass(ValueConverter, [{\n    key: \"visitPipe\",\n    value: function visitPipe(pipe, context) {\n      // Allocate a slot to create the pipe\n      var slot = this.allocateSlot();\n      var slotPseudoLocal = \"PIPE:\".concat(slot); // Allocate one slot for the result plus one slot per pipe argument\n\n      var pureFunctionSlot = this.allocatePureFunctionSlots(2 + pipe.args.length);\n      var target = new PropertyRead(pipe.span, pipe.sourceSpan, pipe.nameSpan, new ImplicitReceiver(pipe.span, pipe.sourceSpan), slotPseudoLocal);\n\n      var _pipeBindingCallInfo = pipeBindingCallInfo(pipe.args),\n          identifier = _pipeBindingCallInfo.identifier,\n          isVarLength = _pipeBindingCallInfo.isVarLength;\n\n      this.definePipe(pipe.name, slotPseudoLocal, slot, importExpr(identifier));\n      var args = [pipe.exp].concat(_toConsumableArray(pipe.args));\n      var convertedArgs = isVarLength ? this.visitAll([new LiteralArray(pipe.span, pipe.sourceSpan, args)]) : this.visitAll(args);\n      var pipeBindExpr = new FunctionCall(pipe.span, pipe.sourceSpan, target, [new LiteralPrimitive(pipe.span, pipe.sourceSpan, slot), new LiteralPrimitive(pipe.span, pipe.sourceSpan, pureFunctionSlot)].concat(_toConsumableArray(convertedArgs)));\n\n      this._pipeBindExprs.push(pipeBindExpr);\n\n      return pipeBindExpr;\n    }\n  }, {\n    key: \"updatePipeSlotOffsets\",\n    value: function updatePipeSlotOffsets(bindingSlots) {\n      this._pipeBindExprs.forEach(function (pipe) {\n        // update the slot offset arg (index 1) to account for binding slots\n        var slotOffset = pipe.args[1];\n        slotOffset.value += bindingSlots;\n      });\n    }\n  }, {\n    key: \"visitLiteralArray\",\n    value: function visitLiteralArray(array, context) {\n      var _this197 = this;\n\n      return new BuiltinFunctionCall(array.span, array.sourceSpan, this.visitAll(array.expressions), function (values) {\n        // If the literal has calculated (non-literal) elements transform it into\n        // calls to literal factories that compose the literal and will cache intermediate\n        // values.\n        var literal = literalArr(values);\n        return getLiteralFactory(_this197.constantPool, literal, _this197.allocatePureFunctionSlots);\n      });\n    }\n  }, {\n    key: \"visitLiteralMap\",\n    value: function visitLiteralMap(map, context) {\n      var _this198 = this;\n\n      return new BuiltinFunctionCall(map.span, map.sourceSpan, this.visitAll(map.values), function (values) {\n        // If the literal has calculated (non-literal) elements  transform it into\n        // calls to literal factories that compose the literal and will cache intermediate\n        // values.\n        var literal = literalMap(values.map(function (value, index) {\n          return {\n            key: map.keys[index].key,\n            value: value,\n            quoted: map.keys[index].quoted\n          };\n        }));\n        return getLiteralFactory(_this198.constantPool, literal, _this198.allocatePureFunctionSlots);\n      });\n    }\n  }]);\n\n  return ValueConverter;\n}(AstMemoryEfficientTransformer); // Pipes always have at least one parameter, the value they operate on\n\n\nvar pipeBindingIdentifiers = [Identifiers.pipeBind1, Identifiers.pipeBind2, Identifiers.pipeBind3, Identifiers.pipeBind4];\n\nfunction pipeBindingCallInfo(args) {\n  var identifier = pipeBindingIdentifiers[args.length];\n  return {\n    identifier: identifier || Identifiers.pipeBindV,\n    isVarLength: !identifier\n  };\n}\n\nvar pureFunctionIdentifiers = [Identifiers.pureFunction0, Identifiers.pureFunction1, Identifiers.pureFunction2, Identifiers.pureFunction3, Identifiers.pureFunction4, Identifiers.pureFunction5, Identifiers.pureFunction6, Identifiers.pureFunction7, Identifiers.pureFunction8];\n\nfunction pureFunctionCallInfo(args) {\n  var identifier = pureFunctionIdentifiers[args.length];\n  return {\n    identifier: identifier || Identifiers.pureFunctionV,\n    isVarLength: !identifier\n  };\n}\n\nfunction instruction(span, reference, params) {\n  return importExpr(reference, null, span).callFn(params, span);\n} // e.g. x(2);\n\n\nfunction generateNextContextExpr(relativeLevelDiff) {\n  return importExpr(Identifiers.nextContext).callFn(relativeLevelDiff > 1 ? [literal(relativeLevelDiff)] : []);\n}\n\nfunction getLiteralFactory(constantPool, literal$1, allocateSlots) {\n  var _constantPool$getLite = constantPool.getLiteralFactory(literal$1),\n      literalFactory = _constantPool$getLite.literalFactory,\n      literalFactoryArguments = _constantPool$getLite.literalFactoryArguments; // Allocate 1 slot for the result plus 1 per argument\n\n\n  var startSlot = allocateSlots(1 + literalFactoryArguments.length);\n\n  var _pureFunctionCallInfo = pureFunctionCallInfo(literalFactoryArguments),\n      identifier = _pureFunctionCallInfo.identifier,\n      isVarLength = _pureFunctionCallInfo.isVarLength; // Literal factories are pure functions that only need to be re-invoked when the parameters\n  // change.\n\n\n  var args = [literal(startSlot), literalFactory];\n\n  if (isVarLength) {\n    args.push(literalArr(literalFactoryArguments));\n  } else {\n    args.push.apply(args, _toConsumableArray(literalFactoryArguments));\n  }\n\n  return importExpr(identifier).callFn(args);\n}\n/**\n * Gets an array of literals that can be added to an expression\n * to represent the name and namespace of an attribute. E.g.\n * `:xlink:href` turns into `[AttributeMarker.NamespaceURI, 'xlink', 'href']`.\n *\n * @param name Name of the attribute, including the namespace.\n */\n\n\nfunction getAttributeNameLiterals(name) {\n  var _splitNsName5 = splitNsName(name),\n      _splitNsName6 = _slicedToArray(_splitNsName5, 2),\n      attributeNamespace = _splitNsName6[0],\n      attributeName = _splitNsName6[1];\n\n  var nameLiteral = literal(attributeName);\n\n  if (attributeNamespace) {\n    return [literal(0\n    /* NamespaceURI */\n    ), literal(attributeNamespace), nameLiteral];\n  }\n\n  return [nameLiteral];\n}\n/** The prefix used to get a shared context in BindingScope's map. */\n\n\nvar SHARED_CONTEXT_KEY = '$$shared_ctx$$';\n\nvar BindingScope = /*#__PURE__*/function () {\n  function BindingScope() {\n    var bindingLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n    var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n    var globals = arguments.length > 2 ? arguments[2] : undefined;\n\n    _classCallCheck(this, BindingScope);\n\n    this.bindingLevel = bindingLevel;\n    this.parent = parent;\n    this.globals = globals;\n    /** Keeps a map from local variables to their BindingData. */\n\n    this.map = new Map();\n    this.referenceNameIndex = 0;\n    this.restoreViewVariable = null;\n    this.usesRestoredViewContext = false;\n\n    if (globals !== undefined) {\n      var _iterator20 = _createForOfIteratorHelper(globals),\n          _step20;\n\n      try {\n        for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {\n          var name = _step20.value;\n          this.set(0, name, variable(name));\n        }\n      } catch (err) {\n        _iterator20.e(err);\n      } finally {\n        _iterator20.f();\n      }\n    }\n  }\n\n  _createClass(BindingScope, [{\n    key: \"get\",\n    value: function get(name) {\n      var current = this;\n\n      while (current) {\n        var value = current.map.get(name);\n\n        if (value != null) {\n          if (current !== this) {\n            // make a local copy and reset the `declare` state\n            value = {\n              retrievalLevel: value.retrievalLevel,\n              lhs: value.lhs,\n              declareLocalCallback: value.declareLocalCallback,\n              declare: false,\n              priority: value.priority\n            }; // Cache the value locally.\n\n            this.map.set(name, value); // Possibly generate a shared context var\n\n            this.maybeGenerateSharedContextVar(value);\n            this.maybeRestoreView();\n          }\n\n          if (value.declareLocalCallback && !value.declare) {\n            value.declare = true;\n          }\n\n          return value.lhs;\n        }\n\n        current = current.parent;\n      } // If we get to this point, we are looking for a property on the top level component\n      // - If level === 0, we are on the top and don't need to re-declare `ctx`.\n      // - If level > 0, we are in an embedded view. We need to retrieve the name of the\n      // local var we used to store the component context, e.g. const $comp$ = x();\n\n\n      return this.bindingLevel === 0 ? null : this.getComponentProperty(name);\n    }\n    /**\n     * Create a local variable for later reference.\n     *\n     * @param retrievalLevel The level from which this value can be retrieved\n     * @param name Name of the variable.\n     * @param lhs AST representing the left hand side of the `let lhs = rhs;`.\n     * @param priority The sorting priority of this var\n     * @param declareLocalCallback The callback to invoke when declaring this local var\n     * @param localRef Whether or not this is a local ref\n     */\n\n  }, {\n    key: \"set\",\n    value: function set(retrievalLevel, name, lhs) {\n      var priority = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n      var declareLocalCallback = arguments.length > 4 ? arguments[4] : undefined;\n      var localRef = arguments.length > 5 ? arguments[5] : undefined;\n\n      if (this.map.has(name)) {\n        if (localRef) {\n          // Do not throw an error if it's a local ref and do not update existing value,\n          // so the first defined ref is always returned.\n          return this;\n        }\n\n        error(\"The name \".concat(name, \" is already defined in scope to be \").concat(this.map.get(name)));\n      }\n\n      this.map.set(name, {\n        retrievalLevel: retrievalLevel,\n        lhs: lhs,\n        declare: false,\n        declareLocalCallback: declareLocalCallback,\n        priority: priority\n      });\n      return this;\n    } // Implemented as part of LocalResolver.\n\n  }, {\n    key: \"getLocal\",\n    value: function getLocal(name) {\n      return this.get(name);\n    } // Implemented as part of LocalResolver.\n\n  }, {\n    key: \"notifyImplicitReceiverUse\",\n    value: function notifyImplicitReceiverUse() {\n      if (this.bindingLevel !== 0) {\n        // Since the implicit receiver is accessed in an embedded view, we need to\n        // ensure that we declare a shared context variable for the current template\n        // in the update variables.\n        this.map.get(SHARED_CONTEXT_KEY + 0).declare = true;\n      }\n    }\n  }, {\n    key: \"nestedScope\",\n    value: function nestedScope(level, globals) {\n      var newScope = new BindingScope(level, this, globals);\n      if (level > 0) newScope.generateSharedContextVar(0);\n      return newScope;\n    }\n    /**\n     * Gets or creates a shared context variable and returns its expression. Note that\n     * this does not mean that the shared variable will be declared. Variables in the\n     * binding scope will be only declared if they are used.\n     */\n\n  }, {\n    key: \"getOrCreateSharedContextVar\",\n    value: function getOrCreateSharedContextVar(retrievalLevel) {\n      var bindingKey = SHARED_CONTEXT_KEY + retrievalLevel;\n\n      if (!this.map.has(bindingKey)) {\n        this.generateSharedContextVar(retrievalLevel);\n      } // Shared context variables are always generated as \"ReadVarExpr\".\n\n\n      return this.map.get(bindingKey).lhs;\n    }\n  }, {\n    key: \"getSharedContextName\",\n    value: function getSharedContextName(retrievalLevel) {\n      var sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + retrievalLevel); // Shared context variables are always generated as \"ReadVarExpr\".\n\n      return sharedCtxObj && sharedCtxObj.declare ? sharedCtxObj.lhs : null;\n    }\n  }, {\n    key: \"maybeGenerateSharedContextVar\",\n    value: function maybeGenerateSharedContextVar(value) {\n      if (value.priority === 1\n      /* CONTEXT */\n      && value.retrievalLevel < this.bindingLevel) {\n        var sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + value.retrievalLevel);\n\n        if (sharedCtxObj) {\n          sharedCtxObj.declare = true;\n        } else {\n          this.generateSharedContextVar(value.retrievalLevel);\n        }\n      }\n    }\n  }, {\n    key: \"generateSharedContextVar\",\n    value: function generateSharedContextVar(retrievalLevel) {\n      var lhs = variable(CONTEXT_NAME + this.freshReferenceName());\n      this.map.set(SHARED_CONTEXT_KEY + retrievalLevel, {\n        retrievalLevel: retrievalLevel,\n        lhs: lhs,\n        declareLocalCallback: function declareLocalCallback(scope, relativeLevel) {\n          // const ctx_r0 = nextContext(2);\n          return [lhs.set(generateNextContextExpr(relativeLevel)).toConstDecl()];\n        },\n        declare: false,\n        priority: 2\n        /* SHARED_CONTEXT */\n\n      });\n    }\n  }, {\n    key: \"getComponentProperty\",\n    value: function getComponentProperty(name) {\n      var componentValue = this.map.get(SHARED_CONTEXT_KEY + 0);\n      componentValue.declare = true;\n      this.maybeRestoreView();\n      return componentValue.lhs.prop(name);\n    }\n  }, {\n    key: \"maybeRestoreView\",\n    value: function maybeRestoreView() {\n      // View restoration is required for listener instructions inside embedded views, because\n      // they only run in creation mode and they can have references to the context object.\n      // If the context object changes in update mode, the reference will be incorrect, because\n      // it was established during creation.\n      if (this.isListenerScope()) {\n        if (!this.parent.restoreViewVariable) {\n          // parent saves variable to generate a shared `const $s$ = getCurrentView();` instruction\n          this.parent.restoreViewVariable = variable(this.parent.freshReferenceName());\n        }\n\n        this.restoreViewVariable = this.parent.restoreViewVariable;\n      }\n    }\n  }, {\n    key: \"restoreViewStatement\",\n    value: function restoreViewStatement() {\n      var statements = [];\n\n      if (this.restoreViewVariable) {\n        var restoreCall = instruction(null, Identifiers.restoreView, [this.restoreViewVariable]); // Either `const restoredCtx = restoreView($state$);` or `restoreView($state$);`\n        // depending on whether it is being used.\n\n        statements.push(this.usesRestoredViewContext ? variable(RESTORED_VIEW_CONTEXT_NAME).set(restoreCall).toConstDecl() : restoreCall.toStmt());\n      }\n\n      return statements;\n    }\n  }, {\n    key: \"viewSnapshotStatements\",\n    value: function viewSnapshotStatements() {\n      // const $state$ = getCurrentView();\n      return this.restoreViewVariable ? [this.restoreViewVariable.set(instruction(null, Identifiers.getCurrentView, [])).toConstDecl()] : [];\n    }\n  }, {\n    key: \"isListenerScope\",\n    value: function isListenerScope() {\n      return this.parent && this.parent.bindingLevel === this.bindingLevel;\n    }\n  }, {\n    key: \"variableDeclarations\",\n    value: function variableDeclarations() {\n      var _this199 = this;\n\n      var currentContextLevel = 0;\n      return Array.from(this.map.values()).filter(function (value) {\n        return value.declare;\n      }).sort(function (a, b) {\n        return b.retrievalLevel - a.retrievalLevel || b.priority - a.priority;\n      }).reduce(function (stmts, value) {\n        var levelDiff = _this199.bindingLevel - value.retrievalLevel;\n        var currStmts = value.declareLocalCallback(_this199, levelDiff - currentContextLevel);\n        currentContextLevel = levelDiff;\n        return stmts.concat(currStmts);\n      }, []);\n    }\n  }, {\n    key: \"freshReferenceName\",\n    value: function freshReferenceName() {\n      var current = this; // Find the top scope as it maintains the global reference count\n\n      while (current.parent) {\n        current = current.parent;\n      }\n\n      var ref = \"\".concat(REFERENCE_PREFIX).concat(current.referenceNameIndex++);\n      return ref;\n    }\n  }, {\n    key: \"hasRestoreViewVariable\",\n    value: function hasRestoreViewVariable() {\n      return !!this.restoreViewVariable;\n    }\n  }, {\n    key: \"notifyRestoredViewContextUse\",\n    value: function notifyRestoredViewContextUse() {\n      this.usesRestoredViewContext = true;\n    }\n  }], [{\n    key: \"createRootScope\",\n    value: function createRootScope() {\n      return new BindingScope();\n    }\n  }]);\n\n  return BindingScope;\n}();\n/**\n * Creates a `CssSelector` given a tag name and a map of attributes\n */\n\n\nfunction createCssSelector(elementName, attributes) {\n  var cssSelector = new CssSelector();\n  var elementNameNoNs = splitNsName(elementName)[1];\n  cssSelector.setElement(elementNameNoNs);\n  Object.getOwnPropertyNames(attributes).forEach(function (name) {\n    var nameNoNs = splitNsName(name)[1];\n    var value = attributes[name];\n    cssSelector.addAttribute(nameNoNs, value);\n\n    if (name.toLowerCase() === 'class') {\n      var classes = value.trim().split(/\\s+/);\n      classes.forEach(function (className) {\n        return cssSelector.addClassName(className);\n      });\n    }\n  });\n  return cssSelector;\n}\n/**\n * Creates an array of expressions out of an `ngProjectAs` attributes\n * which can be added to the instruction parameters.\n */\n\n\nfunction getNgProjectAsLiteral(attribute) {\n  // Parse the attribute value into a CssSelectorList. Note that we only take the\n  // first selector, because we don't support multiple selectors in ngProjectAs.\n  var parsedR3Selector = parseSelectorToR3Selector(attribute.value)[0];\n  return [literal(5\n  /* ProjectAs */\n  ), asLiteral(parsedR3Selector)];\n}\n/**\n * Gets the instruction to generate for an interpolated property\n * @param interpolation An Interpolation AST\n */\n\n\nfunction getPropertyInterpolationExpression(interpolation) {\n  switch (getInterpolationArgsLength(interpolation)) {\n    case 1:\n      return Identifiers.propertyInterpolate;\n\n    case 3:\n      return Identifiers.propertyInterpolate1;\n\n    case 5:\n      return Identifiers.propertyInterpolate2;\n\n    case 7:\n      return Identifiers.propertyInterpolate3;\n\n    case 9:\n      return Identifiers.propertyInterpolate4;\n\n    case 11:\n      return Identifiers.propertyInterpolate5;\n\n    case 13:\n      return Identifiers.propertyInterpolate6;\n\n    case 15:\n      return Identifiers.propertyInterpolate7;\n\n    case 17:\n      return Identifiers.propertyInterpolate8;\n\n    default:\n      return Identifiers.propertyInterpolateV;\n  }\n}\n/**\n * Gets the instruction to generate for an interpolated attribute\n * @param interpolation An Interpolation AST\n */\n\n\nfunction getAttributeInterpolationExpression(interpolation) {\n  switch (getInterpolationArgsLength(interpolation)) {\n    case 3:\n      return Identifiers.attributeInterpolate1;\n\n    case 5:\n      return Identifiers.attributeInterpolate2;\n\n    case 7:\n      return Identifiers.attributeInterpolate3;\n\n    case 9:\n      return Identifiers.attributeInterpolate4;\n\n    case 11:\n      return Identifiers.attributeInterpolate5;\n\n    case 13:\n      return Identifiers.attributeInterpolate6;\n\n    case 15:\n      return Identifiers.attributeInterpolate7;\n\n    case 17:\n      return Identifiers.attributeInterpolate8;\n\n    default:\n      return Identifiers.attributeInterpolateV;\n  }\n}\n/**\n * Gets the instruction to generate for interpolated text.\n * @param interpolation An Interpolation AST\n */\n\n\nfunction getTextInterpolationExpression(interpolation) {\n  switch (getInterpolationArgsLength(interpolation)) {\n    case 1:\n      return Identifiers.textInterpolate;\n\n    case 3:\n      return Identifiers.textInterpolate1;\n\n    case 5:\n      return Identifiers.textInterpolate2;\n\n    case 7:\n      return Identifiers.textInterpolate3;\n\n    case 9:\n      return Identifiers.textInterpolate4;\n\n    case 11:\n      return Identifiers.textInterpolate5;\n\n    case 13:\n      return Identifiers.textInterpolate6;\n\n    case 15:\n      return Identifiers.textInterpolate7;\n\n    case 17:\n      return Identifiers.textInterpolate8;\n\n    default:\n      return Identifiers.textInterpolateV;\n  }\n}\n/**\n * Parse a template into render3 `Node`s and additional metadata, with no other dependencies.\n *\n * @param template text of the template to parse\n * @param templateUrl URL to use for source mapping of the parsed template\n * @param options options to modify how the template is parsed\n */\n\n\nfunction parseTemplate(template, templateUrl) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var interpolationConfig = options.interpolationConfig,\n      preserveWhitespaces = options.preserveWhitespaces,\n      enableI18nLegacyMessageIdFormat = options.enableI18nLegacyMessageIdFormat;\n  var bindingParser = makeBindingParser(interpolationConfig);\n  var htmlParser = new HtmlParser();\n  var parseResult = htmlParser.parse(template, templateUrl, Object.assign(Object.assign({\n    leadingTriviaChars: LEADING_TRIVIA_CHARS\n  }, options), {\n    tokenizeExpansionForms: true\n  }));\n\n  if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors && parseResult.errors.length > 0) {\n    var _parsedTemplate = {\n      interpolationConfig: interpolationConfig,\n      preserveWhitespaces: preserveWhitespaces,\n      errors: parseResult.errors,\n      nodes: [],\n      styleUrls: [],\n      styles: [],\n      ngContentSelectors: []\n    };\n\n    if (options.collectCommentNodes) {\n      _parsedTemplate.commentNodes = [];\n    }\n\n    return _parsedTemplate;\n  }\n\n  var rootNodes = parseResult.rootNodes; // process i18n meta information (scan attributes, generate ids)\n  // before we run whitespace removal process, because existing i18n\n  // extraction process (ng extract-i18n) relies on a raw content to generate\n  // message ids\n\n  var i18nMetaVisitor = new I18nMetaVisitor(interpolationConfig,\n  /* keepI18nAttrs */\n  !preserveWhitespaces, enableI18nLegacyMessageIdFormat);\n  var i18nMetaResult = i18nMetaVisitor.visitAllWithErrors(rootNodes);\n\n  if (!options.alwaysAttemptHtmlToR3AstConversion && i18nMetaResult.errors && i18nMetaResult.errors.length > 0) {\n    var _parsedTemplate2 = {\n      interpolationConfig: interpolationConfig,\n      preserveWhitespaces: preserveWhitespaces,\n      errors: i18nMetaResult.errors,\n      nodes: [],\n      styleUrls: [],\n      styles: [],\n      ngContentSelectors: []\n    };\n\n    if (options.collectCommentNodes) {\n      _parsedTemplate2.commentNodes = [];\n    }\n\n    return _parsedTemplate2;\n  }\n\n  rootNodes = i18nMetaResult.rootNodes;\n\n  if (!preserveWhitespaces) {\n    rootNodes = visitAll$1(new WhitespaceVisitor(), rootNodes); // run i18n meta visitor again in case whitespaces are removed (because that might affect\n    // generated i18n message content) and first pass indicated that i18n content is present in a\n    // template. During this pass i18n IDs generated at the first pass will be preserved, so we can\n    // mimic existing extraction process (ng extract-i18n)\n\n    if (i18nMetaVisitor.hasI18nMeta) {\n      rootNodes = visitAll$1(new I18nMetaVisitor(interpolationConfig,\n      /* keepI18nAttrs */\n      false), rootNodes);\n    }\n  }\n\n  var _htmlAstToRender3Ast = htmlAstToRender3Ast(rootNodes, bindingParser, {\n    collectCommentNodes: !!options.collectCommentNodes\n  }),\n      nodes = _htmlAstToRender3Ast.nodes,\n      errors = _htmlAstToRender3Ast.errors,\n      styleUrls = _htmlAstToRender3Ast.styleUrls,\n      styles = _htmlAstToRender3Ast.styles,\n      ngContentSelectors = _htmlAstToRender3Ast.ngContentSelectors,\n      commentNodes = _htmlAstToRender3Ast.commentNodes;\n\n  errors.push.apply(errors, _toConsumableArray(parseResult.errors).concat(_toConsumableArray(i18nMetaResult.errors)));\n  var parsedTemplate = {\n    interpolationConfig: interpolationConfig,\n    preserveWhitespaces: preserveWhitespaces,\n    errors: errors.length > 0 ? errors : null,\n    nodes: nodes,\n    styleUrls: styleUrls,\n    styles: styles,\n    ngContentSelectors: ngContentSelectors\n  };\n\n  if (options.collectCommentNodes) {\n    parsedTemplate.commentNodes = commentNodes;\n  }\n\n  return parsedTemplate;\n}\n\nvar elementRegistry = /*@__PURE__*/new DomElementSchemaRegistry();\n/**\n * Construct a `BindingParser` with a default configuration.\n */\n\nfunction makeBindingParser() {\n  var interpolationConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_INTERPOLATION_CONFIG;\n  return new BindingParser(new IvyParser(new Lexer()), interpolationConfig, elementRegistry, null, []);\n}\n\nfunction resolveSanitizationFn(context, isAttribute) {\n  switch (context) {\n    case SecurityContext.HTML:\n      return importExpr(Identifiers.sanitizeHtml);\n\n    case SecurityContext.SCRIPT:\n      return importExpr(Identifiers.sanitizeScript);\n\n    case SecurityContext.STYLE:\n      // the compiler does not fill in an instruction for [style.prop?] binding\n      // values because the style algorithm knows internally what props are subject\n      // to sanitization (only [attr.style] values are explicitly sanitized)\n      return isAttribute ? importExpr(Identifiers.sanitizeStyle) : null;\n\n    case SecurityContext.URL:\n      return importExpr(Identifiers.sanitizeUrl);\n\n    case SecurityContext.RESOURCE_URL:\n      return importExpr(Identifiers.sanitizeResourceUrl);\n\n    default:\n      return null;\n  }\n}\n\nfunction trustedConstAttribute(tagName, attr) {\n  var value = asLiteral(attr.value);\n\n  if (isTrustedTypesSink(tagName, attr.name)) {\n    switch (elementRegistry.securityContext(tagName, attr.name,\n    /* isAttribute */\n    true)) {\n      case SecurityContext.HTML:\n        return taggedTemplate(importExpr(Identifiers.trustConstantHtml), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);\n      // NB: no SecurityContext.SCRIPT here, as the corresponding tags are stripped by the compiler.\n\n      case SecurityContext.RESOURCE_URL:\n        return taggedTemplate(importExpr(Identifiers.trustConstantResourceUrl), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);\n\n      default:\n        return value;\n    }\n  } else {\n    return value;\n  }\n}\n\nfunction isSingleElementTemplate(children) {\n  return children.length === 1 && children[0] instanceof Element;\n}\n\nfunction isTextNode(node) {\n  return node instanceof Text || node instanceof BoundText || node instanceof Icu;\n}\n\nfunction hasTextChildrenOnly(children) {\n  return children.every(isTextNode);\n}\n/** Name of the global variable that is used to determine if we use Closure translations or not */\n\n\nvar NG_I18N_CLOSURE_MODE = 'ngI18nClosureMode';\n/**\n * Generate statements that define a given translation message.\n *\n * ```\n * var I18N_1;\n * if (typeof ngI18nClosureMode !== undefined && ngI18nClosureMode) {\n *     var MSG_EXTERNAL_XXX = goog.getMsg(\n *          \"Some message with {$interpolation}!\",\n *          { \"interpolation\": \"\\uFFFD0\\uFFFD\" }\n *     );\n *     I18N_1 = MSG_EXTERNAL_XXX;\n * }\n * else {\n *     I18N_1 = $localize`Some message with ${'\\uFFFD0\\uFFFD'}!`;\n * }\n * ```\n *\n * @param message The original i18n AST message node\n * @param variable The variable that will be assigned the translation, e.g. `I18N_1`.\n * @param closureVar The variable for Closure `goog.getMsg` calls, e.g. `MSG_EXTERNAL_XXX`.\n * @param params Object mapping placeholder names to their values (e.g.\n * `{ \"interpolation\": \"\\uFFFD0\\uFFFD\" }`).\n * @param transformFn Optional transformation function that will be applied to the translation (e.g.\n * post-processing).\n * @returns An array of statements that defined a given translation.\n */\n\nfunction getTranslationDeclStmts(message, variable, closureVar) {\n  var params = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  var transformFn = arguments.length > 4 ? arguments[4] : undefined;\n  var statements = [declareI18nVariable(variable), ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, i18nFormatPlaceholderNames(params,\n  /* useCamelCase */\n  true)), createLocalizeStatements(variable, message, i18nFormatPlaceholderNames(params,\n  /* useCamelCase */\n  false)))];\n\n  if (transformFn) {\n    statements.push(new ExpressionStatement(variable.set(transformFn(variable))));\n  }\n\n  return statements;\n}\n/**\n * Create the expression that will be used to guard the closure mode block\n * It is equivalent to:\n *\n * ```\n * typeof ngI18nClosureMode !== undefined && ngI18nClosureMode\n * ```\n */\n\n\nfunction createClosureModeGuard() {\n  return typeofExpr(variable(NG_I18N_CLOSURE_MODE)).notIdentical(literal('undefined', STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE));\n}\n/**\n * @license\n * Copyright Google LLC 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// This regex matches any binding names that contain the \"attr.\" prefix, e.g. \"attr.required\"\n// If there is a match, the first matching group will contain the attribute name to bind.\n\n\nvar ATTR_REGEX = /attr\\.([^\\]]+)/;\n\nfunction baseDirectiveFields(meta, constantPool, bindingParser) {\n  var definitionMap = new DefinitionMap();\n  var selectors = parseSelectorToR3Selector(meta.selector); // e.g. `type: MyDirective`\n\n  definitionMap.set('type', meta.internalType); // e.g. `selectors: [['', 'someDir', '']]`\n\n  if (selectors.length > 0) {\n    definitionMap.set('selectors', asLiteral(selectors));\n  }\n\n  if (meta.queries.length > 0) {\n    // e.g. `contentQueries: (rf, ctx, dirIndex) => { ... }\n    definitionMap.set('contentQueries', createContentQueriesFunction(meta.queries, constantPool, meta.name));\n  }\n\n  if (meta.viewQueries.length) {\n    definitionMap.set('viewQuery', createViewQueriesFunction(meta.viewQueries, constantPool, meta.name));\n  } // e.g. `hostBindings: (rf, ctx) => { ... }\n\n\n  definitionMap.set('hostBindings', createHostBindingsFunction(meta.host, meta.typeSourceSpan, bindingParser, constantPool, meta.selector || '', meta.name, definitionMap)); // e.g 'inputs: {a: 'a'}`\n\n  definitionMap.set('inputs', conditionallyCreateMapObjectLiteral(meta.inputs, true)); // e.g 'outputs: {a: 'a'}`\n\n  definitionMap.set('outputs', conditionallyCreateMapObjectLiteral(meta.outputs));\n\n  if (meta.exportAs !== null) {\n    definitionMap.set('exportAs', literalArr(meta.exportAs.map(function (e) {\n      return literal(e);\n    })));\n  }\n\n  return definitionMap;\n}\n/**\n * Add features to the definition map.\n */\n\n\nfunction addFeatures(definitionMap, meta) {\n  // e.g. `features: [NgOnChangesFeature]`\n  var features = [];\n  var providers = meta.providers;\n  var viewProviders = meta.viewProviders;\n\n  if (providers || viewProviders) {\n    var args = [providers || new LiteralArrayExpr([])];\n\n    if (viewProviders) {\n      args.push(viewProviders);\n    }\n\n    features.push(importExpr(Identifiers.ProvidersFeature).callFn(args));\n  }\n\n  if (meta.usesInheritance) {\n    features.push(importExpr(Identifiers.InheritDefinitionFeature));\n  }\n\n  if (meta.fullInheritance) {\n    features.push(importExpr(Identifiers.CopyDefinitionFeature));\n  }\n\n  if (meta.lifecycle.usesOnChanges) {\n    features.push(importExpr(Identifiers.NgOnChangesFeature));\n  }\n\n  if (features.length) {\n    definitionMap.set('features', literalArr(features));\n  }\n}\n/**\n * Compile a directive for the render3 runtime as defined by the `R3DirectiveMetadata`.\n */\n\n\nfunction compileDirectiveFromMetadata(meta, constantPool, bindingParser) {\n  var definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);\n  addFeatures(definitionMap, meta);\n  var expression = importExpr(Identifiers.defineDirective).callFn([definitionMap.toLiteralMap()], undefined, true);\n  var type = createDirectiveType(meta);\n  return {\n    expression: expression,\n    type: type,\n    statements: []\n  };\n}\n/**\n * Compile a component for the render3 runtime as defined by the `R3ComponentMetadata`.\n */\n\n\nfunction compileComponentFromMetadata(meta, constantPool, bindingParser) {\n  var definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);\n  addFeatures(definitionMap, meta);\n  var selector = meta.selector && CssSelector.parse(meta.selector);\n  var firstSelector = selector && selector[0]; // e.g. `attr: [\"class\", \".my.app\"]`\n  // This is optional an only included if the first selector of a component specifies attributes.\n\n  if (firstSelector) {\n    var selectorAttributes = firstSelector.getAttrs();\n\n    if (selectorAttributes.length) {\n      definitionMap.set('attrs', constantPool.getConstLiteral(literalArr(selectorAttributes.map(function (value) {\n        return value != null ? literal(value) : literal(undefined);\n      })),\n      /* forceShared */\n      true));\n    }\n  } // Generate the CSS matcher that recognize directive\n\n\n  var directiveMatcher = null;\n\n  if (meta.directives.length > 0) {\n    var matcher = new SelectorMatcher();\n\n    var _iterator21 = _createForOfIteratorHelper(meta.directives),\n        _step21;\n\n    try {\n      for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {\n        var _step21$value = _step21.value,\n            _selector = _step21$value.selector,\n            _type = _step21$value.type;\n        matcher.addSelectables(CssSelector.parse(_selector), _type);\n      }\n    } catch (err) {\n      _iterator21.e(err);\n    } finally {\n      _iterator21.f();\n    }\n\n    directiveMatcher = matcher;\n  } // e.g. `template: function MyComponent_Template(_ctx, _cm) {...}`\n\n\n  var templateTypeName = meta.name;\n  var templateName = templateTypeName ? \"\".concat(templateTypeName, \"_Template\") : null;\n  var directivesUsed = new Set();\n  var pipesUsed = new Set();\n  var changeDetection = meta.changeDetection;\n  var template = meta.template;\n  var templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, directiveMatcher, directivesUsed, meta.pipes, pipesUsed, Identifiers.namespaceHTML, meta.relativeContextFilePath, meta.i18nUseExternalIds);\n  var templateFunctionExpression = templateBuilder.buildTemplateFunction(template.nodes, []); // We need to provide this so that dynamically generated components know what\n  // projected content blocks to pass through to the component when it is instantiated.\n\n  var ngContentSelectors = templateBuilder.getNgContentSelectors();\n\n  if (ngContentSelectors) {\n    definitionMap.set('ngContentSelectors', ngContentSelectors);\n  } // e.g. `decls: 2`\n\n\n  definitionMap.set('decls', literal(templateBuilder.getConstCount())); // e.g. `vars: 2`\n\n  definitionMap.set('vars', literal(templateBuilder.getVarCount())); // Generate `consts` section of ComponentDef:\n  // - either as an array:\n  //   `consts: [['one', 'two'], ['three', 'four']]`\n  // - or as a factory function in case additional statements are present (to support i18n):\n  //   `consts: function() { var i18n_0; if (ngI18nClosureMode) {...} else {...} return [i18n_0]; }`\n\n  var _templateBuilder$getC = templateBuilder.getConsts(),\n      constExpressions = _templateBuilder$getC.constExpressions,\n      prepareStatements = _templateBuilder$getC.prepareStatements;\n\n  if (constExpressions.length > 0) {\n    var constsExpr = literalArr(constExpressions); // Prepare statements are present - turn `consts` into a function.\n\n    if (prepareStatements.length > 0) {\n      constsExpr = fn([], [].concat(_toConsumableArray(prepareStatements), [new ReturnStatement(constsExpr)]));\n    }\n\n    definitionMap.set('consts', constsExpr);\n  }\n\n  definitionMap.set('template', templateFunctionExpression); // e.g. `directives: [MyDirective]`\n\n  if (directivesUsed.size) {\n    var directivesList = literalArr(Array.from(directivesUsed));\n    var directivesExpr = compileDeclarationList(directivesList, meta.declarationListEmitMode);\n    definitionMap.set('directives', directivesExpr);\n  } // e.g. `pipes: [MyPipe]`\n\n\n  if (pipesUsed.size) {\n    var pipesList = literalArr(Array.from(pipesUsed));\n    var pipesExpr = compileDeclarationList(pipesList, meta.declarationListEmitMode);\n    definitionMap.set('pipes', pipesExpr);\n  }\n\n  if (meta.encapsulation === null) {\n    meta.encapsulation = ViewEncapsulation.Emulated;\n  } // e.g. `styles: [str1, str2]`\n\n\n  if (meta.styles && meta.styles.length) {\n    var styleValues = meta.encapsulation == ViewEncapsulation.Emulated ? compileStyles(meta.styles, CONTENT_ATTR, HOST_ATTR) : meta.styles;\n    var strings = styleValues.map(function (str) {\n      return constantPool.getConstLiteral(literal(str));\n    });\n    definitionMap.set('styles', literalArr(strings));\n  } else if (meta.encapsulation === ViewEncapsulation.Emulated) {\n    // If there is no style, don't generate css selectors on elements\n    meta.encapsulation = ViewEncapsulation.None;\n  } // Only set view encapsulation if it's not the default value\n\n\n  if (meta.encapsulation !== ViewEncapsulation.Emulated) {\n    definitionMap.set('encapsulation', literal(meta.encapsulation));\n  } // e.g. `animation: [trigger('123', [])]`\n\n\n  if (meta.animations !== null) {\n    definitionMap.set('data', literalMap([{\n      key: 'animation',\n      value: meta.animations,\n      quoted: false\n    }]));\n  } // Only set the change detection flag if it's defined and it's not the default.\n\n\n  if (changeDetection != null && changeDetection !== ChangeDetectionStrategy.Default) {\n    definitionMap.set('changeDetection', literal(changeDetection));\n  }\n\n  var expression = importExpr(Identifiers.defineComponent).callFn([definitionMap.toLiteralMap()], undefined, true);\n  var type = createComponentType(meta);\n  return {\n    expression: expression,\n    type: type,\n    statements: []\n  };\n}\n/**\n * Creates the type specification from the component meta. This type is inserted into .d.ts files\n * to be consumed by upstream compilations.\n */\n\n\nfunction createComponentType(meta) {\n  var typeParams = createDirectiveTypeParams(meta);\n  typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));\n  return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));\n}\n/**\n * Compiles the array literal of declarations into an expression according to the provided emit\n * mode.\n */\n\n\nfunction compileDeclarationList(list, mode) {\n  switch (mode) {\n    case 0\n    /* Direct */\n    :\n      // directives: [MyDir],\n      return list;\n\n    case 1\n    /* Closure */\n    :\n      // directives: function () { return [MyDir]; }\n      return fn([], [new ReturnStatement(list)]);\n\n    case 2\n    /* ClosureResolved */\n    :\n      // directives: function () { return [MyDir].map(ng.resolveForwardRef); }\n      var resolvedList = list.callMethod('map', [importExpr(Identifiers.resolveForwardRef)]);\n      return fn([], [new ReturnStatement(resolvedList)]);\n  }\n}\n\nfunction prepareQueryParams(query, constantPool) {\n  var parameters = [getQueryPredicate(query, constantPool), literal(toQueryFlags(query))];\n\n  if (query.read) {\n    parameters.push(query.read);\n  }\n\n  return parameters;\n}\n/**\n * Translates query flags into `TQueryFlags` type in packages/core/src/render3/interfaces/query.ts\n * @param query\n */\n\n\nfunction toQueryFlags(query) {\n  return (query.descendants ? 1\n  /* descendants */\n  : 0\n  /* none */\n  ) | (query.static ? 2\n  /* isStatic */\n  : 0\n  /* none */\n  ) | (query.emitDistinctChangesOnly ? 4\n  /* emitDistinctChangesOnly */\n  : 0\n  /* none */\n  );\n}\n\nfunction convertAttributesToExpressions(attributes) {\n  var values = [];\n\n  var _iterator22 = _createForOfIteratorHelper(Object.getOwnPropertyNames(attributes)),\n      _step22;\n\n  try {\n    for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {\n      var key = _step22.value;\n      var value = attributes[key];\n      values.push(literal(key), value);\n    }\n  } catch (err) {\n    _iterator22.e(err);\n  } finally {\n    _iterator22.f();\n  }\n\n  return values;\n} // Define and update any content queries\n\n\nfunction createContentQueriesFunction(queries, constantPool, name) {\n  var createStatements = [];\n  var updateStatements = [];\n  var tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n\n  var _iterator23 = _createForOfIteratorHelper(queries),\n      _step23;\n\n  try {\n    for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {\n      var query = _step23.value;\n      // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);\n      createStatements.push(importExpr(Identifiers.contentQuery).callFn([variable('dirIndex')].concat(_toConsumableArray(prepareQueryParams(query, constantPool)))).toStmt()); // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));\n\n      var temporary = tempAllocator();\n      var getQueryList = importExpr(Identifiers.loadQuery).callFn([]);\n      var refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);\n      var updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop('first') : temporary);\n      updateStatements.push(refresh.and(updateDirective).toStmt());\n    }\n  } catch (err) {\n    _iterator23.e(err);\n  } finally {\n    _iterator23.f();\n  }\n\n  var contentQueriesFnName = name ? \"\".concat(name, \"_ContentQueries\") : null;\n  return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null), new FnParam('dirIndex', null)], [renderFlagCheckIfStmt(1\n  /* Create */\n  , createStatements), renderFlagCheckIfStmt(2\n  /* Update */\n  , updateStatements)], INFERRED_TYPE, null, contentQueriesFnName);\n}\n\nfunction stringAsType(str) {\n  return expressionType(literal(str));\n}\n\nfunction stringMapAsType(map) {\n  var mapValues = Object.keys(map).map(function (key) {\n    var value = Array.isArray(map[key]) ? map[key][0] : map[key];\n    return {\n      key: key,\n      value: literal(value),\n      quoted: true\n    };\n  });\n  return expressionType(literalMap(mapValues));\n}\n\nfunction stringArrayAsType(arr) {\n  return arr.length > 0 ? expressionType(literalArr(arr.map(function (value) {\n    return literal(value);\n  }))) : NONE_TYPE;\n}\n\nfunction createDirectiveTypeParams(meta) {\n  // On the type side, remove newlines from the selector as it will need to fit into a TypeScript\n  // string literal, which must be on one line.\n  var selectorForType = meta.selector !== null ? meta.selector.replace(/\\n/g, '') : null;\n  return [typeWithParameters(meta.type.type, meta.typeArgumentCount), selectorForType !== null ? stringAsType(selectorForType) : NONE_TYPE, meta.exportAs !== null ? stringArrayAsType(meta.exportAs) : NONE_TYPE, stringMapAsType(meta.inputs), stringMapAsType(meta.outputs), stringArrayAsType(meta.queries.map(function (q) {\n    return q.propertyName;\n  }))];\n}\n/**\n * Creates the type specification from the directive meta. This type is inserted into .d.ts files\n * to be consumed by upstream compilations.\n */\n\n\nfunction createDirectiveType(meta) {\n  var typeParams = createDirectiveTypeParams(meta);\n  return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));\n} // Define and update any view queries\n\n\nfunction createViewQueriesFunction(viewQueries, constantPool, name) {\n  var createStatements = [];\n  var updateStatements = [];\n  var tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n  viewQueries.forEach(function (query) {\n    // creation, e.g. r3.viewQuery(somePredicate, true);\n    var queryDefinition = importExpr(Identifiers.viewQuery).callFn(prepareQueryParams(query, constantPool));\n    createStatements.push(queryDefinition.toStmt()); // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));\n\n    var temporary = tempAllocator();\n    var getQueryList = importExpr(Identifiers.loadQuery).callFn([]);\n    var refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);\n    var updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop('first') : temporary);\n    updateStatements.push(refresh.and(updateDirective).toStmt());\n  });\n  var viewQueryFnName = name ? \"\".concat(name, \"_Query\") : null;\n  return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [renderFlagCheckIfStmt(1\n  /* Create */\n  , createStatements), renderFlagCheckIfStmt(2\n  /* Update */\n  , updateStatements)], INFERRED_TYPE, null, viewQueryFnName);\n} // Return a host binding function or null if one is not necessary.\n\n\nfunction createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindingParser, constantPool, selector, name, definitionMap) {\n  var bindingContext = variable(CONTEXT_NAME);\n  var styleBuilder = new StylingBuilder(bindingContext);\n  var _hostBindingsMetadata = hostBindingsMetadata.specialAttributes,\n      styleAttr = _hostBindingsMetadata.styleAttr,\n      classAttr = _hostBindingsMetadata.classAttr;\n\n  if (styleAttr !== undefined) {\n    styleBuilder.registerStyleAttr(styleAttr);\n  }\n\n  if (classAttr !== undefined) {\n    styleBuilder.registerClassAttr(classAttr);\n  }\n\n  var createStatements = [];\n  var updateStatements = [];\n  var hostBindingSourceSpan = typeSourceSpan;\n  var directiveSummary = metadataAsSummary(hostBindingsMetadata); // Calculate host event bindings\n\n  var eventBindings = bindingParser.createDirectiveHostEventAsts(directiveSummary, hostBindingSourceSpan);\n\n  if (eventBindings && eventBindings.length) {\n    var listeners = createHostListeners(eventBindings, name);\n    createStatements.push.apply(createStatements, _toConsumableArray(listeners));\n  } // Calculate the host property bindings\n\n\n  var bindings = bindingParser.createBoundHostProperties(directiveSummary, hostBindingSourceSpan);\n  var allOtherBindings = []; // We need to calculate the total amount of binding slots required by\n  // all the instructions together before any value conversions happen.\n  // Value conversions may require additional slots for interpolation and\n  // bindings with pipes. These calculates happen after this block.\n\n  var totalHostVarsCount = 0;\n  bindings && bindings.forEach(function (binding) {\n    var stylingInputWasSet = styleBuilder.registerInputBasedOnName(binding.name, binding.expression, hostBindingSourceSpan);\n\n    if (stylingInputWasSet) {\n      totalHostVarsCount += MIN_STYLING_BINDING_SLOTS_REQUIRED;\n    } else {\n      allOtherBindings.push(binding);\n      totalHostVarsCount++;\n    }\n  });\n  var valueConverter;\n\n  var getValueConverter = function getValueConverter() {\n    if (!valueConverter) {\n      var hostVarsCountFn = function hostVarsCountFn(numSlots) {\n        var originalVarsCount = totalHostVarsCount;\n        totalHostVarsCount += numSlots;\n        return originalVarsCount;\n      };\n\n      valueConverter = new ValueConverter(constantPool, function () {\n        return error('Unexpected node');\n      }, // new nodes are illegal here\n      hostVarsCountFn, function () {\n        return error('Unexpected pipe');\n      }); // pipes are illegal here\n    }\n\n    return valueConverter;\n  };\n\n  var propertyBindings = [];\n  var attributeBindings = [];\n  var syntheticHostBindings = [];\n  allOtherBindings.forEach(function (binding) {\n    // resolve literal arrays and literal objects\n    var value = binding.expression.visit(getValueConverter());\n    var bindingExpr = bindingFn(bindingContext, value);\n\n    var _getBindingNameAndIns = getBindingNameAndInstruction(binding),\n        bindingName = _getBindingNameAndIns.bindingName,\n        instruction = _getBindingNameAndIns.instruction,\n        isAttribute = _getBindingNameAndIns.isAttribute;\n\n    var securityContexts = bindingParser.calcPossibleSecurityContexts(selector, bindingName, isAttribute).filter(function (context) {\n      return context !== SecurityContext.NONE;\n    });\n    var sanitizerFn = null;\n\n    if (securityContexts.length) {\n      if (securityContexts.length === 2 && securityContexts.indexOf(SecurityContext.URL) > -1 && securityContexts.indexOf(SecurityContext.RESOURCE_URL) > -1) {\n        // Special case for some URL attributes (such as \"src\" and \"href\") that may be a part\n        // of different security contexts. In this case we use special sanitization function and\n        // select the actual sanitizer at runtime based on a tag name that is provided while\n        // invoking sanitization function.\n        sanitizerFn = importExpr(Identifiers.sanitizeUrlOrResourceUrl);\n      } else {\n        sanitizerFn = resolveSanitizationFn(securityContexts[0], isAttribute);\n      }\n    }\n\n    var instructionParams = [literal(bindingName), bindingExpr.currValExpr];\n\n    if (sanitizerFn) {\n      instructionParams.push(sanitizerFn);\n    }\n\n    updateStatements.push.apply(updateStatements, _toConsumableArray(bindingExpr.stmts));\n\n    if (instruction === Identifiers.hostProperty) {\n      propertyBindings.push(instructionParams);\n    } else if (instruction === Identifiers.attribute) {\n      attributeBindings.push(instructionParams);\n    } else if (instruction === Identifiers.syntheticHostProperty) {\n      syntheticHostBindings.push(instructionParams);\n    } else {\n      updateStatements.push(importExpr(instruction).callFn(instructionParams).toStmt());\n    }\n  });\n\n  if (propertyBindings.length > 0) {\n    updateStatements.push(chainedInstruction(Identifiers.hostProperty, propertyBindings).toStmt());\n  }\n\n  if (attributeBindings.length > 0) {\n    updateStatements.push(chainedInstruction(Identifiers.attribute, attributeBindings).toStmt());\n  }\n\n  if (syntheticHostBindings.length > 0) {\n    updateStatements.push(chainedInstruction(Identifiers.syntheticHostProperty, syntheticHostBindings).toStmt());\n  } // since we're dealing with directives/components and both have hostBinding\n  // functions, we need to generate a special hostAttrs instruction that deals\n  // with both the assignment of styling as well as static attributes to the host\n  // element. The instruction below will instruct all initial styling (styling\n  // that is inside of a host binding within a directive/component) to be attached\n  // to the host element alongside any of the provided host attributes that were\n  // collected earlier.\n\n\n  var hostAttrs = convertAttributesToExpressions(hostBindingsMetadata.attributes);\n  styleBuilder.assignHostAttrs(hostAttrs, definitionMap);\n\n  if (styleBuilder.hasBindings) {\n    // finally each binding that was registered in the statement above will need to be added to\n    // the update block of a component/directive templateFn/hostBindingsFn so that the bindings\n    // are evaluated and updated for the element.\n    styleBuilder.buildUpdateLevelInstructions(getValueConverter()).forEach(function (instruction) {\n      if (instruction.calls.length > 0) {\n        var calls = [];\n        instruction.calls.forEach(function (call) {\n          // we subtract a value of `1` here because the binding slot was already allocated\n          // at the top of this method when all the input bindings were counted.\n          totalHostVarsCount += Math.max(call.allocateBindingSlots - MIN_STYLING_BINDING_SLOTS_REQUIRED, 0);\n          calls.push(convertStylingCall(call, bindingContext, bindingFn));\n        });\n        updateStatements.push(chainedInstruction(instruction.reference, calls).toStmt());\n      }\n    });\n  }\n\n  if (totalHostVarsCount) {\n    definitionMap.set('hostVars', literal(totalHostVarsCount));\n  }\n\n  if (createStatements.length > 0 || updateStatements.length > 0) {\n    var hostBindingsFnName = name ? \"\".concat(name, \"_HostBindings\") : null;\n    var statements = [];\n\n    if (createStatements.length > 0) {\n      statements.push(renderFlagCheckIfStmt(1\n      /* Create */\n      , createStatements));\n    }\n\n    if (updateStatements.length > 0) {\n      statements.push(renderFlagCheckIfStmt(2\n      /* Update */\n      , updateStatements));\n    }\n\n    return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], statements, INFERRED_TYPE, null, hostBindingsFnName);\n  }\n\n  return null;\n}\n\nfunction bindingFn(implicit, value) {\n  return _convertPropertyBinding(null, implicit, value, 'b', BindingForm.Expression, function () {\n    return error('Unexpected interpolation');\n  });\n}\n\nfunction convertStylingCall(call, bindingContext, bindingFn) {\n  return call.params(function (value) {\n    return bindingFn(bindingContext, value).currValExpr;\n  });\n}\n\nfunction getBindingNameAndInstruction(binding) {\n  var bindingName = binding.name;\n  var instruction; // Check to see if this is an attr binding or a property binding\n\n  var attrMatches = bindingName.match(ATTR_REGEX);\n\n  if (attrMatches) {\n    bindingName = attrMatches[1];\n    instruction = Identifiers.attribute;\n  } else {\n    if (binding.isAnimation) {\n      bindingName = prepareSyntheticPropertyName(bindingName); // host bindings that have a synthetic property (e.g. @foo) should always be rendered\n      // in the context of the component and not the parent. Therefore there is a special\n      // compatibility instruction available for this purpose.\n\n      instruction = Identifiers.syntheticHostProperty;\n    } else {\n      instruction = Identifiers.hostProperty;\n    }\n  }\n\n  return {\n    bindingName: bindingName,\n    instruction: instruction,\n    isAttribute: !!attrMatches\n  };\n}\n\nfunction createHostListeners(eventBindings, name) {\n  var listeners = [];\n  var syntheticListeners = [];\n  var instructions = [];\n  eventBindings.forEach(function (binding) {\n    var bindingName = binding.name && sanitizeIdentifier(binding.name);\n    var bindingFnName = binding.type === 1\n    /* Animation */\n    ? prepareSyntheticListenerFunctionName(bindingName, binding.targetOrPhase) : bindingName;\n    var handlerName = name && bindingName ? \"\".concat(name, \"_\").concat(bindingFnName, \"_HostBindingHandler\") : null;\n    var params = prepareEventListenerParameters(BoundEvent.fromParsedEvent(binding), handlerName);\n\n    if (binding.type == 1\n    /* Animation */\n    ) {\n      syntheticListeners.push(params);\n    } else {\n      listeners.push(params);\n    }\n  });\n\n  if (syntheticListeners.length > 0) {\n    instructions.push(chainedInstruction(Identifiers.syntheticHostListener, syntheticListeners).toStmt());\n  }\n\n  if (listeners.length > 0) {\n    instructions.push(chainedInstruction(Identifiers.listener, listeners).toStmt());\n  }\n\n  return instructions;\n}\n\nfunction metadataAsSummary(meta) {\n  // clang-format off\n  return {\n    // This is used by the BindingParser, which only deals with listeners and properties. There's no\n    // need to pass attributes to it.\n    hostAttributes: {},\n    hostListeners: meta.listeners,\n    hostProperties: meta.properties\n  }; // clang-format on\n}\n\nvar HOST_REG_EXP$1 = /^(?:\\[([^\\]]+)\\])|(?:\\(([^\\)]+)\\))$/;\n\nfunction parseHostBindings(host) {\n  var attributes = {};\n  var listeners = {};\n  var properties = {};\n  var specialAttributes = {};\n\n  for (var _i8 = 0, _Object$keys2 = Object.keys(host); _i8 < _Object$keys2.length; _i8++) {\n    var key = _Object$keys2[_i8];\n    var value = host[key];\n    var matches = key.match(HOST_REG_EXP$1);\n\n    if (matches === null) {\n      switch (key) {\n        case 'class':\n          if (typeof value !== 'string') {\n            // TODO(alxhub): make this a diagnostic.\n            throw new Error(\"Class binding must be string\");\n          }\n\n          specialAttributes.classAttr = value;\n          break;\n\n        case 'style':\n          if (typeof value !== 'string') {\n            // TODO(alxhub): make this a diagnostic.\n            throw new Error(\"Style binding must be string\");\n          }\n\n          specialAttributes.styleAttr = value;\n          break;\n\n        default:\n          if (typeof value === 'string') {\n            attributes[key] = literal(value);\n          } else {\n            attributes[key] = value;\n          }\n\n      }\n    } else if (matches[1\n    /* Binding */\n    ] != null) {\n      if (typeof value !== 'string') {\n        // TODO(alxhub): make this a diagnostic.\n        throw new Error(\"Property binding must be string\");\n      } // synthetic properties (the ones that have a `@` as a prefix)\n      // are still treated the same as regular properties. Therefore\n      // there is no point in storing them in a separate map.\n\n\n      properties[matches[1\n      /* Binding */\n      ]] = value;\n    } else if (matches[2\n    /* Event */\n    ] != null) {\n      if (typeof value !== 'string') {\n        // TODO(alxhub): make this a diagnostic.\n        throw new Error(\"Event binding must be string\");\n      }\n\n      listeners[matches[2\n      /* Event */\n      ]] = value;\n    }\n  }\n\n  return {\n    attributes: attributes,\n    listeners: listeners,\n    properties: properties,\n    specialAttributes: specialAttributes\n  };\n}\n/**\n * Verifies host bindings and returns the list of errors (if any). Empty array indicates that a\n * given set of host bindings has no errors.\n *\n * @param bindings set of host bindings to verify.\n * @param sourceSpan source span where host bindings were defined.\n * @returns array of errors associated with a given set of host bindings.\n */\n\n\nfunction verifyHostBindings(bindings, sourceSpan) {\n  var summary = metadataAsSummary(bindings); // TODO: abstract out host bindings verification logic and use it instead of\n  // creating events and properties ASTs to detect errors (FW-996)\n\n  var bindingParser = makeBindingParser();\n  bindingParser.createDirectiveHostEventAsts(summary, sourceSpan);\n  bindingParser.createBoundHostProperties(summary, sourceSpan);\n  return bindingParser.errors;\n}\n\nfunction compileStyles(styles, selector, hostSelector) {\n  var shadowCss = new ShadowCss();\n  return styles.map(function (style) {\n    return shadowCss.shimCssText(style, selector, hostSelector);\n  });\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * An interface for retrieving documents by URL that the compiler uses to\n * load templates.\n *\n * This is an abstract class, rather than an interface, so that it can be used\n * as injection token.\n */\n\n\nvar ResourceLoader = /*#__PURE__*/_createClass(function ResourceLoader() {\n  _classCallCheck(this, ResourceLoader);\n});\n/**\n * @license\n * Copyright Google LLC 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\nvar CompilerFacadeImpl = /*#__PURE__*/function () {\n  function CompilerFacadeImpl() {\n    var jitEvaluator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new JitEvaluator();\n\n    _classCallCheck(this, CompilerFacadeImpl);\n\n    this.jitEvaluator = jitEvaluator;\n    this.FactoryTarget = FactoryTarget;\n    this.ResourceLoader = ResourceLoader;\n    this.elementSchemaRegistry = new DomElementSchemaRegistry();\n  }\n\n  _createClass(CompilerFacadeImpl, [{\n    key: \"compilePipe\",\n    value: function compilePipe(angularCoreEnv, sourceMapUrl, facade) {\n      var metadata = {\n        name: facade.name,\n        type: wrapReference(facade.type),\n        internalType: new WrappedNodeExpr(facade.type),\n        typeArgumentCount: 0,\n        deps: null,\n        pipeName: facade.pipeName,\n        pure: facade.pure\n      };\n      var res = compilePipeFromMetadata(metadata);\n      return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n    }\n  }, {\n    key: \"compilePipeDeclaration\",\n    value: function compilePipeDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n      var meta = convertDeclarePipeFacadeToMetadata(declaration);\n      var res = compilePipeFromMetadata(meta);\n      return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n    }\n  }, {\n    key: \"compileInjectable\",\n    value: function compileInjectable(angularCoreEnv, sourceMapUrl, facade) {\n      var _a;\n\n      var _compileInjectable2 = _compileInjectable({\n        name: facade.name,\n        type: wrapReference(facade.type),\n        internalType: new WrappedNodeExpr(facade.type),\n        typeArgumentCount: facade.typeArgumentCount,\n        providedIn: computeProvidedIn(facade.providedIn),\n        useClass: convertToProviderExpression(facade, USE_CLASS),\n        useFactory: wrapExpression(facade, USE_FACTORY),\n        useValue: convertToProviderExpression(facade, USE_VALUE),\n        useExisting: convertToProviderExpression(facade, USE_EXISTING),\n        deps: (_a = facade.deps) === null || _a === void 0 ? void 0 : _a.map(convertR3DependencyMetadata)\n      },\n      /* resolveForwardRefs */\n      true),\n          expression = _compileInjectable2.expression,\n          statements = _compileInjectable2.statements;\n\n      return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);\n    }\n  }, {\n    key: \"compileInjectableDeclaration\",\n    value: function compileInjectableDeclaration(angularCoreEnv, sourceMapUrl, facade) {\n      var _a;\n\n      var _compileInjectable3 = _compileInjectable({\n        name: facade.type.name,\n        type: wrapReference(facade.type),\n        internalType: new WrappedNodeExpr(facade.type),\n        typeArgumentCount: 0,\n        providedIn: computeProvidedIn(facade.providedIn),\n        useClass: convertToProviderExpression(facade, USE_CLASS),\n        useFactory: wrapExpression(facade, USE_FACTORY),\n        useValue: convertToProviderExpression(facade, USE_VALUE),\n        useExisting: convertToProviderExpression(facade, USE_EXISTING),\n        deps: (_a = facade.deps) === null || _a === void 0 ? void 0 : _a.map(convertR3DeclareDependencyMetadata)\n      },\n      /* resolveForwardRefs */\n      true),\n          expression = _compileInjectable3.expression,\n          statements = _compileInjectable3.statements;\n\n      return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);\n    }\n  }, {\n    key: \"compileInjector\",\n    value: function compileInjector(angularCoreEnv, sourceMapUrl, facade) {\n      var meta = {\n        name: facade.name,\n        type: wrapReference(facade.type),\n        internalType: new WrappedNodeExpr(facade.type),\n        providers: new WrappedNodeExpr(facade.providers),\n        imports: facade.imports.map(function (i) {\n          return new WrappedNodeExpr(i);\n        })\n      };\n\n      var res = _compileInjector(meta);\n\n      return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n    }\n  }, {\n    key: \"compileInjectorDeclaration\",\n    value: function compileInjectorDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n      var meta = convertDeclareInjectorFacadeToMetadata(declaration);\n\n      var res = _compileInjector(meta);\n\n      return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n    }\n  }, {\n    key: \"compileNgModule\",\n    value: function compileNgModule(angularCoreEnv, sourceMapUrl, facade) {\n      var meta = {\n        type: wrapReference(facade.type),\n        internalType: new WrappedNodeExpr(facade.type),\n        adjacentType: new WrappedNodeExpr(facade.type),\n        bootstrap: facade.bootstrap.map(wrapReference),\n        declarations: facade.declarations.map(wrapReference),\n        imports: facade.imports.map(wrapReference),\n        exports: facade.exports.map(wrapReference),\n        emitInline: true,\n        containsForwardDecls: false,\n        schemas: facade.schemas ? facade.schemas.map(wrapReference) : null,\n        id: facade.id ? new WrappedNodeExpr(facade.id) : null\n      };\n\n      var res = _compileNgModule(meta);\n\n      return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n    }\n  }, {\n    key: \"compileNgModuleDeclaration\",\n    value: function compileNgModuleDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n      var expression = compileNgModuleDeclarationExpression(declaration);\n      return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, []);\n    }\n  }, {\n    key: \"compileDirective\",\n    value: function compileDirective(angularCoreEnv, sourceMapUrl, facade) {\n      var meta = convertDirectiveFacadeToMetadata(facade);\n      return this.compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta);\n    }\n  }, {\n    key: \"compileDirectiveDeclaration\",\n    value: function compileDirectiveDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n      var typeSourceSpan = this.createParseSourceSpan('Directive', declaration.type.name, sourceMapUrl);\n      var meta = convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan);\n      return this.compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta);\n    }\n  }, {\n    key: \"compileDirectiveFromMeta\",\n    value: function compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta) {\n      var constantPool = new ConstantPool();\n      var bindingParser = makeBindingParser();\n      var res = compileDirectiveFromMetadata(meta, constantPool, bindingParser);\n      return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);\n    }\n  }, {\n    key: \"compileComponent\",\n    value: function compileComponent(angularCoreEnv, sourceMapUrl, facade) {\n      // Parse the template and check for errors.\n      var _parseJitTemplate = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation),\n          template = _parseJitTemplate.template,\n          interpolation = _parseJitTemplate.interpolation; // Compile the component metadata, including template, into an expression.\n\n\n      var meta = Object.assign(Object.assign(Object.assign({}, facade), convertDirectiveFacadeToMetadata(facade)), {\n        selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(),\n        template: template,\n        declarationListEmitMode: 0\n        /* Direct */\n        ,\n        styles: [].concat(_toConsumableArray(facade.styles), _toConsumableArray(template.styles)),\n        encapsulation: facade.encapsulation,\n        interpolation: interpolation,\n        changeDetection: facade.changeDetection,\n        animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null,\n        viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) : null,\n        relativeContextFilePath: '',\n        i18nUseExternalIds: true\n      });\n      var jitExpressionSourceMap = \"ng:///\".concat(facade.name, \".js\");\n      return this.compileComponentFromMeta(angularCoreEnv, jitExpressionSourceMap, meta);\n    }\n  }, {\n    key: \"compileComponentDeclaration\",\n    value: function compileComponentDeclaration(angularCoreEnv, sourceMapUrl, declaration) {\n      var typeSourceSpan = this.createParseSourceSpan('Component', declaration.type.name, sourceMapUrl);\n      var meta = convertDeclareComponentFacadeToMetadata(declaration, typeSourceSpan, sourceMapUrl);\n      return this.compileComponentFromMeta(angularCoreEnv, sourceMapUrl, meta);\n    }\n  }, {\n    key: \"compileComponentFromMeta\",\n    value: function compileComponentFromMeta(angularCoreEnv, sourceMapUrl, meta) {\n      var constantPool = new ConstantPool();\n      var bindingParser = makeBindingParser(meta.interpolation);\n      var res = compileComponentFromMetadata(meta, constantPool, bindingParser);\n      return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);\n    }\n  }, {\n    key: \"compileFactory\",\n    value: function compileFactory(angularCoreEnv, sourceMapUrl, meta) {\n      var factoryRes = compileFactoryFunction({\n        name: meta.name,\n        type: wrapReference(meta.type),\n        internalType: new WrappedNodeExpr(meta.type),\n        typeArgumentCount: meta.typeArgumentCount,\n        deps: convertR3DependencyMetadataArray(meta.deps),\n        target: meta.target\n      });\n      return this.jitExpression(factoryRes.expression, angularCoreEnv, sourceMapUrl, factoryRes.statements);\n    }\n  }, {\n    key: \"compileFactoryDeclaration\",\n    value: function compileFactoryDeclaration(angularCoreEnv, sourceMapUrl, meta) {\n      var factoryRes = compileFactoryFunction({\n        name: meta.type.name,\n        type: wrapReference(meta.type),\n        internalType: new WrappedNodeExpr(meta.type),\n        typeArgumentCount: 0,\n        deps: Array.isArray(meta.deps) ? meta.deps.map(convertR3DeclareDependencyMetadata) : meta.deps,\n        target: meta.target\n      });\n      return this.jitExpression(factoryRes.expression, angularCoreEnv, sourceMapUrl, factoryRes.statements);\n    }\n  }, {\n    key: \"createParseSourceSpan\",\n    value: function createParseSourceSpan(kind, typeName, sourceUrl) {\n      return r3JitTypeSourceSpan(kind, typeName, sourceUrl);\n    }\n    /**\n     * JIT compiles an expression and returns the result of executing that expression.\n     *\n     * @param def the definition which will be compiled and executed to get the value to patch\n     * @param context an object map of @angular/core symbol names to symbols which will be available\n     * in the context of the compiled expression\n     * @param sourceUrl a URL to use for the source map of the compiled expression\n     * @param preStatements a collection of statements that should be evaluated before the expression.\n     */\n\n  }, {\n    key: \"jitExpression\",\n    value: function jitExpression(def, context, sourceUrl, preStatements) {\n      // The ConstantPool may contain Statements which declare variables used in the final expression.\n      // Therefore, its statements need to precede the actual JIT operation. The final statement is a\n      // declaration of $def which is set to the expression being compiled.\n      var statements = [].concat(_toConsumableArray(preStatements), [new DeclareVarStmt('$def', def, undefined, [StmtModifier.Exported])]);\n      var res = this.jitEvaluator.evaluateStatements(sourceUrl, statements, new R3JitReflector(context),\n      /* enableSourceMaps */\n      true);\n      return res['$def'];\n    }\n  }]);\n\n  return CompilerFacadeImpl;\n}();\n\nvar USE_CLASS = /*@__PURE__*/Object.keys({\n  useClass: null\n})[0];\nvar USE_FACTORY = /*@__PURE__*/Object.keys({\n  useFactory: null\n})[0];\nvar USE_VALUE = /*@__PURE__*/Object.keys({\n  useValue: null\n})[0];\nvar USE_EXISTING = /*@__PURE__*/Object.keys({\n  useExisting: null\n})[0];\n\nfunction convertToR3QueryMetadata(facade) {\n  return Object.assign(Object.assign({}, facade), {\n    predicate: convertQueryPredicate(facade.predicate),\n    read: facade.read ? new WrappedNodeExpr(facade.read) : null,\n    static: facade.static,\n    emitDistinctChangesOnly: facade.emitDistinctChangesOnly\n  });\n}\n\nfunction convertQueryDeclarationToMetadata(declaration) {\n  var _a, _b, _c, _d;\n\n  return {\n    propertyName: declaration.propertyName,\n    first: (_a = declaration.first) !== null && _a !== void 0 ? _a : false,\n    predicate: convertQueryPredicate(declaration.predicate),\n    descendants: (_b = declaration.descendants) !== null && _b !== void 0 ? _b : false,\n    read: declaration.read ? new WrappedNodeExpr(declaration.read) : null,\n    static: (_c = declaration.static) !== null && _c !== void 0 ? _c : false,\n    emitDistinctChangesOnly: (_d = declaration.emitDistinctChangesOnly) !== null && _d !== void 0 ? _d : true\n  };\n}\n\nfunction convertQueryPredicate(predicate) {\n  return Array.isArray(predicate) ? // The predicate is an array of strings so pass it through.\n  predicate : // The predicate is a type - assume that we will need to unwrap any `forwardRef()` calls.\n  createMayBeForwardRefExpression(new WrappedNodeExpr(predicate), 1\n  /* Wrapped */\n  );\n}\n\nfunction convertDirectiveFacadeToMetadata(facade) {\n  var inputsFromMetadata = parseInputOutputs(facade.inputs || []);\n  var outputsFromMetadata = parseInputOutputs(facade.outputs || []);\n  var propMetadata = facade.propMetadata;\n  var inputsFromType = {};\n  var outputsFromType = {};\n\n  var _loop = function _loop(field) {\n    if (propMetadata.hasOwnProperty(field)) {\n      propMetadata[field].forEach(function (ann) {\n        if (isInput(ann)) {\n          inputsFromType[field] = ann.bindingPropertyName ? [ann.bindingPropertyName, field] : field;\n        } else if (isOutput(ann)) {\n          outputsFromType[field] = ann.bindingPropertyName || field;\n        }\n      });\n    }\n  };\n\n  for (var field in propMetadata) {\n    _loop(field);\n  }\n\n  return Object.assign(Object.assign({}, facade), {\n    typeArgumentCount: 0,\n    typeSourceSpan: facade.typeSourceSpan,\n    type: wrapReference(facade.type),\n    internalType: new WrappedNodeExpr(facade.type),\n    deps: null,\n    host: extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host),\n    inputs: Object.assign(Object.assign({}, inputsFromMetadata), inputsFromType),\n    outputs: Object.assign(Object.assign({}, outputsFromMetadata), outputsFromType),\n    queries: facade.queries.map(convertToR3QueryMetadata),\n    providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,\n    viewQueries: facade.viewQueries.map(convertToR3QueryMetadata),\n    fullInheritance: false\n  });\n}\n\nfunction convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {\n  var _a, _b, _c, _d, _e, _f, _g, _h;\n\n  return {\n    name: declaration.type.name,\n    type: wrapReference(declaration.type),\n    typeSourceSpan: typeSourceSpan,\n    internalType: new WrappedNodeExpr(declaration.type),\n    selector: (_a = declaration.selector) !== null && _a !== void 0 ? _a : null,\n    inputs: (_b = declaration.inputs) !== null && _b !== void 0 ? _b : {},\n    outputs: (_c = declaration.outputs) !== null && _c !== void 0 ? _c : {},\n    host: convertHostDeclarationToMetadata(declaration.host),\n    queries: ((_d = declaration.queries) !== null && _d !== void 0 ? _d : []).map(convertQueryDeclarationToMetadata),\n    viewQueries: ((_e = declaration.viewQueries) !== null && _e !== void 0 ? _e : []).map(convertQueryDeclarationToMetadata),\n    providers: declaration.providers !== undefined ? new WrappedNodeExpr(declaration.providers) : null,\n    exportAs: (_f = declaration.exportAs) !== null && _f !== void 0 ? _f : null,\n    usesInheritance: (_g = declaration.usesInheritance) !== null && _g !== void 0 ? _g : false,\n    lifecycle: {\n      usesOnChanges: (_h = declaration.usesOnChanges) !== null && _h !== void 0 ? _h : false\n    },\n    deps: null,\n    typeArgumentCount: 0,\n    fullInheritance: false\n  };\n}\n\nfunction convertHostDeclarationToMetadata() {\n  var host = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  var _a, _b, _c;\n\n  return {\n    attributes: convertOpaqueValuesToExpressions((_a = host.attributes) !== null && _a !== void 0 ? _a : {}),\n    listeners: (_b = host.listeners) !== null && _b !== void 0 ? _b : {},\n    properties: (_c = host.properties) !== null && _c !== void 0 ? _c : {},\n    specialAttributes: {\n      classAttr: host.classAttribute,\n      styleAttr: host.styleAttribute\n    }\n  };\n}\n\nfunction convertOpaqueValuesToExpressions(obj) {\n  var result = {};\n\n  for (var _i9 = 0, _Object$keys3 = Object.keys(obj); _i9 < _Object$keys3.length; _i9++) {\n    var key = _Object$keys3[_i9];\n    result[key] = new WrappedNodeExpr(obj[key]);\n  }\n\n  return result;\n}\n\nfunction convertDeclareComponentFacadeToMetadata(declaration, typeSourceSpan, sourceMapUrl) {\n  var _a, _b, _c, _d, _e, _f;\n\n  var _parseJitTemplate2 = parseJitTemplate(declaration.template, declaration.type.name, sourceMapUrl, (_a = declaration.preserveWhitespaces) !== null && _a !== void 0 ? _a : false, declaration.interpolation),\n      template = _parseJitTemplate2.template,\n      interpolation = _parseJitTemplate2.interpolation;\n\n  return Object.assign(Object.assign({}, convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan)), {\n    template: template,\n    styles: (_b = declaration.styles) !== null && _b !== void 0 ? _b : [],\n    directives: ((_c = declaration.components) !== null && _c !== void 0 ? _c : []).concat((_d = declaration.directives) !== null && _d !== void 0 ? _d : []).map(convertUsedDirectiveDeclarationToMetadata),\n    pipes: convertUsedPipesToMetadata(declaration.pipes),\n    viewProviders: declaration.viewProviders !== undefined ? new WrappedNodeExpr(declaration.viewProviders) : null,\n    animations: declaration.animations !== undefined ? new WrappedNodeExpr(declaration.animations) : null,\n    changeDetection: (_e = declaration.changeDetection) !== null && _e !== void 0 ? _e : ChangeDetectionStrategy.Default,\n    encapsulation: (_f = declaration.encapsulation) !== null && _f !== void 0 ? _f : ViewEncapsulation.Emulated,\n    interpolation: interpolation,\n    declarationListEmitMode: 2\n    /* ClosureResolved */\n    ,\n    relativeContextFilePath: '',\n    i18nUseExternalIds: true\n  });\n}\n\nfunction convertUsedDirectiveDeclarationToMetadata(declaration) {\n  var _a, _b, _c;\n\n  return {\n    selector: declaration.selector,\n    type: new WrappedNodeExpr(declaration.type),\n    inputs: (_a = declaration.inputs) !== null && _a !== void 0 ? _a : [],\n    outputs: (_b = declaration.outputs) !== null && _b !== void 0 ? _b : [],\n    exportAs: (_c = declaration.exportAs) !== null && _c !== void 0 ? _c : null\n  };\n}\n\nfunction convertUsedPipesToMetadata(declaredPipes) {\n  var pipes = new Map();\n\n  if (declaredPipes === undefined) {\n    return pipes;\n  }\n\n  for (var _i10 = 0, _Object$keys4 = Object.keys(declaredPipes); _i10 < _Object$keys4.length; _i10++) {\n    var pipeName = _Object$keys4[_i10];\n    var pipeType = declaredPipes[pipeName];\n    pipes.set(pipeName, new WrappedNodeExpr(pipeType));\n  }\n\n  return pipes;\n}\n\nfunction parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {\n  var interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG; // Parse the template and check for errors.\n\n  var parsed = parseTemplate(template, sourceMapUrl, {\n    preserveWhitespaces: preserveWhitespaces,\n    interpolationConfig: interpolationConfig\n  });\n\n  if (parsed.errors !== null) {\n    var errors = parsed.errors.map(function (err) {\n      return err.toString();\n    }).join(', ');\n    throw new Error(\"Errors during JIT compilation of template for \".concat(typeName, \": \").concat(errors));\n  }\n\n  return {\n    template: parsed,\n    interpolation: interpolationConfig\n  };\n}\n/**\n * Convert the expression, if present to an `R3ProviderExpression`.\n *\n * In JIT mode we do not want the compiler to wrap the expression in a `forwardRef()` call because,\n * if it is referencing a type that has not yet been defined, it will have already been wrapped in\n * a `forwardRef()` - either by the application developer or during partial-compilation. Thus we can\n * use `ForwardRefHandling.None`.\n */\n\n\nfunction convertToProviderExpression(obj, property) {\n  if (obj.hasOwnProperty(property)) {\n    return createMayBeForwardRefExpression(new WrappedNodeExpr(obj[property]), 0\n    /* None */\n    );\n  } else {\n    return undefined;\n  }\n}\n\nfunction wrapExpression(obj, property) {\n  if (obj.hasOwnProperty(property)) {\n    return new WrappedNodeExpr(obj[property]);\n  } else {\n    return undefined;\n  }\n}\n\nfunction computeProvidedIn(providedIn) {\n  var expression = providedIn == null || typeof providedIn === 'string' ? new LiteralExpr(providedIn !== null && providedIn !== void 0 ? providedIn : null) : new WrappedNodeExpr(providedIn); // See `convertToProviderExpression()` for why `isForwardRef` is false.\n\n  return createMayBeForwardRefExpression(expression, 0\n  /* None */\n  );\n}\n\nfunction convertR3DependencyMetadataArray(facades) {\n  return facades == null ? null : facades.map(convertR3DependencyMetadata);\n}\n\nfunction convertR3DependencyMetadata(facade) {\n  var isAttributeDep = facade.attribute != null; // both `null` and `undefined`\n\n  var rawToken = facade.token === null ? null : new WrappedNodeExpr(facade.token); // In JIT mode, if the dep is an `@Attribute()` then we use the attribute name given in\n  // `attribute` rather than the `token`.\n\n  var token = isAttributeDep ? new WrappedNodeExpr(facade.attribute) : rawToken;\n  return createR3DependencyMetadata(token, isAttributeDep, facade.host, facade.optional, facade.self, facade.skipSelf);\n}\n\nfunction convertR3DeclareDependencyMetadata(facade) {\n  var _a, _b, _c, _d, _e;\n\n  var isAttributeDep = (_a = facade.attribute) !== null && _a !== void 0 ? _a : false;\n  var token = facade.token === null ? null : new WrappedNodeExpr(facade.token);\n  return createR3DependencyMetadata(token, isAttributeDep, (_b = facade.host) !== null && _b !== void 0 ? _b : false, (_c = facade.optional) !== null && _c !== void 0 ? _c : false, (_d = facade.self) !== null && _d !== void 0 ? _d : false, (_e = facade.skipSelf) !== null && _e !== void 0 ? _e : false);\n}\n\nfunction createR3DependencyMetadata(token, isAttributeDep, host, optional, self, skipSelf) {\n  // If the dep is an `@Attribute()` the `attributeNameType` ought to be the `unknown` type.\n  // But types are not available at runtime so we just use a literal `\"<unknown>\"` string as a dummy\n  // marker.\n  var attributeNameType = isAttributeDep ? literal('unknown') : null;\n  return {\n    token: token,\n    attributeNameType: attributeNameType,\n    host: host,\n    optional: optional,\n    self: self,\n    skipSelf: skipSelf\n  };\n}\n\nfunction extractHostBindings(propMetadata, sourceSpan, host) {\n  // First parse the declarations from the metadata.\n  var bindings = parseHostBindings(host || {}); // After that check host bindings for errors\n\n  var errors = verifyHostBindings(bindings, sourceSpan);\n\n  if (errors.length) {\n    throw new Error(errors.map(function (error) {\n      return error.msg;\n    }).join('\\n'));\n  } // Next, loop over the properties of the object, looking for @HostBinding and @HostListener.\n\n\n  var _loop2 = function _loop2(field) {\n    if (propMetadata.hasOwnProperty(field)) {\n      propMetadata[field].forEach(function (ann) {\n        if (isHostBinding(ann)) {\n          // Since this is a decorator, we know that the value is a class member. Always access it\n          // through `this` so that further down the line it can't be confused for a literal value\n          // (e.g. if there's a property called `true`).\n          bindings.properties[ann.hostPropertyName || field] = getSafePropertyAccessString('this', field);\n        } else if (isHostListener(ann)) {\n          bindings.listeners[ann.eventName || field] = \"\".concat(field, \"(\").concat((ann.args || []).join(','), \")\");\n        }\n      });\n    }\n  };\n\n  for (var field in propMetadata) {\n    _loop2(field);\n  }\n\n  return bindings;\n}\n\nfunction isHostBinding(value) {\n  return value.ngMetadataName === 'HostBinding';\n}\n\nfunction isHostListener(value) {\n  return value.ngMetadataName === 'HostListener';\n}\n\nfunction isInput(value) {\n  return value.ngMetadataName === 'Input';\n}\n\nfunction isOutput(value) {\n  return value.ngMetadataName === 'Output';\n}\n\nfunction parseInputOutputs(values) {\n  return values.reduce(function (map, value) {\n    var _value$split$map = value.split(',').map(function (piece) {\n      return piece.trim();\n    }),\n        _value$split$map2 = _slicedToArray(_value$split$map, 2),\n        field = _value$split$map2[0],\n        property = _value$split$map2[1];\n\n    map[field] = property || field;\n    return map;\n  }, {});\n}\n\nfunction convertDeclarePipeFacadeToMetadata(declaration) {\n  var _a;\n\n  return {\n    name: declaration.type.name,\n    type: wrapReference(declaration.type),\n    internalType: new WrappedNodeExpr(declaration.type),\n    typeArgumentCount: 0,\n    pipeName: declaration.name,\n    deps: null,\n    pure: (_a = declaration.pure) !== null && _a !== void 0 ? _a : true\n  };\n}\n\nfunction convertDeclareInjectorFacadeToMetadata(declaration) {\n  return {\n    name: declaration.type.name,\n    type: wrapReference(declaration.type),\n    internalType: new WrappedNodeExpr(declaration.type),\n    providers: declaration.providers !== undefined ? new WrappedNodeExpr(declaration.providers) : null,\n    imports: declaration.imports !== undefined ? declaration.imports.map(function (i) {\n      return new WrappedNodeExpr(i);\n    }) : []\n  };\n}\n\nfunction publishFacade(global) {\n  var ng = global.ng || (global.ng = {});\n  ng.ɵcompilerFacade = new CompilerFacadeImpl();\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar VERSION$1 = /*@__PURE__*/new Version('12.2.16');\n/**\n * @license\n * Copyright Google LLC 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\nvar CompilerConfig = /*#__PURE__*/_createClass(function CompilerConfig() {\n  var _ref22 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n      _ref22$defaultEncapsu = _ref22.defaultEncapsulation,\n      defaultEncapsulation = _ref22$defaultEncapsu === void 0 ? ViewEncapsulation.Emulated : _ref22$defaultEncapsu,\n      _ref22$useJit = _ref22.useJit,\n      useJit = _ref22$useJit === void 0 ? true : _ref22$useJit,\n      _ref22$jitDevMode = _ref22.jitDevMode,\n      jitDevMode = _ref22$jitDevMode === void 0 ? false : _ref22$jitDevMode,\n      _ref22$missingTransla = _ref22.missingTranslation,\n      missingTranslation = _ref22$missingTransla === void 0 ? null : _ref22$missingTransla,\n      preserveWhitespaces = _ref22.preserveWhitespaces,\n      strictInjectionParameters = _ref22.strictInjectionParameters;\n\n  _classCallCheck(this, CompilerConfig);\n\n  this.defaultEncapsulation = defaultEncapsulation;\n  this.useJit = !!useJit;\n  this.jitDevMode = !!jitDevMode;\n  this.missingTranslation = missingTranslation;\n  this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces));\n  this.strictInjectionParameters = strictInjectionParameters === true;\n});\n\nfunction preserveWhitespacesDefault(preserveWhitespacesOption) {\n  var defaultSetting = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  return preserveWhitespacesOption === null ? defaultSetting : preserveWhitespacesOption;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar DirectiveNormalizer = /*#__PURE__*/function () {\n  function DirectiveNormalizer(_resourceLoader, _urlResolver, _htmlParser, _config) {\n    _classCallCheck(this, DirectiveNormalizer);\n\n    this._resourceLoader = _resourceLoader;\n    this._urlResolver = _urlResolver;\n    this._htmlParser = _htmlParser;\n    this._config = _config;\n    this._resourceLoaderCache = new Map();\n  }\n\n  _createClass(DirectiveNormalizer, [{\n    key: \"clearCache\",\n    value: function clearCache() {\n      this._resourceLoaderCache.clear();\n    }\n  }, {\n    key: \"clearCacheFor\",\n    value: function clearCacheFor(normalizedDirective) {\n      var _this200 = this;\n\n      if (!normalizedDirective.isComponent) {\n        return;\n      }\n\n      var template = normalizedDirective.template;\n\n      this._resourceLoaderCache.delete(template.templateUrl);\n\n      template.externalStylesheets.forEach(function (stylesheet) {\n        _this200._resourceLoaderCache.delete(stylesheet.moduleUrl);\n      });\n    }\n  }, {\n    key: \"_fetch\",\n    value: function _fetch(url) {\n      var result = this._resourceLoaderCache.get(url);\n\n      if (!result) {\n        result = this._resourceLoader.get(url);\n\n        this._resourceLoaderCache.set(url, result);\n      }\n\n      return result;\n    }\n  }, {\n    key: \"normalizeTemplate\",\n    value: function normalizeTemplate(prenormData) {\n      var _this201 = this;\n\n      if (isDefined(prenormData.template)) {\n        if (isDefined(prenormData.templateUrl)) {\n          throw syntaxError(\"'\".concat(stringify(prenormData.componentType), \"' component cannot define both template and templateUrl\"));\n        }\n\n        if (typeof prenormData.template !== 'string') {\n          throw syntaxError(\"The template specified for component \".concat(stringify(prenormData.componentType), \" is not a string\"));\n        }\n      } else if (isDefined(prenormData.templateUrl)) {\n        if (typeof prenormData.templateUrl !== 'string') {\n          throw syntaxError(\"The templateUrl specified for component \".concat(stringify(prenormData.componentType), \" is not a string\"));\n        }\n      } else {\n        throw syntaxError(\"No template specified for component \".concat(stringify(prenormData.componentType)));\n      }\n\n      if (isDefined(prenormData.preserveWhitespaces) && typeof prenormData.preserveWhitespaces !== 'boolean') {\n        throw syntaxError(\"The preserveWhitespaces option for component \".concat(stringify(prenormData.componentType), \" must be a boolean\"));\n      }\n\n      return SyncAsync.then(this._preParseTemplate(prenormData), function (preparsedTemplate) {\n        return _this201._normalizeTemplateMetadata(prenormData, preparsedTemplate);\n      });\n    }\n  }, {\n    key: \"_preParseTemplate\",\n    value: function _preParseTemplate(prenomData) {\n      var _this202 = this;\n\n      var template;\n      var templateUrl;\n\n      if (prenomData.template != null) {\n        template = prenomData.template;\n        templateUrl = prenomData.moduleUrl;\n      } else {\n        templateUrl = this._urlResolver.resolve(prenomData.moduleUrl, prenomData.templateUrl);\n        template = this._fetch(templateUrl);\n      }\n\n      return SyncAsync.then(template, function (template) {\n        return _this202._preparseLoadedTemplate(prenomData, template, templateUrl);\n      });\n    }\n  }, {\n    key: \"_preparseLoadedTemplate\",\n    value: function _preparseLoadedTemplate(prenormData, template, templateAbsUrl) {\n      var isInline = !!prenormData.template;\n      var interpolationConfig = InterpolationConfig.fromArray(prenormData.interpolation);\n      var templateUrl = templateSourceUrl({\n        reference: prenormData.ngModuleType\n      }, {\n        type: {\n          reference: prenormData.componentType\n        }\n      }, {\n        isInline: isInline,\n        templateUrl: templateAbsUrl\n      });\n\n      var rootNodesAndErrors = this._htmlParser.parse(template, templateUrl, {\n        tokenizeExpansionForms: true,\n        interpolationConfig: interpolationConfig\n      });\n\n      if (rootNodesAndErrors.errors.length > 0) {\n        var errorString = rootNodesAndErrors.errors.join('\\n');\n        throw syntaxError(\"Template parse errors:\\n\".concat(errorString));\n      }\n\n      var templateMetadataStyles = this._normalizeStylesheet(new CompileStylesheetMetadata({\n        styles: prenormData.styles,\n        moduleUrl: prenormData.moduleUrl\n      }));\n\n      var visitor = new TemplatePreparseVisitor();\n      visitAll$1(visitor, rootNodesAndErrors.rootNodes);\n\n      var templateStyles = this._normalizeStylesheet(new CompileStylesheetMetadata({\n        styles: visitor.styles,\n        styleUrls: visitor.styleUrls,\n        moduleUrl: templateAbsUrl\n      }));\n\n      var styles = templateMetadataStyles.styles.concat(templateStyles.styles);\n      var inlineStyleUrls = templateMetadataStyles.styleUrls.concat(templateStyles.styleUrls);\n\n      var styleUrls = this._normalizeStylesheet(new CompileStylesheetMetadata({\n        styleUrls: prenormData.styleUrls,\n        moduleUrl: prenormData.moduleUrl\n      })).styleUrls;\n\n      return {\n        template: template,\n        templateUrl: templateAbsUrl,\n        isInline: isInline,\n        htmlAst: rootNodesAndErrors,\n        styles: styles,\n        inlineStyleUrls: inlineStyleUrls,\n        styleUrls: styleUrls,\n        ngContentSelectors: visitor.ngContentSelectors\n      };\n    }\n  }, {\n    key: \"_normalizeTemplateMetadata\",\n    value: function _normalizeTemplateMetadata(prenormData, preparsedTemplate) {\n      var _this203 = this;\n\n      return SyncAsync.then(this._loadMissingExternalStylesheets(preparsedTemplate.styleUrls.concat(preparsedTemplate.inlineStyleUrls)), function (externalStylesheets) {\n        return _this203._normalizeLoadedTemplateMetadata(prenormData, preparsedTemplate, externalStylesheets);\n      });\n    }\n  }, {\n    key: \"_normalizeLoadedTemplateMetadata\",\n    value: function _normalizeLoadedTemplateMetadata(prenormData, preparsedTemplate, stylesheets) {\n      var _this204 = this;\n\n      // Algorithm:\n      // - produce exactly 1 entry per original styleUrl in\n      // CompileTemplateMetadata.externalStylesheets with all styles inlined\n      // - inline all styles that are referenced by the template into CompileTemplateMetadata.styles.\n      // Reason: be able to determine how many stylesheets there are even without loading\n      // the template nor the stylesheets, so we can create a stub for TypeScript always synchronously\n      // (as resource loading may be async)\n      var styles = _toConsumableArray(preparsedTemplate.styles);\n\n      this._inlineStyles(preparsedTemplate.inlineStyleUrls, stylesheets, styles);\n\n      var styleUrls = preparsedTemplate.styleUrls;\n      var externalStylesheets = styleUrls.map(function (styleUrl) {\n        var stylesheet = stylesheets.get(styleUrl);\n\n        var styles = _toConsumableArray(stylesheet.styles);\n\n        _this204._inlineStyles(stylesheet.styleUrls, stylesheets, styles);\n\n        return new CompileStylesheetMetadata({\n          moduleUrl: styleUrl,\n          styles: styles\n        });\n      });\n      var encapsulation = prenormData.encapsulation;\n\n      if (encapsulation == null) {\n        encapsulation = this._config.defaultEncapsulation;\n      }\n\n      if (encapsulation === ViewEncapsulation.Emulated && styles.length === 0 && styleUrls.length === 0) {\n        encapsulation = ViewEncapsulation.None;\n      }\n\n      return new CompileTemplateMetadata({\n        encapsulation: encapsulation,\n        template: preparsedTemplate.template,\n        templateUrl: preparsedTemplate.templateUrl,\n        htmlAst: preparsedTemplate.htmlAst,\n        styles: styles,\n        styleUrls: styleUrls,\n        ngContentSelectors: preparsedTemplate.ngContentSelectors,\n        animations: prenormData.animations,\n        interpolation: prenormData.interpolation,\n        isInline: preparsedTemplate.isInline,\n        externalStylesheets: externalStylesheets,\n        preserveWhitespaces: preserveWhitespacesDefault(prenormData.preserveWhitespaces, this._config.preserveWhitespaces)\n      });\n    }\n  }, {\n    key: \"_inlineStyles\",\n    value: function _inlineStyles(styleUrls, stylesheets, targetStyles) {\n      var _this205 = this;\n\n      styleUrls.forEach(function (styleUrl) {\n        var stylesheet = stylesheets.get(styleUrl);\n        stylesheet.styles.forEach(function (style) {\n          return targetStyles.push(style);\n        });\n\n        _this205._inlineStyles(stylesheet.styleUrls, stylesheets, targetStyles);\n      });\n    }\n  }, {\n    key: \"_loadMissingExternalStylesheets\",\n    value: function _loadMissingExternalStylesheets(styleUrls) {\n      var _this206 = this;\n\n      var loadedStylesheets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Map();\n      return SyncAsync.then(SyncAsync.all(styleUrls.filter(function (styleUrl) {\n        return !loadedStylesheets.has(styleUrl);\n      }).map(function (styleUrl) {\n        return SyncAsync.then(_this206._fetch(styleUrl), function (loadedStyle) {\n          var stylesheet = _this206._normalizeStylesheet(new CompileStylesheetMetadata({\n            styles: [loadedStyle],\n            moduleUrl: styleUrl\n          }));\n\n          loadedStylesheets.set(styleUrl, stylesheet);\n          return _this206._loadMissingExternalStylesheets(stylesheet.styleUrls, loadedStylesheets);\n        });\n      })), function (_) {\n        return loadedStylesheets;\n      });\n    }\n  }, {\n    key: \"_normalizeStylesheet\",\n    value: function _normalizeStylesheet(stylesheet) {\n      var _this207 = this;\n\n      var moduleUrl = stylesheet.moduleUrl;\n      var allStyleUrls = stylesheet.styleUrls.filter(isStyleUrlResolvable).map(function (url) {\n        return _this207._urlResolver.resolve(moduleUrl, url);\n      });\n      var allStyles = stylesheet.styles.map(function (style) {\n        var styleWithImports = extractStyleUrls(_this207._urlResolver, moduleUrl, style);\n        allStyleUrls.push.apply(allStyleUrls, _toConsumableArray(styleWithImports.styleUrls));\n        return styleWithImports.style;\n      });\n      return new CompileStylesheetMetadata({\n        styles: allStyles,\n        styleUrls: allStyleUrls,\n        moduleUrl: moduleUrl\n      });\n    }\n  }]);\n\n  return DirectiveNormalizer;\n}();\n\nvar TemplatePreparseVisitor = /*#__PURE__*/function () {\n  function TemplatePreparseVisitor() {\n    _classCallCheck(this, TemplatePreparseVisitor);\n\n    this.ngContentSelectors = [];\n    this.styles = [];\n    this.styleUrls = [];\n    this.ngNonBindableStackCount = 0;\n  }\n\n  _createClass(TemplatePreparseVisitor, [{\n    key: \"visitElement\",\n    value: function visitElement(ast, context) {\n      var preparsedElement = preparseElement(ast);\n\n      switch (preparsedElement.type) {\n        case PreparsedElementType.NG_CONTENT:\n          if (this.ngNonBindableStackCount === 0) {\n            this.ngContentSelectors.push(preparsedElement.selectAttr);\n          }\n\n          break;\n\n        case PreparsedElementType.STYLE:\n          var textContent = '';\n          ast.children.forEach(function (child) {\n            if (child instanceof Text$3) {\n              textContent += child.value;\n            }\n          });\n          this.styles.push(textContent);\n          break;\n\n        case PreparsedElementType.STYLESHEET:\n          this.styleUrls.push(preparsedElement.hrefAttr);\n          break;\n\n        default:\n          break;\n      }\n\n      if (preparsedElement.nonBindable) {\n        this.ngNonBindableStackCount++;\n      }\n\n      visitAll$1(this, ast.children);\n\n      if (preparsedElement.nonBindable) {\n        this.ngNonBindableStackCount--;\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(ast, context) {\n      visitAll$1(this, ast.cases);\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(ast, context) {\n      visitAll$1(this, ast.expression);\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(ast, context) {\n      return null;\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(ast, context) {\n      return null;\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(ast, context) {\n      return null;\n    }\n  }]);\n\n  return TemplatePreparseVisitor;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar QUERY_METADATA_IDENTIFIERS = [createViewChild, createViewChildren, createContentChild, createContentChildren];\n/*\n * Resolve a `Type` for {@link Directive}.\n *\n * This interface can be overridden by the application developer to create custom behavior.\n *\n * See {@link Compiler}\n */\n\nvar DirectiveResolver = /*#__PURE__*/function () {\n  function DirectiveResolver(_reflector) {\n    _classCallCheck(this, DirectiveResolver);\n\n    this._reflector = _reflector;\n  }\n\n  _createClass(DirectiveResolver, [{\n    key: \"isDirective\",\n    value: function isDirective(type) {\n      var typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n\n      return typeMetadata && typeMetadata.some(isDirectiveMetadata);\n    }\n  }, {\n    key: \"resolve\",\n    value: function resolve(type) {\n      var throwIfNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n      var typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n\n      if (typeMetadata) {\n        var metadata = findLast(typeMetadata, isDirectiveMetadata);\n\n        if (metadata) {\n          var propertyMetadata = this._reflector.propMetadata(type);\n\n          var guards = this._reflector.guards(type);\n\n          return this._mergeWithPropertyMetadata(metadata, propertyMetadata, guards, type);\n        }\n      }\n\n      if (throwIfNotFound) {\n        throw new Error(\"No Directive annotation found on \".concat(stringify(type)));\n      }\n\n      return null;\n    }\n  }, {\n    key: \"_mergeWithPropertyMetadata\",\n    value: function _mergeWithPropertyMetadata(dm, propertyMetadata, guards, directiveType) {\n      var inputs = [];\n      var outputs = [];\n      var host = {};\n      var queries = {};\n      Object.keys(propertyMetadata).forEach(function (propName) {\n        var input = findLast(propertyMetadata[propName], function (a) {\n          return createInput.isTypeOf(a);\n        });\n\n        if (input) {\n          if (input.bindingPropertyName) {\n            inputs.push(\"\".concat(propName, \": \").concat(input.bindingPropertyName));\n          } else {\n            inputs.push(propName);\n          }\n        }\n\n        var output = findLast(propertyMetadata[propName], function (a) {\n          return createOutput.isTypeOf(a);\n        });\n\n        if (output) {\n          if (output.bindingPropertyName) {\n            outputs.push(\"\".concat(propName, \": \").concat(output.bindingPropertyName));\n          } else {\n            outputs.push(propName);\n          }\n        }\n\n        var hostBindings = propertyMetadata[propName].filter(function (a) {\n          return createHostBinding.isTypeOf(a);\n        });\n        hostBindings.forEach(function (hostBinding) {\n          if (hostBinding.hostPropertyName) {\n            var startWith = hostBinding.hostPropertyName[0];\n\n            if (startWith === '(') {\n              throw new Error(\"@HostBinding can not bind to events. Use @HostListener instead.\");\n            } else if (startWith === '[') {\n              throw new Error(\"@HostBinding parameter should be a property name, 'class.<name>', or 'attr.<name>'.\");\n            }\n\n            host[\"[\".concat(hostBinding.hostPropertyName, \"]\")] = propName;\n          } else {\n            host[\"[\".concat(propName, \"]\")] = propName;\n          }\n        });\n        var hostListeners = propertyMetadata[propName].filter(function (a) {\n          return createHostListener.isTypeOf(a);\n        });\n        hostListeners.forEach(function (hostListener) {\n          var args = hostListener.args || [];\n          host[\"(\".concat(hostListener.eventName, \")\")] = \"\".concat(propName, \"(\").concat(args.join(','), \")\");\n        });\n        var query = findLast(propertyMetadata[propName], function (a) {\n          return QUERY_METADATA_IDENTIFIERS.some(function (i) {\n            return i.isTypeOf(a);\n          });\n        });\n\n        if (query) {\n          queries[propName] = query;\n        }\n      });\n      return this._merge(dm, inputs, outputs, host, queries, guards, directiveType);\n    }\n  }, {\n    key: \"_extractPublicName\",\n    value: function _extractPublicName(def) {\n      return splitAtColon(def, [null, def])[1].trim();\n    }\n  }, {\n    key: \"_dedupeBindings\",\n    value: function _dedupeBindings(bindings) {\n      var names = new Set();\n      var publicNames = new Set();\n      var reversedResult = []; // go last to first to allow later entries to overwrite previous entries\n\n      for (var i = bindings.length - 1; i >= 0; i--) {\n        var binding = bindings[i];\n\n        var name = this._extractPublicName(binding);\n\n        publicNames.add(name);\n\n        if (!names.has(name)) {\n          names.add(name);\n          reversedResult.push(binding);\n        }\n      }\n\n      return reversedResult.reverse();\n    }\n  }, {\n    key: \"_merge\",\n    value: function _merge(directive, inputs, outputs, host, queries, guards, directiveType) {\n      var mergedInputs = this._dedupeBindings(directive.inputs ? directive.inputs.concat(inputs) : inputs);\n\n      var mergedOutputs = this._dedupeBindings(directive.outputs ? directive.outputs.concat(outputs) : outputs);\n\n      var mergedHost = directive.host ? Object.assign(Object.assign({}, directive.host), host) : host;\n      var mergedQueries = directive.queries ? Object.assign(Object.assign({}, directive.queries), queries) : queries;\n\n      if (createComponent.isTypeOf(directive)) {\n        var comp = directive;\n        return createComponent({\n          selector: comp.selector,\n          inputs: mergedInputs,\n          outputs: mergedOutputs,\n          host: mergedHost,\n          exportAs: comp.exportAs,\n          moduleId: comp.moduleId,\n          queries: mergedQueries,\n          changeDetection: comp.changeDetection,\n          providers: comp.providers,\n          viewProviders: comp.viewProviders,\n          entryComponents: comp.entryComponents,\n          template: comp.template,\n          templateUrl: comp.templateUrl,\n          styles: comp.styles,\n          styleUrls: comp.styleUrls,\n          encapsulation: comp.encapsulation,\n          animations: comp.animations,\n          interpolation: comp.interpolation,\n          preserveWhitespaces: directive.preserveWhitespaces\n        });\n      } else {\n        return createDirective({\n          selector: directive.selector,\n          inputs: mergedInputs,\n          outputs: mergedOutputs,\n          host: mergedHost,\n          exportAs: directive.exportAs,\n          queries: mergedQueries,\n          providers: directive.providers,\n          guards: guards\n        });\n      }\n    }\n  }]);\n\n  return DirectiveResolver;\n}();\n\nfunction isDirectiveMetadata(type) {\n  return createDirective.isTypeOf(type) || createComponent.isTypeOf(type);\n}\n\nfunction findLast(arr, condition) {\n  for (var i = arr.length - 1; i >= 0; i--) {\n    if (condition(arr[i])) {\n      return arr[i];\n    }\n  }\n\n  return null;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar _I18N_ATTR = 'i18n';\nvar _I18N_ATTR_PREFIX = 'i18n-';\nvar _I18N_COMMENT_PREFIX_REGEXP = /^i18n:?/;\nvar MEANING_SEPARATOR = '|';\nvar ID_SEPARATOR = '@@';\nvar i18nCommentsWarned = false;\n/**\n * Extract translatable messages from an html AST\n */\n\nfunction extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs) {\n  var visitor = new _Visitor$2(implicitTags, implicitAttrs);\n  return visitor.extract(nodes, interpolationConfig);\n}\n\nfunction mergeTranslations(nodes, translations, interpolationConfig, implicitTags, implicitAttrs) {\n  var visitor = new _Visitor$2(implicitTags, implicitAttrs);\n  return visitor.merge(nodes, translations, interpolationConfig);\n}\n\nvar ExtractionResult = /*#__PURE__*/_createClass(function ExtractionResult(messages, errors) {\n  _classCallCheck(this, ExtractionResult);\n\n  this.messages = messages;\n  this.errors = errors;\n});\n\nvar _VisitorMode = /*@__PURE__*/function (_VisitorMode) {\n  _VisitorMode[_VisitorMode[\"Extract\"] = 0] = \"Extract\";\n  _VisitorMode[_VisitorMode[\"Merge\"] = 1] = \"Merge\";\n  return _VisitorMode;\n}({});\n/**\n * This Visitor is used:\n * 1. to extract all the translatable strings from an html AST (see `extract()`),\n * 2. to replace the translatable strings with the actual translations (see `merge()`)\n *\n * @internal\n */\n\n\nvar _Visitor$2 = /*#__PURE__*/function () {\n  function _Visitor$2(_implicitTags, _implicitAttrs) {\n    _classCallCheck(this, _Visitor$2);\n\n    this._implicitTags = _implicitTags;\n    this._implicitAttrs = _implicitAttrs;\n  }\n  /**\n   * Extracts the messages from the tree\n   */\n\n\n  _createClass(_Visitor$2, [{\n    key: \"extract\",\n    value: function extract(nodes, interpolationConfig) {\n      var _this208 = this;\n\n      this._init(_VisitorMode.Extract, interpolationConfig);\n\n      nodes.forEach(function (node) {\n        return node.visit(_this208, null);\n      });\n\n      if (this._inI18nBlock) {\n        this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n      }\n\n      return new ExtractionResult(this._messages, this._errors);\n    }\n    /**\n     * Returns a tree where all translatable nodes are translated\n     */\n\n  }, {\n    key: \"merge\",\n    value: function merge(nodes, translations, interpolationConfig) {\n      this._init(_VisitorMode.Merge, interpolationConfig);\n\n      this._translations = translations; // Construct a single fake root element\n\n      var wrapper = new Element$1('wrapper', [], nodes, undefined, undefined, undefined);\n      var translatedNode = wrapper.visit(this, null);\n\n      if (this._inI18nBlock) {\n        this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n      }\n\n      return new ParseTreeResult(translatedNode.children, this._errors);\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(icuCase, context) {\n      // Parse cases for translatable html attributes\n      var expression = visitAll$1(this, icuCase.expression, context);\n\n      if (this._mode === _VisitorMode.Merge) {\n        return new ExpansionCase(icuCase.value, expression, icuCase.sourceSpan, icuCase.valueSourceSpan, icuCase.expSourceSpan);\n      }\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(icu, context) {\n      this._mayBeAddBlockChildren(icu);\n\n      var wasInIcu = this._inIcu;\n\n      if (!this._inIcu) {\n        // nested ICU messages should not be extracted but top-level translated as a whole\n        if (this._isInTranslatableSection) {\n          this._addMessage([icu]);\n        }\n\n        this._inIcu = true;\n      }\n\n      var cases = visitAll$1(this, icu.cases, context);\n\n      if (this._mode === _VisitorMode.Merge) {\n        icu = new Expansion(icu.switchValue, icu.type, cases, icu.sourceSpan, icu.switchValueSourceSpan);\n      }\n\n      this._inIcu = wasInIcu;\n      return icu;\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {\n      var isOpening = _isOpeningComment(comment);\n\n      if (isOpening && this._isInTranslatableSection) {\n        this._reportError(comment, 'Could not start a block inside a translatable section');\n\n        return;\n      }\n\n      var isClosing = _isClosingComment(comment);\n\n      if (isClosing && !this._inI18nBlock) {\n        this._reportError(comment, 'Trying to close an unopened block');\n\n        return;\n      }\n\n      if (!this._inI18nNode && !this._inIcu) {\n        if (!this._inI18nBlock) {\n          if (isOpening) {\n            // deprecated from v5 you should use <ng-container i18n> instead of i18n comments\n            if (!i18nCommentsWarned && console && console.warn) {\n              i18nCommentsWarned = true;\n              var details = comment.sourceSpan.details ? \", \".concat(comment.sourceSpan.details) : ''; // TODO(ocombe): use a log service once there is a public one available\n\n              console.warn(\"I18n comments are deprecated, use an <ng-container> element instead (\".concat(comment.sourceSpan.start).concat(details, \")\"));\n            }\n\n            this._inI18nBlock = true;\n            this._blockStartDepth = this._depth;\n            this._blockChildren = [];\n            this._blockMeaningAndDesc = comment.value.replace(_I18N_COMMENT_PREFIX_REGEXP, '').trim();\n\n            this._openTranslatableSection(comment);\n          }\n        } else {\n          if (isClosing) {\n            if (this._depth == this._blockStartDepth) {\n              this._closeTranslatableSection(comment, this._blockChildren);\n\n              this._inI18nBlock = false;\n\n              var message = this._addMessage(this._blockChildren, this._blockMeaningAndDesc); // merge attributes in sections\n\n\n              var nodes = this._translateMessage(comment, message);\n\n              return visitAll$1(this, nodes);\n            } else {\n              this._reportError(comment, 'I18N blocks should not cross element boundaries');\n\n              return;\n            }\n          }\n        }\n      }\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      if (this._isInTranslatableSection) {\n        this._mayBeAddBlockChildren(text);\n      }\n\n      return text;\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(el, context) {\n      var _this209 = this;\n\n      this._mayBeAddBlockChildren(el);\n\n      this._depth++;\n      var wasInI18nNode = this._inI18nNode;\n      var wasInImplicitNode = this._inImplicitNode;\n      var childNodes = [];\n      var translatedChildNodes = undefined; // Extract:\n      // - top level nodes with the (implicit) \"i18n\" attribute if not already in a section\n      // - ICU messages\n\n      var i18nAttr = _getI18nAttr(el);\n\n      var i18nMeta = i18nAttr ? i18nAttr.value : '';\n      var isImplicit = this._implicitTags.some(function (tag) {\n        return el.name === tag;\n      }) && !this._inIcu && !this._isInTranslatableSection;\n      var isTopLevelImplicit = !wasInImplicitNode && isImplicit;\n      this._inImplicitNode = wasInImplicitNode || isImplicit;\n\n      if (!this._isInTranslatableSection && !this._inIcu) {\n        if (i18nAttr || isTopLevelImplicit) {\n          this._inI18nNode = true;\n\n          var message = this._addMessage(el.children, i18nMeta);\n\n          translatedChildNodes = this._translateMessage(el, message);\n        }\n\n        if (this._mode == _VisitorMode.Extract) {\n          var isTranslatable = i18nAttr || isTopLevelImplicit;\n          if (isTranslatable) this._openTranslatableSection(el);\n          visitAll$1(this, el.children);\n          if (isTranslatable) this._closeTranslatableSection(el, el.children);\n        }\n      } else {\n        if (i18nAttr || isTopLevelImplicit) {\n          this._reportError(el, 'Could not mark an element as translatable inside a translatable section');\n        }\n\n        if (this._mode == _VisitorMode.Extract) {\n          // Descend into child nodes for extraction\n          visitAll$1(this, el.children);\n        }\n      }\n\n      if (this._mode === _VisitorMode.Merge) {\n        var visitNodes = translatedChildNodes || el.children;\n        visitNodes.forEach(function (child) {\n          var visited = child.visit(_this209, context);\n\n          if (visited && !_this209._isInTranslatableSection) {\n            // Do not add the children from translatable sections (= i18n blocks here)\n            // They will be added later in this loop when the block closes (i.e. on `<!-- /i18n -->`)\n            childNodes = childNodes.concat(visited);\n          }\n        });\n      }\n\n      this._visitAttributesOf(el);\n\n      this._depth--;\n      this._inI18nNode = wasInI18nNode;\n      this._inImplicitNode = wasInImplicitNode;\n\n      if (this._mode === _VisitorMode.Merge) {\n        var translatedAttrs = this._translateAttributes(el);\n\n        return new Element$1(el.name, translatedAttrs, childNodes, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {\n      throw new Error('unreachable code');\n    }\n  }, {\n    key: \"_init\",\n    value: function _init(mode, interpolationConfig) {\n      this._mode = mode;\n      this._inI18nBlock = false;\n      this._inI18nNode = false;\n      this._depth = 0;\n      this._inIcu = false;\n      this._msgCountAtSectionStart = undefined;\n      this._errors = [];\n      this._messages = [];\n      this._inImplicitNode = false;\n      this._createI18nMessage = createI18nMessageFactory(interpolationConfig);\n    } // looks for translatable attributes\n\n  }, {\n    key: \"_visitAttributesOf\",\n    value: function _visitAttributesOf(el) {\n      var _this210 = this;\n\n      var explicitAttrNameToValue = {};\n      var implicitAttrNames = this._implicitAttrs[el.name] || [];\n      el.attrs.filter(function (attr) {\n        return attr.name.startsWith(_I18N_ATTR_PREFIX);\n      }).forEach(function (attr) {\n        return explicitAttrNameToValue[attr.name.slice(_I18N_ATTR_PREFIX.length)] = attr.value;\n      });\n      el.attrs.forEach(function (attr) {\n        if (attr.name in explicitAttrNameToValue) {\n          _this210._addMessage([attr], explicitAttrNameToValue[attr.name]);\n        } else if (implicitAttrNames.some(function (name) {\n          return attr.name === name;\n        })) {\n          _this210._addMessage([attr]);\n        }\n      });\n    } // add a translatable message\n\n  }, {\n    key: \"_addMessage\",\n    value: function _addMessage(ast, msgMeta) {\n      if (ast.length == 0 || ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {\n        // Do not create empty messages\n        return null;\n      }\n\n      var _parseMessageMeta2 = _parseMessageMeta(msgMeta),\n          meaning = _parseMessageMeta2.meaning,\n          description = _parseMessageMeta2.description,\n          id = _parseMessageMeta2.id;\n\n      var message = this._createI18nMessage(ast, meaning, description, id);\n\n      this._messages.push(message);\n\n      return message;\n    } // Translates the given message given the `TranslationBundle`\n    // This is used for translating elements / blocks - see `_translateAttributes` for attributes\n    // no-op when called in extraction mode (returns [])\n\n  }, {\n    key: \"_translateMessage\",\n    value: function _translateMessage(el, message) {\n      if (message && this._mode === _VisitorMode.Merge) {\n        var nodes = this._translations.get(message);\n\n        if (nodes) {\n          return nodes;\n        }\n\n        this._reportError(el, \"Translation unavailable for message id=\\\"\".concat(this._translations.digest(message), \"\\\"\"));\n      }\n\n      return [];\n    } // translate the attributes of an element and remove i18n specific attributes\n\n  }, {\n    key: \"_translateAttributes\",\n    value: function _translateAttributes(el) {\n      var _this211 = this;\n\n      var attributes = el.attrs;\n      var i18nParsedMessageMeta = {};\n      attributes.forEach(function (attr) {\n        if (attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n          i18nParsedMessageMeta[attr.name.slice(_I18N_ATTR_PREFIX.length)] = _parseMessageMeta(attr.value);\n        }\n      });\n      var translatedAttributes = [];\n      attributes.forEach(function (attr) {\n        if (attr.name === _I18N_ATTR || attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n          // strip i18n specific attributes\n          return;\n        }\n\n        if (attr.value && attr.value != '' && i18nParsedMessageMeta.hasOwnProperty(attr.name)) {\n          var _i18nParsedMessageMet = i18nParsedMessageMeta[attr.name],\n              meaning = _i18nParsedMessageMet.meaning,\n              description = _i18nParsedMessageMet.description,\n              id = _i18nParsedMessageMet.id;\n\n          var message = _this211._createI18nMessage([attr], meaning, description, id);\n\n          var nodes = _this211._translations.get(message);\n\n          if (nodes) {\n            if (nodes.length == 0) {\n              translatedAttributes.push(new Attribute(attr.name, '', attr.sourceSpan, undefined\n              /* keySpan */\n              , undefined\n              /* valueSpan */\n              , undefined\n              /* valueTokens */\n              , undefined\n              /* i18n */\n              ));\n            } else if (nodes[0] instanceof Text$3) {\n              var value = nodes[0].value;\n              translatedAttributes.push(new Attribute(attr.name, value, attr.sourceSpan, undefined\n              /* keySpan */\n              , undefined\n              /* valueSpan */\n              , undefined\n              /* valueTokens */\n              , undefined\n              /* i18n */\n              ));\n            } else {\n              _this211._reportError(el, \"Unexpected translation for attribute \\\"\".concat(attr.name, \"\\\" (id=\\\"\").concat(id || _this211._translations.digest(message), \"\\\")\"));\n            }\n          } else {\n            _this211._reportError(el, \"Translation unavailable for attribute \\\"\".concat(attr.name, \"\\\" (id=\\\"\").concat(id || _this211._translations.digest(message), \"\\\")\"));\n          }\n        } else {\n          translatedAttributes.push(attr);\n        }\n      });\n      return translatedAttributes;\n    }\n    /**\n     * Add the node as a child of the block when:\n     * - we are in a block,\n     * - we are not inside a ICU message (those are handled separately),\n     * - the node is a \"direct child\" of the block\n     */\n\n  }, {\n    key: \"_mayBeAddBlockChildren\",\n    value: function _mayBeAddBlockChildren(node) {\n      if (this._inI18nBlock && !this._inIcu && this._depth == this._blockStartDepth) {\n        this._blockChildren.push(node);\n      }\n    }\n    /**\n     * Marks the start of a section, see `_closeTranslatableSection`\n     */\n\n  }, {\n    key: \"_openTranslatableSection\",\n    value: function _openTranslatableSection(node) {\n      if (this._isInTranslatableSection) {\n        this._reportError(node, 'Unexpected section start');\n      } else {\n        this._msgCountAtSectionStart = this._messages.length;\n      }\n    }\n    /**\n     * A translatable section could be:\n     * - the content of translatable element,\n     * - nodes between `<!-- i18n -->` and `<!-- /i18n -->` comments\n     */\n\n  }, {\n    key: \"_isInTranslatableSection\",\n    get: function get() {\n      return this._msgCountAtSectionStart !== void 0;\n    }\n    /**\n     * Terminates a section.\n     *\n     * If a section has only one significant children (comments not significant) then we should not\n     * keep the message from this children:\n     *\n     * `<p i18n=\"meaning|description\">{ICU message}</p>` would produce two messages:\n     * - one for the <p> content with meaning and description,\n     * - another one for the ICU message.\n     *\n     * In this case the last message is discarded as it contains less information (the AST is\n     * otherwise identical).\n     *\n     * Note that we should still keep messages extracted from attributes inside the section (ie in the\n     * ICU message here)\n     */\n\n  }, {\n    key: \"_closeTranslatableSection\",\n    value: function _closeTranslatableSection(node, directChildren) {\n      if (!this._isInTranslatableSection) {\n        this._reportError(node, 'Unexpected section end');\n\n        return;\n      }\n\n      var startIndex = this._msgCountAtSectionStart;\n      var significantChildren = directChildren.reduce(function (count, node) {\n        return count + (node instanceof Comment$1 ? 0 : 1);\n      }, 0);\n\n      if (significantChildren == 1) {\n        for (var i = this._messages.length - 1; i >= startIndex; i--) {\n          var ast = this._messages[i].nodes;\n\n          if (!(ast.length == 1 && ast[0] instanceof Text$1)) {\n            this._messages.splice(i, 1);\n\n            break;\n          }\n        }\n      }\n\n      this._msgCountAtSectionStart = undefined;\n    }\n  }, {\n    key: \"_reportError\",\n    value: function _reportError(node, msg) {\n      this._errors.push(new I18nError(node.sourceSpan, msg));\n    }\n  }]);\n\n  return _Visitor$2;\n}();\n\nfunction _isOpeningComment(n) {\n  return !!(n instanceof Comment$1 && n.value && n.value.startsWith('i18n'));\n}\n\nfunction _isClosingComment(n) {\n  return !!(n instanceof Comment$1 && n.value && n.value === '/i18n');\n}\n\nfunction _getI18nAttr(p) {\n  return p.attrs.find(function (attr) {\n    return attr.name === _I18N_ATTR;\n  }) || null;\n}\n\nfunction _parseMessageMeta(i18n) {\n  if (!i18n) return {\n    meaning: '',\n    description: '',\n    id: ''\n  };\n  var idIndex = i18n.indexOf(ID_SEPARATOR);\n  var descIndex = i18n.indexOf(MEANING_SEPARATOR);\n\n  var _ref23 = idIndex > -1 ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''],\n      _ref24 = _slicedToArray(_ref23, 2),\n      meaningAndDesc = _ref24[0],\n      id = _ref24[1];\n\n  var _ref25 = descIndex > -1 ? [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] : ['', meaningAndDesc],\n      _ref26 = _slicedToArray(_ref25, 2),\n      meaning = _ref26[0],\n      description = _ref26[1];\n\n  return {\n    meaning: meaning,\n    description: description,\n    id: id.trim()\n  };\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar XmlTagDefinition = /*#__PURE__*/function () {\n  function XmlTagDefinition() {\n    _classCallCheck(this, XmlTagDefinition);\n\n    this.closedByParent = false;\n    this.isVoid = false;\n    this.ignoreFirstLf = false;\n    this.canSelfClose = true;\n    this.preventNamespaceInheritance = false;\n  }\n\n  _createClass(XmlTagDefinition, [{\n    key: \"requireExtraParent\",\n    value: function requireExtraParent(currentParent) {\n      return false;\n    }\n  }, {\n    key: \"isClosedByChild\",\n    value: function isClosedByChild(name) {\n      return false;\n    }\n  }, {\n    key: \"getContentType\",\n    value: function getContentType() {\n      return TagContentType.PARSABLE_DATA;\n    }\n  }]);\n\n  return XmlTagDefinition;\n}();\n\nvar _TAG_DEFINITION = /*@__PURE__*/new XmlTagDefinition();\n\nfunction getXmlTagDefinition(tagName) {\n  return _TAG_DEFINITION;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar XmlParser = /*#__PURE__*/function (_Parser2) {\n  _inherits(XmlParser, _Parser2);\n\n  var _super101 = _createSuper(XmlParser);\n\n  function XmlParser() {\n    _classCallCheck(this, XmlParser);\n\n    return _super101.call(this, getXmlTagDefinition);\n  }\n\n  _createClass(XmlParser, [{\n    key: \"parse\",\n    value: function parse(source, url, options) {\n      return _get(_getPrototypeOf(XmlParser.prototype), \"parse\", this).call(this, source, url, options);\n    }\n  }]);\n\n  return XmlParser;\n}(Parser);\n/**\n * @license\n * Copyright Google LLC 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\nvar _VERSION = '1.2';\nvar _XMLNS = 'urn:oasis:names:tc:xliff:document:1.2'; // TODO(vicb): make this a param (s/_/-/)\n\nvar _DEFAULT_SOURCE_LANG = 'en';\nvar _PLACEHOLDER_TAG$1 = 'x';\nvar _MARKER_TAG = 'mrk';\nvar _FILE_TAG = 'file';\nvar _SOURCE_TAG$1 = 'source';\nvar _SEGMENT_SOURCE_TAG = 'seg-source';\nvar _ALT_TRANS_TAG = 'alt-trans';\nvar _TARGET_TAG = 'target';\nvar _UNIT_TAG = 'trans-unit';\nvar _CONTEXT_GROUP_TAG = 'context-group';\nvar _CONTEXT_TAG = 'context'; // https://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html\n// https://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2.html\n\nvar Xliff = /*#__PURE__*/function (_Serializer2) {\n  _inherits(Xliff, _Serializer2);\n\n  var _super102 = _createSuper(Xliff);\n\n  function Xliff() {\n    _classCallCheck(this, Xliff);\n\n    return _super102.apply(this, arguments);\n  }\n\n  _createClass(Xliff, [{\n    key: \"write\",\n    value: function write(messages, locale) {\n      var visitor = new _WriteVisitor();\n      var transUnits = [];\n      messages.forEach(function (message) {\n        var _transUnit$children;\n\n        var contextTags = [];\n        message.sources.forEach(function (source) {\n          var contextGroupTag = new Tag(_CONTEXT_GROUP_TAG, {\n            purpose: 'location'\n          });\n          contextGroupTag.children.push(new CR(10), new Tag(_CONTEXT_TAG, {\n            'context-type': 'sourcefile'\n          }, [new Text$2(source.filePath)]), new CR(10), new Tag(_CONTEXT_TAG, {\n            'context-type': 'linenumber'\n          }, [new Text$2(\"\".concat(source.startLine))]), new CR(8));\n          contextTags.push(new CR(8), contextGroupTag);\n        });\n        var transUnit = new Tag(_UNIT_TAG, {\n          id: message.id,\n          datatype: 'html'\n        });\n\n        (_transUnit$children = transUnit.children).push.apply(_transUnit$children, [new CR(8), new Tag(_SOURCE_TAG$1, {}, visitor.serialize(message.nodes))].concat(contextTags));\n\n        if (message.description) {\n          transUnit.children.push(new CR(8), new Tag('note', {\n            priority: '1',\n            from: 'description'\n          }, [new Text$2(message.description)]));\n        }\n\n        if (message.meaning) {\n          transUnit.children.push(new CR(8), new Tag('note', {\n            priority: '1',\n            from: 'meaning'\n          }, [new Text$2(message.meaning)]));\n        }\n\n        transUnit.children.push(new CR(6));\n        transUnits.push(new CR(6), transUnit);\n      });\n      var body = new Tag('body', {}, [].concat(transUnits, [new CR(4)]));\n      var file = new Tag('file', {\n        'source-language': locale || _DEFAULT_SOURCE_LANG,\n        datatype: 'plaintext',\n        original: 'ng2.template'\n      }, [new CR(4), body, new CR(2)]);\n      var xliff = new Tag('xliff', {\n        version: _VERSION,\n        xmlns: _XMLNS\n      }, [new CR(2), file, new CR()]);\n      return serialize([new Declaration({\n        version: '1.0',\n        encoding: 'UTF-8'\n      }), new CR(), xliff, new CR()]);\n    }\n  }, {\n    key: \"load\",\n    value: function load(content, url) {\n      // xliff to xml nodes\n      var xliffParser = new XliffParser();\n\n      var _xliffParser$parse = xliffParser.parse(content, url),\n          locale = _xliffParser$parse.locale,\n          msgIdToHtml = _xliffParser$parse.msgIdToHtml,\n          errors = _xliffParser$parse.errors; // xml nodes to i18n nodes\n\n\n      var i18nNodesByMsgId = {};\n      var converter = new XmlToI18n();\n      Object.keys(msgIdToHtml).forEach(function (msgId) {\n        var _converter$convert = converter.convert(msgIdToHtml[msgId], url),\n            i18nNodes = _converter$convert.i18nNodes,\n            e = _converter$convert.errors;\n\n        errors.push.apply(errors, _toConsumableArray(e));\n        i18nNodesByMsgId[msgId] = i18nNodes;\n      });\n\n      if (errors.length) {\n        throw new Error(\"xliff parse errors:\\n\".concat(errors.join('\\n')));\n      }\n\n      return {\n        locale: locale,\n        i18nNodesByMsgId: i18nNodesByMsgId\n      };\n    }\n  }, {\n    key: \"digest\",\n    value: function digest(message) {\n      return _digest2(message);\n    }\n  }]);\n\n  return Xliff;\n}(Serializer);\n\nvar _WriteVisitor = /*#__PURE__*/function () {\n  function _WriteVisitor() {\n    _classCallCheck(this, _WriteVisitor);\n  }\n\n  _createClass(_WriteVisitor, [{\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      return [new Text$2(text.value)];\n    }\n  }, {\n    key: \"visitContainer\",\n    value: function visitContainer(container, context) {\n      var _this212 = this;\n\n      var nodes = [];\n      container.children.forEach(function (node) {\n        return nodes.push.apply(nodes, _toConsumableArray(node.visit(_this212)));\n      });\n      return nodes;\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu, context) {\n      var _this213 = this;\n\n      var nodes = [new Text$2(\"{\".concat(icu.expressionPlaceholder, \", \").concat(icu.type, \", \"))];\n      Object.keys(icu.cases).forEach(function (c) {\n        nodes.push.apply(nodes, [new Text$2(\"\".concat(c, \" {\"))].concat(_toConsumableArray(icu.cases[c].visit(_this213)), [new Text$2(\"} \")]));\n      });\n      nodes.push(new Text$2(\"}\"));\n      return nodes;\n    }\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph, context) {\n      var ctype = getCtypeForTag(ph.tag);\n\n      if (ph.isVoid) {\n        // void tags have no children nor closing tags\n        return [new Tag(_PLACEHOLDER_TAG$1, {\n          id: ph.startName,\n          ctype: ctype,\n          'equiv-text': \"<\".concat(ph.tag, \"/>\")\n        })];\n      }\n\n      var startTagPh = new Tag(_PLACEHOLDER_TAG$1, {\n        id: ph.startName,\n        ctype: ctype,\n        'equiv-text': \"<\".concat(ph.tag, \">\")\n      });\n      var closeTagPh = new Tag(_PLACEHOLDER_TAG$1, {\n        id: ph.closeName,\n        ctype: ctype,\n        'equiv-text': \"</\".concat(ph.tag, \">\")\n      });\n      return [startTagPh].concat(_toConsumableArray(this.serialize(ph.children)), [closeTagPh]);\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph, context) {\n      return [new Tag(_PLACEHOLDER_TAG$1, {\n        id: ph.name,\n        'equiv-text': \"{{\".concat(ph.value, \"}}\")\n      })];\n    }\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, context) {\n      var equivText = \"{\".concat(ph.value.expression, \", \").concat(ph.value.type, \", \").concat(Object.keys(ph.value.cases).map(function (value) {\n        return value + ' {...}';\n      }).join(' '), \"}\");\n      return [new Tag(_PLACEHOLDER_TAG$1, {\n        id: ph.name,\n        'equiv-text': equivText\n      })];\n    }\n  }, {\n    key: \"serialize\",\n    value: function serialize(nodes) {\n      var _ref27,\n          _this214 = this;\n\n      return (_ref27 = []).concat.apply(_ref27, _toConsumableArray(nodes.map(function (node) {\n        return node.visit(_this214);\n      })));\n    }\n  }]);\n\n  return _WriteVisitor;\n}(); // TODO(vicb): add error management (structure)\n// Extract messages as xml nodes from the xliff file\n\n\nvar XliffParser = /*#__PURE__*/function () {\n  function XliffParser() {\n    _classCallCheck(this, XliffParser);\n\n    this._locale = null;\n  }\n\n  _createClass(XliffParser, [{\n    key: \"parse\",\n    value: function parse(xliff, url) {\n      this._unitMlString = null;\n      this._msgIdToHtml = {};\n      var xml = new XmlParser().parse(xliff, url);\n      this._errors = xml.errors;\n      visitAll$1(this, xml.rootNodes, null);\n      return {\n        msgIdToHtml: this._msgIdToHtml,\n        errors: this._errors,\n        locale: this._locale\n      };\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(element, context) {\n      switch (element.name) {\n        case _UNIT_TAG:\n          this._unitMlString = null;\n          var idAttr = element.attrs.find(function (attr) {\n            return attr.name === 'id';\n          });\n\n          if (!idAttr) {\n            this._addError(element, \"<\".concat(_UNIT_TAG, \"> misses the \\\"id\\\" attribute\"));\n          } else {\n            var id = idAttr.value;\n\n            if (this._msgIdToHtml.hasOwnProperty(id)) {\n              this._addError(element, \"Duplicated translations for msg \".concat(id));\n            } else {\n              visitAll$1(this, element.children, null);\n\n              if (typeof this._unitMlString === 'string') {\n                this._msgIdToHtml[id] = this._unitMlString;\n              } else {\n                this._addError(element, \"Message \".concat(id, \" misses a translation\"));\n              }\n            }\n          }\n\n          break;\n        // ignore those tags\n\n        case _SOURCE_TAG$1:\n        case _SEGMENT_SOURCE_TAG:\n        case _ALT_TRANS_TAG:\n          break;\n\n        case _TARGET_TAG:\n          var innerTextStart = element.startSourceSpan.end.offset;\n          var innerTextEnd = element.endSourceSpan.start.offset;\n          var content = element.startSourceSpan.start.file.content;\n          var innerText = content.slice(innerTextStart, innerTextEnd);\n          this._unitMlString = innerText;\n          break;\n\n        case _FILE_TAG:\n          var localeAttr = element.attrs.find(function (attr) {\n            return attr.name === 'target-language';\n          });\n\n          if (localeAttr) {\n            this._locale = localeAttr.value;\n          }\n\n          visitAll$1(this, element.children, null);\n          break;\n\n        default:\n          // TODO(vicb): assert file structure, xliff version\n          // For now only recurse on unhandled nodes\n          visitAll$1(this, element.children, null);\n      }\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {}\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {}\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {}\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(expansion, context) {}\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(expansionCase, context) {}\n  }, {\n    key: \"_addError\",\n    value: function _addError(node, message) {\n      this._errors.push(new I18nError(node.sourceSpan, message));\n    }\n  }]);\n\n  return XliffParser;\n}(); // Convert ml nodes (xliff syntax) to i18n nodes\n\n\nvar XmlToI18n = /*#__PURE__*/function () {\n  function XmlToI18n() {\n    _classCallCheck(this, XmlToI18n);\n  }\n\n  _createClass(XmlToI18n, [{\n    key: \"convert\",\n    value: function convert(message, url) {\n      var _ref28;\n\n      var xmlIcu = new XmlParser().parse(message, url, {\n        tokenizeExpansionForms: true\n      });\n      this._errors = xmlIcu.errors;\n      var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ? [] : (_ref28 = []).concat.apply(_ref28, _toConsumableArray(visitAll$1(this, xmlIcu.rootNodes)));\n      return {\n        i18nNodes: i18nNodes,\n        errors: this._errors\n      };\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      return new Text$1(text.value, text.sourceSpan);\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(el, context) {\n      if (el.name === _PLACEHOLDER_TAG$1) {\n        var nameAttr = el.attrs.find(function (attr) {\n          return attr.name === 'id';\n        });\n\n        if (nameAttr) {\n          return new Placeholder('', nameAttr.value, el.sourceSpan);\n        }\n\n        this._addError(el, \"<\".concat(_PLACEHOLDER_TAG$1, \"> misses the \\\"id\\\" attribute\"));\n\n        return null;\n      }\n\n      if (el.name === _MARKER_TAG) {\n        var _ref29;\n\n        return (_ref29 = []).concat.apply(_ref29, _toConsumableArray(visitAll$1(this, el.children)));\n      }\n\n      this._addError(el, \"Unexpected tag\");\n\n      return null;\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(icu, context) {\n      var caseMap = {};\n      visitAll$1(this, icu.cases).forEach(function (c) {\n        caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n      });\n      return new Icu$1(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(icuCase, context) {\n      return {\n        value: icuCase.value,\n        nodes: visitAll$1(this, icuCase.expression)\n      };\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {}\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {}\n  }, {\n    key: \"_addError\",\n    value: function _addError(node, message) {\n      this._errors.push(new I18nError(node.sourceSpan, message));\n    }\n  }]);\n\n  return XmlToI18n;\n}();\n\nfunction getCtypeForTag(tag) {\n  switch (tag.toLowerCase()) {\n    case 'br':\n      return 'lb';\n\n    case 'img':\n      return 'image';\n\n    default:\n      return \"x-\".concat(tag);\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar _VERSION$1 = '2.0';\nvar _XMLNS$1 = 'urn:oasis:names:tc:xliff:document:2.0'; // TODO(vicb): make this a param (s/_/-/)\n\nvar _DEFAULT_SOURCE_LANG$1 = 'en';\nvar _PLACEHOLDER_TAG$2 = 'ph';\nvar _PLACEHOLDER_SPANNING_TAG = 'pc';\nvar _MARKER_TAG$1 = 'mrk';\nvar _XLIFF_TAG = 'xliff';\nvar _SOURCE_TAG$2 = 'source';\nvar _TARGET_TAG$1 = 'target';\nvar _UNIT_TAG$1 = 'unit'; // https://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html\n\nvar Xliff2 = /*#__PURE__*/function (_Serializer3) {\n  _inherits(Xliff2, _Serializer3);\n\n  var _super103 = _createSuper(Xliff2);\n\n  function Xliff2() {\n    _classCallCheck(this, Xliff2);\n\n    return _super103.apply(this, arguments);\n  }\n\n  _createClass(Xliff2, [{\n    key: \"write\",\n    value: function write(messages, locale) {\n      var visitor = new _WriteVisitor$1();\n      var units = [];\n      messages.forEach(function (message) {\n        var unit = new Tag(_UNIT_TAG$1, {\n          id: message.id\n        });\n        var notes = new Tag('notes');\n\n        if (message.description || message.meaning) {\n          if (message.description) {\n            notes.children.push(new CR(8), new Tag('note', {\n              category: 'description'\n            }, [new Text$2(message.description)]));\n          }\n\n          if (message.meaning) {\n            notes.children.push(new CR(8), new Tag('note', {\n              category: 'meaning'\n            }, [new Text$2(message.meaning)]));\n          }\n        }\n\n        message.sources.forEach(function (source) {\n          notes.children.push(new CR(8), new Tag('note', {\n            category: 'location'\n          }, [new Text$2(\"\".concat(source.filePath, \":\").concat(source.startLine).concat(source.endLine !== source.startLine ? ',' + source.endLine : ''))]));\n        });\n        notes.children.push(new CR(6));\n        unit.children.push(new CR(6), notes);\n        var segment = new Tag('segment');\n        segment.children.push(new CR(8), new Tag(_SOURCE_TAG$2, {}, visitor.serialize(message.nodes)), new CR(6));\n        unit.children.push(new CR(6), segment, new CR(4));\n        units.push(new CR(4), unit);\n      });\n      var file = new Tag('file', {\n        'original': 'ng.template',\n        id: 'ngi18n'\n      }, [].concat(units, [new CR(2)]));\n      var xliff = new Tag(_XLIFF_TAG, {\n        version: _VERSION$1,\n        xmlns: _XMLNS$1,\n        srcLang: locale || _DEFAULT_SOURCE_LANG$1\n      }, [new CR(2), file, new CR()]);\n      return serialize([new Declaration({\n        version: '1.0',\n        encoding: 'UTF-8'\n      }), new CR(), xliff, new CR()]);\n    }\n  }, {\n    key: \"load\",\n    value: function load(content, url) {\n      // xliff to xml nodes\n      var xliff2Parser = new Xliff2Parser();\n\n      var _xliff2Parser$parse = xliff2Parser.parse(content, url),\n          locale = _xliff2Parser$parse.locale,\n          msgIdToHtml = _xliff2Parser$parse.msgIdToHtml,\n          errors = _xliff2Parser$parse.errors; // xml nodes to i18n nodes\n\n\n      var i18nNodesByMsgId = {};\n      var converter = new XmlToI18n$1();\n      Object.keys(msgIdToHtml).forEach(function (msgId) {\n        var _converter$convert2 = converter.convert(msgIdToHtml[msgId], url),\n            i18nNodes = _converter$convert2.i18nNodes,\n            e = _converter$convert2.errors;\n\n        errors.push.apply(errors, _toConsumableArray(e));\n        i18nNodesByMsgId[msgId] = i18nNodes;\n      });\n\n      if (errors.length) {\n        throw new Error(\"xliff2 parse errors:\\n\".concat(errors.join('\\n')));\n      }\n\n      return {\n        locale: locale,\n        i18nNodesByMsgId: i18nNodesByMsgId\n      };\n    }\n  }, {\n    key: \"digest\",\n    value: function digest(message) {\n      return decimalDigest(message);\n    }\n  }]);\n\n  return Xliff2;\n}(Serializer);\n\nvar _WriteVisitor$1 = /*#__PURE__*/function () {\n  function _WriteVisitor$1() {\n    _classCallCheck(this, _WriteVisitor$1);\n  }\n\n  _createClass(_WriteVisitor$1, [{\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      return [new Text$2(text.value)];\n    }\n  }, {\n    key: \"visitContainer\",\n    value: function visitContainer(container, context) {\n      var _this215 = this;\n\n      var nodes = [];\n      container.children.forEach(function (node) {\n        return nodes.push.apply(nodes, _toConsumableArray(node.visit(_this215)));\n      });\n      return nodes;\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu, context) {\n      var _this216 = this;\n\n      var nodes = [new Text$2(\"{\".concat(icu.expressionPlaceholder, \", \").concat(icu.type, \", \"))];\n      Object.keys(icu.cases).forEach(function (c) {\n        nodes.push.apply(nodes, [new Text$2(\"\".concat(c, \" {\"))].concat(_toConsumableArray(icu.cases[c].visit(_this216)), [new Text$2(\"} \")]));\n      });\n      nodes.push(new Text$2(\"}\"));\n      return nodes;\n    }\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph, context) {\n      var _ref30,\n          _this217 = this;\n\n      var type = getTypeForTag(ph.tag);\n\n      if (ph.isVoid) {\n        var tagPh = new Tag(_PLACEHOLDER_TAG$2, {\n          id: (this._nextPlaceholderId++).toString(),\n          equiv: ph.startName,\n          type: type,\n          disp: \"<\".concat(ph.tag, \"/>\")\n        });\n        return [tagPh];\n      }\n\n      var tagPc = new Tag(_PLACEHOLDER_SPANNING_TAG, {\n        id: (this._nextPlaceholderId++).toString(),\n        equivStart: ph.startName,\n        equivEnd: ph.closeName,\n        type: type,\n        dispStart: \"<\".concat(ph.tag, \">\"),\n        dispEnd: \"</\".concat(ph.tag, \">\")\n      });\n\n      var nodes = (_ref30 = []).concat.apply(_ref30, _toConsumableArray(ph.children.map(function (node) {\n        return node.visit(_this217);\n      })));\n\n      if (nodes.length) {\n        nodes.forEach(function (node) {\n          return tagPc.children.push(node);\n        });\n      } else {\n        tagPc.children.push(new Text$2(''));\n      }\n\n      return [tagPc];\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph, context) {\n      var idStr = (this._nextPlaceholderId++).toString();\n      return [new Tag(_PLACEHOLDER_TAG$2, {\n        id: idStr,\n        equiv: ph.name,\n        disp: \"{{\".concat(ph.value, \"}}\")\n      })];\n    }\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, context) {\n      var cases = Object.keys(ph.value.cases).map(function (value) {\n        return value + ' {...}';\n      }).join(' ');\n      var idStr = (this._nextPlaceholderId++).toString();\n      return [new Tag(_PLACEHOLDER_TAG$2, {\n        id: idStr,\n        equiv: ph.name,\n        disp: \"{\".concat(ph.value.expression, \", \").concat(ph.value.type, \", \").concat(cases, \"}\")\n      })];\n    }\n  }, {\n    key: \"serialize\",\n    value: function serialize(nodes) {\n      var _ref31,\n          _this218 = this;\n\n      this._nextPlaceholderId = 0;\n      return (_ref31 = []).concat.apply(_ref31, _toConsumableArray(nodes.map(function (node) {\n        return node.visit(_this218);\n      })));\n    }\n  }]);\n\n  return _WriteVisitor$1;\n}(); // Extract messages as xml nodes from the xliff file\n\n\nvar Xliff2Parser = /*#__PURE__*/function () {\n  function Xliff2Parser() {\n    _classCallCheck(this, Xliff2Parser);\n\n    this._locale = null;\n  }\n\n  _createClass(Xliff2Parser, [{\n    key: \"parse\",\n    value: function parse(xliff, url) {\n      this._unitMlString = null;\n      this._msgIdToHtml = {};\n      var xml = new XmlParser().parse(xliff, url);\n      this._errors = xml.errors;\n      visitAll$1(this, xml.rootNodes, null);\n      return {\n        msgIdToHtml: this._msgIdToHtml,\n        errors: this._errors,\n        locale: this._locale\n      };\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(element, context) {\n      switch (element.name) {\n        case _UNIT_TAG$1:\n          this._unitMlString = null;\n          var idAttr = element.attrs.find(function (attr) {\n            return attr.name === 'id';\n          });\n\n          if (!idAttr) {\n            this._addError(element, \"<\".concat(_UNIT_TAG$1, \"> misses the \\\"id\\\" attribute\"));\n          } else {\n            var id = idAttr.value;\n\n            if (this._msgIdToHtml.hasOwnProperty(id)) {\n              this._addError(element, \"Duplicated translations for msg \".concat(id));\n            } else {\n              visitAll$1(this, element.children, null);\n\n              if (typeof this._unitMlString === 'string') {\n                this._msgIdToHtml[id] = this._unitMlString;\n              } else {\n                this._addError(element, \"Message \".concat(id, \" misses a translation\"));\n              }\n            }\n          }\n\n          break;\n\n        case _SOURCE_TAG$2:\n          // ignore source message\n          break;\n\n        case _TARGET_TAG$1:\n          var innerTextStart = element.startSourceSpan.end.offset;\n          var innerTextEnd = element.endSourceSpan.start.offset;\n          var content = element.startSourceSpan.start.file.content;\n          var innerText = content.slice(innerTextStart, innerTextEnd);\n          this._unitMlString = innerText;\n          break;\n\n        case _XLIFF_TAG:\n          var localeAttr = element.attrs.find(function (attr) {\n            return attr.name === 'trgLang';\n          });\n\n          if (localeAttr) {\n            this._locale = localeAttr.value;\n          }\n\n          var versionAttr = element.attrs.find(function (attr) {\n            return attr.name === 'version';\n          });\n\n          if (versionAttr) {\n            var version = versionAttr.value;\n\n            if (version !== '2.0') {\n              this._addError(element, \"The XLIFF file version \".concat(version, \" is not compatible with XLIFF 2.0 serializer\"));\n            } else {\n              visitAll$1(this, element.children, null);\n            }\n          }\n\n          break;\n\n        default:\n          visitAll$1(this, element.children, null);\n      }\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {}\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {}\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {}\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(expansion, context) {}\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(expansionCase, context) {}\n  }, {\n    key: \"_addError\",\n    value: function _addError(node, message) {\n      this._errors.push(new I18nError(node.sourceSpan, message));\n    }\n  }]);\n\n  return Xliff2Parser;\n}(); // Convert ml nodes (xliff syntax) to i18n nodes\n\n\nvar XmlToI18n$1 = /*#__PURE__*/function () {\n  function XmlToI18n$1() {\n    _classCallCheck(this, XmlToI18n$1);\n  }\n\n  _createClass(XmlToI18n$1, [{\n    key: \"convert\",\n    value: function convert(message, url) {\n      var _ref32;\n\n      var xmlIcu = new XmlParser().parse(message, url, {\n        tokenizeExpansionForms: true\n      });\n      this._errors = xmlIcu.errors;\n      var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ? [] : (_ref32 = []).concat.apply(_ref32, _toConsumableArray(visitAll$1(this, xmlIcu.rootNodes)));\n      return {\n        i18nNodes: i18nNodes,\n        errors: this._errors\n      };\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      return new Text$1(text.value, text.sourceSpan);\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(el, context) {\n      var _this219 = this,\n          _ref33;\n\n      switch (el.name) {\n        case _PLACEHOLDER_TAG$2:\n          var nameAttr = el.attrs.find(function (attr) {\n            return attr.name === 'equiv';\n          });\n\n          if (nameAttr) {\n            return [new Placeholder('', nameAttr.value, el.sourceSpan)];\n          }\n\n          this._addError(el, \"<\".concat(_PLACEHOLDER_TAG$2, \"> misses the \\\"equiv\\\" attribute\"));\n\n          break;\n\n        case _PLACEHOLDER_SPANNING_TAG:\n          var startAttr = el.attrs.find(function (attr) {\n            return attr.name === 'equivStart';\n          });\n          var endAttr = el.attrs.find(function (attr) {\n            return attr.name === 'equivEnd';\n          });\n\n          if (!startAttr) {\n            this._addError(el, \"<\".concat(_PLACEHOLDER_TAG$2, \"> misses the \\\"equivStart\\\" attribute\"));\n          } else if (!endAttr) {\n            this._addError(el, \"<\".concat(_PLACEHOLDER_TAG$2, \"> misses the \\\"equivEnd\\\" attribute\"));\n          } else {\n            var startId = startAttr.value;\n            var endId = endAttr.value;\n            var nodes = [];\n            return nodes.concat.apply(nodes, [new Placeholder('', startId, el.sourceSpan)].concat(_toConsumableArray(el.children.map(function (node) {\n              return node.visit(_this219, null);\n            })), [new Placeholder('', endId, el.sourceSpan)]));\n          }\n\n          break;\n\n        case _MARKER_TAG$1:\n          return (_ref33 = []).concat.apply(_ref33, _toConsumableArray(visitAll$1(this, el.children)));\n\n        default:\n          this._addError(el, \"Unexpected tag\");\n\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(icu, context) {\n      var caseMap = {};\n      visitAll$1(this, icu.cases).forEach(function (c) {\n        caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n      });\n      return new Icu$1(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(icuCase, context) {\n      var _ref34;\n\n      return {\n        value: icuCase.value,\n        nodes: (_ref34 = []).concat.apply(_ref34, _toConsumableArray(visitAll$1(this, icuCase.expression)))\n      };\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {}\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {}\n  }, {\n    key: \"_addError\",\n    value: function _addError(node, message) {\n      this._errors.push(new I18nError(node.sourceSpan, message));\n    }\n  }]);\n\n  return XmlToI18n$1;\n}();\n\nfunction getTypeForTag(tag) {\n  switch (tag.toLowerCase()) {\n    case 'br':\n    case 'b':\n    case 'i':\n    case 'u':\n      return 'fmt';\n\n    case 'img':\n      return 'image';\n\n    case 'a':\n      return 'link';\n\n    default:\n      return 'other';\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar _TRANSLATIONS_TAG = 'translationbundle';\nvar _TRANSLATION_TAG = 'translation';\nvar _PLACEHOLDER_TAG$3 = 'ph';\n\nvar Xtb = /*#__PURE__*/function (_Serializer4) {\n  _inherits(Xtb, _Serializer4);\n\n  var _super104 = _createSuper(Xtb);\n\n  function Xtb() {\n    _classCallCheck(this, Xtb);\n\n    return _super104.apply(this, arguments);\n  }\n\n  _createClass(Xtb, [{\n    key: \"write\",\n    value: function write(messages, locale) {\n      throw new Error('Unsupported');\n    }\n  }, {\n    key: \"load\",\n    value: function load(content, url) {\n      // xtb to xml nodes\n      var xtbParser = new XtbParser();\n\n      var _xtbParser$parse = xtbParser.parse(content, url),\n          locale = _xtbParser$parse.locale,\n          msgIdToHtml = _xtbParser$parse.msgIdToHtml,\n          errors = _xtbParser$parse.errors; // xml nodes to i18n nodes\n\n\n      var i18nNodesByMsgId = {};\n      var converter = new XmlToI18n$2(); // Because we should be able to load xtb files that rely on features not supported by angular,\n      // we need to delay the conversion of html to i18n nodes so that non angular messages are not\n      // converted\n\n      Object.keys(msgIdToHtml).forEach(function (msgId) {\n        var valueFn = function valueFn() {\n          var _converter$convert3 = converter.convert(msgIdToHtml[msgId], url),\n              i18nNodes = _converter$convert3.i18nNodes,\n              errors = _converter$convert3.errors;\n\n          if (errors.length) {\n            throw new Error(\"xtb parse errors:\\n\".concat(errors.join('\\n')));\n          }\n\n          return i18nNodes;\n        };\n\n        createLazyProperty(i18nNodesByMsgId, msgId, valueFn);\n      });\n\n      if (errors.length) {\n        throw new Error(\"xtb parse errors:\\n\".concat(errors.join('\\n')));\n      }\n\n      return {\n        locale: locale,\n        i18nNodesByMsgId: i18nNodesByMsgId\n      };\n    }\n  }, {\n    key: \"digest\",\n    value: function digest(message) {\n      return digest$1(message);\n    }\n  }, {\n    key: \"createNameMapper\",\n    value: function createNameMapper(message) {\n      return new SimplePlaceholderMapper(message, toPublicName);\n    }\n  }]);\n\n  return Xtb;\n}(Serializer);\n\nfunction createLazyProperty(messages, id, valueFn) {\n  Object.defineProperty(messages, id, {\n    configurable: true,\n    enumerable: true,\n    get: function get() {\n      var value = valueFn();\n      Object.defineProperty(messages, id, {\n        enumerable: true,\n        value: value\n      });\n      return value;\n    },\n    set: function set(_) {\n      throw new Error('Could not overwrite an XTB translation');\n    }\n  });\n} // Extract messages as xml nodes from the xtb file\n\n\nvar XtbParser = /*#__PURE__*/function () {\n  function XtbParser() {\n    _classCallCheck(this, XtbParser);\n\n    this._locale = null;\n  }\n\n  _createClass(XtbParser, [{\n    key: \"parse\",\n    value: function parse(xtb, url) {\n      this._bundleDepth = 0;\n      this._msgIdToHtml = {}; // We can not parse the ICU messages at this point as some messages might not originate\n      // from Angular that could not be lex'd.\n\n      var xml = new XmlParser().parse(xtb, url);\n      this._errors = xml.errors;\n      visitAll$1(this, xml.rootNodes);\n      return {\n        msgIdToHtml: this._msgIdToHtml,\n        errors: this._errors,\n        locale: this._locale\n      };\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(element, context) {\n      switch (element.name) {\n        case _TRANSLATIONS_TAG:\n          this._bundleDepth++;\n\n          if (this._bundleDepth > 1) {\n            this._addError(element, \"<\".concat(_TRANSLATIONS_TAG, \"> elements can not be nested\"));\n          }\n\n          var langAttr = element.attrs.find(function (attr) {\n            return attr.name === 'lang';\n          });\n\n          if (langAttr) {\n            this._locale = langAttr.value;\n          }\n\n          visitAll$1(this, element.children, null);\n          this._bundleDepth--;\n          break;\n\n        case _TRANSLATION_TAG:\n          var idAttr = element.attrs.find(function (attr) {\n            return attr.name === 'id';\n          });\n\n          if (!idAttr) {\n            this._addError(element, \"<\".concat(_TRANSLATION_TAG, \"> misses the \\\"id\\\" attribute\"));\n          } else {\n            var id = idAttr.value;\n\n            if (this._msgIdToHtml.hasOwnProperty(id)) {\n              this._addError(element, \"Duplicated translations for msg \".concat(id));\n            } else {\n              var innerTextStart = element.startSourceSpan.end.offset;\n              var innerTextEnd = element.endSourceSpan.start.offset;\n              var content = element.startSourceSpan.start.file.content;\n              var innerText = content.slice(innerTextStart, innerTextEnd);\n              this._msgIdToHtml[id] = innerText;\n            }\n          }\n\n          break;\n\n        default:\n          this._addError(element, 'Unexpected tag');\n\n      }\n    }\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {}\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {}\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {}\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(expansion, context) {}\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(expansionCase, context) {}\n  }, {\n    key: \"_addError\",\n    value: function _addError(node, message) {\n      this._errors.push(new I18nError(node.sourceSpan, message));\n    }\n  }]);\n\n  return XtbParser;\n}(); // Convert ml nodes (xtb syntax) to i18n nodes\n\n\nvar XmlToI18n$2 = /*#__PURE__*/function () {\n  function XmlToI18n$2() {\n    _classCallCheck(this, XmlToI18n$2);\n  }\n\n  _createClass(XmlToI18n$2, [{\n    key: \"convert\",\n    value: function convert(message, url) {\n      var xmlIcu = new XmlParser().parse(message, url, {\n        tokenizeExpansionForms: true\n      });\n      this._errors = xmlIcu.errors;\n      var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ? [] : visitAll$1(this, xmlIcu.rootNodes);\n      return {\n        i18nNodes: i18nNodes,\n        errors: this._errors\n      };\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      return new Text$1(text.value, text.sourceSpan);\n    }\n  }, {\n    key: \"visitExpansion\",\n    value: function visitExpansion(icu, context) {\n      var caseMap = {};\n      visitAll$1(this, icu.cases).forEach(function (c) {\n        caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n      });\n      return new Icu$1(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n    }\n  }, {\n    key: \"visitExpansionCase\",\n    value: function visitExpansionCase(icuCase, context) {\n      return {\n        value: icuCase.value,\n        nodes: visitAll$1(this, icuCase.expression)\n      };\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(el, context) {\n      if (el.name === _PLACEHOLDER_TAG$3) {\n        var nameAttr = el.attrs.find(function (attr) {\n          return attr.name === 'name';\n        });\n\n        if (nameAttr) {\n          return new Placeholder('', nameAttr.value, el.sourceSpan);\n        }\n\n        this._addError(el, \"<\".concat(_PLACEHOLDER_TAG$3, \"> misses the \\\"name\\\" attribute\"));\n      } else {\n        this._addError(el, \"Unexpected tag\");\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitComment\",\n    value: function visitComment(comment, context) {}\n  }, {\n    key: \"visitAttribute\",\n    value: function visitAttribute(attribute, context) {}\n  }, {\n    key: \"_addError\",\n    value: function _addError(node, message) {\n      this._errors.push(new I18nError(node.sourceSpan, message));\n    }\n  }]);\n\n  return XmlToI18n$2;\n}();\n/**\n * @license\n * Copyright Google LLC 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/**\n * A container for translated messages\n */\n\n\nvar TranslationBundle = /*#__PURE__*/function () {\n  function TranslationBundle() {\n    var _i18nNodesByMsgId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    var locale = arguments.length > 1 ? arguments[1] : undefined;\n    var digest = arguments.length > 2 ? arguments[2] : undefined;\n    var mapperFactory = arguments.length > 3 ? arguments[3] : undefined;\n    var missingTranslationStrategy = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : MissingTranslationStrategy.Warning;\n    var console = arguments.length > 5 ? arguments[5] : undefined;\n\n    _classCallCheck(this, TranslationBundle);\n\n    this._i18nNodesByMsgId = _i18nNodesByMsgId;\n    this.digest = digest;\n    this.mapperFactory = mapperFactory;\n    this._i18nToHtml = new I18nToHtmlVisitor(_i18nNodesByMsgId, locale, digest, mapperFactory, missingTranslationStrategy, console);\n  } // Creates a `TranslationBundle` by parsing the given `content` with the `serializer`.\n\n\n  _createClass(TranslationBundle, [{\n    key: \"get\",\n    value: // Returns the translation as HTML nodes from the given source message.\n    function get(srcMsg) {\n      var html = this._i18nToHtml.convert(srcMsg);\n\n      if (html.errors.length) {\n        throw new Error(html.errors.join('\\n'));\n      }\n\n      return html.nodes;\n    }\n  }, {\n    key: \"has\",\n    value: function has(srcMsg) {\n      return this.digest(srcMsg) in this._i18nNodesByMsgId;\n    }\n  }], [{\n    key: \"load\",\n    value: function load(content, url, serializer, missingTranslationStrategy, console) {\n      var _serializer$load = serializer.load(content, url),\n          locale = _serializer$load.locale,\n          i18nNodesByMsgId = _serializer$load.i18nNodesByMsgId;\n\n      var digestFn = function digestFn(m) {\n        return serializer.digest(m);\n      };\n\n      var mapperFactory = function mapperFactory(m) {\n        return serializer.createNameMapper(m);\n      };\n\n      return new TranslationBundle(i18nNodesByMsgId, locale, digestFn, mapperFactory, missingTranslationStrategy, console);\n    }\n  }]);\n\n  return TranslationBundle;\n}();\n\nvar I18nToHtmlVisitor = /*#__PURE__*/function () {\n  function I18nToHtmlVisitor() {\n    var _i18nNodesByMsgId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    var _locale = arguments.length > 1 ? arguments[1] : undefined;\n\n    var _digest = arguments.length > 2 ? arguments[2] : undefined;\n\n    var _mapperFactory = arguments.length > 3 ? arguments[3] : undefined;\n\n    var _missingTranslationStrategy = arguments.length > 4 ? arguments[4] : undefined;\n\n    var _console = arguments.length > 5 ? arguments[5] : undefined;\n\n    _classCallCheck(this, I18nToHtmlVisitor);\n\n    this._i18nNodesByMsgId = _i18nNodesByMsgId;\n    this._locale = _locale;\n    this._digest = _digest;\n    this._mapperFactory = _mapperFactory;\n    this._missingTranslationStrategy = _missingTranslationStrategy;\n    this._console = _console;\n    this._contextStack = [];\n    this._errors = [];\n  }\n\n  _createClass(I18nToHtmlVisitor, [{\n    key: \"convert\",\n    value: function convert(srcMsg) {\n      this._contextStack.length = 0;\n      this._errors.length = 0; // i18n to text\n\n      var text = this._convertToText(srcMsg); // text to html\n\n\n      var url = srcMsg.nodes[0].sourceSpan.start.file.url;\n      var html = new HtmlParser().parse(text, url, {\n        tokenizeExpansionForms: true\n      });\n      return {\n        nodes: html.rootNodes,\n        errors: [].concat(_toConsumableArray(this._errors), _toConsumableArray(html.errors))\n      };\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(text, context) {\n      // `convert()` uses an `HtmlParser` to return `html.Node`s\n      // we should then make sure that any special characters are escaped\n      return escapeXml(text.value);\n    }\n  }, {\n    key: \"visitContainer\",\n    value: function visitContainer(container, context) {\n      var _this220 = this;\n\n      return container.children.map(function (n) {\n        return n.visit(_this220);\n      }).join('');\n    }\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu, context) {\n      var _this221 = this;\n\n      var cases = Object.keys(icu.cases).map(function (k) {\n        return \"\".concat(k, \" {\").concat(icu.cases[k].visit(_this221), \"}\");\n      }); // TODO(vicb): Once all format switch to using expression placeholders\n      // we should throw when the placeholder is not in the source message\n\n      var exp = this._srcMsg.placeholders.hasOwnProperty(icu.expression) ? this._srcMsg.placeholders[icu.expression].text : icu.expression;\n      return \"{\".concat(exp, \", \").concat(icu.type, \", \").concat(cases.join(' '), \"}\");\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph, context) {\n      var phName = this._mapper(ph.name);\n\n      if (this._srcMsg.placeholders.hasOwnProperty(phName)) {\n        return this._srcMsg.placeholders[phName].text;\n      }\n\n      if (this._srcMsg.placeholderToMessage.hasOwnProperty(phName)) {\n        return this._convertToText(this._srcMsg.placeholderToMessage[phName]);\n      }\n\n      this._addError(ph, \"Unknown placeholder \\\"\".concat(ph.name, \"\\\"\"));\n\n      return '';\n    } // Loaded message contains only placeholders (vs tag and icu placeholders).\n    // However when a translation can not be found, we need to serialize the source message\n    // which can contain tag placeholders\n\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph, context) {\n      var _this222 = this;\n\n      var tag = \"\".concat(ph.tag);\n      var attrs = Object.keys(ph.attrs).map(function (name) {\n        return \"\".concat(name, \"=\\\"\").concat(ph.attrs[name], \"\\\"\");\n      }).join(' ');\n\n      if (ph.isVoid) {\n        return \"<\".concat(tag, \" \").concat(attrs, \"/>\");\n      }\n\n      var children = ph.children.map(function (c) {\n        return c.visit(_this222);\n      }).join('');\n      return \"<\".concat(tag, \" \").concat(attrs, \">\").concat(children, \"</\").concat(tag, \">\");\n    } // Loaded message contains only placeholders (vs tag and icu placeholders).\n    // However when a translation can not be found, we need to serialize the source message\n    // which can contain tag placeholders\n\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, context) {\n      // An ICU placeholder references the source message to be serialized\n      return this._convertToText(this._srcMsg.placeholderToMessage[ph.name]);\n    }\n    /**\n     * Convert a source message to a translated text string:\n     * - text nodes are replaced with their translation,\n     * - placeholders are replaced with their content,\n     * - ICU nodes are converted to ICU expressions.\n     */\n\n  }, {\n    key: \"_convertToText\",\n    value: function _convertToText(srcMsg) {\n      var _this223 = this;\n\n      var id = this._digest(srcMsg);\n\n      var mapper = this._mapperFactory ? this._mapperFactory(srcMsg) : null;\n      var nodes;\n\n      this._contextStack.push({\n        msg: this._srcMsg,\n        mapper: this._mapper\n      });\n\n      this._srcMsg = srcMsg;\n\n      if (this._i18nNodesByMsgId.hasOwnProperty(id)) {\n        // When there is a translation use its nodes as the source\n        // And create a mapper to convert serialized placeholder names to internal names\n        nodes = this._i18nNodesByMsgId[id];\n\n        this._mapper = function (name) {\n          return mapper ? mapper.toInternalName(name) : name;\n        };\n      } else {\n        // When no translation has been found\n        // - report an error / a warning / nothing,\n        // - use the nodes from the original message\n        // - placeholders are already internal and need no mapper\n        if (this._missingTranslationStrategy === MissingTranslationStrategy.Error) {\n          var ctx = this._locale ? \" for locale \\\"\".concat(this._locale, \"\\\"\") : '';\n\n          this._addError(srcMsg.nodes[0], \"Missing translation for message \\\"\".concat(id, \"\\\"\").concat(ctx));\n        } else if (this._console && this._missingTranslationStrategy === MissingTranslationStrategy.Warning) {\n          var _ctx2 = this._locale ? \" for locale \\\"\".concat(this._locale, \"\\\"\") : '';\n\n          this._console.warn(\"Missing translation for message \\\"\".concat(id, \"\\\"\").concat(_ctx2));\n        }\n\n        nodes = srcMsg.nodes;\n\n        this._mapper = function (name) {\n          return name;\n        };\n      }\n\n      var text = nodes.map(function (node) {\n        return node.visit(_this223);\n      }).join('');\n\n      var context = this._contextStack.pop();\n\n      this._srcMsg = context.msg;\n      this._mapper = context.mapper;\n      return text;\n    }\n  }, {\n    key: \"_addError\",\n    value: function _addError(el, msg) {\n      this._errors.push(new I18nError(el.sourceSpan, msg));\n    }\n  }]);\n\n  return I18nToHtmlVisitor;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar I18NHtmlParser = /*#__PURE__*/function () {\n  function I18NHtmlParser(_htmlParser, translations, translationsFormat) {\n    var missingTranslation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : MissingTranslationStrategy.Warning;\n    var console = arguments.length > 4 ? arguments[4] : undefined;\n\n    _classCallCheck(this, I18NHtmlParser);\n\n    this._htmlParser = _htmlParser;\n\n    if (translations) {\n      var _serializer = createSerializer(translationsFormat);\n\n      this._translationBundle = TranslationBundle.load(translations, 'i18n', _serializer, missingTranslation, console);\n    } else {\n      this._translationBundle = new TranslationBundle({}, null, _digest2, undefined, missingTranslation, console);\n    }\n  }\n\n  _createClass(I18NHtmlParser, [{\n    key: \"parse\",\n    value: function parse(source, url) {\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      var interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;\n\n      var parseResult = this._htmlParser.parse(source, url, Object.assign({\n        interpolationConfig: interpolationConfig\n      }, options));\n\n      if (parseResult.errors.length) {\n        return new ParseTreeResult(parseResult.rootNodes, parseResult.errors);\n      }\n\n      return mergeTranslations(parseResult.rootNodes, this._translationBundle, interpolationConfig, [], {});\n    }\n  }]);\n\n  return I18NHtmlParser;\n}();\n\nfunction createSerializer(format) {\n  format = (format || 'xlf').toLowerCase();\n\n  switch (format) {\n    case 'xmb':\n      return new Xmb();\n\n    case 'xtb':\n      return new Xtb();\n\n    case 'xliff2':\n    case 'xlf2':\n      return new Xliff2();\n\n    case 'xliff':\n    case 'xlf':\n    default:\n      return new Xliff();\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar QUOTED_KEYS = '$quoted$';\n\nfunction convertValueToOutputAst(ctx, value) {\n  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n  return visitValue(value, new _ValueOutputAstTransformer(ctx), type);\n}\n\nvar _ValueOutputAstTransformer = /*#__PURE__*/function () {\n  function _ValueOutputAstTransformer(ctx) {\n    _classCallCheck(this, _ValueOutputAstTransformer);\n\n    this.ctx = ctx;\n  }\n\n  _createClass(_ValueOutputAstTransformer, [{\n    key: \"visitArray\",\n    value: function visitArray(arr, type) {\n      var values = []; // Note Array.map() must not be used to convert the values because it will\n      // skip over empty elements in arrays constructed using `new Array(length)`,\n      // resulting in `undefined` elements. This breaks the type guarantee that\n      // all values in `o.LiteralArrayExpr` are of type `o.Expression`.\n      // See test case in `value_util_spec.ts`.\n\n      for (var i = 0; i < arr.length; ++i) {\n        values.push(visitValue(arr[i], this, null\n        /* context */\n        ));\n      }\n\n      return literalArr(values, type);\n    }\n  }, {\n    key: \"visitStringMap\",\n    value: function visitStringMap(map, type) {\n      var _this224 = this;\n\n      var entries = [];\n      var quotedSet = new Set(map && map[QUOTED_KEYS]);\n      Object.keys(map).forEach(function (key) {\n        entries.push(new LiteralMapEntry(key, visitValue(map[key], _this224, null), quotedSet.has(key)));\n      });\n      return new LiteralMapExpr(entries, type);\n    }\n  }, {\n    key: \"visitPrimitive\",\n    value: function visitPrimitive(value, type) {\n      return literal(value, type);\n    }\n  }, {\n    key: \"visitOther\",\n    value: function visitOther(value, type) {\n      if (value instanceof Expression) {\n        return value;\n      } else {\n        return this.ctx.importExpr(value);\n      }\n    }\n  }]);\n\n  return _ValueOutputAstTransformer;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nfunction mapEntry$1(key, value) {\n  return {\n    key: key,\n    value: value,\n    quoted: false\n  };\n}\n\nvar InjectableCompiler = /*#__PURE__*/function () {\n  function InjectableCompiler(reflector, alwaysGenerateDef) {\n    _classCallCheck(this, InjectableCompiler);\n\n    this.reflector = reflector;\n    this.alwaysGenerateDef = alwaysGenerateDef;\n    this.tokenInjector = reflector.resolveExternalReference(Identifiers$1.Injector);\n  }\n\n  _createClass(InjectableCompiler, [{\n    key: \"depsArray\",\n    value: function depsArray(deps, ctx) {\n      var _this225 = this;\n\n      return deps.map(function (dep) {\n        var token = dep;\n        var args = [token];\n        var flags = 0\n        /* Default */\n        ;\n\n        if (Array.isArray(dep)) {\n          for (var i = 0; i < dep.length; i++) {\n            var v = dep[i];\n\n            if (v) {\n              if (v.ngMetadataName === 'Optional') {\n                flags |= 8\n                /* Optional */\n                ;\n              } else if (v.ngMetadataName === 'SkipSelf') {\n                flags |= 4\n                /* SkipSelf */\n                ;\n              } else if (v.ngMetadataName === 'Self') {\n                flags |= 2\n                /* Self */\n                ;\n              } else if (v.ngMetadataName === 'Inject') {\n                token = v.token;\n              } else {\n                token = v;\n              }\n            }\n          }\n        }\n\n        var tokenExpr;\n\n        if (typeof token === 'string') {\n          tokenExpr = literal(token);\n        } else if (token === _this225.tokenInjector) {\n          tokenExpr = importExpr(Identifiers$1.INJECTOR);\n        } else {\n          tokenExpr = ctx.importExpr(token);\n        }\n\n        if (flags !== 0\n        /* Default */\n        ) {\n          args = [tokenExpr, literal(flags)];\n        } else {\n          args = [tokenExpr];\n        }\n\n        return importExpr(Identifiers$1.inject).callFn(args);\n      });\n    }\n  }, {\n    key: \"factoryFor\",\n    value: function factoryFor(injectable, ctx) {\n      var retValue;\n\n      if (injectable.useExisting) {\n        retValue = importExpr(Identifiers$1.inject).callFn([ctx.importExpr(injectable.useExisting)]);\n      } else if (injectable.useFactory) {\n        var deps = injectable.deps || [];\n\n        if (deps.length > 0) {\n          retValue = ctx.importExpr(injectable.useFactory).callFn(this.depsArray(deps, ctx));\n        } else {\n          return ctx.importExpr(injectable.useFactory);\n        }\n      } else if (injectable.useValue) {\n        retValue = convertValueToOutputAst(ctx, injectable.useValue);\n      } else {\n        var clazz = injectable.useClass || injectable.symbol;\n        var depArgs = this.depsArray(this.reflector.parameters(clazz), ctx);\n        retValue = new InstantiateExpr(ctx.importExpr(clazz), depArgs);\n      }\n\n      return fn([], [new ReturnStatement(retValue)], undefined, undefined, injectable.symbol.name + '_Factory');\n    }\n  }, {\n    key: \"injectableDef\",\n    value: function injectableDef(injectable, ctx) {\n      var providedIn = NULL_EXPR;\n\n      if (injectable.providedIn !== undefined) {\n        if (injectable.providedIn === null) {\n          providedIn = NULL_EXPR;\n        } else if (typeof injectable.providedIn === 'string') {\n          providedIn = literal(injectable.providedIn);\n        } else {\n          providedIn = ctx.importExpr(injectable.providedIn);\n        }\n      }\n\n      var def = [mapEntry$1('factory', this.factoryFor(injectable, ctx)), mapEntry$1('token', ctx.importExpr(injectable.type.reference)), mapEntry$1('providedIn', providedIn)];\n      return importExpr(Identifiers.ɵɵdefineInjectable).callFn([literalMap(def)], undefined, true);\n    }\n  }, {\n    key: \"compile\",\n    value: function compile(injectable, ctx) {\n      if (this.alwaysGenerateDef || injectable.providedIn !== undefined) {\n        var className = identifierName(injectable.type);\n        var clazz = new ClassStmt(className, null, [new ClassField('ɵprov', INFERRED_TYPE, [StmtModifier.Static], this.injectableDef(injectable, ctx))], [], new ClassMethod(null, [], []), []);\n        ctx.statements.push(clazz);\n      }\n    }\n  }]);\n\n  return InjectableCompiler;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar STRIP_SRC_FILE_SUFFIXES = /(\\.ts|\\.d\\.ts|\\.js|\\.jsx|\\.tsx)$/;\nvar GENERATED_FILE = /\\.ngfactory\\.|\\.ngsummary\\./;\nvar JIT_SUMMARY_FILE = /\\.ngsummary\\./;\nvar JIT_SUMMARY_NAME = /NgSummary$/;\n\nfunction ngfactoryFilePath(filePath) {\n  var forceSourceFile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  var urlWithSuffix = splitTypescriptSuffix(filePath, forceSourceFile);\n  return \"\".concat(urlWithSuffix[0], \".ngfactory\").concat(normalizeGenFileSuffix(urlWithSuffix[1]));\n}\n\nfunction stripGeneratedFileSuffix(filePath) {\n  return filePath.replace(GENERATED_FILE, '.');\n}\n\nfunction isGeneratedFile(filePath) {\n  return GENERATED_FILE.test(filePath);\n}\n\nfunction splitTypescriptSuffix(path) {\n  var forceSourceFile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n  if (path.endsWith('.d.ts')) {\n    return [path.slice(0, -5), forceSourceFile ? '.ts' : '.d.ts'];\n  }\n\n  var lastDot = path.lastIndexOf('.');\n\n  if (lastDot !== -1) {\n    return [path.substring(0, lastDot), path.substring(lastDot)];\n  }\n\n  return [path, ''];\n}\n\nfunction normalizeGenFileSuffix(srcFileSuffix) {\n  return srcFileSuffix === '.tsx' ? '.ts' : srcFileSuffix;\n}\n\nfunction summaryFileName(fileName) {\n  var fileNameWithoutSuffix = fileName.replace(STRIP_SRC_FILE_SUFFIXES, '');\n  return \"\".concat(fileNameWithoutSuffix, \".ngsummary.json\");\n}\n\nfunction summaryForJitFileName(fileName) {\n  var forceSourceFile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  var urlWithSuffix = splitTypescriptSuffix(stripGeneratedFileSuffix(fileName), forceSourceFile);\n  return \"\".concat(urlWithSuffix[0], \".ngsummary\").concat(urlWithSuffix[1]);\n}\n\nfunction stripSummaryForJitFileSuffix(filePath) {\n  return filePath.replace(JIT_SUMMARY_FILE, '.');\n}\n\nfunction summaryForJitName(symbolName) {\n  return \"\".concat(symbolName, \"NgSummary\");\n}\n\nfunction stripSummaryForJitNameSuffix(symbolName) {\n  return symbolName.replace(JIT_SUMMARY_NAME, '');\n}\n\nvar LOWERED_SYMBOL = /\\u0275\\d+/;\n\nfunction isLoweredSymbol(name) {\n  return LOWERED_SYMBOL.test(name);\n}\n\nfunction createLoweredSymbol(id) {\n  return \"\\u0275\".concat(id);\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar LifecycleHooks = /*@__PURE__*/function (LifecycleHooks) {\n  LifecycleHooks[LifecycleHooks[\"OnInit\"] = 0] = \"OnInit\";\n  LifecycleHooks[LifecycleHooks[\"OnDestroy\"] = 1] = \"OnDestroy\";\n  LifecycleHooks[LifecycleHooks[\"DoCheck\"] = 2] = \"DoCheck\";\n  LifecycleHooks[LifecycleHooks[\"OnChanges\"] = 3] = \"OnChanges\";\n  LifecycleHooks[LifecycleHooks[\"AfterContentInit\"] = 4] = \"AfterContentInit\";\n  LifecycleHooks[LifecycleHooks[\"AfterContentChecked\"] = 5] = \"AfterContentChecked\";\n  LifecycleHooks[LifecycleHooks[\"AfterViewInit\"] = 6] = \"AfterViewInit\";\n  LifecycleHooks[LifecycleHooks[\"AfterViewChecked\"] = 7] = \"AfterViewChecked\";\n  return LifecycleHooks;\n}({});\n\nvar LIFECYCLE_HOOKS_VALUES = [LifecycleHooks.OnInit, LifecycleHooks.OnDestroy, LifecycleHooks.DoCheck, LifecycleHooks.OnChanges, LifecycleHooks.AfterContentInit, LifecycleHooks.AfterContentChecked, LifecycleHooks.AfterViewInit, LifecycleHooks.AfterViewChecked];\n\nfunction hasLifecycleHook(reflector, hook, token) {\n  return reflector.hasLifecycleHook(token, getHookName(hook));\n}\n\nfunction getAllLifecycleHooks(reflector, token) {\n  return LIFECYCLE_HOOKS_VALUES.filter(function (hook) {\n    return hasLifecycleHook(reflector, hook, token);\n  });\n}\n\nfunction getHookName(hook) {\n  switch (hook) {\n    case LifecycleHooks.OnInit:\n      return 'ngOnInit';\n\n    case LifecycleHooks.OnDestroy:\n      return 'ngOnDestroy';\n\n    case LifecycleHooks.DoCheck:\n      return 'ngDoCheck';\n\n    case LifecycleHooks.OnChanges:\n      return 'ngOnChanges';\n\n    case LifecycleHooks.AfterContentInit:\n      return 'ngAfterContentInit';\n\n    case LifecycleHooks.AfterContentChecked:\n      return 'ngAfterContentChecked';\n\n    case LifecycleHooks.AfterViewInit:\n      return 'ngAfterViewInit';\n\n    case LifecycleHooks.AfterViewChecked:\n      return 'ngAfterViewChecked';\n\n    default:\n      // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n      // However Closure Compiler does not understand that and reports an error in typed mode.\n      // The `throw new Error` below works around the problem, and the unexpected: never variable\n      // makes sure tsc still checks this code is unreachable.\n      var unexpected = hook;\n      throw new Error(\"unexpected \".concat(unexpected));\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar ERROR_COMPONENT_TYPE = 'ngComponentType';\nvar MISSING_NG_MODULE_METADATA_ERROR_DATA = 'ngMissingNgModuleMetadataErrorData';\n\nfunction getMissingNgModuleMetadataErrorData(error) {\n  var _a;\n\n  return (_a = error[MISSING_NG_MODULE_METADATA_ERROR_DATA]) !== null && _a !== void 0 ? _a : null;\n} // Design notes:\n// - don't lazily create metadata:\n//   For some metadata, we need to do async work sometimes,\n//   so the user has to kick off this loading.\n//   But we want to report errors even when the async work is\n//   not required to check that the user would have been able\n//   to wait correctly.\n\n\nvar CompileMetadataResolver = /*#__PURE__*/function () {\n  function CompileMetadataResolver(_config, _htmlParser, _ngModuleResolver, _directiveResolver, _pipeResolver, _summaryResolver, _schemaRegistry, _directiveNormalizer, _console, _staticSymbolCache, _reflector, _errorCollector) {\n    _classCallCheck(this, CompileMetadataResolver);\n\n    this._config = _config;\n    this._htmlParser = _htmlParser;\n    this._ngModuleResolver = _ngModuleResolver;\n    this._directiveResolver = _directiveResolver;\n    this._pipeResolver = _pipeResolver;\n    this._summaryResolver = _summaryResolver;\n    this._schemaRegistry = _schemaRegistry;\n    this._directiveNormalizer = _directiveNormalizer;\n    this._console = _console;\n    this._staticSymbolCache = _staticSymbolCache;\n    this._reflector = _reflector;\n    this._errorCollector = _errorCollector;\n    this._nonNormalizedDirectiveCache = new Map();\n    this._directiveCache = new Map();\n    this._summaryCache = new Map();\n    this._pipeCache = new Map();\n    this._ngModuleCache = new Map();\n    this._ngModuleOfTypes = new Map();\n    this._shallowModuleCache = new Map();\n  }\n\n  _createClass(CompileMetadataResolver, [{\n    key: \"getReflector\",\n    value: function getReflector() {\n      return this._reflector;\n    }\n  }, {\n    key: \"clearCacheFor\",\n    value: function clearCacheFor(type) {\n      var dirMeta = this._directiveCache.get(type);\n\n      this._directiveCache.delete(type);\n\n      this._nonNormalizedDirectiveCache.delete(type);\n\n      this._summaryCache.delete(type);\n\n      this._pipeCache.delete(type);\n\n      this._ngModuleOfTypes.delete(type); // Clear all of the NgModule as they contain transitive information!\n\n\n      this._ngModuleCache.clear();\n\n      if (dirMeta) {\n        this._directiveNormalizer.clearCacheFor(dirMeta);\n      }\n    }\n  }, {\n    key: \"clearCache\",\n    value: function clearCache() {\n      this._directiveCache.clear();\n\n      this._nonNormalizedDirectiveCache.clear();\n\n      this._summaryCache.clear();\n\n      this._pipeCache.clear();\n\n      this._ngModuleCache.clear();\n\n      this._ngModuleOfTypes.clear();\n\n      this._directiveNormalizer.clearCache();\n    }\n  }, {\n    key: \"_createProxyClass\",\n    value: function _createProxyClass(baseType, name) {\n      var delegate = null;\n\n      var proxyClass = function proxyClass() {\n        if (!delegate) {\n          throw new Error(\"Illegal state: Class \".concat(name, \" for type \").concat(stringify(baseType), \" is not compiled yet!\"));\n        }\n\n        return delegate.apply(this, arguments);\n      };\n\n      proxyClass.setDelegate = function (d) {\n        delegate = d;\n        proxyClass.prototype = d.prototype;\n      }; // Make stringify work correctly\n\n\n      proxyClass.overriddenName = name;\n      return proxyClass;\n    }\n  }, {\n    key: \"getGeneratedClass\",\n    value: function getGeneratedClass(dirType, name) {\n      if (dirType instanceof StaticSymbol) {\n        return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), name);\n      } else {\n        return this._createProxyClass(dirType, name);\n      }\n    }\n  }, {\n    key: \"getComponentViewClass\",\n    value: function getComponentViewClass(dirType) {\n      return this.getGeneratedClass(dirType, viewClassName(dirType, 0));\n    }\n  }, {\n    key: \"getHostComponentViewClass\",\n    value: function getHostComponentViewClass(dirType) {\n      return this.getGeneratedClass(dirType, hostViewClassName(dirType));\n    }\n  }, {\n    key: \"getHostComponentType\",\n    value: function getHostComponentType(dirType) {\n      var name = \"\".concat(identifierName({\n        reference: dirType\n      }), \"_Host\");\n\n      if (dirType instanceof StaticSymbol) {\n        return this._staticSymbolCache.get(dirType.filePath, name);\n      }\n\n      return this._createProxyClass(dirType, name);\n    }\n  }, {\n    key: \"getRendererType\",\n    value: function getRendererType(dirType) {\n      if (dirType instanceof StaticSymbol) {\n        return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), rendererTypeName(dirType));\n      } else {\n        // returning an object as proxy,\n        // that we fill later during runtime compilation.\n        return {};\n      }\n    }\n  }, {\n    key: \"getComponentFactory\",\n    value: function getComponentFactory(selector, dirType, inputs, outputs) {\n      if (dirType instanceof StaticSymbol) {\n        return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), componentFactoryName(dirType));\n      } else {\n        var hostView = this.getHostComponentViewClass(dirType); // Note: ngContentSelectors will be filled later once the template is\n        // loaded.\n\n        var createComponentFactory = this._reflector.resolveExternalReference(Identifiers$1.createComponentFactory);\n\n        return createComponentFactory(selector, dirType, hostView, inputs, outputs, []);\n      }\n    }\n  }, {\n    key: \"initComponentFactory\",\n    value: function initComponentFactory(factory, ngContentSelectors) {\n      if (!(factory instanceof StaticSymbol)) {\n        var _factory$ngContentSel;\n\n        (_factory$ngContentSel = factory.ngContentSelectors).push.apply(_factory$ngContentSel, _toConsumableArray(ngContentSelectors));\n      }\n    }\n  }, {\n    key: \"_loadSummary\",\n    value: function _loadSummary(type, kind) {\n      var typeSummary = this._summaryCache.get(type);\n\n      if (!typeSummary) {\n        var summary = this._summaryResolver.resolveSummary(type);\n\n        typeSummary = summary ? summary.type : null;\n\n        this._summaryCache.set(type, typeSummary || null);\n      }\n\n      return typeSummary && typeSummary.summaryKind === kind ? typeSummary : null;\n    }\n  }, {\n    key: \"getHostComponentMetadata\",\n    value: function getHostComponentMetadata(compMeta, hostViewType) {\n      var hostType = this.getHostComponentType(compMeta.type.reference);\n\n      if (!hostViewType) {\n        hostViewType = this.getHostComponentViewClass(hostType);\n      } // Note: ! is ok here as this method should only be called with normalized directive\n      // metadata, which always fills in the selector.\n\n\n      var template = CssSelector.parse(compMeta.selector)[0].getMatchingElementTemplate();\n      var templateUrl = '';\n\n      var htmlAst = this._htmlParser.parse(template, templateUrl);\n\n      return CompileDirectiveMetadata.create({\n        isHost: true,\n        type: {\n          reference: hostType,\n          diDeps: [],\n          lifecycleHooks: []\n        },\n        template: new CompileTemplateMetadata({\n          encapsulation: ViewEncapsulation.None,\n          template: template,\n          templateUrl: templateUrl,\n          htmlAst: htmlAst,\n          styles: [],\n          styleUrls: [],\n          ngContentSelectors: [],\n          animations: [],\n          isInline: true,\n          externalStylesheets: [],\n          interpolation: null,\n          preserveWhitespaces: false\n        }),\n        exportAs: null,\n        changeDetection: ChangeDetectionStrategy.Default,\n        inputs: [],\n        outputs: [],\n        host: {},\n        isComponent: true,\n        selector: '*',\n        providers: [],\n        viewProviders: [],\n        queries: [],\n        guards: {},\n        viewQueries: [],\n        componentViewType: hostViewType,\n        rendererType: {\n          id: '__Host__',\n          encapsulation: ViewEncapsulation.None,\n          styles: [],\n          data: {}\n        },\n        entryComponents: [],\n        componentFactory: null\n      });\n    }\n  }, {\n    key: \"loadDirectiveMetadata\",\n    value: function loadDirectiveMetadata(ngModuleType, directiveType, isSync) {\n      var _this226 = this;\n\n      if (this._directiveCache.has(directiveType)) {\n        return null;\n      }\n\n      directiveType = resolveForwardRef(directiveType);\n\n      var _this$getNonNormalize = this.getNonNormalizedDirectiveMetadata(directiveType),\n          annotation = _this$getNonNormalize.annotation,\n          metadata = _this$getNonNormalize.metadata;\n\n      var createDirectiveMetadata = function createDirectiveMetadata(templateMetadata) {\n        var normalizedDirMeta = new CompileDirectiveMetadata({\n          isHost: false,\n          type: metadata.type,\n          isComponent: metadata.isComponent,\n          selector: metadata.selector,\n          exportAs: metadata.exportAs,\n          changeDetection: metadata.changeDetection,\n          inputs: metadata.inputs,\n          outputs: metadata.outputs,\n          hostListeners: metadata.hostListeners,\n          hostProperties: metadata.hostProperties,\n          hostAttributes: metadata.hostAttributes,\n          providers: metadata.providers,\n          viewProviders: metadata.viewProviders,\n          queries: metadata.queries,\n          guards: metadata.guards,\n          viewQueries: metadata.viewQueries,\n          entryComponents: metadata.entryComponents,\n          componentViewType: metadata.componentViewType,\n          rendererType: metadata.rendererType,\n          componentFactory: metadata.componentFactory,\n          template: templateMetadata\n        });\n\n        if (templateMetadata) {\n          _this226.initComponentFactory(metadata.componentFactory, templateMetadata.ngContentSelectors);\n        }\n\n        _this226._directiveCache.set(directiveType, normalizedDirMeta);\n\n        _this226._summaryCache.set(directiveType, normalizedDirMeta.toSummary());\n\n        return null;\n      };\n\n      if (metadata.isComponent) {\n        var template = metadata.template;\n\n        var templateMeta = this._directiveNormalizer.normalizeTemplate({\n          ngModuleType: ngModuleType,\n          componentType: directiveType,\n          moduleUrl: this._reflector.componentModuleUrl(directiveType, annotation),\n          encapsulation: template.encapsulation,\n          template: template.template,\n          templateUrl: template.templateUrl,\n          styles: template.styles,\n          styleUrls: template.styleUrls,\n          animations: template.animations,\n          interpolation: template.interpolation,\n          preserveWhitespaces: template.preserveWhitespaces\n        });\n\n        if (isPromise(templateMeta) && isSync) {\n          this._reportError(componentStillLoadingError(directiveType), directiveType);\n\n          return null;\n        }\n\n        return SyncAsync.then(templateMeta, createDirectiveMetadata);\n      } else {\n        // directive\n        createDirectiveMetadata(null);\n        return null;\n      }\n    }\n  }, {\n    key: \"getNonNormalizedDirectiveMetadata\",\n    value: function getNonNormalizedDirectiveMetadata(directiveType) {\n      var _this227 = this;\n\n      directiveType = resolveForwardRef(directiveType);\n\n      if (!directiveType) {\n        return null;\n      }\n\n      var cacheEntry = this._nonNormalizedDirectiveCache.get(directiveType);\n\n      if (cacheEntry) {\n        return cacheEntry;\n      }\n\n      var dirMeta = this._directiveResolver.resolve(directiveType, false);\n\n      if (!dirMeta) {\n        return null;\n      }\n\n      var nonNormalizedTemplateMetadata = undefined;\n\n      if (createComponent.isTypeOf(dirMeta)) {\n        // component\n        var compMeta = dirMeta;\n        assertArrayOfStrings('styles', compMeta.styles);\n        assertArrayOfStrings('styleUrls', compMeta.styleUrls);\n        assertInterpolationSymbols('interpolation', compMeta.interpolation);\n        var animations = compMeta.animations;\n        nonNormalizedTemplateMetadata = new CompileTemplateMetadata({\n          encapsulation: noUndefined(compMeta.encapsulation),\n          template: noUndefined(compMeta.template),\n          templateUrl: noUndefined(compMeta.templateUrl),\n          htmlAst: null,\n          styles: compMeta.styles || [],\n          styleUrls: compMeta.styleUrls || [],\n          animations: animations || [],\n          interpolation: noUndefined(compMeta.interpolation),\n          isInline: !!compMeta.template,\n          externalStylesheets: [],\n          ngContentSelectors: [],\n          preserveWhitespaces: noUndefined(dirMeta.preserveWhitespaces)\n        });\n      }\n\n      var changeDetectionStrategy = null;\n      var viewProviders = [];\n      var entryComponentMetadata = [];\n      var selector = dirMeta.selector;\n\n      if (createComponent.isTypeOf(dirMeta)) {\n        // Component\n        var _compMeta = dirMeta;\n        changeDetectionStrategy = _compMeta.changeDetection;\n\n        if (_compMeta.viewProviders) {\n          viewProviders = this._getProvidersMetadata(_compMeta.viewProviders, entryComponentMetadata, \"viewProviders for \\\"\".concat(stringifyType(directiveType), \"\\\"\"), [], directiveType);\n        }\n\n        if (_compMeta.entryComponents) {\n          entryComponentMetadata = flattenAndDedupeArray(_compMeta.entryComponents).map(function (type) {\n            return _this227._getEntryComponentMetadata(type);\n          }).concat(entryComponentMetadata);\n        }\n\n        if (!selector) {\n          selector = this._schemaRegistry.getDefaultComponentElementName();\n        }\n      } else {\n        // Directive\n        if (!selector) {\n          selector = null;\n        }\n      }\n\n      var providers = [];\n\n      if (dirMeta.providers != null) {\n        providers = this._getProvidersMetadata(dirMeta.providers, entryComponentMetadata, \"providers for \\\"\".concat(stringifyType(directiveType), \"\\\"\"), [], directiveType);\n      }\n\n      var queries = [];\n      var viewQueries = [];\n\n      if (dirMeta.queries != null) {\n        queries = this._getQueriesMetadata(dirMeta.queries, false, directiveType);\n        viewQueries = this._getQueriesMetadata(dirMeta.queries, true, directiveType);\n      }\n\n      var metadata = CompileDirectiveMetadata.create({\n        isHost: false,\n        selector: selector,\n        exportAs: noUndefined(dirMeta.exportAs),\n        isComponent: !!nonNormalizedTemplateMetadata,\n        type: this._getTypeMetadata(directiveType),\n        template: nonNormalizedTemplateMetadata,\n        changeDetection: changeDetectionStrategy,\n        inputs: dirMeta.inputs || [],\n        outputs: dirMeta.outputs || [],\n        host: dirMeta.host || {},\n        providers: providers || [],\n        viewProviders: viewProviders || [],\n        queries: queries || [],\n        guards: dirMeta.guards || {},\n        viewQueries: viewQueries || [],\n        entryComponents: entryComponentMetadata,\n        componentViewType: nonNormalizedTemplateMetadata ? this.getComponentViewClass(directiveType) : null,\n        rendererType: nonNormalizedTemplateMetadata ? this.getRendererType(directiveType) : null,\n        componentFactory: null\n      });\n\n      if (nonNormalizedTemplateMetadata) {\n        metadata.componentFactory = this.getComponentFactory(selector, directiveType, metadata.inputs, metadata.outputs);\n      }\n\n      cacheEntry = {\n        metadata: metadata,\n        annotation: dirMeta\n      };\n\n      this._nonNormalizedDirectiveCache.set(directiveType, cacheEntry);\n\n      return cacheEntry;\n    }\n    /**\n     * Gets the metadata for the given directive.\n     * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n     */\n\n  }, {\n    key: \"getDirectiveMetadata\",\n    value: function getDirectiveMetadata(directiveType) {\n      var dirMeta = this._directiveCache.get(directiveType);\n\n      if (!dirMeta) {\n        this._reportError(syntaxError(\"Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive \".concat(stringifyType(directiveType), \".\")), directiveType);\n      }\n\n      return dirMeta;\n    }\n  }, {\n    key: \"getDirectiveSummary\",\n    value: function getDirectiveSummary(dirType) {\n      var dirSummary = this._loadSummary(dirType, CompileSummaryKind.Directive);\n\n      if (!dirSummary) {\n        this._reportError(syntaxError(\"Illegal state: Could not load the summary for directive \".concat(stringifyType(dirType), \".\")), dirType);\n      }\n\n      return dirSummary;\n    }\n  }, {\n    key: \"isDirective\",\n    value: function isDirective(type) {\n      return !!this._loadSummary(type, CompileSummaryKind.Directive) || this._directiveResolver.isDirective(type);\n    }\n  }, {\n    key: \"isAbstractDirective\",\n    value: function isAbstractDirective(type) {\n      var summary = this._loadSummary(type, CompileSummaryKind.Directive);\n\n      if (summary && !summary.isComponent) {\n        return !summary.selector;\n      }\n\n      var meta = this._directiveResolver.resolve(type, false);\n\n      if (meta && !createComponent.isTypeOf(meta)) {\n        return !meta.selector;\n      }\n\n      return false;\n    }\n  }, {\n    key: \"isPipe\",\n    value: function isPipe(type) {\n      return !!this._loadSummary(type, CompileSummaryKind.Pipe) || this._pipeResolver.isPipe(type);\n    }\n  }, {\n    key: \"isNgModule\",\n    value: function isNgModule(type) {\n      return !!this._loadSummary(type, CompileSummaryKind.NgModule) || this._ngModuleResolver.isNgModule(type);\n    }\n  }, {\n    key: \"getNgModuleSummary\",\n    value: function getNgModuleSummary(moduleType) {\n      var alreadyCollecting = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      var moduleSummary = this._loadSummary(moduleType, CompileSummaryKind.NgModule);\n\n      if (!moduleSummary) {\n        var moduleMeta = this.getNgModuleMetadata(moduleType, false, alreadyCollecting);\n        moduleSummary = moduleMeta ? moduleMeta.toSummary() : null;\n\n        if (moduleSummary) {\n          this._summaryCache.set(moduleType, moduleSummary);\n        }\n      }\n\n      return moduleSummary;\n    }\n    /**\n     * Loads the declared directives and pipes of an NgModule.\n     */\n\n  }, {\n    key: \"loadNgModuleDirectiveAndPipeMetadata\",\n    value: function loadNgModuleDirectiveAndPipeMetadata(moduleType, isSync) {\n      var _this228 = this;\n\n      var throwIfNotFound = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n      var ngModule = this.getNgModuleMetadata(moduleType, throwIfNotFound);\n      var loading = [];\n\n      if (ngModule) {\n        ngModule.declaredDirectives.forEach(function (id) {\n          var promise = _this228.loadDirectiveMetadata(moduleType, id.reference, isSync);\n\n          if (promise) {\n            loading.push(promise);\n          }\n        });\n        ngModule.declaredPipes.forEach(function (id) {\n          return _this228._loadPipeMetadata(id.reference);\n        });\n      }\n\n      return Promise.all(loading);\n    }\n  }, {\n    key: \"getShallowModuleMetadata\",\n    value: function getShallowModuleMetadata(moduleType) {\n      var compileMeta = this._shallowModuleCache.get(moduleType);\n\n      if (compileMeta) {\n        return compileMeta;\n      }\n\n      var ngModuleMeta = findLast(this._reflector.shallowAnnotations(moduleType), createNgModule.isTypeOf);\n      compileMeta = {\n        type: this._getTypeMetadata(moduleType),\n        rawExports: ngModuleMeta.exports,\n        rawImports: ngModuleMeta.imports,\n        rawProviders: ngModuleMeta.providers\n      };\n\n      this._shallowModuleCache.set(moduleType, compileMeta);\n\n      return compileMeta;\n    }\n  }, {\n    key: \"getNgModuleMetadata\",\n    value: function getNgModuleMetadata(moduleType) {\n      var _this229 = this;\n\n      var throwIfNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var alreadyCollecting = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n      moduleType = resolveForwardRef(moduleType);\n\n      var compileMeta = this._ngModuleCache.get(moduleType);\n\n      if (compileMeta) {\n        return compileMeta;\n      }\n\n      var meta = this._ngModuleResolver.resolve(moduleType, throwIfNotFound);\n\n      if (!meta) {\n        return null;\n      }\n\n      var declaredDirectives = [];\n      var exportedNonModuleIdentifiers = [];\n      var declaredPipes = [];\n      var importedModules = [];\n      var exportedModules = [];\n      var providers = [];\n      var entryComponents = [];\n      var bootstrapComponents = [];\n      var schemas = [];\n\n      if (meta.imports) {\n        flattenAndDedupeArray(meta.imports).forEach(function (importedType) {\n          var importedModuleType = undefined;\n\n          if (isValidType(importedType)) {\n            importedModuleType = importedType;\n          } else if (importedType && importedType.ngModule) {\n            var moduleWithProviders = importedType;\n            importedModuleType = moduleWithProviders.ngModule;\n\n            if (moduleWithProviders.providers) {\n              providers.push.apply(providers, _toConsumableArray(_this229._getProvidersMetadata(moduleWithProviders.providers, entryComponents, \"provider for the NgModule '\".concat(stringifyType(importedModuleType), \"'\"), [], importedType)));\n            }\n          }\n\n          if (importedModuleType) {\n            if (_this229._checkSelfImport(moduleType, importedModuleType)) return;\n            if (!alreadyCollecting) alreadyCollecting = new Set();\n\n            if (alreadyCollecting.has(importedModuleType)) {\n              _this229._reportError(syntaxError(\"\".concat(_this229._getTypeDescriptor(importedModuleType), \" '\").concat(stringifyType(importedType), \"' is imported recursively by the module '\").concat(stringifyType(moduleType), \"'.\")), moduleType);\n\n              return;\n            }\n\n            alreadyCollecting.add(importedModuleType);\n\n            var importedModuleSummary = _this229.getNgModuleSummary(importedModuleType, alreadyCollecting);\n\n            alreadyCollecting.delete(importedModuleType);\n\n            if (!importedModuleSummary) {\n              var err = syntaxError(\"Unexpected \".concat(_this229._getTypeDescriptor(importedType), \" '\").concat(stringifyType(importedType), \"' imported by the module '\").concat(stringifyType(moduleType), \"'. Please add a @NgModule annotation.\")); // If possible, record additional context for this error to enable more useful\n              // diagnostics on the compiler side.\n\n              if (importedType instanceof StaticSymbol) {\n                err[MISSING_NG_MODULE_METADATA_ERROR_DATA] = {\n                  fileName: importedType.filePath,\n                  className: importedType.name\n                };\n              }\n\n              _this229._reportError(err, moduleType);\n\n              return;\n            }\n\n            importedModules.push(importedModuleSummary);\n          } else {\n            _this229._reportError(syntaxError(\"Unexpected value '\".concat(stringifyType(importedType), \"' imported by the module '\").concat(stringifyType(moduleType), \"'\")), moduleType);\n\n            return;\n          }\n        });\n      }\n\n      if (meta.exports) {\n        flattenAndDedupeArray(meta.exports).forEach(function (exportedType) {\n          if (!isValidType(exportedType)) {\n            _this229._reportError(syntaxError(\"Unexpected value '\".concat(stringifyType(exportedType), \"' exported by the module '\").concat(stringifyType(moduleType), \"'\")), moduleType);\n\n            return;\n          }\n\n          if (!alreadyCollecting) alreadyCollecting = new Set();\n\n          if (alreadyCollecting.has(exportedType)) {\n            _this229._reportError(syntaxError(\"\".concat(_this229._getTypeDescriptor(exportedType), \" '\").concat(stringify(exportedType), \"' is exported recursively by the module '\").concat(stringifyType(moduleType), \"'\")), moduleType);\n\n            return;\n          }\n\n          alreadyCollecting.add(exportedType);\n\n          var exportedModuleSummary = _this229.getNgModuleSummary(exportedType, alreadyCollecting);\n\n          alreadyCollecting.delete(exportedType);\n\n          if (exportedModuleSummary) {\n            exportedModules.push(exportedModuleSummary);\n          } else {\n            exportedNonModuleIdentifiers.push(_this229._getIdentifierMetadata(exportedType));\n          }\n        });\n      } // Note: This will be modified later, so we rely on\n      // getting a new instance every time!\n\n\n      var transitiveModule = this._getTransitiveNgModuleMetadata(importedModules, exportedModules);\n\n      if (meta.declarations) {\n        flattenAndDedupeArray(meta.declarations).forEach(function (declaredType) {\n          if (!isValidType(declaredType)) {\n            _this229._reportError(syntaxError(\"Unexpected value '\".concat(stringifyType(declaredType), \"' declared by the module '\").concat(stringifyType(moduleType), \"'\")), moduleType);\n\n            return;\n          }\n\n          var declaredIdentifier = _this229._getIdentifierMetadata(declaredType);\n\n          if (_this229.isDirective(declaredType)) {\n            if (_this229.isAbstractDirective(declaredType)) {\n              _this229._reportError(syntaxError(\"Directive \".concat(stringifyType(declaredType), \" has no selector, please add it!\")), declaredType);\n            }\n\n            transitiveModule.addDirective(declaredIdentifier);\n            declaredDirectives.push(declaredIdentifier);\n\n            _this229._addTypeToModule(declaredType, moduleType);\n          } else if (_this229.isPipe(declaredType)) {\n            transitiveModule.addPipe(declaredIdentifier);\n            transitiveModule.pipes.push(declaredIdentifier);\n            declaredPipes.push(declaredIdentifier);\n\n            _this229._addTypeToModule(declaredType, moduleType);\n          } else {\n            _this229._reportError(syntaxError(\"Unexpected \".concat(_this229._getTypeDescriptor(declaredType), \" '\").concat(stringifyType(declaredType), \"' declared by the module '\").concat(stringifyType(moduleType), \"'. Please add a @Pipe/@Directive/@Component annotation.\")), moduleType);\n\n            return;\n          }\n        });\n      }\n\n      var exportedDirectives = [];\n      var exportedPipes = [];\n      exportedNonModuleIdentifiers.forEach(function (exportedId) {\n        if (transitiveModule.directivesSet.has(exportedId.reference)) {\n          exportedDirectives.push(exportedId);\n          transitiveModule.addExportedDirective(exportedId);\n        } else if (transitiveModule.pipesSet.has(exportedId.reference)) {\n          exportedPipes.push(exportedId);\n          transitiveModule.addExportedPipe(exportedId);\n        } else {\n          _this229._reportError(syntaxError(\"Can't export \".concat(_this229._getTypeDescriptor(exportedId.reference), \" \").concat(stringifyType(exportedId.reference), \" from \").concat(stringifyType(moduleType), \" as it was neither declared nor imported!\")), moduleType);\n\n          return;\n        }\n      }); // The providers of the module have to go last\n      // so that they overwrite any other provider we already added.\n\n      if (meta.providers) {\n        providers.push.apply(providers, _toConsumableArray(this._getProvidersMetadata(meta.providers, entryComponents, \"provider for the NgModule '\".concat(stringifyType(moduleType), \"'\"), [], moduleType)));\n      }\n\n      if (meta.entryComponents) {\n        entryComponents.push.apply(entryComponents, _toConsumableArray(flattenAndDedupeArray(meta.entryComponents).map(function (type) {\n          return _this229._getEntryComponentMetadata(type);\n        })));\n      }\n\n      if (meta.bootstrap) {\n        flattenAndDedupeArray(meta.bootstrap).forEach(function (type) {\n          if (!isValidType(type)) {\n            _this229._reportError(syntaxError(\"Unexpected value '\".concat(stringifyType(type), \"' used in the bootstrap property of module '\").concat(stringifyType(moduleType), \"'\")), moduleType);\n\n            return;\n          }\n\n          bootstrapComponents.push(_this229._getIdentifierMetadata(type));\n        });\n      }\n\n      entryComponents.push.apply(entryComponents, _toConsumableArray(bootstrapComponents.map(function (type) {\n        return _this229._getEntryComponentMetadata(type.reference);\n      })));\n\n      if (meta.schemas) {\n        schemas.push.apply(schemas, _toConsumableArray(flattenAndDedupeArray(meta.schemas)));\n      }\n\n      compileMeta = new CompileNgModuleMetadata({\n        type: this._getTypeMetadata(moduleType),\n        providers: providers,\n        entryComponents: entryComponents,\n        bootstrapComponents: bootstrapComponents,\n        schemas: schemas,\n        declaredDirectives: declaredDirectives,\n        exportedDirectives: exportedDirectives,\n        declaredPipes: declaredPipes,\n        exportedPipes: exportedPipes,\n        importedModules: importedModules,\n        exportedModules: exportedModules,\n        transitiveModule: transitiveModule,\n        id: meta.id || null\n      });\n      entryComponents.forEach(function (id) {\n        return transitiveModule.addEntryComponent(id);\n      });\n      providers.forEach(function (provider) {\n        return transitiveModule.addProvider(provider, compileMeta.type);\n      });\n      transitiveModule.addModule(compileMeta.type);\n\n      this._ngModuleCache.set(moduleType, compileMeta);\n\n      return compileMeta;\n    }\n  }, {\n    key: \"_checkSelfImport\",\n    value: function _checkSelfImport(moduleType, importedModuleType) {\n      if (moduleType === importedModuleType) {\n        this._reportError(syntaxError(\"'\".concat(stringifyType(moduleType), \"' module can't import itself\")), moduleType);\n\n        return true;\n      }\n\n      return false;\n    }\n  }, {\n    key: \"_getTypeDescriptor\",\n    value: function _getTypeDescriptor(type) {\n      if (isValidType(type)) {\n        if (this.isDirective(type)) {\n          return 'directive';\n        }\n\n        if (this.isPipe(type)) {\n          return 'pipe';\n        }\n\n        if (this.isNgModule(type)) {\n          return 'module';\n        }\n      }\n\n      if (type.provide) {\n        return 'provider';\n      }\n\n      return 'value';\n    }\n  }, {\n    key: \"_addTypeToModule\",\n    value: function _addTypeToModule(type, moduleType) {\n      var oldModule = this._ngModuleOfTypes.get(type);\n\n      if (oldModule && oldModule !== moduleType) {\n        this._reportError(syntaxError(\"Type \".concat(stringifyType(type), \" is part of the declarations of 2 modules: \").concat(stringifyType(oldModule), \" and \").concat(stringifyType(moduleType), \"! \") + \"Please consider moving \".concat(stringifyType(type), \" to a higher module that imports \").concat(stringifyType(oldModule), \" and \").concat(stringifyType(moduleType), \". \") + \"You can also create a new NgModule that exports and includes \".concat(stringifyType(type), \" then import that NgModule in \").concat(stringifyType(oldModule), \" and \").concat(stringifyType(moduleType), \".\")), moduleType);\n\n        return;\n      }\n\n      this._ngModuleOfTypes.set(type, moduleType);\n    }\n  }, {\n    key: \"_getTransitiveNgModuleMetadata\",\n    value: function _getTransitiveNgModuleMetadata(importedModules, exportedModules) {\n      // collect `providers` / `entryComponents` from all imported and all exported modules\n      var result = new TransitiveCompileNgModuleMetadata();\n      var modulesByToken = new Map();\n      importedModules.concat(exportedModules).forEach(function (modSummary) {\n        modSummary.modules.forEach(function (mod) {\n          return result.addModule(mod);\n        });\n        modSummary.entryComponents.forEach(function (comp) {\n          return result.addEntryComponent(comp);\n        });\n        var addedTokens = new Set();\n        modSummary.providers.forEach(function (entry) {\n          var tokenRef = tokenReference(entry.provider.token);\n          var prevModules = modulesByToken.get(tokenRef);\n\n          if (!prevModules) {\n            prevModules = new Set();\n            modulesByToken.set(tokenRef, prevModules);\n          }\n\n          var moduleRef = entry.module.reference; // Note: the providers of one module may still contain multiple providers\n          // per token (e.g. for multi providers), and we need to preserve these.\n\n          if (addedTokens.has(tokenRef) || !prevModules.has(moduleRef)) {\n            prevModules.add(moduleRef);\n            addedTokens.add(tokenRef);\n            result.addProvider(entry.provider, entry.module);\n          }\n        });\n      });\n      exportedModules.forEach(function (modSummary) {\n        modSummary.exportedDirectives.forEach(function (id) {\n          return result.addExportedDirective(id);\n        });\n        modSummary.exportedPipes.forEach(function (id) {\n          return result.addExportedPipe(id);\n        });\n      });\n      importedModules.forEach(function (modSummary) {\n        modSummary.exportedDirectives.forEach(function (id) {\n          return result.addDirective(id);\n        });\n        modSummary.exportedPipes.forEach(function (id) {\n          return result.addPipe(id);\n        });\n      });\n      return result;\n    }\n  }, {\n    key: \"_getIdentifierMetadata\",\n    value: function _getIdentifierMetadata(type) {\n      type = resolveForwardRef(type);\n      return {\n        reference: type\n      };\n    }\n  }, {\n    key: \"isInjectable\",\n    value: function isInjectable(type) {\n      var annotations = this._reflector.tryAnnotations(type);\n\n      return annotations.some(function (ann) {\n        return createInjectable.isTypeOf(ann);\n      });\n    }\n  }, {\n    key: \"getInjectableSummary\",\n    value: function getInjectableSummary(type) {\n      return {\n        summaryKind: CompileSummaryKind.Injectable,\n        type: this._getTypeMetadata(type, null, false)\n      };\n    }\n  }, {\n    key: \"getInjectableMetadata\",\n    value: function getInjectableMetadata(type) {\n      var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      var throwOnUnknownDeps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n      var typeSummary = this._loadSummary(type, CompileSummaryKind.Injectable);\n\n      var typeMetadata = typeSummary ? typeSummary.type : this._getTypeMetadata(type, dependencies, throwOnUnknownDeps);\n\n      var annotations = this._reflector.annotations(type).filter(function (ann) {\n        return createInjectable.isTypeOf(ann);\n      });\n\n      if (annotations.length === 0) {\n        return null;\n      }\n\n      var meta = annotations[annotations.length - 1];\n      return {\n        symbol: type,\n        type: typeMetadata,\n        providedIn: meta.providedIn,\n        useValue: meta.useValue,\n        useClass: meta.useClass,\n        useExisting: meta.useExisting,\n        useFactory: meta.useFactory,\n        deps: meta.deps\n      };\n    }\n  }, {\n    key: \"_getTypeMetadata\",\n    value: function _getTypeMetadata(type) {\n      var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      var throwOnUnknownDeps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n      var identifier = this._getIdentifierMetadata(type);\n\n      return {\n        reference: identifier.reference,\n        diDeps: this._getDependenciesMetadata(identifier.reference, dependencies, throwOnUnknownDeps),\n        lifecycleHooks: getAllLifecycleHooks(this._reflector, identifier.reference)\n      };\n    }\n  }, {\n    key: \"_getFactoryMetadata\",\n    value: function _getFactoryMetadata(factory) {\n      var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      factory = resolveForwardRef(factory);\n      return {\n        reference: factory,\n        diDeps: this._getDependenciesMetadata(factory, dependencies)\n      };\n    }\n    /**\n     * Gets the metadata for the given pipe.\n     * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n     */\n\n  }, {\n    key: \"getPipeMetadata\",\n    value: function getPipeMetadata(pipeType) {\n      var pipeMeta = this._pipeCache.get(pipeType);\n\n      if (!pipeMeta) {\n        this._reportError(syntaxError(\"Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe \".concat(stringifyType(pipeType), \".\")), pipeType);\n      }\n\n      return pipeMeta || null;\n    }\n  }, {\n    key: \"getPipeSummary\",\n    value: function getPipeSummary(pipeType) {\n      var pipeSummary = this._loadSummary(pipeType, CompileSummaryKind.Pipe);\n\n      if (!pipeSummary) {\n        this._reportError(syntaxError(\"Illegal state: Could not load the summary for pipe \".concat(stringifyType(pipeType), \".\")), pipeType);\n      }\n\n      return pipeSummary;\n    }\n  }, {\n    key: \"getOrLoadPipeMetadata\",\n    value: function getOrLoadPipeMetadata(pipeType) {\n      var pipeMeta = this._pipeCache.get(pipeType);\n\n      if (!pipeMeta) {\n        pipeMeta = this._loadPipeMetadata(pipeType);\n      }\n\n      return pipeMeta;\n    }\n  }, {\n    key: \"_loadPipeMetadata\",\n    value: function _loadPipeMetadata(pipeType) {\n      pipeType = resolveForwardRef(pipeType);\n\n      var pipeAnnotation = this._pipeResolver.resolve(pipeType);\n\n      var pipeMeta = new CompilePipeMetadata({\n        type: this._getTypeMetadata(pipeType),\n        name: pipeAnnotation.name,\n        pure: !!pipeAnnotation.pure\n      });\n\n      this._pipeCache.set(pipeType, pipeMeta);\n\n      this._summaryCache.set(pipeType, pipeMeta.toSummary());\n\n      return pipeMeta;\n    }\n  }, {\n    key: \"_getDependenciesMetadata\",\n    value: function _getDependenciesMetadata(typeOrFunc, dependencies) {\n      var _this230 = this;\n\n      var throwOnUnknownDeps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n      var hasUnknownDeps = false;\n      var params = dependencies || this._reflector.parameters(typeOrFunc) || [];\n      var dependenciesMetadata = params.map(function (param) {\n        var isAttribute = false;\n        var isHost = false;\n        var isSelf = false;\n        var isSkipSelf = false;\n        var isOptional = false;\n        var token = null;\n\n        if (Array.isArray(param)) {\n          param.forEach(function (paramEntry) {\n            if (createHost.isTypeOf(paramEntry)) {\n              isHost = true;\n            } else if (createSelf.isTypeOf(paramEntry)) {\n              isSelf = true;\n            } else if (createSkipSelf.isTypeOf(paramEntry)) {\n              isSkipSelf = true;\n            } else if (createOptional.isTypeOf(paramEntry)) {\n              isOptional = true;\n            } else if (createAttribute.isTypeOf(paramEntry)) {\n              isAttribute = true;\n              token = paramEntry.attributeName;\n            } else if (createInject.isTypeOf(paramEntry)) {\n              token = paramEntry.token;\n            } else if (createInjectionToken.isTypeOf(paramEntry) || paramEntry instanceof StaticSymbol) {\n              token = paramEntry;\n            } else if (isValidType(paramEntry) && token == null) {\n              token = paramEntry;\n            }\n          });\n        } else {\n          token = param;\n        }\n\n        if (token == null) {\n          hasUnknownDeps = true;\n          return {};\n        }\n\n        return {\n          isAttribute: isAttribute,\n          isHost: isHost,\n          isSelf: isSelf,\n          isSkipSelf: isSkipSelf,\n          isOptional: isOptional,\n          token: _this230._getTokenMetadata(token)\n        };\n      });\n\n      if (hasUnknownDeps) {\n        var depsTokens = dependenciesMetadata.map(function (dep) {\n          return dep.token ? stringifyType(dep.token) : '?';\n        }).join(', ');\n        var message = \"Can't resolve all parameters for \".concat(stringifyType(typeOrFunc), \": (\").concat(depsTokens, \").\");\n\n        if (throwOnUnknownDeps || this._config.strictInjectionParameters) {\n          this._reportError(syntaxError(message), typeOrFunc);\n        }\n      }\n\n      return dependenciesMetadata;\n    }\n  }, {\n    key: \"_getTokenMetadata\",\n    value: function _getTokenMetadata(token) {\n      token = resolveForwardRef(token);\n      var compileToken;\n\n      if (typeof token === 'string') {\n        compileToken = {\n          value: token\n        };\n      } else {\n        compileToken = {\n          identifier: {\n            reference: token\n          }\n        };\n      }\n\n      return compileToken;\n    }\n  }, {\n    key: \"_getProvidersMetadata\",\n    value: function _getProvidersMetadata(providers, targetEntryComponents, debugInfo) {\n      var _this231 = this;\n\n      var compileProviders = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n      var type = arguments.length > 4 ? arguments[4] : undefined;\n      providers.forEach(function (provider, providerIdx) {\n        if (Array.isArray(provider)) {\n          _this231._getProvidersMetadata(provider, targetEntryComponents, debugInfo, compileProviders);\n        } else {\n          provider = resolveForwardRef(provider);\n          var providerMeta = undefined;\n\n          if (provider && typeof provider === 'object' && provider.hasOwnProperty('provide')) {\n            _this231._validateProvider(provider);\n\n            providerMeta = new ProviderMeta(provider.provide, provider);\n          } else if (isValidType(provider)) {\n            providerMeta = new ProviderMeta(provider, {\n              useClass: provider\n            });\n          } else if (provider === void 0) {\n            _this231._reportError(syntaxError(\"Encountered undefined provider! Usually this means you have a circular dependencies. This might be caused by using 'barrel' index.ts files.\"));\n\n            return;\n          } else {\n            var providersInfo = providers.reduce(function (soFar, seenProvider, seenProviderIdx) {\n              if (seenProviderIdx < providerIdx) {\n                soFar.push(\"\".concat(stringifyType(seenProvider)));\n              } else if (seenProviderIdx == providerIdx) {\n                soFar.push(\"?\".concat(stringifyType(seenProvider), \"?\"));\n              } else if (seenProviderIdx == providerIdx + 1) {\n                soFar.push('...');\n              }\n\n              return soFar;\n            }, []).join(', ');\n\n            _this231._reportError(syntaxError(\"Invalid \".concat(debugInfo ? debugInfo : 'provider', \" - only instances of Provider and Type are allowed, got: [\").concat(providersInfo, \"]\")), type);\n\n            return;\n          }\n\n          if (providerMeta.token === _this231._reflector.resolveExternalReference(Identifiers$1.ANALYZE_FOR_ENTRY_COMPONENTS)) {\n            targetEntryComponents.push.apply(targetEntryComponents, _toConsumableArray(_this231._getEntryComponentsFromProvider(providerMeta, type)));\n          } else {\n            compileProviders.push(_this231.getProviderMetadata(providerMeta));\n          }\n        }\n      });\n      return compileProviders;\n    }\n  }, {\n    key: \"_validateProvider\",\n    value: function _validateProvider(provider) {\n      if (provider.hasOwnProperty('useClass') && provider.useClass == null) {\n        this._reportError(syntaxError(\"Invalid provider for \".concat(stringifyType(provider.provide), \". useClass cannot be \").concat(provider.useClass, \".\\n           Usually it happens when:\\n           1. There's a circular dependency (might be caused by using index.ts (barrel) files).\\n           2. Class was used before it was declared. Use forwardRef in this case.\")));\n      }\n    }\n  }, {\n    key: \"_getEntryComponentsFromProvider\",\n    value: function _getEntryComponentsFromProvider(provider, type) {\n      var _this232 = this;\n\n      var components = [];\n      var collectedIdentifiers = [];\n\n      if (provider.useFactory || provider.useExisting || provider.useClass) {\n        this._reportError(syntaxError(\"The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!\"), type);\n\n        return [];\n      }\n\n      if (!provider.multi) {\n        this._reportError(syntaxError(\"The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!\"), type);\n\n        return [];\n      }\n\n      extractIdentifiers(provider.useValue, collectedIdentifiers);\n      collectedIdentifiers.forEach(function (identifier) {\n        var entry = _this232._getEntryComponentMetadata(identifier.reference, false);\n\n        if (entry) {\n          components.push(entry);\n        }\n      });\n      return components;\n    }\n  }, {\n    key: \"_getEntryComponentMetadata\",\n    value: function _getEntryComponentMetadata(dirType) {\n      var throwIfNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var dirMeta = this.getNonNormalizedDirectiveMetadata(dirType);\n\n      if (dirMeta && dirMeta.metadata.isComponent) {\n        return {\n          componentType: dirType,\n          componentFactory: dirMeta.metadata.componentFactory\n        };\n      }\n\n      var dirSummary = this._loadSummary(dirType, CompileSummaryKind.Directive);\n\n      if (dirSummary && dirSummary.isComponent) {\n        return {\n          componentType: dirType,\n          componentFactory: dirSummary.componentFactory\n        };\n      }\n\n      if (throwIfNotFound) {\n        throw syntaxError(\"\".concat(dirType.name, \" cannot be used as an entry component.\"));\n      }\n\n      return null;\n    }\n  }, {\n    key: \"_getInjectableTypeMetadata\",\n    value: function _getInjectableTypeMetadata(type) {\n      var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      var typeSummary = this._loadSummary(type, CompileSummaryKind.Injectable);\n\n      if (typeSummary) {\n        return typeSummary.type;\n      }\n\n      return this._getTypeMetadata(type, dependencies);\n    }\n  }, {\n    key: \"getProviderMetadata\",\n    value: function getProviderMetadata(provider) {\n      var compileDeps = undefined;\n      var compileTypeMetadata = null;\n      var compileFactoryMetadata = null;\n\n      var token = this._getTokenMetadata(provider.token);\n\n      if (provider.useClass) {\n        compileTypeMetadata = this._getInjectableTypeMetadata(provider.useClass, provider.dependencies);\n        compileDeps = compileTypeMetadata.diDeps;\n\n        if (provider.token === provider.useClass) {\n          // use the compileTypeMetadata as it contains information about lifecycleHooks...\n          token = {\n            identifier: compileTypeMetadata\n          };\n        }\n      } else if (provider.useFactory) {\n        compileFactoryMetadata = this._getFactoryMetadata(provider.useFactory, provider.dependencies);\n        compileDeps = compileFactoryMetadata.diDeps;\n      }\n\n      return {\n        token: token,\n        useClass: compileTypeMetadata,\n        useValue: provider.useValue,\n        useFactory: compileFactoryMetadata,\n        useExisting: provider.useExisting ? this._getTokenMetadata(provider.useExisting) : undefined,\n        deps: compileDeps,\n        multi: provider.multi\n      };\n    }\n  }, {\n    key: \"_getQueriesMetadata\",\n    value: function _getQueriesMetadata(queries, isViewQuery, directiveType) {\n      var _this233 = this;\n\n      var res = [];\n      Object.keys(queries).forEach(function (propertyName) {\n        var query = queries[propertyName];\n\n        if (query.isViewQuery === isViewQuery) {\n          res.push(_this233._getQueryMetadata(query, propertyName, directiveType));\n        }\n      });\n      return res;\n    }\n  }, {\n    key: \"_queryVarBindings\",\n    value: function _queryVarBindings(selector) {\n      return selector.split(/\\s*,\\s*/);\n    }\n  }, {\n    key: \"_getQueryMetadata\",\n    value: function _getQueryMetadata(q, propertyName, typeOrFunc) {\n      var _this234 = this;\n\n      var selectors;\n\n      if (typeof q.selector === 'string') {\n        selectors = this._queryVarBindings(q.selector).map(function (varName) {\n          return _this234._getTokenMetadata(varName);\n        });\n      } else {\n        if (!q.selector) {\n          this._reportError(syntaxError(\"Can't construct a query for the property \\\"\".concat(propertyName, \"\\\" of \\\"\").concat(stringifyType(typeOrFunc), \"\\\" since the query selector wasn't defined.\")), typeOrFunc);\n\n          selectors = [];\n        } else {\n          selectors = [this._getTokenMetadata(q.selector)];\n        }\n      }\n\n      return {\n        selectors: selectors,\n        first: q.first,\n        descendants: q.descendants,\n        emitDistinctChangesOnly: q.emitDistinctChangesOnly,\n        propertyName: propertyName,\n        read: q.read ? this._getTokenMetadata(q.read) : null,\n        static: q.static\n      };\n    }\n  }, {\n    key: \"_reportError\",\n    value: function _reportError(error, type, otherType) {\n      if (this._errorCollector) {\n        this._errorCollector(error, type);\n\n        if (otherType) {\n          this._errorCollector(error, otherType);\n        }\n      } else {\n        throw error;\n      }\n    }\n  }]);\n\n  return CompileMetadataResolver;\n}();\n\nfunction flattenArray(tree) {\n  var out = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n  if (tree) {\n    for (var i = 0; i < tree.length; i++) {\n      var item = resolveForwardRef(tree[i]);\n\n      if (Array.isArray(item)) {\n        flattenArray(item, out);\n      } else {\n        out.push(item);\n      }\n    }\n  }\n\n  return out;\n}\n\nfunction dedupeArray(array) {\n  if (array) {\n    return Array.from(new Set(array));\n  }\n\n  return [];\n}\n\nfunction flattenAndDedupeArray(tree) {\n  return dedupeArray(flattenArray(tree));\n}\n\nfunction isValidType(value) {\n  return value instanceof StaticSymbol || value instanceof Type;\n}\n\nfunction extractIdentifiers(value, targetIdentifiers) {\n  visitValue(value, new _CompileValueConverter(), targetIdentifiers);\n}\n\nvar _CompileValueConverter = /*#__PURE__*/function (_ValueTransformer) {\n  _inherits(_CompileValueConverter, _ValueTransformer);\n\n  var _super105 = _createSuper(_CompileValueConverter);\n\n  function _CompileValueConverter() {\n    _classCallCheck(this, _CompileValueConverter);\n\n    return _super105.apply(this, arguments);\n  }\n\n  _createClass(_CompileValueConverter, [{\n    key: \"visitOther\",\n    value: function visitOther(value, targetIdentifiers) {\n      targetIdentifiers.push({\n        reference: value\n      });\n    }\n  }]);\n\n  return _CompileValueConverter;\n}(ValueTransformer);\n\nfunction stringifyType(type) {\n  if (type instanceof StaticSymbol) {\n    return \"\".concat(type.name, \" in \").concat(type.filePath);\n  } else {\n    return stringify(type);\n  }\n}\n/**\n * Indicates that a component is still being loaded in a synchronous compile.\n */\n\n\nfunction componentStillLoadingError(compType) {\n  var error = Error(\"Can't compile synchronously as \".concat(stringify(compType), \" is still being loaded!\"));\n  error[ERROR_COMPONENT_TYPE] = compType;\n  return error;\n}\n/**\n * @license\n * Copyright Google LLC 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\nfunction providerDef(ctx, providerAst) {\n  var flags = 0\n  /* None */\n  ;\n\n  if (!providerAst.eager) {\n    flags |= 4096\n    /* LazyProvider */\n    ;\n  }\n\n  if (providerAst.providerType === ProviderAstType.PrivateService) {\n    flags |= 8192\n    /* PrivateProvider */\n    ;\n  }\n\n  if (providerAst.isModule) {\n    flags |= 1073741824\n    /* TypeModuleProvider */\n    ;\n  }\n\n  providerAst.lifecycleHooks.forEach(function (lifecycleHook) {\n    // for regular providers, we only support ngOnDestroy\n    if (lifecycleHook === LifecycleHooks.OnDestroy || providerAst.providerType === ProviderAstType.Directive || providerAst.providerType === ProviderAstType.Component) {\n      flags |= lifecycleHookToNodeFlag(lifecycleHook);\n    }\n  });\n\n  var _ref35 = providerAst.multiProvider ? multiProviderDef(ctx, flags, providerAst.providers) : singleProviderDef(ctx, flags, providerAst.providerType, providerAst.providers[0]),\n      providerExpr = _ref35.providerExpr,\n      providerFlags = _ref35.flags,\n      depsExpr = _ref35.depsExpr;\n\n  return {\n    providerExpr: providerExpr,\n    flags: providerFlags,\n    depsExpr: depsExpr,\n    tokenExpr: tokenExpr(ctx, providerAst.token)\n  };\n}\n\nfunction multiProviderDef(ctx, flags, providers) {\n  var allDepDefs = [];\n  var allParams = [];\n  var exprs = providers.map(function (provider, providerIndex) {\n    var expr;\n\n    if (provider.useClass) {\n      var depExprs = convertDeps(providerIndex, provider.deps || provider.useClass.diDeps);\n      expr = ctx.importExpr(provider.useClass.reference).instantiate(depExprs);\n    } else if (provider.useFactory) {\n      var _depExprs = convertDeps(providerIndex, provider.deps || provider.useFactory.diDeps);\n\n      expr = ctx.importExpr(provider.useFactory.reference).callFn(_depExprs);\n    } else if (provider.useExisting) {\n      var _depExprs2 = convertDeps(providerIndex, [{\n        token: provider.useExisting\n      }]);\n\n      expr = _depExprs2[0];\n    } else {\n      expr = convertValueToOutputAst(ctx, provider.useValue);\n    }\n\n    return expr;\n  });\n  var providerExpr = fn(allParams, [new ReturnStatement(literalArr(exprs))], INFERRED_TYPE);\n  return {\n    providerExpr: providerExpr,\n    flags: flags | 1024\n    /* TypeFactoryProvider */\n    ,\n    depsExpr: literalArr(allDepDefs)\n  };\n\n  function convertDeps(providerIndex, deps) {\n    return deps.map(function (dep, depIndex) {\n      var paramName = \"p\".concat(providerIndex, \"_\").concat(depIndex);\n      allParams.push(new FnParam(paramName, DYNAMIC_TYPE));\n      allDepDefs.push(depDef(ctx, dep));\n      return variable(paramName);\n    });\n  }\n}\n\nfunction singleProviderDef(ctx, flags, providerType, providerMeta) {\n  var providerExpr;\n  var deps;\n\n  if (providerType === ProviderAstType.Directive || providerType === ProviderAstType.Component) {\n    providerExpr = ctx.importExpr(providerMeta.useClass.reference);\n    flags |= 16384\n    /* TypeDirective */\n    ;\n    deps = providerMeta.deps || providerMeta.useClass.diDeps;\n  } else {\n    if (providerMeta.useClass) {\n      providerExpr = ctx.importExpr(providerMeta.useClass.reference);\n      flags |= 512\n      /* TypeClassProvider */\n      ;\n      deps = providerMeta.deps || providerMeta.useClass.diDeps;\n    } else if (providerMeta.useFactory) {\n      providerExpr = ctx.importExpr(providerMeta.useFactory.reference);\n      flags |= 1024\n      /* TypeFactoryProvider */\n      ;\n      deps = providerMeta.deps || providerMeta.useFactory.diDeps;\n    } else if (providerMeta.useExisting) {\n      providerExpr = NULL_EXPR;\n      flags |= 2048\n      /* TypeUseExistingProvider */\n      ;\n      deps = [{\n        token: providerMeta.useExisting\n      }];\n    } else {\n      providerExpr = convertValueToOutputAst(ctx, providerMeta.useValue);\n      flags |= 256\n      /* TypeValueProvider */\n      ;\n      deps = [];\n    }\n  }\n\n  var depsExpr = literalArr(deps.map(function (dep) {\n    return depDef(ctx, dep);\n  }));\n  return {\n    providerExpr: providerExpr,\n    flags: flags,\n    depsExpr: depsExpr\n  };\n}\n\nfunction tokenExpr(ctx, tokenMeta) {\n  return tokenMeta.identifier ? ctx.importExpr(tokenMeta.identifier.reference) : literal(tokenMeta.value);\n}\n\nfunction depDef(ctx, dep) {\n  // Note: the following fields have already been normalized out by provider_analyzer:\n  // - isAttribute, isHost\n  var expr = dep.isValue ? convertValueToOutputAst(ctx, dep.value) : tokenExpr(ctx, dep.token);\n  var flags = 0\n  /* None */\n  ;\n\n  if (dep.isSkipSelf) {\n    flags |= 1\n    /* SkipSelf */\n    ;\n  }\n\n  if (dep.isOptional) {\n    flags |= 2\n    /* Optional */\n    ;\n  }\n\n  if (dep.isSelf) {\n    flags |= 4\n    /* Self */\n    ;\n  }\n\n  if (dep.isValue) {\n    flags |= 8\n    /* Value */\n    ;\n  }\n\n  return flags === 0\n  /* None */\n  ? expr : literalArr([literal(flags), expr]);\n}\n\nfunction lifecycleHookToNodeFlag(lifecycleHook) {\n  var nodeFlag = 0\n  /* None */\n  ;\n\n  switch (lifecycleHook) {\n    case LifecycleHooks.AfterContentChecked:\n      nodeFlag = 2097152\n      /* AfterContentChecked */\n      ;\n      break;\n\n    case LifecycleHooks.AfterContentInit:\n      nodeFlag = 1048576\n      /* AfterContentInit */\n      ;\n      break;\n\n    case LifecycleHooks.AfterViewChecked:\n      nodeFlag = 8388608\n      /* AfterViewChecked */\n      ;\n      break;\n\n    case LifecycleHooks.AfterViewInit:\n      nodeFlag = 4194304\n      /* AfterViewInit */\n      ;\n      break;\n\n    case LifecycleHooks.DoCheck:\n      nodeFlag = 262144\n      /* DoCheck */\n      ;\n      break;\n\n    case LifecycleHooks.OnChanges:\n      nodeFlag = 524288\n      /* OnChanges */\n      ;\n      break;\n\n    case LifecycleHooks.OnDestroy:\n      nodeFlag = 131072\n      /* OnDestroy */\n      ;\n      break;\n\n    case LifecycleHooks.OnInit:\n      nodeFlag = 65536\n      /* OnInit */\n      ;\n      break;\n  }\n\n  return nodeFlag;\n}\n\nfunction componentFactoryResolverProviderDef(reflector, ctx, flags, entryComponents) {\n  var entryComponentFactories = entryComponents.map(function (entryComponent) {\n    return ctx.importExpr(entryComponent.componentFactory);\n  });\n  var token = createTokenForExternalReference(reflector, Identifiers$1.ComponentFactoryResolver);\n  var classMeta = {\n    diDeps: [{\n      isValue: true,\n      value: literalArr(entryComponentFactories)\n    }, {\n      token: token,\n      isSkipSelf: true,\n      isOptional: true\n    }, {\n      token: createTokenForExternalReference(reflector, Identifiers$1.NgModuleRef)\n    }],\n    lifecycleHooks: [],\n    reference: reflector.resolveExternalReference(Identifiers$1.CodegenComponentFactoryResolver)\n  };\n\n  var _singleProviderDef = singleProviderDef(ctx, flags, ProviderAstType.PrivateService, {\n    token: token,\n    multi: false,\n    useClass: classMeta\n  }),\n      providerExpr = _singleProviderDef.providerExpr,\n      providerFlags = _singleProviderDef.flags,\n      depsExpr = _singleProviderDef.depsExpr;\n\n  return {\n    providerExpr: providerExpr,\n    flags: providerFlags,\n    depsExpr: depsExpr,\n    tokenExpr: tokenExpr(ctx, token)\n  };\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar NgModuleCompileResult = /*#__PURE__*/_createClass(function NgModuleCompileResult(ngModuleFactoryVar) {\n  _classCallCheck(this, NgModuleCompileResult);\n\n  this.ngModuleFactoryVar = ngModuleFactoryVar;\n});\n\nvar LOG_VAR = /*@__PURE__*/variable('_l');\n\nvar NgModuleCompiler = /*#__PURE__*/function () {\n  function NgModuleCompiler(reflector) {\n    _classCallCheck(this, NgModuleCompiler);\n\n    this.reflector = reflector;\n  }\n\n  _createClass(NgModuleCompiler, [{\n    key: \"compile\",\n    value: function compile(ctx, ngModuleMeta, extraProviders) {\n      var sourceSpan = typeSourceSpan('NgModule', ngModuleMeta.type);\n      var entryComponentFactories = ngModuleMeta.transitiveModule.entryComponents;\n      var bootstrapComponents = ngModuleMeta.bootstrapComponents;\n      var providerParser = new NgModuleProviderAnalyzer(this.reflector, ngModuleMeta, extraProviders, sourceSpan);\n      var providerDefs = [componentFactoryResolverProviderDef(this.reflector, ctx, 0\n      /* None */\n      , entryComponentFactories)].concat(providerParser.parse().map(function (provider) {\n        return providerDef(ctx, provider);\n      })).map(function (_ref36) {\n        var providerExpr = _ref36.providerExpr,\n            depsExpr = _ref36.depsExpr,\n            flags = _ref36.flags,\n            tokenExpr = _ref36.tokenExpr;\n        return importExpr(Identifiers$1.moduleProviderDef).callFn([literal(flags), tokenExpr, providerExpr, depsExpr]);\n      });\n      var ngModuleDef = importExpr(Identifiers$1.moduleDef).callFn([literalArr(providerDefs)]);\n      var ngModuleDefFactory = fn([new FnParam(LOG_VAR.name)], [new ReturnStatement(ngModuleDef)], INFERRED_TYPE);\n      var ngModuleFactoryVar = \"\".concat(identifierName(ngModuleMeta.type), \"NgFactory\");\n\n      this._createNgModuleFactory(ctx, ngModuleMeta.type.reference, importExpr(Identifiers$1.createModuleFactory).callFn([ctx.importExpr(ngModuleMeta.type.reference), literalArr(bootstrapComponents.map(function (id) {\n        return ctx.importExpr(id.reference);\n      })), ngModuleDefFactory]));\n\n      if (ngModuleMeta.id) {\n        var id = typeof ngModuleMeta.id === 'string' ? literal(ngModuleMeta.id) : ctx.importExpr(ngModuleMeta.id);\n        var registerFactoryStmt = importExpr(Identifiers$1.RegisterModuleFactoryFn).callFn([id, variable(ngModuleFactoryVar)]).toStmt();\n        ctx.statements.push(registerFactoryStmt);\n      }\n\n      return new NgModuleCompileResult(ngModuleFactoryVar);\n    }\n  }, {\n    key: \"createStub\",\n    value: function createStub(ctx, ngModuleReference) {\n      this._createNgModuleFactory(ctx, ngModuleReference, NULL_EXPR);\n    }\n  }, {\n    key: \"_createNgModuleFactory\",\n    value: function _createNgModuleFactory(ctx, reference, value) {\n      var ngModuleFactoryVar = \"\".concat(identifierName({\n        reference: reference\n      }), \"NgFactory\");\n      var ngModuleFactoryStmt = variable(ngModuleFactoryVar).set(value).toDeclStmt(importType(Identifiers$1.NgModuleFactory, [expressionType(ctx.importExpr(reference))], [TypeModifier.Const]), [StmtModifier.Final, StmtModifier.Exported]);\n      ctx.statements.push(ngModuleFactoryStmt);\n    }\n  }]);\n\n  return NgModuleCompiler;\n}();\n/**\n * @license\n * Copyright Google LLC 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/**\n * Resolves types to {@link NgModule}.\n */\n\n\nvar NgModuleResolver = /*#__PURE__*/function () {\n  function NgModuleResolver(_reflector) {\n    _classCallCheck(this, NgModuleResolver);\n\n    this._reflector = _reflector;\n  }\n\n  _createClass(NgModuleResolver, [{\n    key: \"isNgModule\",\n    value: function isNgModule(type) {\n      return this._reflector.annotations(type).some(createNgModule.isTypeOf);\n    }\n  }, {\n    key: \"resolve\",\n    value: function resolve(type) {\n      var throwIfNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var ngModuleMeta = findLast(this._reflector.annotations(type), createNgModule.isTypeOf);\n\n      if (ngModuleMeta) {\n        return ngModuleMeta;\n      } else {\n        if (throwIfNotFound) {\n          throw new Error(\"No NgModule metadata found for '\".concat(stringify(type), \"'.\"));\n        }\n\n        return null;\n      }\n    }\n  }]);\n\n  return NgModuleResolver;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nfunction debugOutputAstAsTypeScript(ast) {\n  var converter = new _TsEmitterVisitor();\n  var ctx = EmitterVisitorContext.createRoot();\n  var asts = Array.isArray(ast) ? ast : [ast];\n  asts.forEach(function (ast) {\n    if (ast instanceof Statement) {\n      ast.visitStatement(converter, ctx);\n    } else if (ast instanceof Expression) {\n      ast.visitExpression(converter, ctx);\n    } else if (ast instanceof Type$1) {\n      ast.visitType(converter, ctx);\n    } else {\n      throw new Error(\"Don't know how to print debug info for \".concat(ast));\n    }\n  });\n  return ctx.toSource();\n}\n\nvar TypeScriptEmitter = /*#__PURE__*/function () {\n  function TypeScriptEmitter() {\n    _classCallCheck(this, TypeScriptEmitter);\n  }\n\n  _createClass(TypeScriptEmitter, [{\n    key: \"emitStatementsAndContext\",\n    value: function emitStatementsAndContext(genFilePath, stmts) {\n      var preamble = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n      var emitSourceMaps = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n      var referenceFilter = arguments.length > 4 ? arguments[4] : undefined;\n      var importFilter = arguments.length > 5 ? arguments[5] : undefined;\n      var converter = new _TsEmitterVisitor(referenceFilter, importFilter);\n      var ctx = EmitterVisitorContext.createRoot();\n      converter.visitAllStatements(stmts, ctx);\n      var preambleLines = preamble ? preamble.split('\\n') : [];\n      converter.reexports.forEach(function (reexports, exportedModuleName) {\n        var reexportsCode = reexports.map(function (reexport) {\n          return \"\".concat(reexport.name, \" as \").concat(reexport.as);\n        }).join(',');\n        preambleLines.push(\"export {\".concat(reexportsCode, \"} from '\").concat(exportedModuleName, \"';\"));\n      });\n      converter.importsWithPrefixes.forEach(function (prefix, importedModuleName) {\n        // Note: can't write the real word for import as it screws up system.js auto detection...\n        preambleLines.push(\"imp\" + \"ort * as \".concat(prefix, \" from '\").concat(importedModuleName, \"';\"));\n      });\n      var sm = emitSourceMaps ? ctx.toSourceMapGenerator(genFilePath, preambleLines.length).toJsComment() : '';\n      var lines = [].concat(_toConsumableArray(preambleLines), [ctx.toSource(), sm]);\n\n      if (sm) {\n        // always add a newline at the end, as some tools have bugs without it.\n        lines.push('');\n      }\n\n      ctx.setPreambleLineCount(preambleLines.length);\n      return {\n        sourceText: lines.join('\\n'),\n        context: ctx\n      };\n    }\n  }, {\n    key: \"emitStatements\",\n    value: function emitStatements(genFilePath, stmts) {\n      var preamble = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n      return this.emitStatementsAndContext(genFilePath, stmts, preamble).sourceText;\n    }\n  }]);\n\n  return TypeScriptEmitter;\n}();\n\nvar _TsEmitterVisitor = /*#__PURE__*/function (_AbstractEmitterVisit2) {\n  _inherits(_TsEmitterVisitor, _AbstractEmitterVisit2);\n\n  var _super106 = _createSuper(_TsEmitterVisitor);\n\n  function _TsEmitterVisitor(referenceFilter, importFilter) {\n    var _this235;\n\n    _classCallCheck(this, _TsEmitterVisitor);\n\n    _this235 = _super106.call(this, false);\n    _this235.referenceFilter = referenceFilter;\n    _this235.importFilter = importFilter;\n    _this235.typeExpression = 0;\n    _this235.importsWithPrefixes = new Map();\n    _this235.reexports = new Map();\n    return _this235;\n  }\n\n  _createClass(_TsEmitterVisitor, [{\n    key: \"visitType\",\n    value: function visitType(t, ctx) {\n      var defaultType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'any';\n\n      if (t) {\n        this.typeExpression++;\n        t.visitType(this, ctx);\n        this.typeExpression--;\n      } else {\n        ctx.print(null, defaultType);\n      }\n    }\n  }, {\n    key: \"visitLiteralExpr\",\n    value: function visitLiteralExpr(ast, ctx) {\n      var value = ast.value;\n\n      if (value == null && ast.type != INFERRED_TYPE) {\n        ctx.print(ast, \"(\".concat(value, \" as any)\"));\n        return null;\n      }\n\n      return _get(_getPrototypeOf(_TsEmitterVisitor.prototype), \"visitLiteralExpr\", this).call(this, ast, ctx);\n    } // Temporary workaround to support strictNullCheck enabled consumers of ngc emit.\n    // In SNC mode, [] have the type never[], so we cast here to any[].\n    // TODO: narrow the cast to a more explicit type, or use a pattern that does not\n    // start with [].concat. see https://github.com/angular/angular/pull/11846\n\n  }, {\n    key: \"visitLiteralArrayExpr\",\n    value: function visitLiteralArrayExpr(ast, ctx) {\n      if (ast.entries.length === 0) {\n        ctx.print(ast, '(');\n      }\n\n      var result = _get(_getPrototypeOf(_TsEmitterVisitor.prototype), \"visitLiteralArrayExpr\", this).call(this, ast, ctx);\n\n      if (ast.entries.length === 0) {\n        ctx.print(ast, ' as any[])');\n      }\n\n      return result;\n    }\n  }, {\n    key: \"visitExternalExpr\",\n    value: function visitExternalExpr(ast, ctx) {\n      this._visitIdentifier(ast.value, ast.typeParams, ctx);\n\n      return null;\n    }\n  }, {\n    key: \"visitAssertNotNullExpr\",\n    value: function visitAssertNotNullExpr(ast, ctx) {\n      var result = _get(_getPrototypeOf(_TsEmitterVisitor.prototype), \"visitAssertNotNullExpr\", this).call(this, ast, ctx);\n\n      ctx.print(ast, '!');\n      return result;\n    }\n  }, {\n    key: \"visitDeclareVarStmt\",\n    value: function visitDeclareVarStmt(stmt, ctx) {\n      if (stmt.hasModifier(StmtModifier.Exported) && stmt.value instanceof ExternalExpr && !stmt.type) {\n        // check for a reexport\n        var _stmt$value$value = stmt.value.value,\n            name = _stmt$value$value.name,\n            moduleName = _stmt$value$value.moduleName;\n\n        if (moduleName) {\n          var reexports = this.reexports.get(moduleName);\n\n          if (!reexports) {\n            reexports = [];\n            this.reexports.set(moduleName, reexports);\n          }\n\n          reexports.push({\n            name: name,\n            as: stmt.name\n          });\n          return null;\n        }\n      }\n\n      if (stmt.hasModifier(StmtModifier.Exported)) {\n        ctx.print(stmt, \"export \");\n      }\n\n      if (stmt.hasModifier(StmtModifier.Final)) {\n        ctx.print(stmt, \"const\");\n      } else {\n        ctx.print(stmt, \"var\");\n      }\n\n      ctx.print(stmt, \" \".concat(stmt.name));\n\n      this._printColonType(stmt.type, ctx);\n\n      if (stmt.value) {\n        ctx.print(stmt, \" = \");\n        stmt.value.visitExpression(this, ctx);\n      }\n\n      ctx.println(stmt, \";\");\n      return null;\n    }\n  }, {\n    key: \"visitWrappedNodeExpr\",\n    value: function visitWrappedNodeExpr(ast, ctx) {\n      throw new Error('Cannot visit a WrappedNodeExpr when outputting Typescript.');\n    }\n  }, {\n    key: \"visitCastExpr\",\n    value: function visitCastExpr(ast, ctx) {\n      ctx.print(ast, \"(<\");\n      ast.type.visitType(this, ctx);\n      ctx.print(ast, \">\");\n      ast.value.visitExpression(this, ctx);\n      ctx.print(ast, \")\");\n      return null;\n    }\n  }, {\n    key: \"visitInstantiateExpr\",\n    value: function visitInstantiateExpr(ast, ctx) {\n      ctx.print(ast, \"new \");\n      this.typeExpression++;\n      ast.classExpr.visitExpression(this, ctx);\n      this.typeExpression--;\n      ctx.print(ast, \"(\");\n      this.visitAllExpressions(ast.args, ctx, ',');\n      ctx.print(ast, \")\");\n      return null;\n    }\n  }, {\n    key: \"visitDeclareClassStmt\",\n    value: function visitDeclareClassStmt(stmt, ctx) {\n      var _this236 = this;\n\n      ctx.pushClass(stmt);\n\n      if (stmt.hasModifier(StmtModifier.Exported)) {\n        ctx.print(stmt, \"export \");\n      }\n\n      ctx.print(stmt, \"class \".concat(stmt.name));\n\n      if (stmt.parent != null) {\n        ctx.print(stmt, \" extends \");\n        this.typeExpression++;\n        stmt.parent.visitExpression(this, ctx);\n        this.typeExpression--;\n      }\n\n      ctx.println(stmt, \" {\");\n      ctx.incIndent();\n      stmt.fields.forEach(function (field) {\n        return _this236._visitClassField(field, ctx);\n      });\n\n      if (stmt.constructorMethod != null) {\n        this._visitClassConstructor(stmt, ctx);\n      }\n\n      stmt.getters.forEach(function (getter) {\n        return _this236._visitClassGetter(getter, ctx);\n      });\n      stmt.methods.forEach(function (method) {\n        return _this236._visitClassMethod(method, ctx);\n      });\n      ctx.decIndent();\n      ctx.println(stmt, \"}\");\n      ctx.popClass();\n      return null;\n    }\n  }, {\n    key: \"_visitClassField\",\n    value: function _visitClassField(field, ctx) {\n      if (field.hasModifier(StmtModifier.Private)) {\n        // comment out as a workaround for #10967\n        ctx.print(null, \"/*private*/ \");\n      }\n\n      if (field.hasModifier(StmtModifier.Static)) {\n        ctx.print(null, 'static ');\n      }\n\n      ctx.print(null, field.name);\n\n      this._printColonType(field.type, ctx);\n\n      if (field.initializer) {\n        ctx.print(null, ' = ');\n        field.initializer.visitExpression(this, ctx);\n      }\n\n      ctx.println(null, \";\");\n    }\n  }, {\n    key: \"_visitClassGetter\",\n    value: function _visitClassGetter(getter, ctx) {\n      if (getter.hasModifier(StmtModifier.Private)) {\n        ctx.print(null, \"private \");\n      }\n\n      ctx.print(null, \"get \".concat(getter.name, \"()\"));\n\n      this._printColonType(getter.type, ctx);\n\n      ctx.println(null, \" {\");\n      ctx.incIndent();\n      this.visitAllStatements(getter.body, ctx);\n      ctx.decIndent();\n      ctx.println(null, \"}\");\n    }\n  }, {\n    key: \"_visitClassConstructor\",\n    value: function _visitClassConstructor(stmt, ctx) {\n      ctx.print(stmt, \"constructor(\");\n\n      this._visitParams(stmt.constructorMethod.params, ctx);\n\n      ctx.println(stmt, \") {\");\n      ctx.incIndent();\n      this.visitAllStatements(stmt.constructorMethod.body, ctx);\n      ctx.decIndent();\n      ctx.println(stmt, \"}\");\n    }\n  }, {\n    key: \"_visitClassMethod\",\n    value: function _visitClassMethod(method, ctx) {\n      if (method.hasModifier(StmtModifier.Private)) {\n        ctx.print(null, \"private \");\n      }\n\n      ctx.print(null, \"\".concat(method.name, \"(\"));\n\n      this._visitParams(method.params, ctx);\n\n      ctx.print(null, \")\");\n\n      this._printColonType(method.type, ctx, 'void');\n\n      ctx.println(null, \" {\");\n      ctx.incIndent();\n      this.visitAllStatements(method.body, ctx);\n      ctx.decIndent();\n      ctx.println(null, \"}\");\n    }\n  }, {\n    key: \"visitFunctionExpr\",\n    value: function visitFunctionExpr(ast, ctx) {\n      if (ast.name) {\n        ctx.print(ast, 'function ');\n        ctx.print(ast, ast.name);\n      }\n\n      ctx.print(ast, \"(\");\n\n      this._visitParams(ast.params, ctx);\n\n      ctx.print(ast, \")\");\n\n      this._printColonType(ast.type, ctx, 'void');\n\n      if (!ast.name) {\n        ctx.print(ast, \" => \");\n      }\n\n      ctx.println(ast, '{');\n      ctx.incIndent();\n      this.visitAllStatements(ast.statements, ctx);\n      ctx.decIndent();\n      ctx.print(ast, \"}\");\n      return null;\n    }\n  }, {\n    key: \"visitDeclareFunctionStmt\",\n    value: function visitDeclareFunctionStmt(stmt, ctx) {\n      if (stmt.hasModifier(StmtModifier.Exported)) {\n        ctx.print(stmt, \"export \");\n      }\n\n      ctx.print(stmt, \"function \".concat(stmt.name, \"(\"));\n\n      this._visitParams(stmt.params, ctx);\n\n      ctx.print(stmt, \")\");\n\n      this._printColonType(stmt.type, ctx, 'void');\n\n      ctx.println(stmt, \" {\");\n      ctx.incIndent();\n      this.visitAllStatements(stmt.statements, ctx);\n      ctx.decIndent();\n      ctx.println(stmt, \"}\");\n      return null;\n    }\n  }, {\n    key: \"visitTryCatchStmt\",\n    value: function visitTryCatchStmt(stmt, ctx) {\n      ctx.println(stmt, \"try {\");\n      ctx.incIndent();\n      this.visitAllStatements(stmt.bodyStmts, ctx);\n      ctx.decIndent();\n      ctx.println(stmt, \"} catch (\".concat(CATCH_ERROR_VAR$1.name, \") {\"));\n      ctx.incIndent();\n      var catchStmts = [CATCH_STACK_VAR$1.set(CATCH_ERROR_VAR$1.prop('stack', null)).toDeclStmt(null, [StmtModifier.Final])].concat(stmt.catchStmts);\n      this.visitAllStatements(catchStmts, ctx);\n      ctx.decIndent();\n      ctx.println(stmt, \"}\");\n      return null;\n    }\n  }, {\n    key: \"visitBuiltinType\",\n    value: function visitBuiltinType(type, ctx) {\n      var typeStr;\n\n      switch (type.name) {\n        case BuiltinTypeName.Bool:\n          typeStr = 'boolean';\n          break;\n\n        case BuiltinTypeName.Dynamic:\n          typeStr = 'any';\n          break;\n\n        case BuiltinTypeName.Function:\n          typeStr = 'Function';\n          break;\n\n        case BuiltinTypeName.Number:\n          typeStr = 'number';\n          break;\n\n        case BuiltinTypeName.Int:\n          typeStr = 'number';\n          break;\n\n        case BuiltinTypeName.String:\n          typeStr = 'string';\n          break;\n\n        case BuiltinTypeName.None:\n          typeStr = 'never';\n          break;\n\n        default:\n          throw new Error(\"Unsupported builtin type \".concat(type.name));\n      }\n\n      ctx.print(null, typeStr);\n      return null;\n    }\n  }, {\n    key: \"visitExpressionType\",\n    value: function visitExpressionType(ast, ctx) {\n      var _this237 = this;\n\n      ast.value.visitExpression(this, ctx);\n\n      if (ast.typeParams !== null) {\n        ctx.print(null, '<');\n        this.visitAllObjects(function (type) {\n          return _this237.visitType(type, ctx);\n        }, ast.typeParams, ctx, ',');\n        ctx.print(null, '>');\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitArrayType\",\n    value: function visitArrayType(type, ctx) {\n      this.visitType(type.of, ctx);\n      ctx.print(null, \"[]\");\n      return null;\n    }\n  }, {\n    key: \"visitMapType\",\n    value: function visitMapType(type, ctx) {\n      ctx.print(null, \"{[key: string]:\");\n      this.visitType(type.valueType, ctx);\n      ctx.print(null, \"}\");\n      return null;\n    }\n  }, {\n    key: \"getBuiltinMethodName\",\n    value: function getBuiltinMethodName(method) {\n      var name;\n\n      switch (method) {\n        case BuiltinMethod.ConcatArray:\n          name = 'concat';\n          break;\n\n        case BuiltinMethod.SubscribeObservable:\n          name = 'subscribe';\n          break;\n\n        case BuiltinMethod.Bind:\n          name = 'bind';\n          break;\n\n        default:\n          throw new Error(\"Unknown builtin method: \".concat(method));\n      }\n\n      return name;\n    }\n  }, {\n    key: \"_visitParams\",\n    value: function _visitParams(params, ctx) {\n      var _this238 = this;\n\n      this.visitAllObjects(function (param) {\n        ctx.print(null, param.name);\n\n        _this238._printColonType(param.type, ctx);\n      }, params, ctx, ',');\n    }\n  }, {\n    key: \"_visitIdentifier\",\n    value: function _visitIdentifier(value, typeParams, ctx) {\n      var _this239 = this;\n\n      var name = value.name,\n          moduleName = value.moduleName;\n\n      if (this.referenceFilter && this.referenceFilter(value)) {\n        ctx.print(null, '(null as any)');\n        return;\n      }\n\n      if (moduleName && (!this.importFilter || !this.importFilter(value))) {\n        var prefix = this.importsWithPrefixes.get(moduleName);\n\n        if (prefix == null) {\n          prefix = \"i\".concat(this.importsWithPrefixes.size);\n          this.importsWithPrefixes.set(moduleName, prefix);\n        }\n\n        ctx.print(null, \"\".concat(prefix, \".\"));\n      }\n\n      ctx.print(null, name);\n\n      if (this.typeExpression > 0) {\n        // If we are in a type expression that refers to a generic type then supply\n        // the required type parameters. If there were not enough type parameters\n        // supplied, supply any as the type. Outside a type expression the reference\n        // should not supply type parameters and be treated as a simple value reference\n        // to the constructor function itself.\n        var suppliedParameters = typeParams || [];\n\n        if (suppliedParameters.length > 0) {\n          ctx.print(null, \"<\");\n          this.visitAllObjects(function (type) {\n            return type.visitType(_this239, ctx);\n          }, typeParams, ctx, ',');\n          ctx.print(null, \">\");\n        }\n      }\n    }\n  }, {\n    key: \"_printColonType\",\n    value: function _printColonType(type, ctx, defaultType) {\n      if (type !== INFERRED_TYPE) {\n        ctx.print(null, ':');\n        this.visitType(type, ctx, defaultType);\n      }\n    }\n  }]);\n\n  return _TsEmitterVisitor;\n}(AbstractEmitterVisitor);\n/**\n * @license\n * Copyright Google LLC 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/**\n * Resolve a `Type` for {@link Pipe}.\n *\n * This interface can be overridden by the application developer to create custom behavior.\n *\n * See {@link Compiler}\n */\n\n\nvar PipeResolver = /*#__PURE__*/function () {\n  function PipeResolver(_reflector) {\n    _classCallCheck(this, PipeResolver);\n\n    this._reflector = _reflector;\n  }\n\n  _createClass(PipeResolver, [{\n    key: \"isPipe\",\n    value: function isPipe(type) {\n      var typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n\n      return typeMetadata && typeMetadata.some(createPipe.isTypeOf);\n    }\n    /**\n     * Return {@link Pipe} for a given `Type`.\n     */\n\n  }, {\n    key: \"resolve\",\n    value: function resolve(type) {\n      var throwIfNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n      var metas = this._reflector.annotations(resolveForwardRef(type));\n\n      if (metas) {\n        var annotation = findLast(metas, createPipe.isTypeOf);\n\n        if (annotation) {\n          return annotation;\n        }\n      }\n\n      if (throwIfNotFound) {\n        throw new Error(\"No Pipe decorator found on \".concat(stringify(type)));\n      }\n\n      return null;\n    }\n  }]);\n\n  return PipeResolver;\n}();\n/**\n * @license\n * Copyright Google LLC 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/**\n * Generates code that is used to type check templates.\n */\n\n\nvar TypeCheckCompiler = /*#__PURE__*/function () {\n  function TypeCheckCompiler(options, reflector) {\n    _classCallCheck(this, TypeCheckCompiler);\n\n    this.options = options;\n    this.reflector = reflector;\n  }\n  /**\n   * Important notes:\n   * - This must not produce new `import` statements, but only refer to types outside\n   *   of the file via the variables provided via externalReferenceVars.\n   *   This allows Typescript to reuse the old program's structure as no imports have changed.\n   * - This must not produce any exports, as this would pollute the .d.ts file\n   *   and also violate the point above.\n   */\n\n\n  _createClass(TypeCheckCompiler, [{\n    key: \"compileComponent\",\n    value: function compileComponent(componentId, component, template, usedPipes, externalReferenceVars, ctx) {\n      var _this240 = this;\n\n      var pipes = new Map();\n      usedPipes.forEach(function (p) {\n        return pipes.set(p.name, p.type.reference);\n      });\n      var embeddedViewCount = 0;\n\n      var viewBuilderFactory = function viewBuilderFactory(parent, guards) {\n        var embeddedViewIndex = embeddedViewCount++;\n        return new ViewBuilder(_this240.options, _this240.reflector, externalReferenceVars, parent, component.type.reference, component.isHost, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory);\n      };\n\n      var visitor = viewBuilderFactory(null, []);\n      visitor.visitAll([], template);\n      return visitor.build(componentId);\n    }\n  }]);\n\n  return TypeCheckCompiler;\n}();\n\nvar DYNAMIC_VAR_NAME = '_any';\n\nvar TypeCheckLocalResolver = /*#__PURE__*/function () {\n  function TypeCheckLocalResolver() {\n    _classCallCheck(this, TypeCheckLocalResolver);\n  }\n\n  _createClass(TypeCheckLocalResolver, [{\n    key: \"notifyImplicitReceiverUse\",\n    value: function notifyImplicitReceiverUse() {}\n  }, {\n    key: \"maybeRestoreView\",\n    value: function maybeRestoreView() {}\n  }, {\n    key: \"getLocal\",\n    value: function getLocal(name) {\n      if (name === EventHandlerVars.event.name) {\n        // References to the event should not be type-checked.\n        // TODO(chuckj): determine a better type for the event.\n        return variable(DYNAMIC_VAR_NAME);\n      }\n\n      return null;\n    }\n  }]);\n\n  return TypeCheckLocalResolver;\n}();\n\nvar defaultResolver = /*@__PURE__*/new TypeCheckLocalResolver();\n\nvar ViewBuilder = /*#__PURE__*/function () {\n  function ViewBuilder(options, reflector, externalReferenceVars, parent, component, isHostComponent, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory) {\n    _classCallCheck(this, ViewBuilder);\n\n    this.options = options;\n    this.reflector = reflector;\n    this.externalReferenceVars = externalReferenceVars;\n    this.parent = parent;\n    this.component = component;\n    this.isHostComponent = isHostComponent;\n    this.embeddedViewIndex = embeddedViewIndex;\n    this.pipes = pipes;\n    this.guards = guards;\n    this.ctx = ctx;\n    this.viewBuilderFactory = viewBuilderFactory;\n    this.refOutputVars = new Map();\n    this.variables = [];\n    this.children = [];\n    this.updates = [];\n    this.actions = [];\n  }\n\n  _createClass(ViewBuilder, [{\n    key: \"getOutputVar\",\n    value: function getOutputVar(type) {\n      var varName;\n\n      if (type === this.component && this.isHostComponent) {\n        varName = DYNAMIC_VAR_NAME;\n      } else if (type instanceof StaticSymbol) {\n        varName = this.externalReferenceVars.get(type);\n      } else {\n        varName = DYNAMIC_VAR_NAME;\n      }\n\n      if (!varName) {\n        throw new Error(\"Illegal State: referring to a type without a variable \".concat(JSON.stringify(type)));\n      }\n\n      return varName;\n    }\n  }, {\n    key: \"getTypeGuardExpressions\",\n    value: function getTypeGuardExpressions(ast) {\n      var result = _toConsumableArray(this.guards);\n\n      var _iterator24 = _createForOfIteratorHelper(ast.directives),\n          _step24;\n\n      try {\n        for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {\n          var directive = _step24.value;\n\n          var _iterator25 = _createForOfIteratorHelper(directive.inputs),\n              _step25;\n\n          try {\n            for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {\n              var input = _step25.value;\n              var guard = directive.directive.guards[input.directiveName];\n\n              if (guard) {\n                var useIf = guard === 'UseIf';\n                result.push({\n                  guard: guard,\n                  useIf: useIf,\n                  expression: {\n                    context: this.component,\n                    value: input.value,\n                    sourceSpan: input.sourceSpan\n                  }\n                });\n              }\n            }\n          } catch (err) {\n            _iterator25.e(err);\n          } finally {\n            _iterator25.f();\n          }\n        }\n      } catch (err) {\n        _iterator24.e(err);\n      } finally {\n        _iterator24.f();\n      }\n\n      return result;\n    }\n  }, {\n    key: \"visitAll\",\n    value: function visitAll(variables, astNodes) {\n      this.variables = variables;\n      templateVisitAll(this, astNodes);\n    }\n  }, {\n    key: \"build\",\n    value: function build(componentId) {\n      var _this241 = this;\n\n      var targetStatements = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n      this.children.forEach(function (child) {\n        return child.build(componentId, targetStatements);\n      });\n      var viewStmts = [variable(DYNAMIC_VAR_NAME).set(NULL_EXPR).toDeclStmt(DYNAMIC_TYPE)];\n      var bindingCount = 0;\n      this.updates.forEach(function (expression) {\n        var _viewStmts;\n\n        var _this241$preprocessUp = _this241.preprocessUpdateExpression(expression),\n            sourceSpan = _this241$preprocessUp.sourceSpan,\n            context = _this241$preprocessUp.context,\n            value = _this241$preprocessUp.value;\n\n        var bindingId = \"\".concat(bindingCount++);\n        var nameResolver = context === _this241.component ? _this241 : defaultResolver;\n\n        var _convertPropertyBindi = _convertPropertyBinding(nameResolver, variable(_this241.getOutputVar(context)), value, bindingId, BindingForm.General),\n            stmts = _convertPropertyBindi.stmts,\n            currValExpr = _convertPropertyBindi.currValExpr;\n\n        stmts.push(new ExpressionStatement(currValExpr));\n\n        (_viewStmts = viewStmts).push.apply(_viewStmts, _toConsumableArray(stmts.map(function (stmt) {\n          return applySourceSpanToStatementIfNeeded(stmt, sourceSpan);\n        })));\n      });\n      this.actions.forEach(function (_ref37) {\n        var _viewStmts2;\n\n        var sourceSpan = _ref37.sourceSpan,\n            context = _ref37.context,\n            value = _ref37.value;\n        var bindingId = \"\".concat(bindingCount++);\n        var nameResolver = context === _this241.component ? _this241 : defaultResolver;\n\n        var _convertActionBinding = convertActionBinding(nameResolver, variable(_this241.getOutputVar(context)), value, bindingId),\n            stmts = _convertActionBinding.stmts;\n\n        (_viewStmts2 = viewStmts).push.apply(_viewStmts2, _toConsumableArray(stmts.map(function (stmt) {\n          return applySourceSpanToStatementIfNeeded(stmt, sourceSpan);\n        })));\n      });\n\n      if (this.guards.length) {\n        var guardExpression = undefined;\n\n        var _iterator26 = _createForOfIteratorHelper(this.guards),\n            _step26;\n\n        try {\n          for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {\n            var guard = _step26.value;\n\n            var _this$preprocessUpdat = this.preprocessUpdateExpression(guard.expression),\n                context = _this$preprocessUpdat.context,\n                value = _this$preprocessUpdat.value;\n\n            var bindingId = \"\".concat(bindingCount++);\n            var nameResolver = context === this.component ? this : defaultResolver; // We only support support simple expressions and ignore others as they\n            // are unlikely to affect type narrowing.\n\n            var _convertPropertyBindi2 = _convertPropertyBinding(nameResolver, variable(this.getOutputVar(context)), value, bindingId, BindingForm.TrySimple),\n                stmts = _convertPropertyBindi2.stmts,\n                currValExpr = _convertPropertyBindi2.currValExpr;\n\n            if (stmts.length == 0) {\n              var guardClause = guard.useIf ? currValExpr : this.ctx.importExpr(guard.guard).callFn([currValExpr]);\n              guardExpression = guardExpression ? guardExpression.and(guardClause) : guardClause;\n            }\n          }\n        } catch (err) {\n          _iterator26.e(err);\n        } finally {\n          _iterator26.f();\n        }\n\n        if (guardExpression) {\n          viewStmts = [new IfStmt(guardExpression, viewStmts)];\n        }\n      }\n\n      var viewName = \"_View_\".concat(componentId, \"_\").concat(this.embeddedViewIndex);\n      var viewFactory = new DeclareFunctionStmt(viewName, [], viewStmts);\n      targetStatements.push(viewFactory);\n      return targetStatements;\n    }\n  }, {\n    key: \"visitBoundText\",\n    value: function visitBoundText(ast, context) {\n      var _this242 = this;\n\n      var astWithSource = ast.value;\n      var inter = astWithSource.ast;\n      inter.expressions.forEach(function (expr) {\n        return _this242.updates.push({\n          context: _this242.component,\n          value: expr,\n          sourceSpan: ast.sourceSpan\n        });\n      });\n    }\n  }, {\n    key: \"visitEmbeddedTemplate\",\n    value: function visitEmbeddedTemplate(ast, context) {\n      this.visitElementOrTemplate(ast); // Note: The old view compiler used to use an `any` type\n      // for the context in any embedded view.\n      // We keep this behaivor behind a flag for now.\n\n      if (this.options.fullTemplateTypeCheck) {\n        // Find any applicable type guards. For example, NgIf has a type guard on ngIf\n        // (see NgIf.ngIfTypeGuard) that can be used to indicate that a template is only\n        // stamped out if ngIf is truthy so any bindings in the template can assume that,\n        // if a nullable type is used for ngIf, that expression is not null or undefined.\n        var guards = this.getTypeGuardExpressions(ast);\n        var childVisitor = this.viewBuilderFactory(this, guards);\n        this.children.push(childVisitor);\n        childVisitor.visitAll(ast.variables, ast.children);\n      }\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(ast, context) {\n      var _this243 = this;\n\n      this.visitElementOrTemplate(ast);\n      var inputDefs = [];\n      var updateRendererExpressions = [];\n      var outputDefs = [];\n      ast.inputs.forEach(function (inputAst) {\n        _this243.updates.push({\n          context: _this243.component,\n          value: inputAst.value,\n          sourceSpan: inputAst.sourceSpan\n        });\n      });\n      templateVisitAll(this, ast.children);\n    }\n  }, {\n    key: \"visitElementOrTemplate\",\n    value: function visitElementOrTemplate(ast) {\n      var _this244 = this;\n\n      ast.directives.forEach(function (dirAst) {\n        _this244.visitDirective(dirAst);\n      });\n      ast.references.forEach(function (ref) {\n        var outputVarType = null; // Note: The old view compiler used to use an `any` type\n        // for directives exposed via `exportAs`.\n        // We keep this behaivor behind a flag for now.\n\n        if (ref.value && ref.value.identifier && _this244.options.fullTemplateTypeCheck) {\n          outputVarType = ref.value.identifier.reference;\n        } else {\n          outputVarType = BuiltinTypeName.Dynamic;\n        }\n\n        _this244.refOutputVars.set(ref.name, outputVarType);\n      });\n      ast.outputs.forEach(function (outputAst) {\n        _this244.actions.push({\n          context: _this244.component,\n          value: outputAst.handler,\n          sourceSpan: outputAst.sourceSpan\n        });\n      });\n    }\n  }, {\n    key: \"visitDirective\",\n    value: function visitDirective(dirAst) {\n      var _this245 = this;\n\n      var dirType = dirAst.directive.type.reference;\n      dirAst.inputs.forEach(function (input) {\n        return _this245.updates.push({\n          context: _this245.component,\n          value: input.value,\n          sourceSpan: input.sourceSpan\n        });\n      }); // Note: The old view compiler used to use an `any` type\n      // for expressions in host properties / events.\n      // We keep this behaivor behind a flag for now.\n\n      if (this.options.fullTemplateTypeCheck) {\n        dirAst.hostProperties.forEach(function (inputAst) {\n          return _this245.updates.push({\n            context: dirType,\n            value: inputAst.value,\n            sourceSpan: inputAst.sourceSpan\n          });\n        });\n        dirAst.hostEvents.forEach(function (hostEventAst) {\n          return _this245.actions.push({\n            context: dirType,\n            value: hostEventAst.handler,\n            sourceSpan: hostEventAst.sourceSpan\n          });\n        });\n      }\n    }\n  }, {\n    key: \"notifyImplicitReceiverUse\",\n    value: function notifyImplicitReceiverUse() {}\n  }, {\n    key: \"maybeRestoreView\",\n    value: function maybeRestoreView() {}\n  }, {\n    key: \"getLocal\",\n    value: function getLocal(name) {\n      if (name == EventHandlerVars.event.name) {\n        return variable(this.getOutputVar(BuiltinTypeName.Dynamic));\n      }\n\n      for (var currBuilder = this; currBuilder; currBuilder = currBuilder.parent) {\n        var outputVarType = void 0; // check references\n\n        outputVarType = currBuilder.refOutputVars.get(name);\n\n        if (outputVarType == null) {\n          // check variables\n          var varAst = currBuilder.variables.find(function (varAst) {\n            return varAst.name === name;\n          });\n\n          if (varAst) {\n            outputVarType = BuiltinTypeName.Dynamic;\n          }\n        }\n\n        if (outputVarType != null) {\n          return variable(this.getOutputVar(outputVarType));\n        }\n      }\n\n      return null;\n    }\n  }, {\n    key: \"pipeOutputVar\",\n    value: function pipeOutputVar(name) {\n      var pipe = this.pipes.get(name);\n\n      if (!pipe) {\n        throw new Error(\"Illegal State: Could not find pipe \".concat(name, \" in template of \").concat(this.component));\n      }\n\n      return this.getOutputVar(pipe);\n    }\n  }, {\n    key: \"preprocessUpdateExpression\",\n    value: function preprocessUpdateExpression(expression) {\n      var _this246 = this;\n\n      return {\n        sourceSpan: expression.sourceSpan,\n        context: expression.context,\n        value: convertPropertyBindingBuiltins({\n          createLiteralArrayConverter: function createLiteralArrayConverter(argCount) {\n            return function (args) {\n              var arr = literalArr(args); // Note: The old view compiler used to use an `any` type\n              // for arrays.\n\n              return _this246.options.fullTemplateTypeCheck ? arr : arr.cast(DYNAMIC_TYPE);\n            };\n          },\n          createLiteralMapConverter: function createLiteralMapConverter(keys) {\n            return function (values) {\n              var entries = keys.map(function (k, i) {\n                return {\n                  key: k.key,\n                  value: values[i],\n                  quoted: k.quoted\n                };\n              });\n              var map = literalMap(entries); // Note: The old view compiler used to use an `any` type\n              // for maps.\n\n              return _this246.options.fullTemplateTypeCheck ? map : map.cast(DYNAMIC_TYPE);\n            };\n          },\n          createPipeConverter: function createPipeConverter(name, argCount) {\n            return function (args) {\n              // Note: The old view compiler used to use an `any` type\n              // for pipes.\n              var pipeExpr = _this246.options.fullTemplateTypeCheck ? variable(_this246.pipeOutputVar(name)) : variable(_this246.getOutputVar(BuiltinTypeName.Dynamic));\n              return pipeExpr.callMethod('transform', args);\n            };\n          }\n        }, expression.value)\n      };\n    }\n  }, {\n    key: \"visitNgContent\",\n    value: function visitNgContent(ast, context) {}\n  }, {\n    key: \"visitText\",\n    value: function visitText(ast, context) {}\n  }, {\n    key: \"visitDirectiveProperty\",\n    value: function visitDirectiveProperty(ast, context) {}\n  }, {\n    key: \"visitReference\",\n    value: function visitReference(ast, context) {}\n  }, {\n    key: \"visitVariable\",\n    value: function visitVariable(ast, context) {}\n  }, {\n    key: \"visitEvent\",\n    value: function visitEvent(ast, context) {}\n  }, {\n    key: \"visitElementProperty\",\n    value: function visitElementProperty(ast, context) {}\n  }, {\n    key: \"visitAttr\",\n    value: function visitAttr(ast, context) {}\n  }]);\n\n  return ViewBuilder;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar CLASS_ATTR$1 = 'class';\nvar STYLE_ATTR = 'style';\nvar IMPLICIT_TEMPLATE_VAR = '$implicit';\n\nvar ViewCompileResult = /*#__PURE__*/_createClass(function ViewCompileResult(viewClassVar, rendererTypeVar) {\n  _classCallCheck(this, ViewCompileResult);\n\n  this.viewClassVar = viewClassVar;\n  this.rendererTypeVar = rendererTypeVar;\n});\n\nvar ViewCompiler = /*#__PURE__*/function () {\n  function ViewCompiler(_reflector) {\n    _classCallCheck(this, ViewCompiler);\n\n    this._reflector = _reflector;\n  }\n\n  _createClass(ViewCompiler, [{\n    key: \"compileComponent\",\n    value: function compileComponent(outputCtx, component, template, styles, usedPipes) {\n      var _this247 = this,\n          _outputCtx$statements;\n\n      var embeddedViewCount = 0;\n      var renderComponentVarName = undefined;\n\n      if (!component.isHost) {\n        var _template = component.template;\n        var customRenderData = [];\n\n        if (_template.animations && _template.animations.length) {\n          customRenderData.push(new LiteralMapEntry('animation', convertValueToOutputAst(outputCtx, _template.animations), true));\n        }\n\n        var renderComponentVar = variable(rendererTypeName(component.type.reference));\n        renderComponentVarName = renderComponentVar.name;\n        outputCtx.statements.push(renderComponentVar.set(importExpr(Identifiers$1.createRendererType2).callFn([new LiteralMapExpr([new LiteralMapEntry('encapsulation', literal(_template.encapsulation), false), new LiteralMapEntry('styles', styles, false), new LiteralMapEntry('data', new LiteralMapExpr(customRenderData), false)])])).toDeclStmt(importType(Identifiers$1.RendererType2), [StmtModifier.Final, StmtModifier.Exported]));\n      }\n\n      var viewBuilderFactory = function viewBuilderFactory(parent) {\n        var embeddedViewIndex = embeddedViewCount++;\n        return new ViewBuilder$1(_this247._reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes, viewBuilderFactory);\n      };\n\n      var visitor = viewBuilderFactory(null);\n      visitor.visitAll([], template);\n\n      (_outputCtx$statements = outputCtx.statements).push.apply(_outputCtx$statements, _toConsumableArray(visitor.build()));\n\n      return new ViewCompileResult(visitor.viewName, renderComponentVarName);\n    }\n  }]);\n\n  return ViewCompiler;\n}();\n\nvar LOG_VAR$1 = /*@__PURE__*/variable('_l');\nvar VIEW_VAR = /*@__PURE__*/variable('_v');\nvar CHECK_VAR = /*@__PURE__*/variable('_ck');\nvar COMP_VAR = /*@__PURE__*/variable('_co');\nvar EVENT_NAME_VAR = /*@__PURE__*/variable('en');\nvar ALLOW_DEFAULT_VAR = /*@__PURE__*/variable(\"ad\");\n\nvar ViewBuilder$1 = /*#__PURE__*/function () {\n  function ViewBuilder$1(reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes, viewBuilderFactory) {\n    _classCallCheck(this, ViewBuilder$1);\n\n    this.reflector = reflector;\n    this.outputCtx = outputCtx;\n    this.parent = parent;\n    this.component = component;\n    this.embeddedViewIndex = embeddedViewIndex;\n    this.usedPipes = usedPipes;\n    this.viewBuilderFactory = viewBuilderFactory;\n    this.nodes = [];\n    this.purePipeNodeIndices = Object.create(null); // Need Object.create so that we don't have builtin values...\n\n    this.refNodeIndices = Object.create(null);\n    this.variables = [];\n    this.children = []; // TODO(tbosch): The old view compiler used to use an `any` type\n    // for the context in any embedded view. We keep this behaivor for now\n    // to be able to introduce the new view compiler without too many errors.\n\n    this.compType = this.embeddedViewIndex > 0 ? DYNAMIC_TYPE : expressionType(outputCtx.importExpr(this.component.type.reference));\n    this.viewName = viewClassName(this.component.type.reference, this.embeddedViewIndex);\n  }\n\n  _createClass(ViewBuilder$1, [{\n    key: \"visitAll\",\n    value: function visitAll(variables, astNodes) {\n      var _this248 = this;\n\n      this.variables = variables; // create the pipes for the pure pipes immediately, so that we know their indices.\n\n      if (!this.parent) {\n        this.usedPipes.forEach(function (pipe) {\n          if (pipe.pure) {\n            _this248.purePipeNodeIndices[pipe.name] = _this248._createPipe(null, pipe);\n          }\n        });\n      }\n\n      if (!this.parent) {\n        this.component.viewQueries.forEach(function (query, queryIndex) {\n          // Note: queries start with id 1 so we can use the number in a Bloom filter!\n          var queryId = queryIndex + 1;\n          var bindingType = query.first ? 0\n          /* First */\n          : 1\n          /* All */\n          ;\n          var flags = 134217728\n          /* TypeViewQuery */\n          | calcQueryFlags(query);\n\n          _this248.nodes.push(function () {\n            return {\n              sourceSpan: null,\n              nodeFlags: flags,\n              nodeDef: importExpr(Identifiers$1.queryDef).callFn([literal(flags), literal(queryId), new LiteralMapExpr([new LiteralMapEntry(query.propertyName, literal(bindingType), false)])])\n            };\n          });\n        });\n      }\n\n      templateVisitAll(this, astNodes);\n\n      if (this.parent && (astNodes.length === 0 || needsAdditionalRootNode(astNodes))) {\n        // if the view is an embedded view, then we need to add an additional root node in some cases\n        this.nodes.push(function () {\n          return {\n            sourceSpan: null,\n            nodeFlags: 1\n            /* TypeElement */\n            ,\n            nodeDef: importExpr(Identifiers$1.anchorDef).callFn([literal(0\n            /* None */\n            ), NULL_EXPR, NULL_EXPR, literal(0)])\n          };\n        });\n      }\n    }\n  }, {\n    key: \"build\",\n    value: function build() {\n      var targetStatements = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n      this.children.forEach(function (child) {\n        return child.build(targetStatements);\n      });\n\n      var _this$_createNodeExpr = this._createNodeExpressions(),\n          updateRendererStmts = _this$_createNodeExpr.updateRendererStmts,\n          updateDirectivesStmts = _this$_createNodeExpr.updateDirectivesStmts,\n          nodeDefExprs = _this$_createNodeExpr.nodeDefExprs;\n\n      var updateRendererFn = this._createUpdateFn(updateRendererStmts);\n\n      var updateDirectivesFn = this._createUpdateFn(updateDirectivesStmts);\n\n      var viewFlags = 0\n      /* None */\n      ;\n\n      if (!this.parent && this.component.changeDetection === ChangeDetectionStrategy.OnPush) {\n        viewFlags |= 2\n        /* OnPush */\n        ;\n      }\n\n      var viewFactory = new DeclareFunctionStmt(this.viewName, [new FnParam(LOG_VAR$1.name)], [new ReturnStatement(importExpr(Identifiers$1.viewDef).callFn([literal(viewFlags), literalArr(nodeDefExprs), updateDirectivesFn, updateRendererFn]))], importType(Identifiers$1.ViewDefinition), this.embeddedViewIndex === 0 ? [StmtModifier.Exported] : []);\n      targetStatements.push(viewFactory);\n      return targetStatements;\n    }\n  }, {\n    key: \"_createUpdateFn\",\n    value: function _createUpdateFn(updateStmts) {\n      var updateFn;\n\n      if (updateStmts.length > 0) {\n        var preStmts = [];\n\n        if (!this.component.isHost && findReadVarNames(updateStmts).has(COMP_VAR.name)) {\n          preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(this.compType));\n        }\n\n        updateFn = fn([new FnParam(CHECK_VAR.name, INFERRED_TYPE), new FnParam(VIEW_VAR.name, INFERRED_TYPE)], [].concat(preStmts, _toConsumableArray(updateStmts)), INFERRED_TYPE);\n      } else {\n        updateFn = NULL_EXPR;\n      }\n\n      return updateFn;\n    }\n  }, {\n    key: \"visitNgContent\",\n    value: function visitNgContent(ast, context) {\n      // ngContentDef(ngContentIndex: number, index: number): NodeDef;\n      this.nodes.push(function () {\n        return {\n          sourceSpan: ast.sourceSpan,\n          nodeFlags: 8\n          /* TypeNgContent */\n          ,\n          nodeDef: importExpr(Identifiers$1.ngContentDef).callFn([literal(ast.ngContentIndex), literal(ast.index)])\n        };\n      });\n    }\n  }, {\n    key: \"visitText\",\n    value: function visitText(ast, context) {\n      // Static text nodes have no check function\n      var checkIndex = -1;\n      this.nodes.push(function () {\n        return {\n          sourceSpan: ast.sourceSpan,\n          nodeFlags: 2\n          /* TypeText */\n          ,\n          nodeDef: importExpr(Identifiers$1.textDef).callFn([literal(checkIndex), literal(ast.ngContentIndex), literalArr([literal(ast.value)])])\n        };\n      });\n    }\n  }, {\n    key: \"visitBoundText\",\n    value: function visitBoundText(ast, context) {\n      var _this249 = this;\n\n      var nodeIndex = this.nodes.length; // reserve the space in the nodeDefs array\n\n      this.nodes.push(null);\n      var astWithSource = ast.value;\n      var inter = astWithSource.ast;\n      var updateRendererExpressions = inter.expressions.map(function (expr, bindingIndex) {\n        return _this249._preprocessUpdateExpression({\n          nodeIndex: nodeIndex,\n          bindingIndex: bindingIndex,\n          sourceSpan: ast.sourceSpan,\n          context: COMP_VAR,\n          value: expr\n        });\n      }); // Check index is the same as the node index during compilation\n      // They might only differ at runtime\n\n      var checkIndex = nodeIndex;\n\n      this.nodes[nodeIndex] = function () {\n        return {\n          sourceSpan: ast.sourceSpan,\n          nodeFlags: 2\n          /* TypeText */\n          ,\n          nodeDef: importExpr(Identifiers$1.textDef).callFn([literal(checkIndex), literal(ast.ngContentIndex), literalArr(inter.strings.map(function (s) {\n            return literal(s);\n          }))]),\n          updateRenderer: updateRendererExpressions\n        };\n      };\n    }\n  }, {\n    key: \"visitEmbeddedTemplate\",\n    value: function visitEmbeddedTemplate(ast, context) {\n      var _this250 = this;\n\n      var nodeIndex = this.nodes.length; // reserve the space in the nodeDefs array\n\n      this.nodes.push(null);\n\n      var _this$_visitElementOr = this._visitElementOrTemplate(nodeIndex, ast),\n          flags = _this$_visitElementOr.flags,\n          queryMatchesExpr = _this$_visitElementOr.queryMatchesExpr,\n          hostEvents = _this$_visitElementOr.hostEvents;\n\n      var childVisitor = this.viewBuilderFactory(this);\n      this.children.push(childVisitor);\n      childVisitor.visitAll(ast.variables, ast.children);\n      var childCount = this.nodes.length - nodeIndex - 1; // anchorDef(\n      //   flags: NodeFlags, matchedQueries: [string, QueryValueType][], ngContentIndex: number,\n      //   childCount: number, handleEventFn?: ElementHandleEventFn, templateFactory?:\n      //   ViewDefinitionFactory): NodeDef;\n\n      this.nodes[nodeIndex] = function () {\n        return {\n          sourceSpan: ast.sourceSpan,\n          nodeFlags: 1\n          /* TypeElement */\n          | flags,\n          nodeDef: importExpr(Identifiers$1.anchorDef).callFn([literal(flags), queryMatchesExpr, literal(ast.ngContentIndex), literal(childCount), _this250._createElementHandleEventFn(nodeIndex, hostEvents), variable(childVisitor.viewName)])\n        };\n      };\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(ast, context) {\n      var _this251 = this;\n\n      var nodeIndex = this.nodes.length; // reserve the space in the nodeDefs array so we can add children\n\n      this.nodes.push(null); // Using a null element name creates an anchor.\n\n      var elName = isNgContainer(ast.name) ? null : ast.name;\n\n      var _this$_visitElementOr2 = this._visitElementOrTemplate(nodeIndex, ast),\n          flags = _this$_visitElementOr2.flags,\n          usedEvents = _this$_visitElementOr2.usedEvents,\n          queryMatchesExpr = _this$_visitElementOr2.queryMatchesExpr,\n          dirHostBindings = _this$_visitElementOr2.hostBindings,\n          hostEvents = _this$_visitElementOr2.hostEvents;\n\n      var inputDefs = [];\n      var updateRendererExpressions = [];\n      var outputDefs = [];\n\n      if (elName) {\n        var hostBindings = ast.inputs.map(function (inputAst) {\n          return {\n            context: COMP_VAR,\n            inputAst: inputAst,\n            dirAst: null\n          };\n        }).concat(dirHostBindings);\n\n        if (hostBindings.length) {\n          updateRendererExpressions = hostBindings.map(function (hostBinding, bindingIndex) {\n            return _this251._preprocessUpdateExpression({\n              context: hostBinding.context,\n              nodeIndex: nodeIndex,\n              bindingIndex: bindingIndex,\n              sourceSpan: hostBinding.inputAst.sourceSpan,\n              value: hostBinding.inputAst.value\n            });\n          });\n          inputDefs = hostBindings.map(function (hostBinding) {\n            return elementBindingDef(hostBinding.inputAst, hostBinding.dirAst);\n          });\n        }\n\n        outputDefs = usedEvents.map(function (_ref38) {\n          var _ref39 = _slicedToArray(_ref38, 2),\n              target = _ref39[0],\n              eventName = _ref39[1];\n\n          return literalArr([literal(target), literal(eventName)]);\n        });\n      }\n\n      templateVisitAll(this, ast.children);\n      var childCount = this.nodes.length - nodeIndex - 1;\n      var compAst = ast.directives.find(function (dirAst) {\n        return dirAst.directive.isComponent;\n      });\n      var compRendererType = NULL_EXPR;\n      var compView = NULL_EXPR;\n\n      if (compAst) {\n        compView = this.outputCtx.importExpr(compAst.directive.componentViewType);\n        compRendererType = this.outputCtx.importExpr(compAst.directive.rendererType);\n      } // Check index is the same as the node index during compilation\n      // They might only differ at runtime\n\n\n      var checkIndex = nodeIndex;\n\n      this.nodes[nodeIndex] = function () {\n        return {\n          sourceSpan: ast.sourceSpan,\n          nodeFlags: 1\n          /* TypeElement */\n          | flags,\n          nodeDef: importExpr(Identifiers$1.elementDef).callFn([literal(checkIndex), literal(flags), queryMatchesExpr, literal(ast.ngContentIndex), literal(childCount), literal(elName), elName ? fixedAttrsDef(ast) : NULL_EXPR, inputDefs.length ? literalArr(inputDefs) : NULL_EXPR, outputDefs.length ? literalArr(outputDefs) : NULL_EXPR, _this251._createElementHandleEventFn(nodeIndex, hostEvents), compView, compRendererType]),\n          updateRenderer: updateRendererExpressions\n        };\n      };\n    }\n  }, {\n    key: \"_visitElementOrTemplate\",\n    value: function _visitElementOrTemplate(nodeIndex, ast) {\n      var _this252 = this;\n\n      var flags = 0\n      /* None */\n      ;\n\n      if (ast.hasViewContainer) {\n        flags |= 16777216\n        /* EmbeddedViews */\n        ;\n      }\n\n      var usedEvents = new Map();\n      ast.outputs.forEach(function (event) {\n        var _elementEventNameAndT = elementEventNameAndTarget(event, null),\n            name = _elementEventNameAndT.name,\n            target = _elementEventNameAndT.target;\n\n        usedEvents.set(elementEventFullName(target, name), [target, name]);\n      });\n      ast.directives.forEach(function (dirAst) {\n        dirAst.hostEvents.forEach(function (event) {\n          var _elementEventNameAndT2 = elementEventNameAndTarget(event, dirAst),\n              name = _elementEventNameAndT2.name,\n              target = _elementEventNameAndT2.target;\n\n          usedEvents.set(elementEventFullName(target, name), [target, name]);\n        });\n      });\n      var hostBindings = [];\n      var hostEvents = [];\n\n      this._visitComponentFactoryResolverProvider(ast.directives);\n\n      ast.providers.forEach(function (providerAst) {\n        var dirAst = undefined;\n        ast.directives.forEach(function (localDirAst) {\n          if (localDirAst.directive.type.reference === tokenReference(providerAst.token)) {\n            dirAst = localDirAst;\n          }\n        });\n\n        if (dirAst) {\n          var _this252$_visitDirect = _this252._visitDirective(providerAst, dirAst, ast.references, ast.queryMatches, usedEvents),\n              dirHostBindings = _this252$_visitDirect.hostBindings,\n              dirHostEvents = _this252$_visitDirect.hostEvents;\n\n          hostBindings.push.apply(hostBindings, _toConsumableArray(dirHostBindings));\n          hostEvents.push.apply(hostEvents, _toConsumableArray(dirHostEvents));\n        } else {\n          _this252._visitProvider(providerAst, ast.queryMatches);\n        }\n      });\n      var queryMatchExprs = [];\n      ast.queryMatches.forEach(function (match) {\n        var valueType = undefined;\n\n        if (tokenReference(match.value) === _this252.reflector.resolveExternalReference(Identifiers$1.ElementRef)) {\n          valueType = 0\n          /* ElementRef */\n          ;\n        } else if (tokenReference(match.value) === _this252.reflector.resolveExternalReference(Identifiers$1.ViewContainerRef)) {\n          valueType = 3\n          /* ViewContainerRef */\n          ;\n        } else if (tokenReference(match.value) === _this252.reflector.resolveExternalReference(Identifiers$1.TemplateRef)) {\n          valueType = 2\n          /* TemplateRef */\n          ;\n        }\n\n        if (valueType != null) {\n          queryMatchExprs.push(literalArr([literal(match.queryId), literal(valueType)]));\n        }\n      });\n      ast.references.forEach(function (ref) {\n        var valueType = undefined;\n\n        if (!ref.value) {\n          valueType = 1\n          /* RenderElement */\n          ;\n        } else if (tokenReference(ref.value) === _this252.reflector.resolveExternalReference(Identifiers$1.TemplateRef)) {\n          valueType = 2\n          /* TemplateRef */\n          ;\n        }\n\n        if (valueType != null) {\n          _this252.refNodeIndices[ref.name] = nodeIndex;\n          queryMatchExprs.push(literalArr([literal(ref.name), literal(valueType)]));\n        }\n      });\n      ast.outputs.forEach(function (outputAst) {\n        hostEvents.push({\n          context: COMP_VAR,\n          eventAst: outputAst,\n          dirAst: null\n        });\n      });\n      return {\n        flags: flags,\n        usedEvents: Array.from(usedEvents.values()),\n        queryMatchesExpr: queryMatchExprs.length ? literalArr(queryMatchExprs) : NULL_EXPR,\n        hostBindings: hostBindings,\n        hostEvents: hostEvents\n      };\n    }\n  }, {\n    key: \"_visitDirective\",\n    value: function _visitDirective(providerAst, dirAst, refs, queryMatches, usedEvents) {\n      var _this253 = this;\n\n      var nodeIndex = this.nodes.length; // reserve the space in the nodeDefs array so we can add children\n\n      this.nodes.push(null);\n      dirAst.directive.queries.forEach(function (query, queryIndex) {\n        var queryId = dirAst.contentQueryStartId + queryIndex;\n        var flags = 67108864\n        /* TypeContentQuery */\n        | calcQueryFlags(query);\n        var bindingType = query.first ? 0\n        /* First */\n        : 1\n        /* All */\n        ;\n\n        _this253.nodes.push(function () {\n          return {\n            sourceSpan: dirAst.sourceSpan,\n            nodeFlags: flags,\n            nodeDef: importExpr(Identifiers$1.queryDef).callFn([literal(flags), literal(queryId), new LiteralMapExpr([new LiteralMapEntry(query.propertyName, literal(bindingType), false)])])\n          };\n        });\n      }); // Note: the operation below might also create new nodeDefs,\n      // but we don't want them to be a child of a directive,\n      // as they might be a provider/pipe on their own.\n      // I.e. we only allow queries as children of directives nodes.\n\n      var childCount = this.nodes.length - nodeIndex - 1;\n\n      var _this$_visitProviderO = this._visitProviderOrDirective(providerAst, queryMatches),\n          flags = _this$_visitProviderO.flags,\n          queryMatchExprs = _this$_visitProviderO.queryMatchExprs,\n          providerExpr = _this$_visitProviderO.providerExpr,\n          depsExpr = _this$_visitProviderO.depsExpr;\n\n      refs.forEach(function (ref) {\n        if (ref.value && tokenReference(ref.value) === tokenReference(providerAst.token)) {\n          _this253.refNodeIndices[ref.name] = nodeIndex;\n          queryMatchExprs.push(literalArr([literal(ref.name), literal(4\n          /* Provider */\n          )]));\n        }\n      });\n\n      if (dirAst.directive.isComponent) {\n        flags |= 32768\n        /* Component */\n        ;\n      }\n\n      var inputDefs = dirAst.inputs.map(function (inputAst, inputIndex) {\n        var mapValue = literalArr([literal(inputIndex), literal(inputAst.directiveName)]); // Note: it's important to not quote the key so that we can capture renames by minifiers!\n\n        return new LiteralMapEntry(inputAst.directiveName, mapValue, false);\n      });\n      var outputDefs = [];\n      var dirMeta = dirAst.directive;\n      Object.keys(dirMeta.outputs).forEach(function (propName) {\n        var eventName = dirMeta.outputs[propName];\n\n        if (usedEvents.has(eventName)) {\n          // Note: it's important to not quote the key so that we can capture renames by minifiers!\n          outputDefs.push(new LiteralMapEntry(propName, literal(eventName), false));\n        }\n      });\n      var updateDirectiveExpressions = [];\n\n      if (dirAst.inputs.length || (flags & (262144\n      /* DoCheck */\n      | 65536\n      /* OnInit */\n      )) > 0) {\n        updateDirectiveExpressions = dirAst.inputs.map(function (input, bindingIndex) {\n          return _this253._preprocessUpdateExpression({\n            nodeIndex: nodeIndex,\n            bindingIndex: bindingIndex,\n            sourceSpan: input.sourceSpan,\n            context: COMP_VAR,\n            value: input.value\n          });\n        });\n      }\n\n      var dirContextExpr = importExpr(Identifiers$1.nodeValue).callFn([VIEW_VAR, literal(nodeIndex)]);\n      var hostBindings = dirAst.hostProperties.map(function (inputAst) {\n        return {\n          context: dirContextExpr,\n          dirAst: dirAst,\n          inputAst: inputAst\n        };\n      });\n      var hostEvents = dirAst.hostEvents.map(function (hostEventAst) {\n        return {\n          context: dirContextExpr,\n          eventAst: hostEventAst,\n          dirAst: dirAst\n        };\n      }); // Check index is the same as the node index during compilation\n      // They might only differ at runtime\n\n      var checkIndex = nodeIndex;\n\n      this.nodes[nodeIndex] = function () {\n        return {\n          sourceSpan: dirAst.sourceSpan,\n          nodeFlags: 16384\n          /* TypeDirective */\n          | flags,\n          nodeDef: importExpr(Identifiers$1.directiveDef).callFn([literal(checkIndex), literal(flags), queryMatchExprs.length ? literalArr(queryMatchExprs) : NULL_EXPR, literal(childCount), providerExpr, depsExpr, inputDefs.length ? new LiteralMapExpr(inputDefs) : NULL_EXPR, outputDefs.length ? new LiteralMapExpr(outputDefs) : NULL_EXPR]),\n          updateDirectives: updateDirectiveExpressions,\n          directive: dirAst.directive.type\n        };\n      };\n\n      return {\n        hostBindings: hostBindings,\n        hostEvents: hostEvents\n      };\n    }\n  }, {\n    key: \"_visitProvider\",\n    value: function _visitProvider(providerAst, queryMatches) {\n      this._addProviderNode(this._visitProviderOrDirective(providerAst, queryMatches));\n    }\n  }, {\n    key: \"_visitComponentFactoryResolverProvider\",\n    value: function _visitComponentFactoryResolverProvider(directives) {\n      var componentDirMeta = directives.find(function (dirAst) {\n        return dirAst.directive.isComponent;\n      });\n\n      if (componentDirMeta && componentDirMeta.directive.entryComponents.length) {\n        var _componentFactoryReso = componentFactoryResolverProviderDef(this.reflector, this.outputCtx, 8192\n        /* PrivateProvider */\n        , componentDirMeta.directive.entryComponents),\n            providerExpr = _componentFactoryReso.providerExpr,\n            depsExpr = _componentFactoryReso.depsExpr,\n            flags = _componentFactoryReso.flags,\n            _tokenExpr = _componentFactoryReso.tokenExpr;\n\n        this._addProviderNode({\n          providerExpr: providerExpr,\n          depsExpr: depsExpr,\n          flags: flags,\n          tokenExpr: _tokenExpr,\n          queryMatchExprs: [],\n          sourceSpan: componentDirMeta.sourceSpan\n        });\n      }\n    }\n  }, {\n    key: \"_addProviderNode\",\n    value: function _addProviderNode(data) {\n      // providerDef(\n      //   flags: NodeFlags, matchedQueries: [string, QueryValueType][], token:any,\n      //   value: any, deps: ([DepFlags, any] | any)[]): NodeDef;\n      this.nodes.push(function () {\n        return {\n          sourceSpan: data.sourceSpan,\n          nodeFlags: data.flags,\n          nodeDef: importExpr(Identifiers$1.providerDef).callFn([literal(data.flags), data.queryMatchExprs.length ? literalArr(data.queryMatchExprs) : NULL_EXPR, data.tokenExpr, data.providerExpr, data.depsExpr])\n        };\n      });\n    }\n  }, {\n    key: \"_visitProviderOrDirective\",\n    value: function _visitProviderOrDirective(providerAst, queryMatches) {\n      var flags = 0\n      /* None */\n      ;\n      var queryMatchExprs = [];\n      queryMatches.forEach(function (match) {\n        if (tokenReference(match.value) === tokenReference(providerAst.token)) {\n          queryMatchExprs.push(literalArr([literal(match.queryId), literal(4\n          /* Provider */\n          )]));\n        }\n      });\n\n      var _providerDef = providerDef(this.outputCtx, providerAst),\n          providerExpr = _providerDef.providerExpr,\n          depsExpr = _providerDef.depsExpr,\n          providerFlags = _providerDef.flags,\n          tokenExpr = _providerDef.tokenExpr;\n\n      return {\n        flags: flags | providerFlags,\n        queryMatchExprs: queryMatchExprs,\n        providerExpr: providerExpr,\n        depsExpr: depsExpr,\n        tokenExpr: tokenExpr,\n        sourceSpan: providerAst.sourceSpan\n      };\n    }\n  }, {\n    key: \"getLocal\",\n    value: function getLocal(name) {\n      if (name == EventHandlerVars.event.name) {\n        return EventHandlerVars.event;\n      }\n\n      var currViewExpr = VIEW_VAR;\n\n      for (var currBuilder = this; currBuilder; currBuilder = currBuilder.parent, currViewExpr = currViewExpr.prop('parent').cast(DYNAMIC_TYPE)) {\n        // check references\n        var refNodeIndex = currBuilder.refNodeIndices[name];\n\n        if (refNodeIndex != null) {\n          return importExpr(Identifiers$1.nodeValue).callFn([currViewExpr, literal(refNodeIndex)]);\n        } // check variables\n\n\n        var varAst = currBuilder.variables.find(function (varAst) {\n          return varAst.name === name;\n        });\n\n        if (varAst) {\n          var varValue = varAst.value || IMPLICIT_TEMPLATE_VAR;\n          return currViewExpr.prop('context').prop(varValue);\n        }\n      }\n\n      return null;\n    }\n  }, {\n    key: \"notifyImplicitReceiverUse\",\n    value: function notifyImplicitReceiverUse() {// Not needed in ViewEngine as ViewEngine walks through the generated\n      // expressions to figure out if the implicit receiver is used and needs\n      // to be generated as part of the pre-update statements.\n    }\n  }, {\n    key: \"maybeRestoreView\",\n    value: function maybeRestoreView() {// Not necessary in ViewEngine, because view restoration is an Ivy concept.\n    }\n  }, {\n    key: \"_createLiteralArrayConverter\",\n    value: function _createLiteralArrayConverter(sourceSpan, argCount) {\n      if (argCount === 0) {\n        var valueExpr = importExpr(Identifiers$1.EMPTY_ARRAY);\n        return function () {\n          return valueExpr;\n        };\n      }\n\n      var checkIndex = this.nodes.length;\n      this.nodes.push(function () {\n        return {\n          sourceSpan: sourceSpan,\n          nodeFlags: 32\n          /* TypePureArray */\n          ,\n          nodeDef: importExpr(Identifiers$1.pureArrayDef).callFn([literal(checkIndex), literal(argCount)])\n        };\n      });\n      return function (args) {\n        return callCheckStmt(checkIndex, args);\n      };\n    }\n  }, {\n    key: \"_createLiteralMapConverter\",\n    value: function _createLiteralMapConverter(sourceSpan, keys) {\n      if (keys.length === 0) {\n        var valueExpr = importExpr(Identifiers$1.EMPTY_MAP);\n        return function () {\n          return valueExpr;\n        };\n      }\n\n      var map = literalMap(keys.map(function (e, i) {\n        return Object.assign(Object.assign({}, e), {\n          value: literal(i)\n        });\n      }));\n      var checkIndex = this.nodes.length;\n      this.nodes.push(function () {\n        return {\n          sourceSpan: sourceSpan,\n          nodeFlags: 64\n          /* TypePureObject */\n          ,\n          nodeDef: importExpr(Identifiers$1.pureObjectDef).callFn([literal(checkIndex), map])\n        };\n      });\n      return function (args) {\n        return callCheckStmt(checkIndex, args);\n      };\n    }\n  }, {\n    key: \"_createPipeConverter\",\n    value: function _createPipeConverter(expression, name, argCount) {\n      var pipe = this.usedPipes.find(function (pipeSummary) {\n        return pipeSummary.name === name;\n      });\n\n      if (pipe.pure) {\n        var checkIndex = this.nodes.length;\n        this.nodes.push(function () {\n          return {\n            sourceSpan: expression.sourceSpan,\n            nodeFlags: 128\n            /* TypePurePipe */\n            ,\n            nodeDef: importExpr(Identifiers$1.purePipeDef).callFn([literal(checkIndex), literal(argCount)])\n          };\n        }); // find underlying pipe in the component view\n\n        var compViewExpr = VIEW_VAR;\n        var compBuilder = this;\n\n        while (compBuilder.parent) {\n          compBuilder = compBuilder.parent;\n          compViewExpr = compViewExpr.prop('parent').cast(DYNAMIC_TYPE);\n        }\n\n        var pipeNodeIndex = compBuilder.purePipeNodeIndices[name];\n        var pipeValueExpr = importExpr(Identifiers$1.nodeValue).callFn([compViewExpr, literal(pipeNodeIndex)]);\n        return function (args) {\n          return callUnwrapValue(expression.nodeIndex, expression.bindingIndex, callCheckStmt(checkIndex, [pipeValueExpr].concat(args)));\n        };\n      } else {\n        var nodeIndex = this._createPipe(expression.sourceSpan, pipe);\n\n        var nodeValueExpr = importExpr(Identifiers$1.nodeValue).callFn([VIEW_VAR, literal(nodeIndex)]);\n        return function (args) {\n          return callUnwrapValue(expression.nodeIndex, expression.bindingIndex, nodeValueExpr.callMethod('transform', args));\n        };\n      }\n    }\n  }, {\n    key: \"_createPipe\",\n    value: function _createPipe(sourceSpan, pipe) {\n      var _this254 = this;\n\n      var nodeIndex = this.nodes.length;\n      var flags = 0\n      /* None */\n      ;\n      pipe.type.lifecycleHooks.forEach(function (lifecycleHook) {\n        // for pipes, we only support ngOnDestroy\n        if (lifecycleHook === LifecycleHooks.OnDestroy) {\n          flags |= lifecycleHookToNodeFlag(lifecycleHook);\n        }\n      });\n      var depExprs = pipe.type.diDeps.map(function (diDep) {\n        return depDef(_this254.outputCtx, diDep);\n      }); // function pipeDef(\n      //   flags: NodeFlags, ctor: any, deps: ([DepFlags, any] | any)[]): NodeDef\n\n      this.nodes.push(function () {\n        return {\n          sourceSpan: sourceSpan,\n          nodeFlags: 16\n          /* TypePipe */\n          ,\n          nodeDef: importExpr(Identifiers$1.pipeDef).callFn([literal(flags), _this254.outputCtx.importExpr(pipe.type.reference), literalArr(depExprs)])\n        };\n      });\n      return nodeIndex;\n    }\n    /**\n     * For the AST in `UpdateExpression.value`:\n     * - create nodes for pipes, literal arrays and, literal maps,\n     * - update the AST to replace pipes, literal arrays and, literal maps with calls to check fn.\n     *\n     * WARNING: This might create new nodeDefs (for pipes and literal arrays and literal maps)!\n     */\n\n  }, {\n    key: \"_preprocessUpdateExpression\",\n    value: function _preprocessUpdateExpression(expression) {\n      var _this255 = this;\n\n      return {\n        nodeIndex: expression.nodeIndex,\n        bindingIndex: expression.bindingIndex,\n        sourceSpan: expression.sourceSpan,\n        context: expression.context,\n        value: convertPropertyBindingBuiltins({\n          createLiteralArrayConverter: function createLiteralArrayConverter(argCount) {\n            return _this255._createLiteralArrayConverter(expression.sourceSpan, argCount);\n          },\n          createLiteralMapConverter: function createLiteralMapConverter(keys) {\n            return _this255._createLiteralMapConverter(expression.sourceSpan, keys);\n          },\n          createPipeConverter: function createPipeConverter(name, argCount) {\n            return _this255._createPipeConverter(expression, name, argCount);\n          }\n        }, expression.value)\n      };\n    }\n  }, {\n    key: \"_createNodeExpressions\",\n    value: function _createNodeExpressions() {\n      var self = this;\n      var updateBindingCount = 0;\n      var updateRendererStmts = [];\n      var updateDirectivesStmts = [];\n      var nodeDefExprs = this.nodes.map(function (factory, nodeIndex) {\n        var _factory = factory(),\n            nodeDef = _factory.nodeDef,\n            nodeFlags = _factory.nodeFlags,\n            updateDirectives = _factory.updateDirectives,\n            updateRenderer = _factory.updateRenderer,\n            sourceSpan = _factory.sourceSpan;\n\n        if (updateRenderer) {\n          updateRendererStmts.push.apply(updateRendererStmts, _toConsumableArray(createUpdateStatements(nodeIndex, sourceSpan, updateRenderer, false)));\n        }\n\n        if (updateDirectives) {\n          updateDirectivesStmts.push.apply(updateDirectivesStmts, _toConsumableArray(createUpdateStatements(nodeIndex, sourceSpan, updateDirectives, (nodeFlags & (262144\n          /* DoCheck */\n          | 65536\n          /* OnInit */\n          )) > 0)));\n        } // We use a comma expression to call the log function before\n        // the nodeDef function, but still use the result of the nodeDef function\n        // as the value.\n        // Note: We only add the logger to elements / text nodes,\n        // so we don't generate too much code.\n\n\n        var logWithNodeDef = nodeFlags & 3\n        /* CatRenderNode */\n        ? new CommaExpr([LOG_VAR$1.callFn([]).callFn([]), nodeDef]) : nodeDef;\n        return applySourceSpanToExpressionIfNeeded(logWithNodeDef, sourceSpan);\n      });\n      return {\n        updateRendererStmts: updateRendererStmts,\n        updateDirectivesStmts: updateDirectivesStmts,\n        nodeDefExprs: nodeDefExprs\n      };\n\n      function createUpdateStatements(nodeIndex, sourceSpan, expressions, allowEmptyExprs) {\n        var updateStmts = [];\n        var exprs = expressions.map(function (_ref40) {\n          var sourceSpan = _ref40.sourceSpan,\n              context = _ref40.context,\n              value = _ref40.value;\n          var bindingId = \"\".concat(updateBindingCount++);\n          var nameResolver = context === COMP_VAR ? self : null;\n\n          var _convertPropertyBindi3 = _convertPropertyBinding(nameResolver, context, value, bindingId, BindingForm.General),\n              stmts = _convertPropertyBindi3.stmts,\n              currValExpr = _convertPropertyBindi3.currValExpr;\n\n          updateStmts.push.apply(updateStmts, _toConsumableArray(stmts.map(function (stmt) {\n            return applySourceSpanToStatementIfNeeded(stmt, sourceSpan);\n          })));\n          return applySourceSpanToExpressionIfNeeded(currValExpr, sourceSpan);\n        });\n\n        if (expressions.length || allowEmptyExprs) {\n          updateStmts.push(applySourceSpanToStatementIfNeeded(callCheckStmt(nodeIndex, exprs).toStmt(), sourceSpan));\n        }\n\n        return updateStmts;\n      }\n    }\n  }, {\n    key: \"_createElementHandleEventFn\",\n    value: function _createElementHandleEventFn(nodeIndex, handlers) {\n      var _this256 = this;\n\n      var handleEventStmts = [];\n      var handleEventBindingCount = 0;\n      handlers.forEach(function (_ref41) {\n        var context = _ref41.context,\n            eventAst = _ref41.eventAst,\n            dirAst = _ref41.dirAst;\n        var bindingId = \"\".concat(handleEventBindingCount++);\n        var nameResolver = context === COMP_VAR ? _this256 : null;\n\n        var _convertActionBinding2 = convertActionBinding(nameResolver, context, eventAst.handler, bindingId),\n            stmts = _convertActionBinding2.stmts,\n            allowDefault = _convertActionBinding2.allowDefault;\n\n        var trueStmts = stmts;\n\n        if (allowDefault) {\n          trueStmts.push(ALLOW_DEFAULT_VAR.set(allowDefault.and(ALLOW_DEFAULT_VAR)).toStmt());\n        }\n\n        var _elementEventNameAndT3 = elementEventNameAndTarget(eventAst, dirAst),\n            eventTarget = _elementEventNameAndT3.target,\n            eventName = _elementEventNameAndT3.name;\n\n        var fullEventName = elementEventFullName(eventTarget, eventName);\n        handleEventStmts.push(applySourceSpanToStatementIfNeeded(new IfStmt(literal(fullEventName).identical(EVENT_NAME_VAR), trueStmts), eventAst.sourceSpan));\n      });\n      var handleEventFn;\n\n      if (handleEventStmts.length > 0) {\n        var preStmts = [ALLOW_DEFAULT_VAR.set(literal(true)).toDeclStmt(BOOL_TYPE)];\n\n        if (!this.component.isHost && findReadVarNames(handleEventStmts).has(COMP_VAR.name)) {\n          preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(this.compType));\n        }\n\n        handleEventFn = fn([new FnParam(VIEW_VAR.name, INFERRED_TYPE), new FnParam(EVENT_NAME_VAR.name, INFERRED_TYPE), new FnParam(EventHandlerVars.event.name, INFERRED_TYPE)], [].concat(preStmts, handleEventStmts, [new ReturnStatement(ALLOW_DEFAULT_VAR)]), INFERRED_TYPE);\n      } else {\n        handleEventFn = NULL_EXPR;\n      }\n\n      return handleEventFn;\n    }\n  }, {\n    key: \"visitDirective\",\n    value: function visitDirective(ast, context) {}\n  }, {\n    key: \"visitDirectiveProperty\",\n    value: function visitDirectiveProperty(ast, context) {}\n  }, {\n    key: \"visitReference\",\n    value: function visitReference(ast, context) {}\n  }, {\n    key: \"visitVariable\",\n    value: function visitVariable(ast, context) {}\n  }, {\n    key: \"visitEvent\",\n    value: function visitEvent(ast, context) {}\n  }, {\n    key: \"visitElementProperty\",\n    value: function visitElementProperty(ast, context) {}\n  }, {\n    key: \"visitAttr\",\n    value: function visitAttr(ast, context) {}\n  }]);\n\n  return ViewBuilder$1;\n}();\n\nfunction needsAdditionalRootNode(astNodes) {\n  var lastAstNode = astNodes[astNodes.length - 1];\n\n  if (lastAstNode instanceof EmbeddedTemplateAst) {\n    return lastAstNode.hasViewContainer;\n  }\n\n  if (lastAstNode instanceof ElementAst) {\n    if (isNgContainer(lastAstNode.name) && lastAstNode.children.length) {\n      return needsAdditionalRootNode(lastAstNode.children);\n    }\n\n    return lastAstNode.hasViewContainer;\n  }\n\n  return lastAstNode instanceof NgContentAst;\n}\n\nfunction elementBindingDef(inputAst, dirAst) {\n  var inputType = inputAst.type;\n\n  switch (inputType) {\n    case 1\n    /* Attribute */\n    :\n      return literalArr([literal(1\n      /* TypeElementAttribute */\n      ), literal(inputAst.name), literal(inputAst.securityContext)]);\n\n    case 0\n    /* Property */\n    :\n      return literalArr([literal(8\n      /* TypeProperty */\n      ), literal(inputAst.name), literal(inputAst.securityContext)]);\n\n    case 4\n    /* Animation */\n    :\n      var bindingType = 8\n      /* TypeProperty */\n      | (dirAst && dirAst.directive.isComponent ? 32\n      /* SyntheticHostProperty */\n      : 16\n      /* SyntheticProperty */\n      );\n      return literalArr([literal(bindingType), literal('@' + inputAst.name), literal(inputAst.securityContext)]);\n\n    case 2\n    /* Class */\n    :\n      return literalArr([literal(2\n      /* TypeElementClass */\n      ), literal(inputAst.name), NULL_EXPR]);\n\n    case 3\n    /* Style */\n    :\n      return literalArr([literal(4\n      /* TypeElementStyle */\n      ), literal(inputAst.name), literal(inputAst.unit)]);\n\n    default:\n      // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n      // However Closure Compiler does not understand that and reports an error in typed mode.\n      // The `throw new Error` below works around the problem, and the unexpected: never variable\n      // makes sure tsc still checks this code is unreachable.\n      var unexpected = inputType;\n      throw new Error(\"unexpected \".concat(unexpected));\n  }\n}\n\nfunction fixedAttrsDef(elementAst) {\n  var mapResult = Object.create(null);\n  elementAst.attrs.forEach(function (attrAst) {\n    mapResult[attrAst.name] = attrAst.value;\n  });\n  elementAst.directives.forEach(function (dirAst) {\n    Object.keys(dirAst.directive.hostAttributes).forEach(function (name) {\n      var value = dirAst.directive.hostAttributes[name];\n      var prevValue = mapResult[name];\n      mapResult[name] = prevValue != null ? mergeAttributeValue(name, prevValue, value) : value;\n    });\n  }); // Note: We need to sort to get a defined output order\n  // for tests and for caching generated artifacts...\n\n  return literalArr(Object.keys(mapResult).sort().map(function (attrName) {\n    return literalArr([literal(attrName), literal(mapResult[attrName])]);\n  }));\n}\n\nfunction mergeAttributeValue(attrName, attrValue1, attrValue2) {\n  if (attrName == CLASS_ATTR$1 || attrName == STYLE_ATTR) {\n    return \"\".concat(attrValue1, \" \").concat(attrValue2);\n  } else {\n    return attrValue2;\n  }\n}\n\nfunction callCheckStmt(nodeIndex, exprs) {\n  if (exprs.length > 10) {\n    return CHECK_VAR.callFn([VIEW_VAR, literal(nodeIndex), literal(1\n    /* Dynamic */\n    ), literalArr(exprs)]);\n  } else {\n    return CHECK_VAR.callFn([VIEW_VAR, literal(nodeIndex), literal(0\n    /* Inline */\n    )].concat(_toConsumableArray(exprs)));\n  }\n}\n\nfunction callUnwrapValue(nodeIndex, bindingIdx, expr) {\n  return importExpr(Identifiers$1.unwrapValue).callFn([VIEW_VAR, literal(nodeIndex), literal(bindingIdx), expr]);\n}\n\nfunction elementEventNameAndTarget(eventAst, dirAst) {\n  if (eventAst.isAnimation) {\n    return {\n      name: \"@\".concat(eventAst.name, \".\").concat(eventAst.phase),\n      target: dirAst && dirAst.directive.isComponent ? 'component' : null\n    };\n  } else {\n    return eventAst;\n  }\n}\n\nfunction calcQueryFlags(query) {\n  var flags = 0\n  /* None */\n  ; // Note: We only make queries static that query for a single item and the user specifically\n  // set the to be static. This is because of backwards compatibility with the old view compiler...\n\n  if (query.first && query.static) {\n    flags |= 268435456\n    /* StaticQuery */\n    ;\n  } else {\n    flags |= 536870912\n    /* DynamicQuery */\n    ;\n  }\n\n  if (query.emitDistinctChangesOnly) {\n    flags |= -2147483648\n    /* EmitDistinctChangesOnly */\n    ;\n  }\n\n  return flags;\n}\n\nfunction elementEventFullName(target, name) {\n  return target ? \"\".concat(target, \":\").concat(name) : name;\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * A container for message extracted from the templates.\n */\n\n\nvar MessageBundle = /*#__PURE__*/function () {\n  function MessageBundle(_htmlParser, _implicitTags, _implicitAttrs) {\n    var _locale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n    _classCallCheck(this, MessageBundle);\n\n    this._htmlParser = _htmlParser;\n    this._implicitTags = _implicitTags;\n    this._implicitAttrs = _implicitAttrs;\n    this._locale = _locale;\n    this._messages = [];\n  }\n\n  _createClass(MessageBundle, [{\n    key: \"updateFromTemplate\",\n    value: function updateFromTemplate(html, url, interpolationConfig) {\n      var _this$_messages;\n\n      var htmlParserResult = this._htmlParser.parse(html, url, {\n        tokenizeExpansionForms: true,\n        interpolationConfig: interpolationConfig\n      });\n\n      if (htmlParserResult.errors.length) {\n        return htmlParserResult.errors;\n      }\n\n      var i18nParserResult = extractMessages(htmlParserResult.rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs);\n\n      if (i18nParserResult.errors.length) {\n        return i18nParserResult.errors;\n      }\n\n      (_this$_messages = this._messages).push.apply(_this$_messages, _toConsumableArray(i18nParserResult.messages));\n\n      return [];\n    } // Return the message in the internal format\n    // The public (serialized) format might be different, see the `write` method.\n\n  }, {\n    key: \"getMessages\",\n    value: function getMessages() {\n      return this._messages;\n    }\n  }, {\n    key: \"write\",\n    value: function write(serializer, filterSources) {\n      var messages = {};\n      var mapperVisitor = new MapPlaceholderNames(); // Deduplicate messages based on their ID\n\n      this._messages.forEach(function (message) {\n        var id = serializer.digest(message);\n\n        if (!messages.hasOwnProperty(id)) {\n          messages[id] = message;\n        } else {\n          var _messages$id$sources;\n\n          (_messages$id$sources = messages[id].sources).push.apply(_messages$id$sources, _toConsumableArray(message.sources));\n        }\n      }); // Transform placeholder names using the serializer mapping\n\n\n      var msgList = Object.keys(messages).map(function (id) {\n        var mapper = serializer.createNameMapper(messages[id]);\n        var src = messages[id];\n        var nodes = mapper ? mapperVisitor.convert(src.nodes, mapper) : src.nodes;\n        var transformedMessage = new Message(nodes, {}, {}, src.meaning, src.description, id);\n        transformedMessage.sources = src.sources;\n\n        if (filterSources) {\n          transformedMessage.sources.forEach(function (source) {\n            return source.filePath = filterSources(source.filePath);\n          });\n        }\n\n        return transformedMessage;\n      });\n      return serializer.write(msgList, this._locale);\n    }\n  }]);\n\n  return MessageBundle;\n}(); // Transform an i18n AST by renaming the placeholder nodes with the given mapper\n\n\nvar MapPlaceholderNames = /*#__PURE__*/function (_CloneVisitor) {\n  _inherits(MapPlaceholderNames, _CloneVisitor);\n\n  var _super107 = _createSuper(MapPlaceholderNames);\n\n  function MapPlaceholderNames() {\n    _classCallCheck(this, MapPlaceholderNames);\n\n    return _super107.apply(this, arguments);\n  }\n\n  _createClass(MapPlaceholderNames, [{\n    key: \"convert\",\n    value: function convert(nodes, mapper) {\n      var _this257 = this;\n\n      return mapper ? nodes.map(function (n) {\n        return n.visit(_this257, mapper);\n      }) : nodes;\n    }\n  }, {\n    key: \"visitTagPlaceholder\",\n    value: function visitTagPlaceholder(ph, mapper) {\n      var _this258 = this;\n\n      var startName = mapper.toPublicName(ph.startName);\n      var closeName = ph.closeName ? mapper.toPublicName(ph.closeName) : ph.closeName;\n      var children = ph.children.map(function (n) {\n        return n.visit(_this258, mapper);\n      });\n      return new TagPlaceholder(ph.tag, ph.attrs, startName, closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);\n    }\n  }, {\n    key: \"visitPlaceholder\",\n    value: function visitPlaceholder(ph, mapper) {\n      return new Placeholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);\n    }\n  }, {\n    key: \"visitIcuPlaceholder\",\n    value: function visitIcuPlaceholder(ph, mapper) {\n      return new IcuPlaceholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);\n    }\n  }]);\n\n  return MapPlaceholderNames;\n}(CloneVisitor);\n/**\n * @license\n * Copyright Google LLC 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\nvar GeneratedFile = /*#__PURE__*/function () {\n  function GeneratedFile(srcFileUrl, genFileUrl, sourceOrStmts) {\n    _classCallCheck(this, GeneratedFile);\n\n    this.srcFileUrl = srcFileUrl;\n    this.genFileUrl = genFileUrl;\n\n    if (typeof sourceOrStmts === 'string') {\n      this.source = sourceOrStmts;\n      this.stmts = null;\n    } else {\n      this.source = null;\n      this.stmts = sourceOrStmts;\n    }\n  }\n\n  _createClass(GeneratedFile, [{\n    key: \"isEquivalent\",\n    value: function isEquivalent(other) {\n      if (this.genFileUrl !== other.genFileUrl) {\n        return false;\n      }\n\n      if (this.source) {\n        return this.source === other.source;\n      }\n\n      if (other.stmts == null) {\n        return false;\n      } // Note: the constructor guarantees that if this.source is not filled,\n      // then this.stmts is.\n\n\n      return areAllEquivalent(this.stmts, other.stmts);\n    }\n  }]);\n\n  return GeneratedFile;\n}();\n\nfunction toTypeScript(file) {\n  var preamble = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n  if (!file.stmts) {\n    throw new Error(\"Illegal state: No stmts present on GeneratedFile \".concat(file.genFileUrl));\n  }\n\n  return new TypeScriptEmitter().emitStatements(file.genFileUrl, file.stmts, preamble);\n}\n/**\n * @license\n * Copyright Google LLC 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\nfunction _listLazyRoutes(moduleMeta, reflector) {\n  var allLazyRoutes = [];\n\n  var _iterator27 = _createForOfIteratorHelper(moduleMeta.transitiveModule.providers),\n      _step27;\n\n  try {\n    for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {\n      var _step27$value = _step27.value,\n          provider = _step27$value.provider,\n          module = _step27$value.module;\n\n      if (tokenReference(provider.token) === reflector.ROUTES) {\n        var loadChildren = _collectLoadChildren(provider.useValue);\n\n        var _iterator28 = _createForOfIteratorHelper(loadChildren),\n            _step28;\n\n        try {\n          for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {\n            var route = _step28.value;\n            allLazyRoutes.push(parseLazyRoute(route, reflector, module.reference));\n          }\n        } catch (err) {\n          _iterator28.e(err);\n        } finally {\n          _iterator28.f();\n        }\n      }\n    }\n  } catch (err) {\n    _iterator27.e(err);\n  } finally {\n    _iterator27.f();\n  }\n\n  return allLazyRoutes;\n}\n\nfunction _collectLoadChildren(routes) {\n  var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n  if (typeof routes === 'string') {\n    target.push(routes);\n  } else if (Array.isArray(routes)) {\n    var _iterator29 = _createForOfIteratorHelper(routes),\n        _step29;\n\n    try {\n      for (_iterator29.s(); !(_step29 = _iterator29.n()).done;) {\n        var route = _step29.value;\n\n        _collectLoadChildren(route, target);\n      }\n    } catch (err) {\n      _iterator29.e(err);\n    } finally {\n      _iterator29.f();\n    }\n  } else if (routes.loadChildren) {\n    _collectLoadChildren(routes.loadChildren, target);\n  } else if (routes.children) {\n    _collectLoadChildren(routes.children, target);\n  }\n\n  return target;\n}\n\nfunction parseLazyRoute(route, reflector, module) {\n  var _route$split = route.split('#'),\n      _route$split2 = _slicedToArray(_route$split, 2),\n      routePath = _route$split2[0],\n      routeName = _route$split2[1];\n\n  var referencedModule = reflector.resolveExternalReference({\n    moduleName: routePath,\n    name: routeName\n  }, module ? module.filePath : undefined);\n  return {\n    route: route,\n    module: module || referencedModule,\n    referencedModule: referencedModule\n  };\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar TS = /^(?!.*\\.d\\.ts$).*\\.ts$/;\n\nvar ResolvedStaticSymbol = /*#__PURE__*/_createClass(function ResolvedStaticSymbol(symbol, metadata) {\n  _classCallCheck(this, ResolvedStaticSymbol);\n\n  this.symbol = symbol;\n  this.metadata = metadata;\n});\n\nvar SUPPORTED_SCHEMA_VERSION = 4;\n/**\n * This class is responsible for loading metadata per symbol,\n * and normalizing references between symbols.\n *\n * Internally, it only uses symbols without members,\n * and deduces the values for symbols with members based\n * on these symbols.\n */\n\nvar StaticSymbolResolver = /*#__PURE__*/function () {\n  function StaticSymbolResolver(host, staticSymbolCache, summaryResolver, errorRecorder) {\n    _classCallCheck(this, StaticSymbolResolver);\n\n    this.host = host;\n    this.staticSymbolCache = staticSymbolCache;\n    this.summaryResolver = summaryResolver;\n    this.errorRecorder = errorRecorder;\n    this.metadataCache = new Map(); // Note: this will only contain StaticSymbols without members!\n\n    this.resolvedSymbols = new Map(); // Note: this will only contain StaticSymbols without members!\n\n    this.importAs = new Map();\n    this.symbolResourcePaths = new Map();\n    this.symbolFromFile = new Map();\n    this.knownFileNameToModuleNames = new Map();\n  }\n\n  _createClass(StaticSymbolResolver, [{\n    key: \"resolveSymbol\",\n    value: function resolveSymbol(staticSymbol) {\n      if (staticSymbol.members.length > 0) {\n        return this._resolveSymbolMembers(staticSymbol);\n      } // Note: always ask for a summary first,\n      // as we might have read shallow metadata via a .d.ts file\n      // for the symbol.\n\n\n      var resultFromSummary = this._resolveSymbolFromSummary(staticSymbol);\n\n      if (resultFromSummary) {\n        return resultFromSummary;\n      }\n\n      var resultFromCache = this.resolvedSymbols.get(staticSymbol);\n\n      if (resultFromCache) {\n        return resultFromCache;\n      } // Note: Some users use libraries that were not compiled with ngc, i.e. they don't\n      // have summaries, only .d.ts files. So we always need to check both, the summary\n      // and metadata.\n\n\n      this._createSymbolsOf(staticSymbol.filePath);\n\n      return this.resolvedSymbols.get(staticSymbol);\n    }\n    /**\n     * getImportAs produces a symbol that can be used to import the given symbol.\n     * The import might be different than the symbol if the symbol is exported from\n     * a library with a summary; in which case we want to import the symbol from the\n     * ngfactory re-export instead of directly to avoid introducing a direct dependency\n     * on an otherwise indirect dependency.\n     *\n     * @param staticSymbol the symbol for which to generate a import symbol\n     */\n\n  }, {\n    key: \"getImportAs\",\n    value: function getImportAs(staticSymbol) {\n      var useSummaries = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n      if (staticSymbol.members.length) {\n        var baseSymbol = this.getStaticSymbol(staticSymbol.filePath, staticSymbol.name);\n        var baseImportAs = this.getImportAs(baseSymbol, useSummaries);\n        return baseImportAs ? this.getStaticSymbol(baseImportAs.filePath, baseImportAs.name, staticSymbol.members) : null;\n      }\n\n      var summarizedFileName = stripSummaryForJitFileSuffix(staticSymbol.filePath);\n\n      if (summarizedFileName !== staticSymbol.filePath) {\n        var summarizedName = stripSummaryForJitNameSuffix(staticSymbol.name);\n\n        var _baseSymbol = this.getStaticSymbol(summarizedFileName, summarizedName, staticSymbol.members);\n\n        var _baseImportAs = this.getImportAs(_baseSymbol, useSummaries);\n\n        return _baseImportAs ? this.getStaticSymbol(summaryForJitFileName(_baseImportAs.filePath), summaryForJitName(_baseImportAs.name), _baseSymbol.members) : null;\n      }\n\n      var result = useSummaries && this.summaryResolver.getImportAs(staticSymbol) || null;\n\n      if (!result) {\n        result = this.importAs.get(staticSymbol);\n      }\n\n      return result;\n    }\n    /**\n     * getResourcePath produces the path to the original location of the symbol and should\n     * be used to determine the relative location of resource references recorded in\n     * symbol metadata.\n     */\n\n  }, {\n    key: \"getResourcePath\",\n    value: function getResourcePath(staticSymbol) {\n      return this.symbolResourcePaths.get(staticSymbol) || staticSymbol.filePath;\n    }\n    /**\n     * getTypeArity returns the number of generic type parameters the given symbol\n     * has. If the symbol is not a type the result is null.\n     */\n\n  }, {\n    key: \"getTypeArity\",\n    value: function getTypeArity(staticSymbol) {\n      // If the file is a factory/ngsummary file, don't resolve the symbol as doing so would\n      // cause the metadata for an factory/ngsummary file to be loaded which doesn't exist.\n      // All references to generated classes must include the correct arity whenever\n      // generating code.\n      if (isGeneratedFile(staticSymbol.filePath)) {\n        return null;\n      }\n\n      var resolvedSymbol = unwrapResolvedMetadata(this.resolveSymbol(staticSymbol));\n\n      while (resolvedSymbol && resolvedSymbol.metadata instanceof StaticSymbol) {\n        resolvedSymbol = unwrapResolvedMetadata(this.resolveSymbol(resolvedSymbol.metadata));\n      }\n\n      return resolvedSymbol && resolvedSymbol.metadata && resolvedSymbol.metadata.arity || null;\n    }\n  }, {\n    key: \"getKnownModuleName\",\n    value: function getKnownModuleName(filePath) {\n      return this.knownFileNameToModuleNames.get(filePath) || null;\n    }\n  }, {\n    key: \"recordImportAs\",\n    value: function recordImportAs(sourceSymbol, targetSymbol) {\n      sourceSymbol.assertNoMembers();\n      targetSymbol.assertNoMembers();\n      this.importAs.set(sourceSymbol, targetSymbol);\n    }\n  }, {\n    key: \"recordModuleNameForFileName\",\n    value: function recordModuleNameForFileName(fileName, moduleName) {\n      this.knownFileNameToModuleNames.set(fileName, moduleName);\n    }\n    /**\n     * Invalidate all information derived from the given file and return the\n     * static symbols contained in the file.\n     *\n     * @param fileName the file to invalidate\n     */\n\n  }, {\n    key: \"invalidateFile\",\n    value: function invalidateFile(fileName) {\n      this.metadataCache.delete(fileName);\n      var symbols = this.symbolFromFile.get(fileName);\n\n      if (!symbols) {\n        return [];\n      }\n\n      this.symbolFromFile.delete(fileName);\n\n      var _iterator30 = _createForOfIteratorHelper(symbols),\n          _step30;\n\n      try {\n        for (_iterator30.s(); !(_step30 = _iterator30.n()).done;) {\n          var symbol = _step30.value;\n          this.resolvedSymbols.delete(symbol);\n          this.importAs.delete(symbol);\n          this.symbolResourcePaths.delete(symbol);\n        }\n      } catch (err) {\n        _iterator30.e(err);\n      } finally {\n        _iterator30.f();\n      }\n\n      return symbols;\n    }\n    /** @internal */\n\n  }, {\n    key: \"ignoreErrorsFor\",\n    value: function ignoreErrorsFor(cb) {\n      var recorder = this.errorRecorder;\n\n      this.errorRecorder = function () {};\n\n      try {\n        return cb();\n      } finally {\n        this.errorRecorder = recorder;\n      }\n    }\n  }, {\n    key: \"_resolveSymbolMembers\",\n    value: function _resolveSymbolMembers(staticSymbol) {\n      var members = staticSymbol.members;\n      var baseResolvedSymbol = this.resolveSymbol(this.getStaticSymbol(staticSymbol.filePath, staticSymbol.name));\n\n      if (!baseResolvedSymbol) {\n        return null;\n      }\n\n      var baseMetadata = unwrapResolvedMetadata(baseResolvedSymbol.metadata);\n\n      if (baseMetadata instanceof StaticSymbol) {\n        return new ResolvedStaticSymbol(staticSymbol, this.getStaticSymbol(baseMetadata.filePath, baseMetadata.name, members));\n      } else if (baseMetadata && baseMetadata.__symbolic === 'class') {\n        if (baseMetadata.statics && members.length === 1) {\n          return new ResolvedStaticSymbol(staticSymbol, baseMetadata.statics[members[0]]);\n        }\n      } else {\n        var value = baseMetadata;\n\n        for (var i = 0; i < members.length && value; i++) {\n          value = value[members[i]];\n        }\n\n        return new ResolvedStaticSymbol(staticSymbol, value);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"_resolveSymbolFromSummary\",\n    value: function _resolveSymbolFromSummary(staticSymbol) {\n      var summary = this.summaryResolver.resolveSummary(staticSymbol);\n      return summary ? new ResolvedStaticSymbol(staticSymbol, summary.metadata) : null;\n    }\n    /**\n     * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.\n     * All types passed to the StaticResolver should be pseudo-types returned by this method.\n     *\n     * @param declarationFile the absolute path of the file where the symbol is declared\n     * @param name the name of the type.\n     * @param members a symbol for a static member of the named type\n     */\n\n  }, {\n    key: \"getStaticSymbol\",\n    value: function getStaticSymbol(declarationFile, name, members) {\n      return this.staticSymbolCache.get(declarationFile, name, members);\n    }\n    /**\n     * hasDecorators checks a file's metadata for the presence of decorators without evaluating the\n     * metadata.\n     *\n     * @param filePath the absolute path to examine for decorators.\n     * @returns true if any class in the file has a decorator.\n     */\n\n  }, {\n    key: \"hasDecorators\",\n    value: function hasDecorators(filePath) {\n      var metadata = this.getModuleMetadata(filePath);\n\n      if (metadata['metadata']) {\n        return Object.keys(metadata['metadata']).some(function (metadataKey) {\n          var entry = metadata['metadata'][metadataKey];\n          return entry && entry.__symbolic === 'class' && entry.decorators;\n        });\n      }\n\n      return false;\n    }\n  }, {\n    key: \"getSymbolsOf\",\n    value: function getSymbolsOf(filePath) {\n      var summarySymbols = this.summaryResolver.getSymbolsOf(filePath);\n\n      if (summarySymbols) {\n        return summarySymbols;\n      } // Note: Some users use libraries that were not compiled with ngc, i.e. they don't\n      // have summaries, only .d.ts files, but `summaryResolver.isLibraryFile` returns true.\n\n\n      this._createSymbolsOf(filePath);\n\n      return this.symbolFromFile.get(filePath) || [];\n    }\n  }, {\n    key: \"_createSymbolsOf\",\n    value: function _createSymbolsOf(filePath) {\n      var _this259 = this;\n\n      if (this.symbolFromFile.has(filePath)) {\n        return;\n      }\n\n      var resolvedSymbols = [];\n      var metadata = this.getModuleMetadata(filePath);\n\n      if (metadata['importAs']) {\n        // Index bundle indices should use the importAs module name defined\n        // in the bundle.\n        this.knownFileNameToModuleNames.set(filePath, metadata['importAs']);\n      } // handle the symbols in one of the re-export location\n\n\n      if (metadata['exports']) {\n        var _iterator31 = _createForOfIteratorHelper(metadata['exports']),\n            _step31;\n\n        try {\n          var _loop3 = function _loop3() {\n            var moduleExport = _step31.value;\n\n            // handle the symbols in the list of explicitly re-exported symbols.\n            if (moduleExport.export) {\n              moduleExport.export.forEach(function (exportSymbol) {\n                var symbolName;\n\n                if (typeof exportSymbol === 'string') {\n                  symbolName = exportSymbol;\n                } else {\n                  symbolName = exportSymbol.as;\n                }\n\n                symbolName = unescapeIdentifier(symbolName);\n                var symName = symbolName;\n\n                if (typeof exportSymbol !== 'string') {\n                  symName = unescapeIdentifier(exportSymbol.name);\n                }\n\n                var resolvedModule = _this259.resolveModule(moduleExport.from, filePath);\n\n                if (resolvedModule) {\n                  var targetSymbol = _this259.getStaticSymbol(resolvedModule, symName);\n\n                  var sourceSymbol = _this259.getStaticSymbol(filePath, symbolName);\n\n                  resolvedSymbols.push(_this259.createExport(sourceSymbol, targetSymbol));\n                }\n              });\n            } else {\n              // Handle the symbols loaded by 'export *' directives.\n              var resolvedModule = _this259.resolveModule(moduleExport.from, filePath);\n\n              if (resolvedModule && resolvedModule !== filePath) {\n                var nestedExports = _this259.getSymbolsOf(resolvedModule);\n\n                nestedExports.forEach(function (targetSymbol) {\n                  var sourceSymbol = _this259.getStaticSymbol(filePath, targetSymbol.name);\n\n                  resolvedSymbols.push(_this259.createExport(sourceSymbol, targetSymbol));\n                });\n              }\n            }\n          };\n\n          for (_iterator31.s(); !(_step31 = _iterator31.n()).done;) {\n            _loop3();\n          }\n        } catch (err) {\n          _iterator31.e(err);\n        } finally {\n          _iterator31.f();\n        }\n      } // handle the actual metadata. Has to be after the exports\n      // as there might be collisions in the names, and we want the symbols\n      // of the current module to win ofter reexports.\n\n\n      if (metadata['metadata']) {\n        // handle direct declarations of the symbol\n        var topLevelSymbolNames = new Set(Object.keys(metadata['metadata']).map(unescapeIdentifier));\n        var origins = metadata['origins'] || {};\n        Object.keys(metadata['metadata']).forEach(function (metadataKey) {\n          var symbolMeta = metadata['metadata'][metadataKey];\n          var name = unescapeIdentifier(metadataKey);\n\n          var symbol = _this259.getStaticSymbol(filePath, name);\n\n          var origin = origins.hasOwnProperty(metadataKey) && origins[metadataKey];\n\n          if (origin) {\n            // If the symbol is from a bundled index, use the declaration location of the\n            // symbol so relative references (such as './my.html') will be calculated\n            // correctly.\n            var originFilePath = _this259.resolveModule(origin, filePath);\n\n            if (!originFilePath) {\n              _this259.reportError(new Error(\"Couldn't resolve original symbol for \".concat(origin, \" from \").concat(_this259.host.getOutputName(filePath))));\n            } else {\n              _this259.symbolResourcePaths.set(symbol, originFilePath);\n            }\n          }\n\n          resolvedSymbols.push(_this259.createResolvedSymbol(symbol, filePath, topLevelSymbolNames, symbolMeta));\n        });\n      }\n\n      var uniqueSymbols = new Set();\n\n      for (var _i11 = 0, _resolvedSymbols = resolvedSymbols; _i11 < _resolvedSymbols.length; _i11++) {\n        var resolvedSymbol = _resolvedSymbols[_i11];\n        this.resolvedSymbols.set(resolvedSymbol.symbol, resolvedSymbol);\n        uniqueSymbols.add(resolvedSymbol.symbol);\n      }\n\n      this.symbolFromFile.set(filePath, Array.from(uniqueSymbols));\n    }\n  }, {\n    key: \"createResolvedSymbol\",\n    value: function createResolvedSymbol(sourceSymbol, topLevelPath, topLevelSymbolNames, metadata) {\n      var _this260 = this;\n\n      // For classes that don't have Angular summaries / metadata,\n      // we only keep their arity, but nothing else\n      // (e.g. their constructor parameters).\n      // We do this to prevent introducing deep imports\n      // as we didn't generate .ngfactory.ts files with proper reexports.\n      var isTsFile = TS.test(sourceSymbol.filePath);\n\n      if (this.summaryResolver.isLibraryFile(sourceSymbol.filePath) && !isTsFile && metadata && metadata['__symbolic'] === 'class') {\n        var _transformedMeta = {\n          __symbolic: 'class',\n          arity: metadata.arity\n        };\n        return new ResolvedStaticSymbol(sourceSymbol, _transformedMeta);\n      }\n\n      var _originalFileMemo;\n\n      var getOriginalName = function getOriginalName() {\n        if (!_originalFileMemo) {\n          // Guess what the original file name is from the reference. If it has a `.d.ts` extension\n          // replace it with `.ts`. If it already has `.ts` just leave it in place. If it doesn't have\n          // .ts or .d.ts, append `.ts'. Also, if it is in `node_modules`, trim the `node_module`\n          // location as it is not important to finding the file.\n          _originalFileMemo = _this260.host.getOutputName(topLevelPath.replace(/((\\.ts)|(\\.d\\.ts)|)$/, '.ts').replace(/^.*node_modules[/\\\\]/, ''));\n        }\n\n        return _originalFileMemo;\n      };\n\n      var self = this;\n\n      var ReferenceTransformer = /*#__PURE__*/function (_ValueTransformer2) {\n        _inherits(ReferenceTransformer, _ValueTransformer2);\n\n        var _super108 = _createSuper(ReferenceTransformer);\n\n        function ReferenceTransformer() {\n          _classCallCheck(this, ReferenceTransformer);\n\n          return _super108.apply(this, arguments);\n        }\n\n        _createClass(ReferenceTransformer, [{\n          key: \"visitStringMap\",\n          value: function visitStringMap(map, functionParams) {\n            var symbolic = map['__symbolic'];\n\n            if (symbolic === 'function') {\n              var oldLen = functionParams.length;\n              functionParams.push.apply(functionParams, _toConsumableArray(map['parameters'] || []));\n\n              var result = _get(_getPrototypeOf(ReferenceTransformer.prototype), \"visitStringMap\", this).call(this, map, functionParams);\n\n              functionParams.length = oldLen;\n              return result;\n            } else if (symbolic === 'reference') {\n              var module = map['module'];\n              var name = map['name'] ? unescapeIdentifier(map['name']) : map['name'];\n\n              if (!name) {\n                return null;\n              }\n\n              var filePath;\n\n              if (module) {\n                filePath = self.resolveModule(module, sourceSymbol.filePath);\n\n                if (!filePath) {\n                  return {\n                    __symbolic: 'error',\n                    message: \"Could not resolve \".concat(module, \" relative to \").concat(self.host.getMetadataFor(sourceSymbol.filePath), \".\"),\n                    line: map['line'],\n                    character: map['character'],\n                    fileName: getOriginalName()\n                  };\n                }\n\n                return {\n                  __symbolic: 'resolved',\n                  symbol: self.getStaticSymbol(filePath, name),\n                  line: map['line'],\n                  character: map['character'],\n                  fileName: getOriginalName()\n                };\n              } else if (functionParams.indexOf(name) >= 0) {\n                // reference to a function parameter\n                return {\n                  __symbolic: 'reference',\n                  name: name\n                };\n              } else {\n                if (topLevelSymbolNames.has(name)) {\n                  return self.getStaticSymbol(topLevelPath, name);\n                } // ambient value\n\n\n                null;\n              }\n            } else if (symbolic === 'error') {\n              return Object.assign(Object.assign({}, map), {\n                fileName: getOriginalName()\n              });\n            } else {\n              return _get(_getPrototypeOf(ReferenceTransformer.prototype), \"visitStringMap\", this).call(this, map, functionParams);\n            }\n          }\n        }]);\n\n        return ReferenceTransformer;\n      }(ValueTransformer);\n\n      var transformedMeta = visitValue(metadata, new ReferenceTransformer(), []);\n      var unwrappedTransformedMeta = unwrapResolvedMetadata(transformedMeta);\n\n      if (unwrappedTransformedMeta instanceof StaticSymbol) {\n        return this.createExport(sourceSymbol, unwrappedTransformedMeta);\n      }\n\n      return new ResolvedStaticSymbol(sourceSymbol, transformedMeta);\n    }\n  }, {\n    key: \"createExport\",\n    value: function createExport(sourceSymbol, targetSymbol) {\n      sourceSymbol.assertNoMembers();\n      targetSymbol.assertNoMembers();\n\n      if (this.summaryResolver.isLibraryFile(sourceSymbol.filePath) && this.summaryResolver.isLibraryFile(targetSymbol.filePath)) {\n        // This case is for an ng library importing symbols from a plain ts library\n        // transitively.\n        // Note: We rely on the fact that we discover symbols in the direction\n        // from source files to library files\n        this.importAs.set(targetSymbol, this.getImportAs(sourceSymbol) || sourceSymbol);\n      }\n\n      return new ResolvedStaticSymbol(sourceSymbol, targetSymbol);\n    }\n  }, {\n    key: \"reportError\",\n    value: function reportError(error, context, path) {\n      if (this.errorRecorder) {\n        this.errorRecorder(error, context && context.filePath || path);\n      } else {\n        throw error;\n      }\n    }\n    /**\n     * @param module an absolute path to a module file.\n     */\n\n  }, {\n    key: \"getModuleMetadata\",\n    value: function getModuleMetadata(module) {\n      var moduleMetadata = this.metadataCache.get(module);\n\n      if (!moduleMetadata) {\n        var moduleMetadatas = this.host.getMetadataFor(module);\n\n        if (moduleMetadatas) {\n          var maxVersion = -1;\n          moduleMetadatas.forEach(function (md) {\n            if (md && md['version'] > maxVersion) {\n              maxVersion = md['version'];\n              moduleMetadata = md;\n            }\n          });\n        }\n\n        if (!moduleMetadata) {\n          moduleMetadata = {\n            __symbolic: 'module',\n            version: SUPPORTED_SCHEMA_VERSION,\n            module: module,\n            metadata: {}\n          };\n        }\n\n        if (moduleMetadata['version'] != SUPPORTED_SCHEMA_VERSION) {\n          var errorMessage = moduleMetadata['version'] == 2 ? \"Unsupported metadata version \".concat(moduleMetadata['version'], \" for module \").concat(module, \". This module should be compiled with a newer version of ngc\") : \"Metadata version mismatch for module \".concat(this.host.getOutputName(module), \", found version \").concat(moduleMetadata['version'], \", expected \").concat(SUPPORTED_SCHEMA_VERSION);\n          this.reportError(new Error(errorMessage));\n        }\n\n        this.metadataCache.set(module, moduleMetadata);\n      }\n\n      return moduleMetadata;\n    }\n  }, {\n    key: \"getSymbolByModule\",\n    value: function getSymbolByModule(module, symbolName, containingFile) {\n      var filePath = this.resolveModule(module, containingFile);\n\n      if (!filePath) {\n        this.reportError(new Error(\"Could not resolve module \".concat(module).concat(containingFile ? ' relative to ' + this.host.getOutputName(containingFile) : '')));\n        return this.getStaticSymbol(\"ERROR:\".concat(module), symbolName);\n      }\n\n      return this.getStaticSymbol(filePath, symbolName);\n    }\n  }, {\n    key: \"resolveModule\",\n    value: function resolveModule(module, containingFile) {\n      try {\n        return this.host.moduleNameToFileName(module, containingFile);\n      } catch (e) {\n        console.error(\"Could not resolve module '\".concat(module, \"' relative to file \").concat(containingFile));\n        this.reportError(e, undefined, containingFile);\n      }\n\n      return null;\n    }\n  }]);\n\n  return StaticSymbolResolver;\n}(); // Remove extra underscore from escaped identifier.\n// See https://github.com/Microsoft/TypeScript/blob/master/src/compiler/utilities.ts\n\n\nfunction unescapeIdentifier(identifier) {\n  return identifier.startsWith('___') ? identifier.substr(1) : identifier;\n}\n\nfunction unwrapResolvedMetadata(metadata) {\n  if (metadata && metadata.__symbolic === 'resolved') {\n    return metadata.symbol;\n  }\n\n  return metadata;\n}\n/**\n * @license\n * Copyright Google LLC 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\nfunction serializeSummaries(srcFileName, forJitCtx, summaryResolver, symbolResolver, symbols, types) {\n  var createExternalSymbolReexports = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;\n  var toJsonSerializer = new ToJsonSerializer(symbolResolver, summaryResolver, srcFileName); // for symbols, we use everything except for the class metadata itself\n  // (we keep the statics though), as the class metadata is contained in the\n  // CompileTypeSummary.\n\n  symbols.forEach(function (resolvedSymbol) {\n    return toJsonSerializer.addSummary({\n      symbol: resolvedSymbol.symbol,\n      metadata: resolvedSymbol.metadata\n    });\n  }); // Add type summaries.\n\n  types.forEach(function (_ref42) {\n    var summary = _ref42.summary,\n        metadata = _ref42.metadata;\n    toJsonSerializer.addSummary({\n      symbol: summary.type.reference,\n      metadata: undefined,\n      type: summary\n    });\n  });\n\n  var _toJsonSerializer$ser = toJsonSerializer.serialize(createExternalSymbolReexports),\n      json = _toJsonSerializer$ser.json,\n      exportAs = _toJsonSerializer$ser.exportAs;\n\n  if (forJitCtx) {\n    var forJitSerializer = new ForJitSerializer(forJitCtx, symbolResolver, summaryResolver);\n    types.forEach(function (_ref43) {\n      var summary = _ref43.summary,\n          metadata = _ref43.metadata;\n      forJitSerializer.addSourceType(summary, metadata);\n    });\n    toJsonSerializer.unprocessedSymbolSummariesBySymbol.forEach(function (summary) {\n      if (summaryResolver.isLibraryFile(summary.symbol.filePath) && summary.type) {\n        forJitSerializer.addLibType(summary.type);\n      }\n    });\n    forJitSerializer.serialize(exportAs);\n  }\n\n  return {\n    json: json,\n    exportAs: exportAs\n  };\n}\n\nfunction deserializeSummaries(symbolCache, summaryResolver, libraryFileName, json) {\n  var deserializer = new FromJsonDeserializer(symbolCache, summaryResolver);\n  return deserializer.deserialize(libraryFileName, json);\n}\n\nfunction createForJitStub(outputCtx, reference) {\n  return createSummaryForJitFunction(outputCtx, reference, NULL_EXPR);\n}\n\nfunction createSummaryForJitFunction(outputCtx, reference, value) {\n  var fnName = summaryForJitName(reference.name);\n  outputCtx.statements.push(fn([], [new ReturnStatement(value)], new ArrayType(DYNAMIC_TYPE)).toDeclStmt(fnName, [StmtModifier.Final, StmtModifier.Exported]));\n}\n\nvar ToJsonSerializer = /*#__PURE__*/function (_ValueTransformer3) {\n  _inherits(ToJsonSerializer, _ValueTransformer3);\n\n  var _super109 = _createSuper(ToJsonSerializer);\n\n  function ToJsonSerializer(symbolResolver, summaryResolver, srcFileName) {\n    var _this261;\n\n    _classCallCheck(this, ToJsonSerializer);\n\n    _this261 = _super109.call(this);\n    _this261.symbolResolver = symbolResolver;\n    _this261.summaryResolver = summaryResolver;\n    _this261.srcFileName = srcFileName; // Note: This only contains symbols without members.\n\n    _this261.symbols = [];\n    _this261.indexBySymbol = new Map();\n    _this261.reexportedBy = new Map(); // This now contains a `__symbol: number` in the place of\n    // StaticSymbols, but otherwise has the same shape as the original objects.\n\n    _this261.processedSummaryBySymbol = new Map();\n    _this261.processedSummaries = [];\n    _this261.unprocessedSymbolSummariesBySymbol = new Map();\n    _this261.moduleName = symbolResolver.getKnownModuleName(srcFileName);\n    return _this261;\n  }\n\n  _createClass(ToJsonSerializer, [{\n    key: \"addSummary\",\n    value: function addSummary(summary) {\n      var _this262 = this;\n\n      var unprocessedSummary = this.unprocessedSymbolSummariesBySymbol.get(summary.symbol);\n      var processedSummary = this.processedSummaryBySymbol.get(summary.symbol);\n\n      if (!unprocessedSummary) {\n        unprocessedSummary = {\n          symbol: summary.symbol,\n          metadata: undefined\n        };\n        this.unprocessedSymbolSummariesBySymbol.set(summary.symbol, unprocessedSummary);\n        processedSummary = {\n          symbol: this.processValue(summary.symbol, 0\n          /* None */\n          )\n        };\n        this.processedSummaries.push(processedSummary);\n        this.processedSummaryBySymbol.set(summary.symbol, processedSummary);\n      }\n\n      if (!unprocessedSummary.metadata && summary.metadata) {\n        var metadata = summary.metadata || {};\n\n        if (metadata.__symbolic === 'class') {\n          // For classes, we keep everything except their class decorators.\n          // We need to keep e.g. the ctor args, method names, method decorators\n          // so that the class can be extended in another compilation unit.\n          // We don't keep the class decorators as\n          // 1) they refer to data\n          //   that should not cause a rebuild of downstream compilation units\n          //   (e.g. inline templates of @Component, or @NgModule.declarations)\n          // 2) their data is already captured in TypeSummaries, e.g. DirectiveSummary.\n          var clone = {};\n          Object.keys(metadata).forEach(function (propName) {\n            if (propName !== 'decorators') {\n              clone[propName] = metadata[propName];\n            }\n          });\n          metadata = clone;\n        } else if (isCall(metadata)) {\n          if (!isFunctionCall(metadata) && !isMethodCallOnVariable(metadata)) {\n            // Don't store complex calls as we won't be able to simplify them anyways later on.\n            metadata = {\n              __symbolic: 'error',\n              message: 'Complex function calls are not supported.'\n            };\n          }\n        } // Note: We need to keep storing ctor calls for e.g.\n        // `export const x = new InjectionToken(...)`\n\n\n        unprocessedSummary.metadata = metadata;\n        processedSummary.metadata = this.processValue(metadata, 1\n        /* ResolveValue */\n        );\n\n        if (metadata instanceof StaticSymbol && this.summaryResolver.isLibraryFile(metadata.filePath)) {\n          var declarationSymbol = this.symbols[this.indexBySymbol.get(metadata)];\n\n          if (!isLoweredSymbol(declarationSymbol.name)) {\n            // Note: symbols that were introduced during codegen in the user file can have a reexport\n            // if a user used `export *`. However, we can't rely on this as tsickle will change\n            // `export *` into named exports, using only the information from the typechecker.\n            // As we introduce the new symbols after typecheck, Tsickle does not know about them,\n            // and omits them when expanding `export *`.\n            // So we have to keep reexporting these symbols manually via .ngfactory files.\n            this.reexportedBy.set(declarationSymbol, summary.symbol);\n          }\n        }\n      }\n\n      if (!unprocessedSummary.type && summary.type) {\n        unprocessedSummary.type = summary.type; // Note: We don't add the summaries of all referenced symbols as for the ResolvedSymbols,\n        // as the type summaries already contain the transitive data that they require\n        // (in a minimal way).\n\n        processedSummary.type = this.processValue(summary.type, 0\n        /* None */\n        ); // except for reexported directives / pipes, so we need to store\n        // their summaries explicitly.\n\n        if (summary.type.summaryKind === CompileSummaryKind.NgModule) {\n          var ngModuleSummary = summary.type;\n          ngModuleSummary.exportedDirectives.concat(ngModuleSummary.exportedPipes).forEach(function (id) {\n            var symbol = id.reference;\n\n            if (_this262.summaryResolver.isLibraryFile(symbol.filePath) && !_this262.unprocessedSymbolSummariesBySymbol.has(symbol)) {\n              var _summary = _this262.summaryResolver.resolveSummary(symbol);\n\n              if (_summary) {\n                _this262.addSummary(_summary);\n              }\n            }\n          });\n        }\n      }\n    }\n    /**\n     * @param createExternalSymbolReexports Whether external static symbols should be re-exported.\n     * This can be enabled if external symbols should be re-exported by the current module in\n     * order to avoid dynamically generated module dependencies which can break strict dependency\n     * enforcements (as in Google3). Read more here: https://github.com/angular/angular/issues/25644\n     */\n\n  }, {\n    key: \"serialize\",\n    value: function serialize(createExternalSymbolReexports) {\n      var _this263 = this;\n\n      var exportAs = [];\n      var json = JSON.stringify({\n        moduleName: this.moduleName,\n        summaries: this.processedSummaries,\n        symbols: this.symbols.map(function (symbol, index) {\n          symbol.assertNoMembers();\n          var importAs = undefined;\n\n          if (_this263.summaryResolver.isLibraryFile(symbol.filePath)) {\n            var reexportSymbol = _this263.reexportedBy.get(symbol);\n\n            if (reexportSymbol) {\n              // In case the given external static symbol is already manually exported by the\n              // user, we just proxy the external static symbol reference to the manual export.\n              // This ensures that the AOT compiler imports the external symbol through the\n              // user export and does not introduce another dependency which is not needed.\n              importAs = _this263.indexBySymbol.get(reexportSymbol);\n            } else if (createExternalSymbolReexports) {\n              // In this case, the given external static symbol is *not* manually exported by\n              // the user, and we manually create a re-export in the factory file so that we\n              // don't introduce another module dependency. This is useful when running within\n              // Bazel so that the AOT compiler does not introduce any module dependencies\n              // which can break the strict dependency enforcement. (e.g. as in Google3)\n              // Read more about this here: https://github.com/angular/angular/issues/25644\n              var summary = _this263.unprocessedSymbolSummariesBySymbol.get(symbol);\n\n              if (!summary || !summary.metadata || summary.metadata.__symbolic !== 'interface') {\n                importAs = \"\".concat(symbol.name, \"_\").concat(index);\n                exportAs.push({\n                  symbol: symbol,\n                  exportAs: importAs\n                });\n              }\n            }\n          }\n\n          return {\n            __symbol: index,\n            name: symbol.name,\n            filePath: _this263.summaryResolver.toSummaryFileName(symbol.filePath, _this263.srcFileName),\n            importAs: importAs\n          };\n        })\n      });\n      return {\n        json: json,\n        exportAs: exportAs\n      };\n    }\n  }, {\n    key: \"processValue\",\n    value: function processValue(value, flags) {\n      return visitValue(value, this, flags);\n    }\n  }, {\n    key: \"visitOther\",\n    value: function visitOther(value, context) {\n      if (value instanceof StaticSymbol) {\n        var baseSymbol = this.symbolResolver.getStaticSymbol(value.filePath, value.name);\n        var index = this.visitStaticSymbol(baseSymbol, context);\n        return {\n          __symbol: index,\n          members: value.members\n        };\n      }\n    }\n    /**\n     * Strip line and character numbers from ngsummaries.\n     * Emitting them causes white spaces changes to retrigger upstream\n     * recompilations in bazel.\n     * TODO: find out a way to have line and character numbers in errors without\n     * excessive recompilation in bazel.\n     */\n\n  }, {\n    key: \"visitStringMap\",\n    value: function visitStringMap(map, context) {\n      if (map['__symbolic'] === 'resolved') {\n        return visitValue(map['symbol'], this, context);\n      }\n\n      if (map['__symbolic'] === 'error') {\n        delete map['line'];\n        delete map['character'];\n      }\n\n      return _get(_getPrototypeOf(ToJsonSerializer.prototype), \"visitStringMap\", this).call(this, map, context);\n    }\n    /**\n     * Returns null if the options.resolveValue is true, and the summary for the symbol\n     * resolved to a type or could not be resolved.\n     */\n\n  }, {\n    key: \"visitStaticSymbol\",\n    value: function visitStaticSymbol(baseSymbol, flags) {\n      var index = this.indexBySymbol.get(baseSymbol);\n      var summary = null;\n\n      if (flags & 1\n      /* ResolveValue */\n      && this.summaryResolver.isLibraryFile(baseSymbol.filePath)) {\n        if (this.unprocessedSymbolSummariesBySymbol.has(baseSymbol)) {\n          // the summary for this symbol was already added\n          // -> nothing to do.\n          return index;\n        }\n\n        summary = this.loadSummary(baseSymbol);\n\n        if (summary && summary.metadata instanceof StaticSymbol) {\n          // The summary is a reexport\n          index = this.visitStaticSymbol(summary.metadata, flags); // reset the summary as it is just a reexport, so we don't want to store it.\n\n          summary = null;\n        }\n      } else if (index != null) {\n        // Note: == on purpose to compare with undefined!\n        // No summary and the symbol is already added -> nothing to do.\n        return index;\n      } // Note: == on purpose to compare with undefined!\n\n\n      if (index == null) {\n        index = this.symbols.length;\n        this.symbols.push(baseSymbol);\n      }\n\n      this.indexBySymbol.set(baseSymbol, index);\n\n      if (summary) {\n        this.addSummary(summary);\n      }\n\n      return index;\n    }\n  }, {\n    key: \"loadSummary\",\n    value: function loadSummary(symbol) {\n      var summary = this.summaryResolver.resolveSummary(symbol);\n\n      if (!summary) {\n        // some symbols might originate from a plain typescript library\n        // that just exported .d.ts and .metadata.json files, i.e. where no summary\n        // files were created.\n        var resolvedSymbol = this.symbolResolver.resolveSymbol(symbol);\n\n        if (resolvedSymbol) {\n          summary = {\n            symbol: resolvedSymbol.symbol,\n            metadata: resolvedSymbol.metadata\n          };\n        }\n      }\n\n      return summary;\n    }\n  }]);\n\n  return ToJsonSerializer;\n}(ValueTransformer);\n\nvar ForJitSerializer = /*#__PURE__*/function () {\n  function ForJitSerializer(outputCtx, symbolResolver, summaryResolver) {\n    _classCallCheck(this, ForJitSerializer);\n\n    this.outputCtx = outputCtx;\n    this.symbolResolver = symbolResolver;\n    this.summaryResolver = summaryResolver;\n    this.data = [];\n  }\n\n  _createClass(ForJitSerializer, [{\n    key: \"addSourceType\",\n    value: function addSourceType(summary, metadata) {\n      this.data.push({\n        summary: summary,\n        metadata: metadata,\n        isLibrary: false\n      });\n    }\n  }, {\n    key: \"addLibType\",\n    value: function addLibType(summary) {\n      this.data.push({\n        summary: summary,\n        metadata: null,\n        isLibrary: true\n      });\n    }\n  }, {\n    key: \"serialize\",\n    value: function serialize(exportAsArr) {\n      var _this264 = this;\n\n      var exportAsBySymbol = new Map();\n\n      var _iterator32 = _createForOfIteratorHelper(exportAsArr),\n          _step32;\n\n      try {\n        for (_iterator32.s(); !(_step32 = _iterator32.n()).done;) {\n          var _step32$value = _step32.value,\n              symbol = _step32$value.symbol,\n              exportAs = _step32$value.exportAs;\n          exportAsBySymbol.set(symbol, exportAs);\n        }\n      } catch (err) {\n        _iterator32.e(err);\n      } finally {\n        _iterator32.f();\n      }\n\n      var ngModuleSymbols = new Set();\n\n      var _iterator33 = _createForOfIteratorHelper(this.data),\n          _step33;\n\n      try {\n        for (_iterator33.s(); !(_step33 = _iterator33.n()).done;) {\n          var _step33$value = _step33.value,\n              summary = _step33$value.summary,\n              metadata = _step33$value.metadata,\n              isLibrary = _step33$value.isLibrary;\n\n          if (summary.summaryKind === CompileSummaryKind.NgModule) {\n            // collect the symbols that refer to NgModule classes.\n            // Note: we can't just rely on `summary.type.summaryKind` to determine this as\n            // we don't add the summaries of all referenced symbols when we serialize type summaries.\n            // See serializeSummaries for details.\n            ngModuleSymbols.add(summary.type.reference);\n            var modSummary = summary;\n\n            var _iterator34 = _createForOfIteratorHelper(modSummary.modules),\n                _step34;\n\n            try {\n              for (_iterator34.s(); !(_step34 = _iterator34.n()).done;) {\n                var mod = _step34.value;\n                ngModuleSymbols.add(mod.reference);\n              }\n            } catch (err) {\n              _iterator34.e(err);\n            } finally {\n              _iterator34.f();\n            }\n          }\n\n          if (!isLibrary) {\n            var fnName = summaryForJitName(summary.type.reference.name);\n            createSummaryForJitFunction(this.outputCtx, summary.type.reference, this.serializeSummaryWithDeps(summary, metadata));\n          }\n        }\n      } catch (err) {\n        _iterator33.e(err);\n      } finally {\n        _iterator33.f();\n      }\n\n      ngModuleSymbols.forEach(function (ngModuleSymbol) {\n        if (_this264.summaryResolver.isLibraryFile(ngModuleSymbol.filePath)) {\n          var exportAs = exportAsBySymbol.get(ngModuleSymbol) || ngModuleSymbol.name;\n          var jitExportAsName = summaryForJitName(exportAs);\n\n          _this264.outputCtx.statements.push(variable(jitExportAsName).set(_this264.serializeSummaryRef(ngModuleSymbol)).toDeclStmt(null, [StmtModifier.Exported]));\n        }\n      });\n    }\n  }, {\n    key: \"serializeSummaryWithDeps\",\n    value: function serializeSummaryWithDeps(summary, metadata) {\n      var _this265 = this;\n\n      var expressions = [this.serializeSummary(summary)];\n      var providers = [];\n\n      if (metadata instanceof CompileNgModuleMetadata) {\n        expressions.push.apply(expressions, _toConsumableArray( // For directives / pipes, we only add the declared ones,\n        // and rely on transitively importing NgModules to get the transitive\n        // summaries.\n        metadata.declaredDirectives.concat(metadata.declaredPipes).map(function (type) {\n          return type.reference;\n        }) // For modules,\n        // we also add the summaries for modules\n        // from libraries.\n        // This is ok as we produce reexports for all transitive modules.\n        .concat(metadata.transitiveModule.modules.map(function (type) {\n          return type.reference;\n        }).filter(function (ref) {\n          return ref !== metadata.type.reference;\n        })).map(function (ref) {\n          return _this265.serializeSummaryRef(ref);\n        }))); // Note: We don't use `NgModuleSummary.providers`, as that one is transitive,\n        // and we already have transitive modules.\n\n        providers = metadata.providers;\n      } else if (summary.summaryKind === CompileSummaryKind.Directive) {\n        var dirSummary = summary;\n        providers = dirSummary.providers.concat(dirSummary.viewProviders);\n      } // Note: We can't just refer to the `ngsummary.ts` files for `useClass` providers (as we do for\n      // declaredDirectives / declaredPipes), as we allow\n      // providers without ctor arguments to skip the `@Injectable` decorator,\n      // i.e. we didn't generate .ngsummary.ts files for these.\n\n\n      expressions.push.apply(expressions, _toConsumableArray(providers.filter(function (provider) {\n        return !!provider.useClass;\n      }).map(function (provider) {\n        return _this265.serializeSummary({\n          summaryKind: CompileSummaryKind.Injectable,\n          type: provider.useClass\n        });\n      })));\n      return literalArr(expressions);\n    }\n  }, {\n    key: \"serializeSummaryRef\",\n    value: function serializeSummaryRef(typeSymbol) {\n      var jitImportedSymbol = this.symbolResolver.getStaticSymbol(summaryForJitFileName(typeSymbol.filePath), summaryForJitName(typeSymbol.name));\n      return this.outputCtx.importExpr(jitImportedSymbol);\n    }\n  }, {\n    key: \"serializeSummary\",\n    value: function serializeSummary(data) {\n      var outputCtx = this.outputCtx;\n\n      var Transformer = /*#__PURE__*/function () {\n        function Transformer() {\n          _classCallCheck(this, Transformer);\n        }\n\n        _createClass(Transformer, [{\n          key: \"visitArray\",\n          value: function visitArray(arr, context) {\n            var _this266 = this;\n\n            return literalArr(arr.map(function (entry) {\n              return visitValue(entry, _this266, context);\n            }));\n          }\n        }, {\n          key: \"visitStringMap\",\n          value: function visitStringMap(map, context) {\n            var _this267 = this;\n\n            return new LiteralMapExpr(Object.keys(map).map(function (key) {\n              return new LiteralMapEntry(key, visitValue(map[key], _this267, context), false);\n            }));\n          }\n        }, {\n          key: \"visitPrimitive\",\n          value: function visitPrimitive(value, context) {\n            return literal(value);\n          }\n        }, {\n          key: \"visitOther\",\n          value: function visitOther(value, context) {\n            if (value instanceof StaticSymbol) {\n              return outputCtx.importExpr(value);\n            } else {\n              throw new Error(\"Illegal State: Encountered value \".concat(value));\n            }\n          }\n        }]);\n\n        return Transformer;\n      }();\n\n      return visitValue(data, new Transformer(), null);\n    }\n  }]);\n\n  return ForJitSerializer;\n}();\n\nvar FromJsonDeserializer = /*#__PURE__*/function (_ValueTransformer4) {\n  _inherits(FromJsonDeserializer, _ValueTransformer4);\n\n  var _super110 = _createSuper(FromJsonDeserializer);\n\n  function FromJsonDeserializer(symbolCache, summaryResolver) {\n    var _this268;\n\n    _classCallCheck(this, FromJsonDeserializer);\n\n    _this268 = _super110.call(this);\n    _this268.symbolCache = symbolCache;\n    _this268.summaryResolver = summaryResolver;\n    return _this268;\n  }\n\n  _createClass(FromJsonDeserializer, [{\n    key: \"deserialize\",\n    value: function deserialize(libraryFileName, json) {\n      var _this269 = this;\n\n      var data = JSON.parse(json);\n      var allImportAs = [];\n      this.symbols = data.symbols.map(function (serializedSymbol) {\n        return _this269.symbolCache.get(_this269.summaryResolver.fromSummaryFileName(serializedSymbol.filePath, libraryFileName), serializedSymbol.name);\n      });\n      data.symbols.forEach(function (serializedSymbol, index) {\n        var symbol = _this269.symbols[index];\n        var importAs = serializedSymbol.importAs;\n\n        if (typeof importAs === 'number') {\n          allImportAs.push({\n            symbol: symbol,\n            importAs: _this269.symbols[importAs]\n          });\n        } else if (typeof importAs === 'string') {\n          allImportAs.push({\n            symbol: symbol,\n            importAs: _this269.symbolCache.get(ngfactoryFilePath(libraryFileName), importAs)\n          });\n        }\n      });\n      var summaries = visitValue(data.summaries, this, null);\n      return {\n        moduleName: data.moduleName,\n        summaries: summaries,\n        importAs: allImportAs\n      };\n    }\n  }, {\n    key: \"visitStringMap\",\n    value: function visitStringMap(map, context) {\n      if ('__symbol' in map) {\n        var baseSymbol = this.symbols[map['__symbol']];\n        var members = map['members'];\n        return members.length ? this.symbolCache.get(baseSymbol.filePath, baseSymbol.name, members) : baseSymbol;\n      } else {\n        return _get(_getPrototypeOf(FromJsonDeserializer.prototype), \"visitStringMap\", this).call(this, map, context);\n      }\n    }\n  }]);\n\n  return FromJsonDeserializer;\n}(ValueTransformer);\n\nfunction isCall(metadata) {\n  return metadata && metadata.__symbolic === 'call';\n}\n\nfunction isFunctionCall(metadata) {\n  return isCall(metadata) && unwrapResolvedMetadata(metadata.expression) instanceof StaticSymbol;\n}\n\nfunction isMethodCallOnVariable(metadata) {\n  return isCall(metadata) && metadata.expression && metadata.expression.__symbolic === 'select' && unwrapResolvedMetadata(metadata.expression.expression) instanceof StaticSymbol;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar AotCompiler = /*#__PURE__*/function () {\n  function AotCompiler(_config, _options, _host, reflector, _metadataResolver, _templateParser, _styleCompiler, _viewCompiler, _typeCheckCompiler, _ngModuleCompiler, _injectableCompiler, _outputEmitter, _summaryResolver, _symbolResolver) {\n    _classCallCheck(this, AotCompiler);\n\n    this._config = _config;\n    this._options = _options;\n    this._host = _host;\n    this.reflector = reflector;\n    this._metadataResolver = _metadataResolver;\n    this._templateParser = _templateParser;\n    this._styleCompiler = _styleCompiler;\n    this._viewCompiler = _viewCompiler;\n    this._typeCheckCompiler = _typeCheckCompiler;\n    this._ngModuleCompiler = _ngModuleCompiler;\n    this._injectableCompiler = _injectableCompiler;\n    this._outputEmitter = _outputEmitter;\n    this._summaryResolver = _summaryResolver;\n    this._symbolResolver = _symbolResolver;\n    this._templateAstCache = new Map();\n    this._analyzedFiles = new Map();\n    this._analyzedFilesForInjectables = new Map();\n  }\n\n  _createClass(AotCompiler, [{\n    key: \"clearCache\",\n    value: function clearCache() {\n      this._metadataResolver.clearCache();\n    }\n  }, {\n    key: \"analyzeModulesSync\",\n    value: function analyzeModulesSync(rootFiles) {\n      var _this270 = this;\n\n      var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);\n      analyzeResult.ngModules.forEach(function (ngModule) {\n        return _this270._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true);\n      });\n      return analyzeResult;\n    }\n  }, {\n    key: \"analyzeModulesAsync\",\n    value: function analyzeModulesAsync(rootFiles) {\n      var _this271 = this;\n\n      var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);\n      return Promise.all(analyzeResult.ngModules.map(function (ngModule) {\n        return _this271._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false);\n      })).then(function () {\n        return analyzeResult;\n      });\n    }\n  }, {\n    key: \"_analyzeFile\",\n    value: function _analyzeFile(fileName) {\n      var analyzedFile = this._analyzedFiles.get(fileName);\n\n      if (!analyzedFile) {\n        analyzedFile = analyzeFile(this._host, this._symbolResolver, this._metadataResolver, fileName);\n\n        this._analyzedFiles.set(fileName, analyzedFile);\n      }\n\n      return analyzedFile;\n    }\n  }, {\n    key: \"_analyzeFileForInjectables\",\n    value: function _analyzeFileForInjectables(fileName) {\n      var analyzedFile = this._analyzedFilesForInjectables.get(fileName);\n\n      if (!analyzedFile) {\n        analyzedFile = analyzeFileForInjectables(this._host, this._symbolResolver, this._metadataResolver, fileName);\n\n        this._analyzedFilesForInjectables.set(fileName, analyzedFile);\n      }\n\n      return analyzedFile;\n    }\n  }, {\n    key: \"findGeneratedFileNames\",\n    value: function findGeneratedFileNames(fileName) {\n      var _this272 = this;\n\n      var genFileNames = [];\n\n      var file = this._analyzeFile(fileName); // Make sure we create a .ngfactory if we have a injectable/directive/pipe/NgModule\n      // or a reference to a non source file.\n      // Note: This is overestimating the required .ngfactory files as the real calculation is harder.\n      // Only do this for StubEmitFlags.Basic, as adding a type check block\n      // does not change this file (as we generate type check blocks based on NgModules).\n\n\n      if (this._options.allowEmptyCodegenFiles || file.directives.length || file.pipes.length || file.injectables.length || file.ngModules.length || file.exportsNonSourceFiles) {\n        genFileNames.push(ngfactoryFilePath(file.fileName, true));\n\n        if (this._options.enableSummariesForJit) {\n          genFileNames.push(summaryForJitFileName(file.fileName, true));\n        }\n      }\n\n      var fileSuffix = normalizeGenFileSuffix(splitTypescriptSuffix(file.fileName, true)[1]);\n      file.directives.forEach(function (dirSymbol) {\n        var compMeta = _this272._metadataResolver.getNonNormalizedDirectiveMetadata(dirSymbol).metadata;\n\n        if (!compMeta.isComponent) {\n          return;\n        } // Note: compMeta is a component and therefore template is non null.\n\n\n        compMeta.template.styleUrls.forEach(function (styleUrl) {\n          var normalizedUrl = _this272._host.resourceNameToFileName(styleUrl, file.fileName);\n\n          if (!normalizedUrl) {\n            throw syntaxError(\"Couldn't resolve resource \".concat(styleUrl, \" relative to \").concat(file.fileName));\n          }\n\n          var needsShim = (compMeta.template.encapsulation || _this272._config.defaultEncapsulation) === ViewEncapsulation.Emulated;\n          genFileNames.push(_stylesModuleUrl(normalizedUrl, needsShim, fileSuffix));\n\n          if (_this272._options.allowEmptyCodegenFiles) {\n            genFileNames.push(_stylesModuleUrl(normalizedUrl, !needsShim, fileSuffix));\n          }\n        });\n      });\n      return genFileNames;\n    }\n  }, {\n    key: \"emitBasicStub\",\n    value: function emitBasicStub(genFileName, originalFileName) {\n      var outputCtx = this._createOutputContext(genFileName);\n\n      if (genFileName.endsWith('.ngfactory.ts')) {\n        if (!originalFileName) {\n          throw new Error(\"Assertion error: require the original file for .ngfactory.ts stubs. File: \".concat(genFileName));\n        }\n\n        var originalFile = this._analyzeFile(originalFileName);\n\n        this._createNgFactoryStub(outputCtx, originalFile, 1\n        /* Basic */\n        );\n      } else if (genFileName.endsWith('.ngsummary.ts')) {\n        if (this._options.enableSummariesForJit) {\n          if (!originalFileName) {\n            throw new Error(\"Assertion error: require the original file for .ngsummary.ts stubs. File: \".concat(genFileName));\n          }\n\n          var _originalFile = this._analyzeFile(originalFileName);\n\n          _createEmptyStub(outputCtx);\n\n          _originalFile.ngModules.forEach(function (ngModule) {\n            // create exports that user code can reference\n            createForJitStub(outputCtx, ngModule.type.reference);\n          });\n        }\n      } else if (genFileName.endsWith('.ngstyle.ts')) {\n        _createEmptyStub(outputCtx);\n      } // Note: for the stubs, we don't need a property srcFileUrl,\n      // as later on in emitAllImpls we will create the proper GeneratedFiles with the\n      // correct srcFileUrl.\n      // This is good as e.g. for .ngstyle.ts files we can't derive\n      // the url of components based on the genFileUrl.\n\n\n      return this._codegenSourceModule('unknown', outputCtx);\n    }\n  }, {\n    key: \"emitTypeCheckStub\",\n    value: function emitTypeCheckStub(genFileName, originalFileName) {\n      var originalFile = this._analyzeFile(originalFileName);\n\n      var outputCtx = this._createOutputContext(genFileName);\n\n      if (genFileName.endsWith('.ngfactory.ts')) {\n        this._createNgFactoryStub(outputCtx, originalFile, 2\n        /* TypeCheck */\n        );\n      }\n\n      return outputCtx.statements.length > 0 ? this._codegenSourceModule(originalFile.fileName, outputCtx) : null;\n    }\n  }, {\n    key: \"loadFilesAsync\",\n    value: function loadFilesAsync(fileNames, tsFiles) {\n      var _this273 = this;\n\n      var files = fileNames.map(function (fileName) {\n        return _this273._analyzeFile(fileName);\n      });\n      var loadingPromises = [];\n      files.forEach(function (file) {\n        return file.ngModules.forEach(function (ngModule) {\n          return loadingPromises.push(_this273._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false));\n        });\n      });\n      var analyzedInjectables = tsFiles.map(function (tsFile) {\n        return _this273._analyzeFileForInjectables(tsFile);\n      });\n      return Promise.all(loadingPromises).then(function (_) {\n        return {\n          analyzedModules: mergeAndValidateNgFiles(files),\n          analyzedInjectables: analyzedInjectables\n        };\n      });\n    }\n  }, {\n    key: \"loadFilesSync\",\n    value: function loadFilesSync(fileNames, tsFiles) {\n      var _this274 = this;\n\n      var files = fileNames.map(function (fileName) {\n        return _this274._analyzeFile(fileName);\n      });\n      files.forEach(function (file) {\n        return file.ngModules.forEach(function (ngModule) {\n          return _this274._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true);\n        });\n      });\n      var analyzedInjectables = tsFiles.map(function (tsFile) {\n        return _this274._analyzeFileForInjectables(tsFile);\n      });\n      return {\n        analyzedModules: mergeAndValidateNgFiles(files),\n        analyzedInjectables: analyzedInjectables\n      };\n    }\n  }, {\n    key: \"_createNgFactoryStub\",\n    value: function _createNgFactoryStub(outputCtx, file, emitFlags) {\n      var _this275 = this;\n\n      var componentId = 0;\n      file.ngModules.forEach(function (ngModuleMeta, ngModuleIndex) {\n        // Note: the code below needs to executed for StubEmitFlags.Basic and StubEmitFlags.TypeCheck,\n        // so we don't change the .ngfactory file too much when adding the type-check block.\n        // create exports that user code can reference\n        _this275._ngModuleCompiler.createStub(outputCtx, ngModuleMeta.type.reference); // add references to the symbols from the metadata.\n        // These can be used by the type check block for components,\n        // and they also cause TypeScript to include these files into the program too,\n        // which will make them part of the analyzedFiles.\n\n\n        var externalReferences = [].concat(_toConsumableArray(ngModuleMeta.transitiveModule.directives.map(function (d) {\n          return d.reference;\n        })), _toConsumableArray(ngModuleMeta.transitiveModule.pipes.map(function (d) {\n          return d.reference;\n        })), _toConsumableArray(ngModuleMeta.importedModules.map(function (m) {\n          return m.type.reference;\n        })), _toConsumableArray(ngModuleMeta.exportedModules.map(function (m) {\n          return m.type.reference;\n        })), _toConsumableArray(_this275._externalIdentifierReferences([Identifiers$1.TemplateRef, Identifiers$1.ElementRef])));\n        var externalReferenceVars = new Map();\n        externalReferences.forEach(function (ref, typeIndex) {\n          externalReferenceVars.set(ref, \"_decl\".concat(ngModuleIndex, \"_\").concat(typeIndex));\n        });\n        externalReferenceVars.forEach(function (varName, reference) {\n          outputCtx.statements.push(variable(varName).set(NULL_EXPR.cast(DYNAMIC_TYPE)).toDeclStmt(expressionType(outputCtx.importExpr(reference,\n          /* typeParams */\n          null,\n          /* useSummaries */\n          false))));\n        });\n\n        if (emitFlags & 2\n        /* TypeCheck */\n        ) {\n          // add the type-check block for all components of the NgModule\n          ngModuleMeta.declaredDirectives.forEach(function (dirId) {\n            var compMeta = _this275._metadataResolver.getDirectiveMetadata(dirId.reference);\n\n            if (!compMeta.isComponent) {\n              return;\n            }\n\n            componentId++;\n\n            _this275._createTypeCheckBlock(outputCtx, \"\".concat(compMeta.type.reference.name, \"_Host_\").concat(componentId), ngModuleMeta, _this275._metadataResolver.getHostComponentMetadata(compMeta), [compMeta.type], externalReferenceVars);\n\n            _this275._createTypeCheckBlock(outputCtx, \"\".concat(compMeta.type.reference.name, \"_\").concat(componentId), ngModuleMeta, compMeta, ngModuleMeta.transitiveModule.directives, externalReferenceVars);\n          });\n        }\n      });\n\n      if (outputCtx.statements.length === 0) {\n        _createEmptyStub(outputCtx);\n      }\n    }\n  }, {\n    key: \"_externalIdentifierReferences\",\n    value: function _externalIdentifierReferences(references) {\n      var result = [];\n\n      var _iterator35 = _createForOfIteratorHelper(references),\n          _step35;\n\n      try {\n        for (_iterator35.s(); !(_step35 = _iterator35.n()).done;) {\n          var reference = _step35.value;\n          var token = createTokenForExternalReference(this.reflector, reference);\n\n          if (token.identifier) {\n            result.push(token.identifier.reference);\n          }\n        }\n      } catch (err) {\n        _iterator35.e(err);\n      } finally {\n        _iterator35.f();\n      }\n\n      return result;\n    }\n  }, {\n    key: \"_createTypeCheckBlock\",\n    value: function _createTypeCheckBlock(ctx, componentId, moduleMeta, compMeta, directives, externalReferenceVars) {\n      var _ctx$statements;\n\n      var _this$_parseTemplate = this._parseTemplate(compMeta, moduleMeta, directives),\n          parsedTemplate = _this$_parseTemplate.template,\n          usedPipes = _this$_parseTemplate.pipes;\n\n      (_ctx$statements = ctx.statements).push.apply(_ctx$statements, _toConsumableArray(this._typeCheckCompiler.compileComponent(componentId, compMeta, parsedTemplate, usedPipes, externalReferenceVars, ctx)));\n    }\n  }, {\n    key: \"emitMessageBundle\",\n    value: function emitMessageBundle(analyzeResult, locale) {\n      var _this276 = this;\n\n      var errors = [];\n      var htmlParser = new HtmlParser(); // TODO(vicb): implicit tags & attributes\n\n      var messageBundle = new MessageBundle(htmlParser, [], {}, locale);\n      analyzeResult.files.forEach(function (file) {\n        var compMetas = [];\n        file.directives.forEach(function (directiveType) {\n          var dirMeta = _this276._metadataResolver.getDirectiveMetadata(directiveType);\n\n          if (dirMeta && dirMeta.isComponent) {\n            compMetas.push(dirMeta);\n          }\n        });\n        compMetas.forEach(function (compMeta) {\n          var html = compMeta.template.template; // Template URL points to either an HTML or TS file depending on whether\n          // the file is used with `templateUrl:` or `template:`, respectively.\n\n          var templateUrl = compMeta.template.templateUrl;\n          var interpolationConfig = InterpolationConfig.fromArray(compMeta.template.interpolation);\n          errors.push.apply(errors, _toConsumableArray(messageBundle.updateFromTemplate(html, templateUrl, interpolationConfig)));\n        });\n      });\n\n      if (errors.length) {\n        throw new Error(errors.map(function (e) {\n          return e.toString();\n        }).join('\\n'));\n      }\n\n      return messageBundle;\n    }\n  }, {\n    key: \"emitAllPartialModules2\",\n    value: function emitAllPartialModules2(files) {\n      var _this277 = this;\n\n      // Using reduce like this is a select many pattern (where map is a select pattern)\n      return files.reduce(function (r, file) {\n        r.push.apply(r, _toConsumableArray(_this277._emitPartialModule2(file.fileName, file.injectables)));\n        return r;\n      }, []);\n    }\n  }, {\n    key: \"_emitPartialModule2\",\n    value: function _emitPartialModule2(fileName, injectables) {\n      var _this278 = this;\n\n      var context = this._createOutputContext(fileName);\n\n      injectables.forEach(function (injectable) {\n        return _this278._injectableCompiler.compile(injectable, context);\n      });\n\n      if (context.statements && context.statements.length > 0) {\n        return [{\n          fileName: fileName,\n          statements: [].concat(_toConsumableArray(context.constantPool.statements), _toConsumableArray(context.statements))\n        }];\n      }\n\n      return [];\n    }\n  }, {\n    key: \"emitAllImpls\",\n    value: function emitAllImpls(analyzeResult) {\n      var _this279 = this;\n\n      var ngModuleByPipeOrDirective = analyzeResult.ngModuleByPipeOrDirective,\n          files = analyzeResult.files;\n      var sourceModules = files.map(function (file) {\n        return _this279._compileImplFile(file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules, file.injectables);\n      });\n      return flatten(sourceModules);\n    }\n  }, {\n    key: \"_compileImplFile\",\n    value: function _compileImplFile(srcFileUrl, ngModuleByPipeOrDirective, directives, pipes, ngModules, injectables) {\n      var _this280 = this;\n\n      var fileSuffix = normalizeGenFileSuffix(splitTypescriptSuffix(srcFileUrl, true)[1]);\n      var generatedFiles = [];\n\n      var outputCtx = this._createOutputContext(ngfactoryFilePath(srcFileUrl, true));\n\n      generatedFiles.push.apply(generatedFiles, _toConsumableArray(this._createSummary(srcFileUrl, directives, pipes, ngModules, injectables, outputCtx))); // compile all ng modules\n\n      ngModules.forEach(function (ngModuleMeta) {\n        return _this280._compileModule(outputCtx, ngModuleMeta);\n      }); // compile components\n\n      directives.forEach(function (dirType) {\n        var compMeta = _this280._metadataResolver.getDirectiveMetadata(dirType);\n\n        if (!compMeta.isComponent) {\n          return;\n        }\n\n        var ngModule = ngModuleByPipeOrDirective.get(dirType);\n\n        if (!ngModule) {\n          throw new Error(\"Internal Error: cannot determine the module for component \".concat(identifierName(compMeta.type), \"!\"));\n        } // compile styles\n\n\n        var componentStylesheet = _this280._styleCompiler.compileComponent(outputCtx, compMeta); // Note: compMeta is a component and therefore template is non null.\n\n\n        compMeta.template.externalStylesheets.forEach(function (stylesheetMeta) {\n          // Note: fill non shim and shim style files as they might\n          // be shared by component with and without ViewEncapsulation.\n          var shim = _this280._styleCompiler.needsStyleShim(compMeta);\n\n          generatedFiles.push(_this280._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, shim, fileSuffix));\n\n          if (_this280._options.allowEmptyCodegenFiles) {\n            generatedFiles.push(_this280._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, !shim, fileSuffix));\n          }\n        }); // compile components\n\n        var compViewVars = _this280._compileComponent(outputCtx, compMeta, ngModule, ngModule.transitiveModule.directives, componentStylesheet, fileSuffix);\n\n        _this280._compileComponentFactory(outputCtx, compMeta, ngModule, fileSuffix);\n      });\n\n      if (outputCtx.statements.length > 0 || this._options.allowEmptyCodegenFiles) {\n        var srcModule = this._codegenSourceModule(srcFileUrl, outputCtx);\n\n        generatedFiles.unshift(srcModule);\n      }\n\n      return generatedFiles;\n    }\n  }, {\n    key: \"_createSummary\",\n    value: function _createSummary(srcFileName, directives, pipes, ngModules, injectables, ngFactoryCtx) {\n      var _this281 = this;\n\n      var symbolSummaries = this._symbolResolver.getSymbolsOf(srcFileName).map(function (symbol) {\n        return _this281._symbolResolver.resolveSymbol(symbol);\n      });\n\n      var typeData = [].concat(_toConsumableArray(ngModules.map(function (meta) {\n        return {\n          summary: _this281._metadataResolver.getNgModuleSummary(meta.type.reference),\n          metadata: _this281._metadataResolver.getNgModuleMetadata(meta.type.reference)\n        };\n      })), _toConsumableArray(directives.map(function (ref) {\n        return {\n          summary: _this281._metadataResolver.getDirectiveSummary(ref),\n          metadata: _this281._metadataResolver.getDirectiveMetadata(ref)\n        };\n      })), _toConsumableArray(pipes.map(function (ref) {\n        return {\n          summary: _this281._metadataResolver.getPipeSummary(ref),\n          metadata: _this281._metadataResolver.getPipeMetadata(ref)\n        };\n      })), _toConsumableArray(injectables.map(function (ref) {\n        return {\n          summary: _this281._metadataResolver.getInjectableSummary(ref.symbol),\n          metadata: _this281._metadataResolver.getInjectableSummary(ref.symbol).type\n        };\n      })));\n      var forJitOutputCtx = this._options.enableSummariesForJit ? this._createOutputContext(summaryForJitFileName(srcFileName, true)) : null;\n\n      var _serializeSummaries = serializeSummaries(srcFileName, forJitOutputCtx, this._summaryResolver, this._symbolResolver, symbolSummaries, typeData, this._options.createExternalSymbolFactoryReexports),\n          json = _serializeSummaries.json,\n          exportAs = _serializeSummaries.exportAs;\n\n      exportAs.forEach(function (entry) {\n        ngFactoryCtx.statements.push(variable(entry.exportAs).set(ngFactoryCtx.importExpr(entry.symbol)).toDeclStmt(null, [StmtModifier.Exported]));\n      });\n      var summaryJson = new GeneratedFile(srcFileName, summaryFileName(srcFileName), json);\n      var result = [summaryJson];\n\n      if (forJitOutputCtx) {\n        result.push(this._codegenSourceModule(srcFileName, forJitOutputCtx));\n      }\n\n      return result;\n    }\n  }, {\n    key: \"_compileModule\",\n    value: function _compileModule(outputCtx, ngModule) {\n      var providers = [];\n\n      if (this._options.locale) {\n        var normalizedLocale = this._options.locale.replace(/_/g, '-');\n\n        providers.push({\n          token: createTokenForExternalReference(this.reflector, Identifiers$1.LOCALE_ID),\n          useValue: normalizedLocale\n        });\n      }\n\n      if (this._options.i18nFormat) {\n        providers.push({\n          token: createTokenForExternalReference(this.reflector, Identifiers$1.TRANSLATIONS_FORMAT),\n          useValue: this._options.i18nFormat\n        });\n      }\n\n      this._ngModuleCompiler.compile(outputCtx, ngModule, providers);\n    }\n  }, {\n    key: \"_compileComponentFactory\",\n    value: function _compileComponentFactory(outputCtx, compMeta, ngModule, fileSuffix) {\n      var hostMeta = this._metadataResolver.getHostComponentMetadata(compMeta);\n\n      var hostViewFactoryVar = this._compileComponent(outputCtx, hostMeta, ngModule, [compMeta.type], null, fileSuffix).viewClassVar;\n\n      var compFactoryVar = componentFactoryName(compMeta.type.reference);\n      var inputsExprs = [];\n\n      for (var propName in compMeta.inputs) {\n        var templateName = compMeta.inputs[propName]; // Don't quote so that the key gets minified...\n\n        inputsExprs.push(new LiteralMapEntry(propName, literal(templateName), false));\n      }\n\n      var outputsExprs = [];\n\n      for (var _propName in compMeta.outputs) {\n        var _templateName = compMeta.outputs[_propName]; // Don't quote so that the key gets minified...\n\n        outputsExprs.push(new LiteralMapEntry(_propName, literal(_templateName), false));\n      }\n\n      outputCtx.statements.push(variable(compFactoryVar).set(importExpr(Identifiers$1.createComponentFactory).callFn([literal(compMeta.selector), outputCtx.importExpr(compMeta.type.reference), variable(hostViewFactoryVar), new LiteralMapExpr(inputsExprs), new LiteralMapExpr(outputsExprs), literalArr(compMeta.template.ngContentSelectors.map(function (selector) {\n        return literal(selector);\n      }))])).toDeclStmt(importType(Identifiers$1.ComponentFactory, [expressionType(outputCtx.importExpr(compMeta.type.reference))], [TypeModifier.Const]), [StmtModifier.Final, StmtModifier.Exported]));\n    }\n  }, {\n    key: \"_compileComponent\",\n    value: function _compileComponent(outputCtx, compMeta, ngModule, directiveIdentifiers, componentStyles, fileSuffix) {\n      var _this$_parseTemplate2 = this._parseTemplate(compMeta, ngModule, directiveIdentifiers),\n          parsedTemplate = _this$_parseTemplate2.template,\n          usedPipes = _this$_parseTemplate2.pipes;\n\n      var stylesExpr = componentStyles ? variable(componentStyles.stylesVar) : literalArr([]);\n\n      var viewResult = this._viewCompiler.compileComponent(outputCtx, compMeta, parsedTemplate, stylesExpr, usedPipes);\n\n      if (componentStyles) {\n        _resolveStyleStatements(this._symbolResolver, componentStyles, this._styleCompiler.needsStyleShim(compMeta), fileSuffix);\n      }\n\n      return viewResult;\n    }\n  }, {\n    key: \"_parseTemplate\",\n    value: function _parseTemplate(compMeta, ngModule, directiveIdentifiers) {\n      var _this282 = this;\n\n      if (this._templateAstCache.has(compMeta.type.reference)) {\n        return this._templateAstCache.get(compMeta.type.reference);\n      }\n\n      var preserveWhitespaces = compMeta.template.preserveWhitespaces;\n      var directives = directiveIdentifiers.map(function (dir) {\n        return _this282._metadataResolver.getDirectiveSummary(dir.reference);\n      });\n      var pipes = ngModule.transitiveModule.pipes.map(function (pipe) {\n        return _this282._metadataResolver.getPipeSummary(pipe.reference);\n      });\n\n      var result = this._templateParser.parse(compMeta, compMeta.template.htmlAst, directives, pipes, ngModule.schemas, templateSourceUrl(ngModule.type, compMeta, compMeta.template), preserveWhitespaces);\n\n      this._templateAstCache.set(compMeta.type.reference, result);\n\n      return result;\n    }\n  }, {\n    key: \"_createOutputContext\",\n    value: function _createOutputContext(genFilePath) {\n      var _this283 = this;\n\n      var importExpr$1 = function importExpr$1(symbol) {\n        var typeParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n        var useSummaries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n        if (!(symbol instanceof StaticSymbol)) {\n          throw new Error(\"Internal error: unknown identifier \".concat(JSON.stringify(symbol)));\n        }\n\n        var arity = _this283._symbolResolver.getTypeArity(symbol) || 0;\n\n        var _ref44 = _this283._symbolResolver.getImportAs(symbol, useSummaries) || symbol,\n            filePath = _ref44.filePath,\n            name = _ref44.name,\n            members = _ref44.members;\n\n        var importModule = _this283._fileNameToModuleName(filePath, genFilePath); // It should be good enough to compare filePath to genFilePath and if they are equal\n        // there is a self reference. However, ngfactory files generate to .ts but their\n        // symbols have .d.ts so a simple compare is insufficient. They should be canonical\n        // and is tracked by #17705.\n\n\n        var selfReference = _this283._fileNameToModuleName(genFilePath, genFilePath);\n\n        var moduleName = importModule === selfReference ? null : importModule; // If we are in a type expression that refers to a generic type then supply\n        // the required type parameters. If there were not enough type parameters\n        // supplied, supply any as the type. Outside a type expression the reference\n        // should not supply type parameters and be treated as a simple value reference\n        // to the constructor function itself.\n\n        var suppliedTypeParams = typeParams || [];\n        var missingTypeParamsCount = arity - suppliedTypeParams.length;\n        var allTypeParams = suppliedTypeParams.concat(newArray(missingTypeParamsCount, DYNAMIC_TYPE));\n        return members.reduce(function (expr, memberName) {\n          return expr.prop(memberName);\n        }, importExpr(new ExternalReference(moduleName, name, null), allTypeParams));\n      };\n\n      return {\n        statements: [],\n        genFilePath: genFilePath,\n        importExpr: importExpr$1,\n        constantPool: new ConstantPool()\n      };\n    }\n  }, {\n    key: \"_fileNameToModuleName\",\n    value: function _fileNameToModuleName(importedFilePath, containingFilePath) {\n      return this._summaryResolver.getKnownModuleName(importedFilePath) || this._symbolResolver.getKnownModuleName(importedFilePath) || this._host.fileNameToModuleName(importedFilePath, containingFilePath);\n    }\n  }, {\n    key: \"_codegenStyles\",\n    value: function _codegenStyles(srcFileUrl, compMeta, stylesheetMetadata, isShimmed, fileSuffix) {\n      var outputCtx = this._createOutputContext(_stylesModuleUrl(stylesheetMetadata.moduleUrl, isShimmed, fileSuffix));\n\n      var compiledStylesheet = this._styleCompiler.compileStyles(outputCtx, compMeta, stylesheetMetadata, isShimmed);\n\n      _resolveStyleStatements(this._symbolResolver, compiledStylesheet, isShimmed, fileSuffix);\n\n      return this._codegenSourceModule(srcFileUrl, outputCtx);\n    }\n  }, {\n    key: \"_codegenSourceModule\",\n    value: function _codegenSourceModule(srcFileUrl, ctx) {\n      return new GeneratedFile(srcFileUrl, ctx.genFilePath, ctx.statements);\n    }\n  }, {\n    key: \"listLazyRoutes\",\n    value: function listLazyRoutes(entryRoute, analyzedModules) {\n      var self = this;\n\n      if (entryRoute) {\n        var symbol = parseLazyRoute(entryRoute, this.reflector).referencedModule;\n        return visitLazyRoute(symbol);\n      } else if (analyzedModules) {\n        var allLazyRoutes = [];\n\n        var _iterator36 = _createForOfIteratorHelper(analyzedModules.ngModules),\n            _step36;\n\n        try {\n          for (_iterator36.s(); !(_step36 = _iterator36.n()).done;) {\n            var ngModule = _step36.value;\n\n            var lazyRoutes = _listLazyRoutes(ngModule, this.reflector);\n\n            var _iterator37 = _createForOfIteratorHelper(lazyRoutes),\n                _step37;\n\n            try {\n              for (_iterator37.s(); !(_step37 = _iterator37.n()).done;) {\n                var lazyRoute = _step37.value;\n                allLazyRoutes.push(lazyRoute);\n              }\n            } catch (err) {\n              _iterator37.e(err);\n            } finally {\n              _iterator37.f();\n            }\n          }\n        } catch (err) {\n          _iterator36.e(err);\n        } finally {\n          _iterator36.f();\n        }\n\n        return allLazyRoutes;\n      } else {\n        throw new Error(\"Either route or analyzedModules has to be specified!\");\n      }\n\n      function visitLazyRoute(symbol) {\n        var seenRoutes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set();\n        var allLazyRoutes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\n        // Support pointing to default exports, but stop recursing there,\n        // as the StaticReflector does not yet support default exports.\n        if (seenRoutes.has(symbol) || !symbol.name) {\n          return allLazyRoutes;\n        }\n\n        seenRoutes.add(symbol);\n\n        var lazyRoutes = _listLazyRoutes(self._metadataResolver.getNgModuleMetadata(symbol, true), self.reflector);\n\n        var _iterator38 = _createForOfIteratorHelper(lazyRoutes),\n            _step38;\n\n        try {\n          for (_iterator38.s(); !(_step38 = _iterator38.n()).done;) {\n            var _lazyRoute = _step38.value;\n            allLazyRoutes.push(_lazyRoute);\n            visitLazyRoute(_lazyRoute.referencedModule, seenRoutes, allLazyRoutes);\n          }\n        } catch (err) {\n          _iterator38.e(err);\n        } finally {\n          _iterator38.f();\n        }\n\n        return allLazyRoutes;\n      }\n    }\n  }]);\n\n  return AotCompiler;\n}();\n\nfunction _createEmptyStub(outputCtx) {\n  // Note: We need to produce at least one import statement so that\n  // TypeScript knows that the file is an es6 module. Otherwise our generated\n  // exports / imports won't be emitted properly by TypeScript.\n  outputCtx.statements.push(importExpr(Identifiers$1.ComponentFactory).toStmt());\n}\n\nfunction _resolveStyleStatements(symbolResolver, compileResult, needsShim, fileSuffix) {\n  compileResult.dependencies.forEach(function (dep) {\n    dep.setValue(symbolResolver.getStaticSymbol(_stylesModuleUrl(dep.moduleUrl, needsShim, fileSuffix), dep.name));\n  });\n}\n\nfunction _stylesModuleUrl(stylesheetUrl, shim, suffix) {\n  return \"\".concat(stylesheetUrl).concat(shim ? '.shim' : '', \".ngstyle\").concat(suffix);\n}\n\nfunction analyzeNgModules(fileNames, host, staticSymbolResolver, metadataResolver) {\n  var files = _analyzeFilesIncludingNonProgramFiles(fileNames, host, staticSymbolResolver, metadataResolver);\n\n  return mergeAnalyzedFiles(files);\n}\n\nfunction analyzeAndValidateNgModules(fileNames, host, staticSymbolResolver, metadataResolver) {\n  return validateAnalyzedModules(analyzeNgModules(fileNames, host, staticSymbolResolver, metadataResolver));\n}\n\nfunction validateAnalyzedModules(analyzedModules) {\n  if (analyzedModules.symbolsMissingModule && analyzedModules.symbolsMissingModule.length) {\n    var messages = analyzedModules.symbolsMissingModule.map(function (s) {\n      return \"Cannot determine the module for class \".concat(s.name, \" in \").concat(s.filePath, \"! Add \").concat(s.name, \" to the NgModule to fix it.\");\n    });\n    throw syntaxError(messages.join('\\n'));\n  }\n\n  return analyzedModules;\n} // Analyzes all of the program files,\n// including files that are not part of the program\n// but are referenced by an NgModule.\n\n\nfunction _analyzeFilesIncludingNonProgramFiles(fileNames, host, staticSymbolResolver, metadataResolver) {\n  var seenFiles = new Set();\n  var files = [];\n\n  var visitFile = function visitFile(fileName) {\n    if (seenFiles.has(fileName) || !host.isSourceFile(fileName)) {\n      return false;\n    }\n\n    seenFiles.add(fileName);\n    var analyzedFile = analyzeFile(host, staticSymbolResolver, metadataResolver, fileName);\n    files.push(analyzedFile);\n    analyzedFile.ngModules.forEach(function (ngModule) {\n      ngModule.transitiveModule.modules.forEach(function (modMeta) {\n        return visitFile(modMeta.reference.filePath);\n      });\n    });\n  };\n\n  fileNames.forEach(function (fileName) {\n    return visitFile(fileName);\n  });\n  return files;\n}\n\nfunction analyzeFile(host, staticSymbolResolver, metadataResolver, fileName) {\n  var abstractDirectives = [];\n  var directives = [];\n  var pipes = [];\n  var injectables = [];\n  var ngModules = [];\n  var hasDecorators = staticSymbolResolver.hasDecorators(fileName);\n  var exportsNonSourceFiles = false;\n  var isDeclarationFile = fileName.endsWith('.d.ts'); // Don't analyze .d.ts files that have no decorators as a shortcut\n  // to speed up the analysis. This prevents us from\n  // resolving the references in these files.\n  // Note: exportsNonSourceFiles is only needed when compiling with summaries,\n  // which is not the case when .d.ts files are treated as input files.\n\n  if (!isDeclarationFile || hasDecorators) {\n    staticSymbolResolver.getSymbolsOf(fileName).forEach(function (symbol) {\n      var resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);\n      var symbolMeta = resolvedSymbol.metadata;\n\n      if (!symbolMeta || symbolMeta.__symbolic === 'error') {\n        return;\n      }\n\n      var isNgSymbol = false;\n\n      if (symbolMeta.__symbolic === 'class') {\n        if (metadataResolver.isDirective(symbol)) {\n          isNgSymbol = true; // This directive either has a selector or doesn't. Selector-less directives get tracked\n          // in abstractDirectives, not directives. The compiler doesn't deal with selector-less\n          // directives at all, really, other than to persist their metadata. This is done so that\n          // apps will have an easier time migrating to Ivy, which requires the selector-less\n          // annotations to be applied.\n\n          if (!metadataResolver.isAbstractDirective(symbol)) {\n            // The directive is an ordinary directive.\n            directives.push(symbol);\n          } else {\n            // The directive has no selector and is an \"abstract\" directive, so track it\n            // accordingly.\n            abstractDirectives.push(symbol);\n          }\n        } else if (metadataResolver.isPipe(symbol)) {\n          isNgSymbol = true;\n          pipes.push(symbol);\n        } else if (metadataResolver.isNgModule(symbol)) {\n          var ngModule = metadataResolver.getNgModuleMetadata(symbol, false);\n\n          if (ngModule) {\n            isNgSymbol = true;\n            ngModules.push(ngModule);\n          }\n        } else if (metadataResolver.isInjectable(symbol)) {\n          isNgSymbol = true;\n          var injectable = metadataResolver.getInjectableMetadata(symbol, null, false);\n\n          if (injectable) {\n            injectables.push(injectable);\n          }\n        }\n      }\n\n      if (!isNgSymbol) {\n        exportsNonSourceFiles = exportsNonSourceFiles || isValueExportingNonSourceFile(host, symbolMeta);\n      }\n    });\n  }\n\n  return {\n    fileName: fileName,\n    directives: directives,\n    abstractDirectives: abstractDirectives,\n    pipes: pipes,\n    ngModules: ngModules,\n    injectables: injectables,\n    exportsNonSourceFiles: exportsNonSourceFiles\n  };\n}\n\nfunction analyzeFileForInjectables(host, staticSymbolResolver, metadataResolver, fileName) {\n  var injectables = [];\n  var shallowModules = [];\n\n  if (staticSymbolResolver.hasDecorators(fileName)) {\n    staticSymbolResolver.getSymbolsOf(fileName).forEach(function (symbol) {\n      var resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);\n      var symbolMeta = resolvedSymbol.metadata;\n\n      if (!symbolMeta || symbolMeta.__symbolic === 'error') {\n        return;\n      }\n\n      if (symbolMeta.__symbolic === 'class') {\n        if (metadataResolver.isInjectable(symbol)) {\n          var injectable = metadataResolver.getInjectableMetadata(symbol, null, false);\n\n          if (injectable) {\n            injectables.push(injectable);\n          }\n        } else if (metadataResolver.isNgModule(symbol)) {\n          var module = metadataResolver.getShallowModuleMetadata(symbol);\n\n          if (module) {\n            shallowModules.push(module);\n          }\n        }\n      }\n    });\n  }\n\n  return {\n    fileName: fileName,\n    injectables: injectables,\n    shallowModules: shallowModules\n  };\n}\n\nfunction isValueExportingNonSourceFile(host, metadata) {\n  var exportsNonSourceFiles = false;\n\n  var Visitor = /*#__PURE__*/function () {\n    function Visitor() {\n      _classCallCheck(this, Visitor);\n    }\n\n    _createClass(Visitor, [{\n      key: \"visitArray\",\n      value: function visitArray(arr, context) {\n        var _this284 = this;\n\n        arr.forEach(function (v) {\n          return visitValue(v, _this284, context);\n        });\n      }\n    }, {\n      key: \"visitStringMap\",\n      value: function visitStringMap(map, context) {\n        var _this285 = this;\n\n        Object.keys(map).forEach(function (key) {\n          return visitValue(map[key], _this285, context);\n        });\n      }\n    }, {\n      key: \"visitPrimitive\",\n      value: function visitPrimitive(value, context) {}\n    }, {\n      key: \"visitOther\",\n      value: function visitOther(value, context) {\n        if (value instanceof StaticSymbol && !host.isSourceFile(value.filePath)) {\n          exportsNonSourceFiles = true;\n        }\n      }\n    }]);\n\n    return Visitor;\n  }();\n\n  visitValue(metadata, new Visitor(), null);\n  return exportsNonSourceFiles;\n}\n\nfunction mergeAnalyzedFiles(analyzedFiles) {\n  var allNgModules = [];\n  var ngModuleByPipeOrDirective = new Map();\n  var allPipesAndDirectives = new Set();\n  analyzedFiles.forEach(function (af) {\n    af.ngModules.forEach(function (ngModule) {\n      allNgModules.push(ngModule);\n      ngModule.declaredDirectives.forEach(function (d) {\n        return ngModuleByPipeOrDirective.set(d.reference, ngModule);\n      });\n      ngModule.declaredPipes.forEach(function (p) {\n        return ngModuleByPipeOrDirective.set(p.reference, ngModule);\n      });\n    });\n    af.directives.forEach(function (d) {\n      return allPipesAndDirectives.add(d);\n    });\n    af.pipes.forEach(function (p) {\n      return allPipesAndDirectives.add(p);\n    });\n  });\n  var symbolsMissingModule = [];\n  allPipesAndDirectives.forEach(function (ref) {\n    if (!ngModuleByPipeOrDirective.has(ref)) {\n      symbolsMissingModule.push(ref);\n    }\n  });\n  return {\n    ngModules: allNgModules,\n    ngModuleByPipeOrDirective: ngModuleByPipeOrDirective,\n    symbolsMissingModule: symbolsMissingModule,\n    files: analyzedFiles\n  };\n}\n\nfunction mergeAndValidateNgFiles(files) {\n  return validateAnalyzedModules(mergeAnalyzedFiles(files));\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar FORMATTED_MESSAGE = 'ngFormattedMessage';\n\nfunction indentStr(level) {\n  if (level <= 0) return '';\n  if (level < 6) return ['', ' ', '  ', '   ', '    ', '     '][level];\n  var half = indentStr(Math.floor(level / 2));\n  return half + half + (level % 2 === 1 ? ' ' : '');\n}\n\nfunction formatChain(chain) {\n  var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  if (!chain) return '';\n  var position = chain.position ? \"\".concat(chain.position.fileName, \"(\").concat(chain.position.line + 1, \",\").concat(chain.position.column + 1, \")\") : '';\n  var prefix = position && indent === 0 ? \"\".concat(position, \": \") : '';\n  var postfix = position && indent !== 0 ? \" at \".concat(position) : '';\n  var message = \"\".concat(prefix).concat(chain.message).concat(postfix);\n\n  if (chain.next) {\n    var _iterator39 = _createForOfIteratorHelper(chain.next),\n        _step39;\n\n    try {\n      for (_iterator39.s(); !(_step39 = _iterator39.n()).done;) {\n        var kid = _step39.value;\n        message += '\\n' + formatChain(kid, indent + 2);\n      }\n    } catch (err) {\n      _iterator39.e(err);\n    } finally {\n      _iterator39.f();\n    }\n  }\n\n  return \"\".concat(indentStr(indent)).concat(message);\n}\n\nfunction formattedError(chain) {\n  var message = formatChain(chain) + '.';\n  var error = syntaxError(message);\n  error[FORMATTED_MESSAGE] = true;\n  error.chain = chain;\n  error.position = chain.position;\n  return error;\n}\n\nfunction isFormattedError(error) {\n  return !!error[FORMATTED_MESSAGE];\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar ANGULAR_CORE = '@angular/core';\nvar ANGULAR_ROUTER = '@angular/router';\nvar HIDDEN_KEY = /^\\$.*\\$$/;\nvar IGNORE = {\n  __symbolic: 'ignore'\n};\nvar USE_VALUE$1 = 'useValue';\nvar PROVIDE = 'provide';\nvar REFERENCE_SET = /*@__PURE__*/new Set([USE_VALUE$1, 'useFactory', 'data', 'id', 'loadChildren']);\nvar TYPEGUARD_POSTFIX = 'TypeGuard';\nvar USE_IF = 'UseIf';\n\nfunction shouldIgnore(value) {\n  return value && value.__symbolic == 'ignore';\n}\n/**\n * A static reflector implements enough of the Reflector API that is necessary to compile\n * templates statically.\n */\n\n\nvar StaticReflector = /*#__PURE__*/function () {\n  function StaticReflector(summaryResolver, symbolResolver) {\n    var _this286 = this;\n\n    var knownMetadataClasses = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n    var knownMetadataFunctions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n    var errorRecorder = arguments.length > 4 ? arguments[4] : undefined;\n\n    _classCallCheck(this, StaticReflector);\n\n    this.summaryResolver = summaryResolver;\n    this.symbolResolver = symbolResolver;\n    this.errorRecorder = errorRecorder;\n    this.annotationCache = new Map();\n    this.shallowAnnotationCache = new Map();\n    this.propertyCache = new Map();\n    this.parameterCache = new Map();\n    this.methodCache = new Map();\n    this.staticCache = new Map();\n    this.conversionMap = new Map();\n    this.resolvedExternalReferences = new Map();\n    this.annotationForParentClassWithSummaryKind = new Map();\n    this.initializeConversionMap();\n    knownMetadataClasses.forEach(function (kc) {\n      return _this286._registerDecoratorOrConstructor(_this286.getStaticSymbol(kc.filePath, kc.name), kc.ctor);\n    });\n    knownMetadataFunctions.forEach(function (kf) {\n      return _this286._registerFunction(_this286.getStaticSymbol(kf.filePath, kf.name), kf.fn);\n    });\n    this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Directive, [createDirective, createComponent]);\n    this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Pipe, [createPipe]);\n    this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.NgModule, [createNgModule]);\n    this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Injectable, [createInjectable, createPipe, createDirective, createComponent, createNgModule]);\n  }\n\n  _createClass(StaticReflector, [{\n    key: \"componentModuleUrl\",\n    value: function componentModuleUrl(typeOrFunc) {\n      var staticSymbol = this.findSymbolDeclaration(typeOrFunc);\n      return this.symbolResolver.getResourcePath(staticSymbol);\n    }\n    /**\n     * Invalidate the specified `symbols` on program change.\n     * @param symbols\n     */\n\n  }, {\n    key: \"invalidateSymbols\",\n    value: function invalidateSymbols(symbols) {\n      var _iterator40 = _createForOfIteratorHelper(symbols),\n          _step40;\n\n      try {\n        for (_iterator40.s(); !(_step40 = _iterator40.n()).done;) {\n          var symbol = _step40.value;\n          this.annotationCache.delete(symbol);\n          this.shallowAnnotationCache.delete(symbol);\n          this.propertyCache.delete(symbol);\n          this.parameterCache.delete(symbol);\n          this.methodCache.delete(symbol);\n          this.staticCache.delete(symbol);\n          this.conversionMap.delete(symbol);\n        }\n      } catch (err) {\n        _iterator40.e(err);\n      } finally {\n        _iterator40.f();\n      }\n    }\n  }, {\n    key: \"resolveExternalReference\",\n    value: function resolveExternalReference(ref, containingFile) {\n      var key = undefined;\n\n      if (!containingFile) {\n        key = \"\".concat(ref.moduleName, \":\").concat(ref.name);\n\n        var _declarationSymbol = this.resolvedExternalReferences.get(key);\n\n        if (_declarationSymbol) return _declarationSymbol;\n      }\n\n      var refSymbol = this.symbolResolver.getSymbolByModule(ref.moduleName, ref.name, containingFile);\n      var declarationSymbol = this.findSymbolDeclaration(refSymbol);\n\n      if (!containingFile) {\n        this.symbolResolver.recordModuleNameForFileName(refSymbol.filePath, ref.moduleName);\n        this.symbolResolver.recordImportAs(declarationSymbol, refSymbol);\n      }\n\n      if (key) {\n        this.resolvedExternalReferences.set(key, declarationSymbol);\n      }\n\n      return declarationSymbol;\n    }\n  }, {\n    key: \"findDeclaration\",\n    value: function findDeclaration(moduleUrl, name, containingFile) {\n      return this.findSymbolDeclaration(this.symbolResolver.getSymbolByModule(moduleUrl, name, containingFile));\n    }\n  }, {\n    key: \"tryFindDeclaration\",\n    value: function tryFindDeclaration(moduleUrl, name, containingFile) {\n      var _this287 = this;\n\n      return this.symbolResolver.ignoreErrorsFor(function () {\n        return _this287.findDeclaration(moduleUrl, name, containingFile);\n      });\n    }\n  }, {\n    key: \"findSymbolDeclaration\",\n    value: function findSymbolDeclaration(symbol) {\n      var resolvedSymbol = this.symbolResolver.resolveSymbol(symbol);\n\n      if (resolvedSymbol) {\n        var resolvedMetadata = resolvedSymbol.metadata;\n\n        if (resolvedMetadata && resolvedMetadata.__symbolic === 'resolved') {\n          resolvedMetadata = resolvedMetadata.symbol;\n        }\n\n        if (resolvedMetadata instanceof StaticSymbol) {\n          return this.findSymbolDeclaration(resolvedSymbol.metadata);\n        }\n      }\n\n      return symbol;\n    }\n  }, {\n    key: \"tryAnnotations\",\n    value: function tryAnnotations(type) {\n      var originalRecorder = this.errorRecorder;\n\n      this.errorRecorder = function (error, fileName) {};\n\n      try {\n        return this.annotations(type);\n      } finally {\n        this.errorRecorder = originalRecorder;\n      }\n    }\n  }, {\n    key: \"annotations\",\n    value: function annotations(type) {\n      var _this288 = this;\n\n      return this._annotations(type, function (type, decorators) {\n        return _this288.simplify(type, decorators);\n      }, this.annotationCache);\n    }\n  }, {\n    key: \"shallowAnnotations\",\n    value: function shallowAnnotations(type) {\n      var _this289 = this;\n\n      return this._annotations(type, function (type, decorators) {\n        return _this289.simplify(type, decorators, true);\n      }, this.shallowAnnotationCache);\n    }\n  }, {\n    key: \"_annotations\",\n    value: function _annotations(type, simplify, annotationCache) {\n      var annotations = annotationCache.get(type);\n\n      if (!annotations) {\n        annotations = [];\n        var classMetadata = this.getTypeMetadata(type);\n        var parentType = this.findParentType(type, classMetadata);\n\n        if (parentType) {\n          var _annotations2;\n\n          var parentAnnotations = this.annotations(parentType);\n\n          (_annotations2 = annotations).push.apply(_annotations2, _toConsumableArray(parentAnnotations));\n        }\n\n        var ownAnnotations = [];\n\n        if (classMetadata['decorators']) {\n          ownAnnotations = simplify(type, classMetadata['decorators']);\n\n          if (ownAnnotations) {\n            var _annotations3;\n\n            (_annotations3 = annotations).push.apply(_annotations3, _toConsumableArray(ownAnnotations));\n          }\n        }\n\n        if (parentType && !this.summaryResolver.isLibraryFile(type.filePath) && this.summaryResolver.isLibraryFile(parentType.filePath)) {\n          var summary = this.summaryResolver.resolveSummary(parentType);\n\n          if (summary && summary.type) {\n            var requiredAnnotationTypes = this.annotationForParentClassWithSummaryKind.get(summary.type.summaryKind);\n            var typeHasRequiredAnnotation = requiredAnnotationTypes.some(function (requiredType) {\n              return ownAnnotations.some(function (ann) {\n                return requiredType.isTypeOf(ann);\n              });\n            });\n\n            if (!typeHasRequiredAnnotation) {\n              this.reportError(formatMetadataError(metadataError(\"Class \".concat(type.name, \" in \").concat(type.filePath, \" extends from a \").concat(CompileSummaryKind[summary.type.summaryKind], \" in another compilation unit without duplicating the decorator\"),\n              /* summary */\n              undefined, \"Please add a \".concat(requiredAnnotationTypes.map(function (type) {\n                return type.ngMetadataName;\n              }).join(' or '), \" decorator to the class\")), type), type);\n            }\n          }\n        }\n\n        annotationCache.set(type, annotations.filter(function (ann) {\n          return !!ann;\n        }));\n      }\n\n      return annotations;\n    }\n  }, {\n    key: \"propMetadata\",\n    value: function propMetadata(type) {\n      var _this290 = this;\n\n      var propMetadata = this.propertyCache.get(type);\n\n      if (!propMetadata) {\n        var classMetadata = this.getTypeMetadata(type);\n        propMetadata = {};\n        var parentType = this.findParentType(type, classMetadata);\n\n        if (parentType) {\n          var parentPropMetadata = this.propMetadata(parentType);\n          Object.keys(parentPropMetadata).forEach(function (parentProp) {\n            propMetadata[parentProp] = parentPropMetadata[parentProp];\n          });\n        }\n\n        var members = classMetadata['members'] || {};\n        Object.keys(members).forEach(function (propName) {\n          var propData = members[propName];\n          var prop = propData.find(function (a) {\n            return a['__symbolic'] == 'property' || a['__symbolic'] == 'method';\n          });\n          var decorators = []; // hasOwnProperty() is used here to make sure we do not look up methods\n          // on `Object.prototype`.\n\n          if (propMetadata === null || propMetadata === void 0 ? void 0 : propMetadata.hasOwnProperty(propName)) {\n            decorators.push.apply(decorators, _toConsumableArray(propMetadata[propName]));\n          }\n\n          propMetadata[propName] = decorators;\n\n          if (prop && prop['decorators']) {\n            decorators.push.apply(decorators, _toConsumableArray(_this290.simplify(type, prop['decorators'])));\n          }\n        });\n        this.propertyCache.set(type, propMetadata);\n      }\n\n      return propMetadata;\n    }\n  }, {\n    key: \"parameters\",\n    value: function parameters(type) {\n      var _this291 = this;\n\n      if (!(type instanceof StaticSymbol)) {\n        this.reportError(new Error(\"parameters received \".concat(JSON.stringify(type), \" which is not a StaticSymbol\")), type);\n        return [];\n      }\n\n      try {\n        var parameters = this.parameterCache.get(type);\n\n        if (!parameters) {\n          var classMetadata = this.getTypeMetadata(type);\n          var parentType = this.findParentType(type, classMetadata);\n          var members = classMetadata ? classMetadata['members'] : null;\n          var ctorData = members ? members['__ctor__'] : null;\n\n          if (ctorData) {\n            var ctor = ctorData.find(function (a) {\n              return a['__symbolic'] == 'constructor';\n            });\n            var rawParameterTypes = ctor['parameters'] || [];\n            var parameterDecorators = this.simplify(type, ctor['parameterDecorators'] || []);\n            parameters = [];\n            rawParameterTypes.forEach(function (rawParamType, index) {\n              var nestedResult = [];\n\n              var paramType = _this291.trySimplify(type, rawParamType);\n\n              if (paramType) nestedResult.push(paramType);\n              var decorators = parameterDecorators ? parameterDecorators[index] : null;\n\n              if (decorators) {\n                nestedResult.push.apply(nestedResult, _toConsumableArray(decorators));\n              }\n\n              parameters.push(nestedResult);\n            });\n          } else if (parentType) {\n            parameters = this.parameters(parentType);\n          }\n\n          if (!parameters) {\n            parameters = [];\n          }\n\n          this.parameterCache.set(type, parameters);\n        }\n\n        return parameters;\n      } catch (e) {\n        console.error(\"Failed on type \".concat(JSON.stringify(type), \" with error \").concat(e));\n        throw e;\n      }\n    }\n  }, {\n    key: \"_methodNames\",\n    value: function _methodNames(type) {\n      var methodNames = this.methodCache.get(type);\n\n      if (!methodNames) {\n        var classMetadata = this.getTypeMetadata(type);\n        methodNames = {};\n        var parentType = this.findParentType(type, classMetadata);\n\n        if (parentType) {\n          var parentMethodNames = this._methodNames(parentType);\n\n          Object.keys(parentMethodNames).forEach(function (parentProp) {\n            methodNames[parentProp] = parentMethodNames[parentProp];\n          });\n        }\n\n        var members = classMetadata['members'] || {};\n        Object.keys(members).forEach(function (propName) {\n          var propData = members[propName];\n          var isMethod = propData.some(function (a) {\n            return a['__symbolic'] == 'method';\n          });\n          methodNames[propName] = methodNames[propName] || isMethod;\n        });\n        this.methodCache.set(type, methodNames);\n      }\n\n      return methodNames;\n    }\n  }, {\n    key: \"_staticMembers\",\n    value: function _staticMembers(type) {\n      var staticMembers = this.staticCache.get(type);\n\n      if (!staticMembers) {\n        var classMetadata = this.getTypeMetadata(type);\n        var staticMemberData = classMetadata['statics'] || {};\n        staticMembers = Object.keys(staticMemberData);\n        this.staticCache.set(type, staticMembers);\n      }\n\n      return staticMembers;\n    }\n  }, {\n    key: \"findParentType\",\n    value: function findParentType(type, classMetadata) {\n      var parentType = this.trySimplify(type, classMetadata['extends']);\n\n      if (parentType instanceof StaticSymbol) {\n        return parentType;\n      }\n    }\n  }, {\n    key: \"hasLifecycleHook\",\n    value: function hasLifecycleHook(type, lcProperty) {\n      if (!(type instanceof StaticSymbol)) {\n        this.reportError(new Error(\"hasLifecycleHook received \".concat(JSON.stringify(type), \" which is not a StaticSymbol\")), type);\n      }\n\n      try {\n        return !!this._methodNames(type)[lcProperty];\n      } catch (e) {\n        console.error(\"Failed on type \".concat(JSON.stringify(type), \" with error \").concat(e));\n        throw e;\n      }\n    }\n  }, {\n    key: \"guards\",\n    value: function guards(type) {\n      if (!(type instanceof StaticSymbol)) {\n        this.reportError(new Error(\"guards received \".concat(JSON.stringify(type), \" which is not a StaticSymbol\")), type);\n        return {};\n      }\n\n      var staticMembers = this._staticMembers(type);\n\n      var result = {};\n\n      var _iterator41 = _createForOfIteratorHelper(staticMembers),\n          _step41;\n\n      try {\n        for (_iterator41.s(); !(_step41 = _iterator41.n()).done;) {\n          var name = _step41.value;\n\n          if (name.endsWith(TYPEGUARD_POSTFIX)) {\n            var property = name.substr(0, name.length - TYPEGUARD_POSTFIX.length);\n            var value = void 0;\n\n            if (property.endsWith(USE_IF)) {\n              property = name.substr(0, property.length - USE_IF.length);\n              value = USE_IF;\n            } else {\n              value = this.getStaticSymbol(type.filePath, type.name, [name]);\n            }\n\n            result[property] = value;\n          }\n        }\n      } catch (err) {\n        _iterator41.e(err);\n      } finally {\n        _iterator41.f();\n      }\n\n      return result;\n    }\n  }, {\n    key: \"_registerDecoratorOrConstructor\",\n    value: function _registerDecoratorOrConstructor(type, ctor) {\n      this.conversionMap.set(type, function (context, args) {\n        return _construct(ctor, _toConsumableArray(args));\n      });\n    }\n  }, {\n    key: \"_registerFunction\",\n    value: function _registerFunction(type, fn) {\n      this.conversionMap.set(type, function (context, args) {\n        return fn.apply(undefined, args);\n      });\n    }\n  }, {\n    key: \"initializeConversionMap\",\n    value: function initializeConversionMap() {\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Injectable'), createInjectable);\n\n      this.injectionToken = this.findDeclaration(ANGULAR_CORE, 'InjectionToken');\n      this.opaqueToken = this.findDeclaration(ANGULAR_CORE, 'OpaqueToken');\n      this.ROUTES = this.tryFindDeclaration(ANGULAR_ROUTER, 'ROUTES');\n      this.ANALYZE_FOR_ENTRY_COMPONENTS = this.findDeclaration(ANGULAR_CORE, 'ANALYZE_FOR_ENTRY_COMPONENTS');\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Host'), createHost);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Self'), createSelf);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'SkipSelf'), createSkipSelf);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Inject'), createInject);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Optional'), createOptional);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Attribute'), createAttribute);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ContentChild'), createContentChild);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ContentChildren'), createContentChildren);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ViewChild'), createViewChild);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ViewChildren'), createViewChildren);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Input'), createInput);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Output'), createOutput);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Pipe'), createPipe);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'HostBinding'), createHostBinding);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'HostListener'), createHostListener);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Directive'), createDirective);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Component'), createComponent);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'NgModule'), createNgModule); // Note: Some metadata classes can be used directly with Provider.deps.\n\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Host'), createHost);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Self'), createSelf);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'SkipSelf'), createSkipSelf);\n\n      this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Optional'), createOptional);\n    }\n    /**\n     * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.\n     * All types passed to the StaticResolver should be pseudo-types returned by this method.\n     *\n     * @param declarationFile the absolute path of the file where the symbol is declared\n     * @param name the name of the type.\n     */\n\n  }, {\n    key: \"getStaticSymbol\",\n    value: function getStaticSymbol(declarationFile, name, members) {\n      return this.symbolResolver.getStaticSymbol(declarationFile, name, members);\n    }\n    /**\n     * Simplify but discard any errors\n     */\n\n  }, {\n    key: \"trySimplify\",\n    value: function trySimplify(context, value) {\n      var originalRecorder = this.errorRecorder;\n\n      this.errorRecorder = function (error, fileName) {};\n\n      var result = this.simplify(context, value);\n      this.errorRecorder = originalRecorder;\n      return result;\n    }\n    /** @internal */\n\n  }, {\n    key: \"simplify\",\n    value: function simplify(context, value) {\n      var lazy = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var self = this;\n      var scope = BindingScope$1.empty;\n      var calling = new Map();\n      var rootContext = context;\n\n      function simplifyInContext(context, value, depth, references) {\n        function resolveReferenceValue(staticSymbol) {\n          var resolvedSymbol = self.symbolResolver.resolveSymbol(staticSymbol);\n          return resolvedSymbol ? resolvedSymbol.metadata : null;\n        }\n\n        function simplifyEagerly(value) {\n          return simplifyInContext(context, value, depth, 0);\n        }\n\n        function simplifyLazily(value) {\n          return simplifyInContext(context, value, depth, references + 1);\n        }\n\n        function simplifyNested(nestedContext, value) {\n          if (nestedContext === context) {\n            // If the context hasn't changed let the exception propagate unmodified.\n            return simplifyInContext(nestedContext, value, depth + 1, references);\n          }\n\n          try {\n            return simplifyInContext(nestedContext, value, depth + 1, references);\n          } catch (e) {\n            if (isMetadataError(e)) {\n              // Propagate the message text up but add a message to the chain that explains how we got\n              // here.\n              // e.chain implies e.symbol\n              var summaryMsg = e.chain ? 'references \\'' + e.symbol.name + '\\'' : errorSummary(e);\n              var summary = \"'\".concat(nestedContext.name, \"' \").concat(summaryMsg);\n              var chain = {\n                message: summary,\n                position: e.position,\n                next: e.chain\n              }; // TODO(chuckj): retrieve the position information indirectly from the collectors node\n              // map if the metadata is from a .ts file.\n\n              self.error({\n                message: e.message,\n                advise: e.advise,\n                context: e.context,\n                chain: chain,\n                symbol: nestedContext\n              }, context);\n            } else {\n              // It is probably an internal error.\n              throw e;\n            }\n          }\n        }\n\n        function simplifyCall(functionSymbol, targetFunction, args, targetExpression) {\n          if (targetFunction && targetFunction['__symbolic'] == 'function') {\n            if (calling.get(functionSymbol)) {\n              self.error({\n                message: 'Recursion is not supported',\n                summary: \"called '\".concat(functionSymbol.name, \"' recursively\"),\n                value: targetFunction\n              }, functionSymbol);\n            }\n\n            try {\n              var _value6 = targetFunction['value'];\n\n              if (_value6 && (depth != 0 || _value6.__symbolic != 'error')) {\n                var parameters = targetFunction['parameters'];\n                var defaults = targetFunction.defaults;\n                args = args.map(function (arg) {\n                  return simplifyNested(context, arg);\n                }).map(function (arg) {\n                  return shouldIgnore(arg) ? undefined : arg;\n                });\n\n                if (defaults && defaults.length > args.length) {\n                  var _args3;\n\n                  (_args3 = args).push.apply(_args3, _toConsumableArray(defaults.slice(args.length).map(function (value) {\n                    return simplify(value);\n                  })));\n                }\n\n                calling.set(functionSymbol, true);\n                var functionScope = BindingScope$1.build();\n\n                for (var i = 0; i < parameters.length; i++) {\n                  functionScope.define(parameters[i], args[i]);\n                }\n\n                var oldScope = scope;\n\n                var _result;\n\n                try {\n                  scope = functionScope.done();\n                  _result = simplifyNested(functionSymbol, _value6);\n                } finally {\n                  scope = oldScope;\n                }\n\n                return _result;\n              }\n            } finally {\n              calling.delete(functionSymbol);\n            }\n          }\n\n          if (depth === 0) {\n            // If depth is 0 we are evaluating the top level expression that is describing element\n            // decorator. In this case, it is a decorator we don't understand, such as a custom\n            // non-angular decorator, and we should just ignore it.\n            return IGNORE;\n          }\n\n          var position = undefined;\n\n          if (targetExpression && targetExpression.__symbolic == 'resolved') {\n            var line = targetExpression.line;\n            var character = targetExpression.character;\n            var fileName = targetExpression.fileName;\n\n            if (fileName != null && line != null && character != null) {\n              position = {\n                fileName: fileName,\n                line: line,\n                column: character\n              };\n            }\n          }\n\n          self.error({\n            message: FUNCTION_CALL_NOT_SUPPORTED,\n            context: functionSymbol,\n            value: targetFunction,\n            position: position\n          }, context);\n        }\n\n        function simplify(expression) {\n          if (isPrimitive(expression)) {\n            return expression;\n          }\n\n          if (Array.isArray(expression)) {\n            var _result2 = [];\n\n            var _iterator42 = _createForOfIteratorHelper(expression),\n                _step42;\n\n            try {\n              for (_iterator42.s(); !(_step42 = _iterator42.n()).done;) {\n                var item = _step42.value;\n\n                // Check for a spread expression\n                if (item && item.__symbolic === 'spread') {\n                  // We call with references as 0 because we require the actual value and cannot\n                  // tolerate a reference here.\n                  var spreadArray = simplifyEagerly(item.expression);\n\n                  if (Array.isArray(spreadArray)) {\n                    var _iterator43 = _createForOfIteratorHelper(spreadArray),\n                        _step43;\n\n                    try {\n                      for (_iterator43.s(); !(_step43 = _iterator43.n()).done;) {\n                        var spreadItem = _step43.value;\n\n                        _result2.push(spreadItem);\n                      }\n                    } catch (err) {\n                      _iterator43.e(err);\n                    } finally {\n                      _iterator43.f();\n                    }\n\n                    continue;\n                  }\n                }\n\n                var _value7 = simplify(item);\n\n                if (shouldIgnore(_value7)) {\n                  continue;\n                }\n\n                _result2.push(_value7);\n              }\n            } catch (err) {\n              _iterator42.e(err);\n            } finally {\n              _iterator42.f();\n            }\n\n            return _result2;\n          }\n\n          if (expression instanceof StaticSymbol) {\n            // Stop simplification at builtin symbols or if we are in a reference context and\n            // the symbol doesn't have members.\n            if (expression === self.injectionToken || self.conversionMap.has(expression) || references > 0 && !expression.members.length) {\n              return expression;\n            } else {\n              var staticSymbol = expression;\n              var declarationValue = resolveReferenceValue(staticSymbol);\n\n              if (declarationValue != null) {\n                return simplifyNested(staticSymbol, declarationValue);\n              } else {\n                return staticSymbol;\n              }\n            }\n          }\n\n          if (expression) {\n            if (expression['__symbolic']) {\n              var _staticSymbol;\n\n              switch (expression['__symbolic']) {\n                case 'binop':\n                  var left = simplify(expression['left']);\n                  if (shouldIgnore(left)) return left;\n                  var right = simplify(expression['right']);\n                  if (shouldIgnore(right)) return right;\n\n                  switch (expression['operator']) {\n                    case '&&':\n                      return left && right;\n\n                    case '||':\n                      return left || right;\n\n                    case '|':\n                      return left | right;\n\n                    case '^':\n                      return left ^ right;\n\n                    case '&':\n                      return left & right;\n\n                    case '==':\n                      return left == right;\n\n                    case '!=':\n                      return left != right;\n\n                    case '===':\n                      return left === right;\n\n                    case '!==':\n                      return left !== right;\n\n                    case '<':\n                      return left < right;\n\n                    case '>':\n                      return left > right;\n\n                    case '<=':\n                      return left <= right;\n\n                    case '>=':\n                      return left >= right;\n\n                    case '<<':\n                      return left << right;\n\n                    case '>>':\n                      return left >> right;\n\n                    case '+':\n                      return left + right;\n\n                    case '-':\n                      return left - right;\n\n                    case '*':\n                      return left * right;\n\n                    case '/':\n                      return left / right;\n\n                    case '%':\n                      return left % right;\n\n                    case '??':\n                      return left !== null && left !== void 0 ? left : right;\n                  }\n\n                  return null;\n\n                case 'if':\n                  var condition = simplify(expression['condition']);\n                  return condition ? simplify(expression['thenExpression']) : simplify(expression['elseExpression']);\n\n                case 'pre':\n                  var operand = simplify(expression['operand']);\n                  if (shouldIgnore(operand)) return operand;\n\n                  switch (expression['operator']) {\n                    case '+':\n                      return operand;\n\n                    case '-':\n                      return -operand;\n\n                    case '!':\n                      return !operand;\n\n                    case '~':\n                      return ~operand;\n                  }\n\n                  return null;\n\n                case 'index':\n                  var indexTarget = simplifyEagerly(expression['expression']);\n                  var index = simplifyEagerly(expression['index']);\n                  if (indexTarget && isPrimitive(index)) return indexTarget[index];\n                  return null;\n\n                case 'select':\n                  var member = expression['member'];\n                  var selectContext = context;\n                  var selectTarget = simplify(expression['expression']);\n\n                  if (selectTarget instanceof StaticSymbol) {\n                    var members = selectTarget.members.concat(member);\n                    selectContext = self.getStaticSymbol(selectTarget.filePath, selectTarget.name, members);\n\n                    var _declarationValue = resolveReferenceValue(selectContext);\n\n                    if (_declarationValue != null) {\n                      return simplifyNested(selectContext, _declarationValue);\n                    } else {\n                      return selectContext;\n                    }\n                  }\n\n                  if (selectTarget && isPrimitive(member)) return simplifyNested(selectContext, selectTarget[member]);\n                  return null;\n\n                case 'reference':\n                  // Note: This only has to deal with variable references, as symbol references have\n                  // been converted into 'resolved'\n                  // in the StaticSymbolResolver.\n                  var name = expression['name'];\n                  var localValue = scope.resolve(name);\n\n                  if (localValue != BindingScope$1.missing) {\n                    return localValue;\n                  }\n\n                  break;\n\n                case 'resolved':\n                  try {\n                    return simplify(expression.symbol);\n                  } catch (e) {\n                    // If an error is reported evaluating the symbol record the position of the\n                    // reference in the error so it can\n                    // be reported in the error message generated from the exception.\n                    if (isMetadataError(e) && expression.fileName != null && expression.line != null && expression.character != null) {\n                      e.position = {\n                        fileName: expression.fileName,\n                        line: expression.line,\n                        column: expression.character\n                      };\n                    }\n\n                    throw e;\n                  }\n\n                case 'class':\n                  return context;\n\n                case 'function':\n                  return context;\n\n                case 'new':\n                case 'call':\n                  // Determine if the function is a built-in conversion\n                  _staticSymbol = simplifyInContext(context, expression['expression'], depth + 1,\n                  /* references */\n                  0);\n\n                  if (_staticSymbol instanceof StaticSymbol) {\n                    if (_staticSymbol === self.injectionToken || _staticSymbol === self.opaqueToken) {\n                      // if somebody calls new InjectionToken, don't create an InjectionToken,\n                      // but rather return the symbol to which the InjectionToken is assigned to.\n                      // OpaqueToken is supported too as it is required by the language service to\n                      // support v4 and prior versions of Angular.\n                      return context;\n                    }\n\n                    var argExpressions = expression['arguments'] || [];\n                    var converter = self.conversionMap.get(_staticSymbol);\n\n                    if (converter) {\n                      var args = argExpressions.map(function (arg) {\n                        return simplifyNested(context, arg);\n                      }).map(function (arg) {\n                        return shouldIgnore(arg) ? undefined : arg;\n                      });\n                      return converter(context, args);\n                    } else {\n                      // Determine if the function is one we can simplify.\n                      var targetFunction = resolveReferenceValue(_staticSymbol);\n                      return simplifyCall(_staticSymbol, targetFunction, argExpressions, expression['expression']);\n                    }\n                  }\n\n                  return IGNORE;\n\n                case 'error':\n                  var message = expression.message;\n\n                  if (expression['line'] != null) {\n                    self.error({\n                      message: message,\n                      context: expression.context,\n                      value: expression,\n                      position: {\n                        fileName: expression['fileName'],\n                        line: expression['line'],\n                        column: expression['character']\n                      }\n                    }, context);\n                  } else {\n                    self.error({\n                      message: message,\n                      context: expression.context\n                    }, context);\n                  }\n\n                  return IGNORE;\n\n                case 'ignore':\n                  return expression;\n              }\n\n              return null;\n            }\n\n            return mapStringMap(expression, function (value, name) {\n              if (REFERENCE_SET.has(name)) {\n                if (name === USE_VALUE$1 && PROVIDE in expression) {\n                  // If this is a provider expression, check for special tokens that need the value\n                  // during analysis.\n                  var provide = simplify(expression.provide);\n\n                  if (provide === self.ROUTES || provide == self.ANALYZE_FOR_ENTRY_COMPONENTS) {\n                    return simplify(value);\n                  }\n                }\n\n                return simplifyLazily(value);\n              }\n\n              return simplify(value);\n            });\n          }\n\n          return IGNORE;\n        }\n\n        return simplify(value);\n      }\n\n      var result;\n\n      try {\n        result = simplifyInContext(context, value, 0, lazy ? 1 : 0);\n      } catch (e) {\n        if (this.errorRecorder) {\n          this.reportError(e, context);\n        } else {\n          throw formatMetadataError(e, context);\n        }\n      }\n\n      if (shouldIgnore(result)) {\n        return undefined;\n      }\n\n      return result;\n    }\n  }, {\n    key: \"getTypeMetadata\",\n    value: function getTypeMetadata(type) {\n      var resolvedSymbol = this.symbolResolver.resolveSymbol(type);\n      return resolvedSymbol && resolvedSymbol.metadata ? resolvedSymbol.metadata : {\n        __symbolic: 'class'\n      };\n    }\n  }, {\n    key: \"reportError\",\n    value: function reportError(error, context, path) {\n      if (this.errorRecorder) {\n        this.errorRecorder(formatMetadataError(error, context), context && context.filePath || path);\n      } else {\n        throw error;\n      }\n    }\n  }, {\n    key: \"error\",\n    value: function error(_ref45, reportingContext) {\n      var message = _ref45.message,\n          summary = _ref45.summary,\n          advise = _ref45.advise,\n          position = _ref45.position,\n          context = _ref45.context,\n          value = _ref45.value,\n          symbol = _ref45.symbol,\n          chain = _ref45.chain;\n      this.reportError(metadataError(message, summary, advise, position, symbol, context, chain), reportingContext);\n    }\n  }]);\n\n  return StaticReflector;\n}();\n\nvar METADATA_ERROR = 'ngMetadataError';\n\nfunction metadataError(message, summary, advise, position, symbol, context, chain) {\n  var error = syntaxError(message);\n  error[METADATA_ERROR] = true;\n  if (advise) error.advise = advise;\n  if (position) error.position = position;\n  if (summary) error.summary = summary;\n  if (context) error.context = context;\n  if (chain) error.chain = chain;\n  if (symbol) error.symbol = symbol;\n  return error;\n}\n\nfunction isMetadataError(error) {\n  return !!error[METADATA_ERROR];\n}\n\nvar REFERENCE_TO_NONEXPORTED_CLASS = 'Reference to non-exported class';\nvar VARIABLE_NOT_INITIALIZED = 'Variable not initialized';\nvar DESTRUCTURE_NOT_SUPPORTED = 'Destructuring not supported';\nvar COULD_NOT_RESOLVE_TYPE = 'Could not resolve type';\nvar FUNCTION_CALL_NOT_SUPPORTED = 'Function call not supported';\nvar REFERENCE_TO_LOCAL_SYMBOL = 'Reference to a local symbol';\nvar LAMBDA_NOT_SUPPORTED = 'Lambda not supported';\n\nfunction expandedMessage(message, context) {\n  switch (message) {\n    case REFERENCE_TO_NONEXPORTED_CLASS:\n      if (context && context.className) {\n        return \"References to a non-exported class are not supported in decorators but \".concat(context.className, \" was referenced.\");\n      }\n\n      break;\n\n    case VARIABLE_NOT_INITIALIZED:\n      return 'Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler';\n\n    case DESTRUCTURE_NOT_SUPPORTED:\n      return 'Referencing an exported destructured variable or constant is not supported in decorators and this value is needed by the template compiler';\n\n    case COULD_NOT_RESOLVE_TYPE:\n      if (context && context.typeName) {\n        return \"Could not resolve type \".concat(context.typeName);\n      }\n\n      break;\n\n    case FUNCTION_CALL_NOT_SUPPORTED:\n      if (context && context.name) {\n        return \"Function calls are not supported in decorators but '\".concat(context.name, \"' was called\");\n      }\n\n      return 'Function calls are not supported in decorators';\n\n    case REFERENCE_TO_LOCAL_SYMBOL:\n      if (context && context.name) {\n        return \"Reference to a local (non-exported) symbols are not supported in decorators but '\".concat(context.name, \"' was referenced\");\n      }\n\n      break;\n\n    case LAMBDA_NOT_SUPPORTED:\n      return \"Function expressions are not supported in decorators\";\n  }\n\n  return message;\n}\n\nfunction messageAdvise(message, context) {\n  switch (message) {\n    case REFERENCE_TO_NONEXPORTED_CLASS:\n      if (context && context.className) {\n        return \"Consider exporting '\".concat(context.className, \"'\");\n      }\n\n      break;\n\n    case DESTRUCTURE_NOT_SUPPORTED:\n      return 'Consider simplifying to avoid destructuring';\n\n    case REFERENCE_TO_LOCAL_SYMBOL:\n      if (context && context.name) {\n        return \"Consider exporting '\".concat(context.name, \"'\");\n      }\n\n      break;\n\n    case LAMBDA_NOT_SUPPORTED:\n      return \"Consider changing the function expression into an exported function\";\n  }\n\n  return undefined;\n}\n\nfunction errorSummary(error) {\n  if (error.summary) {\n    return error.summary;\n  }\n\n  switch (error.message) {\n    case REFERENCE_TO_NONEXPORTED_CLASS:\n      if (error.context && error.context.className) {\n        return \"references non-exported class \".concat(error.context.className);\n      }\n\n      break;\n\n    case VARIABLE_NOT_INITIALIZED:\n      return 'is not initialized';\n\n    case DESTRUCTURE_NOT_SUPPORTED:\n      return 'is a destructured variable';\n\n    case COULD_NOT_RESOLVE_TYPE:\n      return 'could not be resolved';\n\n    case FUNCTION_CALL_NOT_SUPPORTED:\n      if (error.context && error.context.name) {\n        return \"calls '\".concat(error.context.name, \"'\");\n      }\n\n      return \"calls a function\";\n\n    case REFERENCE_TO_LOCAL_SYMBOL:\n      if (error.context && error.context.name) {\n        return \"references local variable \".concat(error.context.name);\n      }\n\n      return \"references a local variable\";\n  }\n\n  return 'contains the error';\n}\n\nfunction mapStringMap(input, transform) {\n  if (!input) return {};\n  var result = {};\n  Object.keys(input).forEach(function (key) {\n    var value = transform(input[key], key);\n\n    if (!shouldIgnore(value)) {\n      if (HIDDEN_KEY.test(key)) {\n        Object.defineProperty(result, key, {\n          enumerable: false,\n          configurable: true,\n          value: value\n        });\n      } else {\n        result[key] = value;\n      }\n    }\n  });\n  return result;\n}\n\nfunction isPrimitive(o) {\n  return o === null || typeof o !== 'function' && typeof o !== 'object';\n}\n\nvar BindingScope$1 = /*@__PURE__*/function () {\n  var BindingScope$1 = /*#__PURE__*/function () {\n    function BindingScope$1() {\n      _classCallCheck(this, BindingScope$1);\n    }\n\n    _createClass(BindingScope$1, null, [{\n      key: \"build\",\n      value: function build() {\n        var current = new Map();\n        return {\n          define: function define(name, value) {\n            current.set(name, value);\n            return this;\n          },\n          done: function done() {\n            return current.size > 0 ? new PopulatedScope(current) : BindingScope$1.empty;\n          }\n        };\n      }\n    }]);\n\n    return BindingScope$1;\n  }();\n\n  BindingScope$1.missing = {};\n  BindingScope$1.empty = {\n    resolve: function resolve(name) {\n      return BindingScope$1.missing;\n    }\n  };\n  return BindingScope$1;\n}();\n\nvar PopulatedScope = /*#__PURE__*/function (_BindingScope$) {\n  _inherits(PopulatedScope, _BindingScope$);\n\n  var _super111 = _createSuper(PopulatedScope);\n\n  function PopulatedScope(bindings) {\n    var _this292;\n\n    _classCallCheck(this, PopulatedScope);\n\n    _this292 = _super111.call(this);\n    _this292.bindings = bindings;\n    return _this292;\n  }\n\n  _createClass(PopulatedScope, [{\n    key: \"resolve\",\n    value: function resolve(name) {\n      return this.bindings.has(name) ? this.bindings.get(name) : BindingScope$1.missing;\n    }\n  }]);\n\n  return PopulatedScope;\n}(BindingScope$1);\n\nfunction formatMetadataMessageChain(chain, advise) {\n  var expanded = expandedMessage(chain.message, chain.context);\n  var nesting = chain.symbol ? \" in '\".concat(chain.symbol.name, \"'\") : '';\n  var message = \"\".concat(expanded).concat(nesting);\n  var position = chain.position;\n  var next = chain.next ? formatMetadataMessageChain(chain.next, advise) : advise ? {\n    message: advise\n  } : undefined;\n  return {\n    message: message,\n    position: position,\n    next: next ? [next] : undefined\n  };\n}\n\nfunction formatMetadataError(e, context) {\n  if (isMetadataError(e)) {\n    // Produce a formatted version of the and leaving enough information in the original error\n    // to recover the formatting information to eventually produce a diagnostic error message.\n    var position = e.position;\n    var chain = {\n      message: \"Error during template compile of '\".concat(context.name, \"'\"),\n      position: position,\n      next: {\n        message: e.message,\n        next: e.chain,\n        context: e.context,\n        symbol: e.symbol\n      }\n    };\n    var advise = e.advise || messageAdvise(e.message, e.context);\n    return formattedError(formatMetadataMessageChain(chain, advise));\n  }\n\n  return e;\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar AotSummaryResolver = /*#__PURE__*/function () {\n  function AotSummaryResolver(host, staticSymbolCache) {\n    _classCallCheck(this, AotSummaryResolver);\n\n    this.host = host;\n    this.staticSymbolCache = staticSymbolCache; // Note: this will only contain StaticSymbols without members!\n\n    this.summaryCache = new Map();\n    this.loadedFilePaths = new Map(); // Note: this will only contain StaticSymbols without members!\n\n    this.importAs = new Map();\n    this.knownFileNameToModuleNames = new Map();\n  }\n\n  _createClass(AotSummaryResolver, [{\n    key: \"isLibraryFile\",\n    value: function isLibraryFile(filePath) {\n      // Note: We need to strip the .ngfactory. file path,\n      // so this method also works for generated files\n      // (for which host.isSourceFile will always return false).\n      return !this.host.isSourceFile(stripGeneratedFileSuffix(filePath));\n    }\n  }, {\n    key: \"toSummaryFileName\",\n    value: function toSummaryFileName(filePath, referringSrcFileName) {\n      return this.host.toSummaryFileName(filePath, referringSrcFileName);\n    }\n  }, {\n    key: \"fromSummaryFileName\",\n    value: function fromSummaryFileName(fileName, referringLibFileName) {\n      return this.host.fromSummaryFileName(fileName, referringLibFileName);\n    }\n  }, {\n    key: \"resolveSummary\",\n    value: function resolveSummary(staticSymbol) {\n      var rootSymbol = staticSymbol.members.length ? this.staticSymbolCache.get(staticSymbol.filePath, staticSymbol.name) : staticSymbol;\n      var summary = this.summaryCache.get(rootSymbol);\n\n      if (!summary) {\n        this._loadSummaryFile(staticSymbol.filePath);\n\n        summary = this.summaryCache.get(staticSymbol);\n      }\n\n      return rootSymbol === staticSymbol && summary || null;\n    }\n  }, {\n    key: \"getSymbolsOf\",\n    value: function getSymbolsOf(filePath) {\n      if (this._loadSummaryFile(filePath)) {\n        return Array.from(this.summaryCache.keys()).filter(function (symbol) {\n          return symbol.filePath === filePath;\n        });\n      }\n\n      return null;\n    }\n  }, {\n    key: \"getImportAs\",\n    value: function getImportAs(staticSymbol) {\n      staticSymbol.assertNoMembers();\n      return this.importAs.get(staticSymbol);\n    }\n    /**\n     * Converts a file path to a module name that can be used as an `import`.\n     */\n\n  }, {\n    key: \"getKnownModuleName\",\n    value: function getKnownModuleName(importedFilePath) {\n      return this.knownFileNameToModuleNames.get(importedFilePath) || null;\n    }\n  }, {\n    key: \"addSummary\",\n    value: function addSummary(summary) {\n      this.summaryCache.set(summary.symbol, summary);\n    }\n  }, {\n    key: \"_loadSummaryFile\",\n    value: function _loadSummaryFile(filePath) {\n      var _this293 = this;\n\n      var hasSummary = this.loadedFilePaths.get(filePath);\n\n      if (hasSummary != null) {\n        return hasSummary;\n      }\n\n      var json = null;\n\n      if (this.isLibraryFile(filePath)) {\n        var summaryFilePath = summaryFileName(filePath);\n\n        try {\n          json = this.host.loadSummary(summaryFilePath);\n        } catch (e) {\n          console.error(\"Error loading summary file \".concat(summaryFilePath));\n          throw e;\n        }\n      }\n\n      hasSummary = json != null;\n      this.loadedFilePaths.set(filePath, hasSummary);\n\n      if (json) {\n        var _deserializeSummaries = deserializeSummaries(this.staticSymbolCache, this, filePath, json),\n            moduleName = _deserializeSummaries.moduleName,\n            summaries = _deserializeSummaries.summaries,\n            importAs = _deserializeSummaries.importAs;\n\n        summaries.forEach(function (summary) {\n          return _this293.summaryCache.set(summary.symbol, summary);\n        });\n\n        if (moduleName) {\n          this.knownFileNameToModuleNames.set(filePath, moduleName);\n        }\n\n        importAs.forEach(function (importAs) {\n          _this293.importAs.set(importAs.symbol, importAs.importAs);\n        });\n      }\n\n      return hasSummary;\n    }\n  }]);\n\n  return AotSummaryResolver;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nfunction createAotUrlResolver(host) {\n  return {\n    resolve: function resolve(basePath, url) {\n      var filePath = host.resourceNameToFileName(url, basePath);\n\n      if (!filePath) {\n        throw syntaxError(\"Couldn't resolve resource \".concat(url, \" from \").concat(basePath));\n      }\n\n      return filePath;\n    }\n  };\n}\n/**\n * Creates a new AotCompiler based on options and a host.\n */\n\n\nfunction createAotCompiler(compilerHost, options, errorCollector) {\n  var translations = options.translations || '';\n  var urlResolver = createAotUrlResolver(compilerHost);\n  var symbolCache = new StaticSymbolCache();\n  var summaryResolver = new AotSummaryResolver(compilerHost, symbolCache);\n  var symbolResolver = new StaticSymbolResolver(compilerHost, symbolCache, summaryResolver);\n  var staticReflector = new StaticReflector(summaryResolver, symbolResolver, [], [], errorCollector);\n  var htmlParser;\n\n  if (!!options.enableIvy) {\n    // Ivy handles i18n at the compiler level so we must use a regular parser\n    htmlParser = new HtmlParser();\n  } else {\n    htmlParser = new I18NHtmlParser(new HtmlParser(), translations, options.i18nFormat, options.missingTranslation, console);\n  }\n\n  var config = new CompilerConfig({\n    defaultEncapsulation: ViewEncapsulation.Emulated,\n    useJit: false,\n    missingTranslation: options.missingTranslation,\n    preserveWhitespaces: options.preserveWhitespaces,\n    strictInjectionParameters: options.strictInjectionParameters\n  });\n  var normalizer = new DirectiveNormalizer({\n    get: function get(url) {\n      return compilerHost.loadResource(url);\n    }\n  }, urlResolver, htmlParser, config);\n  var expressionParser = new Parser$1(new Lexer());\n  var elementSchemaRegistry = new DomElementSchemaRegistry();\n  var tmplParser = new TemplateParser(config, staticReflector, expressionParser, elementSchemaRegistry, htmlParser, console, []);\n  var resolver = new CompileMetadataResolver(config, htmlParser, new NgModuleResolver(staticReflector), new DirectiveResolver(staticReflector), new PipeResolver(staticReflector), summaryResolver, elementSchemaRegistry, normalizer, console, symbolCache, staticReflector, errorCollector); // TODO(vicb): do not pass options.i18nFormat here\n\n  var viewCompiler = new ViewCompiler(staticReflector);\n  var typeCheckCompiler = new TypeCheckCompiler(options, staticReflector);\n  var compiler = new AotCompiler(config, options, compilerHost, staticReflector, resolver, tmplParser, new StyleCompiler(urlResolver), viewCompiler, typeCheckCompiler, new NgModuleCompiler(staticReflector), new InjectableCompiler(staticReflector, !!options.enableIvy), new TypeScriptEmitter(), summaryResolver, symbolResolver);\n  return {\n    compiler: compiler,\n    reflector: staticReflector\n  };\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * @license\n * Copyright Google LLC 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/**\n * @license\n * Copyright Google LLC 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\nvar SummaryResolver = /*#__PURE__*/_createClass(function SummaryResolver() {\n  _classCallCheck(this, SummaryResolver);\n});\n\nvar JitSummaryResolver = /*#__PURE__*/function () {\n  function JitSummaryResolver() {\n    _classCallCheck(this, JitSummaryResolver);\n\n    this._summaries = new Map();\n  }\n\n  _createClass(JitSummaryResolver, [{\n    key: \"isLibraryFile\",\n    value: function isLibraryFile() {\n      return false;\n    }\n  }, {\n    key: \"toSummaryFileName\",\n    value: function toSummaryFileName(fileName) {\n      return fileName;\n    }\n  }, {\n    key: \"fromSummaryFileName\",\n    value: function fromSummaryFileName(fileName) {\n      return fileName;\n    }\n  }, {\n    key: \"resolveSummary\",\n    value: function resolveSummary(reference) {\n      return this._summaries.get(reference) || null;\n    }\n  }, {\n    key: \"getSymbolsOf\",\n    value: function getSymbolsOf() {\n      return [];\n    }\n  }, {\n    key: \"getImportAs\",\n    value: function getImportAs(reference) {\n      return reference;\n    }\n  }, {\n    key: \"getKnownModuleName\",\n    value: function getKnownModuleName(fileName) {\n      return null;\n    }\n  }, {\n    key: \"addSummary\",\n    value: function addSummary(summary) {\n      this._summaries.set(summary.symbol, summary);\n    }\n  }]);\n\n  return JitSummaryResolver;\n}();\n\nfunction interpretStatements(statements, reflector) {\n  var ctx = new _ExecutionContext(null, null, null, new Map());\n  var visitor = new StatementInterpreter(reflector);\n  visitor.visitAllStatements(statements, ctx);\n  var result = {};\n  ctx.exports.forEach(function (exportName) {\n    result[exportName] = ctx.vars.get(exportName);\n  });\n  return result;\n}\n\nfunction _executeFunctionStatements(varNames, varValues, statements, ctx, visitor) {\n  var childCtx = ctx.createChildWihtLocalVars();\n\n  for (var i = 0; i < varNames.length; i++) {\n    childCtx.vars.set(varNames[i], varValues[i]);\n  }\n\n  var result = visitor.visitAllStatements(statements, childCtx);\n  return result ? result.value : null;\n}\n\nvar _ExecutionContext = /*#__PURE__*/function () {\n  function _ExecutionContext(parent, instance, className, vars) {\n    _classCallCheck(this, _ExecutionContext);\n\n    this.parent = parent;\n    this.instance = instance;\n    this.className = className;\n    this.vars = vars;\n    this.exports = [];\n  }\n\n  _createClass(_ExecutionContext, [{\n    key: \"createChildWihtLocalVars\",\n    value: function createChildWihtLocalVars() {\n      return new _ExecutionContext(this, this.instance, this.className, new Map());\n    }\n  }]);\n\n  return _ExecutionContext;\n}();\n\nvar ReturnValue = /*#__PURE__*/_createClass(function ReturnValue(value) {\n  _classCallCheck(this, ReturnValue);\n\n  this.value = value;\n});\n\nfunction createDynamicClass(_classStmt, _ctx, _visitor) {\n  var propertyDescriptors = {};\n\n  _classStmt.getters.forEach(function (getter) {\n    // Note: use `function` instead of arrow function to capture `this`\n    propertyDescriptors[getter.name] = {\n      configurable: false,\n      get: function get() {\n        var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);\n        return _executeFunctionStatements([], [], getter.body, instanceCtx, _visitor);\n      }\n    };\n  });\n\n  _classStmt.methods.forEach(function (method) {\n    var paramNames = method.params.map(function (param) {\n      return param.name;\n    }); // Note: use `function` instead of arrow function to capture `this`\n\n    propertyDescriptors[method.name] = {\n      writable: false,\n      configurable: false,\n      value: function value() {\n        var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);\n\n        for (var _len5 = arguments.length, args = new Array(_len5), _key6 = 0; _key6 < _len5; _key6++) {\n          args[_key6] = arguments[_key6];\n        }\n\n        return _executeFunctionStatements(paramNames, args, method.body, instanceCtx, _visitor);\n      }\n    };\n  });\n\n  var ctorParamNames = _classStmt.constructorMethod.params.map(function (param) {\n    return param.name;\n  }); // Note: use `function` instead of arrow function to capture `this`\n\n\n  var ctor = function ctor() {\n    var _this294 = this;\n\n    var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);\n\n    _classStmt.fields.forEach(function (field) {\n      _this294[field.name] = undefined;\n    });\n\n    for (var _len6 = arguments.length, args = new Array(_len6), _key7 = 0; _key7 < _len6; _key7++) {\n      args[_key7] = arguments[_key7];\n    }\n\n    _executeFunctionStatements(ctorParamNames, args, _classStmt.constructorMethod.body, instanceCtx, _visitor);\n  };\n\n  var superClass = _classStmt.parent ? _classStmt.parent.visitExpression(_visitor, _ctx) : Object;\n  ctor.prototype = Object.create(superClass.prototype, propertyDescriptors);\n  return ctor;\n}\n\nvar StatementInterpreter = /*#__PURE__*/function () {\n  function StatementInterpreter(reflector) {\n    _classCallCheck(this, StatementInterpreter);\n\n    this.reflector = reflector;\n  }\n\n  _createClass(StatementInterpreter, [{\n    key: \"debugAst\",\n    value: function debugAst(ast) {\n      return debugOutputAstAsTypeScript(ast);\n    }\n  }, {\n    key: \"visitDeclareVarStmt\",\n    value: function visitDeclareVarStmt(stmt, ctx) {\n      var initialValue = stmt.value ? stmt.value.visitExpression(this, ctx) : undefined;\n      ctx.vars.set(stmt.name, initialValue);\n\n      if (stmt.hasModifier(StmtModifier.Exported)) {\n        ctx.exports.push(stmt.name);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitWriteVarExpr\",\n    value: function visitWriteVarExpr(expr, ctx) {\n      var value = expr.value.visitExpression(this, ctx);\n      var currCtx = ctx;\n\n      while (currCtx != null) {\n        if (currCtx.vars.has(expr.name)) {\n          currCtx.vars.set(expr.name, value);\n          return value;\n        }\n\n        currCtx = currCtx.parent;\n      }\n\n      throw new Error(\"Not declared variable \".concat(expr.name));\n    }\n  }, {\n    key: \"visitWrappedNodeExpr\",\n    value: function visitWrappedNodeExpr(ast, ctx) {\n      throw new Error('Cannot interpret a WrappedNodeExpr.');\n    }\n  }, {\n    key: \"visitTypeofExpr\",\n    value: function visitTypeofExpr(ast, ctx) {\n      throw new Error('Cannot interpret a TypeofExpr');\n    }\n  }, {\n    key: \"visitReadVarExpr\",\n    value: function visitReadVarExpr(ast, ctx) {\n      var varName = ast.name;\n\n      if (ast.builtin != null) {\n        switch (ast.builtin) {\n          case BuiltinVar.Super:\n            return Object.getPrototypeOf(ctx.instance);\n\n          case BuiltinVar.This:\n            return ctx.instance;\n\n          case BuiltinVar.CatchError:\n            varName = CATCH_ERROR_VAR$2;\n            break;\n\n          case BuiltinVar.CatchStack:\n            varName = CATCH_STACK_VAR$2;\n            break;\n\n          default:\n            throw new Error(\"Unknown builtin variable \".concat(ast.builtin));\n        }\n      }\n\n      var currCtx = ctx;\n\n      while (currCtx != null) {\n        if (currCtx.vars.has(varName)) {\n          return currCtx.vars.get(varName);\n        }\n\n        currCtx = currCtx.parent;\n      }\n\n      throw new Error(\"Not declared variable \".concat(varName));\n    }\n  }, {\n    key: \"visitWriteKeyExpr\",\n    value: function visitWriteKeyExpr(expr, ctx) {\n      var receiver = expr.receiver.visitExpression(this, ctx);\n      var index = expr.index.visitExpression(this, ctx);\n      var value = expr.value.visitExpression(this, ctx);\n      receiver[index] = value;\n      return value;\n    }\n  }, {\n    key: \"visitWritePropExpr\",\n    value: function visitWritePropExpr(expr, ctx) {\n      var receiver = expr.receiver.visitExpression(this, ctx);\n      var value = expr.value.visitExpression(this, ctx);\n      receiver[expr.name] = value;\n      return value;\n    }\n  }, {\n    key: \"visitInvokeMethodExpr\",\n    value: function visitInvokeMethodExpr(expr, ctx) {\n      var receiver = expr.receiver.visitExpression(this, ctx);\n      var args = this.visitAllExpressions(expr.args, ctx);\n      var result;\n\n      if (expr.builtin != null) {\n        switch (expr.builtin) {\n          case BuiltinMethod.ConcatArray:\n            result = receiver.concat.apply(receiver, _toConsumableArray(args));\n            break;\n\n          case BuiltinMethod.SubscribeObservable:\n            result = receiver.subscribe({\n              next: args[0]\n            });\n            break;\n\n          case BuiltinMethod.Bind:\n            result = receiver.bind.apply(receiver, _toConsumableArray(args));\n            break;\n\n          default:\n            throw new Error(\"Unknown builtin method \".concat(expr.builtin));\n        }\n      } else {\n        result = receiver[expr.name].apply(receiver, args);\n      }\n\n      return result;\n    }\n  }, {\n    key: \"visitInvokeFunctionExpr\",\n    value: function visitInvokeFunctionExpr(stmt, ctx) {\n      var args = this.visitAllExpressions(stmt.args, ctx);\n      var fnExpr = stmt.fn;\n\n      if (fnExpr instanceof ReadVarExpr && fnExpr.builtin === BuiltinVar.Super) {\n        ctx.instance.constructor.prototype.constructor.apply(ctx.instance, args);\n        return null;\n      } else {\n        var _fn = stmt.fn.visitExpression(this, ctx);\n\n        return _fn.apply(null, args);\n      }\n    }\n  }, {\n    key: \"visitTaggedTemplateExpr\",\n    value: function visitTaggedTemplateExpr(expr, ctx) {\n      var templateElements = expr.template.elements.map(function (e) {\n        return e.text;\n      });\n      Object.defineProperty(templateElements, 'raw', {\n        value: expr.template.elements.map(function (e) {\n          return e.rawText;\n        })\n      });\n      var args = this.visitAllExpressions(expr.template.expressions, ctx);\n      args.unshift(templateElements);\n      var tag = expr.tag.visitExpression(this, ctx);\n      return tag.apply(null, args);\n    }\n  }, {\n    key: \"visitReturnStmt\",\n    value: function visitReturnStmt(stmt, ctx) {\n      return new ReturnValue(stmt.value.visitExpression(this, ctx));\n    }\n  }, {\n    key: \"visitDeclareClassStmt\",\n    value: function visitDeclareClassStmt(stmt, ctx) {\n      var clazz = createDynamicClass(stmt, ctx, this);\n      ctx.vars.set(stmt.name, clazz);\n\n      if (stmt.hasModifier(StmtModifier.Exported)) {\n        ctx.exports.push(stmt.name);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitExpressionStmt\",\n    value: function visitExpressionStmt(stmt, ctx) {\n      return stmt.expr.visitExpression(this, ctx);\n    }\n  }, {\n    key: \"visitIfStmt\",\n    value: function visitIfStmt(stmt, ctx) {\n      var condition = stmt.condition.visitExpression(this, ctx);\n\n      if (condition) {\n        return this.visitAllStatements(stmt.trueCase, ctx);\n      } else if (stmt.falseCase != null) {\n        return this.visitAllStatements(stmt.falseCase, ctx);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitTryCatchStmt\",\n    value: function visitTryCatchStmt(stmt, ctx) {\n      try {\n        return this.visitAllStatements(stmt.bodyStmts, ctx);\n      } catch (e) {\n        var childCtx = ctx.createChildWihtLocalVars();\n        childCtx.vars.set(CATCH_ERROR_VAR$2, e);\n        childCtx.vars.set(CATCH_STACK_VAR$2, e.stack);\n        return this.visitAllStatements(stmt.catchStmts, childCtx);\n      }\n    }\n  }, {\n    key: \"visitThrowStmt\",\n    value: function visitThrowStmt(stmt, ctx) {\n      throw stmt.error.visitExpression(this, ctx);\n    }\n  }, {\n    key: \"visitInstantiateExpr\",\n    value: function visitInstantiateExpr(ast, ctx) {\n      var args = this.visitAllExpressions(ast.args, ctx);\n      var clazz = ast.classExpr.visitExpression(this, ctx);\n      return _construct(clazz, _toConsumableArray(args));\n    }\n  }, {\n    key: \"visitLiteralExpr\",\n    value: function visitLiteralExpr(ast, ctx) {\n      return ast.value;\n    }\n  }, {\n    key: \"visitLocalizedString\",\n    value: function visitLocalizedString(ast, context) {\n      return null;\n    }\n  }, {\n    key: \"visitExternalExpr\",\n    value: function visitExternalExpr(ast, ctx) {\n      return this.reflector.resolveExternalReference(ast.value);\n    }\n  }, {\n    key: \"visitConditionalExpr\",\n    value: function visitConditionalExpr(ast, ctx) {\n      if (ast.condition.visitExpression(this, ctx)) {\n        return ast.trueCase.visitExpression(this, ctx);\n      } else if (ast.falseCase != null) {\n        return ast.falseCase.visitExpression(this, ctx);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitNotExpr\",\n    value: function visitNotExpr(ast, ctx) {\n      return !ast.condition.visitExpression(this, ctx);\n    }\n  }, {\n    key: \"visitAssertNotNullExpr\",\n    value: function visitAssertNotNullExpr(ast, ctx) {\n      return ast.condition.visitExpression(this, ctx);\n    }\n  }, {\n    key: \"visitCastExpr\",\n    value: function visitCastExpr(ast, ctx) {\n      return ast.value.visitExpression(this, ctx);\n    }\n  }, {\n    key: \"visitFunctionExpr\",\n    value: function visitFunctionExpr(ast, ctx) {\n      var paramNames = ast.params.map(function (param) {\n        return param.name;\n      });\n      return _declareFn(paramNames, ast.statements, ctx, this);\n    }\n  }, {\n    key: \"visitDeclareFunctionStmt\",\n    value: function visitDeclareFunctionStmt(stmt, ctx) {\n      var paramNames = stmt.params.map(function (param) {\n        return param.name;\n      });\n      ctx.vars.set(stmt.name, _declareFn(paramNames, stmt.statements, ctx, this));\n\n      if (stmt.hasModifier(StmtModifier.Exported)) {\n        ctx.exports.push(stmt.name);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"visitUnaryOperatorExpr\",\n    value: function visitUnaryOperatorExpr(ast, ctx) {\n      var _this295 = this;\n\n      var rhs = function rhs() {\n        return ast.expr.visitExpression(_this295, ctx);\n      };\n\n      switch (ast.operator) {\n        case UnaryOperator.Plus:\n          return +rhs();\n\n        case UnaryOperator.Minus:\n          return -rhs();\n\n        default:\n          throw new Error(\"Unknown operator \".concat(ast.operator));\n      }\n    }\n  }, {\n    key: \"visitBinaryOperatorExpr\",\n    value: function visitBinaryOperatorExpr(ast, ctx) {\n      var _this296 = this;\n\n      var _a;\n\n      var lhs = function lhs() {\n        return ast.lhs.visitExpression(_this296, ctx);\n      };\n\n      var rhs = function rhs() {\n        return ast.rhs.visitExpression(_this296, ctx);\n      };\n\n      switch (ast.operator) {\n        case BinaryOperator.Equals:\n          return lhs() == rhs();\n\n        case BinaryOperator.Identical:\n          return lhs() === rhs();\n\n        case BinaryOperator.NotEquals:\n          return lhs() != rhs();\n\n        case BinaryOperator.NotIdentical:\n          return lhs() !== rhs();\n\n        case BinaryOperator.And:\n          return lhs() && rhs();\n\n        case BinaryOperator.Or:\n          return lhs() || rhs();\n\n        case BinaryOperator.Plus:\n          return lhs() + rhs();\n\n        case BinaryOperator.Minus:\n          return lhs() - rhs();\n\n        case BinaryOperator.Divide:\n          return lhs() / rhs();\n\n        case BinaryOperator.Multiply:\n          return lhs() * rhs();\n\n        case BinaryOperator.Modulo:\n          return lhs() % rhs();\n\n        case BinaryOperator.Lower:\n          return lhs() < rhs();\n\n        case BinaryOperator.LowerEquals:\n          return lhs() <= rhs();\n\n        case BinaryOperator.Bigger:\n          return lhs() > rhs();\n\n        case BinaryOperator.BiggerEquals:\n          return lhs() >= rhs();\n\n        case BinaryOperator.NullishCoalesce:\n          return (_a = lhs()) !== null && _a !== void 0 ? _a : rhs();\n\n        default:\n          throw new Error(\"Unknown operator \".concat(ast.operator));\n      }\n    }\n  }, {\n    key: \"visitReadPropExpr\",\n    value: function visitReadPropExpr(ast, ctx) {\n      var result;\n      var receiver = ast.receiver.visitExpression(this, ctx);\n      result = receiver[ast.name];\n      return result;\n    }\n  }, {\n    key: \"visitReadKeyExpr\",\n    value: function visitReadKeyExpr(ast, ctx) {\n      var receiver = ast.receiver.visitExpression(this, ctx);\n      var prop = ast.index.visitExpression(this, ctx);\n      return receiver[prop];\n    }\n  }, {\n    key: \"visitLiteralArrayExpr\",\n    value: function visitLiteralArrayExpr(ast, ctx) {\n      return this.visitAllExpressions(ast.entries, ctx);\n    }\n  }, {\n    key: \"visitLiteralMapExpr\",\n    value: function visitLiteralMapExpr(ast, ctx) {\n      var _this297 = this;\n\n      var result = {};\n      ast.entries.forEach(function (entry) {\n        return result[entry.key] = entry.value.visitExpression(_this297, ctx);\n      });\n      return result;\n    }\n  }, {\n    key: \"visitCommaExpr\",\n    value: function visitCommaExpr(ast, context) {\n      var values = this.visitAllExpressions(ast.parts, context);\n      return values[values.length - 1];\n    }\n  }, {\n    key: \"visitAllExpressions\",\n    value: function visitAllExpressions(expressions, ctx) {\n      var _this298 = this;\n\n      return expressions.map(function (expr) {\n        return expr.visitExpression(_this298, ctx);\n      });\n    }\n  }, {\n    key: \"visitAllStatements\",\n    value: function visitAllStatements(statements, ctx) {\n      for (var i = 0; i < statements.length; i++) {\n        var stmt = statements[i];\n        var val = stmt.visitStatement(this, ctx);\n\n        if (val instanceof ReturnValue) {\n          return val;\n        }\n      }\n\n      return null;\n    }\n  }]);\n\n  return StatementInterpreter;\n}();\n\nfunction _declareFn(varNames, statements, ctx, visitor) {\n  return function () {\n    for (var _len7 = arguments.length, args = new Array(_len7), _key8 = 0; _key8 < _len7; _key8++) {\n      args[_key8] = arguments[_key8];\n    }\n\n    return _executeFunctionStatements(varNames, args, statements, ctx, visitor);\n  };\n}\n\nvar CATCH_ERROR_VAR$2 = 'error';\nvar CATCH_STACK_VAR$2 = 'stack';\n/**\n * @license\n * Copyright Google LLC 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/**\n * An internal module of the Angular compiler that begins with component types,\n * extracts templates, and eventually produces a compiled version of the component\n * ready for linking into an application.\n *\n * @security  When compiling templates at runtime, you must ensure that the entire template comes\n * from a trusted source. Attacker-controlled data introduced by a template could expose your\n * application to XSS risks.  For more detail, see the [Security Guide](https://g.co/ng/security).\n */\n\nvar JitCompiler = /*#__PURE__*/function () {\n  function JitCompiler(_metadataResolver, _templateParser, _styleCompiler, _viewCompiler, _ngModuleCompiler, _summaryResolver, _reflector, _jitEvaluator, _compilerConfig, _console, getExtraNgModuleProviders) {\n    _classCallCheck(this, JitCompiler);\n\n    this._metadataResolver = _metadataResolver;\n    this._templateParser = _templateParser;\n    this._styleCompiler = _styleCompiler;\n    this._viewCompiler = _viewCompiler;\n    this._ngModuleCompiler = _ngModuleCompiler;\n    this._summaryResolver = _summaryResolver;\n    this._reflector = _reflector;\n    this._jitEvaluator = _jitEvaluator;\n    this._compilerConfig = _compilerConfig;\n    this._console = _console;\n    this.getExtraNgModuleProviders = getExtraNgModuleProviders;\n    this._compiledTemplateCache = new Map();\n    this._compiledHostTemplateCache = new Map();\n    this._compiledDirectiveWrapperCache = new Map();\n    this._compiledNgModuleCache = new Map();\n    this._sharedStylesheetCount = 0;\n    this._addedAotSummaries = new Set();\n  }\n\n  _createClass(JitCompiler, [{\n    key: \"compileModuleSync\",\n    value: function compileModuleSync(moduleType) {\n      return SyncAsync.assertSync(this._compileModuleAndComponents(moduleType, true));\n    }\n  }, {\n    key: \"compileModuleAsync\",\n    value: function compileModuleAsync(moduleType) {\n      return Promise.resolve(this._compileModuleAndComponents(moduleType, false));\n    }\n  }, {\n    key: \"compileModuleAndAllComponentsSync\",\n    value: function compileModuleAndAllComponentsSync(moduleType) {\n      return SyncAsync.assertSync(this._compileModuleAndAllComponents(moduleType, true));\n    }\n  }, {\n    key: \"compileModuleAndAllComponentsAsync\",\n    value: function compileModuleAndAllComponentsAsync(moduleType) {\n      return Promise.resolve(this._compileModuleAndAllComponents(moduleType, false));\n    }\n  }, {\n    key: \"getComponentFactory\",\n    value: function getComponentFactory(component) {\n      var summary = this._metadataResolver.getDirectiveSummary(component);\n\n      return summary.componentFactory;\n    }\n  }, {\n    key: \"loadAotSummaries\",\n    value: function loadAotSummaries(summaries) {\n      this.clearCache();\n\n      this._addAotSummaries(summaries);\n    }\n  }, {\n    key: \"_addAotSummaries\",\n    value: function _addAotSummaries(fn) {\n      if (this._addedAotSummaries.has(fn)) {\n        return;\n      }\n\n      this._addedAotSummaries.add(fn);\n\n      var summaries = fn();\n\n      for (var i = 0; i < summaries.length; i++) {\n        var entry = summaries[i];\n\n        if (typeof entry === 'function') {\n          this._addAotSummaries(entry);\n        } else {\n          var summary = entry;\n\n          this._summaryResolver.addSummary({\n            symbol: summary.type.reference,\n            metadata: null,\n            type: summary\n          });\n        }\n      }\n    }\n  }, {\n    key: \"hasAotSummary\",\n    value: function hasAotSummary(ref) {\n      return !!this._summaryResolver.resolveSummary(ref);\n    }\n  }, {\n    key: \"_filterJitIdentifiers\",\n    value: function _filterJitIdentifiers(ids) {\n      var _this299 = this;\n\n      return ids.map(function (mod) {\n        return mod.reference;\n      }).filter(function (ref) {\n        return !_this299.hasAotSummary(ref);\n      });\n    }\n  }, {\n    key: \"_compileModuleAndComponents\",\n    value: function _compileModuleAndComponents(moduleType, isSync) {\n      var _this300 = this;\n\n      return SyncAsync.then(this._loadModules(moduleType, isSync), function () {\n        _this300._compileComponents(moduleType, null);\n\n        return _this300._compileModule(moduleType);\n      });\n    }\n  }, {\n    key: \"_compileModuleAndAllComponents\",\n    value: function _compileModuleAndAllComponents(moduleType, isSync) {\n      var _this301 = this;\n\n      return SyncAsync.then(this._loadModules(moduleType, isSync), function () {\n        var componentFactories = [];\n\n        _this301._compileComponents(moduleType, componentFactories);\n\n        return {\n          ngModuleFactory: _this301._compileModule(moduleType),\n          componentFactories: componentFactories\n        };\n      });\n    }\n  }, {\n    key: \"_loadModules\",\n    value: function _loadModules(mainModule, isSync) {\n      var _this302 = this;\n\n      var loading = [];\n\n      var mainNgModule = this._metadataResolver.getNgModuleMetadata(mainModule); // Note: for runtime compilation, we want to transitively compile all modules,\n      // so we also need to load the declared directives / pipes for all nested modules.\n\n\n      this._filterJitIdentifiers(mainNgModule.transitiveModule.modules).forEach(function (nestedNgModule) {\n        // getNgModuleMetadata only returns null if the value passed in is not an NgModule\n        var moduleMeta = _this302._metadataResolver.getNgModuleMetadata(nestedNgModule);\n\n        _this302._filterJitIdentifiers(moduleMeta.declaredDirectives).forEach(function (ref) {\n          var promise = _this302._metadataResolver.loadDirectiveMetadata(moduleMeta.type.reference, ref, isSync);\n\n          if (promise) {\n            loading.push(promise);\n          }\n        });\n\n        _this302._filterJitIdentifiers(moduleMeta.declaredPipes).forEach(function (ref) {\n          return _this302._metadataResolver.getOrLoadPipeMetadata(ref);\n        });\n      });\n\n      return SyncAsync.all(loading);\n    }\n  }, {\n    key: \"_compileModule\",\n    value: function _compileModule(moduleType) {\n      var ngModuleFactory = this._compiledNgModuleCache.get(moduleType);\n\n      if (!ngModuleFactory) {\n        var moduleMeta = this._metadataResolver.getNgModuleMetadata(moduleType); // Always provide a bound Compiler\n\n\n        var extraProviders = this.getExtraNgModuleProviders(moduleMeta.type.reference);\n        var outputCtx = createOutputContext();\n\n        var compileResult = this._ngModuleCompiler.compile(outputCtx, moduleMeta, extraProviders);\n\n        ngModuleFactory = this._interpretOrJit(ngModuleJitUrl(moduleMeta), outputCtx.statements)[compileResult.ngModuleFactoryVar];\n\n        this._compiledNgModuleCache.set(moduleMeta.type.reference, ngModuleFactory);\n      }\n\n      return ngModuleFactory;\n    }\n    /**\n     * @internal\n     */\n\n  }, {\n    key: \"_compileComponents\",\n    value: function _compileComponents(mainModule, allComponentFactories) {\n      var _this303 = this;\n\n      var ngModule = this._metadataResolver.getNgModuleMetadata(mainModule);\n\n      var moduleByJitDirective = new Map();\n      var templates = new Set();\n\n      var transJitModules = this._filterJitIdentifiers(ngModule.transitiveModule.modules);\n\n      transJitModules.forEach(function (localMod) {\n        var localModuleMeta = _this303._metadataResolver.getNgModuleMetadata(localMod);\n\n        _this303._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {\n          moduleByJitDirective.set(dirRef, localModuleMeta);\n\n          var dirMeta = _this303._metadataResolver.getDirectiveMetadata(dirRef);\n\n          if (dirMeta.isComponent) {\n            templates.add(_this303._createCompiledTemplate(dirMeta, localModuleMeta));\n\n            if (allComponentFactories) {\n              var template = _this303._createCompiledHostTemplate(dirMeta.type.reference, localModuleMeta);\n\n              templates.add(template);\n              allComponentFactories.push(dirMeta.componentFactory);\n            }\n          }\n        });\n      });\n      transJitModules.forEach(function (localMod) {\n        var localModuleMeta = _this303._metadataResolver.getNgModuleMetadata(localMod);\n\n        _this303._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {\n          var dirMeta = _this303._metadataResolver.getDirectiveMetadata(dirRef);\n\n          if (dirMeta.isComponent) {\n            dirMeta.entryComponents.forEach(function (entryComponentType) {\n              var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);\n              templates.add(_this303._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));\n            });\n          }\n        });\n\n        localModuleMeta.entryComponents.forEach(function (entryComponentType) {\n          if (!_this303.hasAotSummary(entryComponentType.componentType)) {\n            var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);\n            templates.add(_this303._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));\n          }\n        });\n      });\n      templates.forEach(function (template) {\n        return _this303._compileTemplate(template);\n      });\n    }\n  }, {\n    key: \"clearCacheFor\",\n    value: function clearCacheFor(type) {\n      this._compiledNgModuleCache.delete(type);\n\n      this._metadataResolver.clearCacheFor(type);\n\n      this._compiledHostTemplateCache.delete(type);\n\n      var compiledTemplate = this._compiledTemplateCache.get(type);\n\n      if (compiledTemplate) {\n        this._compiledTemplateCache.delete(type);\n      }\n    }\n  }, {\n    key: \"clearCache\",\n    value: function clearCache() {\n      // Note: don't clear the _addedAotSummaries, as they don't change!\n      this._metadataResolver.clearCache();\n\n      this._compiledTemplateCache.clear();\n\n      this._compiledHostTemplateCache.clear();\n\n      this._compiledNgModuleCache.clear();\n    }\n  }, {\n    key: \"_createCompiledHostTemplate\",\n    value: function _createCompiledHostTemplate(compType, ngModule) {\n      if (!ngModule) {\n        throw new Error(\"Component \".concat(stringify(compType), \" is not part of any NgModule or the module has not been imported into your module.\"));\n      }\n\n      var compiledTemplate = this._compiledHostTemplateCache.get(compType);\n\n      if (!compiledTemplate) {\n        var compMeta = this._metadataResolver.getDirectiveMetadata(compType);\n\n        assertComponent(compMeta);\n\n        var hostMeta = this._metadataResolver.getHostComponentMetadata(compMeta, compMeta.componentFactory.viewDefFactory);\n\n        compiledTemplate = new CompiledTemplate(true, compMeta.type, hostMeta, ngModule, [compMeta.type]);\n\n        this._compiledHostTemplateCache.set(compType, compiledTemplate);\n      }\n\n      return compiledTemplate;\n    }\n  }, {\n    key: \"_createCompiledTemplate\",\n    value: function _createCompiledTemplate(compMeta, ngModule) {\n      var compiledTemplate = this._compiledTemplateCache.get(compMeta.type.reference);\n\n      if (!compiledTemplate) {\n        assertComponent(compMeta);\n        compiledTemplate = new CompiledTemplate(false, compMeta.type, compMeta, ngModule, ngModule.transitiveModule.directives);\n\n        this._compiledTemplateCache.set(compMeta.type.reference, compiledTemplate);\n      }\n\n      return compiledTemplate;\n    }\n  }, {\n    key: \"_compileTemplate\",\n    value: function _compileTemplate(template) {\n      var _this304 = this;\n\n      if (template.isCompiled) {\n        return;\n      }\n\n      var compMeta = template.compMeta;\n      var externalStylesheetsByModuleUrl = new Map();\n      var outputContext = createOutputContext();\n\n      var componentStylesheet = this._styleCompiler.compileComponent(outputContext, compMeta);\n\n      compMeta.template.externalStylesheets.forEach(function (stylesheetMeta) {\n        var compiledStylesheet = _this304._styleCompiler.compileStyles(createOutputContext(), compMeta, stylesheetMeta);\n\n        externalStylesheetsByModuleUrl.set(stylesheetMeta.moduleUrl, compiledStylesheet);\n      });\n\n      this._resolveStylesCompileResult(componentStylesheet, externalStylesheetsByModuleUrl);\n\n      var pipes = template.ngModule.transitiveModule.pipes.map(function (pipe) {\n        return _this304._metadataResolver.getPipeSummary(pipe.reference);\n      });\n\n      var _this$_parseTemplate3 = this._parseTemplate(compMeta, template.ngModule, template.directives),\n          parsedTemplate = _this$_parseTemplate3.template,\n          usedPipes = _this$_parseTemplate3.pipes;\n\n      var compileResult = this._viewCompiler.compileComponent(outputContext, compMeta, parsedTemplate, variable(componentStylesheet.stylesVar), usedPipes);\n\n      var evalResult = this._interpretOrJit(templateJitUrl(template.ngModule.type, template.compMeta), outputContext.statements);\n\n      var viewClass = evalResult[compileResult.viewClassVar];\n      var rendererType = evalResult[compileResult.rendererTypeVar];\n      template.compiled(viewClass, rendererType);\n    }\n  }, {\n    key: \"_parseTemplate\",\n    value: function _parseTemplate(compMeta, ngModule, directiveIdentifiers) {\n      var _this305 = this;\n\n      // Note: ! is ok here as components always have a template.\n      var preserveWhitespaces = compMeta.template.preserveWhitespaces;\n      var directives = directiveIdentifiers.map(function (dir) {\n        return _this305._metadataResolver.getDirectiveSummary(dir.reference);\n      });\n      var pipes = ngModule.transitiveModule.pipes.map(function (pipe) {\n        return _this305._metadataResolver.getPipeSummary(pipe.reference);\n      });\n      return this._templateParser.parse(compMeta, compMeta.template.htmlAst, directives, pipes, ngModule.schemas, templateSourceUrl(ngModule.type, compMeta, compMeta.template), preserveWhitespaces);\n    }\n  }, {\n    key: \"_resolveStylesCompileResult\",\n    value: function _resolveStylesCompileResult(result, externalStylesheetsByModuleUrl) {\n      var _this306 = this;\n\n      result.dependencies.forEach(function (dep, i) {\n        var nestedCompileResult = externalStylesheetsByModuleUrl.get(dep.moduleUrl);\n\n        var nestedStylesArr = _this306._resolveAndEvalStylesCompileResult(nestedCompileResult, externalStylesheetsByModuleUrl);\n\n        dep.setValue(nestedStylesArr);\n      });\n    }\n  }, {\n    key: \"_resolveAndEvalStylesCompileResult\",\n    value: function _resolveAndEvalStylesCompileResult(result, externalStylesheetsByModuleUrl) {\n      this._resolveStylesCompileResult(result, externalStylesheetsByModuleUrl);\n\n      return this._interpretOrJit(sharedStylesheetJitUrl(result.meta, this._sharedStylesheetCount++), result.outputCtx.statements)[result.stylesVar];\n    }\n  }, {\n    key: \"_interpretOrJit\",\n    value: function _interpretOrJit(sourceUrl, statements) {\n      if (!this._compilerConfig.useJit) {\n        return interpretStatements(statements, this._reflector);\n      } else {\n        return this._jitEvaluator.evaluateStatements(sourceUrl, statements, this._reflector, this._compilerConfig.jitDevMode);\n      }\n    }\n  }]);\n\n  return JitCompiler;\n}();\n\nvar CompiledTemplate = /*#__PURE__*/function () {\n  function CompiledTemplate(isHost, compType, compMeta, ngModule, directives) {\n    _classCallCheck(this, CompiledTemplate);\n\n    this.isHost = isHost;\n    this.compType = compType;\n    this.compMeta = compMeta;\n    this.ngModule = ngModule;\n    this.directives = directives;\n    this._viewClass = null;\n    this.isCompiled = false;\n  }\n\n  _createClass(CompiledTemplate, [{\n    key: \"compiled\",\n    value: function compiled(viewClass, rendererType) {\n      this._viewClass = viewClass;\n      this.compMeta.componentViewType.setDelegate(viewClass);\n\n      for (var prop in rendererType) {\n        this.compMeta.rendererType[prop] = rendererType[prop];\n      }\n\n      this.isCompiled = true;\n    }\n  }]);\n\n  return CompiledTemplate;\n}();\n\nfunction assertComponent(meta) {\n  if (!meta.isComponent) {\n    throw new Error(\"Could not compile '\".concat(identifierName(meta.type), \"' because it is not a component.\"));\n  }\n}\n\nfunction createOutputContext() {\n  var importExpr$1 = function importExpr$1(symbol) {\n    return importExpr({\n      name: identifierName(symbol),\n      moduleName: null,\n      runtime: symbol\n    });\n  };\n\n  return {\n    statements: [],\n    genFilePath: '',\n    importExpr: importExpr$1,\n    constantPool: new ConstantPool()\n  };\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Provides access to reflection data about symbols that the compiler needs.\n */\n\n\nvar CompileReflector = /*#__PURE__*/_createClass(function CompileReflector() {\n  _classCallCheck(this, CompileReflector);\n});\n/**\n * @license\n * Copyright Google LLC 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/**\n * Create a {@link UrlResolver} with no package prefix.\n */\n\n\nfunction createUrlResolverWithoutPackagePrefix() {\n  return new UrlResolver();\n}\n\nfunction createOfflineCompileUrlResolver() {\n  return new UrlResolver('.');\n}\n\nvar UrlResolver = /*#__PURE__*/function () {\n  function UrlResolverImpl() {\n    var _packagePrefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n    _classCallCheck(this, UrlResolverImpl);\n\n    this._packagePrefix = _packagePrefix;\n  }\n  /**\n   * Resolves the `url` given the `baseUrl`:\n   * - when the `url` is null, the `baseUrl` is returned,\n   * - if `url` is relative ('path/to/here', './path/to/here'), the resolved url is a combination of\n   * `baseUrl` and `url`,\n   * - if `url` is absolute (it has a scheme: 'http://', 'https://' or start with '/'), the `url` is\n   * returned as is (ignoring the `baseUrl`)\n   */\n\n\n  _createClass(UrlResolverImpl, [{\n    key: \"resolve\",\n    value: function resolve(baseUrl, url) {\n      var resolvedUrl = url;\n\n      if (baseUrl != null && baseUrl.length > 0) {\n        resolvedUrl = _resolveUrl(baseUrl, resolvedUrl);\n      }\n\n      var resolvedParts = _split(resolvedUrl);\n\n      var prefix = this._packagePrefix;\n\n      if (prefix != null && resolvedParts != null && resolvedParts[_ComponentIndex.Scheme] == 'package') {\n        var path = resolvedParts[_ComponentIndex.Path];\n        prefix = prefix.replace(/\\/+$/, '');\n        path = path.replace(/^\\/+/, '');\n        return \"\".concat(prefix, \"/\").concat(path);\n      }\n\n      return resolvedUrl;\n    }\n  }]);\n\n  return UrlResolverImpl;\n}();\n/**\n * Extract the scheme of a URL.\n */\n\n\nfunction getUrlScheme(url) {\n  var match = _split(url);\n\n  return match && match[_ComponentIndex.Scheme] || '';\n} // The code below is adapted from Traceur:\n// https://github.com/google/traceur-compiler/blob/9511c1dafa972bf0de1202a8a863bad02f0f95a8/src/runtime/url.js\n\n/**\n * Builds a URI string from already-encoded parts.\n *\n * No encoding is performed.  Any component may be omitted as either null or\n * undefined.\n *\n * @param opt_scheme The scheme such as 'http'.\n * @param opt_userInfo The user name before the '@'.\n * @param opt_domain The domain such as 'www.google.com', already\n *     URI-encoded.\n * @param opt_port The port number.\n * @param opt_path The path, already URI-encoded.  If it is not\n *     empty, it must begin with a slash.\n * @param opt_queryData The URI-encoded query data.\n * @param opt_fragment The URI-encoded fragment identifier.\n * @return The fully combined URI.\n */\n\n\nfunction _buildFromEncodedParts(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) {\n  var out = [];\n\n  if (opt_scheme != null) {\n    out.push(opt_scheme + ':');\n  }\n\n  if (opt_domain != null) {\n    out.push('//');\n\n    if (opt_userInfo != null) {\n      out.push(opt_userInfo + '@');\n    }\n\n    out.push(opt_domain);\n\n    if (opt_port != null) {\n      out.push(':' + opt_port);\n    }\n  }\n\n  if (opt_path != null) {\n    out.push(opt_path);\n  }\n\n  if (opt_queryData != null) {\n    out.push('?' + opt_queryData);\n  }\n\n  if (opt_fragment != null) {\n    out.push('#' + opt_fragment);\n  }\n\n  return out.join('');\n}\n/**\n * A regular expression for breaking a URI into its component parts.\n *\n * {@link https://tools.ietf.org/html/rfc3986#appendix-B} says\n * As the \"first-match-wins\" algorithm is identical to the \"greedy\"\n * disambiguation method used by POSIX regular expressions, it is natural and\n * commonplace to use a regular expression for parsing the potential five\n * components of a URI reference.\n *\n * The following line is the regular expression for breaking-down a\n * well-formed URI reference into its components.\n *\n * <pre>\n * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?\n *  12            3  4          5       6  7        8 9\n * </pre>\n *\n * The numbers in the second line above are only to assist readability; they\n * indicate the reference points for each subexpression (i.e., each paired\n * parenthesis). We refer to the value matched for subexpression <n> as $<n>.\n * For example, matching the above expression to\n * <pre>\n *     http://www.ics.uci.edu/pub/ietf/uri/#Related\n * </pre>\n * results in the following subexpression matches:\n * <pre>\n *    $1 = http:\n *    $2 = http\n *    $3 = //www.ics.uci.edu\n *    $4 = www.ics.uci.edu\n *    $5 = /pub/ietf/uri/\n *    $6 = <undefined>\n *    $7 = <undefined>\n *    $8 = #Related\n *    $9 = Related\n * </pre>\n * where <undefined> indicates that the component is not present, as is the\n * case for the query component in the above example. Therefore, we can\n * determine the value of the five components as\n * <pre>\n *    scheme    = $2\n *    authority = $4\n *    path      = $5\n *    query     = $7\n *    fragment  = $9\n * </pre>\n *\n * The regular expression has been modified slightly to expose the\n * userInfo, domain, and port separately from the authority.\n * The modified version yields\n * <pre>\n *    $1 = http              scheme\n *    $2 = <undefined>       userInfo -\\\n *    $3 = www.ics.uci.edu   domain     | authority\n *    $4 = <undefined>       port     -/\n *    $5 = /pub/ietf/uri/    path\n *    $6 = <undefined>       query without ?\n *    $7 = Related           fragment without #\n * </pre>\n * @internal\n */\n\n\nvar _splitRe = /*@__PURE__*/new RegExp('^' + '(?:' + '([^:/?#.]+)' + // scheme - ignore special characters\n// used by other URL parts such as :,\n// ?, /, #, and .\n':)?' + '(?://' + '(?:([^/?#]*)@)?' + // userInfo\n\"([\\\\w\\\\d\\\\-\\\\u0100-\\\\uffff.%]*)\" + // domain - restrict to letters,\n// digits, dashes, dots, percent\n// escapes, and unicode characters.\n'(?::([0-9]+))?' + // port\n')?' + '([^?#]+)?' + // path\n'(?:\\\\?([^#]*))?' + // query\n'(?:#(.*))?' + // fragment\n'$');\n/**\n * The index of each URI component in the return value of goog.uri.utils.split.\n * @enum {number}\n */\n\n\nvar _ComponentIndex = /*@__PURE__*/function (_ComponentIndex) {\n  _ComponentIndex[_ComponentIndex[\"Scheme\"] = 1] = \"Scheme\";\n  _ComponentIndex[_ComponentIndex[\"UserInfo\"] = 2] = \"UserInfo\";\n  _ComponentIndex[_ComponentIndex[\"Domain\"] = 3] = \"Domain\";\n  _ComponentIndex[_ComponentIndex[\"Port\"] = 4] = \"Port\";\n  _ComponentIndex[_ComponentIndex[\"Path\"] = 5] = \"Path\";\n  _ComponentIndex[_ComponentIndex[\"QueryData\"] = 6] = \"QueryData\";\n  _ComponentIndex[_ComponentIndex[\"Fragment\"] = 7] = \"Fragment\";\n  return _ComponentIndex;\n}({});\n/**\n * Splits a URI into its component parts.\n *\n * Each component can be accessed via the component indices; for example:\n * <pre>\n * goog.uri.utils.split(someStr)[goog.uri.utils.CompontentIndex.QUERY_DATA];\n * </pre>\n *\n * @param uri The URI string to examine.\n * @return Each component still URI-encoded.\n *     Each component that is present will contain the encoded value, whereas\n *     components that are not present will be undefined or empty, depending\n *     on the browser's regular expression implementation.  Never null, since\n *     arbitrary strings may still look like path names.\n */\n\n\nfunction _split(uri) {\n  return uri.match(_splitRe);\n}\n/**\n * Removes dot segments in given path component, as described in\n * RFC 3986, section 5.2.4.\n *\n * @param path A non-empty path component.\n * @return Path component with removed dot segments.\n */\n\n\nfunction _removeDotSegments(path) {\n  if (path == '/') return '/';\n  var leadingSlash = path[0] == '/' ? '/' : '';\n  var trailingSlash = path[path.length - 1] === '/' ? '/' : '';\n  var segments = path.split('/');\n  var out = [];\n  var up = 0;\n\n  for (var pos = 0; pos < segments.length; pos++) {\n    var segment = segments[pos];\n\n    switch (segment) {\n      case '':\n      case '.':\n        break;\n\n      case '..':\n        if (out.length > 0) {\n          out.pop();\n        } else {\n          up++;\n        }\n\n        break;\n\n      default:\n        out.push(segment);\n    }\n  }\n\n  if (leadingSlash == '') {\n    while (up-- > 0) {\n      out.unshift('..');\n    }\n\n    if (out.length === 0) out.push('.');\n  }\n\n  return leadingSlash + out.join('/') + trailingSlash;\n}\n/**\n * Takes an array of the parts from split and canonicalizes the path part\n * and then joins all the parts.\n */\n\n\nfunction _joinAndCanonicalizePath(parts) {\n  var path = parts[_ComponentIndex.Path];\n  path = path == null ? '' : _removeDotSegments(path);\n  parts[_ComponentIndex.Path] = path;\n  return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n}\n/**\n * Resolves a URL.\n * @param base The URL acting as the base URL.\n * @param to The URL to resolve.\n */\n\n\nfunction _resolveUrl(base, url) {\n  var parts = _split(encodeURI(url));\n\n  var baseParts = _split(base);\n\n  if (parts[_ComponentIndex.Scheme] != null) {\n    return _joinAndCanonicalizePath(parts);\n  } else {\n    parts[_ComponentIndex.Scheme] = baseParts[_ComponentIndex.Scheme];\n  }\n\n  for (var i = _ComponentIndex.Scheme; i <= _ComponentIndex.Port; i++) {\n    if (parts[i] == null) {\n      parts[i] = baseParts[i];\n    }\n  }\n\n  if (parts[_ComponentIndex.Path][0] == '/') {\n    return _joinAndCanonicalizePath(parts);\n  }\n\n  var path = baseParts[_ComponentIndex.Path];\n  if (path == null) path = '/';\n  var index = path.lastIndexOf('/');\n  path = path.substring(0, index + 1) + parts[_ComponentIndex.Path];\n  parts[_ComponentIndex.Path] = path;\n  return _joinAndCanonicalizePath(parts);\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar Extractor = /*#__PURE__*/function () {\n  function Extractor(host, staticSymbolResolver, messageBundle, metadataResolver) {\n    _classCallCheck(this, Extractor);\n\n    this.host = host;\n    this.staticSymbolResolver = staticSymbolResolver;\n    this.messageBundle = messageBundle;\n    this.metadataResolver = metadataResolver;\n  }\n\n  _createClass(Extractor, [{\n    key: \"extract\",\n    value: function extract(rootFiles) {\n      var _this307 = this;\n\n      var _analyzeAndValidateNg = analyzeAndValidateNgModules(rootFiles, this.host, this.staticSymbolResolver, this.metadataResolver),\n          files = _analyzeAndValidateNg.files,\n          ngModules = _analyzeAndValidateNg.ngModules;\n\n      return Promise.all(ngModules.map(function (ngModule) {\n        return _this307.metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false);\n      })).then(function () {\n        var errors = [];\n        files.forEach(function (file) {\n          var compMetas = [];\n          file.directives.forEach(function (directiveType) {\n            var dirMeta = _this307.metadataResolver.getDirectiveMetadata(directiveType);\n\n            if (dirMeta && dirMeta.isComponent) {\n              compMetas.push(dirMeta);\n            }\n          });\n          compMetas.forEach(function (compMeta) {\n            var html = compMeta.template.template; // Template URL points to either an HTML or TS file depending on\n            // whether the file is used with `templateUrl:` or `template:`,\n            // respectively.\n\n            var templateUrl = compMeta.template.templateUrl;\n            var interpolationConfig = InterpolationConfig.fromArray(compMeta.template.interpolation);\n            errors.push.apply(errors, _toConsumableArray(_this307.messageBundle.updateFromTemplate(html, templateUrl, interpolationConfig)));\n          });\n        });\n\n        if (errors.length) {\n          throw new Error(errors.map(function (e) {\n            return e.toString();\n          }).join('\\n'));\n        }\n\n        return _this307.messageBundle;\n      });\n    }\n  }], [{\n    key: \"create\",\n    value: function create(host, locale) {\n      var htmlParser = new HtmlParser();\n      var urlResolver = createAotUrlResolver(host);\n      var symbolCache = new StaticSymbolCache();\n      var summaryResolver = new AotSummaryResolver(host, symbolCache);\n      var staticSymbolResolver = new StaticSymbolResolver(host, symbolCache, summaryResolver);\n      var staticReflector = new StaticReflector(summaryResolver, staticSymbolResolver);\n      var config = new CompilerConfig({\n        defaultEncapsulation: ViewEncapsulation.Emulated,\n        useJit: false\n      });\n      var normalizer = new DirectiveNormalizer({\n        get: function get(url) {\n          return host.loadResource(url);\n        }\n      }, urlResolver, htmlParser, config);\n      var elementSchemaRegistry = new DomElementSchemaRegistry();\n      var resolver = new CompileMetadataResolver(config, htmlParser, new NgModuleResolver(staticReflector), new DirectiveResolver(staticReflector), new PipeResolver(staticReflector), summaryResolver, elementSchemaRegistry, normalizer, console, symbolCache, staticReflector); // TODO(vicb): implicit tags & attributes\n\n      var messageBundle = new MessageBundle(htmlParser, [], {}, locale);\n      var extractor = new Extractor(host, staticSymbolResolver, messageBundle, resolver);\n      return {\n        extractor: extractor,\n        staticReflector: staticReflector\n      };\n    }\n  }]);\n\n  return Extractor;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar FactoryTarget$1 = /*@__PURE__*/function (FactoryTarget) {\n  FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n  FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n  FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n  FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n  FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n  return FactoryTarget;\n}({});\n/**\n * @license\n * Copyright Google LLC 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/**\n * @license\n * Copyright Google LLC 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/**\n * @license\n * Copyright Google LLC 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/**\n * Processes `Target`s with a given set of directives and performs a binding operation, which\n * returns an object similar to TypeScript's `ts.TypeChecker` that contains knowledge about the\n * target.\n */\n\n\nvar R3TargetBinder = /*#__PURE__*/function () {\n  function R3TargetBinder(directiveMatcher) {\n    _classCallCheck(this, R3TargetBinder);\n\n    this.directiveMatcher = directiveMatcher;\n  }\n  /**\n   * Perform a binding operation on the given `Target` and return a `BoundTarget` which contains\n   * metadata about the types referenced in the template.\n   */\n\n\n  _createClass(R3TargetBinder, [{\n    key: \"bind\",\n    value: function bind(target) {\n      if (!target.template) {\n        // TODO(alxhub): handle targets which contain things like HostBindings, etc.\n        throw new Error('Binding without a template not yet supported');\n      } // First, parse the template into a `Scope` structure. This operation captures the syntactic\n      // scopes in the template and makes them available for later use.\n\n\n      var scope = Scope.apply(target.template); // Use the `Scope` to extract the entities present at every level of the template.\n\n      var templateEntities = extractTemplateEntities(scope); // Next, perform directive matching on the template using the `DirectiveBinder`. This returns:\n      //   - directives: Map of nodes (elements & ng-templates) to the directives on them.\n      //   - bindings: Map of inputs, outputs, and attributes to the directive/element that claims\n      //     them. TODO(alxhub): handle multiple directives claiming an input/output/etc.\n      //   - references: Map of #references to their targets.\n\n      var _DirectiveBinder$appl = DirectiveBinder.apply(target.template, this.directiveMatcher),\n          directives = _DirectiveBinder$appl.directives,\n          bindings = _DirectiveBinder$appl.bindings,\n          references = _DirectiveBinder$appl.references; // Finally, run the TemplateBinder to bind references, variables, and other entities within the\n      // template. This extracts all the metadata that doesn't depend on directive matching.\n\n\n      var _TemplateBinder$apply = TemplateBinder.applyWithScope(target.template, scope),\n          expressions = _TemplateBinder$apply.expressions,\n          symbols = _TemplateBinder$apply.symbols,\n          nestingLevel = _TemplateBinder$apply.nestingLevel,\n          usedPipes = _TemplateBinder$apply.usedPipes;\n\n      return new R3BoundTarget(target, directives, bindings, references, expressions, symbols, nestingLevel, templateEntities, usedPipes);\n    }\n  }]);\n\n  return R3TargetBinder;\n}();\n/**\n * Represents a binding scope within a template.\n *\n * Any variables, references, or other named entities declared within the template will\n * be captured and available by name in `namedEntities`. Additionally, child templates will\n * be analyzed and have their child `Scope`s available in `childScopes`.\n */\n\n\nvar Scope = /*#__PURE__*/function () {\n  function Scope(parentScope, template) {\n    _classCallCheck(this, Scope);\n\n    this.parentScope = parentScope;\n    this.template = template;\n    /**\n     * Named members of the `Scope`, such as `Reference`s or `Variable`s.\n     */\n\n    this.namedEntities = new Map();\n    /**\n     * Child `Scope`s for immediately nested `Template`s.\n     */\n\n    this.childScopes = new Map();\n  }\n\n  _createClass(Scope, [{\n    key: \"ingest\",\n    value:\n    /**\n     * Internal method to process the template and populate the `Scope`.\n     */\n    function ingest(template) {\n      var _this308 = this;\n\n      if (template instanceof Template) {\n        // Variables on an <ng-template> are defined in the inner scope.\n        template.variables.forEach(function (node) {\n          return _this308.visitVariable(node);\n        }); // Process the nodes of the template.\n\n        template.children.forEach(function (node) {\n          return node.visit(_this308);\n        });\n      } else {\n        // No overarching `Template` instance, so process the nodes directly.\n        template.forEach(function (node) {\n          return node.visit(_this308);\n        });\n      }\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(element) {\n      var _this309 = this;\n\n      // `Element`s in the template may have `Reference`s which are captured in the scope.\n      element.references.forEach(function (node) {\n        return _this309.visitReference(node);\n      }); // Recurse into the `Element`'s children.\n\n      element.children.forEach(function (node) {\n        return node.visit(_this309);\n      });\n    }\n  }, {\n    key: \"visitTemplate\",\n    value: function visitTemplate(template) {\n      var _this310 = this;\n\n      // References on a <ng-template> are defined in the outer scope, so capture them before\n      // processing the template's child scope.\n      template.references.forEach(function (node) {\n        return _this310.visitReference(node);\n      }); // Next, create an inner scope and process the template within it.\n\n      var scope = new Scope(this, template);\n      scope.ingest(template);\n      this.childScopes.set(template, scope);\n    }\n  }, {\n    key: \"visitVariable\",\n    value: function visitVariable(variable) {\n      // Declare the variable if it's not already.\n      this.maybeDeclare(variable);\n    }\n  }, {\n    key: \"visitReference\",\n    value: function visitReference(reference) {\n      // Declare the variable if it's not already.\n      this.maybeDeclare(reference);\n    } // Unused visitors.\n\n  }, {\n    key: \"visitContent\",\n    value: function visitContent(content) {}\n  }, {\n    key: \"visitBoundAttribute\",\n    value: function visitBoundAttribute(attr) {}\n  }, {\n    key: \"visitBoundEvent\",\n    value: function visitBoundEvent(event) {}\n  }, {\n    key: \"visitBoundText\",\n    value: function visitBoundText(text) {}\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {}\n  }, {\n    key: \"visitTextAttribute\",\n    value: function visitTextAttribute(attr) {}\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu) {}\n  }, {\n    key: \"maybeDeclare\",\n    value: function maybeDeclare(thing) {\n      // Declare something with a name, as long as that name isn't taken.\n      if (!this.namedEntities.has(thing.name)) {\n        this.namedEntities.set(thing.name, thing);\n      }\n    }\n    /**\n     * Look up a variable within this `Scope`.\n     *\n     * This can recurse into a parent `Scope` if it's available.\n     */\n\n  }, {\n    key: \"lookup\",\n    value: function lookup(name) {\n      if (this.namedEntities.has(name)) {\n        // Found in the local scope.\n        return this.namedEntities.get(name);\n      } else if (this.parentScope !== null) {\n        // Not in the local scope, but there's a parent scope so check there.\n        return this.parentScope.lookup(name);\n      } else {\n        // At the top level and it wasn't found.\n        return null;\n      }\n    }\n    /**\n     * Get the child scope for a `Template`.\n     *\n     * This should always be defined.\n     */\n\n  }, {\n    key: \"getChildScope\",\n    value: function getChildScope(template) {\n      var res = this.childScopes.get(template);\n\n      if (res === undefined) {\n        throw new Error(\"Assertion error: child scope for \".concat(template, \" not found\"));\n      }\n\n      return res;\n    }\n  }], [{\n    key: \"newRootScope\",\n    value: function newRootScope() {\n      return new Scope(null, null);\n    }\n    /**\n     * Process a template (either as a `Template` sub-template with variables, or a plain array of\n     * template `Node`s) and construct its `Scope`.\n     */\n\n  }, {\n    key: \"apply\",\n    value: function apply(template) {\n      var scope = Scope.newRootScope();\n      scope.ingest(template);\n      return scope;\n    }\n  }]);\n\n  return Scope;\n}();\n/**\n * Processes a template and matches directives on nodes (elements and templates).\n *\n * Usually used via the static `apply()` method.\n */\n\n\nvar DirectiveBinder = /*#__PURE__*/function () {\n  function DirectiveBinder(matcher, directives, bindings, references) {\n    _classCallCheck(this, DirectiveBinder);\n\n    this.matcher = matcher;\n    this.directives = directives;\n    this.bindings = bindings;\n    this.references = references;\n  }\n  /**\n   * Process a template (list of `Node`s) and perform directive matching against each node.\n   *\n   * @param template the list of template `Node`s to match (recursively).\n   * @param selectorMatcher a `SelectorMatcher` containing the directives that are in scope for\n   * this template.\n   * @returns three maps which contain information about directives in the template: the\n   * `directives` map which lists directives matched on each node, the `bindings` map which\n   * indicates which directives claimed which bindings (inputs, outputs, etc), and the `references`\n   * map which resolves #references (`Reference`s) within the template to the named directive or\n   * template node.\n   */\n\n\n  _createClass(DirectiveBinder, [{\n    key: \"ingest\",\n    value: function ingest(template) {\n      var _this311 = this;\n\n      template.forEach(function (node) {\n        return node.visit(_this311);\n      });\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(element) {\n      this.visitElementOrTemplate(element.name, element);\n    }\n  }, {\n    key: \"visitTemplate\",\n    value: function visitTemplate(template) {\n      this.visitElementOrTemplate('ng-template', template);\n    }\n  }, {\n    key: \"visitElementOrTemplate\",\n    value: function visitElementOrTemplate(elementName, node) {\n      var _this312 = this;\n\n      // First, determine the HTML shape of the node for the purpose of directive matching.\n      // Do this by building up a `CssSelector` for the node.\n      var cssSelector = createCssSelector(elementName, getAttrsForDirectiveMatching(node)); // Next, use the `SelectorMatcher` to get the list of directives on the node.\n\n      var directives = [];\n      this.matcher.match(cssSelector, function (_, directive) {\n        return directives.push(directive);\n      });\n\n      if (directives.length > 0) {\n        this.directives.set(node, directives);\n      } // Resolve any references that are created on this node.\n\n\n      node.references.forEach(function (ref) {\n        var dirTarget = null; // If the reference expression is empty, then it matches the \"primary\" directive on the node\n        // (if there is one). Otherwise it matches the host node itself (either an element or\n        // <ng-template> node).\n\n        if (ref.value.trim() === '') {\n          // This could be a reference to a component if there is one.\n          dirTarget = directives.find(function (dir) {\n            return dir.isComponent;\n          }) || null;\n        } else {\n          // This should be a reference to a directive exported via exportAs.\n          dirTarget = directives.find(function (dir) {\n            return dir.exportAs !== null && dir.exportAs.some(function (value) {\n              return value === ref.value;\n            });\n          }) || null; // Check if a matching directive was found.\n\n          if (dirTarget === null) {\n            // No matching directive was found - this reference points to an unknown target. Leave it\n            // unmapped.\n            return;\n          }\n        }\n\n        if (dirTarget !== null) {\n          // This reference points to a directive.\n          _this312.references.set(ref, {\n            directive: dirTarget,\n            node: node\n          });\n        } else {\n          // This reference points to the node itself.\n          _this312.references.set(ref, node);\n        }\n      });\n\n      var setAttributeBinding = function setAttributeBinding(attribute, ioType) {\n        var dir = directives.find(function (dir) {\n          return dir[ioType].hasBindingPropertyName(attribute.name);\n        });\n        var binding = dir !== undefined ? dir : node;\n\n        _this312.bindings.set(attribute, binding);\n      }; // Node inputs (bound attributes) and text attributes can be bound to an\n      // input on a directive.\n\n\n      node.inputs.forEach(function (input) {\n        return setAttributeBinding(input, 'inputs');\n      });\n      node.attributes.forEach(function (attr) {\n        return setAttributeBinding(attr, 'inputs');\n      });\n\n      if (node instanceof Template) {\n        node.templateAttrs.forEach(function (attr) {\n          return setAttributeBinding(attr, 'inputs');\n        });\n      } // Node outputs (bound events) can be bound to an output on a directive.\n\n\n      node.outputs.forEach(function (output) {\n        return setAttributeBinding(output, 'outputs');\n      }); // Recurse into the node's children.\n\n      node.children.forEach(function (child) {\n        return child.visit(_this312);\n      });\n    } // Unused visitors.\n\n  }, {\n    key: \"visitContent\",\n    value: function visitContent(content) {}\n  }, {\n    key: \"visitVariable\",\n    value: function visitVariable(variable) {}\n  }, {\n    key: \"visitReference\",\n    value: function visitReference(reference) {}\n  }, {\n    key: \"visitTextAttribute\",\n    value: function visitTextAttribute(attribute) {}\n  }, {\n    key: \"visitBoundAttribute\",\n    value: function visitBoundAttribute(attribute) {}\n  }, {\n    key: \"visitBoundEvent\",\n    value: function visitBoundEvent(attribute) {}\n  }, {\n    key: \"visitBoundAttributeOrEvent\",\n    value: function visitBoundAttributeOrEvent(node) {}\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {}\n  }, {\n    key: \"visitBoundText\",\n    value: function visitBoundText(text) {}\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu) {}\n  }], [{\n    key: \"apply\",\n    value: function apply(template, selectorMatcher) {\n      var directives = new Map();\n      var bindings = new Map();\n      var references = new Map();\n      var matcher = new DirectiveBinder(selectorMatcher, directives, bindings, references);\n      matcher.ingest(template);\n      return {\n        directives: directives,\n        bindings: bindings,\n        references: references\n      };\n    }\n  }]);\n\n  return DirectiveBinder;\n}();\n/**\n * Processes a template and extract metadata about expressions and symbols within.\n *\n * This is a companion to the `DirectiveBinder` that doesn't require knowledge of directives matched\n * within the template in order to operate.\n *\n * Expressions are visited by the superclass `RecursiveAstVisitor`, with custom logic provided\n * by overridden methods from that visitor.\n */\n\n\nvar TemplateBinder = /*#__PURE__*/function (_RecursiveAstVisitor$3) {\n  _inherits(TemplateBinder, _RecursiveAstVisitor$3);\n\n  var _super112 = _createSuper(TemplateBinder);\n\n  function TemplateBinder(bindings, symbols, usedPipes, nestingLevel, scope, template, level) {\n    var _this313;\n\n    _classCallCheck(this, TemplateBinder);\n\n    _this313 = _super112.call(this);\n    _this313.bindings = bindings;\n    _this313.symbols = symbols;\n    _this313.usedPipes = usedPipes;\n    _this313.nestingLevel = nestingLevel;\n    _this313.scope = scope;\n    _this313.template = template;\n    _this313.level = level;\n    _this313.pipesUsed = []; // Save a bit of processing time by constructing this closure in advance.\n\n    _this313.visitNode = function (node) {\n      return node.visit(_assertThisInitialized(_this313));\n    };\n\n    return _this313;\n  } // This method is defined to reconcile the type of TemplateBinder since both\n  // RecursiveAstVisitor and Visitor define the visit() method in their\n  // interfaces.\n\n\n  _createClass(TemplateBinder, [{\n    key: \"visit\",\n    value: function visit(node, context) {\n      if (node instanceof AST) {\n        node.visit(this, context);\n      } else {\n        node.visit(this);\n      }\n    }\n    /**\n     * Process a template and extract metadata about expressions and symbols within.\n     *\n     * @param template the nodes of the template to process\n     * @param scope the `Scope` of the template being processed.\n     * @returns three maps which contain metadata about the template: `expressions` which interprets\n     * special `AST` nodes in expressions as pointing to references or variables declared within the\n     * template, `symbols` which maps those variables and references to the nested `Template` which\n     * declares them, if any, and `nestingLevel` which associates each `Template` with a integer\n     * nesting level (how many levels deep within the template structure the `Template` is), starting\n     * at 1.\n     */\n\n  }, {\n    key: \"ingest\",\n    value: function ingest(template) {\n      if (template instanceof Template) {\n        // For <ng-template>s, process only variables and child nodes. Inputs, outputs, templateAttrs,\n        // and references were all processed in the scope of the containing template.\n        template.variables.forEach(this.visitNode);\n        template.children.forEach(this.visitNode); // Set the nesting level.\n\n        this.nestingLevel.set(template, this.level);\n      } else {\n        // Visit each node from the top-level template.\n        template.forEach(this.visitNode);\n      }\n    }\n  }, {\n    key: \"visitElement\",\n    value: function visitElement(element) {\n      // Visit the inputs, outputs, and children of the element.\n      element.inputs.forEach(this.visitNode);\n      element.outputs.forEach(this.visitNode);\n      element.children.forEach(this.visitNode);\n    }\n  }, {\n    key: \"visitTemplate\",\n    value: function visitTemplate(template) {\n      // First, visit inputs, outputs and template attributes of the template node.\n      template.inputs.forEach(this.visitNode);\n      template.outputs.forEach(this.visitNode);\n      template.templateAttrs.forEach(this.visitNode); // References are also evaluated in the outer context.\n\n      template.references.forEach(this.visitNode); // Next, recurse into the template using its scope, and bumping the nesting level up by one.\n\n      var childScope = this.scope.getChildScope(template);\n      var binder = new TemplateBinder(this.bindings, this.symbols, this.usedPipes, this.nestingLevel, childScope, template, this.level + 1);\n      binder.ingest(template);\n    }\n  }, {\n    key: \"visitVariable\",\n    value: function visitVariable(variable) {\n      // Register the `Variable` as a symbol in the current `Template`.\n      if (this.template !== null) {\n        this.symbols.set(variable, this.template);\n      }\n    }\n  }, {\n    key: \"visitReference\",\n    value: function visitReference(reference) {\n      // Register the `Reference` as a symbol in the current `Template`.\n      if (this.template !== null) {\n        this.symbols.set(reference, this.template);\n      }\n    } // Unused template visitors\n\n  }, {\n    key: \"visitText\",\n    value: function visitText(text) {}\n  }, {\n    key: \"visitContent\",\n    value: function visitContent(content) {}\n  }, {\n    key: \"visitTextAttribute\",\n    value: function visitTextAttribute(attribute) {}\n  }, {\n    key: \"visitIcu\",\n    value: function visitIcu(icu) {\n      var _this314 = this;\n\n      Object.keys(icu.vars).forEach(function (key) {\n        return icu.vars[key].visit(_this314);\n      });\n      Object.keys(icu.placeholders).forEach(function (key) {\n        return icu.placeholders[key].visit(_this314);\n      });\n    } // The remaining visitors are concerned with processing AST expressions within template bindings\n\n  }, {\n    key: \"visitBoundAttribute\",\n    value: function visitBoundAttribute(attribute) {\n      attribute.value.visit(this);\n    }\n  }, {\n    key: \"visitBoundEvent\",\n    value: function visitBoundEvent(event) {\n      event.handler.visit(this);\n    }\n  }, {\n    key: \"visitBoundText\",\n    value: function visitBoundText(text) {\n      text.value.visit(this);\n    }\n  }, {\n    key: \"visitPipe\",\n    value: function visitPipe(ast, context) {\n      this.usedPipes.add(ast.name);\n      return _get(_getPrototypeOf(TemplateBinder.prototype), \"visitPipe\", this).call(this, ast, context);\n    } // These five types of AST expressions can refer to expression roots, which could be variables\n    // or references in the current scope.\n\n  }, {\n    key: \"visitPropertyRead\",\n    value: function visitPropertyRead(ast, context) {\n      this.maybeMap(context, ast, ast.name);\n      return _get(_getPrototypeOf(TemplateBinder.prototype), \"visitPropertyRead\", this).call(this, ast, context);\n    }\n  }, {\n    key: \"visitSafePropertyRead\",\n    value: function visitSafePropertyRead(ast, context) {\n      this.maybeMap(context, ast, ast.name);\n      return _get(_getPrototypeOf(TemplateBinder.prototype), \"visitSafePropertyRead\", this).call(this, ast, context);\n    }\n  }, {\n    key: \"visitPropertyWrite\",\n    value: function visitPropertyWrite(ast, context) {\n      this.maybeMap(context, ast, ast.name);\n      return _get(_getPrototypeOf(TemplateBinder.prototype), \"visitPropertyWrite\", this).call(this, ast, context);\n    }\n  }, {\n    key: \"visitMethodCall\",\n    value: function visitMethodCall(ast, context) {\n      this.maybeMap(context, ast, ast.name);\n      return _get(_getPrototypeOf(TemplateBinder.prototype), \"visitMethodCall\", this).call(this, ast, context);\n    }\n  }, {\n    key: \"visitSafeMethodCall\",\n    value: function visitSafeMethodCall(ast, context) {\n      this.maybeMap(context, ast, ast.name);\n      return _get(_getPrototypeOf(TemplateBinder.prototype), \"visitSafeMethodCall\", this).call(this, ast, context);\n    }\n  }, {\n    key: \"maybeMap\",\n    value: function maybeMap(scope, ast, name) {\n      // If the receiver of the expression isn't the `ImplicitReceiver`, this isn't the root of an\n      // `AST` expression that maps to a `Variable` or `Reference`.\n      if (!(ast.receiver instanceof ImplicitReceiver)) {\n        return;\n      } // Check whether the name exists in the current scope. If so, map it. Otherwise, the name is\n      // probably a property on the top-level component context.\n\n\n      var target = this.scope.lookup(name);\n\n      if (target !== null) {\n        this.bindings.set(ast, target);\n      }\n    }\n  }], [{\n    key: \"applyWithScope\",\n    value: function applyWithScope(template, scope) {\n      var expressions = new Map();\n      var symbols = new Map();\n      var nestingLevel = new Map();\n      var usedPipes = new Set(); // The top-level template has nesting level 0.\n\n      var binder = new TemplateBinder(expressions, symbols, usedPipes, nestingLevel, scope, template instanceof Template ? template : null, 0);\n      binder.ingest(template);\n      return {\n        expressions: expressions,\n        symbols: symbols,\n        nestingLevel: nestingLevel,\n        usedPipes: usedPipes\n      };\n    }\n  }]);\n\n  return TemplateBinder;\n}(RecursiveAstVisitor$1);\n/**\n * Metadata container for a `Target` that allows queries for specific bits of metadata.\n *\n * See `BoundTarget` for documentation on the individual methods.\n */\n\n\nvar R3BoundTarget = /*#__PURE__*/function () {\n  function R3BoundTarget(target, directives, bindings, references, exprTargets, symbols, nestingLevel, templateEntities, usedPipes) {\n    _classCallCheck(this, R3BoundTarget);\n\n    this.target = target;\n    this.directives = directives;\n    this.bindings = bindings;\n    this.references = references;\n    this.exprTargets = exprTargets;\n    this.symbols = symbols;\n    this.nestingLevel = nestingLevel;\n    this.templateEntities = templateEntities;\n    this.usedPipes = usedPipes;\n  }\n\n  _createClass(R3BoundTarget, [{\n    key: \"getEntitiesInTemplateScope\",\n    value: function getEntitiesInTemplateScope(template) {\n      var _a;\n\n      return (_a = this.templateEntities.get(template)) !== null && _a !== void 0 ? _a : new Set();\n    }\n  }, {\n    key: \"getDirectivesOfNode\",\n    value: function getDirectivesOfNode(node) {\n      return this.directives.get(node) || null;\n    }\n  }, {\n    key: \"getReferenceTarget\",\n    value: function getReferenceTarget(ref) {\n      return this.references.get(ref) || null;\n    }\n  }, {\n    key: \"getConsumerOfBinding\",\n    value: function getConsumerOfBinding(binding) {\n      return this.bindings.get(binding) || null;\n    }\n  }, {\n    key: \"getExpressionTarget\",\n    value: function getExpressionTarget(expr) {\n      return this.exprTargets.get(expr) || null;\n    }\n  }, {\n    key: \"getTemplateOfSymbol\",\n    value: function getTemplateOfSymbol(symbol) {\n      return this.symbols.get(symbol) || null;\n    }\n  }, {\n    key: \"getNestingLevel\",\n    value: function getNestingLevel(template) {\n      return this.nestingLevel.get(template) || 0;\n    }\n  }, {\n    key: \"getUsedDirectives\",\n    value: function getUsedDirectives() {\n      var set = new Set();\n      this.directives.forEach(function (dirs) {\n        return dirs.forEach(function (dir) {\n          return set.add(dir);\n        });\n      });\n      return Array.from(set.values());\n    }\n  }, {\n    key: \"getUsedPipes\",\n    value: function getUsedPipes() {\n      return Array.from(this.usedPipes);\n    }\n  }]);\n\n  return R3BoundTarget;\n}();\n\nfunction extractTemplateEntities(rootScope) {\n  var entityMap = new Map();\n\n  function extractScopeEntities(scope) {\n    if (entityMap.has(scope.template)) {\n      return entityMap.get(scope.template);\n    }\n\n    var currentEntities = scope.namedEntities;\n    var templateEntities;\n\n    if (scope.parentScope !== null) {\n      templateEntities = new Map([].concat(_toConsumableArray(extractScopeEntities(scope.parentScope)), _toConsumableArray(currentEntities)));\n    } else {\n      templateEntities = new Map(currentEntities);\n    }\n\n    entityMap.set(scope.template, templateEntities);\n    return templateEntities;\n  }\n\n  var scopesToProcess = [rootScope];\n\n  while (scopesToProcess.length > 0) {\n    var scope = scopesToProcess.pop();\n\n    var _iterator44 = _createForOfIteratorHelper(scope.childScopes.values()),\n        _step44;\n\n    try {\n      for (_iterator44.s(); !(_step44 = _iterator44.n()).done;) {\n        var childScope = _step44.value;\n        scopesToProcess.push(childScope);\n      }\n    } catch (err) {\n      _iterator44.e(err);\n    } finally {\n      _iterator44.f();\n    }\n\n    extractScopeEntities(scope);\n  }\n\n  var templateEntities = new Map();\n\n  var _iterator45 = _createForOfIteratorHelper(entityMap),\n      _step45;\n\n  try {\n    for (_iterator45.s(); !(_step45 = _iterator45.n()).done;) {\n      var _step45$value = _slicedToArray(_step45.value, 2),\n          template = _step45$value[0],\n          entities = _step45$value[1];\n\n      templateEntities.set(template, new Set(entities.values()));\n    }\n  } catch (err) {\n    _iterator45.e(err);\n  } finally {\n    _iterator45.f();\n  }\n\n  return templateEntities;\n}\n/**\n * @license\n * Copyright Google LLC 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\nfunction compileClassMetadata(metadata) {\n  var _a, _b; // Generate an ngDevMode guarded call to setClassMetadata with the class identifier and its\n  // metadata.\n\n\n  var fnCall = importExpr(Identifiers.setClassMetadata).callFn([metadata.type, metadata.decorators, (_a = metadata.ctorParameters) !== null && _a !== void 0 ? _a : literal(null), (_b = metadata.propDecorators) !== null && _b !== void 0 ? _b : literal(null)]);\n  var iife = fn([], [devOnlyGuardedExpression(fnCall).toStmt()]);\n  return iife.callFn([]);\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\n\n\nvar MINIMUM_PARTIAL_LINKER_VERSION = '12.0.0';\n\nfunction compileDeclareClassMetadata(metadata) {\n  var definitionMap = new DefinitionMap();\n  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));\n  definitionMap.set('version', literal('12.2.16'));\n  definitionMap.set('ngImport', importExpr(Identifiers.core));\n  definitionMap.set('type', metadata.type);\n  definitionMap.set('decorators', metadata.decorators);\n  definitionMap.set('ctorParameters', metadata.ctorParameters);\n  definitionMap.set('propDecorators', metadata.propDecorators);\n  return importExpr(Identifiers.declareClassMetadata).callFn([definitionMap.toLiteralMap()]);\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Creates an array literal expression from the given array, mapping all values to an expression\n * using the provided mapping function. If the array is empty or null, then null is returned.\n *\n * @param values The array to transfer into literal array expression.\n * @param mapper The logic to use for creating an expression for the array's values.\n * @returns An array literal expression representing `values`, or null if `values` is empty or\n * is itself null.\n */\n\n\nfunction toOptionalLiteralArray(values, mapper) {\n  if (values === null || values.length === 0) {\n    return null;\n  }\n\n  return literalArr(values.map(function (value) {\n    return mapper(value);\n  }));\n}\n/**\n * Creates an object literal expression from the given object, mapping all values to an expression\n * using the provided mapping function. If the object has no keys, then null is returned.\n *\n * @param object The object to transfer into an object literal expression.\n * @param mapper The logic to use for creating an expression for the object's values.\n * @returns An object literal expression representing `object`, or null if `object` does not have\n * any keys.\n */\n\n\nfunction toOptionalLiteralMap(object, mapper) {\n  var entries = Object.keys(object).map(function (key) {\n    var value = object[key];\n    return {\n      key: key,\n      value: mapper(value),\n      quoted: true\n    };\n  });\n\n  if (entries.length > 0) {\n    return literalMap(entries);\n  } else {\n    return null;\n  }\n}\n\nfunction compileDependencies(deps) {\n  if (deps === 'invalid') {\n    // The `deps` can be set to the string \"invalid\"  by the `unwrapConstructorDependencies()`\n    // function, which tries to convert `ConstructorDeps` into `R3DependencyMetadata[]`.\n    return literal('invalid');\n  } else if (deps === null) {\n    return literal(null);\n  } else {\n    return literalArr(deps.map(compileDependency));\n  }\n}\n\nfunction compileDependency(dep) {\n  var depMeta = new DefinitionMap();\n  depMeta.set('token', dep.token);\n\n  if (dep.attributeNameType !== null) {\n    depMeta.set('attribute', literal(true));\n  }\n\n  if (dep.host) {\n    depMeta.set('host', literal(true));\n  }\n\n  if (dep.optional) {\n    depMeta.set('optional', literal(true));\n  }\n\n  if (dep.self) {\n    depMeta.set('self', literal(true));\n  }\n\n  if (dep.skipSelf) {\n    depMeta.set('skipSelf', literal(true));\n  }\n\n  return depMeta.toLiteralMap();\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\n\n\nvar MINIMUM_PARTIAL_LINKER_VERSION$1 = '12.0.0';\n/**\n * Compile a directive declaration defined by the `R3DirectiveMetadata`.\n */\n\nfunction compileDeclareDirectiveFromMetadata(meta) {\n  var definitionMap = createDirectiveDefinitionMap(meta);\n  var expression = importExpr(Identifiers.declareDirective).callFn([definitionMap.toLiteralMap()]);\n  var type = createDirectiveType(meta);\n  return {\n    expression: expression,\n    type: type,\n    statements: []\n  };\n}\n/**\n * Gathers the declaration fields for a directive into a `DefinitionMap`. This allows for reusing\n * this logic for components, as they extend the directive metadata.\n */\n\n\nfunction createDirectiveDefinitionMap(meta) {\n  var definitionMap = new DefinitionMap();\n  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));\n  definitionMap.set('version', literal('12.2.16')); // e.g. `type: MyDirective`\n\n  definitionMap.set('type', meta.internalType); // e.g. `selector: 'some-dir'`\n\n  if (meta.selector !== null) {\n    definitionMap.set('selector', literal(meta.selector));\n  }\n\n  definitionMap.set('inputs', conditionallyCreateMapObjectLiteral(meta.inputs, true));\n  definitionMap.set('outputs', conditionallyCreateMapObjectLiteral(meta.outputs));\n  definitionMap.set('host', compileHostMetadata(meta.host));\n  definitionMap.set('providers', meta.providers);\n\n  if (meta.queries.length > 0) {\n    definitionMap.set('queries', literalArr(meta.queries.map(compileQuery)));\n  }\n\n  if (meta.viewQueries.length > 0) {\n    definitionMap.set('viewQueries', literalArr(meta.viewQueries.map(compileQuery)));\n  }\n\n  if (meta.exportAs !== null) {\n    definitionMap.set('exportAs', asLiteral(meta.exportAs));\n  }\n\n  if (meta.usesInheritance) {\n    definitionMap.set('usesInheritance', literal(true));\n  }\n\n  if (meta.lifecycle.usesOnChanges) {\n    definitionMap.set('usesOnChanges', literal(true));\n  }\n\n  definitionMap.set('ngImport', importExpr(Identifiers.core));\n  return definitionMap;\n}\n/**\n * Compiles the metadata of a single query into its partial declaration form as declared\n * by `R3DeclareQueryMetadata`.\n */\n\n\nfunction compileQuery(query) {\n  var meta = new DefinitionMap();\n  meta.set('propertyName', literal(query.propertyName));\n\n  if (query.first) {\n    meta.set('first', literal(true));\n  }\n\n  meta.set('predicate', Array.isArray(query.predicate) ? asLiteral(query.predicate) : convertFromMaybeForwardRefExpression(query.predicate));\n\n  if (!query.emitDistinctChangesOnly) {\n    // `emitDistinctChangesOnly` is special because we expect it to be `true`.\n    // Therefore we explicitly emit the field, and explicitly place it only when it's `false`.\n    meta.set('emitDistinctChangesOnly', literal(false));\n  } else {// The linker will assume that an absent `emitDistinctChangesOnly` flag is by default `true`.\n  }\n\n  if (query.descendants) {\n    meta.set('descendants', literal(true));\n  }\n\n  meta.set('read', query.read);\n\n  if (query.static) {\n    meta.set('static', literal(true));\n  }\n\n  return meta.toLiteralMap();\n}\n/**\n * Compiles the host metadata into its partial declaration form as declared\n * in `R3DeclareDirectiveMetadata['host']`\n */\n\n\nfunction compileHostMetadata(meta) {\n  var hostMetadata = new DefinitionMap();\n  hostMetadata.set('attributes', toOptionalLiteralMap(meta.attributes, function (expression) {\n    return expression;\n  }));\n  hostMetadata.set('listeners', toOptionalLiteralMap(meta.listeners, literal));\n  hostMetadata.set('properties', toOptionalLiteralMap(meta.properties, literal));\n\n  if (meta.specialAttributes.styleAttr) {\n    hostMetadata.set('styleAttribute', literal(meta.specialAttributes.styleAttr));\n  }\n\n  if (meta.specialAttributes.classAttr) {\n    hostMetadata.set('classAttribute', literal(meta.specialAttributes.classAttr));\n  }\n\n  if (hostMetadata.values.length > 0) {\n    return hostMetadata.toLiteralMap();\n  } else {\n    return null;\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Compile a component declaration defined by the `R3ComponentMetadata`.\n */\n\n\nfunction compileDeclareComponentFromMetadata(meta, template, additionalTemplateInfo) {\n  var definitionMap = createComponentDefinitionMap(meta, template, additionalTemplateInfo);\n  var expression = importExpr(Identifiers.declareComponent).callFn([definitionMap.toLiteralMap()]);\n  var type = createComponentType(meta);\n  return {\n    expression: expression,\n    type: type,\n    statements: []\n  };\n}\n/**\n * Gathers the declaration fields for a component into a `DefinitionMap`.\n */\n\n\nfunction createComponentDefinitionMap(meta, template, templateInfo) {\n  var definitionMap = createDirectiveDefinitionMap(meta);\n  definitionMap.set('template', getTemplateExpression(template, templateInfo));\n\n  if (templateInfo.isInline) {\n    definitionMap.set('isInline', literal(true));\n  }\n\n  definitionMap.set('styles', toOptionalLiteralArray(meta.styles, literal));\n  definitionMap.set('components', compileUsedDirectiveMetadata(meta, function (directive) {\n    return directive.isComponent === true;\n  }));\n  definitionMap.set('directives', compileUsedDirectiveMetadata(meta, function (directive) {\n    return directive.isComponent !== true;\n  }));\n  definitionMap.set('pipes', compileUsedPipeMetadata(meta));\n  definitionMap.set('viewProviders', meta.viewProviders);\n  definitionMap.set('animations', meta.animations);\n\n  if (meta.changeDetection !== undefined) {\n    definitionMap.set('changeDetection', importExpr(Identifiers.ChangeDetectionStrategy).prop(ChangeDetectionStrategy[meta.changeDetection]));\n  }\n\n  if (meta.encapsulation !== ViewEncapsulation.Emulated) {\n    definitionMap.set('encapsulation', importExpr(Identifiers.ViewEncapsulation).prop(ViewEncapsulation[meta.encapsulation]));\n  }\n\n  if (meta.interpolation !== DEFAULT_INTERPOLATION_CONFIG) {\n    definitionMap.set('interpolation', literalArr([literal(meta.interpolation.start), literal(meta.interpolation.end)]));\n  }\n\n  if (template.preserveWhitespaces === true) {\n    definitionMap.set('preserveWhitespaces', literal(true));\n  }\n\n  return definitionMap;\n}\n\nfunction getTemplateExpression(template, templateInfo) {\n  // If the template has been defined using a direct literal, we use that expression directly\n  // without any modifications. This is ensures proper source mapping from the partially\n  // compiled code to the source file declaring the template. Note that this does not capture\n  // template literals referenced indirectly through an identifier.\n  if (templateInfo.inlineTemplateLiteralExpression !== null) {\n    return templateInfo.inlineTemplateLiteralExpression;\n  } // If the template is defined inline but not through a literal, the template has been resolved\n  // through static interpretation. We create a literal but cannot provide any source span. Note\n  // that we cannot use the expression defining the template because the linker expects the template\n  // to be defined as a literal in the declaration.\n\n\n  if (templateInfo.isInline) {\n    return literal(templateInfo.content, null, null);\n  } // The template is external so we must synthesize an expression node with\n  // the appropriate source-span.\n\n\n  var contents = templateInfo.content;\n  var file = new ParseSourceFile(contents, templateInfo.sourceUrl);\n  var start = new ParseLocation(file, 0, 0, 0);\n  var end = computeEndLocation(file, contents);\n  var span = new ParseSourceSpan(start, end);\n  return literal(contents, null, span);\n}\n\nfunction computeEndLocation(file, contents) {\n  var length = contents.length;\n  var lineStart = 0;\n  var lastLineStart = 0;\n  var line = 0;\n\n  do {\n    lineStart = contents.indexOf('\\n', lastLineStart);\n\n    if (lineStart !== -1) {\n      lastLineStart = lineStart + 1;\n      line++;\n    }\n  } while (lineStart !== -1);\n\n  return new ParseLocation(file, length, line, length - lastLineStart);\n}\n/**\n * Compiles the directives as registered in the component metadata into an array literal of the\n * individual directives. If the component does not use any directives, then null is returned.\n */\n\n\nfunction compileUsedDirectiveMetadata(meta, predicate) {\n  var wrapType = meta.declarationListEmitMode !== 0\n  /* Direct */\n  ? generateForwardRef : function (expr) {\n    return expr;\n  };\n  var directives = meta.directives.filter(predicate);\n  return toOptionalLiteralArray(directives, function (directive) {\n    var dirMeta = new DefinitionMap();\n    dirMeta.set('type', wrapType(directive.type));\n    dirMeta.set('selector', literal(directive.selector));\n    dirMeta.set('inputs', toOptionalLiteralArray(directive.inputs, literal));\n    dirMeta.set('outputs', toOptionalLiteralArray(directive.outputs, literal));\n    dirMeta.set('exportAs', toOptionalLiteralArray(directive.exportAs, literal));\n    return dirMeta.toLiteralMap();\n  });\n}\n/**\n * Compiles the pipes as registered in the component metadata into an object literal, where the\n * pipe's name is used as key and a reference to its type as value. If the component does not use\n * any pipes, then null is returned.\n */\n\n\nfunction compileUsedPipeMetadata(meta) {\n  if (meta.pipes.size === 0) {\n    return null;\n  }\n\n  var wrapType = meta.declarationListEmitMode !== 0\n  /* Direct */\n  ? generateForwardRef : function (expr) {\n    return expr;\n  };\n  var entries = [];\n\n  var _iterator46 = _createForOfIteratorHelper(meta.pipes),\n      _step46;\n\n  try {\n    for (_iterator46.s(); !(_step46 = _iterator46.n()).done;) {\n      var _step46$value = _slicedToArray(_step46.value, 2),\n          name = _step46$value[0],\n          pipe = _step46$value[1];\n\n      entries.push({\n        key: name,\n        value: wrapType(pipe),\n        quoted: true\n      });\n    }\n  } catch (err) {\n    _iterator46.e(err);\n  } finally {\n    _iterator46.f();\n  }\n\n  return literalMap(entries);\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\n\n\nvar MINIMUM_PARTIAL_LINKER_VERSION$2 = '12.0.0';\n\nfunction compileDeclareFactoryFunction(meta) {\n  var definitionMap = new DefinitionMap();\n  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));\n  definitionMap.set('version', literal('12.2.16'));\n  definitionMap.set('ngImport', importExpr(Identifiers.core));\n  definitionMap.set('type', meta.internalType);\n  definitionMap.set('deps', compileDependencies(meta.deps));\n  definitionMap.set('target', importExpr(Identifiers.FactoryTarget).prop(FactoryTarget[meta.target]));\n  return {\n    expression: importExpr(Identifiers.declareFactory).callFn([definitionMap.toLiteralMap()]),\n    statements: [],\n    type: createFactoryType(meta)\n  };\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\n\n\nvar MINIMUM_PARTIAL_LINKER_VERSION$3 = '12.0.0';\n/**\n * Compile a Injectable declaration defined by the `R3InjectableMetadata`.\n */\n\nfunction compileDeclareInjectableFromMetadata(meta) {\n  var definitionMap = createInjectableDefinitionMap(meta);\n  var expression = importExpr(Identifiers.declareInjectable).callFn([definitionMap.toLiteralMap()]);\n  var type = createInjectableType(meta);\n  return {\n    expression: expression,\n    type: type,\n    statements: []\n  };\n}\n/**\n * Gathers the declaration fields for a Injectable into a `DefinitionMap`.\n */\n\n\nfunction createInjectableDefinitionMap(meta) {\n  var definitionMap = new DefinitionMap();\n  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));\n  definitionMap.set('version', literal('12.2.16'));\n  definitionMap.set('ngImport', importExpr(Identifiers.core));\n  definitionMap.set('type', meta.internalType); // Only generate providedIn property if it has a non-null value\n\n  if (meta.providedIn !== undefined) {\n    var providedIn = convertFromMaybeForwardRefExpression(meta.providedIn);\n\n    if (providedIn.value !== null) {\n      definitionMap.set('providedIn', providedIn);\n    }\n  }\n\n  if (meta.useClass !== undefined) {\n    definitionMap.set('useClass', convertFromMaybeForwardRefExpression(meta.useClass));\n  }\n\n  if (meta.useExisting !== undefined) {\n    definitionMap.set('useExisting', convertFromMaybeForwardRefExpression(meta.useExisting));\n  }\n\n  if (meta.useValue !== undefined) {\n    definitionMap.set('useValue', convertFromMaybeForwardRefExpression(meta.useValue));\n  } // Factories do not contain `ForwardRef`s since any types are already wrapped in a function call\n  // so the types will not be eagerly evaluated. Therefore we do not need to process this expression\n  // with `convertFromProviderExpression()`.\n\n\n  if (meta.useFactory !== undefined) {\n    definitionMap.set('useFactory', meta.useFactory);\n  }\n\n  if (meta.deps !== undefined) {\n    definitionMap.set('deps', literalArr(meta.deps.map(compileDependency)));\n  }\n\n  return definitionMap;\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\n\n\nvar MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';\n\nfunction compileDeclareInjectorFromMetadata(meta) {\n  var definitionMap = createInjectorDefinitionMap(meta);\n  var expression = importExpr(Identifiers.declareInjector).callFn([definitionMap.toLiteralMap()]);\n  var type = createInjectorType(meta);\n  return {\n    expression: expression,\n    type: type,\n    statements: []\n  };\n}\n/**\n * Gathers the declaration fields for an Injector into a `DefinitionMap`.\n */\n\n\nfunction createInjectorDefinitionMap(meta) {\n  var definitionMap = new DefinitionMap();\n  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));\n  definitionMap.set('version', literal('12.2.16'));\n  definitionMap.set('ngImport', importExpr(Identifiers.core));\n  definitionMap.set('type', meta.internalType);\n  definitionMap.set('providers', meta.providers);\n\n  if (meta.imports.length > 0) {\n    definitionMap.set('imports', literalArr(meta.imports));\n  }\n\n  return definitionMap;\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\n\n\nvar MINIMUM_PARTIAL_LINKER_VERSION$5 = '12.0.0';\n\nfunction compileDeclareNgModuleFromMetadata(meta) {\n  var definitionMap = createNgModuleDefinitionMap(meta);\n  var expression = importExpr(Identifiers.declareNgModule).callFn([definitionMap.toLiteralMap()]);\n  var type = createNgModuleType(meta);\n  return {\n    expression: expression,\n    type: type,\n    statements: []\n  };\n}\n/**\n * Gathers the declaration fields for an NgModule into a `DefinitionMap`.\n */\n\n\nfunction createNgModuleDefinitionMap(meta) {\n  var definitionMap = new DefinitionMap();\n  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));\n  definitionMap.set('version', literal('12.2.16'));\n  definitionMap.set('ngImport', importExpr(Identifiers.core));\n  definitionMap.set('type', meta.internalType); // We only generate the keys in the metadata if the arrays contain values.\n  // We must wrap the arrays inside a function if any of the values are a forward reference to a\n  // not-yet-declared class. This is to support JIT execution of the `ɵɵngDeclareNgModule()` call.\n  // In the linker these wrappers are stripped and then reapplied for the `ɵɵdefineNgModule()` call.\n\n  if (meta.bootstrap.length > 0) {\n    definitionMap.set('bootstrap', refsToArray(meta.bootstrap, meta.containsForwardDecls));\n  }\n\n  if (meta.declarations.length > 0) {\n    definitionMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls));\n  }\n\n  if (meta.imports.length > 0) {\n    definitionMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls));\n  }\n\n  if (meta.exports.length > 0) {\n    definitionMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls));\n  }\n\n  if (meta.schemas !== null && meta.schemas.length > 0) {\n    definitionMap.set('schemas', literalArr(meta.schemas.map(function (ref) {\n      return ref.value;\n    })));\n  }\n\n  if (meta.id !== null) {\n    definitionMap.set('id', meta.id);\n  }\n\n  return definitionMap;\n}\n/**\n * @license\n * Copyright Google LLC 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/**\n * Every time we make a breaking change to the declaration interface or partial-linker behavior, we\n * must update this constant to prevent old partial-linkers from incorrectly processing the\n * declaration.\n *\n * Do not include any prerelease in these versions as they are ignored.\n */\n\n\nvar MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';\n/**\n * Compile a Pipe declaration defined by the `R3PipeMetadata`.\n */\n\nfunction compileDeclarePipeFromMetadata(meta) {\n  var definitionMap = createPipeDefinitionMap(meta);\n  var expression = importExpr(Identifiers.declarePipe).callFn([definitionMap.toLiteralMap()]);\n  var type = createPipeType(meta);\n  return {\n    expression: expression,\n    type: type,\n    statements: []\n  };\n}\n/**\n * Gathers the declaration fields for a Pipe into a `DefinitionMap`.\n */\n\n\nfunction createPipeDefinitionMap(meta) {\n  var definitionMap = new DefinitionMap();\n  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));\n  definitionMap.set('version', literal('12.2.16'));\n  definitionMap.set('ngImport', importExpr(Identifiers.core)); // e.g. `type: MyPipe`\n\n  definitionMap.set('type', meta.internalType); // e.g. `name: \"myPipe\"`\n\n  definitionMap.set('name', literal(meta.pipeName));\n\n  if (meta.pure === false) {\n    // e.g. `pure: false`\n    definitionMap.set('pure', literal(meta.pure));\n  }\n\n  return definitionMap;\n}\n/**\n * @license\n * Copyright Google LLC 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// This file only reexports content of the `src` folder. Keep it that way.\n// This function call has a global side effects and publishes the compiler into global namespace for\n// the late binding of the Compiler to the @angular/core for jit compilation.\n\n/*@__PURE__*/\n\n\npublishFacade(_global);\n/**\n * @license\n * Copyright Google LLC 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// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC 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/**\n * @license\n * Copyright Google LLC 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\nexport { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, AotCompiler, AotSummaryResolver, ArrayType, AssertNotNull, AstMemoryEfficientTransformer, AstPath, AstTransformer$1 as AstTransformer, AttrAst, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundDirectivePropertyAst, BoundElementProperty, BoundElementPropertyAst, BoundEventAst, BoundTextAst, BuiltinMethod, BuiltinType, BuiltinTypeName, BuiltinVar, CONTENT_ATTR, CUSTOM_ELEMENTS_SCHEMA, CastExpr, Chain, ClassField, ClassMethod, ClassStmt, CommaExpr, Comment$1 as Comment, CompileDirectiveMetadata, CompileMetadataResolver, CompileNgModuleMetadata, CompilePipeMetadata, CompileReflector, CompileShallowModuleMetadata, CompileStylesheetMetadata, CompileSummaryKind, CompileTemplateMetadata, CompiledStylesheet, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DirectiveAst, DirectiveNormalizer, DirectiveResolver, DomElementSchemaRegistry, EOF, ERROR_COMPONENT_TYPE, Element$1 as Element, ElementAst, ElementSchemaRegistry, EmbeddedTemplateAst, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, Extractor, FactoryTarget, FunctionCall, FunctionExpr, GeneratedFile, HOST_ATTR, HtmlParser, HtmlTagDefinition, I18NHtmlParser, Identifiers$1 as Identifiers, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, InvokeMethodExpr, IvyParser, JSDocComment, JitCompiler, JitEvaluator, JitSummaryResolver, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, MethodCall, NONE_TYPE, NO_ERRORS_SCHEMA, NgContentAst, NgModuleCompiler, NgModuleResolver, NodeWithI18n, NonNullAssert, NotExpr, NullTemplateVisitor, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PipeResolver, PrefixNot, PropertyRead, PropertyWrite, ProviderAst, ProviderAstType, ProviderMeta, Quote, R3BoundTarget, Identifiers as R3Identifiers, R3TargetBinder, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor$1 as RecursiveAstVisitor, RecursiveTemplateAstVisitor, RecursiveVisitor$1 as RecursiveVisitor, ReferenceAst, ResolvedStaticSymbol, ResourceLoader, ReturnStatement, STRING_TYPE, SafeKeyedRead, SafeMethodCall, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StaticReflector, StaticSymbol, StaticSymbolCache, StaticSymbolResolver, StmtModifier, StyleCompiler, StylesCompileDependency, SummaryResolver, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, TemplateParseError, TemplateParseResult, TemplateParser, Text$3 as Text, TextAst, ThisReceiver, ThrowStmt, BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element as TmplAstElement, Icu as TmplAstIcu, RecursiveVisitor as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable, Token, TokenType, TransitiveCompileNgModuleMetadata, TreeError, TryCatchStmt, Type$1 as Type, TypeScriptEmitter, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, UrlResolver, VERSION$1 as VERSION, VariableAst, VariableBinding, Version, ViewCompiler, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, analyzeAndValidateNgModules, analyzeFile, analyzeFileForInjectables, analyzeNgModules, collectExternalReferences, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, _compileInjectable as compileInjectable, _compileInjector as compileInjector, _compileNgModule as compileNgModule, compilePipeFromMetadata, componentFactoryName, computeMsgId, core, createAotCompiler, createAotUrlResolver, createElementCssSelector, createInjectableType, createLoweredSymbol, createMayBeForwardRefExpression, createOfflineCompileUrlResolver, createUrlResolverWithoutPackagePrefix, debugOutputAstAsTypeScript, devOnlyGuardedExpression, findNode, flatten, formattedError, getHtmlTagDefinition, getMissingNgModuleMetadataErrorData, getNsPrefix, getParseErrors, getSafePropertyAccessString, getUrlScheme, hostViewClassName, identifierModuleUrl, identifierName, isEmptyExpression, isFormattedError, isIdentifier, isLoweredSymbol, isNgContainer, isNgContent, isNgTemplate, isSyntaxError, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeAnalyzedFiles, mergeNsAndName, ngModuleJitUrl, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, removeSummaryDuplicates, rendererTypeName, sanitizeIdentifier, sharedStylesheetJitUrl, splitClasses, splitNsName, syntaxError, templateJitUrl, templateSourceUrl, templateVisitAll, toTypeScript, tokenName, tokenReference, typeSourceSpan, unescapeIdentifier, unwrapResolvedMetadata, verifyHostBindings, viewClassName, visitAll$1 as visitAll }; //# sourceMappingURL=compiler.js.map","map":null,"metadata":{},"sourceType":"module"}