prettier 2.1.2 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prettier",
3
- "version": "2.1.2",
3
+ "version": "2.3.1",
4
4
  "description": "Prettier is an opinionated code formatter",
5
5
  "bin": "./bin-prettier.js",
6
6
  "repository": "prettier/prettier",
@@ -14,7 +14,8 @@
14
14
  "node": ">=10.13.0"
15
15
  },
16
16
  "files": [
17
- "*.js"
17
+ "*.js",
18
+ "esm/*.mjs"
18
19
  ],
19
20
  "scripts": {
20
21
  "prepublishOnly": "node -e \"assert.equal(require('.').version, require('..').version)\""
package/parser-angular.js CHANGED
@@ -1,46 +1,67 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((t="undefined"!=typeof globalThis?globalThis:t||self).prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=e())}(this,(function(){"use strict";function t(e,s){const{ignoreDecorators:n}=s||{};if(!n){const s=e.declaration&&e.declaration.decorators||e.decorators;if(s&&s.length>0)return t(s[0])}return e.range?e.range[0]:e.start}function e(t){const s=t.range?t.range[1]:t.end;return t.typeAnnotation?Math.max(s,e(t.typeAnnotation)):s}var s={locStart:t,locEnd:e,composeLoc:function(s,n=s){const r=t(s);return[r,"number"==typeof n?r+n:e(n)]}};function n(t,e,s){return t(s={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&s.path)}},s.exports),s.exports}var r,i=n((function(t,e){var s=function(){function t(t){this.string=t;for(var e=[0],s=0;s<t.length;)switch(t[s]){case"\n":s+="\n".length,e.push(s);break;case"\r":"\n"===t[s+="\r".length]&&(s+="\n".length),e.push(s);break;default:s++}this.offsets=e}return t.prototype.locationForIndex=function(t){if(t<0||t>this.string.length)return null;for(var e=0,s=this.offsets;s[e+1]<=t;)e++;return{line:e,column:t-s[e]}},t.prototype.indexForLocation=function(t){var e=t.line,s=t.column;return e<0||e>=this.offsets.length||s<0||s>this.lengthOfLine(e)?null:this.offsets[e]+s},t.prototype.lengthOfLine=function(t){var e=this.offsets[t];return(t===this.offsets.length-1?this.string.length:this.offsets[t+1])-e},t}();e.__esModule=!0,e.default=s})),a=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.Context=class{constructor(t){this.text=t,this.locator=new s(this.text)}};class s{constructor(t){this._lineAndColumn=new i.default(t)}locationForIndex(t){const{line:e,column:s}=this._lineAndColumn.locationForIndex(t);return{line:e+1,column:s}}}}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.angular=t())}(this,(function(){"use strict";var e=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const t=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));var r=t,n=t;r.default=n;const i=t=>{if("string"!=typeof t||0===t.length)return 0;if(0===(t=e(t)).length)return 0;t=t.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," ");let n=0;for(let e=0;e<t.length;e++){const i=t.codePointAt(e);i<=31||i>=127&&i<=159||(i>=768&&i<=879||(i>65535&&e++,n+=r(i)?2:1))}return n};var s=i,u=i;s.default=u;var a=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};var o=e=>e[e.length-1];function D(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){var t={exports:{}};return e(t,t.exports),t.exports}var l=function(e){return e&&e.Math==Math&&e},h=l("object"==typeof globalThis&&globalThis)||l("object"==typeof window&&window)||l("object"==typeof self&&self)||l("object"==typeof c&&c)||function(){return this}()||Function("return this")(),d=function(e){try{return!!e()}catch(e){return!0}},f=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),E={}.propertyIsEnumerable,C=Object.getOwnPropertyDescriptor,v={f:C&&!E.call({1:2},1)?function(e){var t=C(this,e);return!!t&&t.enumerable}:E},F=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},g={}.toString,m=function(e){return g.call(e).slice(8,-1)},y="".split,x=d((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==m(e)?y.call(e,""):Object(e)}:Object,A=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},w=function(e){return x(A(e))},S=function(e){return"object"==typeof e?null!==e:"function"==typeof e},I=function(e,t){if(!S(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!S(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!S(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!S(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},O=function(e){return Object(A(e))},N={}.hasOwnProperty,b=Object.hasOwn||function(e,t){return N.call(O(e),t)},B=h.document,P=S(B)&&S(B.createElement),T=!f&&!d((function(){return 7!=Object.defineProperty((e="div",P?B.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),L=Object.getOwnPropertyDescriptor,R={f:f?L:function(e,t){if(e=w(e),t=I(t,!0),T)try{return L(e,t)}catch(e){}if(b(e,t))return F(!v.f.call(e,t),e[t])}},k=function(e){if(!S(e))throw TypeError(String(e)+" is not an object");return e},$=Object.defineProperty,_={f:f?$:function(e,t,r){if(k(e),t=I(t,!0),k(r),T)try{return $(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},M=f?function(e,t,r){return _.f(e,t,F(1,r))}:function(e,t,r){return e[t]=r,e},j=function(e,t){try{M(h,e,t)}catch(r){h[e]=t}return t},G="__core-js_shared__",K=h[G]||j(G,{}),U=Function.toString;"function"!=typeof K.inspectSource&&(K.inspectSource=function(e){return U.call(e)});var W,V,X,z,q=K.inspectSource,Q=h.WeakMap,Y="function"==typeof Q&&/native code/.test(q(Q)),H=p((function(e){(e.exports=function(e,t){return K[e]||(K[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.13.1",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),J=0,Z=Math.random(),ee=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++J+Z).toString(36)},te=H("keys"),re={},ne="Object already initialized",ie=h.WeakMap;if(Y||K.state){var se=K.state||(K.state=new ie),ue=se.get,ae=se.has,oe=se.set;W=function(e,t){if(ae.call(se,e))throw new TypeError(ne);return t.facade=e,oe.call(se,e,t),t},V=function(e){return ue.call(se,e)||{}},X=function(e){return ae.call(se,e)}}else{var De=te[z="state"]||(te[z]=ee(z));re[De]=!0,W=function(e,t){if(b(e,De))throw new TypeError(ne);return t.facade=e,M(e,De,t),t},V=function(e){return b(e,De)?e[De]:{}},X=function(e){return b(e,De)}}var ce,pe,le={set:W,get:V,has:X,enforce:function(e){return X(e)?V(e):W(e,{})},getterFor:function(e){return function(t){var r;if(!S(t)||(r=V(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},he=p((function(e){var t=le.get,r=le.enforce,n=String(String).split("String");(e.exports=function(e,t,i,s){var u,a=!!s&&!!s.unsafe,o=!!s&&!!s.enumerable,D=!!s&&!!s.noTargetGet;"function"==typeof i&&("string"!=typeof t||b(i,"name")||M(i,"name",t),(u=r(i)).source||(u.source=n.join("string"==typeof t?t:""))),e!==h?(a?!D&&e[t]&&(o=!0):delete e[t],o?e[t]=i:M(e,t,i)):o?e[t]=i:j(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||q(this)}))})),de=h,fe=function(e){return"function"==typeof e?e:void 0},Ee=function(e,t){return arguments.length<2?fe(de[e])||fe(h[e]):de[e]&&de[e][t]||h[e]&&h[e][t]},Ce=Math.ceil,ve=Math.floor,Fe=function(e){return isNaN(e=+e)?0:(e>0?ve:Ce)(e)},ge=Math.min,me=function(e){return e>0?ge(Fe(e),9007199254740991):0},ye=Math.max,xe=Math.min,Ae=function(e){return function(t,r,n){var i,s=w(t),u=me(s.length),a=function(e,t){var r=Fe(e);return r<0?ye(r+t,0):xe(r,t)}(n,u);if(e&&r!=r){for(;u>a;)if((i=s[a++])!=i)return!0}else for(;u>a;a++)if((e||a in s)&&s[a]===r)return e||a||0;return!e&&-1}},we={includes:Ae(!0),indexOf:Ae(!1)}.indexOf,Se=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),Ie={f:Object.getOwnPropertyNames||function(e){return function(e,t){var r,n=w(e),i=0,s=[];for(r in n)!b(re,r)&&b(n,r)&&s.push(r);for(;t.length>i;)b(n,r=t[i++])&&(~we(s,r)||s.push(r));return s}(e,Se)}},Oe={f:Object.getOwnPropertySymbols},Ne=Ee("Reflect","ownKeys")||function(e){var t=Ie.f(k(e)),r=Oe.f;return r?t.concat(r(e)):t},be=function(e,t){for(var r=Ne(t),n=_.f,i=R.f,s=0;s<r.length;s++){var u=r[s];b(e,u)||n(e,u,i(t,u))}},Be=/#|\.prototype\./,Pe=function(e,t){var r=Le[Te(e)];return r==ke||r!=Re&&("function"==typeof t?d(t):!!t)},Te=Pe.normalize=function(e){return String(e).replace(Be,".").toLowerCase()},Le=Pe.data={},Re=Pe.NATIVE="N",ke=Pe.POLYFILL="P",$e=Pe,_e=R.f,Me=function(e,t){var r,n,i,s,u,a=e.target,o=e.global,D=e.stat;if(r=o?h:D?h[a]||j(a,{}):(h[a]||{}).prototype)for(n in t){if(s=t[n],i=e.noTargetGet?(u=_e(r,n))&&u.value:r[n],!$e(o?n:a+(D?".":"#")+n,e.forced)&&void 0!==i){if(typeof s==typeof i)continue;be(s,i)}(e.sham||i&&i.sham)&&M(s,"sham",!0),he(r,n,s,e)}},je=Array.isArray||function(e){return"Array"==m(e)},Ge=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},Ke=function(e,t,r){if(Ge(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}},Ue=function(e,t,r,n,i,s,u,a){for(var o,D=i,c=0,p=!!u&&Ke(u,a,3);c<n;){if(c in r){if(o=p?p(r[c],c,t):r[c],s>0&&je(o))D=Ue(e,t,o,me(o.length),D,s-1)-1;else{if(D>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[D]=o}D++}c++}return D},We=Ue,Ve=Ee("navigator","userAgent")||"",Xe=h.process,ze=Xe&&Xe.versions,qe=ze&&ze.v8;qe?pe=(ce=qe.split("."))[0]<4?1:ce[0]+ce[1]:Ve&&(!(ce=Ve.match(/Edge\/(\d+)/))||ce[1]>=74)&&(ce=Ve.match(/Chrome\/(\d+)/))&&(pe=ce[1]);var Qe=pe&&+pe,Ye=!!Object.getOwnPropertySymbols&&!d((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Qe&&Qe<41})),He=Ye&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Je=H("wks"),Ze=h.Symbol,et=He?Ze:Ze&&Ze.withoutSetter||ee,tt=function(e){return b(Je,e)&&(Ye||"string"==typeof Je[e])||(Ye&&b(Ze,e)?Je[e]=Ze[e]:Je[e]=et("Symbol."+e)),Je[e]},rt=tt("species"),nt=function(e,t){var r;return je(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!je(r.prototype)?S(r)&&null===(r=r[rt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===t?0:t)};Me({target:"Array",proto:!0},{flatMap:function(e){var t,r=O(this),n=me(r.length);return Ge(e),(t=nt(r,0)).length=We(t,r,r,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var it={},st=tt("iterator"),ut=Array.prototype,at={};at[tt("toStringTag")]="z";var ot="[object z]"===String(at),Dt=tt("toStringTag"),ct="Arguments"==m(function(){return arguments}()),pt=ot?m:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Dt))?r:ct?m(t):"Object"==(n=m(t))&&"function"==typeof t.callee?"Arguments":n},lt=tt("iterator"),ht=function(e){var t=e.return;if(void 0!==t)return k(t.call(e)).value},dt=function(e,t){this.stopped=e,this.result=t},ft=function(e,t,r){var n,i,s,u,a,o,D,c,p=r&&r.that,l=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),f=Ke(t,p,1+l+d),E=function(e){return n&&ht(n),new dt(!0,e)},C=function(e){return l?(k(e),d?f(e[0],e[1],E):f(e[0],e[1])):d?f(e,E):f(e)};if(h)n=e;else{if("function"!=typeof(i=function(e){if(null!=e)return e[lt]||e["@@iterator"]||it[pt(e)]}(e)))throw TypeError("Target is not iterable");if(void 0!==(c=i)&&(it.Array===c||ut[st]===c)){for(s=0,u=me(e.length);u>s;s++)if((a=C(e[s]))&&a instanceof dt)return a;return new dt(!1)}n=i.call(e)}for(o=n.next;!(D=o.call(n)).done;){try{a=C(D.value)}catch(e){throw ht(n),e}if("object"==typeof a&&a&&a instanceof dt)return a}return new dt(!1)};Me({target:"Object",stat:!0},{fromEntries:function(e){var t={};return ft(e,(function(e,r){!function(e,t,r){var n=I(t);n in e?_.f(e,n,F(0,r)):e[n]=r}(t,e,r)}),{AS_ENTRIES:!0}),t}});var Et=void 0!==Et?Et:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Ct(){throw new Error("setTimeout has not been defined")}function vt(){throw new Error("clearTimeout has not been defined")}var Ft=Ct,gt=vt;function mt(e){if(Ft===setTimeout)return setTimeout(e,0);if((Ft===Ct||!Ft)&&setTimeout)return Ft=setTimeout,setTimeout(e,0);try{return Ft(e,0)}catch(t){try{return Ft.call(null,e,0)}catch(t){return Ft.call(this,e,0)}}}"function"==typeof Et.setTimeout&&(Ft=setTimeout),"function"==typeof Et.clearTimeout&&(gt=clearTimeout);var yt,xt=[],At=!1,wt=-1;function St(){At&&yt&&(At=!1,yt.length?xt=yt.concat(xt):wt=-1,xt.length&&It())}function It(){if(!At){var e=mt(St);At=!0;for(var t=xt.length;t;){for(yt=xt,xt=[];++wt<t;)yt&&yt[wt].run();wt=-1,t=xt.length}yt=null,At=!1,function(e){if(gt===clearTimeout)return clearTimeout(e);if((gt===vt||!gt)&&clearTimeout)return gt=clearTimeout,clearTimeout(e);try{gt(e)}catch(t){try{return gt.call(null,e)}catch(t){return gt.call(this,e)}}}(e)}}function Ot(e,t){this.fun=e,this.array=t}Ot.prototype.run=function(){this.fun.apply(null,this.array)};function Nt(){}var bt=Nt,Bt=Nt,Pt=Nt,Tt=Nt,Lt=Nt,Rt=Nt,kt=Nt;var $t=Et.performance||{},_t=$t.now||$t.mozNow||$t.msNow||$t.oNow||$t.webkitNow||function(){return(new Date).getTime()};var Mt=new Date;var jt={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];xt.push(new Ot(e,t)),1!==xt.length||At||mt(It)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:bt,addListener:Bt,once:Pt,off:Tt,removeListener:Lt,removeAllListeners:Rt,emit:kt,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*_t.call($t),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Mt)/1e3}};var Gt="object"==typeof jt&&jt.env&&jt.env.NODE_DEBUG&&/\bsemver\b/i.test(jt.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Kt={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},Ut=p((function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r}=Kt,n=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let u=0;const a=(e,t,r)=>{const a=u++;Gt(a,t),s[e]=a,i[a]=t,n[a]=new RegExp(t,r?"g":void 0)};a("NUMERICIDENTIFIER","0|[1-9]\\d*"),a("NUMERICIDENTIFIERLOOSE","[0-9]+"),a("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),a("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),a("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),a("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),a("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),a("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),a("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),a("BUILDIDENTIFIER","[0-9A-Za-z-]+"),a("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),a("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),a("FULL",`^${i[s.FULLPLAIN]}$`),a("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),a("LOOSE",`^${i[s.LOOSEPLAIN]}$`),a("GTLT","((?:<|>)?=?)"),a("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),a("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),a("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),a("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),a("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),a("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),a("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),a("COERCERTL",i[s.COERCE],!0),a("LONETILDE","(?:~>?)"),a("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",a("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),a("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),a("LONECARET","(?:\\^)"),a("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",a("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),a("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),a("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),a("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),a("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",a("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),a("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),a("STAR","(<|>)?=?\\s*\\*"),a("GTE0","^\\s*>=\\s*0.0.0\\s*$"),a("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}));const Wt=["includePrerelease","loose","rtl"];var Vt=e=>e?"object"!=typeof e?{loose:!0}:Wt.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const Xt=/^[0-9]+$/,zt=(e,t)=>{const r=Xt.test(e),n=Xt.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1};var qt={compareIdentifiers:zt,rcompareIdentifiers:(e,t)=>zt(t,e)};const{MAX_LENGTH:Qt,MAX_SAFE_INTEGER:Yt}=Kt,{re:Ht,t:Jt}=Ut,{compareIdentifiers:Zt}=qt;class er{constructor(e,t){if(t=Vt(t),e instanceof er){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>Qt)throw new TypeError(`version is longer than ${Qt} characters`);Gt("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?Ht[Jt.LOOSE]:Ht[Jt.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Yt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Yt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Yt||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<Yt)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Gt("SemVer.compare",this.version,this.options,e),!(e instanceof er)){if("string"==typeof e&&e===this.version)return 0;e=new er(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof er||(e=new er(e,this.options)),Zt(this.major,e.major)||Zt(this.minor,e.minor)||Zt(this.patch,e.patch)}comparePre(e){if(e instanceof er||(e=new er(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],n=e.prerelease[t];if(Gt("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return Zt(r,n)}while(++t)}compareBuild(e){e instanceof er||(e=new er(e,this.options));let t=0;do{const r=this.build[t],n=e.build[t];if(Gt("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return Zt(r,n)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}var tr=er;var rr=(e,t,r)=>new tr(e,r).compare(new tr(t,r));var nr=(e,t,r)=>rr(e,t,r)<0;var ir=(e,t,r)=>rr(e,t,r)>=0,sr="2.3.1",ur=p((function(e,t){function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function n(){return"undefined"!=typeof WeakMap?new WeakMap:{add:r,delete:r,get:r,set:r,has:function(e){return!1}}}Object.defineProperty(t,"__esModule",{value:!0}),t.outdent=void 0;var i=Object.prototype.hasOwnProperty,s=function(e,t){return i.call(e,t)};function u(e,t){for(var r in t)s(t,r)&&(e[r]=t[r]);return e}var a=/^[ \t]*(?:\r\n|\r|\n)/,o=/(?:\r\n|\r|\n)[ \t]*$/,D=/^(?:[\r\n]|$)/,c=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,p=/^[ \t]*[\r\n][ \t\r\n]*$/;function l(e,t,r){var n=0,i=e[0].match(c);i&&(n=i[1].length);var s=new RegExp("(\\r\\n|\\r|\\n).{0,"+n+"}","g");t&&(e=e.slice(1));var u=r.newline,D=r.trimLeadingNewline,p=r.trimTrailingNewline,l="string"==typeof u,h=e.length;return e.map((function(e,t){return e=e.replace(s,"$1"),0===t&&D&&(e=e.replace(a,"")),t===h-1&&p&&(e=e.replace(o,"")),l&&(e=e.replace(/\r\n|\n|\r/g,(function(e){return u}))),e}))}function h(e,t){for(var r="",n=0,i=e.length;n<i;n++)r+=e[n],n<i-1&&(r+=t[n]);return r}function d(e){return s(e,"raw")&&s(e,"length")}var f=function e(t){var r=n(),i=n();return u((function n(s){for(var a=[],o=1;o<arguments.length;o++)a[o-1]=arguments[o];if(d(s)){var c=s,E=(a[0]===n||a[0]===f)&&p.test(c[0])&&D.test(c[1]),C=E?i:r,v=C.get(c);if(v||(v=l(c,E,t),C.set(c,v)),0===a.length)return v[0];var F=h(v,E?a.slice(1):a);return F}return e(u(u({},t),s||{}))}),{string:function(e){return l([e],!1,t)[0]}})}({trimLeadingNewline:!0,trimTrailingNewline:!0});t.outdent=f,t.default=f;try{e.exports=f,Object.defineProperty(f,"__esModule",{value:!0}),f.default=f,f.outdent=f}catch(e){}}));const{outdent:ar}=ur,or="Config",Dr="Editor",cr="Other",pr="Global",lr="Special",hr={cursorOffset:{since:"1.4.0",category:lr,type:"int",default:-1,range:{start:-1,end:Number.POSITIVE_INFINITY,step:1},description:ar`
2
+ Print (to stderr) where a cursor at the given position would move to after formatting.
3
+ This option cannot be used with --range-start and --range-end.
4
+ `,cliCategory:Dr},endOfLine:{since:"1.15.0",category:pr,type:"choice",default:[{since:"1.15.0",value:"auto"},{since:"2.0.0",value:"lf"}],description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:ar`
5
+ Maintain existing
6
+ (mixed values within one file are normalised by looking at what's used after the first line)
7
+ `}]},filepath:{since:"1.4.0",category:lr,type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:cr,cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:lr,type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:cr},parser:{since:"0.0.10",category:pr,type:"choice",default:[{since:"0.0.10",value:"babylon"},{since:"1.13.0",value:void 0}],description:"Which parser to use.",exception:e=>"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"espree",since:"2.2.0",description:"JavaScript"},{value:"meriyah",since:"2.2.0",description:"JavaScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:"2.3.0",description:"Ember / Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:pr,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:or},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:pr,description:ar`
8
+ Custom directory that contains prettier plugins in node_modules subdirectory.
9
+ Overrides default behavior when plugins are searched relatively to the location of Prettier.
10
+ Multiple values are accepted.
11
+ `,exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin-search-dir",cliCategory:or},printWidth:{since:"0.0.0",category:pr,type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},rangeEnd:{since:"1.4.0",category:lr,type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:ar`
12
+ Format code ending at a given character offset (exclusive).
13
+ The range will extend forwards to the end of the selected statement.
14
+ This option cannot be used with --cursor-offset.
15
+ `,cliCategory:Dr},rangeStart:{since:"1.4.0",category:lr,type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:ar`
16
+ Format code starting at a given character offset.
17
+ The range will extend backwards to the start of the first line containing the selected statement.
18
+ This option cannot be used with --cursor-offset.
19
+ `,cliCategory:Dr},requirePragma:{since:"1.7.0",category:lr,type:"boolean",default:!1,description:ar`
20
+ Require either '@prettier' or '@format' to be present in the file's first docblock comment
21
+ in order for it to be formatted.
22
+ `,cliCategory:cr},tabWidth:{type:"int",category:pr,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:pr,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:pr,type:"choice",default:[{since:"2.1.0",value:"auto"}],description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};const dr=["cliName","cliCategory","cliDescription"],fr={compare:rr,lt:nr,gte:ir},Er=sr,Cr={CATEGORY_CONFIG:or,CATEGORY_EDITOR:Dr,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:cr,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:pr,CATEGORY_SPECIAL:lr,options:hr}.options;var vr={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:r=!1,showInternal:n=!1}={}){const i=Er.split("-",1)[0],s=e.flatMap((e=>e.languages||[])).filter(c),u=(a=Object.assign({},...e.map((({options:e})=>e)),Cr),o="name",Object.entries(a).map((([e,t])=>Object.assign({[o]:e},t)))).filter((e=>c(e)&&p(e))).sort(((e,t)=>e.name===t.name?0:e.name<t.name?-1:1)).map((function(e){if(n)return e;return D(e,dr)})).map((t=>{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(c).sort(((e,t)=>fr.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>c(e)&&p(e))),"parser"===t.name&&function(e,t,r){const n=new Set(e.choices.map((e=>e.value)));for(const i of t)if(i.parsers)for(const t of i.parsers)if(!n.has(t)){n.add(t);const s=r.find((e=>e.parsers&&e.parsers[t]));let u=i.name;s&&s.name&&(u+=` (plugin: ${s.name})`),e.choices.push({value:t,description:u})}}(t,s,e));const r=Object.fromEntries(e.filter((e=>e.defaultOptions&&void 0!==e.defaultOptions[t.name])).map((e=>[e.name,e.defaultOptions[t.name]])));return Object.assign(Object.assign({},t),{},{pluginDefaults:r})}));var a,o;return{languages:s,options:u};function c(e){return t||!("since"in e)||e.since&&fr.gte(i,e.since)}function p(e){return r||!("deprecated"in e)||e.deprecated&&fr.lt(i,e.deprecated)}}};const{getSupportInfo:Fr}=vr,gr=/[^\x20-\x7F]/;function mr(e){return(t,r,n)=>{const i=n&&n.backwards;if(!1===r)return!1;const{length:s}=t;let u=r;for(;u>=0&&u<s;){const r=t.charAt(u);if(e instanceof RegExp){if(!e.test(r))return u}else if(!e.includes(r))return u;i?u--:u++}return(-1===u||u===s)&&u}}const yr=mr(/\s/),xr=mr(" \t"),Ar=mr(",; \t"),wr=mr(/[^\n\r]/);function Sr(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t}function Ir(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?wr(e,t):t)}function Or(e,t,r){const n=r&&r.backwards;if(!1===t)return!1;const i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t}function Nr(e,t,r={}){const n=xr(e,r.backwards?t-1:t,r);return n!==Or(e,n,r)}function br(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Ar(e,n),n=Sr(e,n),n=xr(e,n);return n=Ir(e,n),n=Or(e,n),!1!==n&&Nr(e,n)}function Br(e,t){let r=null,n=t;for(;n!==r;)r=n,n=xr(e,n),n=Sr(e,n),n=Ir(e,n),n=Or(e,n);return n}function Pr(e,t,r){return Br(e,r(t))}function Tr(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n}function Lr(e,t){const r=e.slice(1,-1),n={quote:'"',regex:/"/g},i={quote:"'",regex:/'/g},s="'"===t?i:n,u=s===i?n:i;let a=s.quote;if(r.includes(s.quote)||r.includes(u.quote)){a=(r.match(s.regex)||[]).length>(r.match(u.regex)||[]).length?u.quote:s.quote}return a}function Rr(e,t,r){const n='"'===t?"'":'"',i=e.replace(/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t}function kr(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){const t=e.type||e.kind||"(unknown type)";let r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");r.length>20&&(r=r.slice(0,19)+"\u2026");return t+(r?" "+r:"")}(e)}var $r={inferParserByLanguage:function(e,t){const{languages:r}=Fr({plugins:t.plugins}),n=r.find((({name:t})=>t.toLowerCase()===e))||r.find((({aliases:t})=>Array.isArray(t)&&t.includes(e)))||r.find((({extensions:t})=>Array.isArray(t)&&t.includes(`.${e}`)));return n&&n.parsers[0]},getStringWidth:function(e){return e?gr.test(e)?s(e):e.length:0},getMaxContinuousCount:function(e,t){const r=e.match(new RegExp(`(${a(t)})+`,"g"));return null===r?0:r.reduce(((e,r)=>Math.max(e,r.length/t.length)),0)},getMinNotPresentContinuousCount:function(e,t){const r=e.match(new RegExp(`(${a(t)})+`,"g"));if(null===r)return 0;const n=new Map;let i=0;for(const e of r){const r=e.length/t.length;n.set(r,!0),r>i&&(i=r)}for(let e=1;e<i;e++)if(!n.get(e))return e;return i+1},getPenultimate:e=>e[e.length-2],getLast:o,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:Br,getNextNonSpaceNonCommentCharacterIndex:Pr,getNextNonSpaceNonCommentCharacter:function(e,t,r){return e.charAt(Pr(e,t,r))},skip:mr,skipWhitespace:yr,skipSpaces:xr,skipToLineEnd:Ar,skipEverythingButNewLine:wr,skipInlineComment:Sr,skipTrailingComment:Ir,skipNewline:Or,isNextLineEmptyAfterIndex:br,isNextLineEmpty:function(e,t,r){return br(e,r(t))},isPreviousLineEmpty:function(e,t,r){let n=r(t)-1;return n=xr(e,n,{backwards:!0}),n=Or(e,n,{backwards:!0}),n=xr(e,n,{backwards:!0}),n!==Or(e,n,{backwards:!0})},hasNewline:Nr,hasNewlineInRange:function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1},hasSpaces:function(e,t,r={}){return xr(e,r.backwards?t-1:t,r)!==t},getAlignmentSize:Tr,getIndentSize:function(e,t){const r=e.lastIndexOf("\n");return-1===r?0:Tr(e.slice(r+1).match(/^[\t ]*/)[0],t)},getPreferredQuote:Lr,printString:function(e,t){return Rr(e.slice(1,-1),"json"===t.parser||"json5"===t.parser&&"preserve"===t.quoteProps&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":Lr(e,t.singleQuote?"'":'"'),!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.__embeddedInHtml))},printNumber:function(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")},makeString:Rr,addLeadingComment:function(e,t){t.leading=!0,t.trailing=!1,kr(e,t)},addDanglingComment:function(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),kr(e,t)},addTrailingComment:function(e,t){t.leading=!1,t.trailing=!0,kr(e,t)},isFrontMatterNode:function(e){return e&&"front-matter"===e.type},getShebang:function(e){if(!e.startsWith("#!"))return"";const t=e.indexOf("\n");return-1===t?e:e.slice(0,t)},isNonEmptyArray:function(e){return Array.isArray(e)&&e.length>0},createGroupIdMapper:function(e){const t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}};const{isNonEmptyArray:_r}=$r;function Mr(e,t){const{ignoreDecorators:r}=t||{};if(!r){const t=e.declaration&&e.declaration.decorators||e.decorators;if(_r(t))return Mr(t[0])}return e.range?e.range[0]:e.start}function jr(e){return e.range?e.range[1]:e.end}function Gr(e,t){return Mr(e)===Mr(t)}var Kr,Ur={locStart:Mr,locEnd:jr,hasSameLocStart:Gr,hasSameLoc:function(e,t){return Gr(e,t)&&function(e,t){return jr(e)===jr(t)}(e,t)}},Wr=p((function(e,t){var r="\n",n=function(){function e(e){this.string=e;for(var t=[0],n=0;n<e.length;)switch(e[n]){case r:n+=r.length,t.push(n);break;case"\r":e[n+="\r".length]===r&&(n+=r.length),t.push(n);break;default:n++}this.offsets=t}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,r=this.offsets;r[t+1]<=e;)t++;return{line:t,column:e-r[t]}},e.prototype.indexForLocation=function(e){var t=e.line,r=e.column;return t<0||t>=this.offsets.length||r<0||r>this.lengthOfLine(t)?null:this.offsets[t]+r},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();t.__esModule=!0,t.default=n})),Vr=p((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;t.Context=class{constructor(e){this.text=e,this.locator=new r(this.text)}};class r{constructor(e){this._lineAndColumn=new Wr.default(e)}locationForIndex(e){const{line:t,column:r}=this._lineAndColumn.locationForIndex(e);return{line:t+1,column:r}}}}));
2
23
  /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.io/license
8
- */
9
- class o{constructor(t,e,s,n){this.input=e,this.errLocation=s,this.ctxLocation=n,this.message="Parser Error: ".concat(t," ").concat(s," [").concat(e,"] in ").concat(n)}}class c{constructor(t,e){this.start=t,this.end=e}toAbsolute(t){return new L(t+this.start,t+this.end)}}class h{constructor(t,e){this.span=t,this.sourceSpan=e}visit(t,e=null){return null}toString(){return"AST"}}class p extends h{constructor(t,e,s){super(t,e),this.nameSpan=s}}class u extends h{constructor(t,e,s,n,r){super(t,e),this.prefix=s,this.uninterpretedExpression=n,this.location=r}visit(t,e=null){return t.visitQuote(this,e)}toString(){return"Quote"}}class l extends h{visit(t,e=null){}}class d extends h{visit(t,e=null){return t.visitImplicitReceiver(this,e)}}class f extends h{constructor(t,e,s){super(t,e),this.expressions=s}visit(t,e=null){return t.visitChain(this,e)}}class v extends h{constructor(t,e,s,n,r){super(t,e),this.condition=s,this.trueExp=n,this.falseExp=r}visit(t,e=null){return t.visitConditional(this,e)}}class x extends p{constructor(t,e,s,n,r){super(t,e,s),this.receiver=n,this.name=r}visit(t,e=null){return t.visitPropertyRead(this,e)}}class g extends p{constructor(t,e,s,n,r,i){super(t,e,s),this.receiver=n,this.name=r,this.value=i}visit(t,e=null){return t.visitPropertyWrite(this,e)}}class m extends p{constructor(t,e,s,n,r){super(t,e,s),this.receiver=n,this.name=r}visit(t,e=null){return t.visitSafePropertyRead(this,e)}}class y extends h{constructor(t,e,s,n){super(t,e),this.obj=s,this.key=n}visit(t,e=null){return t.visitKeyedRead(this,e)}}class S extends h{constructor(t,e,s,n,r){super(t,e),this.obj=s,this.key=n,this.value=r}visit(t,e=null){return t.visitKeyedWrite(this,e)}}class w extends p{constructor(t,e,s,n,r,i){super(t,e,i),this.exp=s,this.name=n,this.args=r}visit(t,e=null){return t.visitPipe(this,e)}}class C extends h{constructor(t,e,s){super(t,e),this.value=s}visit(t,e=null){return t.visitLiteralPrimitive(this,e)}}class P extends h{constructor(t,e,s){super(t,e),this.expressions=s}visit(t,e=null){return t.visitLiteralArray(this,e)}}class E extends h{constructor(t,e,s,n){super(t,e),this.keys=s,this.values=n}visit(t,e=null){return t.visitLiteralMap(this,e)}}class A extends h{constructor(t,e,s,n){super(t,e),this.strings=s,this.expressions=n}visit(t,e=null){return t.visitInterpolation(this,e)}}class O extends h{constructor(t,e,s,n,r){super(t,e),this.operation=s,this.left=n,this.right=r}visit(t,e=null){return t.visitBinary(this,e)}}class b extends h{constructor(t,e,s){super(t,e),this.expression=s}visit(t,e=null){return t.visitPrefixNot(this,e)}}class k extends h{constructor(t,e,s){super(t,e),this.expression=s}visit(t,e=null){return t.visitNonNullAssert(this,e)}}class N extends p{constructor(t,e,s,n,r,i){super(t,e,s),this.receiver=n,this.name=r,this.args=i}visit(t,e=null){return t.visitMethodCall(this,e)}}class I extends p{constructor(t,e,s,n,r,i){super(t,e,s),this.receiver=n,this.name=r,this.args=i}visit(t,e=null){return t.visitSafeMethodCall(this,e)}}class _ extends h{constructor(t,e,s,n){super(t,e),this.target=s,this.args=n}visit(t,e=null){return t.visitFunctionCall(this,e)}}class L{constructor(t,e){this.start=t,this.end=e}}class K extends h{constructor(t,e,s,n,r){super(new c(0,null===e?0:e.length),new L(n,null===e?n:n+e.length)),this.ast=t,this.source=e,this.location=s,this.errors=r}visit(t,e=null){return t.visitASTWithSource?t.visitASTWithSource(this,e):this.ast.visit(t,e)}toString(){return"".concat(this.source," in ").concat(this.location)}}class M{constructor(t,e,s){this.sourceSpan=t,this.key=e,this.value=s}}class T{constructor(t,e,s){this.sourceSpan=t,this.key=e,this.value=s}}class B{visit(t,e){t.visit(this,e)}visitBinary(t,e){this.visit(t.left,e),this.visit(t.right,e)}visitChain(t,e){this.visitAll(t.expressions,e)}visitConditional(t,e){this.visit(t.condition,e),this.visit(t.trueExp,e),this.visit(t.falseExp,e)}visitPipe(t,e){this.visit(t.exp,e),this.visitAll(t.args,e)}visitFunctionCall(t,e){t.target&&this.visit(t.target,e),this.visitAll(t.args,e)}visitImplicitReceiver(t,e){}visitInterpolation(t,e){this.visitAll(t.expressions,e)}visitKeyedRead(t,e){this.visit(t.obj,e),this.visit(t.key,e)}visitKeyedWrite(t,e){this.visit(t.obj,e),this.visit(t.key,e),this.visit(t.value,e)}visitLiteralArray(t,e){this.visitAll(t.expressions,e)}visitLiteralMap(t,e){this.visitAll(t.values,e)}visitLiteralPrimitive(t,e){}visitMethodCall(t,e){this.visit(t.receiver,e),this.visitAll(t.args,e)}visitPrefixNot(t,e){this.visit(t.expression,e)}visitNonNullAssert(t,e){this.visit(t.expression,e)}visitPropertyRead(t,e){this.visit(t.receiver,e)}visitPropertyWrite(t,e){this.visit(t.receiver,e),this.visit(t.value,e)}visitSafePropertyRead(t,e){this.visit(t.receiver,e)}visitSafeMethodCall(t,e){this.visit(t.receiver,e),this.visitAll(t.args,e)}visitQuote(t,e){}visitAll(t,e){for(const s of t)this.visit(s,e)}}!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.LITERAL_ATTR=1]="LITERAL_ATTR",t[t.ANIMATION=2]="ANIMATION"}(r||(r={}));var R=Object.freeze({__proto__:null,ParserError:o,ParseSpan:c,AST:h,ASTWithName:p,Quote:u,EmptyExpr:l,ImplicitReceiver:d,Chain:f,Conditional:v,PropertyRead:x,PropertyWrite:g,SafePropertyRead:m,KeyedRead:y,KeyedWrite:S,BindingPipe:w,LiteralPrimitive:C,LiteralArray:P,LiteralMap:E,Interpolation:A,Binary:O,PrefixNot:b,NonNullAssert:k,MethodCall:N,SafeMethodCall:I,FunctionCall:_,AbsoluteSourceSpan:L,ASTWithSource:K,VariableBinding:M,ExpressionBinding:T,RecursiveAstVisitor:B,AstTransformer:class{visitImplicitReceiver(t,e){return t}visitInterpolation(t,e){return new A(t.span,t.sourceSpan,t.strings,this.visitAll(t.expressions))}visitLiteralPrimitive(t,e){return new C(t.span,t.sourceSpan,t.value)}visitPropertyRead(t,e){return new x(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name)}visitPropertyWrite(t,e){return new g(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name,t.value.visit(this))}visitSafePropertyRead(t,e){return new m(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name)}visitMethodCall(t,e){return new N(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name,this.visitAll(t.args))}visitSafeMethodCall(t,e){return new I(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name,this.visitAll(t.args))}visitFunctionCall(t,e){return new _(t.span,t.sourceSpan,t.target.visit(this),this.visitAll(t.args))}visitLiteralArray(t,e){return new P(t.span,t.sourceSpan,this.visitAll(t.expressions))}visitLiteralMap(t,e){return new E(t.span,t.sourceSpan,t.keys,this.visitAll(t.values))}visitBinary(t,e){return new O(t.span,t.sourceSpan,t.operation,t.left.visit(this),t.right.visit(this))}visitPrefixNot(t,e){return new b(t.span,t.sourceSpan,t.expression.visit(this))}visitNonNullAssert(t,e){return new k(t.span,t.sourceSpan,t.expression.visit(this))}visitConditional(t,e){return new v(t.span,t.sourceSpan,t.condition.visit(this),t.trueExp.visit(this),t.falseExp.visit(this))}visitPipe(t,e){return new w(t.span,t.sourceSpan,t.exp.visit(this),t.name,this.visitAll(t.args),t.nameSpan)}visitKeyedRead(t,e){return new y(t.span,t.sourceSpan,t.obj.visit(this),t.key.visit(this))}visitKeyedWrite(t,e){return new S(t.span,t.sourceSpan,t.obj.visit(this),t.key.visit(this),t.value.visit(this))}visitAll(t){const e=[];for(let s=0;s<t.length;++s)e[s]=t[s].visit(this);return e}visitChain(t,e){return new f(t.span,t.sourceSpan,this.visitAll(t.expressions))}visitQuote(t,e){return new u(t.span,t.sourceSpan,t.prefix,t.uninterpretedExpression,t.location)}},AstMemoryEfficientTransformer:class{visitImplicitReceiver(t,e){return t}visitInterpolation(t,e){const s=this.visitAll(t.expressions);return s!==t.expressions?new A(t.span,t.sourceSpan,t.strings,s):t}visitLiteralPrimitive(t,e){return t}visitPropertyRead(t,e){const s=t.receiver.visit(this);return s!==t.receiver?new x(t.span,t.sourceSpan,t.nameSpan,s,t.name):t}visitPropertyWrite(t,e){const s=t.receiver.visit(this),n=t.value.visit(this);return s!==t.receiver||n!==t.value?new g(t.span,t.sourceSpan,t.nameSpan,s,t.name,n):t}visitSafePropertyRead(t,e){const s=t.receiver.visit(this);return s!==t.receiver?new m(t.span,t.sourceSpan,t.nameSpan,s,t.name):t}visitMethodCall(t,e){const s=t.receiver.visit(this),n=this.visitAll(t.args);return s!==t.receiver||n!==t.args?new N(t.span,t.sourceSpan,t.nameSpan,s,t.name,n):t}visitSafeMethodCall(t,e){const s=t.receiver.visit(this),n=this.visitAll(t.args);return s!==t.receiver||n!==t.args?new I(t.span,t.sourceSpan,t.nameSpan,s,t.name,n):t}visitFunctionCall(t,e){const s=t.target&&t.target.visit(this),n=this.visitAll(t.args);return s!==t.target||n!==t.args?new _(t.span,t.sourceSpan,s,n):t}visitLiteralArray(t,e){const s=this.visitAll(t.expressions);return s!==t.expressions?new P(t.span,t.sourceSpan,s):t}visitLiteralMap(t,e){const s=this.visitAll(t.values);return s!==t.values?new E(t.span,t.sourceSpan,t.keys,s):t}visitBinary(t,e){const s=t.left.visit(this),n=t.right.visit(this);return s!==t.left||n!==t.right?new O(t.span,t.sourceSpan,t.operation,s,n):t}visitPrefixNot(t,e){const s=t.expression.visit(this);return s!==t.expression?new b(t.span,t.sourceSpan,s):t}visitNonNullAssert(t,e){const s=t.expression.visit(this);return s!==t.expression?new k(t.span,t.sourceSpan,s):t}visitConditional(t,e){const s=t.condition.visit(this),n=t.trueExp.visit(this),r=t.falseExp.visit(this);return s!==t.condition||n!==t.trueExp||r!==t.falseExp?new v(t.span,t.sourceSpan,s,n,r):t}visitPipe(t,e){const s=t.exp.visit(this),n=this.visitAll(t.args);return s!==t.exp||n!==t.args?new w(t.span,t.sourceSpan,s,t.name,n,t.nameSpan):t}visitKeyedRead(t,e){const s=t.obj.visit(this),n=t.key.visit(this);return s!==t.obj||n!==t.key?new y(t.span,t.sourceSpan,s,n):t}visitKeyedWrite(t,e){const s=t.obj.visit(this),n=t.key.visit(this),r=t.value.visit(this);return s!==t.obj||n!==t.key||r!==t.value?new S(t.span,t.sourceSpan,s,n,r):t}visitAll(t){const e=[];let s=!1;for(let n=0;n<t.length;++n){const r=t[n],i=r.visit(this);e[n]=i,s=s||i!==r}return s?e:t}visitChain(t,e){const s=this.visitAll(t.expressions);return s!==t.expressions?new f(t.span,t.sourceSpan,s):t}visitQuote(t,e){return t}},ParsedProperty:class{constructor(t,e,s,n,i){this.name=t,this.expression=e,this.type=s,this.sourceSpan=n,this.valueSpan=i,this.isLiteral=this.type===r.LITERAL_ATTR,this.isAnimation=this.type===r.ANIMATION}},get ParsedPropertyType(){return r},ParsedEvent:class{constructor(t,e,s,n,r,i){this.name=t,this.targetOrPhase=e,this.type=s,this.handler=n,this.sourceSpan=r,this.handlerSpan=i}},ParsedVariable:class{constructor(t,e,s,n,r){this.name=t,this.value=e,this.sourceSpan=s,this.keySpan=n,this.valueSpan=r}},BoundElementProperty:class{constructor(t,e,s,n,r,i,a){this.name=t,this.type=e,this.securityContext=s,this.value=n,this.unit=r,this.sourceSpan=i,this.valueSpan=a}}});
24
+ * @license
25
+ * Copyright Google LLC All Rights Reserved.
26
+ *
27
+ * Use of this source code is governed by an MIT-style license that can be
28
+ * found in the LICENSE file at https://angular.io/license
29
+ */
30
+ class Xr{constructor(e,t,r,n){this.input=t,this.errLocation=r,this.ctxLocation=n,this.message=`Parser Error: ${e} ${r} [${t}] in ${n}`}}class zr{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new gn(e+this.start,e+this.end)}}class qr{constructor(e,t){this.span=e,this.sourceSpan=t}visit(e,t=null){return null}toString(){return"AST"}}class Qr extends qr{constructor(e,t,r){super(e,t),this.nameSpan=r}}class Yr extends qr{constructor(e,t,r,n,i){super(e,t),this.prefix=r,this.uninterpretedExpression=n,this.location=i}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}}class Hr extends qr{visit(e,t=null){}}class Jr extends qr{visit(e,t=null){return e.visitImplicitReceiver(this,t)}}class Zr extends Jr{visit(e,t=null){var r;return null===(r=e.visitThisReceiver)||void 0===r?void 0:r.call(e,this,t)}}class en extends qr{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitChain(this,t)}}class tn extends qr{constructor(e,t,r,n,i){super(e,t),this.condition=r,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}}class rn extends Qr{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}}class nn extends Qr{constructor(e,t,r,n,i,s){super(e,t,r),this.receiver=n,this.name=i,this.value=s}visit(e,t=null){return e.visitPropertyWrite(this,t)}}class sn extends Qr{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}}class un extends qr{constructor(e,t,r,n){super(e,t),this.obj=r,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}}class an extends qr{constructor(e,t,r,n,i){super(e,t),this.obj=r,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}}class on extends Qr{constructor(e,t,r,n,i,s){super(e,t,s),this.exp=r,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}}class Dn extends qr{constructor(e,t,r){super(e,t),this.value=r}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}}class cn extends qr{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitLiteralArray(this,t)}}class pn extends qr{constructor(e,t,r,n){super(e,t),this.keys=r,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}}class ln extends qr{constructor(e,t,r,n){super(e,t),this.strings=r,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}}class hn extends qr{constructor(e,t,r,n,i){super(e,t),this.operation=r,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}}class dn extends hn{constructor(e,t,r,n,i,s,u){super(e,t,i,s,u),this.operator=r,this.expr=n}static createMinus(e,t,r){return new dn(e,t,"-",r,"-",new Dn(e,t,0),r)}static createPlus(e,t,r){return new dn(e,t,"+",r,"-",r,new Dn(e,t,0))}visit(e,t=null){return void 0!==e.visitUnary?e.visitUnary(this,t):e.visitBinary(this,t)}}class fn extends qr{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitPrefixNot(this,t)}}class En extends qr{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitNonNullAssert(this,t)}}class Cn extends Qr{constructor(e,t,r,n,i,s,u){super(e,t,r),this.receiver=n,this.name=i,this.args=s,this.argumentSpan=u}visit(e,t=null){return e.visitMethodCall(this,t)}}class vn extends Qr{constructor(e,t,r,n,i,s,u){super(e,t,r),this.receiver=n,this.name=i,this.args=s,this.argumentSpan=u}visit(e,t=null){return e.visitSafeMethodCall(this,t)}}class Fn extends qr{constructor(e,t,r,n){super(e,t),this.target=r,this.args=n}visit(e,t=null){return e.visitFunctionCall(this,t)}}class gn{constructor(e,t){this.start=e,this.end=t}}class mn extends qr{constructor(e,t,r,n,i){super(new zr(0,null===t?0:t.length),new gn(n,null===t?n:n+t.length)),this.ast=e,this.source=t,this.location=r,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}}class yn{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}}class xn{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}}class An{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitFunctionCall(e,t){e.target&&this.visit(e.target,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.obj,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.obj,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitQuote(e,t){}visitAll(e,t){for(const r of e)this.visit(r,t)}}!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(Kr||(Kr={}));var wn=Object.freeze({__proto__:null,ParserError:Xr,ParseSpan:zr,AST:qr,ASTWithName:Qr,Quote:Yr,EmptyExpr:Hr,ImplicitReceiver:Jr,ThisReceiver:Zr,Chain:en,Conditional:tn,PropertyRead:rn,PropertyWrite:nn,SafePropertyRead:sn,KeyedRead:un,KeyedWrite:an,BindingPipe:on,LiteralPrimitive:Dn,LiteralArray:cn,LiteralMap:pn,Interpolation:ln,Binary:hn,Unary:dn,PrefixNot:fn,NonNullAssert:En,MethodCall:Cn,SafeMethodCall:vn,FunctionCall:Fn,AbsoluteSourceSpan:gn,ASTWithSource:mn,VariableBinding:yn,ExpressionBinding:xn,RecursiveAstVisitor:An,AstTransformer:class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new ln(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new Dn(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new rn(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new nn(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new sn(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new Cn(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitSafeMethodCall(e,t){return new vn(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitFunctionCall(e,t){return new Fn(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new cn(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new pn(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return dn.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return dn.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error(`Unknown unary operator ${e.operator}`)}}visitBinary(e,t){return new hn(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new fn(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new En(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new tn(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new on(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new un(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new an(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){const t=[];for(let r=0;r<e.length;++r)t[r]=e[r].visit(this);return t}visitChain(e,t){return new en(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitQuote(e,t){return new Yr(e.span,e.sourceSpan,e.prefix,e.uninterpretedExpression,e.location)}},AstMemoryEfficientTransformer:class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){const r=this.visitAll(e.expressions);return r!==e.expressions?new ln(e.span,e.sourceSpan,e.strings,r):e}visitLiteralPrimitive(e,t){return e}visitPropertyRead(e,t){const r=e.receiver.visit(this);return r!==e.receiver?new rn(e.span,e.sourceSpan,e.nameSpan,r,e.name):e}visitPropertyWrite(e,t){const r=e.receiver.visit(this),n=e.value.visit(this);return r!==e.receiver||n!==e.value?new nn(e.span,e.sourceSpan,e.nameSpan,r,e.name,n):e}visitSafePropertyRead(e,t){const r=e.receiver.visit(this);return r!==e.receiver?new sn(e.span,e.sourceSpan,e.nameSpan,r,e.name):e}visitMethodCall(e,t){const r=e.receiver.visit(this),n=this.visitAll(e.args);return r!==e.receiver||n!==e.args?new Cn(e.span,e.sourceSpan,e.nameSpan,r,e.name,n,e.argumentSpan):e}visitSafeMethodCall(e,t){const r=e.receiver.visit(this),n=this.visitAll(e.args);return r!==e.receiver||n!==e.args?new vn(e.span,e.sourceSpan,e.nameSpan,r,e.name,n,e.argumentSpan):e}visitFunctionCall(e,t){const r=e.target&&e.target.visit(this),n=this.visitAll(e.args);return r!==e.target||n!==e.args?new Fn(e.span,e.sourceSpan,r,n):e}visitLiteralArray(e,t){const r=this.visitAll(e.expressions);return r!==e.expressions?new cn(e.span,e.sourceSpan,r):e}visitLiteralMap(e,t){const r=this.visitAll(e.values);return r!==e.values?new pn(e.span,e.sourceSpan,e.keys,r):e}visitUnary(e,t){const r=e.expr.visit(this);if(r!==e.expr)switch(e.operator){case"+":return dn.createPlus(e.span,e.sourceSpan,r);case"-":return dn.createMinus(e.span,e.sourceSpan,r);default:throw new Error(`Unknown unary operator ${e.operator}`)}return e}visitBinary(e,t){const r=e.left.visit(this),n=e.right.visit(this);return r!==e.left||n!==e.right?new hn(e.span,e.sourceSpan,e.operation,r,n):e}visitPrefixNot(e,t){const r=e.expression.visit(this);return r!==e.expression?new fn(e.span,e.sourceSpan,r):e}visitNonNullAssert(e,t){const r=e.expression.visit(this);return r!==e.expression?new En(e.span,e.sourceSpan,r):e}visitConditional(e,t){const r=e.condition.visit(this),n=e.trueExp.visit(this),i=e.falseExp.visit(this);return r!==e.condition||n!==e.trueExp||i!==e.falseExp?new tn(e.span,e.sourceSpan,r,n,i):e}visitPipe(e,t){const r=e.exp.visit(this),n=this.visitAll(e.args);return r!==e.exp||n!==e.args?new on(e.span,e.sourceSpan,r,e.name,n,e.nameSpan):e}visitKeyedRead(e,t){const r=e.obj.visit(this),n=e.key.visit(this);return r!==e.obj||n!==e.key?new un(e.span,e.sourceSpan,r,n):e}visitKeyedWrite(e,t){const r=e.obj.visit(this),n=e.key.visit(this),i=e.value.visit(this);return r!==e.obj||n!==e.key||i!==e.value?new an(e.span,e.sourceSpan,r,n,i):e}visitAll(e){const t=[];let r=!1;for(let n=0;n<e.length;++n){const i=e[n],s=i.visit(this);t[n]=s,r=r||s!==i}return r?t:e}visitChain(e,t){const r=this.visitAll(e.expressions);return r!==e.expressions?new en(e.span,e.sourceSpan,r):e}visitQuote(e,t){return e}},ParsedProperty:class{constructor(e,t,r,n,i,s){this.name=e,this.expression=t,this.type=r,this.sourceSpan=n,this.keySpan=i,this.valueSpan=s,this.isLiteral=this.type===Kr.LITERAL_ATTR,this.isAnimation=this.type===Kr.ANIMATION}},get ParsedPropertyType(){return Kr},ParsedEvent:class{constructor(e,t,r,n,i,s,u){this.name=e,this.targetOrPhase=t,this.type=r,this.handler=n,this.sourceSpan=i,this.handlerSpan=s,this.keySpan=u}},ParsedVariable:class{constructor(e,t,r,n,i){this.name=e,this.value=t,this.sourceSpan=r,this.keySpan=n,this.valueSpan=i}},BoundElementProperty:class{constructor(e,t,r,n,i,s,u,a){this.name=e,this.type=t,this.securityContext=r,this.value=n,this.unit=i,this.sourceSpan=s,this.keySpan=u,this.valueSpan=a}}});
10
31
  /**
11
- * @license
12
- * Copyright Google LLC All Rights Reserved.
13
- *
14
- * Use of this source code is governed by an MIT-style license that can be
15
- * found in the LICENSE file at https://angular.io/license
16
- */function j(t){return 48<=t&&t<=57}
32
+ * @license
33
+ * Copyright Google LLC All Rights Reserved.
34
+ *
35
+ * Use of this source code is governed by an MIT-style license that can be
36
+ * found in the LICENSE file at https://angular.io/license
37
+ */const Sn=41,In=46,On=125;function Nn(e){return 48<=e&&e<=57}
17
38
  /**
18
- * @license
19
- * Copyright Google LLC All Rights Reserved.
20
- *
21
- * Use of this source code is governed by an MIT-style license that can be
22
- * found in the LICENSE file at https://angular.io/license
23
- */
24
- var F;!function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.Keyword=2]="Keyword",t[t.String=3]="String",t[t.Operator=4]="Operator",t[t.Number=5]="Number",t[t.Error=6]="Error"}(F||(F={}));const G=["var","let","as","null","undefined","true","false","if","else","this"];class V{constructor(t,e,s,n,r){this.index=t,this.end=e,this.type=s,this.numValue=n,this.strValue=r}isCharacter(t){return this.type==F.Character&&this.numValue==t}isNumber(){return this.type==F.Number}isString(){return this.type==F.String}isOperator(t){return this.type==F.Operator&&this.strValue==t}isIdentifier(){return this.type==F.Identifier}isKeyword(){return this.type==F.Keyword}isKeywordLet(){return this.type==F.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==F.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==F.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==F.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==F.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==F.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==F.Keyword&&"this"==this.strValue}isError(){return this.type==F.Error}toNumber(){return this.type==F.Number?this.numValue:-1}toString(){switch(this.type){case F.Character:case F.Identifier:case F.Keyword:case F.Operator:case F.String:case F.Error:return this.strValue;case F.Number:return this.numValue.toString();default:return null}}}function W(t,e,s){return new V(t,e,F.Character,s,String.fromCharCode(s))}function U(t,e,s){return new V(t,e,F.Operator,0,s)}const Q=new V(-1,-1,F.Character,0,"");class D{constructor(t){this.input=t,this.peek=0,this.index=-1,this.length=t.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){const t=this.input,e=this.length;let s=this.peek,n=this.index;for(;s<=32;){if(++n>=e){s=0;break}s=t.charCodeAt(n)}if(this.peek=s,this.index=n,n>=e)return null;if(z(s))return this.scanIdentifier();if(j(s))return this.scanNumber(n);const r=n;switch(s){case 46:return this.advance(),j(this.peek)?this.scanNumber(r):W(r,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(r,s);case 39:case 34:return this.scanString();case 35:case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(r,String.fromCharCode(s));case 63:return this.scanComplexOperator(r,"?",46,".");case 60:case 62:return this.scanComplexOperator(r,String.fromCharCode(s),61,"=");case 33:case 61:return this.scanComplexOperator(r,String.fromCharCode(s),61,"=",61,"=");case 38:return this.scanComplexOperator(r,"&",38,"&");case 124:return this.scanComplexOperator(r,"|",124,"|");case 160:for(;(i=this.peek)>=9&&i<=32||160==i;)this.advance();return this.scanToken()}var i;return this.advance(),this.error("Unexpected character [".concat(String.fromCharCode(s),"]"),0)}scanCharacter(t,e){return this.advance(),W(t,this.index,e)}scanOperator(t,e){return this.advance(),U(t,this.index,e)}scanComplexOperator(t,e,s,n,r,i){this.advance();let a=e;return this.peek==s&&(this.advance(),a+=n),null!=r&&this.peek==r&&(this.advance(),a+=i),U(t,this.index,a)}scanIdentifier(){const t=this.index;for(this.advance();$(this.peek);)this.advance();const e=this.input.substring(t,this.index);return G.indexOf(e)>-1?(s=t,n=this.index,r=e,new V(s,n,F.Keyword,0,r)):function(t,e,s){return new V(t,e,F.Identifier,0,s)}(t,this.index,e);var s,n,r}scanNumber(t){let e=this.index===t;for(this.advance();;){if(j(this.peek));else if(46==this.peek)e=!1;else{if(101!=(s=this.peek)&&69!=s)break;if(this.advance(),X(this.peek)&&this.advance(),!j(this.peek))return this.error("Invalid exponent",-1);e=!1}this.advance()}var s;const n=this.input.substring(t,this.index),r=e?function(t){const e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}(n):parseFloat(n);return i=t,a=this.index,o=r,new V(i,a,F.Number,o,"");var i,a,o}scanString(){const t=this.index,e=this.peek;this.advance();let s="",n=this.index;const r=this.input;for(;this.peek!=e;)if(92==this.peek){let t;if(s+=r.substring(n,this.index),this.advance(),this.peek=this.peek,117==this.peek){const e=r.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(e))return this.error("Invalid unicode escape [\\u".concat(e,"]"),0);t=parseInt(e,16);for(let t=0;t<5;t++)this.advance()}else t=H(this.peek),this.advance();s+=String.fromCharCode(t),n=this.index}else{if(0==this.peek)return this.error("Unterminated quote",0);this.advance()}const i=r.substring(n,this.index);return this.advance(),a=t,o=this.index,c=s+i,new V(a,o,F.String,0,c);var a,o,c}error(t,e){const s=this.index+e;return function(t,e,s){return new V(t,e,F.Error,0,s)}(s,this.index,"Lexer Error: ".concat(t," at column ").concat(s," in expression [").concat(this.input,"]"))}}function z(t){return 97<=t&&t<=122||65<=t&&t<=90||95==t||36==t}function q(t){if(0==t.length)return!1;const e=new D(t);if(!z(e.peek))return!1;for(e.advance();0!==e.peek;){if(!$(e.peek))return!1;e.advance()}return!0}function $(t){return function(t){return t>=97&&t<=122||t>=65&&t<=90}(t)||j(t)||95==t||36==t}function X(t){return 45==t||43==t}function J(t){return 39===t||34===t||96===t}function H(t){switch(t){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return t}}var Y=Object.freeze({__proto__:null,get TokenType(){return F},Lexer:class{tokenize(t){const e=new D(t),s=[];let n=e.scanToken();for(;null!=n;)s.push(n),n=e.scanToken();return s}},Token:V,EOF:Q,isIdentifier:q,isQuote:J});
39
+ * @license
40
+ * Copyright Google LLC All Rights Reserved.
41
+ *
42
+ * Use of this source code is governed by an MIT-style license that can be
43
+ * found in the LICENSE file at https://angular.io/license
44
+ */
45
+ var bn;!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.PrivateIdentifier=2]="PrivateIdentifier",e[e.Keyword=3]="Keyword",e[e.String=4]="String",e[e.Operator=5]="Operator",e[e.Number=6]="Number",e[e.Error=7]="Error"}(bn||(bn={}));const Bn=["var","let","as","null","undefined","true","false","if","else","this"];class Pn{constructor(e,t,r,n,i){this.index=e,this.end=t,this.type=r,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==bn.Character&&this.numValue==e}isNumber(){return this.type==bn.Number}isString(){return this.type==bn.String}isOperator(e){return this.type==bn.Operator&&this.strValue==e}isIdentifier(){return this.type==bn.Identifier}isPrivateIdentifier(){return this.type==bn.PrivateIdentifier}isKeyword(){return this.type==bn.Keyword}isKeywordLet(){return this.type==bn.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==bn.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==bn.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==bn.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==bn.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==bn.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==bn.Keyword&&"this"==this.strValue}isError(){return this.type==bn.Error}toNumber(){return this.type==bn.Number?this.numValue:-1}toString(){switch(this.type){case bn.Character:case bn.Identifier:case bn.Keyword:case bn.Operator:case bn.PrivateIdentifier:case bn.String:case bn.Error:return this.strValue;case bn.Number:return this.numValue.toString();default:return null}}}function Tn(e,t,r){return new Pn(e,t,bn.Character,r,String.fromCharCode(r))}function Ln(e,t,r){return new Pn(e,t,bn.Operator,0,r)}const Rn=new Pn(-1,-1,bn.Character,0,"");class kn{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){const e=this.input,t=this.length;let r=this.peek,n=this.index;for(;r<=32;){if(++n>=t){r=0;break}r=e.charCodeAt(n)}if(this.peek=r,this.index=n,n>=t)return null;if($n(r))return this.scanIdentifier();if(Nn(r))return this.scanNumber(n);const i=n;switch(r){case In:return this.advance(),Nn(this.peek)?this.scanNumber(i):Tn(i,this.index,In);case 40:case Sn:case 123:case On:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,r);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(r));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;(s=this.peek)>=9&&s<=32||160==s;)this.advance();return this.scanToken()}var s;return this.advance(),this.error(`Unexpected character [${String.fromCharCode(r)}]`,0)}scanCharacter(e,t){return this.advance(),Tn(e,this.index,t)}scanOperator(e,t){return this.advance(),Ln(e,this.index,t)}scanComplexOperator(e,t,r,n,i,s){this.advance();let u=t;return this.peek==r&&(this.advance(),u+=n),null!=i&&this.peek==i&&(this.advance(),u+=s),Ln(e,this.index,u)}scanIdentifier(){const e=this.index;for(this.advance();Mn(this.peek);)this.advance();const t=this.input.substring(e,this.index);return Bn.indexOf(t)>-1?(r=e,n=this.index,i=t,new Pn(r,n,bn.Keyword,0,i)):function(e,t,r){return new Pn(e,t,bn.Identifier,0,r)}(e,this.index,t);var r,n,i}scanPrivateIdentifier(){const e=this.index;if(this.advance(),!$n(this.peek))return this.error("Invalid character [#]",-1);for(;Mn(this.peek);)this.advance();const t=this.input.substring(e,this.index);return r=e,n=this.index,i=t,new Pn(r,n,bn.PrivateIdentifier,0,i);var r,n,i}scanNumber(e){let t=this.index===e;for(this.advance();;){if(Nn(this.peek));else if(this.peek==In)t=!1;else{if(101!=(r=this.peek)&&69!=r)break;if(this.advance(),jn(this.peek)&&this.advance(),!Nn(this.peek))return this.error("Invalid exponent",-1);t=!1}this.advance()}var r;const n=this.input.substring(e,this.index),i=t?function(e){const t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}(n):parseFloat(n);return s=e,u=this.index,a=i,new Pn(s,u,bn.Number,a,"");var s,u,a}scanString(){const e=this.index,t=this.peek;this.advance();let r="",n=this.index;const i=this.input;for(;this.peek!=t;)if(92==this.peek){let e;if(r+=i.substring(n,this.index),this.advance(),this.peek=this.peek,117==this.peek){const t=i.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(t))return this.error(`Invalid unicode escape [\\u${t}]`,0);e=parseInt(t,16);for(let e=0;e<5;e++)this.advance()}else e=Kn(this.peek),this.advance();r+=String.fromCharCode(e),n=this.index}else{if(0==this.peek)return this.error("Unterminated quote",0);this.advance()}const s=i.substring(n,this.index);return this.advance(),u=e,a=this.index,o=r+s,new Pn(u,a,bn.String,0,o);var u,a,o}scanQuestion(e){this.advance();let t="?";return 63!==this.peek&&this.peek!==In||(t+=this.peek===In?".":"?",this.advance()),Ln(e,this.index,t)}error(e,t){const r=this.index+t;return function(e,t,r){return new Pn(e,t,bn.Error,0,r)}(r,this.index,`Lexer Error: ${e} at column ${r} in expression [${this.input}]`)}}function $n(e){return 97<=e&&e<=122||65<=e&&e<=90||95==e||36==e}function _n(e){if(0==e.length)return!1;const t=new kn(e);if(!$n(t.peek))return!1;for(t.advance();0!==t.peek;){if(!Mn(t.peek))return!1;t.advance()}return!0}function Mn(e){return function(e){return e>=97&&e<=122||e>=65&&e<=90}(e)||Nn(e)||95==e||36==e}function jn(e){return 45==e||43==e}function Gn(e){return 39===e||34===e||96===e}function Kn(e){switch(e){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return e}}var Un=Object.freeze({__proto__:null,get TokenType(){return bn},Lexer:class{tokenize(e){const t=new kn(e),r=[];let n=t.scanToken();for(;null!=n;)r.push(n),n=t.scanToken();return r}},Token:Pn,EOF:Rn,isIdentifier:_n,isQuote:Gn});
25
46
  /**
26
- * @license
27
- * Copyright Google LLC All Rights Reserved.
28
- *
29
- * Use of this source code is governed by an MIT-style license that can be
30
- * found in the LICENSE file at https://angular.io/license
31
- */const Z=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];
47
+ * @license
48
+ * Copyright Google LLC All Rights Reserved.
49
+ *
50
+ * Use of this source code is governed by an MIT-style license that can be
51
+ * found in the LICENSE file at https://angular.io/license
52
+ */const Wn=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];
32
53
  /**
33
- * @license
34
- * Copyright Google LLC All Rights Reserved.
35
- *
36
- * Use of this source code is governed by an MIT-style license that can be
37
- * found in the LICENSE file at https://angular.io/license
38
- */
39
- class tt{constructor(t,e){this.start=t,this.end=e}static fromArray(t){return t?(function(t,e){if(!(null==e||Array.isArray(e)&&2==e.length))throw new Error("Expected '".concat(t,"' to be an array, [start, end]."));if(null!=e){const t=e[0],s=e[1];Z.forEach(e=>{if(e.test(t)||e.test(s))throw new Error("['".concat(t,"', '").concat(s,"'] contains unusable interpolation symbol."))})}}("interpolation",t),new tt(t[0],t[1])):et}}const et=new tt("{{","}}");function st(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}"undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self;
54
+ * @license
55
+ * Copyright Google LLC All Rights Reserved.
56
+ *
57
+ * Use of this source code is governed by an MIT-style license that can be
58
+ * found in the LICENSE file at https://angular.io/license
59
+ */
60
+ class Vn{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error(`Expected '${e}' to be an array, [start, end].`);if(null!=t){const e=t[0],r=t[1];Wn.forEach((t=>{if(t.test(e)||t.test(r))throw new Error(`['${e}', '${r}'] contains unusable interpolation symbol.`)}))}}("interpolation",e),new Vn(e[0],e[1])):Xn}}const Xn=new Vn("{{","}}");
40
61
  /**
41
- * @license
42
- * Copyright Google LLC All Rights Reserved.
43
- *
44
- * Use of this source code is governed by an MIT-style license that can be
45
- * found in the LICENSE file at https://angular.io/license
46
- */class nt{constructor(t,e,s){this.strings=t,this.expressions=e,this.offsets=s}}class rt{constructor(t,e,s){this.templateBindings=t,this.warnings=e,this.errors=s}}const it=ot(et);function at(t){return t===et?it:ot(t)}function ot(t){const e=st(t.start)+"([\\s\\S]*?)"+st(t.end);return new RegExp(e,"g")}class ct{constructor(t){this._lexer=t,this.errors=[],this.simpleExpressionChecker=pt}parseAction(t,e,s,n=et){this._checkNoInterpolation(t,e,n);const r=this._stripComments(t),i=this._lexer.tokenize(this._stripComments(t)),a=new ht(t,e,s,i,r.length,!0,this.errors,t.length-r.length).parseChain();return new K(a,t,e,s,this.errors)}parseBinding(t,e,s,n=et){const r=this._parseBindingAst(t,e,s,n);return new K(r,t,e,s,this.errors)}checkSimpleExpression(t){const e=new this.simpleExpressionChecker;return t.visit(e),e.errors}parseSimpleBinding(t,e,s,n=et){const r=this._parseBindingAst(t,e,s,n),i=this.checkSimpleExpression(r);return i.length>0&&this._reportError("Host binding expression cannot contain ".concat(i.join(" ")),t,e),new K(r,t,e,s,this.errors)}_reportError(t,e,s,n){this.errors.push(new o(t,e,s,n))}_parseBindingAst(t,e,s,n){const r=this._parseQuote(t,e,s);if(null!=r)return r;this._checkNoInterpolation(t,e,n);const i=this._stripComments(t),a=this._lexer.tokenize(i);return new ht(t,e,s,a,i.length,!1,this.errors,t.length-i.length).parseChain()}_parseQuote(t,e,s){if(null==t)return null;const n=t.indexOf(":");if(-1==n)return null;const r=t.substring(0,n).trim();if(!q(r))return null;const i=t.substring(n+1),a=new c(0,t.length);return new u(a,a.toAbsolute(s),r,i,e)}parseTemplateBindings(t,e,s,n,r){const i=this._lexer.tokenize(e);return new ht(e,s,r,i,e.length,!1,this.errors,0).parseTemplateBindings({source:t,span:new L(n,n+t.length)})}parseInterpolation(t,e,s,n=et){const r=this.splitInterpolation(t,e,n);if(null==r)return null;const i=[];for(let n=0;n<r.expressions.length;++n){const a=r.expressions[n],o=this._stripComments(a),c=this._lexer.tokenize(o),h=new ht(t,e,s,c,o.length,!1,this.errors,r.offsets[n]+(a.length-o.length)).parseChain();i.push(h)}const a=new c(0,null==t?0:t.length);return new K(new A(a,a.toAbsolute(s),r.strings,i),t,e,s,this.errors)}splitInterpolation(t,e,s=et){const n=at(s),r=t.split(n);if(r.length<=1)return null;const i=[],a=[],o=[];let c=0;for(let n=0;n<r.length;n++){const h=r[n];n%2==0?(i.push(h),c+=h.length):h.trim().length>0?(c+=s.start.length,a.push(h),o.push(c),c+=h.length+s.end.length):(this._reportError("Blank expressions are not allowed in interpolated strings",t,"at column ".concat(this._findInterpolationErrorColumn(r,n,s)," in"),e),a.push("$implicit"),o.push(c))}return new nt(i,a,o)}wrapLiteralPrimitive(t,e,s){const n=new c(0,null==t?0:t.length);return new K(new C(n,n.toAbsolute(s),t),t,e,s,this.errors)}_stripComments(t){const e=this._commentStart(t);return null!=e?t.substring(0,e).trim():t}_commentStart(t){let e=null;for(let s=0;s<t.length-1;s++){const n=t.charCodeAt(s),r=t.charCodeAt(s+1);if(47===n&&47==r&&null==e)return s;e===n?e=null:null==e&&J(n)&&(e=n)}return null}_checkNoInterpolation(t,e,s){const n=at(s),r=t.split(n);r.length>1&&this._reportError("Got interpolation (".concat(s.start).concat(s.end,") where expression was expected"),t,"at column ".concat(this._findInterpolationErrorColumn(r,1,s)," in"),e)}_findInterpolationErrorColumn(t,e,s){let n="";for(let r=0;r<e;r++)n+=r%2==0?t[r]:"".concat(s.start).concat(t[r]).concat(s.end);return n.length}}class ht{constructor(t,e,s,n,r,i,a,o){this.input=t,this.location=e,this.absoluteOffset=s,this.tokens=n,this.inputLength=r,this.parseAction=i,this.errors=a,this.offset=o,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.sourceSpanCache=new Map,this.index=0}peek(t){const e=this.index+t;return e<this.tokens.length?this.tokens[e]:Q}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){if(this.index>0){return this.peek(-1).end+this.offset}return 0===this.tokens.length?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(t){return new c(t,this.currentEndIndex)}sourceSpan(t){const e="".concat(t,"@").concat(this.inputIndex);return this.sourceSpanCache.has(e)||this.sourceSpanCache.set(e,this.span(t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(e)}advance(){this.index++}consumeOptionalCharacter(t){return!!this.next.isCharacter(t)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(t){this.consumeOptionalCharacter(t)||this.error("Missing expected ".concat(String.fromCharCode(t)))}consumeOptionalOperator(t){return!!this.next.isOperator(t)&&(this.advance(),!0)}expectOperator(t){this.consumeOptionalOperator(t)||this.error("Missing expected operator ".concat(t))}expectIdentifierOrKeyword(){const t=this.next;return t.isIdentifier()||t.isKeyword()?(this.advance(),t.toString()):(this.error("Unexpected token ".concat(t,", expected identifier or keyword")),"")}expectIdentifierOrKeywordOrString(){const t=this.next;return t.isIdentifier()||t.isKeyword()||t.isString()?(this.advance(),t.toString()):(this.error("Unexpected token ".concat(t,", expected identifier, keyword, or string")),"")}parseChain(){const t=[],e=this.inputIndex;for(;this.index<this.tokens.length;){const e=this.parsePipe();if(t.push(e),this.consumeOptionalCharacter(59))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else this.index<this.tokens.length&&this.error("Unexpected token '".concat(this.next,"'"))}return 0==t.length?new l(this.span(e),this.sourceSpan(e)):1==t.length?t[0]:new f(this.span(e),this.sourceSpan(e),t)}parsePipe(){let t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{const e=this.inputIndex,s=this.expectIdentifierOrKeyword(),n=this.sourceSpan(e),r=[];for(;this.consumeOptionalCharacter(58);)r.push(this.parseExpression());const{start:i}=t.span;t=new w(this.span(i),this.sourceSpan(i),t,s,r,n)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){const t=this.inputIndex,e=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){const s=this.parsePipe();let n;if(this.consumeOptionalCharacter(58))n=this.parsePipe();else{const e=this.inputIndex,s=this.input.substring(t,e);this.error("Conditional expression ".concat(s," requires all 3 expressions")),n=new l(this.span(t),this.sourceSpan(t))}return new v(this.span(t),this.sourceSpan(t),e,s,n)}return e}parseLogicalOr(){let t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){const e=this.parseLogicalAnd(),{start:s}=t.span;t=new O(this.span(s),this.sourceSpan(s),"||",t,e)}return t}parseLogicalAnd(){let t=this.parseEquality();for(;this.consumeOptionalOperator("&&");){const e=this.parseEquality(),{start:s}=t.span;t=new O(this.span(s),this.sourceSpan(s),"&&",t,e)}return t}parseEquality(){let t=this.parseRelational();for(;this.next.type==F.Operator;){const e=this.next.strValue;switch(e){case"==":case"===":case"!=":case"!==":this.advance();const s=this.parseRelational(),{start:n}=t.span;t=new O(this.span(n),this.sourceSpan(n),e,t,s);continue}break}return t}parseRelational(){let t=this.parseAdditive();for(;this.next.type==F.Operator;){const e=this.next.strValue;switch(e){case"<":case">":case"<=":case">=":this.advance();const s=this.parseAdditive(),{start:n}=t.span;t=new O(this.span(n),this.sourceSpan(n),e,t,s);continue}break}return t}parseAdditive(){let t=this.parseMultiplicative();for(;this.next.type==F.Operator;){const e=this.next.strValue;switch(e){case"+":case"-":this.advance();let s=this.parseMultiplicative();const{start:n}=t.span;t=new O(this.span(n),this.sourceSpan(n),e,t,s);continue}break}return t}parseMultiplicative(){let t=this.parsePrefix();for(;this.next.type==F.Operator;){const e=this.next.strValue;switch(e){case"*":case"%":case"/":this.advance();let s=this.parsePrefix();const{start:n}=t.span;t=new O(this.span(n),this.sourceSpan(n),e,t,s);continue}break}return t}parsePrefix(){if(this.next.type==F.Operator){const t=this.inputIndex,e=this.next.strValue,s=new c(t,t),n=s.toAbsolute(this.absoluteOffset);let r;switch(e){case"+":return this.advance(),r=this.parsePrefix(),new O(this.span(t),this.sourceSpan(t),"-",r,new C(s,n,0));case"-":return this.advance(),r=this.parsePrefix(),new O(this.span(t),this.sourceSpan(t),e,new C(s,n,0),r);case"!":return this.advance(),r=this.parsePrefix(),new b(this.span(t),this.sourceSpan(t),r)}}return this.parseCallChain()}parseCallChain(){let t=this.parsePrimary();const e=t.span.start;for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMemberOrMethodCall(t,!1);else if(this.consumeOptionalOperator("?."))t=this.parseAccessMemberOrMethodCall(t,!0);else if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const s=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("=")){const n=this.parseConditional();t=new S(this.span(e),this.sourceSpan(e),t,s,n)}else t=new y(this.span(e),this.sourceSpan(e),t,s)}else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const s=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),t=new _(this.span(e),this.sourceSpan(e),t,s)}else{if(!this.consumeOptionalOperator("!"))return t;t=new k(this.span(e),this.sourceSpan(e),t)}}parsePrimary(){const t=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}if(this.next.isKeywordNull())return this.advance(),new C(this.span(t),this.sourceSpan(t),null);if(this.next.isKeywordUndefined())return this.advance(),new C(this.span(t),this.sourceSpan(t),void 0);if(this.next.isKeywordTrue())return this.advance(),new C(this.span(t),this.sourceSpan(t),!0);if(this.next.isKeywordFalse())return this.advance(),new C(this.span(t),this.sourceSpan(t),!1);if(this.next.isKeywordThis())return this.advance(),new d(this.span(t),this.sourceSpan(t));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const e=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new P(this.span(t),this.sourceSpan(t),e)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new d(this.span(t),this.sourceSpan(t)),!1);if(this.next.isNumber()){const e=this.next.toNumber();return this.advance(),new C(this.span(t),this.sourceSpan(t),e)}if(this.next.isString()){const e=this.next.toString();return this.advance(),new C(this.span(t),this.sourceSpan(t),e)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: ".concat(this.input)),new l(this.span(t),this.sourceSpan(t))):(this.error("Unexpected token ".concat(this.next)),new l(this.span(t),this.sourceSpan(t)))}parseExpressionList(t){const e=[];if(!this.next.isCharacter(t))do{e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return e}parseLiteralMap(){const t=[],e=[],s=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{const s=this.next.isString(),n=this.expectIdentifierOrKeywordOrString();t.push({key:n,quoted:s}),this.expectCharacter(58),e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new E(this.span(s),this.sourceSpan(s),t,e)}parseAccessMemberOrMethodCall(t,e=!1){const s=t.span.start,n=this.inputIndex,r=this.expectIdentifierOrKeyword(),i=this.sourceSpan(n);if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const n=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;const a=this.span(s),o=this.sourceSpan(s);return e?new I(a,o,i,t,r,n):new N(a,o,i,t,r,n)}if(e)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new l(this.span(s),this.sourceSpan(s))):new m(this.span(s),this.sourceSpan(s),i,t,r);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new l(this.span(s),this.sourceSpan(s));const e=this.parseConditional();return new g(this.span(s),this.sourceSpan(s),i,t,r,e)}return new x(this.span(s),this.sourceSpan(s),i,t,r)}parseCallArguments(){if(this.next.isCharacter(41))return[];const t=[];do{t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return t}expectTemplateBindingKey(){let t="",e=!1;const s=this.currentAbsoluteOffset;do{t+=this.expectIdentifierOrKeywordOrString(),e=this.consumeOptionalOperator("-"),e&&(t+="-")}while(e);return{source:t,span:new L(s,s+t.length)}}parseTemplateBindings(t){const e=[];for(e.push(...this.parseDirectiveKeywordBindings(t));this.index<this.tokens.length;){const s=this.parseLetBinding();if(s)e.push(s);else{const s=this.expectTemplateBindingKey(),n=this.parseAsBinding(s);n?e.push(n):(s.source=t.source+s.source[0].toUpperCase()+s.source.substring(1),e.push(...this.parseDirectiveKeywordBindings(s)))}this.consumeStatementTerminator()}return new rt(e,[],this.errors)}parseDirectiveKeywordBindings(t){const e=[];this.consumeOptionalCharacter(58);const s=this.getDirectiveBoundTarget();let n=this.currentAbsoluteOffset;const r=this.parseAsBinding(t);r||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);const i=new L(t.span.start,n);return e.push(new T(i,t,s)),r&&e.push(r),e}getDirectiveBoundTarget(){if(this.next===Q||this.peekKeywordAs()||this.peekKeywordLet())return null;const t=this.parsePipe(),{start:e,end:s}=t.span,n=this.input.substring(e,s);return new K(t,n,this.location,this.absoluteOffset+e,this.errors)}parseAsBinding(t){if(!this.peekKeywordAs())return null;this.advance();const e=this.expectTemplateBindingKey();this.consumeStatementTerminator();const s=new L(t.span.start,this.currentAbsoluteOffset);return new M(s,e,t)}parseLetBinding(){if(!this.peekKeywordLet())return null;const t=this.currentAbsoluteOffset;this.advance();const e=this.expectTemplateBindingKey();let s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();const n=new L(t,this.currentAbsoluteOffset);return new M(n,e,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(t,e=null){this.errors.push(new o(t,this.input,this.locationText(e),this.location)),this.skip()}locationText(t=null){return null==t&&(t=this.index),t<this.tokens.length?"at column ".concat(this.tokens[t].index+1," in"):"at the end of the expression"}skip(){let t=this.next;for(;this.index<this.tokens.length&&!t.isCharacter(59)&&(this.rparensExpected<=0||!t.isCharacter(41))&&(this.rbracesExpected<=0||!t.isCharacter(125))&&(this.rbracketsExpected<=0||!t.isCharacter(93));)this.next.isError()&&this.errors.push(new o(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),t=this.next}}class pt{constructor(){this.errors=[]}visitImplicitReceiver(t,e){}visitInterpolation(t,e){}visitLiteralPrimitive(t,e){}visitPropertyRead(t,e){}visitPropertyWrite(t,e){}visitSafePropertyRead(t,e){}visitMethodCall(t,e){}visitSafeMethodCall(t,e){}visitFunctionCall(t,e){}visitLiteralArray(t,e){this.visitAll(t.expressions,e)}visitLiteralMap(t,e){this.visitAll(t.values,e)}visitBinary(t,e){}visitPrefixNot(t,e){}visitNonNullAssert(t,e){}visitConditional(t,e){}visitPipe(t,e){this.errors.push("pipes")}visitKeyedRead(t,e){}visitKeyedWrite(t,e){}visitAll(t,e){return t.map(t=>t.visit(this,e))}visitChain(t,e){}visitQuote(t,e){}}class ut extends B{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}var lt=Object.freeze({__proto__:null,SplitInterpolation:nt,TemplateBindingParseResult:rt,Parser:ct,IvyParser:class extends ct{constructor(){super(...arguments),this.simpleExpressionChecker=ut}},_ParseAST:ht}),dt=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX="NgEstreeParser";const s=["angular-estree-parser",0];function n(){return new lt.Parser(new Y.Lexer)}function r(t,e){const s=n(),{astInput:r,comments:o}=a(t,s),{ast:c,errors:h}=e(r,s);return i(h),{ast:c,comments:o}}function i(t){if(0!==t.length){const[{message:e}]=t;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function a(t,e){const s=e._commentStart(t);return null===s?{astInput:t,comments:[]}:{astInput:t.slice(0,s),comments:[{type:"Comment",value:t.slice(s+"//".length),span:{start:s,end:t.length}}]}}function o({start:t,end:e},s){let n=t,r=e;for(;r!==n&&/\s/.test(s[r-1]);)r--;for(;n!==r&&/\s/.test(s[n]);)n++;return{start:n,end:r}}function c({start:t,end:e},s){let n=t,r=e;for(;r!==s.length&&/\s/.test(s[r]);)r++;for(;0!==n&&/\s/.test(s[n-1]);)n--;return{start:n,end:r}}function h(t,e){return"("===e[t.start-1]&&")"===e[t.end]?{start:t.start-1,end:t.end+1}:t}e.parseNgBinding=function(t){return r(t,(t,e)=>e.parseBinding(t,...s))},e.parseNgSimpleBinding=function(t){return r(t,(t,e)=>e.parseSimpleBinding(t,...s))},e.parseNgAction=function(t){return r(t,(t,e)=>e.parseAction(t,...s))},e.parseNgTemplateBindings=function(t){const s=n(),{templateBindings:r,errors:a}=s.parseTemplateBindings(e.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX,t,"angular-estree-parser",0,0);return i(a),r},e.parseNgInterpolation=function(t){const e=n(),{astInput:r,comments:o}=a(t,e),{ast:c,errors:h}=e.parseInterpolation("{{"+r+"}}",...s);i(h);const p=c.expressions[0];return function t(e,s){if(!e||"object"!=typeof e)return;if(Array.isArray(e))return e.forEach(e=>t(e,s));for(const n of Object.keys(e)){const r=e[n];"span"===n?s(r):t(r,s)}}(p,t=>{t.start-="{{".length,t.end-="{{".length}),{ast:p,comments:o}},e.getNgType=function(t){return t instanceof R.Binary?"Binary":t instanceof R.BindingPipe?"BindingPipe":t instanceof R.Chain?"Chain":t instanceof R.Conditional?"Conditional":t instanceof R.EmptyExpr?"EmptyExpr":t instanceof R.FunctionCall?"FunctionCall":t instanceof R.ImplicitReceiver?"ImplicitReceiver":t instanceof R.KeyedRead?"KeyedRead":t instanceof R.KeyedWrite?"KeyedWrite":t instanceof R.LiteralArray?"LiteralArray":t instanceof R.LiteralMap?"LiteralMap":t instanceof R.LiteralPrimitive?"LiteralPrimitive":t instanceof R.MethodCall?"MethodCall":t instanceof R.NonNullAssert?"NonNullAssert":t instanceof R.PrefixNot?"PrefixNot":t instanceof R.PropertyRead?"PropertyRead":t instanceof R.PropertyWrite?"PropertyWrite":t instanceof R.Quote?"Quote":t instanceof R.SafeMethodCall?"SafeMethodCall":t instanceof R.SafePropertyRead?"SafePropertyRead":t.type},e.fitSpans=function(t,e,s){let n=0;const r={start:t.start,end:t.end};for(;;){const t=c(r,e),s=h(t,e);if(t.start===s.start&&t.end===s.end)break;r.start=s.start,r.end=s.end,n++}return{hasParens:0!==(s?n-1:n),outerSpan:o(s?{start:r.start+1,end:r.end-1}:r,e),innerSpan:o(t,e)}},e.findFrontChar=function(t,e,s){let n=e;for(;!t.test(s[n]);)if(--n<0)throw new Error("Cannot find front char ".concat(t," from index ").concat(e," in ").concat(JSON.stringify(s)));return n},e.findBackChar=function(t,e,s){let n=e;for(;!t.test(s[n]);)if(++n>=s.length)throw new Error("Cannot find back char ".concat(t," from index ").concat(e," in ").concat(JSON.stringify(s)));return n},e.toLowerCamelCase=function(t){return t.slice(0,1).toLowerCase()+t.slice(1)},e.getLast=function(t){return 0===t.length?void 0:t[t.length-1]}})),ft=n((function(t,e){function s(t,e,s=!1,n=!1){if(!s){const{start:s,end:n}=t;return{start:s,end:n,loc:{start:e.locator.locationForIndex(s),end:e.locator.locationForIndex(n)}}}const{outerSpan:r,innerSpan:i,hasParens:a}=dt.fitSpans(t,e.text,n);return Object.assign({start:i.start,end:i.end,loc:{start:e.locator.locationForIndex(i.start),end:e.locator.locationForIndex(i.end)}},a&&{extra:{parenthesized:!0,parenStart:r.start,parenEnd:r.end}})}Object.defineProperty(e,"__esModule",{value:!0}),e.transform=(t,n,r=!1)=>{const i=dt.getNgType(t);switch(i){case"Binary":{const{left:e,operation:s,right:n}=t,i=n.span.start===n.span.end,o=e.span.start===e.span.end;if(i||o){const s=e.span.start===e.span.end?a(n):a(e);return c("UnaryExpression",{prefix:!0,argument:s,operator:i?"+":"-"},{start:t.span.start,end:x(s)},{hasParentParens:r})}const h=a(e),p=a(n);return c("&&"===s||"||"===s?"LogicalExpression":"BinaryExpression",{left:h,right:p,operator:s},{start:v(h),end:x(p)},{hasParentParens:r})}case"BindingPipe":{const{exp:e,name:s,args:n}=t,i=a(e),o=u(/\S/,u(/\|/,x(i))+1),h=c("Identifier",{name:s},{start:o,end:o+s.length}),p=n.map(a);return c("NGPipeExpression",{left:i,right:h,arguments:p},{start:v(i),end:x(0===p.length?h:dt.getLast(p))},{hasParentParens:r})}case"Chain":{const{expressions:e}=t;return c("NGChainedExpression",{expressions:e.map(a)},t.span,{hasParentParens:r})}case"Comment":{const{value:e}=t;return c("CommentLine",{value:e},t.span,{processSpan:!1})}case"Conditional":{const{condition:e,trueExp:s,falseExp:n}=t,i=a(e),o=a(s),h=a(n);return c("ConditionalExpression",{test:i,consequent:o,alternate:h},{start:v(i),end:x(h)},{hasParentParens:r})}case"EmptyExpr":return c("NGEmptyExpression",{},t.span,{hasParentParens:r});case"FunctionCall":{const{target:e,args:s}=t,n=1===s.length?[o(s[0])]:s.map(a),i=a(e);return c("CallExpression",{callee:i,arguments:n},{start:v(i),end:t.span.end},{hasParentParens:r})}case"ImplicitReceiver":return c("ThisExpression",{},t.span,{hasParentParens:r});case"KeyedRead":{const{obj:e,key:s}=t;return h(e,a(s),{computed:!0,optional:!1},{end:t.span.end,hasParentParens:r})}case"LiteralArray":{const{expressions:e}=t;return c("ArrayExpression",{elements:e.map(a)},t.span,{hasParentParens:r})}case"LiteralMap":{const{keys:e,values:s}=t,n=s.map(t=>a(t)),i=e.map(({key:e,quoted:s},r)=>{const i=n[r],a={start:u(/\S/,0===r?t.span.start+1:u(/,/,x(n[r-1]))+1),end:p(/\S/,p(/:/,v(i)-1)-1)+1},o=s?c("StringLiteral",{value:e},a):c("Identifier",{name:e},a);return c("ObjectProperty",{key:o,value:i,method:!1,shorthand:!1,computed:!1},{start:v(o),end:x(i)})});return c("ObjectExpression",{properties:i},t.span,{hasParentParens:r})}case"LiteralPrimitive":{const{value:e}=t;switch(typeof e){case"boolean":return c("BooleanLiteral",{value:e},t.span,{hasParentParens:r});case"number":return c("NumericLiteral",{value:e},t.span,{hasParentParens:r});case"object":return c("NullLiteral",{},t.span,{hasParentParens:r});case"string":return c("StringLiteral",{value:e},t.span,{hasParentParens:r});case"undefined":return c("Identifier",{name:"undefined"},t.span,{hasParentParens:r});default:throw new Error("Unexpected LiteralPrimitive value type ".concat(typeof e))}}case"MethodCall":case"SafeMethodCall":{const e="SafeMethodCall"===i,{receiver:s,name:n,args:u}=t,l=1===u.length?[o(u[0])]:u.map(a),f=p(/\S/,p(/\(/,(0===l.length?p(/\)/,t.span.end-1):v(l[0]))-1)-1)+1,x=h(s,c("Identifier",{name:n},{start:f-n.length,end:f}),{computed:!1,optional:e}),g=d(x);return c(e||g?"OptionalCallExpression":"CallExpression",{callee:x,arguments:l},{start:v(x),end:t.span.end},{hasParentParens:r})}case"NonNullAssert":{const{expression:e}=t,s=a(e);return c("TSNonNullExpression",{expression:s},{start:v(s),end:t.span.end},{hasParentParens:r})}case"PrefixNot":{const{expression:e}=t,s=a(e);return c("UnaryExpression",{prefix:!0,operator:"!",argument:s},{start:t.span.start,end:x(s)},{hasParentParens:r})}case"PropertyRead":case"SafePropertyRead":{const e="SafePropertyRead"===i,{receiver:s,name:n}=t,a=p(/\S/,t.span.end-1)+1;return h(s,c("Identifier",{name:n},{start:a-n.length,end:a},l(s)?{hasParentParens:r}:{}),{computed:!1,optional:e},{hasParentParens:r})}case"KeyedWrite":{const{obj:e,key:s,value:n}=t,i=a(s),o=a(n),p=h(e,i,{computed:!0,optional:!1},{end:u(/\]/,x(i))+1});return c("AssignmentExpression",{left:p,operator:"=",right:o},{start:v(p),end:x(o)},{hasParentParens:r})}case"PropertyWrite":{const{receiver:e,name:s,value:n}=t,i=a(n),o=p(/\S/,p(/=/,v(i)-1)-1)+1,u=h(e,c("Identifier",{name:s},{start:o-s.length,end:o}),{computed:!1,optional:!1});return c("AssignmentExpression",{left:u,operator:"=",right:i},{start:v(u),end:x(i)},{hasParentParens:r})}case"Quote":{const{prefix:e,uninterpretedExpression:s}=t;return c("NGQuotedExpression",{prefix:e,value:s},t.span,{hasParentParens:r})}default:throw new Error("Unexpected node ".concat(i))}function a(t){return e.transform(t,n)}function o(t){return e.transform(t,n,!0)}function c(t,e,r,{processSpan:i=!0,hasParentParens:a=!1}={}){const o=Object.assign(Object.assign({type:t},s(r,n,i,a)),e);switch(t){case"Identifier":{const t=o;t.loc.identifierName=t.name;break}case"NumericLiteral":{const t=o;t.extra=Object.assign(Object.assign({},t.extra),{raw:n.text.slice(t.start,t.end),rawValue:t.value});break}case"StringLiteral":{const t=o;t.extra=Object.assign(Object.assign({},t.extra),{raw:n.text.slice(t.start,t.end),rawValue:t.value});break}}return o}function h(t,e,s,{end:n=x(e),hasParentParens:r=!1}={}){if(l(t))return e;const i=a(t),o=d(i);return c(s.optional||o?"OptionalMemberExpression":"MemberExpression",Object.assign({object:i,property:e,computed:s.computed},s.optional?{optional:!0}:o?{optional:!1}:null),{start:v(i),end:n},{hasParentParens:r})}function p(t,e){return dt.findFrontChar(t,e,n.text)}function u(t,e){return dt.findBackChar(t,e,n.text)}function l(t){return t.span.start>=t.span.end}function d(t){return("OptionalCallExpression"===t.type||"OptionalMemberExpression"===t.type)&&!f(t)}function f(t){return t.extra&&t.extra.parenthesized}function v(t){return f(t)?t.extra.parenStart:t.start}function x(t){return f(t)?t.extra.parenEnd:t.end}},e.transformSpan=s})),vt=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformTemplateBindings=function(t,e){t.forEach((function(t){d(t.key.span),l(t)&&t.value&&d(t.value.span)}));const[s]=t,{key:n}=s,r=0===e.text.slice(s.sourceSpan.start,s.sourceSpan.end).trim().length?t.slice(1):t,i=[];let a=null;for(let t=0;t<r.length;t++){const s=r[t];if(a&&u(a)&&l(s)&&s.value&&s.value.source===a.key.source){const t=h("NGMicrosyntaxKey",{name:s.key.source},s.key.span),n=(t,s)=>Object.assign(Object.assign({},t),ft.transformSpan({start:t.start,end:s},e)),r=e=>Object.assign(Object.assign({},n(e,t.end)),{alias:t}),a=i.pop();if("NGMicrosyntaxExpression"===a.type)i.push(r(a));else{if("NGMicrosyntaxKeyedExpression"!==a.type)throw new Error("Unexpected type ".concat(a.type));{const t=r(a.expression);i.push(n(Object.assign(Object.assign({},a),{expression:t}),t.end))}}}else i.push(o(s,t));a=s}return h("NGMicrosyntax",{body:i},0===i.length?t[0].sourceSpan:{start:i[0].start,end:i[i.length-1].end});function o(t,s){if(u(t)){const{key:e,value:n}=t;return n?0===s?h("NGMicrosyntaxExpression",{expression:c(n.ast),alias:null},n.sourceSpan):h("NGMicrosyntaxKeyedExpression",{key:h("NGMicrosyntaxKey",{name:p(e.source)},e.span),expression:h("NGMicrosyntaxExpression",{expression:c(n.ast),alias:null},n.sourceSpan)},{start:e.span.start,end:n.sourceSpan.end}):h("NGMicrosyntaxKey",{name:p(e.source)},e.span)}{const{key:s,sourceSpan:n}=t;if(/^let\s$/.test(e.text.slice(n.start,n.start+4))){const{value:e}=t;return h("NGMicrosyntaxLet",{key:h("NGMicrosyntaxKey",{name:s.source},s.span),value:e?h("NGMicrosyntaxKey",{name:e.source},e.span):null},{start:n.start,end:e?e.span.end:s.span.end})}{const n=function(t){if(!t.value||t.value.source!==dt.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX)return t.value;const s=dt.findBackChar(/\S/,t.sourceSpan.start,e.text);return{source:"$implicit",span:{start:s,end:s}}}(t);return h("NGMicrosyntaxAs",{key:h("NGMicrosyntaxKey",{name:n.source},n.span),alias:h("NGMicrosyntaxKey",{name:s.source},s.span)},{start:n.span.start,end:s.span.end})}}}function c(t){return ft.transform(t,e)}function h(t,s,n,r=!0){return Object.assign(Object.assign({type:t},ft.transformSpan(n,e,r)),s)}function p(t){return dt.toLowerCamelCase(t.slice(n.source.length))}function u(t){return t instanceof R.ExpressionBinding}function l(t){return t instanceof R.VariableBinding}function d(t){if('"'!==e.text[t.start]&&"'"!==e.text[t.start])return;const s=e.text[t.start];let n=!1;for(let r=t.start+1;r<e.text.length;r++)switch(e.text[r]){case s:if(!n)return void(t.end=r+1);default:n=!1;break;case"\\":n=!n}}}})),xt=n((function(t,e){function s(t,e){const{ast:s,comments:n}=e(t),r=new a.Context(t),i=t=>ft.transform(t,r),o=i(s);return o.comments=n.map(i),o}Object.defineProperty(e,"__esModule",{value:!0}),e.parseBinding=function(t){return s(t,dt.parseNgBinding)},e.parseSimpleBinding=function(t){return s(t,dt.parseNgSimpleBinding)},e.parseInterpolation=function(t){return s(t,dt.parseNgInterpolation)},e.parseAction=function(t){return s(t,dt.parseNgAction)},e.parseTemplateBindings=function(t){return vt.transformTemplateBindings(dt.parseNgTemplateBindings(t),new a.Context(t))}}));const{locStart:gt,locEnd:mt}=s;function yt(t){return{astFormat:"estree",parse:(e,s,n)=>{const r=t(e,xt);return{type:"NGRoot",node:"__ng_action"===n.parser&&"NGChainedExpression"!==r.type?Object.assign({},r,{type:"NGChainedExpression",expressions:[r]}):r}},locStart:gt,locEnd:mt}}return{parsers:{__ng_action:yt((t,e)=>e.parseAction(t)),__ng_binding:yt((t,e)=>e.parseBinding(t)),__ng_interpolation:yt((t,e)=>e.parseInterpolation(t)),__ng_directive:yt((t,e)=>e.parseTemplateBindings(t))}}}));
62
+ * @license
63
+ * Copyright Google LLC All Rights Reserved.
64
+ *
65
+ * Use of this source code is governed by an MIT-style license that can be
66
+ * found in the LICENSE file at https://angular.io/license
67
+ */class zn{constructor(e,t,r){this.strings=e,this.expressions=t,this.offsets=r}}class qn{constructor(e,t,r){this.templateBindings=e,this.warnings=t,this.errors=r}}class Qn{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=Jn}parseAction(e,t,r,n=Xn){this._checkNoInterpolation(e,t,n);const i=this._stripComments(e),s=this._lexer.tokenize(this._stripComments(e)),u=new Hn(e,t,r,s,i.length,!0,this.errors,e.length-i.length).parseChain();return new mn(u,e,t,r,this.errors)}parseBinding(e,t,r,n=Xn){const i=this._parseBindingAst(e,t,r,n);return new mn(i,e,t,r,this.errors)}checkSimpleExpression(e){const t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,r,n=Xn){const i=this._parseBindingAst(e,t,r,n),s=this.checkSimpleExpression(i);return s.length>0&&this._reportError(`Host binding expression cannot contain ${s.join(" ")}`,e,t),new mn(i,e,t,r,this.errors)}_reportError(e,t,r,n){this.errors.push(new Xr(e,t,r,n))}_parseBindingAst(e,t,r,n){const i=this._parseQuote(e,t,r);if(null!=i)return i;this._checkNoInterpolation(e,t,n);const s=this._stripComments(e),u=this._lexer.tokenize(s);return new Hn(e,t,r,u,s.length,!1,this.errors,e.length-s.length).parseChain()}_parseQuote(e,t,r){if(null==e)return null;const n=e.indexOf(":");if(-1==n)return null;const i=e.substring(0,n).trim();if(!_n(i))return null;const s=e.substring(n+1),u=new zr(0,e.length);return new Yr(u,u.toAbsolute(r),i,s,t)}parseTemplateBindings(e,t,r,n,i){const s=this._lexer.tokenize(t);return new Hn(t,r,i,s,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new gn(n,n+e.length)})}parseInterpolation(e,t,r,n=Xn){const{strings:i,expressions:s,offsets:u}=this.splitInterpolation(e,t,n);if(0===s.length)return null;const a=[];for(let n=0;n<s.length;++n){const i=s[n].text,o=this._stripComments(i),D=this._lexer.tokenize(o),c=new Hn(e,t,r,D,o.length,!1,this.errors,u[n]+(i.length-o.length)).parseChain();a.push(c)}return this.createInterpolationAst(i.map((e=>e.text)),a,e,t,r)}parseInterpolationExpression(e,t,r){const n=this._stripComments(e),i=this._lexer.tokenize(n),s=new Hn(e,t,r,i,n.length,!1,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[s],e,t,r)}createInterpolationAst(e,t,r,n,i){const s=new zr(0,r.length),u=new ln(s,s.toAbsolute(i),e,t);return new mn(u,r,n,i,this.errors)}splitInterpolation(e,t,r=Xn){const n=[],i=[],s=[];let u=0,a=!1,o=!1,{start:D,end:c}=r;for(;u<e.length;)if(a){const r=u,n=r+D.length,p=this._getInterpolationEndIndex(e,c,n);if(-1===p){a=!1,o=!0;break}const l=p+c.length,h=e.substring(n,p);0===h.trim().length&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${u} in`,t),i.push({text:h,start:r,end:l}),s.push(n),u=l,a=!1}else{const t=u;u=e.indexOf(D,u),-1===u&&(u=e.length);const r=e.substring(t,u);n.push({text:r,start:t,end:u}),a=!0}if(!a)if(o){const t=n[n.length-1];t.text+=e.substring(u),t.end=e.length}else n.push({text:e.substring(u),start:u,end:e.length});return new zn(n,i,s)}wrapLiteralPrimitive(e,t,r){const n=new zr(0,null==e?0:e.length);return new mn(new Dn(n,n.toAbsolute(r),e),e,t,r,this.errors)}_stripComments(e){const t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let r=0;r<e.length-1;r++){const n=e.charCodeAt(r),i=e.charCodeAt(r+1);if(47===n&&47==i&&null==t)return r;t===n?t=null:null==t&&Gn(n)&&(t=n)}return null}_checkNoInterpolation(e,t,{start:r,end:n}){let i=-1,s=-1;for(const t of this._forEachUnquotedChar(e,0))if(-1===i)e.startsWith(r)&&(i=t);else if(s=this._getInterpolationEndIndex(e,n,t),s>-1)break;i>-1&&s>-1&&this._reportError(`Got interpolation (${r}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,r){for(const n of this._forEachUnquotedChar(e,r)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let r=null,n=0;for(let i=t;i<e.length;i++){const t=e[i];!Gn(e.charCodeAt(i))||null!==r&&r!==t||n%2!=0?null===r&&(yield i):r=null===r?t:null,n="\\"===t?n+1:0}}}var Yn;!function(e){e[e.None=0]="None",e[e.Writable=1]="Writable"}(Yn||(Yn={}));class Hn{constructor(e,t,r,n,i,s,u,a){this.input=e,this.location=t,this.absoluteOffset=r,this.tokens=n,this.inputLength=i,this.parseAction=s,this.errors=u,this.offset=a,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=Yn.None,this.sourceSpanCache=new Map,this.index=0}peek(e){const t=this.index+e;return t<this.tokens.length?this.tokens[t]:Rn}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){if(this.index>0){return this.peek(-1).end+this.offset}return 0===this.tokens.length?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let r=this.currentEndIndex;if(void 0!==t&&t>this.currentEndIndex&&(r=t),e>r){const t=r;r=e,e=t}return new zr(e,r)}sourceSpan(e,t){const r=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(r)||this.sourceSpanCache.set(r,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(r)}advance(){this.index++}withContext(e,t){this.context|=e;const r=t();return this.context^=e,r}consumeOptionalCharacter(e){return!!this.next.isCharacter(e)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error(`Missing expected ${String.fromCharCode(e)}`)}consumeOptionalOperator(e){return!!this.next.isOperator(e)&&(this.advance(),!0)}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===Rn?"end of input":`token ${e}`}expectIdentifierOrKeyword(){const e=this.next;return e.isIdentifier()||e.isKeyword()?(this.advance(),e.toString()):(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null)}expectIdentifierOrKeywordOrString(){const e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()?(this.advance(),e.toString()):(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),"")}parseChain(){const e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){const t=this.parsePipe();if(e.push(t),this.consumeOptionalCharacter(59))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else this.index<this.tokens.length&&this.error(`Unexpected token '${this.next}'`)}if(0==e.length){const e=this.offset,t=this.offset+this.inputLength;return new Hr(this.span(e,t),this.sourceSpan(e,t))}return 1==e.length?e[0]:new en(this.span(t),this.sourceSpan(t),e)}parsePipe(){const e=this.inputIndex;let t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{const r=this.inputIndex;let n,i,s=this.expectIdentifierOrKeyword();null!==s?n=this.sourceSpan(r):(s="",i=-1!==this.next.index?this.next.index:this.inputLength+this.offset,n=new zr(i,i).toAbsolute(this.absoluteOffset));const u=[];for(;this.consumeOptionalCharacter(58);)u.push(this.parseExpression());t=new on(this.span(e),this.sourceSpan(e,i),t,s,u,n)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){const e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){const r=this.parsePipe();let n;if(this.consumeOptionalCharacter(58))n=this.parsePipe();else{const t=this.inputIndex,r=this.input.substring(e,t);this.error(`Conditional expression ${r} requires all 3 expressions`),n=new Hr(this.span(e),this.sourceSpan(e))}return new tn(this.span(e),this.sourceSpan(e),t,r,n)}return t}parseLogicalOr(){const e=this.inputIndex;let t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){const r=this.parseLogicalAnd();t=new hn(this.span(e),this.sourceSpan(e),"||",t,r)}return t}parseLogicalAnd(){const e=this.inputIndex;let t=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){const r=this.parseNullishCoalescing();t=new hn(this.span(e),this.sourceSpan(e),"&&",t,r)}return t}parseNullishCoalescing(){const e=this.inputIndex;let t=this.parseEquality();for(;this.consumeOptionalOperator("??");){const r=this.parseEquality();t=new hn(this.span(e),this.sourceSpan(e),"??",t,r)}return t}parseEquality(){const e=this.inputIndex;let t=this.parseRelational();for(;this.next.type==bn.Operator;){const r=this.next.strValue;switch(r){case"==":case"===":case"!=":case"!==":this.advance();const n=this.parseRelational();t=new hn(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseRelational(){const e=this.inputIndex;let t=this.parseAdditive();for(;this.next.type==bn.Operator;){const r=this.next.strValue;switch(r){case"<":case">":case"<=":case">=":this.advance();const n=this.parseAdditive();t=new hn(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseAdditive(){const e=this.inputIndex;let t=this.parseMultiplicative();for(;this.next.type==bn.Operator;){const r=this.next.strValue;switch(r){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new hn(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseMultiplicative(){const e=this.inputIndex;let t=this.parsePrefix();for(;this.next.type==bn.Operator;){const r=this.next.strValue;switch(r){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new hn(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parsePrefix(){if(this.next.type==bn.Operator){const e=this.inputIndex;let t;switch(this.next.strValue){case"+":return this.advance(),t=this.parsePrefix(),dn.createPlus(this.span(e),this.sourceSpan(e),t);case"-":return this.advance(),t=this.parsePrefix(),dn.createMinus(this.span(e),this.sourceSpan(e),t);case"!":return this.advance(),t=this.parsePrefix(),new fn(this.span(e),this.sourceSpan(e),t)}}return this.parseCallChain()}parseCallChain(){const e=this.inputIndex;let t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(In))t=this.parseAccessMemberOrMethodCall(t,e,!1);else if(this.consumeOptionalOperator("?."))t=this.parseAccessMemberOrMethodCall(t,e,!0);else if(this.consumeOptionalCharacter(91))this.withContext(Yn.Writable,(()=>{this.rbracketsExpected++;const r=this.parsePipe();if(r instanceof Hr&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("=")){const n=this.parseConditional();t=new an(this.span(e),this.sourceSpan(e),t,r,n)}else t=new un(this.span(e),this.sourceSpan(e),t,r)}));else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const r=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(Sn),t=new Fn(this.span(e),this.sourceSpan(e),t,r)}else{if(!this.consumeOptionalOperator("!"))return t;t=new En(this.span(e),this.sourceSpan(e),t)}}parsePrimary(){const e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(Sn),e}if(this.next.isKeywordNull())return this.advance(),new Dn(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Dn(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new Dn(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new Dn(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Zr(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new cn(this.span(e),this.sourceSpan(e),t)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new Jr(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){const t=this.next.toNumber();return this.advance(),new Dn(this.span(e),this.sourceSpan(e),t)}if(this.next.isString()){const t=this.next.toString();return this.advance(),new Dn(this.span(e),this.sourceSpan(e),t)}return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new Hr(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new Hr(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new Hr(this.span(e),this.sourceSpan(e)))}parseExpressionList(e){const t=[];do{if(this.next.isCharacter(e))break;t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){const e=[],t=[],r=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(On)){this.rbracesExpected++;do{const r=this.next.isString(),n=this.expectIdentifierOrKeywordOrString();e.push({key:n,quoted:r}),this.expectCharacter(58),t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(On)}return new pn(this.span(r),this.sourceSpan(r),e,t)}parseAccessMemberOrMethodCall(e,t,r=!1){const n=this.inputIndex,i=this.withContext(Yn.Writable,(()=>{var t;const r=null!==(t=this.expectIdentifierOrKeyword())&&void 0!==t?t:"";return 0===r.length&&this.error("Expected identifier for property access",e.span.end),r})),s=this.sourceSpan(n);if(this.consumeOptionalCharacter(40)){const n=this.inputIndex;this.rparensExpected++;const u=this.parseCallArguments(),a=this.span(n,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(Sn),this.rparensExpected--;const o=this.span(t),D=this.sourceSpan(t);return r?new vn(o,D,s,e,i,u,a):new Cn(o,D,s,e,i,u,a)}if(r)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new Hr(this.span(t),this.sourceSpan(t))):new sn(this.span(t),this.sourceSpan(t),s,e,i);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new Hr(this.span(t),this.sourceSpan(t));const r=this.parseConditional();return new nn(this.span(t),this.sourceSpan(t),s,e,i,r)}return new rn(this.span(t),this.sourceSpan(t),s,e,i)}parseCallArguments(){if(this.next.isCharacter(Sn))return[];const e=[];do{e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1;const r=this.currentAbsoluteOffset;do{e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-")}while(t);return{source:e,span:new gn(r,r+e.length)}}parseTemplateBindings(e){const t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){const r=this.parseLetBinding();if(r)t.push(r);else{const r=this.expectTemplateBindingKey(),n=this.parseAsBinding(r);n?t.push(n):(r.source=e.source+r.source.charAt(0).toUpperCase()+r.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(r)))}this.consumeStatementTerminator()}return new qn(t,[],this.errors)}parseDirectiveKeywordBindings(e){const t=[];this.consumeOptionalCharacter(58);const r=this.getDirectiveBoundTarget();let n=this.currentAbsoluteOffset;const i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);const s=new gn(e.span.start,n);return t.push(new xn(s,e,r)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Rn||this.peekKeywordAs()||this.peekKeywordLet())return null;const e=this.parsePipe(),{start:t,end:r}=e.span,n=this.input.substring(t,r);return new mn(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();const t=this.expectTemplateBindingKey();this.consumeStatementTerminator();const r=new gn(e.span.start,this.currentAbsoluteOffset);return new yn(r,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;const e=this.currentAbsoluteOffset;this.advance();const t=this.expectTemplateBindingKey();let r=null;this.consumeOptionalOperator("=")&&(r=this.expectTemplateBindingKey()),this.consumeStatementTerminator();const n=new gn(e,this.currentAbsoluteOffset);return new yn(n,t,r)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new Xr(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return null==e&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(e,t){let r=`Private identifiers are not supported. Unexpected private identifier: ${e}`;null!==t&&(r+=`, ${t}`),this.error(r)}skip(){let e=this.next;for(;!(!(this.index<this.tokens.length)||e.isCharacter(59)||e.isOperator("|")||!(this.rparensExpected<=0)&&e.isCharacter(Sn)||!(this.rbracesExpected<=0)&&e.isCharacter(On)||!(this.rbracketsExpected<=0)&&e.isCharacter(93)||this.context&Yn.Writable&&e.isOperator("="));)this.next.isError()&&this.errors.push(new Xr(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}}class Jn{constructor(){this.errors=[]}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){}visitLiteralPrimitive(e,t){}visitPropertyRead(e,t){}visitPropertyWrite(e,t){}visitSafePropertyRead(e,t){}visitMethodCall(e,t){}visitSafeMethodCall(e,t){}visitFunctionCall(e,t){}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitUnary(e,t){}visitBinary(e,t){}visitPrefixNot(e,t){}visitNonNullAssert(e,t){}visitConditional(e,t){}visitPipe(e,t){this.errors.push("pipes")}visitKeyedRead(e,t){}visitKeyedWrite(e,t){}visitAll(e,t){return e.map((e=>e.visit(this,t)))}visitChain(e,t){}visitQuote(e,t){}}class Zn extends An{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}var ei=Object.freeze({__proto__:null,SplitInterpolation:zn,TemplateBindingParseResult:qn,Parser:Qn,IvyParser:class extends Qn{constructor(){super(...arguments),this.simpleExpressionChecker=Zn}},_ParseAST:Hn}),ti=p((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getLast=t.toLowerCamelCase=t.findBackChar=t.findFrontChar=t.fitSpans=t.getNgType=t.parseNgInterpolation=t.parseNgTemplateBindings=t.parseNgAction=t.parseNgSimpleBinding=t.parseNgBinding=t.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX=void 0;const r="angular-estree-parser";t.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX="NgEstreeParser";const n=[r,0];function i(){return new ei.Parser(new Un.Lexer)}function s(e,t){const r=i(),{astInput:n,comments:s}=o(e,r),{ast:u,errors:D}=t(n,r);return a(D),{ast:u,comments:s}}function u(e,t){if(e&&"object"==typeof e){if(Array.isArray(e))return e.forEach((e=>u(e,t)));for(const r of Object.keys(e)){const n=e[r];"span"===r?t(n):u(n,t)}}}function a(e){if(0!==e.length){const[{message:t}]=e;throw new SyntaxError(t.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function o(e,t){const r=t._commentStart(e);return null===r?{astInput:e,comments:[]}:{astInput:e.slice(0,r),comments:[{type:"Comment",value:e.slice(r+"//".length),span:{start:r,end:e.length}}]}}function D({start:e,end:t},r){let n=e,i=t;for(;i!==n&&/\s/.test(r[i-1]);)i--;for(;n!==i&&/\s/.test(r[n]);)n++;return{start:n,end:i}}function c({start:e,end:t},r){let n=e,i=t;for(;i!==r.length&&/\s/.test(r[i]);)i++;for(;0!==n&&/\s/.test(r[n-1]);)n--;return{start:n,end:i}}function p(e,t){return"("===t[e.start-1]&&")"===t[e.end]?{start:e.start-1,end:e.end+1}:e}t.parseNgBinding=function(e){return s(e,((e,t)=>t.parseBinding(e,...n)))},t.parseNgSimpleBinding=function(e){return s(e,((e,t)=>t.parseSimpleBinding(e,...n)))},t.parseNgAction=function(e){return s(e,((e,t)=>t.parseAction(e,...n)))},t.parseNgTemplateBindings=function(e){const n=i(),{templateBindings:s,errors:u}=n.parseTemplateBindings(t.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX,e,r,0,0);return a(u),s},t.parseNgInterpolation=function(e){const t=i(),{astInput:r,comments:s}=o(e,t),D="{{",{ast:c,errors:p}=t.parseInterpolation(D+r+"}}",...n);a(p);const l=c.expressions[0],h=new Set;return u(l,(e=>{h.has(e)||(e.start-=D.length,e.end-=D.length,h.add(e))})),{ast:l,comments:s}},t.getNgType=function(e){return wn.Unary&&e instanceof wn.Unary?"Unary":e instanceof wn.Binary?"Binary":e instanceof wn.BindingPipe?"BindingPipe":e instanceof wn.Chain?"Chain":e instanceof wn.Conditional?"Conditional":e instanceof wn.EmptyExpr?"EmptyExpr":e instanceof wn.FunctionCall?"FunctionCall":e instanceof wn.ImplicitReceiver?"ImplicitReceiver":e instanceof wn.KeyedRead?"KeyedRead":e instanceof wn.KeyedWrite?"KeyedWrite":e instanceof wn.LiteralArray?"LiteralArray":e instanceof wn.LiteralMap?"LiteralMap":e instanceof wn.LiteralPrimitive?"LiteralPrimitive":e instanceof wn.MethodCall?"MethodCall":e instanceof wn.NonNullAssert?"NonNullAssert":e instanceof wn.PrefixNot?"PrefixNot":e instanceof wn.PropertyRead?"PropertyRead":e instanceof wn.PropertyWrite?"PropertyWrite":e instanceof wn.Quote?"Quote":e instanceof wn.SafeMethodCall?"SafeMethodCall":e instanceof wn.SafePropertyRead?"SafePropertyRead":e.type},t.fitSpans=function(e,t,r){let n=0;const i={start:e.start,end:e.end};for(;;){const e=c(i,t),r=p(e,t);if(e.start===r.start&&e.end===r.end)break;i.start=r.start,i.end=r.end,n++}return{hasParens:0!==(r?n-1:n),outerSpan:D(r?{start:i.start+1,end:i.end-1}:i,t),innerSpan:D(e,t)}},t.findFrontChar=function(e,t,r){let n=t;for(;!e.test(r[n]);)if(--n<0)throw new Error(`Cannot find front char ${e} from index ${t} in ${JSON.stringify(r)}`);return n},t.findBackChar=function(e,t,r){let n=t;for(;!e.test(r[n]);)if(++n>=r.length)throw new Error(`Cannot find back char ${e} from index ${t} in ${JSON.stringify(r)}`);return n},t.toLowerCamelCase=function(e){return e.slice(0,1).toLowerCase()+e.slice(1)},t.getLast=function(e){return 0===e.length?void 0:e[e.length-1]}})),ri=p((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.transformSpan=t.transform=void 0;function r(e,t,r=!1,n=!1){if(!r){const{start:r,end:n}=e;return{start:r,end:n,loc:{start:t.locator.locationForIndex(r),end:t.locator.locationForIndex(n)}}}const{outerSpan:i,innerSpan:s,hasParens:u}=ti.fitSpans(e,t.text,n);return Object.assign({start:s.start,end:s.end,loc:{start:t.locator.locationForIndex(s.start),end:t.locator.locationForIndex(s.end)}},u&&{extra:{parenthesized:!0,parenStart:i.start,parenEnd:i.end}})}t.transform=(e,n,i=!1)=>{const s=ti.getNgType(e);switch(s){case"Unary":{const{operator:t,expr:r}=e;return o("UnaryExpression",{prefix:!0,argument:u(r),operator:t},e.span,{hasParentParens:i})}case"Binary":{const{left:t,operation:r,right:n}=e,s=n.span.start===n.span.end,a=t.span.start===t.span.end;if(s||a){const r=t.span.start===t.span.end?u(n):u(t);return o("UnaryExpression",{prefix:!0,argument:r,operator:s?"+":"-"},{start:e.span.start,end:E(r)},{hasParentParens:i})}const D=u(t),c=u(n);return o("&&"===r||"||"===r?"LogicalExpression":"BinaryExpression",{left:D,right:c,operator:r},{start:f(D),end:E(c)},{hasParentParens:i})}case"BindingPipe":{const{exp:t,name:r,args:n}=e,s=u(t),a=p(/\S/,p(/\|/,E(s))+1),D=o("Identifier",{name:r},{start:a,end:a+r.length}),c=n.map(u);return o("NGPipeExpression",{left:s,right:D,arguments:c},{start:f(s),end:E(0===c.length?D:ti.getLast(c))},{hasParentParens:i})}case"Chain":{const{expressions:t}=e;return o("NGChainedExpression",{expressions:t.map(u)},e.span,{hasParentParens:i})}case"Comment":{const{value:t}=e;return o("CommentLine",{value:t},e.span,{processSpan:!1})}case"Conditional":{const{condition:t,trueExp:r,falseExp:n}=e,s=u(t),a=u(r),D=u(n);return o("ConditionalExpression",{test:s,consequent:a,alternate:D},{start:f(s),end:E(D)},{hasParentParens:i})}case"EmptyExpr":return o("NGEmptyExpression",{},e.span,{hasParentParens:i});case"FunctionCall":{const{target:t,args:r}=e,n=1===r.length?[a(r[0])]:r.map(u),s=u(t);return o("CallExpression",{callee:s,arguments:n},{start:f(s),end:e.span.end},{hasParentParens:i})}case"ImplicitReceiver":return o("ThisExpression",{},e.span,{hasParentParens:i});case"KeyedRead":{const{obj:t,key:r}=e;return D(t,u(r),{computed:!0,optional:!1},{end:e.span.end,hasParentParens:i})}case"LiteralArray":{const{expressions:t}=e;return o("ArrayExpression",{elements:t.map(u)},e.span,{hasParentParens:i})}case"LiteralMap":{const{keys:t,values:r}=e,n=r.map((e=>u(e))),s=t.map((({key:t,quoted:r},i)=>{const s=n[i],u={start:p(/\S/,0===i?e.span.start+1:p(/,/,E(n[i-1]))+1),end:c(/\S/,c(/:/,f(s)-1)-1)+1},a=r?o("StringLiteral",{value:t},u):o("Identifier",{name:t},u);return o("ObjectProperty",{key:a,value:s,method:!1,shorthand:!1,computed:!1},{start:f(a),end:E(s)})}));return o("ObjectExpression",{properties:s},e.span,{hasParentParens:i})}case"LiteralPrimitive":{const{value:t}=e;switch(typeof t){case"boolean":return o("BooleanLiteral",{value:t},e.span,{hasParentParens:i});case"number":return o("NumericLiteral",{value:t},e.span,{hasParentParens:i});case"object":return o("NullLiteral",{},e.span,{hasParentParens:i});case"string":return o("StringLiteral",{value:t},e.span,{hasParentParens:i});case"undefined":return o("Identifier",{name:"undefined"},e.span,{hasParentParens:i});default:throw new Error("Unexpected LiteralPrimitive value type "+typeof t)}}case"MethodCall":case"SafeMethodCall":{const t="SafeMethodCall"===s,{receiver:r,name:n,args:p}=e,l=1===p.length?[a(p[0])]:p.map(u),d=c(/\S/,c(/\(/,(0===l.length?c(/\)/,e.span.end-1):f(l[0]))-1)-1)+1,E=D(r,o("Identifier",{name:n},{start:d-n.length,end:d}),{computed:!1,optional:t}),C=h(E);return o(t||C?"OptionalCallExpression":"CallExpression",{callee:E,arguments:l},{start:f(E),end:e.span.end},{hasParentParens:i})}case"NonNullAssert":{const{expression:t}=e,r=u(t);return o("TSNonNullExpression",{expression:r},{start:f(r),end:e.span.end},{hasParentParens:i})}case"PrefixNot":{const{expression:t}=e,r=u(t);return o("UnaryExpression",{prefix:!0,operator:"!",argument:r},{start:e.span.start,end:E(r)},{hasParentParens:i})}case"PropertyRead":case"SafePropertyRead":{const t="SafePropertyRead"===s,{receiver:r,name:n}=e,u=c(/\S/,e.span.end-1)+1;return D(r,o("Identifier",{name:n},{start:u-n.length,end:u},l(r)?{hasParentParens:i}:{}),{computed:!1,optional:t},{hasParentParens:i})}case"KeyedWrite":{const{obj:t,key:r,value:n}=e,s=u(r),a=u(n),c=D(t,s,{computed:!0,optional:!1},{end:p(/\]/,E(s))+1});return o("AssignmentExpression",{left:c,operator:"=",right:a},{start:f(c),end:E(a)},{hasParentParens:i})}case"PropertyWrite":{const{receiver:t,name:r,value:n}=e,s=u(n),a=c(/\S/,c(/=/,f(s)-1)-1)+1,p=D(t,o("Identifier",{name:r},{start:a-r.length,end:a}),{computed:!1,optional:!1});return o("AssignmentExpression",{left:p,operator:"=",right:s},{start:f(p),end:E(s)},{hasParentParens:i})}case"Quote":{const{prefix:t,uninterpretedExpression:r}=e;return o("NGQuotedExpression",{prefix:t,value:r},e.span,{hasParentParens:i})}default:throw new Error(`Unexpected node ${s}`)}function u(e){return t.transform(e,n)}function a(e){return t.transform(e,n,!0)}function o(e,t,i,{processSpan:s=!0,hasParentParens:u=!1}={}){const a=Object.assign(Object.assign({type:e},r(i,n,s,u)),t);switch(e){case"Identifier":{const e=a;e.loc.identifierName=e.name;break}case"NumericLiteral":{const e=a;e.extra=Object.assign(Object.assign({},e.extra),{raw:n.text.slice(e.start,e.end),rawValue:e.value});break}case"StringLiteral":{const e=a;e.extra=Object.assign(Object.assign({},e.extra),{raw:n.text.slice(e.start,e.end),rawValue:e.value});break}}return a}function D(e,t,r,{end:n=E(t),hasParentParens:i=!1}={}){if(l(e))return t;const s=u(e),a=h(s);return o(r.optional||a?"OptionalMemberExpression":"MemberExpression",Object.assign({object:s,property:t,computed:r.computed},r.optional?{optional:!0}:a?{optional:!1}:null),{start:f(s),end:n},{hasParentParens:i})}function c(e,t){return ti.findFrontChar(e,t,n.text)}function p(e,t){return ti.findBackChar(e,t,n.text)}function l(e){return e.span.start>=e.span.end||/^\s+$/.test(n.text.slice(e.span.start,e.span.end))}function h(e){return("OptionalCallExpression"===e.type||"OptionalMemberExpression"===e.type)&&!d(e)}function d(e){return e.extra&&e.extra.parenthesized}function f(e){return d(e)?e.extra.parenStart:e.start}function E(e){return d(e)?e.extra.parenEnd:e.end}},t.transformSpan=r})),ni=p((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.transformTemplateBindings=void 0,t.transformTemplateBindings=function(e,t){e.forEach((function(e){h(e.key.span),l(e)&&e.value&&h(e.value.span)}));const[r]=e,{key:n}=r,i=0===t.text.slice(r.sourceSpan.start,r.sourceSpan.end).trim().length?e.slice(1):e,s=[];let u=null;for(let e=0;e<i.length;e++){const r=i[e];if(u&&p(u)&&l(r)&&r.value&&r.value.source===u.key.source){const e=D("NGMicrosyntaxKey",{name:r.key.source},r.key.span),n=(e,r)=>Object.assign(Object.assign({},e),ri.transformSpan({start:e.start,end:r},t)),i=t=>Object.assign(Object.assign({},n(t,e.end)),{alias:e}),u=s.pop();if("NGMicrosyntaxExpression"===u.type)s.push(i(u));else{if("NGMicrosyntaxKeyedExpression"!==u.type)throw new Error(`Unexpected type ${u.type}`);{const e=i(u.expression);s.push(n(Object.assign(Object.assign({},u),{expression:e}),e.end))}}}else s.push(a(r,e));u=r}return D("NGMicrosyntax",{body:s},0===s.length?e[0].sourceSpan:{start:s[0].start,end:s[s.length-1].end});function a(e,r){if(p(e)){const{key:t,value:n}=e;return n?0===r?D("NGMicrosyntaxExpression",{expression:o(n.ast),alias:null},n.sourceSpan):D("NGMicrosyntaxKeyedExpression",{key:D("NGMicrosyntaxKey",{name:c(t.source)},t.span),expression:D("NGMicrosyntaxExpression",{expression:o(n.ast),alias:null},n.sourceSpan)},{start:t.span.start,end:n.sourceSpan.end}):D("NGMicrosyntaxKey",{name:c(t.source)},t.span)}{const{key:r,sourceSpan:n}=e;if(/^let\s$/.test(t.text.slice(n.start,n.start+4))){const{value:t}=e;return D("NGMicrosyntaxLet",{key:D("NGMicrosyntaxKey",{name:r.source},r.span),value:t?D("NGMicrosyntaxKey",{name:t.source},t.span):null},{start:n.start,end:t?t.span.end:r.span.end})}{const n=function(e){if(!e.value||e.value.source!==ti.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX)return e.value;const r=ti.findBackChar(/\S/,e.sourceSpan.start,t.text);return{source:"$implicit",span:{start:r,end:r}}}(e);return D("NGMicrosyntaxAs",{key:D("NGMicrosyntaxKey",{name:n.source},n.span),alias:D("NGMicrosyntaxKey",{name:r.source},r.span)},{start:n.span.start,end:r.span.end})}}}function o(e){return ri.transform(e,t)}function D(e,r,n,i=!0){return Object.assign(Object.assign({type:e},ri.transformSpan(n,t,i)),r)}function c(e){return ti.toLowerCamelCase(e.slice(n.source.length))}function p(e){return e instanceof wn.ExpressionBinding}function l(e){return e instanceof wn.VariableBinding}function h(e){if('"'!==t.text[e.start]&&"'"!==t.text[e.start])return;const r=t.text[e.start];let n=!1;for(let i=e.start+1;i<t.text.length;i++)switch(t.text[i]){case r:if(!n)return void(e.end=i+1);default:n=!1;break;case"\\":n=!n}}}})),ii=p((function(e,t){function r(e,t){const{ast:r,comments:n}=t(e),i=new Vr.Context(e),s=e=>ri.transform(e,i),u=s(r);return u.comments=n.map(s),u}Object.defineProperty(t,"__esModule",{value:!0}),t.parseTemplateBindings=t.parseAction=t.parseInterpolation=t.parseSimpleBinding=t.parseBinding=void 0,t.parseBinding=function(e){return r(e,ti.parseNgBinding)},t.parseSimpleBinding=function(e){return r(e,ti.parseNgSimpleBinding)},t.parseInterpolation=function(e){return r(e,ti.parseNgInterpolation)},t.parseAction=function(e){return r(e,ti.parseNgAction)},t.parseTemplateBindings=function(e){return ni.transformTemplateBindings(ti.parseNgTemplateBindings(e),new Vr.Context(e))}}));const{locStart:si,locEnd:ui}=Ur;function ai(e){return{astFormat:"estree",parse:(t,r,n)=>{const i=e(t,ii);return{type:"NGRoot",node:"__ng_action"===n.parser&&"NGChainedExpression"!==i.type?Object.assign(Object.assign({},i),{},{type:"NGChainedExpression",expressions:[i]}):i}},locStart:si,locEnd:ui}}return{parsers:{__ng_action:ai(((e,t)=>t.parseAction(e))),__ng_binding:ai(((e,t)=>t.parseBinding(e))),__ng_interpolation:ai(((e,t)=>t.parseInterpolation(e))),__ng_directive:ai(((e,t)=>t.parseTemplateBindings(e)))}}}));