(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3257],{XiKa:function(t,e,i){let n=i("rcQ8"),s=i("oxjq"),{isPlainObject:r}=i("PINQ"),a=i("PE4B"),o=i("rBaf"),{parse:l}=i("OYSl"),h=["img","audio","video","picture","svg","object","map","iframe","embed"],c=["script","style"];function each(t,e){t&&Object.keys(t).forEach(function(i){e(t[i],i)})}function has(t,e){return({}).hasOwnProperty.call(t,e)}function filter(t,e){let i=[];return each(t,function(t){e(t)&&i.push(t)}),i}t.exports=sanitizeHtml;let u=/^[^\0\t\n\f\r /<=>]+$/;function sanitizeHtml(t,e,i){let f,p,m,g,b,y,x,S,T;if(null==t)return"";"number"==typeof t&&(t=t.toString());let I="",w="";function Frame(t,e){let i=this;this.tag=t,this.attribs=e||{},this.tagPosition=I.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(b.length){let t=b[b.length-1];t.text+=i.text}},this.updateParentNodeMediaChildren=function(){if(b.length&&h.includes(this.tag)){let t=b[b.length-1];t.mediaChildren.push(this.tag)}}}(e=Object.assign({},sanitizeHtml.defaults,e)).parser=Object.assign({},d,e.parser);let tagAllowed=function(t){return!1===e.allowedTags||(e.allowedTags||[]).indexOf(t)>-1};c.forEach(function(t){tagAllowed(t)&&!e.allowVulnerableTags&&console.warn(` ⚠️ Your \`allowedTags\` option includes, \`${t}\`, which is inherently vulnerable to XSS attacks. Please remove it from \`allowedTags\`. Or, to disable this warning, add the \`allowVulnerableTags\` option and ensure you are accounting for this risk. `)});let v=e.nonTextTags||["script","style","textarea","option"];e.allowedAttributes&&(f={},p={},each(e.allowedAttributes,function(t,e){f[e]=[];let i=[];t.forEach(function(t){"string"==typeof t&&t.indexOf("*")>=0?i.push(s(t).replace(/\\\*/g,".*")):f[e].push(t)}),i.length&&(p[e]=RegExp("^("+i.join("|")+")$"))}));let k={},N={},A={};each(e.allowedClasses,function(t,e){if(f&&(has(f,e)||(f[e]=[]),f[e].push("class")),k[e]=t,Array.isArray(t)){let i=[];k[e]=[],A[e]=[],t.forEach(function(t){"string"==typeof t&&t.indexOf("*")>=0?i.push(s(t).replace(/\\\*/g,".*")):t instanceof RegExp?A[e].push(t):k[e].push(t)}),i.length&&(N[e]=RegExp("^("+i.join("|")+")$"))}});let E={};each(e.transformTags,function(t,e){let i;"function"==typeof t?i=t:"string"==typeof t&&(i=sanitizeHtml.simpleTransform(t)),"*"===e?m=i:E[e]=i});let C=!1;initializeState();let q=new n.Parser({onopentag:function(t,i){let n;if(e.enforceHtmlBoundary&&"html"===t&&initializeState(),S){T++;return}let s=new Frame(t,i);b.push(s);let h=!1,c=!!s.text;if(has(E,t)&&(n=E[t](t,i),s.attribs=i=n.attribs,void 0!==n.text&&(s.innerText=n.text),t!==n.tagName&&(s.name=t=n.tagName,x[g]=n.tagName)),m&&(n=m(t,i),s.attribs=i=n.attribs,t!==n.tagName&&(s.name=t=n.tagName,x[g]=n.tagName)),(!tagAllowed(t)||"recursiveEscape"===e.disallowedTagsMode&&!function(t){for(let e in t)if(has(t,e))return!1;return!0}(y)||null!=e.nestingLimit&&g>=e.nestingLimit)&&(h=!0,y[g]=!0,("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)&&-1!==v.indexOf(t)&&(S=!0,T=1),y[g]=!0),g++,h){if("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)return;w=I,I=""}I+="<"+t,"script"===t&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(s.innerText=""),(!f||has(f,t)||f["*"])&&each(i,function(i,n){if(!u.test(n)||""===i&&!e.allowedEmptyAttributes.includes(n)&&(e.nonBooleanAttributes.includes(n)||e.nonBooleanAttributes.includes("*"))){delete s.attribs[n];return}let h=!1;if(!f||has(f,t)&&-1!==f[t].indexOf(n)||f["*"]&&-1!==f["*"].indexOf(n)||has(p,t)&&p[t].test(n)||p["*"]&&p["*"].test(n))h=!0;else if(f&&f[t]){for(let e of f[t])if(r(e)&&e.name&&e.name===n){h=!0;let t="";if(!0===e.multiple){let n=i.split(" ");for(let i of n)-1!==e.values.indexOf(i)&&(""===t?t=i:t+=" "+i)}else e.values.indexOf(i)>=0&&(t=i);i=t}}if(h){if(-1!==e.allowedSchemesAppliedToAttributes.indexOf(n)&&naughtyHref(t,i)){delete s.attribs[n];return}if("script"===t&&"src"===n){let t=!0;try{let n=parseUrl(i);if(e.allowedScriptHostnames||e.allowedScriptDomains){let i=(e.allowedScriptHostnames||[]).find(function(t){return t===n.url.hostname}),s=(e.allowedScriptDomains||[]).find(function(t){return n.url.hostname===t||n.url.hostname.endsWith(`.${t}`)});t=i||s}}catch(e){t=!1}if(!t){delete s.attribs[n];return}}if("iframe"===t&&"src"===n){let t=!0;try{let n=parseUrl(i);if(n.isRelativeUrl)t=has(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){let i=(e.allowedIframeHostnames||[]).find(function(t){return t===n.url.hostname}),s=(e.allowedIframeDomains||[]).find(function(t){return n.url.hostname===t||n.url.hostname.endsWith(`.${t}`)});t=i||s}}catch(e){t=!1}if(!t){delete s.attribs[n];return}}if("srcset"===n)try{let t=o(i);if(t.forEach(function(t){naughtyHref("srcset",t.url)&&(t.evil=!0)}),(t=filter(t,function(t){return!t.evil})).length)i=filter(t,function(t){return!t.evil}).map(function(t){if(!t.url)throw Error("URL missing");return t.url+(t.w?` ${t.w}w`:"")+(t.h?` ${t.h}h`:"")+(t.d?` ${t.d}x`:"")}).join(", "),s.attribs[n]=i;else{delete s.attribs[n];return}}catch(t){delete s.attribs[n];return}if("class"===n){let e=k[t],r=k["*"],o=N[t],l=A[t],h=N["*"],c=[o,h].concat(l).filter(function(t){return t});if(!(i=e&&r?filterClasses(i,a(e,r),c):filterClasses(i,e||r,c)).length){delete s.attribs[n];return}}if("style"===n){if(e.parseStyleAttributes)try{let r=l(t+" {"+i+"}",{map:!1}),o=function(t,e){let i;if(!e)return t;let n=t.nodes[0];return(i=e[n.selector]&&e["*"]?a(e[n.selector],e["*"]):e[n.selector]||e["*"])&&(t.nodes[0].nodes=n.nodes.reduce(function(t,e){if(has(i,e.prop)){let n=i[e.prop].some(function(t){return t.test(e.value)});n&&t.push(e)}return t},[])),t}(r,e.allowedStyles);if(i=o.nodes[0].nodes.reduce(function(t,e){return t.push(`${e.prop}:${e.value}${e.important?" !important":""}`),t},[]).join(";"),0===i.length){delete s.attribs[n];return}}catch(e){"undefined"!=typeof window&&console.warn('Failed to parse "'+t+" {"+i+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),delete s.attribs[n];return}else if(e.allowedStyles)throw Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}I+=" "+n,i&&i.length?I+='="'+escapeHtml(i,!0)+'"':e.allowedEmptyAttributes.includes(n)&&(I+='=""')}else delete s.attribs[n]}),-1!==e.selfClosing.indexOf(t)?I+=" />":(I+=">",!s.innerText||c||e.textFilter||(I+=escapeHtml(s.innerText),C=!0)),h&&(I=w+escapeHtml(I),w="")},ontext:function(t){let i;if(S)return;let n=b[b.length-1];if(n&&(i=n.tag,t=void 0!==n.innerText?n.innerText:t),"completelyDiscard"!==e.disallowedTagsMode||tagAllowed(i)){if(("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)&&("script"===i||"style"===i))I+=t;else{let n=escapeHtml(t,!1);e.textFilter&&!C?I+=e.textFilter(n,i):C||(I+=n)}}else t="";if(b.length){let e=b[b.length-1];e.text+=t}},onclosetag:function(t,i){if(S){if(--T)return;S=!1}let n=b.pop();if(!n)return;if(n.tag!==t){b.push(n);return}S=!!e.enforceHtmlBoundary&&"html"===t,g--;let s=y[g];if(s){if(delete y[g],"discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode){n.updateParentNodeText();return}w=I,I=""}if(x[g]&&(t=x[g],delete x[g]),e.exclusiveFilter&&e.exclusiveFilter(n)){I=I.substr(0,n.tagPosition);return}if(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1!==e.selfClosing.indexOf(t)||i&&!tagAllowed(t)&&["escape","recursiveEscape"].indexOf(e.disallowedTagsMode)>=0){s&&(I=w,w="");return}I+="",s&&(I=w+escapeHtml(I),w=""),C=!1}},e.parser);return q.write(t),q.end(),I;function initializeState(){I="",g=0,b=[],y={},x={},S=!1,T=0}function escapeHtml(t,i){return"string"!=typeof t&&(t+=""),e.parser.decodeEntities&&(t=t.replace(/&/g,"&").replace(//g,">"),i&&(t=t.replace(/"/g,"""))),t=t.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),i&&(t=t.replace(/"/g,""")),t}function naughtyHref(t,i){for(i=i.replace(/[\x00-\x20]+/g,"");;){let t=i.indexOf("",t+4);if(-1===e)break;i=i.substring(0,t)+i.substring(e+3)}let n=i.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!n)return!!i.match(/^[/\\]{2}/)&&!e.allowProtocolRelative;let s=n[1].toLowerCase();return has(e.allowedSchemesByTag,t)?-1===e.allowedSchemesByTag[t].indexOf(s):!e.allowedSchemes||-1===e.allowedSchemes.indexOf(s)}function parseUrl(t){if((t=t.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw Error("relative: exploit attempt");let e="relative://relative-site";for(let t=0;t<100;t++)e+=`/${t}`;let i=new URL(t,e),n=i&&"relative-site"===i.hostname&&"relative:"===i.protocol;return{isRelativeUrl:n,url:i}}function filterClasses(t,e,i){return e?(t=t.split(/\s+/)).filter(function(t){return -1!==e.indexOf(t)||i.some(function(e){return e.test(t)})}).join(" "):t}}let d={decodeEntities:!0};sanitizeHtml.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},sanitizeHtml.simpleTransform=function(t,e,i){return i=void 0===i||i,e=e||{},function(n,s){let r;if(i)for(r in e)s[r]=e[r];else s=e;return{tagName:t,attribs:s}}}},"3YHv":function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(e,i);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,s)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&n(e,t,i);return s(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=void 0;var a=r(i("FbA9")),o=i("oW49"),l=new Set(["input","option","optgroup","select","button","datalist","textarea"]),h=new Set(["p"]),c=new Set(["thead","tbody"]),u=new Set(["dd","dt"]),d=new Set(["rt","rp"]),f=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",h],["h1",h],["h2",h],["h3",h],["h4",h],["h5",h],["h6",h],["select",l],["input",l],["output",l],["button",l],["datalist",l],["textarea",l],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",u],["dt",u],["address",h],["article",h],["aside",h],["blockquote",h],["details",h],["div",h],["dl",h],["fieldset",h],["figcaption",h],["figure",h],["footer",h],["form",h],["header",h],["hr",h],["main",h],["nav",h],["ol",h],["pre",h],["section",h],["table",h],["ul",h],["rt",d],["rp",d],["tbody",c],["tfoot",c]]),p=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),m=new Set(["math","svg"]),g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),b=/\s|\//,y=function(){function Parser(t,e){var i,n,s,r,o;void 0===e&&(e={}),this.options=e,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=t?t:{},this.lowerCaseTagNames=null!==(i=e.lowerCaseTags)&&void 0!==i?i:!e.xmlMode,this.lowerCaseAttributeNames=null!==(n=e.lowerCaseAttributeNames)&&void 0!==n?n:!e.xmlMode,this.tokenizer=new(null!==(s=e.Tokenizer)&&void 0!==s?s:a.default)(this.options,this),null===(o=(r=this.cbs).onparserinit)||void 0===o||o.call(r,this)}return Parser.prototype.ontext=function(t,e){var i,n,s=this.getSlice(t,e);this.endIndex=e-1,null===(n=(i=this.cbs).ontext)||void 0===n||n.call(i,s),this.startIndex=e},Parser.prototype.ontextentity=function(t){var e,i,n=this.tokenizer.getSectionStart();this.endIndex=n-1,null===(i=(e=this.cbs).ontext)||void 0===i||i.call(e,(0,o.fromCodePoint)(t)),this.startIndex=n},Parser.prototype.isVoidElement=function(t){return!this.options.xmlMode&&p.has(t)},Parser.prototype.onopentagname=function(t,e){this.endIndex=e;var i=this.getSlice(t,e);this.lowerCaseTagNames&&(i=i.toLowerCase()),this.emitOpenTag(i)},Parser.prototype.emitOpenTag=function(t){this.openTagStart=this.startIndex,this.tagname=t;var e,i,n,s,r=!this.options.xmlMode&&f.get(t);if(r)for(;this.stack.length>0&&r.has(this.stack[this.stack.length-1]);){var a=this.stack.pop();null===(i=(e=this.cbs).onclosetag)||void 0===i||i.call(e,a,!0)}!this.isVoidElement(t)&&(this.stack.push(t),m.has(t)?this.foreignContext.push(!0):g.has(t)&&this.foreignContext.push(!1)),null===(s=(n=this.cbs).onopentagname)||void 0===s||s.call(n,t),this.cbs.onopentag&&(this.attribs={})},Parser.prototype.endOpenTag=function(t){var e,i;this.startIndex=this.openTagStart,this.attribs&&(null===(i=(e=this.cbs).onopentag)||void 0===i||i.call(e,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},Parser.prototype.onopentagend=function(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1},Parser.prototype.onclosetag=function(t,e){this.endIndex=e;var i,n,s,r,a,o,l=this.getSlice(t,e);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(m.has(l)||g.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))this.options.xmlMode||"br"!==l||(null===(n=(i=this.cbs).onopentagname)||void 0===n||n.call(i,"br"),null===(r=(s=this.cbs).onopentag)||void 0===r||r.call(s,"br",{},!0),null===(o=(a=this.cbs).onclosetag)||void 0===o||o.call(a,"br",!1));else{var h=this.stack.lastIndexOf(l);if(-1!==h){if(this.cbs.onclosetag)for(var c=this.stack.length-h;c--;)this.cbs.onclosetag(this.stack.pop(),0!==c);else this.stack.length=h}else this.options.xmlMode||"p"!==l||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=e+1},Parser.prototype.onselfclosingtag=function(t){this.endIndex=t,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)},Parser.prototype.closeCurrentTag=function(t){var e,i,n=this.tagname;this.endOpenTag(t),this.stack[this.stack.length-1]===n&&(null===(i=(e=this.cbs).onclosetag)||void 0===i||i.call(e,n,!t),this.stack.pop())},Parser.prototype.onattribname=function(t,e){this.startIndex=t;var i=this.getSlice(t,e);this.attribname=this.lowerCaseAttributeNames?i.toLowerCase():i},Parser.prototype.onattribdata=function(t,e){this.attribvalue+=this.getSlice(t,e)},Parser.prototype.onattribentity=function(t){this.attribvalue+=(0,o.fromCodePoint)(t)},Parser.prototype.onattribend=function(t,e){var i,n;this.endIndex=e,null===(n=(i=this.cbs).onattribute)||void 0===n||n.call(i,this.attribname,this.attribvalue,t===a.QuoteType.Double?'"':t===a.QuoteType.Single?"'":t===a.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},Parser.prototype.getInstructionName=function(t){var e=t.search(b),i=e<0?t:t.substr(0,e);return this.lowerCaseTagNames&&(i=i.toLowerCase()),i},Parser.prototype.ondeclaration=function(t,e){this.endIndex=e;var i=this.getSlice(t,e);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(i);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(i))}this.startIndex=e+1},Parser.prototype.onprocessinginstruction=function(t,e){this.endIndex=e;var i=this.getSlice(t,e);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(i);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(i))}this.startIndex=e+1},Parser.prototype.oncomment=function(t,e,i){var n,s,r,a;this.endIndex=e,null===(s=(n=this.cbs).oncomment)||void 0===s||s.call(n,this.getSlice(t,e-i)),null===(a=(r=this.cbs).oncommentend)||void 0===a||a.call(r),this.startIndex=e+1},Parser.prototype.oncdata=function(t,e,i){this.endIndex=e;var n,s,r,a,o,l,h,c,u,d,f=this.getSlice(t,e-i);this.options.xmlMode||this.options.recognizeCDATA?(null===(s=(n=this.cbs).oncdatastart)||void 0===s||s.call(n),null===(a=(r=this.cbs).ontext)||void 0===a||a.call(r,f),null===(l=(o=this.cbs).oncdataend)||void 0===l||l.call(o)):(null===(c=(h=this.cbs).oncomment)||void 0===c||c.call(h,"[CDATA[".concat(f,"]]")),null===(d=(u=this.cbs).oncommentend)||void 0===d||d.call(u)),this.startIndex=e+1},Parser.prototype.onend=function(){var t,e;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var i=this.stack.length;i>0;this.cbs.onclosetag(this.stack[--i],!0));}null===(e=(t=this.cbs).onend)||void 0===e||e.call(t)},Parser.prototype.reset=function(){var t,e,i,n;null===(e=(t=this.cbs).onreset)||void 0===e||e.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(i=this.cbs).onparserinit)||void 0===n||n.call(i,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},Parser.prototype.parseComplete=function(t){this.reset(),this.end(t)},Parser.prototype.getSlice=function(t,e){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var i=this.buffers[0].slice(t-this.bufferOffset,e-this.bufferOffset);e-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),i+=this.buffers[0].slice(0,e-this.bufferOffset);return i},Parser.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},Parser.prototype.write=function(t){var e,i;if(this.ended){null===(i=(e=this.cbs).onerror)||void 0===i||i.call(e,Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)},Parser.prototype.end=function(t){var e,i;if(this.ended){null===(i=(e=this.cbs).onerror)||void 0===i||i.call(e,Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()},Parser.prototype.pause=function(){this.tokenizer.pause()},Parser.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex=a.Zero&&t<=a.Nine}(n=a||(a={}))[n.Tab=9]="Tab",n[n.NewLine=10]="NewLine",n[n.FormFeed=12]="FormFeed",n[n.CarriageReturn=13]="CarriageReturn",n[n.Space=32]="Space",n[n.ExclamationMark=33]="ExclamationMark",n[n.Number=35]="Number",n[n.Amp=38]="Amp",n[n.SingleQuote=39]="SingleQuote",n[n.DoubleQuote=34]="DoubleQuote",n[n.Dash=45]="Dash",n[n.Slash=47]="Slash",n[n.Zero=48]="Zero",n[n.Nine=57]="Nine",n[n.Semi=59]="Semi",n[n.Lt=60]="Lt",n[n.Eq=61]="Eq",n[n.Gt=62]="Gt",n[n.Questionmark=63]="Questionmark",n[n.UpperA=65]="UpperA",n[n.LowerA=97]="LowerA",n[n.UpperF=70]="UpperF",n[n.LowerF=102]="LowerF",n[n.UpperZ=90]="UpperZ",n[n.LowerZ=122]="LowerZ",n[n.LowerX=120]="LowerX",n[n.OpeningSquareBracket=91]="OpeningSquareBracket",(s=o||(o={}))[s.Text=1]="Text",s[s.BeforeTagName=2]="BeforeTagName",s[s.InTagName=3]="InTagName",s[s.InSelfClosingTag=4]="InSelfClosingTag",s[s.BeforeClosingTagName=5]="BeforeClosingTagName",s[s.InClosingTagName=6]="InClosingTagName",s[s.AfterClosingTagName=7]="AfterClosingTagName",s[s.BeforeAttributeName=8]="BeforeAttributeName",s[s.InAttributeName=9]="InAttributeName",s[s.AfterAttributeName=10]="AfterAttributeName",s[s.BeforeAttributeValue=11]="BeforeAttributeValue",s[s.InAttributeValueDq=12]="InAttributeValueDq",s[s.InAttributeValueSq=13]="InAttributeValueSq",s[s.InAttributeValueNq=14]="InAttributeValueNq",s[s.BeforeDeclaration=15]="BeforeDeclaration",s[s.InDeclaration=16]="InDeclaration",s[s.InProcessingInstruction=17]="InProcessingInstruction",s[s.BeforeComment=18]="BeforeComment",s[s.CDATASequence=19]="CDATASequence",s[s.InSpecialComment=20]="InSpecialComment",s[s.InCommentLike=21]="InCommentLike",s[s.BeforeSpecialS=22]="BeforeSpecialS",s[s.SpecialStartSequence=23]="SpecialStartSequence",s[s.InSpecialTag=24]="InSpecialTag",s[s.BeforeEntity=25]="BeforeEntity",s[s.BeforeNumericEntity=26]="BeforeNumericEntity",s[s.InNamedEntity=27]="InNamedEntity",s[s.InNumericEntity=28]="InNumericEntity",s[s.InHexEntity=29]="InHexEntity",(r=l=e.QuoteType||(e.QuoteType={}))[r.NoValue=0]="NoValue",r[r.Unquoted=1]="Unquoted",r[r.Single=2]="Single",r[r.Double=3]="Double";var c={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},u=function(){function Tokenizer(t,e){var i=t.xmlMode,n=void 0!==i&&i,s=t.decodeEntities;this.cbs=e,this.state=o.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=o.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=n,this.decodeEntities=void 0===s||s,this.entityTrie=n?h.xmlDecodeTree:h.htmlDecodeTree}return Tokenizer.prototype.reset=function(){this.state=o.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=o.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},Tokenizer.prototype.write=function(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()},Tokenizer.prototype.end=function(){this.running&&this.finish()},Tokenizer.prototype.pause=function(){this.running=!1},Tokenizer.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=o.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===a.Amp&&(this.state=o.BeforeEntity)},Tokenizer.prototype.stateSpecialStartSequence=function(t){var e=this.sequenceIndex===this.currentSequence.length;if(e?isEndOfTagSection(t):(32|t)===this.currentSequence[this.sequenceIndex]){if(!e){this.sequenceIndex++;return}}else this.isSpecial=!1;this.sequenceIndex=0,this.state=o.InTagName,this.stateInTagName(t)},Tokenizer.prototype.stateInSpecialTag=function(t){if(this.sequenceIndex===this.currentSequence.length){if(t===a.Gt||isWhitespace(t)){var e=this.index-this.currentSequence.length;if(this.sectionStart=a.LowerA&&t<=a.LowerZ||t>=a.UpperA&&t<=a.UpperZ},Tokenizer.prototype.startSpecial=function(t,e){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=e,this.state=o.SpecialStartSequence},Tokenizer.prototype.stateBeforeTagName=function(t){if(t===a.ExclamationMark)this.state=o.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===a.Questionmark)this.state=o.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){var e=32|t;this.sectionStart=this.index,this.xmlMode||e!==c.TitleEnd[2]?this.state=this.xmlMode||e!==c.ScriptEnd[2]?o.InTagName:o.BeforeSpecialS:this.startSpecial(c.TitleEnd,3)}else t===a.Slash?this.state=o.BeforeClosingTagName:(this.state=o.Text,this.stateText(t))},Tokenizer.prototype.stateInTagName=function(t){isEndOfTagSection(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(t))},Tokenizer.prototype.stateBeforeClosingTagName=function(t){isWhitespace(t)||(t===a.Gt?this.state=o.Text:(this.state=this.isTagStartChar(t)?o.InClosingTagName:o.InSpecialComment,this.sectionStart=this.index))},Tokenizer.prototype.stateInClosingTagName=function(t){(t===a.Gt||isWhitespace(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=o.AfterClosingTagName,this.stateAfterClosingTagName(t))},Tokenizer.prototype.stateAfterClosingTagName=function(t){(t===a.Gt||this.fastForwardTo(a.Gt))&&(this.state=o.Text,this.baseState=o.Text,this.sectionStart=this.index+1)},Tokenizer.prototype.stateBeforeAttributeName=function(t){t===a.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=o.InSpecialTag,this.sequenceIndex=0):this.state=o.Text,this.baseState=this.state,this.sectionStart=this.index+1):t===a.Slash?this.state=o.InSelfClosingTag:isWhitespace(t)||(this.state=o.InAttributeName,this.sectionStart=this.index)},Tokenizer.prototype.stateInSelfClosingTag=function(t){t===a.Gt?(this.cbs.onselfclosingtag(this.index),this.state=o.Text,this.baseState=o.Text,this.sectionStart=this.index+1,this.isSpecial=!1):isWhitespace(t)||(this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(t))},Tokenizer.prototype.stateInAttributeName=function(t){(t===a.Eq||isEndOfTagSection(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=o.AfterAttributeName,this.stateAfterAttributeName(t))},Tokenizer.prototype.stateAfterAttributeName=function(t){t===a.Eq?this.state=o.BeforeAttributeValue:t===a.Slash||t===a.Gt?(this.cbs.onattribend(l.NoValue,this.index),this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(t)):isWhitespace(t)||(this.cbs.onattribend(l.NoValue,this.index),this.state=o.InAttributeName,this.sectionStart=this.index)},Tokenizer.prototype.stateBeforeAttributeValue=function(t){t===a.DoubleQuote?(this.state=o.InAttributeValueDq,this.sectionStart=this.index+1):t===a.SingleQuote?(this.state=o.InAttributeValueSq,this.sectionStart=this.index+1):isWhitespace(t)||(this.sectionStart=this.index,this.state=o.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))},Tokenizer.prototype.handleInAttributeValue=function(t,e){t===e||!this.decodeEntities&&this.fastForwardTo(e)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(e===a.DoubleQuote?l.Double:l.Single,this.index),this.state=o.BeforeAttributeName):this.decodeEntities&&t===a.Amp&&(this.baseState=this.state,this.state=o.BeforeEntity)},Tokenizer.prototype.stateInAttributeValueDoubleQuotes=function(t){this.handleInAttributeValue(t,a.DoubleQuote)},Tokenizer.prototype.stateInAttributeValueSingleQuotes=function(t){this.handleInAttributeValue(t,a.SingleQuote)},Tokenizer.prototype.stateInAttributeValueNoQuotes=function(t){isWhitespace(t)||t===a.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(l.Unquoted,this.index),this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===a.Amp&&(this.baseState=this.state,this.state=o.BeforeEntity)},Tokenizer.prototype.stateBeforeDeclaration=function(t){t===a.OpeningSquareBracket?(this.state=o.CDATASequence,this.sequenceIndex=0):this.state=t===a.Dash?o.BeforeComment:o.InDeclaration},Tokenizer.prototype.stateInDeclaration=function(t){(t===a.Gt||this.fastForwardTo(a.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=o.Text,this.sectionStart=this.index+1)},Tokenizer.prototype.stateInProcessingInstruction=function(t){(t===a.Gt||this.fastForwardTo(a.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=o.Text,this.sectionStart=this.index+1)},Tokenizer.prototype.stateBeforeComment=function(t){t===a.Dash?(this.state=o.InCommentLike,this.currentSequence=c.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=o.InDeclaration},Tokenizer.prototype.stateInSpecialComment=function(t){(t===a.Gt||this.fastForwardTo(a.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=o.Text,this.sectionStart=this.index+1)},Tokenizer.prototype.stateBeforeSpecialS=function(t){var e=32|t;e===c.ScriptEnd[3]?this.startSpecial(c.ScriptEnd,4):e===c.StyleEnd[3]?this.startSpecial(c.StyleEnd,4):(this.state=o.InTagName,this.stateInTagName(t))},Tokenizer.prototype.stateBeforeEntity=function(t){this.entityExcess=1,this.entityResult=0,t===a.Number?this.state=o.BeforeNumericEntity:t===a.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=o.InNamedEntity,this.stateInNamedEntity(t))},Tokenizer.prototype.stateInNamedEntity=function(t){if(this.entityExcess+=1,this.trieIndex=(0,h.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,t),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];var e=this.trieCurrent&h.BinTrieFlags.VALUE_LENGTH;if(e){var i=(e>>14)-1;if(this.allowLegacyEntity()||t===a.Semi){var n=this.index-this.entityExcess+1;n>this.sectionStart&&this.emitPartial(this.sectionStart,n),this.entityResult=this.trieIndex,this.trieIndex+=i,this.entityExcess=0,this.sectionStart=this.index+1,0===i&&this.emitNamedEntity()}else this.trieIndex+=i}},Tokenizer.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&h.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~h.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},Tokenizer.prototype.stateBeforeNumericEntity=function(t){(32|t)===a.LowerX?(this.entityExcess++,this.state=o.InHexEntity):(this.state=o.InNumericEntity,this.stateInNumericEntity(t))},Tokenizer.prototype.emitNumericEntity=function(t){var e=this.index-this.entityExcess-1;e+2+Number(this.state===o.InHexEntity)!==this.index&&(e>this.sectionStart&&this.emitPartial(this.sectionStart,e),this.sectionStart=this.index+Number(t),this.emitCodePoint((0,h.replaceCodePoint)(this.entityResult))),this.state=this.baseState},Tokenizer.prototype.stateInNumericEntity=function(t){t===a.Semi?this.emitNumericEntity(!0):isNumber(t)?(this.entityResult=10*this.entityResult+(t-a.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},Tokenizer.prototype.stateInHexEntity=function(t){t===a.Semi?this.emitNumericEntity(!0):isNumber(t)?(this.entityResult=16*this.entityResult+(t-a.Zero),this.entityExcess++):t>=a.UpperA&&t<=a.UpperF||t>=a.LowerA&&t<=a.LowerF?(this.entityResult=16*this.entityResult+((32|t)-a.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},Tokenizer.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===o.Text||this.baseState===o.InSpecialTag)},Tokenizer.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===o.Text||this.state===o.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===o.InAttributeValueDq||this.state===o.InAttributeValueSq||this.state===o.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},Tokenizer.prototype.shouldContinue=function(){return this.index