UNPKG

@uiw/react-md-editor

Version:

A markdown editor with preview, implemented with React.js and TypeScript.

2 lines 1.27 MB
/*! For license information please see mdeditor.min.js.LICENSE.txt */ !function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("react")):"function"===typeof define&&define.amd?define(["react"],t):"object"===typeof exports?exports["@uiw/react-md-editor"]=t(require("react")):e["@uiw/react-md-editor"]=t(e.React)}(self,(e=>(()=>{var t={5028:function(e){e.exports=function(){"use strict";function e(e,t){if("undefined"===typeof document)return;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style={position:"absolute",left:"-9999px"},document.body.appendChild(n);const r=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);n.select();let a=!1;try{a=!!document.execCommand("copy")}catch(i){a=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(a)}return e}()},9377:e=>{e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},301:(e,t,n)=>{"use strict";var r=n(8777),a=n(1941),i=function(){function e(){this.pseudos={},this.attrEqualityMods={},this.ruleNestingOperators={},this.substitutesEnabled=!1}return e.prototype.registerSelectorPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var a=r[n];this.pseudos[a]="selector"}return this},e.prototype.unregisterSelectorPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var a=r[n];delete this.pseudos[a]}return this},e.prototype.registerNumericPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var a=r[n];this.pseudos[a]="numeric"}return this},e.prototype.unregisterNumericPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var a=r[n];delete this.pseudos[a]}return this},e.prototype.registerNestingOperators=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var a=r[n];this.ruleNestingOperators[a]=!0}return this},e.prototype.unregisterNestingOperators=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var a=r[n];delete this.ruleNestingOperators[a]}return this},e.prototype.registerAttrEqualityMods=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var a=r[n];this.attrEqualityMods[a]=!0}return this},e.prototype.unregisterAttrEqualityMods=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var a=r[n];delete this.attrEqualityMods[a]}return this},e.prototype.enableSubstitutes=function(){return this.substitutesEnabled=!0,this},e.prototype.disableSubstitutes=function(){return this.substitutesEnabled=!1,this},e.prototype.parse=function(e){return r.parseCssSelector(e,0,this.pseudos,this.attrEqualityMods,this.ruleNestingOperators,this.substitutesEnabled)},e.prototype.render=function(e){return a.renderEntity(e).trim()},e}();t.N=i},8777:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6517);t.parseCssSelector=function(e,t,n,a,i,o){var s=e.length,l="";function c(n,a){var i="";for(t++,l=e.charAt(t);t<s;){if(l===n)return t++,i;if("\\"===l){t++;var o=void 0;if((l=e.charAt(t))===n)i+=n;else if(void 0!==(o=a[l]))i+=o;else{if(r.isHex(l)){var c=l;for(t++,l=e.charAt(t);r.isHex(l);)c+=l,t++,l=e.charAt(t);" "===l&&(t++,l=e.charAt(t)),i+=String.fromCharCode(parseInt(c,16));continue}i+=l}}else i+=l;t++,l=e.charAt(t)}return i}function u(){var n="";for(l=e.charAt(t);t<s;){if(r.isIdent(l))n+=l;else{if("\\"!==l)return n;if(++t>=s)throw Error("Expected symbol but end of file reached.");if(l=e.charAt(t),r.identSpecialChars[l])n+=l;else{if(r.isHex(l)){var a=l;for(t++,l=e.charAt(t);r.isHex(l);)a+=l,t++,l=e.charAt(t);" "===l&&(t++,l=e.charAt(t)),n+=String.fromCharCode(parseInt(a,16));continue}n+=l}}t++,l=e.charAt(t)}return n}function d(){l=e.charAt(t);for(var n=!1;" "===l||"\t"===l||"\n"===l||"\r"===l||"\f"===l;)n=!0,t++,l=e.charAt(t);return n}function p(){var n=m();if(!n)return null;var r=n;for(l=e.charAt(t);","===l;){if(t++,d(),"selectors"!==r.type&&(r={type:"selectors",selectors:[n]}),!(n=m()))throw Error('Rule expected after ",".');r.selectors.push(n)}return r}function m(){d();var n={type:"ruleSet"},r=g();if(!r)return null;for(var a=n;r&&(r.type="rule",a.rule=r,a=r,d(),l=e.charAt(t),!(t>=s||","===l||")"===l));)if(i[l]){var o=l;if(t++,d(),!(r=g()))throw Error('Rule expected after "'+o+'".');r.nestingOperator=o}else(r=g())&&(r.nestingOperator=null);return n}function g(){for(var i=null;t<s;)if("*"===(l=e.charAt(t)))t++,(i=i||{}).tagName="*";else if(r.isIdentStart(l)||"\\"===l)(i=i||{}).tagName=u();else if("."===l)t++,((i=i||{}).classNames=i.classNames||[]).push(u());else if("#"===l)t++,(i=i||{}).id=u();else if("["===l){t++,d();var m={name:u()};if(d(),"]"===l)t++;else{var g="";if(a[l]&&(g=l,t++,l=e.charAt(t)),t>=s)throw Error('Expected "=" but end of file reached.');if("="!==l)throw Error('Expected "=" but "'+l+'" found.');m.operator=g+"=",t++,d();var f="";if(m.valueType="string",'"'===l)f=c('"',r.doubleQuotesEscapeChars);else if("'"===l)f=c("'",r.singleQuoteEscapeChars);else if(o&&"$"===l)t++,f=u(),m.valueType="substitute";else{for(;t<s&&"]"!==l;)f+=l,t++,l=e.charAt(t);f=f.trim()}if(d(),t>=s)throw Error('Expected "]" but end of file reached.');if("]"!==l)throw Error('Expected "]" but "'+l+'" found.');t++,m.value=f}((i=i||{}).attrs=i.attrs||[]).push(m)}else{if(":"!==l)break;t++;var h=u(),E={name:h};if("("===l){t++;var T="";if(d(),"selector"===n[h])E.valueType="selector",T=p();else{if(E.valueType=n[h]||"string",'"'===l)T=c('"',r.doubleQuotesEscapeChars);else if("'"===l)T=c("'",r.singleQuoteEscapeChars);else if(o&&"$"===l)t++,T=u(),E.valueType="substitute";else{for(;t<s&&")"!==l;)T+=l,t++,l=e.charAt(t);T=T.trim()}d()}if(t>=s)throw Error('Expected ")" but end of file reached.');if(")"!==l)throw Error('Expected ")" but "'+l+'" found.');t++,E.value=T}((i=i||{}).pseudos=i.pseudos||[]).push(E)}return i}return function(){var n=p();if(t<s)throw Error('Rule expected but "'+e.charAt(t)+'" found.');return n}()}},1941:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6517);t.renderEntity=function e(t){var n="";switch(t.type){case"ruleSet":for(var a=t.rule,i=[];a;)a.nestingOperator&&i.push(a.nestingOperator),i.push(e(a)),a=a.rule;n=i.join(" ");break;case"selectors":n=t.selectors.map(e).join(", ");break;case"rule":t.tagName&&(n="*"===t.tagName?"*":r.escapeIdentifier(t.tagName)),t.id&&(n+="#"+r.escapeIdentifier(t.id)),t.classNames&&(n+=t.classNames.map((function(e){return"."+r.escapeIdentifier(e)})).join("")),t.attrs&&(n+=t.attrs.map((function(e){return"operator"in e?"substitute"===e.valueType?"["+r.escapeIdentifier(e.name)+e.operator+"$"+e.value+"]":"["+r.escapeIdentifier(e.name)+e.operator+r.escapeStr(e.value)+"]":"["+r.escapeIdentifier(e.name)+"]"})).join("")),t.pseudos&&(n+=t.pseudos.map((function(t){return t.valueType?"selector"===t.valueType?":"+r.escapeIdentifier(t.name)+"("+e(t.value)+")":"substitute"===t.valueType?":"+r.escapeIdentifier(t.name)+"($"+t.value+")":"numeric"===t.valueType?":"+r.escapeIdentifier(t.name)+"("+t.value+")":":"+r.escapeIdentifier(t.name)+"("+r.escapeIdentifier(t.value)+")":":"+r.escapeIdentifier(t.name)})).join(""));break;default:throw Error('Unknown entity type: "'+t.type+'".')}return n}},6517:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIdentStart=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"-"===e||"_"===e},t.isIdent=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"-"===e||"_"===e},t.isHex=function(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"},t.escapeIdentifier=function(e){for(var n=e.length,r="",a=0;a<n;){var i=e.charAt(a);if(t.identSpecialChars[i])r+="\\"+i;else if("_"===i||"-"===i||i>="A"&&i<="Z"||i>="a"&&i<="z"||0!==a&&i>="0"&&i<="9")r+=i;else{var o=i.charCodeAt(0);if(55296===(63488&o)){var s=e.charCodeAt(a++);if(55296!==(64512&o)||56320!==(64512&s))throw Error("UCS-2(decode): illegal sequence");o=((1023&o)<<10)+(1023&s)+65536}r+="\\"+o.toString(16)+" "}a++}return r},t.escapeStr=function(e){for(var n,r=e.length,a="",i=0;i<r;){var o=e.charAt(i);'"'===o?o='\\"':"\\"===o?o="\\\\":void 0!==(n=t.strReplacementsRev[o])&&(o=n),a+=o,i++}return'"'+a+'"'},t.identSpecialChars={"!":!0,'"':!0,"#":!0,$:!0,"%":!0,"&":!0,"'":!0,"(":!0,")":!0,"*":!0,"+":!0,",":!0,".":!0,"/":!0,";":!0,"<":!0,"=":!0,">":!0,"?":!0,"@":!0,"[":!0,"\\":!0,"]":!0,"^":!0,"`":!0,"{":!0,"|":!0,"}":!0,"~":!0},t.strReplacementsRev={"\n":"\\n","\r":"\\r","\t":"\\t","\f":"\\f","\v":"\\v"},t.singleQuoteEscapeChars={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\","'":"'"},t.doubleQuotesEscapeChars={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\",'"':'"'}},229:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},o=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,a=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!i)return!1;for(r in e);return"undefined"===typeof r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(a)return a(e,n).value}return e[n]};e.exports=function e(){var t,n,r,a,c,u,d=arguments[0],p=1,m=arguments.length,g=!1;for("boolean"===typeof d&&(g=d,d=arguments[1]||{},p=2),(null==d||"object"!==typeof d&&"function"!==typeof d)&&(d={});p<m;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(a=l(t,n))&&(g&&a&&(o(a)||(c=i(a)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},s(d,{name:n,newValue:e(g,u,a)})):"undefined"!==typeof a&&s(d,{name:n,newValue:a}));return d}},8293:(e,t,n)=>{"use strict";const{DOCUMENT_MODE:r}=n(3676),a="html",i=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],o=i.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),s=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],l=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],c=l.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function u(e){const t=-1!==e.indexOf('"')?"'":'"';return t+e+t}function d(e,t){for(let n=0;n<t.length;n++)if(0===e.indexOf(t[n]))return!0;return!1}t.isConforming=function(e){return e.name===a&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)},t.getDocumentMode=function(e){if(e.name!==a)return r.QUIRKS;const t=e.systemId;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return r.QUIRKS;let n=e.publicId;if(null!==n){if(n=n.toLowerCase(),s.indexOf(n)>-1)return r.QUIRKS;let e=null===t?o:i;if(d(n,e))return r.QUIRKS;if(e=null===t?l:c,d(n,e))return r.LIMITED_QUIRKS}return r.NO_QUIRKS},t.serializeContent=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+u(t):n&&(r+=" SYSTEM"),null!==n&&(r+=" "+u(n)),r}},3941:e=>{"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},985:(e,t,n)=>{"use strict";const r=n(6504),a=n(3676),i=a.TAG_NAMES,o=a.NAMESPACES,s=a.ATTRS,l="text/html",c="application/xhtml+xml",u={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},d={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:o.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:o.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:o.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:o.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:o.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:o.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:o.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:o.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:o.XML},"xml:space":{prefix:"xml",name:"space",namespace:o.XML},xmlns:{prefix:"",name:"xmlns",namespace:o.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:o.XMLNS}},p=t.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},m={[i.B]:!0,[i.BIG]:!0,[i.BLOCKQUOTE]:!0,[i.BODY]:!0,[i.BR]:!0,[i.CENTER]:!0,[i.CODE]:!0,[i.DD]:!0,[i.DIV]:!0,[i.DL]:!0,[i.DT]:!0,[i.EM]:!0,[i.EMBED]:!0,[i.H1]:!0,[i.H2]:!0,[i.H3]:!0,[i.H4]:!0,[i.H5]:!0,[i.H6]:!0,[i.HEAD]:!0,[i.HR]:!0,[i.I]:!0,[i.IMG]:!0,[i.LI]:!0,[i.LISTING]:!0,[i.MENU]:!0,[i.META]:!0,[i.NOBR]:!0,[i.OL]:!0,[i.P]:!0,[i.PRE]:!0,[i.RUBY]:!0,[i.S]:!0,[i.SMALL]:!0,[i.SPAN]:!0,[i.STRONG]:!0,[i.STRIKE]:!0,[i.SUB]:!0,[i.SUP]:!0,[i.TABLE]:!0,[i.TT]:!0,[i.U]:!0,[i.UL]:!0,[i.VAR]:!0};t.causesExit=function(e){const t=e.tagName;return!!(t===i.FONT&&(null!==r.getTokenAttr(e,s.COLOR)||null!==r.getTokenAttr(e,s.SIZE)||null!==r.getTokenAttr(e,s.FACE)))||m[t]},t.adjustTokenMathMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}},t.adjustTokenSVGAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=u[e.attrs[t].name];n&&(e.attrs[t].name=n)}},t.adjustTokenXMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=d[e.attrs[t].name];n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}},t.adjustTokenSVGTagName=function(e){const t=p[e.tagName];t&&(e.tagName=t)},t.isIntegrationPoint=function(e,t,n,r){return!(r&&r!==o.HTML||!function(e,t,n){if(t===o.MATHML&&e===i.ANNOTATION_XML)for(let r=0;r<n.length;r++)if(n[r].name===s.ENCODING){const e=n[r].value.toLowerCase();return e===l||e===c}return t===o.SVG&&(e===i.FOREIGN_OBJECT||e===i.DESC||e===i.TITLE)}(e,t,n))||!(r&&r!==o.MATHML||!function(e,t){return t===o.MATHML&&(e===i.MI||e===i.MO||e===i.MN||e===i.MS||e===i.MTEXT)}(e,t))}},3676:(e,t)=>{"use strict";const n=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const r=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS={[n.HTML]:{[r.ADDRESS]:!0,[r.APPLET]:!0,[r.AREA]:!0,[r.ARTICLE]:!0,[r.ASIDE]:!0,[r.BASE]:!0,[r.BASEFONT]:!0,[r.BGSOUND]:!0,[r.BLOCKQUOTE]:!0,[r.BODY]:!0,[r.BR]:!0,[r.BUTTON]:!0,[r.CAPTION]:!0,[r.CENTER]:!0,[r.COL]:!0,[r.COLGROUP]:!0,[r.DD]:!0,[r.DETAILS]:!0,[r.DIR]:!0,[r.DIV]:!0,[r.DL]:!0,[r.DT]:!0,[r.EMBED]:!0,[r.FIELDSET]:!0,[r.FIGCAPTION]:!0,[r.FIGURE]:!0,[r.FOOTER]:!0,[r.FORM]:!0,[r.FRAME]:!0,[r.FRAMESET]:!0,[r.H1]:!0,[r.H2]:!0,[r.H3]:!0,[r.H4]:!0,[r.H5]:!0,[r.H6]:!0,[r.HEAD]:!0,[r.HEADER]:!0,[r.HGROUP]:!0,[r.HR]:!0,[r.HTML]:!0,[r.IFRAME]:!0,[r.IMG]:!0,[r.INPUT]:!0,[r.LI]:!0,[r.LINK]:!0,[r.LISTING]:!0,[r.MAIN]:!0,[r.MARQUEE]:!0,[r.MENU]:!0,[r.META]:!0,[r.NAV]:!0,[r.NOEMBED]:!0,[r.NOFRAMES]:!0,[r.NOSCRIPT]:!0,[r.OBJECT]:!0,[r.OL]:!0,[r.P]:!0,[r.PARAM]:!0,[r.PLAINTEXT]:!0,[r.PRE]:!0,[r.SCRIPT]:!0,[r.SECTION]:!0,[r.SELECT]:!0,[r.SOURCE]:!0,[r.STYLE]:!0,[r.SUMMARY]:!0,[r.TABLE]:!0,[r.TBODY]:!0,[r.TD]:!0,[r.TEMPLATE]:!0,[r.TEXTAREA]:!0,[r.TFOOT]:!0,[r.TH]:!0,[r.THEAD]:!0,[r.TITLE]:!0,[r.TR]:!0,[r.TRACK]:!0,[r.UL]:!0,[r.WBR]:!0,[r.XMP]:!0},[n.MATHML]:{[r.MI]:!0,[r.MO]:!0,[r.MN]:!0,[r.MS]:!0,[r.MTEXT]:!0,[r.ANNOTATION_XML]:!0},[n.SVG]:{[r.TITLE]:!0,[r.FOREIGN_OBJECT]:!0,[r.DESC]:!0}}},3325:(e,t)=>{"use strict";const n=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];t.REPLACEMENT_CHARACTER="\ufffd",t.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},t.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},t.isSurrogate=function(e){return e>=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||n.indexOf(e)>-1}},832:(e,t,n)=>{"use strict";const r=n(6945);e.exports=class extends r{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){const t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}}},2314:(e,t,n)=>{"use strict";const r=n(832),a=n(7985),i=n(4415),o=n(6945);e.exports=class extends r{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),o.install(this.tokenizer,a,e.opts),o.install(this.tokenizer,i)},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err(t,n){e.locBeforeToken=n&&n.beforeToken,e._reportError(t)}}}}},1973:(e,t,n)=>{"use strict";const r=n(832),a=n(4869),i=n(6945);e.exports=class extends r{constructor(e,t){super(e,t),this.posTracker=i.install(e,a),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}}},7985:(e,t,n)=>{"use strict";const r=n(832),a=n(1973),i=n(6945);e.exports=class extends r{constructor(e,t){super(e,t);const n=i.install(e.preprocessor,a,t);this.posTracker=n.posTracker}}},81:(e,t,n)=>{"use strict";const r=n(6945);e.exports=class extends r{constructor(e,t){super(e),this.onItemPop=t.onItemPop}_getOverriddenMethods(e,t){return{pop(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement(){for(let t=this.stackTop;t>0;t--)e.onItemPop(this.items[t]);t.popAllUpToHtmlElement.call(this)},remove(n){e.onItemPop(this.current),t.remove.call(this,n)}}}}},1479:(e,t,n)=>{"use strict";const r=n(6945),a=n(6504),i=n(4415),o=n(81),s=n(3676).TAG_NAMES;e.exports=class extends r{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i={};t.type===a.END_TAG_TOKEN&&r===t.tagName?(i.endTag=Object.assign({},n),i.endLine=n.endLine,i.endCol=n.endCol,i.endOffset=n.endOffset):(i.endLine=n.startLine,i.endCol=n.startCol,i.endOffset=n.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}_getOverriddenMethods(e,t){return{_bootstrap(n,a){t._bootstrap.call(this,n,a),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;const s=r.install(this.tokenizer,i);e.posTracker=s.posTracker,r.install(this.openElements,o,{onItemPop:function(t){e._setEndLocation(t,e.currentToken)}})},_runParsingLoop(n){t._runParsingLoop.call(this,n);for(let t=this.openElements.stackTop;t>=0;t--)e._setEndLocation(this.openElements.items[t],e.currentToken)},_processTokenInForeignContent(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken(n){e.currentToken=n,t._processToken.call(this,n);if(n.type===a.END_TAG_TOKEN&&(n.tagName===s.HTML||n.tagName===s.BODY&&this.openElements.hasInScope(s.BODY)))for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];if(this.treeAdapter.getTagName(r)===n.tagName){e._setEndLocation(r,n);break}}},_setDocumentType(e){t._setDocumentType.call(this,e);const n=this.treeAdapter.getChildNodes(this.document),r=n.length;for(let t=0;t<r;t++){const r=n[t];if(this.treeAdapter.isDocumentTypeNode(r)){this.treeAdapter.setNodeSourceCodeLocation(r,e.location);break}}},_attachElementToTree(n){e._setStartLocation(n),e.lastStartTagToken=null,t._attachElementToTree.call(this,n)},_appendElement(n,r){e.lastStartTagToken=n,t._appendElement.call(this,n,r)},_insertElement(n,r){e.lastStartTagToken=n,t._insertElement.call(this,n,r)},_insertTemplate(n){e.lastStartTagToken=n,t._insertTemplate.call(this,n);const r=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(r,null)},_insertFakeRootElement(){t._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null)},_appendCommentNode(e,n){t._appendCommentNode.call(this,e,n);const r=this.treeAdapter.getChildNodes(n),a=r[r.length-1];this.treeAdapter.setNodeSourceCodeLocation(a,e.location)},_findFosterParentingLocation(){return e.lastFosterParentingLocation=t._findFosterParentingLocation.call(this),e.lastFosterParentingLocation},_insertCharacters(n){t._insertCharacters.call(this,n);const r=this._shouldFosterParentOnInsertion(),a=r&&e.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,i=this.treeAdapter.getChildNodes(a),o=r&&e.lastFosterParentingLocation.beforeElement?i.indexOf(e.lastFosterParentingLocation.beforeElement)-1:i.length-1,s=i[o];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:e,endCol:t,endOffset:r}=n.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:e,endCol:t,endOffset:r})}else this.treeAdapter.setNodeSourceCodeLocation(s,n.location)}}}}},4415:(e,t,n)=>{"use strict";const r=n(6945),a=n(6504),i=n(4869);e.exports=class extends r{constructor(e){super(e),this.tokenizer=e,this.posTracker=r.install(e.preprocessor,i),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}_getOverriddenMethods(e,t){const n={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken(n){t._createDoctypeToken.call(this,n),this.currentToken.location=e.ctLoc},_createCharacterToken(n,r){t._createCharacterToken.call(this,n,r),this.currentCharacterToken.location=e.ctLoc},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr(n){t._createAttr.call(this,n),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName(n){t._leaveAttrName.call(this,n),e._attachCurrentAttrLocationInfo()},_leaveAttrValue(n){t._leaveAttrValue.call(this,n),e._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const n=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=n.startLine,this.currentCharacterToken.location.endCol=n.startCol,this.currentCharacterToken.location.endOffset=n.startOffset),this.currentToken.type===a.EOF_TOKEN?(n.endLine=n.startLine,n.endCol=n.startCol,n.endOffset=n.startOffset):(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col+1,n.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const n=this.currentCharacterToken&&this.currentCharacterToken.location;n&&-1===n.endOffset&&(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col,n.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(a.MODE).forEach((r=>{const i=a.MODE[r];n[i]=function(n){e.ctLoc=e._getCurrentLocation(),t[i].call(this,n)}})),n}}},4869:(e,t,n)=>{"use strict";const r=n(6945);e.exports=class extends r{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){const n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),("\n"===r||"\r"===r&&"\n"!==this.html[n+1])&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){const n=this.pos;t.dropParsedChunk.call(this);const r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}}},8920:e=>{"use strict";class t{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){const n=[];if(this.length>=3){const r=this.treeAdapter.getAttrList(e).length,a=this.treeAdapter.getTagName(e),i=this.treeAdapter.getNamespaceURI(e);for(let e=this.length-1;e>=0;e--){const o=this.entries[e];if(o.type===t.MARKER_ENTRY)break;const s=o.element,l=this.treeAdapter.getAttrList(s);this.treeAdapter.getTagName(s)===a&&this.treeAdapter.getNamespaceURI(s)===i&&l.length===r&&n.push({idx:e,attrs:l})}}return n.length<3?[]:n}_ensureNoahArkCondition(e){const t=this._getNoahArkConditionCandidates(e);let n=t.length;if(n){const r=this.treeAdapter.getAttrList(e),a=r.length,i=Object.create(null);for(let e=0;e<a;e++){const t=r[e];i[t.name]=t.value}for(let e=0;e<a;e++)for(let r=0;r<n;r++){const a=t[r].attrs[e];if(i[a.name]!==a.value&&(t.splice(r,1),n--),t.length<3)return}for(let e=n-1;e>=2;e--)this.entries.splice(t[e].idx,1),this.length--}}insertMarker(){this.entries.push({type:t.MARKER_ENTRY}),this.length++}pushElement(e,n){this._ensureNoahArkCondition(e),this.entries.push({type:t.ELEMENT_ENTRY,element:e,token:n}),this.length++}insertElementAfterBookmark(e,n){let r=this.length-1;for(;r>=0&&this.entries[r]!==this.bookmark;r--);this.entries.splice(r+1,0,{type:t.ELEMENT_ENTRY,element:e,token:n}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const e=this.entries.pop();if(this.length--,e.type===t.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let n=this.length-1;n>=0;n--){const r=this.entries[n];if(r.type===t.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(r.element)===e)return r}return null}getElementEntry(e){for(let n=this.length-1;n>=0;n--){const r=this.entries[n];if(r.type===t.ELEMENT_ENTRY&&r.element===e)return r}return null}}t.MARKER_ENTRY="MARKER_ENTRY",t.ELEMENT_ENTRY="ELEMENT_ENTRY",e.exports=t},8265:(e,t,n)=>{"use strict";const r=n(6504),a=n(6219),i=n(8920),o=n(1479),s=n(2314),l=n(6945),c=n(6195),u=n(9508),d=n(8293),p=n(985),m=n(3941),g=n(3325),f=n(3676),h=f.TAG_NAMES,E=f.NAMESPACES,T=f.ATTRS,b={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:c},A="hidden",_=8,S=3,N="INITIAL_MODE",C="BEFORE_HTML_MODE",y="BEFORE_HEAD_MODE",R="IN_HEAD_MODE",I="IN_HEAD_NO_SCRIPT_MODE",k="AFTER_HEAD_MODE",O="IN_BODY_MODE",D="TEXT_MODE",L="IN_TABLE_MODE",v="IN_TABLE_TEXT_MODE",w="IN_CAPTION_MODE",x="IN_COLUMN_GROUP_MODE",M="IN_TABLE_BODY_MODE",P="IN_ROW_MODE",F="IN_CELL_MODE",U="IN_SELECT_MODE",B="IN_SELECT_IN_TABLE_MODE",H="IN_TEMPLATE_MODE",G="AFTER_BODY_MODE",$="IN_FRAMESET_MODE",z="AFTER_FRAMESET_MODE",K="AFTER_AFTER_BODY_MODE",j="AFTER_AFTER_FRAMESET_MODE",Y={[h.TR]:P,[h.TBODY]:M,[h.THEAD]:M,[h.TFOOT]:M,[h.CAPTION]:w,[h.COLGROUP]:x,[h.TABLE]:L,[h.BODY]:O,[h.FRAMESET]:$},W={[h.CAPTION]:L,[h.COLGROUP]:L,[h.TBODY]:L,[h.TFOOT]:L,[h.THEAD]:L,[h.COL]:x,[h.TR]:M,[h.TD]:P,[h.TH]:P},V={[N]:{[r.CHARACTER_TOKEN]:le,[r.NULL_CHARACTER_TOKEN]:le,[r.WHITESPACE_CHARACTER_TOKEN]:ne,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:function(e,t){e._setDocumentType(t);const n=t.forceQuirks?f.DOCUMENT_MODE.QUIRKS:d.getDocumentMode(t);d.isConforming(t)||e._err(m.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=C},[r.START_TAG_TOKEN]:le,[r.END_TAG_TOKEN]:le,[r.EOF_TOKEN]:le},[C]:{[r.CHARACTER_TOKEN]:ce,[r.NULL_CHARACTER_TOKEN]:ce,[r.WHITESPACE_CHARACTER_TOKEN]:ne,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){t.tagName===h.HTML?(e._insertElement(t,E.HTML),e.insertionMode=y):ce(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n!==h.HTML&&n!==h.HEAD&&n!==h.BODY&&n!==h.BR||ce(e,t)},[r.EOF_TOKEN]:ce},[y]:{[r.CHARACTER_TOKEN]:ue,[r.NULL_CHARACTER_TOKEN]:ue,[r.WHITESPACE_CHARACTER_TOKEN]:ne,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:re,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.HTML?ke(e,t):n===h.HEAD?(e._insertElement(t,E.HTML),e.headElement=e.openElements.current,e.insertionMode=R):ue(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.HEAD||n===h.BODY||n===h.HTML||n===h.BR?ue(e,t):e._err(m.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:ue},[R]:{[r.CHARACTER_TOKEN]:me,[r.NULL_CHARACTER_TOKEN]:me,[r.WHITESPACE_CHARACTER_TOKEN]:oe,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:re,[r.START_TAG_TOKEN]:de,[r.END_TAG_TOKEN]:pe,[r.EOF_TOKEN]:me},[I]:{[r.CHARACTER_TOKEN]:ge,[r.NULL_CHARACTER_TOKEN]:ge,[r.WHITESPACE_CHARACTER_TOKEN]:oe,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:re,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.HTML?ke(e,t):n===h.BASEFONT||n===h.BGSOUND||n===h.HEAD||n===h.LINK||n===h.META||n===h.NOFRAMES||n===h.STYLE?de(e,t):n===h.NOSCRIPT?e._err(m.nestedNoscriptInHead):ge(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.NOSCRIPT?(e.openElements.pop(),e.insertionMode=R):n===h.BR?ge(e,t):e._err(m.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:ge},[k]:{[r.CHARACTER_TOKEN]:fe,[r.NULL_CHARACTER_TOKEN]:fe,[r.WHITESPACE_CHARACTER_TOKEN]:oe,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:re,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.HTML?ke(e,t):n===h.BODY?(e._insertElement(t,E.HTML),e.framesetOk=!1,e.insertionMode=O):n===h.FRAMESET?(e._insertElement(t,E.HTML),e.insertionMode=$):n===h.BASE||n===h.BASEFONT||n===h.BGSOUND||n===h.LINK||n===h.META||n===h.NOFRAMES||n===h.SCRIPT||n===h.STYLE||n===h.TEMPLATE||n===h.TITLE?(e._err(m.abandonedHeadElementChild),e.openElements.push(e.headElement),de(e,t),e.openElements.remove(e.headElement)):n===h.HEAD?e._err(m.misplacedStartTagForHeadElement):fe(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.BODY||n===h.HTML||n===h.BR?fe(e,t):n===h.TEMPLATE?pe(e,t):e._err(m.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:fe},[O]:{[r.CHARACTER_TOKEN]:Ee,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:he,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:ke,[r.END_TAG_TOKEN]:ve,[r.EOF_TOKEN]:we},[D]:{[r.CHARACTER_TOKEN]:oe,[r.NULL_CHARACTER_TOKEN]:oe,[r.WHITESPACE_CHARACTER_TOKEN]:oe,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:ne,[r.END_TAG_TOKEN]:function(e,t){t.tagName===h.SCRIPT&&(e.pendingScript=e.openElements.current);e.openElements.pop(),e.insertionMode=e.originalInsertionMode},[r.EOF_TOKEN]:function(e,t){e._err(m.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t)}},[L]:{[r.CHARACTER_TOKEN]:xe,[r.NULL_CHARACTER_TOKEN]:xe,[r.WHITESPACE_CHARACTER_TOKEN]:xe,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:Me,[r.END_TAG_TOKEN]:Pe,[r.EOF_TOKEN]:we},[v]:{[r.CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0},[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t)},[r.COMMENT_TOKEN]:Ue,[r.DOCTYPE_TOKEN]:Ue,[r.START_TAG_TOKEN]:Ue,[r.END_TAG_TOKEN]:Ue,[r.EOF_TOKEN]:Ue},[w]:{[r.CHARACTER_TOKEN]:Ee,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:he,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.CAPTION||n===h.COL||n===h.COLGROUP||n===h.TBODY||n===h.TD||n===h.TFOOT||n===h.TH||n===h.THEAD||n===h.TR?e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L,e._processToken(t)):ke(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.CAPTION||n===h.TABLE?e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L,n===h.TABLE&&e._processToken(t)):n!==h.BODY&&n!==h.COL&&n!==h.COLGROUP&&n!==h.HTML&&n!==h.TBODY&&n!==h.TD&&n!==h.TFOOT&&n!==h.TH&&n!==h.THEAD&&n!==h.TR&&ve(e,t)},[r.EOF_TOKEN]:we},[x]:{[r.CHARACTER_TOKEN]:Be,[r.NULL_CHARACTER_TOKEN]:Be,[r.WHITESPACE_CHARACTER_TOKEN]:oe,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.HTML?ke(e,t):n===h.COL?(e._appendElement(t,E.HTML),t.ackSelfClosing=!0):n===h.TEMPLATE?de(e,t):Be(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.COLGROUP?e.openElements.currentTagName===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=L):n===h.TEMPLATE?pe(e,t):n!==h.COL&&Be(e,t)},[r.EOF_TOKEN]:we},[M]:{[r.CHARACTER_TOKEN]:xe,[r.NULL_CHARACTER_TOKEN]:xe,[r.WHITESPACE_CHARACTER_TOKEN]:xe,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.TR?(e.openElements.clearBackToTableBodyContext(),e._insertElement(t,E.HTML),e.insertionMode=P):n===h.TH||n===h.TD?(e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(h.TR),e.insertionMode=P,e._processToken(t)):n===h.CAPTION||n===h.COL||n===h.COLGROUP||n===h.TBODY||n===h.TFOOT||n===h.THEAD?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L,e._processToken(t)):Me(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.TBODY||n===h.TFOOT||n===h.THEAD?e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L):n===h.TABLE?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L,e._processToken(t)):(n!==h.BODY&&n!==h.CAPTION&&n!==h.COL&&n!==h.COLGROUP||n!==h.HTML&&n!==h.TD&&n!==h.TH&&n!==h.TR)&&Pe(e,t)},[r.EOF_TOKEN]:we},[P]:{[r.CHARACTER_TOKEN]:xe,[r.NULL_CHARACTER_TOKEN]:xe,[r.WHITESPACE_CHARACTER_TOKEN]:xe,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.TH||n===h.TD?(e.openElements.clearBackToTableRowContext(),e._insertElement(t,E.HTML),e.insertionMode=F,e.activeFormattingElements.insertMarker()):n===h.CAPTION||n===h.COL||n===h.COLGROUP||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR?e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M,e._processToken(t)):Me(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.TR?e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M):n===h.TABLE?e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M,e._processToken(t)):n===h.TBODY||n===h.TFOOT||n===h.THEAD?(e.openElements.hasInTableScope(n)||e.openElements.hasInTableScope(h.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M,e._processToken(t)):(n!==h.BODY&&n!==h.CAPTION&&n!==h.COL&&n!==h.COLGROUP||n!==h.HTML&&n!==h.TD&&n!==h.TH)&&Pe(e,t)},[r.EOF_TOKEN]:we},[F]:{[r.CHARACTER_TOKEN]:Ee,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:he,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.CAPTION||n===h.COL||n===h.COLGROUP||n===h.TBODY||n===h.TD||n===h.TFOOT||n===h.TH||n===h.THEAD||n===h.TR?(e.openElements.hasInTableScope(h.TD)||e.openElements.hasInTableScope(h.TH))&&(e._closeTableCell(),e._processToken(t)):ke(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.TD||n===h.TH?e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P):n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR?e.openElements.hasInTableScope(n)&&(e._closeTableCell(),e._processToken(t)):n!==h.BODY&&n!==h.CAPTION&&n!==h.COL&&n!==h.COLGROUP&&n!==h.HTML&&ve(e,t)},[r.EOF_TOKEN]:we},[U]:{[r.CHARACTER_TOKEN]:oe,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:oe,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:He,[r.END_TAG_TOKEN]:Ge,[r.EOF_TOKEN]:we},[B]:{[r.CHARACTER_TOKEN]:oe,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:oe,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e._processToken(t)):He(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e._processToken(t)):Ge(e,t)},[r.EOF_TOKEN]:we},[H]:{[r.CHARACTER_TOKEN]:Ee,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:he,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;if(n===h.BASE||n===h.BASEFONT||n===h.BGSOUND||n===h.LINK||n===h.META||n===h.NOFRAMES||n===h.SCRIPT||n===h.STYLE||n===h.TEMPLATE||n===h.TITLE)de(e,t);else{const r=W[n]||O;e._popTmplInsertionMode(),e._pushTmplInsertionMode(r),e.insertionMode=r,e._processToken(t)}},[r.END_TAG_TOKEN]:function(e,t){t.tagName===h.TEMPLATE&&pe(e,t)},[r.EOF_TOKEN]:$e},[G]:{[r.CHARACTER_TOKEN]:ze,[r.NULL_CHARACTER_TOKEN]:ze,[r.WHITESPACE_CHARACTER_TOKEN]:he,[r.COMMENT_TOKEN]:function(e,t){e._appendCommentNode(t,e.openElements.items[0])},[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){t.tagName===h.HTML?ke(e,t):ze(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName===h.HTML?e.fragmentContext||(e.insertionMode=K):ze(e,t)},[r.EOF_TOKEN]:se},[$]:{[r.CHARACTER_TOKEN]:ne,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:oe,[r.COMMENT_TOKEN]:ae,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===h.HTML?ke(