gp-designer 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -36
- package/dist/001.html +3 -3
- package/dist/004.css +7 -1
- package/dist/gp-designer.es.js +6796 -6745
- package/dist/gp-designer.umd.js +10 -10
- package/dist/style.css +2 -7
- package/dist/types/components/Designer.vue.d.ts +64 -1
- package/dist/types/components/ElementRenderer.vue.d.ts +12 -1
- package/dist/types/components/GpSvgIcon/IconModal.vue.d.ts +16 -3
- package/dist/types/components/Model.d.ts +1 -0
- package/package.json +1 -1
package/dist/gp-designer.umd.js
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
(function(ke,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(ke=typeof globalThis<"u"?globalThis:ke||self,l(ke.GpWebModule={},ke.Vue))})(this,function(ke,l){"use strict";var de=(e=>(e[e.None=0]="None",e[e.Text=1]="Text",e[e.Image=2]="Image",e[e.Video=3]="Video",e[e.Icon=4]="Icon",e[e.Link=5]="Link",e[e.Block=10]="Block",e))(de||{});const or=l.defineComponent({name:"CustomIcon",props:{iconName:{type:String,required:!0}},setup(e){return{iconClass:l.computed(()=>`${e.iconName}`)}}}),yi=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a};function cr(e,t,a,i,n,r){return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)},null,2)}const lr=yi(or,[["render",cr]]),dr={key:0,contenteditable:"false",class:l.normalizeClass(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])},hr={class:"flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden"},fr={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Er={class:"p-8 items-center justify-center flex flex-wrap h-[500px] overflow-y-auto"},mr=l.defineComponent({__name:"IconModal",emits:["ok"],setup(e,{expose:t,emit:a}){const i=a;function n(){const T=r(),p=/\.icon-([a-zA-Z0-9_-]+)/g;let A,C=[];for(;(A=p.exec(T))!==null;)C.push(A[1]);return C}function r(){const T=document.styleSheets;let p="";const A=T[0];try{const C=A.rules||A.cssRules;for(let L=0;L<C.length;L++)p+=C[L].cssText}catch(C){console.error("无法访问样式表内容",C)}return p}const u=l.ref(n()||[]),o=l.ref(!1);function c(){console.log(666),o.value=!0}function f(T){E(),i("ok",T)}function E(){o.value=!1}return t({openModal:c,closeModal:E}),(T,p)=>o.value?(l.openBlock(),l.createElementBlock("div",dr,[l.createElementVNode("div",hr,[l.createElementVNode("div",fr,[p[1]||(p[1]=l.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"选择图标",-1)),l.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:p[0]||(p[0]=l.withModifiers(A=>E(),["stop"]))})]),l.createElementVNode("div",Er,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value,A=>(l.openBlock(),l.createBlock(lr,{key:A,class:"w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",iconName:A,onClick:l.withModifiers(C=>f(A),["stop"]),title:A},null,8,["iconName","onClick","title"]))),128))])])])):l.createCommentVNode("",!0)}});function Mi(e){return typeof e=="number"&&Number.isFinite(e)}const Tr=l.defineComponent({name:"ImgUploader",inheritAttrs:!1,__name:"UploadImage",props:{alt:{},beforeUpload:{},customUpload:{},getExtraData:{},height:{default:100},multiple:{type:Boolean,default:!1},src:{},tip:{default:"点击上传"},width:{default:100},uploadByImage:{}},setup(e){const t=e,a=l.ref(),i=l.computed(()=>{const u={width:t.width,height:t.height};return Mi(t.width)&&(u.width+="px"),Mi(t.height)&&(u.height+="px"),u});async function n(u){console.log(u,u.target);const o=u.target.files[0];console.log(o),typeof t.customUpload=="function"&&t.customUpload(o),!(typeof t.beforeUpload=="function"&&!await t.beforeUpload(o))&&(typeof t.getExtraData=="function"&&await t.getExtraData(o),o&&(r(o),a.value.value=""))}async function r(u){if(t.uploadByImage){await t.uploadByImage(u);return}return{success:0}}return(u,o)=>(l.openBlock(),l.createElementBlock("div",l.mergeProps({style:i.value,contenteditable:"false",class:"bg-background-deep box-border cursor-pointer absolute left-0 top-0",title:"点击上传"},u.$attrs,{onClick:o[2]||(o[2]=l.withModifiers(()=>{},["stop"]))}),[l.createElementVNode("input",{onClick:o[0]||(o[0]=l.withModifiers(()=>{},["stop"])),contenteditable:"false",class:"cursor-pointer w-16 opacity-0",type:"file",ref_key:"fileInput",ref:a,onChange:o[1]||(o[1]=c=>n(c)),accept:"image/*"},null,544)],16))}});/*!
|
1
|
+
(function(we,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(we=typeof globalThis<"u"?globalThis:we||self,c(we.GpWebModule={},we.Vue))})(this,function(we,c){"use strict";var Q;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(Q||(Q={}));function or(e){return e.type===Q.Tag||e.type===Q.Script||e.type===Q.Style}const cr=Q.Root,lr=Q.Text,dr=Q.Directive,hr=Q.Comment,fr=Q.Script,Er=Q.Style,mr=Q.Tag,Tr=Q.CDATA,pr=Q.Doctype;let Mi=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return pt(this,t)}};class Na extends Mi{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class Tt extends Na{constructor(){super(...arguments),this.type=Q.Text}get nodeType(){return 3}}class Ca extends Na{constructor(){super(...arguments),this.type=Q.Comment}get nodeType(){return 8}}class Ia extends Na{constructor(t,a){super(a),this.name=t,this.type=Q.Directive}get nodeType(){return 1}}class Sa extends Mi{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class Pi extends Sa{constructor(){super(...arguments),this.type=Q.CDATA}get nodeType(){return 4}}class Ge extends Sa{constructor(){super(...arguments),this.type=Q.Root}get nodeType(){return 9}}class xa extends Sa{constructor(t,a,i=[],n=t==="script"?Q.Script:t==="style"?Q.Style:Q.Tag){super(i),this.name=t,this.attribs=a,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var a,i;return{name:t,value:this.attribs[t],namespace:(a=this["x-attribsNamespace"])===null||a===void 0?void 0:a[t],prefix:(i=this["x-attribsPrefix"])===null||i===void 0?void 0:i[t]}})}}function v(e){return or(e)}function qt(e){return e.type===Q.CDATA}function De(e){return e.type===Q.Text}function Wt(e){return e.type===Q.Comment}function Oa(e){return e.type===Q.Directive}function Be(e){return e.type===Q.Root}function se(e){return Object.prototype.hasOwnProperty.call(e,"children")}function pt(e,t=!1){let a;if(De(e))a=new Tt(e.data);else if(Wt(e))a=new Ca(e.data);else if(v(e)){const i=t?Da(e.children):[],n=new xa(e.name,{...e.attribs},i);i.forEach(r=>r.parent=n),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),a=n}else if(qt(e)){const i=t?Da(e.children):[],n=new Pi(i);i.forEach(r=>r.parent=n),a=n}else if(Be(e)){const i=t?Da(e.children):[],n=new Ge(i);i.forEach(r=>r.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),a=n}else if(Oa(e)){const i=new Ia(e.name,e.data);e["x-name"]!=null&&(i["x-name"]=e["x-name"],i["x-publicId"]=e["x-publicId"],i["x-systemId"]=e["x-systemId"]),a=i}else throw new Error(`Not implemented yet: ${e.type}`);return a.startIndex=e.startIndex,a.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(a.sourceCodeLocation=e.sourceCodeLocation),a}function Da(e){const t=e.map(a=>pt(a,!0));for(let a=1;a<t.length;a++)t[a].prev=t[a-1],t[a-1].next=t[a];return t}const ki={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class br{constructor(t,a,i){this.dom=[],this.root=new Ge(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof a=="function"&&(i=a,a=ki),typeof t=="object"&&(a=t,t=void 0),this.callback=t??null,this.options=a??ki,this.elementCB=i??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new Ge(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,a){const i=this.options.xmlMode?Q.Tag:void 0,n=new xa(t,a,void 0,i);this.addNode(n),this.tagStack.push(n)}ontext(t){const{lastNode:a}=this;if(a&&a.type===Q.Text)a.data+=t,this.options.withEndIndices&&(a.endIndex=this.parser.endIndex);else{const i=new Tt(t);this.addNode(i),this.lastNode=i}}oncomment(t){if(this.lastNode&&this.lastNode.type===Q.Comment){this.lastNode.data+=t;return}const a=new Ca(t);this.addNode(a),this.lastNode=a}oncommentend(){this.lastNode=null}oncdatastart(){const t=new Tt(""),a=new Pi([t]);this.addNode(a),t.parent=a,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,a){const i=new Ia(t,a);this.addNode(i)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const a=this.tagStack[this.tagStack.length-1],i=a.children[a.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),a.children.push(t),i&&(t.prev=i,i.next=t),t.parent=a,this.lastNode=null}}const La=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),vi=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Ra;const gr=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),ya=(Ra=String.fromCodePoint)!==null&&Ra!==void 0?Ra:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function _r(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=gr.get(e))!==null&&t!==void 0?t:e}var re;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(re||(re={}));const Ar=32;var Ue;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ue||(Ue={}));function Ma(e){return e>=re.ZERO&&e<=re.NINE}function Nr(e){return e>=re.UPPER_A&&e<=re.UPPER_F||e>=re.LOWER_A&&e<=re.LOWER_F}function Cr(e){return e>=re.UPPER_A&&e<=re.UPPER_Z||e>=re.LOWER_A&&e<=re.LOWER_Z||Ma(e)}function Ir(e){return e===re.EQUALS||Cr(e)}var ue;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ue||(ue={}));var Ne;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ne||(Ne={}));class Pa{constructor(t,a,i){this.decodeTree=t,this.emitCodePoint=a,this.errors=i,this.state=ue.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ne.Strict}startEntity(t){this.decodeMode=t,this.state=ue.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case ue.EntityStart:return t.charCodeAt(a)===re.NUM?(this.state=ue.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=ue.NamedEntity,this.stateNamedEntity(t,a));case ue.NumericStart:return this.stateNumericStart(t,a);case ue.NumericDecimal:return this.stateNumericDecimal(t,a);case ue.NumericHex:return this.stateNumericHex(t,a);case ue.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|Ar)===re.LOWER_X?(this.state=ue.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=ue.NumericDecimal,this.stateNumericDecimal(t,a))}addToNumericResult(t,a,i,n){if(a!==i){const r=i-a;this.result=this.result*Math.pow(n,r)+parseInt(t.substr(a,r),n),this.consumed+=r}}stateNumericHex(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(Ma(n)||Nr(n))a+=1;else return this.addToNumericResult(t,i,a,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,i,a,16),-1}stateNumericDecimal(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(Ma(n))a+=1;else return this.addToNumericResult(t,i,a,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,i,a,10),-1}emitNumericEntity(t,a){var i;if(this.consumed<=a)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===re.SEMI)this.consumed+=1;else if(this.decodeMode===Ne.Strict)return 0;return this.emitCodePoint(_r(this.result),this.consumed),this.errors&&(t!==re.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,a){const{decodeTree:i}=this;let n=i[this.treeIndex],r=(n&Ue.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const u=t.charCodeAt(a);if(this.treeIndex=Sr(i,n,this.treeIndex+Math.max(1,r),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ne.Attribute&&(r===0||Ir(u))?0:this.emitNotTerminatedNamedEntity();if(n=i[this.treeIndex],r=(n&Ue.VALUE_LENGTH)>>14,r!==0){if(u===re.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==Ne.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:a,decodeTree:i}=this,n=(i[a]&Ue.VALUE_LENGTH)>>14;return this.emitNamedEntityData(a,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,i){const{decodeTree:n}=this;return this.emitCodePoint(a===1?n[t]&~Ue.VALUE_LENGTH:n[t+1],i),a===3&&this.emitCodePoint(n[t+2],i),i}end(){var t;switch(this.state){case ue.NamedEntity:return this.result!==0&&(this.decodeMode!==Ne.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ue.NumericDecimal:return this.emitNumericEntity(0,2);case ue.NumericHex:return this.emitNumericEntity(0,3);case ue.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ue.EntityStart:return 0}}}function wi(e){let t="";const a=new Pa(e,i=>t+=ya(i));return function(n,r){let u=0,o=0;for(;(o=n.indexOf("&",o))>=0;){t+=n.slice(u,o),a.startEntity(r);const f=a.write(n,o+1);if(f<0){u=o+a.end();break}u=o+f,o=f===0?u+1:u}const l=t+n.slice(u);return t="",l}}function Sr(e,t,a,i){const n=(t&Ue.BRANCH_LENGTH)>>7,r=t&Ue.JUMP_TABLE;if(n===0)return r!==0&&i===r?a:-1;if(r){const l=i-r;return l<0||l>=n?-1:e[a+l]-1}let u=a,o=u+n-1;for(;u<=o;){const l=u+o>>>1,f=e[l];if(f<i)u=l+1;else if(f>i)o=l-1;else return e[l+n]}return-1}wi(La),wi(vi);const Bi=/["&'<>$\x80-\uFFFF]/g,xr=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),Or=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function Ui(e){let t="",a=0,i;for(;(i=Bi.exec(e))!==null;){const n=i.index,r=e.charCodeAt(n),u=xr.get(r);u!==void 0?(t+=e.substring(a,n)+u,a=n+1):(t+=`${e.substring(a,n)}&#x${Or(e,n).toString(16)};`,a=Bi.lastIndex+=+((r&64512)===55296))}return t+e.substr(a)}function Fi(e,t){return function(i){let n,r=0,u="";for(;n=e.exec(i);)r!==n.index&&(u+=i.substring(r,n.index)),u+=t.get(n[0].charCodeAt(0)),r=n.index+1;return u+i.substring(r)}}const Hi=Fi(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Yi=Fi(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),Dr=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Lr=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Rr=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function yr(e){return e.replace(/"/g,""")}function Mr(e,t){var a;if(!e)return;const i=((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)===!1?yr:t.xmlMode||t.encodeEntities!=="utf8"?Ui:Hi;return Object.keys(e).map(n=>{var r,u;const o=(r=e[n])!==null&&r!==void 0?r:"";return t.xmlMode==="foreign"&&(n=(u=Lr.get(n))!==null&&u!==void 0?u:n),!t.emptyAttrs&&!t.xmlMode&&o===""?n:`${n}="${i(o)}"`}).join(" ")}const Vi=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Xt(e,t={}){const a="length"in e?e:[e];let i="";for(let n=0;n<a.length;n++)i+=Pr(a[n],t);return i}function Pr(e,t){switch(e.type){case cr:return Xt(e.children,t);case pr:case dr:return Br(e);case hr:return Hr(e);case Tr:return Fr(e);case fr:case Er:case mr:return wr(e,t);case lr:return Ur(e,t)}}const kr=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),vr=new Set(["svg","math"]);function wr(e,t){var a;t.xmlMode==="foreign"&&(e.name=(a=Dr.get(e.name))!==null&&a!==void 0?a:e.name,e.parent&&kr.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&vr.has(e.name)&&(t={...t,xmlMode:"foreign"});let i=`<${e.name}`;const n=Mr(e.attribs,t);return n&&(i+=` ${n}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&Vi.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=Xt(e.children,t)),(t.xmlMode||!Vi.has(e.name))&&(i+=`</${e.name}>`)),i}function Br(e){return`<${e.data}>`}function Ur(e,t){var a;let i=e.data||"";return((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&Rr.has(e.parent.name))&&(i=t.xmlMode||t.encodeEntities!=="utf8"?Ui(i):Yi(i)),i}function Fr(e){return`<![CDATA[${e.children[0].data}]]>`}function Hr(e){return`<!--${e.data}-->`}function qi(e,t){return Xt(e,t)}function Yr(e,t){return se(e)?e.children.map(a=>qi(a,t)).join(""):""}function Gt(e){return Array.isArray(e)?e.map(Gt).join(""):v(e)?e.name==="br"?`
|
2
|
+
`:Gt(e.children):qt(e)?Gt(e.children):De(e)?e.data:""}function nt(e){return Array.isArray(e)?e.map(nt).join(""):se(e)&&!Wt(e)?nt(e.children):De(e)?e.data:""}function $t(e){return Array.isArray(e)?e.map($t).join(""):se(e)&&(e.type===Q.Tag||qt(e))?$t(e.children):De(e)?e.data:""}function Qt(e){return se(e)?e.children:[]}function Wi(e){return e.parent||null}function Xi(e){const t=Wi(e);if(t!=null)return Qt(t);const a=[e];let{prev:i,next:n}=e;for(;i!=null;)a.unshift(i),{prev:i}=i;for(;n!=null;)a.push(n),{next:n}=n;return a}function Vr(e,t){var a;return(a=e.attribs)===null||a===void 0?void 0:a[t]}function qr(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function Wr(e){return e.name}function ka(e){let{next:t}=e;for(;t!==null&&!v(t);)({next:t}=t);return t}function va(e){let{prev:t}=e;for(;t!==null&&!v(t);)({prev:t}=t);return t}function $e(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,a=t.lastIndexOf(e);a>=0&&t.splice(a,1)}e.next=null,e.prev=null,e.parent=null}function Xr(e,t){const a=t.prev=e.prev;a&&(a.next=t);const i=t.next=e.next;i&&(i.prev=t);const n=t.parent=e.parent;if(n){const r=n.children;r[r.lastIndexOf(e)]=t,e.parent=null}}function Gr(e,t){if($e(t),t.next=null,t.parent=e,e.children.push(t)>1){const a=e.children[e.children.length-2];a.next=t,t.prev=a}else t.prev=null}function $r(e,t){$e(t);const{parent:a}=e,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=a,i){if(i.prev=t,a){const n=a.children;n.splice(n.lastIndexOf(i),0,t)}}else a&&a.children.push(t)}function Qr(e,t){if($e(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){const a=e.children[1];a.prev=t,t.next=a}else t.next=null}function jr(e,t){$e(t);const{parent:a}=e;if(a){const i=a.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=a,t.prev=e.prev,t.next=e,e.prev=t}function jt(e,t,a=!0,i=1/0){return wa(e,Array.isArray(t)?t:[t],a,i)}function wa(e,t,a,i){const n=[],r=[t],u=[0];for(;;){if(u[0]>=r[0].length){if(u.length===1)return n;r.shift(),u.shift();continue}const o=r[0][u[0]++];if(e(o)&&(n.push(o),--i<=0))return n;a&&se(o)&&o.children.length>0&&(u.unshift(0),r.unshift(o.children))}}function zr(e,t){return t.find(e)}function Ba(e,t,a=!0){let i=null;for(let n=0;n<t.length&&!i;n++){const r=t[n];if(v(r))e(r)?i=r:a&&r.children.length>0&&(i=Ba(e,r.children,!0));else continue}return i}function Gi(e,t){return t.some(a=>v(a)&&(e(a)||Gi(e,a.children)))}function Kr(e,t){const a=[],i=[t],n=[0];for(;;){if(n[0]>=i[0].length){if(i.length===1)return a;i.shift(),n.shift();continue}const r=i[0][n[0]++];v(r)&&(e(r)&&a.push(r),r.children.length>0&&(n.unshift(0),i.unshift(r.children)))}}const zt={tag_name(e){return typeof e=="function"?t=>v(t)&&e(t.name):e==="*"?v:t=>v(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>De(t)&&e(t.data):t=>De(t)&&t.data===e}};function $i(e,t){return typeof t=="function"?a=>v(a)&&t(a.attribs[e]):a=>v(a)&&a.attribs[e]===t}function Zr(e,t){return a=>e(a)||t(a)}function Qi(e){const t=Object.keys(e).map(a=>{const i=e[a];return Object.prototype.hasOwnProperty.call(zt,a)?zt[a](i):$i(a,i)});return t.length===0?null:t.reduce(Zr)}function Jr(e,t){const a=Qi(e);return a?a(t):!0}function eu(e,t,a,i=1/0){const n=Qi(e);return n?jt(n,t,a,i):[]}function tu(e,t,a=!0){return Array.isArray(t)||(t=[t]),Ba($i("id",e),t,a)}function st(e,t,a=!0,i=1/0){return jt(zt.tag_name(e),t,a,i)}function au(e,t,a=!0,i=1/0){return jt(zt.tag_type(e),t,a,i)}function iu(e){let t=e.length;for(;--t>=0;){const a=e[t];if(t>0&&e.lastIndexOf(a,t-1)>=0){e.splice(t,1);continue}for(let i=a.parent;i;i=i.parent)if(e.includes(i)){e.splice(t,1);break}}return e}var Ce;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(Ce||(Ce={}));function ji(e,t){const a=[],i=[];if(e===t)return 0;let n=se(e)?e:e.parent;for(;n;)a.unshift(n),n=n.parent;for(n=se(t)?t:t.parent;n;)i.unshift(n),n=n.parent;const r=Math.min(a.length,i.length);let u=0;for(;u<r&&a[u]===i[u];)u++;if(u===0)return Ce.DISCONNECTED;const o=a[u-1],l=o.children,f=a[u],E=i[u];return l.indexOf(f)>l.indexOf(E)?o===t?Ce.FOLLOWING|Ce.CONTAINED_BY:Ce.FOLLOWING:o===e?Ce.PRECEDING|Ce.CONTAINS:Ce.PRECEDING}function rt(e){return e=e.filter((t,a,i)=>!i.includes(t,a+1)),e.sort((t,a)=>{const i=ji(t,a);return i&Ce.PRECEDING?-1:i&Ce.FOLLOWING?1:0}),e}function nu(e){const t=Kt(cu,e);return t?t.name==="feed"?su(t):ru(t):null}function su(e){var t;const a=e.children,i={type:"atom",items:st("entry",a).map(u=>{var o;const{children:l}=u,f={media:zi(l)};fe(f,"id","id",l),fe(f,"title","title",l);const E=(o=Kt("link",l))===null||o===void 0?void 0:o.attribs.href;E&&(f.link=E);const T=Fe("summary",l)||Fe("content",l);T&&(f.description=T);const b=Fe("updated",l);return b&&(f.pubDate=new Date(b)),f})};fe(i,"id","id",a),fe(i,"title","title",a);const n=(t=Kt("link",a))===null||t===void 0?void 0:t.attribs.href;n&&(i.link=n),fe(i,"description","subtitle",a);const r=Fe("updated",a);return r&&(i.updated=new Date(r)),fe(i,"author","email",a,!0),i}function ru(e){var t,a;const i=(a=(t=Kt("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&a!==void 0?a:[],n={type:e.name.substr(0,3),id:"",items:st("item",e.children).map(u=>{const{children:o}=u,l={media:zi(o)};fe(l,"id","guid",o),fe(l,"title","title",o),fe(l,"link","link",o),fe(l,"description","description",o);const f=Fe("pubDate",o)||Fe("dc:date",o);return f&&(l.pubDate=new Date(f)),l})};fe(n,"title","title",i),fe(n,"link","link",i),fe(n,"description","description",i);const r=Fe("lastBuildDate",i);return r&&(n.updated=new Date(r)),fe(n,"author","managingEditor",i,!0),n}const uu=["url","type","lang"],ou=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function zi(e){return st("media:content",e).map(t=>{const{attribs:a}=t,i={medium:a.medium,isDefault:!!a.isDefault};for(const n of uu)a[n]&&(i[n]=a[n]);for(const n of ou)a[n]&&(i[n]=parseInt(a[n],10));return a.expression&&(i.expression=a.expression),i})}function Kt(e,t){return st(e,t,!0,1)[0]}function Fe(e,t,a=!1){return nt(st(e,t,a,1)).trim()}function fe(e,t,a,i,n=!1){const r=Fe(a,i,n);r&&(e[t]=r)}function cu(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const Zt=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return Ce},append:$r,appendChild:Gr,compareDocumentPosition:ji,existsOne:Gi,filter:jt,find:wa,findAll:Kr,findOne:Ba,findOneChild:zr,getAttributeValue:Vr,getChildren:Qt,getElementById:tu,getElements:eu,getElementsByTagName:st,getElementsByTagType:au,getFeed:nu,getInnerHTML:Yr,getName:Wr,getOuterHTML:qi,getParent:Wi,getSiblings:Xi,getText:Gt,hasAttrib:qr,hasChildren:se,innerText:$t,isCDATA:qt,isComment:Wt,isDocument:Be,isTag:v,isText:De,nextElementSibling:ka,prepend:jr,prependChild:Qr,prevElementSibling:va,removeElement:$e,removeSubsets:iu,replaceElement:Xr,testElement:Jr,textContent:nt,uniqueSort:rt},Symbol.toStringTag,{value:"Module"})),lu={_useHtmlParser2:!1};function Ua(e,t){if(!e)return t??lu;const a={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(a._useHtmlParser2=!0,a.xmlMode=!0,e.xml!==!0&&Object.assign(a,e.xml)):e.xmlMode&&(a._useHtmlParser2=!0),a}function Ki(e,t,a){return e?e(t??e._root.children,null,void 0,a).toString():""}function du(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function hu(e,t){const a=du(e)?(t=e,void 0):e,i={...this===null||this===void 0?void 0:this._options,...Ua(t)};return Ki(this,a,i)}function fu(e){const t={...this._options,xmlMode:!0};return Ki(this,e,t)}function bt(e){const t=e??(this?this.root():[]);let a="";for(let i=0;i<t.length;i++)a+=nt(t[i]);return a}function Eu(e,t,a=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(a=t);const i=this.load(e,this._options,!1);return a||i("script").remove(),[...i.root()[0].children]}function mu(){return this(this._root)}function Zi(e,t){if(t===e)return!1;let a=t;for(;a&&a!==a.parent;)if(a=a.parent,a===e)return!0;return!1}function Tu(e){return this.root().extract(e)}function pu(e,t){if(!Ji(e)||!Ji(t))return;let a=e.length;const i=+t.length;for(let n=0;n<i;n++)e[a++]=t[n];return e.length=a,e}function Ji(e){if(Array.isArray(e))return!0;if(typeof e!="object"||e===null||!("length"in e)||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}const bu=Object.freeze(Object.defineProperty({__proto__:null,contains:Zi,extract:Tu,html:hu,merge:pu,parseHTML:Eu,root:mu,text:bt,xml:fu},Symbol.toStringTag,{value:"Module"}));function Pe(e){return e.cheerio!=null}function gu(e){return e.replace(/[._-](\w|$)/g,(t,a)=>a.toUpperCase())}function _u(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function te(e,t){const a=e.length;for(let i=0;i<a;i++)t(e[i],i);return e}var Qe;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(Qe||(Qe={}));function Fa(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const a=e.charCodeAt(t+1);return(a>=Qe.LowerA&&a<=Qe.LowerZ||a>=Qe.UpperA&&a<=Qe.UpperZ||a===Qe.Exclamation)&&e.includes(">",t+2)}const gt=Object.prototype.hasOwnProperty,_t=/\s+/,Ha="data-",Ya=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Au=/^{[^]*}$|^\[[^]*]$/;function Jt(e,t,a){var i;if(!(!e||!v(e))){if((i=e.attribs)!==null&&i!==void 0||(e.attribs={}),!t)return e.attribs;if(gt.call(e.attribs,t))return!a&&Ya.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return bt(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function ut(e,t,a){a===null?nn(e,t):e.attribs[t]=`${a}`}function Nu(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return te(this,(a,i)=>{v(a)&&ut(a,e,t.call(a,i,a.attribs[e]))})}return te(this,a=>{if(v(a))if(typeof e=="object")for(const i of Object.keys(e)){const n=e[i];ut(a,i,n)}else ut(a,e,t)})}return arguments.length>1?this:Jt(this[0],e,this.options.xmlMode)}function en(e,t,a){return t in e?e[t]:!a&&Ya.test(t)?Jt(e,t,!1)!==void 0:Jt(e,t,a)}function Va(e,t,a,i){t in e?e[t]=a:ut(e,t,!i&&Ya.test(t)?a?"":null:`${a}`)}function Cu(e,t){var a;if(typeof e=="string"&&t===void 0){const i=this[0];if(!i||!v(i))return;switch(e){case"style":{const n=this.css(),r=Object.keys(n);for(let u=0;u<r.length;u++)n[u]=r[u];return n.length=r.length,n}case"tagName":case"nodeName":return i.name.toUpperCase();case"href":case"src":{const n=(a=i.attribs)===null||a===void 0?void 0:a[e];return typeof URL<"u"&&(e==="href"&&(i.tagName==="a"||i.tagName==="link")||e==="src"&&(i.tagName==="img"||i.tagName==="iframe"||i.tagName==="audio"||i.tagName==="video"||i.tagName==="source"))&&n!==void 0&&this.options.baseURI?new URL(n,this.options.baseURI).href:n}case"innerText":return $t(i);case"textContent":return nt(i);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return en(i,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return te(this,(i,n)=>{v(i)&&Va(i,e,t.call(i,n,en(i,e,this.options.xmlMode)),this.options.xmlMode)})}return te(this,i=>{if(v(i))if(typeof e=="object")for(const n of Object.keys(e)){const r=e[n];Va(i,n,r,this.options.xmlMode)}else Va(i,e,t,this.options.xmlMode)})}}function tn(e,t,a){var i;(i=e.data)!==null&&i!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&a!==void 0&&(e.data[t]=a)}function Iu(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(Ha))continue;const a=gu(t.slice(Ha.length));gt.call(e.data,a)||(e.data[a]=an(e.attribs[t]))}return e.data}function Su(e,t){const a=Ha+_u(t),i=e.data;if(gt.call(i,t))return i[t];if(gt.call(e.attribs,a))return i[t]=an(e.attribs[a])}function an(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);if(e===String(t))return t;if(Au.test(e))try{return JSON.parse(e)}catch{}return e}function xu(e,t){var a;const i=this[0];if(!i||!v(i))return;const n=i;return(a=n.data)!==null&&a!==void 0||(n.data={}),e==null?Iu(n):typeof e=="object"||t!==void 0?(te(this,r=>{v(r)&&(typeof e=="object"?tn(r,e):tn(r,e,t))}),this):Su(n,e)}function Ou(e){const t=arguments.length===0,a=this[0];if(!a||!v(a))return t?void 0:this;switch(a.name){case"textarea":return this.text(e);case"select":{const i=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const n=typeof e=="object"?e:[e];for(const r of n)this.find(`option[value="${r}"]`).attr("selected","");return this}return this.attr("multiple")?i.toArray().map(n=>bt(n.children)):i.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function nn(e,t){!e.attribs||!gt.call(e.attribs,t)||delete e.attribs[t]}function ea(e){return e?e.trim().split(_t):[]}function Du(e){const t=ea(e);for(const a of t)te(this,i=>{v(i)&&nn(i,a)});return this}function Lu(e){return this.toArray().some(t=>{const a=v(t)&&t.attribs.class;let i=-1;if(a&&e.length>0)for(;(i=a.indexOf(e,i+1))>-1;){const n=i+e.length;if((i===0||_t.test(a[i-1]))&&(n===a.length||_t.test(a[n])))return!0}return!1})}function sn(e){if(typeof e=="function")return te(this,(i,n)=>{if(v(i)){const r=i.attribs.class||"";sn.call([i],e.call(i,n,r))}});if(!e||typeof e!="string")return this;const t=e.split(_t),a=this.length;for(let i=0;i<a;i++){const n=this[i];if(!v(n))continue;const r=Jt(n,"class",!1);if(r){let u=` ${r} `;for(const o of t){const l=`${o} `;u.includes(` ${l}`)||(u+=l)}ut(n,"class",u.trim())}else ut(n,"class",t.join(" ").trim())}return this}function rn(e){if(typeof e=="function")return te(this,(n,r)=>{v(n)&&rn.call([n],e.call(n,r,n.attribs.class||""))});const t=ea(e),a=t.length,i=arguments.length===0;return te(this,n=>{if(v(n))if(i)n.attribs.class="";else{const r=ea(n.attribs.class);let u=!1;for(let o=0;o<a;o++){const l=r.indexOf(t[o]);l>=0&&(r.splice(l,1),u=!0,o--)}u&&(n.attribs.class=r.join(" "))}})}function un(e,t){if(typeof e=="function")return te(this,(u,o)=>{v(u)&&un.call([u],e.call(u,o,u.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const a=e.split(_t),i=a.length,n=typeof t=="boolean"?t?1:-1:0,r=this.length;for(let u=0;u<r;u++){const o=this[u];if(!v(o))continue;const l=ea(o.attribs.class);for(let f=0;f<i;f++){const E=l.indexOf(a[f]);n>=0&&E<0?l.push(a[f]):n<=0&&E>=0&&l.splice(E,1)}o.attribs.class=l.join(" ")}return this}const Ru=Object.freeze(Object.defineProperty({__proto__:null,addClass:sn,attr:Nu,data:xu,hasClass:Lu,prop:Cu,removeAttr:Du,removeClass:rn,toggleClass:un,val:Ou},Symbol.toStringTag,{value:"Module"}));var R;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(R||(R={}));var ne;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(ne||(ne={}));const on=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,yu=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Mu=new Map([[126,ne.Element],[94,ne.Start],[36,ne.End],[42,ne.Any],[33,ne.Not],[124,ne.Hyphen]]),Pu=new Set(["has","not","matches","is","where","host","host-context"]);function At(e){switch(e.type){case R.Adjacent:case R.Child:case R.Descendant:case R.Parent:case R.Sibling:case R.ColumnCombinator:return!0;default:return!1}}const ku=new Set(["contains","icontains"]);function vu(e,t,a){const i=parseInt(t,16)-65536;return i!==i||a?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320)}function Nt(e){return e.replace(yu,vu)}function qa(e){return e===39||e===34}function cn(e){return e===32||e===9||e===10||e===12||e===13}function ta(e){const t=[],a=ln(t,`${e}`,0);if(a<e.length)throw new Error(`Unmatched selector: ${e.slice(a)}`);return t}function ln(e,t,a){let i=[];function n(b){const N=t.slice(a+b).match(on);if(!N)throw new Error(`Expected name, found ${t.slice(a)}`);const[S]=N;return a+=b+S.length,Nt(S)}function r(b){for(a+=b;a<t.length&&cn(t.charCodeAt(a));)a++}function u(){a+=1;const b=a;let N=1;for(;N>0&&a<t.length;a++)t.charCodeAt(a)===40&&!o(a)?N++:t.charCodeAt(a)===41&&!o(a)&&N--;if(N)throw new Error("Parenthesis not matched");return Nt(t.slice(b,a-1))}function o(b){let N=0;for(;t.charCodeAt(--b)===92;)N++;return(N&1)===1}function l(){if(i.length>0&&At(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function f(b){if(i.length>0&&i[i.length-1].type===R.Descendant){i[i.length-1].type=b;return}l(),i.push({type:b})}function E(b,N){i.push({type:R.Attribute,name:b,action:N,value:n(1),namespace:null,ignoreCase:"quirks"})}function T(){if(i.length&&i[i.length-1].type===R.Descendant&&i.pop(),i.length===0)throw new Error("Empty sub-selector");e.push(i)}if(r(0),t.length===a)return a;e:for(;a<t.length;){const b=t.charCodeAt(a);switch(b){case 32:case 9:case 10:case 12:case 13:{(i.length===0||i[0].type!==R.Descendant)&&(l(),i.push({type:R.Descendant})),r(1);break}case 62:{f(R.Child),r(1);break}case 60:{f(R.Parent),r(1);break}case 126:{f(R.Sibling),r(1);break}case 43:{f(R.Adjacent),r(1);break}case 46:{E("class",ne.Element);break}case 35:{E("id",ne.Equals);break}case 91:{r(1);let N,S=null;t.charCodeAt(a)===124?N=n(1):t.startsWith("*|",a)?(S="*",N=n(2)):(N=n(0),t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==61&&(S=N,N=n(1))),r(0);let y=ne.Exists;const P=Mu.get(t.charCodeAt(a));if(P){if(y=P,t.charCodeAt(a+1)!==61)throw new Error("Expected `=`");r(2)}else t.charCodeAt(a)===61&&(y=ne.Equals,r(1));let X="",B=null;if(y!=="exists"){if(qa(t.charCodeAt(a))){const k=t.charCodeAt(a);let _=a+1;for(;_<t.length&&(t.charCodeAt(_)!==k||o(_));)_+=1;if(t.charCodeAt(_)!==k)throw new Error("Attribute value didn't end");X=Nt(t.slice(a+1,_)),a=_+1}else{const k=a;for(;a<t.length&&(!cn(t.charCodeAt(a))&&t.charCodeAt(a)!==93||o(a));)a+=1;X=Nt(t.slice(k,a))}r(0);const F=t.charCodeAt(a)|32;F===115?(B=!1,r(1)):F===105&&(B=!0,r(1))}if(t.charCodeAt(a)!==93)throw new Error("Attribute selector didn't terminate");a+=1;const q={type:R.Attribute,name:N,action:y,value:X,namespace:S,ignoreCase:B};i.push(q);break}case 58:{if(t.charCodeAt(a+1)===58){i.push({type:R.PseudoElement,name:n(2).toLowerCase(),data:t.charCodeAt(a)===40?u():null});continue}const N=n(1).toLowerCase();let S=null;if(t.charCodeAt(a)===40)if(Pu.has(N)){if(qa(t.charCodeAt(a+1)))throw new Error(`Pseudo-selector ${N} cannot be quoted`);if(S=[],a=ln(S,t,a+1),t.charCodeAt(a)!==41)throw new Error(`Missing closing parenthesis in :${N} (${t})`);a+=1}else{if(S=u(),ku.has(N)){const y=S.charCodeAt(0);y===S.charCodeAt(S.length-1)&&qa(y)&&(S=S.slice(1,-1))}S=Nt(S)}i.push({type:R.Pseudo,name:N,data:S});break}case 44:{T(),i=[],r(1);break}default:{if(t.startsWith("/*",a)){const y=t.indexOf("*/",a+2);if(y<0)throw new Error("Comment was not terminated");a=y+2,i.length===0&&r(0);break}let N=null,S;if(b===42)a+=1,S="*";else if(b===124){if(S="",t.charCodeAt(a+1)===124){f(R.ColumnCombinator),r(2);break}}else if(on.test(t.slice(a)))S=n(0);else break e;t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==124&&(N=S,t.charCodeAt(a+1)===42?(S="*",a+=2):S=n(1)),i.push(S==="*"?{type:R.Universal,namespace:N}:{type:R.Tag,name:S,namespace:N})}}}return T(),a}function wu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var aa={trueFunc:function(){return!0},falseFunc:function(){return!1}};const U=wu(aa),dn=new Map([[R.Universal,50],[R.Tag,30],[R.Attribute,1],[R.Pseudo,0]]);function Wa(e){return!dn.has(e.type)}const Bu=new Map([[ne.Exists,10],[ne.Equals,8],[ne.Not,7],[ne.Start,6],[ne.End,6],[ne.Any,5]]);function Uu(e){const t=e.map(hn);for(let a=1;a<e.length;a++){const i=t[a];if(!(i<0))for(let n=a-1;n>=0&&i<t[n];n--){const r=e[n+1];e[n+1]=e[n],e[n]=r,t[n+1]=t[n],t[n]=i}}}function hn(e){var t,a;let i=(t=dn.get(e.type))!==null&&t!==void 0?t:-1;return e.type===R.Attribute?(i=(a=Bu.get(e.action))!==null&&a!==void 0?a:4,e.action===ne.Equals&&e.name==="id"&&(i=9),e.ignoreCase&&(i>>=1)):e.type===R.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?i=0:Array.isArray(e.data)?(i=Math.min(...e.data.map(n=>Math.min(...n.map(hn)))),i<0&&(i=0)):i=2:i=3),i}const Fu=/[-[\]{}()*+?.,\\^$|#\s]/g;function fn(e){return e.replace(Fu,"\\$&")}const Hu=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function je(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&Hu.has(e.name)}const Yu={equals(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return je(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return o!=null&&o.length===r.length&&o.toLowerCase()===r&&e(u)}):u=>i.getAttributeValue(u,n)===r&&e(u)},hyphen(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return je(t,a)?(r=r.toLowerCase(),function(l){const f=i.getAttributeValue(l,n);return f!=null&&(f.length===u||f.charAt(u)==="-")&&f.substr(0,u).toLowerCase()===r&&e(l)}):function(l){const f=i.getAttributeValue(l,n);return f!=null&&(f.length===u||f.charAt(u)==="-")&&f.substr(0,u)===r&&e(l)}},element(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(/\s/.test(r))return U.falseFunc;const u=new RegExp(`(?:^|\\s)${fn(r)}(?:$|\\s)`,je(t,a)?"i":"");return function(l){const f=i.getAttributeValue(l,n);return f!=null&&f.length>=r.length&&u.test(f)&&e(l)}},exists(e,{name:t},{adapter:a}){return i=>a.hasAttrib(i,t)&&e(i)},start(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return u===0?U.falseFunc:je(t,a)?(r=r.toLowerCase(),o=>{const l=i.getAttributeValue(o,n);return l!=null&&l.length>=u&&l.substr(0,u).toLowerCase()===r&&e(o)}):o=>{var l;return!!(!((l=i.getAttributeValue(o,n))===null||l===void 0)&&l.startsWith(r))&&e(o)}},end(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=-r.length;return u===0?U.falseFunc:je(t,a)?(r=r.toLowerCase(),o=>{var l;return((l=i.getAttributeValue(o,n))===null||l===void 0?void 0:l.substr(u).toLowerCase())===r&&e(o)}):o=>{var l;return!!(!((l=i.getAttributeValue(o,n))===null||l===void 0)&&l.endsWith(r))&&e(o)}},any(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(r==="")return U.falseFunc;if(je(t,a)){const u=new RegExp(fn(r),"i");return function(l){const f=i.getAttributeValue(l,n);return f!=null&&f.length>=r.length&&u.test(f)&&e(l)}}return u=>{var o;return!!(!((o=i.getAttributeValue(u,n))===null||o===void 0)&&o.includes(r))&&e(u)}},not(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return r===""?u=>!!i.getAttributeValue(u,n)&&e(u):je(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return(o==null||o.length!==r.length||o.toLowerCase()!==r)&&e(u)}):u=>i.getAttributeValue(u,n)!==r&&e(u)}},Vu=new Set([9,10,12,13,32]),En=48,qu=57;function Wu(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,a=0,i=r(),n=u();if(t<e.length&&e.charAt(t)==="n"&&(t++,a=i*(n??1),o(),t<e.length?(i=r(),o(),n=u()):i=n=0),n===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[a,i*n];function r(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function u(){const l=t;let f=0;for(;t<e.length&&e.charCodeAt(t)>=En&&e.charCodeAt(t)<=qu;)f=f*10+(e.charCodeAt(t)-En),t++;return t===l?null:f}function o(){for(;t<e.length&&Vu.has(e.charCodeAt(t));)t++}}function Xu(e){const t=e[0],a=e[1]-1;if(a<0&&t<=0)return U.falseFunc;if(t===-1)return r=>r<=a;if(t===0)return r=>r===a;if(t===1)return a<0?U.trueFunc:r=>r>=a;const i=Math.abs(t),n=(a%i+i)%i;return t>1?r=>r>=a&&r%i===n:r=>r<=a&&r%i===n}function ia(e){return Xu(Wu(e))}function na(e,t){return a=>{const i=t.getParent(a);return i!=null&&t.isTag(i)&&e(a)}}const Xa={contains(e,t,{adapter:a}){return function(n){return e(n)&&a.getText(n).includes(t)}},icontains(e,t,{adapter:a}){const i=t.toLowerCase();return function(r){return e(r)&&a.getText(r).toLowerCase().includes(i)}},"nth-child"(e,t,{adapter:a,equals:i}){const n=ia(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?na(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let f=0;f<o.length&&!i(u,o[f]);f++)a.isTag(o[f])&&l++;return n(l)&&e(u)}},"nth-last-child"(e,t,{adapter:a,equals:i}){const n=ia(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?na(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let f=o.length-1;f>=0&&!i(u,o[f]);f--)a.isTag(o[f])&&l++;return n(l)&&e(u)}},"nth-of-type"(e,t,{adapter:a,equals:i}){const n=ia(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?na(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let f=0;f<o.length;f++){const E=o[f];if(i(u,E))break;a.isTag(E)&&a.getName(E)===a.getName(u)&&l++}return n(l)&&e(u)}},"nth-last-of-type"(e,t,{adapter:a,equals:i}){const n=ia(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?na(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let f=o.length-1;f>=0;f--){const E=o[f];if(i(u,E))break;a.isTag(E)&&a.getName(E)===a.getName(u)&&l++}return n(l)&&e(u)}},root(e,t,{adapter:a}){return i=>{const n=a.getParent(i);return(n==null||!a.isTag(n))&&e(i)}},scope(e,t,a,i){const{equals:n}=a;return!i||i.length===0?Xa.root(e,t,a):i.length===1?r=>n(i[0],r)&&e(r):r=>i.includes(r)&&e(r)},hover:Ga("isHovered"),visited:Ga("isVisited"),active:Ga("isActive")};function Ga(e){return function(a,i,{adapter:n}){const r=n[e];return typeof r!="function"?U.falseFunc:function(o){return r(o)&&a(o)}}}const mn={empty(e,{adapter:t}){return!t.getChildren(e).some(a=>t.isTag(a)||t.getText(a)!=="")},"first-child"(e,{adapter:t,equals:a}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;const i=t.getSiblings(e).find(n=>t.isTag(n));return i!=null&&a(e,i)},"last-child"(e,{adapter:t,equals:a}){const i=t.getSiblings(e);for(let n=i.length-1;n>=0;n--){if(a(e,i[n]))return!0;if(t.isTag(i[n]))break}return!1},"first-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=0;r<i.length;r++){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"last-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=i.length-1;r>=0;r--){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"only-of-type"(e,{adapter:t,equals:a}){const i=t.getName(e);return t.getSiblings(e).every(n=>a(e,n)||!t.isTag(n)||t.getName(n)!==i)},"only-child"(e,{adapter:t,equals:a}){return t.getSiblings(e).every(i=>a(e,i)||!t.isTag(i))}};function Tn(e,t,a,i){if(a===null){if(e.length>i)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===i)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const Gu={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
|
3
|
+
:is(button, input, select, textarea, optgroup, option)[disabled],
|
4
|
+
optgroup[disabled] > option,
|
5
|
+
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
|
6
|
+
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},pn={};function $u(e,t){return e===U.falseFunc?U.falseFunc:a=>t.isTag(a)&&e(a)}function bn(e,t){const a=t.getSiblings(e);if(a.length<=1)return[];const i=a.indexOf(e);return i<0||i===a.length-1?[]:a.slice(i+1).filter(t.isTag)}function $a(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const Qa=(e,t,a,i,n)=>{const r=n(t,$a(a),i);return r===U.trueFunc?e:r===U.falseFunc?U.falseFunc:u=>r(u)&&e(u)},ja={is:Qa,matches:Qa,where:Qa,not(e,t,a,i,n){const r=n(t,$a(a),i);return r===U.falseFunc?e:r===U.trueFunc?U.falseFunc:u=>!r(u)&&e(u)},has(e,t,a,i,n){const{adapter:r}=a,u=$a(a);u.relativeSelector=!0;const o=t.some(E=>E.some(Wa))?[pn]:void 0,l=n(t,u,o);if(l===U.falseFunc)return U.falseFunc;const f=$u(l,r);if(o&&l!==U.trueFunc){const{shouldTestNextSiblings:E=!1}=l;return T=>{if(!e(T))return!1;o[0]=T;const b=r.getChildren(T),N=E?[...b,...bn(T,r)]:b;return r.existsOne(f,N)}}return E=>e(E)&&r.existsOne(f,r.getChildren(E))}};function Qu(e,t,a,i,n){var r;const{name:u,data:o}=t;if(Array.isArray(o)){if(!(u in ja))throw new Error(`Unknown pseudo-class :${u}(${o})`);return ja[u](e,o,a,i,n)}const l=(r=a.pseudos)===null||r===void 0?void 0:r[u],f=typeof l=="string"?l:Gu[u];if(typeof f=="string"){if(o!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);const E=ta(f);return ja.is(e,E,a,i,n)}if(typeof l=="function")return Tn(l,u,o,1),E=>l(E,o)&&e(E);if(u in Xa)return Xa[u](e,o,a,i);if(u in mn){const E=mn[u];return Tn(E,u,o,2),T=>E(T,a,o)&&e(T)}throw new Error(`Unknown pseudo-class :${u}`)}function za(e,t){const a=t.getParent(e);return a&&t.isTag(a)?a:null}function ju(e,t,a,i,n){const{adapter:r,equals:u}=a;switch(t.type){case R.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case R.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case R.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!a.xmlMode||a.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),Yu[t.action](e,t,a)}case R.Pseudo:return Qu(e,t,a,i,n);case R.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:o}=t;return(!a.xmlMode||a.lowerCaseTags)&&(o=o.toLowerCase()),function(f){return r.getName(f)===o&&e(f)}}case R.Descendant:{if(a.cacheResults===!1||typeof WeakSet>"u")return function(f){let E=f;for(;E=za(E,r);)if(e(E))return!0;return!1};const o=new WeakSet;return function(f){let E=f;for(;E=za(E,r);)if(!o.has(E)){if(r.isTag(E)&&e(E))return!0;o.add(E)}return!1}}case"_flexibleDescendant":return function(l){let f=l;do if(e(f))return!0;while(f=za(f,r));return!1};case R.Parent:return function(l){return r.getChildren(l).some(f=>r.isTag(f)&&e(f))};case R.Child:return function(l){const f=r.getParent(l);return f!=null&&r.isTag(f)&&e(f)};case R.Sibling:return function(l){const f=r.getSiblings(l);for(let E=0;E<f.length;E++){const T=f[E];if(u(l,T))break;if(r.isTag(T)&&e(T))return!0}return!1};case R.Adjacent:return r.prevElementSibling?function(l){const f=r.prevElementSibling(l);return f!=null&&e(f)}:function(l){const f=r.getSiblings(l);let E;for(let T=0;T<f.length;T++){const b=f[T];if(u(l,b))break;r.isTag(b)&&(E=b)}return!!E&&e(E)};case R.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function gn(e){return e.type===R.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(gn)))}const zu={type:R.Descendant},Ku={type:"_flexibleDescendant"},Zu={type:R.Pseudo,name:"scope",data:null};function Ju(e,{adapter:t},a){const i=!!(a!=null&&a.every(n=>{const r=t.isTag(n)&&t.getParent(n);return n===pn||r&&t.isTag(r)}));for(const n of e){if(!(n.length>0&&Wa(n[0])&&n[0].type!==R.Descendant))if(i&&!n.some(gn))n.unshift(zu);else continue;n.unshift(Zu)}}function _n(e,t,a){var i;e.forEach(Uu),a=(i=t.context)!==null&&i!==void 0?i:a;const n=Array.isArray(a),r=a&&(Array.isArray(a)?a:[a]);if(t.relativeSelector!==!1)Ju(e,t,r);else if(e.some(l=>l.length>0&&Wa(l[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let u=!1;const o=e.map(l=>{if(l.length>=2){const[f,E]=l;f.type!==R.Pseudo||f.name!=="scope"||(n&&E.type===R.Descendant?l[1]=Ku:(E.type===R.Adjacent||E.type===R.Sibling)&&(u=!0))}return eo(l,t,r)}).reduce(to,U.falseFunc);return o.shouldTestNextSiblings=u,o}function eo(e,t,a){var i;return e.reduce((n,r)=>n===U.falseFunc?U.falseFunc:ju(n,r,t,a,_n),(i=t.rootFunc)!==null&&i!==void 0?i:U.trueFunc)}function to(e,t){return t===U.falseFunc||e===U.trueFunc?e:e===U.falseFunc||t===U.trueFunc?t:function(i){return e(i)||t(i)}}const An=(e,t)=>e===t,ao={adapter:Zt,equals:An};function io(e){var t,a,i,n;const r=e??ao;return(t=r.adapter)!==null&&t!==void 0||(r.adapter=Zt),(a=r.equals)!==null&&a!==void 0||(r.equals=(n=(i=r.adapter)===null||i===void 0?void 0:i.equals)!==null&&n!==void 0?n:An),r}function no(e){return function(a,i,n){const r=io(i);return e(a,r,n)}}const Ka=no(_n);function Nn(e,t,a=!1){return a&&(e=so(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function so(e,t){const a=Array.isArray(e)?e.slice(0):[e],i=a.length;for(let n=0;n<i;n++){const r=bn(a[n],t);a.push(...r)}return a}const ro=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function sa(e){return e.type!=="pseudo"?!1:ro.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(sa)):!1}function uo(e,t,a){const i=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(i)?i>=0?i+1:1/0:0;case"lt":return isFinite(i)?i>=0?Math.min(i,a):1/0:0;case"gt":return isFinite(i)?1/0:0;case"odd":return 2*a;case"even":return 2*a-1;case"last":case"not":return 1/0}}function oo(e){for(;e.parent;)e=e.parent;return e}function Za(e){const t=[],a=[];for(const i of e)i.some(sa)?t.push(i):a.push(i);return[a,t]}const co={type:R.Universal,namespace:null},lo={type:R.Pseudo,name:"scope",data:null};function Cn(e,t,a={}){return In([e],t,a)}function In(e,t,a={}){if(typeof t=="function")return e.some(t);const[i,n]=Za(ta(t));return i.length>0&&e.some(Ka(i,a))||n.some(r=>On(r,e,a).length>0)}function ho(e,t,a,i){const n=typeof a=="string"?parseInt(a,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(n)&&Math.abs(n)<t.length?[n<0?t[t.length+n]:t[n]]:[];case"gt":return isFinite(n)?t.slice(n+1):[];case"even":return t.filter((r,u)=>u%2===0);case"odd":return t.filter((r,u)=>u%2===1);case"not":{const r=new Set(xn(a,t,i));return t.filter(u=>!r.has(u))}}}function Sn(e,t,a={}){return xn(ta(e),t,a)}function xn(e,t,a){if(t.length===0)return[];const[i,n]=Za(e);let r;if(i.length){const u=ei(t,i,a);if(n.length===0)return u;u.length&&(r=new Set(u))}for(let u=0;u<n.length&&(r==null?void 0:r.size)!==t.length;u++){const o=n[u];if((r?t.filter(E=>v(E)&&!r.has(E)):t).length===0)break;const f=On(o,t,a);if(f.length)if(r)f.forEach(E=>r.add(E));else{if(u===n.length-1)return f;r=new Set(f)}}return typeof r<"u"?r.size===t.length?t:t.filter(u=>r.has(u)):[]}function On(e,t,a){var i;if(e.some(At)){const n=(i=a.root)!==null&&i!==void 0?i:oo(t[0]),r={...a,context:t,relativeSelector:!1};return e.push(lo),ra(n,e,r,!0,t.length)}return ra(t,e,a,!1,t.length)}function fo(e,t,a={},i=1/0){if(typeof e=="function")return Dn(t,e);const[n,r]=Za(ta(e)),u=r.map(o=>ra(t,o,a,!0,i));return n.length&&u.push(Ja(t,n,a,i)),u.length===0?[]:u.length===1?u[0]:rt(u.reduce((o,l)=>[...o,...l]))}function ra(e,t,a,i,n){const r=t.findIndex(sa),u=t.slice(0,r),o=t[r],l=t.length-1===r?n:1/0,f=uo(o.name,o.data,l);if(f===0)return[];const T=(u.length===0&&!Array.isArray(e)?Qt(e).filter(v):u.length===0?(Array.isArray(e)?e:[e]).filter(v):i||u.some(At)?Ja(e,[u],a,f):ei(e,[u],a)).slice(0,f);let b=ho(o.name,T,o.data,a);if(b.length===0||t.length===r+1)return b;const N=t.slice(r+1),S=N.some(At);if(S){if(At(N[0])){const{type:y}=N[0];(y===R.Sibling||y===R.Adjacent)&&(b=Nn(b,Zt,!0)),N.unshift(co)}a={...a,relativeSelector:!1,rootFunc:y=>b.includes(y)}}else a.rootFunc&&a.rootFunc!==aa.trueFunc&&(a={...a,rootFunc:aa.trueFunc});return N.some(sa)?ra(b,N,a,!1,n):S?Ja(b,[N],a,n):ei(b,[N],a)}function Ja(e,t,a,i){const n=Ka(t,a,e);return Dn(e,n,i)}function Dn(e,t,a=1/0){const i=Nn(e,Zt,t.shouldTestNextSiblings);return wa(n=>v(n)&&t(n),i,!0,a)}function ei(e,t,a){const i=(Array.isArray(e)?e:[e]).filter(v);if(i.length===0)return i;const n=Ka(t,a);return n===aa.trueFunc?i:i.filter(n)}const Eo=/^\s*[+~]/;function mo(e){if(!e)return this._make([]);if(typeof e!="string"){const t=Pe(e)?e.toArray():[e],a=this.toArray();return this._make(t.filter(i=>a.some(n=>Zi(n,i))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function To(e,t){var a;const i=this.toArray(),n=Eo.test(e)?i:this.children().toArray(),r={context:i,root:(a=this._root)===null||a===void 0?void 0:a[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(fo(e,n,r,t))}function ti(e){return function(t,...a){return function(i){var n;let r=e(t,this);return i&&(r=ni(r,i,this.options.xmlMode,(n=this._root)===null||n===void 0?void 0:n[0])),this._make(this.length>1&&r.length>1?a.reduce((u,o)=>o(u),r):r)}}}const Ct=ti((e,t)=>{let a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n.length>0&&(a=a.concat(n))}return a}),ai=ti((e,t)=>{const a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n!==null&&a.push(n)}return a});function ii(e,...t){let a=null;const i=ti((n,r)=>{const u=[];return te(r,o=>{for(let l;(l=n(o))&&!(a!=null&&a(l,u.length));o=l)u.push(l)}),u})(e,...t);return function(n,r){a=typeof n=="string"?o=>Cn(o,n,this.options):n?It(n):null;const u=i.call(this,r);return a=null,u}}function ot(e){return e.length>1?Array.from(new Set(e)):e}const po=ai(({parent:e})=>e&&!Be(e)?e:null,ot),bo=Ct(e=>{const t=[];for(;e.parent&&!Be(e.parent);)t.push(e.parent),e=e.parent;return t},rt,e=>e.reverse()),go=ii(({parent:e})=>e&&!Be(e)?e:null,rt,e=>e.reverse());function _o(e){var t;const a=[];if(!e)return this._make(a);const i={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},n=typeof e=="string"?r=>Cn(r,e,i):It(e);return te(this,r=>{for(r&&!Be(r)&&!v(r)&&(r=r.parent);r&&v(r);){if(n(r,0)){a.includes(r)||a.push(r);break}r=r.parent}}),this._make(a)}const Ao=ai(e=>ka(e)),No=Ct(e=>{const t=[];for(;e.next;)e=e.next,v(e)&&t.push(e);return t},ot),Co=ii(e=>ka(e),ot),Io=ai(e=>va(e)),So=Ct(e=>{const t=[];for(;e.prev;)e=e.prev,v(e)&&t.push(e);return t},ot),xo=ii(e=>va(e),ot),Oo=Ct(e=>Xi(e).filter(t=>v(t)&&t!==e),rt),Do=Ct(e=>Qt(e).filter(v),ot);function Lo(){const e=this.toArray().reduce((t,a)=>se(a)?t.concat(a.children):t,[]);return this._make(e)}function Ro(e){let t=0;const a=this.length;for(;t<a&&e.call(this[t],t,this[t])!==!1;)++t;return this}function yo(e){let t=[];for(let a=0;a<this.length;a++){const i=this[a],n=e.call(i,a,i);n!=null&&(t=t.concat(n))}return this._make(t)}function It(e){return typeof e=="function"?(t,a)=>e.call(t,a,t):Pe(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function Mo(e){var t;return this._make(ni(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function ni(e,t,a,i){return typeof t=="string"?Sn(t,e,{xmlMode:a,root:i}):e.filter(It(t))}function Po(e){const t=this.toArray();return typeof e=="string"?In(t.filter(v),e,this.options):e?t.some(It(e)):!1}function ko(e){let t=this.toArray();if(typeof e=="string"){const a=new Set(Sn(e,t,this.options));t=t.filter(i=>!a.has(i))}else{const a=It(e);t=t.filter((i,n)=>!a(i,n))}return this._make(t)}function vo(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,a)=>this._make(a).find(e).length>0)}function wo(){return this.length>1?this._make(this[0]):this}function Bo(){return this.length>0?this._make(this[this.length-1]):this}function Uo(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function Fo(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function Ho(){return Array.prototype.slice.call(this)}function Yo(e){let t,a;return e==null?(t=this.parent().children(),a=this[0]):typeof e=="string"?(t=this._make(e),a=this[0]):(t=this,a=Pe(e)?e[0]:e),Array.prototype.indexOf.call(t,a)}function Vo(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function qo(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function Wo(e,t){const a=this._make(e,t),i=rt([...this.get(),...a.get()]);return this._make(i)}function Xo(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const Go=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:To,add:Wo,addBack:Xo,children:Do,closest:_o,contents:Lo,each:Ro,end:qo,eq:Uo,filter:Mo,filterArray:ni,find:mo,first:wo,get:Fo,has:vo,index:Yo,is:Po,last:Bo,map:yo,next:Ao,nextAll:No,nextUntil:Co,not:ko,parent:po,parents:bo,parentsUntil:go,prev:Io,prevAll:So,prevUntil:xo,siblings:Oo,slice:Vo,toArray:Ho},Symbol.toStringTag,{value:"Module"}));function $o(e){return function(a,i,n,r){if(typeof Buffer<"u"&&Buffer.isBuffer(a)&&(a=a.toString()),typeof a=="string")return e(a,i,n,r);const u=a;if(!Array.isArray(u)&&Be(u))return u;const o=new Ge([]);return ze(u,o),o}}function ze(e,t){const a=Array.isArray(e)?e:[e];t?t.children=a:t=null;for(let i=0;i<a.length;i++){const n=a[i];n.parent&&n.parent.children!==a&&$e(n),t?(n.prev=a[i-1]||null,n.next=a[i+1]||null):n.prev=n.next=null,n.parent=t}return t}function Qo(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);const a=[];for(let i=0;i<e.length;i++){const n=e[i];if(typeof n=="object"){if(n==null)continue;if(!("length"in n)){a.push(t?pt(n,!0):n);continue}}a.push(...this._makeDomArray(n,t))}return a}return[t?pt(e,!0):e]}function Ln(e){return function(...t){const a=this.length-1;return te(this,(i,n)=>{if(!se(i))return;const r=typeof t[0]=="function"?t[0].call(i,n,this._render(i.children)):t,u=this._makeDomArray(r,n<a);e(u,i.children,i)})}}function He(e,t,a,i,n){var r,u;const o=[t,a,...i],l=t===0?null:e[t-1],f=t+a>=e.length?null:e[t+a];for(let E=0;E<i.length;++E){const T=i[E],b=T.parent;if(b){const S=b.children.indexOf(T);S>-1&&(b.children.splice(S,1),n===b&&t>S&&o[0]--)}T.parent=n,T.prev&&(T.prev.next=(r=T.next)!==null&&r!==void 0?r:null),T.next&&(T.next.prev=(u=T.prev)!==null&&u!==void 0?u:null),T.prev=E===0?l:i[E-1],T.next=E===i.length-1?f:i[E+1]}return l&&(l.next=i[0]),f&&(f.prev=i[i.length-1]),e.splice(...o)}function jo(e){return(Pe(e)?e:this._make(e)).append(this),this}function zo(e){return(Pe(e)?e:this._make(e)).prepend(this),this}const Ko=Ln((e,t,a)=>{He(t,t.length,0,e,a)}),Zo=Ln((e,t,a)=>{He(t,0,0,e,a)});function Rn(e){return function(t){const a=this.length-1,i=this.parents().last();for(let n=0;n<this.length;n++){const r=this[n],u=typeof t=="function"?t.call(r,n,r):typeof t=="string"&&!Fa(t)?i.find(t).clone():t,[o]=this._makeDomArray(u,n<a);if(!o||!se(o))continue;let l=o,f=0;for(;f<l.children.length;){const E=l.children[f];v(E)?(l=E,f=0):f++}e(r,l,[o])}return this}}const Jo=Rn((e,t,a)=>{const{parent:i}=e;if(!i)return;const n=i.children,r=n.indexOf(e);ze([e],t),He(n,r,0,a,i)}),ec=Rn((e,t,a)=>{se(e)&&(ze(e.children,t),ze(a,e))});function tc(e){return this.parent(e).not("body").each((t,a)=>{this._make(a).replaceWith(a.children)}),this}function ac(e){const t=this[0];if(t){const a=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t);let i;for(let r=0;r<a.length;r++)a[r].type==="tag"&&(i=a[r]);let n=0;for(;i&&n<i.children.length;){const r=i.children[n];r.type==="tag"?(i=r,n=0):n++}i&&this._make(i).append(this)}return this}function ic(...e){const t=this.length-1;return te(this,(a,i)=>{if(!se(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);He(n,r+1,0,o,a.parent)})}function nc(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const a of this._makeDomArray(e)){const i=this.clone().toArray(),{parent:n}=a;if(!n)continue;const r=n.children,u=r.indexOf(a);u<0||(He(r,u+1,0,i,n),t.push(...i))}return this._make(t)}function sc(...e){const t=this.length-1;return te(this,(a,i)=>{if(!se(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);He(n,r,0,o,a.parent)})}function rc(e){const t=this._make(e);this.remove();const a=[];return te(t,i=>{const n=this.clone().toArray(),{parent:r}=i;if(!r)return;const u=r.children,o=u.indexOf(i);o<0||(He(u,o,0,n,r),a.push(...n))}),this._make(a)}function uc(e){const t=e?this.filter(e):this;return te(t,a=>{$e(a),a.prev=a.next=a.parent=null}),this}function oc(e){return te(this,(t,a)=>{const{parent:i}=t;if(!i)return;const n=i.children,r=typeof e=="function"?e.call(t,a,t):e,u=this._makeDomArray(r);ze(u,null);const o=n.indexOf(t);He(n,o,1,u,i),u.includes(t)||(t.parent=t.prev=t.next=null)})}function cc(){return te(this,e=>{if(se(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function lc(e){if(e===void 0){const t=this[0];return!t||!se(t)?null:this._render(t.children)}return te(this,t=>{if(!se(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=Pe(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;ze(a,t)})}function dc(){return this._render(this)}function hc(e){return e===void 0?bt(this):typeof e=="function"?te(this,(t,a)=>this._make(t).text(e.call(t,a,bt([t])))):te(this,t=>{if(!se(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=new Tt(`${e}`);ze(a,t)})}function fc(){const e=Array.prototype.map.call(this.get(),a=>pt(a,!0)),t=new Ge(e);for(const a of e)a.parent=t;return this._make(e)}const Ec=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:Qo,after:ic,append:Ko,appendTo:jo,before:sc,clone:fc,empty:cc,html:lc,insertAfter:nc,insertBefore:rc,prepend:Zo,prependTo:zo,remove:uc,replaceWith:oc,text:hc,toString:dc,unwrap:tc,wrap:Jo,wrapAll:ac,wrapInner:ec},Symbol.toStringTag,{value:"Module"}));function mc(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return te(this,(a,i)=>{v(a)&&yn(a,e,t,i)});if(this.length!==0)return Mn(this[0],e)}function yn(e,t,a,i){if(typeof t=="string"){const n=Mn(e),r=typeof a=="function"?a.call(e,i,n[t]):a;r===""?delete n[t]:r!=null&&(n[t]=r),e.attribs.style=Tc(n)}else if(typeof t=="object"){const n=Object.keys(t);for(let r=0;r<n.length;r++){const u=n[r];yn(e,u,t[u],r)}}}function Mn(e,t){if(!e||!v(e))return;const a=pc(e.attribs.style);if(typeof t=="string")return a[t];if(Array.isArray(t)){const i={};for(const n of t)a[n]!=null&&(i[n]=a[n]);return i}return a}function Tc(e){return Object.keys(e).reduce((t,a)=>`${t}${t?" ":""}${a}: ${e[a]};`,"")}function pc(e){if(e=(e||"").trim(),!e)return{};const t={};let a;for(const i of e.split(";")){const n=i.indexOf(":");if(n<1||n===i.length-1){const r=i.trimEnd();r.length>0&&a!==void 0&&(t[a]+=`;${r}`)}else a=i.slice(0,n).trim(),t[a]=i.slice(n+1).trim()}return t}const bc=Object.freeze(Object.defineProperty({__proto__:null,css:mc},Symbol.toStringTag,{value:"Module"})),Pn="input,select,textarea,keygen",gc=/%20/g,kn=/\r?\n/g;function _c(){return this.serializeArray().map(a=>`${encodeURIComponent(a.name)}=${encodeURIComponent(a.value)}`).join("&").replace(gc,"+")}function Ac(){return this.map((e,t)=>{const a=this._make(t);return v(t)&&t.name==="form"?a.find(Pn).toArray():a.filter(Pn).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var a;const i=this._make(t),n=i.attr("name"),r=(a=i.val())!==null&&a!==void 0?a:"";return Array.isArray(r)?r.map(u=>({name:n,value:u.replace(kn,`\r
|
7
|
+
`)})):{name:n,value:r.replace(kn,`\r
|
8
|
+
`)}}).toArray()}const Nc=Object.freeze(Object.defineProperty({__proto__:null,serialize:_c,serializeArray:Ac},Symbol.toStringTag,{value:"Module"}));function Cc(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function Ic(e){const t={};for(const a in e){const i=e[a],n=Array.isArray(i),{selector:r,value:u}=Cc(n?i[0]:i),o=typeof u=="function"?u:typeof u=="string"?l=>this._make(l).prop(u):l=>this._make(l).extract(u);if(n)t[a]=this._findBySelector(r,Number.POSITIVE_INFINITY).map((l,f)=>o(f,a,t)).get();else{const l=this._findBySelector(r,1);t[a]=l.length>0?o(l[0],a,t):void 0}}return t}const Sc=Object.freeze(Object.defineProperty({__proto__:null,extract:Ic},Symbol.toStringTag,{value:"Module"}));class St{constructor(t,a,i){if(this.length=0,this.options=i,this._root=a,t){for(let n=0;n<t.length;n++)this[n]=t[n];this.length=t.length}}}St.prototype.cheerio="[cheerio object]",St.prototype.splice=Array.prototype.splice,St.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(St.prototype,Ru,Go,Ec,bc,Nc,Sc);function xc(e,t){return function a(i,n,r=!0){if(i==null)throw new Error("cheerio.load() expects a string");const u=Ua(n),o=e(i,u,r,null);class l extends St{_make(T,b){const N=f(T,b);return N.prevObject=this,N}_parse(T,b,N,S){return e(T,b,N,S)}_render(T){return t(T,this.options)}}function f(E,T,b=o,N){if(E&&Pe(E))return E;const S=Ua(N,u),y=typeof b=="string"?[e(b,S,!1,null)]:"length"in b?b:[b],P=Pe(y)?y:new l(y,null,S);if(P._root=P,!E)return new l(void 0,P,S);const X=typeof E=="string"&&Fa(E)?e(E,S,!1,null).children:Oc(E)?[E]:Array.isArray(E)?E:void 0,B=new l(X,P,S);if(X)return B;if(typeof E!="string")throw new TypeError("Unexpected type of selector");let q=E;const F=T?typeof T=="string"?Fa(T)?new l([e(T,S,!1,null)],P,S):(q=`${T} ${q}`,P):Pe(T)?T:new l(Array.isArray(T)?T:[T],P,S):P;return F?F.find(q):B}return Object.assign(f,bu,{load:a,_root:o,_options:u,fn:l.prototype,prototype:l.prototype}),f}}function Oc(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const Dc=new Set([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]),Z="�";var d;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(d||(d={}));const Ee={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function vn(e){return e>=55296&&e<=57343}function Lc(e){return e>=56320&&e<=57343}function Rc(e,t){return(e-55296)*1024+9216+t}function wn(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Bn(e){return e>=64976&&e<=65007||Dc.has(e)}var g;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(g||(g={}));const yc=65536;class Mc{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=yc,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,a){const{line:i,col:n,offset:r}=this,u=n+a,o=r+a;return{code:t,startLine:i,endLine:i,startCol:u,endCol:u,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const a=this.html.charCodeAt(this.pos+1);if(Lc(a))return this.pos++,this._addGap(),Rc(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,d.EOF;return this._err(g.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,a){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=a}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,a){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(a)return this.html.startsWith(t,this.pos);for(let i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,d.EOF;const i=this.html.charCodeAt(a);return i===d.CARRIAGE_RETURN?d.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,d.EOF;let t=this.html.charCodeAt(this.pos);return t===d.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,d.LINE_FEED):t===d.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,vn(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===d.LINE_FEED||t===d.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){wn(t)?this._err(g.controlCharacterInInputStream):Bn(t)&&this._err(g.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var W;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(W||(W={}));function Un(e,t){for(let a=e.attrs.length-1;a>=0;a--)if(e.attrs[a].name===t)return e.attrs[a].value;return null}var A;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(A||(A={}));var Ke;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ke||(Ke={}));var _e;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(_e||(_e={}));var p;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(p||(p={}));var s;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(s||(s={}));const Pc=new Map([[p.A,s.A],[p.ADDRESS,s.ADDRESS],[p.ANNOTATION_XML,s.ANNOTATION_XML],[p.APPLET,s.APPLET],[p.AREA,s.AREA],[p.ARTICLE,s.ARTICLE],[p.ASIDE,s.ASIDE],[p.B,s.B],[p.BASE,s.BASE],[p.BASEFONT,s.BASEFONT],[p.BGSOUND,s.BGSOUND],[p.BIG,s.BIG],[p.BLOCKQUOTE,s.BLOCKQUOTE],[p.BODY,s.BODY],[p.BR,s.BR],[p.BUTTON,s.BUTTON],[p.CAPTION,s.CAPTION],[p.CENTER,s.CENTER],[p.CODE,s.CODE],[p.COL,s.COL],[p.COLGROUP,s.COLGROUP],[p.DD,s.DD],[p.DESC,s.DESC],[p.DETAILS,s.DETAILS],[p.DIALOG,s.DIALOG],[p.DIR,s.DIR],[p.DIV,s.DIV],[p.DL,s.DL],[p.DT,s.DT],[p.EM,s.EM],[p.EMBED,s.EMBED],[p.FIELDSET,s.FIELDSET],[p.FIGCAPTION,s.FIGCAPTION],[p.FIGURE,s.FIGURE],[p.FONT,s.FONT],[p.FOOTER,s.FOOTER],[p.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[p.FORM,s.FORM],[p.FRAME,s.FRAME],[p.FRAMESET,s.FRAMESET],[p.H1,s.H1],[p.H2,s.H2],[p.H3,s.H3],[p.H4,s.H4],[p.H5,s.H5],[p.H6,s.H6],[p.HEAD,s.HEAD],[p.HEADER,s.HEADER],[p.HGROUP,s.HGROUP],[p.HR,s.HR],[p.HTML,s.HTML],[p.I,s.I],[p.IMG,s.IMG],[p.IMAGE,s.IMAGE],[p.INPUT,s.INPUT],[p.IFRAME,s.IFRAME],[p.KEYGEN,s.KEYGEN],[p.LABEL,s.LABEL],[p.LI,s.LI],[p.LINK,s.LINK],[p.LISTING,s.LISTING],[p.MAIN,s.MAIN],[p.MALIGNMARK,s.MALIGNMARK],[p.MARQUEE,s.MARQUEE],[p.MATH,s.MATH],[p.MENU,s.MENU],[p.META,s.META],[p.MGLYPH,s.MGLYPH],[p.MI,s.MI],[p.MO,s.MO],[p.MN,s.MN],[p.MS,s.MS],[p.MTEXT,s.MTEXT],[p.NAV,s.NAV],[p.NOBR,s.NOBR],[p.NOFRAMES,s.NOFRAMES],[p.NOEMBED,s.NOEMBED],[p.NOSCRIPT,s.NOSCRIPT],[p.OBJECT,s.OBJECT],[p.OL,s.OL],[p.OPTGROUP,s.OPTGROUP],[p.OPTION,s.OPTION],[p.P,s.P],[p.PARAM,s.PARAM],[p.PLAINTEXT,s.PLAINTEXT],[p.PRE,s.PRE],[p.RB,s.RB],[p.RP,s.RP],[p.RT,s.RT],[p.RTC,s.RTC],[p.RUBY,s.RUBY],[p.S,s.S],[p.SCRIPT,s.SCRIPT],[p.SEARCH,s.SEARCH],[p.SECTION,s.SECTION],[p.SELECT,s.SELECT],[p.SOURCE,s.SOURCE],[p.SMALL,s.SMALL],[p.SPAN,s.SPAN],[p.STRIKE,s.STRIKE],[p.STRONG,s.STRONG],[p.STYLE,s.STYLE],[p.SUB,s.SUB],[p.SUMMARY,s.SUMMARY],[p.SUP,s.SUP],[p.TABLE,s.TABLE],[p.TBODY,s.TBODY],[p.TEMPLATE,s.TEMPLATE],[p.TEXTAREA,s.TEXTAREA],[p.TFOOT,s.TFOOT],[p.TD,s.TD],[p.TH,s.TH],[p.THEAD,s.THEAD],[p.TITLE,s.TITLE],[p.TR,s.TR],[p.TRACK,s.TRACK],[p.TT,s.TT],[p.U,s.U],[p.UL,s.UL],[p.SVG,s.SVG],[p.VAR,s.VAR],[p.WBR,s.WBR],[p.XMP,s.XMP]]);function ua(e){var t;return(t=Pc.get(e))!==null&&t!==void 0?t:s.UNKNOWN}const I=s,kc={[A.HTML]:new Set([I.ADDRESS,I.APPLET,I.AREA,I.ARTICLE,I.ASIDE,I.BASE,I.BASEFONT,I.BGSOUND,I.BLOCKQUOTE,I.BODY,I.BR,I.BUTTON,I.CAPTION,I.CENTER,I.COL,I.COLGROUP,I.DD,I.DETAILS,I.DIR,I.DIV,I.DL,I.DT,I.EMBED,I.FIELDSET,I.FIGCAPTION,I.FIGURE,I.FOOTER,I.FORM,I.FRAME,I.FRAMESET,I.H1,I.H2,I.H3,I.H4,I.H5,I.H6,I.HEAD,I.HEADER,I.HGROUP,I.HR,I.HTML,I.IFRAME,I.IMG,I.INPUT,I.LI,I.LINK,I.LISTING,I.MAIN,I.MARQUEE,I.MENU,I.META,I.NAV,I.NOEMBED,I.NOFRAMES,I.NOSCRIPT,I.OBJECT,I.OL,I.P,I.PARAM,I.PLAINTEXT,I.PRE,I.SCRIPT,I.SECTION,I.SELECT,I.SOURCE,I.STYLE,I.SUMMARY,I.TABLE,I.TBODY,I.TD,I.TEMPLATE,I.TEXTAREA,I.TFOOT,I.TH,I.THEAD,I.TITLE,I.TR,I.TRACK,I.UL,I.WBR,I.XMP]),[A.MATHML]:new Set([I.MI,I.MO,I.MN,I.MS,I.MTEXT,I.ANNOTATION_XML]),[A.SVG]:new Set([I.TITLE,I.FOREIGN_OBJECT,I.DESC]),[A.XLINK]:new Set,[A.XML]:new Set,[A.XMLNS]:new Set},si=new Set([I.H1,I.H2,I.H3,I.H4,I.H5,I.H6]),vc=new Set([p.STYLE,p.SCRIPT,p.XMP,p.IFRAME,p.NOEMBED,p.NOFRAMES,p.PLAINTEXT]);function wc(e,t){return vc.has(e)||t&&e===p.NOSCRIPT}var h;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(h||(h={}));const me={DATA:h.DATA,RCDATA:h.RCDATA,RAWTEXT:h.RAWTEXT,SCRIPT_DATA:h.SCRIPT_DATA,PLAINTEXT:h.PLAINTEXT,CDATA_SECTION:h.CDATA_SECTION};function Bc(e){return e>=d.DIGIT_0&&e<=d.DIGIT_9}function xt(e){return e>=d.LATIN_CAPITAL_A&&e<=d.LATIN_CAPITAL_Z}function Uc(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_Z}function Ye(e){return Uc(e)||xt(e)}function Fn(e){return Ye(e)||Bc(e)}function oa(e){return e+32}function Hn(e){return e===d.SPACE||e===d.LINE_FEED||e===d.TABULATION||e===d.FORM_FEED}function Yn(e){return Hn(e)||e===d.SOLIDUS||e===d.GREATER_THAN_SIGN}function Fc(e){return e===d.NULL?g.nullCharacterReference:e>1114111?g.characterReferenceOutsideUnicodeRange:vn(e)?g.surrogateCharacterReference:Bn(e)?g.noncharacterCharacterReference:wn(e)||e===d.CARRIAGE_RETURN?g.controlCharacterReference:null}let Hc=class{constructor(t,a){this.options=t,this.handler=a,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=h.DATA,this.returnState=h.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Mc(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Pa(La,(i,n)=>{this.preprocessor.pos=this.entityStartPos+n-1,this._flushCodePointConsumedAsCharacterReference(i)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(g.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(g.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const n=Fc(i);n&&this._err(n,1)}}:void 0)}_err(t,a=0){var i,n;(n=(i=this.handler).onParseError)===null||n===void 0||n.call(i,this.preprocessor.getError(t,a))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,a,i){this.active=!0,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let a=0;a<t;a++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,a){return this.preprocessor.startsWith(t,a)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:W.START_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:W.END_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:W.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:W.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,a){this.currentCharacterToken={type:t,chars:a,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,a;const i=this.currentToken;if(Un(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const n=(t=(a=i.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(g.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=ua(t.tagName),t.type===W.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(g.endTagWithAttributes),t.selfClosing&&this._err(g.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case W.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case W.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case W.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:W.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,a){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=a;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,a)}_emitCodePoint(t){const a=Hn(t)?W.WHITESPACE_CHARACTER:t===d.NULL?W.NULL_CHARACTER:W.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(W.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=h.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ne.Attribute:Ne.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===h.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case h.DATA:{this._stateData(t);break}case h.RCDATA:{this._stateRcdata(t);break}case h.RAWTEXT:{this._stateRawtext(t);break}case h.SCRIPT_DATA:{this._stateScriptData(t);break}case h.PLAINTEXT:{this._statePlaintext(t);break}case h.TAG_OPEN:{this._stateTagOpen(t);break}case h.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case h.TAG_NAME:{this._stateTagName(t);break}case h.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case h.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case h.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case h.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case h.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case h.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case h.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case h.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case h.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case h.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case h.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case h.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case h.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case h.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case h.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case h.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case h.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case h.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case h.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case h.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case h.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case h.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case h.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case h.BOGUS_COMMENT:{this._stateBogusComment(t);break}case h.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case h.COMMENT_START:{this._stateCommentStart(t);break}case h.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case h.COMMENT:{this._stateComment(t);break}case h.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case h.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case h.COMMENT_END:{this._stateCommentEnd(t);break}case h.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case h.DOCTYPE:{this._stateDoctype(t);break}case h.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case h.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case h.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case h.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case h.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case h.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case h.CDATA_SECTION:{this._stateCdataSection(t);break}case h.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case h.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case h.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case h.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.TAG_OPEN;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitCodePoint(t);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case d.AMPERSAND:{this._startCharacterReference();break}case d.LESS_THAN_SIGN:{this.state=h.RCDATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.RAWTEXT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ye(t))this._createStartTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case d.EXCLAMATION_MARK:{this.state=h.MARKUP_DECLARATION_OPEN;break}case d.SOLIDUS:{this.state=h.END_TAG_OPEN;break}case d.QUESTION_MARK:{this._err(g.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t);break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=h.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ye(t))this._createEndTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case d.GREATER_THAN_SIGN:{this._err(g.missingEndTagName),this.state=h.DATA;break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.tagName+=Z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(xt(t)?oa(t):t)}}_stateRcdataLessThanSign(t){t===d.SOLIDUS?this.state=h.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ye(t)?(this.state=h.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const a=this.currentToken;switch(a.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=h.BEFORE_ATTRIBUTE_NAME,!1;case d.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=h.SELF_CLOSING_START_TAG,!1;case d.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=h.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===d.SOLIDUS?this.state=h.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ye(t)?(this.state=h.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case d.SOLIDUS:{this.state=h.SCRIPT_DATA_END_TAG_OPEN;break}case d.EXCLAMATION_MARK:{this.state=h.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=h.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ye(t)?(this.state=h.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===d.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===d.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===d.SOLIDUS?this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ye(t)?(this._emitChars("<"),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ye(t)?(this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ee.SCRIPT,!1)&&Yn(this.preprocessor.peek(Ee.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Ee.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===d.SOLIDUS?(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ee.SCRIPT,!1)&&Yn(this.preprocessor.peek(Ee.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Ee.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this.state=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._err(g.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=h.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=h.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this._leaveAttrName(),this.state=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._leaveAttrName(),this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:{this._err(g.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.name+=Z;break}default:this.currentAttr.name+=String.fromCodePoint(xt(t)?oa(t):t)}}_stateAfterAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case d.EQUALS_SIGN:{this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=h.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{this.state=h.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this.state=h.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingAttributeValue),this.state=h.DATA,this.emitCurrentTagToken();break}default:this.state=h.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=Z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case d.APOSTROPHE:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=Z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=h.BEFORE_ATTRIBUTE_NAME;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=Z;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:case d.EQUALS_SIGN:case d.GRAVE_ACCENT:{this._err(g.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=h.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this._leaveAttrValue(),this.state=h.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBetweenAttributes),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case d.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.unexpectedSolidusInTag),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=Z;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ee.DASH_DASH,!0)?(this._createCommentToken(Ee.DASH_DASH.length+1),this.state=h.COMMENT_START):this._consumeSequenceIfMatch(Ee.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ee.DOCTYPE.length+1),this.state=h.DOCTYPE):this._consumeSequenceIfMatch(Ee.CDATA_START,!0)?this.inForeignNode?this.state=h.CDATA_SECTION:(this._err(g.cdataInHtmlContent),this._createCommentToken(Ee.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=h.BOGUS_COMMENT):this._ensureHibernation()||(this._err(g.incorrectlyOpenedComment),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_START_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=h.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END_DASH;break}case d.LESS_THAN_SIGN:{a.data+="<",this.state=h.COMMENT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=Z;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const a=this.currentToken;switch(t){case d.EXCLAMATION_MARK:{a.data+="!",this.state=h.COMMENT_LESS_THAN_SIGN_BANG;break}case d.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===d.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=h.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===d.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=h.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==d.GREATER_THAN_SIGN&&t!==d.EOF&&this._err(g.nestedComment),this.state=h.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(a);break}case d.EXCLAMATION_MARK:{this.state=h.COMMENT_END_BANG;break}case d.HYPHEN_MINUS:{a.data+="-";break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{a.data+="--!",this.state=h.COMMENT_END_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.incorrectlyClosedComment),this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=h.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case d.EOF:{this._err(g.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBeforeDoctypeName),this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(xt(t))this._createDoctypeToken(String.fromCharCode(oa(t))),this.state=h.DOCTYPE_NAME;else switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.NULL:{this._err(g.unexpectedNullCharacter),this._createDoctypeToken(Z),this.state=h.DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeName),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=h.DOCTYPE_NAME}}_stateDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.AFTER_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.name+=Z;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(xt(t)?oa(t):t)}}_stateAfterDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ee.PUBLIC,!1)?this.state=h.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ee.SYSTEM,!1)?this.state=h.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(g.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=Z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=Z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.QUOTATION_MARK:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=Z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=Z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.NULL:{this._err(g.unexpectedNullCharacter);break}case d.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case d.RIGHT_SQUARE_BRACKET:{this.state=h.CDATA_SECTION_BRACKET;break}case d.EOF:{this._err(g.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===d.RIGHT_SQUARE_BRACKET?this.state=h.CDATA_SECTION_END:(this._emitChars("]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA;break}case d.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(d.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Fn(this.preprocessor.peek(1))?h.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Fn(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===d.SEMICOLON&&this._err(g.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const Vn=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),qn=new Set([...Vn,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),ca=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),Yc=new Set([...ca,s.OL,s.UL]),Vc=new Set([...ca,s.BUTTON]),Wn=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),Xn=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),qc=new Set([s.TR,s.TEMPLATE,s.HTML]),Wc=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),Xc=new Set([s.TABLE,s.TEMPLATE,s.HTML]),Gc=new Set([s.TD,s.TH]);class $c{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,i){this.treeAdapter=a,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=s.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===s.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===A.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,a){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=a,this.currentTagId=a,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,a,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,a){const i=this._indexOf(t);this.items[i]=a,i===this.stackTop&&(this.current=a)}insertAfter(t,a,i){const n=this._indexOf(t)+1;this.items.splice(n,0,a),this.tagIDs.splice(n,0,i),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(t){let a=this.stackTop+1;do a=this.tagIDs.lastIndexOf(t,a-1);while(a>0&&this.treeAdapter.getNamespaceURI(this.items[a])!==A.HTML);this.shortenToLength(a<0?0:a)}shortenToLength(t){for(;this.stackTop>=t;){const a=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(a,this.stackTop<t)}}popUntilElementPopped(t){const a=this._indexOf(t);this.shortenToLength(a<0?0:a)}popUntilPopped(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i<0?0:i)}popUntilNumberedHeaderPopped(){this.popUntilPopped(si,A.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Gc,A.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===a)return i;return-1}clearBackTo(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(Xc,A.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Wc,A.HTML)}clearBackToTableRowContext(){this.clearBackTo(qc,A.HTML)}remove(t){const a=this._indexOf(t);a>=0&&(a===this.stackTop?this.pop():(this.items.splice(a,1),this.tagIDs.splice(a,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===s.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const a=this._indexOf(t)-1;return a>=0?this.items[a]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===s.HTML}hasInDynamicScope(t,a){for(let i=this.stackTop;i>=0;i--){const n=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case A.HTML:{if(n===t)return!0;if(a.has(n))return!1;break}case A.SVG:{if(Xn.has(n))return!1;break}case A.MATHML:{if(Wn.has(n))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ca)}hasInListItemScope(t){return this.hasInDynamicScope(t,Yc)}hasInButtonScope(t){return this.hasInDynamicScope(t,Vc)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case A.HTML:{if(si.has(a))return!0;if(ca.has(a))return!1;break}case A.SVG:{if(Xn.has(a))return!1;break}case A.MATHML:{if(Wn.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===A.HTML)switch(this.tagIDs[a]){case t:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===A.HTML)switch(this.tagIDs[t]){case s.TBODY:case s.THEAD:case s.TFOOT:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasInSelectScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===A.HTML)switch(this.tagIDs[a]){case t:return!0;case s.OPTION:case s.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Vn.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;qn.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&qn.has(this.currentTagId);)this.pop()}}const ri=3;var Le;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Le||(Le={}));const Gn={type:Le.Marker};class Qc{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){const i=[],n=a.length,r=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Le.Marker)break;const{element:f}=l;if(this.treeAdapter.getTagName(f)===r&&this.treeAdapter.getNamespaceURI(f)===u){const E=this.treeAdapter.getAttrList(f);E.length===n&&i.push({idx:o,attrs:E})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<ri)return;const a=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,a);if(i.length<ri)return;const n=new Map(a.map(u=>[u.name,u.value]));let r=0;for(let u=0;u<i.length;u++){const o=i[u];o.attrs.every(l=>n.get(l.name)===l.value)&&(r+=1,r>=ri&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Gn)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:Le.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Le.Element,element:t,token:a})}removeEntry(t){const a=this.entries.indexOf(t);a>=0&&this.entries.splice(a,1)}clearToLastMarker(){const t=this.entries.indexOf(Gn);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const a=this.entries.find(i=>i.type===Le.Marker||this.treeAdapter.getTagName(i.element)===t);return a&&a.type===Le.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===Le.Element&&a.element===t)}}const ke={createDocument(){return{nodeName:"#document",mode:_e.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,a){return{nodeName:e,tagName:e,attrs:a,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,a){const i=e.childNodes.indexOf(a);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,i){const n=e.childNodes.find(r=>r.nodeName==="#documentType");if(n)n.name=t,n.publicId=a,n.systemId=i;else{const r={nodeName:"#documentType",name:t,publicId:a,systemId:i,parentNode:null};ke.appendChild(e,r)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const a=e.childNodes[e.childNodes.length-1];if(ke.isTextNode(a)){a.value+=t;return}}ke.appendChild(e,ke.createTextNode(t))},insertTextBefore(e,t,a){const i=e.childNodes[e.childNodes.indexOf(a)-1];i&&ke.isTextNode(i)?i.value+=t:ke.insertBefore(e,ke.createTextNode(t),a)},adoptAttributes(e,t){const a=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)a.has(t[i].name)||e.attrs.push(t[i])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},$n="html",jc="about:legacy-compat",zc="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Qn=["+//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//"],Kc=[...Qn,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Zc=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),jn=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Jc=[...jn,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function zn(e,t){return t.some(a=>e.startsWith(a))}function el(e){return e.name===$n&&e.publicId===null&&(e.systemId===null||e.systemId===jc)}function tl(e){if(e.name!==$n)return _e.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===zc)return _e.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),Zc.has(a))return _e.QUIRKS;let i=t===null?Kc:Qn;if(zn(a,i))return _e.QUIRKS;if(i=t===null?jn:Jc,zn(a,i))return _e.LIMITED_QUIRKS}return _e.NO_QUIRKS}const Kn={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},al="definitionurl",il="definitionURL",nl=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),sl=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:A.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:A.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:A.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:A.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:A.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:A.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:A.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:A.XML}],["xml:space",{prefix:"xml",name:"space",namespace:A.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:A.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:A.XMLNS}]]),rl=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),ul=new Set([s.B,s.BIG,s.BLOCKQUOTE,s.BODY,s.BR,s.CENTER,s.CODE,s.DD,s.DIV,s.DL,s.DT,s.EM,s.EMBED,s.H1,s.H2,s.H3,s.H4,s.H5,s.H6,s.HEAD,s.HR,s.I,s.IMG,s.LI,s.LISTING,s.MENU,s.META,s.NOBR,s.OL,s.P,s.PRE,s.RUBY,s.S,s.SMALL,s.SPAN,s.STRONG,s.STRIKE,s.SUB,s.SUP,s.TABLE,s.TT,s.U,s.UL,s.VAR]);function ol(e){const t=e.tagID;return t===s.FONT&&e.attrs.some(({name:i})=>i===Ke.COLOR||i===Ke.SIZE||i===Ke.FACE)||ul.has(t)}function Zn(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===al){e.attrs[t].name=il;break}}function Jn(e){for(let t=0;t<e.attrs.length;t++){const a=nl.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function ui(e){for(let t=0;t<e.attrs.length;t++){const a=sl.get(e.attrs[t].name);a&&(e.attrs[t].prefix=a.prefix,e.attrs[t].name=a.name,e.attrs[t].namespace=a.namespace)}}function cl(e){const t=rl.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ua(e.tagName))}function ll(e,t){return t===A.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function dl(e,t,a){if(t===A.MATHML&&e===s.ANNOTATION_XML){for(let i=0;i<a.length;i++)if(a[i].name===Ke.ENCODING){const n=a[i].value.toLowerCase();return n===Kn.TEXT_HTML||n===Kn.APPLICATION_XML}}return t===A.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function hl(e,t,a,i){return(!i||i===A.HTML)&&dl(e,t,a)||(!i||i===A.MATHML)&&ll(e,t)}const fl="hidden",El=8,ml=3;var m;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(m||(m={}));const Tl={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},es=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),ts={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ke,onParseError:null};let as=class{constructor(t,a,i=null,n=null){this.fragmentContext=i,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=m.INITIAL,this.originalInsertionMode=m.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...ts,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=a??this.treeAdapter.createDocument(),this.tokenizer=new Hc(this.options,this),this.activeFormattingElements=new Qc(this.treeAdapter),this.fragmentContextID=i?ua(this.treeAdapter.getTagName(i)):s.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new $c(this.document,this.treeAdapter,this)}static parse(t,a){const i=new this(a);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,a){const i={...ts,...a};t??(t=i.treeAdapter.createElement(p.TEMPLATE,A.HTML,[]));const n=i.treeAdapter.createElement("documentmock",A.HTML,[]),r=new this(i,n,t);return r.fragmentContextID===s.TEMPLATE&&r.tmplInsertionModeStack.unshift(m.IN_TEMPLATE),r._initTokenizerForFragmentParsing(),r._insertFakeRootElement(),r._resetInsertionMode(),r._findFormInFragmentContext(),r}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,a),a}_err(t,a,i){var n;if(!this.onParseError)return;const r=(n=t.location)!==null&&n!==void 0?n:Tl,u={code:a,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:i?r.startLine:r.endLine,endCol:i?r.startCol:r.endCol,endOffset:i?r.startOffset:r.endOffset};this.onParseError(u)}onItemPush(t,a,i){var n,r;(r=(n=this.treeAdapter).onItemPush)===null||r===void 0||r.call(n,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var i,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(n=(i=this.treeAdapter).onItemPop)===null||n===void 0||n.call(i,t,this.openElements.current),a){let r,u;this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,u=this.fragmentContextID):{current:r,currentTagId:u}=this.openElements,this._setContextModes(r,u)}}_setContextModes(t,a){const i=t===this.document||this.treeAdapter.getNamespaceURI(t)===A.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,A.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=m.TEXT}switchToPlaintextParsing(){this.insertionMode=m.TEXT,this.originalInsertionMode=m.IN_BODY,this.tokenizer.state=me.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===p.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==A.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=me.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=me.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=me.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=me.PLAINTEXT;break}}}_setDocumentType(t){const a=t.name||"",i=t.publicId||"",n=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,i,n),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){const i=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i,t)}}_appendElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,a){const i=this.treeAdapter.createElement(t,A.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,A.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,i),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(p.HTML,A.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,s.HTML)}_appendCommentNode(t,a){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let a,i;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(a,t.chars,i):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;const n=this.treeAdapter.getChildNodes(a),r=i?n.lastIndexOf(i):n.length,u=n[r-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:l,endCol:f,endOffset:E}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:l,endCol:f,endOffset:E})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,a){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(a,i)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){const i=a.location,n=this.treeAdapter.getTagName(t),r=a.type===W.END_TAG&&n===a.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,r)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let a,i;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,i=this.fragmentContextID):{current:a,currentTagId:i}=this.openElements,t.tagID===s.SVG&&this.treeAdapter.getTagName(a)===p.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===A.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&!this._isIntegrationPoint(i,a,A.HTML)}_processToken(t){switch(t.type){case W.CHARACTER:{this.onCharacter(t);break}case W.NULL_CHARACTER:{this.onNullCharacter(t);break}case W.COMMENT:{this.onComment(t);break}case W.DOCTYPE:{this.onDoctype(t);break}case W.START_TAG:{this._processStartTag(t);break}case W.END_TAG:{this.onEndTag(t);break}case W.EOF:{this.onEof(t);break}case W.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,i){const n=this.treeAdapter.getNamespaceURI(a),r=this.treeAdapter.getAttrList(a);return hl(t,n,r,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(n=>n.type===Le.Marker||this.openElements.contains(n.element)),i=a<0?t-1:a-1;for(let n=i;n>=0;n--){const r=this.activeFormattingElements.entries[n];this._insertElement(r.token,this.treeAdapter.getNamespaceURI(r.element)),r.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=m.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(s.P),this.openElements.popUntilTagNamePopped(s.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case s.TR:{this.insertionMode=m.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=m.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=m.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=m.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=m.IN_TABLE;return}case s.BODY:{this.insertionMode=m.IN_BODY;return}case s.FRAMESET:{this.insertionMode=m.IN_FRAMESET;return}case s.SELECT:{this._resetInsertionModeForSelect(t);return}case s.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case s.HTML:{this.insertionMode=this.headElement?m.AFTER_HEAD:m.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=m.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=m.IN_HEAD;return}break}}this.insertionMode=m.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){const i=this.openElements.tagIDs[a];if(i===s.TEMPLATE)break;if(i===s.TABLE){this.insertionMode=m.IN_SELECT_IN_TABLE;return}}this.insertionMode=m.IN_SELECT}_isElementCausesFosterParenting(t){return es.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const a=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case s.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(a)===A.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case s.TABLE:{const i=this.treeAdapter.getParentNode(a);return i?{parent:i,beforeElement:a}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const a=this._findFosterParentingLocation();a.beforeElement?this.treeAdapter.insertBefore(a.parent,t,a.beforeElement):this.treeAdapter.appendChild(a.parent,t)}_isSpecialElement(t,a){const i=this.treeAdapter.getNamespaceURI(t);return kc[i].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){G0(this,t);return}switch(this.insertionMode){case m.INITIAL:{Ot(this,t);break}case m.BEFORE_HTML:{Dt(this,t);break}case m.BEFORE_HEAD:{Lt(this,t);break}case m.IN_HEAD:{Rt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{yt(this,t);break}case m.AFTER_HEAD:{Mt(this,t);break}case m.IN_BODY:case m.IN_CAPTION:case m.IN_CELL:case m.IN_TEMPLATE:{ns(this,t);break}case m.TEXT:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{di(this,t);break}case m.IN_TABLE_TEXT:{hs(this,t);break}case m.IN_COLUMN_GROUP:{ha(this,t);break}case m.AFTER_BODY:{ma(this,t);break}case m.AFTER_AFTER_BODY:{Ta(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){X0(this,t);return}switch(this.insertionMode){case m.INITIAL:{Ot(this,t);break}case m.BEFORE_HTML:{Dt(this,t);break}case m.BEFORE_HEAD:{Lt(this,t);break}case m.IN_HEAD:{Rt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{yt(this,t);break}case m.AFTER_HEAD:{Mt(this,t);break}case m.TEXT:{this._insertCharacters(t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{di(this,t);break}case m.IN_COLUMN_GROUP:{ha(this,t);break}case m.AFTER_BODY:{ma(this,t);break}case m.AFTER_AFTER_BODY:{Ta(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ci(this,t);return}switch(this.insertionMode){case m.INITIAL:case m.BEFORE_HTML:case m.BEFORE_HEAD:case m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:case m.IN_BODY:case m.IN_TABLE:case m.IN_CAPTION:case m.IN_COLUMN_GROUP:case m.IN_TABLE_BODY:case m.IN_ROW:case m.IN_CELL:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:case m.IN_TEMPLATE:case m.IN_FRAMESET:case m.AFTER_FRAMESET:{ci(this,t);break}case m.IN_TABLE_TEXT:{vt(this,t);break}case m.AFTER_BODY:{Cl(this,t);break}case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{Il(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case m.INITIAL:{Sl(this,t);break}case m.BEFORE_HEAD:case m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:{this._err(t,g.misplacedDoctype);break}case m.IN_TABLE_TEXT:{vt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,g.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?$0(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case m.INITIAL:{Ot(this,t);break}case m.BEFORE_HTML:{xl(this,t);break}case m.BEFORE_HEAD:{Dl(this,t);break}case m.IN_HEAD:{Se(this,t);break}case m.IN_HEAD_NO_SCRIPT:{yl(this,t);break}case m.AFTER_HEAD:{Pl(this,t);break}case m.IN_BODY:{le(this,t);break}case m.IN_TABLE:{ct(this,t);break}case m.IN_TABLE_TEXT:{vt(this,t);break}case m.IN_CAPTION:{L0(this,t);break}case m.IN_COLUMN_GROUP:{hi(this,t);break}case m.IN_TABLE_BODY:{fa(this,t);break}case m.IN_ROW:{Ea(this,t);break}case m.IN_CELL:{M0(this,t);break}case m.IN_SELECT:{ms(this,t);break}case m.IN_SELECT_IN_TABLE:{k0(this,t);break}case m.IN_TEMPLATE:{w0(this,t);break}case m.AFTER_BODY:{U0(this,t);break}case m.IN_FRAMESET:{F0(this,t);break}case m.AFTER_FRAMESET:{Y0(this,t);break}case m.AFTER_AFTER_BODY:{q0(this,t);break}case m.AFTER_AFTER_FRAMESET:{W0(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Q0(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case m.INITIAL:{Ot(this,t);break}case m.BEFORE_HTML:{Ol(this,t);break}case m.BEFORE_HEAD:{Ll(this,t);break}case m.IN_HEAD:{Rl(this,t);break}case m.IN_HEAD_NO_SCRIPT:{Ml(this,t);break}case m.AFTER_HEAD:{kl(this,t);break}case m.IN_BODY:{da(this,t);break}case m.TEXT:{g0(this,t);break}case m.IN_TABLE:{Pt(this,t);break}case m.IN_TABLE_TEXT:{vt(this,t);break}case m.IN_CAPTION:{R0(this,t);break}case m.IN_COLUMN_GROUP:{y0(this,t);break}case m.IN_TABLE_BODY:{fi(this,t);break}case m.IN_ROW:{Es(this,t);break}case m.IN_CELL:{P0(this,t);break}case m.IN_SELECT:{Ts(this,t);break}case m.IN_SELECT_IN_TABLE:{v0(this,t);break}case m.IN_TEMPLATE:{B0(this,t);break}case m.AFTER_BODY:{bs(this,t);break}case m.IN_FRAMESET:{H0(this,t);break}case m.AFTER_FRAMESET:{V0(this,t);break}case m.AFTER_AFTER_BODY:{Ta(this,t);break}}}onEof(t){switch(this.insertionMode){case m.INITIAL:{Ot(this,t);break}case m.BEFORE_HTML:{Dt(this,t);break}case m.BEFORE_HEAD:{Lt(this,t);break}case m.IN_HEAD:{Rt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{yt(this,t);break}case m.AFTER_HEAD:{Mt(this,t);break}case m.IN_BODY:case m.IN_TABLE:case m.IN_CAPTION:case m.IN_COLUMN_GROUP:case m.IN_TABLE_BODY:case m.IN_ROW:case m.IN_CELL:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:{ls(this,t);break}case m.TEXT:{_0(this,t);break}case m.IN_TABLE_TEXT:{vt(this,t);break}case m.IN_TEMPLATE:{ps(this,t);break}case m.AFTER_BODY:case m.IN_FRAMESET:case m.AFTER_FRAMESET:case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{li(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===d.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:case m.TEXT:case m.IN_COLUMN_GROUP:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:case m.IN_FRAMESET:case m.AFTER_FRAMESET:{this._insertCharacters(t);break}case m.IN_BODY:case m.IN_CAPTION:case m.IN_CELL:case m.IN_TEMPLATE:case m.AFTER_BODY:case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{is(this,t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{di(this,t);break}case m.IN_TABLE_TEXT:{ds(this,t);break}}}};function pl(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return a?e.openElements.contains(a.element)?e.openElements.hasInScope(t.tagID)||(a=null):(e.activeFormattingElements.removeEntry(a),a=null):cs(e,t),a}function bl(e,t){let a=null,i=e.openElements.stackTop;for(;i>=0;i--){const n=e.openElements.items[i];if(n===t.element)break;e._isSpecialElement(n,e.openElements.tagIDs[i])&&(a=n)}return a||(e.openElements.shortenToLength(i<0?0:i),e.activeFormattingElements.removeEntry(t)),a}function gl(e,t,a){let i=t,n=e.openElements.getCommonAncestor(t);for(let r=0,u=n;u!==a;r++,u=n){n=e.openElements.getCommonAncestor(u);const o=e.activeFormattingElements.getElementEntry(u),l=o&&r>=ml;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(u)):(u=_l(e,o),i===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(u,i),i=u)}return i}function _l(e,t){const a=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function Al(e,t,a){const i=e.treeAdapter.getTagName(t),n=ua(i);if(e._isElementCausesFosterParenting(n))e._fosterParentElement(a);else{const r=e.treeAdapter.getNamespaceURI(t);n===s.TEMPLATE&&r===A.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function Nl(e,t,a){const i=e.treeAdapter.getNamespaceURI(a.element),{token:n}=a,r=e.treeAdapter.createElement(n.tagName,i,n.attrs);e._adoptNodes(t,r),e.treeAdapter.appendChild(t,r),e.activeFormattingElements.insertElementAfterBookmark(r,n),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,r,n.tagID)}function oi(e,t){for(let a=0;a<El;a++){const i=pl(e,t);if(!i)break;const n=bl(e,i);if(!n)break;e.activeFormattingElements.bookmark=i;const r=gl(e,n,i.element),u=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(r),u&&Al(e,u,r),Nl(e,n,i)}}function ci(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Cl(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Il(e,t){e._appendCommentNode(t,e.document)}function li(e,t){if(e.stopped=!0,t.location){const a=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=a;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(i);if(n&&!n.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const r=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(r);u&&!u.endTag&&e._setEndLocation(r,t)}}}}function Sl(e,t){e._setDocumentType(t);const a=t.forceQuirks?_e.QUIRKS:tl(t);el(t)||e._err(t,g.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=m.BEFORE_HTML}function Ot(e,t){e._err(t,g.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,_e.QUIRKS),e.insertionMode=m.BEFORE_HTML,e._processToken(t)}function xl(e,t){t.tagID===s.HTML?(e._insertElement(t,A.HTML),e.insertionMode=m.BEFORE_HEAD):Dt(e,t)}function Ol(e,t){const a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&Dt(e,t)}function Dt(e,t){e._insertFakeRootElement(),e.insertionMode=m.BEFORE_HEAD,e._processToken(t)}function Dl(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.HEAD:{e._insertElement(t,A.HTML),e.headElement=e.openElements.current,e.insertionMode=m.IN_HEAD;break}default:Lt(e,t)}}function Ll(e,t){const a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?Lt(e,t):e._err(t,g.endTagWithoutMatchingOpenElement)}function Lt(e,t){e._insertFakeElement(p.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=m.IN_HEAD,e._processToken(t)}function Se(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.TITLE:{e._switchToTextParsing(t,me.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,me.RAWTEXT):(e._insertElement(t,A.HTML),e.insertionMode=m.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,me.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,me.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=m.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(m.IN_TEMPLATE);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:Rt(e,t)}}function Rl(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=m.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{Rt(e,t);break}case s.TEMPLATE:{Ze(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function Ze(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==s.TEMPLATE&&e._err(t,g.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,g.endTagWithoutMatchingOpenElement)}function Rt(e,t){e.openElements.pop(),e.insertionMode=m.AFTER_HEAD,e._processToken(t)}function yl(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{Se(e,t);break}case s.NOSCRIPT:{e._err(t,g.nestedNoscriptInHead);break}default:yt(e,t)}}function Ml(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=m.IN_HEAD;break}case s.BR:{yt(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function yt(e,t){const a=t.type===W.EOF?g.openElementsLeftAfterEof:g.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=m.IN_HEAD,e._processToken(t)}function Pl(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.BODY:{e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=m.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,A.HTML),e.insertionMode=m.IN_FRAMESET;break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{e._err(t,g.abandonedHeadElementChild),e.openElements.push(e.headElement,s.HEAD),Se(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:Mt(e,t)}}function kl(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{Mt(e,t);break}case s.TEMPLATE:{Ze(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function Mt(e,t){e._insertFakeElement(p.BODY,s.BODY),e.insertionMode=m.IN_BODY,la(e,t)}function la(e,t){switch(t.type){case W.CHARACTER:{ns(e,t);break}case W.WHITESPACE_CHARACTER:{is(e,t);break}case W.COMMENT:{ci(e,t);break}case W.START_TAG:{le(e,t);break}case W.END_TAG:{da(e,t);break}case W.EOF:{ls(e,t);break}}}function is(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ns(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function vl(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function wl(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function Bl(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_FRAMESET)}function Ul(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML)}function Fl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),si.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,A.HTML)}function Hl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Yl(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),a||(e.formElement=e.openElements.current))}function Vl(e,t){e.framesetOk=!1;const a=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const n=e.openElements.tagIDs[i];if(a===s.LI&&n===s.LI||(a===s.DD||a===s.DT)&&(n===s.DD||n===s.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==s.ADDRESS&&n!==s.DIV&&n!==s.P&&e._isSpecialElement(e.openElements.items[i],n))break}e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML)}function ql(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.tokenizer.state=me.PLAINTEXT}function Wl(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.framesetOk=!1}function Xl(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(p.A);a&&(oi(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Gl(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $l(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(oi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ql(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function jl(e,t){e.treeAdapter.getDocumentMode(e.document)!==_e.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=m.IN_TABLE}function ss(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,A.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function rs(e){const t=Un(e,Ke.TYPE);return t!=null&&t.toLowerCase()===fl}function zl(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,A.HTML),rs(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Kl(e,t){e._appendElement(t,A.HTML),t.ackSelfClosing=!0}function Zl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,A.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Jl(e,t){t.tagName=p.IMG,t.tagID=s.IMG,ss(e,t)}function e0(e,t){e._insertElement(t,A.HTML),e.skipNextNewLine=!0,e.tokenizer.state=me.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=m.TEXT}function t0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,me.RAWTEXT)}function a0(e,t){e.framesetOk=!1,e._switchToTextParsing(t,me.RAWTEXT)}function us(e,t){e._switchToTextParsing(t,me.RAWTEXT)}function i0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===m.IN_TABLE||e.insertionMode===m.IN_CAPTION||e.insertionMode===m.IN_TABLE_BODY||e.insertionMode===m.IN_ROW||e.insertionMode===m.IN_CELL?m.IN_SELECT_IN_TABLE:m.IN_SELECT}function n0(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML)}function s0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,A.HTML)}function r0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,A.HTML)}function u0(e,t){e._reconstructActiveFormattingElements(),Zn(t),ui(t),t.selfClosing?e._appendElement(t,A.MATHML):e._insertElement(t,A.MATHML),t.ackSelfClosing=!0}function o0(e,t){e._reconstructActiveFormattingElements(),Jn(t),ui(t),t.selfClosing?e._appendElement(t,A.SVG):e._insertElement(t,A.SVG),t.ackSelfClosing=!0}function os(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML)}function le(e,t){switch(t.tagID){case s.I:case s.S:case s.B:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.SMALL:case s.STRIKE:case s.STRONG:{Gl(e,t);break}case s.A:{Xl(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{Fl(e,t);break}case s.P:case s.DL:case s.OL:case s.UL:case s.DIV:case s.DIR:case s.NAV:case s.MAIN:case s.MENU:case s.ASIDE:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.DETAILS:case s.ADDRESS:case s.ARTICLE:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{Ul(e,t);break}case s.LI:case s.DD:case s.DT:{Vl(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{ss(e,t);break}case s.HR:{Zl(e,t);break}case s.RB:case s.RTC:{s0(e,t);break}case s.RT:case s.RP:{r0(e,t);break}case s.PRE:case s.LISTING:{Hl(e,t);break}case s.XMP:{t0(e,t);break}case s.SVG:{o0(e,t);break}case s.HTML:{vl(e,t);break}case s.BASE:case s.LINK:case s.META:case s.STYLE:case s.TITLE:case s.SCRIPT:case s.BGSOUND:case s.BASEFONT:case s.TEMPLATE:{Se(e,t);break}case s.BODY:{wl(e,t);break}case s.FORM:{Yl(e,t);break}case s.NOBR:{$l(e,t);break}case s.MATH:{u0(e,t);break}case s.TABLE:{jl(e,t);break}case s.INPUT:{zl(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{Kl(e,t);break}case s.IMAGE:{Jl(e,t);break}case s.BUTTON:{Wl(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{Ql(e,t);break}case s.IFRAME:{a0(e,t);break}case s.SELECT:{i0(e,t);break}case s.OPTION:case s.OPTGROUP:{n0(e,t);break}case s.NOEMBED:case s.NOFRAMES:{us(e,t);break}case s.FRAMESET:{Bl(e,t);break}case s.TEXTAREA:{e0(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?us(e,t):os(e,t);break}case s.PLAINTEXT:{ql(e,t);break}case s.COL:case s.TH:case s.TD:case s.TR:case s.HEAD:case s.FRAME:case s.TBODY:case s.TFOOT:case s.THEAD:case s.CAPTION:case s.COLGROUP:break;default:os(e,t)}}function c0(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=m.AFTER_BODY,e.options.sourceCodeLocationInfo)){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function l0(e,t){e.openElements.hasInScope(s.BODY)&&(e.insertionMode=m.AFTER_BODY,bs(e,t))}function d0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function h0(e){const t=e.openElements.tmplCount>0,{formElement:a}=e;t||(e.formElement=null),(a||t)&&e.openElements.hasInScope(s.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(s.FORM):a&&e.openElements.remove(a))}function f0(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(p.P,s.P),e._closePElement()}function E0(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function m0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function T0(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function p0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function b0(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(p.BR,s.BR),e.openElements.pop(),e.framesetOk=!1}function cs(e,t){const a=t.tagName,i=t.tagID;for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n],u=e.openElements.tagIDs[n];if(i===u&&(i!==s.UNKNOWN||e.treeAdapter.getTagName(r)===a)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=n&&e.openElements.shortenToLength(n);break}if(e._isSpecialElement(r,u))break}}function da(e,t){switch(t.tagID){case s.A:case s.B:case s.I:case s.S:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.NOBR:case s.SMALL:case s.STRIKE:case s.STRONG:{oi(e,t);break}case s.P:{f0(e);break}case s.DL:case s.UL:case s.OL:case s.DIR:case s.DIV:case s.NAV:case s.PRE:case s.MAIN:case s.MENU:case s.ASIDE:case s.BUTTON:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.ADDRESS:case s.ARTICLE:case s.DETAILS:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.LISTING:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{d0(e,t);break}case s.LI:{E0(e);break}case s.DD:case s.DT:{m0(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{T0(e);break}case s.BR:{b0(e);break}case s.BODY:{c0(e,t);break}case s.HTML:{l0(e,t);break}case s.FORM:{h0(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{p0(e,t);break}case s.TEMPLATE:{Ze(e,t);break}default:cs(e,t)}}function ls(e,t){e.tmplInsertionModeStack.length>0?ps(e,t):li(e,t)}function g0(e,t){var a;t.tagID===s.SCRIPT&&((a=e.scriptHandler)===null||a===void 0||a.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function _0(e,t){e._err(t,g.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function di(e,t){if(es.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=m.IN_TABLE_TEXT,t.type){case W.CHARACTER:{hs(e,t);break}case W.WHITESPACE_CHARACTER:{ds(e,t);break}}else kt(e,t)}function A0(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_CAPTION}function N0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_COLUMN_GROUP}function C0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(p.COLGROUP,s.COLGROUP),e.insertionMode=m.IN_COLUMN_GROUP,hi(e,t)}function I0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_TABLE_BODY}function S0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(p.TBODY,s.TBODY),e.insertionMode=m.IN_TABLE_BODY,fa(e,t)}function x0(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function O0(e,t){rs(t)?e._appendElement(t,A.HTML):kt(e,t),t.ackSelfClosing=!0}function D0(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,A.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ct(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{S0(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{Se(e,t);break}case s.COL:{C0(e,t);break}case s.FORM:{D0(e,t);break}case s.TABLE:{x0(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{I0(e,t);break}case s.INPUT:{O0(e,t);break}case s.CAPTION:{A0(e,t);break}case s.COLGROUP:{N0(e,t);break}default:kt(e,t)}}function Pt(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{Ze(e,t);break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:kt(e,t)}}function kt(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,la(e,t),e.fosterParentingEnabled=a}function ds(e,t){e.pendingCharacterTokens.push(t)}function hs(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function vt(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)kt(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const fs=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function L0(e,t){const a=t.tagID;fs.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=m.IN_TABLE,ct(e,t)):le(e,t)}function R0(e,t){const a=t.tagID;switch(a){case s.CAPTION:case s.TABLE:{e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=m.IN_TABLE,a===s.TABLE&&Pt(e,t));break}case s.BODY:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:da(e,t)}}function hi(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.COL:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.TEMPLATE:{Se(e,t);break}default:ha(e,t)}}function y0(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=m.IN_TABLE);break}case s.TEMPLATE:{Ze(e,t);break}case s.COL:break;default:ha(e,t)}}function ha(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=m.IN_TABLE,e._processToken(t))}function fa(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(p.TR,s.TR),e.insertionMode=m.IN_ROW,Ea(e,t);break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE,ct(e,t));break}default:ct(e,t)}}function fi(e,t){const a=t.tagID;switch(t.tagID){case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasInTableScope(a)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE,Pt(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:case s.TR:break;default:Pt(e,t)}}function Ea(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,A.HTML),e.insertionMode=m.IN_CELL,e.activeFormattingElements.insertMarker();break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY,fa(e,t));break}default:ct(e,t)}}function Es(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY,fi(e,t));break}case s.TBODY:case s.TFOOT:case s.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(s.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY,fi(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:break;default:Pt(e,t)}}function M0(e,t){const a=t.tagID;fs.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),Ea(e,t)):le(e,t)}function P0(e,t){const a=t.tagID;switch(a){case s.TD:case s.TH:{e.openElements.hasInTableScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=m.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),Es(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:da(e,t)}}function ms(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,A.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,A.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.INPUT:case s.KEYGEN:case s.TEXTAREA:case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),t.tagID!==s.SELECT&&e._processStartTag(t));break}case s.SCRIPT:case s.TEMPLATE:{Se(e,t);break}}}function Ts(e,t){switch(t.tagID){case s.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===s.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===s.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop();break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop();break}case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode());break}case s.TEMPLATE:{Ze(e,t);break}}}function k0(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ms(e,t)}function v0(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?e.openElements.hasInTableScope(a)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ts(e,t)}function w0(e,t){switch(t.tagID){case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{Se(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=m.IN_TABLE,e.insertionMode=m.IN_TABLE,ct(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=m.IN_COLUMN_GROUP,e.insertionMode=m.IN_COLUMN_GROUP,hi(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=m.IN_TABLE_BODY,e.insertionMode=m.IN_TABLE_BODY,fa(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=m.IN_ROW,e.insertionMode=m.IN_ROW,Ea(e,t);break}default:e.tmplInsertionModeStack[0]=m.IN_BODY,e.insertionMode=m.IN_BODY,le(e,t)}}function B0(e,t){t.tagID===s.TEMPLATE&&Ze(e,t)}function ps(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):li(e,t)}function U0(e,t){t.tagID===s.HTML?le(e,t):ma(e,t)}function bs(e,t){var a;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=m.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===s.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(i))===null||a===void 0)&&a.endTag)&&e._setEndLocation(i,t)}}else ma(e,t)}function ma(e,t){e.insertionMode=m.IN_BODY,la(e,t)}function F0(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.FRAMESET:{e._insertElement(t,A.HTML);break}case s.FRAME:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.NOFRAMES:{Se(e,t);break}}}function H0(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=m.AFTER_FRAMESET))}function Y0(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.NOFRAMES:{Se(e,t);break}}}function V0(e,t){t.tagID===s.HTML&&(e.insertionMode=m.AFTER_AFTER_FRAMESET)}function q0(e,t){t.tagID===s.HTML?le(e,t):Ta(e,t)}function Ta(e,t){e.insertionMode=m.IN_BODY,la(e,t)}function W0(e,t){switch(t.tagID){case s.HTML:{le(e,t);break}case s.NOFRAMES:{Se(e,t);break}}}function X0(e,t){t.chars=Z,e._insertCharacters(t)}function G0(e,t){e._insertCharacters(t),e.framesetOk=!1}function gs(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==A.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function $0(e,t){if(ol(t))gs(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(a);i===A.MATHML?Zn(t):i===A.SVG&&(cl(t),Jn(t)),ui(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function Q0(e,t){if(t.tagID===s.P||t.tagID===s.BR){gs(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(i)===A.HTML){e._endTagOutsideForeignContent(t);break}const n=e.treeAdapter.getTagName(i);if(n.toLowerCase()===t.tagName){t.tagName=n,e.openElements.shortenToLength(a);break}}}const j0=new Set([p.AREA,p.BASE,p.BASEFONT,p.BGSOUND,p.BR,p.COL,p.EMBED,p.FRAME,p.HR,p.IMG,p.INPUT,p.KEYGEN,p.LINK,p.META,p.PARAM,p.SOURCE,p.TRACK,p.WBR]);function z0(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===A.HTML&&j0.has(t.treeAdapter.getTagName(e))}const K0={treeAdapter:ke,scriptingEnabled:!0};function Z0(e,t){const a={...K0,...t};return _s(e,a)}function J0(e,t){let a="";const i=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===p.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===A.HTML?t.treeAdapter.getTemplateContent(e):e,n=t.treeAdapter.getChildNodes(i);if(n)for(const r of n)a+=_s(r,t);return a}function _s(e,t){return t.treeAdapter.isElementNode(e)?ed(e,t):t.treeAdapter.isTextNode(e)?ad(e,t):t.treeAdapter.isCommentNode(e)?id(e,t):t.treeAdapter.isDocumentTypeNode(e)?nd(e,t):""}function ed(e,t){const a=t.treeAdapter.getTagName(e);return`<${a}${td(e,t)}>${z0(e,t)?"":`${J0(e,t)}</${a}>`}`}function td(e,{treeAdapter:t}){let a="";for(const i of t.getAttrList(e)){if(a+=" ",i.namespace)switch(i.namespace){case A.XML:{a+=`xml:${i.name}`;break}case A.XMLNS:{i.name!=="xmlns"&&(a+="xmlns:"),a+=i.name;break}case A.XLINK:{a+=`xlink:${i.name}`;break}default:a+=`${i.prefix}:${i.name}`}else a+=i.name;a+=`="${Hi(i.value)}"`}return a}function ad(e,t){const{treeAdapter:a}=t,i=a.getTextNodeContent(e),n=a.getParentNode(e),r=n&&a.isElementNode(n)&&a.getTagName(n);return r&&a.getNamespaceURI(n)===A.HTML&&wc(r,t.scriptingEnabled)?i:Yi(i)}function id(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function nd(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function sd(e,t){return as.parse(e,t)}function rd(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);const i=as.getFragmentParser(e,a);return i.tokenizer.write(t,!0),i.getFragment()}function As(e){const t=e.includes('"')?"'":'"';return t+e+t}function ud(e,t,a){let i="!DOCTYPE ";return e&&(i+=e),t?i+=` PUBLIC ${As(t)}`:a&&(i+=" SYSTEM"),a&&(i+=` ${As(a)}`),i}const Ve={isCommentNode:Wt,isElementNode:v,isTextNode:De,createDocument(){const e=new Ge([]);return e["x-mode"]=_e.NO_QUIRKS,e},createDocumentFragment(){return new Ge([])},createElement(e,t,a){const i=Object.create(null),n=Object.create(null),r=Object.create(null);for(let o=0;o<a.length;o++){const l=a[o].name;i[l]=a[o].value,n[l]=a[o].namespace,r[l]=a[o].prefix}const u=new xa(e,i,[]);return u.namespace=t,u["x-attribsNamespace"]=n,u["x-attribsPrefix"]=r,u},createCommentNode(e){return new Ca(e)},createTextNode(e){return new Tt(e)},appendChild(e,t){const a=e.children[e.children.length-1];a&&(a.next=t,t.prev=a),e.children.push(t),t.parent=e},insertBefore(e,t,a){const i=e.children.indexOf(a),{prev:n}=a;n&&(n.next=t,t.prev=n),a.prev=t,t.next=a,e.children.splice(i,0,t),t.parent=e},setTemplateContent(e,t){Ve.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,a,i){const n=ud(t,a,i);let r=e.children.find(u=>Oa(u)&&u.name==="!doctype");r?r.data=n??null:(r=new Ia("!doctype",n),Ve.appendChild(e,r)),r["x-name"]=t,r["x-publicId"]=a,r["x-systemId"]=i},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:a,next:i}=e;e.prev=null,e.next=null,a&&(a.next=i),i&&(i.prev=a),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const a=e.children[e.children.length-1];a&&De(a)?a.data+=t:Ve.appendChild(e,Ve.createTextNode(t))},insertTextBefore(e,t,a){const i=e.children[e.children.indexOf(a)-1];i&&De(i)?i.data+=t:Ve.insertBefore(e,Ve.createTextNode(t),a)},adoptAttributes(e,t){for(let a=0;a<t.length;a++){const i=t[a].name;e.attribs[i]===void 0&&(e.attribs[i]=t[a].value,e["x-attribsNamespace"][i]=t[a].namespace,e["x-attribsPrefix"][i]=t[a].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return Oa(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function od(e,t,a,i){var n;return(n=t.treeAdapter)!==null&&n!==void 0||(t.treeAdapter=Ve),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),a?sd(e,t):rd(i,e,t)}const cd={treeAdapter:Ve};function ld(e){const t="length"in e?e:[e];for(let i=0;i<t.length;i+=1){const n=t[i];Be(n)&&Array.prototype.splice.call(t,i,1,...n.children)}let a="";for(let i=0;i<t.length;i+=1){const n=t[i];a+=Z0(n,cd)}return a}var M;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(M||(M={}));var C;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(C||(C={}));function ve(e){return e===M.Space||e===M.NewLine||e===M.Tab||e===M.FormFeed||e===M.CarriageReturn}function pa(e){return e===M.Slash||e===M.Gt||ve(e)}function dd(e){return e>=M.LowerA&&e<=M.LowerZ||e>=M.UpperA&&e<=M.UpperZ}var Re;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Re||(Re={}));const ce={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]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class hd{constructor({xmlMode:t=!1,decodeEntities:a=!0},i){this.cbs=i,this.state=C.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=C.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=a,this.entityDecoder=new Pa(t?vi:La,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=C.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=C.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===M.Lt||!this.decodeEntities&&this.fastForwardTo(M.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=C.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===M.Amp&&this.startEntity()}stateSpecialStartSequence(t){const a=this.sequenceIndex===this.currentSequence.length;if(!(a?pa(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!a){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=C.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===M.Gt||ve(t)){const a=this.index-this.currentSequence.length;if(this.sectionStart<a){const i=this.index;this.index=a,this.cbs.ontext(this.sectionStart,a),this.index=i}this.isSpecial=!1,this.sectionStart=a+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===ce.TitleEnd?this.decodeEntities&&t===M.Amp&&this.startEntity():this.fastForwardTo(M.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===M.Lt)}stateCDATASequence(t){t===ce.Cdata[this.sequenceIndex]?++this.sequenceIndex===ce.Cdata.length&&(this.state=C.InCommentLike,this.currentSequence=ce.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=C.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===ce.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=C.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!pa(t):dd(t)}startSpecial(t,a){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=a,this.state=C.SpecialStartSequence}stateBeforeTagName(t){if(t===M.ExclamationMark)this.state=C.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===M.Questionmark)this.state=C.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const a=t|32;this.sectionStart=this.index,this.xmlMode?this.state=C.InTagName:a===ce.ScriptEnd[2]?this.state=C.BeforeSpecialS:a===ce.TitleEnd[2]?this.state=C.BeforeSpecialT:this.state=C.InTagName}else t===M.Slash?this.state=C.BeforeClosingTagName:(this.state=C.Text,this.stateText(t))}stateInTagName(t){pa(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){ve(t)||(t===M.Gt?this.state=C.Text:(this.state=this.isTagStartChar(t)?C.InClosingTagName:C.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===M.Gt||ve(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=C.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===M.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=C.InSpecialTag,this.sequenceIndex=0):this.state=C.Text,this.sectionStart=this.index+1):t===M.Slash?this.state=C.InSelfClosingTag:ve(t)||(this.state=C.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===M.Gt?(this.cbs.onselfclosingtag(this.index),this.state=C.Text,this.sectionStart=this.index+1,this.isSpecial=!1):ve(t)||(this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===M.Eq||pa(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=C.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===M.Eq?this.state=C.BeforeAttributeValue:t===M.Slash||t===M.Gt?(this.cbs.onattribend(Re.NoValue,this.sectionStart),this.sectionStart=-1,this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t)):ve(t)||(this.cbs.onattribend(Re.NoValue,this.sectionStart),this.state=C.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===M.DoubleQuote?(this.state=C.InAttributeValueDq,this.sectionStart=this.index+1):t===M.SingleQuote?(this.state=C.InAttributeValueSq,this.sectionStart=this.index+1):ve(t)||(this.sectionStart=this.index,this.state=C.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,a){t===a||!this.decodeEntities&&this.fastForwardTo(a)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a===M.DoubleQuote?Re.Double:Re.Single,this.index+1),this.state=C.BeforeAttributeName):this.decodeEntities&&t===M.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,M.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,M.SingleQuote)}stateInAttributeValueNoQuotes(t){ve(t)||t===M.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Re.Unquoted,this.index),this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===M.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===M.OpeningSquareBracket?(this.state=C.CDATASequence,this.sequenceIndex=0):this.state=t===M.Dash?C.BeforeComment:C.InDeclaration}stateInDeclaration(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=C.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===M.Dash?(this.state=C.InCommentLike,this.currentSequence=ce.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=C.InDeclaration}stateInSpecialComment(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const a=t|32;a===ce.ScriptEnd[3]?this.startSpecial(ce.ScriptEnd,4):a===ce.StyleEnd[3]?this.startSpecial(ce.StyleEnd,4):(this.state=C.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const a=t|32;a===ce.TitleEnd[3]?this.startSpecial(ce.TitleEnd,4):a===ce.TextareaEnd[3]?this.startSpecial(ce.TextareaEnd,4):(this.state=C.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=C.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Ne.Strict:this.baseState===C.Text||this.baseState===C.InSpecialTag?Ne.Legacy:Ne.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===C.Text||this.state===C.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===C.InAttributeValueDq||this.state===C.InAttributeValueSq||this.state===C.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case C.Text:{this.stateText(t);break}case C.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case C.InSpecialTag:{this.stateInSpecialTag(t);break}case C.CDATASequence:{this.stateCDATASequence(t);break}case C.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case C.InAttributeName:{this.stateInAttributeName(t);break}case C.InCommentLike:{this.stateInCommentLike(t);break}case C.InSpecialComment:{this.stateInSpecialComment(t);break}case C.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case C.InTagName:{this.stateInTagName(t);break}case C.InClosingTagName:{this.stateInClosingTagName(t);break}case C.BeforeTagName:{this.stateBeforeTagName(t);break}case C.AfterAttributeName:{this.stateAfterAttributeName(t);break}case C.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case C.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case C.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case C.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case C.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case C.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case C.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case C.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case C.InDeclaration:{this.stateInDeclaration(t);break}case C.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case C.BeforeComment:{this.stateBeforeComment(t);break}case C.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case C.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===C.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===C.InCommentLike?this.currentSequence===ce.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===C.InTagName||this.state===C.BeforeAttributeName||this.state===C.BeforeAttributeValue||this.state===C.AfterAttributeName||this.state===C.InAttributeName||this.state===C.InAttributeValueSq||this.state===C.InAttributeValueDq||this.state===C.InAttributeValueNq||this.state===C.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,a){this.baseState!==C.Text&&this.baseState!==C.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const lt=new Set(["input","option","optgroup","select","button","datalist","textarea"]),z=new Set(["p"]),Ns=new Set(["thead","tbody"]),Cs=new Set(["dd","dt"]),Is=new Set(["rt","rp"]),fd=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",z],["h1",z],["h2",z],["h3",z],["h4",z],["h5",z],["h6",z],["select",lt],["input",lt],["output",lt],["button",lt],["datalist",lt],["textarea",lt],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",Cs],["dt",Cs],["address",z],["article",z],["aside",z],["blockquote",z],["details",z],["div",z],["dl",z],["fieldset",z],["figcaption",z],["figure",z],["footer",z],["form",z],["header",z],["hr",z],["main",z],["nav",z],["ol",z],["pre",z],["section",z],["table",z],["ul",z],["rt",Is],["rp",Is],["tbody",Ns],["tfoot",Ns]]),Ed=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),Ss=new Set(["math","svg"]),xs=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),md=/\s|\//;class Td{constructor(t,a={}){var i,n,r,u,o,l;this.options=a,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(i=a.lowerCaseTags)!==null&&i!==void 0?i:this.htmlMode,this.lowerCaseAttributeNames=(n=a.lowerCaseAttributeNames)!==null&&n!==void 0?n:this.htmlMode,this.recognizeSelfClosing=(r=a.recognizeSelfClosing)!==null&&r!==void 0?r:!this.htmlMode,this.tokenizer=new((u=a.Tokenizer)!==null&&u!==void 0?u:hd)(this.options,this),this.foreignContext=[!this.htmlMode],(l=(o=this.cbs).onparserinit)===null||l===void 0||l.call(o,this)}ontext(t,a){var i,n;const r=this.getSlice(t,a);this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,r),this.startIndex=a}ontextentity(t,a){var i,n;this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,ya(t)),this.startIndex=a}isVoidElement(t){return this.htmlMode&&Ed.has(t)}onopentagname(t,a){this.endIndex=a;let i=this.getSlice(t,a);this.lowerCaseTagNames&&(i=i.toLowerCase()),this.emitOpenTag(i)}emitOpenTag(t){var a,i,n,r;this.openTagStart=this.startIndex,this.tagname=t;const u=this.htmlMode&&fd.get(t);if(u)for(;this.stack.length>0&&u.has(this.stack[0]);){const o=this.stack.shift();(i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,o,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(Ss.has(t)?this.foreignContext.unshift(!0):xs.has(t)&&this.foreignContext.unshift(!1))),(r=(n=this.cbs).onopentagname)===null||r===void 0||r.call(n,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var a,i;this.startIndex=this.openTagStart,this.attribs&&((i=(a=this.cbs).onopentag)===null||i===void 0||i.call(a,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,a){var i,n,r,u,o,l,f,E;this.endIndex=a;let T=this.getSlice(t,a);if(this.lowerCaseTagNames&&(T=T.toLowerCase()),this.htmlMode&&(Ss.has(T)||xs.has(T))&&this.foreignContext.shift(),this.isVoidElement(T))this.htmlMode&&T==="br"&&((u=(r=this.cbs).onopentagname)===null||u===void 0||u.call(r,"br"),(l=(o=this.cbs).onopentag)===null||l===void 0||l.call(o,"br",{},!0),(E=(f=this.cbs).onclosetag)===null||E===void 0||E.call(f,"br",!1));else{const b=this.stack.indexOf(T);if(b!==-1)for(let N=0;N<=b;N++){const S=this.stack.shift();(n=(i=this.cbs).onclosetag)===null||n===void 0||n.call(i,S,N!==b)}else this.htmlMode&&T==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=a+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var a,i;const n=this.tagname;this.endOpenTag(t),this.stack[0]===n&&((i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,n,!t),this.stack.shift())}onattribname(t,a){this.startIndex=t;const i=this.getSlice(t,a);this.attribname=this.lowerCaseAttributeNames?i.toLowerCase():i}onattribdata(t,a){this.attribvalue+=this.getSlice(t,a)}onattribentity(t){this.attribvalue+=ya(t)}onattribend(t,a){var i,n;this.endIndex=a,(n=(i=this.cbs).onattribute)===null||n===void 0||n.call(i,this.attribname,this.attribvalue,t===Re.Double?'"':t===Re.Single?"'":t===Re.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const a=t.search(md);let i=a<0?t:t.substr(0,a);return this.lowerCaseTagNames&&(i=i.toLowerCase()),i}ondeclaration(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`!${n}`,`!${i}`)}this.startIndex=a+1}onprocessinginstruction(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`?${n}`,`?${i}`)}this.startIndex=a+1}oncomment(t,a,i){var n,r,u,o;this.endIndex=a,(r=(n=this.cbs).oncomment)===null||r===void 0||r.call(n,this.getSlice(t,a-i)),(o=(u=this.cbs).oncommentend)===null||o===void 0||o.call(u),this.startIndex=a+1}oncdata(t,a,i){var n,r,u,o,l,f,E,T,b,N;this.endIndex=a;const S=this.getSlice(t,a-i);!this.htmlMode||this.options.recognizeCDATA?((r=(n=this.cbs).oncdatastart)===null||r===void 0||r.call(n),(o=(u=this.cbs).ontext)===null||o===void 0||o.call(u,S),(f=(l=this.cbs).oncdataend)===null||f===void 0||f.call(l)):((T=(E=this.cbs).oncomment)===null||T===void 0||T.call(E,`[CDATA[${S}]]`),(N=(b=this.cbs).oncommentend)===null||N===void 0||N.call(b)),this.startIndex=a+1}onend(){var t,a;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let i=0;i<this.stack.length;i++)this.cbs.onclosetag(this.stack[i],!0)}(a=(t=this.cbs).onend)===null||a===void 0||a.call(t)}reset(){var t,a,i,n;(a=(t=this.cbs).onreset)===null||a===void 0||a.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(n=(i=this.cbs).onparserinit)===null||n===void 0||n.call(i,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,a){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let i=this.buffers[0].slice(t-this.bufferOffset,a-this.bufferOffset);for(;a-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),i+=this.buffers[0].slice(0,a-this.bufferOffset);return i}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}}function pd(e,t){const a=new br(void 0,t);return new Td(a,t).end(e),a.root}const bd=$o((e,t,a,i)=>t._useHtmlParser2?pd(e,t):od(e,t,a,i)),Os=xc(bd,(e,t)=>t._useHtmlParser2?Xt(e,t):ld(e));var de=(e=>(e[e.None=0]="None",e[e.Text=1]="Text",e[e.Image=2]="Image",e[e.Video=3]="Video",e[e.Icon=4]="Icon",e[e.Link=5]="Link",e[e.Block=10]="Block",e))(de||{});const gd=c.defineComponent({name:"CustomIcon",props:{iconName:{type:String,required:!0}},setup(e){return{iconClass:c.computed(()=>`${e.iconName}`)}}}),Ei=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a};function _d(e,t,a,i,n,r){return c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)},null,2)}const Ad=Ei(gd,[["render",_d]]),Nd={key:0,contenteditable:"false",class:c.normalizeClass(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])},Cd={class:"flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden"},Id={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Sd={class:"p-8 items-center justify-center flex flex-wrap h-[500px] overflow-y-auto"},xd=c.defineComponent({__name:"IconModal",props:{icons:{type:Array,default:()=>[]}},emits:["ok"],setup(e,{expose:t,emit:a}){const i=e,n=c.ref(i.icons||[]);c.watch(()=>i.icons,E=>{n.value=E||[]},{immediate:!0});const r=a,u=c.ref(!1);function o(){console.log(666),u.value=!0}function l(E){f(),r("ok",E)}function f(){u.value=!1}return t({openModal:o,closeModal:f}),(E,T)=>u.value?(c.openBlock(),c.createElementBlock("div",Nd,[c.createElementVNode("div",Cd,[c.createElementVNode("div",Id,[T[1]||(T[1]=c.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"选择图标",-1)),c.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:T[0]||(T[0]=c.withModifiers(b=>f(),["stop"]))})]),c.createElementVNode("div",Sd,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,b=>(c.openBlock(),c.createBlock(Ad,{key:b,class:"w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",iconName:b,onClick:c.withModifiers(N=>l(b),["stop"]),title:b},null,8,["iconName","onClick","title"]))),128))])])])):c.createCommentVNode("",!0)}});function Ds(e){return typeof e=="number"&&Number.isFinite(e)}const Od=c.defineComponent({name:"ImgUploader",inheritAttrs:!1,__name:"UploadImage",props:{alt:{},beforeUpload:{},customUpload:{},getExtraData:{},height:{default:100},multiple:{type:Boolean,default:!1},src:{},tip:{default:"点击上传"},width:{default:100},uploadByImage:{}},setup(e){const t=e,a=c.ref(),i=c.computed(()=>{const u={width:t.width,height:t.height};return Ds(t.width)&&(u.width+="px"),Ds(t.height)&&(u.height+="px"),u});async function n(u){console.log(u,u.target);const o=u.target.files[0];console.log(o),typeof t.customUpload=="function"&&t.customUpload(o),!(typeof t.beforeUpload=="function"&&!await t.beforeUpload(o))&&(typeof t.getExtraData=="function"&&await t.getExtraData(o),o&&(r(o),a.value.value=""))}async function r(u){if(t.uploadByImage){await t.uploadByImage(u);return}return{success:0}}return(u,o)=>(c.openBlock(),c.createElementBlock("div",c.mergeProps({style:i.value,contenteditable:"false",class:"bg-background-deep box-border cursor-pointer absolute left-0 top-0",title:"点击上传"},u.$attrs,{onClick:o[2]||(o[2]=c.withModifiers(()=>{},["stop"]))}),[c.createElementVNode("input",{onClick:o[0]||(o[0]=c.withModifiers(()=>{},["stop"])),contenteditable:"false",class:"cursor-pointer w-16 opacity-0",type:"file",ref_key:"fileInput",ref:a,onChange:o[1]||(o[1]=l=>n(l)),accept:"image/*"},null,544)],16))}});/*!
|
2
9
|
* Cropper.js v1.6.2
|
3
10
|
* https://fengyuanchen.github.io/cropperjs
|
4
11
|
*
|
@@ -6,12 +13,5 @@
|
|
6
13
|
* Released under the MIT license
|
7
14
|
*
|
8
15
|
* Date: 2024-04-21T07:43:05.335Z
|
9
|
-
*/function
|
10
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Vt=typeof window<"u"&&typeof window.document<"u",Se=Vt?window:{},Ca=Vt&&Se.document.documentElement?"ontouchstart"in Se.document.documentElement:!1,Ia=Vt?"PointerEvent"in Se:!1,$="cropper",Sa="all",Ui="crop",Fi="move",Hi="zoom",We="e",Xe="w",tt="s",ve="n",Et="ne",mt="nw",Tt="se",pt="sw",xa="".concat($,"-crop"),Yi="".concat($,"-disabled"),he="".concat($,"-hidden"),Vi="".concat($,"-hide"),Sr="".concat($,"-invisible"),qt="".concat($,"-modal"),Oa="".concat($,"-move"),bt="".concat($,"Action"),Wt="".concat($,"Preview"),Da="crop",qi="move",Wi="none",La="crop",Ra="cropend",ya="cropmove",Ma="cropstart",Xi="dblclick",xr=Ca?"touchstart":"mousedown",Or=Ca?"touchmove":"mousemove",Dr=Ca?"touchend touchcancel":"mouseup",Gi=Ia?"pointerdown":xr,$i=Ia?"pointermove":Or,Qi=Ia?"pointerup pointercancel":Dr,ji="ready",Ki="resize",zi="wheel",Pa="zoom",Zi="image/jpeg",Lr=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Rr=/^data:/,yr=/^data:image\/jpeg;base64,/,Mr=/^img|canvas$/i,Ji=200,en=100,tn={viewMode:0,dragMode:Da,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:Ji,minContainerHeight:en,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Pr='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',kr=Number.isNaN||Se.isNaN;function F(e){return typeof e=="number"&&!kr(e)}var an=function(t){return t>0&&t<1/0};function ka(e){return typeof e>"u"}function Ge(e){return Aa(e)==="object"&&e!==null}var vr=Object.prototype.hasOwnProperty;function at(e){if(!Ge(e))return!1;try{var t=e.constructor,a=t.prototype;return t&&a&&vr.call(a,"isPrototypeOf")}catch{return!1}}function fe(e){return typeof e=="function"}var wr=Array.prototype.slice;function nn(e){return Array.from?Array.from(e):wr.call(e)}function ee(e,t){return e&&fe(t)&&(Array.isArray(e)||F(e.length)?nn(e).forEach(function(a,i){t.call(e,a,i,e)}):Ge(e)&&Object.keys(e).forEach(function(a){t.call(e,e[a],a,e)})),e}var Q=Object.assign||function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),n=1;n<a;n++)i[n-1]=arguments[n];return Ge(t)&&i.length>0&&i.forEach(function(r){Ge(r)&&Object.keys(r).forEach(function(u){t[u]=r[u]})}),t},Br=/\.\d*(?:0|9){12}\d*$/;function it(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Br.test(e)?Math.round(e*t)/t:e}var Ur=/^width|height|left|top|marginLeft|marginTop$/;function we(e,t){var a=e.style;ee(t,function(i,n){Ur.test(n)&&F(i)&&(i="".concat(i,"px")),a[n]=i})}function Fr(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function ae(e,t){if(t){if(F(e.length)){ee(e,function(i){ae(i,t)});return}if(e.classList){e.classList.add(t);return}var a=e.className.trim();a?a.indexOf(t)<0&&(e.className="".concat(a," ").concat(t)):e.className=t}}function xe(e,t){if(t){if(F(e.length)){ee(e,function(a){xe(a,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function nt(e,t,a){if(t){if(F(e.length)){ee(e,function(i){nt(i,t,a)});return}a?ae(e,t):xe(e,t)}}var Hr=/([a-z\d])([A-Z])/g;function va(e){return e.replace(Hr,"$1-$2").toLowerCase()}function wa(e,t){return Ge(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(va(t)))}function gt(e,t,a){Ge(a)?e[t]=a:e.dataset?e.dataset[t]=a:e.setAttribute("data-".concat(va(t)),a)}function Yr(e,t){if(Ge(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(va(t)))}var sn=/\s\s*/,rn=function(){var e=!1;if(Vt){var t=!1,a=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(r){t=r}});Se.addEventListener("test",a,i),Se.removeEventListener("test",a,i)}return e}();function Ce(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sn).forEach(function(r){if(!rn){var u=e.listeners;u&&u[r]&&u[r][a]&&(n=u[r][a],delete u[r][a],Object.keys(u[r]).length===0&&delete u[r],Object.keys(u).length===0&&delete e.listeners)}e.removeEventListener(r,n,i)})}function be(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sn).forEach(function(r){if(i.once&&!rn){var u=e.listeners,o=u===void 0?{}:u;n=function(){delete o[r][a],e.removeEventListener(r,n,i);for(var f=arguments.length,E=new Array(f),T=0;T<f;T++)E[T]=arguments[T];a.apply(e,E)},o[r]||(o[r]={}),o[r][a]&&e.removeEventListener(r,o[r][a],i),o[r][a]=n,e.listeners=o}e.addEventListener(r,n,i)})}function st(e,t,a){var i;return fe(Event)&&fe(CustomEvent)?i=new CustomEvent(t,{detail:a,bubbles:!0,cancelable:!0}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(t,!0,!0,a)),e.dispatchEvent(i)}function un(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var Ba=Se.location,Vr=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function on(e){var t=e.match(Vr);return t!==null&&(t[1]!==Ba.protocol||t[2]!==Ba.hostname||t[3]!==Ba.port)}function cn(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function _t(e){var t=e.rotate,a=e.scaleX,i=e.scaleY,n=e.translateX,r=e.translateY,u=[];F(n)&&n!==0&&u.push("translateX(".concat(n,"px)")),F(r)&&r!==0&&u.push("translateY(".concat(r,"px)")),F(t)&&t!==0&&u.push("rotate(".concat(t,"deg)")),F(a)&&a!==1&&u.push("scaleX(".concat(a,")")),F(i)&&i!==1&&u.push("scaleY(".concat(i,")"));var o=u.length?u.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function qr(e){var t=ki({},e),a=0;return ee(e,function(i,n){delete t[n],ee(t,function(r){var u=Math.abs(i.startX-r.startX),o=Math.abs(i.startY-r.startY),c=Math.abs(i.endX-r.endX),f=Math.abs(i.endY-r.endY),E=Math.sqrt(u*u+o*o),T=Math.sqrt(c*c+f*f),p=(T-E)/E;Math.abs(p)>Math.abs(a)&&(a=p)})}),a}function Xt(e,t){var a=e.pageX,i=e.pageY,n={endX:a,endY:i};return t?n:ki({startX:a,startY:i},n)}function Wr(e){var t=0,a=0,i=0;return ee(e,function(n){var r=n.startX,u=n.startY;t+=r,a+=u,i+=1}),t/=i,a/=i,{pageX:t,pageY:a}}function Be(e){var t=e.aspectRatio,a=e.height,i=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=an(i),u=an(a);if(r&&u){var o=a*t;n==="contain"&&o>i||n==="cover"&&o<i?a=i/t:i=a*t}else r?a=i/t:u&&(i=a*t);return{width:i,height:a}}function Xr(e){var t=e.width,a=e.height,i=e.degree;if(i=Math.abs(i)%180,i===90)return{width:a,height:t};var n=i%90*Math.PI/180,r=Math.sin(n),u=Math.cos(n),o=t*u+a*r,c=t*r+a*u;return i>90?{width:c,height:o}:{width:o,height:c}}function Gr(e,t,a,i){var n=t.aspectRatio,r=t.naturalWidth,u=t.naturalHeight,o=t.rotate,c=o===void 0?0:o,f=t.scaleX,E=f===void 0?1:f,T=t.scaleY,p=T===void 0?1:T,A=a.aspectRatio,C=a.naturalWidth,L=a.naturalHeight,M=i.fillColor,V=M===void 0?"transparent":M,B=i.imageSmoothingEnabled,H=B===void 0?!0:B,x=i.imageSmoothingQuality,O=x===void 0?"low":x,g=i.maxWidth,D=g===void 0?1/0:g,P=i.maxHeight,q=P===void 0?1/0:P,Z=i.minWidth,z=Z===void 0?0:Z,G=i.minHeight,Ae=G===void 0?0:G,re=document.createElement("canvas"),le=re.getContext("2d"),Re=Be({aspectRatio:A,width:D,height:q}),ft=Be({aspectRatio:A,width:z,height:Ae},"cover"),v=Math.min(Re.width,Math.max(ft.width,C)),w=Math.min(Re.height,Math.max(ft.height,L)),ue=Be({aspectRatio:n,width:D,height:q}),J=Be({aspectRatio:n,width:z,height:Ae},"cover"),Ne=Math.min(ue.width,Math.max(J.width,r)),et=Math.min(ue.height,Math.max(J.height,u)),Yt=[-Ne/2,-et/2,Ne,et];return re.width=it(v),re.height=it(w),le.fillStyle=V,le.fillRect(0,0,v,w),le.save(),le.translate(v/2,w/2),le.rotate(c*Math.PI/180),le.scale(E,p),le.imageSmoothingEnabled=H,le.imageSmoothingQuality=O,le.drawImage.apply(le,[e].concat(Bi(Yt.map(function(Ri){return Math.floor(it(Ri))})))),le.restore(),re}var ln=String.fromCharCode;function $r(e,t,a){var i="";a+=t;for(var n=t;n<a;n+=1)i+=ln(e.getUint8(n));return i}var Qr=/^data:.*,/;function jr(e){var t=e.replace(Qr,""),a=atob(t),i=new ArrayBuffer(a.length),n=new Uint8Array(i);return ee(n,function(r,u){n[u]=a.charCodeAt(u)}),i}function Kr(e,t){for(var a=[],i=8192,n=new Uint8Array(e);n.length>0;)a.push(ln.apply(null,nn(n.subarray(0,i)))),n=n.subarray(i);return"data:".concat(t,";base64,").concat(btoa(a.join("")))}function zr(e){var t=new DataView(e),a;try{var i,n,r;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var u=t.byteLength,o=2;o+1<u;){if(t.getUint8(o)===255&&t.getUint8(o+1)===225){n=o;break}o+=1}if(n){var c=n+4,f=n+10;if($r(t,c,4)==="Exif"){var E=t.getUint16(f);if(i=E===18761,(i||E===19789)&&t.getUint16(f+2,i)===42){var T=t.getUint32(f+4,i);T>=8&&(r=f+T)}}}if(r){var p=t.getUint16(r,i),A,C;for(C=0;C<p;C+=1)if(A=r+C*12+2,t.getUint16(A,i)===274){A+=8,a=t.getUint16(A,i),t.setUint16(A,1,i);break}}}catch{a=1}return a}function Zr(e){var t=0,a=1,i=1;switch(e){case 2:a=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,a=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:a,scaleY:i}}var Jr={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,a=this.options,i=this.container,n=this.cropper,r=Number(a.minContainerWidth),u=Number(a.minContainerHeight);ae(n,he),xe(t,he);var o={width:Math.max(i.offsetWidth,r>=0?r:Ji),height:Math.max(i.offsetHeight,u>=0?u:en)};this.containerData=o,we(n,{width:o.width,height:o.height}),ae(t,he),xe(n,he)},initCanvas:function(){var t=this.containerData,a=this.imageData,i=this.options.viewMode,n=Math.abs(a.rotate)%180===90,r=n?a.naturalHeight:a.naturalWidth,u=n?a.naturalWidth:a.naturalHeight,o=r/u,c=t.width,f=t.height;t.height*o>t.width?i===3?c=t.height*o:f=t.width/o:i===3?f=t.width/o:c=t.height*o;var E={aspectRatio:o,naturalWidth:r,naturalHeight:u,width:c,height:f};this.canvasData=E,this.limited=i===1||i===2,this.limitCanvas(!0,!0),E.width=Math.min(Math.max(E.width,E.minWidth),E.maxWidth),E.height=Math.min(Math.max(E.height,E.minHeight),E.maxHeight),E.left=(t.width-E.width)/2,E.top=(t.height-E.height)/2,E.oldLeft=E.left,E.oldTop=E.top,this.initialCanvasData=Q({},E)},limitCanvas:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=i.viewMode,c=r.aspectRatio,f=this.cropped&&u;if(t){var E=Number(i.minCanvasWidth)||0,T=Number(i.minCanvasHeight)||0;o>1?(E=Math.max(E,n.width),T=Math.max(T,n.height),o===3&&(T*c>E?E=T*c:T=E/c)):o>0&&(E?E=Math.max(E,f?u.width:0):T?T=Math.max(T,f?u.height:0):f&&(E=u.width,T=u.height,T*c>E?E=T*c:T=E/c));var p=Be({aspectRatio:c,width:E,height:T});E=p.width,T=p.height,r.minWidth=E,r.minHeight=T,r.maxWidth=1/0,r.maxHeight=1/0}if(a)if(o>(f?0:1)){var A=n.width-r.width,C=n.height-r.height;r.minLeft=Math.min(0,A),r.minTop=Math.min(0,C),r.maxLeft=Math.max(0,A),r.maxTop=Math.max(0,C),f&&this.limited&&(r.minLeft=Math.min(u.left,u.left+(u.width-r.width)),r.minTop=Math.min(u.top,u.top+(u.height-r.height)),r.maxLeft=u.left,r.maxTop=u.top,o===2&&(r.width>=n.width&&(r.minLeft=Math.min(0,A),r.maxLeft=Math.max(0,A)),r.height>=n.height&&(r.minTop=Math.min(0,C),r.maxTop=Math.max(0,C))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=n.width,r.maxTop=n.height},renderCanvas:function(t,a){var i=this.canvasData,n=this.imageData;if(a){var r=Xr({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),u=r.width,o=r.height,c=i.width*(u/i.naturalWidth),f=i.height*(o/i.naturalHeight);i.left-=(c-i.width)/2,i.top-=(f-i.height)/2,i.width=c,i.height=f,i.aspectRatio=u/o,i.naturalWidth=u,i.naturalHeight=o,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,we(this.canvas,Q({width:i.width,height:i.height},_t({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var a=this.canvasData,i=this.imageData,n=i.naturalWidth*(a.width/a.naturalWidth),r=i.naturalHeight*(a.height/a.naturalHeight);Q(i,{width:n,height:r,left:(a.width-n)/2,top:(a.height-r)/2}),we(this.image,Q({width:i.width,height:i.height},_t(Q({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,a=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,r={width:a.width,height:a.height};i&&(a.height*i>a.width?r.height=r.width/i:r.width=r.height*i),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*n),r.height=Math.max(r.minHeight,r.height*n),r.left=a.left+(a.width-r.width)/2,r.top=a.top+(a.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=Q({},r)},limitCropBox:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=this.limited,c=i.aspectRatio;if(t){var f=Number(i.minCropBoxWidth)||0,E=Number(i.minCropBoxHeight)||0,T=o?Math.min(n.width,r.width,r.width+r.left,n.width-r.left):n.width,p=o?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;f=Math.min(f,n.width),E=Math.min(E,n.height),c&&(f&&E?E*c>f?E=f/c:f=E*c:f?E=f/c:E&&(f=E*c),p*c>T?p=T/c:T=p*c),u.minWidth=Math.min(f,T),u.minHeight=Math.min(E,p),u.maxWidth=T,u.maxHeight=p}a&&(o?(u.minLeft=Math.max(0,r.left),u.minTop=Math.max(0,r.top),u.maxLeft=Math.min(n.width,r.left+r.width)-u.width,u.maxTop=Math.min(n.height,r.top+r.height)-u.height):(u.minLeft=0,u.minTop=0,u.maxLeft=n.width-u.width,u.maxTop=n.height-u.height))},renderCropBox:function(){var t=this.options,a=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&>(this.face,bt,i.width>=a.width&&i.height>=a.height?Fi:Sa),we(this.cropBox,Q({width:i.width,height:i.height},_t({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),st(this.element,La,this.getData())}},eu={initPreview:function(){var t=this.element,a=this.crossOrigin,i=this.options.preview,n=a?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",u=document.createElement("img");if(a&&(u.crossOrigin=a),u.src=n,u.alt=r,this.viewBox.appendChild(u),this.viewBoxImage=u,!!i){var o=i;typeof i=="string"?o=t.ownerDocument.querySelectorAll(i):i.querySelector&&(o=[i]),this.previews=o,ee(o,function(c){var f=document.createElement("img");gt(c,Wt,{width:c.offsetWidth,height:c.offsetHeight,html:c.innerHTML}),a&&(f.crossOrigin=a),f.src=n,f.alt=r,f.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',c.innerHTML="",c.appendChild(f)})}},resetPreview:function(){ee(this.previews,function(t){var a=wa(t,Wt);we(t,{width:a.width,height:a.height}),t.innerHTML=a.html,Yr(t,Wt)})},preview:function(){var t=this.imageData,a=this.canvasData,i=this.cropBoxData,n=i.width,r=i.height,u=t.width,o=t.height,c=i.left-a.left-t.left,f=i.top-a.top-t.top;!this.cropped||this.disabled||(we(this.viewBoxImage,Q({width:u,height:o},_t(Q({translateX:-c,translateY:-f},t)))),ee(this.previews,function(E){var T=wa(E,Wt),p=T.width,A=T.height,C=p,L=A,M=1;n&&(M=p/n,L=r*M),r&&L>A&&(M=A/r,C=n*M,L=A),we(E,{width:C,height:L}),we(E.getElementsByTagName("img")[0],Q({width:u*M,height:o*M},_t(Q({translateX:-c*M,translateY:-f*M},t))))}))}},tu={bind:function(){var t=this.element,a=this.options,i=this.cropper;fe(a.cropstart)&&be(t,Ma,a.cropstart),fe(a.cropmove)&&be(t,ya,a.cropmove),fe(a.cropend)&&be(t,Ra,a.cropend),fe(a.crop)&&be(t,La,a.crop),fe(a.zoom)&&be(t,Pa,a.zoom),be(i,Gi,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&be(i,zi,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&be(i,Xi,this.onDblclick=this.dblclick.bind(this)),be(t.ownerDocument,$i,this.onCropMove=this.cropMove.bind(this)),be(t.ownerDocument,Qi,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&be(window,Ki,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;fe(a.cropstart)&&Ce(t,Ma,a.cropstart),fe(a.cropmove)&&Ce(t,ya,a.cropmove),fe(a.cropend)&&Ce(t,Ra,a.cropend),fe(a.crop)&&Ce(t,La,a.crop),fe(a.zoom)&&Ce(t,Pa,a.zoom),Ce(i,Gi,this.onCropStart),a.zoomable&&a.zoomOnWheel&&Ce(i,zi,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&Ce(i,Xi,this.onDblclick),Ce(t.ownerDocument,$i,this.onCropMove),Ce(t.ownerDocument,Qi,this.onCropEnd),a.responsive&&Ce(window,Ki,this.onResize)}},au={resize:function(){if(!this.disabled){var t=this.options,a=this.container,i=this.containerData,n=a.offsetWidth/i.width,r=a.offsetHeight/i.height,u=Math.abs(n-1)>Math.abs(r-1)?n:r;if(u!==1){var o,c;t.restore&&(o=this.getCanvasData(),c=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(ee(o,function(f,E){o[E]=f*u})),this.setCropBoxData(ee(c,function(f,E){c[E]=f*u})))}}},dblclick:function(){this.disabled||this.options.dragMode===Wi||this.setDragMode(Fr(this.dragBox,xa)?qi:Da)},wheel:function(t){var a=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var a=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(F(a)&&a!==1||F(i)&&i!==0||t.ctrlKey))){var n=this.options,r=this.pointers,u;t.changedTouches?ee(t.changedTouches,function(o){r[o.identifier]=Xt(o)}):r[t.pointerId||0]=Xt(t),Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?u=Hi:u=wa(t.target,bt),Lr.test(u)&&st(this.element,Ma,{originalEvent:t,action:u})!==!1&&(t.preventDefault(),this.action=u,this.cropping=!1,u===Ui&&(this.cropping=!0,ae(this.dragBox,qt)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),st(this.element,ya,{originalEvent:t,action:a})!==!1&&(t.changedTouches?ee(t.changedTouches,function(n){Q(i[n.identifier]||{},Xt(n,!0))}):Q(i[t.pointerId||0]||{},Xt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,i=this.pointers;t.changedTouches?ee(t.changedTouches,function(n){delete i[n.identifier]}):delete i[t.pointerId||0],a&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,nt(this.dragBox,qt,this.cropped&&this.options.modal)),st(this.element,Ra,{originalEvent:t,action:a}))}}},iu={change:function(t){var a=this.options,i=this.canvasData,n=this.containerData,r=this.cropBoxData,u=this.pointers,o=this.action,c=a.aspectRatio,f=r.left,E=r.top,T=r.width,p=r.height,A=f+T,C=E+p,L=0,M=0,V=n.width,B=n.height,H=!0,x;!c&&t.shiftKey&&(c=T&&p?T/p:1),this.limited&&(L=r.minLeft,M=r.minTop,V=L+Math.min(n.width,i.width,i.left+i.width),B=M+Math.min(n.height,i.height,i.top+i.height));var O=u[Object.keys(u)[0]],g={x:O.endX-O.startX,y:O.endY-O.startY},D=function(q){switch(q){case We:A+g.x>V&&(g.x=V-A);break;case Xe:f+g.x<L&&(g.x=L-f);break;case ve:E+g.y<M&&(g.y=M-E);break;case tt:C+g.y>B&&(g.y=B-C);break}};switch(o){case Sa:f+=g.x,E+=g.y;break;case We:if(g.x>=0&&(A>=V||c&&(E<=M||C>=B))){H=!1;break}D(We),T+=g.x,T<0&&(o=Xe,T=-T,f-=T),c&&(p=T/c,E+=(r.height-p)/2);break;case ve:if(g.y<=0&&(E<=M||c&&(f<=L||A>=V))){H=!1;break}D(ve),p-=g.y,E+=g.y,p<0&&(o=tt,p=-p,E-=p),c&&(T=p*c,f+=(r.width-T)/2);break;case Xe:if(g.x<=0&&(f<=L||c&&(E<=M||C>=B))){H=!1;break}D(Xe),T-=g.x,f+=g.x,T<0&&(o=We,T=-T,f-=T),c&&(p=T/c,E+=(r.height-p)/2);break;case tt:if(g.y>=0&&(C>=B||c&&(f<=L||A>=V))){H=!1;break}D(tt),p+=g.y,p<0&&(o=ve,p=-p,E-=p),c&&(T=p*c,f+=(r.width-T)/2);break;case Et:if(c){if(g.y<=0&&(E<=M||A>=V)){H=!1;break}D(ve),p-=g.y,E+=g.y,T=p*c}else D(ve),D(We),g.x>=0?A<V?T+=g.x:g.y<=0&&E<=M&&(H=!1):T+=g.x,g.y<=0?E>M&&(p-=g.y,E+=g.y):(p-=g.y,E+=g.y);T<0&&p<0?(o=pt,p=-p,T=-T,E-=p,f-=T):T<0?(o=mt,T=-T,f-=T):p<0&&(o=Tt,p=-p,E-=p);break;case mt:if(c){if(g.y<=0&&(E<=M||f<=L)){H=!1;break}D(ve),p-=g.y,E+=g.y,T=p*c,f+=r.width-T}else D(ve),D(Xe),g.x<=0?f>L?(T-=g.x,f+=g.x):g.y<=0&&E<=M&&(H=!1):(T-=g.x,f+=g.x),g.y<=0?E>M&&(p-=g.y,E+=g.y):(p-=g.y,E+=g.y);T<0&&p<0?(o=Tt,p=-p,T=-T,E-=p,f-=T):T<0?(o=Et,T=-T,f-=T):p<0&&(o=pt,p=-p,E-=p);break;case pt:if(c){if(g.x<=0&&(f<=L||C>=B)){H=!1;break}D(Xe),T-=g.x,f+=g.x,p=T/c}else D(tt),D(Xe),g.x<=0?f>L?(T-=g.x,f+=g.x):g.y>=0&&C>=B&&(H=!1):(T-=g.x,f+=g.x),g.y>=0?C<B&&(p+=g.y):p+=g.y;T<0&&p<0?(o=Et,p=-p,T=-T,E-=p,f-=T):T<0?(o=Tt,T=-T,f-=T):p<0&&(o=mt,p=-p,E-=p);break;case Tt:if(c){if(g.x>=0&&(A>=V||C>=B)){H=!1;break}D(We),T+=g.x,p=T/c}else D(tt),D(We),g.x>=0?A<V?T+=g.x:g.y>=0&&C>=B&&(H=!1):T+=g.x,g.y>=0?C<B&&(p+=g.y):p+=g.y;T<0&&p<0?(o=mt,p=-p,T=-T,E-=p,f-=T):T<0?(o=pt,T=-T,f-=T):p<0&&(o=Et,p=-p,E-=p);break;case Fi:this.move(g.x,g.y),H=!1;break;case Hi:this.zoom(qr(u),t),H=!1;break;case Ui:if(!g.x||!g.y){H=!1;break}x=un(this.cropper),f=O.startX-x.left,E=O.startY-x.top,T=r.minWidth,p=r.minHeight,g.x>0?o=g.y>0?Tt:Et:g.x<0&&(f-=T,o=g.y>0?pt:mt),g.y<0&&(E-=p),this.cropped||(xe(this.cropBox,he),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}H&&(r.width=T,r.height=p,r.left=f,r.top=E,this.action=o,this.renderCropBox()),ee(u,function(P){P.startX=P.endX,P.startY=P.endY})}},nu={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&ae(this.dragBox,qt),xe(this.cropBox,he),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Q({},this.initialImageData),this.canvasData=Q({},this.initialCanvasData),this.cropBoxData=Q({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Q(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),xe(this.dragBox,qt),ae(this.cropBox,he)),this},replace:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),a?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,ee(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,xe(this.cropper,Yi)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,ae(this.cropper,Yi)),this},destroy:function(){var t=this.element;return t[$]?(t[$]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=i.left,r=i.top;return this.moveTo(ka(t)?t:n+Number(t),ka(a)?a:r+Number(a))},moveTo:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(F(t)&&(i.left=t,n=!0),F(a)&&(i.top=a,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,a){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,a)},zoomTo:function(t,a,i){var n=this.options,r=this.canvasData,u=r.width,o=r.height,c=r.naturalWidth,f=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var E=c*t,T=f*t;if(st(this.element,Pa,{ratio:t,oldRatio:u/c,originalEvent:i})===!1)return this;if(i){var p=this.pointers,A=un(this.cropper),C=p&&Object.keys(p).length?Wr(p):{pageX:i.pageX,pageY:i.pageY};r.left-=(E-u)*((C.pageX-A.left-r.left)/u),r.top-=(T-o)*((C.pageY-A.top-r.top)/o)}else at(a)&&F(a.x)&&F(a.y)?(r.left-=(E-u)*((a.x-r.left)/u),r.top-=(T-o)*((a.y-r.top)/o)):(r.left-=(E-u)/2,r.top-=(T-o)/2);r.width=E,r.height=T,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),F(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var a=this.imageData.scaleY;return this.scale(t,F(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(F(a)?a:1,t)},scale:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(F(t)&&(i.scaleX=t,n=!0),F(a)&&(i.scaleY=a,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,i=this.imageData,n=this.canvasData,r=this.cropBoxData,u;if(this.ready&&this.cropped){u={x:r.left-n.left,y:r.top-n.top,width:r.width,height:r.height};var o=i.width/i.naturalWidth;if(ee(u,function(E,T){u[T]=E/o}),t){var c=Math.round(u.y+u.height),f=Math.round(u.x+u.width);u.x=Math.round(u.x),u.y=Math.round(u.y),u.width=f-u.x,u.height=c-u.y}}else u={x:0,y:0,width:0,height:0};return a.rotatable&&(u.rotate=i.rotate||0),a.scalable&&(u.scaleX=i.scaleX||1,u.scaleY=i.scaleY||1),u},setData:function(t){var a=this.options,i=this.imageData,n=this.canvasData,r={};if(this.ready&&!this.disabled&&at(t)){var u=!1;a.rotatable&&F(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,u=!0),a.scalable&&(F(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,u=!0),F(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,u=!0)),u&&this.renderCanvas(!0,!0);var o=i.width/i.naturalWidth;F(t.x)&&(r.left=t.x*o+n.left),F(t.y)&&(r.top=t.y*o+n.top),F(t.width)&&(r.width=t.width*o),F(t.height)&&(r.height=t.height*o),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?Q({},this.containerData):{}},getImageData:function(){return this.sized?Q({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&ee(["left","top","width","height","naturalWidth","naturalHeight"],function(i){a[i]=t[i]}),a},setCanvasData:function(t){var a=this.canvasData,i=a.aspectRatio;return this.ready&&!this.disabled&&at(t)&&(F(t.left)&&(a.left=t.left),F(t.top)&&(a.top=t.top),F(t.width)?(a.width=t.width,a.height=t.width/i):F(t.height)&&(a.height=t.height,a.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,a;return this.ready&&this.cropped&&(a={left:t.left,top:t.top,width:t.width,height:t.height}),a||{}},setCropBoxData:function(t){var a=this.cropBoxData,i=this.options.aspectRatio,n,r;return this.ready&&this.cropped&&!this.disabled&&at(t)&&(F(t.left)&&(a.left=t.left),F(t.top)&&(a.top=t.top),F(t.width)&&t.width!==a.width&&(n=!0,a.width=t.width),F(t.height)&&t.height!==a.height&&(r=!0,a.height=t.height),i&&(n?a.height=a.width/i:r&&(a.width=a.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var a=this.canvasData,i=Gr(this.image,this.imageData,a,t);if(!this.cropped)return i;var n=this.getData(t.rounded),r=n.x,u=n.y,o=n.width,c=n.height,f=i.width/Math.floor(a.naturalWidth);f!==1&&(r*=f,u*=f,o*=f,c*=f);var E=o/c,T=Be({aspectRatio:E,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Be({aspectRatio:E,width:t.minWidth||0,height:t.minHeight||0},"cover"),A=Be({aspectRatio:E,width:t.width||(f!==1?i.width:o),height:t.height||(f!==1?i.height:c)}),C=A.width,L=A.height;C=Math.min(T.width,Math.max(p.width,C)),L=Math.min(T.height,Math.max(p.height,L));var M=document.createElement("canvas"),V=M.getContext("2d");M.width=it(C),M.height=it(L),V.fillStyle=t.fillColor||"transparent",V.fillRect(0,0,C,L);var B=t.imageSmoothingEnabled,H=B===void 0?!0:B,x=t.imageSmoothingQuality;V.imageSmoothingEnabled=H,x&&(V.imageSmoothingQuality=x);var O=i.width,g=i.height,D=r,P=u,q,Z,z,G,Ae,re;D<=-o||D>O?(D=0,q=0,z=0,Ae=0):D<=0?(z=-D,D=0,q=Math.min(O,o+D),Ae=q):D<=O&&(z=0,q=Math.min(o,O-D),Ae=q),q<=0||P<=-c||P>g?(P=0,Z=0,G=0,re=0):P<=0?(G=-P,P=0,Z=Math.min(g,c+P),re=Z):P<=g&&(G=0,Z=Math.min(c,g-P),re=Z);var le=[D,P,q,Z];if(Ae>0&&re>0){var Re=C/o;le.push(z*Re,G*Re,Ae*Re,re*Re)}return V.drawImage.apply(V,[i].concat(Bi(le.map(function(ft){return Math.floor(it(ft))})))),M},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!ka(t)&&(a.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var a=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var r=t===Da,u=a.movable&&t===qi;t=r||u?t:Wi,a.dragMode=t,gt(i,bt,t),nt(i,xa,r),nt(i,Oa,u),a.cropBoxMovable||(gt(n,bt,t),nt(n,xa,r),nt(n,Oa,u))}return this}},su=Se.Cropper,dn=function(){function e(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(br(this,e),!t||!Mr.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=Q({},tn,at(a)&&a),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return gr(e,[{key:"init",value:function(){var a=this.element,i=a.tagName.toLowerCase(),n;if(!a[$]){if(a[$]=this,i==="img"){if(this.isImg=!0,n=a.getAttribute("src")||"",this.originalUrl=n,!n)return;n=a.src}else i==="canvas"&&window.HTMLCanvasElement&&(n=a.toDataURL());this.load(n)}}},{key:"load",value:function(a){var i=this;if(a){this.url=a,this.imageData={};var n=this.element,r=this.options;if(!r.rotatable&&!r.scalable&&(r.checkOrientation=!1),!r.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Rr.test(a)){yr.test(a)?this.read(jr(a)):this.clone();return}var u=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=u,u.onabort=o,u.onerror=o,u.ontimeout=o,u.onprogress=function(){u.getResponseHeader("content-type")!==Zi&&u.abort()},u.onload=function(){i.read(u.response)},u.onloadend=function(){i.reloading=!1,i.xhr=null},r.checkCrossOrigin&&on(a)&&n.crossOrigin&&(a=cn(a)),u.open("GET",a,!0),u.responseType="arraybuffer",u.withCredentials=n.crossOrigin==="use-credentials",u.send()}}},{key:"read",value:function(a){var i=this.options,n=this.imageData,r=zr(a),u=0,o=1,c=1;if(r>1){this.url=Kr(a,Zi);var f=Zr(r);u=f.rotate,o=f.scaleX,c=f.scaleY}i.rotatable&&(n.rotate=u),i.scalable&&(n.scaleX=o,n.scaleY=c),this.clone()}},{key:"clone",value:function(){var a=this.element,i=this.url,n=a.crossOrigin,r=i;this.options.checkCrossOrigin&&on(i)&&(n||(n="anonymous"),r=cn(i)),this.crossOrigin=n,this.crossOriginUrl=r;var u=document.createElement("img");n&&(u.crossOrigin=n),u.src=r||i,u.alt=a.alt||"The image to crop",this.image=u,u.onload=this.start.bind(this),u.onerror=this.stop.bind(this),ae(u,Vi),a.parentNode.insertBefore(u,a.nextSibling)}},{key:"start",value:function(){var a=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var n=Se.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Se.navigator.userAgent),r=function(f,E){Q(a.imageData,{naturalWidth:f,naturalHeight:E,aspectRatio:f/E}),a.initialImageData=Q({},a.imageData),a.sizing=!1,a.sized=!0,a.build()};if(i.naturalWidth&&!n){r(i.naturalWidth,i.naturalHeight);return}var u=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=u,u.onload=function(){r(u.width,u.height),n||o.removeChild(u)},u.src=i.src,n||(u.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(u))}},{key:"stop",value:function(){var a=this.image;a.onload=null,a.onerror=null,a.parentNode.removeChild(a),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var a=this.element,i=this.options,n=this.image,r=a.parentNode,u=document.createElement("div");u.innerHTML=Pr;var o=u.querySelector(".".concat($,"-container")),c=o.querySelector(".".concat($,"-canvas")),f=o.querySelector(".".concat($,"-drag-box")),E=o.querySelector(".".concat($,"-crop-box")),T=E.querySelector(".".concat($,"-face"));this.container=r,this.cropper=o,this.canvas=c,this.dragBox=f,this.cropBox=E,this.viewBox=o.querySelector(".".concat($,"-view-box")),this.face=T,c.appendChild(n),ae(a,he),r.insertBefore(o,a.nextSibling),xe(n,Vi),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,ae(E,he),i.guides||ae(E.getElementsByClassName("".concat($,"-dashed")),he),i.center||ae(E.getElementsByClassName("".concat($,"-center")),he),i.background&&ae(o,"".concat($,"-bg")),i.highlight||ae(T,Sr),i.cropBoxMovable&&(ae(T,Oa),gt(T,bt,Sa)),i.cropBoxResizable||(ae(E.getElementsByClassName("".concat($,"-line")),he),ae(E.getElementsByClassName("".concat($,"-point")),he)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),fe(i.ready)&&be(a,ji,i.ready,{once:!0}),st(a,ji)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),xe(this.element,he)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=su,e}},{key:"setDefaults",value:function(a){Q(tn,at(a)&&a)}}])}();Q(dn.prototype,Jr,eu,tu,au,iu,nu);function ru(e,t){const a=e.split(",")||[],i=a[0].match(/:(.*?);/)[1],n=a[1]&&atob(a[1]);let r=n&&n.length;const u=new Uint8Array(r);for(;r--;)u[r]=n==null?void 0:n.charCodeAt(r);return new File([u],t,{type:i})}const uu={key:0,contenteditable:"false",class:"z-10 w-[100vw] h-[100vh] bg-[rgba(0,0,0,0.7)] flex flex-col justify-center items-center fixed top-0 left-0 cursor-auto"},ou={class:"w-[700px] flex flex-col bg-white rounded pb-8"},cu={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},lu={class:"flex flex-col h-full"},du={class:"flex flex-row justify-center items-start flex-1"},hu={class:"flex flex-col items-start flex-1"},fu={class:"flex flex-col w-full px-6 py-4"},Eu={class:"flex flex-col w-full"},mu={class:"flex flex-row items-center"},Tu={class:"relative bg-[#474AFF] text-white rounded p-3"},pu={class:"flex flex-row items-start justify-between mt-3"},bu={class:"flex flex-col"},gu={class:"flex flex-col justify-center items-center border w-[300px] h-[300px]"},_u={key:0,class:"w-full text-center"},Au=["src"],Nu={class:"flex flex-col items-center",style:{width:"300px",height:"300px"}},Cu={class:"text-[#999] mt-05 flex justify-center mt-4"},Iu={class:"w-full flex justify-end space-x-5 mt-5 px-6"},Su=["loading"],xu=l.defineComponent({__name:"index",emits:["cancel","ok"],setup(e,{expose:t,emit:a}){const i=a,n=l.ref({coverUrl:"",inputValue:"",uploadType:2,videoHost:"",videoUrl:""}),r=l.ref(),u=l.ref({autoCrop:!0,autoCropArea:1,background:!0,center:!0,cropBoxResizable:!0,dragMode:"move",preview:".before",toggleDragModeOnDblclick:!0,viewMode:1,zoomOnWheel:!0}),o=l.ref(!1),c=l.ref({afterImg:"",image:null,myCropper:null}),f=l.ref("image/jpeg"),E=x=>{console.log(x);const O=x.target.files[0];if(O){O.name&&(n.value.inputValue=O.name);const g=new FileReader;g.onload=D=>{var P,q;console.log("e?.target?.result",(P=D==null?void 0:D.target)==null?void 0:P.result),T((q=D==null?void 0:D.target)==null?void 0:q.result)},g.readAsDataURL(O)}};async function T(x){if(!x)return;await H();const O=x;c.value.image=O,c.value.image&&p()}function p(){const x=document.querySelector("#imgId");x&&x.addEventListener("load",()=>{B(),c.value.myCropper=new dn(x,u.value)})}const A=l.ref(!1);function C(x,O,g){r.value=x,x&&x.aspectRatio&&(u.value.aspectRatio=x.aspectRatio),g&&(n.value.inputValue=g),A.value=!0,O&&T(O)}function L(){A.value=!1}const M=()=>{var O,g;if(!c.value.myCropper)return;o.value=!0,c.value.afterImg=c.value.myCropper.getCroppedCanvas({height:(O=r.value)==null?void 0:O.height,imageSmoothingQuality:"high",width:(g=r.value)==null?void 0:g.width}).toDataURL(f.value);const x=ru(c.value.afterImg,n.value.inputValue);i("ok",x),o.value=!1,H(),B(),L()};function V(){H(),B(),L(),i("cancel")}function B(){c.value.myCropper&&c.value.myCropper.destroy()}function H(){c.value.image=""}return t({handleCloseCropper:L,handleOpenCropper:C}),(x,O)=>{var g,D,P;return A.value?(l.openBlock(),l.createElementBlock("div",uu,[l.createElementVNode("div",ou,[l.createElementVNode("div",cu,[O[1]||(O[1]=l.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"图片裁剪",-1)),l.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:l.withModifiers(V,["stop"])})]),l.createElementVNode("div",lu,[l.createElementVNode("div",du,[l.createElementVNode("div",hu,[l.createElementVNode("div",fu,[l.createElementVNode("div",Eu,[l.createElementVNode("div",mu,[l.createElementVNode("div",Tu,[l.createElementVNode("input",{type:"file",accept:"image/*",onClick:O[0]||(O[0]=l.withModifiers(()=>{},["stop"])),contenteditable:"false",ref:"fileInput",onChange:E,class:"absolute top-0 left-0 w-[110px] h-[40px] opacity-0 cursor-pointer"},null,544),O[2]||(O[2]=l.createElementVNode("span",{id:"uploadHandler",class:"cursor-pointer"}," 选择/更换图片 ",-1))]),O[3]||(O[3]=l.createElementVNode("span",{class:"text-sm text-[#999] ml-3"},"滚动鼠标放大或缩小图片",-1))]),l.createElementVNode("div",pu,[l.createElementVNode("div",bu,[l.createElementVNode("div",gu,[c.value.image?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",_u," 请上传图片 ")),l.createElementVNode("img",{id:"imgId",src:c.value.image,style:{width:"300px"}},null,8,Au)])]),l.createElementVNode("div",Nu,[O[4]||(O[4]=l.createElementVNode("div",{class:"before w-[270px] h-[200px] pr-[70px] border"},null,-1)),l.createElementVNode("div",Cu," 预览画像 "+l.toDisplayString(((g=r.value)==null?void 0:g.width)||"")+" "+l.toDisplayString((D=r.value)!=null&&D.width?"x":"")+" "+l.toDisplayString(((P=r.value)==null?void 0:P.height)||""),1)])])])])])]),l.createElementVNode("div",Iu,[l.createElementVNode("span",{loading:o.value,class:"!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",type:"primary",onClick:M}," 确认 ",8,Su),l.createElementVNode("span",{class:"!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",onClick:V},"取消")])])])])):l.createCommentVNode("",!0)}}}),Ou={key:0,"date-action":"1",class:"aidition",contenteditable:"false"},Du={class:"aidition_left"},Lu={class:"aidition_right"},Ru={key:0,"date-action":"1",class:"text-red-500 text-xs mt-1"},yu=yi(l.defineComponent({__name:"ElementRenderer",props:{element:{type:Object,required:!0},selectedElement:Object,hoveredElement:Object},emits:["selectElement","hoverElement","updateText","contentUpdated","blockAction","addIcon","upload"],setup(e,{emit:t}){const a=e,i=t,n=l.computed(()=>a.selectedElement===a.element),r=l.computed(()=>a.hoveredElement===a.element),u=l.ref(!1),o=l.ref(!1),c=l.ref(""),f=l.computed(()=>a.element.rule.minText||0),E=l.computed(()=>a.element.rule.maxText||1/0),T=l.ref();function p(v){v.xpath!="/div[1]"&&(u.value=!0,i("selectElement",v))}function A(v){i("selectElement",v)}function C(v,w){i("hoverElement",v,w)}function L(v){i("hoverElement",v)}function M(v){v.currentTarget.contains(v.relatedTarget)?i("hoverElement",null):a.hoveredElement?i("hoverElement",null,a.hoveredElement.parentxpath):i("hoverElement",null)}function V(){u.value=!1,i("contentUpdated",B())}function B(){function v(w){const ue=Object.entries(w.attrs||{}).map(([Yt,Ri])=>`${Yt}="${Ri}"`).join(" "),J=`<${w.tag}${ue?" "+ue:""}>`,Ne=`</${w.tag}>`,et=(w.children||[]).map(Yt=>v(Yt)).join("");return`${J}${w.editText||w.text||""}${et}${Ne}`}return v(a.element)}function H(v){var J;v.stopPropagation();const w=v.target,ue=((J=w.firstChild)==null?void 0:J.nodeType)===Node.TEXT_NODE&&w.firstChild.nodeValue||"";if(ue.length<f.value){o.value=!0,c.value=`最少输入 ${f.value} 个字符`;return}else if(ue.length>E.value){o.value=!0,c.value=`最多输入 ${E.value} 个字符`;return}else o.value=!1,c.value="";a.element.editText=ue,i("updateText",{element:a.element,newText:ue}),i("contentUpdated",B())}function x(v){i("updateText",v),i("contentUpdated",B())}function O(){const v={...a.element};i("blockAction",{action:"add",element:a.element,newBlock:v})}function g(){i("blockAction",{action:"moveUp",element:a.element})}function D(){i("blockAction",{action:"moveDown",element:a.element})}function P(){i("blockAction",{action:"delete",element:a.element})}function q(v){i("blockAction",v),i("contentUpdated",B())}function Z(v){i("addIcon",v,a.element),i("contentUpdated",B())}function z(v,w){i("addIcon",v,w),i("contentUpdated",B())}let G;const Ae=l.ref(),re=l.ref({});function le(v,w){if(w.rule.minImageWidth&&w.rule.maxImageHeight?(re.value.width=w.rule.minImageWidth,re.value.height=w.rule.maxImageHeight,re.value.aspectRatio=w.rule.minImageWidth/w.rule.maxImageHeight):re.value={},v){v.name;const ue=new FileReader;ue.onload=J=>{var Ne;G=(Ne=J==null?void 0:J.target)==null?void 0:Ne.result,Ae.value.handleOpenCropper(re.value,G,v.name)},ue.readAsDataURL(v)}}function Re(v,w){if(console.log(typeof v=="object",v),v)if(typeof v=="object"){w.attrs.alt=v.name;const ue=new FileReader;ue.onload=J=>{var et;let Ne=(et=J==null?void 0:J.target)==null?void 0:et.result;w.attrs.src=Ne,i("upload",Ne,w),i("contentUpdated",B())},ue.readAsDataURL(v)}else w.attrs.src=v,i("upload",v,w),i("contentUpdated",B())}const ft=async v=>{};return(v,w)=>{const ue=l.resolveComponent("ElementRenderer",!0);return l.openBlock(),l.createElementBlock(l.Fragment,null,[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(a.element.tag),l.mergeProps({class:[" ",r.value?"border-dashed border-[1px] border-blue-500":"",n.value?"border-dashed border-[1px] border-green-500 z-10":"",o.value?"border-dashed border-[1px] border-red-500":"",(!r.value&&!n.value&&!o.value,"")]},a.element.attrs,{contenteditable:u.value,onClick:w[1]||(w[1]=l.withModifiers(()=>p(a.element),["stop"])),onMouseenter:w[2]||(w[2]=()=>L(a.element)),onMouseleave:M,onBlur:V,onInput:H}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.element.editText||a.element.text),1),a.element.children&&a.element.children.length?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[a.element.type===l.unref(de).Block?(l.openBlock(),l.createElementBlock("div",Ou,[l.createElementVNode("span",Du,l.toDisplayString(a.element.editText||a.element.text),1),l.createElementVNode("div",Lu,[l.createElementVNode("span",{onClick:l.withModifiers(g,["stop"])},"排前"),l.createElementVNode("span",{onClick:l.withModifiers(D,["stop"])},"排后"),l.createElementVNode("span",{onClick:l.withModifiers(P,["stop"])},"删除")])])):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.element.children,(J,Ne)=>(l.openBlock(),l.createBlock(ue,{key:Ne,element:J,selectedElement:a.selectedElement,hoveredElement:a.hoveredElement,onSelectElement:A,onHoverElement:C,onUpdateText:x,onBlockAction:q,onAddIcon:z,onUpload:Re},null,8,["element","selectedElement","hoveredElement"]))),128)),a.element.type===l.unref(de).Block?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createElementVNode("span",{class:"iconfont icon-a-tianjiaxian icon_gray_add",onClick:l.withModifiers(O,["stop"]),contenteditable:"false"}),l.createElementVNode("div",{class:"add_modules",onClick:l.withModifiers(O,["stop"]),contenteditable:"false"},w[5]||(w[5]=[l.createElementVNode("span",{class:"iconfont icon-a-tianjiamian"},null,-1),l.createElementVNode("span",null,"添加模块",-1)])),l.createElementVNode("div",{class:"cont_aidition",contenteditable:"false",onClick:w[0]||(w[0]=l.withModifiers(()=>{},["stop"]))},[l.createElementVNode("span",{onClick:l.withModifiers(g,["stop"]),class:"iconfont icon-paiqian"}),l.createElementVNode("span",{onClick:l.withModifiers(D,["stop"]),class:"iconfont icon-paihou"}),l.createElementVNode("span",{onClick:l.withModifiers(P,["stop"]),class:"iconfont icon-shanchu"}),l.createElementVNode("span",{onClick:l.withModifiers(O,["stop"]),class:"iconfont icon-a-tianjiaxian"})])],64)):l.createCommentVNode("",!0)],64)):l.createCommentVNode("",!0)]),_:1},16,["class","contenteditable"])),a.element.type==l.unref(de).Text&&o.value?(l.openBlock(),l.createElementBlock("div",Ru,l.toDisplayString(c.value),1)):l.createCommentVNode("",!0),a.element.type===l.unref(de).Image?(l.openBlock(),l.createElementBlock("div",{key:1,class:"absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",onClick:w[3]||(w[3]=l.withModifiers(()=>{},["stop"]))},[w[6]||(w[6]=l.createElementVNode("span",{contenteditable:"false",class:"cursor-pointer"},"上传图片",-1)),l.createVNode(Tr,{customUpload:J=>le(J,a.element),height:a.element.rule.maxImageHeight,width:a.element.rule.minImageWidth,uploadByImage:ft},null,8,["customUpload","height","width"])])):l.createCommentVNode("",!0),l.createVNode(mr,{ref_key:"iconRef",ref:T,onOk:Z},null,512),l.createVNode(xu,{ref_key:"cropperRef",ref:Ae,onOk:w[4]||(w[4]=J=>Re(J,a.element))},null,512)],64)}}}),[["__scopeId","data-v-6d87a1e6"]]),Mu={key:0},Pu={key:0},ku={key:1},vu={key:2},wu={key:3},Bu={key:4},Uu={key:5},Fu={key:6},Hu={key:7},Yu=l.defineComponent({__name:"EditorPanel",props:{element:Object},emits:["updateElement"],setup(e,{emit:t}){const a=e,i=t,n=l.ref({rule:{},...a.element});l.watch(()=>a.element,u=>{n.value={rule:{},...u}},{immediate:!0});function r(){i("updateElement",n.value)}return(u,o)=>(l.openBlock(),l.createElementBlock("div",null,[n.value?(l.openBlock(),l.createElementBlock("div",Mu,[n.value.text!==void 0?(l.openBlock(),l.createElementBlock("div",Pu,[o[12]||(o[12]=l.createElementVNode("label",{class:"block mt-4"},"内容",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=c=>n.value.text=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.text]])])):l.createCommentVNode("",!0),l.createElementVNode("div",null,[o[13]||(o[13]=l.createElementVNode("label",{class:"block mt-4"},"节点",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=c=>n.value.xpath=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.xpath]])]),l.createElementVNode("div",null,[o[15]||(o[15]=l.createElementVNode("label",{class:"block mt-4"},"节点类型",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[2]||(o[2]=c=>n.value.type=c),class:"border rounded p-2 w-full"},o[14]||(o[14]=[l.createElementVNode("option",{value:0},"无",-1),l.createElementVNode("option",{value:1},"文本",-1),l.createElementVNode("option",{value:2},"图片",-1),l.createElementVNode("option",{value:3},"视频",-1),l.createElementVNode("option",{value:4},"图标",-1),l.createElementVNode("option",{value:5},"链接",-1),l.createElementVNode("option",{value:10},"块",-1)]),512),[[l.vModelSelect,n.value.type]])]),n.value.type==l.unref(de).Text?(l.openBlock(),l.createElementBlock("div",ku,[o[16]||(o[16]=l.createElementVNode("label",{class:"block mt-4"},"最大文本长度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=c=>n.value.rule.maxText=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.maxText]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Text?(l.openBlock(),l.createElementBlock("div",vu,[o[17]||(o[17]=l.createElementVNode("label",{class:"block mt-4"},"最小文本长度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=c=>n.value.rule.minText=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.minText]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Image?(l.openBlock(),l.createElementBlock("div",wu,[o[18]||(o[18]=l.createElementVNode("label",{class:"block mt-4"},"图片宽度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=c=>n.value.rule.minImageWidth=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.minImageWidth]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Image?(l.openBlock(),l.createElementBlock("div",Bu,[o[19]||(o[19]=l.createElementVNode("label",{class:"block mt-4"},"图片高度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[6]||(o[6]=c=>n.value.rule.maxImageHeight=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.maxImageHeight]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Block?(l.openBlock(),l.createElementBlock("div",Uu,[o[20]||(o[20]=l.createElementVNode("label",{class:"block mt-4"},"块最小数量",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=c=>n.value.rule.minBlock=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.minBlock]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Block?(l.openBlock(),l.createElementBlock("div",Fu,[o[21]||(o[21]=l.createElementVNode("label",{class:"block mt-4"},"块最大数量",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[8]||(o[8]=c=>n.value.rule.maxBlock=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.maxBlock]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Text||n.value.type==l.unref(de).Icon?(l.openBlock(),l.createElementBlock("div",Hu,[o[23]||(o[23]=l.createElementVNode("label",{class:"block mt-4"},"颜色/主题色",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[9]||(o[9]=c=>n.value.rule.isThemeColor=c),class:"border rounded p-2 w-full"},o[22]||(o[22]=[l.createElementVNode("option",{value:!0},"是",-1),l.createElementVNode("option",{value:!1},"否",-1)]),512),[[l.vModelSelect,n.value.rule.isThemeColor]])])):l.createCommentVNode("",!0),l.createElementVNode("div",null,[o[25]||(o[25]=l.createElementVNode("label",{class:"block mt-4"},"是否必填",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[10]||(o[10]=c=>n.value.rule.isRequired=c),class:"border rounded p-2 w-full"},o[24]||(o[24]=[l.createElementVNode("option",{value:!0},"是",-1),l.createElementVNode("option",{value:!1},"否",-1)]),512),[[l.vModelSelect,n.value.rule.isRequired]])]),l.createElementVNode("div",null,[o[27]||(o[27]=l.createElementVNode("label",{class:"block mt-4"},"是否只读",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[11]||(o[11]=c=>n.value.rule.isReadOnly=c),class:"border rounded p-2 w-full"},o[26]||(o[26]=[l.createElementVNode("option",{value:!0},"是",-1),l.createElementVNode("option",{value:!1},"否",-1)]),512),[[l.vModelSelect,n.value.rule.isReadOnly]])])])):l.createCommentVNode("",!0),l.createElementVNode("button",{onClick:r,class:"mt-4 p-2 bg-blue-500 text-white rounded"},"保存")]))}});var W;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(W||(W={}));function Vu(e){return e.type===W.Tag||e.type===W.Script||e.type===W.Style}const qu=W.Root,Wu=W.Text,Xu=W.Directive,Gu=W.Comment,$u=W.Script,Qu=W.Style,ju=W.Tag,Ku=W.CDATA,zu=W.Doctype;let hn=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return Nt(this,t)}};class Ua extends hn{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class At extends Ua{constructor(){super(...arguments),this.type=W.Text}get nodeType(){return 3}}class Fa extends Ua{constructor(){super(...arguments),this.type=W.Comment}get nodeType(){return 8}}class Ha extends Ua{constructor(t,a){super(a),this.name=t,this.type=W.Directive}get nodeType(){return 1}}class Ya extends hn{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class fn extends Ya{constructor(){super(...arguments),this.type=W.CDATA}get nodeType(){return 4}}class $e extends Ya{constructor(){super(...arguments),this.type=W.Root}get nodeType(){return 9}}class Va extends Ya{constructor(t,a,i=[],n=t==="script"?W.Script:t==="style"?W.Style:W.Tag){super(i),this.name=t,this.attribs=a,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var a,i;return{name:t,value:this.attribs[t],namespace:(a=this["x-attribsNamespace"])===null||a===void 0?void 0:a[t],prefix:(i=this["x-attribsPrefix"])===null||i===void 0?void 0:i[t]}})}}function k(e){return Vu(e)}function Gt(e){return e.type===W.CDATA}function Oe(e){return e.type===W.Text}function $t(e){return e.type===W.Comment}function qa(e){return e.type===W.Directive}function Ue(e){return e.type===W.Root}function ie(e){return Object.prototype.hasOwnProperty.call(e,"children")}function Nt(e,t=!1){let a;if(Oe(e))a=new At(e.data);else if($t(e))a=new Fa(e.data);else if(k(e)){const i=t?Wa(e.children):[],n=new Va(e.name,{...e.attribs},i);i.forEach(r=>r.parent=n),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),a=n}else if(Gt(e)){const i=t?Wa(e.children):[],n=new fn(i);i.forEach(r=>r.parent=n),a=n}else if(Ue(e)){const i=t?Wa(e.children):[],n=new $e(i);i.forEach(r=>r.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),a=n}else if(qa(e)){const i=new Ha(e.name,e.data);e["x-name"]!=null&&(i["x-name"]=e["x-name"],i["x-publicId"]=e["x-publicId"],i["x-systemId"]=e["x-systemId"]),a=i}else throw new Error(`Not implemented yet: ${e.type}`);return a.startIndex=e.startIndex,a.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(a.sourceCodeLocation=e.sourceCodeLocation),a}function Wa(e){const t=e.map(a=>Nt(a,!0));for(let a=1;a<t.length;a++)t[a].prev=t[a-1],t[a-1].next=t[a];return t}const En={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class Zu{constructor(t,a,i){this.dom=[],this.root=new $e(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof a=="function"&&(i=a,a=En),typeof t=="object"&&(a=t,t=void 0),this.callback=t??null,this.options=a??En,this.elementCB=i??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new $e(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,a){const i=this.options.xmlMode?W.Tag:void 0,n=new Va(t,a,void 0,i);this.addNode(n),this.tagStack.push(n)}ontext(t){const{lastNode:a}=this;if(a&&a.type===W.Text)a.data+=t,this.options.withEndIndices&&(a.endIndex=this.parser.endIndex);else{const i=new At(t);this.addNode(i),this.lastNode=i}}oncomment(t){if(this.lastNode&&this.lastNode.type===W.Comment){this.lastNode.data+=t;return}const a=new Fa(t);this.addNode(a),this.lastNode=a}oncommentend(){this.lastNode=null}oncdatastart(){const t=new At(""),a=new fn([t]);this.addNode(a),t.parent=a,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,a){const i=new Ha(t,a);this.addNode(i)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const a=this.tagStack[this.tagStack.length-1],i=a.children[a.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),a.children.push(t),i&&(t.prev=i,i.next=t),t.parent=a,this.lastNode=null}}const Xa=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),mn=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Ga;const Ju=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),$a=(Ga=String.fromCodePoint)!==null&&Ga!==void 0?Ga:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function eo(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ju.get(e))!==null&&t!==void 0?t:e}var ne;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ne||(ne={}));const to=32;var Fe;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Fe||(Fe={}));function Qa(e){return e>=ne.ZERO&&e<=ne.NINE}function ao(e){return e>=ne.UPPER_A&&e<=ne.UPPER_F||e>=ne.LOWER_A&&e<=ne.LOWER_F}function io(e){return e>=ne.UPPER_A&&e<=ne.UPPER_Z||e>=ne.LOWER_A&&e<=ne.LOWER_Z||Qa(e)}function no(e){return e===ne.EQUALS||io(e)}var se;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(se||(se={}));var ge;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ge||(ge={}));class ja{constructor(t,a,i){this.decodeTree=t,this.emitCodePoint=a,this.errors=i,this.state=se.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ge.Strict}startEntity(t){this.decodeMode=t,this.state=se.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case se.EntityStart:return t.charCodeAt(a)===ne.NUM?(this.state=se.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=se.NamedEntity,this.stateNamedEntity(t,a));case se.NumericStart:return this.stateNumericStart(t,a);case se.NumericDecimal:return this.stateNumericDecimal(t,a);case se.NumericHex:return this.stateNumericHex(t,a);case se.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|to)===ne.LOWER_X?(this.state=se.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=se.NumericDecimal,this.stateNumericDecimal(t,a))}addToNumericResult(t,a,i,n){if(a!==i){const r=i-a;this.result=this.result*Math.pow(n,r)+parseInt(t.substr(a,r),n),this.consumed+=r}}stateNumericHex(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(Qa(n)||ao(n))a+=1;else return this.addToNumericResult(t,i,a,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,i,a,16),-1}stateNumericDecimal(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(Qa(n))a+=1;else return this.addToNumericResult(t,i,a,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,i,a,10),-1}emitNumericEntity(t,a){var i;if(this.consumed<=a)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ne.SEMI)this.consumed+=1;else if(this.decodeMode===ge.Strict)return 0;return this.emitCodePoint(eo(this.result),this.consumed),this.errors&&(t!==ne.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,a){const{decodeTree:i}=this;let n=i[this.treeIndex],r=(n&Fe.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const u=t.charCodeAt(a);if(this.treeIndex=so(i,n,this.treeIndex+Math.max(1,r),u),this.treeIndex<0)return this.result===0||this.decodeMode===ge.Attribute&&(r===0||no(u))?0:this.emitNotTerminatedNamedEntity();if(n=i[this.treeIndex],r=(n&Fe.VALUE_LENGTH)>>14,r!==0){if(u===ne.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==ge.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:a,decodeTree:i}=this,n=(i[a]&Fe.VALUE_LENGTH)>>14;return this.emitNamedEntityData(a,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,i){const{decodeTree:n}=this;return this.emitCodePoint(a===1?n[t]&~Fe.VALUE_LENGTH:n[t+1],i),a===3&&this.emitCodePoint(n[t+2],i),i}end(){var t;switch(this.state){case se.NamedEntity:return this.result!==0&&(this.decodeMode!==ge.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case se.NumericDecimal:return this.emitNumericEntity(0,2);case se.NumericHex:return this.emitNumericEntity(0,3);case se.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case se.EntityStart:return 0}}}function Tn(e){let t="";const a=new ja(e,i=>t+=$a(i));return function(n,r){let u=0,o=0;for(;(o=n.indexOf("&",o))>=0;){t+=n.slice(u,o),a.startEntity(r);const f=a.write(n,o+1);if(f<0){u=o+a.end();break}u=o+f,o=f===0?u+1:u}const c=t+n.slice(u);return t="",c}}function so(e,t,a,i){const n=(t&Fe.BRANCH_LENGTH)>>7,r=t&Fe.JUMP_TABLE;if(n===0)return r!==0&&i===r?a:-1;if(r){const c=i-r;return c<0||c>=n?-1:e[a+c]-1}let u=a,o=u+n-1;for(;u<=o;){const c=u+o>>>1,f=e[c];if(f<i)u=c+1;else if(f>i)o=c-1;else return e[c+n]}return-1}Tn(Xa),Tn(mn);const pn=/["&'<>$\x80-\uFFFF]/g,ro=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),uo=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function bn(e){let t="",a=0,i;for(;(i=pn.exec(e))!==null;){const n=i.index,r=e.charCodeAt(n),u=ro.get(r);u!==void 0?(t+=e.substring(a,n)+u,a=n+1):(t+=`${e.substring(a,n)}&#x${uo(e,n).toString(16)};`,a=pn.lastIndex+=+((r&64512)===55296))}return t+e.substr(a)}function gn(e,t){return function(i){let n,r=0,u="";for(;n=e.exec(i);)r!==n.index&&(u+=i.substring(r,n.index)),u+=t.get(n[0].charCodeAt(0)),r=n.index+1;return u+i.substring(r)}}const _n=gn(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),An=gn(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),oo=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),co=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),lo=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function ho(e){return e.replace(/"/g,""")}function fo(e,t){var a;if(!e)return;const i=((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)===!1?ho:t.xmlMode||t.encodeEntities!=="utf8"?bn:_n;return Object.keys(e).map(n=>{var r,u;const o=(r=e[n])!==null&&r!==void 0?r:"";return t.xmlMode==="foreign"&&(n=(u=co.get(n))!==null&&u!==void 0?u:n),!t.emptyAttrs&&!t.xmlMode&&o===""?n:`${n}="${i(o)}"`}).join(" ")}const Nn=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Qt(e,t={}){const a="length"in e?e:[e];let i="";for(let n=0;n<a.length;n++)i+=Eo(a[n],t);return i}function Eo(e,t){switch(e.type){case qu:return Qt(e.children,t);case zu:case Xu:return bo(e);case Gu:return Ao(e);case Ku:return _o(e);case $u:case Qu:case ju:return po(e,t);case Wu:return go(e,t)}}const mo=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),To=new Set(["svg","math"]);function po(e,t){var a;t.xmlMode==="foreign"&&(e.name=(a=oo.get(e.name))!==null&&a!==void 0?a:e.name,e.parent&&mo.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&To.has(e.name)&&(t={...t,xmlMode:"foreign"});let i=`<${e.name}`;const n=fo(e.attribs,t);return n&&(i+=` ${n}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&Nn.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=Qt(e.children,t)),(t.xmlMode||!Nn.has(e.name))&&(i+=`</${e.name}>`)),i}function bo(e){return`<${e.data}>`}function go(e,t){var a;let i=e.data||"";return((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&lo.has(e.parent.name))&&(i=t.xmlMode||t.encodeEntities!=="utf8"?bn(i):An(i)),i}function _o(e){return`<![CDATA[${e.children[0].data}]]>`}function Ao(e){return`<!--${e.data}-->`}function Cn(e,t){return Qt(e,t)}function No(e,t){return ie(e)?e.children.map(a=>Cn(a,t)).join(""):""}function jt(e){return Array.isArray(e)?e.map(jt).join(""):k(e)?e.name==="br"?`
|
11
|
-
`:jt(e.children):Gt(e)?jt(e.children):Oe(e)?e.data:""}function rt(e){return Array.isArray(e)?e.map(rt).join(""):ie(e)&&!$t(e)?rt(e.children):Oe(e)?e.data:""}function Kt(e){return Array.isArray(e)?e.map(Kt).join(""):ie(e)&&(e.type===W.Tag||Gt(e))?Kt(e.children):Oe(e)?e.data:""}function zt(e){return ie(e)?e.children:[]}function In(e){return e.parent||null}function Sn(e){const t=In(e);if(t!=null)return zt(t);const a=[e];let{prev:i,next:n}=e;for(;i!=null;)a.unshift(i),{prev:i}=i;for(;n!=null;)a.push(n),{next:n}=n;return a}function Co(e,t){var a;return(a=e.attribs)===null||a===void 0?void 0:a[t]}function Io(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function So(e){return e.name}function Ka(e){let{next:t}=e;for(;t!==null&&!k(t);)({next:t}=t);return t}function za(e){let{prev:t}=e;for(;t!==null&&!k(t);)({prev:t}=t);return t}function Qe(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,a=t.lastIndexOf(e);a>=0&&t.splice(a,1)}e.next=null,e.prev=null,e.parent=null}function xo(e,t){const a=t.prev=e.prev;a&&(a.next=t);const i=t.next=e.next;i&&(i.prev=t);const n=t.parent=e.parent;if(n){const r=n.children;r[r.lastIndexOf(e)]=t,e.parent=null}}function Oo(e,t){if(Qe(t),t.next=null,t.parent=e,e.children.push(t)>1){const a=e.children[e.children.length-2];a.next=t,t.prev=a}else t.prev=null}function Do(e,t){Qe(t);const{parent:a}=e,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=a,i){if(i.prev=t,a){const n=a.children;n.splice(n.lastIndexOf(i),0,t)}}else a&&a.children.push(t)}function Lo(e,t){if(Qe(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){const a=e.children[1];a.prev=t,t.next=a}else t.next=null}function Ro(e,t){Qe(t);const{parent:a}=e;if(a){const i=a.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=a,t.prev=e.prev,t.next=e,e.prev=t}function Zt(e,t,a=!0,i=1/0){return Za(e,Array.isArray(t)?t:[t],a,i)}function Za(e,t,a,i){const n=[],r=[t],u=[0];for(;;){if(u[0]>=r[0].length){if(u.length===1)return n;r.shift(),u.shift();continue}const o=r[0][u[0]++];if(e(o)&&(n.push(o),--i<=0))return n;a&&ie(o)&&o.children.length>0&&(u.unshift(0),r.unshift(o.children))}}function yo(e,t){return t.find(e)}function Ja(e,t,a=!0){let i=null;for(let n=0;n<t.length&&!i;n++){const r=t[n];if(k(r))e(r)?i=r:a&&r.children.length>0&&(i=Ja(e,r.children,!0));else continue}return i}function xn(e,t){return t.some(a=>k(a)&&(e(a)||xn(e,a.children)))}function Mo(e,t){const a=[],i=[t],n=[0];for(;;){if(n[0]>=i[0].length){if(i.length===1)return a;i.shift(),n.shift();continue}const r=i[0][n[0]++];k(r)&&(e(r)&&a.push(r),r.children.length>0&&(n.unshift(0),i.unshift(r.children)))}}const Jt={tag_name(e){return typeof e=="function"?t=>k(t)&&e(t.name):e==="*"?k:t=>k(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>Oe(t)&&e(t.data):t=>Oe(t)&&t.data===e}};function On(e,t){return typeof t=="function"?a=>k(a)&&t(a.attribs[e]):a=>k(a)&&a.attribs[e]===t}function Po(e,t){return a=>e(a)||t(a)}function Dn(e){const t=Object.keys(e).map(a=>{const i=e[a];return Object.prototype.hasOwnProperty.call(Jt,a)?Jt[a](i):On(a,i)});return t.length===0?null:t.reduce(Po)}function ko(e,t){const a=Dn(e);return a?a(t):!0}function vo(e,t,a,i=1/0){const n=Dn(e);return n?Zt(n,t,a,i):[]}function wo(e,t,a=!0){return Array.isArray(t)||(t=[t]),Ja(On("id",e),t,a)}function ut(e,t,a=!0,i=1/0){return Zt(Jt.tag_name(e),t,a,i)}function Bo(e,t,a=!0,i=1/0){return Zt(Jt.tag_type(e),t,a,i)}function Uo(e){let t=e.length;for(;--t>=0;){const a=e[t];if(t>0&&e.lastIndexOf(a,t-1)>=0){e.splice(t,1);continue}for(let i=a.parent;i;i=i.parent)if(e.includes(i)){e.splice(t,1);break}}return e}var _e;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(_e||(_e={}));function Ln(e,t){const a=[],i=[];if(e===t)return 0;let n=ie(e)?e:e.parent;for(;n;)a.unshift(n),n=n.parent;for(n=ie(t)?t:t.parent;n;)i.unshift(n),n=n.parent;const r=Math.min(a.length,i.length);let u=0;for(;u<r&&a[u]===i[u];)u++;if(u===0)return _e.DISCONNECTED;const o=a[u-1],c=o.children,f=a[u],E=i[u];return c.indexOf(f)>c.indexOf(E)?o===t?_e.FOLLOWING|_e.CONTAINED_BY:_e.FOLLOWING:o===e?_e.PRECEDING|_e.CONTAINS:_e.PRECEDING}function ot(e){return e=e.filter((t,a,i)=>!i.includes(t,a+1)),e.sort((t,a)=>{const i=Ln(t,a);return i&_e.PRECEDING?-1:i&_e.FOLLOWING?1:0}),e}function Fo(e){const t=ea(Wo,e);return t?t.name==="feed"?Ho(t):Yo(t):null}function Ho(e){var t;const a=e.children,i={type:"atom",items:ut("entry",a).map(u=>{var o;const{children:c}=u,f={media:Rn(c)};Ee(f,"id","id",c),Ee(f,"title","title",c);const E=(o=ea("link",c))===null||o===void 0?void 0:o.attribs.href;E&&(f.link=E);const T=He("summary",c)||He("content",c);T&&(f.description=T);const p=He("updated",c);return p&&(f.pubDate=new Date(p)),f})};Ee(i,"id","id",a),Ee(i,"title","title",a);const n=(t=ea("link",a))===null||t===void 0?void 0:t.attribs.href;n&&(i.link=n),Ee(i,"description","subtitle",a);const r=He("updated",a);return r&&(i.updated=new Date(r)),Ee(i,"author","email",a,!0),i}function Yo(e){var t,a;const i=(a=(t=ea("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&a!==void 0?a:[],n={type:e.name.substr(0,3),id:"",items:ut("item",e.children).map(u=>{const{children:o}=u,c={media:Rn(o)};Ee(c,"id","guid",o),Ee(c,"title","title",o),Ee(c,"link","link",o),Ee(c,"description","description",o);const f=He("pubDate",o)||He("dc:date",o);return f&&(c.pubDate=new Date(f)),c})};Ee(n,"title","title",i),Ee(n,"link","link",i),Ee(n,"description","description",i);const r=He("lastBuildDate",i);return r&&(n.updated=new Date(r)),Ee(n,"author","managingEditor",i,!0),n}const Vo=["url","type","lang"],qo=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Rn(e){return ut("media:content",e).map(t=>{const{attribs:a}=t,i={medium:a.medium,isDefault:!!a.isDefault};for(const n of Vo)a[n]&&(i[n]=a[n]);for(const n of qo)a[n]&&(i[n]=parseInt(a[n],10));return a.expression&&(i.expression=a.expression),i})}function ea(e,t){return ut(e,t,!0,1)[0]}function He(e,t,a=!1){return rt(ut(e,t,a,1)).trim()}function Ee(e,t,a,i,n=!1){const r=He(a,i,n);r&&(e[t]=r)}function Wo(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const ta=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return _e},append:Do,appendChild:Oo,compareDocumentPosition:Ln,existsOne:xn,filter:Zt,find:Za,findAll:Mo,findOne:Ja,findOneChild:yo,getAttributeValue:Co,getChildren:zt,getElementById:wo,getElements:vo,getElementsByTagName:ut,getElementsByTagType:Bo,getFeed:Fo,getInnerHTML:No,getName:So,getOuterHTML:Cn,getParent:In,getSiblings:Sn,getText:jt,hasAttrib:Io,hasChildren:ie,innerText:Kt,isCDATA:Gt,isComment:$t,isDocument:Ue,isTag:k,isText:Oe,nextElementSibling:Ka,prepend:Ro,prependChild:Lo,prevElementSibling:za,removeElement:Qe,removeSubsets:Uo,replaceElement:xo,testElement:ko,textContent:rt,uniqueSort:ot},Symbol.toStringTag,{value:"Module"})),Xo={_useHtmlParser2:!1};function ei(e,t){if(!e)return t??Xo;const a={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(a._useHtmlParser2=!0,a.xmlMode=!0,e.xml!==!0&&Object.assign(a,e.xml)):e.xmlMode&&(a._useHtmlParser2=!0),a}function yn(e,t,a){return e?e(t??e._root.children,null,void 0,a).toString():""}function Go(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function $o(e,t){const a=Go(e)?(t=e,void 0):e,i={...this===null||this===void 0?void 0:this._options,...ei(t)};return yn(this,a,i)}function Qo(e){const t={...this._options,xmlMode:!0};return yn(this,e,t)}function Ct(e){const t=e??(this?this.root():[]);let a="";for(let i=0;i<t.length;i++)a+=rt(t[i]);return a}function jo(e,t,a=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(a=t);const i=this.load(e,this._options,!1);return a||i("script").remove(),[...i.root()[0].children]}function Ko(){return this(this._root)}function Mn(e,t){if(t===e)return!1;let a=t;for(;a&&a!==a.parent;)if(a=a.parent,a===e)return!0;return!1}function zo(e){return this.root().extract(e)}function Zo(e,t){if(!Pn(e)||!Pn(t))return;let a=e.length;const i=+t.length;for(let n=0;n<i;n++)e[a++]=t[n];return e.length=a,e}function Pn(e){if(Array.isArray(e))return!0;if(typeof e!="object"||e===null||!("length"in e)||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}const Jo=Object.freeze(Object.defineProperty({__proto__:null,contains:Mn,extract:zo,html:$o,merge:Zo,parseHTML:jo,root:Ko,text:Ct,xml:Qo},Symbol.toStringTag,{value:"Module"}));function ye(e){return e.cheerio!=null}function ec(e){return e.replace(/[._-](\w|$)/g,(t,a)=>a.toUpperCase())}function tc(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function K(e,t){const a=e.length;for(let i=0;i<a;i++)t(e[i],i);return e}var je;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(je||(je={}));function ti(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const a=e.charCodeAt(t+1);return(a>=je.LowerA&&a<=je.LowerZ||a>=je.UpperA&&a<=je.UpperZ||a===je.Exclamation)&&e.includes(">",t+2)}const It=Object.prototype.hasOwnProperty,St=/\s+/,ai="data-",ii=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ac=/^{[^]*}$|^\[[^]*]$/;function aa(e,t,a){var i;if(!(!e||!k(e))){if((i=e.attribs)!==null&&i!==void 0||(e.attribs={}),!t)return e.attribs;if(It.call(e.attribs,t))return!a&&ii.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return Ct(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function ct(e,t,a){a===null?Bn(e,t):e.attribs[t]=`${a}`}function ic(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return K(this,(a,i)=>{k(a)&&ct(a,e,t.call(a,i,a.attribs[e]))})}return K(this,a=>{if(k(a))if(typeof e=="object")for(const i of Object.keys(e)){const n=e[i];ct(a,i,n)}else ct(a,e,t)})}return arguments.length>1?this:aa(this[0],e,this.options.xmlMode)}function kn(e,t,a){return t in e?e[t]:!a&&ii.test(t)?aa(e,t,!1)!==void 0:aa(e,t,a)}function ni(e,t,a,i){t in e?e[t]=a:ct(e,t,!i&&ii.test(t)?a?"":null:`${a}`)}function nc(e,t){var a;if(typeof e=="string"&&t===void 0){const i=this[0];if(!i||!k(i))return;switch(e){case"style":{const n=this.css(),r=Object.keys(n);for(let u=0;u<r.length;u++)n[u]=r[u];return n.length=r.length,n}case"tagName":case"nodeName":return i.name.toUpperCase();case"href":case"src":{const n=(a=i.attribs)===null||a===void 0?void 0:a[e];return typeof URL<"u"&&(e==="href"&&(i.tagName==="a"||i.tagName==="link")||e==="src"&&(i.tagName==="img"||i.tagName==="iframe"||i.tagName==="audio"||i.tagName==="video"||i.tagName==="source"))&&n!==void 0&&this.options.baseURI?new URL(n,this.options.baseURI).href:n}case"innerText":return Kt(i);case"textContent":return rt(i);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return kn(i,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return K(this,(i,n)=>{k(i)&&ni(i,e,t.call(i,n,kn(i,e,this.options.xmlMode)),this.options.xmlMode)})}return K(this,i=>{if(k(i))if(typeof e=="object")for(const n of Object.keys(e)){const r=e[n];ni(i,n,r,this.options.xmlMode)}else ni(i,e,t,this.options.xmlMode)})}}function vn(e,t,a){var i;(i=e.data)!==null&&i!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&a!==void 0&&(e.data[t]=a)}function sc(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(ai))continue;const a=ec(t.slice(ai.length));It.call(e.data,a)||(e.data[a]=wn(e.attribs[t]))}return e.data}function rc(e,t){const a=ai+tc(t),i=e.data;if(It.call(i,t))return i[t];if(It.call(e.attribs,a))return i[t]=wn(e.attribs[a])}function wn(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);if(e===String(t))return t;if(ac.test(e))try{return JSON.parse(e)}catch{}return e}function uc(e,t){var a;const i=this[0];if(!i||!k(i))return;const n=i;return(a=n.data)!==null&&a!==void 0||(n.data={}),e==null?sc(n):typeof e=="object"||t!==void 0?(K(this,r=>{k(r)&&(typeof e=="object"?vn(r,e):vn(r,e,t))}),this):rc(n,e)}function oc(e){const t=arguments.length===0,a=this[0];if(!a||!k(a))return t?void 0:this;switch(a.name){case"textarea":return this.text(e);case"select":{const i=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const n=typeof e=="object"?e:[e];for(const r of n)this.find(`option[value="${r}"]`).attr("selected","");return this}return this.attr("multiple")?i.toArray().map(n=>Ct(n.children)):i.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function Bn(e,t){!e.attribs||!It.call(e.attribs,t)||delete e.attribs[t]}function ia(e){return e?e.trim().split(St):[]}function cc(e){const t=ia(e);for(const a of t)K(this,i=>{k(i)&&Bn(i,a)});return this}function lc(e){return this.toArray().some(t=>{const a=k(t)&&t.attribs.class;let i=-1;if(a&&e.length>0)for(;(i=a.indexOf(e,i+1))>-1;){const n=i+e.length;if((i===0||St.test(a[i-1]))&&(n===a.length||St.test(a[n])))return!0}return!1})}function Un(e){if(typeof e=="function")return K(this,(i,n)=>{if(k(i)){const r=i.attribs.class||"";Un.call([i],e.call(i,n,r))}});if(!e||typeof e!="string")return this;const t=e.split(St),a=this.length;for(let i=0;i<a;i++){const n=this[i];if(!k(n))continue;const r=aa(n,"class",!1);if(r){let u=` ${r} `;for(const o of t){const c=`${o} `;u.includes(` ${c}`)||(u+=c)}ct(n,"class",u.trim())}else ct(n,"class",t.join(" ").trim())}return this}function Fn(e){if(typeof e=="function")return K(this,(n,r)=>{k(n)&&Fn.call([n],e.call(n,r,n.attribs.class||""))});const t=ia(e),a=t.length,i=arguments.length===0;return K(this,n=>{if(k(n))if(i)n.attribs.class="";else{const r=ia(n.attribs.class);let u=!1;for(let o=0;o<a;o++){const c=r.indexOf(t[o]);c>=0&&(r.splice(c,1),u=!0,o--)}u&&(n.attribs.class=r.join(" "))}})}function Hn(e,t){if(typeof e=="function")return K(this,(u,o)=>{k(u)&&Hn.call([u],e.call(u,o,u.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const a=e.split(St),i=a.length,n=typeof t=="boolean"?t?1:-1:0,r=this.length;for(let u=0;u<r;u++){const o=this[u];if(!k(o))continue;const c=ia(o.attribs.class);for(let f=0;f<i;f++){const E=c.indexOf(a[f]);n>=0&&E<0?c.push(a[f]):n<=0&&E>=0&&c.splice(E,1)}o.attribs.class=c.join(" ")}return this}const dc=Object.freeze(Object.defineProperty({__proto__:null,addClass:Un,attr:ic,data:uc,hasClass:lc,prop:nc,removeAttr:cc,removeClass:Fn,toggleClass:Hn,val:oc},Symbol.toStringTag,{value:"Module"}));var R;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(R||(R={}));var te;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(te||(te={}));const Yn=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,hc=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,fc=new Map([[126,te.Element],[94,te.Start],[36,te.End],[42,te.Any],[33,te.Not],[124,te.Hyphen]]),Ec=new Set(["has","not","matches","is","where","host","host-context"]);function xt(e){switch(e.type){case R.Adjacent:case R.Child:case R.Descendant:case R.Parent:case R.Sibling:case R.ColumnCombinator:return!0;default:return!1}}const mc=new Set(["contains","icontains"]);function Tc(e,t,a){const i=parseInt(t,16)-65536;return i!==i||a?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320)}function Ot(e){return e.replace(hc,Tc)}function si(e){return e===39||e===34}function Vn(e){return e===32||e===9||e===10||e===12||e===13}function na(e){const t=[],a=qn(t,`${e}`,0);if(a<e.length)throw new Error(`Unmatched selector: ${e.slice(a)}`);return t}function qn(e,t,a){let i=[];function n(p){const A=t.slice(a+p).match(Yn);if(!A)throw new Error(`Expected name, found ${t.slice(a)}`);const[C]=A;return a+=p+C.length,Ot(C)}function r(p){for(a+=p;a<t.length&&Vn(t.charCodeAt(a));)a++}function u(){a+=1;const p=a;let A=1;for(;A>0&&a<t.length;a++)t.charCodeAt(a)===40&&!o(a)?A++:t.charCodeAt(a)===41&&!o(a)&&A--;if(A)throw new Error("Parenthesis not matched");return Ot(t.slice(p,a-1))}function o(p){let A=0;for(;t.charCodeAt(--p)===92;)A++;return(A&1)===1}function c(){if(i.length>0&&xt(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function f(p){if(i.length>0&&i[i.length-1].type===R.Descendant){i[i.length-1].type=p;return}c(),i.push({type:p})}function E(p,A){i.push({type:R.Attribute,name:p,action:A,value:n(1),namespace:null,ignoreCase:"quirks"})}function T(){if(i.length&&i[i.length-1].type===R.Descendant&&i.pop(),i.length===0)throw new Error("Empty sub-selector");e.push(i)}if(r(0),t.length===a)return a;e:for(;a<t.length;){const p=t.charCodeAt(a);switch(p){case 32:case 9:case 10:case 12:case 13:{(i.length===0||i[0].type!==R.Descendant)&&(c(),i.push({type:R.Descendant})),r(1);break}case 62:{f(R.Child),r(1);break}case 60:{f(R.Parent),r(1);break}case 126:{f(R.Sibling),r(1);break}case 43:{f(R.Adjacent),r(1);break}case 46:{E("class",te.Element);break}case 35:{E("id",te.Equals);break}case 91:{r(1);let A,C=null;t.charCodeAt(a)===124?A=n(1):t.startsWith("*|",a)?(C="*",A=n(2)):(A=n(0),t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==61&&(C=A,A=n(1))),r(0);let L=te.Exists;const M=fc.get(t.charCodeAt(a));if(M){if(L=M,t.charCodeAt(a+1)!==61)throw new Error("Expected `=`");r(2)}else t.charCodeAt(a)===61&&(L=te.Equals,r(1));let V="",B=null;if(L!=="exists"){if(si(t.charCodeAt(a))){const O=t.charCodeAt(a);let g=a+1;for(;g<t.length&&(t.charCodeAt(g)!==O||o(g));)g+=1;if(t.charCodeAt(g)!==O)throw new Error("Attribute value didn't end");V=Ot(t.slice(a+1,g)),a=g+1}else{const O=a;for(;a<t.length&&(!Vn(t.charCodeAt(a))&&t.charCodeAt(a)!==93||o(a));)a+=1;V=Ot(t.slice(O,a))}r(0);const x=t.charCodeAt(a)|32;x===115?(B=!1,r(1)):x===105&&(B=!0,r(1))}if(t.charCodeAt(a)!==93)throw new Error("Attribute selector didn't terminate");a+=1;const H={type:R.Attribute,name:A,action:L,value:V,namespace:C,ignoreCase:B};i.push(H);break}case 58:{if(t.charCodeAt(a+1)===58){i.push({type:R.PseudoElement,name:n(2).toLowerCase(),data:t.charCodeAt(a)===40?u():null});continue}const A=n(1).toLowerCase();let C=null;if(t.charCodeAt(a)===40)if(Ec.has(A)){if(si(t.charCodeAt(a+1)))throw new Error(`Pseudo-selector ${A} cannot be quoted`);if(C=[],a=qn(C,t,a+1),t.charCodeAt(a)!==41)throw new Error(`Missing closing parenthesis in :${A} (${t})`);a+=1}else{if(C=u(),mc.has(A)){const L=C.charCodeAt(0);L===C.charCodeAt(C.length-1)&&si(L)&&(C=C.slice(1,-1))}C=Ot(C)}i.push({type:R.Pseudo,name:A,data:C});break}case 44:{T(),i=[],r(1);break}default:{if(t.startsWith("/*",a)){const L=t.indexOf("*/",a+2);if(L<0)throw new Error("Comment was not terminated");a=L+2,i.length===0&&r(0);break}let A=null,C;if(p===42)a+=1,C="*";else if(p===124){if(C="",t.charCodeAt(a+1)===124){f(R.ColumnCombinator),r(2);break}}else if(Yn.test(t.slice(a)))C=n(0);else break e;t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==124&&(A=C,t.charCodeAt(a+1)===42?(C="*",a+=2):C=n(1)),i.push(C==="*"?{type:R.Universal,namespace:A}:{type:R.Tag,name:C,namespace:A})}}}return T(),a}function pc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sa={trueFunc:function(){return!0},falseFunc:function(){return!1}};const U=pc(sa),Wn=new Map([[R.Universal,50],[R.Tag,30],[R.Attribute,1],[R.Pseudo,0]]);function ri(e){return!Wn.has(e.type)}const bc=new Map([[te.Exists,10],[te.Equals,8],[te.Not,7],[te.Start,6],[te.End,6],[te.Any,5]]);function gc(e){const t=e.map(Xn);for(let a=1;a<e.length;a++){const i=t[a];if(!(i<0))for(let n=a-1;n>=0&&i<t[n];n--){const r=e[n+1];e[n+1]=e[n],e[n]=r,t[n+1]=t[n],t[n]=i}}}function Xn(e){var t,a;let i=(t=Wn.get(e.type))!==null&&t!==void 0?t:-1;return e.type===R.Attribute?(i=(a=bc.get(e.action))!==null&&a!==void 0?a:4,e.action===te.Equals&&e.name==="id"&&(i=9),e.ignoreCase&&(i>>=1)):e.type===R.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?i=0:Array.isArray(e.data)?(i=Math.min(...e.data.map(n=>Math.min(...n.map(Xn)))),i<0&&(i=0)):i=2:i=3),i}const _c=/[-[\]{}()*+?.,\\^$|#\s]/g;function Gn(e){return e.replace(_c,"\\$&")}const Ac=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function Ke(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&Ac.has(e.name)}const Nc={equals(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return Ke(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return o!=null&&o.length===r.length&&o.toLowerCase()===r&&e(u)}):u=>i.getAttributeValue(u,n)===r&&e(u)},hyphen(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return Ke(t,a)?(r=r.toLowerCase(),function(c){const f=i.getAttributeValue(c,n);return f!=null&&(f.length===u||f.charAt(u)==="-")&&f.substr(0,u).toLowerCase()===r&&e(c)}):function(c){const f=i.getAttributeValue(c,n);return f!=null&&(f.length===u||f.charAt(u)==="-")&&f.substr(0,u)===r&&e(c)}},element(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(/\s/.test(r))return U.falseFunc;const u=new RegExp(`(?:^|\\s)${Gn(r)}(?:$|\\s)`,Ke(t,a)?"i":"");return function(c){const f=i.getAttributeValue(c,n);return f!=null&&f.length>=r.length&&u.test(f)&&e(c)}},exists(e,{name:t},{adapter:a}){return i=>a.hasAttrib(i,t)&&e(i)},start(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return u===0?U.falseFunc:Ke(t,a)?(r=r.toLowerCase(),o=>{const c=i.getAttributeValue(o,n);return c!=null&&c.length>=u&&c.substr(0,u).toLowerCase()===r&&e(o)}):o=>{var c;return!!(!((c=i.getAttributeValue(o,n))===null||c===void 0)&&c.startsWith(r))&&e(o)}},end(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=-r.length;return u===0?U.falseFunc:Ke(t,a)?(r=r.toLowerCase(),o=>{var c;return((c=i.getAttributeValue(o,n))===null||c===void 0?void 0:c.substr(u).toLowerCase())===r&&e(o)}):o=>{var c;return!!(!((c=i.getAttributeValue(o,n))===null||c===void 0)&&c.endsWith(r))&&e(o)}},any(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(r==="")return U.falseFunc;if(Ke(t,a)){const u=new RegExp(Gn(r),"i");return function(c){const f=i.getAttributeValue(c,n);return f!=null&&f.length>=r.length&&u.test(f)&&e(c)}}return u=>{var o;return!!(!((o=i.getAttributeValue(u,n))===null||o===void 0)&&o.includes(r))&&e(u)}},not(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return r===""?u=>!!i.getAttributeValue(u,n)&&e(u):Ke(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return(o==null||o.length!==r.length||o.toLowerCase()!==r)&&e(u)}):u=>i.getAttributeValue(u,n)!==r&&e(u)}},Cc=new Set([9,10,12,13,32]),$n=48,Ic=57;function Sc(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,a=0,i=r(),n=u();if(t<e.length&&e.charAt(t)==="n"&&(t++,a=i*(n??1),o(),t<e.length?(i=r(),o(),n=u()):i=n=0),n===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[a,i*n];function r(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function u(){const c=t;let f=0;for(;t<e.length&&e.charCodeAt(t)>=$n&&e.charCodeAt(t)<=Ic;)f=f*10+(e.charCodeAt(t)-$n),t++;return t===c?null:f}function o(){for(;t<e.length&&Cc.has(e.charCodeAt(t));)t++}}function xc(e){const t=e[0],a=e[1]-1;if(a<0&&t<=0)return U.falseFunc;if(t===-1)return r=>r<=a;if(t===0)return r=>r===a;if(t===1)return a<0?U.trueFunc:r=>r>=a;const i=Math.abs(t),n=(a%i+i)%i;return t>1?r=>r>=a&&r%i===n:r=>r<=a&&r%i===n}function ra(e){return xc(Sc(e))}function ua(e,t){return a=>{const i=t.getParent(a);return i!=null&&t.isTag(i)&&e(a)}}const ui={contains(e,t,{adapter:a}){return function(n){return e(n)&&a.getText(n).includes(t)}},icontains(e,t,{adapter:a}){const i=t.toLowerCase();return function(r){return e(r)&&a.getText(r).toLowerCase().includes(i)}},"nth-child"(e,t,{adapter:a,equals:i}){const n=ra(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?ua(e,a):function(u){const o=a.getSiblings(u);let c=0;for(let f=0;f<o.length&&!i(u,o[f]);f++)a.isTag(o[f])&&c++;return n(c)&&e(u)}},"nth-last-child"(e,t,{adapter:a,equals:i}){const n=ra(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?ua(e,a):function(u){const o=a.getSiblings(u);let c=0;for(let f=o.length-1;f>=0&&!i(u,o[f]);f--)a.isTag(o[f])&&c++;return n(c)&&e(u)}},"nth-of-type"(e,t,{adapter:a,equals:i}){const n=ra(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?ua(e,a):function(u){const o=a.getSiblings(u);let c=0;for(let f=0;f<o.length;f++){const E=o[f];if(i(u,E))break;a.isTag(E)&&a.getName(E)===a.getName(u)&&c++}return n(c)&&e(u)}},"nth-last-of-type"(e,t,{adapter:a,equals:i}){const n=ra(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?ua(e,a):function(u){const o=a.getSiblings(u);let c=0;for(let f=o.length-1;f>=0;f--){const E=o[f];if(i(u,E))break;a.isTag(E)&&a.getName(E)===a.getName(u)&&c++}return n(c)&&e(u)}},root(e,t,{adapter:a}){return i=>{const n=a.getParent(i);return(n==null||!a.isTag(n))&&e(i)}},scope(e,t,a,i){const{equals:n}=a;return!i||i.length===0?ui.root(e,t,a):i.length===1?r=>n(i[0],r)&&e(r):r=>i.includes(r)&&e(r)},hover:oi("isHovered"),visited:oi("isVisited"),active:oi("isActive")};function oi(e){return function(a,i,{adapter:n}){const r=n[e];return typeof r!="function"?U.falseFunc:function(o){return r(o)&&a(o)}}}const Qn={empty(e,{adapter:t}){return!t.getChildren(e).some(a=>t.isTag(a)||t.getText(a)!=="")},"first-child"(e,{adapter:t,equals:a}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;const i=t.getSiblings(e).find(n=>t.isTag(n));return i!=null&&a(e,i)},"last-child"(e,{adapter:t,equals:a}){const i=t.getSiblings(e);for(let n=i.length-1;n>=0;n--){if(a(e,i[n]))return!0;if(t.isTag(i[n]))break}return!1},"first-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=0;r<i.length;r++){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"last-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=i.length-1;r>=0;r--){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"only-of-type"(e,{adapter:t,equals:a}){const i=t.getName(e);return t.getSiblings(e).every(n=>a(e,n)||!t.isTag(n)||t.getName(n)!==i)},"only-child"(e,{adapter:t,equals:a}){return t.getSiblings(e).every(i=>a(e,i)||!t.isTag(i))}};function jn(e,t,a,i){if(a===null){if(e.length>i)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===i)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const Oc={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
|
12
|
-
:is(button, input, select, textarea, optgroup, option)[disabled],
|
13
|
-
optgroup[disabled] > option,
|
14
|
-
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
|
15
|
-
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},Kn={};function Dc(e,t){return e===U.falseFunc?U.falseFunc:a=>t.isTag(a)&&e(a)}function zn(e,t){const a=t.getSiblings(e);if(a.length<=1)return[];const i=a.indexOf(e);return i<0||i===a.length-1?[]:a.slice(i+1).filter(t.isTag)}function ci(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const li=(e,t,a,i,n)=>{const r=n(t,ci(a),i);return r===U.trueFunc?e:r===U.falseFunc?U.falseFunc:u=>r(u)&&e(u)},di={is:li,matches:li,where:li,not(e,t,a,i,n){const r=n(t,ci(a),i);return r===U.falseFunc?e:r===U.trueFunc?U.falseFunc:u=>!r(u)&&e(u)},has(e,t,a,i,n){const{adapter:r}=a,u=ci(a);u.relativeSelector=!0;const o=t.some(E=>E.some(ri))?[Kn]:void 0,c=n(t,u,o);if(c===U.falseFunc)return U.falseFunc;const f=Dc(c,r);if(o&&c!==U.trueFunc){const{shouldTestNextSiblings:E=!1}=c;return T=>{if(!e(T))return!1;o[0]=T;const p=r.getChildren(T),A=E?[...p,...zn(T,r)]:p;return r.existsOne(f,A)}}return E=>e(E)&&r.existsOne(f,r.getChildren(E))}};function Lc(e,t,a,i,n){var r;const{name:u,data:o}=t;if(Array.isArray(o)){if(!(u in di))throw new Error(`Unknown pseudo-class :${u}(${o})`);return di[u](e,o,a,i,n)}const c=(r=a.pseudos)===null||r===void 0?void 0:r[u],f=typeof c=="string"?c:Oc[u];if(typeof f=="string"){if(o!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);const E=na(f);return di.is(e,E,a,i,n)}if(typeof c=="function")return jn(c,u,o,1),E=>c(E,o)&&e(E);if(u in ui)return ui[u](e,o,a,i);if(u in Qn){const E=Qn[u];return jn(E,u,o,2),T=>E(T,a,o)&&e(T)}throw new Error(`Unknown pseudo-class :${u}`)}function hi(e,t){const a=t.getParent(e);return a&&t.isTag(a)?a:null}function Rc(e,t,a,i,n){const{adapter:r,equals:u}=a;switch(t.type){case R.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case R.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case R.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!a.xmlMode||a.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),Nc[t.action](e,t,a)}case R.Pseudo:return Lc(e,t,a,i,n);case R.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:o}=t;return(!a.xmlMode||a.lowerCaseTags)&&(o=o.toLowerCase()),function(f){return r.getName(f)===o&&e(f)}}case R.Descendant:{if(a.cacheResults===!1||typeof WeakSet>"u")return function(f){let E=f;for(;E=hi(E,r);)if(e(E))return!0;return!1};const o=new WeakSet;return function(f){let E=f;for(;E=hi(E,r);)if(!o.has(E)){if(r.isTag(E)&&e(E))return!0;o.add(E)}return!1}}case"_flexibleDescendant":return function(c){let f=c;do if(e(f))return!0;while(f=hi(f,r));return!1};case R.Parent:return function(c){return r.getChildren(c).some(f=>r.isTag(f)&&e(f))};case R.Child:return function(c){const f=r.getParent(c);return f!=null&&r.isTag(f)&&e(f)};case R.Sibling:return function(c){const f=r.getSiblings(c);for(let E=0;E<f.length;E++){const T=f[E];if(u(c,T))break;if(r.isTag(T)&&e(T))return!0}return!1};case R.Adjacent:return r.prevElementSibling?function(c){const f=r.prevElementSibling(c);return f!=null&&e(f)}:function(c){const f=r.getSiblings(c);let E;for(let T=0;T<f.length;T++){const p=f[T];if(u(c,p))break;r.isTag(p)&&(E=p)}return!!E&&e(E)};case R.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function Zn(e){return e.type===R.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(Zn)))}const yc={type:R.Descendant},Mc={type:"_flexibleDescendant"},Pc={type:R.Pseudo,name:"scope",data:null};function kc(e,{adapter:t},a){const i=!!(a!=null&&a.every(n=>{const r=t.isTag(n)&&t.getParent(n);return n===Kn||r&&t.isTag(r)}));for(const n of e){if(!(n.length>0&&ri(n[0])&&n[0].type!==R.Descendant))if(i&&!n.some(Zn))n.unshift(yc);else continue;n.unshift(Pc)}}function Jn(e,t,a){var i;e.forEach(gc),a=(i=t.context)!==null&&i!==void 0?i:a;const n=Array.isArray(a),r=a&&(Array.isArray(a)?a:[a]);if(t.relativeSelector!==!1)kc(e,t,r);else if(e.some(c=>c.length>0&&ri(c[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let u=!1;const o=e.map(c=>{if(c.length>=2){const[f,E]=c;f.type!==R.Pseudo||f.name!=="scope"||(n&&E.type===R.Descendant?c[1]=Mc:(E.type===R.Adjacent||E.type===R.Sibling)&&(u=!0))}return vc(c,t,r)}).reduce(wc,U.falseFunc);return o.shouldTestNextSiblings=u,o}function vc(e,t,a){var i;return e.reduce((n,r)=>n===U.falseFunc?U.falseFunc:Rc(n,r,t,a,Jn),(i=t.rootFunc)!==null&&i!==void 0?i:U.trueFunc)}function wc(e,t){return t===U.falseFunc||e===U.trueFunc?e:e===U.falseFunc||t===U.trueFunc?t:function(i){return e(i)||t(i)}}const es=(e,t)=>e===t,Bc={adapter:ta,equals:es};function Uc(e){var t,a,i,n;const r=e??Bc;return(t=r.adapter)!==null&&t!==void 0||(r.adapter=ta),(a=r.equals)!==null&&a!==void 0||(r.equals=(n=(i=r.adapter)===null||i===void 0?void 0:i.equals)!==null&&n!==void 0?n:es),r}function Fc(e){return function(a,i,n){const r=Uc(i);return e(a,r,n)}}const fi=Fc(Jn);function ts(e,t,a=!1){return a&&(e=Hc(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function Hc(e,t){const a=Array.isArray(e)?e.slice(0):[e],i=a.length;for(let n=0;n<i;n++){const r=zn(a[n],t);a.push(...r)}return a}const Yc=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function oa(e){return e.type!=="pseudo"?!1:Yc.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(oa)):!1}function Vc(e,t,a){const i=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(i)?i>=0?i+1:1/0:0;case"lt":return isFinite(i)?i>=0?Math.min(i,a):1/0:0;case"gt":return isFinite(i)?1/0:0;case"odd":return 2*a;case"even":return 2*a-1;case"last":case"not":return 1/0}}function qc(e){for(;e.parent;)e=e.parent;return e}function Ei(e){const t=[],a=[];for(const i of e)i.some(oa)?t.push(i):a.push(i);return[a,t]}const Wc={type:R.Universal,namespace:null},Xc={type:R.Pseudo,name:"scope",data:null};function as(e,t,a={}){return is([e],t,a)}function is(e,t,a={}){if(typeof t=="function")return e.some(t);const[i,n]=Ei(na(t));return i.length>0&&e.some(fi(i,a))||n.some(r=>rs(r,e,a).length>0)}function Gc(e,t,a,i){const n=typeof a=="string"?parseInt(a,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(n)&&Math.abs(n)<t.length?[n<0?t[t.length+n]:t[n]]:[];case"gt":return isFinite(n)?t.slice(n+1):[];case"even":return t.filter((r,u)=>u%2===0);case"odd":return t.filter((r,u)=>u%2===1);case"not":{const r=new Set(ss(a,t,i));return t.filter(u=>!r.has(u))}}}function ns(e,t,a={}){return ss(na(e),t,a)}function ss(e,t,a){if(t.length===0)return[];const[i,n]=Ei(e);let r;if(i.length){const u=Ti(t,i,a);if(n.length===0)return u;u.length&&(r=new Set(u))}for(let u=0;u<n.length&&(r==null?void 0:r.size)!==t.length;u++){const o=n[u];if((r?t.filter(E=>k(E)&&!r.has(E)):t).length===0)break;const f=rs(o,t,a);if(f.length)if(r)f.forEach(E=>r.add(E));else{if(u===n.length-1)return f;r=new Set(f)}}return typeof r<"u"?r.size===t.length?t:t.filter(u=>r.has(u)):[]}function rs(e,t,a){var i;if(e.some(xt)){const n=(i=a.root)!==null&&i!==void 0?i:qc(t[0]),r={...a,context:t,relativeSelector:!1};return e.push(Xc),ca(n,e,r,!0,t.length)}return ca(t,e,a,!1,t.length)}function $c(e,t,a={},i=1/0){if(typeof e=="function")return us(t,e);const[n,r]=Ei(na(e)),u=r.map(o=>ca(t,o,a,!0,i));return n.length&&u.push(mi(t,n,a,i)),u.length===0?[]:u.length===1?u[0]:ot(u.reduce((o,c)=>[...o,...c]))}function ca(e,t,a,i,n){const r=t.findIndex(oa),u=t.slice(0,r),o=t[r],c=t.length-1===r?n:1/0,f=Vc(o.name,o.data,c);if(f===0)return[];const T=(u.length===0&&!Array.isArray(e)?zt(e).filter(k):u.length===0?(Array.isArray(e)?e:[e]).filter(k):i||u.some(xt)?mi(e,[u],a,f):Ti(e,[u],a)).slice(0,f);let p=Gc(o.name,T,o.data,a);if(p.length===0||t.length===r+1)return p;const A=t.slice(r+1),C=A.some(xt);if(C){if(xt(A[0])){const{type:L}=A[0];(L===R.Sibling||L===R.Adjacent)&&(p=ts(p,ta,!0)),A.unshift(Wc)}a={...a,relativeSelector:!1,rootFunc:L=>p.includes(L)}}else a.rootFunc&&a.rootFunc!==sa.trueFunc&&(a={...a,rootFunc:sa.trueFunc});return A.some(oa)?ca(p,A,a,!1,n):C?mi(p,[A],a,n):Ti(p,[A],a)}function mi(e,t,a,i){const n=fi(t,a,e);return us(e,n,i)}function us(e,t,a=1/0){const i=ts(e,ta,t.shouldTestNextSiblings);return Za(n=>k(n)&&t(n),i,!0,a)}function Ti(e,t,a){const i=(Array.isArray(e)?e:[e]).filter(k);if(i.length===0)return i;const n=fi(t,a);return n===sa.trueFunc?i:i.filter(n)}const Qc=/^\s*[+~]/;function jc(e){if(!e)return this._make([]);if(typeof e!="string"){const t=ye(e)?e.toArray():[e],a=this.toArray();return this._make(t.filter(i=>a.some(n=>Mn(n,i))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function Kc(e,t){var a;const i=this.toArray(),n=Qc.test(e)?i:this.children().toArray(),r={context:i,root:(a=this._root)===null||a===void 0?void 0:a[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make($c(e,n,r,t))}function pi(e){return function(t,...a){return function(i){var n;let r=e(t,this);return i&&(r=_i(r,i,this.options.xmlMode,(n=this._root)===null||n===void 0?void 0:n[0])),this._make(this.length>1&&r.length>1?a.reduce((u,o)=>o(u),r):r)}}}const Dt=pi((e,t)=>{let a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n.length>0&&(a=a.concat(n))}return a}),bi=pi((e,t)=>{const a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n!==null&&a.push(n)}return a});function gi(e,...t){let a=null;const i=pi((n,r)=>{const u=[];return K(r,o=>{for(let c;(c=n(o))&&!(a!=null&&a(c,u.length));o=c)u.push(c)}),u})(e,...t);return function(n,r){a=typeof n=="string"?o=>as(o,n,this.options):n?Lt(n):null;const u=i.call(this,r);return a=null,u}}function lt(e){return e.length>1?Array.from(new Set(e)):e}const zc=bi(({parent:e})=>e&&!Ue(e)?e:null,lt),Zc=Dt(e=>{const t=[];for(;e.parent&&!Ue(e.parent);)t.push(e.parent),e=e.parent;return t},ot,e=>e.reverse()),Jc=gi(({parent:e})=>e&&!Ue(e)?e:null,ot,e=>e.reverse());function el(e){var t;const a=[];if(!e)return this._make(a);const i={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},n=typeof e=="string"?r=>as(r,e,i):Lt(e);return K(this,r=>{for(r&&!Ue(r)&&!k(r)&&(r=r.parent);r&&k(r);){if(n(r,0)){a.includes(r)||a.push(r);break}r=r.parent}}),this._make(a)}const tl=bi(e=>Ka(e)),al=Dt(e=>{const t=[];for(;e.next;)e=e.next,k(e)&&t.push(e);return t},lt),il=gi(e=>Ka(e),lt),nl=bi(e=>za(e)),sl=Dt(e=>{const t=[];for(;e.prev;)e=e.prev,k(e)&&t.push(e);return t},lt),rl=gi(e=>za(e),lt),ul=Dt(e=>Sn(e).filter(t=>k(t)&&t!==e),ot),ol=Dt(e=>zt(e).filter(k),lt);function cl(){const e=this.toArray().reduce((t,a)=>ie(a)?t.concat(a.children):t,[]);return this._make(e)}function ll(e){let t=0;const a=this.length;for(;t<a&&e.call(this[t],t,this[t])!==!1;)++t;return this}function dl(e){let t=[];for(let a=0;a<this.length;a++){const i=this[a],n=e.call(i,a,i);n!=null&&(t=t.concat(n))}return this._make(t)}function Lt(e){return typeof e=="function"?(t,a)=>e.call(t,a,t):ye(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function hl(e){var t;return this._make(_i(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function _i(e,t,a,i){return typeof t=="string"?ns(t,e,{xmlMode:a,root:i}):e.filter(Lt(t))}function fl(e){const t=this.toArray();return typeof e=="string"?is(t.filter(k),e,this.options):e?t.some(Lt(e)):!1}function El(e){let t=this.toArray();if(typeof e=="string"){const a=new Set(ns(e,t,this.options));t=t.filter(i=>!a.has(i))}else{const a=Lt(e);t=t.filter((i,n)=>!a(i,n))}return this._make(t)}function ml(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,a)=>this._make(a).find(e).length>0)}function Tl(){return this.length>1?this._make(this[0]):this}function pl(){return this.length>0?this._make(this[this.length-1]):this}function bl(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function gl(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function _l(){return Array.prototype.slice.call(this)}function Al(e){let t,a;return e==null?(t=this.parent().children(),a=this[0]):typeof e=="string"?(t=this._make(e),a=this[0]):(t=this,a=ye(e)?e[0]:e),Array.prototype.indexOf.call(t,a)}function Nl(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function Cl(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function Il(e,t){const a=this._make(e,t),i=ot([...this.get(),...a.get()]);return this._make(i)}function Sl(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const xl=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:Kc,add:Il,addBack:Sl,children:ol,closest:el,contents:cl,each:ll,end:Cl,eq:bl,filter:hl,filterArray:_i,find:jc,first:Tl,get:gl,has:ml,index:Al,is:fl,last:pl,map:dl,next:tl,nextAll:al,nextUntil:il,not:El,parent:zc,parents:Zc,parentsUntil:Jc,prev:nl,prevAll:sl,prevUntil:rl,siblings:ul,slice:Nl,toArray:_l},Symbol.toStringTag,{value:"Module"}));function Ol(e){return function(a,i,n,r){if(typeof Buffer<"u"&&Buffer.isBuffer(a)&&(a=a.toString()),typeof a=="string")return e(a,i,n,r);const u=a;if(!Array.isArray(u)&&Ue(u))return u;const o=new $e([]);return ze(u,o),o}}function ze(e,t){const a=Array.isArray(e)?e:[e];t?t.children=a:t=null;for(let i=0;i<a.length;i++){const n=a[i];n.parent&&n.parent.children!==a&&Qe(n),t?(n.prev=a[i-1]||null,n.next=a[i+1]||null):n.prev=n.next=null,n.parent=t}return t}function Dl(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);const a=[];for(let i=0;i<e.length;i++){const n=e[i];if(typeof n=="object"){if(n==null)continue;if(!("length"in n)){a.push(t?Nt(n,!0):n);continue}}a.push(...this._makeDomArray(n,t))}return a}return[t?Nt(e,!0):e]}function os(e){return function(...t){const a=this.length-1;return K(this,(i,n)=>{if(!ie(i))return;const r=typeof t[0]=="function"?t[0].call(i,n,this._render(i.children)):t,u=this._makeDomArray(r,n<a);e(u,i.children,i)})}}function Ye(e,t,a,i,n){var r,u;const o=[t,a,...i],c=t===0?null:e[t-1],f=t+a>=e.length?null:e[t+a];for(let E=0;E<i.length;++E){const T=i[E],p=T.parent;if(p){const C=p.children.indexOf(T);C>-1&&(p.children.splice(C,1),n===p&&t>C&&o[0]--)}T.parent=n,T.prev&&(T.prev.next=(r=T.next)!==null&&r!==void 0?r:null),T.next&&(T.next.prev=(u=T.prev)!==null&&u!==void 0?u:null),T.prev=E===0?c:i[E-1],T.next=E===i.length-1?f:i[E+1]}return c&&(c.next=i[0]),f&&(f.prev=i[i.length-1]),e.splice(...o)}function Ll(e){return(ye(e)?e:this._make(e)).append(this),this}function Rl(e){return(ye(e)?e:this._make(e)).prepend(this),this}const yl=os((e,t,a)=>{Ye(t,t.length,0,e,a)}),Ml=os((e,t,a)=>{Ye(t,0,0,e,a)});function cs(e){return function(t){const a=this.length-1,i=this.parents().last();for(let n=0;n<this.length;n++){const r=this[n],u=typeof t=="function"?t.call(r,n,r):typeof t=="string"&&!ti(t)?i.find(t).clone():t,[o]=this._makeDomArray(u,n<a);if(!o||!ie(o))continue;let c=o,f=0;for(;f<c.children.length;){const E=c.children[f];k(E)?(c=E,f=0):f++}e(r,c,[o])}return this}}const Pl=cs((e,t,a)=>{const{parent:i}=e;if(!i)return;const n=i.children,r=n.indexOf(e);ze([e],t),Ye(n,r,0,a,i)}),kl=cs((e,t,a)=>{ie(e)&&(ze(e.children,t),ze(a,e))});function vl(e){return this.parent(e).not("body").each((t,a)=>{this._make(a).replaceWith(a.children)}),this}function wl(e){const t=this[0];if(t){const a=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t);let i;for(let r=0;r<a.length;r++)a[r].type==="tag"&&(i=a[r]);let n=0;for(;i&&n<i.children.length;){const r=i.children[n];r.type==="tag"?(i=r,n=0):n++}i&&this._make(i).append(this)}return this}function Bl(...e){const t=this.length-1;return K(this,(a,i)=>{if(!ie(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);Ye(n,r+1,0,o,a.parent)})}function Ul(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const a of this._makeDomArray(e)){const i=this.clone().toArray(),{parent:n}=a;if(!n)continue;const r=n.children,u=r.indexOf(a);u<0||(Ye(r,u+1,0,i,n),t.push(...i))}return this._make(t)}function Fl(...e){const t=this.length-1;return K(this,(a,i)=>{if(!ie(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);Ye(n,r,0,o,a.parent)})}function Hl(e){const t=this._make(e);this.remove();const a=[];return K(t,i=>{const n=this.clone().toArray(),{parent:r}=i;if(!r)return;const u=r.children,o=u.indexOf(i);o<0||(Ye(u,o,0,n,r),a.push(...n))}),this._make(a)}function Yl(e){const t=e?this.filter(e):this;return K(t,a=>{Qe(a),a.prev=a.next=a.parent=null}),this}function Vl(e){return K(this,(t,a)=>{const{parent:i}=t;if(!i)return;const n=i.children,r=typeof e=="function"?e.call(t,a,t):e,u=this._makeDomArray(r);ze(u,null);const o=n.indexOf(t);Ye(n,o,1,u,i),u.includes(t)||(t.parent=t.prev=t.next=null)})}function ql(){return K(this,e=>{if(ie(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function Wl(e){if(e===void 0){const t=this[0];return!t||!ie(t)?null:this._render(t.children)}return K(this,t=>{if(!ie(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=ye(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;ze(a,t)})}function Xl(){return this._render(this)}function Gl(e){return e===void 0?Ct(this):typeof e=="function"?K(this,(t,a)=>this._make(t).text(e.call(t,a,Ct([t])))):K(this,t=>{if(!ie(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=new At(`${e}`);ze(a,t)})}function $l(){const e=Array.prototype.map.call(this.get(),a=>Nt(a,!0)),t=new $e(e);for(const a of e)a.parent=t;return this._make(e)}const Ql=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:Dl,after:Bl,append:yl,appendTo:Ll,before:Fl,clone:$l,empty:ql,html:Wl,insertAfter:Ul,insertBefore:Hl,prepend:Ml,prependTo:Rl,remove:Yl,replaceWith:Vl,text:Gl,toString:Xl,unwrap:vl,wrap:Pl,wrapAll:wl,wrapInner:kl},Symbol.toStringTag,{value:"Module"}));function jl(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return K(this,(a,i)=>{k(a)&&ls(a,e,t,i)});if(this.length!==0)return ds(this[0],e)}function ls(e,t,a,i){if(typeof t=="string"){const n=ds(e),r=typeof a=="function"?a.call(e,i,n[t]):a;r===""?delete n[t]:r!=null&&(n[t]=r),e.attribs.style=Kl(n)}else if(typeof t=="object"){const n=Object.keys(t);for(let r=0;r<n.length;r++){const u=n[r];ls(e,u,t[u],r)}}}function ds(e,t){if(!e||!k(e))return;const a=zl(e.attribs.style);if(typeof t=="string")return a[t];if(Array.isArray(t)){const i={};for(const n of t)a[n]!=null&&(i[n]=a[n]);return i}return a}function Kl(e){return Object.keys(e).reduce((t,a)=>`${t}${t?" ":""}${a}: ${e[a]};`,"")}function zl(e){if(e=(e||"").trim(),!e)return{};const t={};let a;for(const i of e.split(";")){const n=i.indexOf(":");if(n<1||n===i.length-1){const r=i.trimEnd();r.length>0&&a!==void 0&&(t[a]+=`;${r}`)}else a=i.slice(0,n).trim(),t[a]=i.slice(n+1).trim()}return t}const Zl=Object.freeze(Object.defineProperty({__proto__:null,css:jl},Symbol.toStringTag,{value:"Module"})),hs="input,select,textarea,keygen",Jl=/%20/g,fs=/\r?\n/g;function e0(){return this.serializeArray().map(a=>`${encodeURIComponent(a.name)}=${encodeURIComponent(a.value)}`).join("&").replace(Jl,"+")}function t0(){return this.map((e,t)=>{const a=this._make(t);return k(t)&&t.name==="form"?a.find(hs).toArray():a.filter(hs).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var a;const i=this._make(t),n=i.attr("name"),r=(a=i.val())!==null&&a!==void 0?a:"";return Array.isArray(r)?r.map(u=>({name:n,value:u.replace(fs,`\r
|
16
|
-
`)})):{name:n,value:r.replace(fs,`\r
|
17
|
-
`)}}).toArray()}const a0=Object.freeze(Object.defineProperty({__proto__:null,serialize:e0,serializeArray:t0},Symbol.toStringTag,{value:"Module"}));function i0(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function n0(e){const t={};for(const a in e){const i=e[a],n=Array.isArray(i),{selector:r,value:u}=i0(n?i[0]:i),o=typeof u=="function"?u:typeof u=="string"?c=>this._make(c).prop(u):c=>this._make(c).extract(u);if(n)t[a]=this._findBySelector(r,Number.POSITIVE_INFINITY).map((c,f)=>o(f,a,t)).get();else{const c=this._findBySelector(r,1);t[a]=c.length>0?o(c[0],a,t):void 0}}return t}const s0=Object.freeze(Object.defineProperty({__proto__:null,extract:n0},Symbol.toStringTag,{value:"Module"}));class Rt{constructor(t,a,i){if(this.length=0,this.options=i,this._root=a,t){for(let n=0;n<t.length;n++)this[n]=t[n];this.length=t.length}}}Rt.prototype.cheerio="[cheerio object]",Rt.prototype.splice=Array.prototype.splice,Rt.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Rt.prototype,dc,xl,Ql,Zl,a0,s0);function r0(e,t){return function a(i,n,r=!0){if(i==null)throw new Error("cheerio.load() expects a string");const u=ei(n),o=e(i,u,r,null);class c extends Rt{_make(T,p){const A=f(T,p);return A.prevObject=this,A}_parse(T,p,A,C){return e(T,p,A,C)}_render(T){return t(T,this.options)}}function f(E,T,p=o,A){if(E&&ye(E))return E;const C=ei(A,u),L=typeof p=="string"?[e(p,C,!1,null)]:"length"in p?p:[p],M=ye(L)?L:new c(L,null,C);if(M._root=M,!E)return new c(void 0,M,C);const V=typeof E=="string"&&ti(E)?e(E,C,!1,null).children:u0(E)?[E]:Array.isArray(E)?E:void 0,B=new c(V,M,C);if(V)return B;if(typeof E!="string")throw new TypeError("Unexpected type of selector");let H=E;const x=T?typeof T=="string"?ti(T)?new c([e(T,C,!1,null)],M,C):(H=`${T} ${H}`,M):ye(T)?T:new c(Array.isArray(T)?T:[T],M,C):M;return x?x.find(H):B}return Object.assign(f,Jo,{load:a,_root:o,_options:u,fn:c.prototype,prototype:c.prototype}),f}}function u0(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const o0=new Set([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]),j="�";var d;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(d||(d={}));const me={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Es(e){return e>=55296&&e<=57343}function c0(e){return e>=56320&&e<=57343}function l0(e,t){return(e-55296)*1024+9216+t}function ms(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ts(e){return e>=64976&&e<=65007||o0.has(e)}var _;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(_||(_={}));const d0=65536;class h0{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=d0,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,a){const{line:i,col:n,offset:r}=this,u=n+a,o=r+a;return{code:t,startLine:i,endLine:i,startCol:u,endCol:u,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const a=this.html.charCodeAt(this.pos+1);if(c0(a))return this.pos++,this._addGap(),l0(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,d.EOF;return this._err(_.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,a){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=a}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,a){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(a)return this.html.startsWith(t,this.pos);for(let i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,d.EOF;const i=this.html.charCodeAt(a);return i===d.CARRIAGE_RETURN?d.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,d.EOF;let t=this.html.charCodeAt(this.pos);return t===d.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,d.LINE_FEED):t===d.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Es(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===d.LINE_FEED||t===d.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ms(t)?this._err(_.controlCharacterInInputStream):Ts(t)&&this._err(_.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Y;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Y||(Y={}));function ps(e,t){for(let a=e.attrs.length-1;a>=0;a--)if(e.attrs[a].name===t)return e.attrs[a].value;return null}var N;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(N||(N={}));var Ze;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ze||(Ze={}));var pe;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(pe||(pe={}));var b;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(b||(b={}));var s;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(s||(s={}));const f0=new Map([[b.A,s.A],[b.ADDRESS,s.ADDRESS],[b.ANNOTATION_XML,s.ANNOTATION_XML],[b.APPLET,s.APPLET],[b.AREA,s.AREA],[b.ARTICLE,s.ARTICLE],[b.ASIDE,s.ASIDE],[b.B,s.B],[b.BASE,s.BASE],[b.BASEFONT,s.BASEFONT],[b.BGSOUND,s.BGSOUND],[b.BIG,s.BIG],[b.BLOCKQUOTE,s.BLOCKQUOTE],[b.BODY,s.BODY],[b.BR,s.BR],[b.BUTTON,s.BUTTON],[b.CAPTION,s.CAPTION],[b.CENTER,s.CENTER],[b.CODE,s.CODE],[b.COL,s.COL],[b.COLGROUP,s.COLGROUP],[b.DD,s.DD],[b.DESC,s.DESC],[b.DETAILS,s.DETAILS],[b.DIALOG,s.DIALOG],[b.DIR,s.DIR],[b.DIV,s.DIV],[b.DL,s.DL],[b.DT,s.DT],[b.EM,s.EM],[b.EMBED,s.EMBED],[b.FIELDSET,s.FIELDSET],[b.FIGCAPTION,s.FIGCAPTION],[b.FIGURE,s.FIGURE],[b.FONT,s.FONT],[b.FOOTER,s.FOOTER],[b.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[b.FORM,s.FORM],[b.FRAME,s.FRAME],[b.FRAMESET,s.FRAMESET],[b.H1,s.H1],[b.H2,s.H2],[b.H3,s.H3],[b.H4,s.H4],[b.H5,s.H5],[b.H6,s.H6],[b.HEAD,s.HEAD],[b.HEADER,s.HEADER],[b.HGROUP,s.HGROUP],[b.HR,s.HR],[b.HTML,s.HTML],[b.I,s.I],[b.IMG,s.IMG],[b.IMAGE,s.IMAGE],[b.INPUT,s.INPUT],[b.IFRAME,s.IFRAME],[b.KEYGEN,s.KEYGEN],[b.LABEL,s.LABEL],[b.LI,s.LI],[b.LINK,s.LINK],[b.LISTING,s.LISTING],[b.MAIN,s.MAIN],[b.MALIGNMARK,s.MALIGNMARK],[b.MARQUEE,s.MARQUEE],[b.MATH,s.MATH],[b.MENU,s.MENU],[b.META,s.META],[b.MGLYPH,s.MGLYPH],[b.MI,s.MI],[b.MO,s.MO],[b.MN,s.MN],[b.MS,s.MS],[b.MTEXT,s.MTEXT],[b.NAV,s.NAV],[b.NOBR,s.NOBR],[b.NOFRAMES,s.NOFRAMES],[b.NOEMBED,s.NOEMBED],[b.NOSCRIPT,s.NOSCRIPT],[b.OBJECT,s.OBJECT],[b.OL,s.OL],[b.OPTGROUP,s.OPTGROUP],[b.OPTION,s.OPTION],[b.P,s.P],[b.PARAM,s.PARAM],[b.PLAINTEXT,s.PLAINTEXT],[b.PRE,s.PRE],[b.RB,s.RB],[b.RP,s.RP],[b.RT,s.RT],[b.RTC,s.RTC],[b.RUBY,s.RUBY],[b.S,s.S],[b.SCRIPT,s.SCRIPT],[b.SEARCH,s.SEARCH],[b.SECTION,s.SECTION],[b.SELECT,s.SELECT],[b.SOURCE,s.SOURCE],[b.SMALL,s.SMALL],[b.SPAN,s.SPAN],[b.STRIKE,s.STRIKE],[b.STRONG,s.STRONG],[b.STYLE,s.STYLE],[b.SUB,s.SUB],[b.SUMMARY,s.SUMMARY],[b.SUP,s.SUP],[b.TABLE,s.TABLE],[b.TBODY,s.TBODY],[b.TEMPLATE,s.TEMPLATE],[b.TEXTAREA,s.TEXTAREA],[b.TFOOT,s.TFOOT],[b.TD,s.TD],[b.TH,s.TH],[b.THEAD,s.THEAD],[b.TITLE,s.TITLE],[b.TR,s.TR],[b.TRACK,s.TRACK],[b.TT,s.TT],[b.U,s.U],[b.UL,s.UL],[b.SVG,s.SVG],[b.VAR,s.VAR],[b.WBR,s.WBR],[b.XMP,s.XMP]]);function la(e){var t;return(t=f0.get(e))!==null&&t!==void 0?t:s.UNKNOWN}const S=s,E0={[N.HTML]:new Set([S.ADDRESS,S.APPLET,S.AREA,S.ARTICLE,S.ASIDE,S.BASE,S.BASEFONT,S.BGSOUND,S.BLOCKQUOTE,S.BODY,S.BR,S.BUTTON,S.CAPTION,S.CENTER,S.COL,S.COLGROUP,S.DD,S.DETAILS,S.DIR,S.DIV,S.DL,S.DT,S.EMBED,S.FIELDSET,S.FIGCAPTION,S.FIGURE,S.FOOTER,S.FORM,S.FRAME,S.FRAMESET,S.H1,S.H2,S.H3,S.H4,S.H5,S.H6,S.HEAD,S.HEADER,S.HGROUP,S.HR,S.HTML,S.IFRAME,S.IMG,S.INPUT,S.LI,S.LINK,S.LISTING,S.MAIN,S.MARQUEE,S.MENU,S.META,S.NAV,S.NOEMBED,S.NOFRAMES,S.NOSCRIPT,S.OBJECT,S.OL,S.P,S.PARAM,S.PLAINTEXT,S.PRE,S.SCRIPT,S.SECTION,S.SELECT,S.SOURCE,S.STYLE,S.SUMMARY,S.TABLE,S.TBODY,S.TD,S.TEMPLATE,S.TEXTAREA,S.TFOOT,S.TH,S.THEAD,S.TITLE,S.TR,S.TRACK,S.UL,S.WBR,S.XMP]),[N.MATHML]:new Set([S.MI,S.MO,S.MN,S.MS,S.MTEXT,S.ANNOTATION_XML]),[N.SVG]:new Set([S.TITLE,S.FOREIGN_OBJECT,S.DESC]),[N.XLINK]:new Set,[N.XML]:new Set,[N.XMLNS]:new Set},Ai=new Set([S.H1,S.H2,S.H3,S.H4,S.H5,S.H6]),m0=new Set([b.STYLE,b.SCRIPT,b.XMP,b.IFRAME,b.NOEMBED,b.NOFRAMES,b.PLAINTEXT]);function T0(e,t){return m0.has(e)||t&&e===b.NOSCRIPT}var h;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(h||(h={}));const Te={DATA:h.DATA,RCDATA:h.RCDATA,RAWTEXT:h.RAWTEXT,SCRIPT_DATA:h.SCRIPT_DATA,PLAINTEXT:h.PLAINTEXT,CDATA_SECTION:h.CDATA_SECTION};function p0(e){return e>=d.DIGIT_0&&e<=d.DIGIT_9}function yt(e){return e>=d.LATIN_CAPITAL_A&&e<=d.LATIN_CAPITAL_Z}function b0(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_Z}function Ve(e){return b0(e)||yt(e)}function bs(e){return Ve(e)||p0(e)}function da(e){return e+32}function gs(e){return e===d.SPACE||e===d.LINE_FEED||e===d.TABULATION||e===d.FORM_FEED}function _s(e){return gs(e)||e===d.SOLIDUS||e===d.GREATER_THAN_SIGN}function g0(e){return e===d.NULL?_.nullCharacterReference:e>1114111?_.characterReferenceOutsideUnicodeRange:Es(e)?_.surrogateCharacterReference:Ts(e)?_.noncharacterCharacterReference:ms(e)||e===d.CARRIAGE_RETURN?_.controlCharacterReference:null}let _0=class{constructor(t,a){this.options=t,this.handler=a,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=h.DATA,this.returnState=h.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new h0(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ja(Xa,(i,n)=>{this.preprocessor.pos=this.entityStartPos+n-1,this._flushCodePointConsumedAsCharacterReference(i)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(_.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(_.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const n=g0(i);n&&this._err(n,1)}}:void 0)}_err(t,a=0){var i,n;(n=(i=this.handler).onParseError)===null||n===void 0||n.call(i,this.preprocessor.getError(t,a))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,a,i){this.active=!0,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let a=0;a<t;a++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,a){return this.preprocessor.startsWith(t,a)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Y.START_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Y.END_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Y.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Y.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,a){this.currentCharacterToken={type:t,chars:a,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,a;const i=this.currentToken;if(ps(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const n=(t=(a=i.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(_.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=la(t.tagName),t.type===Y.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(_.endTagWithAttributes),t.selfClosing&&this._err(_.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Y.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Y.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Y.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Y.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,a){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=a;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,a)}_emitCodePoint(t){const a=gs(t)?Y.WHITESPACE_CHARACTER:t===d.NULL?Y.NULL_CHARACTER:Y.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Y.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=h.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ge.Attribute:ge.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===h.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case h.DATA:{this._stateData(t);break}case h.RCDATA:{this._stateRcdata(t);break}case h.RAWTEXT:{this._stateRawtext(t);break}case h.SCRIPT_DATA:{this._stateScriptData(t);break}case h.PLAINTEXT:{this._statePlaintext(t);break}case h.TAG_OPEN:{this._stateTagOpen(t);break}case h.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case h.TAG_NAME:{this._stateTagName(t);break}case h.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case h.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case h.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case h.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case h.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case h.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case h.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case h.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case h.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case h.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case h.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case h.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case h.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case h.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case h.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case h.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case h.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case h.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case h.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case h.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case h.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case h.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case h.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case h.BOGUS_COMMENT:{this._stateBogusComment(t);break}case h.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case h.COMMENT_START:{this._stateCommentStart(t);break}case h.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case h.COMMENT:{this._stateComment(t);break}case h.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case h.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case h.COMMENT_END:{this._stateCommentEnd(t);break}case h.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case h.DOCTYPE:{this._stateDoctype(t);break}case h.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case h.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case h.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case h.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case h.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case h.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case h.CDATA_SECTION:{this._stateCdataSection(t);break}case h.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case h.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case h.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case h.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.TAG_OPEN;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitCodePoint(t);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case d.AMPERSAND:{this._startCharacterReference();break}case d.LESS_THAN_SIGN:{this.state=h.RCDATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.RAWTEXT_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ve(t))this._createStartTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case d.EXCLAMATION_MARK:{this.state=h.MARKUP_DECLARATION_OPEN;break}case d.SOLIDUS:{this.state=h.END_TAG_OPEN;break}case d.QUESTION_MARK:{this._err(_.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t);break}case d.EOF:{this._err(_.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(_.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=h.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ve(t))this._createEndTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case d.GREATER_THAN_SIGN:{this._err(_.missingEndTagName),this.state=h.DATA;break}case d.EOF:{this._err(_.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(_.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.tagName+=j;break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(yt(t)?da(t):t)}}_stateRcdataLessThanSign(t){t===d.SOLIDUS?this.state=h.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ve(t)?(this.state=h.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const a=this.currentToken;switch(a.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=h.BEFORE_ATTRIBUTE_NAME,!1;case d.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=h.SELF_CLOSING_START_TAG,!1;case d.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=h.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===d.SOLIDUS?this.state=h.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ve(t)?(this.state=h.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case d.SOLIDUS:{this.state=h.SCRIPT_DATA_END_TAG_OPEN;break}case d.EXCLAMATION_MARK:{this.state=h.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=h.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ve(t)?(this.state=h.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===d.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===d.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===d.SOLIDUS?this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ve(t)?(this._emitChars("<"),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ve(t)?(this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(me.SCRIPT,!1)&&_s(this.preprocessor.peek(me.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<me.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===d.SOLIDUS?(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(me.SCRIPT,!1)&&_s(this.preprocessor.peek(me.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<me.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this.state=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._err(_.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=h.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=h.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this._leaveAttrName(),this.state=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._leaveAttrName(),this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:{this._err(_.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.currentAttr.name+=j;break}default:this.currentAttr.name+=String.fromCodePoint(yt(t)?da(t):t)}}_stateAfterAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case d.EQUALS_SIGN:{this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=h.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{this.state=h.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this.state=h.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(_.missingAttributeValue),this.state=h.DATA,this.emitCurrentTagToken();break}default:this.state=h.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.currentAttr.value+=j;break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case d.APOSTROPHE:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.currentAttr.value+=j;break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=h.BEFORE_ATTRIBUTE_NAME;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.currentAttr.value+=j;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:case d.EQUALS_SIGN:case d.GRAVE_ACCENT:{this._err(_.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=h.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this._leaveAttrValue(),this.state=h.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:this._err(_.missingWhitespaceBetweenAttributes),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case d.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:this._err(_.unexpectedSolidusInTag),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.data+=j;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(me.DASH_DASH,!0)?(this._createCommentToken(me.DASH_DASH.length+1),this.state=h.COMMENT_START):this._consumeSequenceIfMatch(me.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(me.DOCTYPE.length+1),this.state=h.DOCTYPE):this._consumeSequenceIfMatch(me.CDATA_START,!0)?this.inForeignNode?this.state=h.CDATA_SECTION:(this._err(_.cdataInHtmlContent),this._createCommentToken(me.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=h.BOGUS_COMMENT):this._ensureHibernation()||(this._err(_.incorrectlyOpenedComment),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_START_DASH;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptClosingOfEmptyComment),this.state=h.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptClosingOfEmptyComment),this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(_.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END_DASH;break}case d.LESS_THAN_SIGN:{a.data+="<",this.state=h.COMMENT_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.data+=j;break}case d.EOF:{this._err(_.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const a=this.currentToken;switch(t){case d.EXCLAMATION_MARK:{a.data+="!",this.state=h.COMMENT_LESS_THAN_SIGN_BANG;break}case d.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===d.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=h.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===d.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=h.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==d.GREATER_THAN_SIGN&&t!==d.EOF&&this._err(_.nestedComment),this.state=h.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case d.EOF:{this._err(_.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(a);break}case d.EXCLAMATION_MARK:{this.state=h.COMMENT_END_BANG;break}case d.HYPHEN_MINUS:{a.data+="-";break}case d.EOF:{this._err(_.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{a.data+="--!",this.state=h.COMMENT_END_DASH;break}case d.GREATER_THAN_SIGN:{this._err(_.incorrectlyClosedComment),this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(_.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=h.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case d.EOF:{this._err(_.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingWhitespaceBeforeDoctypeName),this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(yt(t))this._createDoctypeToken(String.fromCharCode(da(t))),this.state=h.DOCTYPE_NAME;else switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.NULL:{this._err(_.unexpectedNullCharacter),this._createDoctypeToken(j),this.state=h.DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this._err(_.missingDoctypeName),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(_.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=h.DOCTYPE_NAME}}_stateDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.AFTER_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.name+=j;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(yt(t)?da(t):t)}}_stateAfterDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(me.PUBLIC,!1)?this.state=h.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(me.SYSTEM,!1)?this.state=h.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(_.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(_.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(_.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(_.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(_.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.publicId+=j;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.publicId+=j;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.QUOTATION_MARK:{this._err(_.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(_.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.QUOTATION_MARK:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(_.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(_.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(_.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(_.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.systemId+=j;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.systemId+=j;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.NULL:{this._err(_.unexpectedNullCharacter);break}case d.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case d.RIGHT_SQUARE_BRACKET:{this.state=h.CDATA_SECTION_BRACKET;break}case d.EOF:{this._err(_.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===d.RIGHT_SQUARE_BRACKET?this.state=h.CDATA_SECTION_END:(this._emitChars("]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA;break}case d.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(d.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&bs(this.preprocessor.peek(1))?h.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){bs(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===d.SEMICOLON&&this._err(_.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const As=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),Ns=new Set([...As,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),ha=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),A0=new Set([...ha,s.OL,s.UL]),N0=new Set([...ha,s.BUTTON]),Cs=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),Is=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),C0=new Set([s.TR,s.TEMPLATE,s.HTML]),I0=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),S0=new Set([s.TABLE,s.TEMPLATE,s.HTML]),x0=new Set([s.TD,s.TH]);class O0{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,i){this.treeAdapter=a,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=s.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===s.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===N.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,a){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=a,this.currentTagId=a,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,a,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,a){const i=this._indexOf(t);this.items[i]=a,i===this.stackTop&&(this.current=a)}insertAfter(t,a,i){const n=this._indexOf(t)+1;this.items.splice(n,0,a),this.tagIDs.splice(n,0,i),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(t){let a=this.stackTop+1;do a=this.tagIDs.lastIndexOf(t,a-1);while(a>0&&this.treeAdapter.getNamespaceURI(this.items[a])!==N.HTML);this.shortenToLength(a<0?0:a)}shortenToLength(t){for(;this.stackTop>=t;){const a=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(a,this.stackTop<t)}}popUntilElementPopped(t){const a=this._indexOf(t);this.shortenToLength(a<0?0:a)}popUntilPopped(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i<0?0:i)}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ai,N.HTML)}popUntilTableCellPopped(){this.popUntilPopped(x0,N.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===a)return i;return-1}clearBackTo(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(S0,N.HTML)}clearBackToTableBodyContext(){this.clearBackTo(I0,N.HTML)}clearBackToTableRowContext(){this.clearBackTo(C0,N.HTML)}remove(t){const a=this._indexOf(t);a>=0&&(a===this.stackTop?this.pop():(this.items.splice(a,1),this.tagIDs.splice(a,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===s.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const a=this._indexOf(t)-1;return a>=0?this.items[a]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===s.HTML}hasInDynamicScope(t,a){for(let i=this.stackTop;i>=0;i--){const n=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case N.HTML:{if(n===t)return!0;if(a.has(n))return!1;break}case N.SVG:{if(Is.has(n))return!1;break}case N.MATHML:{if(Cs.has(n))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ha)}hasInListItemScope(t){return this.hasInDynamicScope(t,A0)}hasInButtonScope(t){return this.hasInDynamicScope(t,N0)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case N.HTML:{if(Ai.has(a))return!0;if(ha.has(a))return!1;break}case N.SVG:{if(Is.has(a))return!1;break}case N.MATHML:{if(Cs.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===N.HTML)switch(this.tagIDs[a]){case t:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===N.HTML)switch(this.tagIDs[t]){case s.TBODY:case s.THEAD:case s.TFOOT:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasInSelectScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===N.HTML)switch(this.tagIDs[a]){case t:return!0;case s.OPTION:case s.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;As.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Ns.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Ns.has(this.currentTagId);)this.pop()}}const Ni=3;var De;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(De||(De={}));const Ss={type:De.Marker};class D0{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){const i=[],n=a.length,r=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const c=this.entries[o];if(c.type===De.Marker)break;const{element:f}=c;if(this.treeAdapter.getTagName(f)===r&&this.treeAdapter.getNamespaceURI(f)===u){const E=this.treeAdapter.getAttrList(f);E.length===n&&i.push({idx:o,attrs:E})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<Ni)return;const a=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,a);if(i.length<Ni)return;const n=new Map(a.map(u=>[u.name,u.value]));let r=0;for(let u=0;u<i.length;u++){const o=i[u];o.attrs.every(c=>n.get(c.name)===c.value)&&(r+=1,r>=Ni&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Ss)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:De.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:De.Element,element:t,token:a})}removeEntry(t){const a=this.entries.indexOf(t);a>=0&&this.entries.splice(a,1)}clearToLastMarker(){const t=this.entries.indexOf(Ss);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const a=this.entries.find(i=>i.type===De.Marker||this.treeAdapter.getTagName(i.element)===t);return a&&a.type===De.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===De.Element&&a.element===t)}}const Me={createDocument(){return{nodeName:"#document",mode:pe.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,a){return{nodeName:e,tagName:e,attrs:a,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,a){const i=e.childNodes.indexOf(a);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,i){const n=e.childNodes.find(r=>r.nodeName==="#documentType");if(n)n.name=t,n.publicId=a,n.systemId=i;else{const r={nodeName:"#documentType",name:t,publicId:a,systemId:i,parentNode:null};Me.appendChild(e,r)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const a=e.childNodes[e.childNodes.length-1];if(Me.isTextNode(a)){a.value+=t;return}}Me.appendChild(e,Me.createTextNode(t))},insertTextBefore(e,t,a){const i=e.childNodes[e.childNodes.indexOf(a)-1];i&&Me.isTextNode(i)?i.value+=t:Me.insertBefore(e,Me.createTextNode(t),a)},adoptAttributes(e,t){const a=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)a.has(t[i].name)||e.attrs.push(t[i])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},xs="html",L0="about:legacy-compat",R0="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Os=["+//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//"],y0=[...Os,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],M0=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ds=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],P0=[...Ds,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ls(e,t){return t.some(a=>e.startsWith(a))}function k0(e){return e.name===xs&&e.publicId===null&&(e.systemId===null||e.systemId===L0)}function v0(e){if(e.name!==xs)return pe.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===R0)return pe.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),M0.has(a))return pe.QUIRKS;let i=t===null?y0:Os;if(Ls(a,i))return pe.QUIRKS;if(i=t===null?Ds:P0,Ls(a,i))return pe.LIMITED_QUIRKS}return pe.NO_QUIRKS}const Rs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},w0="definitionurl",B0="definitionURL",U0=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),F0=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:N.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:N.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:N.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:N.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:N.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:N.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:N.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:N.XML}],["xml:space",{prefix:"xml",name:"space",namespace:N.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:N.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:N.XMLNS}]]),H0=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Y0=new Set([s.B,s.BIG,s.BLOCKQUOTE,s.BODY,s.BR,s.CENTER,s.CODE,s.DD,s.DIV,s.DL,s.DT,s.EM,s.EMBED,s.H1,s.H2,s.H3,s.H4,s.H5,s.H6,s.HEAD,s.HR,s.I,s.IMG,s.LI,s.LISTING,s.MENU,s.META,s.NOBR,s.OL,s.P,s.PRE,s.RUBY,s.S,s.SMALL,s.SPAN,s.STRONG,s.STRIKE,s.SUB,s.SUP,s.TABLE,s.TT,s.U,s.UL,s.VAR]);function V0(e){const t=e.tagID;return t===s.FONT&&e.attrs.some(({name:i})=>i===Ze.COLOR||i===Ze.SIZE||i===Ze.FACE)||Y0.has(t)}function ys(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===w0){e.attrs[t].name=B0;break}}function Ms(e){for(let t=0;t<e.attrs.length;t++){const a=U0.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function Ci(e){for(let t=0;t<e.attrs.length;t++){const a=F0.get(e.attrs[t].name);a&&(e.attrs[t].prefix=a.prefix,e.attrs[t].name=a.name,e.attrs[t].namespace=a.namespace)}}function q0(e){const t=H0.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=la(e.tagName))}function W0(e,t){return t===N.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function X0(e,t,a){if(t===N.MATHML&&e===s.ANNOTATION_XML){for(let i=0;i<a.length;i++)if(a[i].name===Ze.ENCODING){const n=a[i].value.toLowerCase();return n===Rs.TEXT_HTML||n===Rs.APPLICATION_XML}}return t===N.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function G0(e,t,a,i){return(!i||i===N.HTML)&&X0(e,t,a)||(!i||i===N.MATHML)&&W0(e,t)}const $0="hidden",Q0=8,j0=3;var m;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(m||(m={}));const K0={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ps=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),ks={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Me,onParseError:null};let vs=class{constructor(t,a,i=null,n=null){this.fragmentContext=i,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=m.INITIAL,this.originalInsertionMode=m.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...ks,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=a??this.treeAdapter.createDocument(),this.tokenizer=new _0(this.options,this),this.activeFormattingElements=new D0(this.treeAdapter),this.fragmentContextID=i?la(this.treeAdapter.getTagName(i)):s.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new O0(this.document,this.treeAdapter,this)}static parse(t,a){const i=new this(a);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,a){const i={...ks,...a};t??(t=i.treeAdapter.createElement(b.TEMPLATE,N.HTML,[]));const n=i.treeAdapter.createElement("documentmock",N.HTML,[]),r=new this(i,n,t);return r.fragmentContextID===s.TEMPLATE&&r.tmplInsertionModeStack.unshift(m.IN_TEMPLATE),r._initTokenizerForFragmentParsing(),r._insertFakeRootElement(),r._resetInsertionMode(),r._findFormInFragmentContext(),r}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,a),a}_err(t,a,i){var n;if(!this.onParseError)return;const r=(n=t.location)!==null&&n!==void 0?n:K0,u={code:a,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:i?r.startLine:r.endLine,endCol:i?r.startCol:r.endCol,endOffset:i?r.startOffset:r.endOffset};this.onParseError(u)}onItemPush(t,a,i){var n,r;(r=(n=this.treeAdapter).onItemPush)===null||r===void 0||r.call(n,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var i,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(n=(i=this.treeAdapter).onItemPop)===null||n===void 0||n.call(i,t,this.openElements.current),a){let r,u;this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,u=this.fragmentContextID):{current:r,currentTagId:u}=this.openElements,this._setContextModes(r,u)}}_setContextModes(t,a){const i=t===this.document||this.treeAdapter.getNamespaceURI(t)===N.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,N.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=m.TEXT}switchToPlaintextParsing(){this.insertionMode=m.TEXT,this.originalInsertionMode=m.IN_BODY,this.tokenizer.state=Te.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===b.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==N.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=Te.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=Te.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=Te.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=Te.PLAINTEXT;break}}}_setDocumentType(t){const a=t.name||"",i=t.publicId||"",n=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,i,n),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){const i=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i,t)}}_appendElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,a){const i=this.treeAdapter.createElement(t,N.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,N.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,i),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(b.HTML,N.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,s.HTML)}_appendCommentNode(t,a){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let a,i;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(a,t.chars,i):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;const n=this.treeAdapter.getChildNodes(a),r=i?n.lastIndexOf(i):n.length,u=n[r-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:c,endCol:f,endOffset:E}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:c,endCol:f,endOffset:E})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,a){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(a,i)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){const i=a.location,n=this.treeAdapter.getTagName(t),r=a.type===Y.END_TAG&&n===a.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,r)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let a,i;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,i=this.fragmentContextID):{current:a,currentTagId:i}=this.openElements,t.tagID===s.SVG&&this.treeAdapter.getTagName(a)===b.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===N.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&!this._isIntegrationPoint(i,a,N.HTML)}_processToken(t){switch(t.type){case Y.CHARACTER:{this.onCharacter(t);break}case Y.NULL_CHARACTER:{this.onNullCharacter(t);break}case Y.COMMENT:{this.onComment(t);break}case Y.DOCTYPE:{this.onDoctype(t);break}case Y.START_TAG:{this._processStartTag(t);break}case Y.END_TAG:{this.onEndTag(t);break}case Y.EOF:{this.onEof(t);break}case Y.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,i){const n=this.treeAdapter.getNamespaceURI(a),r=this.treeAdapter.getAttrList(a);return G0(t,n,r,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(n=>n.type===De.Marker||this.openElements.contains(n.element)),i=a<0?t-1:a-1;for(let n=i;n>=0;n--){const r=this.activeFormattingElements.entries[n];this._insertElement(r.token,this.treeAdapter.getNamespaceURI(r.element)),r.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=m.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(s.P),this.openElements.popUntilTagNamePopped(s.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case s.TR:{this.insertionMode=m.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=m.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=m.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=m.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=m.IN_TABLE;return}case s.BODY:{this.insertionMode=m.IN_BODY;return}case s.FRAMESET:{this.insertionMode=m.IN_FRAMESET;return}case s.SELECT:{this._resetInsertionModeForSelect(t);return}case s.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case s.HTML:{this.insertionMode=this.headElement?m.AFTER_HEAD:m.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=m.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=m.IN_HEAD;return}break}}this.insertionMode=m.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){const i=this.openElements.tagIDs[a];if(i===s.TEMPLATE)break;if(i===s.TABLE){this.insertionMode=m.IN_SELECT_IN_TABLE;return}}this.insertionMode=m.IN_SELECT}_isElementCausesFosterParenting(t){return Ps.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const a=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case s.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(a)===N.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case s.TABLE:{const i=this.treeAdapter.getParentNode(a);return i?{parent:i,beforeElement:a}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const a=this._findFosterParentingLocation();a.beforeElement?this.treeAdapter.insertBefore(a.parent,t,a.beforeElement):this.treeAdapter.appendChild(a.parent,t)}_isSpecialElement(t,a){const i=this.treeAdapter.getNamespaceURI(t);return E0[i].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){xh(this,t);return}switch(this.insertionMode){case m.INITIAL:{Mt(this,t);break}case m.BEFORE_HTML:{Pt(this,t);break}case m.BEFORE_HEAD:{kt(this,t);break}case m.IN_HEAD:{vt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case m.AFTER_HEAD:{Bt(this,t);break}case m.IN_BODY:case m.IN_CAPTION:case m.IN_CELL:case m.IN_TEMPLATE:{Bs(this,t);break}case m.TEXT:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{Oi(this,t);break}case m.IN_TABLE_TEXT:{Xs(this,t);break}case m.IN_COLUMN_GROUP:{ma(this,t);break}case m.AFTER_BODY:{ba(this,t);break}case m.AFTER_AFTER_BODY:{ga(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Sh(this,t);return}switch(this.insertionMode){case m.INITIAL:{Mt(this,t);break}case m.BEFORE_HTML:{Pt(this,t);break}case m.BEFORE_HEAD:{kt(this,t);break}case m.IN_HEAD:{vt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case m.AFTER_HEAD:{Bt(this,t);break}case m.TEXT:{this._insertCharacters(t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{Oi(this,t);break}case m.IN_COLUMN_GROUP:{ma(this,t);break}case m.AFTER_BODY:{ba(this,t);break}case m.AFTER_AFTER_BODY:{ga(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Si(this,t);return}switch(this.insertionMode){case m.INITIAL:case m.BEFORE_HTML:case m.BEFORE_HEAD:case m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:case m.IN_BODY:case m.IN_TABLE:case m.IN_CAPTION:case m.IN_COLUMN_GROUP:case m.IN_TABLE_BODY:case m.IN_ROW:case m.IN_CELL:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:case m.IN_TEMPLATE:case m.IN_FRAMESET:case m.AFTER_FRAMESET:{Si(this,t);break}case m.IN_TABLE_TEXT:{Ht(this,t);break}case m.AFTER_BODY:{id(this,t);break}case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{nd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case m.INITIAL:{sd(this,t);break}case m.BEFORE_HEAD:case m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:{this._err(t,_.misplacedDoctype);break}case m.IN_TABLE_TEXT:{Ht(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,_.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Oh(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case m.INITIAL:{Mt(this,t);break}case m.BEFORE_HTML:{rd(this,t);break}case m.BEFORE_HEAD:{od(this,t);break}case m.IN_HEAD:{Ie(this,t);break}case m.IN_HEAD_NO_SCRIPT:{dd(this,t);break}case m.AFTER_HEAD:{fd(this,t);break}case m.IN_BODY:{ce(this,t);break}case m.IN_TABLE:{dt(this,t);break}case m.IN_TABLE_TEXT:{Ht(this,t);break}case m.IN_CAPTION:{ch(this,t);break}case m.IN_COLUMN_GROUP:{Di(this,t);break}case m.IN_TABLE_BODY:{Ta(this,t);break}case m.IN_ROW:{pa(this,t);break}case m.IN_CELL:{hh(this,t);break}case m.IN_SELECT:{Qs(this,t);break}case m.IN_SELECT_IN_TABLE:{Eh(this,t);break}case m.IN_TEMPLATE:{Th(this,t);break}case m.AFTER_BODY:{bh(this,t);break}case m.IN_FRAMESET:{gh(this,t);break}case m.AFTER_FRAMESET:{Ah(this,t);break}case m.AFTER_AFTER_BODY:{Ch(this,t);break}case m.AFTER_AFTER_FRAMESET:{Ih(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Dh(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case m.INITIAL:{Mt(this,t);break}case m.BEFORE_HTML:{ud(this,t);break}case m.BEFORE_HEAD:{cd(this,t);break}case m.IN_HEAD:{ld(this,t);break}case m.IN_HEAD_NO_SCRIPT:{hd(this,t);break}case m.AFTER_HEAD:{Ed(this,t);break}case m.IN_BODY:{Ea(this,t);break}case m.TEXT:{Jd(this,t);break}case m.IN_TABLE:{Ut(this,t);break}case m.IN_TABLE_TEXT:{Ht(this,t);break}case m.IN_CAPTION:{lh(this,t);break}case m.IN_COLUMN_GROUP:{dh(this,t);break}case m.IN_TABLE_BODY:{Li(this,t);break}case m.IN_ROW:{$s(this,t);break}case m.IN_CELL:{fh(this,t);break}case m.IN_SELECT:{js(this,t);break}case m.IN_SELECT_IN_TABLE:{mh(this,t);break}case m.IN_TEMPLATE:{ph(this,t);break}case m.AFTER_BODY:{zs(this,t);break}case m.IN_FRAMESET:{_h(this,t);break}case m.AFTER_FRAMESET:{Nh(this,t);break}case m.AFTER_AFTER_BODY:{ga(this,t);break}}}onEof(t){switch(this.insertionMode){case m.INITIAL:{Mt(this,t);break}case m.BEFORE_HTML:{Pt(this,t);break}case m.BEFORE_HEAD:{kt(this,t);break}case m.IN_HEAD:{vt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case m.AFTER_HEAD:{Bt(this,t);break}case m.IN_BODY:case m.IN_TABLE:case m.IN_CAPTION:case m.IN_COLUMN_GROUP:case m.IN_TABLE_BODY:case m.IN_ROW:case m.IN_CELL:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:{qs(this,t);break}case m.TEXT:{eh(this,t);break}case m.IN_TABLE_TEXT:{Ht(this,t);break}case m.IN_TEMPLATE:{Ks(this,t);break}case m.AFTER_BODY:case m.IN_FRAMESET:case m.AFTER_FRAMESET:case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{xi(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===d.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:case m.TEXT:case m.IN_COLUMN_GROUP:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:case m.IN_FRAMESET:case m.AFTER_FRAMESET:{this._insertCharacters(t);break}case m.IN_BODY:case m.IN_CAPTION:case m.IN_CELL:case m.IN_TEMPLATE:case m.AFTER_BODY:case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{ws(this,t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{Oi(this,t);break}case m.IN_TABLE_TEXT:{Ws(this,t);break}}}};function z0(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return a?e.openElements.contains(a.element)?e.openElements.hasInScope(t.tagID)||(a=null):(e.activeFormattingElements.removeEntry(a),a=null):Vs(e,t),a}function Z0(e,t){let a=null,i=e.openElements.stackTop;for(;i>=0;i--){const n=e.openElements.items[i];if(n===t.element)break;e._isSpecialElement(n,e.openElements.tagIDs[i])&&(a=n)}return a||(e.openElements.shortenToLength(i<0?0:i),e.activeFormattingElements.removeEntry(t)),a}function J0(e,t,a){let i=t,n=e.openElements.getCommonAncestor(t);for(let r=0,u=n;u!==a;r++,u=n){n=e.openElements.getCommonAncestor(u);const o=e.activeFormattingElements.getElementEntry(u),c=o&&r>=j0;!o||c?(c&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(u)):(u=ed(e,o),i===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(u,i),i=u)}return i}function ed(e,t){const a=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function td(e,t,a){const i=e.treeAdapter.getTagName(t),n=la(i);if(e._isElementCausesFosterParenting(n))e._fosterParentElement(a);else{const r=e.treeAdapter.getNamespaceURI(t);n===s.TEMPLATE&&r===N.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function ad(e,t,a){const i=e.treeAdapter.getNamespaceURI(a.element),{token:n}=a,r=e.treeAdapter.createElement(n.tagName,i,n.attrs);e._adoptNodes(t,r),e.treeAdapter.appendChild(t,r),e.activeFormattingElements.insertElementAfterBookmark(r,n),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,r,n.tagID)}function Ii(e,t){for(let a=0;a<Q0;a++){const i=z0(e,t);if(!i)break;const n=Z0(e,i);if(!n)break;e.activeFormattingElements.bookmark=i;const r=J0(e,n,i.element),u=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(r),u&&td(e,u,r),ad(e,n,i)}}function Si(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function id(e,t){e._appendCommentNode(t,e.openElements.items[0])}function nd(e,t){e._appendCommentNode(t,e.document)}function xi(e,t){if(e.stopped=!0,t.location){const a=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=a;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(i);if(n&&!n.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const r=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(r);u&&!u.endTag&&e._setEndLocation(r,t)}}}}function sd(e,t){e._setDocumentType(t);const a=t.forceQuirks?pe.QUIRKS:v0(t);k0(t)||e._err(t,_.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=m.BEFORE_HTML}function Mt(e,t){e._err(t,_.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,pe.QUIRKS),e.insertionMode=m.BEFORE_HTML,e._processToken(t)}function rd(e,t){t.tagID===s.HTML?(e._insertElement(t,N.HTML),e.insertionMode=m.BEFORE_HEAD):Pt(e,t)}function ud(e,t){const a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&Pt(e,t)}function Pt(e,t){e._insertFakeRootElement(),e.insertionMode=m.BEFORE_HEAD,e._processToken(t)}function od(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.HEAD:{e._insertElement(t,N.HTML),e.headElement=e.openElements.current,e.insertionMode=m.IN_HEAD;break}default:kt(e,t)}}function cd(e,t){const a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?kt(e,t):e._err(t,_.endTagWithoutMatchingOpenElement)}function kt(e,t){e._insertFakeElement(b.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=m.IN_HEAD,e._processToken(t)}function Ie(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break}case s.TITLE:{e._switchToTextParsing(t,Te.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Te.RAWTEXT):(e._insertElement(t,N.HTML),e.insertionMode=m.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,Te.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,Te.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=m.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(m.IN_TEMPLATE);break}case s.HEAD:{e._err(t,_.misplacedStartTagForHeadElement);break}default:vt(e,t)}}function ld(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=m.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{vt(e,t);break}case s.TEMPLATE:{Je(e,t);break}default:e._err(t,_.endTagWithoutMatchingOpenElement)}}function Je(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==s.TEMPLATE&&e._err(t,_.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,_.endTagWithoutMatchingOpenElement)}function vt(e,t){e.openElements.pop(),e.insertionMode=m.AFTER_HEAD,e._processToken(t)}function dd(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{Ie(e,t);break}case s.NOSCRIPT:{e._err(t,_.nestedNoscriptInHead);break}default:wt(e,t)}}function hd(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=m.IN_HEAD;break}case s.BR:{wt(e,t);break}default:e._err(t,_.endTagWithoutMatchingOpenElement)}}function wt(e,t){const a=t.type===Y.EOF?_.openElementsLeftAfterEof:_.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=m.IN_HEAD,e._processToken(t)}function fd(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.BODY:{e._insertElement(t,N.HTML),e.framesetOk=!1,e.insertionMode=m.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,N.HTML),e.insertionMode=m.IN_FRAMESET;break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{e._err(t,_.abandonedHeadElementChild),e.openElements.push(e.headElement,s.HEAD),Ie(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,_.misplacedStartTagForHeadElement);break}default:Bt(e,t)}}function Ed(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{Bt(e,t);break}case s.TEMPLATE:{Je(e,t);break}default:e._err(t,_.endTagWithoutMatchingOpenElement)}}function Bt(e,t){e._insertFakeElement(b.BODY,s.BODY),e.insertionMode=m.IN_BODY,fa(e,t)}function fa(e,t){switch(t.type){case Y.CHARACTER:{Bs(e,t);break}case Y.WHITESPACE_CHARACTER:{ws(e,t);break}case Y.COMMENT:{Si(e,t);break}case Y.START_TAG:{ce(e,t);break}case Y.END_TAG:{Ea(e,t);break}case Y.EOF:{qs(e,t);break}}}function ws(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Bs(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function md(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Td(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function pd(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,N.HTML),e.insertionMode=m.IN_FRAMESET)}function bd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML)}function gd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),Ai.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,N.HTML)}function _d(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ad(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),a||(e.formElement=e.openElements.current))}function Nd(e,t){e.framesetOk=!1;const a=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const n=e.openElements.tagIDs[i];if(a===s.LI&&n===s.LI||(a===s.DD||a===s.DT)&&(n===s.DD||n===s.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==s.ADDRESS&&n!==s.DIV&&n!==s.P&&e._isSpecialElement(e.openElements.items[i],n))break}e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML)}function Cd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.tokenizer.state=Te.PLAINTEXT}function Id(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.framesetOk=!1}function Sd(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(b.A);a&&(Ii(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Od(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(Ii(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Dd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Ld(e,t){e.treeAdapter.getDocumentMode(e.document)!==pe.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.framesetOk=!1,e.insertionMode=m.IN_TABLE}function Us(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,N.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Fs(e){const t=ps(e,Ze.TYPE);return t!=null&&t.toLowerCase()===$0}function Rd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,N.HTML),Fs(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yd(e,t){e._appendElement(t,N.HTML),t.ackSelfClosing=!0}function Md(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,N.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Pd(e,t){t.tagName=b.IMG,t.tagID=s.IMG,Us(e,t)}function kd(e,t){e._insertElement(t,N.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Te.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=m.TEXT}function vd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Te.RAWTEXT)}function wd(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Te.RAWTEXT)}function Hs(e,t){e._switchToTextParsing(t,Te.RAWTEXT)}function Bd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===m.IN_TABLE||e.insertionMode===m.IN_CAPTION||e.insertionMode===m.IN_TABLE_BODY||e.insertionMode===m.IN_ROW||e.insertionMode===m.IN_CELL?m.IN_SELECT_IN_TABLE:m.IN_SELECT}function Ud(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML)}function Fd(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,N.HTML)}function Hd(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,N.HTML)}function Yd(e,t){e._reconstructActiveFormattingElements(),ys(t),Ci(t),t.selfClosing?e._appendElement(t,N.MATHML):e._insertElement(t,N.MATHML),t.ackSelfClosing=!0}function Vd(e,t){e._reconstructActiveFormattingElements(),Ms(t),Ci(t),t.selfClosing?e._appendElement(t,N.SVG):e._insertElement(t,N.SVG),t.ackSelfClosing=!0}function Ys(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML)}function ce(e,t){switch(t.tagID){case s.I:case s.S:case s.B:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.SMALL:case s.STRIKE:case s.STRONG:{xd(e,t);break}case s.A:{Sd(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{gd(e,t);break}case s.P:case s.DL:case s.OL:case s.UL:case s.DIV:case s.DIR:case s.NAV:case s.MAIN:case s.MENU:case s.ASIDE:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.DETAILS:case s.ADDRESS:case s.ARTICLE:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{bd(e,t);break}case s.LI:case s.DD:case s.DT:{Nd(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{Us(e,t);break}case s.HR:{Md(e,t);break}case s.RB:case s.RTC:{Fd(e,t);break}case s.RT:case s.RP:{Hd(e,t);break}case s.PRE:case s.LISTING:{_d(e,t);break}case s.XMP:{vd(e,t);break}case s.SVG:{Vd(e,t);break}case s.HTML:{md(e,t);break}case s.BASE:case s.LINK:case s.META:case s.STYLE:case s.TITLE:case s.SCRIPT:case s.BGSOUND:case s.BASEFONT:case s.TEMPLATE:{Ie(e,t);break}case s.BODY:{Td(e,t);break}case s.FORM:{Ad(e,t);break}case s.NOBR:{Od(e,t);break}case s.MATH:{Yd(e,t);break}case s.TABLE:{Ld(e,t);break}case s.INPUT:{Rd(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{yd(e,t);break}case s.IMAGE:{Pd(e,t);break}case s.BUTTON:{Id(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{Dd(e,t);break}case s.IFRAME:{wd(e,t);break}case s.SELECT:{Bd(e,t);break}case s.OPTION:case s.OPTGROUP:{Ud(e,t);break}case s.NOEMBED:case s.NOFRAMES:{Hs(e,t);break}case s.FRAMESET:{pd(e,t);break}case s.TEXTAREA:{kd(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?Hs(e,t):Ys(e,t);break}case s.PLAINTEXT:{Cd(e,t);break}case s.COL:case s.TH:case s.TD:case s.TR:case s.HEAD:case s.FRAME:case s.TBODY:case s.TFOOT:case s.THEAD:case s.CAPTION:case s.COLGROUP:break;default:Ys(e,t)}}function qd(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=m.AFTER_BODY,e.options.sourceCodeLocationInfo)){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function Wd(e,t){e.openElements.hasInScope(s.BODY)&&(e.insertionMode=m.AFTER_BODY,zs(e,t))}function Xd(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function Gd(e){const t=e.openElements.tmplCount>0,{formElement:a}=e;t||(e.formElement=null),(a||t)&&e.openElements.hasInScope(s.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(s.FORM):a&&e.openElements.remove(a))}function $d(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(b.P,s.P),e._closePElement()}function Qd(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function jd(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function Kd(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zd(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function Zd(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(b.BR,s.BR),e.openElements.pop(),e.framesetOk=!1}function Vs(e,t){const a=t.tagName,i=t.tagID;for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n],u=e.openElements.tagIDs[n];if(i===u&&(i!==s.UNKNOWN||e.treeAdapter.getTagName(r)===a)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=n&&e.openElements.shortenToLength(n);break}if(e._isSpecialElement(r,u))break}}function Ea(e,t){switch(t.tagID){case s.A:case s.B:case s.I:case s.S:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.NOBR:case s.SMALL:case s.STRIKE:case s.STRONG:{Ii(e,t);break}case s.P:{$d(e);break}case s.DL:case s.UL:case s.OL:case s.DIR:case s.DIV:case s.NAV:case s.PRE:case s.MAIN:case s.MENU:case s.ASIDE:case s.BUTTON:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.ADDRESS:case s.ARTICLE:case s.DETAILS:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.LISTING:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{Xd(e,t);break}case s.LI:{Qd(e);break}case s.DD:case s.DT:{jd(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{Kd(e);break}case s.BR:{Zd(e);break}case s.BODY:{qd(e,t);break}case s.HTML:{Wd(e,t);break}case s.FORM:{Gd(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{zd(e,t);break}case s.TEMPLATE:{Je(e,t);break}default:Vs(e,t)}}function qs(e,t){e.tmplInsertionModeStack.length>0?Ks(e,t):xi(e,t)}function Jd(e,t){var a;t.tagID===s.SCRIPT&&((a=e.scriptHandler)===null||a===void 0||a.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function eh(e,t){e._err(t,_.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Oi(e,t){if(Ps.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=m.IN_TABLE_TEXT,t.type){case Y.CHARACTER:{Xs(e,t);break}case Y.WHITESPACE_CHARACTER:{Ws(e,t);break}}else Ft(e,t)}function th(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,N.HTML),e.insertionMode=m.IN_CAPTION}function ah(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,N.HTML),e.insertionMode=m.IN_COLUMN_GROUP}function ih(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.COLGROUP,s.COLGROUP),e.insertionMode=m.IN_COLUMN_GROUP,Di(e,t)}function nh(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,N.HTML),e.insertionMode=m.IN_TABLE_BODY}function sh(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.TBODY,s.TBODY),e.insertionMode=m.IN_TABLE_BODY,Ta(e,t)}function rh(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function uh(e,t){Fs(t)?e._appendElement(t,N.HTML):Ft(e,t),t.ackSelfClosing=!0}function oh(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,N.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function dt(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{sh(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{Ie(e,t);break}case s.COL:{ih(e,t);break}case s.FORM:{oh(e,t);break}case s.TABLE:{rh(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{nh(e,t);break}case s.INPUT:{uh(e,t);break}case s.CAPTION:{th(e,t);break}case s.COLGROUP:{ah(e,t);break}default:Ft(e,t)}}function Ut(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{Je(e,t);break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:Ft(e,t)}}function Ft(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,fa(e,t),e.fosterParentingEnabled=a}function Ws(e,t){e.pendingCharacterTokens.push(t)}function Xs(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ht(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)Ft(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Gs=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function ch(e,t){const a=t.tagID;Gs.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=m.IN_TABLE,dt(e,t)):ce(e,t)}function lh(e,t){const a=t.tagID;switch(a){case s.CAPTION:case s.TABLE:{e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=m.IN_TABLE,a===s.TABLE&&Ut(e,t));break}case s.BODY:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:Ea(e,t)}}function Di(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.COL:{e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break}case s.TEMPLATE:{Ie(e,t);break}default:ma(e,t)}}function dh(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=m.IN_TABLE);break}case s.TEMPLATE:{Je(e,t);break}case s.COL:break;default:ma(e,t)}}function ma(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=m.IN_TABLE,e._processToken(t))}function Ta(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,N.HTML),e.insertionMode=m.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(b.TR,s.TR),e.insertionMode=m.IN_ROW,pa(e,t);break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE,dt(e,t));break}default:dt(e,t)}}function Li(e,t){const a=t.tagID;switch(t.tagID){case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasInTableScope(a)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE,Ut(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:case s.TR:break;default:Ut(e,t)}}function pa(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,N.HTML),e.insertionMode=m.IN_CELL,e.activeFormattingElements.insertMarker();break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY,Ta(e,t));break}default:dt(e,t)}}function $s(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY,Li(e,t));break}case s.TBODY:case s.TFOOT:case s.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(s.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY,Li(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:break;default:Ut(e,t)}}function hh(e,t){const a=t.tagID;Gs.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),pa(e,t)):ce(e,t)}function fh(e,t){const a=t.tagID;switch(a){case s.TD:case s.TH:{e.openElements.hasInTableScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=m.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),$s(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:Ea(e,t)}}function Qs(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,N.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,N.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break}case s.INPUT:case s.KEYGEN:case s.TEXTAREA:case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),t.tagID!==s.SELECT&&e._processStartTag(t));break}case s.SCRIPT:case s.TEMPLATE:{Ie(e,t);break}}}function js(e,t){switch(t.tagID){case s.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===s.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===s.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop();break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop();break}case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode());break}case s.TEMPLATE:{Je(e,t);break}}}function Eh(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Qs(e,t)}function mh(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?e.openElements.hasInTableScope(a)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e.onEndTag(t)):js(e,t)}function Th(e,t){switch(t.tagID){case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{Ie(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=m.IN_TABLE,e.insertionMode=m.IN_TABLE,dt(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=m.IN_COLUMN_GROUP,e.insertionMode=m.IN_COLUMN_GROUP,Di(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=m.IN_TABLE_BODY,e.insertionMode=m.IN_TABLE_BODY,Ta(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=m.IN_ROW,e.insertionMode=m.IN_ROW,pa(e,t);break}default:e.tmplInsertionModeStack[0]=m.IN_BODY,e.insertionMode=m.IN_BODY,ce(e,t)}}function ph(e,t){t.tagID===s.TEMPLATE&&Je(e,t)}function Ks(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):xi(e,t)}function bh(e,t){t.tagID===s.HTML?ce(e,t):ba(e,t)}function zs(e,t){var a;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=m.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===s.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(i))===null||a===void 0)&&a.endTag)&&e._setEndLocation(i,t)}}else ba(e,t)}function ba(e,t){e.insertionMode=m.IN_BODY,fa(e,t)}function gh(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.FRAMESET:{e._insertElement(t,N.HTML);break}case s.FRAME:{e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break}case s.NOFRAMES:{Ie(e,t);break}}}function _h(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=m.AFTER_FRAMESET))}function Ah(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.NOFRAMES:{Ie(e,t);break}}}function Nh(e,t){t.tagID===s.HTML&&(e.insertionMode=m.AFTER_AFTER_FRAMESET)}function Ch(e,t){t.tagID===s.HTML?ce(e,t):ga(e,t)}function ga(e,t){e.insertionMode=m.IN_BODY,fa(e,t)}function Ih(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.NOFRAMES:{Ie(e,t);break}}}function Sh(e,t){t.chars=j,e._insertCharacters(t)}function xh(e,t){e._insertCharacters(t),e.framesetOk=!1}function Zs(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==N.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Oh(e,t){if(V0(t))Zs(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(a);i===N.MATHML?ys(t):i===N.SVG&&(q0(t),Ms(t)),Ci(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function Dh(e,t){if(t.tagID===s.P||t.tagID===s.BR){Zs(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(i)===N.HTML){e._endTagOutsideForeignContent(t);break}const n=e.treeAdapter.getTagName(i);if(n.toLowerCase()===t.tagName){t.tagName=n,e.openElements.shortenToLength(a);break}}}const Lh=new Set([b.AREA,b.BASE,b.BASEFONT,b.BGSOUND,b.BR,b.COL,b.EMBED,b.FRAME,b.HR,b.IMG,b.INPUT,b.KEYGEN,b.LINK,b.META,b.PARAM,b.SOURCE,b.TRACK,b.WBR]);function Rh(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===N.HTML&&Lh.has(t.treeAdapter.getTagName(e))}const yh={treeAdapter:Me,scriptingEnabled:!0};function Mh(e,t){const a={...yh,...t};return Js(e,a)}function Ph(e,t){let a="";const i=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===b.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===N.HTML?t.treeAdapter.getTemplateContent(e):e,n=t.treeAdapter.getChildNodes(i);if(n)for(const r of n)a+=Js(r,t);return a}function Js(e,t){return t.treeAdapter.isElementNode(e)?kh(e,t):t.treeAdapter.isTextNode(e)?wh(e,t):t.treeAdapter.isCommentNode(e)?Bh(e,t):t.treeAdapter.isDocumentTypeNode(e)?Uh(e,t):""}function kh(e,t){const a=t.treeAdapter.getTagName(e);return`<${a}${vh(e,t)}>${Rh(e,t)?"":`${Ph(e,t)}</${a}>`}`}function vh(e,{treeAdapter:t}){let a="";for(const i of t.getAttrList(e)){if(a+=" ",i.namespace)switch(i.namespace){case N.XML:{a+=`xml:${i.name}`;break}case N.XMLNS:{i.name!=="xmlns"&&(a+="xmlns:"),a+=i.name;break}case N.XLINK:{a+=`xlink:${i.name}`;break}default:a+=`${i.prefix}:${i.name}`}else a+=i.name;a+=`="${_n(i.value)}"`}return a}function wh(e,t){const{treeAdapter:a}=t,i=a.getTextNodeContent(e),n=a.getParentNode(e),r=n&&a.isElementNode(n)&&a.getTagName(n);return r&&a.getNamespaceURI(n)===N.HTML&&T0(r,t.scriptingEnabled)?i:An(i)}function Bh(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function Uh(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function Fh(e,t){return vs.parse(e,t)}function Hh(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);const i=vs.getFragmentParser(e,a);return i.tokenizer.write(t,!0),i.getFragment()}function er(e){const t=e.includes('"')?"'":'"';return t+e+t}function Yh(e,t,a){let i="!DOCTYPE ";return e&&(i+=e),t?i+=` PUBLIC ${er(t)}`:a&&(i+=" SYSTEM"),a&&(i+=` ${er(a)}`),i}const qe={isCommentNode:$t,isElementNode:k,isTextNode:Oe,createDocument(){const e=new $e([]);return e["x-mode"]=pe.NO_QUIRKS,e},createDocumentFragment(){return new $e([])},createElement(e,t,a){const i=Object.create(null),n=Object.create(null),r=Object.create(null);for(let o=0;o<a.length;o++){const c=a[o].name;i[c]=a[o].value,n[c]=a[o].namespace,r[c]=a[o].prefix}const u=new Va(e,i,[]);return u.namespace=t,u["x-attribsNamespace"]=n,u["x-attribsPrefix"]=r,u},createCommentNode(e){return new Fa(e)},createTextNode(e){return new At(e)},appendChild(e,t){const a=e.children[e.children.length-1];a&&(a.next=t,t.prev=a),e.children.push(t),t.parent=e},insertBefore(e,t,a){const i=e.children.indexOf(a),{prev:n}=a;n&&(n.next=t,t.prev=n),a.prev=t,t.next=a,e.children.splice(i,0,t),t.parent=e},setTemplateContent(e,t){qe.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,a,i){const n=Yh(t,a,i);let r=e.children.find(u=>qa(u)&&u.name==="!doctype");r?r.data=n??null:(r=new Ha("!doctype",n),qe.appendChild(e,r)),r["x-name"]=t,r["x-publicId"]=a,r["x-systemId"]=i},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:a,next:i}=e;e.prev=null,e.next=null,a&&(a.next=i),i&&(i.prev=a),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const a=e.children[e.children.length-1];a&&Oe(a)?a.data+=t:qe.appendChild(e,qe.createTextNode(t))},insertTextBefore(e,t,a){const i=e.children[e.children.indexOf(a)-1];i&&Oe(i)?i.data+=t:qe.insertBefore(e,qe.createTextNode(t),a)},adoptAttributes(e,t){for(let a=0;a<t.length;a++){const i=t[a].name;e.attribs[i]===void 0&&(e.attribs[i]=t[a].value,e["x-attribsNamespace"][i]=t[a].namespace,e["x-attribsPrefix"][i]=t[a].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return qa(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function Vh(e,t,a,i){var n;return(n=t.treeAdapter)!==null&&n!==void 0||(t.treeAdapter=qe),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),a?Fh(e,t):Hh(i,e,t)}const qh={treeAdapter:qe};function Wh(e){const t="length"in e?e:[e];for(let i=0;i<t.length;i+=1){const n=t[i];Ue(n)&&Array.prototype.splice.call(t,i,1,...n.children)}let a="";for(let i=0;i<t.length;i+=1){const n=t[i];a+=Mh(n,qh)}return a}var y;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(y||(y={}));var I;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(I||(I={}));function Pe(e){return e===y.Space||e===y.NewLine||e===y.Tab||e===y.FormFeed||e===y.CarriageReturn}function _a(e){return e===y.Slash||e===y.Gt||Pe(e)}function Xh(e){return e>=y.LowerA&&e<=y.LowerZ||e>=y.UpperA&&e<=y.UpperZ}var Le;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Le||(Le={}));const oe={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]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class Gh{constructor({xmlMode:t=!1,decodeEntities:a=!0},i){this.cbs=i,this.state=I.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=I.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=a,this.entityDecoder=new ja(t?mn:Xa,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=I.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=I.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===y.Lt||!this.decodeEntities&&this.fastForwardTo(y.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=I.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===y.Amp&&this.startEntity()}stateSpecialStartSequence(t){const a=this.sequenceIndex===this.currentSequence.length;if(!(a?_a(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!a){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=I.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===y.Gt||Pe(t)){const a=this.index-this.currentSequence.length;if(this.sectionStart<a){const i=this.index;this.index=a,this.cbs.ontext(this.sectionStart,a),this.index=i}this.isSpecial=!1,this.sectionStart=a+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===oe.TitleEnd?this.decodeEntities&&t===y.Amp&&this.startEntity():this.fastForwardTo(y.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===y.Lt)}stateCDATASequence(t){t===oe.Cdata[this.sequenceIndex]?++this.sequenceIndex===oe.Cdata.length&&(this.state=I.InCommentLike,this.currentSequence=oe.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=I.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===oe.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=I.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!_a(t):Xh(t)}startSpecial(t,a){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=a,this.state=I.SpecialStartSequence}stateBeforeTagName(t){if(t===y.ExclamationMark)this.state=I.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===y.Questionmark)this.state=I.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const a=t|32;this.sectionStart=this.index,this.xmlMode?this.state=I.InTagName:a===oe.ScriptEnd[2]?this.state=I.BeforeSpecialS:a===oe.TitleEnd[2]?this.state=I.BeforeSpecialT:this.state=I.InTagName}else t===y.Slash?this.state=I.BeforeClosingTagName:(this.state=I.Text,this.stateText(t))}stateInTagName(t){_a(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){Pe(t)||(t===y.Gt?this.state=I.Text:(this.state=this.isTagStartChar(t)?I.InClosingTagName:I.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===y.Gt||Pe(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=I.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.state=I.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===y.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=I.InSpecialTag,this.sequenceIndex=0):this.state=I.Text,this.sectionStart=this.index+1):t===y.Slash?this.state=I.InSelfClosingTag:Pe(t)||(this.state=I.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===y.Gt?(this.cbs.onselfclosingtag(this.index),this.state=I.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Pe(t)||(this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===y.Eq||_a(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=I.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===y.Eq?this.state=I.BeforeAttributeValue:t===y.Slash||t===y.Gt?(this.cbs.onattribend(Le.NoValue,this.sectionStart),this.sectionStart=-1,this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t)):Pe(t)||(this.cbs.onattribend(Le.NoValue,this.sectionStart),this.state=I.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===y.DoubleQuote?(this.state=I.InAttributeValueDq,this.sectionStart=this.index+1):t===y.SingleQuote?(this.state=I.InAttributeValueSq,this.sectionStart=this.index+1):Pe(t)||(this.sectionStart=this.index,this.state=I.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,a){t===a||!this.decodeEntities&&this.fastForwardTo(a)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a===y.DoubleQuote?Le.Double:Le.Single,this.index+1),this.state=I.BeforeAttributeName):this.decodeEntities&&t===y.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,y.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,y.SingleQuote)}stateInAttributeValueNoQuotes(t){Pe(t)||t===y.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Le.Unquoted,this.index),this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===y.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===y.OpeningSquareBracket?(this.state=I.CDATASequence,this.sequenceIndex=0):this.state=t===y.Dash?I.BeforeComment:I.InDeclaration}stateInDeclaration(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=I.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=I.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===y.Dash?(this.state=I.InCommentLike,this.currentSequence=oe.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=I.InDeclaration}stateInSpecialComment(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=I.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const a=t|32;a===oe.ScriptEnd[3]?this.startSpecial(oe.ScriptEnd,4):a===oe.StyleEnd[3]?this.startSpecial(oe.StyleEnd,4):(this.state=I.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const a=t|32;a===oe.TitleEnd[3]?this.startSpecial(oe.TitleEnd,4):a===oe.TextareaEnd[3]?this.startSpecial(oe.TextareaEnd,4):(this.state=I.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=I.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?ge.Strict:this.baseState===I.Text||this.baseState===I.InSpecialTag?ge.Legacy:ge.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===I.Text||this.state===I.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===I.InAttributeValueDq||this.state===I.InAttributeValueSq||this.state===I.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case I.Text:{this.stateText(t);break}case I.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case I.InSpecialTag:{this.stateInSpecialTag(t);break}case I.CDATASequence:{this.stateCDATASequence(t);break}case I.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case I.InAttributeName:{this.stateInAttributeName(t);break}case I.InCommentLike:{this.stateInCommentLike(t);break}case I.InSpecialComment:{this.stateInSpecialComment(t);break}case I.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case I.InTagName:{this.stateInTagName(t);break}case I.InClosingTagName:{this.stateInClosingTagName(t);break}case I.BeforeTagName:{this.stateBeforeTagName(t);break}case I.AfterAttributeName:{this.stateAfterAttributeName(t);break}case I.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case I.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case I.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case I.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case I.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case I.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case I.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case I.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case I.InDeclaration:{this.stateInDeclaration(t);break}case I.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case I.BeforeComment:{this.stateBeforeComment(t);break}case I.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case I.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===I.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===I.InCommentLike?this.currentSequence===oe.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===I.InTagName||this.state===I.BeforeAttributeName||this.state===I.BeforeAttributeValue||this.state===I.AfterAttributeName||this.state===I.InAttributeName||this.state===I.InAttributeValueSq||this.state===I.InAttributeValueDq||this.state===I.InAttributeValueNq||this.state===I.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,a){this.baseState!==I.Text&&this.baseState!==I.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const ht=new Set(["input","option","optgroup","select","button","datalist","textarea"]),X=new Set(["p"]),tr=new Set(["thead","tbody"]),ar=new Set(["dd","dt"]),ir=new Set(["rt","rp"]),$h=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",X],["h1",X],["h2",X],["h3",X],["h4",X],["h5",X],["h6",X],["select",ht],["input",ht],["output",ht],["button",ht],["datalist",ht],["textarea",ht],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",ar],["dt",ar],["address",X],["article",X],["aside",X],["blockquote",X],["details",X],["div",X],["dl",X],["fieldset",X],["figcaption",X],["figure",X],["footer",X],["form",X],["header",X],["hr",X],["main",X],["nav",X],["ol",X],["pre",X],["section",X],["table",X],["ul",X],["rt",ir],["rp",ir],["tbody",tr],["tfoot",tr]]),Qh=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),nr=new Set(["math","svg"]),sr=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),jh=/\s|\//;class Kh{constructor(t,a={}){var i,n,r,u,o,c;this.options=a,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(i=a.lowerCaseTags)!==null&&i!==void 0?i:this.htmlMode,this.lowerCaseAttributeNames=(n=a.lowerCaseAttributeNames)!==null&&n!==void 0?n:this.htmlMode,this.recognizeSelfClosing=(r=a.recognizeSelfClosing)!==null&&r!==void 0?r:!this.htmlMode,this.tokenizer=new((u=a.Tokenizer)!==null&&u!==void 0?u:Gh)(this.options,this),this.foreignContext=[!this.htmlMode],(c=(o=this.cbs).onparserinit)===null||c===void 0||c.call(o,this)}ontext(t,a){var i,n;const r=this.getSlice(t,a);this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,r),this.startIndex=a}ontextentity(t,a){var i,n;this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,$a(t)),this.startIndex=a}isVoidElement(t){return this.htmlMode&&Qh.has(t)}onopentagname(t,a){this.endIndex=a;let i=this.getSlice(t,a);this.lowerCaseTagNames&&(i=i.toLowerCase()),this.emitOpenTag(i)}emitOpenTag(t){var a,i,n,r;this.openTagStart=this.startIndex,this.tagname=t;const u=this.htmlMode&&$h.get(t);if(u)for(;this.stack.length>0&&u.has(this.stack[0]);){const o=this.stack.shift();(i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,o,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(nr.has(t)?this.foreignContext.unshift(!0):sr.has(t)&&this.foreignContext.unshift(!1))),(r=(n=this.cbs).onopentagname)===null||r===void 0||r.call(n,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var a,i;this.startIndex=this.openTagStart,this.attribs&&((i=(a=this.cbs).onopentag)===null||i===void 0||i.call(a,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,a){var i,n,r,u,o,c,f,E;this.endIndex=a;let T=this.getSlice(t,a);if(this.lowerCaseTagNames&&(T=T.toLowerCase()),this.htmlMode&&(nr.has(T)||sr.has(T))&&this.foreignContext.shift(),this.isVoidElement(T))this.htmlMode&&T==="br"&&((u=(r=this.cbs).onopentagname)===null||u===void 0||u.call(r,"br"),(c=(o=this.cbs).onopentag)===null||c===void 0||c.call(o,"br",{},!0),(E=(f=this.cbs).onclosetag)===null||E===void 0||E.call(f,"br",!1));else{const p=this.stack.indexOf(T);if(p!==-1)for(let A=0;A<=p;A++){const C=this.stack.shift();(n=(i=this.cbs).onclosetag)===null||n===void 0||n.call(i,C,A!==p)}else this.htmlMode&&T==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=a+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var a,i;const n=this.tagname;this.endOpenTag(t),this.stack[0]===n&&((i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,n,!t),this.stack.shift())}onattribname(t,a){this.startIndex=t;const i=this.getSlice(t,a);this.attribname=this.lowerCaseAttributeNames?i.toLowerCase():i}onattribdata(t,a){this.attribvalue+=this.getSlice(t,a)}onattribentity(t){this.attribvalue+=$a(t)}onattribend(t,a){var i,n;this.endIndex=a,(n=(i=this.cbs).onattribute)===null||n===void 0||n.call(i,this.attribname,this.attribvalue,t===Le.Double?'"':t===Le.Single?"'":t===Le.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const a=t.search(jh);let i=a<0?t:t.substr(0,a);return this.lowerCaseTagNames&&(i=i.toLowerCase()),i}ondeclaration(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`!${n}`,`!${i}`)}this.startIndex=a+1}onprocessinginstruction(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`?${n}`,`?${i}`)}this.startIndex=a+1}oncomment(t,a,i){var n,r,u,o;this.endIndex=a,(r=(n=this.cbs).oncomment)===null||r===void 0||r.call(n,this.getSlice(t,a-i)),(o=(u=this.cbs).oncommentend)===null||o===void 0||o.call(u),this.startIndex=a+1}oncdata(t,a,i){var n,r,u,o,c,f,E,T,p,A;this.endIndex=a;const C=this.getSlice(t,a-i);!this.htmlMode||this.options.recognizeCDATA?((r=(n=this.cbs).oncdatastart)===null||r===void 0||r.call(n),(o=(u=this.cbs).ontext)===null||o===void 0||o.call(u,C),(f=(c=this.cbs).oncdataend)===null||f===void 0||f.call(c)):((T=(E=this.cbs).oncomment)===null||T===void 0||T.call(E,`[CDATA[${C}]]`),(A=(p=this.cbs).oncommentend)===null||A===void 0||A.call(p)),this.startIndex=a+1}onend(){var t,a;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let i=0;i<this.stack.length;i++)this.cbs.onclosetag(this.stack[i],!0)}(a=(t=this.cbs).onend)===null||a===void 0||a.call(t)}reset(){var t,a,i,n;(a=(t=this.cbs).onreset)===null||a===void 0||a.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(n=(i=this.cbs).onparserinit)===null||n===void 0||n.call(i,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,a){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let i=this.buffers[0].slice(t-this.bufferOffset,a-this.bufferOffset);for(;a-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),i+=this.buffers[0].slice(0,a-this.bufferOffset);return i}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}}function zh(e,t){const a=new Zu(void 0,t);return new Kh(a,t).end(e),a.root}const Zh=Ol((e,t,a,i)=>t._useHtmlParser2?zh(e,t):Vh(e,t,a,i)),rr=r0(Zh,(e,t)=>t._useHtmlParser2?Qt(e,t):Wh(e)),Jh={class:"flex h-screen"},ef={class:"w-[375px] border-l overflow-auto"},tf={class:"goodschool_mobile"},af=["innerHTML"],nf=["innerHTML"],sf={class:"flex-1 bg-gray-100 overflow-auto"},rf={class:"p-4"},uf={class:"flex justify-between"},of={key:0,class:"text-red-500 text-xs mt-2"},cf={class:"w-2/12 border-l overflow-auto"},lf={class:"p-4"},ur=l.defineComponent({__name:"Designer",setup(e){const t=l.ref(),a=l.ref(),i=l.ref(),n=l.ref("");let r=rr("",{},!1);function u(x){console.log("选择",x),a.value=x}function o(x,O=""){if(O){const g=c(t.value,O);g?i.value=g:i.value=x}else i.value=x}function c(x,O){if(x.xpath===O)return x;if(x.children&&x.children.length)for(const g of x.children){const D=c(g,O);if(D)return D}}function f(x){var O,g,D;if(console.log(x,a.value),a.value)if(a.value.rule=x.rule,a.value.type=x.type,(O=x.rule)!=null&&O.isThemeColor?(x.attrs.class+=" ys_tit_color",x.attrs.style&&(x.attrs.style=void 0)):((g=x.attrs.class)!=null&&g.includes(" ys_tit_color")&&(x.attrs.class=x.attrs.class.replace(" ys_tit_color"," ")),x.rule.color&&(x.attrs.style={color:x.rule.color})),a.value.type===de.Block){const P=c(t.value,a.value.parentxpath||"");P&&P.children&&P.children.forEach(q=>{var Z;q.tag===a.value.tag&&(q.rule=x.rule,q.type=x.type,(Z=q.attrs.class)!=null&&Z.includes(" mb40")||(q.attrs.class+=" mb40"))})}else(D=a.value.attrs.class)!=null&&D.includes(" mb40")&&(a.value.attrs.class=a.value.attrs.class.replace(" mb40"," "))}async function E(x="/001.html"){const g=await(await fetch(x)).text();t.value=A(g)}const T=l.ref("");function p(x){T.value=x}function A(x){r=rr(x);const O=r("body").children().toArray().map(g=>C(r(g)));return console.log(O[0]),O[0]}function C(x,O=""){function g(q){if(!q||!q[0])return"";const Z=[];let z=q;for(;z.length&&z[0].tagName!=="html";){const G=z[0].tagName,re=z.parent().children(G).index(z)+1;Z.unshift(`${G}[${re}]`),z=z.parent()}return"/html/"+Z.join("/")}const D=g(x).replace("/html/body[1]",""),P=x.children().toArray().map(q=>C(r(q),D));return{tag:x[0].tagName,text:x.contents().not(x.children()).text().trim(),attrs:x[0].attribs,children:P,xpath:D,parentxpath:O,rule:{}}}l.onMounted(()=>{E()});function L(x){console.log("更新子节点的文本",x);const O=c(t.value,x.element.xpath);O&&(O.editText=x.newText)}function M(x,O=""){function g(D,P){var z;const Z=(P?((z=c(t.value,P))==null?void 0:z.children)||[]:[t.value]).filter(G=>G.tag===D.tag).indexOf(D)+1;return`${P}/${D.tag}[${Z}]`}x.xpath=g(x,O),x.parentxpath=O,(x.children||[]).forEach(D=>M(D,x.xpath))}function V({action:x,element:O,newBlock:g}){console.log("块操作",x,O,g);const D=c(t.value,O.parentxpath||"");if(!D||!D.children)return;const P=D.children.findIndex(G=>G===O);if(P===-1)return;const q=D.children.length,{minBlock:Z,maxBlock:z}=O.rule;if((x==="add"||x==="copy")&&q>=(z||1/0)){n.value=`无法添加更多块。最大块数量为 ${z}`;return}switch(x){case"add":if(g){const G={...g,xpath:"",children:JSON.parse(JSON.stringify(g.children))};D.children.splice(P+1,0,G)}break;case"copy":if(g){const G={...g,xpath:"",children:JSON.parse(JSON.stringify(g.children))};D.children.splice(P+1,0,G)}break;case"moveUp":if(P>0){const[G]=D.children.splice(P,1);D.children.splice(P-1,0,G)}break;case"moveDown":if(P<D.children.length-1){const[G]=D.children.splice(P,1);D.children.splice(P+1,0,G)}break;case"delete":if(q<=(Z||0)){n.value=`无法删除更多块。最小块数量为 ${Z}`;return}D.children.splice(P,1);break}n.value="",M(t.value)}function B(x,O){let g=O.attrs.class.replace(/icon-\S+/g,`icon-${x}`);O.attrs.class=g}function H(x,O){O.attrs.src=x}return(x,O)=>(l.openBlock(),l.createElementBlock("div",Jh,[l.createElementVNode("div",ef,[l.createElementVNode("div",tf,[O[1]||(O[1]=l.createElementVNode("h2",{class:"text-lg font-bold"},"实时预览",-1)),T.value?(l.openBlock(),l.createElementBlock("div",{key:0,innerHTML:T.value},null,8,af)):(l.openBlock(),l.createElementBlock("div",{key:1,innerHTML:l.unref(r)("body").html()},null,8,nf))])]),l.createElementVNode("div",sf,[l.createElementVNode("div",rf,[l.createElementVNode("div",uf,[O[3]||(O[3]=l.createElementVNode("h2",{class:"text-lg font-bold"},"结构渲染",-1)),l.createElementVNode("div",null,[l.createElementVNode("select",{class:"border rounded p-2",onChange:O[0]||(O[0]=g=>E(g.target.value))},O[2]||(O[2]=[l.createElementVNode("option",{value:"/001.html"},"001.html",-1),l.createElementVNode("option",{value:"/002.html"},"002.html",-1),l.createElementVNode("option",{value:"/003.html"},"003.html",-1),l.createElementVNode("option",{value:"/004.html"},"004.html",-1)]),32)])]),n.value?(l.openBlock(),l.createElementBlock("div",of,l.toDisplayString(n.value),1)):l.createCommentVNode("",!0),t.value?(l.openBlock(),l.createBlock(yu,{key:1,element:t.value,selectedElement:a.value,hoveredElement:i.value,onSelectElement:u,onHoverElement:o,onContentUpdated:p,onUpdateText:L,onBlockAction:V,onAddIcon:B,onUpload:H},null,8,["element","selectedElement","hoveredElement"])):l.createCommentVNode("",!0)])]),l.createElementVNode("div",cf,[l.createElementVNode("div",lf,[O[4]||(O[4]=l.createElementVNode("h2",{class:"text-lg font-bold"},"节点属性",-1)),a.value?(l.openBlock(),l.createBlock(Yu,{key:0,element:a.value,onUpdateElement:f},null,8,["element"])):l.createCommentVNode("",!0)])])]))}}),df={install(e){e.component("Designer",ur)}};ke.Designer=ur,ke.default=df,Object.defineProperties(ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
16
|
+
*/function Ls(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,i)}return a}function Rs(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Ls(Object(a),!0).forEach(function(i){yd(e,i,a[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Ls(Object(a)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(a,i))})}return e}function Dd(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var i=a.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ys(e){var t=Dd(e,"string");return typeof t=="symbol"?t:t+""}function mi(e){"@babel/helpers - typeof";return mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(e)}function Ld(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ms(e,t){for(var a=0;a<t.length;a++){var i=t[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ys(i.key),i)}}function Rd(e,t,a){return t&&Ms(e.prototype,t),a&&Ms(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function yd(e,t,a){return t=ys(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Ps(e){return Md(e)||Pd(e)||kd(e)||vd()}function Md(e){if(Array.isArray(e))return Ti(e)}function Pd(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kd(e,t){if(e){if(typeof e=="string")return Ti(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ti(e,t)}}function Ti(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function vd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
17
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ba=typeof window<"u"&&typeof window.document<"u",ye=ba?window:{},pi=ba&&ye.document.documentElement?"ontouchstart"in ye.document.documentElement:!1,bi=ba?"PointerEvent"in ye:!1,J="cropper",gi="all",ks="crop",vs="move",ws="zoom",Je="e",et="w",dt="s",qe="n",wt="ne",Bt="nw",Ut="se",Ft="sw",_i="".concat(J,"-crop"),Bs="".concat(J,"-disabled"),Te="".concat(J,"-hidden"),Us="".concat(J,"-hide"),wd="".concat(J,"-invisible"),ga="".concat(J,"-modal"),Ai="".concat(J,"-move"),Ht="".concat(J,"Action"),_a="".concat(J,"Preview"),Ni="crop",Fs="move",Hs="none",Ci="crop",Ii="cropend",Si="cropmove",xi="cropstart",Ys="dblclick",Bd=pi?"touchstart":"mousedown",Ud=pi?"touchmove":"mousemove",Fd=pi?"touchend touchcancel":"mouseup",Vs=bi?"pointerdown":Bd,qs=bi?"pointermove":Ud,Ws=bi?"pointerup pointercancel":Fd,Xs="ready",Gs="resize",$s="wheel",Oi="zoom",Qs="image/jpeg",Hd=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Yd=/^data:/,Vd=/^data:image\/jpeg;base64,/,qd=/^img|canvas$/i,js=200,zs=100,Ks={viewMode:0,dragMode:Ni,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:js,minContainerHeight:zs,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Wd='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',Xd=Number.isNaN||ye.isNaN;function H(e){return typeof e=="number"&&!Xd(e)}var Zs=function(t){return t>0&&t<1/0};function Di(e){return typeof e>"u"}function tt(e){return mi(e)==="object"&&e!==null}var Gd=Object.prototype.hasOwnProperty;function ht(e){if(!tt(e))return!1;try{var t=e.constructor,a=t.prototype;return t&&a&&Gd.call(a,"isPrototypeOf")}catch{return!1}}function pe(e){return typeof e=="function"}var $d=Array.prototype.slice;function Js(e){return Array.from?Array.from(e):$d.call(e)}function ie(e,t){return e&&pe(t)&&(Array.isArray(e)||H(e.length)?Js(e).forEach(function(a,i){t.call(e,a,i,e)}):tt(e)&&Object.keys(e).forEach(function(a){t.call(e,e[a],a,e)})),e}var ee=Object.assign||function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),n=1;n<a;n++)i[n-1]=arguments[n];return tt(t)&&i.length>0&&i.forEach(function(r){tt(r)&&Object.keys(r).forEach(function(u){t[u]=r[u]})}),t},Qd=/\.\d*(?:0|9){12}\d*$/;function ft(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Qd.test(e)?Math.round(e*t)/t:e}var jd=/^width|height|left|top|marginLeft|marginTop$/;function We(e,t){var a=e.style;ie(t,function(i,n){jd.test(n)&&H(i)&&(i="".concat(i,"px")),a[n]=i})}function zd(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function oe(e,t){if(t){if(H(e.length)){ie(e,function(i){oe(i,t)});return}if(e.classList){e.classList.add(t);return}var a=e.className.trim();a?a.indexOf(t)<0&&(e.className="".concat(a," ").concat(t)):e.className=t}}function Me(e,t){if(t){if(H(e.length)){ie(e,function(a){Me(a,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function Et(e,t,a){if(t){if(H(e.length)){ie(e,function(i){Et(i,t,a)});return}a?oe(e,t):Me(e,t)}}var Kd=/([a-z\d])([A-Z])/g;function Li(e){return e.replace(Kd,"$1-$2").toLowerCase()}function Ri(e,t){return tt(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Li(t)))}function Yt(e,t,a){tt(a)?e[t]=a:e.dataset?e.dataset[t]=a:e.setAttribute("data-".concat(Li(t)),a)}function Zd(e,t){if(tt(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(Li(t)))}var er=/\s\s*/,tr=function(){var e=!1;if(ba){var t=!1,a=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(r){t=r}});ye.addEventListener("test",a,i),ye.removeEventListener("test",a,i)}return e}();function xe(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(er).forEach(function(r){if(!tr){var u=e.listeners;u&&u[r]&&u[r][a]&&(n=u[r][a],delete u[r][a],Object.keys(u[r]).length===0&&delete u[r],Object.keys(u).length===0&&delete e.listeners)}e.removeEventListener(r,n,i)})}function Ie(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(er).forEach(function(r){if(i.once&&!tr){var u=e.listeners,o=u===void 0?{}:u;n=function(){delete o[r][a],e.removeEventListener(r,n,i);for(var f=arguments.length,E=new Array(f),T=0;T<f;T++)E[T]=arguments[T];a.apply(e,E)},o[r]||(o[r]={}),o[r][a]&&e.removeEventListener(r,o[r][a],i),o[r][a]=n,e.listeners=o}e.addEventListener(r,n,i)})}function mt(e,t,a){var i;return pe(Event)&&pe(CustomEvent)?i=new CustomEvent(t,{detail:a,bubbles:!0,cancelable:!0}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(t,!0,!0,a)),e.dispatchEvent(i)}function ar(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var yi=ye.location,Jd=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function ir(e){var t=e.match(Jd);return t!==null&&(t[1]!==yi.protocol||t[2]!==yi.hostname||t[3]!==yi.port)}function nr(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function Vt(e){var t=e.rotate,a=e.scaleX,i=e.scaleY,n=e.translateX,r=e.translateY,u=[];H(n)&&n!==0&&u.push("translateX(".concat(n,"px)")),H(r)&&r!==0&&u.push("translateY(".concat(r,"px)")),H(t)&&t!==0&&u.push("rotate(".concat(t,"deg)")),H(a)&&a!==1&&u.push("scaleX(".concat(a,")")),H(i)&&i!==1&&u.push("scaleY(".concat(i,")"));var o=u.length?u.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function eh(e){var t=Rs({},e),a=0;return ie(e,function(i,n){delete t[n],ie(t,function(r){var u=Math.abs(i.startX-r.startX),o=Math.abs(i.startY-r.startY),l=Math.abs(i.endX-r.endX),f=Math.abs(i.endY-r.endY),E=Math.sqrt(u*u+o*o),T=Math.sqrt(l*l+f*f),b=(T-E)/E;Math.abs(b)>Math.abs(a)&&(a=b)})}),a}function Aa(e,t){var a=e.pageX,i=e.pageY,n={endX:a,endY:i};return t?n:Rs({startX:a,startY:i},n)}function th(e){var t=0,a=0,i=0;return ie(e,function(n){var r=n.startX,u=n.startY;t+=r,a+=u,i+=1}),t/=i,a/=i,{pageX:t,pageY:a}}function Xe(e){var t=e.aspectRatio,a=e.height,i=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=Zs(i),u=Zs(a);if(r&&u){var o=a*t;n==="contain"&&o>i||n==="cover"&&o<i?a=i/t:i=a*t}else r?a=i/t:u&&(i=a*t);return{width:i,height:a}}function ah(e){var t=e.width,a=e.height,i=e.degree;if(i=Math.abs(i)%180,i===90)return{width:a,height:t};var n=i%90*Math.PI/180,r=Math.sin(n),u=Math.cos(n),o=t*u+a*r,l=t*r+a*u;return i>90?{width:l,height:o}:{width:o,height:l}}function ih(e,t,a,i){var n=t.aspectRatio,r=t.naturalWidth,u=t.naturalHeight,o=t.rotate,l=o===void 0?0:o,f=t.scaleX,E=f===void 0?1:f,T=t.scaleY,b=T===void 0?1:T,N=a.aspectRatio,S=a.naturalWidth,y=a.naturalHeight,P=i.fillColor,X=P===void 0?"transparent":P,B=i.imageSmoothingEnabled,q=B===void 0?!0:B,F=i.imageSmoothingQuality,k=F===void 0?"low":F,_=i.maxWidth,w=_===void 0?1/0:_,$=i.maxHeight,ae=$===void 0?1/0:$,be=i.minWidth,Ae=be===void 0?0:be,Oe=i.minHeight,ge=Oe===void 0?0:Oe,he=document.createElement("canvas"),x=he.getContext("2d"),L=Xe({aspectRatio:N,width:w,height:ae}),Y=Xe({aspectRatio:N,width:Ae,height:ge},"cover"),G=Math.min(L.width,Math.max(Y.width,S)),O=Math.min(L.height,Math.max(Y.height,y)),D=Xe({aspectRatio:n,width:w,height:ae}),j=Xe({aspectRatio:n,width:Ae,height:ge},"cover"),V=Math.min(D.width,Math.max(j.width,r)),K=Math.min(D.height,Math.max(j.height,u)),at=[-V/2,-K/2,V,K];return he.width=ft(G),he.height=ft(O),x.fillStyle=X,x.fillRect(0,0,G,O),x.save(),x.translate(G/2,O/2),x.rotate(l*Math.PI/180),x.scale(E,b),x.imageSmoothingEnabled=q,x.imageSmoothingQuality=k,x.drawImage.apply(x,[e].concat(Ps(at.map(function(it){return Math.floor(ft(it))})))),x.restore(),he}var sr=String.fromCharCode;function nh(e,t,a){var i="";a+=t;for(var n=t;n<a;n+=1)i+=sr(e.getUint8(n));return i}var sh=/^data:.*,/;function rh(e){var t=e.replace(sh,""),a=atob(t),i=new ArrayBuffer(a.length),n=new Uint8Array(i);return ie(n,function(r,u){n[u]=a.charCodeAt(u)}),i}function uh(e,t){for(var a=[],i=8192,n=new Uint8Array(e);n.length>0;)a.push(sr.apply(null,Js(n.subarray(0,i)))),n=n.subarray(i);return"data:".concat(t,";base64,").concat(btoa(a.join("")))}function oh(e){var t=new DataView(e),a;try{var i,n,r;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var u=t.byteLength,o=2;o+1<u;){if(t.getUint8(o)===255&&t.getUint8(o+1)===225){n=o;break}o+=1}if(n){var l=n+4,f=n+10;if(nh(t,l,4)==="Exif"){var E=t.getUint16(f);if(i=E===18761,(i||E===19789)&&t.getUint16(f+2,i)===42){var T=t.getUint32(f+4,i);T>=8&&(r=f+T)}}}if(r){var b=t.getUint16(r,i),N,S;for(S=0;S<b;S+=1)if(N=r+S*12+2,t.getUint16(N,i)===274){N+=8,a=t.getUint16(N,i),t.setUint16(N,1,i);break}}}catch{a=1}return a}function ch(e){var t=0,a=1,i=1;switch(e){case 2:a=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,a=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:a,scaleY:i}}var lh={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,a=this.options,i=this.container,n=this.cropper,r=Number(a.minContainerWidth),u=Number(a.minContainerHeight);oe(n,Te),Me(t,Te);var o={width:Math.max(i.offsetWidth,r>=0?r:js),height:Math.max(i.offsetHeight,u>=0?u:zs)};this.containerData=o,We(n,{width:o.width,height:o.height}),oe(t,Te),Me(n,Te)},initCanvas:function(){var t=this.containerData,a=this.imageData,i=this.options.viewMode,n=Math.abs(a.rotate)%180===90,r=n?a.naturalHeight:a.naturalWidth,u=n?a.naturalWidth:a.naturalHeight,o=r/u,l=t.width,f=t.height;t.height*o>t.width?i===3?l=t.height*o:f=t.width/o:i===3?f=t.width/o:l=t.height*o;var E={aspectRatio:o,naturalWidth:r,naturalHeight:u,width:l,height:f};this.canvasData=E,this.limited=i===1||i===2,this.limitCanvas(!0,!0),E.width=Math.min(Math.max(E.width,E.minWidth),E.maxWidth),E.height=Math.min(Math.max(E.height,E.minHeight),E.maxHeight),E.left=(t.width-E.width)/2,E.top=(t.height-E.height)/2,E.oldLeft=E.left,E.oldTop=E.top,this.initialCanvasData=ee({},E)},limitCanvas:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=i.viewMode,l=r.aspectRatio,f=this.cropped&&u;if(t){var E=Number(i.minCanvasWidth)||0,T=Number(i.minCanvasHeight)||0;o>1?(E=Math.max(E,n.width),T=Math.max(T,n.height),o===3&&(T*l>E?E=T*l:T=E/l)):o>0&&(E?E=Math.max(E,f?u.width:0):T?T=Math.max(T,f?u.height:0):f&&(E=u.width,T=u.height,T*l>E?E=T*l:T=E/l));var b=Xe({aspectRatio:l,width:E,height:T});E=b.width,T=b.height,r.minWidth=E,r.minHeight=T,r.maxWidth=1/0,r.maxHeight=1/0}if(a)if(o>(f?0:1)){var N=n.width-r.width,S=n.height-r.height;r.minLeft=Math.min(0,N),r.minTop=Math.min(0,S),r.maxLeft=Math.max(0,N),r.maxTop=Math.max(0,S),f&&this.limited&&(r.minLeft=Math.min(u.left,u.left+(u.width-r.width)),r.minTop=Math.min(u.top,u.top+(u.height-r.height)),r.maxLeft=u.left,r.maxTop=u.top,o===2&&(r.width>=n.width&&(r.minLeft=Math.min(0,N),r.maxLeft=Math.max(0,N)),r.height>=n.height&&(r.minTop=Math.min(0,S),r.maxTop=Math.max(0,S))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=n.width,r.maxTop=n.height},renderCanvas:function(t,a){var i=this.canvasData,n=this.imageData;if(a){var r=ah({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),u=r.width,o=r.height,l=i.width*(u/i.naturalWidth),f=i.height*(o/i.naturalHeight);i.left-=(l-i.width)/2,i.top-=(f-i.height)/2,i.width=l,i.height=f,i.aspectRatio=u/o,i.naturalWidth=u,i.naturalHeight=o,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,We(this.canvas,ee({width:i.width,height:i.height},Vt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var a=this.canvasData,i=this.imageData,n=i.naturalWidth*(a.width/a.naturalWidth),r=i.naturalHeight*(a.height/a.naturalHeight);ee(i,{width:n,height:r,left:(a.width-n)/2,top:(a.height-r)/2}),We(this.image,ee({width:i.width,height:i.height},Vt(ee({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,a=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,r={width:a.width,height:a.height};i&&(a.height*i>a.width?r.height=r.width/i:r.width=r.height*i),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*n),r.height=Math.max(r.minHeight,r.height*n),r.left=a.left+(a.width-r.width)/2,r.top=a.top+(a.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=ee({},r)},limitCropBox:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=this.limited,l=i.aspectRatio;if(t){var f=Number(i.minCropBoxWidth)||0,E=Number(i.minCropBoxHeight)||0,T=o?Math.min(n.width,r.width,r.width+r.left,n.width-r.left):n.width,b=o?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;f=Math.min(f,n.width),E=Math.min(E,n.height),l&&(f&&E?E*l>f?E=f/l:f=E*l:f?E=f/l:E&&(f=E*l),b*l>T?b=T/l:T=b*l),u.minWidth=Math.min(f,T),u.minHeight=Math.min(E,b),u.maxWidth=T,u.maxHeight=b}a&&(o?(u.minLeft=Math.max(0,r.left),u.minTop=Math.max(0,r.top),u.maxLeft=Math.min(n.width,r.left+r.width)-u.width,u.maxTop=Math.min(n.height,r.top+r.height)-u.height):(u.minLeft=0,u.minTop=0,u.maxLeft=n.width-u.width,u.maxTop=n.height-u.height))},renderCropBox:function(){var t=this.options,a=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&Yt(this.face,Ht,i.width>=a.width&&i.height>=a.height?vs:gi),We(this.cropBox,ee({width:i.width,height:i.height},Vt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),mt(this.element,Ci,this.getData())}},dh={initPreview:function(){var t=this.element,a=this.crossOrigin,i=this.options.preview,n=a?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",u=document.createElement("img");if(a&&(u.crossOrigin=a),u.src=n,u.alt=r,this.viewBox.appendChild(u),this.viewBoxImage=u,!!i){var o=i;typeof i=="string"?o=t.ownerDocument.querySelectorAll(i):i.querySelector&&(o=[i]),this.previews=o,ie(o,function(l){var f=document.createElement("img");Yt(l,_a,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),a&&(f.crossOrigin=a),f.src=n,f.alt=r,f.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(f)})}},resetPreview:function(){ie(this.previews,function(t){var a=Ri(t,_a);We(t,{width:a.width,height:a.height}),t.innerHTML=a.html,Zd(t,_a)})},preview:function(){var t=this.imageData,a=this.canvasData,i=this.cropBoxData,n=i.width,r=i.height,u=t.width,o=t.height,l=i.left-a.left-t.left,f=i.top-a.top-t.top;!this.cropped||this.disabled||(We(this.viewBoxImage,ee({width:u,height:o},Vt(ee({translateX:-l,translateY:-f},t)))),ie(this.previews,function(E){var T=Ri(E,_a),b=T.width,N=T.height,S=b,y=N,P=1;n&&(P=b/n,y=r*P),r&&y>N&&(P=N/r,S=n*P,y=N),We(E,{width:S,height:y}),We(E.getElementsByTagName("img")[0],ee({width:u*P,height:o*P},Vt(ee({translateX:-l*P,translateY:-f*P},t))))}))}},hh={bind:function(){var t=this.element,a=this.options,i=this.cropper;pe(a.cropstart)&&Ie(t,xi,a.cropstart),pe(a.cropmove)&&Ie(t,Si,a.cropmove),pe(a.cropend)&&Ie(t,Ii,a.cropend),pe(a.crop)&&Ie(t,Ci,a.crop),pe(a.zoom)&&Ie(t,Oi,a.zoom),Ie(i,Vs,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&Ie(i,$s,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&Ie(i,Ys,this.onDblclick=this.dblclick.bind(this)),Ie(t.ownerDocument,qs,this.onCropMove=this.cropMove.bind(this)),Ie(t.ownerDocument,Ws,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&Ie(window,Gs,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;pe(a.cropstart)&&xe(t,xi,a.cropstart),pe(a.cropmove)&&xe(t,Si,a.cropmove),pe(a.cropend)&&xe(t,Ii,a.cropend),pe(a.crop)&&xe(t,Ci,a.crop),pe(a.zoom)&&xe(t,Oi,a.zoom),xe(i,Vs,this.onCropStart),a.zoomable&&a.zoomOnWheel&&xe(i,$s,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&xe(i,Ys,this.onDblclick),xe(t.ownerDocument,qs,this.onCropMove),xe(t.ownerDocument,Ws,this.onCropEnd),a.responsive&&xe(window,Gs,this.onResize)}},fh={resize:function(){if(!this.disabled){var t=this.options,a=this.container,i=this.containerData,n=a.offsetWidth/i.width,r=a.offsetHeight/i.height,u=Math.abs(n-1)>Math.abs(r-1)?n:r;if(u!==1){var o,l;t.restore&&(o=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(ie(o,function(f,E){o[E]=f*u})),this.setCropBoxData(ie(l,function(f,E){l[E]=f*u})))}}},dblclick:function(){this.disabled||this.options.dragMode===Hs||this.setDragMode(zd(this.dragBox,_i)?Fs:Ni)},wheel:function(t){var a=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var a=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(H(a)&&a!==1||H(i)&&i!==0||t.ctrlKey))){var n=this.options,r=this.pointers,u;t.changedTouches?ie(t.changedTouches,function(o){r[o.identifier]=Aa(o)}):r[t.pointerId||0]=Aa(t),Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?u=ws:u=Ri(t.target,Ht),Hd.test(u)&&mt(this.element,xi,{originalEvent:t,action:u})!==!1&&(t.preventDefault(),this.action=u,this.cropping=!1,u===ks&&(this.cropping=!0,oe(this.dragBox,ga)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),mt(this.element,Si,{originalEvent:t,action:a})!==!1&&(t.changedTouches?ie(t.changedTouches,function(n){ee(i[n.identifier]||{},Aa(n,!0))}):ee(i[t.pointerId||0]||{},Aa(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,i=this.pointers;t.changedTouches?ie(t.changedTouches,function(n){delete i[n.identifier]}):delete i[t.pointerId||0],a&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,Et(this.dragBox,ga,this.cropped&&this.options.modal)),mt(this.element,Ii,{originalEvent:t,action:a}))}}},Eh={change:function(t){var a=this.options,i=this.canvasData,n=this.containerData,r=this.cropBoxData,u=this.pointers,o=this.action,l=a.aspectRatio,f=r.left,E=r.top,T=r.width,b=r.height,N=f+T,S=E+b,y=0,P=0,X=n.width,B=n.height,q=!0,F;!l&&t.shiftKey&&(l=T&&b?T/b:1),this.limited&&(y=r.minLeft,P=r.minTop,X=y+Math.min(n.width,i.width,i.left+i.width),B=P+Math.min(n.height,i.height,i.top+i.height));var k=u[Object.keys(u)[0]],_={x:k.endX-k.startX,y:k.endY-k.startY},w=function(ae){switch(ae){case Je:N+_.x>X&&(_.x=X-N);break;case et:f+_.x<y&&(_.x=y-f);break;case qe:E+_.y<P&&(_.y=P-E);break;case dt:S+_.y>B&&(_.y=B-S);break}};switch(o){case gi:f+=_.x,E+=_.y;break;case Je:if(_.x>=0&&(N>=X||l&&(E<=P||S>=B))){q=!1;break}w(Je),T+=_.x,T<0&&(o=et,T=-T,f-=T),l&&(b=T/l,E+=(r.height-b)/2);break;case qe:if(_.y<=0&&(E<=P||l&&(f<=y||N>=X))){q=!1;break}w(qe),b-=_.y,E+=_.y,b<0&&(o=dt,b=-b,E-=b),l&&(T=b*l,f+=(r.width-T)/2);break;case et:if(_.x<=0&&(f<=y||l&&(E<=P||S>=B))){q=!1;break}w(et),T-=_.x,f+=_.x,T<0&&(o=Je,T=-T,f-=T),l&&(b=T/l,E+=(r.height-b)/2);break;case dt:if(_.y>=0&&(S>=B||l&&(f<=y||N>=X))){q=!1;break}w(dt),b+=_.y,b<0&&(o=qe,b=-b,E-=b),l&&(T=b*l,f+=(r.width-T)/2);break;case wt:if(l){if(_.y<=0&&(E<=P||N>=X)){q=!1;break}w(qe),b-=_.y,E+=_.y,T=b*l}else w(qe),w(Je),_.x>=0?N<X?T+=_.x:_.y<=0&&E<=P&&(q=!1):T+=_.x,_.y<=0?E>P&&(b-=_.y,E+=_.y):(b-=_.y,E+=_.y);T<0&&b<0?(o=Ft,b=-b,T=-T,E-=b,f-=T):T<0?(o=Bt,T=-T,f-=T):b<0&&(o=Ut,b=-b,E-=b);break;case Bt:if(l){if(_.y<=0&&(E<=P||f<=y)){q=!1;break}w(qe),b-=_.y,E+=_.y,T=b*l,f+=r.width-T}else w(qe),w(et),_.x<=0?f>y?(T-=_.x,f+=_.x):_.y<=0&&E<=P&&(q=!1):(T-=_.x,f+=_.x),_.y<=0?E>P&&(b-=_.y,E+=_.y):(b-=_.y,E+=_.y);T<0&&b<0?(o=Ut,b=-b,T=-T,E-=b,f-=T):T<0?(o=wt,T=-T,f-=T):b<0&&(o=Ft,b=-b,E-=b);break;case Ft:if(l){if(_.x<=0&&(f<=y||S>=B)){q=!1;break}w(et),T-=_.x,f+=_.x,b=T/l}else w(dt),w(et),_.x<=0?f>y?(T-=_.x,f+=_.x):_.y>=0&&S>=B&&(q=!1):(T-=_.x,f+=_.x),_.y>=0?S<B&&(b+=_.y):b+=_.y;T<0&&b<0?(o=wt,b=-b,T=-T,E-=b,f-=T):T<0?(o=Ut,T=-T,f-=T):b<0&&(o=Bt,b=-b,E-=b);break;case Ut:if(l){if(_.x>=0&&(N>=X||S>=B)){q=!1;break}w(Je),T+=_.x,b=T/l}else w(dt),w(Je),_.x>=0?N<X?T+=_.x:_.y>=0&&S>=B&&(q=!1):T+=_.x,_.y>=0?S<B&&(b+=_.y):b+=_.y;T<0&&b<0?(o=Bt,b=-b,T=-T,E-=b,f-=T):T<0?(o=Ft,T=-T,f-=T):b<0&&(o=wt,b=-b,E-=b);break;case vs:this.move(_.x,_.y),q=!1;break;case ws:this.zoom(eh(u),t),q=!1;break;case ks:if(!_.x||!_.y){q=!1;break}F=ar(this.cropper),f=k.startX-F.left,E=k.startY-F.top,T=r.minWidth,b=r.minHeight,_.x>0?o=_.y>0?Ut:wt:_.x<0&&(f-=T,o=_.y>0?Ft:Bt),_.y<0&&(E-=b),this.cropped||(Me(this.cropBox,Te),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}q&&(r.width=T,r.height=b,r.left=f,r.top=E,this.action=o,this.renderCropBox()),ie(u,function($){$.startX=$.endX,$.startY=$.endY})}},mh={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&oe(this.dragBox,ga),Me(this.cropBox,Te),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=ee({},this.initialImageData),this.canvasData=ee({},this.initialCanvasData),this.cropBoxData=ee({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(ee(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Me(this.dragBox,ga),oe(this.cropBox,Te)),this},replace:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),a?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,ie(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Me(this.cropper,Bs)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,oe(this.cropper,Bs)),this},destroy:function(){var t=this.element;return t[J]?(t[J]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=i.left,r=i.top;return this.moveTo(Di(t)?t:n+Number(t),Di(a)?a:r+Number(a))},moveTo:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(H(t)&&(i.left=t,n=!0),H(a)&&(i.top=a,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,a){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,a)},zoomTo:function(t,a,i){var n=this.options,r=this.canvasData,u=r.width,o=r.height,l=r.naturalWidth,f=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var E=l*t,T=f*t;if(mt(this.element,Oi,{ratio:t,oldRatio:u/l,originalEvent:i})===!1)return this;if(i){var b=this.pointers,N=ar(this.cropper),S=b&&Object.keys(b).length?th(b):{pageX:i.pageX,pageY:i.pageY};r.left-=(E-u)*((S.pageX-N.left-r.left)/u),r.top-=(T-o)*((S.pageY-N.top-r.top)/o)}else ht(a)&&H(a.x)&&H(a.y)?(r.left-=(E-u)*((a.x-r.left)/u),r.top-=(T-o)*((a.y-r.top)/o)):(r.left-=(E-u)/2,r.top-=(T-o)/2);r.width=E,r.height=T,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),H(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var a=this.imageData.scaleY;return this.scale(t,H(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(H(a)?a:1,t)},scale:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(H(t)&&(i.scaleX=t,n=!0),H(a)&&(i.scaleY=a,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,i=this.imageData,n=this.canvasData,r=this.cropBoxData,u;if(this.ready&&this.cropped){u={x:r.left-n.left,y:r.top-n.top,width:r.width,height:r.height};var o=i.width/i.naturalWidth;if(ie(u,function(E,T){u[T]=E/o}),t){var l=Math.round(u.y+u.height),f=Math.round(u.x+u.width);u.x=Math.round(u.x),u.y=Math.round(u.y),u.width=f-u.x,u.height=l-u.y}}else u={x:0,y:0,width:0,height:0};return a.rotatable&&(u.rotate=i.rotate||0),a.scalable&&(u.scaleX=i.scaleX||1,u.scaleY=i.scaleY||1),u},setData:function(t){var a=this.options,i=this.imageData,n=this.canvasData,r={};if(this.ready&&!this.disabled&&ht(t)){var u=!1;a.rotatable&&H(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,u=!0),a.scalable&&(H(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,u=!0),H(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,u=!0)),u&&this.renderCanvas(!0,!0);var o=i.width/i.naturalWidth;H(t.x)&&(r.left=t.x*o+n.left),H(t.y)&&(r.top=t.y*o+n.top),H(t.width)&&(r.width=t.width*o),H(t.height)&&(r.height=t.height*o),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?ee({},this.containerData):{}},getImageData:function(){return this.sized?ee({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&ie(["left","top","width","height","naturalWidth","naturalHeight"],function(i){a[i]=t[i]}),a},setCanvasData:function(t){var a=this.canvasData,i=a.aspectRatio;return this.ready&&!this.disabled&&ht(t)&&(H(t.left)&&(a.left=t.left),H(t.top)&&(a.top=t.top),H(t.width)?(a.width=t.width,a.height=t.width/i):H(t.height)&&(a.height=t.height,a.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,a;return this.ready&&this.cropped&&(a={left:t.left,top:t.top,width:t.width,height:t.height}),a||{}},setCropBoxData:function(t){var a=this.cropBoxData,i=this.options.aspectRatio,n,r;return this.ready&&this.cropped&&!this.disabled&&ht(t)&&(H(t.left)&&(a.left=t.left),H(t.top)&&(a.top=t.top),H(t.width)&&t.width!==a.width&&(n=!0,a.width=t.width),H(t.height)&&t.height!==a.height&&(r=!0,a.height=t.height),i&&(n?a.height=a.width/i:r&&(a.width=a.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var a=this.canvasData,i=ih(this.image,this.imageData,a,t);if(!this.cropped)return i;var n=this.getData(t.rounded),r=n.x,u=n.y,o=n.width,l=n.height,f=i.width/Math.floor(a.naturalWidth);f!==1&&(r*=f,u*=f,o*=f,l*=f);var E=o/l,T=Xe({aspectRatio:E,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),b=Xe({aspectRatio:E,width:t.minWidth||0,height:t.minHeight||0},"cover"),N=Xe({aspectRatio:E,width:t.width||(f!==1?i.width:o),height:t.height||(f!==1?i.height:l)}),S=N.width,y=N.height;S=Math.min(T.width,Math.max(b.width,S)),y=Math.min(T.height,Math.max(b.height,y));var P=document.createElement("canvas"),X=P.getContext("2d");P.width=ft(S),P.height=ft(y),X.fillStyle=t.fillColor||"transparent",X.fillRect(0,0,S,y);var B=t.imageSmoothingEnabled,q=B===void 0?!0:B,F=t.imageSmoothingQuality;X.imageSmoothingEnabled=q,F&&(X.imageSmoothingQuality=F);var k=i.width,_=i.height,w=r,$=u,ae,be,Ae,Oe,ge,he;w<=-o||w>k?(w=0,ae=0,Ae=0,ge=0):w<=0?(Ae=-w,w=0,ae=Math.min(k,o+w),ge=ae):w<=k&&(Ae=0,ae=Math.min(o,k-w),ge=ae),ae<=0||$<=-l||$>_?($=0,be=0,Oe=0,he=0):$<=0?(Oe=-$,$=0,be=Math.min(_,l+$),he=be):$<=_&&(Oe=0,be=Math.min(l,_-$),he=be);var x=[w,$,ae,be];if(ge>0&&he>0){var L=S/o;x.push(Ae*L,Oe*L,ge*L,he*L)}return X.drawImage.apply(X,[i].concat(Ps(x.map(function(Y){return Math.floor(ft(Y))})))),P},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!Di(t)&&(a.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var a=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var r=t===Ni,u=a.movable&&t===Fs;t=r||u?t:Hs,a.dragMode=t,Yt(i,Ht,t),Et(i,_i,r),Et(i,Ai,u),a.cropBoxMovable||(Yt(n,Ht,t),Et(n,_i,r),Et(n,Ai,u))}return this}},Th=ye.Cropper,rr=function(){function e(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Ld(this,e),!t||!qd.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=ee({},Ks,ht(a)&&a),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Rd(e,[{key:"init",value:function(){var a=this.element,i=a.tagName.toLowerCase(),n;if(!a[J]){if(a[J]=this,i==="img"){if(this.isImg=!0,n=a.getAttribute("src")||"",this.originalUrl=n,!n)return;n=a.src}else i==="canvas"&&window.HTMLCanvasElement&&(n=a.toDataURL());this.load(n)}}},{key:"load",value:function(a){var i=this;if(a){this.url=a,this.imageData={};var n=this.element,r=this.options;if(!r.rotatable&&!r.scalable&&(r.checkOrientation=!1),!r.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Yd.test(a)){Vd.test(a)?this.read(rh(a)):this.clone();return}var u=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=u,u.onabort=o,u.onerror=o,u.ontimeout=o,u.onprogress=function(){u.getResponseHeader("content-type")!==Qs&&u.abort()},u.onload=function(){i.read(u.response)},u.onloadend=function(){i.reloading=!1,i.xhr=null},r.checkCrossOrigin&&ir(a)&&n.crossOrigin&&(a=nr(a)),u.open("GET",a,!0),u.responseType="arraybuffer",u.withCredentials=n.crossOrigin==="use-credentials",u.send()}}},{key:"read",value:function(a){var i=this.options,n=this.imageData,r=oh(a),u=0,o=1,l=1;if(r>1){this.url=uh(a,Qs);var f=ch(r);u=f.rotate,o=f.scaleX,l=f.scaleY}i.rotatable&&(n.rotate=u),i.scalable&&(n.scaleX=o,n.scaleY=l),this.clone()}},{key:"clone",value:function(){var a=this.element,i=this.url,n=a.crossOrigin,r=i;this.options.checkCrossOrigin&&ir(i)&&(n||(n="anonymous"),r=nr(i)),this.crossOrigin=n,this.crossOriginUrl=r;var u=document.createElement("img");n&&(u.crossOrigin=n),u.src=r||i,u.alt=a.alt||"The image to crop",this.image=u,u.onload=this.start.bind(this),u.onerror=this.stop.bind(this),oe(u,Us),a.parentNode.insertBefore(u,a.nextSibling)}},{key:"start",value:function(){var a=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var n=ye.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ye.navigator.userAgent),r=function(f,E){ee(a.imageData,{naturalWidth:f,naturalHeight:E,aspectRatio:f/E}),a.initialImageData=ee({},a.imageData),a.sizing=!1,a.sized=!0,a.build()};if(i.naturalWidth&&!n){r(i.naturalWidth,i.naturalHeight);return}var u=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=u,u.onload=function(){r(u.width,u.height),n||o.removeChild(u)},u.src=i.src,n||(u.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(u))}},{key:"stop",value:function(){var a=this.image;a.onload=null,a.onerror=null,a.parentNode.removeChild(a),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var a=this.element,i=this.options,n=this.image,r=a.parentNode,u=document.createElement("div");u.innerHTML=Wd;var o=u.querySelector(".".concat(J,"-container")),l=o.querySelector(".".concat(J,"-canvas")),f=o.querySelector(".".concat(J,"-drag-box")),E=o.querySelector(".".concat(J,"-crop-box")),T=E.querySelector(".".concat(J,"-face"));this.container=r,this.cropper=o,this.canvas=l,this.dragBox=f,this.cropBox=E,this.viewBox=o.querySelector(".".concat(J,"-view-box")),this.face=T,l.appendChild(n),oe(a,Te),r.insertBefore(o,a.nextSibling),Me(n,Us),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,oe(E,Te),i.guides||oe(E.getElementsByClassName("".concat(J,"-dashed")),Te),i.center||oe(E.getElementsByClassName("".concat(J,"-center")),Te),i.background&&oe(o,"".concat(J,"-bg")),i.highlight||oe(T,wd),i.cropBoxMovable&&(oe(T,Ai),Yt(T,Ht,gi)),i.cropBoxResizable||(oe(E.getElementsByClassName("".concat(J,"-line")),Te),oe(E.getElementsByClassName("".concat(J,"-point")),Te)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),pe(i.ready)&&Ie(a,Xs,i.ready,{once:!0}),mt(a,Xs)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),Me(this.element,Te)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Th,e}},{key:"setDefaults",value:function(a){ee(Ks,ht(a)&&a)}}])}();ee(rr.prototype,lh,dh,hh,fh,Eh,mh);function ph(e,t){const a=e.split(",")||[],i=a[0].match(/:(.*?);/)[1],n=a[1]&&atob(a[1]);let r=n&&n.length;const u=new Uint8Array(r);for(;r--;)u[r]=n==null?void 0:n.charCodeAt(r);return new File([u],t,{type:i})}const bh={key:0,contenteditable:"false",class:"z-10 w-[100vw] h-[100vh] bg-[rgba(0,0,0,0.7)] flex flex-col justify-center items-center fixed top-0 left-0 cursor-auto"},gh={class:"w-[700px] flex flex-col bg-white rounded pb-8"},_h={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Ah={class:"flex flex-col h-full"},Nh={class:"flex flex-row justify-center items-start flex-1"},Ch={class:"flex flex-col items-start flex-1"},Ih={class:"flex flex-col w-full px-6 py-4"},Sh={class:"flex flex-col w-full"},xh={class:"flex flex-row items-center"},Oh={class:"relative bg-[#474AFF] text-white rounded p-3"},Dh={class:"flex flex-row items-start justify-between mt-3"},Lh={class:"flex flex-col"},Rh={class:"flex flex-col justify-center items-center border w-[300px] h-[300px]"},yh={key:0,class:"w-full text-center"},Mh=["src"],Ph={class:"flex flex-col items-center",style:{width:"300px",height:"300px"}},kh={class:"text-[#999] mt-05 flex justify-center mt-4"},vh={class:"w-full flex justify-end space-x-5 mt-5 px-6"},wh=["loading"],Bh=c.defineComponent({__name:"index",emits:["cancel","ok"],setup(e,{expose:t,emit:a}){const i=a,n=c.ref({coverUrl:"",inputValue:"",uploadType:2,videoHost:"",videoUrl:""}),r=c.ref(),u=c.ref({autoCrop:!0,autoCropArea:1,background:!0,center:!0,cropBoxResizable:!0,dragMode:"move",preview:".before",toggleDragModeOnDblclick:!0,viewMode:1,zoomOnWheel:!0}),o=c.ref(!1),l=c.ref({afterImg:"",image:null,myCropper:null}),f=c.ref("image/jpeg"),E=F=>{console.log(F);const k=F.target.files[0];if(k){k.name&&(n.value.inputValue=k.name);const _=new FileReader;_.onload=w=>{var $,ae;console.log("e?.target?.result",($=w==null?void 0:w.target)==null?void 0:$.result),T((ae=w==null?void 0:w.target)==null?void 0:ae.result)},_.readAsDataURL(k)}};async function T(F){if(!F)return;await q();const k=F;l.value.image=k,l.value.image&&b()}function b(){const F=document.querySelector("#imgId");F&&F.addEventListener("load",()=>{B(),l.value.myCropper=new rr(F,u.value)})}const N=c.ref(!1);function S(F,k,_){r.value=F,F&&F.aspectRatio&&(u.value.aspectRatio=F.aspectRatio),_&&(n.value.inputValue=_),N.value=!0,k&&T(k)}function y(){N.value=!1}const P=()=>{var k,_;if(!l.value.myCropper)return;o.value=!0,l.value.afterImg=l.value.myCropper.getCroppedCanvas({height:(k=r.value)==null?void 0:k.height,imageSmoothingQuality:"high",width:(_=r.value)==null?void 0:_.width}).toDataURL(f.value);const F=ph(l.value.afterImg,n.value.inputValue);i("ok",F),o.value=!1,q(),B(),y()};function X(){q(),B(),y(),i("cancel")}function B(){l.value.myCropper&&l.value.myCropper.destroy()}function q(){l.value.image=""}return t({handleCloseCropper:y,handleOpenCropper:S}),(F,k)=>{var _,w,$;return N.value?(c.openBlock(),c.createElementBlock("div",bh,[c.createElementVNode("div",gh,[c.createElementVNode("div",_h,[k[1]||(k[1]=c.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"图片裁剪",-1)),c.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:c.withModifiers(X,["stop"])})]),c.createElementVNode("div",Ah,[c.createElementVNode("div",Nh,[c.createElementVNode("div",Ch,[c.createElementVNode("div",Ih,[c.createElementVNode("div",Sh,[c.createElementVNode("div",xh,[c.createElementVNode("div",Oh,[c.createElementVNode("input",{type:"file",accept:"image/*",onClick:k[0]||(k[0]=c.withModifiers(()=>{},["stop"])),contenteditable:"false",ref:"fileInput",onChange:E,class:"absolute top-0 left-0 w-[110px] h-[40px] opacity-0 cursor-pointer"},null,544),k[2]||(k[2]=c.createElementVNode("span",{id:"uploadHandler",class:"cursor-pointer"}," 选择/更换图片 ",-1))]),k[3]||(k[3]=c.createElementVNode("span",{class:"text-sm text-[#999] ml-3"},"滚动鼠标放大或缩小图片",-1))]),c.createElementVNode("div",Dh,[c.createElementVNode("div",Lh,[c.createElementVNode("div",Rh,[l.value.image?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",yh," 请上传图片 ")),c.createElementVNode("img",{id:"imgId",src:l.value.image,style:{width:"300px"}},null,8,Mh)])]),c.createElementVNode("div",Ph,[k[4]||(k[4]=c.createElementVNode("div",{class:"before w-[270px] h-[200px] pr-[70px] border"},null,-1)),c.createElementVNode("div",kh," 预览画像 "+c.toDisplayString(((_=r.value)==null?void 0:_.width)||"")+" "+c.toDisplayString((w=r.value)!=null&&w.width?"x":"")+" "+c.toDisplayString((($=r.value)==null?void 0:$.height)||""),1)])])])])])]),c.createElementVNode("div",vh,[c.createElementVNode("span",{loading:o.value,class:"!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",type:"primary",onClick:P}," 确认 ",8,wh),c.createElementVNode("span",{class:"!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",onClick:X},"取消")])])])])):c.createCommentVNode("",!0)}}}),Uh={key:0,"date-action":"1",class:"aidition",contenteditable:"false"},Fh={class:"aidition_left"},Hh={class:"aidition_right"},Yh={key:0,"date-action":"1",class:"text-red-500 text-xs mt-1"},Vh=Ei(c.defineComponent({__name:"ElementRenderer",props:{element:{type:Object,required:!0},selectedElement:Object,hoveredElement:Object,icons:{type:Array,default:()=>[]}},emits:["selectElement","hoverElement","updateText","contentUpdated","blockAction","addIcon","upload"],setup(e,{emit:t}){const a=e,i=t,n=c.computed(()=>a.selectedElement===a.element),r=c.computed(()=>a.hoveredElement===a.element),u=c.ref(!1),o=c.ref(!1),l=c.ref(""),f=c.computed(()=>a.element.rule.minText||0),E=c.computed(()=>a.element.rule.maxText||1/0),T=c.ref();function b(O){O.xpath!="/div[1]"&&(u.value=!0,i("selectElement",O))}function N(O){i("selectElement",O)}function S(O,D){i("hoverElement",O,D)}function y(O){i("hoverElement",O)}function P(O){O.currentTarget.contains(O.relatedTarget)?i("hoverElement",null):a.hoveredElement?i("hoverElement",null,a.hoveredElement.parentxpath):i("hoverElement",null)}function X(){u.value=!1,i("contentUpdated",B())}function B(){function O(D){const j=Object.entries(D.attrs||{}).map(([it,df])=>`${it}="${df}"`).join(" "),V=`<${D.tag}${j?" "+j:""}>`,K=`</${D.tag}>`,at=(D.children||[]).map(it=>O(it)).join("");return`${V}${D.editText||D.text||""}${at}${K}`}return O(a.element)}function q(O){var V;O.stopPropagation();const D=O.target,j=((V=D.firstChild)==null?void 0:V.nodeType)===Node.TEXT_NODE&&D.firstChild.nodeValue||"";if(j.length<f.value){o.value=!0,l.value=`最少输入 ${f.value} 个字符`;return}else if(j.length>E.value){o.value=!0,l.value=`最多输入 ${E.value} 个字符`;return}else o.value=!1,l.value="";a.element.editText=j,i("updateText",{element:a.element,newText:j}),i("contentUpdated",B())}function F(O){i("updateText",O),i("contentUpdated",B())}function k(){const O={...a.element};i("blockAction",{action:"add",element:a.element,newBlock:O})}function _(){i("blockAction",{action:"moveUp",element:a.element})}function w(){i("blockAction",{action:"moveDown",element:a.element})}function $(){i("blockAction",{action:"delete",element:a.element})}function ae(O){i("blockAction",O),i("contentUpdated",B())}function be(){T.value.openModal()}function Ae(O){i("addIcon",O,a.element),i("contentUpdated",B())}function Oe(O,D){i("addIcon",O,D),i("contentUpdated",B())}let ge;const he=c.ref(),x=c.ref({});function L(O,D){if(D.rule.minImageWidth&&D.rule.maxImageHeight?(x.value.width=D.rule.minImageWidth,x.value.height=D.rule.maxImageHeight,x.value.aspectRatio=D.rule.minImageWidth/D.rule.maxImageHeight):x.value={},O){O.name;const j=new FileReader;j.onload=V=>{var K;ge=(K=V==null?void 0:V.target)==null?void 0:K.result,he.value.handleOpenCropper(x.value,ge,O.name)},j.readAsDataURL(O)}}function Y(O,D){if(console.log(typeof O=="object",O),O)if(typeof O=="object"){D.attrs.alt=O.name;const j=new FileReader;j.onload=V=>{var at;let K=(at=V==null?void 0:V.target)==null?void 0:at.result;D.attrs.src=K,i("upload",K,D),i("contentUpdated",B())},j.readAsDataURL(O)}else D.attrs.src=O,i("upload",O,D),i("contentUpdated",B())}const G=async O=>{};return(O,D)=>{const j=c.resolveComponent("ElementRenderer",!0);return c.openBlock(),c.createElementBlock(c.Fragment,null,[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(a.element.tag),c.mergeProps({class:[" ",r.value?"border-dashed border-[1px] border-blue-500":"",n.value?"border-dashed border-[1px] border-green-500 z-10":"",o.value?"border-dashed border-[1px] border-red-500":"",(!r.value&&!n.value&&!o.value,"")]},a.element.attrs,{contenteditable:u.value,onClick:D[1]||(D[1]=c.withModifiers(()=>b(a.element),["stop"])),onMouseenter:D[2]||(D[2]=()=>y(a.element)),onMouseleave:P,onBlur:X,onInput:q}),{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a.element.editText||a.element.text),1),a.element.children&&a.element.children.length?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[a.element.type===c.unref(de).Block?(c.openBlock(),c.createElementBlock("div",Uh,[c.createElementVNode("span",Fh,c.toDisplayString(a.element.editText||a.element.text),1),c.createElementVNode("div",Hh,[c.createElementVNode("span",{onClick:c.withModifiers(_,["stop"])},"排前"),c.createElementVNode("span",{onClick:c.withModifiers(w,["stop"])},"排后"),c.createElementVNode("span",{onClick:c.withModifiers($,["stop"])},"删除")])])):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.element.children,(V,K)=>(c.openBlock(),c.createBlock(j,{icons:e.icons,key:K,element:V,selectedElement:a.selectedElement,hoveredElement:a.hoveredElement,onSelectElement:N,onHoverElement:S,onUpdateText:F,onBlockAction:ae,onAddIcon:Oe,onUpload:Y},null,8,["icons","element","selectedElement","hoveredElement"]))),128)),a.element.type===c.unref(de).Block?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("span",{class:"iconfont icon-a-tianjiaxian icon_gray_add",onClick:c.withModifiers(k,["stop"]),contenteditable:"false"}),c.createElementVNode("div",{class:"add_modules",onClick:c.withModifiers(k,["stop"]),contenteditable:"false"},D[7]||(D[7]=[c.createElementVNode("span",{class:"iconfont icon-a-tianjiamian"},null,-1),c.createElementVNode("span",null,"添加模块",-1)])),c.createElementVNode("div",{class:"cont_aidition",contenteditable:"false",onClick:D[0]||(D[0]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{onClick:c.withModifiers(_,["stop"]),class:"iconfont icon-paiqian"}),c.createElementVNode("span",{onClick:c.withModifiers(w,["stop"]),class:"iconfont icon-paihou"}),c.createElementVNode("span",{onClick:c.withModifiers($,["stop"]),class:"iconfont icon-shanchu"}),c.createElementVNode("span",{onClick:c.withModifiers(k,["stop"]),class:"iconfont icon-a-tianjiaxian"})])],64)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)]),_:1},16,["class","contenteditable"])),a.element.type==c.unref(de).Text&&o.value?(c.openBlock(),c.createElementBlock("div",Yh,c.toDisplayString(l.value),1)):c.createCommentVNode("",!0),a.element.type===c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",{key:1,class:"absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",onClick:D[3]||(D[3]=c.withModifiers(()=>{},["stop"]))},[D[8]||(D[8]=c.createElementVNode("span",{contenteditable:"false",class:"cursor-pointer"},"上传图片",-1)),c.createVNode(Od,{customUpload:V=>L(V,a.element),height:a.element.rule.maxImageHeight,width:a.element.rule.minImageWidth,uploadByImage:G},null,8,["customUpload","height","width"])])):c.createCommentVNode("",!0),a.element.type===c.unref(de).Icon?(c.openBlock(),c.createElementBlock("div",{key:2,class:"absolute -top-6 left-0 bg-white py-0.5 px-1 rounded shadow z-10",onClick:D[5]||(D[5]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{onClick:D[4]||(D[4]=c.withModifiers(V=>be(),["stop"])),contenteditable:"false",class:"cursor-pointer"},"选择图标")])):c.createCommentVNode("",!0),c.createVNode(xd,{icons:e.icons,ref_key:"iconRef",ref:T,onOk:Ae},null,8,["icons"]),c.createVNode(Bh,{ref_key:"cropperRef",ref:he,onOk:D[6]||(D[6]=V=>Y(V,a.element))},null,512)],64)}}}),[["__scopeId","data-v-f26b78b2"]]),qh={key:0},Wh={key:0},Xh={key:1},Gh={key:2},$h={key:3},Qh={key:4},jh={key:5},zh={key:6},Kh={key:7},Zh={key:8},Jh=c.defineComponent({__name:"EditorPanel",props:{element:Object},emits:["updateElement"],setup(e,{emit:t}){const a=e,i=t,n=c.ref({rule:{},...a.element});c.watch(()=>a.element,u=>{n.value={rule:{},...u}},{immediate:!0});function r(){i("updateElement",n.value)}return(u,o)=>(c.openBlock(),c.createElementBlock("div",null,[n.value?(c.openBlock(),c.createElementBlock("div",qh,[n.value.text!==void 0?(c.openBlock(),c.createElementBlock("div",Wh,[o[13]||(o[13]=c.createElementVNode("label",{class:"block mt-4"},"内容",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value.text=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.text]])])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[14]||(o[14]=c.createElementVNode("label",{class:"block mt-4"},"节点",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=l=>n.value.xpath=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.xpath]])]),c.createElementVNode("div",null,[o[16]||(o[16]=c.createElementVNode("label",{class:"block mt-4"},"节点类型",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[2]||(o[2]=l=>n.value.type=l),class:"border rounded p-2 w-full"},o[15]||(o[15]=[c.createElementVNode("option",{value:0},"无",-1),c.createElementVNode("option",{value:1},"文本",-1),c.createElementVNode("option",{value:2},"图片",-1),c.createElementVNode("option",{value:3},"视频",-1),c.createElementVNode("option",{value:4},"图标",-1),c.createElementVNode("option",{value:5},"链接",-1),c.createElementVNode("option",{value:10},"块",-1)]),512),[[c.vModelSelect,n.value.type]])]),n.value.type==c.unref(de).Text?(c.openBlock(),c.createElementBlock("div",Xh,[o[17]||(o[17]=c.createElementVNode("label",{class:"block mt-4"},"最大文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=l=>n.value.rule.maxText=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.maxText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Text?(c.openBlock(),c.createElementBlock("div",Gh,[o[18]||(o[18]=c.createElementVNode("label",{class:"block mt-4"},"最小文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=l=>n.value.rule.minText=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.minText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",$h,[o[20]||(o[20]=c.createElementVNode("label",{class:"block mt-4"},"是否裁剪",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[5]||(o[5]=l=>n.value.rule.crop=l),class:"border rounded p-2 w-full"},o[19]||(o[19]=[c.createElementVNode("option",{value:!0},"是",-1),c.createElementVNode("option",{value:!1},"否",-1)]),512),[[c.vModelSelect,n.value.rule.crop]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",Qh,[o[21]||(o[21]=c.createElementVNode("label",{class:"block mt-4"},"图片宽度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[6]||(o[6]=l=>n.value.rule.minImageWidth=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.minImageWidth]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Image?(c.openBlock(),c.createElementBlock("div",jh,[o[22]||(o[22]=c.createElementVNode("label",{class:"block mt-4"},"图片高度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=l=>n.value.rule.maxImageHeight=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.maxImageHeight]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Block?(c.openBlock(),c.createElementBlock("div",zh,[o[23]||(o[23]=c.createElementVNode("label",{class:"block mt-4"},"块最小数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[8]||(o[8]=l=>n.value.rule.minBlock=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.minBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Block?(c.openBlock(),c.createElementBlock("div",Kh,[o[24]||(o[24]=c.createElementVNode("label",{class:"block mt-4"},"块最大数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[9]||(o[9]=l=>n.value.rule.maxBlock=l),class:"border rounded p-2 w-full"},null,512),[[c.vModelText,n.value.rule.maxBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(de).Text||n.value.type==c.unref(de).Icon?(c.openBlock(),c.createElementBlock("div",Zh,[o[26]||(o[26]=c.createElementVNode("label",{class:"block mt-4"},"颜色/主题色",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[10]||(o[10]=l=>n.value.rule.isThemeColor=l),class:"border rounded p-2 w-full"},o[25]||(o[25]=[c.createElementVNode("option",{value:!0},"是",-1),c.createElementVNode("option",{value:!1},"否",-1)]),512),[[c.vModelSelect,n.value.rule.isThemeColor]])])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[28]||(o[28]=c.createElementVNode("label",{class:"block mt-4"},"是否必填",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[11]||(o[11]=l=>n.value.rule.isRequired=l),class:"border rounded p-2 w-full"},o[27]||(o[27]=[c.createElementVNode("option",{value:!0},"是",-1),c.createElementVNode("option",{value:!1},"否",-1)]),512),[[c.vModelSelect,n.value.rule.isRequired]])]),c.createElementVNode("div",null,[o[30]||(o[30]=c.createElementVNode("label",{class:"block mt-4"},"是否只读",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[12]||(o[12]=l=>n.value.rule.isReadOnly=l),class:"border rounded p-2 w-full"},o[29]||(o[29]=[c.createElementVNode("option",{value:!0},"是",-1),c.createElementVNode("option",{value:!1},"否",-1)]),512),[[c.vModelSelect,n.value.rule.isReadOnly]])])])):c.createCommentVNode("",!0),c.createElementVNode("button",{onClick:r,class:"mt-4 p-2 bg-blue-500 text-white rounded"},"保存")]))}}),ef={class:"flex h-screen"},tf={class:"goodschool_mobile"},af=["innerHTML"],nf=["innerHTML"],sf={class:"flex-1 bg-gray-100 overflow-auto"},rf={class:"p-4"},uf={key:0,class:"text-red-500 text-xs mt-2"},of={key:0,class:"resize-area border-l overflow-auto w-[375px]"},cf={class:"p-4"},ur=Ei(c.defineComponent({__name:"Designer",props:{mode:{default:"design"},template:{},css:{},previewWidth:{default:375},uploadByFile:{},icons:{}},setup(e){const t=e,a=c.ref(t.template);c.watch(()=>t.template,x=>{a.value=x},{immediate:!0}),c.watch(()=>a.value,x=>{x&&(n.value=y(x))},{immediate:!0}),c.watch(()=>t.css,x=>{x.forEach(L=>{if(document.querySelector(`link[href="${L}"]`))return;const Y=document.createElement("link");Y.rel="stylesheet",Y.href=L,document.head.appendChild(Y)})},{immediate:!0});const i=c.ref(t.mode),n=c.ref(),r=c.ref(),u=c.ref(),o=c.ref("");let l=Os("",{},!1);function f(x){console.log("选择",x),r.value=x}function E(x,L=""){if(L){const Y=T(n.value,L);Y?u.value=Y:u.value=x}else u.value=x}function T(x,L){if(x.xpath===L)return x;if(x.children&&x.children.length)for(const Y of x.children){const G=T(Y,L);if(G)return G}}function b(x){var L,Y,G;if(console.log(x,r.value),r.value)if(r.value.rule=x.rule,r.value.type=x.type,(L=x.rule)!=null&&L.isThemeColor?(x.attrs.class+=" ys_tit_color",x.attrs.style&&(x.attrs.style=void 0)):((Y=x.attrs.class)!=null&&Y.includes(" ys_tit_color")&&(x.attrs.class=x.attrs.class.replace(" ys_tit_color"," ")),x.rule.color&&(x.attrs.style={color:x.rule.color})),r.value.type===de.Block){const O=T(n.value,r.value.parentxpath||"");O&&O.children&&O.children.forEach(D=>{var j;D.tag===r.value.tag&&(D.rule=x.rule,D.type=x.type,(j=D.attrs.class)!=null&&j.includes(" mb40")||(D.attrs.class+=" mb40"))})}else(G=r.value.attrs.class)!=null&&G.includes(" mb40")&&(r.value.attrs.class=r.value.attrs.class.replace(" mb40"," "))}const N=c.ref("");function S(x){N.value=x}function y(x){l=Os(x);const L=l("body").children().toArray().map(Y=>P(l(Y)));return console.log(L[0]),L[0]}function P(x,L=""){function Y(D){if(!D||!D[0])return"";const j=[];let V=D;for(;V.length&&V[0].tagName!=="html";){const K=V[0].tagName,it=V.parent().children(K).index(V)+1;j.unshift(`${K}[${it}]`),V=V.parent()}return"/html/"+j.join("/")}const G=Y(x).replace("/html/body[1]",""),O=x.children().toArray().map(D=>P(l(D),G));return{tag:x[0].tagName,text:x.contents().not(x.children()).text().trim(),attrs:x[0].attribs,children:O,xpath:G,parentxpath:L,rule:{}}}function X(x){console.log("更新子节点的文本",x);const L=T(n.value,x.element.xpath);L&&(L.editText=x.newText)}function B(x,L=""){function Y(G,O){var V;const j=(O?((V=T(n.value,O))==null?void 0:V.children)||[]:[n.value]).filter(K=>K.tag===G.tag).indexOf(G)+1;return`${O}/${G.tag}[${j}]`}x.xpath=Y(x,L),x.parentxpath=L,(x.children||[]).forEach(G=>B(G,x.xpath))}function q({action:x,element:L,newBlock:Y}){console.log("块操作",x,L,Y);const G=T(n.value,L.parentxpath||"");if(!G||!G.children)return;const O=G.children.findIndex(K=>K===L);if(O===-1)return;const D=G.children.length,{minBlock:j,maxBlock:V}=L.rule;if((x==="add"||x==="copy")&&D>=(V||1/0)){o.value=`无法添加更多块。最大块数量为 ${V}`;return}switch(x){case"add":if(Y){const K={...Y,xpath:"",children:JSON.parse(JSON.stringify(Y.children))};G.children.splice(O+1,0,K)}break;case"copy":if(Y){const K={...Y,xpath:"",children:JSON.parse(JSON.stringify(Y.children))};G.children.splice(O+1,0,K)}break;case"moveUp":if(O>0){const[K]=G.children.splice(O,1);G.children.splice(O-1,0,K)}break;case"moveDown":if(O<G.children.length-1){const[K]=G.children.splice(O,1);G.children.splice(O+1,0,K)}break;case"delete":if(D<=(j||0)){o.value=`无法删除更多块。最小块数量为 ${j}`;return}G.children.splice(O,1);break}o.value="",B(n.value)}function F(x,L){let Y=L.attrs.class.replace(/icon-\S+/g,`icon-${x}`);L.attrs.class=Y}function k(x,L){L.attrs.src=x}const _=c.ref(t.previewWidth),w=c.ref(375);let $=c.ref(!1),ae=c.ref(""),be=0,Ae=0;function Oe(x){ae.value=x,$.value=!0,be=event.clientX,Ae=_.value,window.addEventListener("mousemove",ge),window.addEventListener("mouseup",he)}function ge(x){if(!$.value)return;const L=x.clientX-be;ae.value==="preview"?_.value=Math.max(200,Ae+L):ae.value==="structure"&&(w.value=Math.max(200,Ae-L))}function he(){$.value=!1,ae.value="",window.removeEventListener("mousemove",ge),window.removeEventListener("mouseup",he)}return(x,L)=>(c.openBlock(),c.createElementBlock("div",ef,[c.createElementVNode("div",{class:"border-l overflow-auto resize-area",style:c.normalizeStyle({width:_.value+"px"})},[c.createElementVNode("div",tf,[L[1]||(L[1]=c.createElementVNode("h2",{class:"text-lg font-bold"},"实时预览",-1)),N.value?(c.openBlock(),c.createElementBlock("div",{key:0,innerHTML:N.value},null,8,af)):(c.openBlock(),c.createElementBlock("div",{key:1,innerHTML:c.unref(l)("body").html()},null,8,nf))])],4),c.createElementVNode("div",{class:"resizer",onMousedown:L[0]||(L[0]=Y=>Oe("preview"))},null,32),c.createElementVNode("div",sf,[c.createElementVNode("div",rf,[L[2]||(L[2]=c.createElementVNode("div",{class:"flex justify-between"},[c.createElementVNode("h2",{class:"text-lg font-bold"},"结构渲染")],-1)),o.value?(c.openBlock(),c.createElementBlock("div",uf,c.toDisplayString(o.value),1)):c.createCommentVNode("",!0),n.value?(c.openBlock(),c.createBlock(Vh,{key:1,icons:x.icons,element:n.value,selectedElement:r.value,hoveredElement:u.value,onSelectElement:f,onHoverElement:E,onContentUpdated:S,onUpdateText:X,onBlockAction:q,onAddIcon:F,onUpload:k},null,8,["icons","element","selectedElement","hoveredElement"])):c.createCommentVNode("",!0)])]),i.value=="design"?(c.openBlock(),c.createElementBlock("div",of,[c.createElementVNode("div",cf,[L[3]||(L[3]=c.createElementVNode("h2",{class:"text-lg font-bold"},"节点属性",-1)),r.value?(c.openBlock(),c.createBlock(Jh,{key:0,element:r.value,onUpdateElement:b},null,8,["element"])):c.createCommentVNode("",!0)])])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3755c983"]]),lf={install(e){e.component("Designer",ur)}};we.Designer=ur,we.default=lf,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|