|
|
|
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.html={}))}(this,(function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t,r){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var p=/[|\\{}()[\]^$+*?.]/g,h=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(p,"\\$&")},d={"---":"yaml","+++":"toml"};var f=function(e){var t=Object.keys(d).map(h).join("|"),r=e.match(new RegExp("^(".concat(t,")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===r)return{frontMatter:null,content:e};var n=r[0].replace(/\n$/,""),i=r[1],a=r[2];return{frontMatter:{type:d[i],value:a,raw:n},content:r[0].replace(/[^\n]/g," ")+e.slice(r[0].length)}},m={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"none",rp:"none",script:"block",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",fieldset:"block",button:"inline-block",video:"inline-block",audio:"inline-block"},g="inline",v={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},y="normal",_=Object.freeze({__proto__:null,default:["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound"
|
|
|
|
|
/**
|
|
|
|
|
* @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
|
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
|
*/
|
|
|
|
|
Object.defineProperty(t,"__esModule",{value:!0});var n,a,o=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.closedByChildren,a=n.requiredParents,o=n.implicitNamespacePrefix,s=n.contentType,l=void 0===s?Pt.TagContentType.PARSABLE_DATA:s,c=n.closedByParent,u=void 0!==c&&c,p=n.isVoid,h=void 0!==p&&p,d=n.ignoreFirstLf,f=void 0!==d&&d;r(this,e),this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,i&&i.length>0&&i.forEach((function(e){return t.closedByChildren[e]=!0})),this.isVoid=h,this.closedByParent=u||h,a&&a.length>0&&(this.requiredParents={},this.parentToAdd=a[0],a.forEach((function(e){return t.requiredParents[e]=!0}))),this.implicitNamespacePrefix=o||null,this.contentType=l,this.ignoreFirstLf=f}return i(e,[{key:"requireExtraParent",value:function(e){if(!this.requiredParents)return!1;if(!e)return!0;var t=e.toLowerCase();return!("template"===t||"ng-template"===e)&&1!=this.requiredParents[t]}},{key:"isClosedByChild",value:function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}]),e}();t.HtmlTagDefinition=o,t.getHtmlTagDefinition=function(e){return a||(n=new o,a={base:new o({isVoid:!0}),meta:new o({isVoid:!0}),area:new o({isVoid:!0}),embed:new o({isVoid:!0}),link:new o({isVoid:!0}),img:new o({isVoid:!0}),input:new o({isVoid:!0}),param:new o({isVoid:!0}),hr:new o({isVoid:!0}),br:new o({isVoid:!0}),source:new o({isVoid:!0}),track:new o({isVoid:!0}),wbr:new o({isVoid:!0}),p:new o({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 o({closedByChildren:["tbody","tfoot"]}),tbody:new o({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new o({closedByChildren:["tbody"],closedByParent:!0}),tr:new o({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new o({closedByChildren:["td","th"],closedByParent:!0}),th:new o({closedByChildren:["td","th"],closedByParent:!0}),col:new o({requiredParents:["colgroup"],isVoid:!0}),svg:new o({implicitNamespacePrefix:"svg"}),math:new o({implicitNamespacePrefix:"math"}),li:new o({closedByChildren:["li"],closedByParent:!0}),dt:new o({closedByChildren:["dt","dd"]}),dd:new o({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new o({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new o({closedByChildren:["optgroup"],closedByParent:!0}),option:new o({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new o({ignoreFirstLf:!0}),listing:new o({ignoreFirstLf:!0}),style:new o({contentType:Pt.TagContentType.RAW_TEXT}),script:new o({contentType:Pt.TagContentType.RAW_TEXT}),title:new o({contentType:Pt.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new o({contentType:Pt.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),a[e]||n}}));ze(Dt);Dt.HtmlTagDefinition,Dt.getHtmlTagDefinition;var Ot=We((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
|
|
|
|
|
*/
|
|
|
|
|
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(var r=0;r<t.length;r+=1)if("string"!=typeof t[r])throw new Error("Expected '".concat(e,"' to be an array of strings."))}};var 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){var n=t[0],i=t[1];r.forEach((function(e){if(e.test(n)||e.test(i))throw new Error("['".concat(n,"', '").concat(i,"'] contains unusable interpolation symbol."))}))}}}));ze(Ot);Ot.assertArrayOfStrings,Ot.assertInterpolationSymbols;var Lt=We((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
|
|
|
|
|
*/
|
|
|
|
|
Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n){r(this,e),this.start=t,this.end=n}return i(e,null,[{key:"fromArray",value:function(r){return r?(Ot.assertInterpolationSymbols("interpolation",r),new e(r[0],r[1])):t.DEFAULT_INTERPOLATION_CONFIG}}]),e}();t.InterpolationConfig=n,t.DEFAULT_INTERPOLATION_CONFIG=new n("{{","}}")}));ze(Lt);Lt.InterpolationConfig,Lt.DEFAULT_INTERPOLATION_CONFIG;var qt=We((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
|
|
|
|
|
*/
|
|
|
|
|
Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,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.$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.$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)}}));ze(qt);qt.$EOF,qt.$TAB,qt.$LF,qt.$VTAB,qt.$FF,qt.$CR,qt.$SPACE,qt.$BANG,qt.$DQ,qt.$HASH,qt.$$,qt.$PERCENT,qt.$AMPERSAND,qt.$SQ,qt.$LPAREN,qt.$RPAREN,qt.$STAR,qt.$PLUS,qt.$COMMA,qt.$MINUS,qt.$PERIOD,qt.$SLASH,qt.$COLON,qt.$SEMICOLON,qt.$LT,qt.$EQ,qt.$GT,qt.$QUESTION,qt.$0,qt.$9,qt.$A,qt.$E,qt.$F,qt.$X,qt.$Z,qt.$LBRACKET,qt.$BACKSLASH,qt.$RBRACKET,qt.$CARET,qt.$_,qt.$a,qt.$e,qt.$f,qt.$n,qt.$r,qt.$t,qt.$u,qt.$v,qt.$x,qt.$z,qt.$LBRACE,qt.$BAR,qt.$RBRACE,qt.$NBSP,qt.$PIPE,qt.$TILDA,qt.$AT,qt.$BT,qt.isWhitespace,qt.isDigit,qt.isAsciiLetter,qt.isAsciiHexDigit;var Rt=We((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
|
|
|
|
|
*/
|
|
|
|
|
Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n,i){r(this,e),this.filePath=t,this.name=n,this.members=i}return i(e,[{key:"assertNoMembers",value:function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this),"."))}}]),e}();t.StaticSymbol=n;var a=function(){function e(){r(this,e),this.cache=new Map}return i(e,[{key:"get",value:function(e,t,r){var i=(r=r||[]).length?".".concat(r.join(".")):"",a='"'.concat(e,'".').concat(t).concat(i),o=this.cache.get(a);return o||(o=new n(e,t,r),this.cache.set(a,o)),o}}]),e}();t.StaticSymbolCache=a}));ze(Rt);Rt.StaticSymbol,Rt.StaticSymbolCache;var $t=We((function(e,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
|
|
|
|
|
*/
|
|
|
|
|
Object.defineProperty(n,"__esModule",{value:!0});var a=/-+([a-z0-9])/g;function o(e,t,r){var n=e.indexOf(t);return-1==n?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function s(e,r,n){return Array.isArray(e)?r.visitArray(e,n):"object"===t(i=e)&&null!==i&&Object.getPrototypeOf(i)===p?r.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?r.visitPrimitive(e,n):r.visitOther(e,n);var i}n.dashCaseToCamelCase=function(e){return e.replace(a,(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t[1].toUpperCase()}))},n.splitAtColon=function(e,t){return o(e,":",t)},n.splitAtPeriod=function(e,t){return o(e,".",t)},n.visitValue=s,n.isDefined=function(e){return null!=e},n.noUndefined=function(e){return void 0===e?null:e};var l=function(){function e(){r(this,e)}return i(e,[{key:"visitArray",value:function(e,t){var r=this;return e.map((function(e){return s(e,r,t)}))}},{key:"visitStringMap",value:function(e,t){var r=this,n={};return Object.keys(e).forEach((function(i){n[i]=s(e[i],r,t)})),n}},{key:"visitPrimitive",value:function(e,t){return e}},{key:"visitOther",value:function(e,t){return e}}]),e}();n.ValueTransformer=l,n.SyncAsync={assertSync:function(e){if(h(e))throw new Error("Illegal state: value cannot be a promise");return e},then:function(e,t){return h(e)?e.then(t):t(e)},all:function(e){return e.some(h)?Promise.all(e):e}},n.error=function(e){throw new Error("Internal Error: ".concat(e))},n.syntaxError=function(e,t){var r=Error(e);return r[c]=!0,t&&(r[u]=t),r};var c="ngSyntaxError",u="ngParseErrors";n.isSyntaxError=function(e){return e[c]},n.getParseErrors=function(e){return e[u]||[]},n.escapeRegExp=function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var p=Object.getPrototypeOf({});function h(e){return!!e&&"function"==typeof e.then}n.utf8Encode=function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n>=55296&&n<=56319&&e.length>r+1){var i=e.charCodeAt(r+1);i>=56320&&i<=57343&&(r++,n=(n-55296<<10)+i-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},n.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);var r=t.toString();if(null==r)return""+r;var n=r.indexOf("\n");return-1===n?r:r.substring(0,n)},n.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},n.isPromise=h;n.Version=function e(t){r(this,e),this.full=t;var n=t.split(".");this.major=n[0],this.minor=n[1],this.patch=n.slice(2).join(".")}}));ze($t);$t.dashCaseToCamelCase,$t.splitAtColon,$t.splitAtPeriod,$t.visitValue,$t.isDefined,$t.noUndefined,$t.ValueTransformer,$t.SyncAsync,$t.error,$t.syntaxError,$t.isSyntaxError,$t.getParseErrors,$t.escapeRegExp,$t.utf8Encode,$t.stringify,$t.resolveForwardRef,$t.isPromise,$t.Version;var It=We((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
|
|
|
|
|
*/
|
|
|
|
|
Object.defineProperty(t,"__esModule",{value:!0});var n=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function a(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=a;var o,s=0;function l(e){if(!e||!e.reference)return null;var t=e.reference;if(t instanceof Rt.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;var r=$t.stringify(t);return r.indexOf("(")>=0?(r="anonymous_".concat(s++),t.__anonymousType=r):r=a(r),r}t.identifierName=l,t.identifierModuleUrl=function(e){var t=e.reference;return t instanceof Rt.StaticSymbol?t.filePath:"./".concat($t.stringify(t))},t.viewClassName=function(e,t){return"View_".concat(l({reference:e}),"_").concat(t)},t.rendererTypeName=function(e){return"RenderType_".concat(l({reference:e}))},t.hostViewClassName=function(e){return"HostView_".concat(l({reference:e}))},t.componentFactoryName=function(e){return"".concat(l({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?a(e.value):l(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};t.CompileStylesheetMetadata=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.moduleUrl,i=t.styles,a=t.styleUrls;r(this,e),this.moduleUrl=n||null,this.styles=f(i),this.styleUrls=f(a)};var c=function(){function e(t){var n=t.encapsulation,i=t.template,a=t.templateUrl,o=t.htmlAst,s=t.styles,l=t.styleUrls,c=t.externalStylesheets,u=t.animations,p=t.ngContentSelectors,h=t.interpolation,d=t.isInline,g=t.preserveWhitespaces;if(r(this,e),this.encapsulation=n,this.template=i,this.templateUrl=a,this.htmlAst=o,this.styles=f(s),this.styleUrls=f(l),this.externalStylesheets=f(c),this.animations=u?m(u):[],this.ngContentSelectors=p||[],h&&2!=h.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=h,this.isInline=d,this.preserveWhitespaces=g}return i(e,[{key:"toSummary",value:function(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}}]),e}();t.CompileTemplateMetadata=c;var u=function(){function e(t){var n=t.isHost,i=t.type,a=t.isComponent,o=t.selector,s=t.exportAs,l=t.changeDetection,c=t.inputs,u=t.outputs,p=t.hostListeners,h=t.hostProperties,d=t.hostAttributes,m=t.providers,g=t.viewProviders,v=t.queries,y=t.guards,_=t.viewQueries,T=t.entryComponents,b=t.template,S=t.componentViewType,C=t.rendererType,E=t.componentFactory;r(this,e),this.isHost=!!n,this.type=i,this.isComponent=a,this.selector=o,this.exportAs=s,this.changeDetection=l,this.inputs=c,this.outputs=u,this.hostListeners=p,this.hostProperties=h,this.hostAttributes=d,this.providers=f(m),this.viewProviders=f(g),this.queries=f(v),this.guards=y,this.viewQueries=f(_),this.entryComponents=f(T),this.template=b,this.componentViewType=S,this.rendererType=C,this.componentFactory=E}return i(e,null,[{key:"create",value:function(t){var r=t.isHost,i=t.type,a=t.isComponent,o=t.selector,s=t.exportAs,l=t.changeDetection,c=t.inputs,u=t.outputs,p=t.host,h=t.providers,d=t.viewProviders,f=t.queries,m=t.guards,g=t.viewQueries,v=t.entryComponents,y=t.template,_=t.componentViewType,T=t.rendererType,b=t.componentFactory,S={},C={},E={};null!=p&&Object.keys(p).forEach((function(e){var t=p[e],r=e.match(n);null===r?E[e]=t:null!=r[1]?C[r[1]]=t:null!=r[2]&&(S[r[2]]=t)}));var k={};null!=c&&c.forEach((function(e){var t=$t.splitAtColon(e,[e,e]);k[t[0]]=t[1]}));var A={};return null!=u&&u.forEach((function(e){var t=$t.splitAtColon(e,[e,e]);A[t[0]]=t[1]})),new e({isHost:r,type:i,isComponent:!!a,selector:o,exportAs:s,changeDetection:l,inputs:k,outputs:A,hostListeners:S,hostProperties:C,hostAttributes:E,providers:h,viewProviders:d,queries:f,guards:m,viewQueries:g,entryComponents:v,template:y,componentViewType:_,rendererType:T,componentFactory:b})}}]),i(e,[{key:"toSummary",value:function(){return{summaryKind:o.Directive,type:this.type,isComponen
|
|
|
|
|
/**
|
|
|
|
|
* @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
|
|
|
|
|
*/
|
|
|
|
|
var n=function(){function e(t,n,i,a){r(this,e),this.file=t,this.offset=n,this.line=i,this.col=a}return i(e,[{key:"toString",value:function(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}},{key:"moveBy",value:function(t){for(var r=this.file.content,n=r.length,i=this.offset,a=this.line,o=this.col;i>0&&t<0;){if(i--,t++,r.charCodeAt(i)==qt.$LF){a--;var s=r.substr(0,i-1).lastIndexOf(String.fromCharCode(qt.$LF));o=s>0?i-s:i}else o--}for(;i<n&&t>0;){var l=r.charCodeAt(i);i++,t--,l==qt.$LF?(a++,o=0):o++}return new e(this.file,i,a,o)}},{key:"getContext",value:function(e,t){var r=this.file.content,n=this.offset;if(null!=n){n>r.length-1&&(n=r.length-1);for(var i=n,a=0,o=0;a<e&&n>0&&(a++,"\n"!=r[--n]||++o!=t););for(a=0,o=0;a<e&&i<r.length-1&&(a++,"\n"!=r[++i]||++o!=t););return{before:r.substring(n,this.offset),after:r.substring(this.offset,i+1)}}return null}}]),e}();t.ParseLocation=n;var a=function e(t,n){r(this,e),this.content=t,this.url=n};t.ParseSourceFile=a;var o,s=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r(this,e),this.start=t,this.end=n,this.details=i}return i(e,[{key:"toString",value:function(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}]),e}();t.ParseSourceSpan=s,function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(o=t.ParseErrorLevel||(t.ParseErrorLevel={}));var l=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.ERROR;r(this,e),this.span=t,this.msg=n,this.level=i}return i(e,[{key:"contextualMessage",value:function(){var e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(o[this.level]," ->]").concat(e.after,'")'):this.msg}},{key:"toString",value:function(){var e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}}]),e}();t.ParseError=l,t.typeSourceSpan=function(e,t){var r=It.identifierModuleUrl(t),i=null!=r?"in ".concat(e," ").concat(It.identifierName(t)," in ").concat(r):"in ".concat(e," ").concat(It.identifierName(t)),o=new a("",i);return new s(new n(o,-1,-1,-1),new n(o,-1,-1,-1))}}));ze(Mt);Mt.ParseLocation,Mt.ParseSourceFile,Mt.ParseSourceSpan,Mt.ParseErrorLevel,Mt.ParseError,Mt.typeSourceSpan;var Bt=We((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
|
|
|
|
|
*/
|
|
|
|
|
Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;r(this,e),this.path=t,this.position=n}return i(e,[{key:"parentOf",value:function(e){return e&&this.path[this.path.indexOf(e)-1]}},{key:"childOf",value:function(e){return this.path[this.path.indexOf(e)+1]}},{key:"first",value:function(e){for(var t=this.path.length-1;t>=0;t--){var r=this.path[t];if(r instanceof e)return r}}},{key:"push",value:function(e){this.path.push(e)}},{key:"pop",value:function(){return this.path.pop()}},{key:"empty",get:function(){return!this.path||!this.path.length}},{key:"head",get:function(){return this.path[0]}},{key:"tail",get:function(){return this.path[this.path.length-1]}}]),e}();t.AstPath=n}));ze(Bt);Bt.AstPath;var Ut=We((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
|
|
|
|
|
*/
|
|
|
|
|
Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitText(this,t)}}]),e}();t.Text=n;var s=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitCdata(this,t)}}]),e}();t.CDATA=s;var c=function(){function e(t,n,i,a,o){r(this,e),this.switchValue=t,this.type=n,this.cases=i,this.sourceSpan=a,this.switchValueSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansion(this,t)}}]),e}();t.Expansion=c;var u=function(){function e(t,n,i,a,o){r(this,e),this.value=t,this.expression=n,this.sourceSpan=i,this.valueSourceSpan=a,this.expSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansionCase(this,t)}}]),e}();t.ExpansionCase=u;var p=function(){function e(t,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;r(this,e),this.name=t,this.value=n,this.sourceSpan=i,this.valueSpan=a,this.nameSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitAttribute(this,t)}}]),e}();t.Attribute=p;var h=function(){function e(t,n,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;r(this,e),this.name=t,this.attrs=n,this.children=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=s,this.nameSpan=l}return i(e,[{key:"visit",value:function(e,t){return e.visitElement(this,t)}}]),e}();t.Element=h;var d=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitComment(this,t)}}]),e}();t.Comment=d;var f=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitDocType(this,t)}}]),e}();function m(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=[],i=e.visit?function(t){return e.visit(t,r)||t.visit(e,r)}:function(t){return t.visit(e,r)};return t.forEach((function(e){var t=i(e);t&&n.push(t)})),n}t.DocType=f,t.visitAll=m;var g=function(){function e(){r(this,e)}return i(e,[{key:"visitElement",value:function(e,t){this.visitChildren(t,(function(t){t(e.attrs),t(e.children)}))}},{key:"visitAttribute",value:function(e,t){}},{key:"visitText",value:function(e,t){}},{key:"visitCdata",value:function(e,t){}},{key:"visitComment",value:function(e,t){}},{key:"visitDocType",value:function(e,t){}},{key:"visitExpansion",value:function(e,t){return this.visitChildren(t,(function(t){t(e.cases)}))}},{key:"visitExpansionCase",value:function(e,t){}},{key:"visitChildren",value:function(e,t){var r=[],n=this;return t((function(t){t&&r.push(m(n,t,e))})),[].concat.apply([],r)}}]),e}();t.RecursiveVisitor=g,t.findNode=function(e,t){var n=[];return m(new(function(e){function s(){return r(this,s),l(this,o(s).apply(this,arguments))}return a(s,e),i(s,[{key:"visit",value:function(e,r){var i=function e(t){var r=t.sourceSpan.start.offset,n=t.sourceSpan.end.offset;return t instanceof h&&(t.endSourceSpan?n=t.endSourceSpan.end.offset:t.children&&t.children.length&&(n=e(t.children[t.children.length-1]).end)),{start:r,end:n}}(e);if(!(i.start<=t&&t<i.end))return!0;n.push(e)}}]),s}(g)),e),new Bt.AstPath(n,t)}}));ze(Ut);Ut.Text,Ut.CDATA,Ut.Expansion,Ut.ExpansionCase,Ut.Attribute,Ut.Element,Ut.Comment,Ut.DocType,Ut.visitAll,Ut.RecursiveVisitor,Ut.findNode;var Ft=We((function(e,t){var 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
|
|
|
|
|
*/
|
|
|
|
|
Object.defineProperty(t,"__esModule",{value:!0}),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_VALUE=12]="ATTR_VALUE",e[e.DOC_TYPE_START=13]="DOC_TYPE_START",e[e.DOC_TYPE_END=14]="DOC_TYPE_END",e[e.EXPANSION_FORM_START=15]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=16]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=17]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=18]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=19]="EXPANSION_FORM_END",e[e.EOF=20]="EOF"}(n=t.TokenType||(t.TokenType={}));var s=function e(t,n,i){r(this,e),this.type=t,this.parts=n,this.sourceSpan=i};t.Token=s;var c=function(e){function t(e,n,i){var a;return r(this,t),(a=l(this,o(t).call(this,i,e))).tokenType=n,a}return a(t,e),t}(Mt.ParseError);t.TokenError=c;var u=function e(t,n){r(this,e),this.tokens=t,this.errors=n};t.TokenizeResult=u,t.tokenize=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Lt.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return new m(new Mt.ParseSourceFile(e,t),r,n,i,a,o).tokenize()};var p=/\r\n?/g;function h(e){var t=e===qt.$EOF?"EOF":String.fromCharCode(e);return'Unexpected character "'.concat(t,'"')}function d(e){return'Unknown entity "'.concat(e,'" - use the "&#<decimal>;" or "&#x<hex>;" syntax')}var f=function e(t){r(this,e),this.error=t},m=function(){function e(t,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Lt.DEFAULT_INTERPOLATION_CONFIG,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];r(this,e),this._file=t,this._getTagDefinition=n,this._tokenizeIcu=i,this._interpolationConfig=a,this.canSelfClose=o,this.allowHtmComponentClosingTags=s,this._peek=-1,this._nextPeek=-1,this._index=-1,this._line=0,this._column=-1,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._input=t.content,this._length=t.content.length,this._advance()}return i(e,[{key:"_processCarriageReturns",value:function(e){return e.replace(p,"\n")}},{key:"tokenize",value:function(){for(;this._peek!==qt.$EOF;){var e=this._getLocation();try{if(this._attemptCharCode(qt.$LT))if(this._attemptCharCode(qt.$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(qt.$SLASH))this._consumeTagClose(e);else{var t=this._savePosition();this._attemptCharCode(qt.$QUESTION)?(this._restorePosition(t),this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){if(!(e instanceof f))throw e;this.errors.push(e.error)}}return this._beginToken(n.EOF),this._endToken([]),new u(function(e){for(var t=[],r=void 0,i=0;i<e.length;i++){var a=e[i];r&&r.type==n.TEXT&&a.type==n.TEXT?(r.parts[0]+=a.parts[0],r.sourceSpan.end=a.sourceSpan.end):(r=a,t.push(r))}return t}(this.tokens),this.errors)}},{key:"_tokenizeExpansionForm",value:function(){if(T(this._input,this._index,this._interpolationConfig))return this._consumeExpansionFormStart(),!0;if(((e=this._peek)===qt.$EQ||qt.isAsciiLetter(e)||qt.isDigit(e))&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;var e;if(this._peek===qt.$RBRACE){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}},{key:"_getLocation",value:function(){return new Mt.ParseLocation(this._file,this._index,this._line,this._co
|
|
|
|
|
/**
|
|
|
|
|
* @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
|
|
|
|
|
*/
|
|
|
|
|
Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(e,n,i){var a;return r(this,t),(a=l(this,o(t).call(this,n,i))).elementName=e,a}return a(t,e),i(t,null,[{key:"create",value:function(e,r,n){return new t(e,r,n)}}]),t}(Mt.ParseError);t.TreeError=n;var s=function e(t,n){r(this,e),this.rootNodes=t,this.errors=n};t.ParseTreeResult=s;var c=function(){function e(t){r(this,e),this.getTagDefinition=t}return i(e,[{key:"parse",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Lt.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6&&void 0!==arguments[6]&&arguments[6],c=l?this.getTagDefinition:function(e){return r.getTagDefinition(e.toLowerCase())},p=Ft.tokenize(e,t,c,n,i,a,o),h=new u(p.tokens,c,a,o,l).build();return new s(h.rootNodes,p.errors.concat(h.errors))}}]),e}();t.Parser=c;var u=function(){function e(t,n,i,a,o){r(this,e),this.tokens=t,this.getTagDefinition=n,this.canSelfClose=i,this.allowHtmComponentClosingTags=a,this.isTagNameCaseSensitive=o,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return i(e,[{key:"build",value:function(){for(;this._peek.type!==Ft.TokenType.EOF;)this._peek.type===Ft.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===Ft.TokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Ft.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Ft.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Ft.TokenType.TEXT||this._peek.type===Ft.TokenType.RAW_TEXT||this._peek.type===Ft.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Ft.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===Ft.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new s(this._rootNodes,this._errors)}},{key:"_advance",value:function(){var e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}},{key:"_advanceIf",value:function(e){return this._peek.type===e?this._advance():null}},{key:"_consumeCdata",value:function(e){var t=this._advance(),r=this._getText(t),n=this._advanceIf(Ft.TokenType.CDATA_END);this._addToParent(new Ut.CDATA(r,new Mt.ParseSourceSpan(e.sourceSpan.start,(n||t).sourceSpan.end)))}},{key:"_consumeComment",value:function(e){var t=this._advanceIf(Ft.TokenType.RAW_TEXT),r=this._advanceIf(Ft.TokenType.COMMENT_END),n=null!=t?t.parts[0].trim():null,i=new Mt.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new Ut.Comment(n,i))}},{key:"_consumeDocType",value:function(e){var t=this._advanceIf(Ft.TokenType.RAW_TEXT),r=this._advanceIf(Ft.TokenType.DOC_TYPE_END),n=null!=t?t.parts[0].trim():null,i=new Mt.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new Ut.DocType(n,i))}},{key:"_consumeExpansion",value:function(e){for(var t=this._advance(),r=this._advance(),i=[];this._peek.type===Ft.TokenType.EXPANSION_CASE_VALUE;){var a=this._parseExpansionCase();if(!a)return;i.push(a)}if(this._peek.type===Ft.TokenType.EXPANSION_FORM_END){var o=new Mt.ParseSourceSpan(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new Ut.Expansion(t.parts[0],r.parts[0],i,o,t.sourceSpan)),this._advance()}else this._errors.push(n.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."))}},{key:"_parseExpansionCase",value:function(){var t=this._advance();if(this._peek.type!==Ft.TokenType.EXPANSION_CASE_EXP_START)return this._errors.push(n.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;var r=this._advance(),i=this._collectExpansionExpTokens(r);if(!i)return null;var a=this._advance();i.push(new Ft.Token(Ft.TokenType.EOF,[],a.sourceSpan));var o=new e(i,this.ge
|
|
|
|
|
/**
|
|
|
|
|
* @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
|
|
|
|
|
*/
|
|
|
|
|
Object.defineProperty(t,"__esModule",{value:!0});var n=Vt;t.ParseTreeResult=n.ParseTreeResult,t.TreeError=n.TreeError;var s=function(e){function t(){return r(this,t),l(this,o(t).call(this,Dt.getHtmlTagDefinition))}return a(t,e),i(t,[{key:"parse",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Lt.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return c(o(t.prototype),"parse",this).call(this,e,r,n,i,a,s,l)}}]),t}(Vt.Parser);t.HtmlParser=s}));ze(jt);jt.ParseTreeResult,jt.TreeError,jt.HtmlParser;var Gt=We((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=null,n=function(){return r||(r=new jt.HtmlParser),r};t.parse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.canSelfClose,i=void 0!==r&&r,a=t.allowHtmComponentClosingTags,o=void 0!==a&&a,s=t.isTagNameCaseSensitive,l=void 0!==s&&s;return n().parse(e,"angular-html-parser",!1,void 0,i,o,l)}}));ze(Gt);Gt.parse;var Ht=_t.HTML_ELEMENT_ATTRIBUTES,Xt=_t.HTML_TAGS,zt=Tt,Wt=wt.Node,Qt=xt;function Jt(e,t){var n=t.recognizeSelfClosing,s=t.normalizeTagName,c=t.normalizeAttributeName,u=t.allowHtmComponentClosingTags,p=t.isTagNameCaseSensitive,h=Gt,d=Ut.RecursiveVisitor,f=Ut.visitAll,m=Ut.Attribute,g=Ut.CDATA,v=Ut.Comment,y=Ut.DocType,_=Ut.Element,T=Ut.Text,b=Mt.ParseSourceSpan,S=Dt.getHtmlTagDefinition,C=h.parse(e,{canSelfClose:n,allowHtmComponentClosingTags:u,isTagNameCaseSensitive:p}),E=C.rootNodes,k=C.errors;if(0!==k.length){var A=k[0],w=A.msg,N=A.span.start,x=N.line,P=N.col;throw bt(w,{start:{line:x+1,column:P+1}})}var D=function(e){var t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,r=e.nameSpan?e.nameSpan.toString():e.name,n=r.startsWith("".concat(t,":")),i=n?r.slice(t.length+1):r;e.name=i,e.namespace=t,e.hasExplicitNamespace=n},O=function(e,t){var r=e.toLowerCase();return t(r)?r:e};return f(new(function(e){function t(){return r(this,t),l(this,o(t).apply(this,arguments))}return a(t,e),i(t,[{key:"visit",value:function(e){!function(e){if(e instanceof m)e.type="attribute";else if(e instanceof g)e.type="cdata";else if(e instanceof v)e.type="comment";else if(e instanceof y)e.type="docType";else if(e instanceof _)e.type="element";else{if(!(e instanceof T))throw new Error("Unexpected node ".concat(JSON.stringify(e)));e.type="text"}}(e),function(e){e instanceof _?(D(e),e.attrs.forEach((function(e){D(e),e.valueSpan?(e.value=e.valueSpan.toString(),/['"]/.test(e.value[0])&&(e.value=e.value.slice(1,-1))):e.value=null}))):e instanceof v?e.value=e.sourceSpan.toString().slice("\x3c!--".length,-"--\x3e".length):e instanceof T&&(e.value=e.sourceSpan.toString())}(e),function(e){if(e instanceof _){var t=S(p?e.name:e.name.toLowerCase());e.namespace&&e.namespace!==t.implicitNamespacePrefix?e.tagDefinition=S(""):e.tagDefinition=t}}(e),function(e){if(e instanceof _&&(!s||e.namespace&&e.namespace!==e.tagDefinition.implicitNamespacePrefix||(e.name=O(e.name,(function(e){return e in Xt}))),c)){var t=Ht[e.name]||Object.create(null);e.attrs.forEach((function(r){r.namespace||(r.name=O(r.name,(function(r){return e.name in Ht&&(r in Ht["*"]||r in t)})))}))}}(e),function(e){e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new b(e.sourceSpan.start,e.endSourceSpan.end))}(e)}}]),t}(d)),E),E}function Kt(e){return e.sourceSpan.start.offset}function Yt(e){return e.sourceSpan.end.offset}function Zt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.recognizeSelfClosing,r=void 0!==t&&t,n=e.normalizeTagName,i=void 0!==n&&n,a=e.normalizeAttributeName,o=void 0!==a&&a,s=e.allowHtmComponentClosingTags,l=void 0!==s&&s,c=e.isTagNameCaseSensitive,u=void 0!==c&&c;return{parse:function(e,t,n){return function e(t,r,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?f(t):{frontMatter:null,content:t},a=i.frontMatter,o=i.content,s={type:"root",sourceSpan:{start:{offset:0},end:{offset:t.length}},child
|