webhook-action/node_modules/prettier/parser-html.js

114 lines
153 KiB
JavaScript
Raw Normal View History

2020-08-27 08:23:33 +00:00
!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.html=t())}(this,(function(){"use strict";var e=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function t(e){return{type:"concat",parts:e}}function r(e){return{type:"indent",contents:e}}function n(e,t){return{type:"align",contents:t,n:e}}function s(e,t){return{type:"group",id:(t=t||{}).id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}const i={type:"break-parent"},o=t([{type:"line",hard:!0},i]),a=t([{type:"line",hard:!0,literal:!0},i]);var u={concat:t,join:function(e,r){const n=[];for(let t=0;t<r.length;t++)0!==t&&n.push(e),n.push(r[t]);return t(n)},line:{type:"line"},softline:{type:"line",soft:!0},hardline:o,literalline:a,group:s,conditionalGroup:function(e,t){return s(e[0],Object.assign({},t,{expandedStates:e}))},fill:function(e){return{type:"fill",parts:e}},lineSuffix:function(e){return{type:"line-suffix",contents:e}},lineSuffixBoundary:{type:"line-suffix-boundary"},cursor:{type:"cursor",placeholder:Symbol("cursor")},breakParent:i,ifBreak:function(e,t,r){return{type:"if-break",breakContents:e,flatContents:t,groupId:(r=r||{}).groupId}},trim:{type:"trim"},indent:r,align:n,addAlignmentToDoc:function(e,t,s){let i=e;if(t>0){for(let e=0;e<Math.floor(t/s);++e)i=r(i);i=n(t%s,i),i=n(-1/0,i)}return i},markAsRoot:function(e){return n({type:"root"},e)},dedentToRoot:function(e){return n(-1/0,e)},dedent:function(e){return n(-1,e)}},c=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 l=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 p=l,h=l;p.default=h;const D=e=>{if("string"!=typeof(e=e.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(?:\uD83
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"}(t.TagContentType||(t.TagContentType={})),t.splitNsName=r,t.isNgContainer=function(e){return"ng-container"===r(e)[1]},t.isNgContent=function(e){return"ng-content"===r(e)[1]},t.isNgTemplate=function(e){return"ng-template"===r(e)[1]},t.getNsPrefix=function(e){return null===e?null:r(e)[0]},t.mergeNsAndName=function(e,t){return e?":".concat(e,":").concat(t):t},t.NAMED_ENTITIES={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"",backsim:"∽",backsimeq:"⋍",Backslash:"",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"",Bernoullis:"",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"",caps:"∩︀",caret:"",caron:"ˇ",Cayleys:"",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔"
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0});class r{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=jn.TagContentType.PARSABLE_DATA,closedByParent:n=!1,isVoid:s=!1,ignoreFirstLf:i=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach(e=>this.closedByChildren[e]=!0),this.isVoid=s,this.closedByParent=n||s,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}let n,s;t.HtmlTagDefinition=r,t.getHtmlTagDefinition=function(e){return s||(n=new r,s={base:new r({isVoid:!0}),meta:new r({isVoid:!0}),area:new r({isVoid:!0}),embed:new r({isVoid:!0}),link:new r({isVoid:!0}),img:new r({isVoid:!0}),input:new r({isVoid:!0}),param:new r({isVoid:!0}),hr:new r({isVoid:!0}),br:new r({isVoid:!0}),source:new r({isVoid:!0}),track:new r({isVoid:!0}),wbr:new r({isVoid:!0}),p:new r({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new r({closedByChildren:["tbody","tfoot"]}),tbody:new r({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new r({closedByChildren:["tbody"],closedByParent:!0}),tr:new r({closedByChildren:["tr"],closedByParent:!0}),td:new r({closedByChildren:["td","th"],closedByParent:!0}),th:new r({closedByChildren:["td","th"],closedByParent:!0}),col:new r({isVoid:!0}),svg:new r({implicitNamespacePrefix:"svg"}),math:new r({implicitNamespacePrefix:"math"}),li:new r({closedByChildren:["li"],closedByParent:!0}),dt:new r({closedByChildren:["dt","dd"]}),dd:new r({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new r({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new r({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new r({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new r({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new r({closedByChildren:["optgroup"],closedByParent:!0}),option:new r({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new r({ignoreFirstLf:!0}),listing:new r({ignoreFirstLf:!0}),style:new r({contentType:jn.TagContentType.RAW_TEXT}),script:new r({contentType:jn.TagContentType.RAW_TEXT}),title:new r({contentType:jn.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new r({contentType:jn.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),s[e]||n}})),Vn=H((function(e,t){function r(e){return t.$0<=e&&e<=t.$9}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,t.$BSPACE=8,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63,t.$0=48,t.$7=55,t.$9=57,t.$A=65,t.$E=69,t.$F=70,t.$X=88,t.$Z=90,t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93,t.$CARET=94,t.$_=95,t.$a=97,t.$b=98,t.$e=101,t.$f=102,t.$n=110,t.$r=114,t.$t=116,t.$u=117,t.$v=118,t.$x=120,t.$z=122,t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125,t.$NBSP=160,t.$PIPE=124,t.$TILDA=126,t.$AT=64,t.$BT=96,t.isWhitespace=function(e){return e>=t.$TAB&&e<=t.$SPACE||e==t.$NBSP},t.isDigit=r,t.isAsciiLetter=function(e){return e>=t.$a&&e<=t.$z||e>=t.$A&&e<=t.$Z},t.isAsciiHexDigit=function(e){return e>=t.$a&&e<=t.$f||e>=t.$A&&e<=t.$F||r(e)},t.isNewLine=function(e){return e===t.$LF||e===t.$CR},t.isOctalDigit=function(e){return t.$0<=e&&e<=t.$7}})),Hn=H((function(e,t){
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t,r){this.filePath=e,this.name=t,this.members=r}assertNoMembers(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this),"."))}}t.StaticSymbol=r;t.StaticSymbolCache=class{constructor(){this.cache=new Map}get(e,t,n){const s=(n=n||[]).length?".".concat(n.join(".")):"",i='"'.concat(e,'".').concat(t).concat(s);let o=this.cache.get(i);return o||(o=new r(e,t,n),this.cache.set(i,o)),o}}})),Xn=H((function(e,t){
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0});const r=/-+([a-z0-9])/g;function n(e,t,r){const n=e.indexOf(t);return-1==n?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function s(e,t,r){return Array.isArray(e)?t.visitArray(e,r):"object"==typeof(n=e)&&null!==n&&Object.getPrototypeOf(n)===a?t.visitStringMap(e,r):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,r):t.visitOther(e,r);var n}t.dashCaseToCamelCase=function(e){return e.replace(r,(...e)=>e[1].toUpperCase())},t.splitAtColon=function(e,t){return n(e,":",t)},t.splitAtPeriod=function(e,t){return n(e,".",t)},t.visitValue=s,t.isDefined=function(e){return null!=e},t.noUndefined=function(e){return void 0===e?null:e};t.ValueTransformer=class{visitArray(e,t){return e.map(e=>s(e,this,t))}visitStringMap(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=s(e[n],this,t)}),r}visitPrimitive(e,t){return e}visitOther(e,t){return e}},t.SyncAsync={assertSync:e=>{if(u(e))throw new Error("Illegal state: value cannot be a promise");return e},then:(e,t)=>u(e)?e.then(t):t(e),all:e=>e.some(u)?Promise.all(e):e},t.error=function(e){throw new Error("Internal Error: ".concat(e))},t.syntaxError=function(e,t){const r=Error(e);return r[i]=!0,t&&(r[o]=t),r};const i="ngSyntaxError",o="ngParseErrors";t.isSyntaxError=function(e){return e[i]},t.getParseErrors=function(e){return e[o]||[]},t.escapeRegExp=function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};const a=Object.getPrototypeOf({});function u(e){return!!e&&"function"==typeof e.then}t.utf8Encode=function(e){let t="";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(n>=55296&&n<=56319&&e.length>r+1){const t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(r++,n=(n-55296<<10)+t-56320+65536)}n<=127?t+=String.fromCharCode(n):n<=2047?t+=String.fromCharCode(n>>6&31|192,63&n|128):n<=65535?t+=String.fromCharCode(n>>12|224,n>>6&63|128,63&n|128):n<=2097151&&(t+=String.fromCharCode(n>>18&7|240,n>>12&63|128,n>>6&63|128,63&n|128))}return t},t.stringify=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);if(!t.toString)return"object";const r=t.toString();if(null==r)return""+r;const n=r.indexOf("\n");return-1===n?r:r.substring(0,n)},t.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},t.isPromise=u;t.Version=class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}};const c="undefined"!=typeof window&&window,l="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,p=void 0!==V&&V||c||l;t.global=p})),zn=H((function(e,t){
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0});const r=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function n(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=n;let s=0;function i(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof Hn.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;let r=Xn.stringify(t);return r.indexOf("(")>=0?(r="anonymous_".concat(s++),t.__anonymousType=r):r=n(r),r}var o;t.identifierName=i,t.identifierModuleUrl=function(e){const t=e.reference;return t instanceof Hn.StaticSymbol?t.filePath:"./".concat(Xn.stringify(t))},t.viewClassName=function(e,t){return"View_".concat(i({reference:e}),"_").concat(t)},t.rendererTypeName=function(e){return"RenderType_".concat(i({reference:e}))},t.hostViewClassName=function(e){return"HostView_".concat(i({reference:e}))},t.componentFactoryName=function(e){return"".concat(i({reference:e}),"NgFactory")},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(o=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?n(e.value):i(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};t.CompileStylesheetMetadata=class{constructor({moduleUrl:e,styles:t,styleUrls:r}={}){this.moduleUrl=e||null,this.styles=u(t),this.styleUrls=u(r)}};t.CompileTemplateMetadata=class{constructor({encapsulation:e,template:t,templateUrl:r,htmlAst:n,styles:s,styleUrls:i,externalStylesheets:o,animations:a,ngContentSelectors:l,interpolation:p,isInline:h,preserveWhitespaces:D}){if(this.encapsulation=e,this.template=t,this.templateUrl=r,this.htmlAst=n,this.styles=u(s),this.styleUrls=u(i),this.externalStylesheets=u(o),this.animations=a?c(a):[],this.ngContentSelectors=l||[],p&&2!=p.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=p,this.isInline=h,this.preserveWhitespaces=D}toSummary(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}};class a{static create({isHost:e,type:t,isComponent:n,selector:s,exportAs:i,changeDetection:o,inputs:u,outputs:c,host:l,providers:p,viewProviders:h,queries:D,guards:d,viewQueries:f,entryComponents:m,template:g,componentViewType:E,rendererType:C,componentFactory:y}){const b={},T={},_={};null!=l&&Object.keys(l).forEach(e=>{const t=l[e],n=e.match(r);null===n?_[e]=t:null!=n[1]?T[n[1]]=t:null!=n[2]&&(b[n[2]]=t)});const S={};null!=u&&u.forEach(e=>{const t=Xn.splitAtColon(e,[e,e]);S[t[0]]=t[1]});const F={};return null!=c&&c.forEach(e=>{const t=Xn.splitAtColon(e,[e,e]);F[t[0]]=t[1]}),new a({isHost:e,type:t,isComponent:!!n,selector:s,exportAs:i,changeDetection:o,inputs:S,outputs:F,hostListeners:b,hostProperties:T,hostAttributes:_,providers:p,viewProviders:h,queries:D,guards:d,viewQueries:f,entryComponents:m,template:g,componentViewType:E,rendererType:C,componentFactory:y})}constructor({isHost:e,type:t,isComponent:r,selector:n,exportAs:s,changeDetection:i,inputs:o,outputs:a,hostListeners:c,hostProperties:l,hostAttributes:p,providers:h,viewProviders:D,queries:d,guards:f,viewQueries:m,entryComponents:g,template:E,componentViewType:C,rendererType:y,componentFactory:b}){this.isHost=!!e,this.type=t,this.isComponent=r,this.selector=n,this.exportAs=s,this.changeDetection=i,this.inputs=o,this.outputs=a,this.hostListeners=c,this.hostProperties=l,this.hostAttributes=p,this.providers=u(h),this.viewProviders=u(D),this.queries=u(d),this.guards=f,this.viewQueries=u(m),this.entryComponents=u(g),this.template=E,this.componentViewType=C,this.rendererType=y,this.componentFactory=b}toSummary(){return{summaryKind:o.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueri
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
class r{constructor(e,t,r,n){this.file=e,this.offset=t,this.line=r,this.col=n}toString(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}moveBy(e){const t=this.file.content,n=t.length;let s=this.offset,i=this.line,o=this.col;for(;s>0&&e<0;){s--,e++;if(t.charCodeAt(s)==Vn.$LF){i--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(Vn.$LF));o=e>0?s-e:s}else o--}for(;s<n&&e>0;){const r=t.charCodeAt(s);s++,e--,r==Vn.$LF?(i++,o=0):o++}return new r(this.file,s,i,o)}getContext(e,t){const r=this.file.content;let n=this.offset;if(null!=n){n>r.length-1&&(n=r.length-1);let s=n,i=0,o=0;for(;i<e&&n>0&&(n--,i++,"\n"!=r[n]||++o!=t););for(i=0,o=0;i<e&&s<r.length-1&&(s++,i++,"\n"!=r[s]||++o!=t););return{before:r.substring(n,this.offset),after:r.substring(this.offset,s+1)}}return null}}t.ParseLocation=r;class n{constructor(e,t){this.content=e,this.url=t}}t.ParseSourceFile=n;class s{constructor(e,t,r=null){this.start=e,this.end=t,this.details=r}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var i;t.ParseSourceSpan=s,t.EMPTY_PARSE_LOCATION=new r(new n("",""),0,0,0),t.EMPTY_SOURCE_SPAN=new s(t.EMPTY_PARSE_LOCATION,t.EMPTY_PARSE_LOCATION),function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(i=t.ParseErrorLevel||(t.ParseErrorLevel={}));t.ParseError=class{constructor(e,t,r=i.ERROR){this.span=e,this.msg=t,this.level=r}contextualMessage(){const e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(i[this.level]," ->]").concat(e.after,'")'):this.msg}toString(){const e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}},t.typeSourceSpan=function(e,t){const i=zn.identifierModuleUrl(t),o=null!=i?"in ".concat(e," ").concat(zn.identifierName(t)," in ").concat(i):"in ".concat(e," ").concat(zn.identifierName(t)),a=new n("",o);return new s(new r(a,-1,-1,-1),new r(a,-1,-1,-1))},t.r3JitTypeSourceSpan=function(e,t,i){const o="in ".concat(e," ").concat(t," in ").concat(i),a=new n("",o);return new s(new r(a,-1,-1,-1),new r(a,-1,-1,-1))}})),Qn=H((function(e,t){
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0});t.AstPath=class{constructor(e,t=-1){this.path=e,this.position=t}get empty(){return!this.path||!this.path.length}get head(){return this.path[0]}get tail(){return this.path[this.path.length-1]}parentOf(e){return e&&this.path[this.path.indexOf(e)-1]}childOf(e){return this.path[this.path.indexOf(e)+1]}first(e){for(let t=this.path.length-1;t>=0;t--){let r=this.path[t];if(r instanceof e)return r}}push(e){this.path.push(e)}pop(){return this.path.pop()}}})),Yn=H((function(e,t){
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0});t.Text=class{constructor(e,t,r){this.value=e,this.sourceSpan=t,this.i18n=r}visit(e,t){return e.visitText(this,t)}};t.CDATA=class{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitCdata(this,t)}};t.Expansion=class{constructor(e,t,r,n,s,i){this.switchValue=e,this.type=t,this.cases=r,this.sourceSpan=n,this.switchValueSourceSpan=s,this.i18n=i}visit(e,t){return e.visitExpansion(this,t)}};t.ExpansionCase=class{constructor(e,t,r,n,s){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=s}visit(e,t){return e.visitExpansionCase(this,t)}};t.Attribute=class{constructor(e,t,r,n=null,s=null,i=null){this.name=e,this.value=t,this.sourceSpan=r,this.valueSpan=n,this.nameSpan=s,this.i18n=i}visit(e,t){return e.visitAttribute(this,t)}};class r{constructor(e,t,r,n,s=null,i=null,o=null,a=null){this.name=e,this.attrs=t,this.children=r,this.sourceSpan=n,this.startSourceSpan=s,this.endSourceSpan=i,this.nameSpan=o,this.i18n=a}visit(e,t){return e.visitElement(this,t)}}t.Element=r;t.Comment=class{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}};function n(e,t,r=null){const n=[],s=e.visit?t=>e.visit(t,r)||t.visit(e,r):t=>t.visit(e,r);return t.forEach(e=>{const t=s(e);t&&n.push(t)}),n}t.DocType=class{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitDocType(this,t)}},t.visitAll=n;class s{constructor(){}visitElement(e,t){this.visitChildren(t,t=>{t(e.attrs),t(e.children)})}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,t=>{t(e.cases)})}visitExpansionCase(e,t){}visitChildren(e,t){let r=[],s=this;return t((function(t){t&&r.push(n(s,t,e))})),Array.prototype.concat.apply([],r)}}t.RecursiveVisitor=s,t.findNode=function(e,t){const i=[];return n(new class extends s{visit(e,n){const s=function e(t){const n=t.sourceSpan.start.offset;let s=t.sourceSpan.end.offset;return t instanceof r&&(t.endSourceSpan?s=t.endSourceSpan.end.offset:t.children&&t.children.length&&(s=e(t.children[t.children.length-1]).end)),{start:n,end:s}}(e);if(!(s.start<=t&&t<s.end))return!0;i.push(e)}},e),new Qn.AstPath(i,t)}})),Jn=H((function(e,t){
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0}),t.assertArrayOfStrings=function(e,t){if(null!=t){if(!Array.isArray(t))throw new Error("Expected '".concat(e,"' to be an array of strings."));for(let r=0;r<t.length;r+=1)if("string"!=typeof t[r])throw new Error("Expected '".concat(e,"' to be an array of strings."))}};const r=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];t.assertInterpolationSymbols=function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected '".concat(e,"' to be an array, [start, end]."));if(null!=t){const e=t[0],n=t[1];r.forEach(t=>{if(t.test(e)||t.test(n))throw new Error("['".concat(e,"', '").concat(n,"'] contains unusable interpolation symbol."))})}}})),Zn=H((function(e,t){
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(Jn.assertInterpolationSymbols("interpolation",e),new r(e[0],e[1])):t.DEFAULT_INTERPOLATION_CONFIG}}t.InterpolationConfig=r,t.DEFAULT_INTERPOLATION_CONFIG=new r("{{","}}")})),Kn=H((function(e,t){
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0});const r=Vn;var n;!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_QUOTE=12]="ATTR_QUOTE",e[e.ATTR_VALUE=13]="ATTR_VALUE",e[e.DOC_TYPE_START=14]="DOC_TYPE_START",e[e.DOC_TYPE_END=15]="DOC_TYPE_END",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(n=t.TokenType||(t.TokenType={}));class s{constructor(e,t,r){this.type=e,this.parts=t,this.sourceSpan=r}}t.Token=s;class i extends Wn.ParseError{constructor(e,t,r){super(r,e),this.tokenType=t}}t.TokenError=i;class o{constructor(e,t){this.tokens=e,this.errors=t}}t.TokenizeResult=o,t.tokenize=function(e,t,r,n={}){return new p(new Wn.ParseSourceFile(e,t),r,n).tokenize()};const a=/\r\n?/g;function u(e){const t=e===r.$EOF?"EOF":String.fromCharCode(e);return'Unexpected character "'.concat(t,'"')}function c(e){return'Unknown entity "'.concat(e,'" - use the "&#<decimal>;" or "&#x<hex>;" syntax')}class l{constructor(e){this.error=e}}class p{constructor(e,t,r){this._getTagContentType=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._interpolationConfig=r.interpolationConfig||Zn.DEFAULT_INTERPOLATION_CONFIG,this._leadingTriviaCodePoints=r.leadingTriviaChars&&r.leadingTriviaChars.map(e=>e.codePointAt(0)||0),this._canSelfClose=r.canSelfClose||!1,this._allowHtmComponentClosingTags=r.allowHtmComponentClosingTags||!1;const n=r.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=r.escapedString?new E(e,n):new g(e,n);try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return e.replace(a,"\n")}tokenize(){for(;this._cursor.peek()!==r.$EOF;){const e=this._cursor.clone();try{if(this._attemptCharCode(r.$LT))if(this._attemptCharCode(r.$BANG))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(r.$SLASH))this._consumeTagClose(e);else{const t=this._cursor.clone();this._attemptCharCode(r.$QUESTION)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}return this._beginToken(n.EOF),this._endToken([]),new o(function(e){const t=[];let r=void 0;for(let s=0;s<e.length;s++){const i=e[s];r&&r.type==n.TEXT&&i.type==n.TEXT?(r.parts[0]+=i.parts[0],r.sourceSpan.end=i.sourceSpan.end):(r=i,t.push(r))}return t}(this.tokens),this.errors)}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(((e=this._cursor.peek())===r.$EQ||r.isAsciiLetter(e)||r.isDigit(e))&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;var e;if(this._cursor.peek()===r.$RBRACE){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t=this._cursor.clone()){if(null===this._currentTokenStart)throw new i("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new i("Programming error - attempted to end a token which has n
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0});class r extends Wn.ParseError{constructor(e,t,r){super(t,r),this.elementName=e}static create(e,t,n){return new r(e,t,n)}}t.TreeError=r;class n{constructor(e,t){this.rootNodes=e,this.errors=t}}t.ParseTreeResult=n;t.Parser=class{constructor(e){this.getTagDefinition=e}parse(e,t,r,i=!1,o){const a=e=>(t,...r)=>e(t.toLowerCase(),...r),u=i?this.getTagDefinition:a(this.getTagDefinition),c=e=>u(e).contentType,l=i?o:a(o),p=o?(e,t,r,n)=>{const s=l(e,t,r,n);return void 0!==s?s:c(e)}:c,h=Kn.tokenize(e,t,p,r),D=r&&r.canSelfClose||!1,d=r&&r.allowHtmComponentClosingTags||!1,f=new s(h.tokens,u,D,d,i).build();return new n(f.rootNodes,h.errors.concat(f.errors))}};class s{constructor(e,t,r,n,s){this.tokens=e,this.getTagDefinition=t,this.canSelfClose=r,this.allowHtmComponentClosingTags=n,this.isTagNameCaseSensitive=s,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}build(){for(;this._peek.type!==Kn.TokenType.EOF;)this._peek.type===Kn.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===Kn.TokenType.TAG_CLOSE?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===Kn.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Kn.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Kn.TokenType.TEXT||this._peek.type===Kn.TokenType.RAW_TEXT||this._peek.type===Kn.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Kn.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===Kn.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new n(this._rootNodes,this._errors)}_advance(){const e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){const t=this._advance(),r=this._getText(t),n=this._advanceIf(Kn.TokenType.CDATA_END);this._addToParent(new Yn.CDATA(r,new Wn.ParseSourceSpan(e.sourceSpan.start,(n||t).sourceSpan.end)))}_consumeComment(e){const t=this._advanceIf(Kn.TokenType.RAW_TEXT),r=this._advanceIf(Kn.TokenType.COMMENT_END),n=null!=t?t.parts[0].trim():null,s=new Wn.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new Yn.Comment(n,s))}_consumeDocType(e){const t=this._advanceIf(Kn.TokenType.RAW_TEXT),r=this._advanceIf(Kn.TokenType.DOC_TYPE_END),n=null!=t?t.parts[0].trim():null,s=new Wn.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new Yn.DocType(n,s))}_consumeExpansion(e){const t=this._advance(),n=this._advance(),s=[];for(;this._peek.type===Kn.TokenType.EXPANSION_CASE_VALUE;){const e=this._parseExpansionCase();if(!e)return;s.push(e)}if(this._peek.type!==Kn.TokenType.EXPANSION_FORM_END)return void this._errors.push(r.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));const i=new Wn.ParseSourceSpan(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new Yn.Expansion(t.parts[0],n.parts[0],s,i,t.sourceSpan)),this._advance()}_parseExpansionCase(){const e=this._advance();if(this._peek.type!==Kn.TokenType.EXPANSION_CASE_EXP_START)return this._errors.push(r.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;const t=this._advance(),n=this._collectExpansionExpTokens(t);if(!n)return null;const i=this._advance();n.push(new Kn.Token(Kn.TokenType.EOF,[],i.sourceSpan));const o=new s(n,this.getTagDefinition,this.canSelfClose,this.allowHtmComponentClosingTags,this.isTagNameCaseSensitive).build();if(o.errors.length>0)return this._errors=this._errors.concat(o.errors),null;const a=new Wn.ParseSourceSpan(e.sourceSpan.start,i.sourceSpan.end),u=new Wn.ParseSourceSpan(t.sourceSpan.start,i.sourceSpan.end);return new Yn.ExpansionCase(e.parts[0],o.rootNodes,a,e.sourceSpan,u)}_collectExpansionExpTokens(e){const t=[],n=[Kn.TokenType.EXPANSION_CASE_EXP_START];for(;;){if(this
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
2020-08-27 08:23:33 +00:00
Object.defineProperty(t,"__esModule",{value:!0});var r=es;t.ParseTreeResult=r.ParseTreeResult,t.TreeError=r.TreeError;class n extends es.Parser{constructor(){super(Gn.getHtmlTagDefinition)}parse(e,t,r,n=!1,s){return super.parse(e,t,r,n,s)}}t.HtmlParser=n})),rs=H((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TagContentType=jn.TagContentType;let r=null;t.parse=function(e,t={}){const{canSelfClose:n=!1,allowHtmComponentClosingTags:s=!1,isTagNameCaseSensitive:i=!1,getTagContentType:o}=t;return(r||(r=new ts.HtmlParser),r).parse(e,"angular-html-parser",{tokenizeExpansionForms:!1,interpolationConfig:void 0,canSelfClose:n,allowHtmComponentClosingTags:s},i,o)}}));const{parse:ns}=St,{getParserName:ss}=Qe,{HTML_ELEMENT_ATTRIBUTES:is,HTML_TAGS:os,isUnknownNamespace:as}=Rn,{hasPragma:us}=Pn,{Node:cs}=$n,{parseIeConditionalComment:ls}=Un;function ps(e,{recognizeSelfClosing:t,normalizeTagName:r,normalizeAttributeName:n,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:i,getTagContentType:o},a){const u=rs,{RecursiveVisitor:c,visitAll:l,Attribute:p,CDATA:h,Comment:D,DocType:d,Element:f,Text:m}=Yn,{ParseSourceSpan:g}=Wn,{getHtmlTagDefinition:E}=Gn;let{rootNodes:C,errors:y}=u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:i,getTagContentType:o});const b="vue"===a.parser&&C.some(e=>e instanceof d&&"html"===e.value||e instanceof f&&"html"===e.name.toLowerCase());if("vue"!==a.parser||b){if(b){t=!0,r=!0,n=!0,s=!0,i=!1;const o=u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:i});C=o.rootNodes,y=o.errors}}else{const r=e=>{if(!e)return!1;if("template"!==e.name)return!1;const t=e.attrs.find(e=>"lang"===e.name),r=t&&t.value;return null==r||"html"===ss(r,a)};if(C.some(r)){let n;const o=()=>u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:i}),a=()=>n||(n=o()),c=e=>a().rootNodes.find(({startSourceSpan:t})=>t&&t.start.offset===e.startSourceSpan.start.offset);for(let e=0;e<C.length;e++){const t=C[e],{endSourceSpan:n,startSourceSpan:s}=t;if(null===n){y=a().errors,C[e]=c(t)||t}else if(r(t)){const r=a(),i=s.end.offset,o=n.start.offset;for(const e of r.errors){const{offset:t}=e.span.start;if(i<t&&t<o){y=[e];break}}C[e]=c(t)||t}}}}if(0!==y.length){const{msg:e,span:t}=y[0],{line:r,col:n}=t.start;throw Ft(e,{start:{line:r+1,column:n+1}})}const T=e=>{const t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,r=e.nameSpan.toString(),n=r.startsWith("".concat(t,":")),s=n?r.slice(t.length+1):r;e.name=s,e.namespace=t,e.hasExplicitNamespace=n},_=(e,t)=>{const r=e.toLowerCase();return t(r)?r:e};return l(new class extends c{visit(e){(e=>{if(e instanceof p)e.type="attribute";else if(e instanceof h)e.type="cdata";else if(e instanceof D)e.type="comment";else if(e instanceof d)e.type="docType";else if(e instanceof f)e.type="element";else{if(!(e instanceof m))throw new Error("Unexpected node ".concat(JSON.stringify(e)));e.type="text"}})(e),(e=>{e instanceof f?(T(e),e.attrs.forEach(e=>{T(e),e.valueSpan?(e.value=e.valueSpan.toString(),/["']/.test(e.value[0])&&(e.value=e.value.slice(1,-1))):e.value=null})):e instanceof D?e.value=e.sourceSpan.toString().slice("\x3c!--".length,-"--\x3e".length):e instanceof m&&(e.value=e.sourceSpan.toString())})(e),(e=>{if(e instanceof f){const t=E(i?e.name:e.name.toLowerCase());!e.namespace||e.namespace===t.implicitNamespacePrefix||as(e)?e.tagDefinition=t:e.tagDefinition=E("")}})(e),(e=>{if(e instanceof f&&(!r||e.namespace&&e.namespace!==e.tagDefinition.implicitNamespacePrefix&&!as(e)||(e.name=_(e.name,e=>e in os)),n)){const t=is[e.name]||Object.create(null);e.attrs.forEach(r=>{r.namespace||(r.name=_(r.name,r=>e.name in is&&(r in is["*"]||r in t)))})}})(e),(e=>{e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new g(e.sourceSpan.start,e.endSourceSpan.end))})(e)}},C),C}function hs(e){return e.sourceSpan.start.offset}function Ds(e){return e.sourceSpan.end.offset}function ds({recognizeSelfClosing:e=!1,normalizeTagName:t=!1,normalizeAttributeName:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:s=!1,getTagContentType:i