gp-designer 1.0.35 → 1.0.36
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/dist/gp-designer.es.js +1974 -1845
- package/dist/gp-designer.umd.js +7 -7
- package/dist/style.css +2 -2
- package/package.json +1 -1
package/dist/gp-designer.umd.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
(function(Xe,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(Xe=typeof globalThis<"u"?globalThis:Xe||self,c(Xe.GpWebModule={},Xe.Vue))})(this,function(Xe,c){"use strict";var $;(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"})($||($={}));function Or(e){return e.type===$.Tag||e.type===$.Script||e.type===$.Style}const Dr=$.Root,Lr=$.Text,yr=$.Directive,Rr=$.Comment,kr=$.Script,Mr=$.Style,Pr=$.Tag,vr=$.CDATA,Br=$.Doctype;let zi=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 yt(this,t)}};class Fa extends zi{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class Lt extends Fa{constructor(){super(...arguments),this.type=$.Text}get nodeType(){return 3}}class Ha extends Fa{constructor(){super(...arguments),this.type=$.Comment}get nodeType(){return 8}}class Va extends Fa{constructor(t,a){super(a),this.name=t,this.type=$.Directive}get nodeType(){return 1}}class Ya extends zi{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 Ki extends Ya{constructor(){super(...arguments),this.type=$.CDATA}get nodeType(){return 4}}class it extends Ya{constructor(){super(...arguments),this.type=$.Root}get nodeType(){return 9}}class qa extends Ya{constructor(t,a,i=[],n=t==="script"?$.Script:t==="style"?$.Style:$.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 P(e){return Or(e)}function na(e){return e.type===$.CDATA}function ve(e){return e.type===$.Text}function sa(e){return e.type===$.Comment}function Wa(e){return e.type===$.Directive}function Qe(e){return e.type===$.Root}function re(e){return Object.prototype.hasOwnProperty.call(e,"children")}function yt(e,t=!1){let a;if(ve(e))a=new Lt(e.data);else if(sa(e))a=new Ha(e.data);else if(P(e)){const i=t?$a(e.children):[],n=new qa(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(na(e)){const i=t?$a(e.children):[],n=new Ki(i);i.forEach(r=>r.parent=n),a=n}else if(Qe(e)){const i=t?$a(e.children):[],n=new it(i);i.forEach(r=>r.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),a=n}else if(Wa(e)){const i=new Va(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 $a(e){const t=e.map(a=>yt(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 Zi={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class wr{constructor(t,a,i){this.dom=[],this.root=new it(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof a=="function"&&(i=a,a=Zi),typeof t=="object"&&(a=t,t=void 0),this.callback=t??null,this.options=a??Zi,this.elementCB=i??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new it(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?$.Tag:void 0,n=new qa(t,a,void 0,i);this.addNode(n),this.tagStack.push(n)}ontext(t){const{lastNode:a}=this;if(a&&a.type===$.Text)a.data+=t,this.options.withEndIndices&&(a.endIndex=this.parser.endIndex);else{const i=new Lt(t);this.addNode(i),this.lastNode=i}}oncomment(t){if(this.lastNode&&this.lastNode.type===$.Comment){this.lastNode.data+=t;return}const a=new Ha(t);this.addNode(a),this.lastNode=a}oncommentend(){this.lastNode=null}oncdatastart(){const t=new Lt(""),a=new Ki([t]);this.addNode(a),t.parent=a,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,a){const i=new Va(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 Ga=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))),Ji=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Xa;const Ur=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]]),Qa=(Xa=String.fromCodePoint)!==null&&Xa!==void 0?Xa: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 Fr(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ur.get(e))!==null&&t!==void 0?t:e}var ue;(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"})(ue||(ue={}));const Hr=32;var je;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(je||(je={}));function ja(e){return e>=ue.ZERO&&e<=ue.NINE}function Vr(e){return e>=ue.UPPER_A&&e<=ue.UPPER_F||e>=ue.LOWER_A&&e<=ue.LOWER_F}function Yr(e){return e>=ue.UPPER_A&&e<=ue.UPPER_Z||e>=ue.LOWER_A&&e<=ue.LOWER_Z||ja(e)}function qr(e){return e===ue.EQUALS||Yr(e)}var oe;(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"})(oe||(oe={}));var xe;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(xe||(xe={}));class za{constructor(t,a,i){this.decodeTree=t,this.emitCodePoint=a,this.errors=i,this.state=oe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=xe.Strict}startEntity(t){this.decodeMode=t,this.state=oe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case oe.EntityStart:return t.charCodeAt(a)===ue.NUM?(this.state=oe.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=oe.NamedEntity,this.stateNamedEntity(t,a));case oe.NumericStart:return this.stateNumericStart(t,a);case oe.NumericDecimal:return this.stateNumericDecimal(t,a);case oe.NumericHex:return this.stateNumericHex(t,a);case oe.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|Hr)===ue.LOWER_X?(this.state=oe.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=oe.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(ja(n)||Vr(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(ja(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===ue.SEMI)this.consumed+=1;else if(this.decodeMode===xe.Strict)return 0;return this.emitCodePoint(Fr(this.result),this.consumed),this.errors&&(t!==ue.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&je.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const u=t.charCodeAt(a);if(this.treeIndex=Wr(i,n,this.treeIndex+Math.max(1,r),u),this.treeIndex<0)return this.result===0||this.decodeMode===xe.Attribute&&(r===0||qr(u))?0:this.emitNotTerminatedNamedEntity();if(n=i[this.treeIndex],r=(n&je.VALUE_LENGTH)>>14,r!==0){if(u===ue.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==xe.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]&je.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]&~je.VALUE_LENGTH:n[t+1],i),a===3&&this.emitCodePoint(n[t+2],i),i}end(){var t;switch(this.state){case oe.NamedEntity:return this.result!==0&&(this.decodeMode!==xe.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case oe.NumericDecimal:return this.emitNumericEntity(0,2);case oe.NumericHex:return this.emitNumericEntity(0,3);case oe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case oe.EntityStart:return 0}}}function en(e){let t="";const a=new za(e,i=>t+=Qa(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 h=a.write(n,o+1);if(h<0){u=o+a.end();break}u=o+h,o=h===0?u+1:u}const l=t+n.slice(u);return t="",l}}function Wr(e,t,a,i){const n=(t&je.BRANCH_LENGTH)>>7,r=t&je.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,h=e[l];if(h<i)u=l+1;else if(h>i)o=l-1;else return e[l+n]}return-1}en(Ga),en(Ji);const tn=/["&'<>$\x80-\uFFFF]/g,$r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),Gr=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 an(e){let t="",a=0,i;for(;(i=tn.exec(e))!==null;){const n=i.index,r=e.charCodeAt(n),u=$r.get(r);u!==void 0?(t+=e.substring(a,n)+u,a=n+1):(t+=`${e.substring(a,n)}&#x${Gr(e,n).toString(16)};`,a=tn.lastIndex+=+((r&64512)===55296))}return t+e.substr(a)}function nn(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 sn=nn(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),rn=nn(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),Xr=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])),Qr=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])),jr=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function zr(e){return e.replace(/"/g,""")}function Kr(e,t){var a;if(!e)return;const i=((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)===!1?zr:t.xmlMode||t.encodeEntities!=="utf8"?an:sn;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=Qr.get(n))!==null&&u!==void 0?u:n),!t.emptyAttrs&&!t.xmlMode&&o===""?n:`${n}="${i(o)}"`}).join(" ")}const un=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function ra(e,t={}){const a="length"in e?e:[e];let i="";for(let n=0;n<a.length;n++)i+=Zr(a[n],t);return i}function Zr(e,t){switch(e.type){case Dr:return ra(e.children,t);case Br:case yr:return au(e);case Rr:return su(e);case vr:return nu(e);case kr:case Mr:case Pr:return tu(e,t);case Lr:return iu(e,t)}}const Jr=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),eu=new Set(["svg","math"]);function tu(e,t){var a;t.xmlMode==="foreign"&&(e.name=(a=Xr.get(e.name))!==null&&a!==void 0?a:e.name,e.parent&&Jr.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&eu.has(e.name)&&(t={...t,xmlMode:"foreign"});let i=`<${e.name}`;const n=Kr(e.attribs,t);return n&&(i+=` ${n}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&un.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=ra(e.children,t)),(t.xmlMode||!un.has(e.name))&&(i+=`</${e.name}>`)),i}function au(e){return`<${e.data}>`}function iu(e,t){var a;let i=e.data||"";return((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&jr.has(e.parent.name))&&(i=t.xmlMode||t.encodeEntities!=="utf8"?an(i):rn(i)),i}function nu(e){return`<![CDATA[${e.children[0].data}]]>`}function su(e){return`<!--${e.data}-->`}function on(e,t){return ra(e,t)}function ru(e,t){return re(e)?e.children.map(a=>on(a,t)).join(""):""}function ua(e){return Array.isArray(e)?e.map(ua).join(""):P(e)?e.name==="br"?`
|
2
|
-
`:ua(e.children):na(e)?ua(e.children):ve(e)?e.data:""}function pt(e){return Array.isArray(e)?e.map(pt).join(""):re(e)&&!sa(e)?pt(e.children):ve(e)?e.data:""}function oa(e){return Array.isArray(e)?e.map(oa).join(""):re(e)&&(e.type===$.Tag||na(e))?oa(e.children):ve(e)?e.data:""}function ca(e){return re(e)?e.children:[]}function cn(e){return e.parent||null}function ln(e){const t=cn(e);if(t!=null)return ca(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 uu(e,t){var a;return(a=e.attribs)===null||a===void 0?void 0:a[t]}function ou(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function cu(e){return e.name}function Ka(e){let{next:t}=e;for(;t!==null&&!P(t);)({next:t}=t);return t}function Za(e){let{prev:t}=e;for(;t!==null&&!P(t);)({prev:t}=t);return t}function nt(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 lu(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 du(e,t){if(nt(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 hu(e,t){nt(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 fu(e,t){if(nt(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 mu(e,t){nt(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 la(e,t,a=!0,i=1/0){return Ja(e,Array.isArray(t)?t:[t],a,i)}function Ja(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&&re(o)&&o.children.length>0&&(u.unshift(0),r.unshift(o.children))}}function Eu(e,t){return t.find(e)}function ei(e,t,a=!0){let i=null;for(let n=0;n<t.length&&!i;n++){const r=t[n];if(P(r))e(r)?i=r:a&&r.children.length>0&&(i=ei(e,r.children,!0));else continue}return i}function dn(e,t){return t.some(a=>P(a)&&(e(a)||dn(e,a.children)))}function pu(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]++];P(r)&&(e(r)&&a.push(r),r.children.length>0&&(n.unshift(0),i.unshift(r.children)))}}const da={tag_name(e){return typeof e=="function"?t=>P(t)&&e(t.name):e==="*"?P:t=>P(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=>ve(t)&&e(t.data):t=>ve(t)&&t.data===e}};function hn(e,t){return typeof t=="function"?a=>P(a)&&t(a.attribs[e]):a=>P(a)&&a.attribs[e]===t}function Tu(e,t){return a=>e(a)||t(a)}function fn(e){const t=Object.keys(e).map(a=>{const i=e[a];return Object.prototype.hasOwnProperty.call(da,a)?da[a](i):hn(a,i)});return t.length===0?null:t.reduce(Tu)}function bu(e,t){const a=fn(e);return a?a(t):!0}function gu(e,t,a,i=1/0){const n=fn(e);return n?la(n,t,a,i):[]}function _u(e,t,a=!0){return Array.isArray(t)||(t=[t]),ei(hn("id",e),t,a)}function Tt(e,t,a=!0,i=1/0){return la(da.tag_name(e),t,a,i)}function Au(e,t,a=!0,i=1/0){return la(da.tag_type(e),t,a,i)}function Nu(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 Oe;(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"})(Oe||(Oe={}));function mn(e,t){const a=[],i=[];if(e===t)return 0;let n=re(e)?e:e.parent;for(;n;)a.unshift(n),n=n.parent;for(n=re(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 Oe.DISCONNECTED;const o=a[u-1],l=o.children,h=a[u],m=i[u];return l.indexOf(h)>l.indexOf(m)?o===t?Oe.FOLLOWING|Oe.CONTAINED_BY:Oe.FOLLOWING:o===e?Oe.PRECEDING|Oe.CONTAINS:Oe.PRECEDING}function bt(e){return e=e.filter((t,a,i)=>!i.includes(t,a+1)),e.sort((t,a)=>{const i=mn(t,a);return i&Oe.PRECEDING?-1:i&Oe.FOLLOWING?1:0}),e}function Cu(e){const t=ha(Du,e);return t?t.name==="feed"?Iu(t):Su(t):null}function Iu(e){var t;const a=e.children,i={type:"atom",items:Tt("entry",a).map(u=>{var o;const{children:l}=u,h={media:En(l)};pe(h,"id","id",l),pe(h,"title","title",l);const m=(o=ha("link",l))===null||o===void 0?void 0:o.attribs.href;m&&(h.link=m);const p=ze("summary",l)||ze("content",l);p&&(h.description=p);const T=ze("updated",l);return T&&(h.pubDate=new Date(T)),h})};pe(i,"id","id",a),pe(i,"title","title",a);const n=(t=ha("link",a))===null||t===void 0?void 0:t.attribs.href;n&&(i.link=n),pe(i,"description","subtitle",a);const r=ze("updated",a);return r&&(i.updated=new Date(r)),pe(i,"author","email",a,!0),i}function Su(e){var t,a;const i=(a=(t=ha("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:Tt("item",e.children).map(u=>{const{children:o}=u,l={media:En(o)};pe(l,"id","guid",o),pe(l,"title","title",o),pe(l,"link","link",o),pe(l,"description","description",o);const h=ze("pubDate",o)||ze("dc:date",o);return h&&(l.pubDate=new Date(h)),l})};pe(n,"title","title",i),pe(n,"link","link",i),pe(n,"description","description",i);const r=ze("lastBuildDate",i);return r&&(n.updated=new Date(r)),pe(n,"author","managingEditor",i,!0),n}const xu=["url","type","lang"],Ou=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function En(e){return Tt("media:content",e).map(t=>{const{attribs:a}=t,i={medium:a.medium,isDefault:!!a.isDefault};for(const n of xu)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 ha(e,t){return Tt(e,t,!0,1)[0]}function ze(e,t,a=!1){return pt(Tt(e,t,a,1)).trim()}function pe(e,t,a,i,n=!1){const r=ze(a,i,n);r&&(e[t]=r)}function Du(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const fa=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return Oe},append:hu,appendChild:du,compareDocumentPosition:mn,existsOne:dn,filter:la,find:Ja,findAll:pu,findOne:ei,findOneChild:Eu,getAttributeValue:uu,getChildren:ca,getElementById:_u,getElements:gu,getElementsByTagName:Tt,getElementsByTagType:Au,getFeed:Cu,getInnerHTML:ru,getName:cu,getOuterHTML:on,getParent:cn,getSiblings:ln,getText:ua,hasAttrib:ou,hasChildren:re,innerText:oa,isCDATA:na,isComment:sa,isDocument:Qe,isTag:P,isText:ve,nextElementSibling:Ka,prepend:mu,prependChild:fu,prevElementSibling:Za,removeElement:nt,removeSubsets:Nu,replaceElement:lu,testElement:bu,textContent:pt,uniqueSort:bt},Symbol.toStringTag,{value:"Module"})),Lu={_useHtmlParser2:!1};function ti(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 pn(e,t,a){return e?e(t??e._root.children,null,void 0,a).toString():""}function yu(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function Ru(e,t){const a=yu(e)?(t=e,void 0):e,i={...this===null||this===void 0?void 0:this._options,...ti(t)};return pn(this,a,i)}function ku(e){const t={...this._options,xmlMode:!0};return pn(this,e,t)}function Rt(e){const t=e??(this?this.root():[]);let a="";for(let i=0;i<t.length;i++)a+=pt(t[i]);return a}function Mu(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 Pu(){return this(this._root)}function Tn(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 vu(e){return this.root().extract(e)}function Bu(e,t){if(!bn(e)||!bn(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 bn(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 wu=Object.freeze(Object.defineProperty({__proto__:null,contains:Tn,extract:vu,html:Ru,merge:Bu,parseHTML:Mu,root:Pu,text:Rt,xml:ku},Symbol.toStringTag,{value:"Module"}));function qe(e){return e.cheerio!=null}function Uu(e){return e.replace(/[._-](\w|$)/g,(t,a)=>a.toUpperCase())}function Fu(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function ee(e,t){const a=e.length;for(let i=0;i<a;i++)t(e[i],i);return e}var st;(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"})(st||(st={}));function ai(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const a=e.charCodeAt(t+1);return(a>=st.LowerA&&a<=st.LowerZ||a>=st.UpperA&&a<=st.UpperZ||a===st.Exclamation)&&e.includes(">",t+2)}const kt=Object.prototype.hasOwnProperty,Mt=/\s+/,ii="data-",ni=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Hu=/^{[^]*}$|^\[[^]*]$/;function ma(e,t,a){var i;if(!(!e||!P(e))){if((i=e.attribs)!==null&&i!==void 0||(e.attribs={}),!t)return e.attribs;if(kt.call(e.attribs,t))return!a&&ni.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return Rt(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function gt(e,t,a){a===null?Nn(e,t):e.attribs[t]=`${a}`}function Vu(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 ee(this,(a,i)=>{P(a)&>(a,e,t.call(a,i,a.attribs[e]))})}return ee(this,a=>{if(P(a))if(typeof e=="object")for(const i of Object.keys(e)){const n=e[i];gt(a,i,n)}else gt(a,e,t)})}return arguments.length>1?this:ma(this[0],e,this.options.xmlMode)}function gn(e,t,a){return t in e?e[t]:!a&&ni.test(t)?ma(e,t,!1)!==void 0:ma(e,t,a)}function si(e,t,a,i){t in e?e[t]=a:gt(e,t,!i&&ni.test(t)?a?"":null:`${a}`)}function Yu(e,t){var a;if(typeof e=="string"&&t===void 0){const i=this[0];if(!i||!P(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 oa(i);case"textContent":return pt(i);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return gn(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 ee(this,(i,n)=>{P(i)&&si(i,e,t.call(i,n,gn(i,e,this.options.xmlMode)),this.options.xmlMode)})}return ee(this,i=>{if(P(i))if(typeof e=="object")for(const n of Object.keys(e)){const r=e[n];si(i,n,r,this.options.xmlMode)}else si(i,e,t,this.options.xmlMode)})}}function _n(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 qu(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(ii))continue;const a=Uu(t.slice(ii.length));kt.call(e.data,a)||(e.data[a]=An(e.attribs[t]))}return e.data}function Wu(e,t){const a=ii+Fu(t),i=e.data;if(kt.call(i,t))return i[t];if(kt.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(Hu.test(e))try{return JSON.parse(e)}catch{}return e}function $u(e,t){var a;const i=this[0];if(!i||!P(i))return;const n=i;return(a=n.data)!==null&&a!==void 0||(n.data={}),e==null?qu(n):typeof e=="object"||t!==void 0?(ee(this,r=>{P(r)&&(typeof e=="object"?_n(r,e):_n(r,e,t))}),this):Wu(n,e)}function Gu(e){const t=arguments.length===0,a=this[0];if(!a||!P(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=>Rt(n.children)):i.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function Nn(e,t){!e.attribs||!kt.call(e.attribs,t)||delete e.attribs[t]}function Ea(e){return e?e.trim().split(Mt):[]}function Xu(e){const t=Ea(e);for(const a of t)ee(this,i=>{P(i)&&Nn(i,a)});return this}function Qu(e){return this.toArray().some(t=>{const a=P(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||Mt.test(a[i-1]))&&(n===a.length||Mt.test(a[n])))return!0}return!1})}function Cn(e){if(typeof e=="function")return ee(this,(i,n)=>{if(P(i)){const r=i.attribs.class||"";Cn.call([i],e.call(i,n,r))}});if(!e||typeof e!="string")return this;const t=e.split(Mt),a=this.length;for(let i=0;i<a;i++){const n=this[i];if(!P(n))continue;const r=ma(n,"class",!1);if(r){let u=` ${r} `;for(const o of t){const l=`${o} `;u.includes(` ${l}`)||(u+=l)}gt(n,"class",u.trim())}else gt(n,"class",t.join(" ").trim())}return this}function In(e){if(typeof e=="function")return ee(this,(n,r)=>{P(n)&&In.call([n],e.call(n,r,n.attribs.class||""))});const t=Ea(e),a=t.length,i=arguments.length===0;return ee(this,n=>{if(P(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 Sn(e,t){if(typeof e=="function")return ee(this,(u,o)=>{P(u)&&Sn.call([u],e.call(u,o,u.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const a=e.split(Mt),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(!P(o))continue;const l=Ea(o.attribs.class);for(let h=0;h<i;h++){const m=l.indexOf(a[h]);n>=0&&m<0?l.push(a[h]):n<=0&&m>=0&&l.splice(m,1)}o.attribs.class=l.join(" ")}return this}const ju=Object.freeze(Object.defineProperty({__proto__:null,addClass:Cn,attr:Vu,data:$u,hasClass:Qu,prop:Yu,removeAttr:Xu,removeClass:In,toggleClass:Sn,val:Gu},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 xn=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,zu=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Ku=new Map([[126,ne.Element],[94,ne.Start],[36,ne.End],[42,ne.Any],[33,ne.Not],[124,ne.Hyphen]]),Zu=new Set(["has","not","matches","is","where","host","host-context"]);function Pt(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 Ju=new Set(["contains","icontains"]);function eo(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 vt(e){return e.replace(zu,eo)}function ri(e){return e===39||e===34}function On(e){return e===32||e===9||e===10||e===12||e===13}function pa(e){const t=[],a=Dn(t,`${e}`,0);if(a<e.length)throw new Error(`Unmatched selector: ${e.slice(a)}`);return t}function Dn(e,t,a){let i=[];function n(T){const _=t.slice(a+T).match(xn);if(!_)throw new Error(`Expected name, found ${t.slice(a)}`);const[I]=_;return a+=T+I.length,vt(I)}function r(T){for(a+=T;a<t.length&&On(t.charCodeAt(a));)a++}function u(){a+=1;const T=a;let _=1;for(;_>0&&a<t.length;a++)t.charCodeAt(a)===40&&!o(a)?_++:t.charCodeAt(a)===41&&!o(a)&&_--;if(_)throw new Error("Parenthesis not matched");return vt(t.slice(T,a-1))}function o(T){let _=0;for(;t.charCodeAt(--T)===92;)_++;return(_&1)===1}function l(){if(i.length>0&&Pt(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function h(T){if(i.length>0&&i[i.length-1].type===R.Descendant){i[i.length-1].type=T;return}l(),i.push({type:T})}function m(T,_){i.push({type:R.Attribute,name:T,action:_,value:n(1),namespace:null,ignoreCase:"quirks"})}function p(){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 T=t.charCodeAt(a);switch(T){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:{h(R.Child),r(1);break}case 60:{h(R.Parent),r(1);break}case 126:{h(R.Sibling),r(1);break}case 43:{h(R.Adjacent),r(1);break}case 46:{m("class",ne.Element);break}case 35:{m("id",ne.Equals);break}case 91:{r(1);let _,I=null;t.charCodeAt(a)===124?_=n(1):t.startsWith("*|",a)?(I="*",_=n(2)):(_=n(0),t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==61&&(I=_,_=n(1))),r(0);let L=ne.Exists;const y=Ku.get(t.charCodeAt(a));if(y){if(L=y,t.charCodeAt(a+1)!==61)throw new Error("Expected `=`");r(2)}else t.charCodeAt(a)===61&&(L=ne.Equals,r(1));let H="",v=null;if(L!=="exists"){if(ri(t.charCodeAt(a))){const U=t.charCodeAt(a);let A=a+1;for(;A<t.length&&(t.charCodeAt(A)!==U||o(A));)A+=1;if(t.charCodeAt(A)!==U)throw new Error("Attribute value didn't end");H=vt(t.slice(a+1,A)),a=A+1}else{const U=a;for(;a<t.length&&(!On(t.charCodeAt(a))&&t.charCodeAt(a)!==93||o(a));)a+=1;H=vt(t.slice(U,a))}r(0);const z=t.charCodeAt(a)|32;z===115?(v=!1,r(1)):z===105&&(v=!0,r(1))}if(t.charCodeAt(a)!==93)throw new Error("Attribute selector didn't terminate");a+=1;const w={type:R.Attribute,name:_,action:L,value:H,namespace:I,ignoreCase:v};i.push(w);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(1).toLowerCase();let I=null;if(t.charCodeAt(a)===40)if(Zu.has(_)){if(ri(t.charCodeAt(a+1)))throw new Error(`Pseudo-selector ${_} cannot be quoted`);if(I=[],a=Dn(I,t,a+1),t.charCodeAt(a)!==41)throw new Error(`Missing closing parenthesis in :${_} (${t})`);a+=1}else{if(I=u(),Ju.has(_)){const L=I.charCodeAt(0);L===I.charCodeAt(I.length-1)&&ri(L)&&(I=I.slice(1,-1))}I=vt(I)}i.push({type:R.Pseudo,name:_,data:I});break}case 44:{p(),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 _=null,I;if(T===42)a+=1,I="*";else if(T===124){if(I="",t.charCodeAt(a+1)===124){h(R.ColumnCombinator),r(2);break}}else if(xn.test(t.slice(a)))I=n(0);else break e;t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==124&&(_=I,t.charCodeAt(a+1)===42?(I="*",a+=2):I=n(1)),i.push(I==="*"?{type:R.Universal,namespace:_}:{type:R.Tag,name:I,namespace:_})}}}return p(),a}function to(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ta={trueFunc:function(){return!0},falseFunc:function(){return!1}};const V=to(Ta),Ln=new Map([[R.Universal,50],[R.Tag,30],[R.Attribute,1],[R.Pseudo,0]]);function ui(e){return!Ln.has(e.type)}const ao=new Map([[ne.Exists,10],[ne.Equals,8],[ne.Not,7],[ne.Start,6],[ne.End,6],[ne.Any,5]]);function io(e){const t=e.map(yn);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 yn(e){var t,a;let i=(t=Ln.get(e.type))!==null&&t!==void 0?t:-1;return e.type===R.Attribute?(i=(a=ao.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(yn)))),i<0&&(i=0)):i=2:i=3),i}const no=/[-[\]{}()*+?.,\\^$|#\s]/g;function Rn(e){return e.replace(no,"\\$&")}const so=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 rt(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&so.has(e.name)}const ro={equals(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return rt(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 rt(t,a)?(r=r.toLowerCase(),function(l){const h=i.getAttributeValue(l,n);return h!=null&&(h.length===u||h.charAt(u)==="-")&&h.substr(0,u).toLowerCase()===r&&e(l)}):function(l){const h=i.getAttributeValue(l,n);return h!=null&&(h.length===u||h.charAt(u)==="-")&&h.substr(0,u)===r&&e(l)}},element(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(/\s/.test(r))return V.falseFunc;const u=new RegExp(`(?:^|\\s)${Rn(r)}(?:$|\\s)`,rt(t,a)?"i":"");return function(l){const h=i.getAttributeValue(l,n);return h!=null&&h.length>=r.length&&u.test(h)&&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?V.falseFunc:rt(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?V.falseFunc:rt(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 V.falseFunc;if(rt(t,a)){const u=new RegExp(Rn(r),"i");return function(l){const h=i.getAttributeValue(l,n);return h!=null&&h.length>=r.length&&u.test(h)&&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):rt(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)}},uo=new Set([9,10,12,13,32]),kn=48,oo=57;function co(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 h=0;for(;t<e.length&&e.charCodeAt(t)>=kn&&e.charCodeAt(t)<=oo;)h=h*10+(e.charCodeAt(t)-kn),t++;return t===l?null:h}function o(){for(;t<e.length&&uo.has(e.charCodeAt(t));)t++}}function lo(e){const t=e[0],a=e[1]-1;if(a<0&&t<=0)return V.falseFunc;if(t===-1)return r=>r<=a;if(t===0)return r=>r===a;if(t===1)return a<0?V.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 ba(e){return lo(co(e))}function ga(e,t){return a=>{const i=t.getParent(a);return i!=null&&t.isTag(i)&&e(a)}}const oi={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=ba(t);return n===V.falseFunc?V.falseFunc:n===V.trueFunc?ga(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=0;h<o.length&&!i(u,o[h]);h++)a.isTag(o[h])&&l++;return n(l)&&e(u)}},"nth-last-child"(e,t,{adapter:a,equals:i}){const n=ba(t);return n===V.falseFunc?V.falseFunc:n===V.trueFunc?ga(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=o.length-1;h>=0&&!i(u,o[h]);h--)a.isTag(o[h])&&l++;return n(l)&&e(u)}},"nth-of-type"(e,t,{adapter:a,equals:i}){const n=ba(t);return n===V.falseFunc?V.falseFunc:n===V.trueFunc?ga(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=0;h<o.length;h++){const m=o[h];if(i(u,m))break;a.isTag(m)&&a.getName(m)===a.getName(u)&&l++}return n(l)&&e(u)}},"nth-last-of-type"(e,t,{adapter:a,equals:i}){const n=ba(t);return n===V.falseFunc?V.falseFunc:n===V.trueFunc?ga(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=o.length-1;h>=0;h--){const m=o[h];if(i(u,m))break;a.isTag(m)&&a.getName(m)===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?oi.root(e,t,a):i.length===1?r=>n(i[0],r)&&e(r):r=>i.includes(r)&&e(r)},hover:ci("isHovered"),visited:ci("isVisited"),active:ci("isActive")};function ci(e){return function(a,i,{adapter:n}){const r=n[e];return typeof r!="function"?V.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 Pn(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 ho={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
|
1
|
+
(function(Xe,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(Xe=typeof globalThis<"u"?globalThis:Xe||self,o(Xe.GpWebModule={},Xe.Vue))})(this,function(Xe,o){"use strict";var G;(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"})(G||(G={}));function Or(e){return e.type===G.Tag||e.type===G.Script||e.type===G.Style}const Dr=G.Root,Lr=G.Text,yr=G.Directive,Rr=G.Comment,kr=G.Script,Mr=G.Style,wr=G.Tag,Pr=G.CDATA,vr=G.Doctype;let Kn=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 yt(this,t)}};class Fa extends Kn{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class Lt extends Fa{constructor(){super(...arguments),this.type=G.Text}get nodeType(){return 3}}class Ha extends Fa{constructor(){super(...arguments),this.type=G.Comment}get nodeType(){return 8}}class Va extends Fa{constructor(t,a){super(a),this.name=t,this.type=G.Directive}get nodeType(){return 1}}class Ya extends Kn{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 Zn extends Ya{constructor(){super(...arguments),this.type=G.CDATA}get nodeType(){return 4}}class nt extends Ya{constructor(){super(...arguments),this.type=G.Root}get nodeType(){return 9}}class qa extends Ya{constructor(t,a,n=[],i=t==="script"?G.Script:t==="style"?G.Style:G.Tag){super(n),this.name=t,this.attribs=a,this.type=i}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,n;return{name:t,value:this.attribs[t],namespace:(a=this["x-attribsNamespace"])===null||a===void 0?void 0:a[t],prefix:(n=this["x-attribsPrefix"])===null||n===void 0?void 0:n[t]}})}}function P(e){return Or(e)}function ia(e){return e.type===G.CDATA}function Pe(e){return e.type===G.Text}function sa(e){return e.type===G.Comment}function Wa(e){return e.type===G.Directive}function Qe(e){return e.type===G.Root}function re(e){return Object.prototype.hasOwnProperty.call(e,"children")}function yt(e,t=!1){let a;if(Pe(e))a=new Lt(e.data);else if(sa(e))a=new Ha(e.data);else if(P(e)){const n=t?$a(e.children):[],i=new qa(e.name,{...e.attribs},n);n.forEach(r=>r.parent=i),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]={...e["x-attribsPrefix"]}),a=i}else if(ia(e)){const n=t?$a(e.children):[],i=new Zn(n);n.forEach(r=>r.parent=i),a=i}else if(Qe(e)){const n=t?$a(e.children):[],i=new nt(n);n.forEach(r=>r.parent=i),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),a=i}else if(Wa(e)){const n=new Va(e.name,e.data);e["x-name"]!=null&&(n["x-name"]=e["x-name"],n["x-publicId"]=e["x-publicId"],n["x-systemId"]=e["x-systemId"]),a=n}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 $a(e){const t=e.map(a=>yt(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 Jn={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class Br{constructor(t,a,n){this.dom=[],this.root=new nt(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof a=="function"&&(n=a,a=Jn),typeof t=="object"&&(a=t,t=void 0),this.callback=t??null,this.options=a??Jn,this.elementCB=n??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new nt(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 n=this.options.xmlMode?G.Tag:void 0,i=new qa(t,a,void 0,n);this.addNode(i),this.tagStack.push(i)}ontext(t){const{lastNode:a}=this;if(a&&a.type===G.Text)a.data+=t,this.options.withEndIndices&&(a.endIndex=this.parser.endIndex);else{const n=new Lt(t);this.addNode(n),this.lastNode=n}}oncomment(t){if(this.lastNode&&this.lastNode.type===G.Comment){this.lastNode.data+=t;return}const a=new Ha(t);this.addNode(a),this.lastNode=a}oncommentend(){this.lastNode=null}oncdatastart(){const t=new Lt(""),a=new Zn([t]);this.addNode(a),t.parent=a,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,a){const n=new Va(t,a);this.addNode(n)}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],n=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),n&&(t.prev=n,n.next=t),t.parent=a,this.lastNode=null}}const Ga=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))),ei=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Xa;const Ur=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]]),Qa=(Xa=String.fromCodePoint)!==null&&Xa!==void 0?Xa: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 Fr(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ur.get(e))!==null&&t!==void 0?t:e}var ue;(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"})(ue||(ue={}));const Hr=32;var je;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(je||(je={}));function ja(e){return e>=ue.ZERO&&e<=ue.NINE}function Vr(e){return e>=ue.UPPER_A&&e<=ue.UPPER_F||e>=ue.LOWER_A&&e<=ue.LOWER_F}function Yr(e){return e>=ue.UPPER_A&&e<=ue.UPPER_Z||e>=ue.LOWER_A&&e<=ue.LOWER_Z||ja(e)}function qr(e){return e===ue.EQUALS||Yr(e)}var oe;(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"})(oe||(oe={}));var xe;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(xe||(xe={}));class za{constructor(t,a,n){this.decodeTree=t,this.emitCodePoint=a,this.errors=n,this.state=oe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=xe.Strict}startEntity(t){this.decodeMode=t,this.state=oe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case oe.EntityStart:return t.charCodeAt(a)===ue.NUM?(this.state=oe.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=oe.NamedEntity,this.stateNamedEntity(t,a));case oe.NumericStart:return this.stateNumericStart(t,a);case oe.NumericDecimal:return this.stateNumericDecimal(t,a);case oe.NumericHex:return this.stateNumericHex(t,a);case oe.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|Hr)===ue.LOWER_X?(this.state=oe.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=oe.NumericDecimal,this.stateNumericDecimal(t,a))}addToNumericResult(t,a,n,i){if(a!==n){const r=n-a;this.result=this.result*Math.pow(i,r)+parseInt(t.substr(a,r),i),this.consumed+=r}}stateNumericHex(t,a){const n=a;for(;a<t.length;){const i=t.charCodeAt(a);if(ja(i)||Vr(i))a+=1;else return this.addToNumericResult(t,n,a,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,n,a,16),-1}stateNumericDecimal(t,a){const n=a;for(;a<t.length;){const i=t.charCodeAt(a);if(ja(i))a+=1;else return this.addToNumericResult(t,n,a,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,n,a,10),-1}emitNumericEntity(t,a){var n;if(this.consumed<=a)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ue.SEMI)this.consumed+=1;else if(this.decodeMode===xe.Strict)return 0;return this.emitCodePoint(Fr(this.result),this.consumed),this.errors&&(t!==ue.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,a){const{decodeTree:n}=this;let i=n[this.treeIndex],r=(i&je.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const u=t.charCodeAt(a);if(this.treeIndex=Wr(n,i,this.treeIndex+Math.max(1,r),u),this.treeIndex<0)return this.result===0||this.decodeMode===xe.Attribute&&(r===0||qr(u))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],r=(i&je.VALUE_LENGTH)>>14,r!==0){if(u===ue.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==xe.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:a,decodeTree:n}=this,i=(n[a]&je.VALUE_LENGTH)>>14;return this.emitNamedEntityData(a,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,n){const{decodeTree:i}=this;return this.emitCodePoint(a===1?i[t]&~je.VALUE_LENGTH:i[t+1],n),a===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case oe.NamedEntity:return this.result!==0&&(this.decodeMode!==xe.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case oe.NumericDecimal:return this.emitNumericEntity(0,2);case oe.NumericHex:return this.emitNumericEntity(0,3);case oe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case oe.EntityStart:return 0}}}function ti(e){let t="";const a=new za(e,n=>t+=Qa(n));return function(i,r){let u=0,c=0;for(;(c=i.indexOf("&",c))>=0;){t+=i.slice(u,c),a.startEntity(r);const h=a.write(i,c+1);if(h<0){u=c+a.end();break}u=c+h,c=h===0?u+1:u}const l=t+i.slice(u);return t="",l}}function Wr(e,t,a,n){const i=(t&je.BRANCH_LENGTH)>>7,r=t&je.JUMP_TABLE;if(i===0)return r!==0&&n===r?a:-1;if(r){const l=n-r;return l<0||l>=i?-1:e[a+l]-1}let u=a,c=u+i-1;for(;u<=c;){const l=u+c>>>1,h=e[l];if(h<n)u=l+1;else if(h>n)c=l-1;else return e[l+i]}return-1}ti(Ga),ti(ei);const ai=/["&'<>$\x80-\uFFFF]/g,$r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),Gr=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 ni(e){let t="",a=0,n;for(;(n=ai.exec(e))!==null;){const i=n.index,r=e.charCodeAt(i),u=$r.get(r);u!==void 0?(t+=e.substring(a,i)+u,a=i+1):(t+=`${e.substring(a,i)}&#x${Gr(e,i).toString(16)};`,a=ai.lastIndex+=+((r&64512)===55296))}return t+e.substr(a)}function ii(e,t){return function(n){let i,r=0,u="";for(;i=e.exec(n);)r!==i.index&&(u+=n.substring(r,i.index)),u+=t.get(i[0].charCodeAt(0)),r=i.index+1;return u+n.substring(r)}}const si=ii(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),ri=ii(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),Xr=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])),Qr=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])),jr=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function zr(e){return e.replace(/"/g,""")}function Kr(e,t){var a;if(!e)return;const n=((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)===!1?zr:t.xmlMode||t.encodeEntities!=="utf8"?ni:si;return Object.keys(e).map(i=>{var r,u;const c=(r=e[i])!==null&&r!==void 0?r:"";return t.xmlMode==="foreign"&&(i=(u=Qr.get(i))!==null&&u!==void 0?u:i),!t.emptyAttrs&&!t.xmlMode&&c===""?i:`${i}="${n(c)}"`}).join(" ")}const ui=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function ra(e,t={}){const a="length"in e?e:[e];let n="";for(let i=0;i<a.length;i++)n+=Zr(a[i],t);return n}function Zr(e,t){switch(e.type){case Dr:return ra(e.children,t);case vr:case yr:return au(e);case Rr:return su(e);case Pr:return iu(e);case kr:case Mr:case wr:return tu(e,t);case Lr:return nu(e,t)}}const Jr=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),eu=new Set(["svg","math"]);function tu(e,t){var a;t.xmlMode==="foreign"&&(e.name=(a=Xr.get(e.name))!==null&&a!==void 0?a:e.name,e.parent&&Jr.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&eu.has(e.name)&&(t={...t,xmlMode:"foreign"});let n=`<${e.name}`;const i=Kr(e.attribs,t);return i&&(n+=` ${i}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&ui.has(e.name))?(t.xmlMode||(n+=" "),n+="/>"):(n+=">",e.children.length>0&&(n+=ra(e.children,t)),(t.xmlMode||!ui.has(e.name))&&(n+=`</${e.name}>`)),n}function au(e){return`<${e.data}>`}function nu(e,t){var a;let n=e.data||"";return((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&jr.has(e.parent.name))&&(n=t.xmlMode||t.encodeEntities!=="utf8"?ni(n):ri(n)),n}function iu(e){return`<![CDATA[${e.children[0].data}]]>`}function su(e){return`<!--${e.data}-->`}function oi(e,t){return ra(e,t)}function ru(e,t){return re(e)?e.children.map(a=>oi(a,t)).join(""):""}function ua(e){return Array.isArray(e)?e.map(ua).join(""):P(e)?e.name==="br"?`
|
2
|
+
`:ua(e.children):ia(e)?ua(e.children):Pe(e)?e.data:""}function pt(e){return Array.isArray(e)?e.map(pt).join(""):re(e)&&!sa(e)?pt(e.children):Pe(e)?e.data:""}function oa(e){return Array.isArray(e)?e.map(oa).join(""):re(e)&&(e.type===G.Tag||ia(e))?oa(e.children):Pe(e)?e.data:""}function ca(e){return re(e)?e.children:[]}function ci(e){return e.parent||null}function li(e){const t=ci(e);if(t!=null)return ca(t);const a=[e];let{prev:n,next:i}=e;for(;n!=null;)a.unshift(n),{prev:n}=n;for(;i!=null;)a.push(i),{next:i}=i;return a}function uu(e,t){var a;return(a=e.attribs)===null||a===void 0?void 0:a[t]}function ou(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function cu(e){return e.name}function Ka(e){let{next:t}=e;for(;t!==null&&!P(t);)({next:t}=t);return t}function Za(e){let{prev:t}=e;for(;t!==null&&!P(t);)({prev:t}=t);return t}function it(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 lu(e,t){const a=t.prev=e.prev;a&&(a.next=t);const n=t.next=e.next;n&&(n.prev=t);const i=t.parent=e.parent;if(i){const r=i.children;r[r.lastIndexOf(e)]=t,e.parent=null}}function du(e,t){if(it(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 hu(e,t){it(t);const{parent:a}=e,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=a,n){if(n.prev=t,a){const i=a.children;i.splice(i.lastIndexOf(n),0,t)}}else a&&a.children.push(t)}function fu(e,t){if(it(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 mu(e,t){it(t);const{parent:a}=e;if(a){const n=a.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=a,t.prev=e.prev,t.next=e,e.prev=t}function la(e,t,a=!0,n=1/0){return Ja(e,Array.isArray(t)?t:[t],a,n)}function Ja(e,t,a,n){const i=[],r=[t],u=[0];for(;;){if(u[0]>=r[0].length){if(u.length===1)return i;r.shift(),u.shift();continue}const c=r[0][u[0]++];if(e(c)&&(i.push(c),--n<=0))return i;a&&re(c)&&c.children.length>0&&(u.unshift(0),r.unshift(c.children))}}function Eu(e,t){return t.find(e)}function en(e,t,a=!0){let n=null;for(let i=0;i<t.length&&!n;i++){const r=t[i];if(P(r))e(r)?n=r:a&&r.children.length>0&&(n=en(e,r.children,!0));else continue}return n}function di(e,t){return t.some(a=>P(a)&&(e(a)||di(e,a.children)))}function pu(e,t){const a=[],n=[t],i=[0];for(;;){if(i[0]>=n[0].length){if(n.length===1)return a;n.shift(),i.shift();continue}const r=n[0][i[0]++];P(r)&&(e(r)&&a.push(r),r.children.length>0&&(i.unshift(0),n.unshift(r.children)))}}const da={tag_name(e){return typeof e=="function"?t=>P(t)&&e(t.name):e==="*"?P:t=>P(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=>Pe(t)&&e(t.data):t=>Pe(t)&&t.data===e}};function hi(e,t){return typeof t=="function"?a=>P(a)&&t(a.attribs[e]):a=>P(a)&&a.attribs[e]===t}function Tu(e,t){return a=>e(a)||t(a)}function fi(e){const t=Object.keys(e).map(a=>{const n=e[a];return Object.prototype.hasOwnProperty.call(da,a)?da[a](n):hi(a,n)});return t.length===0?null:t.reduce(Tu)}function bu(e,t){const a=fi(e);return a?a(t):!0}function gu(e,t,a,n=1/0){const i=fi(e);return i?la(i,t,a,n):[]}function _u(e,t,a=!0){return Array.isArray(t)||(t=[t]),en(hi("id",e),t,a)}function Tt(e,t,a=!0,n=1/0){return la(da.tag_name(e),t,a,n)}function Au(e,t,a=!0,n=1/0){return la(da.tag_type(e),t,a,n)}function Nu(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 n=a.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e}var Oe;(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"})(Oe||(Oe={}));function mi(e,t){const a=[],n=[];if(e===t)return 0;let i=re(e)?e:e.parent;for(;i;)a.unshift(i),i=i.parent;for(i=re(t)?t:t.parent;i;)n.unshift(i),i=i.parent;const r=Math.min(a.length,n.length);let u=0;for(;u<r&&a[u]===n[u];)u++;if(u===0)return Oe.DISCONNECTED;const c=a[u-1],l=c.children,h=a[u],m=n[u];return l.indexOf(h)>l.indexOf(m)?c===t?Oe.FOLLOWING|Oe.CONTAINED_BY:Oe.FOLLOWING:c===e?Oe.PRECEDING|Oe.CONTAINS:Oe.PRECEDING}function bt(e){return e=e.filter((t,a,n)=>!n.includes(t,a+1)),e.sort((t,a)=>{const n=mi(t,a);return n&Oe.PRECEDING?-1:n&Oe.FOLLOWING?1:0}),e}function Cu(e){const t=ha(Du,e);return t?t.name==="feed"?Iu(t):Su(t):null}function Iu(e){var t;const a=e.children,n={type:"atom",items:Tt("entry",a).map(u=>{var c;const{children:l}=u,h={media:Ei(l)};pe(h,"id","id",l),pe(h,"title","title",l);const m=(c=ha("link",l))===null||c===void 0?void 0:c.attribs.href;m&&(h.link=m);const p=ze("summary",l)||ze("content",l);p&&(h.description=p);const T=ze("updated",l);return T&&(h.pubDate=new Date(T)),h})};pe(n,"id","id",a),pe(n,"title","title",a);const i=(t=ha("link",a))===null||t===void 0?void 0:t.attribs.href;i&&(n.link=i),pe(n,"description","subtitle",a);const r=ze("updated",a);return r&&(n.updated=new Date(r)),pe(n,"author","email",a,!0),n}function Su(e){var t,a;const n=(a=(t=ha("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&a!==void 0?a:[],i={type:e.name.substr(0,3),id:"",items:Tt("item",e.children).map(u=>{const{children:c}=u,l={media:Ei(c)};pe(l,"id","guid",c),pe(l,"title","title",c),pe(l,"link","link",c),pe(l,"description","description",c);const h=ze("pubDate",c)||ze("dc:date",c);return h&&(l.pubDate=new Date(h)),l})};pe(i,"title","title",n),pe(i,"link","link",n),pe(i,"description","description",n);const r=ze("lastBuildDate",n);return r&&(i.updated=new Date(r)),pe(i,"author","managingEditor",n,!0),i}const xu=["url","type","lang"],Ou=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Ei(e){return Tt("media:content",e).map(t=>{const{attribs:a}=t,n={medium:a.medium,isDefault:!!a.isDefault};for(const i of xu)a[i]&&(n[i]=a[i]);for(const i of Ou)a[i]&&(n[i]=parseInt(a[i],10));return a.expression&&(n.expression=a.expression),n})}function ha(e,t){return Tt(e,t,!0,1)[0]}function ze(e,t,a=!1){return pt(Tt(e,t,a,1)).trim()}function pe(e,t,a,n,i=!1){const r=ze(a,n,i);r&&(e[t]=r)}function Du(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const fa=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return Oe},append:hu,appendChild:du,compareDocumentPosition:mi,existsOne:di,filter:la,find:Ja,findAll:pu,findOne:en,findOneChild:Eu,getAttributeValue:uu,getChildren:ca,getElementById:_u,getElements:gu,getElementsByTagName:Tt,getElementsByTagType:Au,getFeed:Cu,getInnerHTML:ru,getName:cu,getOuterHTML:oi,getParent:ci,getSiblings:li,getText:ua,hasAttrib:ou,hasChildren:re,innerText:oa,isCDATA:ia,isComment:sa,isDocument:Qe,isTag:P,isText:Pe,nextElementSibling:Ka,prepend:mu,prependChild:fu,prevElementSibling:Za,removeElement:it,removeSubsets:Nu,replaceElement:lu,testElement:bu,textContent:pt,uniqueSort:bt},Symbol.toStringTag,{value:"Module"})),Lu={_useHtmlParser2:!1};function tn(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 pi(e,t,a){return e?e(t??e._root.children,null,void 0,a).toString():""}function yu(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function Ru(e,t){const a=yu(e)?(t=e,void 0):e,n={...this===null||this===void 0?void 0:this._options,...tn(t)};return pi(this,a,n)}function ku(e){const t={...this._options,xmlMode:!0};return pi(this,e,t)}function Rt(e){const t=e??(this?this.root():[]);let a="";for(let n=0;n<t.length;n++)a+=pt(t[n]);return a}function Mu(e,t,a=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(a=t);const n=this.load(e,this._options,!1);return a||n("script").remove(),[...n.root()[0].children]}function wu(){return this(this._root)}function Ti(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 Pu(e){return this.root().extract(e)}function vu(e,t){if(!bi(e)||!bi(t))return;let a=e.length;const n=+t.length;for(let i=0;i<n;i++)e[a++]=t[i];return e.length=a,e}function bi(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:Ti,extract:Pu,html:Ru,merge:vu,parseHTML:Mu,root:wu,text:Rt,xml:ku},Symbol.toStringTag,{value:"Module"}));function qe(e){return e.cheerio!=null}function Uu(e){return e.replace(/[._-](\w|$)/g,(t,a)=>a.toUpperCase())}function Fu(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function ee(e,t){const a=e.length;for(let n=0;n<a;n++)t(e[n],n);return e}var st;(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"})(st||(st={}));function an(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const a=e.charCodeAt(t+1);return(a>=st.LowerA&&a<=st.LowerZ||a>=st.UpperA&&a<=st.UpperZ||a===st.Exclamation)&&e.includes(">",t+2)}const kt=Object.prototype.hasOwnProperty,Mt=/\s+/,nn="data-",sn=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Hu=/^{[^]*}$|^\[[^]*]$/;function ma(e,t,a){var n;if(!(!e||!P(e))){if((n=e.attribs)!==null&&n!==void 0||(e.attribs={}),!t)return e.attribs;if(kt.call(e.attribs,t))return!a&&sn.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return Rt(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function gt(e,t,a){a===null?Ni(e,t):e.attribs[t]=`${a}`}function Vu(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 ee(this,(a,n)=>{P(a)&>(a,e,t.call(a,n,a.attribs[e]))})}return ee(this,a=>{if(P(a))if(typeof e=="object")for(const n of Object.keys(e)){const i=e[n];gt(a,n,i)}else gt(a,e,t)})}return arguments.length>1?this:ma(this[0],e,this.options.xmlMode)}function gi(e,t,a){return t in e?e[t]:!a&&sn.test(t)?ma(e,t,!1)!==void 0:ma(e,t,a)}function rn(e,t,a,n){t in e?e[t]=a:gt(e,t,!n&&sn.test(t)?a?"":null:`${a}`)}function Yu(e,t){var a;if(typeof e=="string"&&t===void 0){const n=this[0];if(!n||!P(n))return;switch(e){case"style":{const i=this.css(),r=Object.keys(i);for(let u=0;u<r.length;u++)i[u]=r[u];return i.length=r.length,i}case"tagName":case"nodeName":return n.name.toUpperCase();case"href":case"src":{const i=(a=n.attribs)===null||a===void 0?void 0:a[e];return typeof URL<"u"&&(e==="href"&&(n.tagName==="a"||n.tagName==="link")||e==="src"&&(n.tagName==="img"||n.tagName==="iframe"||n.tagName==="audio"||n.tagName==="video"||n.tagName==="source"))&&i!==void 0&&this.options.baseURI?new URL(i,this.options.baseURI).href:i}case"innerText":return oa(n);case"textContent":return pt(n);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return gi(n,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 ee(this,(n,i)=>{P(n)&&rn(n,e,t.call(n,i,gi(n,e,this.options.xmlMode)),this.options.xmlMode)})}return ee(this,n=>{if(P(n))if(typeof e=="object")for(const i of Object.keys(e)){const r=e[i];rn(n,i,r,this.options.xmlMode)}else rn(n,e,t,this.options.xmlMode)})}}function _i(e,t,a){var n;(n=e.data)!==null&&n!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&a!==void 0&&(e.data[t]=a)}function qu(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(nn))continue;const a=Uu(t.slice(nn.length));kt.call(e.data,a)||(e.data[a]=Ai(e.attribs[t]))}return e.data}function Wu(e,t){const a=nn+Fu(t),n=e.data;if(kt.call(n,t))return n[t];if(kt.call(e.attribs,a))return n[t]=Ai(e.attribs[a])}function Ai(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(Hu.test(e))try{return JSON.parse(e)}catch{}return e}function $u(e,t){var a;const n=this[0];if(!n||!P(n))return;const i=n;return(a=i.data)!==null&&a!==void 0||(i.data={}),e==null?qu(i):typeof e=="object"||t!==void 0?(ee(this,r=>{P(r)&&(typeof e=="object"?_i(r,e):_i(r,e,t))}),this):Wu(i,e)}function Gu(e){const t=arguments.length===0,a=this[0];if(!a||!P(a))return t?void 0:this;switch(a.name){case"textarea":return this.text(e);case"select":{const n=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const i=typeof e=="object"?e:[e];for(const r of i)this.find(`option[value="${r}"]`).attr("selected","");return this}return this.attr("multiple")?n.toArray().map(i=>Rt(i.children)):n.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function Ni(e,t){!e.attribs||!kt.call(e.attribs,t)||delete e.attribs[t]}function Ea(e){return e?e.trim().split(Mt):[]}function Xu(e){const t=Ea(e);for(const a of t)ee(this,n=>{P(n)&&Ni(n,a)});return this}function Qu(e){return this.toArray().some(t=>{const a=P(t)&&t.attribs.class;let n=-1;if(a&&e.length>0)for(;(n=a.indexOf(e,n+1))>-1;){const i=n+e.length;if((n===0||Mt.test(a[n-1]))&&(i===a.length||Mt.test(a[i])))return!0}return!1})}function Ci(e){if(typeof e=="function")return ee(this,(n,i)=>{if(P(n)){const r=n.attribs.class||"";Ci.call([n],e.call(n,i,r))}});if(!e||typeof e!="string")return this;const t=e.split(Mt),a=this.length;for(let n=0;n<a;n++){const i=this[n];if(!P(i))continue;const r=ma(i,"class",!1);if(r){let u=` ${r} `;for(const c of t){const l=`${c} `;u.includes(` ${l}`)||(u+=l)}gt(i,"class",u.trim())}else gt(i,"class",t.join(" ").trim())}return this}function Ii(e){if(typeof e=="function")return ee(this,(i,r)=>{P(i)&&Ii.call([i],e.call(i,r,i.attribs.class||""))});const t=Ea(e),a=t.length,n=arguments.length===0;return ee(this,i=>{if(P(i))if(n)i.attribs.class="";else{const r=Ea(i.attribs.class);let u=!1;for(let c=0;c<a;c++){const l=r.indexOf(t[c]);l>=0&&(r.splice(l,1),u=!0,c--)}u&&(i.attribs.class=r.join(" "))}})}function Si(e,t){if(typeof e=="function")return ee(this,(u,c)=>{P(u)&&Si.call([u],e.call(u,c,u.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const a=e.split(Mt),n=a.length,i=typeof t=="boolean"?t?1:-1:0,r=this.length;for(let u=0;u<r;u++){const c=this[u];if(!P(c))continue;const l=Ea(c.attribs.class);for(let h=0;h<n;h++){const m=l.indexOf(a[h]);i>=0&&m<0?l.push(a[h]):i<=0&&m>=0&&l.splice(m,1)}c.attribs.class=l.join(" ")}return this}const ju=Object.freeze(Object.defineProperty({__proto__:null,addClass:Ci,attr:Vu,data:$u,hasClass:Qu,prop:Yu,removeAttr:Xu,removeClass:Ii,toggleClass:Si,val:Gu},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 ie;(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"})(ie||(ie={}));const xi=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,zu=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Ku=new Map([[126,ie.Element],[94,ie.Start],[36,ie.End],[42,ie.Any],[33,ie.Not],[124,ie.Hyphen]]),Zu=new Set(["has","not","matches","is","where","host","host-context"]);function wt(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 Ju=new Set(["contains","icontains"]);function eo(e,t,a){const n=parseInt(t,16)-65536;return n!==n||a?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function Pt(e){return e.replace(zu,eo)}function un(e){return e===39||e===34}function Oi(e){return e===32||e===9||e===10||e===12||e===13}function pa(e){const t=[],a=Di(t,`${e}`,0);if(a<e.length)throw new Error(`Unmatched selector: ${e.slice(a)}`);return t}function Di(e,t,a){let n=[];function i(T){const _=t.slice(a+T).match(xi);if(!_)throw new Error(`Expected name, found ${t.slice(a)}`);const[I]=_;return a+=T+I.length,Pt(I)}function r(T){for(a+=T;a<t.length&&Oi(t.charCodeAt(a));)a++}function u(){a+=1;const T=a;let _=1;for(;_>0&&a<t.length;a++)t.charCodeAt(a)===40&&!c(a)?_++:t.charCodeAt(a)===41&&!c(a)&&_--;if(_)throw new Error("Parenthesis not matched");return Pt(t.slice(T,a-1))}function c(T){let _=0;for(;t.charCodeAt(--T)===92;)_++;return(_&1)===1}function l(){if(n.length>0&&wt(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function h(T){if(n.length>0&&n[n.length-1].type===R.Descendant){n[n.length-1].type=T;return}l(),n.push({type:T})}function m(T,_){n.push({type:R.Attribute,name:T,action:_,value:i(1),namespace:null,ignoreCase:"quirks"})}function p(){if(n.length&&n[n.length-1].type===R.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");e.push(n)}if(r(0),t.length===a)return a;e:for(;a<t.length;){const T=t.charCodeAt(a);switch(T){case 32:case 9:case 10:case 12:case 13:{(n.length===0||n[0].type!==R.Descendant)&&(l(),n.push({type:R.Descendant})),r(1);break}case 62:{h(R.Child),r(1);break}case 60:{h(R.Parent),r(1);break}case 126:{h(R.Sibling),r(1);break}case 43:{h(R.Adjacent),r(1);break}case 46:{m("class",ie.Element);break}case 35:{m("id",ie.Equals);break}case 91:{r(1);let _,I=null;t.charCodeAt(a)===124?_=i(1):t.startsWith("*|",a)?(I="*",_=i(2)):(_=i(0),t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==61&&(I=_,_=i(1))),r(0);let L=ie.Exists;const y=Ku.get(t.charCodeAt(a));if(y){if(L=y,t.charCodeAt(a+1)!==61)throw new Error("Expected `=`");r(2)}else t.charCodeAt(a)===61&&(L=ie.Equals,r(1));let V="",v=null;if(L!=="exists"){if(un(t.charCodeAt(a))){const F=t.charCodeAt(a);let A=a+1;for(;A<t.length&&(t.charCodeAt(A)!==F||c(A));)A+=1;if(t.charCodeAt(A)!==F)throw new Error("Attribute value didn't end");V=Pt(t.slice(a+1,A)),a=A+1}else{const F=a;for(;a<t.length&&(!Oi(t.charCodeAt(a))&&t.charCodeAt(a)!==93||c(a));)a+=1;V=Pt(t.slice(F,a))}r(0);const z=t.charCodeAt(a)|32;z===115?(v=!1,r(1)):z===105&&(v=!0,r(1))}if(t.charCodeAt(a)!==93)throw new Error("Attribute selector didn't terminate");a+=1;const U={type:R.Attribute,name:_,action:L,value:V,namespace:I,ignoreCase:v};n.push(U);break}case 58:{if(t.charCodeAt(a+1)===58){n.push({type:R.PseudoElement,name:i(2).toLowerCase(),data:t.charCodeAt(a)===40?u():null});continue}const _=i(1).toLowerCase();let I=null;if(t.charCodeAt(a)===40)if(Zu.has(_)){if(un(t.charCodeAt(a+1)))throw new Error(`Pseudo-selector ${_} cannot be quoted`);if(I=[],a=Di(I,t,a+1),t.charCodeAt(a)!==41)throw new Error(`Missing closing parenthesis in :${_} (${t})`);a+=1}else{if(I=u(),Ju.has(_)){const L=I.charCodeAt(0);L===I.charCodeAt(I.length-1)&&un(L)&&(I=I.slice(1,-1))}I=Pt(I)}n.push({type:R.Pseudo,name:_,data:I});break}case 44:{p(),n=[],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,n.length===0&&r(0);break}let _=null,I;if(T===42)a+=1,I="*";else if(T===124){if(I="",t.charCodeAt(a+1)===124){h(R.ColumnCombinator),r(2);break}}else if(xi.test(t.slice(a)))I=i(0);else break e;t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==124&&(_=I,t.charCodeAt(a+1)===42?(I="*",a+=2):I=i(1)),n.push(I==="*"?{type:R.Universal,namespace:_}:{type:R.Tag,name:I,namespace:_})}}}return p(),a}function to(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ta={trueFunc:function(){return!0},falseFunc:function(){return!1}};const Y=to(Ta),Li=new Map([[R.Universal,50],[R.Tag,30],[R.Attribute,1],[R.Pseudo,0]]);function on(e){return!Li.has(e.type)}const ao=new Map([[ie.Exists,10],[ie.Equals,8],[ie.Not,7],[ie.Start,6],[ie.End,6],[ie.Any,5]]);function no(e){const t=e.map(yi);for(let a=1;a<e.length;a++){const n=t[a];if(!(n<0))for(let i=a-1;i>=0&&n<t[i];i--){const r=e[i+1];e[i+1]=e[i],e[i]=r,t[i+1]=t[i],t[i]=n}}}function yi(e){var t,a;let n=(t=Li.get(e.type))!==null&&t!==void 0?t:-1;return e.type===R.Attribute?(n=(a=ao.get(e.action))!==null&&a!==void 0?a:4,e.action===ie.Equals&&e.name==="id"&&(n=9),e.ignoreCase&&(n>>=1)):e.type===R.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?n=0:Array.isArray(e.data)?(n=Math.min(...e.data.map(i=>Math.min(...i.map(yi)))),n<0&&(n=0)):n=2:n=3),n}const io=/[-[\]{}()*+?.,\\^$|#\s]/g;function Ri(e){return e.replace(io,"\\$&")}const so=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 rt(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&so.has(e.name)}const ro={equals(e,t,a){const{adapter:n}=a,{name:i}=t;let{value:r}=t;return rt(t,a)?(r=r.toLowerCase(),u=>{const c=n.getAttributeValue(u,i);return c!=null&&c.length===r.length&&c.toLowerCase()===r&&e(u)}):u=>n.getAttributeValue(u,i)===r&&e(u)},hyphen(e,t,a){const{adapter:n}=a,{name:i}=t;let{value:r}=t;const u=r.length;return rt(t,a)?(r=r.toLowerCase(),function(l){const h=n.getAttributeValue(l,i);return h!=null&&(h.length===u||h.charAt(u)==="-")&&h.substr(0,u).toLowerCase()===r&&e(l)}):function(l){const h=n.getAttributeValue(l,i);return h!=null&&(h.length===u||h.charAt(u)==="-")&&h.substr(0,u)===r&&e(l)}},element(e,t,a){const{adapter:n}=a,{name:i,value:r}=t;if(/\s/.test(r))return Y.falseFunc;const u=new RegExp(`(?:^|\\s)${Ri(r)}(?:$|\\s)`,rt(t,a)?"i":"");return function(l){const h=n.getAttributeValue(l,i);return h!=null&&h.length>=r.length&&u.test(h)&&e(l)}},exists(e,{name:t},{adapter:a}){return n=>a.hasAttrib(n,t)&&e(n)},start(e,t,a){const{adapter:n}=a,{name:i}=t;let{value:r}=t;const u=r.length;return u===0?Y.falseFunc:rt(t,a)?(r=r.toLowerCase(),c=>{const l=n.getAttributeValue(c,i);return l!=null&&l.length>=u&&l.substr(0,u).toLowerCase()===r&&e(c)}):c=>{var l;return!!(!((l=n.getAttributeValue(c,i))===null||l===void 0)&&l.startsWith(r))&&e(c)}},end(e,t,a){const{adapter:n}=a,{name:i}=t;let{value:r}=t;const u=-r.length;return u===0?Y.falseFunc:rt(t,a)?(r=r.toLowerCase(),c=>{var l;return((l=n.getAttributeValue(c,i))===null||l===void 0?void 0:l.substr(u).toLowerCase())===r&&e(c)}):c=>{var l;return!!(!((l=n.getAttributeValue(c,i))===null||l===void 0)&&l.endsWith(r))&&e(c)}},any(e,t,a){const{adapter:n}=a,{name:i,value:r}=t;if(r==="")return Y.falseFunc;if(rt(t,a)){const u=new RegExp(Ri(r),"i");return function(l){const h=n.getAttributeValue(l,i);return h!=null&&h.length>=r.length&&u.test(h)&&e(l)}}return u=>{var c;return!!(!((c=n.getAttributeValue(u,i))===null||c===void 0)&&c.includes(r))&&e(u)}},not(e,t,a){const{adapter:n}=a,{name:i}=t;let{value:r}=t;return r===""?u=>!!n.getAttributeValue(u,i)&&e(u):rt(t,a)?(r=r.toLowerCase(),u=>{const c=n.getAttributeValue(u,i);return(c==null||c.length!==r.length||c.toLowerCase()!==r)&&e(u)}):u=>n.getAttributeValue(u,i)!==r&&e(u)}},uo=new Set([9,10,12,13,32]),ki=48,oo=57;function co(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,a=0,n=r(),i=u();if(t<e.length&&e.charAt(t)==="n"&&(t++,a=n*(i??1),c(),t<e.length?(n=r(),c(),i=u()):n=i=0),i===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[a,n*i];function r(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function u(){const l=t;let h=0;for(;t<e.length&&e.charCodeAt(t)>=ki&&e.charCodeAt(t)<=oo;)h=h*10+(e.charCodeAt(t)-ki),t++;return t===l?null:h}function c(){for(;t<e.length&&uo.has(e.charCodeAt(t));)t++}}function lo(e){const t=e[0],a=e[1]-1;if(a<0&&t<=0)return Y.falseFunc;if(t===-1)return r=>r<=a;if(t===0)return r=>r===a;if(t===1)return a<0?Y.trueFunc:r=>r>=a;const n=Math.abs(t),i=(a%n+n)%n;return t>1?r=>r>=a&&r%n===i:r=>r<=a&&r%n===i}function ba(e){return lo(co(e))}function ga(e,t){return a=>{const n=t.getParent(a);return n!=null&&t.isTag(n)&&e(a)}}const cn={contains(e,t,{adapter:a}){return function(i){return e(i)&&a.getText(i).includes(t)}},icontains(e,t,{adapter:a}){const n=t.toLowerCase();return function(r){return e(r)&&a.getText(r).toLowerCase().includes(n)}},"nth-child"(e,t,{adapter:a,equals:n}){const i=ba(t);return i===Y.falseFunc?Y.falseFunc:i===Y.trueFunc?ga(e,a):function(u){const c=a.getSiblings(u);let l=0;for(let h=0;h<c.length&&!n(u,c[h]);h++)a.isTag(c[h])&&l++;return i(l)&&e(u)}},"nth-last-child"(e,t,{adapter:a,equals:n}){const i=ba(t);return i===Y.falseFunc?Y.falseFunc:i===Y.trueFunc?ga(e,a):function(u){const c=a.getSiblings(u);let l=0;for(let h=c.length-1;h>=0&&!n(u,c[h]);h--)a.isTag(c[h])&&l++;return i(l)&&e(u)}},"nth-of-type"(e,t,{adapter:a,equals:n}){const i=ba(t);return i===Y.falseFunc?Y.falseFunc:i===Y.trueFunc?ga(e,a):function(u){const c=a.getSiblings(u);let l=0;for(let h=0;h<c.length;h++){const m=c[h];if(n(u,m))break;a.isTag(m)&&a.getName(m)===a.getName(u)&&l++}return i(l)&&e(u)}},"nth-last-of-type"(e,t,{adapter:a,equals:n}){const i=ba(t);return i===Y.falseFunc?Y.falseFunc:i===Y.trueFunc?ga(e,a):function(u){const c=a.getSiblings(u);let l=0;for(let h=c.length-1;h>=0;h--){const m=c[h];if(n(u,m))break;a.isTag(m)&&a.getName(m)===a.getName(u)&&l++}return i(l)&&e(u)}},root(e,t,{adapter:a}){return n=>{const i=a.getParent(n);return(i==null||!a.isTag(i))&&e(n)}},scope(e,t,a,n){const{equals:i}=a;return!n||n.length===0?cn.root(e,t,a):n.length===1?r=>i(n[0],r)&&e(r):r=>n.includes(r)&&e(r)},hover:ln("isHovered"),visited:ln("isVisited"),active:ln("isActive")};function ln(e){return function(a,n,{adapter:i}){const r=i[e];return typeof r!="function"?Y.falseFunc:function(c){return r(c)&&a(c)}}}const Mi={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 n=t.getSiblings(e).find(i=>t.isTag(i));return n!=null&&a(e,n)},"last-child"(e,{adapter:t,equals:a}){const n=t.getSiblings(e);for(let i=n.length-1;i>=0;i--){if(a(e,n[i]))return!0;if(t.isTag(n[i]))break}return!1},"first-of-type"(e,{adapter:t,equals:a}){const n=t.getSiblings(e),i=t.getName(e);for(let r=0;r<n.length;r++){const u=n[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===i)break}return!1},"last-of-type"(e,{adapter:t,equals:a}){const n=t.getSiblings(e),i=t.getName(e);for(let r=n.length-1;r>=0;r--){const u=n[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===i)break}return!1},"only-of-type"(e,{adapter:t,equals:a}){const n=t.getName(e);return t.getSiblings(e).every(i=>a(e,i)||!t.isTag(i)||t.getName(i)!==n)},"only-child"(e,{adapter:t,equals:a}){return t.getSiblings(e).every(n=>a(e,n)||!t.isTag(n))}};function wi(e,t,a,n){if(a===null){if(e.length>n)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===n)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const ho={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
|
3
3
|
:is(button, input, select, textarea, optgroup, option)[disabled],
|
4
4
|
optgroup[disabled] > option,
|
5
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])"},vn={};function fo(e,t){return e===V.falseFunc?V.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 li(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 di=(e,t,a,i,n)=>{const r=n(t,li(a),i);return r===V.trueFunc?e:r===V.falseFunc?V.falseFunc:u=>r(u)&&e(u)},hi={is:di,matches:di,where:di,not(e,t,a,i,n){const r=n(t,li(a),i);return r===V.falseFunc?e:r===V.trueFunc?V.falseFunc:u=>!r(u)&&e(u)},has(e,t,a,i,n){const{adapter:r}=a,u=li(a);u.relativeSelector=!0;const o=t.some(m=>m.some(ui))?[vn]:void 0,l=n(t,u,o);if(l===V.falseFunc)return V.falseFunc;const h=fo(l,r);if(o&&l!==V.trueFunc){const{shouldTestNextSiblings:m=!1}=l;return p=>{if(!e(p))return!1;o[0]=p;const T=r.getChildren(p),_=m?[...T,...Bn(p,r)]:T;return r.existsOne(h,_)}}return m=>e(m)&&r.existsOne(h,r.getChildren(m))}};function mo(e,t,a,i,n){var r;const{name:u,data:o}=t;if(Array.isArray(o)){if(!(u in hi))throw new Error(`Unknown pseudo-class :${u}(${o})`);return hi[u](e,o,a,i,n)}const l=(r=a.pseudos)===null||r===void 0?void 0:r[u],h=typeof l=="string"?l:ho[u];if(typeof h=="string"){if(o!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);const m=pa(h);return hi.is(e,m,a,i,n)}if(typeof l=="function")return Pn(l,u,o,1),m=>l(m,o)&&e(m);if(u in oi)return oi[u](e,o,a,i);if(u in Mn){const m=Mn[u];return Pn(m,u,o,2),p=>m(p,a,o)&&e(p)}throw new Error(`Unknown pseudo-class :${u}`)}function fi(e,t){const a=t.getParent(e);return a&&t.isTag(a)?a:null}function Eo(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()),ro[t.action](e,t,a)}case R.Pseudo:return mo(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(h){return r.getName(h)===o&&e(h)}}case R.Descendant:{if(a.cacheResults===!1||typeof WeakSet>"u")return function(h){let m=h;for(;m=fi(m,r);)if(e(m))return!0;return!1};const o=new WeakSet;return function(h){let m=h;for(;m=fi(m,r);)if(!o.has(m)){if(r.isTag(m)&&e(m))return!0;o.add(m)}return!1}}case"_flexibleDescendant":return function(l){let h=l;do if(e(h))return!0;while(h=fi(h,r));return!1};case R.Parent:return function(l){return r.getChildren(l).some(h=>r.isTag(h)&&e(h))};case R.Child:return function(l){const h=r.getParent(l);return h!=null&&r.isTag(h)&&e(h)};case R.Sibling:return function(l){const h=r.getSiblings(l);for(let m=0;m<h.length;m++){const p=h[m];if(u(l,p))break;if(r.isTag(p)&&e(p))return!0}return!1};case R.Adjacent:return r.prevElementSibling?function(l){const h=r.prevElementSibling(l);return h!=null&&e(h)}:function(l){const h=r.getSiblings(l);let m;for(let p=0;p<h.length;p++){const T=h[p];if(u(l,T))break;r.isTag(T)&&(m=T)}return!!m&&e(m)};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 wn(e){return e.type===R.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(wn)))}const po={type:R.Descendant},To={type:"_flexibleDescendant"},bo={type:R.Pseudo,name:"scope",data:null};function go(e,{adapter:t},a){const i=!!(a!=null&&a.every(n=>{const r=t.isTag(n)&&t.getParent(n);return n===vn||r&&t.isTag(r)}));for(const n of e){if(!(n.length>0&&ui(n[0])&&n[0].type!==R.Descendant))if(i&&!n.some(wn))n.unshift(po);else continue;n.unshift(bo)}}function Un(e,t,a){var i;e.forEach(io),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)go(e,t,r);else if(e.some(l=>l.length>0&&ui(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[h,m]=l;h.type!==R.Pseudo||h.name!=="scope"||(n&&m.type===R.Descendant?l[1]=To:(m.type===R.Adjacent||m.type===R.Sibling)&&(u=!0))}return _o(l,t,r)}).reduce(Ao,V.falseFunc);return o.shouldTestNextSiblings=u,o}function _o(e,t,a){var i;return e.reduce((n,r)=>n===V.falseFunc?V.falseFunc:Eo(n,r,t,a,Un),(i=t.rootFunc)!==null&&i!==void 0?i:V.trueFunc)}function Ao(e,t){return t===V.falseFunc||e===V.trueFunc?e:e===V.falseFunc||t===V.trueFunc?t:function(i){return e(i)||t(i)}}const Fn=(e,t)=>e===t,No={adapter:fa,equals:Fn};function Co(e){var t,a,i,n;const r=e??No;return(t=r.adapter)!==null&&t!==void 0||(r.adapter=fa),(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:Fn),r}function Io(e){return function(a,i,n){const r=Co(i);return e(a,r,n)}}const mi=Io(Un);function Hn(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 xo=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function _a(e){return e.type!=="pseudo"?!1:xo.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(_a)):!1}function Oo(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 Do(e){for(;e.parent;)e=e.parent;return e}function Ei(e){const t=[],a=[];for(const i of e)i.some(_a)?t.push(i):a.push(i);return[a,t]}const Lo={type:R.Universal,namespace:null},yo={type:R.Pseudo,name:"scope",data:null};function Vn(e,t,a={}){return Yn([e],t,a)}function Yn(e,t,a={}){if(typeof t=="function")return e.some(t);const[i,n]=Ei(pa(t));return i.length>0&&e.some(mi(i,a))||n.some(r=>$n(r,e,a).length>0)}function Ro(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(Wn(a,t,i));return t.filter(u=>!r.has(u))}}}function qn(e,t,a={}){return Wn(pa(e),t,a)}function Wn(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(m=>P(m)&&!r.has(m)):t).length===0)break;const h=$n(o,t,a);if(h.length)if(r)h.forEach(m=>r.add(m));else{if(u===n.length-1)return h;r=new Set(h)}}return typeof r<"u"?r.size===t.length?t:t.filter(u=>r.has(u)):[]}function $n(e,t,a){var i;if(e.some(Pt)){const n=(i=a.root)!==null&&i!==void 0?i:Do(t[0]),r={...a,context:t,relativeSelector:!1};return e.push(yo),Aa(n,e,r,!0,t.length)}return Aa(t,e,a,!1,t.length)}function ko(e,t,a={},i=1/0){if(typeof e=="function")return Gn(t,e);const[n,r]=Ei(pa(e)),u=r.map(o=>Aa(t,o,a,!0,i));return n.length&&u.push(pi(t,n,a,i)),u.length===0?[]:u.length===1?u[0]:bt(u.reduce((o,l)=>[...o,...l]))}function Aa(e,t,a,i,n){const r=t.findIndex(_a),u=t.slice(0,r),o=t[r],l=t.length-1===r?n:1/0,h=Oo(o.name,o.data,l);if(h===0)return[];const p=(u.length===0&&!Array.isArray(e)?ca(e).filter(P):u.length===0?(Array.isArray(e)?e:[e]).filter(P):i||u.some(Pt)?pi(e,[u],a,h):Ti(e,[u],a)).slice(0,h);let T=Ro(o.name,p,o.data,a);if(T.length===0||t.length===r+1)return T;const _=t.slice(r+1),I=_.some(Pt);if(I){if(Pt(_[0])){const{type:L}=_[0];(L===R.Sibling||L===R.Adjacent)&&(T=Hn(T,fa,!0)),_.unshift(Lo)}a={...a,relativeSelector:!1,rootFunc:L=>T.includes(L)}}else a.rootFunc&&a.rootFunc!==Ta.trueFunc&&(a={...a,rootFunc:Ta.trueFunc});return _.some(_a)?Aa(T,_,a,!1,n):I?pi(T,[_],a,n):Ti(T,[_],a)}function pi(e,t,a,i){const n=mi(t,a,e);return Gn(e,n,i)}function Gn(e,t,a=1/0){const i=Hn(e,fa,t.shouldTestNextSiblings);return Ja(n=>P(n)&&t(n),i,!0,a)}function Ti(e,t,a){const i=(Array.isArray(e)?e:[e]).filter(P);if(i.length===0)return i;const n=mi(t,a);return n===Ta.trueFunc?i:i.filter(n)}const Mo=/^\s*[+~]/;function Po(e){if(!e)return this._make([]);if(typeof e!="string"){const t=qe(e)?e.toArray():[e],a=this.toArray();return this._make(t.filter(i=>a.some(n=>Tn(n,i))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function vo(e,t){var a;const i=this.toArray(),n=Mo.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(ko(e,n,r,t))}function bi(e){return function(t,...a){return function(i){var n;let r=e(t,this);return i&&(r=Ai(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 Bt=bi((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}),gi=bi((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 _i(e,...t){let a=null;const i=bi((n,r)=>{const u=[];return ee(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=>Vn(o,n,this.options):n?wt(n):null;const u=i.call(this,r);return a=null,u}}function _t(e){return e.length>1?Array.from(new Set(e)):e}const Bo=gi(({parent:e})=>e&&!Qe(e)?e:null,_t),wo=Bt(e=>{const t=[];for(;e.parent&&!Qe(e.parent);)t.push(e.parent),e=e.parent;return t},bt,e=>e.reverse()),Uo=_i(({parent:e})=>e&&!Qe(e)?e:null,bt,e=>e.reverse());function Fo(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=>Vn(r,e,i):wt(e);return ee(this,r=>{for(r&&!Qe(r)&&!P(r)&&(r=r.parent);r&&P(r);){if(n(r,0)){a.includes(r)||a.push(r);break}r=r.parent}}),this._make(a)}const Ho=gi(e=>Ka(e)),Vo=Bt(e=>{const t=[];for(;e.next;)e=e.next,P(e)&&t.push(e);return t},_t),Yo=_i(e=>Ka(e),_t),qo=gi(e=>Za(e)),Wo=Bt(e=>{const t=[];for(;e.prev;)e=e.prev,P(e)&&t.push(e);return t},_t),$o=_i(e=>Za(e),_t),Go=Bt(e=>ln(e).filter(t=>P(t)&&t!==e),bt),Xo=Bt(e=>ca(e).filter(P),_t);function Qo(){const e=this.toArray().reduce((t,a)=>re(a)?t.concat(a.children):t,[]);return this._make(e)}function jo(e){let t=0;const a=this.length;for(;t<a&&e.call(this[t],t,this[t])!==!1;)++t;return this}function zo(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 wt(e){return typeof e=="function"?(t,a)=>e.call(t,a,t):qe(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function Ko(e){var t;return this._make(Ai(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function Ai(e,t,a,i){return typeof t=="string"?qn(t,e,{xmlMode:a,root:i}):e.filter(wt(t))}function Zo(e){const t=this.toArray();return typeof e=="string"?Yn(t.filter(P),e,this.options):e?t.some(wt(e)):!1}function Jo(e){let t=this.toArray();if(typeof e=="string"){const a=new Set(qn(e,t,this.options));t=t.filter(i=>!a.has(i))}else{const a=wt(e);t=t.filter((i,n)=>!a(i,n))}return this._make(t)}function ec(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,a)=>this._make(a).find(e).length>0)}function tc(){return this.length>1?this._make(this[0]):this}function ac(){return this.length>0?this._make(this[this.length-1]):this}function ic(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 nc(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function sc(){return Array.prototype.slice.call(this)}function rc(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=qe(e)?e[0]:e),Array.prototype.indexOf.call(t,a)}function uc(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function oc(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function cc(e,t){const a=this._make(e,t),i=bt([...this.get(),...a.get()]);return this._make(i)}function lc(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const dc=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:vo,add:cc,addBack:lc,children:Xo,closest:Fo,contents:Qo,each:jo,end:oc,eq:ic,filter:Ko,filterArray:Ai,find:Po,first:tc,get:nc,has:ec,index:rc,is:Zo,last:ac,map:zo,next:Ho,nextAll:Vo,nextUntil:Yo,not:Jo,parent:Bo,parents:wo,parentsUntil:Uo,prev:qo,prevAll:Wo,prevUntil:$o,siblings:Go,slice:uc,toArray:sc},Symbol.toStringTag,{value:"Module"}));function hc(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)&&Qe(u))return u;const o=new it([]);return ut(u,o),o}}function ut(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&&nt(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 fc(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?yt(n,!0):n);continue}}a.push(...this._makeDomArray(n,t))}return a}return[t?yt(e,!0):e]}function Xn(e){return function(...t){const a=this.length-1;return ee(this,(i,n)=>{if(!re(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 Ke(e,t,a,i,n){var r,u;const o=[t,a,...i],l=t===0?null:e[t-1],h=t+a>=e.length?null:e[t+a];for(let m=0;m<i.length;++m){const p=i[m],T=p.parent;if(T){const I=T.children.indexOf(p);I>-1&&(T.children.splice(I,1),n===T&&t>I&&o[0]--)}p.parent=n,p.prev&&(p.prev.next=(r=p.next)!==null&&r!==void 0?r:null),p.next&&(p.next.prev=(u=p.prev)!==null&&u!==void 0?u:null),p.prev=m===0?l:i[m-1],p.next=m===i.length-1?h:i[m+1]}return l&&(l.next=i[0]),h&&(h.prev=i[i.length-1]),e.splice(...o)}function mc(e){return(qe(e)?e:this._make(e)).append(this),this}function Ec(e){return(qe(e)?e:this._make(e)).prepend(this),this}const pc=Xn((e,t,a)=>{Ke(t,t.length,0,e,a)}),Tc=Xn((e,t,a)=>{Ke(t,0,0,e,a)});function Qn(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"&&!ai(t)?i.find(t).clone():t,[o]=this._makeDomArray(u,n<a);if(!o||!re(o))continue;let l=o,h=0;for(;h<l.children.length;){const m=l.children[h];P(m)?(l=m,h=0):h++}e(r,l,[o])}return this}}const bc=Qn((e,t,a)=>{const{parent:i}=e;if(!i)return;const n=i.children,r=n.indexOf(e);ut([e],t),Ke(n,r,0,a,i)}),gc=Qn((e,t,a)=>{re(e)&&(ut(e.children,t),ut(a,e))});function _c(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 Nc(...e){const t=this.length-1;return ee(this,(a,i)=>{if(!re(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);Ke(n,r+1,0,o,a.parent)})}function Cc(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||(Ke(r,u+1,0,i,n),t.push(...i))}return this._make(t)}function Ic(...e){const t=this.length-1;return ee(this,(a,i)=>{if(!re(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);Ke(n,r,0,o,a.parent)})}function Sc(e){const t=this._make(e);this.remove();const a=[];return ee(t,i=>{const n=this.clone().toArray(),{parent:r}=i;if(!r)return;const u=r.children,o=u.indexOf(i);o<0||(Ke(u,o,0,n,r),a.push(...n))}),this._make(a)}function xc(e){const t=e?this.filter(e):this;return ee(t,a=>{nt(a),a.prev=a.next=a.parent=null}),this}function Oc(e){return ee(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);ut(u,null);const o=n.indexOf(t);Ke(n,o,1,u,i),u.includes(t)||(t.parent=t.prev=t.next=null)})}function Dc(){return ee(this,e=>{if(re(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||!re(t)?null:this._render(t.children)}return ee(this,t=>{if(!re(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=qe(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;ut(a,t)})}function yc(){return this._render(this)}function Rc(e){return e===void 0?Rt(this):typeof e=="function"?ee(this,(t,a)=>this._make(t).text(e.call(t,a,Rt([t])))):ee(this,t=>{if(!re(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=new Lt(`${e}`);ut(a,t)})}function kc(){const e=Array.prototype.map.call(this.get(),a=>yt(a,!0)),t=new it(e);for(const a of e)a.parent=t;return this._make(e)}const Mc=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:fc,after:Nc,append:pc,appendTo:mc,before:Ic,clone:kc,empty:Dc,html:Lc,insertAfter:Cc,insertBefore:Sc,prepend:Tc,prependTo:Ec,remove:xc,replaceWith:Oc,text:Rc,toString:yc,unwrap:_c,wrap:bc,wrapAll:Ac,wrapInner:gc},Symbol.toStringTag,{value:"Module"}));function Pc(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return ee(this,(a,i)=>{P(a)&&jn(a,e,t,i)});if(this.length!==0)return zn(this[0],e)}function jn(e,t,a,i){if(typeof t=="string"){const n=zn(e),r=typeof a=="function"?a.call(e,i,n[t]):a;r===""?delete n[t]:r!=null&&(n[t]=r),e.attribs.style=vc(n)}else if(typeof t=="object"){const n=Object.keys(t);for(let r=0;r<n.length;r++){const u=n[r];jn(e,u,t[u],r)}}}function zn(e,t){if(!e||!P(e))return;const a=Bc(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 vc(e){return Object.keys(e).reduce((t,a)=>`${t}${t?" ":""}${a}: ${e[a]};`,"")}function Bc(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 wc=Object.freeze(Object.defineProperty({__proto__:null,css:Pc},Symbol.toStringTag,{value:"Module"})),Kn="input,select,textarea,keygen",Uc=/%20/g,Zn=/\r?\n/g;function Fc(){return this.serializeArray().map(a=>`${encodeURIComponent(a.name)}=${encodeURIComponent(a.value)}`).join("&").replace(Uc,"+")}function Hc(){return this.map((e,t)=>{const a=this._make(t);return P(t)&&t.name==="form"?a.find(Kn).toArray():a.filter(Kn).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(Zn,`\r
|
7
|
-
`)})):{name:
|
8
|
-
`)}}).toArray()}const Vc=Object.freeze(Object.defineProperty({__proto__:null,serialize:Fc,serializeArray:Hc},Symbol.toStringTag,{value:"Module"}));function Yc(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 qc(e){const t={};for(const a in e){const i=e[a],n=Array.isArray(i),{selector:r,value:u}=Yc(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,h)=>o(h,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 Wc=Object.freeze(Object.defineProperty({__proto__:null,extract:qc},Symbol.toStringTag,{value:"Module"}));class Ut{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}}}Ut.prototype.cheerio="[cheerio object]",Ut.prototype.splice=Array.prototype.splice,Ut.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Ut.prototype,ju,dc,Mc,wc,Vc,Wc);function $c(e,t){return function a(i,n,r=!0){if(i==null)throw new Error("cheerio.load() expects a string");const u=ti(n),o=e(i,u,r,null);class l extends Ut{_make(p,T){const _=h(p,T);return _.prevObject=this,_}_parse(p,T,_,I){return e(p,T,_,I)}_render(p){return t(p,this.options)}}function h(m,p,T=o,_){if(m&&qe(m))return m;const I=ti(_,u),L=typeof T=="string"?[e(T,I,!1,null)]:"length"in T?T:[T],y=qe(L)?L:new l(L,null,I);if(y._root=y,!m)return new l(void 0,y,I);const H=typeof m=="string"&&ai(m)?e(m,I,!1,null).children:Gc(m)?[m]:Array.isArray(m)?m:void 0,v=new l(H,y,I);if(H)return v;if(typeof m!="string")throw new TypeError("Unexpected type of selector");let w=m;const z=p?typeof p=="string"?ai(p)?new l([e(p,I,!1,null)],y,I):(w=`${p} ${w}`,y):qe(p)?p:new l(Array.isArray(p)?p:[p],y,I):y;return z?z.find(w):v}return Object.assign(h,wu,{load:a,_root:o,_options:u,fn:l.prototype,prototype:l.prototype}),h}}function Gc(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const Xc=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]),K="�";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 Te={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Jn(e){return e>=55296&&e<=57343}function Qc(e){return e>=56320&&e<=57343}function jc(e,t){return(e-55296)*1024+9216+t}function es(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||Xc.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 zc=65536;class Kc{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=zc,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(Qc(a))return this.pos++,this._addGap(),jc(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,Jn(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){es(t)?this._err(g.controlCharacterInInputStream):ts(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 as(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 C;(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/"})(C||(C={}));var ot;(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"})(ot||(ot={}));var Ne;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ne||(Ne={}));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 Zc=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 Na(e){var t;return(t=Zc.get(e))!==null&&t!==void 0?t:s.UNKNOWN}const x=s,Jc={[C.HTML]:new Set([x.ADDRESS,x.APPLET,x.AREA,x.ARTICLE,x.ASIDE,x.BASE,x.BASEFONT,x.BGSOUND,x.BLOCKQUOTE,x.BODY,x.BR,x.BUTTON,x.CAPTION,x.CENTER,x.COL,x.COLGROUP,x.DD,x.DETAILS,x.DIR,x.DIV,x.DL,x.DT,x.EMBED,x.FIELDSET,x.FIGCAPTION,x.FIGURE,x.FOOTER,x.FORM,x.FRAME,x.FRAMESET,x.H1,x.H2,x.H3,x.H4,x.H5,x.H6,x.HEAD,x.HEADER,x.HGROUP,x.HR,x.HTML,x.IFRAME,x.IMG,x.INPUT,x.LI,x.LINK,x.LISTING,x.MAIN,x.MARQUEE,x.MENU,x.META,x.NAV,x.NOEMBED,x.NOFRAMES,x.NOSCRIPT,x.OBJECT,x.OL,x.P,x.PARAM,x.PLAINTEXT,x.PRE,x.SCRIPT,x.SECTION,x.SELECT,x.SOURCE,x.STYLE,x.SUMMARY,x.TABLE,x.TBODY,x.TD,x.TEMPLATE,x.TEXTAREA,x.TFOOT,x.TH,x.THEAD,x.TITLE,x.TR,x.TRACK,x.UL,x.WBR,x.XMP]),[C.MATHML]:new Set([x.MI,x.MO,x.MN,x.MS,x.MTEXT,x.ANNOTATION_XML]),[C.SVG]:new Set([x.TITLE,x.FOREIGN_OBJECT,x.DESC]),[C.XLINK]:new Set,[C.XML]:new Set,[C.XMLNS]:new Set},Ni=new Set([x.H1,x.H2,x.H3,x.H4,x.H5,x.H6]),el=new Set([b.STYLE,b.SCRIPT,b.XMP,b.IFRAME,b.NOEMBED,b.NOFRAMES,b.PLAINTEXT]);function tl(e,t){return el.has(e)||t&&e===b.NOSCRIPT}var f;(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"})(f||(f={}));const be={DATA:f.DATA,RCDATA:f.RCDATA,RAWTEXT:f.RAWTEXT,SCRIPT_DATA:f.SCRIPT_DATA,PLAINTEXT:f.PLAINTEXT,CDATA_SECTION:f.CDATA_SECTION};function al(e){return e>=d.DIGIT_0&&e<=d.DIGIT_9}function Ft(e){return e>=d.LATIN_CAPITAL_A&&e<=d.LATIN_CAPITAL_Z}function il(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_Z}function Ze(e){return il(e)||Ft(e)}function is(e){return Ze(e)||al(e)}function Ca(e){return e+32}function ns(e){return e===d.SPACE||e===d.LINE_FEED||e===d.TABULATION||e===d.FORM_FEED}function ss(e){return ns(e)||e===d.SOLIDUS||e===d.GREATER_THAN_SIGN}function nl(e){return e===d.NULL?g.nullCharacterReference:e>1114111?g.characterReferenceOutsideUnicodeRange:Jn(e)?g.surrogateCharacterReference:ts(e)?g.noncharacterCharacterReference:es(e)||e===d.CARRIAGE_RETURN?g.controlCharacterReference:null}let sl=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=f.DATA,this.returnState=f.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Kc(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new za(Ga,(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=nl(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(as(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=Na(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=ns(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=f.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?xe.Attribute:xe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===f.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===f.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===f.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case f.DATA:{this._stateData(t);break}case f.RCDATA:{this._stateRcdata(t);break}case f.RAWTEXT:{this._stateRawtext(t);break}case f.SCRIPT_DATA:{this._stateScriptData(t);break}case f.PLAINTEXT:{this._statePlaintext(t);break}case f.TAG_OPEN:{this._stateTagOpen(t);break}case f.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case f.TAG_NAME:{this._stateTagName(t);break}case f.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case f.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case f.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case f.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case f.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case f.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case f.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case f.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case f.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case f.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case f.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case f.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case f.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case f.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case f.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case f.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case f.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case f.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case f.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case f.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case f.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case f.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case f.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case f.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case f.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case f.BOGUS_COMMENT:{this._stateBogusComment(t);break}case f.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case f.COMMENT_START:{this._stateCommentStart(t);break}case f.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case f.COMMENT:{this._stateComment(t);break}case f.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case f.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case f.COMMENT_END:{this._stateCommentEnd(t);break}case f.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case f.DOCTYPE:{this._stateDoctype(t);break}case f.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case f.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case f.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case f.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case f.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case f.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case f.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case f.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case f.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case f.CDATA_SECTION:{this._stateCdataSection(t);break}case f.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case f.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case f.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case f.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.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=f.RCDATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.RAWTEXT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ze(t))this._createStartTagToken(),this.state=f.TAG_NAME,this._stateTagName(t);else switch(t){case d.EXCLAMATION_MARK:{this.state=f.MARKUP_DECLARATION_OPEN;break}case d.SOLIDUS:{this.state=f.END_TAG_OPEN;break}case d.QUESTION_MARK:{this._err(g.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=f.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=f.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ze(t))this._createEndTagToken(),this.state=f.TAG_NAME,this._stateTagName(t);else switch(t){case d.GREATER_THAN_SIGN:{this._err(g.missingEndTagName),this.state=f.DATA;break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=f.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=f.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this.state=f.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.tagName+=K;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(Ft(t)?Ca(t):t)}}_stateRcdataLessThanSign(t){t===d.SOLIDUS?this.state=f.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=f.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ze(t)?(this.state=f.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=f.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=f.BEFORE_ATTRIBUTE_NAME,!1;case d.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=f.SELF_CLOSING_START_TAG,!1;case d.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=f.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===d.SOLIDUS?this.state=f.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ze(t)?(this.state=f.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case d.SOLIDUS:{this.state=f.SCRIPT_DATA_END_TAG_OPEN;break}case d.EXCLAMATION_MARK:{this.state=f.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=f.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ze(t)?(this.state=f.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===d.HYPHEN_MINUS?(this.state=f.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===d.HYPHEN_MINUS?(this.state=f.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);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=f.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_ESCAPED,this._emitChars(K);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.GREATER_THAN_SIGN:{this.state=f.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_ESCAPED,this._emitChars(K);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===d.SOLIDUS?this.state=f.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ze(t)?(this._emitChars("<"),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ze(t)?(this.state=f.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Te.SCRIPT,!1)&&ss(this.preprocessor.peek(Te.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Te.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);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=f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(K);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.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=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.GREATER_THAN_SIGN:{this.state=f.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(K);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===d.SOLIDUS?(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Te.SCRIPT,!1)&&ss(this.preprocessor.peek(Te.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Te.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=f.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=f.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=f.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._err(g.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=f.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=f.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=f.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._leaveAttrName(),this.state=f.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+=K;break}default:this.currentAttr.name+=String.fromCodePoint(Ft(t)?Ca(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=f.SELF_CLOSING_START_TAG;break}case d.EQUALS_SIGN:{this.state=f.BEFORE_ATTRIBUTE_VALUE;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=f.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=f.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this.state=f.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingAttributeValue),this.state=f.DATA,this.emitCurrentTagToken();break}default:this.state=f.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=K;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=f.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=K;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=f.BEFORE_ATTRIBUTE_NAME;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=f.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=K;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=f.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this._leaveAttrValue(),this.state=f.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBetweenAttributes),this.state=f.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case d.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.unexpectedSolidusInTag),this.state=f.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=K;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Te.DASH_DASH,!0)?(this._createCommentToken(Te.DASH_DASH.length+1),this.state=f.COMMENT_START):this._consumeSequenceIfMatch(Te.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Te.DOCTYPE.length+1),this.state=f.DOCTYPE):this._consumeSequenceIfMatch(Te.CDATA_START,!0)?this.inForeignNode?this.state=f.CDATA_SECTION:(this._err(g.cdataInHtmlContent),this._createCommentToken(Te.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=f.BOGUS_COMMENT):this._ensureHibernation()||(this._err(g.incorrectlyOpenedComment),this._createCommentToken(2),this.state=f.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_START_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=f.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=f.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=f.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END_DASH;break}case d.LESS_THAN_SIGN:{a.data+="<",this.state=f.COMMENT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=K;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=f.COMMENT_LESS_THAN_SIGN_BANG;break}case d.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=f.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===d.HYPHEN_MINUS?this.state=f.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=f.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===d.HYPHEN_MINUS?this.state=f.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=f.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==d.GREATER_THAN_SIGN&&t!==d.EOF&&this._err(g.nestedComment),this.state=f.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=f.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentComment(a);break}case d.EXCLAMATION_MARK:{this.state=f.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=f.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{a.data+="--!",this.state=f.COMMENT_END_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.incorrectlyClosedComment),this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=f.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=f.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=f.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ft(t))this._createDoctypeToken(String.fromCharCode(Ca(t))),this.state=f.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(K),this.state=f.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=f.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=f.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=f.AFTER_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.name+=K;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(Ft(t)?Ca(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=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Te.PUBLIC,!1)?this.state=f.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Te.SYSTEM,!1)?this.state=f.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(g.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=f.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=f.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.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=f.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=f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.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=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=K;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.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=f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=K;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.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=f.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=f.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=f.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=f.DATA;break}case d.QUOTATION_MARK:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=f.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=f.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=f.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.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=f.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=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.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=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=K;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.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=f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=K;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.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=f.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=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=f.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=f.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=f.CDATA_SECTION_END:(this._emitChars("]"),this.state=f.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA;break}case d.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=f.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()&&is(this.preprocessor.peek(1))?f.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){is(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===d.SEMICOLON&&this._err(g.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const rs=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),us=new Set([...rs,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),Ia=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),rl=new Set([...Ia,s.OL,s.UL]),ul=new Set([...Ia,s.BUTTON]),os=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),cs=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),ol=new Set([s.TR,s.TEMPLATE,s.HTML]),cl=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),ll=new Set([s.TABLE,s.TEMPLATE,s.HTML]),dl=new Set([s.TD,s.TH]);class hl{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)===C.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])!==C.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(Ni,C.HTML)}popUntilTableCellPopped(){this.popUntilPopped(dl,C.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(ll,C.HTML)}clearBackToTableBodyContext(){this.clearBackTo(cl,C.HTML)}clearBackToTableRowContext(){this.clearBackTo(ol,C.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 C.HTML:{if(n===t)return!0;if(a.has(n))return!1;break}case C.SVG:{if(cs.has(n))return!1;break}case C.MATHML:{if(os.has(n))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ia)}hasInListItemScope(t){return this.hasInDynamicScope(t,rl)}hasInButtonScope(t){return this.hasInDynamicScope(t,ul)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case C.HTML:{if(Ni.has(a))return!0;if(Ia.has(a))return!1;break}case C.SVG:{if(cs.has(a))return!1;break}case C.MATHML:{if(os.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===C.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])===C.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])===C.HTML)switch(this.tagIDs[a]){case t:return!0;case s.OPTION:case s.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;rs.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;us.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&us.has(this.currentTagId);)this.pop()}}const Ci=3;var Be;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Be||(Be={}));const ls={type:Be.Marker};class fl{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===Be.Marker)break;const{element:h}=l;if(this.treeAdapter.getTagName(h)===r&&this.treeAdapter.getNamespaceURI(h)===u){const m=this.treeAdapter.getAttrList(h);m.length===n&&i.push({idx:o,attrs:m})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<Ci)return;const a=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,a);if(i.length<Ci)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>=Ci&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(ls)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:Be.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Be.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(ls);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const a=this.entries.find(i=>i.type===Be.Marker||this.treeAdapter.getTagName(i.element)===t);return a&&a.type===Be.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===Be.Element&&a.element===t)}}const We={createDocument(){return{nodeName:"#document",mode:Ne.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};We.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(We.isTextNode(a)){a.value+=t;return}}We.appendChild(e,We.createTextNode(t))},insertTextBefore(e,t,a){const i=e.childNodes[e.childNodes.indexOf(a)-1];i&&We.isTextNode(i)?i.value+=t:We.insertBefore(e,We.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}}},ds="html",ml="about:legacy-compat",El="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",hs=["+//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//"],pl=[...hs,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Tl=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),fs=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],bl=[...fs,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ms(e,t){return t.some(a=>e.startsWith(a))}function gl(e){return e.name===ds&&e.publicId===null&&(e.systemId===null||e.systemId===ml)}function _l(e){if(e.name!==ds)return Ne.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===El)return Ne.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),Tl.has(a))return Ne.QUIRKS;let i=t===null?pl:hs;if(ms(a,i))return Ne.QUIRKS;if(i=t===null?fs:bl,ms(a,i))return Ne.LIMITED_QUIRKS}return Ne.NO_QUIRKS}const Es={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Al="definitionurl",Nl="definitionURL",Cl=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])),Il=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:C.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:C.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:C.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:C.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:C.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:C.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:C.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:C.XML}],["xml:space",{prefix:"xml",name:"space",namespace:C.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:C.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:C.XMLNS}]]),Sl=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])),xl=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===ot.COLOR||i===ot.SIZE||i===ot.FACE)||xl.has(t)}function ps(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Al){e.attrs[t].name=Nl;break}}function Ts(e){for(let t=0;t<e.attrs.length;t++){const a=Cl.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function Ii(e){for(let t=0;t<e.attrs.length;t++){const a=Il.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 Dl(e){const t=Sl.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Na(e.tagName))}function Ll(e,t){return t===C.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function yl(e,t,a){if(t===C.MATHML&&e===s.ANNOTATION_XML){for(let i=0;i<a.length;i++)if(a[i].name===ot.ENCODING){const n=a[i].value.toLowerCase();return n===Es.TEXT_HTML||n===Es.APPLICATION_XML}}return t===C.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function Rl(e,t,a,i){return(!i||i===C.HTML)&&yl(e,t,a)||(!i||i===C.MATHML)&&Ll(e,t)}const kl="hidden",Ml=8,Pl=3;var E;(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"})(E||(E={}));const vl={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},bs=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),gs={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:We,onParseError:null};let _s=class{constructor(t,a,i=null,n=null){this.fragmentContext=i,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=E.INITIAL,this.originalInsertionMode=E.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={...gs,...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 sl(this.options,this),this.activeFormattingElements=new fl(this.treeAdapter),this.fragmentContextID=i?Na(this.treeAdapter.getTagName(i)):s.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new hl(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={...gs,...a};t??(t=i.treeAdapter.createElement(b.TEMPLATE,C.HTML,[]));const n=i.treeAdapter.createElement("documentmock",C.HTML,[]),r=new this(i,n,t);return r.fragmentContextID===s.TEMPLATE&&r.tmplInsertionModeStack.unshift(E.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:vl,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)===C.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,C.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=E.TEXT}switchToPlaintextParsing(){this.insertionMode=E.TEXT,this.originalInsertionMode=E.IN_BODY,this.tokenizer.state=be.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)!==C.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=be.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=be.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=be.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=be.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,C.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,C.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,C.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:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:l,endCol:h,endOffset:m})}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)===b.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===C.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&!this._isIntegrationPoint(i,a,C.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 Rl(t,n,r,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(n=>n.type===Be.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=E.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=E.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=E.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=E.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=E.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=E.IN_TABLE;return}case s.BODY:{this.insertionMode=E.IN_BODY;return}case s.FRAMESET:{this.insertionMode=E.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?E.AFTER_HEAD:E.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=E.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=E.IN_HEAD;return}break}}this.insertionMode=E.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=E.IN_SELECT_IN_TABLE;return}}this.insertionMode=E.IN_SELECT}_isElementCausesFosterParenting(t){return bs.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)===C.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 Jc[i].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){dd(this,t);return}switch(this.insertionMode){case E.INITIAL:{Ht(this,t);break}case E.BEFORE_HTML:{Vt(this,t);break}case E.BEFORE_HEAD:{Yt(this,t);break}case E.IN_HEAD:{qt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Wt(this,t);break}case E.AFTER_HEAD:{$t(this,t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:{Ns(this,t);break}case E.TEXT:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Di(this,t);break}case E.IN_TABLE_TEXT:{ys(this,t);break}case E.IN_COLUMN_GROUP:{Oa(this,t);break}case E.AFTER_BODY:{ya(this,t);break}case E.AFTER_AFTER_BODY:{Ra(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ld(this,t);return}switch(this.insertionMode){case E.INITIAL:{Ht(this,t);break}case E.BEFORE_HTML:{Vt(this,t);break}case E.BEFORE_HEAD:{Yt(this,t);break}case E.IN_HEAD:{qt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Wt(this,t);break}case E.AFTER_HEAD:{$t(this,t);break}case E.TEXT:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Di(this,t);break}case E.IN_COLUMN_GROUP:{Oa(this,t);break}case E.AFTER_BODY:{ya(this,t);break}case E.AFTER_AFTER_BODY:{Ra(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){xi(this,t);return}switch(this.insertionMode){case E.INITIAL:case E.BEFORE_HTML:case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_TEMPLATE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{xi(this,t);break}case E.IN_TABLE_TEXT:{Qt(this,t);break}case E.AFTER_BODY:{Yl(this,t);break}case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{ql(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case E.INITIAL:{Wl(this,t);break}case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:{this._err(t,g.misplacedDoctype);break}case E.IN_TABLE_TEXT:{Qt(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)?hd(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Ht(this,t);break}case E.BEFORE_HTML:{$l(this,t);break}case E.BEFORE_HEAD:{Xl(this,t);break}case E.IN_HEAD:{Le(this,t);break}case E.IN_HEAD_NO_SCRIPT:{zl(this,t);break}case E.AFTER_HEAD:{Zl(this,t);break}case E.IN_BODY:{he(this,t);break}case E.IN_TABLE:{At(this,t);break}case E.IN_TABLE_TEXT:{Qt(this,t);break}case E.IN_CAPTION:{Q0(this,t);break}case E.IN_COLUMN_GROUP:{Li(this,t);break}case E.IN_TABLE_BODY:{Da(this,t);break}case E.IN_ROW:{La(this,t);break}case E.IN_CELL:{K0(this,t);break}case E.IN_SELECT:{Ms(this,t);break}case E.IN_SELECT_IN_TABLE:{J0(this,t);break}case E.IN_TEMPLATE:{td(this,t);break}case E.AFTER_BODY:{id(this,t);break}case E.IN_FRAMESET:{nd(this,t);break}case E.AFTER_FRAMESET:{rd(this,t);break}case E.AFTER_AFTER_BODY:{od(this,t);break}case E.AFTER_AFTER_FRAMESET:{cd(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?fd(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Ht(this,t);break}case E.BEFORE_HTML:{Gl(this,t);break}case E.BEFORE_HEAD:{Ql(this,t);break}case E.IN_HEAD:{jl(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Kl(this,t);break}case E.AFTER_HEAD:{Jl(this,t);break}case E.IN_BODY:{xa(this,t);break}case E.TEXT:{U0(this,t);break}case E.IN_TABLE:{Gt(this,t);break}case E.IN_TABLE_TEXT:{Qt(this,t);break}case E.IN_CAPTION:{j0(this,t);break}case E.IN_COLUMN_GROUP:{z0(this,t);break}case E.IN_TABLE_BODY:{yi(this,t);break}case E.IN_ROW:{ks(this,t);break}case E.IN_CELL:{Z0(this,t);break}case E.IN_SELECT:{Ps(this,t);break}case E.IN_SELECT_IN_TABLE:{ed(this,t);break}case E.IN_TEMPLATE:{ad(this,t);break}case E.AFTER_BODY:{Bs(this,t);break}case E.IN_FRAMESET:{sd(this,t);break}case E.AFTER_FRAMESET:{ud(this,t);break}case E.AFTER_AFTER_BODY:{Ra(this,t);break}}}onEof(t){switch(this.insertionMode){case E.INITIAL:{Ht(this,t);break}case E.BEFORE_HTML:{Vt(this,t);break}case E.BEFORE_HEAD:{Yt(this,t);break}case E.IN_HEAD:{qt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Wt(this,t);break}case E.AFTER_HEAD:{$t(this,t);break}case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{Ds(this,t);break}case E.TEXT:{F0(this,t);break}case E.IN_TABLE_TEXT:{Qt(this,t);break}case E.IN_TEMPLATE:{vs(this,t);break}case E.AFTER_BODY:case E.IN_FRAMESET:case E.AFTER_FRAMESET:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{Oi(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 E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.TEXT:case E.IN_COLUMN_GROUP:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{this._insertCharacters(t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:case E.AFTER_BODY:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{As(this,t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Di(this,t);break}case E.IN_TABLE_TEXT:{Ls(this,t);break}}}};function Bl(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):Os(e,t),a}function wl(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 Ul(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>=Pl;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(u)):(u=Fl(e,o),i===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(u,i),i=u)}return i}function Fl(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 Hl(e,t,a){const i=e.treeAdapter.getTagName(t),n=Na(i);if(e._isElementCausesFosterParenting(n))e._fosterParentElement(a);else{const r=e.treeAdapter.getNamespaceURI(t);n===s.TEMPLATE&&r===C.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function Vl(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 Si(e,t){for(let a=0;a<Ml;a++){const i=Bl(e,t);if(!i)break;const n=wl(e,i);if(!n)break;e.activeFormattingElements.bookmark=i;const r=Ul(e,n,i.element),u=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(r),u&&Hl(e,u,r),Vl(e,n,i)}}function xi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Yl(e,t){e._appendCommentNode(t,e.openElements.items[0])}function ql(e,t){e._appendCommentNode(t,e.document)}function Oi(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 Wl(e,t){e._setDocumentType(t);const a=t.forceQuirks?Ne.QUIRKS:_l(t);gl(t)||e._err(t,g.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=E.BEFORE_HTML}function Ht(e,t){e._err(t,g.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ne.QUIRKS),e.insertionMode=E.BEFORE_HTML,e._processToken(t)}function $l(e,t){t.tagID===s.HTML?(e._insertElement(t,C.HTML),e.insertionMode=E.BEFORE_HEAD):Vt(e,t)}function Gl(e,t){const a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&Vt(e,t)}function Vt(e,t){e._insertFakeRootElement(),e.insertionMode=E.BEFORE_HEAD,e._processToken(t)}function Xl(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.HEAD:{e._insertElement(t,C.HTML),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD;break}default:Yt(e,t)}}function Ql(e,t){const a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?Yt(e,t):e._err(t,g.endTagWithoutMatchingOpenElement)}function Yt(e,t){e._insertFakeElement(b.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD,e._processToken(t)}function Le(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,C.HTML),t.ackSelfClosing=!0;break}case s.TITLE:{e._switchToTextParsing(t,be.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,be.RAWTEXT):(e._insertElement(t,C.HTML),e.insertionMode=E.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,be.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,be.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=E.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(E.IN_TEMPLATE);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:qt(e,t)}}function jl(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=E.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{qt(e,t);break}case s.TEMPLATE:{ct(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function ct(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 qt(e,t){e.openElements.pop(),e.insertionMode=E.AFTER_HEAD,e._processToken(t)}function zl(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{Le(e,t);break}case s.NOSCRIPT:{e._err(t,g.nestedNoscriptInHead);break}default:Wt(e,t)}}function Kl(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=E.IN_HEAD;break}case s.BR:{Wt(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function Wt(e,t){const a=t.type===W.EOF?g.openElementsLeftAfterEof:g.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=E.IN_HEAD,e._processToken(t)}function Zl(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BODY:{e._insertElement(t,C.HTML),e.framesetOk=!1,e.insertionMode=E.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,C.HTML),e.insertionMode=E.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),Le(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:$t(e,t)}}function Jl(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{$t(e,t);break}case s.TEMPLATE:{ct(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function $t(e,t){e._insertFakeElement(b.BODY,s.BODY),e.insertionMode=E.IN_BODY,Sa(e,t)}function Sa(e,t){switch(t.type){case W.CHARACTER:{Ns(e,t);break}case W.WHITESPACE_CHARACTER:{As(e,t);break}case W.COMMENT:{xi(e,t);break}case W.START_TAG:{he(e,t);break}case W.END_TAG:{xa(e,t);break}case W.EOF:{Ds(e,t);break}}}function As(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ns(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function e0(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function t0(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function a0(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,C.HTML),e.insertionMode=E.IN_FRAMESET)}function i0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,C.HTML)}function n0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),Ni.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,C.HTML)}function s0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,C.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function r0(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,C.HTML),a||(e.formElement=e.openElements.current))}function u0(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,C.HTML)}function o0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,C.HTML),e.tokenizer.state=be.PLAINTEXT}function c0(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.framesetOk=!1}function l0(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(b.A);a&&(Si(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function d0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function h0(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(Si(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,C.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function f0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function m0(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ne.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,C.HTML),e.framesetOk=!1,e.insertionMode=E.IN_TABLE}function Cs(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,C.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Is(e){const t=as(e,ot.TYPE);return t!=null&&t.toLowerCase()===kl}function E0(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,C.HTML),Is(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function p0(e,t){e._appendElement(t,C.HTML),t.ackSelfClosing=!0}function T0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,C.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function b0(e,t){t.tagName=b.IMG,t.tagID=s.IMG,Cs(e,t)}function g0(e,t){e._insertElement(t,C.HTML),e.skipNextNewLine=!0,e.tokenizer.state=be.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=E.TEXT}function _0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function A0(e,t){e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function Ss(e,t){e._switchToTextParsing(t,be.RAWTEXT)}function N0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===E.IN_TABLE||e.insertionMode===E.IN_CAPTION||e.insertionMode===E.IN_TABLE_BODY||e.insertionMode===E.IN_ROW||e.insertionMode===E.IN_CELL?E.IN_SELECT_IN_TABLE:E.IN_SELECT}function C0(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML)}function I0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,C.HTML)}function S0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,C.HTML)}function x0(e,t){e._reconstructActiveFormattingElements(),ps(t),Ii(t),t.selfClosing?e._appendElement(t,C.MATHML):e._insertElement(t,C.MATHML),t.ackSelfClosing=!0}function O0(e,t){e._reconstructActiveFormattingElements(),Ts(t),Ii(t),t.selfClosing?e._appendElement(t,C.SVG):e._insertElement(t,C.SVG),t.ackSelfClosing=!0}function xs(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML)}function he(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:{d0(e,t);break}case s.A:{l0(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{n0(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:{i0(e,t);break}case s.LI:case s.DD:case s.DT:{u0(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{Cs(e,t);break}case s.HR:{T0(e,t);break}case s.RB:case s.RTC:{I0(e,t);break}case s.RT:case s.RP:{S0(e,t);break}case s.PRE:case s.LISTING:{s0(e,t);break}case s.XMP:{_0(e,t);break}case s.SVG:{O0(e,t);break}case s.HTML:{e0(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:{Le(e,t);break}case s.BODY:{t0(e,t);break}case s.FORM:{r0(e,t);break}case s.NOBR:{h0(e,t);break}case s.MATH:{x0(e,t);break}case s.TABLE:{m0(e,t);break}case s.INPUT:{E0(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{p0(e,t);break}case s.IMAGE:{b0(e,t);break}case s.BUTTON:{c0(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{f0(e,t);break}case s.IFRAME:{A0(e,t);break}case s.SELECT:{N0(e,t);break}case s.OPTION:case s.OPTGROUP:{C0(e,t);break}case s.NOEMBED:case s.NOFRAMES:{Ss(e,t);break}case s.FRAMESET:{a0(e,t);break}case s.TEXTAREA:{g0(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?Ss(e,t):xs(e,t);break}case s.PLAINTEXT:{o0(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:xs(e,t)}}function D0(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=E.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=E.AFTER_BODY,Bs(e,t))}function y0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function R0(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 k0(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(b.P,s.P),e._closePElement()}function M0(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function P0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function v0(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function B0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function w0(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(b.BR,s.BR),e.openElements.pop(),e.framesetOk=!1}function Os(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 xa(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:{Si(e,t);break}case s.P:{k0(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:{y0(e,t);break}case s.LI:{M0(e);break}case s.DD:case s.DT:{P0(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{v0(e);break}case s.BR:{w0(e);break}case s.BODY:{D0(e,t);break}case s.HTML:{L0(e,t);break}case s.FORM:{R0(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{B0(e,t);break}case s.TEMPLATE:{ct(e,t);break}default:Os(e,t)}}function Ds(e,t){e.tmplInsertionModeStack.length>0?vs(e,t):Oi(e,t)}function U0(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 F0(e,t){e._err(t,g.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Di(e,t){if(bs.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=E.IN_TABLE_TEXT,t.type){case W.CHARACTER:{ys(e,t);break}case W.WHITESPACE_CHARACTER:{Ls(e,t);break}}else Xt(e,t)}function H0(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,C.HTML),e.insertionMode=E.IN_CAPTION}function V0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,C.HTML),e.insertionMode=E.IN_COLUMN_GROUP}function Y0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.COLGROUP,s.COLGROUP),e.insertionMode=E.IN_COLUMN_GROUP,Li(e,t)}function q0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,C.HTML),e.insertionMode=E.IN_TABLE_BODY}function W0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.TBODY,s.TBODY),e.insertionMode=E.IN_TABLE_BODY,Da(e,t)}function $0(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function G0(e,t){Is(t)?e._appendElement(t,C.HTML):Xt(e,t),t.ackSelfClosing=!0}function X0(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,C.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function At(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{W0(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{Le(e,t);break}case s.COL:{Y0(e,t);break}case s.FORM:{X0(e,t);break}case s.TABLE:{$0(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{q0(e,t);break}case s.INPUT:{G0(e,t);break}case s.CAPTION:{H0(e,t);break}case s.COLGROUP:{V0(e,t);break}default:Xt(e,t)}}function Gt(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{ct(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:Xt(e,t)}}function Xt(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Sa(e,t),e.fosterParentingEnabled=a}function Ls(e,t){e.pendingCharacterTokens.push(t)}function ys(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Qt(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)Xt(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Rs=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function Q0(e,t){const a=t.tagID;Rs.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,At(e,t)):he(e,t)}function j0(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=E.IN_TABLE,a===s.TABLE&&Gt(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:xa(e,t)}}function Li(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.COL:{e._appendElement(t,C.HTML),t.ackSelfClosing=!0;break}case s.TEMPLATE:{Le(e,t);break}default:Oa(e,t)}}function z0(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case s.TEMPLATE:{ct(e,t);break}case s.COL:break;default:Oa(e,t)}}function Oa(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE,e._processToken(t))}function Da(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,C.HTML),e.insertionMode=E.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(b.TR,s.TR),e.insertionMode=E.IN_ROW,La(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=E.IN_TABLE,At(e,t));break}default:At(e,t)}}function yi(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=E.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,Gt(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:Gt(e,t)}}function La(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,C.HTML),e.insertionMode=E.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=E.IN_TABLE_BODY,Da(e,t));break}default:At(e,t)}}function ks(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,yi(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=E.IN_TABLE_BODY,yi(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:Gt(e,t)}}function K0(e,t){const a=t.tagID;Rs.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),La(e,t)):he(e,t)}function Z0(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=E.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),ks(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:xa(e,t)}}function Ms(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,C.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,C.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,C.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:{Le(e,t);break}}}function Ps(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:{ct(e,t);break}}}function J0(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 ed(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)):Ps(e,t)}function td(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:{Le(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=E.IN_TABLE,e.insertionMode=E.IN_TABLE,At(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=E.IN_COLUMN_GROUP,e.insertionMode=E.IN_COLUMN_GROUP,Li(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=E.IN_TABLE_BODY,e.insertionMode=E.IN_TABLE_BODY,Da(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=E.IN_ROW,e.insertionMode=E.IN_ROW,La(e,t);break}default:e.tmplInsertionModeStack[0]=E.IN_BODY,e.insertionMode=E.IN_BODY,he(e,t)}}function ad(e,t){t.tagID===s.TEMPLATE&&ct(e,t)}function vs(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Oi(e,t)}function id(e,t){t.tagID===s.HTML?he(e,t):ya(e,t)}function Bs(e,t){var a;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=E.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 ya(e,t)}function ya(e,t){e.insertionMode=E.IN_BODY,Sa(e,t)}function nd(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.FRAMESET:{e._insertElement(t,C.HTML);break}case s.FRAME:{e._appendElement(t,C.HTML),t.ackSelfClosing=!0;break}case s.NOFRAMES:{Le(e,t);break}}}function sd(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=E.AFTER_FRAMESET))}function rd(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.NOFRAMES:{Le(e,t);break}}}function ud(e,t){t.tagID===s.HTML&&(e.insertionMode=E.AFTER_AFTER_FRAMESET)}function od(e,t){t.tagID===s.HTML?he(e,t):Ra(e,t)}function Ra(e,t){e.insertionMode=E.IN_BODY,Sa(e,t)}function cd(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.NOFRAMES:{Le(e,t);break}}}function ld(e,t){t.chars=K,e._insertCharacters(t)}function dd(e,t){e._insertCharacters(t),e.framesetOk=!1}function ws(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==C.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function hd(e,t){if(Ol(t))ws(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(a);i===C.MATHML?ps(t):i===C.SVG&&(Dl(t),Ts(t)),Ii(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function fd(e,t){if(t.tagID===s.P||t.tagID===s.BR){ws(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)===C.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 md=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 Ed(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===C.HTML&&md.has(t.treeAdapter.getTagName(e))}const pd={treeAdapter:We,scriptingEnabled:!0};function Td(e,t){const a={...pd,...t};return Us(e,a)}function bd(e,t){let a="";const i=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===b.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===C.HTML?t.treeAdapter.getTemplateContent(e):e,n=t.treeAdapter.getChildNodes(i);if(n)for(const r of n)a+=Us(r,t);return a}function Us(e,t){return t.treeAdapter.isElementNode(e)?gd(e,t):t.treeAdapter.isTextNode(e)?Ad(e,t):t.treeAdapter.isCommentNode(e)?Nd(e,t):t.treeAdapter.isDocumentTypeNode(e)?Cd(e,t):""}function gd(e,t){const a=t.treeAdapter.getTagName(e);return`<${a}${_d(e,t)}>${Ed(e,t)?"":`${bd(e,t)}</${a}>`}`}function _d(e,{treeAdapter:t}){let a="";for(const i of t.getAttrList(e)){if(a+=" ",i.namespace)switch(i.namespace){case C.XML:{a+=`xml:${i.name}`;break}case C.XMLNS:{i.name!=="xmlns"&&(a+="xmlns:"),a+=i.name;break}case C.XLINK:{a+=`xlink:${i.name}`;break}default:a+=`${i.prefix}:${i.name}`}else a+=i.name;a+=`="${sn(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)===C.HTML&&tl(r,t.scriptingEnabled)?i:rn(i)}function Nd(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function Cd(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function Id(e,t){return _s.parse(e,t)}function Sd(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);const i=_s.getFragmentParser(e,a);return i.tokenizer.write(t,!0),i.getFragment()}function Fs(e){const t=e.includes('"')?"'":'"';return t+e+t}function xd(e,t,a){let i="!DOCTYPE ";return e&&(i+=e),t?i+=` PUBLIC ${Fs(t)}`:a&&(i+=" SYSTEM"),a&&(i+=` ${Fs(a)}`),i}const Je={isCommentNode:sa,isElementNode:P,isTextNode:ve,createDocument(){const e=new it([]);return e["x-mode"]=Ne.NO_QUIRKS,e},createDocumentFragment(){return new it([])},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 qa(e,i,[]);return u.namespace=t,u["x-attribsNamespace"]=n,u["x-attribsPrefix"]=r,u},createCommentNode(e){return new Ha(e)},createTextNode(e){return new Lt(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){Je.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,a,i){const n=xd(t,a,i);let r=e.children.find(u=>Wa(u)&&u.name==="!doctype");r?r.data=n??null:(r=new Va("!doctype",n),Je.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&&ve(a)?a.data+=t:Je.appendChild(e,Je.createTextNode(t))},insertTextBefore(e,t,a){const i=e.children[e.children.indexOf(a)-1];i&&ve(i)?i.data+=t:Je.insertBefore(e,Je.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 Wa(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=Je),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),a?Id(e,t):Sd(i,e,t)}const Dd={treeAdapter:Je};function Ld(e){const t="length"in e?e:[e];for(let i=0;i<t.length;i+=1){const n=t[i];Qe(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+=Td(n,Dd)}return a}var k;(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"})(k||(k={}));var S;(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"})(S||(S={}));function $e(e){return e===k.Space||e===k.NewLine||e===k.Tab||e===k.FormFeed||e===k.CarriageReturn}function ka(e){return e===k.Slash||e===k.Gt||$e(e)}function yd(e){return e>=k.LowerA&&e<=k.LowerZ||e>=k.UpperA&&e<=k.UpperZ}var we;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(we||(we={}));const le={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 Rd{constructor({xmlMode:t=!1,decodeEntities:a=!0},i){this.cbs=i,this.state=S.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=S.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 za(t?Ji:Ga,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=S.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=S.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===k.Lt||!this.decodeEntities&&this.fastForwardTo(k.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=S.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===k.Amp&&this.startEntity()}stateSpecialStartSequence(t){const a=this.sequenceIndex===this.currentSequence.length;if(!(a?ka(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!a){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=S.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===k.Gt||$e(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===le.TitleEnd?this.decodeEntities&&t===k.Amp&&this.startEntity():this.fastForwardTo(k.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===k.Lt)}stateCDATASequence(t){t===le.Cdata[this.sequenceIndex]?++this.sequenceIndex===le.Cdata.length&&(this.state=S.InCommentLike,this.currentSequence=le.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=S.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===le.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=S.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?!ka(t):yd(t)}startSpecial(t,a){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=a,this.state=S.SpecialStartSequence}stateBeforeTagName(t){if(t===k.ExclamationMark)this.state=S.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===k.Questionmark)this.state=S.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const a=t|32;this.sectionStart=this.index,this.xmlMode?this.state=S.InTagName:a===le.ScriptEnd[2]?this.state=S.BeforeSpecialS:a===le.TitleEnd[2]?this.state=S.BeforeSpecialT:this.state=S.InTagName}else t===k.Slash?this.state=S.BeforeClosingTagName:(this.state=S.Text,this.stateText(t))}stateInTagName(t){ka(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=S.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){$e(t)||(t===k.Gt?this.state=S.Text:(this.state=this.isTagStartChar(t)?S.InClosingTagName:S.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===k.Gt||$e(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=S.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===k.Gt||this.fastForwardTo(k.Gt))&&(this.state=S.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===k.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=S.InSpecialTag,this.sequenceIndex=0):this.state=S.Text,this.sectionStart=this.index+1):t===k.Slash?this.state=S.InSelfClosingTag:$e(t)||(this.state=S.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===k.Gt?(this.cbs.onselfclosingtag(this.index),this.state=S.Text,this.sectionStart=this.index+1,this.isSpecial=!1):$e(t)||(this.state=S.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===k.Eq||ka(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=S.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===k.Eq?this.state=S.BeforeAttributeValue:t===k.Slash||t===k.Gt?(this.cbs.onattribend(we.NoValue,this.sectionStart),this.sectionStart=-1,this.state=S.BeforeAttributeName,this.stateBeforeAttributeName(t)):$e(t)||(this.cbs.onattribend(we.NoValue,this.sectionStart),this.state=S.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===k.DoubleQuote?(this.state=S.InAttributeValueDq,this.sectionStart=this.index+1):t===k.SingleQuote?(this.state=S.InAttributeValueSq,this.sectionStart=this.index+1):$e(t)||(this.sectionStart=this.index,this.state=S.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===k.DoubleQuote?we.Double:we.Single,this.index+1),this.state=S.BeforeAttributeName):this.decodeEntities&&t===k.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,k.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,k.SingleQuote)}stateInAttributeValueNoQuotes(t){$e(t)||t===k.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(we.Unquoted,this.index),this.state=S.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===k.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===k.OpeningSquareBracket?(this.state=S.CDATASequence,this.sequenceIndex=0):this.state=t===k.Dash?S.BeforeComment:S.InDeclaration}stateInDeclaration(t){(t===k.Gt||this.fastForwardTo(k.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=S.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===k.Gt||this.fastForwardTo(k.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=S.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===k.Dash?(this.state=S.InCommentLike,this.currentSequence=le.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=S.InDeclaration}stateInSpecialComment(t){(t===k.Gt||this.fastForwardTo(k.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=S.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const a=t|32;a===le.ScriptEnd[3]?this.startSpecial(le.ScriptEnd,4):a===le.StyleEnd[3]?this.startSpecial(le.StyleEnd,4):(this.state=S.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const a=t|32;a===le.TitleEnd[3]?this.startSpecial(le.TitleEnd,4):a===le.TextareaEnd[3]?this.startSpecial(le.TextareaEnd,4):(this.state=S.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=S.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?xe.Strict:this.baseState===S.Text||this.baseState===S.InSpecialTag?xe.Legacy:xe.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===S.Text||this.state===S.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===S.InAttributeValueDq||this.state===S.InAttributeValueSq||this.state===S.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 S.Text:{this.stateText(t);break}case S.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case S.InSpecialTag:{this.stateInSpecialTag(t);break}case S.CDATASequence:{this.stateCDATASequence(t);break}case S.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case S.InAttributeName:{this.stateInAttributeName(t);break}case S.InCommentLike:{this.stateInCommentLike(t);break}case S.InSpecialComment:{this.stateInSpecialComment(t);break}case S.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case S.InTagName:{this.stateInTagName(t);break}case S.InClosingTagName:{this.stateInClosingTagName(t);break}case S.BeforeTagName:{this.stateBeforeTagName(t);break}case S.AfterAttributeName:{this.stateAfterAttributeName(t);break}case S.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case S.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case S.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case S.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case S.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case S.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case S.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case S.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case S.InDeclaration:{this.stateInDeclaration(t);break}case S.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case S.BeforeComment:{this.stateBeforeComment(t);break}case S.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case S.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===S.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===S.InCommentLike?this.currentSequence===le.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===S.InTagName||this.state===S.BeforeAttributeName||this.state===S.BeforeAttributeValue||this.state===S.AfterAttributeName||this.state===S.InAttributeName||this.state===S.InAttributeValueSq||this.state===S.InAttributeValueDq||this.state===S.InAttributeValueNq||this.state===S.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,a){this.baseState!==S.Text&&this.baseState!==S.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 Nt=new Set(["input","option","optgroup","select","button","datalist","textarea"]),j=new Set(["p"]),Hs=new Set(["thead","tbody"]),Vs=new Set(["dd","dt"]),Ys=new Set(["rt","rp"]),kd=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",j],["h1",j],["h2",j],["h3",j],["h4",j],["h5",j],["h6",j],["select",Nt],["input",Nt],["output",Nt],["button",Nt],["datalist",Nt],["textarea",Nt],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",Vs],["dt",Vs],["address",j],["article",j],["aside",j],["blockquote",j],["details",j],["div",j],["dl",j],["fieldset",j],["figcaption",j],["figure",j],["footer",j],["form",j],["header",j],["hr",j],["main",j],["nav",j],["ol",j],["pre",j],["section",j],["table",j],["ul",j],["rt",Ys],["rp",Ys],["tbody",Hs],["tfoot",Hs]]),Md=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),qs=new Set(["math","svg"]),Ws=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),Pd=/\s|\//;class vd{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:Rd)(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,Qa(t)),this.startIndex=a}isVoidElement(t){return this.htmlMode&&Md.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&&kd.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&&(qs.has(t)?this.foreignContext.unshift(!0):Ws.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,h,m;this.endIndex=a;let p=this.getSlice(t,a);if(this.lowerCaseTagNames&&(p=p.toLowerCase()),this.htmlMode&&(qs.has(p)||Ws.has(p))&&this.foreignContext.shift(),this.isVoidElement(p))this.htmlMode&&p==="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),(m=(h=this.cbs).onclosetag)===null||m===void 0||m.call(h,"br",!1));else{const T=this.stack.indexOf(p);if(T!==-1)for(let _=0;_<=T;_++){const I=this.stack.shift();(n=(i=this.cbs).onclosetag)===null||n===void 0||n.call(i,I,_!==T)}else this.htmlMode&&p==="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+=Qa(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===we.Double?'"':t===we.Single?"'":t===we.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(Pd);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,h,m,p,T,_;this.endIndex=a;const I=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,I),(h=(l=this.cbs).oncdataend)===null||h===void 0||h.call(l)):((p=(m=this.cbs).oncomment)===null||p===void 0||p.call(m,`[CDATA[${I}]]`),(_=(T=this.cbs).oncommentend)===null||_===void 0||_.call(T)),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 Bd(e,t){const a=new wr(void 0,t);return new vd(a,t).end(e),a.root}const wd=hc((e,t,a,i)=>t._useHtmlParser2?Bd(e,t):Od(e,t,a,i)),$s=$c(wd,(e,t)=>t._useHtmlParser2?ra(e,t):Ld(e));var G=(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.Button=6]="Button",e[e.Block=10]="Block",e))(G||{});const Ud={key:0,"date-action":"1",contenteditable:"false",class:"text-red-500 text-xs mt-1"},Fd=c.defineComponent({__name:"ElementRenderer",props:{element:{type:Object,required:!0},selectedElement:Object,hoveredElement:Object,uploadByFile:{type:Function,required:!1},icons:{type:Array,default:()=>[]},mode:{type:String,default:"edit"},cropper:{type:Object,required:!1},icon:{type:Object,required:!1},upload:{type:Object,required:!1},r:{type:String,required:!1}},emits:["selectElement","hoverElement","updateText","contentUpdated","blockAction","addIcon"],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(""),h=c.computed(()=>a.element.rule.minText||0),m=c.computed(()=>a.element.rule.maxText||1/0);c.watch(()=>a.r,()=>{i("contentUpdated",H())},{immediate:!0});function p(D){D.xpath!="/div[1]"&&a.mode!=="preview"&&(a.mode==="edit"?D.type===G.Text&&i("selectElement",D):i("selectElement",D),!D.rule.isReadOnly&&D.type===G.Text&&(u.value=!0))}function T(D){i("selectElement",D)}function _(D,Y){i("hoverElement",D,Y)}function I(D){i("hoverElement",D)}function L(D){D.currentTarget.contains(D.relatedTarget)?i("hoverElement",null):a.hoveredElement?i("hoverElement",null,a.hoveredElement.parentxpath):i("hoverElement",null)}function y(){u.value=!1,i("contentUpdated",H())}function H(){function D(ae){const Ee=Object.entries(ae.attrs||{}).map(([Me,Et])=>`${Me}="${Et}"`).join(" "),Ae=`<${ae.tag}${Ee?" "+Ee:""}>`,Ge=`</${ae.tag}>`,mt=(ae.children||[]).map(Me=>D(Me)).join("");return`${Ae}${ae.editText||ae.text||""}${mt}${Ge}`}return D(a.element)}function v(D){var Ae;D.stopPropagation();const Y=D.target,ae=((Ae=Y.firstChild)==null?void 0:Ae.nodeType)===Node.TEXT_NODE&&Y.firstChild.nodeValue||"";if(ae.length<h.value){o.value=!0,l.value=`最少输入 ${h.value} 个字符`;return}else if(ae.length>m.value){o.value=!0,l.value=`最多输入 ${m.value} 个字符`;return}else o.value=!1,l.value="";i("updateText",{element:a.element,newText:ae}),i("contentUpdated",H());const Ee=c.toRaw(a.element);Ee.editText=ae}function w(D){i("updateText",D),i("contentUpdated",H())}function z(){const D={...a.element};i("blockAction",{action:"add",element:a.element,newBlock:D})}function U(){A(a.element),i("blockAction",{action:"moveUp",element:a.element})}function A(D){D.children&&D.children.length>0&&D.children.forEach(Y=>{Y.type==G.Text&&(Y.text!==Y.editText&&(Y.text=Y.editText),A(Y))})}function B(){A(a.element),i("blockAction",{action:"moveDown",element:a.element})}function X(){i("blockAction",{action:"delete",element:a.element})}function te(D){i("blockAction",D),i("contentUpdated",H())}function Ce(D){Ie.value.openModal(D)}function Re(D){me.value.openModal(D)}function ke(D,Y){i("addIcon",D,Y),i("contentUpdated",H())}const Ie=c.ref(a.icon);c.watch(()=>a.icon,D=>{Ie.value=D},{immediate:!0});const me=c.ref(a.upload);return c.watch(()=>a.upload,D=>{me.value=D},{immediate:!0}),(D,Y)=>{const ae=c.resolveComponent("ElementRenderer",!0);return c.openBlock(),c.createElementBlock(c.Fragment,null,[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(a.element.tag),c.mergeProps({class:["relative",e.mode==="design"?"m-2 p-1 border-dashed border-2":"",r.value?"border-dashed border-blue-500":"",n.value?"border-dashed border-green-500 z-10 border-2":"",o.value?"border-dashed border-red-500":"",(!r.value&&!n.value&&!o.value,""),a.element.rule&&a.element.rule.isReadOnly?"cursor-not-allowed":""]},a.element.attrs,{contenteditable:u.value,onClick:Y[2]||(Y[2]=c.withModifiers(()=>p(a.element),["stop"])),onMouseenter:Y[3]||(Y[3]=()=>I(a.element)),onMouseleave:L,onBlur:y,onInput:v}),{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a.element.text),1),a.element.children&&a.element.children.length?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.element.children,(Ee,Ae)=>(c.openBlock(),c.createBlock(ae,{key:Ae,r:e.r,mode:e.mode,icons:e.icons,element:Ee,selectedElement:a.selectedElement,hoveredElement:a.hoveredElement,cropper:e.cropper,icon:e.icon,upload:e.upload,"upload-by-file":e.uploadByFile,onSelectElement:T,onHoverElement:_,onUpdateText:w,onBlockAction:te,onAddIcon:ke},null,8,["r","mode","icons","element","selectedElement","hoveredElement","cropper","icon","upload","upload-by-file"]))),128)),a.element.type===c.unref(G).Block?(c.openBlock(),c.createElementBlock("div",{key:0,"date-action":"1",contenteditable:"false",onClick:Y[0]||(Y[0]=c.withModifiers(()=>{},["stop"])),class:"z-10 flex space-x-1 flex-none flex-nowrap overflow-visible absolute top-2"},[c.createElementVNode("button",{class:"flex-none px-2 py-1 bg-blue-500 text-white rounded",onClick:c.withModifiers(z,["stop"])}," + "),c.createElementVNode("button",{class:"flex-none px-2 py-1 bg-gray-300 text-white rounded",onClick:c.withModifiers(U,["stop"])}," ⬅️ "),c.createElementVNode("button",{class:"flex-none px-2 py-1 bg-gray-300 text-white rounded",onClick:c.withModifiers(B,["stop"])}," ➡️ "),c.createElementVNode("button",{class:"flex-none px-2 py-1 bg-red-500 text-white rounded",onClick:c.withModifiers(X,["stop"])}," ✖ ")])):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),a.element.type===c.unref(G).Icon?(c.openBlock(),c.createElementBlock("div",{key:1,class:"cursor-pointer rounded-sm w-5 h-5 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-sm text-gray-50 z-10 bg-black/80",contenteditable:"false",onClick:Y[1]||(Y[1]=c.withModifiers(()=>Ce(a.element),["stop"]))}," ↑ ")):c.createCommentVNode("",!0)]),_:1},16,["class","contenteditable"])),a.element.type==c.unref(G).Text&&o.value?(c.openBlock(),c.createElementBlock("div",Ud,c.toDisplayString(l.value),1)):c.createCommentVNode("",!0),a.element.type===c.unref(G).Image?(c.openBlock(),c.createElementBlock("div",{key:1,class:"cursor-pointer rounded-sm flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-sm text-gray-50 z-10 bg-black/80",onClick:Y[5]||(Y[5]=c.withModifiers(()=>{},["stop"])),contenteditable:"false"},[c.createElementVNode("div",{class:"p-2",onClick:Y[4]||(Y[4]=c.withModifiers(()=>Re(a.element),["stop"]))},"上传")])):c.createCommentVNode("",!0)],64)}}}),lt=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},Hd=lt(Fd,[["__scopeId","data-v-a46039f1"]]),Vd=c.defineComponent({name:"GpCheckbox",props:{modelValue:{type:Boolean,required:!0},label:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:t}){return{updateValue:i=>{t("update:modelValue",i.target.checked)}}}}),Yd={class:"form-group"},qd={class:"flex items-center space-x-2 cursor-pointer"},Wd=["checked","aria-checked"],$d={class:"checkbox-label text-sm text-gray-700"};function Gd(e,t,a,i,n,r){return c.openBlock(),c.createElementBlock("div",Yd,[c.createElementVNode("label",qd,[c.createElementVNode("input",{type:"checkbox",checked:e.modelValue,onChange:t[0]||(t[0]=(...u)=>e.updateValue&&e.updateValue(...u)),class:"custom-checkbox","aria-checked":e.modelValue},null,40,Wd),c.createElementVNode("span",$d,c.toDisplayString(e.label),1)])])}const jt=lt(Vd,[["render",Gd],["__scopeId","data-v-68b8f276"]]),Xd=c.defineComponent({name:"GpMessage",props:{message:{type:String,required:!0},type:{type:String,default:"info"},position:{type:String,default:"top-right"},duration:{type:Number,default:3e3},onClose:{type:Function,required:!0},icon:{type:Boolean,default:!0}},setup(e){const t=c.ref(!1),a=c.computed(()=>({success:"bg-green-100 text-green-800",error:"bg-red-100 text-red-800",info:"bg-blue-100 text-blue-800",warning:"bg-yellow-100 text-yellow-800"})[e.type]),i=()=>{t.value=!1,e.onClose()};return setTimeout(()=>{i()},e.duration),t.value=!0,{visible:t,typeClass:a,closeMessage:i}}}),Qd={key:0,class:"gp-message"},jd={key:0,class:"mr-2"},zd={key:0,class:"text-green-500"},Kd={key:1,class:"text-red-500"},Zd={key:2,class:"text-blue-500"},Jd={key:3,class:"text-yellow-500"};function eh(e,t,a,i,n,r){return c.openBlock(),c.createBlock(c.Transition,{name:"fade"},{default:c.withCtx(()=>[e.visible?(c.openBlock(),c.createElementBlock("div",Qd,[c.createElementVNode("div",{class:c.normalizeClass([e.typeClass,"message-content"])},[e.icon?(c.openBlock(),c.createElementBlock("span",jd,[c.renderSlot(e.$slots,"icon",{},()=>[e.type==="success"?(c.openBlock(),c.createElementBlock("span",zd,"✔")):c.createCommentVNode("",!0),e.type==="error"?(c.openBlock(),c.createElementBlock("span",Kd,"✖")):c.createCommentVNode("",!0),e.type==="info"?(c.openBlock(),c.createElementBlock("span",Zd,"ℹ")):c.createCommentVNode("",!0),e.type==="warning"?(c.openBlock(),c.createElementBlock("span",Jd,"⚠")):c.createCommentVNode("",!0)],!0)])):c.createCommentVNode("",!0),c.createElementVNode("span",null,c.toDisplayString(e.message),1),c.createElementVNode("button",{class:"close-btn hover:text-gray-800 font-bold",onClick:t[0]||(t[0]=(...u)=>e.closeMessage&&e.closeMessage(...u))}," × ")],2)])):c.createCommentVNode("",!0)]),_:3})}const th=lt(Xd,[["render",eh],["__scopeId","data-v-56476f4c"]]),Ct=c.reactive([]);let Ri=null;const ah=()=>{const e=document.createElement("div");return e.id="global-message-container",document.body.appendChild(e),e},ih=()=>{if(Ri)return;const e=ah();Ri=c.createApp({setup(){return{messageQueue:Ct}},render(){const t=c.computed(()=>{var i;return{"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4","top-center":"top-4 left-1/2 transform -translate-x-1/2","bottom-center":"bottom-4 left-1/2 transform -translate-x-1/2"}[((i=Ct[0])==null?void 0:i.options.position)||"top-right"]});return c.h("div",{class:`fixed flex flex-col gap-2 ${t.value}`},Ct.map(a=>c.h(th,{key:a.id,...a.options,onClose:()=>Gs(a.id)})))}}),Ri.mount(e)},Gs=e=>{const t=Ct.findIndex(a=>a.id===e);t!==-1&&Ct.splice(t,1)};let nh=0;const Q=e=>{ih();const t=nh++;Ct.push({id:t,options:e}),setTimeout(()=>{Gs(t)},e.duration||3e3)};Q.success=(e,t=3e3,a=!0)=>{Q(typeof e=="string"?{message:e,type:"success",duration:t,icon:a}:{...e,type:"success"})},Q.error=(e,t=3e3,a=!0)=>{Q(typeof e=="string"?{message:e,type:"error",duration:t,icon:a}:{...e,type:"error"})},Q.info=(e,t=3e3,a=!0)=>{Q(typeof e=="string"?{message:e,type:"info",duration:t,icon:a}:{...e,type:"info"})},Q.warning=(e,t=3e3,a=!0)=>{Q(typeof e=="string"?{message:e,type:"warning",duration:t,icon:a}:{...e,type:"warning"})};const sh={key:0},rh={key:0},uh={class:"text-gray-500 my-2"},oh={class:"text-gray-500 my-2"},ch={key:1},lh={key:2},dh={key:3},hh={key:4},fh={key:5},mh={key:6},Eh={key:7},ph={key:8},Th={key:9},bh={key:10},gh=lt(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(){if(n.value.type===G.Icon&&!n.value.attrs.class.includes("iconfont")){Q.error("图标仅支持 iconfont 图标");return}if(n.value.type===G.Image&&n.value.tag!=="img"){Q.error("节点类型错误");return}if(n.value.type===G.Video&&n.value.tag!=="video"){Q.error("节点类型错误");return}if(n.value.type===G.Link&&n.value.tag!=="a"){Q.error("节点类型错误");return}if(n.value.type===G.Text){if(Number(n.value.rule.minText)>Number(n.value.rule.maxText)){Q.error("最小文本长度不能大于最大文本长度");return}if(n.value.tag!=="p"&&n.value.tag!=="div"&&n.value.tag!=="span"&&n.value.tag!=="h1"&&n.value.tag!=="h2"&&n.value.tag!=="h3"&&n.value.tag!=="h4"&&n.value.tag!=="h5"&&n.value.tag!=="h6"){Q.error("节点类型错误");return}}if(n.value.type===G.Block){if(Number(n.value.rule.minBlock)>Number(n.value.rule.maxBlock)){Q.error("最小块数量不能大于最大块数量");return}if(n.value.tag!=="div"&&n.value.tag!=="section"&&n.value.tag!=="article"&&n.value.tag!=="nav"&&n.value.tag!=="header"&&n.value.tag!=="footer"&&n.value.tag!=="span"&&n.value.tag!=="p"&&n.value.tag!=="img"){Q.error("节点类型错误");return}if(!n.value.children||n.value.children.length<1){Q.error("节点错误,必须包含子元素");return}}i("updateElement",n.value)}return(u,o)=>(c.openBlock(),c.createElementBlock("div",null,[n.value?(c.openBlock(),c.createElementBlock("div",sh,[n.value.text!==void 0?(c.openBlock(),c.createElementBlock("div",rh,[o[13]||(o[13]=c.createElementVNode("label",{class:"block"},"内容",-1)),c.createElementVNode("div",uh,c.toDisplayString(n.value.text||"-"),1)])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[14]||(o[14]=c.createElementVNode("label",{class:"block mt-4"},"节点",-1)),c.createElementVNode("div",oh,c.toDisplayString(n.value.xpath),1)]),c.createElementVNode("div",null,[o[16]||(o[16]=c.createElementVNode("label",{class:"block mt-4"},"类型",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value.type=l),class:"border rounded p-1 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:6},"按钮",-1),c.createElementVNode("option",{value:10},"块",-1)]),512),[[c.vModelSelect,n.value.type]])]),n.value.type==c.unref(G).Text?(c.openBlock(),c.createElementBlock("div",ch,[o[17]||(o[17]=c.createElementVNode("label",{class:"block mt-4"},"最小文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=l=>n.value.rule.minText=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(G).Text?(c.openBlock(),c.createElementBlock("div",lh,[o[18]||(o[18]=c.createElementVNode("label",{class:"block mt-4"},"最大文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[2]||(o[2]=l=>n.value.rule.maxText=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(G).Image?(c.openBlock(),c.createElementBlock("div",dh,[o[19]||(o[19]=c.createElementVNode("label",{class:"block mt-4"},"是否裁剪",-1)),c.createVNode(jt,{class:"py-2",modelValue:n.value.rule.crop,"onUpdate:modelValue":o[3]||(o[3]=l=>n.value.rule.crop=l),label:"是"},null,8,["modelValue"])])):c.createCommentVNode("",!0),n.value.type==c.unref(G).Image?(c.openBlock(),c.createElementBlock("div",hh,[o[20]||(o[20]=c.createElementVNode("label",{class:"block mt-4"},"图片宽度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=l=>n.value.rule.minImageWidth=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minImageWidth]])])):c.createCommentVNode("",!0),n.value.type==c.unref(G).Image?(c.openBlock(),c.createElementBlock("div",fh,[o[21]||(o[21]=c.createElementVNode("label",{class:"block mt-4"},"图片高度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=l=>n.value.rule.maxImageHeight=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxImageHeight]])])):c.createCommentVNode("",!0),n.value.type==c.unref(G).Block?(c.openBlock(),c.createElementBlock("div",mh,[o[22]||(o[22]=c.createElementVNode("label",{class:"block mt-4"},"块最小数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[6]||(o[6]=l=>n.value.rule.minBlock=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(G).Block?(c.openBlock(),c.createElementBlock("div",Eh,[o[23]||(o[23]=c.createElementVNode("label",{class:"block mt-4"},"块最大数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=l=>n.value.rule.maxBlock=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(G).Text||n.value.type==c.unref(G).Icon||n.value.type==c.unref(G).Button?(c.openBlock(),c.createElementBlock("div",ph,[o[24]||(o[24]=c.createElementVNode("label",{class:"block mt-4"},"主题色",-1)),c.createVNode(jt,{class:"py-2",modelValue:n.value.rule.isThemeColor,"onUpdate:modelValue":o[8]||(o[8]=l=>n.value.rule.isThemeColor=l),label:"是"},null,8,["modelValue"])])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[25]||(o[25]=c.createElementVNode("label",{class:"block mt-4"},"是否必填",-1)),c.createVNode(jt,{class:"py-2",modelValue:n.value.rule.isRequired,"onUpdate:modelValue":o[9]||(o[9]=l=>n.value.rule.isRequired=l),label:"是"},null,8,["modelValue"])]),c.createElementVNode("div",null,[o[26]||(o[26]=c.createElementVNode("label",{class:"block mt-4"},"是否只读",-1)),c.createVNode(jt,{class:"py-2",modelValue:n.value.rule.isReadOnly,"onUpdate:modelValue":o[10]||(o[10]=l=>n.value.rule.isReadOnly=l),label:"是"},null,8,["modelValue"])]),n.value.type==c.unref(G).Link||n.value.type==c.unref(G).Button?(c.openBlock(),c.createElementBlock("div",Th,[o[27]||(o[27]=c.createElementVNode("label",{class:"block mt-4"},"打开美洽",-1)),c.createVNode(jt,{class:"py-2",modelValue:n.value.rule.openMeiqia,"onUpdate:modelValue":o[11]||(o[11]=l=>n.value.rule.openMeiqia=l),label:"是"},null,8,["modelValue"])])):c.createCommentVNode("",!0),n.value.type==c.unref(G).Link||n.value.type==c.unref(G).Button?(c.openBlock(),c.createElementBlock("div",bh,[o[28]||(o[28]=c.createElementVNode("label",{class:"block mt-4"},"链接",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[12]||(o[12]=l=>n.value.rule.linkUrl=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.linkUrl]])])):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),c.createElementVNode("button",{onClick:r,class:"mt-4 p-2 bg-green-500 text-white rounded"}," 保存 ")]))}}),[["__scopeId","data-v-7395db8a"]]);/*!
|
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])"},Pi={};function fo(e,t){return e===Y.falseFunc?Y.falseFunc:a=>t.isTag(a)&&e(a)}function vi(e,t){const a=t.getSiblings(e);if(a.length<=1)return[];const n=a.indexOf(e);return n<0||n===a.length-1?[]:a.slice(n+1).filter(t.isTag)}function dn(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 hn=(e,t,a,n,i)=>{const r=i(t,dn(a),n);return r===Y.trueFunc?e:r===Y.falseFunc?Y.falseFunc:u=>r(u)&&e(u)},fn={is:hn,matches:hn,where:hn,not(e,t,a,n,i){const r=i(t,dn(a),n);return r===Y.falseFunc?e:r===Y.trueFunc?Y.falseFunc:u=>!r(u)&&e(u)},has(e,t,a,n,i){const{adapter:r}=a,u=dn(a);u.relativeSelector=!0;const c=t.some(m=>m.some(on))?[Pi]:void 0,l=i(t,u,c);if(l===Y.falseFunc)return Y.falseFunc;const h=fo(l,r);if(c&&l!==Y.trueFunc){const{shouldTestNextSiblings:m=!1}=l;return p=>{if(!e(p))return!1;c[0]=p;const T=r.getChildren(p),_=m?[...T,...vi(p,r)]:T;return r.existsOne(h,_)}}return m=>e(m)&&r.existsOne(h,r.getChildren(m))}};function mo(e,t,a,n,i){var r;const{name:u,data:c}=t;if(Array.isArray(c)){if(!(u in fn))throw new Error(`Unknown pseudo-class :${u}(${c})`);return fn[u](e,c,a,n,i)}const l=(r=a.pseudos)===null||r===void 0?void 0:r[u],h=typeof l=="string"?l:ho[u];if(typeof h=="string"){if(c!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);const m=pa(h);return fn.is(e,m,a,n,i)}if(typeof l=="function")return wi(l,u,c,1),m=>l(m,c)&&e(m);if(u in cn)return cn[u](e,c,a,n);if(u in Mi){const m=Mi[u];return wi(m,u,c,2),p=>m(p,a,c)&&e(p)}throw new Error(`Unknown pseudo-class :${u}`)}function mn(e,t){const a=t.getParent(e);return a&&t.isTag(a)?a:null}function Eo(e,t,a,n,i){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()),ro[t.action](e,t,a)}case R.Pseudo:return mo(e,t,a,n,i);case R.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:c}=t;return(!a.xmlMode||a.lowerCaseTags)&&(c=c.toLowerCase()),function(h){return r.getName(h)===c&&e(h)}}case R.Descendant:{if(a.cacheResults===!1||typeof WeakSet>"u")return function(h){let m=h;for(;m=mn(m,r);)if(e(m))return!0;return!1};const c=new WeakSet;return function(h){let m=h;for(;m=mn(m,r);)if(!c.has(m)){if(r.isTag(m)&&e(m))return!0;c.add(m)}return!1}}case"_flexibleDescendant":return function(l){let h=l;do if(e(h))return!0;while(h=mn(h,r));return!1};case R.Parent:return function(l){return r.getChildren(l).some(h=>r.isTag(h)&&e(h))};case R.Child:return function(l){const h=r.getParent(l);return h!=null&&r.isTag(h)&&e(h)};case R.Sibling:return function(l){const h=r.getSiblings(l);for(let m=0;m<h.length;m++){const p=h[m];if(u(l,p))break;if(r.isTag(p)&&e(p))return!0}return!1};case R.Adjacent:return r.prevElementSibling?function(l){const h=r.prevElementSibling(l);return h!=null&&e(h)}:function(l){const h=r.getSiblings(l);let m;for(let p=0;p<h.length;p++){const T=h[p];if(u(l,T))break;r.isTag(T)&&(m=T)}return!!m&&e(m)};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 Bi(e){return e.type===R.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(Bi)))}const po={type:R.Descendant},To={type:"_flexibleDescendant"},bo={type:R.Pseudo,name:"scope",data:null};function go(e,{adapter:t},a){const n=!!(a!=null&&a.every(i=>{const r=t.isTag(i)&&t.getParent(i);return i===Pi||r&&t.isTag(r)}));for(const i of e){if(!(i.length>0&&on(i[0])&&i[0].type!==R.Descendant))if(n&&!i.some(Bi))i.unshift(po);else continue;i.unshift(bo)}}function Ui(e,t,a){var n;e.forEach(no),a=(n=t.context)!==null&&n!==void 0?n:a;const i=Array.isArray(a),r=a&&(Array.isArray(a)?a:[a]);if(t.relativeSelector!==!1)go(e,t,r);else if(e.some(l=>l.length>0&&on(l[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let u=!1;const c=e.map(l=>{if(l.length>=2){const[h,m]=l;h.type!==R.Pseudo||h.name!=="scope"||(i&&m.type===R.Descendant?l[1]=To:(m.type===R.Adjacent||m.type===R.Sibling)&&(u=!0))}return _o(l,t,r)}).reduce(Ao,Y.falseFunc);return c.shouldTestNextSiblings=u,c}function _o(e,t,a){var n;return e.reduce((i,r)=>i===Y.falseFunc?Y.falseFunc:Eo(i,r,t,a,Ui),(n=t.rootFunc)!==null&&n!==void 0?n:Y.trueFunc)}function Ao(e,t){return t===Y.falseFunc||e===Y.trueFunc?e:e===Y.falseFunc||t===Y.trueFunc?t:function(n){return e(n)||t(n)}}const Fi=(e,t)=>e===t,No={adapter:fa,equals:Fi};function Co(e){var t,a,n,i;const r=e??No;return(t=r.adapter)!==null&&t!==void 0||(r.adapter=fa),(a=r.equals)!==null&&a!==void 0||(r.equals=(i=(n=r.adapter)===null||n===void 0?void 0:n.equals)!==null&&i!==void 0?i:Fi),r}function Io(e){return function(a,n,i){const r=Co(n);return e(a,r,i)}}const En=Io(Ui);function Hi(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],n=a.length;for(let i=0;i<n;i++){const r=vi(a[i],t);a.push(...r)}return a}const xo=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function _a(e){return e.type!=="pseudo"?!1:xo.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(_a)):!1}function Oo(e,t,a){const n=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(n)?n>=0?n+1:1/0:0;case"lt":return isFinite(n)?n>=0?Math.min(n,a):1/0:0;case"gt":return isFinite(n)?1/0:0;case"odd":return 2*a;case"even":return 2*a-1;case"last":case"not":return 1/0}}function Do(e){for(;e.parent;)e=e.parent;return e}function pn(e){const t=[],a=[];for(const n of e)n.some(_a)?t.push(n):a.push(n);return[a,t]}const Lo={type:R.Universal,namespace:null},yo={type:R.Pseudo,name:"scope",data:null};function Vi(e,t,a={}){return Yi([e],t,a)}function Yi(e,t,a={}){if(typeof t=="function")return e.some(t);const[n,i]=pn(pa(t));return n.length>0&&e.some(En(n,a))||i.some(r=>$i(r,e,a).length>0)}function Ro(e,t,a,n){const i=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(i)&&Math.abs(i)<t.length?[i<0?t[t.length+i]:t[i]]:[];case"gt":return isFinite(i)?t.slice(i+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(Wi(a,t,n));return t.filter(u=>!r.has(u))}}}function qi(e,t,a={}){return Wi(pa(e),t,a)}function Wi(e,t,a){if(t.length===0)return[];const[n,i]=pn(e);let r;if(n.length){const u=bn(t,n,a);if(i.length===0)return u;u.length&&(r=new Set(u))}for(let u=0;u<i.length&&(r==null?void 0:r.size)!==t.length;u++){const c=i[u];if((r?t.filter(m=>P(m)&&!r.has(m)):t).length===0)break;const h=$i(c,t,a);if(h.length)if(r)h.forEach(m=>r.add(m));else{if(u===i.length-1)return h;r=new Set(h)}}return typeof r<"u"?r.size===t.length?t:t.filter(u=>r.has(u)):[]}function $i(e,t,a){var n;if(e.some(wt)){const i=(n=a.root)!==null&&n!==void 0?n:Do(t[0]),r={...a,context:t,relativeSelector:!1};return e.push(yo),Aa(i,e,r,!0,t.length)}return Aa(t,e,a,!1,t.length)}function ko(e,t,a={},n=1/0){if(typeof e=="function")return Gi(t,e);const[i,r]=pn(pa(e)),u=r.map(c=>Aa(t,c,a,!0,n));return i.length&&u.push(Tn(t,i,a,n)),u.length===0?[]:u.length===1?u[0]:bt(u.reduce((c,l)=>[...c,...l]))}function Aa(e,t,a,n,i){const r=t.findIndex(_a),u=t.slice(0,r),c=t[r],l=t.length-1===r?i:1/0,h=Oo(c.name,c.data,l);if(h===0)return[];const p=(u.length===0&&!Array.isArray(e)?ca(e).filter(P):u.length===0?(Array.isArray(e)?e:[e]).filter(P):n||u.some(wt)?Tn(e,[u],a,h):bn(e,[u],a)).slice(0,h);let T=Ro(c.name,p,c.data,a);if(T.length===0||t.length===r+1)return T;const _=t.slice(r+1),I=_.some(wt);if(I){if(wt(_[0])){const{type:L}=_[0];(L===R.Sibling||L===R.Adjacent)&&(T=Hi(T,fa,!0)),_.unshift(Lo)}a={...a,relativeSelector:!1,rootFunc:L=>T.includes(L)}}else a.rootFunc&&a.rootFunc!==Ta.trueFunc&&(a={...a,rootFunc:Ta.trueFunc});return _.some(_a)?Aa(T,_,a,!1,i):I?Tn(T,[_],a,i):bn(T,[_],a)}function Tn(e,t,a,n){const i=En(t,a,e);return Gi(e,i,n)}function Gi(e,t,a=1/0){const n=Hi(e,fa,t.shouldTestNextSiblings);return Ja(i=>P(i)&&t(i),n,!0,a)}function bn(e,t,a){const n=(Array.isArray(e)?e:[e]).filter(P);if(n.length===0)return n;const i=En(t,a);return i===Ta.trueFunc?n:n.filter(i)}const Mo=/^\s*[+~]/;function wo(e){if(!e)return this._make([]);if(typeof e!="string"){const t=qe(e)?e.toArray():[e],a=this.toArray();return this._make(t.filter(n=>a.some(i=>Ti(i,n))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function Po(e,t){var a;const n=this.toArray(),i=Mo.test(e)?n:this.children().toArray(),r={context:n,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(ko(e,i,r,t))}function gn(e){return function(t,...a){return function(n){var i;let r=e(t,this);return n&&(r=Nn(r,n,this.options.xmlMode,(i=this._root)===null||i===void 0?void 0:i[0])),this._make(this.length>1&&r.length>1?a.reduce((u,c)=>c(u),r):r)}}}const vt=gn((e,t)=>{let a=[];for(let n=0;n<t.length;n++){const i=e(t[n]);i.length>0&&(a=a.concat(i))}return a}),_n=gn((e,t)=>{const a=[];for(let n=0;n<t.length;n++){const i=e(t[n]);i!==null&&a.push(i)}return a});function An(e,...t){let a=null;const n=gn((i,r)=>{const u=[];return ee(r,c=>{for(let l;(l=i(c))&&!(a!=null&&a(l,u.length));c=l)u.push(l)}),u})(e,...t);return function(i,r){a=typeof i=="string"?c=>Vi(c,i,this.options):i?Bt(i):null;const u=n.call(this,r);return a=null,u}}function _t(e){return e.length>1?Array.from(new Set(e)):e}const vo=_n(({parent:e})=>e&&!Qe(e)?e:null,_t),Bo=vt(e=>{const t=[];for(;e.parent&&!Qe(e.parent);)t.push(e.parent),e=e.parent;return t},bt,e=>e.reverse()),Uo=An(({parent:e})=>e&&!Qe(e)?e:null,bt,e=>e.reverse());function Fo(e){var t;const a=[];if(!e)return this._make(a);const n={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},i=typeof e=="string"?r=>Vi(r,e,n):Bt(e);return ee(this,r=>{for(r&&!Qe(r)&&!P(r)&&(r=r.parent);r&&P(r);){if(i(r,0)){a.includes(r)||a.push(r);break}r=r.parent}}),this._make(a)}const Ho=_n(e=>Ka(e)),Vo=vt(e=>{const t=[];for(;e.next;)e=e.next,P(e)&&t.push(e);return t},_t),Yo=An(e=>Ka(e),_t),qo=_n(e=>Za(e)),Wo=vt(e=>{const t=[];for(;e.prev;)e=e.prev,P(e)&&t.push(e);return t},_t),$o=An(e=>Za(e),_t),Go=vt(e=>li(e).filter(t=>P(t)&&t!==e),bt),Xo=vt(e=>ca(e).filter(P),_t);function Qo(){const e=this.toArray().reduce((t,a)=>re(a)?t.concat(a.children):t,[]);return this._make(e)}function jo(e){let t=0;const a=this.length;for(;t<a&&e.call(this[t],t,this[t])!==!1;)++t;return this}function zo(e){let t=[];for(let a=0;a<this.length;a++){const n=this[a],i=e.call(n,a,n);i!=null&&(t=t.concat(i))}return this._make(t)}function Bt(e){return typeof e=="function"?(t,a)=>e.call(t,a,t):qe(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function Ko(e){var t;return this._make(Nn(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function Nn(e,t,a,n){return typeof t=="string"?qi(t,e,{xmlMode:a,root:n}):e.filter(Bt(t))}function Zo(e){const t=this.toArray();return typeof e=="string"?Yi(t.filter(P),e,this.options):e?t.some(Bt(e)):!1}function Jo(e){let t=this.toArray();if(typeof e=="string"){const a=new Set(qi(e,t,this.options));t=t.filter(n=>!a.has(n))}else{const a=Bt(e);t=t.filter((n,i)=>!a(n,i))}return this._make(t)}function ec(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,a)=>this._make(a).find(e).length>0)}function tc(){return this.length>1?this._make(this[0]):this}function ac(){return this.length>0?this._make(this[this.length-1]):this}function nc(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 ic(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function sc(){return Array.prototype.slice.call(this)}function rc(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=qe(e)?e[0]:e),Array.prototype.indexOf.call(t,a)}function uc(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function oc(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function cc(e,t){const a=this._make(e,t),n=bt([...this.get(),...a.get()]);return this._make(n)}function lc(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const dc=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:Po,add:cc,addBack:lc,children:Xo,closest:Fo,contents:Qo,each:jo,end:oc,eq:nc,filter:Ko,filterArray:Nn,find:wo,first:tc,get:ic,has:ec,index:rc,is:Zo,last:ac,map:zo,next:Ho,nextAll:Vo,nextUntil:Yo,not:Jo,parent:vo,parents:Bo,parentsUntil:Uo,prev:qo,prevAll:Wo,prevUntil:$o,siblings:Go,slice:uc,toArray:sc},Symbol.toStringTag,{value:"Module"}));function hc(e){return function(a,n,i,r){if(typeof Buffer<"u"&&Buffer.isBuffer(a)&&(a=a.toString()),typeof a=="string")return e(a,n,i,r);const u=a;if(!Array.isArray(u)&&Qe(u))return u;const c=new nt([]);return ut(u,c),c}}function ut(e,t){const a=Array.isArray(e)?e:[e];t?t.children=a:t=null;for(let n=0;n<a.length;n++){const i=a[n];i.parent&&i.parent.children!==a&&it(i),t?(i.prev=a[n-1]||null,i.next=a[n+1]||null):i.prev=i.next=null,i.parent=t}return t}function fc(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 n=0;n<e.length;n++){const i=e[n];if(typeof i=="object"){if(i==null)continue;if(!("length"in i)){a.push(t?yt(i,!0):i);continue}}a.push(...this._makeDomArray(i,t))}return a}return[t?yt(e,!0):e]}function Xi(e){return function(...t){const a=this.length-1;return ee(this,(n,i)=>{if(!re(n))return;const r=typeof t[0]=="function"?t[0].call(n,i,this._render(n.children)):t,u=this._makeDomArray(r,i<a);e(u,n.children,n)})}}function Ke(e,t,a,n,i){var r,u;const c=[t,a,...n],l=t===0?null:e[t-1],h=t+a>=e.length?null:e[t+a];for(let m=0;m<n.length;++m){const p=n[m],T=p.parent;if(T){const I=T.children.indexOf(p);I>-1&&(T.children.splice(I,1),i===T&&t>I&&c[0]--)}p.parent=i,p.prev&&(p.prev.next=(r=p.next)!==null&&r!==void 0?r:null),p.next&&(p.next.prev=(u=p.prev)!==null&&u!==void 0?u:null),p.prev=m===0?l:n[m-1],p.next=m===n.length-1?h:n[m+1]}return l&&(l.next=n[0]),h&&(h.prev=n[n.length-1]),e.splice(...c)}function mc(e){return(qe(e)?e:this._make(e)).append(this),this}function Ec(e){return(qe(e)?e:this._make(e)).prepend(this),this}const pc=Xi((e,t,a)=>{Ke(t,t.length,0,e,a)}),Tc=Xi((e,t,a)=>{Ke(t,0,0,e,a)});function Qi(e){return function(t){const a=this.length-1,n=this.parents().last();for(let i=0;i<this.length;i++){const r=this[i],u=typeof t=="function"?t.call(r,i,r):typeof t=="string"&&!an(t)?n.find(t).clone():t,[c]=this._makeDomArray(u,i<a);if(!c||!re(c))continue;let l=c,h=0;for(;h<l.children.length;){const m=l.children[h];P(m)?(l=m,h=0):h++}e(r,l,[c])}return this}}const bc=Qi((e,t,a)=>{const{parent:n}=e;if(!n)return;const i=n.children,r=i.indexOf(e);ut([e],t),Ke(i,r,0,a,n)}),gc=Qi((e,t,a)=>{re(e)&&(ut(e.children,t),ut(a,e))});function _c(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 n;for(let r=0;r<a.length;r++)a[r].type==="tag"&&(n=a[r]);let i=0;for(;n&&i<n.children.length;){const r=n.children[i];r.type==="tag"?(n=r,i=0):i++}n&&this._make(n).append(this)}return this}function Nc(...e){const t=this.length-1;return ee(this,(a,n)=>{if(!re(a)||!a.parent)return;const i=a.parent.children,r=i.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,n,this._render(a.children)):e,c=this._makeDomArray(u,n<t);Ke(i,r+1,0,c,a.parent)})}function Cc(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const a of this._makeDomArray(e)){const n=this.clone().toArray(),{parent:i}=a;if(!i)continue;const r=i.children,u=r.indexOf(a);u<0||(Ke(r,u+1,0,n,i),t.push(...n))}return this._make(t)}function Ic(...e){const t=this.length-1;return ee(this,(a,n)=>{if(!re(a)||!a.parent)return;const i=a.parent.children,r=i.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,n,this._render(a.children)):e,c=this._makeDomArray(u,n<t);Ke(i,r,0,c,a.parent)})}function Sc(e){const t=this._make(e);this.remove();const a=[];return ee(t,n=>{const i=this.clone().toArray(),{parent:r}=n;if(!r)return;const u=r.children,c=u.indexOf(n);c<0||(Ke(u,c,0,i,r),a.push(...i))}),this._make(a)}function xc(e){const t=e?this.filter(e):this;return ee(t,a=>{it(a),a.prev=a.next=a.parent=null}),this}function Oc(e){return ee(this,(t,a)=>{const{parent:n}=t;if(!n)return;const i=n.children,r=typeof e=="function"?e.call(t,a,t):e,u=this._makeDomArray(r);ut(u,null);const c=i.indexOf(t);Ke(i,c,1,u,n),u.includes(t)||(t.parent=t.prev=t.next=null)})}function Dc(){return ee(this,e=>{if(re(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||!re(t)?null:this._render(t.children)}return ee(this,t=>{if(!re(t))return;for(const n of t.children)n.next=n.prev=n.parent=null;const a=qe(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;ut(a,t)})}function yc(){return this._render(this)}function Rc(e){return e===void 0?Rt(this):typeof e=="function"?ee(this,(t,a)=>this._make(t).text(e.call(t,a,Rt([t])))):ee(this,t=>{if(!re(t))return;for(const n of t.children)n.next=n.prev=n.parent=null;const a=new Lt(`${e}`);ut(a,t)})}function kc(){const e=Array.prototype.map.call(this.get(),a=>yt(a,!0)),t=new nt(e);for(const a of e)a.parent=t;return this._make(e)}const Mc=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:fc,after:Nc,append:pc,appendTo:mc,before:Ic,clone:kc,empty:Dc,html:Lc,insertAfter:Cc,insertBefore:Sc,prepend:Tc,prependTo:Ec,remove:xc,replaceWith:Oc,text:Rc,toString:yc,unwrap:_c,wrap:bc,wrapAll:Ac,wrapInner:gc},Symbol.toStringTag,{value:"Module"}));function wc(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return ee(this,(a,n)=>{P(a)&&ji(a,e,t,n)});if(this.length!==0)return zi(this[0],e)}function ji(e,t,a,n){if(typeof t=="string"){const i=zi(e),r=typeof a=="function"?a.call(e,n,i[t]):a;r===""?delete i[t]:r!=null&&(i[t]=r),e.attribs.style=Pc(i)}else if(typeof t=="object"){const i=Object.keys(t);for(let r=0;r<i.length;r++){const u=i[r];ji(e,u,t[u],r)}}}function zi(e,t){if(!e||!P(e))return;const a=vc(e.attribs.style);if(typeof t=="string")return a[t];if(Array.isArray(t)){const n={};for(const i of t)a[i]!=null&&(n[i]=a[i]);return n}return a}function Pc(e){return Object.keys(e).reduce((t,a)=>`${t}${t?" ":""}${a}: ${e[a]};`,"")}function vc(e){if(e=(e||"").trim(),!e)return{};const t={};let a;for(const n of e.split(";")){const i=n.indexOf(":");if(i<1||i===n.length-1){const r=n.trimEnd();r.length>0&&a!==void 0&&(t[a]+=`;${r}`)}else a=n.slice(0,i).trim(),t[a]=n.slice(i+1).trim()}return t}const Bc=Object.freeze(Object.defineProperty({__proto__:null,css:wc},Symbol.toStringTag,{value:"Module"})),Ki="input,select,textarea,keygen",Uc=/%20/g,Zi=/\r?\n/g;function Fc(){return this.serializeArray().map(a=>`${encodeURIComponent(a.name)}=${encodeURIComponent(a.value)}`).join("&").replace(Uc,"+")}function Hc(){return this.map((e,t)=>{const a=this._make(t);return P(t)&&t.name==="form"?a.find(Ki).toArray():a.filter(Ki).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var a;const n=this._make(t),i=n.attr("name"),r=(a=n.val())!==null&&a!==void 0?a:"";return Array.isArray(r)?r.map(u=>({name:i,value:u.replace(Zi,`\r
|
7
|
+
`)})):{name:i,value:r.replace(Zi,`\r
|
8
|
+
`)}}).toArray()}const Vc=Object.freeze(Object.defineProperty({__proto__:null,serialize:Fc,serializeArray:Hc},Symbol.toStringTag,{value:"Module"}));function Yc(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 qc(e){const t={};for(const a in e){const n=e[a],i=Array.isArray(n),{selector:r,value:u}=Yc(i?n[0]:n),c=typeof u=="function"?u:typeof u=="string"?l=>this._make(l).prop(u):l=>this._make(l).extract(u);if(i)t[a]=this._findBySelector(r,Number.POSITIVE_INFINITY).map((l,h)=>c(h,a,t)).get();else{const l=this._findBySelector(r,1);t[a]=l.length>0?c(l[0],a,t):void 0}}return t}const Wc=Object.freeze(Object.defineProperty({__proto__:null,extract:qc},Symbol.toStringTag,{value:"Module"}));class Ut{constructor(t,a,n){if(this.length=0,this.options=n,this._root=a,t){for(let i=0;i<t.length;i++)this[i]=t[i];this.length=t.length}}}Ut.prototype.cheerio="[cheerio object]",Ut.prototype.splice=Array.prototype.splice,Ut.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Ut.prototype,ju,dc,Mc,Bc,Vc,Wc);function $c(e,t){return function a(n,i,r=!0){if(n==null)throw new Error("cheerio.load() expects a string");const u=tn(i),c=e(n,u,r,null);class l extends Ut{_make(p,T){const _=h(p,T);return _.prevObject=this,_}_parse(p,T,_,I){return e(p,T,_,I)}_render(p){return t(p,this.options)}}function h(m,p,T=c,_){if(m&&qe(m))return m;const I=tn(_,u),L=typeof T=="string"?[e(T,I,!1,null)]:"length"in T?T:[T],y=qe(L)?L:new l(L,null,I);if(y._root=y,!m)return new l(void 0,y,I);const V=typeof m=="string"&&an(m)?e(m,I,!1,null).children:Gc(m)?[m]:Array.isArray(m)?m:void 0,v=new l(V,y,I);if(V)return v;if(typeof m!="string")throw new TypeError("Unexpected type of selector");let U=m;const z=p?typeof p=="string"?an(p)?new l([e(p,I,!1,null)],y,I):(U=`${p} ${U}`,y):qe(p)?p:new l(Array.isArray(p)?p:[p],y,I):y;return z?z.find(U):v}return Object.assign(h,Bu,{load:a,_root:c,_options:u,fn:l.prototype,prototype:l.prototype}),h}}function Gc(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const Xc=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]),K="�";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 Te={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ji(e){return e>=55296&&e<=57343}function Qc(e){return e>=56320&&e<=57343}function jc(e,t){return(e-55296)*1024+9216+t}function es(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||Xc.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 zc=65536;class Kc{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=zc,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:n,col:i,offset:r}=this,u=i+a,c=r+a;return{code:t,startLine:n,endLine:n,startCol:u,endCol:u,startOffset:c,endOffset:c}}_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(Qc(a))return this.pos++,this._addGap(),jc(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 n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return!1;return!0}peek(t){const a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,d.EOF;const n=this.html.charCodeAt(a);return n===d.CARRIAGE_RETURN?d.LINE_FEED:n}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,Ji(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){es(t)?this._err(g.controlCharacterInInputStream):ts(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 $;(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"})($||($={}));function as(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 C;(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/"})(C||(C={}));var ot;(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"})(ot||(ot={}));var Ne;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ne||(Ne={}));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 Zc=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 Na(e){var t;return(t=Zc.get(e))!==null&&t!==void 0?t:s.UNKNOWN}const x=s,Jc={[C.HTML]:new Set([x.ADDRESS,x.APPLET,x.AREA,x.ARTICLE,x.ASIDE,x.BASE,x.BASEFONT,x.BGSOUND,x.BLOCKQUOTE,x.BODY,x.BR,x.BUTTON,x.CAPTION,x.CENTER,x.COL,x.COLGROUP,x.DD,x.DETAILS,x.DIR,x.DIV,x.DL,x.DT,x.EMBED,x.FIELDSET,x.FIGCAPTION,x.FIGURE,x.FOOTER,x.FORM,x.FRAME,x.FRAMESET,x.H1,x.H2,x.H3,x.H4,x.H5,x.H6,x.HEAD,x.HEADER,x.HGROUP,x.HR,x.HTML,x.IFRAME,x.IMG,x.INPUT,x.LI,x.LINK,x.LISTING,x.MAIN,x.MARQUEE,x.MENU,x.META,x.NAV,x.NOEMBED,x.NOFRAMES,x.NOSCRIPT,x.OBJECT,x.OL,x.P,x.PARAM,x.PLAINTEXT,x.PRE,x.SCRIPT,x.SECTION,x.SELECT,x.SOURCE,x.STYLE,x.SUMMARY,x.TABLE,x.TBODY,x.TD,x.TEMPLATE,x.TEXTAREA,x.TFOOT,x.TH,x.THEAD,x.TITLE,x.TR,x.TRACK,x.UL,x.WBR,x.XMP]),[C.MATHML]:new Set([x.MI,x.MO,x.MN,x.MS,x.MTEXT,x.ANNOTATION_XML]),[C.SVG]:new Set([x.TITLE,x.FOREIGN_OBJECT,x.DESC]),[C.XLINK]:new Set,[C.XML]:new Set,[C.XMLNS]:new Set},Cn=new Set([x.H1,x.H2,x.H3,x.H4,x.H5,x.H6]),el=new Set([b.STYLE,b.SCRIPT,b.XMP,b.IFRAME,b.NOEMBED,b.NOFRAMES,b.PLAINTEXT]);function tl(e,t){return el.has(e)||t&&e===b.NOSCRIPT}var f;(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"})(f||(f={}));const be={DATA:f.DATA,RCDATA:f.RCDATA,RAWTEXT:f.RAWTEXT,SCRIPT_DATA:f.SCRIPT_DATA,PLAINTEXT:f.PLAINTEXT,CDATA_SECTION:f.CDATA_SECTION};function al(e){return e>=d.DIGIT_0&&e<=d.DIGIT_9}function Ft(e){return e>=d.LATIN_CAPITAL_A&&e<=d.LATIN_CAPITAL_Z}function nl(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_Z}function Ze(e){return nl(e)||Ft(e)}function ns(e){return Ze(e)||al(e)}function Ca(e){return e+32}function is(e){return e===d.SPACE||e===d.LINE_FEED||e===d.TABULATION||e===d.FORM_FEED}function ss(e){return is(e)||e===d.SOLIDUS||e===d.GREATER_THAN_SIGN}function il(e){return e===d.NULL?g.nullCharacterReference:e>1114111?g.characterReferenceOutsideUnicodeRange:Ji(e)?g.surrogateCharacterReference:ts(e)?g.noncharacterCharacterReference:es(e)||e===d.CARRIAGE_RETURN?g.controlCharacterReference:null}let sl=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=f.DATA,this.returnState=f.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Kc(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new za(Ga,(n,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(n)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(g.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(g.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const i=il(n);i&&this._err(i,1)}}:void 0)}_err(t,a=0){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,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,n){this.active=!0,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||n==null||n()}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:$.START_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:$.END_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:$.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:$.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 n=this.currentToken;if(as(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const i=(t=(a=n.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);i[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=Na(t.tagName),t.type===$.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 $.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case $.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case $.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:$.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=is(t)?$.WHITESPACE_CHARACTER:t===d.NULL?$.NULL_CHARACTER:$.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken($.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=f.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?xe.Attribute:xe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===f.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===f.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===f.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case f.DATA:{this._stateData(t);break}case f.RCDATA:{this._stateRcdata(t);break}case f.RAWTEXT:{this._stateRawtext(t);break}case f.SCRIPT_DATA:{this._stateScriptData(t);break}case f.PLAINTEXT:{this._statePlaintext(t);break}case f.TAG_OPEN:{this._stateTagOpen(t);break}case f.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case f.TAG_NAME:{this._stateTagName(t);break}case f.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case f.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case f.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case f.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case f.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case f.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case f.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case f.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case f.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case f.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case f.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case f.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case f.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case f.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case f.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case f.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case f.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case f.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case f.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case f.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case f.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case f.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case f.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case f.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case f.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case f.BOGUS_COMMENT:{this._stateBogusComment(t);break}case f.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case f.COMMENT_START:{this._stateCommentStart(t);break}case f.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case f.COMMENT:{this._stateComment(t);break}case f.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case f.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case f.COMMENT_END:{this._stateCommentEnd(t);break}case f.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case f.DOCTYPE:{this._stateDoctype(t);break}case f.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case f.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case f.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case f.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case f.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case f.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case f.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case f.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case f.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case f.CDATA_SECTION:{this._stateCdataSection(t);break}case f.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case f.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case f.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case f.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.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=f.RCDATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.RAWTEXT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ze(t))this._createStartTagToken(),this.state=f.TAG_NAME,this._stateTagName(t);else switch(t){case d.EXCLAMATION_MARK:{this.state=f.MARKUP_DECLARATION_OPEN;break}case d.SOLIDUS:{this.state=f.END_TAG_OPEN;break}case d.QUESTION_MARK:{this._err(g.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=f.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=f.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ze(t))this._createEndTagToken(),this.state=f.TAG_NAME,this._stateTagName(t);else switch(t){case d.GREATER_THAN_SIGN:{this._err(g.missingEndTagName),this.state=f.DATA;break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=f.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=f.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this.state=f.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.tagName+=K;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(Ft(t)?Ca(t):t)}}_stateRcdataLessThanSign(t){t===d.SOLIDUS?this.state=f.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=f.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ze(t)?(this.state=f.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=f.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=f.BEFORE_ATTRIBUTE_NAME,!1;case d.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=f.SELF_CLOSING_START_TAG,!1;case d.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=f.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===d.SOLIDUS?this.state=f.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ze(t)?(this.state=f.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case d.SOLIDUS:{this.state=f.SCRIPT_DATA_END_TAG_OPEN;break}case d.EXCLAMATION_MARK:{this.state=f.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=f.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ze(t)?(this.state=f.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===d.HYPHEN_MINUS?(this.state=f.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===d.HYPHEN_MINUS?(this.state=f.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);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=f.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_ESCAPED,this._emitChars(K);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.GREATER_THAN_SIGN:{this.state=f.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_ESCAPED,this._emitChars(K);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===d.SOLIDUS?this.state=f.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ze(t)?(this._emitChars("<"),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ze(t)?(this.state=f.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Te.SCRIPT,!1)&&ss(this.preprocessor.peek(Te.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Te.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(K);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=f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(K);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.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=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.GREATER_THAN_SIGN:{this.state=f.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(K);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===d.SOLIDUS?(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Te.SCRIPT,!1)&&ss(this.preprocessor.peek(Te.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Te.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=f.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=f.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=f.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._err(g.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=f.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=f.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=f.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._leaveAttrName(),this.state=f.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+=K;break}default:this.currentAttr.name+=String.fromCodePoint(Ft(t)?Ca(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=f.SELF_CLOSING_START_TAG;break}case d.EQUALS_SIGN:{this.state=f.BEFORE_ATTRIBUTE_VALUE;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=f.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=f.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this.state=f.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingAttributeValue),this.state=f.DATA,this.emitCurrentTagToken();break}default:this.state=f.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=K;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=f.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=K;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=f.BEFORE_ATTRIBUTE_NAME;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=f.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=K;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=f.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this._leaveAttrValue(),this.state=f.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBetweenAttributes),this.state=f.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case d.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.unexpectedSolidusInTag),this.state=f.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=K;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Te.DASH_DASH,!0)?(this._createCommentToken(Te.DASH_DASH.length+1),this.state=f.COMMENT_START):this._consumeSequenceIfMatch(Te.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Te.DOCTYPE.length+1),this.state=f.DOCTYPE):this._consumeSequenceIfMatch(Te.CDATA_START,!0)?this.inForeignNode?this.state=f.CDATA_SECTION:(this._err(g.cdataInHtmlContent),this._createCommentToken(Te.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=f.BOGUS_COMMENT):this._ensureHibernation()||(this._err(g.incorrectlyOpenedComment),this._createCommentToken(2),this.state=f.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_START_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=f.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=f.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=f.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END_DASH;break}case d.LESS_THAN_SIGN:{a.data+="<",this.state=f.COMMENT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=K;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=f.COMMENT_LESS_THAN_SIGN_BANG;break}case d.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=f.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===d.HYPHEN_MINUS?this.state=f.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=f.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===d.HYPHEN_MINUS?this.state=f.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=f.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==d.GREATER_THAN_SIGN&&t!==d.EOF&&this._err(g.nestedComment),this.state=f.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=f.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentComment(a);break}case d.EXCLAMATION_MARK:{this.state=f.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=f.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{a.data+="--!",this.state=f.COMMENT_END_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.incorrectlyClosedComment),this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=f.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=f.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=f.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ft(t))this._createDoctypeToken(String.fromCharCode(Ca(t))),this.state=f.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(K),this.state=f.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=f.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=f.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=f.AFTER_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.name+=K;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(Ft(t)?Ca(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=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Te.PUBLIC,!1)?this.state=f.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Te.SYSTEM,!1)?this.state=f.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(g.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=f.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=f.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.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=f.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=f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.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=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=K;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.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=f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=K;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.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=f.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=f.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=f.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=f.DATA;break}case d.QUOTATION_MARK:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=f.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=f.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=f.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.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=f.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=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.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=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=K;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.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=f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=K;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.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=f.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=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=f.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=f.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=f.CDATA_SECTION_END:(this._emitChars("]"),this.state=f.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA;break}case d.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=f.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()&&ns(this.preprocessor.peek(1))?f.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ns(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===d.SEMICOLON&&this._err(g.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const rs=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),us=new Set([...rs,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),Ia=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),rl=new Set([...Ia,s.OL,s.UL]),ul=new Set([...Ia,s.BUTTON]),os=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),cs=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),ol=new Set([s.TR,s.TEMPLATE,s.HTML]),cl=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),ll=new Set([s.TABLE,s.TEMPLATE,s.HTML]),dl=new Set([s.TD,s.TH]);class hl{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,n){this.treeAdapter=a,this.handler=n,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)===C.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 n=this._indexOf(t);this.items[n]=a,n===this.stackTop&&(this.current=a)}insertAfter(t,a,n){const i=this._indexOf(t)+1;this.items.splice(i,0,a),this.tagIDs.splice(i,0,n),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===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])!==C.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 n=this._indexOfTagNames(t,a);this.shortenToLength(n<0?0:n)}popUntilNumberedHeaderPopped(){this.popUntilPopped(Cn,C.HTML)}popUntilTableCellPopped(){this.popUntilPopped(dl,C.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===a)return n;return-1}clearBackTo(t,a){const n=this._indexOfTagNames(t,a);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(ll,C.HTML)}clearBackToTableBodyContext(){this.clearBackTo(cl,C.HTML)}clearBackToTableRowContext(){this.clearBackTo(ol,C.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 n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case C.HTML:{if(i===t)return!0;if(a.has(i))return!1;break}case C.SVG:{if(cs.has(i))return!1;break}case C.MATHML:{if(os.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ia)}hasInListItemScope(t){return this.hasInDynamicScope(t,rl)}hasInButtonScope(t){return this.hasInDynamicScope(t,ul)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case C.HTML:{if(Cn.has(a))return!0;if(Ia.has(a))return!1;break}case C.SVG:{if(cs.has(a))return!1;break}case C.MATHML:{if(os.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===C.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])===C.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])===C.HTML)switch(this.tagIDs[a]){case t:return!0;case s.OPTION:case s.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;rs.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;us.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&us.has(this.currentTagId);)this.pop()}}const In=3;var ve;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ve||(ve={}));const ls={type:ve.Marker};class fl{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){const n=[],i=a.length,r=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const l=this.entries[c];if(l.type===ve.Marker)break;const{element:h}=l;if(this.treeAdapter.getTagName(h)===r&&this.treeAdapter.getNamespaceURI(h)===u){const m=this.treeAdapter.getAttrList(h);m.length===i&&n.push({idx:c,attrs:m})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<In)return;const a=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,a);if(n.length<In)return;const i=new Map(a.map(u=>[u.name,u.value]));let r=0;for(let u=0;u<n.length;u++){const c=n[u];c.attrs.every(l=>i.get(l.name)===l.value)&&(r+=1,r>=In&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(ls)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:ve.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:ve.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(ls);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const a=this.entries.find(n=>n.type===ve.Marker||this.treeAdapter.getTagName(n.element)===t);return a&&a.type===ve.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===ve.Element&&a.element===t)}}const We={createDocument(){return{nodeName:"#document",mode:Ne.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 n=e.childNodes.indexOf(a);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,n){const i=e.childNodes.find(r=>r.nodeName==="#documentType");if(i)i.name=t,i.publicId=a,i.systemId=n;else{const r={nodeName:"#documentType",name:t,publicId:a,systemId:n,parentNode:null};We.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(We.isTextNode(a)){a.value+=t;return}}We.appendChild(e,We.createTextNode(t))},insertTextBefore(e,t,a){const n=e.childNodes[e.childNodes.indexOf(a)-1];n&&We.isTextNode(n)?n.value+=t:We.insertBefore(e,We.createTextNode(t),a)},adoptAttributes(e,t){const a=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)a.has(t[n].name)||e.attrs.push(t[n])},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}}},ds="html",ml="about:legacy-compat",El="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",hs=["+//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//"],pl=[...hs,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Tl=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),fs=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],bl=[...fs,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ms(e,t){return t.some(a=>e.startsWith(a))}function gl(e){return e.name===ds&&e.publicId===null&&(e.systemId===null||e.systemId===ml)}function _l(e){if(e.name!==ds)return Ne.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===El)return Ne.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),Tl.has(a))return Ne.QUIRKS;let n=t===null?pl:hs;if(ms(a,n))return Ne.QUIRKS;if(n=t===null?fs:bl,ms(a,n))return Ne.LIMITED_QUIRKS}return Ne.NO_QUIRKS}const Es={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Al="definitionurl",Nl="definitionURL",Cl=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])),Il=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:C.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:C.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:C.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:C.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:C.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:C.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:C.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:C.XML}],["xml:space",{prefix:"xml",name:"space",namespace:C.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:C.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:C.XMLNS}]]),Sl=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])),xl=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:n})=>n===ot.COLOR||n===ot.SIZE||n===ot.FACE)||xl.has(t)}function ps(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Al){e.attrs[t].name=Nl;break}}function Ts(e){for(let t=0;t<e.attrs.length;t++){const a=Cl.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function Sn(e){for(let t=0;t<e.attrs.length;t++){const a=Il.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 Dl(e){const t=Sl.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Na(e.tagName))}function Ll(e,t){return t===C.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function yl(e,t,a){if(t===C.MATHML&&e===s.ANNOTATION_XML){for(let n=0;n<a.length;n++)if(a[n].name===ot.ENCODING){const i=a[n].value.toLowerCase();return i===Es.TEXT_HTML||i===Es.APPLICATION_XML}}return t===C.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function Rl(e,t,a,n){return(!n||n===C.HTML)&&yl(e,t,a)||(!n||n===C.MATHML)&&Ll(e,t)}const kl="hidden",Ml=8,wl=3;var E;(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"})(E||(E={}));const Pl={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},bs=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),gs={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:We,onParseError:null};let _s=class{constructor(t,a,n=null,i=null){this.fragmentContext=n,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=E.INITIAL,this.originalInsertionMode=E.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={...gs,...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 sl(this.options,this),this.activeFormattingElements=new fl(this.treeAdapter),this.fragmentContextID=n?Na(this.treeAdapter.getTagName(n)):s.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new hl(this.document,this.treeAdapter,this)}static parse(t,a){const n=new this(a);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,a){const n={...gs,...a};t??(t=n.treeAdapter.createElement(b.TEMPLATE,C.HTML,[]));const i=n.treeAdapter.createElement("documentmock",C.HTML,[]),r=new this(n,i,t);return r.fragmentContextID===s.TEMPLATE&&r.tmplInsertionModeStack.unshift(E.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,n){var i;if(!this.onParseError)return;const r=(i=t.location)!==null&&i!==void 0?i:Pl,u={code:a,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(u)}onItemPush(t,a,n){var i,r;(r=(i=this.treeAdapter).onItemPush)===null||r===void 0||r.call(i,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var n,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(n=this.treeAdapter).onItemPop)===null||i===void 0||i.call(n,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 n=t===this.document||this.treeAdapter.getNamespaceURI(t)===C.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,C.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=E.TEXT}switchToPlaintextParsing(){this.insertionMode=E.TEXT,this.originalInsertionMode=E.IN_BODY,this.tokenizer.state=be.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)!==C.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=be.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=be.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=be.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=be.PLAINTEXT;break}}}_setDocumentType(t){const a=t.name||"",n=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,n,i),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){const n=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n,t)}}_appendElement(t,a){const n=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,a){const n=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,a){const n=this.treeAdapter.createElement(t,C.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,C.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,n),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(b.HTML,C.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 n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let a,n;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(a,t.chars,n):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(a),r=n?i.lastIndexOf(n):i.length,u=i[r-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:l,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:l,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,a){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(a,n)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){const n=a.location,i=this.treeAdapter.getTagName(t),r=a.type===$.END_TAG&&i===a.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,r)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let a,n;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,n=this.fragmentContextID):{current:a,currentTagId:n}=this.openElements,t.tagID===s.SVG&&this.treeAdapter.getTagName(a)===b.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===C.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&!this._isIntegrationPoint(n,a,C.HTML)}_processToken(t){switch(t.type){case $.CHARACTER:{this.onCharacter(t);break}case $.NULL_CHARACTER:{this.onNullCharacter(t);break}case $.COMMENT:{this.onComment(t);break}case $.DOCTYPE:{this.onDoctype(t);break}case $.START_TAG:{this._processStartTag(t);break}case $.END_TAG:{this.onEndTag(t);break}case $.EOF:{this.onEof(t);break}case $.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,n){const i=this.treeAdapter.getNamespaceURI(a),r=this.treeAdapter.getAttrList(a);return Rl(t,i,r,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(i=>i.type===ve.Marker||this.openElements.contains(i.element)),n=a<0?t-1:a-1;for(let i=n;i>=0;i--){const r=this.activeFormattingElements.entries[i];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=E.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=E.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=E.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=E.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=E.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=E.IN_TABLE;return}case s.BODY:{this.insertionMode=E.IN_BODY;return}case s.FRAMESET:{this.insertionMode=E.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?E.AFTER_HEAD:E.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=E.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=E.IN_HEAD;return}break}}this.insertionMode=E.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){const n=this.openElements.tagIDs[a];if(n===s.TEMPLATE)break;if(n===s.TABLE){this.insertionMode=E.IN_SELECT_IN_TABLE;return}}this.insertionMode=E.IN_SELECT}_isElementCausesFosterParenting(t){return bs.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)===C.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case s.TABLE:{const n=this.treeAdapter.getParentNode(a);return n?{parent:n,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 n=this.treeAdapter.getNamespaceURI(t);return Jc[n].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){dd(this,t);return}switch(this.insertionMode){case E.INITIAL:{Ht(this,t);break}case E.BEFORE_HTML:{Vt(this,t);break}case E.BEFORE_HEAD:{Yt(this,t);break}case E.IN_HEAD:{qt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Wt(this,t);break}case E.AFTER_HEAD:{$t(this,t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:{Ns(this,t);break}case E.TEXT:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ln(this,t);break}case E.IN_TABLE_TEXT:{ys(this,t);break}case E.IN_COLUMN_GROUP:{Oa(this,t);break}case E.AFTER_BODY:{ya(this,t);break}case E.AFTER_AFTER_BODY:{Ra(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ld(this,t);return}switch(this.insertionMode){case E.INITIAL:{Ht(this,t);break}case E.BEFORE_HTML:{Vt(this,t);break}case E.BEFORE_HEAD:{Yt(this,t);break}case E.IN_HEAD:{qt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Wt(this,t);break}case E.AFTER_HEAD:{$t(this,t);break}case E.TEXT:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ln(this,t);break}case E.IN_COLUMN_GROUP:{Oa(this,t);break}case E.AFTER_BODY:{ya(this,t);break}case E.AFTER_AFTER_BODY:{Ra(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){On(this,t);return}switch(this.insertionMode){case E.INITIAL:case E.BEFORE_HTML:case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_TEMPLATE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{On(this,t);break}case E.IN_TABLE_TEXT:{Qt(this,t);break}case E.AFTER_BODY:{Yl(this,t);break}case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{ql(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case E.INITIAL:{Wl(this,t);break}case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:{this._err(t,g.misplacedDoctype);break}case E.IN_TABLE_TEXT:{Qt(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)?hd(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Ht(this,t);break}case E.BEFORE_HTML:{$l(this,t);break}case E.BEFORE_HEAD:{Xl(this,t);break}case E.IN_HEAD:{Le(this,t);break}case E.IN_HEAD_NO_SCRIPT:{zl(this,t);break}case E.AFTER_HEAD:{Zl(this,t);break}case E.IN_BODY:{he(this,t);break}case E.IN_TABLE:{At(this,t);break}case E.IN_TABLE_TEXT:{Qt(this,t);break}case E.IN_CAPTION:{Q0(this,t);break}case E.IN_COLUMN_GROUP:{yn(this,t);break}case E.IN_TABLE_BODY:{Da(this,t);break}case E.IN_ROW:{La(this,t);break}case E.IN_CELL:{K0(this,t);break}case E.IN_SELECT:{Ms(this,t);break}case E.IN_SELECT_IN_TABLE:{J0(this,t);break}case E.IN_TEMPLATE:{td(this,t);break}case E.AFTER_BODY:{nd(this,t);break}case E.IN_FRAMESET:{id(this,t);break}case E.AFTER_FRAMESET:{rd(this,t);break}case E.AFTER_AFTER_BODY:{od(this,t);break}case E.AFTER_AFTER_FRAMESET:{cd(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?fd(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Ht(this,t);break}case E.BEFORE_HTML:{Gl(this,t);break}case E.BEFORE_HEAD:{Ql(this,t);break}case E.IN_HEAD:{jl(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Kl(this,t);break}case E.AFTER_HEAD:{Jl(this,t);break}case E.IN_BODY:{xa(this,t);break}case E.TEXT:{U0(this,t);break}case E.IN_TABLE:{Gt(this,t);break}case E.IN_TABLE_TEXT:{Qt(this,t);break}case E.IN_CAPTION:{j0(this,t);break}case E.IN_COLUMN_GROUP:{z0(this,t);break}case E.IN_TABLE_BODY:{Rn(this,t);break}case E.IN_ROW:{ks(this,t);break}case E.IN_CELL:{Z0(this,t);break}case E.IN_SELECT:{ws(this,t);break}case E.IN_SELECT_IN_TABLE:{ed(this,t);break}case E.IN_TEMPLATE:{ad(this,t);break}case E.AFTER_BODY:{vs(this,t);break}case E.IN_FRAMESET:{sd(this,t);break}case E.AFTER_FRAMESET:{ud(this,t);break}case E.AFTER_AFTER_BODY:{Ra(this,t);break}}}onEof(t){switch(this.insertionMode){case E.INITIAL:{Ht(this,t);break}case E.BEFORE_HTML:{Vt(this,t);break}case E.BEFORE_HEAD:{Yt(this,t);break}case E.IN_HEAD:{qt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Wt(this,t);break}case E.AFTER_HEAD:{$t(this,t);break}case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{Ds(this,t);break}case E.TEXT:{F0(this,t);break}case E.IN_TABLE_TEXT:{Qt(this,t);break}case E.IN_TEMPLATE:{Ps(this,t);break}case E.AFTER_BODY:case E.IN_FRAMESET:case E.AFTER_FRAMESET:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{Dn(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 E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.TEXT:case E.IN_COLUMN_GROUP:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{this._insertCharacters(t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:case E.AFTER_BODY:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{As(this,t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ln(this,t);break}case E.IN_TABLE_TEXT:{Ls(this,t);break}}}};function vl(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):Os(e,t),a}function Bl(e,t){let a=null,n=e.openElements.stackTop;for(;n>=0;n--){const i=e.openElements.items[n];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[n])&&(a=i)}return a||(e.openElements.shortenToLength(n<0?0:n),e.activeFormattingElements.removeEntry(t)),a}function Ul(e,t,a){let n=t,i=e.openElements.getCommonAncestor(t);for(let r=0,u=i;u!==a;r++,u=i){i=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),l=c&&r>=wl;!c||l?(l&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=Fl(e,c),n===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(u,n),n=u)}return n}function Fl(e,t){const a=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function Hl(e,t,a){const n=e.treeAdapter.getTagName(t),i=Na(n);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(a);else{const r=e.treeAdapter.getNamespaceURI(t);i===s.TEMPLATE&&r===C.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function Vl(e,t,a){const n=e.treeAdapter.getNamespaceURI(a.element),{token:i}=a,r=e.treeAdapter.createElement(i.tagName,n,i.attrs);e._adoptNodes(t,r),e.treeAdapter.appendChild(t,r),e.activeFormattingElements.insertElementAfterBookmark(r,i),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,r,i.tagID)}function xn(e,t){for(let a=0;a<Ml;a++){const n=vl(e,t);if(!n)break;const i=Bl(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;const r=Ul(e,i,n.element),u=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(r),u&&Hl(e,u,r),Vl(e,i,n)}}function On(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Yl(e,t){e._appendCommentNode(t,e.openElements.items[0])}function ql(e,t){e._appendCommentNode(t,e.document)}function Dn(e,t){if(e.stopped=!0,t.location){const a=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=a;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(n);if(i&&!i.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const r=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(r);u&&!u.endTag&&e._setEndLocation(r,t)}}}}function Wl(e,t){e._setDocumentType(t);const a=t.forceQuirks?Ne.QUIRKS:_l(t);gl(t)||e._err(t,g.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=E.BEFORE_HTML}function Ht(e,t){e._err(t,g.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ne.QUIRKS),e.insertionMode=E.BEFORE_HTML,e._processToken(t)}function $l(e,t){t.tagID===s.HTML?(e._insertElement(t,C.HTML),e.insertionMode=E.BEFORE_HEAD):Vt(e,t)}function Gl(e,t){const a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&Vt(e,t)}function Vt(e,t){e._insertFakeRootElement(),e.insertionMode=E.BEFORE_HEAD,e._processToken(t)}function Xl(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.HEAD:{e._insertElement(t,C.HTML),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD;break}default:Yt(e,t)}}function Ql(e,t){const a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?Yt(e,t):e._err(t,g.endTagWithoutMatchingOpenElement)}function Yt(e,t){e._insertFakeElement(b.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD,e._processToken(t)}function Le(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,C.HTML),t.ackSelfClosing=!0;break}case s.TITLE:{e._switchToTextParsing(t,be.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,be.RAWTEXT):(e._insertElement(t,C.HTML),e.insertionMode=E.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,be.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,be.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=E.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(E.IN_TEMPLATE);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:qt(e,t)}}function jl(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=E.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{qt(e,t);break}case s.TEMPLATE:{ct(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function ct(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 qt(e,t){e.openElements.pop(),e.insertionMode=E.AFTER_HEAD,e._processToken(t)}function zl(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{Le(e,t);break}case s.NOSCRIPT:{e._err(t,g.nestedNoscriptInHead);break}default:Wt(e,t)}}function Kl(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=E.IN_HEAD;break}case s.BR:{Wt(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function Wt(e,t){const a=t.type===$.EOF?g.openElementsLeftAfterEof:g.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=E.IN_HEAD,e._processToken(t)}function Zl(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BODY:{e._insertElement(t,C.HTML),e.framesetOk=!1,e.insertionMode=E.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,C.HTML),e.insertionMode=E.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),Le(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:$t(e,t)}}function Jl(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{$t(e,t);break}case s.TEMPLATE:{ct(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function $t(e,t){e._insertFakeElement(b.BODY,s.BODY),e.insertionMode=E.IN_BODY,Sa(e,t)}function Sa(e,t){switch(t.type){case $.CHARACTER:{Ns(e,t);break}case $.WHITESPACE_CHARACTER:{As(e,t);break}case $.COMMENT:{On(e,t);break}case $.START_TAG:{he(e,t);break}case $.END_TAG:{xa(e,t);break}case $.EOF:{Ds(e,t);break}}}function As(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ns(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function e0(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function t0(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function a0(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,C.HTML),e.insertionMode=E.IN_FRAMESET)}function n0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,C.HTML)}function i0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),Cn.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,C.HTML)}function s0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,C.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function r0(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,C.HTML),a||(e.formElement=e.openElements.current))}function u0(e,t){e.framesetOk=!1;const a=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const i=e.openElements.tagIDs[n];if(a===s.LI&&i===s.LI||(a===s.DD||a===s.DT)&&(i===s.DD||i===s.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==s.ADDRESS&&i!==s.DIV&&i!==s.P&&e._isSpecialElement(e.openElements.items[n],i))break}e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,C.HTML)}function o0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,C.HTML),e.tokenizer.state=be.PLAINTEXT}function c0(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.framesetOk=!1}function l0(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(b.A);a&&(xn(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function d0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function h0(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(xn(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,C.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function f0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function m0(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ne.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,C.HTML),e.framesetOk=!1,e.insertionMode=E.IN_TABLE}function Cs(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,C.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Is(e){const t=as(e,ot.TYPE);return t!=null&&t.toLowerCase()===kl}function E0(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,C.HTML),Is(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function p0(e,t){e._appendElement(t,C.HTML),t.ackSelfClosing=!0}function T0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,C.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function b0(e,t){t.tagName=b.IMG,t.tagID=s.IMG,Cs(e,t)}function g0(e,t){e._insertElement(t,C.HTML),e.skipNextNewLine=!0,e.tokenizer.state=be.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=E.TEXT}function _0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function A0(e,t){e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function Ss(e,t){e._switchToTextParsing(t,be.RAWTEXT)}function N0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===E.IN_TABLE||e.insertionMode===E.IN_CAPTION||e.insertionMode===E.IN_TABLE_BODY||e.insertionMode===E.IN_ROW||e.insertionMode===E.IN_CELL?E.IN_SELECT_IN_TABLE:E.IN_SELECT}function C0(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML)}function I0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,C.HTML)}function S0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,C.HTML)}function x0(e,t){e._reconstructActiveFormattingElements(),ps(t),Sn(t),t.selfClosing?e._appendElement(t,C.MATHML):e._insertElement(t,C.MATHML),t.ackSelfClosing=!0}function O0(e,t){e._reconstructActiveFormattingElements(),Ts(t),Sn(t),t.selfClosing?e._appendElement(t,C.SVG):e._insertElement(t,C.SVG),t.ackSelfClosing=!0}function xs(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,C.HTML)}function he(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:{d0(e,t);break}case s.A:{l0(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{i0(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:{n0(e,t);break}case s.LI:case s.DD:case s.DT:{u0(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{Cs(e,t);break}case s.HR:{T0(e,t);break}case s.RB:case s.RTC:{I0(e,t);break}case s.RT:case s.RP:{S0(e,t);break}case s.PRE:case s.LISTING:{s0(e,t);break}case s.XMP:{_0(e,t);break}case s.SVG:{O0(e,t);break}case s.HTML:{e0(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:{Le(e,t);break}case s.BODY:{t0(e,t);break}case s.FORM:{r0(e,t);break}case s.NOBR:{h0(e,t);break}case s.MATH:{x0(e,t);break}case s.TABLE:{m0(e,t);break}case s.INPUT:{E0(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{p0(e,t);break}case s.IMAGE:{b0(e,t);break}case s.BUTTON:{c0(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{f0(e,t);break}case s.IFRAME:{A0(e,t);break}case s.SELECT:{N0(e,t);break}case s.OPTION:case s.OPTGROUP:{C0(e,t);break}case s.NOEMBED:case s.NOFRAMES:{Ss(e,t);break}case s.FRAMESET:{a0(e,t);break}case s.TEXTAREA:{g0(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?Ss(e,t):xs(e,t);break}case s.PLAINTEXT:{o0(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:xs(e,t)}}function D0(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=E.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=E.AFTER_BODY,vs(e,t))}function y0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function R0(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 k0(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(b.P,s.P),e._closePElement()}function M0(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function w0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function P0(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function v0(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(b.BR,s.BR),e.openElements.pop(),e.framesetOk=!1}function Os(e,t){const a=t.tagName,n=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const r=e.openElements.items[i],u=e.openElements.tagIDs[i];if(n===u&&(n!==s.UNKNOWN||e.treeAdapter.getTagName(r)===a)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(r,u))break}}function xa(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:{xn(e,t);break}case s.P:{k0(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:{y0(e,t);break}case s.LI:{M0(e);break}case s.DD:case s.DT:{w0(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{P0(e);break}case s.BR:{B0(e);break}case s.BODY:{D0(e,t);break}case s.HTML:{L0(e,t);break}case s.FORM:{R0(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{v0(e,t);break}case s.TEMPLATE:{ct(e,t);break}default:Os(e,t)}}function Ds(e,t){e.tmplInsertionModeStack.length>0?Ps(e,t):Dn(e,t)}function U0(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 F0(e,t){e._err(t,g.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ln(e,t){if(bs.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=E.IN_TABLE_TEXT,t.type){case $.CHARACTER:{ys(e,t);break}case $.WHITESPACE_CHARACTER:{Ls(e,t);break}}else Xt(e,t)}function H0(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,C.HTML),e.insertionMode=E.IN_CAPTION}function V0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,C.HTML),e.insertionMode=E.IN_COLUMN_GROUP}function Y0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.COLGROUP,s.COLGROUP),e.insertionMode=E.IN_COLUMN_GROUP,yn(e,t)}function q0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,C.HTML),e.insertionMode=E.IN_TABLE_BODY}function W0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.TBODY,s.TBODY),e.insertionMode=E.IN_TABLE_BODY,Da(e,t)}function $0(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function G0(e,t){Is(t)?e._appendElement(t,C.HTML):Xt(e,t),t.ackSelfClosing=!0}function X0(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,C.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function At(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{W0(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{Le(e,t);break}case s.COL:{Y0(e,t);break}case s.FORM:{X0(e,t);break}case s.TABLE:{$0(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{q0(e,t);break}case s.INPUT:{G0(e,t);break}case s.CAPTION:{H0(e,t);break}case s.COLGROUP:{V0(e,t);break}default:Xt(e,t)}}function Gt(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{ct(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:Xt(e,t)}}function Xt(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Sa(e,t),e.fosterParentingEnabled=a}function Ls(e,t){e.pendingCharacterTokens.push(t)}function ys(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Qt(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)Xt(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Rs=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function Q0(e,t){const a=t.tagID;Rs.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,At(e,t)):he(e,t)}function j0(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=E.IN_TABLE,a===s.TABLE&&Gt(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:xa(e,t)}}function yn(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.COL:{e._appendElement(t,C.HTML),t.ackSelfClosing=!0;break}case s.TEMPLATE:{Le(e,t);break}default:Oa(e,t)}}function z0(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case s.TEMPLATE:{ct(e,t);break}case s.COL:break;default:Oa(e,t)}}function Oa(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE,e._processToken(t))}function Da(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,C.HTML),e.insertionMode=E.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(b.TR,s.TR),e.insertionMode=E.IN_ROW,La(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=E.IN_TABLE,At(e,t));break}default:At(e,t)}}function Rn(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=E.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,Gt(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:Gt(e,t)}}function La(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,C.HTML),e.insertionMode=E.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=E.IN_TABLE_BODY,Da(e,t));break}default:At(e,t)}}function ks(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,Rn(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=E.IN_TABLE_BODY,Rn(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:Gt(e,t)}}function K0(e,t){const a=t.tagID;Rs.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),La(e,t)):he(e,t)}function Z0(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=E.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),ks(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:xa(e,t)}}function Ms(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,C.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,C.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,C.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:{Le(e,t);break}}}function ws(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:{ct(e,t);break}}}function J0(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 ed(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)):ws(e,t)}function td(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:{Le(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=E.IN_TABLE,e.insertionMode=E.IN_TABLE,At(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=E.IN_COLUMN_GROUP,e.insertionMode=E.IN_COLUMN_GROUP,yn(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=E.IN_TABLE_BODY,e.insertionMode=E.IN_TABLE_BODY,Da(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=E.IN_ROW,e.insertionMode=E.IN_ROW,La(e,t);break}default:e.tmplInsertionModeStack[0]=E.IN_BODY,e.insertionMode=E.IN_BODY,he(e,t)}}function ad(e,t){t.tagID===s.TEMPLATE&&ct(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)):Dn(e,t)}function nd(e,t){t.tagID===s.HTML?he(e,t):ya(e,t)}function vs(e,t){var a;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=E.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===s.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(n))===null||a===void 0)&&a.endTag)&&e._setEndLocation(n,t)}}else ya(e,t)}function ya(e,t){e.insertionMode=E.IN_BODY,Sa(e,t)}function id(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.FRAMESET:{e._insertElement(t,C.HTML);break}case s.FRAME:{e._appendElement(t,C.HTML),t.ackSelfClosing=!0;break}case s.NOFRAMES:{Le(e,t);break}}}function sd(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=E.AFTER_FRAMESET))}function rd(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.NOFRAMES:{Le(e,t);break}}}function ud(e,t){t.tagID===s.HTML&&(e.insertionMode=E.AFTER_AFTER_FRAMESET)}function od(e,t){t.tagID===s.HTML?he(e,t):Ra(e,t)}function Ra(e,t){e.insertionMode=E.IN_BODY,Sa(e,t)}function cd(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.NOFRAMES:{Le(e,t);break}}}function ld(e,t){t.chars=K,e._insertCharacters(t)}function dd(e,t){e._insertCharacters(t),e.framesetOk=!1}function Bs(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==C.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function hd(e,t){if(Ol(t))Bs(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(a);n===C.MATHML?ps(t):n===C.SVG&&(Dl(t),Ts(t)),Sn(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function fd(e,t){if(t.tagID===s.P||t.tagID===s.BR){Bs(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){const n=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(n)===C.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(n);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(a);break}}}const md=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 Ed(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===C.HTML&&md.has(t.treeAdapter.getTagName(e))}const pd={treeAdapter:We,scriptingEnabled:!0};function Td(e,t){const a={...pd,...t};return Us(e,a)}function bd(e,t){let a="";const n=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===b.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===C.HTML?t.treeAdapter.getTemplateContent(e):e,i=t.treeAdapter.getChildNodes(n);if(i)for(const r of i)a+=Us(r,t);return a}function Us(e,t){return t.treeAdapter.isElementNode(e)?gd(e,t):t.treeAdapter.isTextNode(e)?Ad(e,t):t.treeAdapter.isCommentNode(e)?Nd(e,t):t.treeAdapter.isDocumentTypeNode(e)?Cd(e,t):""}function gd(e,t){const a=t.treeAdapter.getTagName(e);return`<${a}${_d(e,t)}>${Ed(e,t)?"":`${bd(e,t)}</${a}>`}`}function _d(e,{treeAdapter:t}){let a="";for(const n of t.getAttrList(e)){if(a+=" ",n.namespace)switch(n.namespace){case C.XML:{a+=`xml:${n.name}`;break}case C.XMLNS:{n.name!=="xmlns"&&(a+="xmlns:"),a+=n.name;break}case C.XLINK:{a+=`xlink:${n.name}`;break}default:a+=`${n.prefix}:${n.name}`}else a+=n.name;a+=`="${si(n.value)}"`}return a}function Ad(e,t){const{treeAdapter:a}=t,n=a.getTextNodeContent(e),i=a.getParentNode(e),r=i&&a.isElementNode(i)&&a.getTagName(i);return r&&a.getNamespaceURI(i)===C.HTML&&tl(r,t.scriptingEnabled)?n:ri(n)}function Nd(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function Cd(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function Id(e,t){return _s.parse(e,t)}function Sd(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);const n=_s.getFragmentParser(e,a);return n.tokenizer.write(t,!0),n.getFragment()}function Fs(e){const t=e.includes('"')?"'":'"';return t+e+t}function xd(e,t,a){let n="!DOCTYPE ";return e&&(n+=e),t?n+=` PUBLIC ${Fs(t)}`:a&&(n+=" SYSTEM"),a&&(n+=` ${Fs(a)}`),n}const Je={isCommentNode:sa,isElementNode:P,isTextNode:Pe,createDocument(){const e=new nt([]);return e["x-mode"]=Ne.NO_QUIRKS,e},createDocumentFragment(){return new nt([])},createElement(e,t,a){const n=Object.create(null),i=Object.create(null),r=Object.create(null);for(let c=0;c<a.length;c++){const l=a[c].name;n[l]=a[c].value,i[l]=a[c].namespace,r[l]=a[c].prefix}const u=new qa(e,n,[]);return u.namespace=t,u["x-attribsNamespace"]=i,u["x-attribsPrefix"]=r,u},createCommentNode(e){return new Ha(e)},createTextNode(e){return new Lt(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 n=e.children.indexOf(a),{prev:i}=a;i&&(i.next=t,t.prev=i),a.prev=t,t.next=a,e.children.splice(n,0,t),t.parent=e},setTemplateContent(e,t){Je.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,a,n){const i=xd(t,a,n);let r=e.children.find(u=>Wa(u)&&u.name==="!doctype");r?r.data=i??null:(r=new Va("!doctype",i),Je.appendChild(e,r)),r["x-name"]=t,r["x-publicId"]=a,r["x-systemId"]=n},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:n}=e;e.prev=null,e.next=null,a&&(a.next=n),n&&(n.prev=a),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const a=e.children[e.children.length-1];a&&Pe(a)?a.data+=t:Je.appendChild(e,Je.createTextNode(t))},insertTextBefore(e,t,a){const n=e.children[e.children.indexOf(a)-1];n&&Pe(n)?n.data+=t:Je.insertBefore(e,Je.createTextNode(t),a)},adoptAttributes(e,t){for(let a=0;a<t.length;a++){const n=t[a].name;e.attribs[n]===void 0&&(e.attribs[n]=t[a].value,e["x-attribsNamespace"][n]=t[a].namespace,e["x-attribsPrefix"][n]=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 Wa(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,n){var i;return(i=t.treeAdapter)!==null&&i!==void 0||(t.treeAdapter=Je),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),a?Id(e,t):Sd(n,e,t)}const Dd={treeAdapter:Je};function Ld(e){const t="length"in e?e:[e];for(let n=0;n<t.length;n+=1){const i=t[n];Qe(i)&&Array.prototype.splice.call(t,n,1,...i.children)}let a="";for(let n=0;n<t.length;n+=1){const i=t[n];a+=Td(i,Dd)}return a}var k;(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"})(k||(k={}));var S;(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"})(S||(S={}));function $e(e){return e===k.Space||e===k.NewLine||e===k.Tab||e===k.FormFeed||e===k.CarriageReturn}function ka(e){return e===k.Slash||e===k.Gt||$e(e)}function yd(e){return e>=k.LowerA&&e<=k.LowerZ||e>=k.UpperA&&e<=k.UpperZ}var Be;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Be||(Be={}));const le={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 Rd{constructor({xmlMode:t=!1,decodeEntities:a=!0},n){this.cbs=n,this.state=S.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=S.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 za(t?ei:Ga,(i,r)=>this.emitCodePoint(i,r))}reset(){this.state=S.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=S.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===k.Lt||!this.decodeEntities&&this.fastForwardTo(k.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=S.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===k.Amp&&this.startEntity()}stateSpecialStartSequence(t){const a=this.sequenceIndex===this.currentSequence.length;if(!(a?ka(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!a){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=S.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===k.Gt||$e(t)){const a=this.index-this.currentSequence.length;if(this.sectionStart<a){const n=this.index;this.index=a,this.cbs.ontext(this.sectionStart,a),this.index=n}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===le.TitleEnd?this.decodeEntities&&t===k.Amp&&this.startEntity():this.fastForwardTo(k.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===k.Lt)}stateCDATASequence(t){t===le.Cdata[this.sequenceIndex]?++this.sequenceIndex===le.Cdata.length&&(this.state=S.InCommentLike,this.currentSequence=le.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=S.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===le.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=S.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?!ka(t):yd(t)}startSpecial(t,a){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=a,this.state=S.SpecialStartSequence}stateBeforeTagName(t){if(t===k.ExclamationMark)this.state=S.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===k.Questionmark)this.state=S.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const a=t|32;this.sectionStart=this.index,this.xmlMode?this.state=S.InTagName:a===le.ScriptEnd[2]?this.state=S.BeforeSpecialS:a===le.TitleEnd[2]?this.state=S.BeforeSpecialT:this.state=S.InTagName}else t===k.Slash?this.state=S.BeforeClosingTagName:(this.state=S.Text,this.stateText(t))}stateInTagName(t){ka(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=S.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){$e(t)||(t===k.Gt?this.state=S.Text:(this.state=this.isTagStartChar(t)?S.InClosingTagName:S.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===k.Gt||$e(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=S.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===k.Gt||this.fastForwardTo(k.Gt))&&(this.state=S.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===k.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=S.InSpecialTag,this.sequenceIndex=0):this.state=S.Text,this.sectionStart=this.index+1):t===k.Slash?this.state=S.InSelfClosingTag:$e(t)||(this.state=S.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===k.Gt?(this.cbs.onselfclosingtag(this.index),this.state=S.Text,this.sectionStart=this.index+1,this.isSpecial=!1):$e(t)||(this.state=S.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===k.Eq||ka(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=S.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===k.Eq?this.state=S.BeforeAttributeValue:t===k.Slash||t===k.Gt?(this.cbs.onattribend(Be.NoValue,this.sectionStart),this.sectionStart=-1,this.state=S.BeforeAttributeName,this.stateBeforeAttributeName(t)):$e(t)||(this.cbs.onattribend(Be.NoValue,this.sectionStart),this.state=S.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===k.DoubleQuote?(this.state=S.InAttributeValueDq,this.sectionStart=this.index+1):t===k.SingleQuote?(this.state=S.InAttributeValueSq,this.sectionStart=this.index+1):$e(t)||(this.sectionStart=this.index,this.state=S.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===k.DoubleQuote?Be.Double:Be.Single,this.index+1),this.state=S.BeforeAttributeName):this.decodeEntities&&t===k.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,k.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,k.SingleQuote)}stateInAttributeValueNoQuotes(t){$e(t)||t===k.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Be.Unquoted,this.index),this.state=S.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===k.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===k.OpeningSquareBracket?(this.state=S.CDATASequence,this.sequenceIndex=0):this.state=t===k.Dash?S.BeforeComment:S.InDeclaration}stateInDeclaration(t){(t===k.Gt||this.fastForwardTo(k.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=S.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===k.Gt||this.fastForwardTo(k.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=S.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===k.Dash?(this.state=S.InCommentLike,this.currentSequence=le.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=S.InDeclaration}stateInSpecialComment(t){(t===k.Gt||this.fastForwardTo(k.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=S.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const a=t|32;a===le.ScriptEnd[3]?this.startSpecial(le.ScriptEnd,4):a===le.StyleEnd[3]?this.startSpecial(le.StyleEnd,4):(this.state=S.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const a=t|32;a===le.TitleEnd[3]?this.startSpecial(le.TitleEnd,4):a===le.TextareaEnd[3]?this.startSpecial(le.TextareaEnd,4):(this.state=S.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=S.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?xe.Strict:this.baseState===S.Text||this.baseState===S.InSpecialTag?xe.Legacy:xe.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===S.Text||this.state===S.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===S.InAttributeValueDq||this.state===S.InAttributeValueSq||this.state===S.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 S.Text:{this.stateText(t);break}case S.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case S.InSpecialTag:{this.stateInSpecialTag(t);break}case S.CDATASequence:{this.stateCDATASequence(t);break}case S.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case S.InAttributeName:{this.stateInAttributeName(t);break}case S.InCommentLike:{this.stateInCommentLike(t);break}case S.InSpecialComment:{this.stateInSpecialComment(t);break}case S.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case S.InTagName:{this.stateInTagName(t);break}case S.InClosingTagName:{this.stateInClosingTagName(t);break}case S.BeforeTagName:{this.stateBeforeTagName(t);break}case S.AfterAttributeName:{this.stateAfterAttributeName(t);break}case S.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case S.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case S.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case S.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case S.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case S.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case S.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case S.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case S.InDeclaration:{this.stateInDeclaration(t);break}case S.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case S.BeforeComment:{this.stateBeforeComment(t);break}case S.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case S.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===S.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===S.InCommentLike?this.currentSequence===le.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===S.InTagName||this.state===S.BeforeAttributeName||this.state===S.BeforeAttributeValue||this.state===S.AfterAttributeName||this.state===S.InAttributeName||this.state===S.InAttributeValueSq||this.state===S.InAttributeValueDq||this.state===S.InAttributeValueNq||this.state===S.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,a){this.baseState!==S.Text&&this.baseState!==S.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 Nt=new Set(["input","option","optgroup","select","button","datalist","textarea"]),j=new Set(["p"]),Hs=new Set(["thead","tbody"]),Vs=new Set(["dd","dt"]),Ys=new Set(["rt","rp"]),kd=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",j],["h1",j],["h2",j],["h3",j],["h4",j],["h5",j],["h6",j],["select",Nt],["input",Nt],["output",Nt],["button",Nt],["datalist",Nt],["textarea",Nt],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",Vs],["dt",Vs],["address",j],["article",j],["aside",j],["blockquote",j],["details",j],["div",j],["dl",j],["fieldset",j],["figcaption",j],["figure",j],["footer",j],["form",j],["header",j],["hr",j],["main",j],["nav",j],["ol",j],["pre",j],["section",j],["table",j],["ul",j],["rt",Ys],["rp",Ys],["tbody",Hs],["tfoot",Hs]]),Md=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),qs=new Set(["math","svg"]),Ws=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),wd=/\s|\//;class Pd{constructor(t,a={}){var n,i,r,u,c,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=(n=a.lowerCaseTags)!==null&&n!==void 0?n:this.htmlMode,this.lowerCaseAttributeNames=(i=a.lowerCaseAttributeNames)!==null&&i!==void 0?i: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:Rd)(this.options,this),this.foreignContext=[!this.htmlMode],(l=(c=this.cbs).onparserinit)===null||l===void 0||l.call(c,this)}ontext(t,a){var n,i;const r=this.getSlice(t,a);this.endIndex=a-1,(i=(n=this.cbs).ontext)===null||i===void 0||i.call(n,r),this.startIndex=a}ontextentity(t,a){var n,i;this.endIndex=a-1,(i=(n=this.cbs).ontext)===null||i===void 0||i.call(n,Qa(t)),this.startIndex=a}isVoidElement(t){return this.htmlMode&&Md.has(t)}onopentagname(t,a){this.endIndex=a;let n=this.getSlice(t,a);this.lowerCaseTagNames&&(n=n.toLowerCase()),this.emitOpenTag(n)}emitOpenTag(t){var a,n,i,r;this.openTagStart=this.startIndex,this.tagname=t;const u=this.htmlMode&&kd.get(t);if(u)for(;this.stack.length>0&&u.has(this.stack[0]);){const c=this.stack.shift();(n=(a=this.cbs).onclosetag)===null||n===void 0||n.call(a,c,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(qs.has(t)?this.foreignContext.unshift(!0):Ws.has(t)&&this.foreignContext.unshift(!1))),(r=(i=this.cbs).onopentagname)===null||r===void 0||r.call(i,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var a,n;this.startIndex=this.openTagStart,this.attribs&&((n=(a=this.cbs).onopentag)===null||n===void 0||n.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 n,i,r,u,c,l,h,m;this.endIndex=a;let p=this.getSlice(t,a);if(this.lowerCaseTagNames&&(p=p.toLowerCase()),this.htmlMode&&(qs.has(p)||Ws.has(p))&&this.foreignContext.shift(),this.isVoidElement(p))this.htmlMode&&p==="br"&&((u=(r=this.cbs).onopentagname)===null||u===void 0||u.call(r,"br"),(l=(c=this.cbs).onopentag)===null||l===void 0||l.call(c,"br",{},!0),(m=(h=this.cbs).onclosetag)===null||m===void 0||m.call(h,"br",!1));else{const T=this.stack.indexOf(p);if(T!==-1)for(let _=0;_<=T;_++){const I=this.stack.shift();(i=(n=this.cbs).onclosetag)===null||i===void 0||i.call(n,I,_!==T)}else this.htmlMode&&p==="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,n;const i=this.tagname;this.endOpenTag(t),this.stack[0]===i&&((n=(a=this.cbs).onclosetag)===null||n===void 0||n.call(a,i,!t),this.stack.shift())}onattribname(t,a){this.startIndex=t;const n=this.getSlice(t,a);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(t,a){this.attribvalue+=this.getSlice(t,a)}onattribentity(t){this.attribvalue+=Qa(t)}onattribend(t,a){var n,i;this.endIndex=a,(i=(n=this.cbs).onattribute)===null||i===void 0||i.call(n,this.attribname,this.attribvalue,t===Be.Double?'"':t===Be.Single?"'":t===Be.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(wd);let n=a<0?t:t.substr(0,a);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(t,a){this.endIndex=a;const n=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const i=this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${i}`,`!${n}`)}this.startIndex=a+1}onprocessinginstruction(t,a){this.endIndex=a;const n=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const i=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${i}`,`?${n}`)}this.startIndex=a+1}oncomment(t,a,n){var i,r,u,c;this.endIndex=a,(r=(i=this.cbs).oncomment)===null||r===void 0||r.call(i,this.getSlice(t,a-n)),(c=(u=this.cbs).oncommentend)===null||c===void 0||c.call(u),this.startIndex=a+1}oncdata(t,a,n){var i,r,u,c,l,h,m,p,T,_;this.endIndex=a;const I=this.getSlice(t,a-n);!this.htmlMode||this.options.recognizeCDATA?((r=(i=this.cbs).oncdatastart)===null||r===void 0||r.call(i),(c=(u=this.cbs).ontext)===null||c===void 0||c.call(u,I),(h=(l=this.cbs).oncdataend)===null||h===void 0||h.call(l)):((p=(m=this.cbs).oncomment)===null||p===void 0||p.call(m,`[CDATA[${I}]]`),(_=(T=this.cbs).oncommentend)===null||_===void 0||_.call(T)),this.startIndex=a+1}onend(){var t,a;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let n=0;n<this.stack.length;n++)this.cbs.onclosetag(this.stack[n],!0)}(a=(t=this.cbs).onend)===null||a===void 0||a.call(t)}reset(){var t,a,n,i;(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,(i=(n=this.cbs).onparserinit)===null||i===void 0||i.call(n,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 n=this.buffers[0].slice(t-this.bufferOffset,a-this.bufferOffset);for(;a-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,a-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var a,n;if(this.ended){(n=(a=this.cbs).onerror)===null||n===void 0||n.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,n;if(this.ended){(n=(a=this.cbs).onerror)===null||n===void 0||n.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 vd(e,t){const a=new Br(void 0,t);return new Pd(a,t).end(e),a.root}const Bd=hc((e,t,a,n)=>t._useHtmlParser2?vd(e,t):Od(e,t,a,n)),$s=$c(Bd,(e,t)=>t._useHtmlParser2?ra(e,t):Ld(e));var X=(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.Button=6]="Button",e[e.Block=10]="Block",e))(X||{});const Ud={key:0,"date-action":"1",contenteditable:"false",class:"text-red-500 text-xs mt-1"},Fd=o.defineComponent({__name:"ElementRenderer",props:{element:{type:Object,required:!0},selectedElement:Object,hoveredElement:Object,uploadByFile:{type:Function,required:!1},icons:{type:Array,default:()=>[]},mode:{type:String,default:"edit"},cropper:{type:Object,required:!1},icon:{type:Object,required:!1},upload:{type:Object,required:!1},r:{type:String,required:!1}},emits:["selectElement","hoverElement","updateText","contentUpdated","blockAction","addIcon"],setup(e,{emit:t}){const a=e,n=t,i=o.computed(()=>a.selectedElement===a.element),r=o.computed(()=>a.hoveredElement===a.element),u=o.ref(!1),c=o.ref(!1),l=o.ref(""),h=o.computed(()=>a.element.rule.minText||0),m=o.computed(()=>a.element.rule.maxText||1/0);o.watch(()=>a.r,()=>{n("contentUpdated",V())},{immediate:!0});function p(D){D.xpath!="/div[1]"&&a.mode!=="preview"&&(a.mode==="edit"?D.type===X.Text&&n("selectElement",D):n("selectElement",D),!D.rule.isReadOnly&&D.type===X.Text&&(u.value=!0))}function T(D){n("selectElement",D)}function _(D,M){n("hoverElement",D,M)}function I(D){n("hoverElement",D)}function L(D){D.currentTarget.contains(D.relatedTarget)?n("hoverElement",null):a.hoveredElement?n("hoverElement",null,a.hoveredElement.parentxpath):n("hoverElement",null)}function y(){u.value=!1,n("contentUpdated",V())}function V(){function D(ae){const Ee=Object.entries(ae.attrs||{}).map(([Me,Et])=>`${Me}="${Et}"`).join(" "),Ae=`<${ae.tag}${Ee?" "+Ee:""}>`,Ge=`</${ae.tag}>`,mt=(ae.children||[]).map(Me=>D(Me)).join("");return`${Ae}${ae.editText||ae.text||""}${mt}${Ge}`}return D(a.element)}function v(D){var Ae;D.stopPropagation();const M=D.target,ae=((Ae=M.firstChild)==null?void 0:Ae.nodeType)===Node.TEXT_NODE&&M.firstChild.nodeValue||"";if(ae.length<h.value){c.value=!0,l.value=`最少输入 ${h.value} 个字符`;return}else if(ae.length>m.value){c.value=!0,l.value=`最多输入 ${m.value} 个字符`;return}else c.value=!1,l.value="";n("updateText",{element:a.element,newText:ae}),n("contentUpdated",V());const Ee=o.toRaw(a.element);Ee.editText=ae}function U(D){n("updateText",D),n("contentUpdated",V())}function z(){const D={...a.element};n("blockAction",{action:"add",element:a.element,newBlock:D})}function F(){A(a.element),n("blockAction",{action:"moveUp",element:a.element})}function A(D){D.children&&D.children.length>0&&D.children.forEach(M=>{M.type==X.Text&&(M.text!==M.editText&&(M.text=M.editText),A(M))})}function B(){A(a.element),n("blockAction",{action:"moveDown",element:a.element})}function Q(){n("blockAction",{action:"delete",element:a.element})}function te(D){n("blockAction",D),n("contentUpdated",V())}function Ce(D){Ie.value.openModal(D)}function Re(D){me.value.openModal(D)}function ke(D,M){n("addIcon",D,M),n("contentUpdated",V())}const Ie=o.ref(a.icon);o.watch(()=>a.icon,D=>{Ie.value=D},{immediate:!0});const me=o.ref(a.upload);return o.watch(()=>a.upload,D=>{me.value=D},{immediate:!0}),(D,M)=>{const ae=o.resolveComponent("ElementRenderer",!0);return o.openBlock(),o.createElementBlock(o.Fragment,null,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a.element.tag),o.mergeProps({class:["relative",e.mode==="design"?"m-2 p-1 border-dashed border-2":"",r.value?"border-dashed border-blue-500":"",i.value?"border-dashed border-green-500 z-10 border-2":"",c.value?"border-dashed border-red-500":"",(!r.value&&!i.value&&!c.value,""),a.element.rule&&a.element.rule.isReadOnly?"cursor-not-allowed":""]},a.element.attrs,{contenteditable:u.value,onClick:M[2]||(M[2]=o.withModifiers(()=>p(a.element),["stop"])),onMouseenter:M[3]||(M[3]=()=>I(a.element)),onMouseleave:L,onBlur:y,onInput:v}),{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.element.text),1),a.element.children&&a.element.children.length?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.element.children,(Ee,Ae)=>(o.openBlock(),o.createBlock(ae,{key:Ae,r:e.r,mode:e.mode,icons:e.icons,element:Ee,selectedElement:a.selectedElement,hoveredElement:a.hoveredElement,cropper:e.cropper,icon:e.icon,upload:e.upload,"upload-by-file":e.uploadByFile,onSelectElement:T,onHoverElement:_,onUpdateText:U,onBlockAction:te,onAddIcon:ke},null,8,["r","mode","icons","element","selectedElement","hoveredElement","cropper","icon","upload","upload-by-file"]))),128)),a.element.type===o.unref(X).Block?(o.openBlock(),o.createElementBlock("div",{key:0,"date-action":"1",contenteditable:"false",onClick:M[0]||(M[0]=o.withModifiers(()=>{},["stop"])),class:"z-10 flex space-x-1 flex-none flex-nowrap overflow-visible absolute left-2 top-2 text-sm"},[o.createElementVNode("button",{class:"flex-none content-center items-center p-1 bg-green-500/80 text-white rounded",onClick:o.withModifiers(z,["stop"])},M[6]||(M[6]=[o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512"},[o.createElementVNode("rect",{width:"336",height:"336",x:"128",y:"128",fill:"none",stroke:"white","stroke-linejoin":"round","stroke-width":"32",rx:"57",ry:"57"}),o.createElementVNode("path",{fill:"none",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"m383.5 128l.5-24a56.16 56.16 0 0 0-56-56H112a64.19 64.19 0 0 0-64 64v216a56.16 56.16 0 0 0 56 56h24"})],-1)])),o.createElementVNode("button",{class:"flex-none content-center items-center p-1 bg-blue-500/80 text-white rounded",onClick:o.withModifiers(F,["stop"])},M[7]||(M[7]=[o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512"},[o.createElementVNode("path",{fill:"none",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"m112 244l144-144l144 144M256 120v292"})],-1)])),o.createElementVNode("button",{class:"flex-none content-center items-center p-1 bg-blue-500/80 text-white rounded",onClick:o.withModifiers(B,["stop"])},M[8]||(M[8]=[o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512"},[o.createElementVNode("path",{fill:"none",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"m112 268l144 144l144-144M256 392V100"})],-1)])),o.createElementVNode("button",{class:"flex-none content-center items-center p-1 bg-red-500/80 text-white rounded",onClick:o.withModifiers(Q,["stop"])},M[9]||(M[9]=[o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512"},[o.createElementVNode("path",{fill:"none",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 256H112"})],-1)]))])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),a.element.type===o.unref(X).Icon?(o.openBlock(),o.createElementBlock("div",{key:1,class:"cursor-pointer rounded-sm w-5 h-5 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-sm text-gray-50 z-10 bg-black/80",contenteditable:"false",onClick:M[1]||(M[1]=o.withModifiers(()=>Ce(a.element),["stop"]))},M[10]||(M[10]=[o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512"},[o.createElementVNode("path",{fill:"none",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M320 367.79h76c55 0 100-29.21 100-83.6s-53-81.47-96-83.6c-8.89-85.06-71-136.8-144-136.8c-69 0-113.44 45.79-128 91.2c-60 5.7-112 43.88-112 106.4s54 106.4 120 106.4h56"}),o.createElementVNode("path",{fill:"none",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"m320 255.79l-64-64l-64 64m64 192.42V207.79"})],-1)]))):o.createCommentVNode("",!0)]),_:1},16,["class","contenteditable"])),a.element.type==o.unref(X).Text&&c.value?(o.openBlock(),o.createElementBlock("div",Ud,o.toDisplayString(l.value),1)):o.createCommentVNode("",!0),a.element.type===o.unref(X).Image?(o.openBlock(),o.createElementBlock("div",{key:1,class:"cursor-pointer rounded-sm flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-sm text-gray-50 z-10 bg-black/80",onClick:M[5]||(M[5]=o.withModifiers(()=>{},["stop"])),contenteditable:"false"},[o.createElementVNode("div",{class:"p-1",onClick:M[4]||(M[4]=o.withModifiers(()=>Re(a.element),["stop"]))},M[11]||(M[11]=[o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512"},[o.createElementVNode("path",{fill:"none",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M320 367.79h76c55 0 100-29.21 100-83.6s-53-81.47-96-83.6c-8.89-85.06-71-136.8-144-136.8c-69 0-113.44 45.79-128 91.2c-60 5.7-112 43.88-112 106.4s54 106.4 120 106.4h56"}),o.createElementVNode("path",{fill:"none",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"m320 255.79l-64-64l-64 64m64 192.42V207.79"})],-1)]))])):o.createCommentVNode("",!0)],64)}}}),lt=(e,t)=>{const a=e.__vccOpts||e;for(const[n,i]of t)a[n]=i;return a},Hd=lt(Fd,[["__scopeId","data-v-3325ae15"]]),Vd=o.defineComponent({name:"GpCheckbox",props:{modelValue:{type:Boolean,required:!0},label:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:t}){return{updateValue:n=>{t("update:modelValue",n.target.checked)}}}}),Yd={class:"form-group"},qd={class:"flex items-center space-x-2 cursor-pointer"},Wd=["checked","aria-checked"],$d={class:"checkbox-label text-sm text-gray-700"};function Gd(e,t,a,n,i,r){return o.openBlock(),o.createElementBlock("div",Yd,[o.createElementVNode("label",qd,[o.createElementVNode("input",{type:"checkbox",checked:e.modelValue,onChange:t[0]||(t[0]=(...u)=>e.updateValue&&e.updateValue(...u)),class:"custom-checkbox","aria-checked":e.modelValue},null,40,Wd),o.createElementVNode("span",$d,o.toDisplayString(e.label),1)])])}const jt=lt(Vd,[["render",Gd],["__scopeId","data-v-68b8f276"]]),Xd=o.defineComponent({name:"GpMessage",props:{message:{type:String,required:!0},type:{type:String,default:"info"},position:{type:String,default:"top-right"},duration:{type:Number,default:3e3},onClose:{type:Function,required:!0},icon:{type:Boolean,default:!0}},setup(e){const t=o.ref(!1),a=o.computed(()=>({success:"bg-green-100 text-green-800",error:"bg-red-100 text-red-800",info:"bg-blue-100 text-blue-800",warning:"bg-yellow-100 text-yellow-800"})[e.type]),n=()=>{t.value=!1,e.onClose()};return setTimeout(()=>{n()},e.duration),t.value=!0,{visible:t,typeClass:a,closeMessage:n}}}),Qd={key:0,class:"gp-message"},jd={key:0,class:"mr-2"},zd={key:0,class:"text-green-500"},Kd={key:1,class:"text-red-500"},Zd={key:2,class:"text-blue-500"},Jd={key:3,class:"text-yellow-500"};function eh(e,t,a,n,i,r){return o.openBlock(),o.createBlock(o.Transition,{name:"fade"},{default:o.withCtx(()=>[e.visible?(o.openBlock(),o.createElementBlock("div",Qd,[o.createElementVNode("div",{class:o.normalizeClass([e.typeClass,"message-content"])},[e.icon?(o.openBlock(),o.createElementBlock("span",jd,[o.renderSlot(e.$slots,"icon",{},()=>[e.type==="success"?(o.openBlock(),o.createElementBlock("span",zd,"✔")):o.createCommentVNode("",!0),e.type==="error"?(o.openBlock(),o.createElementBlock("span",Kd,"✖")):o.createCommentVNode("",!0),e.type==="info"?(o.openBlock(),o.createElementBlock("span",Zd,"ℹ")):o.createCommentVNode("",!0),e.type==="warning"?(o.openBlock(),o.createElementBlock("span",Jd,"⚠")):o.createCommentVNode("",!0)],!0)])):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(e.message),1),o.createElementVNode("button",{class:"close-btn hover:text-gray-800 font-bold",onClick:t[0]||(t[0]=(...u)=>e.closeMessage&&e.closeMessage(...u))}," × ")],2)])):o.createCommentVNode("",!0)]),_:3})}const th=lt(Xd,[["render",eh],["__scopeId","data-v-12cd136f"]]),Ct=o.reactive([]);let kn=null;const ah=()=>{const e=document.createElement("div");return e.id="global-message-container",document.body.appendChild(e),e},nh=()=>{if(kn)return;const e=ah();kn=o.createApp({setup(){return{messageQueue:Ct}},render(){const t=o.computed(()=>{var n;return{"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4","top-center":"top-4 left-1/2 transform -translate-x-1/2","bottom-center":"bottom-4 left-1/2 transform -translate-x-1/2"}[((n=Ct[0])==null?void 0:n.options.position)||"top-right"]});return o.h("div",{class:`fixed flex flex-col gap-2 ${t.value}`},Ct.map(a=>o.h(th,{key:a.id,...a.options,onClose:()=>Gs(a.id)})))}}),kn.mount(e)},Gs=e=>{const t=Ct.findIndex(a=>a.id===e);t!==-1&&Ct.splice(t,1)};let ih=0;const q=e=>{nh();const t=ih++;Ct.push({id:t,options:e}),setTimeout(()=>{Gs(t)},e.duration||3e3)};q.success=(e,t=3e3,a=!0)=>{q(typeof e=="string"?{message:e,type:"success",duration:t,icon:a}:{...e,type:"success"})},q.error=(e,t=3e3,a=!0)=>{q(typeof e=="string"?{message:e,type:"error",duration:t,icon:a}:{...e,type:"error"})},q.info=(e,t=3e3,a=!0)=>{q(typeof e=="string"?{message:e,type:"info",duration:t,icon:a}:{...e,type:"info"})},q.warning=(e,t=3e3,a=!0)=>{q(typeof e=="string"?{message:e,type:"warning",duration:t,icon:a}:{...e,type:"warning"})};const sh={key:0},rh={key:0},uh={class:"text-gray-500 my-2"},oh={class:"text-gray-500 my-2"},ch={key:1},lh={key:2},dh={key:3},hh={key:4},fh={key:5},mh={key:6},Eh={key:7},ph={key:8},Th={key:9},bh={key:10},gh=lt(o.defineComponent({__name:"EditorPanel",props:{element:Object},emits:["updateElement"],setup(e,{emit:t}){const a=e,n=t,i=o.ref({rule:{},...a.element});o.watch(()=>a.element,u=>{i.value={rule:{},...u}},{immediate:!0});function r(){if(i.value.type===X.Icon&&!i.value.attrs.class.includes("iconfont")){q.error("图标仅支持 iconfont 图标");return}if(i.value.type===X.Image&&i.value.tag!=="img"){q.error("节点类型错误");return}if(i.value.type===X.Video&&i.value.tag!=="video"){q.error("节点类型错误");return}if(i.value.type===X.Link&&i.value.tag!=="a"){q.error("节点类型错误");return}if(i.value.type===X.Text){if(Number(i.value.rule.minText)>Number(i.value.rule.maxText)){q.error("最小文本长度不能大于最大文本长度");return}if(i.value.tag!=="p"&&i.value.tag!=="div"&&i.value.tag!=="span"&&i.value.tag!=="h1"&&i.value.tag!=="h2"&&i.value.tag!=="h3"&&i.value.tag!=="h4"&&i.value.tag!=="h5"&&i.value.tag!=="h6"){q.error("节点类型错误");return}}if(i.value.type===X.Block){if(Number(i.value.rule.minBlock)>Number(i.value.rule.maxBlock)){q.error("最小块数量不能大于最大块数量");return}if(i.value.tag!=="div"&&i.value.tag!=="section"&&i.value.tag!=="article"&&i.value.tag!=="nav"&&i.value.tag!=="header"&&i.value.tag!=="footer"&&i.value.tag!=="span"&&i.value.tag!=="p"&&i.value.tag!=="img"){q.error("节点类型错误");return}if(!i.value.children||i.value.children.length<1){q.error("节点错误,必须包含子元素");return}}n("updateElement",i.value)}return(u,c)=>(o.openBlock(),o.createElementBlock("div",null,[i.value?(o.openBlock(),o.createElementBlock("div",sh,[i.value.text!==void 0?(o.openBlock(),o.createElementBlock("div",rh,[c[13]||(c[13]=o.createElementVNode("label",{class:"block"},"内容",-1)),o.createElementVNode("div",uh,o.toDisplayString(i.value.text||"-"),1)])):o.createCommentVNode("",!0),o.createElementVNode("div",null,[c[14]||(c[14]=o.createElementVNode("label",{class:"block mt-4"},"节点",-1)),o.createElementVNode("div",oh,o.toDisplayString(i.value.xpath),1)]),o.createElementVNode("div",null,[c[16]||(c[16]=o.createElementVNode("label",{class:"block mt-4"},"类型",-1)),o.withDirectives(o.createElementVNode("select",{"onUpdate:modelValue":c[0]||(c[0]=l=>i.value.type=l),class:"border rounded p-1 w-full"},c[15]||(c[15]=[o.createElementVNode("option",{value:0},"无",-1),o.createElementVNode("option",{value:1},"文本",-1),o.createElementVNode("option",{value:2},"图片",-1),o.createElementVNode("option",{value:3},"视频",-1),o.createElementVNode("option",{value:4},"图标",-1),o.createElementVNode("option",{value:5},"链接",-1),o.createElementVNode("option",{value:6},"按钮",-1),o.createElementVNode("option",{value:10},"块",-1)]),512),[[o.vModelSelect,i.value.type]])]),i.value.type==o.unref(X).Text?(o.openBlock(),o.createElementBlock("div",ch,[c[17]||(c[17]=o.createElementVNode("label",{class:"block mt-4"},"最小文本长度",-1)),o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":c[1]||(c[1]=l=>i.value.rule.minText=l),class:"border rounded p-1 w-full"},null,512),[[o.vModelText,i.value.rule.minText]])])):o.createCommentVNode("",!0),i.value.type==o.unref(X).Text?(o.openBlock(),o.createElementBlock("div",lh,[c[18]||(c[18]=o.createElementVNode("label",{class:"block mt-4"},"最大文本长度",-1)),o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":c[2]||(c[2]=l=>i.value.rule.maxText=l),class:"border rounded p-1 w-full"},null,512),[[o.vModelText,i.value.rule.maxText]])])):o.createCommentVNode("",!0),i.value.type==o.unref(X).Image?(o.openBlock(),o.createElementBlock("div",dh,[c[19]||(c[19]=o.createElementVNode("label",{class:"block mt-4"},"是否裁剪",-1)),o.createVNode(jt,{class:"py-2",modelValue:i.value.rule.crop,"onUpdate:modelValue":c[3]||(c[3]=l=>i.value.rule.crop=l),label:"是"},null,8,["modelValue"])])):o.createCommentVNode("",!0),i.value.type==o.unref(X).Image?(o.openBlock(),o.createElementBlock("div",hh,[c[20]||(c[20]=o.createElementVNode("label",{class:"block mt-4"},"图片宽度",-1)),o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":c[4]||(c[4]=l=>i.value.rule.minImageWidth=l),class:"border rounded p-1 w-full"},null,512),[[o.vModelText,i.value.rule.minImageWidth]])])):o.createCommentVNode("",!0),i.value.type==o.unref(X).Image?(o.openBlock(),o.createElementBlock("div",fh,[c[21]||(c[21]=o.createElementVNode("label",{class:"block mt-4"},"图片高度",-1)),o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":c[5]||(c[5]=l=>i.value.rule.maxImageHeight=l),class:"border rounded p-1 w-full"},null,512),[[o.vModelText,i.value.rule.maxImageHeight]])])):o.createCommentVNode("",!0),i.value.type==o.unref(X).Block?(o.openBlock(),o.createElementBlock("div",mh,[c[22]||(c[22]=o.createElementVNode("label",{class:"block mt-4"},"块最小数量",-1)),o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":c[6]||(c[6]=l=>i.value.rule.minBlock=l),class:"border rounded p-1 w-full"},null,512),[[o.vModelText,i.value.rule.minBlock]])])):o.createCommentVNode("",!0),i.value.type==o.unref(X).Block?(o.openBlock(),o.createElementBlock("div",Eh,[c[23]||(c[23]=o.createElementVNode("label",{class:"block mt-4"},"块最大数量",-1)),o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":c[7]||(c[7]=l=>i.value.rule.maxBlock=l),class:"border rounded p-1 w-full"},null,512),[[o.vModelText,i.value.rule.maxBlock]])])):o.createCommentVNode("",!0),i.value.type==o.unref(X).Text||i.value.type==o.unref(X).Icon||i.value.type==o.unref(X).Button?(o.openBlock(),o.createElementBlock("div",ph,[c[24]||(c[24]=o.createElementVNode("label",{class:"block mt-4"},"主题色",-1)),o.createVNode(jt,{class:"py-2",modelValue:i.value.rule.isThemeColor,"onUpdate:modelValue":c[8]||(c[8]=l=>i.value.rule.isThemeColor=l),label:"是"},null,8,["modelValue"])])):o.createCommentVNode("",!0),o.createElementVNode("div",null,[c[25]||(c[25]=o.createElementVNode("label",{class:"block mt-4"},"是否必填",-1)),o.createVNode(jt,{class:"py-2",modelValue:i.value.rule.isRequired,"onUpdate:modelValue":c[9]||(c[9]=l=>i.value.rule.isRequired=l),label:"是"},null,8,["modelValue"])]),o.createElementVNode("div",null,[c[26]||(c[26]=o.createElementVNode("label",{class:"block mt-4"},"是否只读",-1)),o.createVNode(jt,{class:"py-2",modelValue:i.value.rule.isReadOnly,"onUpdate:modelValue":c[10]||(c[10]=l=>i.value.rule.isReadOnly=l),label:"是"},null,8,["modelValue"])]),i.value.type==o.unref(X).Link||i.value.type==o.unref(X).Button?(o.openBlock(),o.createElementBlock("div",Th,[c[27]||(c[27]=o.createElementVNode("label",{class:"block mt-4"},"打开美洽",-1)),o.createVNode(jt,{class:"py-2",modelValue:i.value.rule.openMeiqia,"onUpdate:modelValue":c[11]||(c[11]=l=>i.value.rule.openMeiqia=l),label:"是"},null,8,["modelValue"])])):o.createCommentVNode("",!0),i.value.type==o.unref(X).Link||i.value.type==o.unref(X).Button?(o.openBlock(),o.createElementBlock("div",bh,[c[28]||(c[28]=o.createElementVNode("label",{class:"block mt-4"},"链接",-1)),o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":c[12]||(c[12]=l=>i.value.rule.linkUrl=l),class:"border rounded p-1 w-full"},null,512),[[o.vModelText,i.value.rule.linkUrl]])])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("button",{onClick:r,class:"mt-4 p-2 bg-green-500 text-white rounded"}," 保存 ")]))}}),[["__scopeId","data-v-7395db8a"]]);/*!
|
9
9
|
* Cropper.js v1.6.2
|
10
10
|
* https://fengyuanchen.github.io/cropperjs
|
11
11
|
*
|
@@ -13,5 +13,5 @@
|
|
13
13
|
* Released under the MIT license
|
14
14
|
*
|
15
15
|
* Date: 2024-04-21T07:43:05.335Z
|
16
|
-
*/function Xs(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var
|
17
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ma=typeof window<"u"&&typeof window.document<"u",Ue=Ma?window:{},Pi=Ma&&Ue.document.documentElement?"ontouchstart"in Ue.document.documentElement:!1,vi=Ma?"PointerEvent"in Ue:!1,Z="cropper",Bi="all",Zs="crop",Js="move",er="zoom",dt="e",ht="w",It="s",et="n",zt="ne",Kt="nw",Zt="se",Jt="sw",wi="".concat(Z,"-crop"),tr="".concat(Z,"-disabled"),ge="".concat(Z,"-hidden"),ar="".concat(Z,"-hide"),Dh="".concat(Z,"-invisible"),Pa="".concat(Z,"-modal"),Ui="".concat(Z,"-move"),ea="".concat(Z,"Action"),va="".concat(Z,"Preview"),Fi="crop",ir="move",nr="none",Hi="crop",Vi="cropend",Yi="cropmove",qi="cropstart",sr="dblclick",Lh=Pi?"touchstart":"mousedown",yh=Pi?"touchmove":"mousemove",Rh=Pi?"touchend touchcancel":"mouseup",rr=vi?"pointerdown":Lh,ur=vi?"pointermove":yh,or=vi?"pointerup pointercancel":Rh,cr="ready",lr="resize",dr="wheel",Wi="zoom",hr="image/jpeg",kh=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Mh=/^data:/,Ph=/^data:image\/jpeg;base64,/,vh=/^img|canvas$/i,fr=200,mr=100,Er={viewMode:0,dragMode:Fi,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:fr,minContainerHeight:mr,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Bh='<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>',wh=Number.isNaN||Ue.isNaN;function q(e){return typeof e=="number"&&!wh(e)}var pr=function(t){return t>0&&t<1/0};function $i(e){return typeof e>"u"}function ft(e){return ki(e)==="object"&&e!==null}var Uh=Object.prototype.hasOwnProperty;function St(e){if(!ft(e))return!1;try{var t=e.constructor,a=t.prototype;return t&&a&&Uh.call(a,"isPrototypeOf")}catch{return!1}}function _e(e){return typeof e=="function"}var Fh=Array.prototype.slice;function Tr(e){return Array.from?Array.from(e):Fh.call(e)}function ie(e,t){return e&&_e(t)&&(Array.isArray(e)||q(e.length)?Tr(e).forEach(function(a,i){t.call(e,a,i,e)}):ft(e)&&Object.keys(e).forEach(function(a){t.call(e,e[a],a,e)})),e}var J=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 ft(t)&&i.length>0&&i.forEach(function(r){ft(r)&&Object.keys(r).forEach(function(u){t[u]=r[u]})}),t},Hh=/\.\d*(?:0|9){12}\d*$/;function xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Hh.test(e)?Math.round(e*t)/t:e}var Vh=/^width|height|left|top|marginLeft|marginTop$/;function tt(e,t){var a=e.style;ie(t,function(i,n){Vh.test(n)&&q(i)&&(i="".concat(i,"px")),a[n]=i})}function Yh(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function ce(e,t){if(t){if(q(e.length)){ie(e,function(i){ce(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 Fe(e,t){if(t){if(q(e.length)){ie(e,function(a){Fe(a,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function Ot(e,t,a){if(t){if(q(e.length)){ie(e,function(i){Ot(i,t,a)});return}a?ce(e,t):Fe(e,t)}}var qh=/([a-z\d])([A-Z])/g;function Gi(e){return e.replace(qh,"$1-$2").toLowerCase()}function Xi(e,t){return ft(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Gi(t)))}function ta(e,t,a){ft(a)?e[t]=a:e.dataset?e.dataset[t]=a:e.setAttribute("data-".concat(Gi(t)),a)}function Wh(e,t){if(ft(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(Gi(t)))}var br=/\s\s*/,gr=function(){var e=!1;if(Ma){var t=!1,a=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(r){t=r}});Ue.addEventListener("test",a,i),Ue.removeEventListener("test",a,i)}return e}();function ye(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(br).forEach(function(r){if(!gr){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 De(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(br).forEach(function(r){if(i.once&&!gr){var u=e.listeners,o=u===void 0?{}:u;n=function(){delete o[r][a],e.removeEventListener(r,n,i);for(var h=arguments.length,m=new Array(h),p=0;p<h;p++)m[p]=arguments[p];a.apply(e,m)},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 Dt(e,t,a){var i;return _e(Event)&&_e(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 _r(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var Qi=Ue.location,$h=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Ar(e){var t=e.match($h);return t!==null&&(t[1]!==Qi.protocol||t[2]!==Qi.hostname||t[3]!==Qi.port)}function Nr(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function aa(e){var t=e.rotate,a=e.scaleX,i=e.scaleY,n=e.translateX,r=e.translateY,u=[];q(n)&&n!==0&&u.push("translateX(".concat(n,"px)")),q(r)&&r!==0&&u.push("translateY(".concat(r,"px)")),q(t)&&t!==0&&u.push("rotate(".concat(t,"deg)")),q(a)&&a!==1&&u.push("scaleX(".concat(a,")")),q(i)&&i!==1&&u.push("scaleY(".concat(i,")"));var o=u.length?u.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function Gh(e){var t=Qs({},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),h=Math.abs(i.endY-r.endY),m=Math.sqrt(u*u+o*o),p=Math.sqrt(l*l+h*h),T=(p-m)/m;Math.abs(T)>Math.abs(a)&&(a=T)})}),a}function Ba(e,t){var a=e.pageX,i=e.pageY,n={endX:a,endY:i};return t?n:Qs({startX:a,startY:i},n)}function Xh(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 at(e){var t=e.aspectRatio,a=e.height,i=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=pr(i),u=pr(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 Qh(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 jh(e,t,a,i){var n=t.aspectRatio,r=t.naturalWidth,u=t.naturalHeight,o=t.rotate,l=o===void 0?0:o,h=t.scaleX,m=h===void 0?1:h,p=t.scaleY,T=p===void 0?1:p,_=a.aspectRatio,I=a.naturalWidth,L=a.naturalHeight,y=i.fillColor,H=y===void 0?"transparent":y,v=i.imageSmoothingEnabled,w=v===void 0?!0:v,z=i.imageSmoothingQuality,U=z===void 0?"low":z,A=i.maxWidth,B=A===void 0?1/0:A,X=i.maxHeight,te=X===void 0?1/0:X,Ce=i.minWidth,Re=Ce===void 0?0:Ce,ke=i.minHeight,Ie=ke===void 0?0:ke,me=document.createElement("canvas"),D=me.getContext("2d"),Y=at({aspectRatio:_,width:B,height:te}),ae=at({aspectRatio:_,width:Re,height:Ie},"cover"),Ee=Math.min(Y.width,Math.max(ae.width,I)),Ae=Math.min(Y.height,Math.max(ae.height,L)),Ge=at({aspectRatio:n,width:B,height:te}),mt=at({aspectRatio:n,width:Re,height:Ie},"cover"),Me=Math.min(Ge.width,Math.max(mt.width,r)),Et=Math.min(Ge.height,Math.max(mt.height,u)),wa=[-Me/2,-Et/2,Me,Et];return me.width=xt(Ee),me.height=xt(Ae),D.fillStyle=H,D.fillRect(0,0,Ee,Ae),D.save(),D.translate(Ee/2,Ae/2),D.rotate(l*Math.PI/180),D.scale(m,T),D.imageSmoothingEnabled=w,D.imageSmoothingQuality=U,D.drawImage.apply(D,[e].concat(Ks(wa.map(function(Ua){return Math.floor(xt(Ua))})))),D.restore(),me}var Cr=String.fromCharCode;function zh(e,t,a){var i="";a+=t;for(var n=t;n<a;n+=1)i+=Cr(e.getUint8(n));return i}var Kh=/^data:.*,/;function Zh(e){var t=e.replace(Kh,""),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 Jh(e,t){for(var a=[],i=8192,n=new Uint8Array(e);n.length>0;)a.push(Cr.apply(null,Tr(n.subarray(0,i)))),n=n.subarray(i);return"data:".concat(t,";base64,").concat(btoa(a.join("")))}function ef(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,h=n+10;if(zh(t,l,4)==="Exif"){var m=t.getUint16(h);if(i=m===18761,(i||m===19789)&&t.getUint16(h+2,i)===42){var p=t.getUint32(h+4,i);p>=8&&(r=h+p)}}}if(r){var T=t.getUint16(r,i),_,I;for(I=0;I<T;I+=1)if(_=r+I*12+2,t.getUint16(_,i)===274){_+=8,a=t.getUint16(_,i),t.setUint16(_,1,i);break}}}catch{a=1}return a}function tf(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 af={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);ce(n,ge),Fe(t,ge);var o={width:Math.max(i.offsetWidth,r>=0?r:fr),height:Math.max(i.offsetHeight,u>=0?u:mr)};this.containerData=o,tt(n,{width:o.width,height:o.height}),ce(t,ge),Fe(n,ge)},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,h=t.height;t.height*o>t.width?i===3?l=t.height*o:h=t.width/o:i===3?h=t.width/o:l=t.height*o;var m={aspectRatio:o,naturalWidth:r,naturalHeight:u,width:l,height:h};this.canvasData=m,this.limited=i===1||i===2,this.limitCanvas(!0,!0),m.width=Math.min(Math.max(m.width,m.minWidth),m.maxWidth),m.height=Math.min(Math.max(m.height,m.minHeight),m.maxHeight),m.left=(t.width-m.width)/2,m.top=(t.height-m.height)/2,m.oldLeft=m.left,m.oldTop=m.top,this.initialCanvasData=J({},m)},limitCanvas:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=i.viewMode,l=r.aspectRatio,h=this.cropped&&u;if(t){var m=Number(i.minCanvasWidth)||0,p=Number(i.minCanvasHeight)||0;o>1?(m=Math.max(m,n.width),p=Math.max(p,n.height),o===3&&(p*l>m?m=p*l:p=m/l)):o>0&&(m?m=Math.max(m,h?u.width:0):p?p=Math.max(p,h?u.height:0):h&&(m=u.width,p=u.height,p*l>m?m=p*l:p=m/l));var T=at({aspectRatio:l,width:m,height:p});m=T.width,p=T.height,r.minWidth=m,r.minHeight=p,r.maxWidth=1/0,r.maxHeight=1/0}if(a)if(o>(h?0:1)){var _=n.width-r.width,I=n.height-r.height;r.minLeft=Math.min(0,_),r.minTop=Math.min(0,I),r.maxLeft=Math.max(0,_),r.maxTop=Math.max(0,I),h&&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,_),r.maxLeft=Math.max(0,_)),r.height>=n.height&&(r.minTop=Math.min(0,I),r.maxTop=Math.max(0,I))))}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=Qh({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),h=i.height*(o/i.naturalHeight);i.left-=(l-i.width)/2,i.top-=(h-i.height)/2,i.width=l,i.height=h,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,tt(this.canvas,J({width:i.width,height:i.height},aa({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);J(i,{width:n,height:r,left:(a.width-n)/2,top:(a.height-r)/2}),tt(this.image,J({width:i.width,height:i.height},aa(J({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=J({},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 h=Number(i.minCropBoxWidth)||0,m=Number(i.minCropBoxHeight)||0,p=o?Math.min(n.width,r.width,r.width+r.left,n.width-r.left):n.width,T=o?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;h=Math.min(h,n.width),m=Math.min(m,n.height),l&&(h&&m?m*l>h?m=h/l:h=m*l:h?m=h/l:m&&(h=m*l),T*l>p?T=p/l:p=T*l),u.minWidth=Math.min(h,p),u.minHeight=Math.min(m,T),u.maxWidth=p,u.maxHeight=T}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&&ta(this.face,ea,i.width>=a.width&&i.height>=a.height?Js:Bi),tt(this.cropBox,J({width:i.width,height:i.height},aa({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Dt(this.element,Hi,this.getData())}},nf={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 h=document.createElement("img");ta(l,va,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),a&&(h.crossOrigin=a),h.src=n,h.alt=r,h.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(h)})}},resetPreview:function(){ie(this.previews,function(t){var a=Xi(t,va);tt(t,{width:a.width,height:a.height}),t.innerHTML=a.html,Wh(t,va)})},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,h=i.top-a.top-t.top;!this.cropped||this.disabled||(tt(this.viewBoxImage,J({width:u,height:o},aa(J({translateX:-l,translateY:-h},t)))),ie(this.previews,function(m){var p=Xi(m,va),T=p.width,_=p.height,I=T,L=_,y=1;n&&(y=T/n,L=r*y),r&&L>_&&(y=_/r,I=n*y,L=_),tt(m,{width:I,height:L}),tt(m.getElementsByTagName("img")[0],J({width:u*y,height:o*y},aa(J({translateX:-l*y,translateY:-h*y},t))))}))}},sf={bind:function(){var t=this.element,a=this.options,i=this.cropper;_e(a.cropstart)&&De(t,qi,a.cropstart),_e(a.cropmove)&&De(t,Yi,a.cropmove),_e(a.cropend)&&De(t,Vi,a.cropend),_e(a.crop)&&De(t,Hi,a.crop),_e(a.zoom)&&De(t,Wi,a.zoom),De(i,rr,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&De(i,dr,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&De(i,sr,this.onDblclick=this.dblclick.bind(this)),De(t.ownerDocument,ur,this.onCropMove=this.cropMove.bind(this)),De(t.ownerDocument,or,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&De(window,lr,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;_e(a.cropstart)&&ye(t,qi,a.cropstart),_e(a.cropmove)&&ye(t,Yi,a.cropmove),_e(a.cropend)&&ye(t,Vi,a.cropend),_e(a.crop)&&ye(t,Hi,a.crop),_e(a.zoom)&&ye(t,Wi,a.zoom),ye(i,rr,this.onCropStart),a.zoomable&&a.zoomOnWheel&&ye(i,dr,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&ye(i,sr,this.onDblclick),ye(t.ownerDocument,ur,this.onCropMove),ye(t.ownerDocument,or,this.onCropEnd),a.responsive&&ye(window,lr,this.onResize)}},rf={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(h,m){o[m]=h*u})),this.setCropBoxData(ie(l,function(h,m){l[m]=h*u})))}}},dblclick:function(){this.disabled||this.options.dragMode===nr||this.setDragMode(Yh(this.dragBox,wi)?ir:Fi)},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")&&(q(a)&&a!==1||q(i)&&i!==0||t.ctrlKey))){var n=this.options,r=this.pointers,u;t.changedTouches?ie(t.changedTouches,function(o){r[o.identifier]=Ba(o)}):r[t.pointerId||0]=Ba(t),Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?u=er:u=Xi(t.target,ea),kh.test(u)&&Dt(this.element,qi,{originalEvent:t,action:u})!==!1&&(t.preventDefault(),this.action=u,this.cropping=!1,u===Zs&&(this.cropping=!0,ce(this.dragBox,Pa)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),Dt(this.element,Yi,{originalEvent:t,action:a})!==!1&&(t.changedTouches?ie(t.changedTouches,function(n){J(i[n.identifier]||{},Ba(n,!0))}):J(i[t.pointerId||0]||{},Ba(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,Ot(this.dragBox,Pa,this.cropped&&this.options.modal)),Dt(this.element,Vi,{originalEvent:t,action:a}))}}},uf={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,h=r.left,m=r.top,p=r.width,T=r.height,_=h+p,I=m+T,L=0,y=0,H=n.width,v=n.height,w=!0,z;!l&&t.shiftKey&&(l=p&&T?p/T:1),this.limited&&(L=r.minLeft,y=r.minTop,H=L+Math.min(n.width,i.width,i.left+i.width),v=y+Math.min(n.height,i.height,i.top+i.height));var U=u[Object.keys(u)[0]],A={x:U.endX-U.startX,y:U.endY-U.startY},B=function(te){switch(te){case dt:_+A.x>H&&(A.x=H-_);break;case ht:h+A.x<L&&(A.x=L-h);break;case et:m+A.y<y&&(A.y=y-m);break;case It:I+A.y>v&&(A.y=v-I);break}};switch(o){case Bi:h+=A.x,m+=A.y;break;case dt:if(A.x>=0&&(_>=H||l&&(m<=y||I>=v))){w=!1;break}B(dt),p+=A.x,p<0&&(o=ht,p=-p,h-=p),l&&(T=p/l,m+=(r.height-T)/2);break;case et:if(A.y<=0&&(m<=y||l&&(h<=L||_>=H))){w=!1;break}B(et),T-=A.y,m+=A.y,T<0&&(o=It,T=-T,m-=T),l&&(p=T*l,h+=(r.width-p)/2);break;case ht:if(A.x<=0&&(h<=L||l&&(m<=y||I>=v))){w=!1;break}B(ht),p-=A.x,h+=A.x,p<0&&(o=dt,p=-p,h-=p),l&&(T=p/l,m+=(r.height-T)/2);break;case It:if(A.y>=0&&(I>=v||l&&(h<=L||_>=H))){w=!1;break}B(It),T+=A.y,T<0&&(o=et,T=-T,m-=T),l&&(p=T*l,h+=(r.width-p)/2);break;case zt:if(l){if(A.y<=0&&(m<=y||_>=H)){w=!1;break}B(et),T-=A.y,m+=A.y,p=T*l}else B(et),B(dt),A.x>=0?_<H?p+=A.x:A.y<=0&&m<=y&&(w=!1):p+=A.x,A.y<=0?m>y&&(T-=A.y,m+=A.y):(T-=A.y,m+=A.y);p<0&&T<0?(o=Jt,T=-T,p=-p,m-=T,h-=p):p<0?(o=Kt,p=-p,h-=p):T<0&&(o=Zt,T=-T,m-=T);break;case Kt:if(l){if(A.y<=0&&(m<=y||h<=L)){w=!1;break}B(et),T-=A.y,m+=A.y,p=T*l,h+=r.width-p}else B(et),B(ht),A.x<=0?h>L?(p-=A.x,h+=A.x):A.y<=0&&m<=y&&(w=!1):(p-=A.x,h+=A.x),A.y<=0?m>y&&(T-=A.y,m+=A.y):(T-=A.y,m+=A.y);p<0&&T<0?(o=Zt,T=-T,p=-p,m-=T,h-=p):p<0?(o=zt,p=-p,h-=p):T<0&&(o=Jt,T=-T,m-=T);break;case Jt:if(l){if(A.x<=0&&(h<=L||I>=v)){w=!1;break}B(ht),p-=A.x,h+=A.x,T=p/l}else B(It),B(ht),A.x<=0?h>L?(p-=A.x,h+=A.x):A.y>=0&&I>=v&&(w=!1):(p-=A.x,h+=A.x),A.y>=0?I<v&&(T+=A.y):T+=A.y;p<0&&T<0?(o=zt,T=-T,p=-p,m-=T,h-=p):p<0?(o=Zt,p=-p,h-=p):T<0&&(o=Kt,T=-T,m-=T);break;case Zt:if(l){if(A.x>=0&&(_>=H||I>=v)){w=!1;break}B(dt),p+=A.x,T=p/l}else B(It),B(dt),A.x>=0?_<H?p+=A.x:A.y>=0&&I>=v&&(w=!1):p+=A.x,A.y>=0?I<v&&(T+=A.y):T+=A.y;p<0&&T<0?(o=Kt,T=-T,p=-p,m-=T,h-=p):p<0?(o=Jt,p=-p,h-=p):T<0&&(o=zt,T=-T,m-=T);break;case Js:this.move(A.x,A.y),w=!1;break;case er:this.zoom(Gh(u),t),w=!1;break;case Zs:if(!A.x||!A.y){w=!1;break}z=_r(this.cropper),h=U.startX-z.left,m=U.startY-z.top,p=r.minWidth,T=r.minHeight,A.x>0?o=A.y>0?Zt:zt:A.x<0&&(h-=p,o=A.y>0?Jt:Kt),A.y<0&&(m-=T),this.cropped||(Fe(this.cropBox,ge),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}w&&(r.width=p,r.height=T,r.left=h,r.top=m,this.action=o,this.renderCropBox()),ie(u,function(X){X.startX=X.endX,X.startY=X.endY})}},of={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&ce(this.dragBox,Pa),Fe(this.cropBox,ge),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=J({},this.initialImageData),this.canvasData=J({},this.initialCanvasData),this.cropBoxData=J({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(J(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Fe(this.dragBox,Pa),ce(this.cropBox,ge)),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,Fe(this.cropper,tr)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,ce(this.cropper,tr)),this},destroy:function(){var t=this.element;return t[Z]?(t[Z]=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($i(t)?t:n+Number(t),$i(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&&(q(t)&&(i.left=t,n=!0),q(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,h=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var m=l*t,p=h*t;if(Dt(this.element,Wi,{ratio:t,oldRatio:u/l,originalEvent:i})===!1)return this;if(i){var T=this.pointers,_=_r(this.cropper),I=T&&Object.keys(T).length?Xh(T):{pageX:i.pageX,pageY:i.pageY};r.left-=(m-u)*((I.pageX-_.left-r.left)/u),r.top-=(p-o)*((I.pageY-_.top-r.top)/o)}else St(a)&&q(a.x)&&q(a.y)?(r.left-=(m-u)*((a.x-r.left)/u),r.top-=(p-o)*((a.y-r.top)/o)):(r.left-=(m-u)/2,r.top-=(p-o)/2);r.width=m,r.height=p,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),q(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,q(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(q(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&&(q(t)&&(i.scaleX=t,n=!0),q(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(m,p){u[p]=m/o}),t){var l=Math.round(u.y+u.height),h=Math.round(u.x+u.width);u.x=Math.round(u.x),u.y=Math.round(u.y),u.width=h-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&&St(t)){var u=!1;a.rotatable&&q(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,u=!0),a.scalable&&(q(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,u=!0),q(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,u=!0)),u&&this.renderCanvas(!0,!0);var o=i.width/i.naturalWidth;q(t.x)&&(r.left=t.x*o+n.left),q(t.y)&&(r.top=t.y*o+n.top),q(t.width)&&(r.width=t.width*o),q(t.height)&&(r.height=t.height*o),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?J({},this.containerData):{}},getImageData:function(){return this.sized?J({},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&&St(t)&&(q(t.left)&&(a.left=t.left),q(t.top)&&(a.top=t.top),q(t.width)?(a.width=t.width,a.height=t.width/i):q(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&&St(t)&&(q(t.left)&&(a.left=t.left),q(t.top)&&(a.top=t.top),q(t.width)&&t.width!==a.width&&(n=!0,a.width=t.width),q(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=jh(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,h=i.width/Math.floor(a.naturalWidth);h!==1&&(r*=h,u*=h,o*=h,l*=h);var m=o/l,p=at({aspectRatio:m,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),T=at({aspectRatio:m,width:t.minWidth||0,height:t.minHeight||0},"cover"),_=at({aspectRatio:m,width:t.width||(h!==1?i.width:o),height:t.height||(h!==1?i.height:l)}),I=_.width,L=_.height;I=Math.min(p.width,Math.max(T.width,I)),L=Math.min(p.height,Math.max(T.height,L));var y=document.createElement("canvas"),H=y.getContext("2d");y.width=xt(I),y.height=xt(L),H.fillStyle=t.fillColor||"transparent",H.fillRect(0,0,I,L);var v=t.imageSmoothingEnabled,w=v===void 0?!0:v,z=t.imageSmoothingQuality;H.imageSmoothingEnabled=w,z&&(H.imageSmoothingQuality=z);var U=i.width,A=i.height,B=r,X=u,te,Ce,Re,ke,Ie,me;B<=-o||B>U?(B=0,te=0,Re=0,Ie=0):B<=0?(Re=-B,B=0,te=Math.min(U,o+B),Ie=te):B<=U&&(Re=0,te=Math.min(o,U-B),Ie=te),te<=0||X<=-l||X>A?(X=0,Ce=0,ke=0,me=0):X<=0?(ke=-X,X=0,Ce=Math.min(A,l+X),me=Ce):X<=A&&(ke=0,Ce=Math.min(l,A-X),me=Ce);var D=[B,X,te,Ce];if(Ie>0&&me>0){var Y=I/o;D.push(Re*Y,ke*Y,Ie*Y,me*Y)}return H.drawImage.apply(H,[i].concat(Ks(D.map(function(ae){return Math.floor(xt(ae))})))),y},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!$i(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===Fi,u=a.movable&&t===ir;t=r||u?t:nr,a.dragMode=t,ta(i,ea,t),Ot(i,wi,r),Ot(i,Ui,u),a.cropBoxMovable||(ta(n,ea,t),Ot(n,wi,r),Ot(n,Ui,u))}return this}},cf=Ue.Cropper,Ir=function(){function e(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Ah(this,e),!t||!vh.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=J({},Er,St(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 Nh(e,[{key:"init",value:function(){var a=this.element,i=a.tagName.toLowerCase(),n;if(!a[Z]){if(a[Z]=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(Mh.test(a)){Ph.test(a)?this.read(Zh(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")!==hr&&u.abort()},u.onload=function(){i.read(u.response)},u.onloadend=function(){i.reloading=!1,i.xhr=null},r.checkCrossOrigin&&Ar(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=ef(a),u=0,o=1,l=1;if(r>1){this.url=Jh(a,hr);var h=tf(r);u=h.rotate,o=h.scaleX,l=h.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&&Ar(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),ce(u,ar),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=Ue.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Ue.navigator.userAgent),r=function(h,m){J(a.imageData,{naturalWidth:h,naturalHeight:m,aspectRatio:h/m}),a.initialImageData=J({},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=Bh;var o=u.querySelector(".".concat(Z,"-container")),l=o.querySelector(".".concat(Z,"-canvas")),h=o.querySelector(".".concat(Z,"-drag-box")),m=o.querySelector(".".concat(Z,"-crop-box")),p=m.querySelector(".".concat(Z,"-face"));this.container=r,this.cropper=o,this.canvas=l,this.dragBox=h,this.cropBox=m,this.viewBox=o.querySelector(".".concat(Z,"-view-box")),this.face=p,l.appendChild(n),ce(a,ge),r.insertBefore(o,a.nextSibling),Fe(n,ar),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,ce(m,ge),i.guides||ce(m.getElementsByClassName("".concat(Z,"-dashed")),ge),i.center||ce(m.getElementsByClassName("".concat(Z,"-center")),ge),i.background&&ce(o,"".concat(Z,"-bg")),i.highlight||ce(p,Dh),i.cropBoxMovable&&(ce(p,Ui),ta(p,ea,Bi)),i.cropBoxResizable||(ce(m.getElementsByClassName("".concat(Z,"-line")),ge),ce(m.getElementsByClassName("".concat(Z,"-point")),ge)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),_e(i.ready)&&De(a,cr,i.ready,{once:!0}),Dt(a,cr)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),Fe(this.element,ge)}}},{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=cf,e}},{key:"setDefaults",value:function(a){J(Er,St(a)&&a)}}])}();J(Ir.prototype,af,nf,sf,rf,uf,of);function lf(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 df={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"},hf={class:"w-[700px] flex flex-col bg-white rounded pb-8"},ff={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},mf={class:"flex flex-col h-full"},Ef={class:"flex flex-row justify-center items-start flex-1"},pf={class:"flex flex-col items-start flex-1"},Tf={class:"flex flex-col w-full px-6 py-4"},bf={class:"flex flex-col w-full"},gf={class:"flex flex-row items-center"},_f={class:"relative bg-[#474AFF] text-white rounded p-3"},Af={class:"flex flex-row items-start justify-between mt-3"},Nf={class:"flex flex-col"},Cf={class:"flex flex-col justify-center items-center border w-[300px] h-[300px]"},If={key:0,class:"w-full text-center"},Sf=["src"],xf={class:"flex flex-col items-center",style:{width:"300px",height:"300px"}},Of={class:"text-[#999] mt-05 flex justify-center mt-4"},Df={class:"w-full flex justify-end space-x-5 mt-5 px-6"},Lf=["loading"],yf=c.defineComponent({__name:"GpCropper",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("image/jpeg"),h=c.ref({afterImg:"",image:null,myCropper:null}),m=U=>{const A=U.target.files[0];A&&(A.name&&(n.value.inputValue=A.name),p(A))};async function p(U){if(!U)return;await z();const A=URL.createObjectURL(U);h.value.image=A,h.value.image&&T(),l.value=U.type}function T(){const U=document.querySelector("#imgId");U&&U.addEventListener("load",()=>{w(),h.value.myCropper=new Ir(U,u.value)})}const _=c.ref(!1),I=c.ref();function L(U,A,B,X){I.value=X,r.value=U,U&&U.aspectRatio&&(u.value.aspectRatio=U.aspectRatio),B&&(n.value.inputValue=B),_.value=!0,A&&p(A)}function y(){_.value=!1}const H=()=>{var X,te;if(!h.value.myCropper)return;o.value=!0;var A=h.value.myCropper.getCroppedCanvas({height:(X=r.value)==null?void 0:X.height,imageSmoothingQuality:"high",width:(te=r.value)==null?void 0:te.width}).toDataURL(l.value);h.value.afterImg=A;const B=lf(h.value.afterImg,n.value.inputValue);i("ok",{file:B,element:I.value}),o.value=!1,z(),w(),y()};function v(){z(),w(),y(),i("cancel")}function w(){h.value.myCropper&&h.value.myCropper.destroy()}function z(){h.value.image=""}return t({handleCloseCropper:y,handleOpenCropper:L}),(U,A)=>{var B,X,te;return _.value?(c.openBlock(),c.createElementBlock("div",df,[c.createElementVNode("div",hf,[c.createElementVNode("div",ff,[A[1]||(A[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(v,["stop"])})]),c.createElementVNode("div",mf,[c.createElementVNode("div",Ef,[c.createElementVNode("div",pf,[c.createElementVNode("div",Tf,[c.createElementVNode("div",bf,[c.createElementVNode("div",gf,[c.createElementVNode("div",_f,[c.createElementVNode("input",{type:"file",accept:"image/*",onClick:A[0]||(A[0]=c.withModifiers(()=>{},["stop"])),contenteditable:"false",ref:"fileInput",onChange:m,class:"absolute top-0 left-0 w-[110px] h-[40px] opacity-0 cursor-pointer"},null,544),A[2]||(A[2]=c.createElementVNode("span",{id:"uploadHandler",class:"cursor-pointer"}," 选择/更换图片 ",-1))]),A[3]||(A[3]=c.createElementVNode("span",{class:"text-sm text-[#999] ml-3"},"滚动鼠标放大或缩小图片",-1))]),c.createElementVNode("div",Af,[c.createElementVNode("div",Nf,[c.createElementVNode("div",Cf,[h.value.image?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",If," 请上传图片 ")),c.createElementVNode("img",{id:"imgId",src:h.value.image,style:{width:"300px"}},null,8,Sf)])]),c.createElementVNode("div",xf,[A[4]||(A[4]=c.createElementVNode("div",{class:"before w-[270px] h-[200px] pr-[70px] border"},null,-1)),c.createElementVNode("div",Of," 预览画像 "+c.toDisplayString(((B=r.value)==null?void 0:B.width)||"")+" "+c.toDisplayString((X=r.value)!=null&&X.width?"x":"")+" "+c.toDisplayString(((te=r.value)==null?void 0:te.height)||""),1)])])])])])]),c.createElementVNode("div",Df,[c.createElementVNode("span",{loading:o.value,class:"!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",type:"primary",onClick:H}," 确认 ",8,Lf),c.createElementVNode("span",{class:"!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",onClick:v},"取消")])])])])):c.createCommentVNode("",!0)}}}),Rf=c.defineComponent({name:"GpModal",props:{visible:{type:Boolean,required:!0},title:{type:String,default:""},okText:{type:String,default:"确定"},cancelText:{type:String,default:"取消"},showOkButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0}},emits:["update:visible","ok","cancel"],setup(e,{emit:t}){const{visible:a,okText:i,cancelText:n,showCloseButton:r}=c.toRefs(e);return{visible:a,okText:i,cancelText:n,showCloseButton:r,onClose:()=>{t("cancel"),t("update:visible",!1)},onOk:()=>{t("ok"),t("update:visible",!1)},onCancel:()=>{t("cancel"),t("update:visible",!1)}}}}),kf={class:"bg-white rounded-lg shadow-xl w-ful"},Mf={class:"p-4 border-b border-gray-200 relative flex items-center justify-between"},Pf={key:0,class:"text-lg font-semibold"},vf={class:"p-4"},Bf={key:0,class:"p-4 border-t border-gray-200 flex justify-end space-x-2"};function wf(e,t,a,i,n,r){return e.visible?(c.openBlock(),c.createElementBlock("div",{key:0,class:"fixed inset-0 z-[99999] flex items-center justify-center bg-gray-900 bg-opacity-50",onClick:t[3]||(t[3]=c.withModifiers((...u)=>e.onClose&&e.onClose(...u),["self"]))},[c.createElementVNode("div",kf,[c.createElementVNode("div",Mf,[e.title?(c.openBlock(),c.createElementBlock("h3",Pf,c.toDisplayString(e.title),1)):c.createCommentVNode("",!0),c.renderSlot(e.$slots,"header"),e.showCloseButton?(c.openBlock(),c.createElementBlock("button",{key:1,class:"text-gray-400 hover:text-gray-600",onClick:t[0]||(t[0]=(...u)=>e.onClose&&e.onClose(...u)),"aria-label":"Close"},t[4]||(t[4]=[c.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[c.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))):c.createCommentVNode("",!0)]),c.createElementVNode("div",vf,[c.renderSlot(e.$slots,"default")]),e.showCancelButton||e.showOkButton?(c.openBlock(),c.createElementBlock("div",Bf,[c.renderSlot(e.$slots,"footer",{},()=>[e.showCancelButton?(c.openBlock(),c.createElementBlock("button",{key:0,class:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded hover:bg-gray-200",onClick:t[1]||(t[1]=(...u)=>e.onCancel&&e.onCancel(...u))},c.toDisplayString(e.cancelText),1)):c.createCommentVNode("",!0),e.showOkButton?(c.openBlock(),c.createElementBlock("button",{key:1,class:"px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded hover:bg-blue-700",onClick:t[2]||(t[2]=(...u)=>e.onOk&&e.onOk(...u))},c.toDisplayString(e.okText),1)):c.createCommentVNode("",!0)])])):c.createCommentVNode("",!0)])])):c.createCommentVNode("",!0)}const Uf=lt(Rf,[["render",wf]]),Ff={class:"p-4 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]"},Hf=["onClick"],Vf=c.defineComponent({__name:"GpIcon",props:{icons:{type:Array,default:()=>[]}},emits:["ok"],setup(e,{expose:t,emit:a}){const i=e,n=a,r=c.ref(i.icons||[]);c.watch(()=>i.icons,p=>{r.value=p||[]},{immediate:!0});const u=c.ref(!1),o=c.ref();function l(p){u.value=!0,o.value=p}function h(p){m(),n("ok",{icon:p,element:o.value})}function m(){u.value=!1}return t({openModal:l,closeModal:m}),(p,T)=>(c.openBlock(),c.createBlock(Uf,{visible:u.value,"onUpdate:visible":T[0]||(T[0]=_=>u.value=_),title:"选择图标",onOk:m,onCancel:m,showCancelButton:!1,showOkButton:!1},{default:c.withCtx(()=>[c.createElementVNode("div",Ff,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.value,_=>(c.openBlock(),c.createElementBlock("span",{key:_,onClick:c.withModifiers(I=>h(_),["stop"]),style:{position:"unset",color:"unset",top:"unset",left:"unset",right:"unset",transform:"unset","font-size":"unset"},class:c.normalizeClass(["w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",`iconfont icon-${_} text-4xl overflow-hidden flex justify-center items-center`])},null,10,Hf))),128))])]),_:1},8,["visible"]))}}),Yf=c.defineComponent({name:"GpImageUpload",props:{accept:{type:String,default:"image/*"},multiple:{type:Boolean,default:!1},maxCount:{type:Number,default:1/0},beforeUpload:Function,onChange:Function,showList:{type:Boolean,default:!1},show:{type:Boolean,default:!0}},setup(e,{emit:t}){const a=c.ref(null),i=c.ref([]),n=c.ref(),r=c.ref(e.show);c.watch(()=>e.show,m=>{r.value=m},{immediate:!0});const u=()=>{var m;(m=a.value)==null||m.click()},o=async m=>{var I;const T=m.target.files;if(!T)return;const _=[];for(let L=0;L<T.length;L++){const y=T[L];if(e.beforeUpload&&await e.beforeUpload(y)===!1)continue;const H=`${Date.now()}-${y.name}`,v=URL.createObjectURL(y),w=document.createElement("img");w.src=v,document.body.appendChild(w),await new Promise(A=>{w.onload=A});const z=w.width,U=w.height;document.body.removeChild(w),_.push({uid:H,name:y.name,status:"uploading",thumbUrl:v,file:y,width:z,height:U})}e.maxCount&&i.value.length+_.length>e.maxCount&&_.splice(e.maxCount-i.value.length),e.multiple?i.value=[...i.value,..._]:i.value=_.slice(0,1),(I=e.onChange)==null||I.call(e,i.value,n.value),t("update:fileList",i.value),a.value&&(a.value.value="")},l=m=>{var p;i.value=i.value.filter(T=>T.uid!==m),(p=e.onChange)==null||p.call(e,i.value,n.value)};function h(m){n.value=m,u()}return{isShow:r,openModal:h,inputRef:a,fileList:i,triggerInput:u,handleChange:o,removeFile:l}}}),qf={class:"upload-wrapper"},Wf=["accept","multiple"],$f={key:1,class:"file-list mt-4"},Gf={class:"flex items-center space-x-4"},Xf=["src"],Qf=["onClick"];function jf(e,t,a,i,n,r){return c.openBlock(),c.createElementBlock("div",qf,[e.isShow?(c.openBlock(),c.createElementBlock("div",{key:0,class:"",onClick:t[0]||(t[0]=(...u)=>e.triggerInput&&e.triggerInput(...u))},[c.renderSlot(e.$slots,"upload-icon",{},()=>[t[2]||(t[2]=c.createElementVNode("div",{class:"upload-area border-dashed border-2 p-6 rounded cursor-pointer hover:border-blue-500"},[c.createElementVNode("div",{class:"text-gray-400 text-lg text-center"}," 点击或拖拽上传图片 ")],-1))],!0)])):c.createCommentVNode("",!0),c.createElementVNode("input",{type:"file",ref:"inputRef",class:"hidden",accept:e.accept,multiple:e.multiple,onChange:t[1]||(t[1]=(...u)=>e.handleChange&&e.handleChange(...u))},null,40,Wf),e.showList?(c.openBlock(),c.createElementBlock("div",$f,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.fileList,u=>(c.openBlock(),c.createElementBlock("div",{key:u.uid,class:"file-item flex items-center justify-between p-2 border rounded mb-2"},[c.createElementVNode("div",Gf,[u.thumbUrl?(c.openBlock(),c.createElementBlock("img",{key:0,src:u.thumbUrl,alt:"preview",class:"w-12 h-12 object-cover rounded"},null,8,Xf)):c.createCommentVNode("",!0),c.createElementVNode("span",null,c.toDisplayString(u.name),1)]),c.createElementVNode("div",null,[c.createElementVNode("button",{onClick:o=>e.removeFile(u.uid),class:"text-red-500 hover:underline"}," 删除 ",8,Qf)])]))),128))])):c.createCommentVNode("",!0)])}const zf=lt(Yf,[["render",jf],["__scopeId","data-v-08babff9"]]),Kf={class:"flex"},Zf={key:0,class:"text-lg font-bold border-b p-2"},Jf={class:"text-sm font-thin text-gray-500"},em=["innerHTML"],tm=["innerHTML"],am={class:"flex-1"},im={key:0,class:"text-lg font-bold border-b p-2"},nm={class:"p-2"},sm={class:"sticky top-0"},rm={key:0,class:"text-lg font-bold border-b p-2"},um={class:"text-sm font-thin text-gray-500"},om={class:"p-2"},Sr=lt(c.defineComponent({__name:"Designer",props:{mode:{default:"design"},template:{},css:{},previewWidth:{default:375},uploadByFile:{},icons:{},rules:{},preview:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0}},emits:["update:modelValue","update:element"],setup(e,{emit:t}){const a=e,i=t,n=c.ref(a.template),r=c.ref();let u=$s("",{},!1);const o=c.ref("");c.watch(()=>a.template,N=>{n.value=N},{immediate:!0}),c.watch(()=>n.value,N=>{N&&(r.value=A(N))},{immediate:!0}),c.watch(()=>a.css,N=>{N.forEach(O=>{if(document.querySelector(`link[href="${O}"]`))return;const M=document.createElement("link");M.rel="stylesheet",M.href=O,document.head.appendChild(M)})},{immediate:!0});const l=c.ref(a.mode);c.watch(()=>r.value,N=>{N&&i("update:element",N)},{immediate:!0});const h=c.ref("");c.watch(()=>o.value,N=>{i("update:modelValue",N)},{immediate:!0});const m=c.ref(),p=c.ref(),T=c.ref(),_=c.ref(),I=c.ref(),L=c.ref("");function y(N){_.value=N}function H(N,O=""){if(O){const M=v(r.value,O);M?I.value=M:I.value=N}else I.value=N}function v(N,O){if(N.xpath===O)return N;if(N.children&&N.children.length)for(const M of N.children){const F=v(M,O);if(F)return F}}function w(N,O){var M,F;return N.tag===O.tag&&((M=N.children)==null?void 0:M.length)===((F=O.children)==null?void 0:F.length)}function z(N){var M,F,se,Se,He,fe,de,Ve,ia,ji;if(_.value.xpath==N.xpath){if(_.value){if(N.type===G.Block){var O=!0;const Ye=v(r.value,_.value.parentxpath||"");if(Ye&&Ye.children&&Ye.children.forEach(Pe=>{if(Pe.tag!=_.value.tag||!w(Pe,_.value)){O=!1;return}}),!O){Q.error("同级结构不一致,错误配置!");return}}if(_.value.rule=N.rule,_.value.type=N.type,(M=N.rule)!=null&&M.isThemeColor?(N.type===1&&((!N.attrs.class||N.attrs.class&&(!((F=N.attrs.class)!=null&&F.includes("theme_text"))||!((se=N.attrs.class)!=null&&se.includes(" theme_text"))))&&(N.attrs.class+=" theme_text"),(Se=N.attrs.class)!=null&&Se.includes("theme_bg")&&(N.attrs.class=N.attrs.class.replace("theme_bg",""))),N.type===6&&(!((He=N.attrs.class)!=null&&He.includes("theme_bg"))&&!((fe=N.attrs.class)!=null&&fe.includes(" theme_bg"))&&(N.attrs.class+=" theme_bg"),(de=N.attrs.class)!=null&&de.includes("theme_text")&&(N.attrs.class=N.attrs.class.replace("theme_text","")))):(N.type===1&&(Ve=N.attrs.class)!=null&&Ve.includes("theme_text")&&(N.attrs.class=N.attrs.class.replace("theme_text","")),N.type===6&&(ia=N.attrs.class)!=null&&ia.includes("theme_bg")&&(N.attrs.class=N.attrs.class.replace("theme_bg",""))),_.value.type===G.Block){const Ye=v(r.value,_.value.parentxpath||"");Ye&&Ye.children&&(Ye.children.forEach(Pe=>{if(Pe.tag!=_.value.tag||!w(Pe,_.value)){Q.error("同级结构不一致,无法配置为块类型");return}}),Ye.children.forEach(Pe=>{var xr;Pe.tag===_.value.tag&&(Pe.rule=N.rule,Pe.type=N.type,(xr=Pe.attrs.class)!=null&&xr.includes(" mb40 relative")||(Pe.attrs.class+=" mb40 relative"))}))}else(ji=_.value.attrs.class)!=null&&ji.includes(" mb40 relative")&&(_.value.attrs.class=_.value.attrs.class.replace(" mb40 relative"," "))}h.value=new Date().getTime().toString(),Q.success("保存成功")}}function U(N){o.value=N}function A(N){u=$s(N);const O=u("body").children().toArray().map(M=>B(u(M)));return o.value=u("body").html()||"",O[0]}function B(N,O=""){var He;function M(fe){if(!fe||!fe[0])return"";const de=[];let Ve=fe;for(;Ve.length&&Ve[0].tagName!=="html";){const ia=Ve[0].tagName,Ye=Ve.parent().children(ia).index(Ve)+1;de.unshift(`${ia}[${Ye}]`),Ve=Ve.parent()}return"/html/"+de.join("/")}const F=M(N).replace("/html/body[1]",""),se=N.children().toArray().map(fe=>B(u(fe),F)),Se=(He=a.rules)==null?void 0:He.find(fe=>fe.xpath===F);return{tag:N[0].tagName,text:N.contents().not(N.children()).text().trim(),attrs:N[0].attribs,children:se,xpath:F,parentxpath:O,type:(Se==null?void 0:Se.type)||G.None,rule:(Se==null?void 0:Se.rule)||{}}}function X(N){console.log("更新子节点的文本",N);const O=v(r.value,N.element.xpath);if(O){const M=c.toRaw(O);M.editText=N.newText}}function te(N,O=""){function M(F,se){var fe;const He=(se?((fe=v(r.value,se))==null?void 0:fe.children)||[]:[r.value]).filter(de=>de.tag===F.tag).indexOf(F)+1;return`${se}/${F.tag}[${He}]`}N.xpath=M(N,O),N.parentxpath=O,(N.children||[]).forEach(F=>te(F,N.xpath))}function Ce({action:N,element:O,newBlock:M}){console.log("块操作",N,O,M);const F=v(r.value,O.parentxpath||"");if(!F||!F.children)return;const se=F.children.findIndex(de=>de===O);if(se===-1)return;const Se=F.children.length,{minBlock:He,maxBlock:fe}=O.rule;if((N==="add"||N==="copy")&&Se>=(fe||1/0)){L.value=`无法添加更多块。最大块数量为 ${fe}`,Q.error(L.value);return}switch(N){case"add":if(M){const de={...M,xpath:"",children:JSON.parse(JSON.stringify(M.children))};F.children.splice(se+1,0,de)}break;case"copy":if(M){const de={...M,xpath:"",children:JSON.parse(JSON.stringify(M.children))};F.children.splice(se+1,0,de)}break;case"moveUp":if(se>0){const[de]=F.children.splice(se,1);F.children.splice(se-1,0,de)}break;case"moveDown":if(se<F.children.length-1){const[de]=F.children.splice(se,1);F.children.splice(se+1,0,de)}break;case"delete":if(Se<=(He||0)){L.value=`无法删除更多块。最小块数量为 ${He}`,Q.error(L.value);return}F.children.splice(se,1);break}L.value="",te(r.value)}function Re(N,O){let M=O.attrs.class.replace(/icon-\S+/g,`icon-${N}`);O.attrs.class=M}function ke(N){const O=N.file,M=v(r.value,N.element.xpath);if(a.uploadByFile)a.uploadByFile(O).then(F=>{F.success&&(M.attrs.src=F.file.url,h.value=new Date().getTime().toString())});else{M.attrs.alt=O.name;const F=URL.createObjectURL(O);M.attrs.src=F,h.value=new Date().getTime().toString()}}function Ie(N){const{icon:O}=N,M=v(r.value,N.element.xpath);let F=M.attrs.class.replace(/icon-\S+/g,`icon-${O}`);M.attrs.class=F,h.value=new Date().getTime().toString()}const me=N=>N.type.startsWith("image/")?!0:(Q.error("只能上传图片文件"),!1),D=c.ref({});function Y(N,O){if(!N||N.length===0)return;const M=N[0];if(O.rule&&(O.rule.minImageWidth||O.rule.maxImageHeight)){if(O.rule.minImageWidth&&M.width<O.rule.minImageWidth){Q.error(`图片宽度不能小于 ${O.rule.minImageWidth}px`);return}if(O.rule.maxImageHeight&&M.height<O.rule.maxImageHeight){Q.error(`图片高度不能小于 ${O.rule.maxImageHeight}px`);return}}O.rule.minImageWidth&&O.rule.maxImageHeight?(D.value.width=O.rule.minImageWidth,D.value.height=O.rule.maxImageHeight,D.value.aspectRatio=O.rule.minImageWidth/O.rule.maxImageHeight):D.value={},M&&(O.rule.crop?(M.thumbUrl,m.value.handleOpenCropper(D.value,M.file,M.name,O)):a.uploadByFile?a.uploadByFile(M.file).then(F=>{F.success&&(O.attrs.src=F.file.url,h.value=new Date().getTime().toString())}):(O.attrs.src=M.thumbUrl,h.value=new Date().getTime().toString()))}const ae=c.ref(a.previewWidth),Ee=c.ref(375);let Ae=c.ref(!1),Ge=c.ref(""),mt=0,Me=0;function Et(N){Ge.value=N,Ae.value=!0,mt=event.clientX,N==="preview"?Me=ae.value:N==="structure"&&(Me=Ee.value),window.addEventListener("mousemove",wa),window.addEventListener("mouseup",Ua)}function wa(N){if(!Ae.value)return;const O=N.clientX-mt;Ge.value==="preview"?ae.value=Math.max(200,Me+O):Ge.value==="structure"&&(Ee.value=Math.max(200,Me-O))}function Ua(){Ae.value=!1,Ge.value="",window.removeEventListener("mousemove",wa),window.removeEventListener("mouseup",Ua)}return(N,O)=>(c.openBlock(),c.createElementBlock("div",Kf,[N.preview?(c.openBlock(),c.createElementBlock("div",{key:0,class:"border-l overflow-auto resize-area",style:c.normalizeStyle({width:ae.value+"px"})},[N.showTitle?(c.openBlock(),c.createElementBlock("h2",Zf,[O[2]||(O[2]=c.createTextVNode(" 实时预览 ")),c.createElementVNode("span",Jf,c.toDisplayString(ae.value)+"px",1)])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o.value?(c.openBlock(),c.createElementBlock("div",{key:0,innerHTML:o.value},null,8,em)):(c.openBlock(),c.createElementBlock("div",{key:1,innerHTML:c.unref(u)("body").html()},null,8,tm))])],4)):c.createCommentVNode("",!0),N.preview?(c.openBlock(),c.createElementBlock("div",{key:1,class:"resizer",onMousedown:O[0]||(O[0]=M=>Et("preview"))},null,32)):c.createCommentVNode("",!0),c.createElementVNode("div",am,[N.showTitle?(c.openBlock(),c.createElementBlock("h2",im,"结构渲染")):c.createCommentVNode("",!0),c.createElementVNode("div",nm,[r.value?(c.openBlock(),c.createBlock(Hd,{key:0,"upload-by-file":N.uploadByFile,cropper:m.value,icon:p.value,upload:T.value,mode:N.mode,icons:N.icons,r:h.value,element:r.value,selectedElement:_.value,hoveredElement:I.value,onSelectElement:y,onHoverElement:H,onContentUpdated:U,onUpdateText:X,onBlockAction:Ce,onAddIcon:Re},null,8,["upload-by-file","cropper","icon","upload","mode","icons","r","element","selectedElement","hoveredElement"])):c.createCommentVNode("",!0)])]),l.value=="design"?(c.openBlock(),c.createElementBlock("div",{key:2,class:"resizer",onMousedown:O[1]||(O[1]=M=>Et("structure"))},null,32)):c.createCommentVNode("",!0),l.value=="design"?(c.openBlock(),c.createElementBlock("div",{key:3,class:"resize-area",style:c.normalizeStyle({width:Ee.value+"px"})},[c.createElementVNode("div",sm,[N.showTitle?(c.openBlock(),c.createElementBlock("h2",rm,[O[3]||(O[3]=c.createTextVNode(" 节点属性 ")),c.createElementVNode("span",um,c.toDisplayString(Ee.value)+"px",1)])):c.createCommentVNode("",!0),c.createElementVNode("div",om,[_.value?(c.openBlock(),c.createBlock(gh,{key:0,element:_.value,onUpdateElement:z},null,8,["element"])):c.createCommentVNode("",!0)])])],4)):c.createCommentVNode("",!0),c.createVNode(yf,{ref_key:"cropperRef",ref:m,onOk:ke},null,512),c.createVNode(Vf,{icons:N.icons,ref_key:"iconRef",ref:p,onOk:Ie},null,8,["icons"]),c.createVNode(zf,{ref_key:"uploadRef",ref:T,multiple:!1,show:!1,beforeUpload:me,onChange:Y},{"upload-icon":c.withCtx(()=>O[4]||(O[4]=[c.createElementVNode("div",{class:"p-2"},"上传",-1)])),_:1},512)]))}}),[["__scopeId","data-v-d514a1de"]]),cm={install(e){e.component("Designer",Sr)}};Xe.Designer=Sr,Xe.default=cm,Object.defineProperties(Xe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
16
|
+
*/function Xs(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),a.push.apply(a,n)}return a}function Qs(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Xs(Object(a),!0).forEach(function(n){Ch(e,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Xs(Object(a)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))})}return e}function _h(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var n=a.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function js(e){var t=_h(e,"string");return typeof t=="symbol"?t:t+""}function Mn(e){"@babel/helpers - typeof";return Mn=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},Mn(e)}function Ah(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zs(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,js(n.key),n)}}function Nh(e,t,a){return t&&zs(e.prototype,t),a&&zs(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ch(e,t,a){return t=js(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Ks(e){return Ih(e)||Sh(e)||xh(e)||Oh()}function Ih(e){if(Array.isArray(e))return wn(e)}function Sh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xh(e,t){if(e){if(typeof e=="string")return wn(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 wn(e,t)}}function wn(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function Oh(){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 Ma=typeof window<"u"&&typeof window.document<"u",Ue=Ma?window:{},Pn=Ma&&Ue.document.documentElement?"ontouchstart"in Ue.document.documentElement:!1,vn=Ma?"PointerEvent"in Ue:!1,Z="cropper",Bn="all",Zs="crop",Js="move",er="zoom",dt="e",ht="w",It="s",et="n",zt="ne",Kt="nw",Zt="se",Jt="sw",Un="".concat(Z,"-crop"),tr="".concat(Z,"-disabled"),ge="".concat(Z,"-hidden"),ar="".concat(Z,"-hide"),Dh="".concat(Z,"-invisible"),wa="".concat(Z,"-modal"),Fn="".concat(Z,"-move"),ea="".concat(Z,"Action"),Pa="".concat(Z,"Preview"),Hn="crop",nr="move",ir="none",Vn="crop",Yn="cropend",qn="cropmove",Wn="cropstart",sr="dblclick",Lh=Pn?"touchstart":"mousedown",yh=Pn?"touchmove":"mousemove",Rh=Pn?"touchend touchcancel":"mouseup",rr=vn?"pointerdown":Lh,ur=vn?"pointermove":yh,or=vn?"pointerup pointercancel":Rh,cr="ready",lr="resize",dr="wheel",$n="zoom",hr="image/jpeg",kh=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Mh=/^data:/,wh=/^data:image\/jpeg;base64,/,Ph=/^img|canvas$/i,fr=200,mr=100,Er={viewMode:0,dragMode:Hn,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:fr,minContainerHeight:mr,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},vh='<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>',Bh=Number.isNaN||Ue.isNaN;function W(e){return typeof e=="number"&&!Bh(e)}var pr=function(t){return t>0&&t<1/0};function Gn(e){return typeof e>"u"}function ft(e){return Mn(e)==="object"&&e!==null}var Uh=Object.prototype.hasOwnProperty;function St(e){if(!ft(e))return!1;try{var t=e.constructor,a=t.prototype;return t&&a&&Uh.call(a,"isPrototypeOf")}catch{return!1}}function _e(e){return typeof e=="function"}var Fh=Array.prototype.slice;function Tr(e){return Array.from?Array.from(e):Fh.call(e)}function ne(e,t){return e&&_e(t)&&(Array.isArray(e)||W(e.length)?Tr(e).forEach(function(a,n){t.call(e,a,n,e)}):ft(e)&&Object.keys(e).forEach(function(a){t.call(e,e[a],a,e)})),e}var J=Object.assign||function(t){for(var a=arguments.length,n=new Array(a>1?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];return ft(t)&&n.length>0&&n.forEach(function(r){ft(r)&&Object.keys(r).forEach(function(u){t[u]=r[u]})}),t},Hh=/\.\d*(?:0|9){12}\d*$/;function xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Hh.test(e)?Math.round(e*t)/t:e}var Vh=/^width|height|left|top|marginLeft|marginTop$/;function tt(e,t){var a=e.style;ne(t,function(n,i){Vh.test(i)&&W(n)&&(n="".concat(n,"px")),a[i]=n})}function Yh(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function ce(e,t){if(t){if(W(e.length)){ne(e,function(n){ce(n,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 Fe(e,t){if(t){if(W(e.length)){ne(e,function(a){Fe(a,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function Ot(e,t,a){if(t){if(W(e.length)){ne(e,function(n){Ot(n,t,a)});return}a?ce(e,t):Fe(e,t)}}var qh=/([a-z\d])([A-Z])/g;function Xn(e){return e.replace(qh,"$1-$2").toLowerCase()}function Qn(e,t){return ft(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Xn(t)))}function ta(e,t,a){ft(a)?e[t]=a:e.dataset?e.dataset[t]=a:e.setAttribute("data-".concat(Xn(t)),a)}function Wh(e,t){if(ft(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(Xn(t)))}var br=/\s\s*/,gr=function(){var e=!1;if(Ma){var t=!1,a=function(){},n=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(r){t=r}});Ue.addEventListener("test",a,n),Ue.removeEventListener("test",a,n)}return e}();function ye(e,t,a){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=a;t.trim().split(br).forEach(function(r){if(!gr){var u=e.listeners;u&&u[r]&&u[r][a]&&(i=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,i,n)})}function De(e,t,a){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=a;t.trim().split(br).forEach(function(r){if(n.once&&!gr){var u=e.listeners,c=u===void 0?{}:u;i=function(){delete c[r][a],e.removeEventListener(r,i,n);for(var h=arguments.length,m=new Array(h),p=0;p<h;p++)m[p]=arguments[p];a.apply(e,m)},c[r]||(c[r]={}),c[r][a]&&e.removeEventListener(r,c[r][a],n),c[r][a]=i,e.listeners=c}e.addEventListener(r,i,n)})}function Dt(e,t,a){var n;return _e(Event)&&_e(CustomEvent)?n=new CustomEvent(t,{detail:a,bubbles:!0,cancelable:!0}):(n=document.createEvent("CustomEvent"),n.initCustomEvent(t,!0,!0,a)),e.dispatchEvent(n)}function _r(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var jn=Ue.location,$h=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Ar(e){var t=e.match($h);return t!==null&&(t[1]!==jn.protocol||t[2]!==jn.hostname||t[3]!==jn.port)}function Nr(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function aa(e){var t=e.rotate,a=e.scaleX,n=e.scaleY,i=e.translateX,r=e.translateY,u=[];W(i)&&i!==0&&u.push("translateX(".concat(i,"px)")),W(r)&&r!==0&&u.push("translateY(".concat(r,"px)")),W(t)&&t!==0&&u.push("rotate(".concat(t,"deg)")),W(a)&&a!==1&&u.push("scaleX(".concat(a,")")),W(n)&&n!==1&&u.push("scaleY(".concat(n,")"));var c=u.length?u.join(" "):"none";return{WebkitTransform:c,msTransform:c,transform:c}}function Gh(e){var t=Qs({},e),a=0;return ne(e,function(n,i){delete t[i],ne(t,function(r){var u=Math.abs(n.startX-r.startX),c=Math.abs(n.startY-r.startY),l=Math.abs(n.endX-r.endX),h=Math.abs(n.endY-r.endY),m=Math.sqrt(u*u+c*c),p=Math.sqrt(l*l+h*h),T=(p-m)/m;Math.abs(T)>Math.abs(a)&&(a=T)})}),a}function va(e,t){var a=e.pageX,n=e.pageY,i={endX:a,endY:n};return t?i:Qs({startX:a,startY:n},i)}function Xh(e){var t=0,a=0,n=0;return ne(e,function(i){var r=i.startX,u=i.startY;t+=r,a+=u,n+=1}),t/=n,a/=n,{pageX:t,pageY:a}}function at(e){var t=e.aspectRatio,a=e.height,n=e.width,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=pr(n),u=pr(a);if(r&&u){var c=a*t;i==="contain"&&c>n||i==="cover"&&c<n?a=n/t:n=a*t}else r?a=n/t:u&&(n=a*t);return{width:n,height:a}}function Qh(e){var t=e.width,a=e.height,n=e.degree;if(n=Math.abs(n)%180,n===90)return{width:a,height:t};var i=n%90*Math.PI/180,r=Math.sin(i),u=Math.cos(i),c=t*u+a*r,l=t*r+a*u;return n>90?{width:l,height:c}:{width:c,height:l}}function jh(e,t,a,n){var i=t.aspectRatio,r=t.naturalWidth,u=t.naturalHeight,c=t.rotate,l=c===void 0?0:c,h=t.scaleX,m=h===void 0?1:h,p=t.scaleY,T=p===void 0?1:p,_=a.aspectRatio,I=a.naturalWidth,L=a.naturalHeight,y=n.fillColor,V=y===void 0?"transparent":y,v=n.imageSmoothingEnabled,U=v===void 0?!0:v,z=n.imageSmoothingQuality,F=z===void 0?"low":z,A=n.maxWidth,B=A===void 0?1/0:A,Q=n.maxHeight,te=Q===void 0?1/0:Q,Ce=n.minWidth,Re=Ce===void 0?0:Ce,ke=n.minHeight,Ie=ke===void 0?0:ke,me=document.createElement("canvas"),D=me.getContext("2d"),M=at({aspectRatio:_,width:B,height:te}),ae=at({aspectRatio:_,width:Re,height:Ie},"cover"),Ee=Math.min(M.width,Math.max(ae.width,I)),Ae=Math.min(M.height,Math.max(ae.height,L)),Ge=at({aspectRatio:i,width:B,height:te}),mt=at({aspectRatio:i,width:Re,height:Ie},"cover"),Me=Math.min(Ge.width,Math.max(mt.width,r)),Et=Math.min(Ge.height,Math.max(mt.height,u)),Ba=[-Me/2,-Et/2,Me,Et];return me.width=xt(Ee),me.height=xt(Ae),D.fillStyle=V,D.fillRect(0,0,Ee,Ae),D.save(),D.translate(Ee/2,Ae/2),D.rotate(l*Math.PI/180),D.scale(m,T),D.imageSmoothingEnabled=U,D.imageSmoothingQuality=F,D.drawImage.apply(D,[e].concat(Ks(Ba.map(function(Ua){return Math.floor(xt(Ua))})))),D.restore(),me}var Cr=String.fromCharCode;function zh(e,t,a){var n="";a+=t;for(var i=t;i<a;i+=1)n+=Cr(e.getUint8(i));return n}var Kh=/^data:.*,/;function Zh(e){var t=e.replace(Kh,""),a=atob(t),n=new ArrayBuffer(a.length),i=new Uint8Array(n);return ne(i,function(r,u){i[u]=a.charCodeAt(u)}),n}function Jh(e,t){for(var a=[],n=8192,i=new Uint8Array(e);i.length>0;)a.push(Cr.apply(null,Tr(i.subarray(0,n)))),i=i.subarray(n);return"data:".concat(t,";base64,").concat(btoa(a.join("")))}function ef(e){var t=new DataView(e),a;try{var n,i,r;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var u=t.byteLength,c=2;c+1<u;){if(t.getUint8(c)===255&&t.getUint8(c+1)===225){i=c;break}c+=1}if(i){var l=i+4,h=i+10;if(zh(t,l,4)==="Exif"){var m=t.getUint16(h);if(n=m===18761,(n||m===19789)&&t.getUint16(h+2,n)===42){var p=t.getUint32(h+4,n);p>=8&&(r=h+p)}}}if(r){var T=t.getUint16(r,n),_,I;for(I=0;I<T;I+=1)if(_=r+I*12+2,t.getUint16(_,n)===274){_+=8,a=t.getUint16(_,n),t.setUint16(_,1,n);break}}}catch{a=1}return a}function tf(e){var t=0,a=1,n=1;switch(e){case 2:a=-1;break;case 3:t=-180;break;case 4:n=-1;break;case 5:t=90,n=-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:n}}var af={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,a=this.options,n=this.container,i=this.cropper,r=Number(a.minContainerWidth),u=Number(a.minContainerHeight);ce(i,ge),Fe(t,ge);var c={width:Math.max(n.offsetWidth,r>=0?r:fr),height:Math.max(n.offsetHeight,u>=0?u:mr)};this.containerData=c,tt(i,{width:c.width,height:c.height}),ce(t,ge),Fe(i,ge)},initCanvas:function(){var t=this.containerData,a=this.imageData,n=this.options.viewMode,i=Math.abs(a.rotate)%180===90,r=i?a.naturalHeight:a.naturalWidth,u=i?a.naturalWidth:a.naturalHeight,c=r/u,l=t.width,h=t.height;t.height*c>t.width?n===3?l=t.height*c:h=t.width/c:n===3?h=t.width/c:l=t.height*c;var m={aspectRatio:c,naturalWidth:r,naturalHeight:u,width:l,height:h};this.canvasData=m,this.limited=n===1||n===2,this.limitCanvas(!0,!0),m.width=Math.min(Math.max(m.width,m.minWidth),m.maxWidth),m.height=Math.min(Math.max(m.height,m.minHeight),m.maxHeight),m.left=(t.width-m.width)/2,m.top=(t.height-m.height)/2,m.oldLeft=m.left,m.oldTop=m.top,this.initialCanvasData=J({},m)},limitCanvas:function(t,a){var n=this.options,i=this.containerData,r=this.canvasData,u=this.cropBoxData,c=n.viewMode,l=r.aspectRatio,h=this.cropped&&u;if(t){var m=Number(n.minCanvasWidth)||0,p=Number(n.minCanvasHeight)||0;c>1?(m=Math.max(m,i.width),p=Math.max(p,i.height),c===3&&(p*l>m?m=p*l:p=m/l)):c>0&&(m?m=Math.max(m,h?u.width:0):p?p=Math.max(p,h?u.height:0):h&&(m=u.width,p=u.height,p*l>m?m=p*l:p=m/l));var T=at({aspectRatio:l,width:m,height:p});m=T.width,p=T.height,r.minWidth=m,r.minHeight=p,r.maxWidth=1/0,r.maxHeight=1/0}if(a)if(c>(h?0:1)){var _=i.width-r.width,I=i.height-r.height;r.minLeft=Math.min(0,_),r.minTop=Math.min(0,I),r.maxLeft=Math.max(0,_),r.maxTop=Math.max(0,I),h&&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,c===2&&(r.width>=i.width&&(r.minLeft=Math.min(0,_),r.maxLeft=Math.max(0,_)),r.height>=i.height&&(r.minTop=Math.min(0,I),r.maxTop=Math.max(0,I))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=i.width,r.maxTop=i.height},renderCanvas:function(t,a){var n=this.canvasData,i=this.imageData;if(a){var r=Qh({width:i.naturalWidth*Math.abs(i.scaleX||1),height:i.naturalHeight*Math.abs(i.scaleY||1),degree:i.rotate||0}),u=r.width,c=r.height,l=n.width*(u/n.naturalWidth),h=n.height*(c/n.naturalHeight);n.left-=(l-n.width)/2,n.top-=(h-n.height)/2,n.width=l,n.height=h,n.aspectRatio=u/c,n.naturalWidth=u,n.naturalHeight=c,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCanvas(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,tt(this.canvas,J({width:n.width,height:n.height},aa({translateX:n.left,translateY:n.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var a=this.canvasData,n=this.imageData,i=n.naturalWidth*(a.width/a.naturalWidth),r=n.naturalHeight*(a.height/a.naturalHeight);J(n,{width:i,height:r,left:(a.width-i)/2,top:(a.height-r)/2}),tt(this.image,J({width:n.width,height:n.height},aa(J({translateX:n.left,translateY:n.top},n)))),t&&this.output()},initCropBox:function(){var t=this.options,a=this.canvasData,n=t.aspectRatio||t.initialAspectRatio,i=Number(t.autoCropArea)||.8,r={width:a.width,height:a.height};n&&(a.height*n>a.width?r.height=r.width/n:r.width=r.height*n),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*i),r.height=Math.max(r.minHeight,r.height*i),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=J({},r)},limitCropBox:function(t,a){var n=this.options,i=this.containerData,r=this.canvasData,u=this.cropBoxData,c=this.limited,l=n.aspectRatio;if(t){var h=Number(n.minCropBoxWidth)||0,m=Number(n.minCropBoxHeight)||0,p=c?Math.min(i.width,r.width,r.width+r.left,i.width-r.left):i.width,T=c?Math.min(i.height,r.height,r.height+r.top,i.height-r.top):i.height;h=Math.min(h,i.width),m=Math.min(m,i.height),l&&(h&&m?m*l>h?m=h/l:h=m*l:h?m=h/l:m&&(h=m*l),T*l>p?T=p/l:p=T*l),u.minWidth=Math.min(h,p),u.minHeight=Math.min(m,T),u.maxWidth=p,u.maxHeight=T}a&&(c?(u.minLeft=Math.max(0,r.left),u.minTop=Math.max(0,r.top),u.maxLeft=Math.min(i.width,r.left+r.width)-u.width,u.maxTop=Math.min(i.height,r.top+r.height)-u.height):(u.minLeft=0,u.minTop=0,u.maxLeft=i.width-u.width,u.maxTop=i.height-u.height))},renderCropBox:function(){var t=this.options,a=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,t.movable&&t.cropBoxMovable&&ta(this.face,ea,n.width>=a.width&&n.height>=a.height?Js:Bn),tt(this.cropBox,J({width:n.width,height:n.height},aa({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Dt(this.element,Vn,this.getData())}},nf={initPreview:function(){var t=this.element,a=this.crossOrigin,n=this.options.preview,i=a?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",u=document.createElement("img");if(a&&(u.crossOrigin=a),u.src=i,u.alt=r,this.viewBox.appendChild(u),this.viewBoxImage=u,!!n){var c=n;typeof n=="string"?c=t.ownerDocument.querySelectorAll(n):n.querySelector&&(c=[n]),this.previews=c,ne(c,function(l){var h=document.createElement("img");ta(l,Pa,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),a&&(h.crossOrigin=a),h.src=i,h.alt=r,h.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(h)})}},resetPreview:function(){ne(this.previews,function(t){var a=Qn(t,Pa);tt(t,{width:a.width,height:a.height}),t.innerHTML=a.html,Wh(t,Pa)})},preview:function(){var t=this.imageData,a=this.canvasData,n=this.cropBoxData,i=n.width,r=n.height,u=t.width,c=t.height,l=n.left-a.left-t.left,h=n.top-a.top-t.top;!this.cropped||this.disabled||(tt(this.viewBoxImage,J({width:u,height:c},aa(J({translateX:-l,translateY:-h},t)))),ne(this.previews,function(m){var p=Qn(m,Pa),T=p.width,_=p.height,I=T,L=_,y=1;i&&(y=T/i,L=r*y),r&&L>_&&(y=_/r,I=i*y,L=_),tt(m,{width:I,height:L}),tt(m.getElementsByTagName("img")[0],J({width:u*y,height:c*y},aa(J({translateX:-l*y,translateY:-h*y},t))))}))}},sf={bind:function(){var t=this.element,a=this.options,n=this.cropper;_e(a.cropstart)&&De(t,Wn,a.cropstart),_e(a.cropmove)&&De(t,qn,a.cropmove),_e(a.cropend)&&De(t,Yn,a.cropend),_e(a.crop)&&De(t,Vn,a.crop),_e(a.zoom)&&De(t,$n,a.zoom),De(n,rr,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&De(n,dr,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&De(n,sr,this.onDblclick=this.dblclick.bind(this)),De(t.ownerDocument,ur,this.onCropMove=this.cropMove.bind(this)),De(t.ownerDocument,or,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&De(window,lr,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,n=this.cropper;_e(a.cropstart)&&ye(t,Wn,a.cropstart),_e(a.cropmove)&&ye(t,qn,a.cropmove),_e(a.cropend)&&ye(t,Yn,a.cropend),_e(a.crop)&&ye(t,Vn,a.crop),_e(a.zoom)&&ye(t,$n,a.zoom),ye(n,rr,this.onCropStart),a.zoomable&&a.zoomOnWheel&&ye(n,dr,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&ye(n,sr,this.onDblclick),ye(t.ownerDocument,ur,this.onCropMove),ye(t.ownerDocument,or,this.onCropEnd),a.responsive&&ye(window,lr,this.onResize)}},rf={resize:function(){if(!this.disabled){var t=this.options,a=this.container,n=this.containerData,i=a.offsetWidth/n.width,r=a.offsetHeight/n.height,u=Math.abs(i-1)>Math.abs(r-1)?i:r;if(u!==1){var c,l;t.restore&&(c=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(ne(c,function(h,m){c[m]=h*u})),this.setCropBoxData(ne(l,function(h,m){l[m]=h*u})))}}},dblclick:function(){this.disabled||this.options.dragMode===ir||this.setDragMode(Yh(this.dragBox,Un)?nr:Hn)},wheel:function(t){var a=this,n=Number(this.options.wheelZoomRatio)||.1,i=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),t.deltaY?i=t.deltaY>0?1:-1:t.wheelDelta?i=-t.wheelDelta/120:t.detail&&(i=t.detail>0?1:-1),this.zoom(-i*n,t)))},cropStart:function(t){var a=t.buttons,n=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(W(a)&&a!==1||W(n)&&n!==0||t.ctrlKey))){var i=this.options,r=this.pointers,u;t.changedTouches?ne(t.changedTouches,function(c){r[c.identifier]=va(c)}):r[t.pointerId||0]=va(t),Object.keys(r).length>1&&i.zoomable&&i.zoomOnTouch?u=er:u=Qn(t.target,ea),kh.test(u)&&Dt(this.element,Wn,{originalEvent:t,action:u})!==!1&&(t.preventDefault(),this.action=u,this.cropping=!1,u===Zs&&(this.cropping=!0,ce(this.dragBox,wa)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var n=this.pointers;t.preventDefault(),Dt(this.element,qn,{originalEvent:t,action:a})!==!1&&(t.changedTouches?ne(t.changedTouches,function(i){J(n[i.identifier]||{},va(i,!0))}):J(n[t.pointerId||0]||{},va(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,n=this.pointers;t.changedTouches?ne(t.changedTouches,function(i){delete n[i.identifier]}):delete n[t.pointerId||0],a&&(t.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,Ot(this.dragBox,wa,this.cropped&&this.options.modal)),Dt(this.element,Yn,{originalEvent:t,action:a}))}}},uf={change:function(t){var a=this.options,n=this.canvasData,i=this.containerData,r=this.cropBoxData,u=this.pointers,c=this.action,l=a.aspectRatio,h=r.left,m=r.top,p=r.width,T=r.height,_=h+p,I=m+T,L=0,y=0,V=i.width,v=i.height,U=!0,z;!l&&t.shiftKey&&(l=p&&T?p/T:1),this.limited&&(L=r.minLeft,y=r.minTop,V=L+Math.min(i.width,n.width,n.left+n.width),v=y+Math.min(i.height,n.height,n.top+n.height));var F=u[Object.keys(u)[0]],A={x:F.endX-F.startX,y:F.endY-F.startY},B=function(te){switch(te){case dt:_+A.x>V&&(A.x=V-_);break;case ht:h+A.x<L&&(A.x=L-h);break;case et:m+A.y<y&&(A.y=y-m);break;case It:I+A.y>v&&(A.y=v-I);break}};switch(c){case Bn:h+=A.x,m+=A.y;break;case dt:if(A.x>=0&&(_>=V||l&&(m<=y||I>=v))){U=!1;break}B(dt),p+=A.x,p<0&&(c=ht,p=-p,h-=p),l&&(T=p/l,m+=(r.height-T)/2);break;case et:if(A.y<=0&&(m<=y||l&&(h<=L||_>=V))){U=!1;break}B(et),T-=A.y,m+=A.y,T<0&&(c=It,T=-T,m-=T),l&&(p=T*l,h+=(r.width-p)/2);break;case ht:if(A.x<=0&&(h<=L||l&&(m<=y||I>=v))){U=!1;break}B(ht),p-=A.x,h+=A.x,p<0&&(c=dt,p=-p,h-=p),l&&(T=p/l,m+=(r.height-T)/2);break;case It:if(A.y>=0&&(I>=v||l&&(h<=L||_>=V))){U=!1;break}B(It),T+=A.y,T<0&&(c=et,T=-T,m-=T),l&&(p=T*l,h+=(r.width-p)/2);break;case zt:if(l){if(A.y<=0&&(m<=y||_>=V)){U=!1;break}B(et),T-=A.y,m+=A.y,p=T*l}else B(et),B(dt),A.x>=0?_<V?p+=A.x:A.y<=0&&m<=y&&(U=!1):p+=A.x,A.y<=0?m>y&&(T-=A.y,m+=A.y):(T-=A.y,m+=A.y);p<0&&T<0?(c=Jt,T=-T,p=-p,m-=T,h-=p):p<0?(c=Kt,p=-p,h-=p):T<0&&(c=Zt,T=-T,m-=T);break;case Kt:if(l){if(A.y<=0&&(m<=y||h<=L)){U=!1;break}B(et),T-=A.y,m+=A.y,p=T*l,h+=r.width-p}else B(et),B(ht),A.x<=0?h>L?(p-=A.x,h+=A.x):A.y<=0&&m<=y&&(U=!1):(p-=A.x,h+=A.x),A.y<=0?m>y&&(T-=A.y,m+=A.y):(T-=A.y,m+=A.y);p<0&&T<0?(c=Zt,T=-T,p=-p,m-=T,h-=p):p<0?(c=zt,p=-p,h-=p):T<0&&(c=Jt,T=-T,m-=T);break;case Jt:if(l){if(A.x<=0&&(h<=L||I>=v)){U=!1;break}B(ht),p-=A.x,h+=A.x,T=p/l}else B(It),B(ht),A.x<=0?h>L?(p-=A.x,h+=A.x):A.y>=0&&I>=v&&(U=!1):(p-=A.x,h+=A.x),A.y>=0?I<v&&(T+=A.y):T+=A.y;p<0&&T<0?(c=zt,T=-T,p=-p,m-=T,h-=p):p<0?(c=Zt,p=-p,h-=p):T<0&&(c=Kt,T=-T,m-=T);break;case Zt:if(l){if(A.x>=0&&(_>=V||I>=v)){U=!1;break}B(dt),p+=A.x,T=p/l}else B(It),B(dt),A.x>=0?_<V?p+=A.x:A.y>=0&&I>=v&&(U=!1):p+=A.x,A.y>=0?I<v&&(T+=A.y):T+=A.y;p<0&&T<0?(c=Kt,T=-T,p=-p,m-=T,h-=p):p<0?(c=Jt,p=-p,h-=p):T<0&&(c=zt,T=-T,m-=T);break;case Js:this.move(A.x,A.y),U=!1;break;case er:this.zoom(Gh(u),t),U=!1;break;case Zs:if(!A.x||!A.y){U=!1;break}z=_r(this.cropper),h=F.startX-z.left,m=F.startY-z.top,p=r.minWidth,T=r.minHeight,A.x>0?c=A.y>0?Zt:zt:A.x<0&&(h-=p,c=A.y>0?Jt:Kt),A.y<0&&(m-=T),this.cropped||(Fe(this.cropBox,ge),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}U&&(r.width=p,r.height=T,r.left=h,r.top=m,this.action=c,this.renderCropBox()),ne(u,function(Q){Q.startX=Q.endX,Q.startY=Q.endY})}},of={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&ce(this.dragBox,wa),Fe(this.cropBox,ge),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=J({},this.initialImageData),this.canvasData=J({},this.initialCanvasData),this.cropBoxData=J({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(J(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Fe(this.dragBox,wa),ce(this.cropBox,ge)),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,ne(this.previews,function(n){n.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,Fe(this.cropper,tr)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,ce(this.cropper,tr)),this},destroy:function(){var t=this.element;return t[Z]?(t[Z]=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,n=this.canvasData,i=n.left,r=n.top;return this.moveTo(Gn(t)?t:i+Number(t),Gn(a)?a:r+Number(a))},moveTo:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.canvasData,i=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(W(t)&&(n.left=t,i=!0),W(a)&&(n.top=a,i=!0),i&&this.renderCanvas(!0)),this},zoom:function(t,a){var n=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(n.width*t/n.naturalWidth,null,a)},zoomTo:function(t,a,n){var i=this.options,r=this.canvasData,u=r.width,c=r.height,l=r.naturalWidth,h=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&i.zoomable){var m=l*t,p=h*t;if(Dt(this.element,$n,{ratio:t,oldRatio:u/l,originalEvent:n})===!1)return this;if(n){var T=this.pointers,_=_r(this.cropper),I=T&&Object.keys(T).length?Xh(T):{pageX:n.pageX,pageY:n.pageY};r.left-=(m-u)*((I.pageX-_.left-r.left)/u),r.top-=(p-c)*((I.pageY-_.top-r.top)/c)}else St(a)&&W(a.x)&&W(a.y)?(r.left-=(m-u)*((a.x-r.left)/u),r.top-=(p-c)*((a.y-r.top)/c)):(r.left-=(m-u)/2,r.top-=(p-c)/2);r.width=m,r.height=p,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),W(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,W(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(W(a)?a:1,t)},scale:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.imageData,i=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(W(t)&&(n.scaleX=t,i=!0),W(a)&&(n.scaleY=a,i=!0),i&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,n=this.imageData,i=this.canvasData,r=this.cropBoxData,u;if(this.ready&&this.cropped){u={x:r.left-i.left,y:r.top-i.top,width:r.width,height:r.height};var c=n.width/n.naturalWidth;if(ne(u,function(m,p){u[p]=m/c}),t){var l=Math.round(u.y+u.height),h=Math.round(u.x+u.width);u.x=Math.round(u.x),u.y=Math.round(u.y),u.width=h-u.x,u.height=l-u.y}}else u={x:0,y:0,width:0,height:0};return a.rotatable&&(u.rotate=n.rotate||0),a.scalable&&(u.scaleX=n.scaleX||1,u.scaleY=n.scaleY||1),u},setData:function(t){var a=this.options,n=this.imageData,i=this.canvasData,r={};if(this.ready&&!this.disabled&&St(t)){var u=!1;a.rotatable&&W(t.rotate)&&t.rotate!==n.rotate&&(n.rotate=t.rotate,u=!0),a.scalable&&(W(t.scaleX)&&t.scaleX!==n.scaleX&&(n.scaleX=t.scaleX,u=!0),W(t.scaleY)&&t.scaleY!==n.scaleY&&(n.scaleY=t.scaleY,u=!0)),u&&this.renderCanvas(!0,!0);var c=n.width/n.naturalWidth;W(t.x)&&(r.left=t.x*c+i.left),W(t.y)&&(r.top=t.y*c+i.top),W(t.width)&&(r.width=t.width*c),W(t.height)&&(r.height=t.height*c),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?J({},this.containerData):{}},getImageData:function(){return this.sized?J({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&ne(["left","top","width","height","naturalWidth","naturalHeight"],function(n){a[n]=t[n]}),a},setCanvasData:function(t){var a=this.canvasData,n=a.aspectRatio;return this.ready&&!this.disabled&&St(t)&&(W(t.left)&&(a.left=t.left),W(t.top)&&(a.top=t.top),W(t.width)?(a.width=t.width,a.height=t.width/n):W(t.height)&&(a.height=t.height,a.width=t.height*n),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,n=this.options.aspectRatio,i,r;return this.ready&&this.cropped&&!this.disabled&&St(t)&&(W(t.left)&&(a.left=t.left),W(t.top)&&(a.top=t.top),W(t.width)&&t.width!==a.width&&(i=!0,a.width=t.width),W(t.height)&&t.height!==a.height&&(r=!0,a.height=t.height),n&&(i?a.height=a.width/n:r&&(a.width=a.height*n)),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,n=jh(this.image,this.imageData,a,t);if(!this.cropped)return n;var i=this.getData(t.rounded),r=i.x,u=i.y,c=i.width,l=i.height,h=n.width/Math.floor(a.naturalWidth);h!==1&&(r*=h,u*=h,c*=h,l*=h);var m=c/l,p=at({aspectRatio:m,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),T=at({aspectRatio:m,width:t.minWidth||0,height:t.minHeight||0},"cover"),_=at({aspectRatio:m,width:t.width||(h!==1?n.width:c),height:t.height||(h!==1?n.height:l)}),I=_.width,L=_.height;I=Math.min(p.width,Math.max(T.width,I)),L=Math.min(p.height,Math.max(T.height,L));var y=document.createElement("canvas"),V=y.getContext("2d");y.width=xt(I),y.height=xt(L),V.fillStyle=t.fillColor||"transparent",V.fillRect(0,0,I,L);var v=t.imageSmoothingEnabled,U=v===void 0?!0:v,z=t.imageSmoothingQuality;V.imageSmoothingEnabled=U,z&&(V.imageSmoothingQuality=z);var F=n.width,A=n.height,B=r,Q=u,te,Ce,Re,ke,Ie,me;B<=-c||B>F?(B=0,te=0,Re=0,Ie=0):B<=0?(Re=-B,B=0,te=Math.min(F,c+B),Ie=te):B<=F&&(Re=0,te=Math.min(c,F-B),Ie=te),te<=0||Q<=-l||Q>A?(Q=0,Ce=0,ke=0,me=0):Q<=0?(ke=-Q,Q=0,Ce=Math.min(A,l+Q),me=Ce):Q<=A&&(ke=0,Ce=Math.min(l,A-Q),me=Ce);var D=[B,Q,te,Ce];if(Ie>0&&me>0){var M=I/c;D.push(Re*M,ke*M,Ie*M,me*M)}return V.drawImage.apply(V,[n].concat(Ks(D.map(function(ae){return Math.floor(xt(ae))})))),y},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!Gn(t)&&(a.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var a=this.options,n=this.dragBox,i=this.face;if(this.ready&&!this.disabled){var r=t===Hn,u=a.movable&&t===nr;t=r||u?t:ir,a.dragMode=t,ta(n,ea,t),Ot(n,Un,r),Ot(n,Fn,u),a.cropBoxMovable||(ta(i,ea,t),Ot(i,Un,r),Ot(i,Fn,u))}return this}},cf=Ue.Cropper,Ir=function(){function e(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Ah(this,e),!t||!Ph.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=J({},Er,St(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 Nh(e,[{key:"init",value:function(){var a=this.element,n=a.tagName.toLowerCase(),i;if(!a[Z]){if(a[Z]=this,n==="img"){if(this.isImg=!0,i=a.getAttribute("src")||"",this.originalUrl=i,!i)return;i=a.src}else n==="canvas"&&window.HTMLCanvasElement&&(i=a.toDataURL());this.load(i)}}},{key:"load",value:function(a){var n=this;if(a){this.url=a,this.imageData={};var i=this.element,r=this.options;if(!r.rotatable&&!r.scalable&&(r.checkOrientation=!1),!r.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Mh.test(a)){wh.test(a)?this.read(Zh(a)):this.clone();return}var u=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=u,u.onabort=c,u.onerror=c,u.ontimeout=c,u.onprogress=function(){u.getResponseHeader("content-type")!==hr&&u.abort()},u.onload=function(){n.read(u.response)},u.onloadend=function(){n.reloading=!1,n.xhr=null},r.checkCrossOrigin&&Ar(a)&&i.crossOrigin&&(a=Nr(a)),u.open("GET",a,!0),u.responseType="arraybuffer",u.withCredentials=i.crossOrigin==="use-credentials",u.send()}}},{key:"read",value:function(a){var n=this.options,i=this.imageData,r=ef(a),u=0,c=1,l=1;if(r>1){this.url=Jh(a,hr);var h=tf(r);u=h.rotate,c=h.scaleX,l=h.scaleY}n.rotatable&&(i.rotate=u),n.scalable&&(i.scaleX=c,i.scaleY=l),this.clone()}},{key:"clone",value:function(){var a=this.element,n=this.url,i=a.crossOrigin,r=n;this.options.checkCrossOrigin&&Ar(n)&&(i||(i="anonymous"),r=Nr(n)),this.crossOrigin=i,this.crossOriginUrl=r;var u=document.createElement("img");i&&(u.crossOrigin=i),u.src=r||n,u.alt=a.alt||"The image to crop",this.image=u,u.onload=this.start.bind(this),u.onerror=this.stop.bind(this),ce(u,ar),a.parentNode.insertBefore(u,a.nextSibling)}},{key:"start",value:function(){var a=this,n=this.image;n.onload=null,n.onerror=null,this.sizing=!0;var i=Ue.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Ue.navigator.userAgent),r=function(h,m){J(a.imageData,{naturalWidth:h,naturalHeight:m,aspectRatio:h/m}),a.initialImageData=J({},a.imageData),a.sizing=!1,a.sized=!0,a.build()};if(n.naturalWidth&&!i){r(n.naturalWidth,n.naturalHeight);return}var u=document.createElement("img"),c=document.body||document.documentElement;this.sizingImage=u,u.onload=function(){r(u.width,u.height),i||c.removeChild(u)},u.src=n.src,i||(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;",c.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,n=this.options,i=this.image,r=a.parentNode,u=document.createElement("div");u.innerHTML=vh;var c=u.querySelector(".".concat(Z,"-container")),l=c.querySelector(".".concat(Z,"-canvas")),h=c.querySelector(".".concat(Z,"-drag-box")),m=c.querySelector(".".concat(Z,"-crop-box")),p=m.querySelector(".".concat(Z,"-face"));this.container=r,this.cropper=c,this.canvas=l,this.dragBox=h,this.cropBox=m,this.viewBox=c.querySelector(".".concat(Z,"-view-box")),this.face=p,l.appendChild(i),ce(a,ge),r.insertBefore(c,a.nextSibling),Fe(i,ar),this.initPreview(),this.bind(),n.initialAspectRatio=Math.max(0,n.initialAspectRatio)||NaN,n.aspectRatio=Math.max(0,n.aspectRatio)||NaN,n.viewMode=Math.max(0,Math.min(3,Math.round(n.viewMode)))||0,ce(m,ge),n.guides||ce(m.getElementsByClassName("".concat(Z,"-dashed")),ge),n.center||ce(m.getElementsByClassName("".concat(Z,"-center")),ge),n.background&&ce(c,"".concat(Z,"-bg")),n.highlight||ce(p,Dh),n.cropBoxMovable&&(ce(p,Fn),ta(p,ea,Bn)),n.cropBoxResizable||(ce(m.getElementsByClassName("".concat(Z,"-line")),ge),ce(m.getElementsByClassName("".concat(Z,"-point")),ge)),this.render(),this.ready=!0,this.setDragMode(n.dragMode),n.autoCrop&&this.crop(),this.setData(n.data),_e(n.ready)&&De(a,cr,n.ready,{once:!0}),Dt(a,cr)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),Fe(this.element,ge)}}},{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=cf,e}},{key:"setDefaults",value:function(a){J(Er,St(a)&&a)}}])}();J(Ir.prototype,af,nf,sf,rf,uf,of);function lf(e,t){const a=e.split(",")||[],n=a[0].match(/:(.*?);/)[1],i=a[1]&&atob(a[1]);let r=i&&i.length;const u=new Uint8Array(r);for(;r--;)u[r]=i==null?void 0:i.charCodeAt(r);return new File([u],t,{type:n})}const df={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"},hf={class:"w-[700px] flex flex-col bg-white rounded pb-8"},ff={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},mf={class:"flex flex-col h-full"},Ef={class:"flex flex-row justify-center items-start flex-1"},pf={class:"flex flex-col items-start flex-1"},Tf={class:"flex flex-col w-full px-6 py-4"},bf={class:"flex flex-col w-full"},gf={class:"flex flex-row items-center"},_f={class:"relative bg-[#474AFF] text-white rounded p-3"},Af={class:"flex flex-row items-start justify-between mt-3"},Nf={class:"flex flex-col"},Cf={class:"flex flex-col justify-center items-center border w-[300px] h-[300px]"},If={key:0,class:"w-full text-center"},Sf=["src"],xf={class:"flex flex-col items-center",style:{width:"300px",height:"300px"}},Of={class:"text-[#999] mt-05 flex justify-center mt-4"},Df={class:"w-full flex justify-end space-x-5 mt-5 px-6"},Lf=["loading"],yf=o.defineComponent({__name:"GpCropper",emits:["cancel","ok"],setup(e,{expose:t,emit:a}){const n=a,i=o.ref({coverUrl:"",inputValue:"",uploadType:2,videoHost:"",videoUrl:""}),r=o.ref(),u=o.ref({autoCrop:!0,autoCropArea:1,background:!0,center:!0,cropBoxResizable:!0,dragMode:"move",preview:".before",toggleDragModeOnDblclick:!0,viewMode:1,zoomOnWheel:!0}),c=o.ref(!1),l=o.ref("image/jpeg"),h=o.ref({afterImg:"",image:null,myCropper:null}),m=F=>{const A=F.target.files[0];A&&(A.name&&(i.value.inputValue=A.name),p(A))};async function p(F){if(!F)return;await z();const A=URL.createObjectURL(F);h.value.image=A,h.value.image&&T(),l.value=F.type}function T(){const F=document.querySelector("#imgId");F&&F.addEventListener("load",()=>{U(),h.value.myCropper=new Ir(F,u.value)})}const _=o.ref(!1),I=o.ref();function L(F,A,B,Q){I.value=Q,r.value=F,F&&F.aspectRatio&&(u.value.aspectRatio=F.aspectRatio),B&&(i.value.inputValue=B),_.value=!0,A&&p(A)}function y(){_.value=!1}const V=()=>{var Q,te;if(!h.value.myCropper)return;c.value=!0;var A=h.value.myCropper.getCroppedCanvas({height:(Q=r.value)==null?void 0:Q.height,imageSmoothingQuality:"high",width:(te=r.value)==null?void 0:te.width}).toDataURL(l.value);h.value.afterImg=A;const B=lf(h.value.afterImg,i.value.inputValue);n("ok",{file:B,element:I.value}),c.value=!1,z(),U(),y()};function v(){z(),U(),y(),n("cancel")}function U(){h.value.myCropper&&h.value.myCropper.destroy()}function z(){h.value.image=""}return t({handleCloseCropper:y,handleOpenCropper:L}),(F,A)=>{var B,Q,te;return _.value?(o.openBlock(),o.createElementBlock("div",df,[o.createElementVNode("div",hf,[o.createElementVNode("div",ff,[A[1]||(A[1]=o.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"图片裁剪",-1)),o.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:o.withModifiers(v,["stop"])})]),o.createElementVNode("div",mf,[o.createElementVNode("div",Ef,[o.createElementVNode("div",pf,[o.createElementVNode("div",Tf,[o.createElementVNode("div",bf,[o.createElementVNode("div",gf,[o.createElementVNode("div",_f,[o.createElementVNode("input",{type:"file",accept:"image/*",onClick:A[0]||(A[0]=o.withModifiers(()=>{},["stop"])),contenteditable:"false",ref:"fileInput",onChange:m,class:"absolute top-0 left-0 w-[110px] h-[40px] opacity-0 cursor-pointer"},null,544),A[2]||(A[2]=o.createElementVNode("span",{id:"uploadHandler",class:"cursor-pointer"}," 选择/更换图片 ",-1))]),A[3]||(A[3]=o.createElementVNode("span",{class:"text-sm text-[#999] ml-3"},"滚动鼠标放大或缩小图片",-1))]),o.createElementVNode("div",Af,[o.createElementVNode("div",Nf,[o.createElementVNode("div",Cf,[h.value.image?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",If," 请上传图片 ")),o.createElementVNode("img",{id:"imgId",src:h.value.image,style:{width:"300px"}},null,8,Sf)])]),o.createElementVNode("div",xf,[A[4]||(A[4]=o.createElementVNode("div",{class:"before w-[270px] h-[200px] pr-[70px] border"},null,-1)),o.createElementVNode("div",Of," 预览画像 "+o.toDisplayString(((B=r.value)==null?void 0:B.width)||"")+" "+o.toDisplayString((Q=r.value)!=null&&Q.width?"x":"")+" "+o.toDisplayString(((te=r.value)==null?void 0:te.height)||""),1)])])])])])]),o.createElementVNode("div",Df,[o.createElementVNode("span",{loading:c.value,class:"!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",type:"primary",onClick:V}," 确认 ",8,Lf),o.createElementVNode("span",{class:"!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",onClick:v},"取消")])])])])):o.createCommentVNode("",!0)}}}),Rf=o.defineComponent({name:"GpModal",props:{visible:{type:Boolean,required:!0},title:{type:String,default:""},okText:{type:String,default:"确定"},cancelText:{type:String,default:"取消"},showOkButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0}},emits:["update:visible","ok","cancel"],setup(e,{emit:t}){const{visible:a,okText:n,cancelText:i,showCloseButton:r}=o.toRefs(e);return{visible:a,okText:n,cancelText:i,showCloseButton:r,onClose:()=>{t("cancel"),t("update:visible",!1)},onOk:()=>{t("ok"),t("update:visible",!1)},onCancel:()=>{t("cancel"),t("update:visible",!1)}}}}),kf={class:"bg-white rounded-lg shadow-xl w-ful"},Mf={class:"p-4 border-b border-gray-200 relative flex items-center justify-between"},wf={key:0,class:"text-lg font-semibold"},Pf={class:"p-4"},vf={key:0,class:"p-4 border-t border-gray-200 flex justify-end space-x-2"};function Bf(e,t,a,n,i,r){return e.visible?(o.openBlock(),o.createElementBlock("div",{key:0,class:"fixed inset-0 z-[99999] flex items-center justify-center bg-gray-900 bg-opacity-50",onClick:t[3]||(t[3]=o.withModifiers((...u)=>e.onClose&&e.onClose(...u),["self"]))},[o.createElementVNode("div",kf,[o.createElementVNode("div",Mf,[e.title?(o.openBlock(),o.createElementBlock("h3",wf,o.toDisplayString(e.title),1)):o.createCommentVNode("",!0),o.renderSlot(e.$slots,"header"),e.showCloseButton?(o.openBlock(),o.createElementBlock("button",{key:1,class:"text-gray-400 hover:text-gray-600",onClick:t[0]||(t[0]=(...u)=>e.onClose&&e.onClose(...u)),"aria-label":"Close"},t[4]||(t[4]=[o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))):o.createCommentVNode("",!0)]),o.createElementVNode("div",Pf,[o.renderSlot(e.$slots,"default")]),e.showCancelButton||e.showOkButton?(o.openBlock(),o.createElementBlock("div",vf,[o.renderSlot(e.$slots,"footer",{},()=>[e.showCancelButton?(o.openBlock(),o.createElementBlock("button",{key:0,class:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded hover:bg-gray-200",onClick:t[1]||(t[1]=(...u)=>e.onCancel&&e.onCancel(...u))},o.toDisplayString(e.cancelText),1)):o.createCommentVNode("",!0),e.showOkButton?(o.openBlock(),o.createElementBlock("button",{key:1,class:"px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded hover:bg-blue-700",onClick:t[2]||(t[2]=(...u)=>e.onOk&&e.onOk(...u))},o.toDisplayString(e.okText),1)):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)}const Uf=lt(Rf,[["render",Bf]]),Ff={class:"p-4 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]"},Hf=["onClick"],Vf=o.defineComponent({__name:"GpIcon",props:{icons:{type:Array,default:()=>[]}},emits:["ok"],setup(e,{expose:t,emit:a}){const n=e,i=a,r=o.ref(n.icons||[]);o.watch(()=>n.icons,p=>{r.value=p||[]},{immediate:!0});const u=o.ref(!1),c=o.ref();function l(p){u.value=!0,c.value=p}function h(p){m(),i("ok",{icon:p,element:c.value})}function m(){u.value=!1}return t({openModal:l,closeModal:m}),(p,T)=>(o.openBlock(),o.createBlock(Uf,{visible:u.value,"onUpdate:visible":T[0]||(T[0]=_=>u.value=_),title:"选择图标",onOk:m,onCancel:m,showCancelButton:!1,showOkButton:!1},{default:o.withCtx(()=>[o.createElementVNode("div",Ff,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,_=>(o.openBlock(),o.createElementBlock("span",{key:_,onClick:o.withModifiers(I=>h(_),["stop"]),style:{position:"unset",color:"unset",top:"unset",left:"unset",right:"unset",transform:"unset","font-size":"unset"},class:o.normalizeClass(["w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",`iconfont icon-${_} text-4xl overflow-hidden flex justify-center items-center`])},null,10,Hf))),128))])]),_:1},8,["visible"]))}}),Yf=o.defineComponent({name:"GpImageUpload",props:{accept:{type:String,default:"image/*"},multiple:{type:Boolean,default:!1},maxCount:{type:Number,default:1/0},beforeUpload:Function,onChange:Function,showList:{type:Boolean,default:!1},show:{type:Boolean,default:!0}},setup(e,{emit:t}){const a=o.ref(null),n=o.ref([]),i=o.ref(),r=o.ref(e.show);o.watch(()=>e.show,m=>{r.value=m},{immediate:!0});const u=()=>{var m;(m=a.value)==null||m.click()},c=async m=>{var I;const T=m.target.files;if(!T)return;const _=[];for(let L=0;L<T.length;L++){const y=T[L];if(e.beforeUpload&&await e.beforeUpload(y)===!1)continue;const V=`${Date.now()}-${y.name}`,v=URL.createObjectURL(y),U=document.createElement("img");U.src=v,document.body.appendChild(U),await new Promise(A=>{U.onload=A});const z=U.width,F=U.height;document.body.removeChild(U),_.push({uid:V,name:y.name,status:"uploading",thumbUrl:v,file:y,width:z,height:F})}e.maxCount&&n.value.length+_.length>e.maxCount&&_.splice(e.maxCount-n.value.length),e.multiple?n.value=[...n.value,..._]:n.value=_.slice(0,1),(I=e.onChange)==null||I.call(e,n.value,i.value),t("update:fileList",n.value),a.value&&(a.value.value="")},l=m=>{var p;n.value=n.value.filter(T=>T.uid!==m),(p=e.onChange)==null||p.call(e,n.value,i.value)};function h(m){i.value=m,u()}return{isShow:r,openModal:h,inputRef:a,fileList:n,triggerInput:u,handleChange:c,removeFile:l}}}),qf={class:"upload-wrapper"},Wf=["accept","multiple"],$f={key:1,class:"file-list mt-4"},Gf={class:"flex items-center space-x-4"},Xf=["src"],Qf=["onClick"];function jf(e,t,a,n,i,r){return o.openBlock(),o.createElementBlock("div",qf,[e.isShow?(o.openBlock(),o.createElementBlock("div",{key:0,class:"",onClick:t[0]||(t[0]=(...u)=>e.triggerInput&&e.triggerInput(...u))},[o.renderSlot(e.$slots,"upload-icon",{},()=>[t[2]||(t[2]=o.createElementVNode("div",{class:"upload-area border-dashed border-2 p-6 rounded cursor-pointer hover:border-blue-500"},[o.createElementVNode("div",{class:"text-gray-400 text-lg text-center"}," 点击或拖拽上传图片 ")],-1))],!0)])):o.createCommentVNode("",!0),o.createElementVNode("input",{type:"file",ref:"inputRef",class:"hidden",accept:e.accept,multiple:e.multiple,onChange:t[1]||(t[1]=(...u)=>e.handleChange&&e.handleChange(...u))},null,40,Wf),e.showList?(o.openBlock(),o.createElementBlock("div",$f,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.fileList,u=>(o.openBlock(),o.createElementBlock("div",{key:u.uid,class:"file-item flex items-center justify-between p-2 border rounded mb-2"},[o.createElementVNode("div",Gf,[u.thumbUrl?(o.openBlock(),o.createElementBlock("img",{key:0,src:u.thumbUrl,alt:"preview",class:"w-12 h-12 object-cover rounded"},null,8,Xf)):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(u.name),1)]),o.createElementVNode("div",null,[o.createElementVNode("button",{onClick:c=>e.removeFile(u.uid),class:"text-red-500 hover:underline"}," 删除 ",8,Qf)])]))),128))])):o.createCommentVNode("",!0)])}const zf=lt(Yf,[["render",jf],["__scopeId","data-v-08babff9"]]),Kf={class:"flex gp-dsigner"},Zf={key:0,class:"text-lg font-bold border-b p-2"},Jf={class:"text-sm font-thin text-gray-500"},em=["innerHTML"],tm=["innerHTML"],am={class:"flex-1"},nm={key:0,class:"text-lg font-bold border-b p-2"},im={class:"p-2"},sm={class:"sticky top-0"},rm={key:0,class:"text-lg font-bold border-b p-2"},um={class:"text-sm font-thin text-gray-500"},om={class:"p-2"},Sr=lt(o.defineComponent({__name:"Designer",props:{mode:{default:"design"},template:{},css:{},previewWidth:{default:375},uploadByFile:{},icons:{},rules:{},preview:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0}},emits:["update:modelValue","update:element"],setup(e,{emit:t}){const a=e,n=t,i=o.ref(a.template),r=o.ref();let u=$s("",{},!1);const c=o.ref("");o.watch(()=>a.template,N=>{i.value=N},{immediate:!0}),o.watch(()=>i.value,N=>{N&&(r.value=A(N))},{immediate:!0}),o.watch(()=>a.css,N=>{N.forEach(O=>{if(document.querySelector(`link[href="${O}"]`))return;const w=document.createElement("link");w.rel="stylesheet",w.href=O,document.head.appendChild(w)})},{immediate:!0});const l=o.ref(a.mode);o.watch(()=>r.value,N=>{N&&n("update:element",N)},{immediate:!0});const h=o.ref("");o.watch(()=>c.value,N=>{n("update:modelValue",N)},{immediate:!0});const m=o.ref(),p=o.ref(),T=o.ref(),_=o.ref(),I=o.ref(),L=o.ref("");function y(N){_.value=N}function V(N,O=""){if(O){const w=v(r.value,O);w?I.value=w:I.value=N}else I.value=N}function v(N,O){if(N.xpath===O)return N;if(N.children&&N.children.length)for(const w of N.children){const H=v(w,O);if(H)return H}}function U(N,O){var w,H;return N.tag===O.tag&&((w=N.children)==null?void 0:w.length)===((H=O.children)==null?void 0:H.length)}function z(N){var w,H,se,Se,He,fe,de,Ve,na,zn;if(_.value.xpath==N.xpath){if(_.value){if(N.type===X.Block){var O=!0;const Ye=v(r.value,_.value.parentxpath||"");if(Ye&&Ye.children&&Ye.children.forEach(we=>{if(we.tag!=_.value.tag||!U(we,_.value)){O=!1;return}}),!O){q.error("同级结构不一致,错误配置!");return}}if(_.value.rule=N.rule,_.value.type=N.type,(w=N.rule)!=null&&w.isThemeColor?(N.type===1&&((!N.attrs.class||N.attrs.class&&(!((H=N.attrs.class)!=null&&H.includes("theme_text"))||!((se=N.attrs.class)!=null&&se.includes(" theme_text"))))&&(N.attrs.class+=" theme_text"),(Se=N.attrs.class)!=null&&Se.includes("theme_bg")&&(N.attrs.class=N.attrs.class.replace("theme_bg",""))),N.type===6&&(!((He=N.attrs.class)!=null&&He.includes("theme_bg"))&&!((fe=N.attrs.class)!=null&&fe.includes(" theme_bg"))&&(N.attrs.class+=" theme_bg"),(de=N.attrs.class)!=null&&de.includes("theme_text")&&(N.attrs.class=N.attrs.class.replace("theme_text","")))):(N.type===1&&(Ve=N.attrs.class)!=null&&Ve.includes("theme_text")&&(N.attrs.class=N.attrs.class.replace("theme_text","")),N.type===6&&(na=N.attrs.class)!=null&&na.includes("theme_bg")&&(N.attrs.class=N.attrs.class.replace("theme_bg",""))),_.value.type===X.Block){const Ye=v(r.value,_.value.parentxpath||"");Ye&&Ye.children&&(Ye.children.forEach(we=>{if(we.tag!=_.value.tag||!U(we,_.value)){q.error("同级结构不一致,无法配置为块类型");return}}),Ye.children.forEach(we=>{var xr;we.tag===_.value.tag&&(we.rule=N.rule,we.type=N.type,(xr=we.attrs.class)!=null&&xr.includes(" mb40 relative")||(we.attrs.class+=" mb40 relative"))}))}else(zn=_.value.attrs.class)!=null&&zn.includes(" mb40 relative")&&(_.value.attrs.class=_.value.attrs.class.replace(" mb40 relative"," "))}h.value=new Date().getTime().toString(),q.success("保存成功")}}function F(N){c.value=N}function A(N){u=$s(N);const O=u("body").children().toArray().map(w=>B(u(w)));return c.value=u("body").html()||"",O[0]}function B(N,O=""){var He;function w(fe){if(!fe||!fe[0])return"";const de=[];let Ve=fe;for(;Ve.length&&Ve[0].tagName!=="html";){const na=Ve[0].tagName,Ye=Ve.parent().children(na).index(Ve)+1;de.unshift(`${na}[${Ye}]`),Ve=Ve.parent()}return"/html/"+de.join("/")}const H=w(N).replace("/html/body[1]",""),se=N.children().toArray().map(fe=>B(u(fe),H)),Se=(He=a.rules)==null?void 0:He.find(fe=>fe.xpath===H);return{tag:N[0].tagName,text:N.contents().not(N.children()).text().trim(),attrs:N[0].attribs,children:se,xpath:H,parentxpath:O,type:(Se==null?void 0:Se.type)||X.None,rule:(Se==null?void 0:Se.rule)||{}}}function Q(N){console.log("更新子节点的文本",N);const O=v(r.value,N.element.xpath);if(O){const w=o.toRaw(O);w.editText=N.newText}}function te(N,O=""){function w(H,se){var fe;const He=(se?((fe=v(r.value,se))==null?void 0:fe.children)||[]:[r.value]).filter(de=>de.tag===H.tag).indexOf(H)+1;return`${se}/${H.tag}[${He}]`}N.xpath=w(N,O),N.parentxpath=O,(N.children||[]).forEach(H=>te(H,N.xpath))}function Ce({action:N,element:O,newBlock:w}){const H=v(r.value,O.parentxpath||"");if(!H||!H.children)return;const se=H.children.findIndex(de=>de===O);if(se===-1){q.error("未找到元素");return}const Se=H.children.length,{minBlock:He,maxBlock:fe}=O.rule;if((N==="add"||N==="copy")&&Se>=(fe||1/0)){L.value=`无法添加更多块。最大块数量为 ${fe}`,q.error(L.value);return}switch(N){case"add":if(w){const de={...w,xpath:"",children:JSON.parse(JSON.stringify(w.children))};H.children.splice(se+1,0,de),q.success("添加成功")}break;case"copy":if(w){const de={...w,xpath:"",children:JSON.parse(JSON.stringify(w.children))};H.children.splice(se+1,0,de),q.success("复制成功")}break;case"moveUp":if(se>0){const[de]=H.children.splice(se,1);H.children.splice(se-1,0,de),q.success("前移成功")}else q.error("已经是第一个块,无法前移");break;case"moveDown":if(se<H.children.length-1){const[de]=H.children.splice(se,1);H.children.splice(se+1,0,de),q.success("后移成功")}else q.error("已经是最后一个块,无法后移");break;case"delete":if(Se<=(He||0)){L.value=`无法删除更多块。最小块数量为 ${He}`,q.error(L.value);return}H.children.splice(se,1),q.success("删除成功");break}L.value="",te(r.value)}function Re(N,O){let w=O.attrs.class.replace(/icon-\S+/g,`icon-${N}`);O.attrs.class=w}function ke(N){const O=N.file,w=v(r.value,N.element.xpath);if(a.uploadByFile)a.uploadByFile(O).then(H=>{H.success&&(w.attrs.src=H.file.url,h.value=new Date().getTime().toString())});else{w.attrs.alt=O.name;const H=URL.createObjectURL(O);w.attrs.src=H,h.value=new Date().getTime().toString()}}function Ie(N){const{icon:O}=N,w=v(r.value,N.element.xpath);let H=w.attrs.class.replace(/icon-\S+/g,`icon-${O}`);w.attrs.class=H,h.value=new Date().getTime().toString()}const me=N=>N.type.startsWith("image/")?!0:(q.error("只能上传图片文件"),!1),D=o.ref({});function M(N,O){if(!N||N.length===0)return;const w=N[0];if(O.rule&&(O.rule.minImageWidth||O.rule.maxImageHeight)){if(O.rule.minImageWidth&&w.width<O.rule.minImageWidth){q.error(`图片宽度不能小于 ${O.rule.minImageWidth}px`);return}if(O.rule.maxImageHeight&&w.height<O.rule.maxImageHeight){q.error(`图片高度不能小于 ${O.rule.maxImageHeight}px`);return}}O.rule.minImageWidth&&O.rule.maxImageHeight?(D.value.width=O.rule.minImageWidth,D.value.height=O.rule.maxImageHeight,D.value.aspectRatio=O.rule.minImageWidth/O.rule.maxImageHeight):D.value={},w&&(O.rule.crop?(w.thumbUrl,m.value.handleOpenCropper(D.value,w.file,w.name,O)):a.uploadByFile?a.uploadByFile(w.file).then(H=>{H.success&&(O.attrs.src=H.file.url,h.value=new Date().getTime().toString())}):(O.attrs.src=w.thumbUrl,h.value=new Date().getTime().toString()))}const ae=o.ref(a.previewWidth),Ee=o.ref(375);let Ae=o.ref(!1),Ge=o.ref(""),mt=0,Me=0;function Et(N){Ge.value=N,Ae.value=!0,mt=event.clientX,N==="preview"?Me=ae.value:N==="structure"&&(Me=Ee.value),window.addEventListener("mousemove",Ba),window.addEventListener("mouseup",Ua)}function Ba(N){if(!Ae.value)return;const O=N.clientX-mt;Ge.value==="preview"?ae.value=Math.max(200,Me+O):Ge.value==="structure"&&(Ee.value=Math.max(200,Me-O))}function Ua(){Ae.value=!1,Ge.value="",window.removeEventListener("mousemove",Ba),window.removeEventListener("mouseup",Ua)}return(N,O)=>(o.openBlock(),o.createElementBlock("div",Kf,[N.preview?(o.openBlock(),o.createElementBlock("div",{key:0,class:"border-l overflow-auto resize-area",style:o.normalizeStyle({width:ae.value+"px"})},[N.showTitle?(o.openBlock(),o.createElementBlock("h2",Zf,[O[2]||(O[2]=o.createTextVNode(" 实时预览 ")),o.createElementVNode("span",Jf,o.toDisplayString(ae.value)+"px",1)])):o.createCommentVNode("",!0),o.createElementVNode("div",null,[c.value?(o.openBlock(),o.createElementBlock("div",{key:0,innerHTML:c.value},null,8,em)):(o.openBlock(),o.createElementBlock("div",{key:1,innerHTML:o.unref(u)("body").html()},null,8,tm))])],4)):o.createCommentVNode("",!0),N.preview?(o.openBlock(),o.createElementBlock("div",{key:1,class:"resizer",onMousedown:O[0]||(O[0]=w=>Et("preview"))},null,32)):o.createCommentVNode("",!0),o.createElementVNode("div",am,[N.showTitle?(o.openBlock(),o.createElementBlock("h2",nm,"结构渲染")):o.createCommentVNode("",!0),o.createElementVNode("div",im,[r.value?(o.openBlock(),o.createBlock(Hd,{key:0,"upload-by-file":N.uploadByFile,cropper:m.value,icon:p.value,upload:T.value,mode:N.mode,icons:N.icons,r:h.value,element:r.value,selectedElement:_.value,hoveredElement:I.value,onSelectElement:y,onHoverElement:V,onContentUpdated:F,onUpdateText:Q,onBlockAction:Ce,onAddIcon:Re},null,8,["upload-by-file","cropper","icon","upload","mode","icons","r","element","selectedElement","hoveredElement"])):o.createCommentVNode("",!0)])]),l.value=="design"?(o.openBlock(),o.createElementBlock("div",{key:2,class:"resizer",onMousedown:O[1]||(O[1]=w=>Et("structure"))},null,32)):o.createCommentVNode("",!0),l.value=="design"?(o.openBlock(),o.createElementBlock("div",{key:3,class:"resize-area",style:o.normalizeStyle({width:Ee.value+"px"})},[o.createElementVNode("div",sm,[N.showTitle?(o.openBlock(),o.createElementBlock("h2",rm,[O[3]||(O[3]=o.createTextVNode(" 节点属性 ")),o.createElementVNode("span",um,o.toDisplayString(Ee.value)+"px",1)])):o.createCommentVNode("",!0),o.createElementVNode("div",om,[_.value?(o.openBlock(),o.createBlock(gh,{key:0,element:_.value,onUpdateElement:z},null,8,["element"])):o.createCommentVNode("",!0)])])],4)):o.createCommentVNode("",!0),o.createVNode(yf,{ref_key:"cropperRef",ref:m,onOk:ke},null,512),o.createVNode(Vf,{icons:N.icons,ref_key:"iconRef",ref:p,onOk:Ie},null,8,["icons"]),o.createVNode(zf,{ref_key:"uploadRef",ref:T,multiple:!1,show:!1,beforeUpload:me,onChange:M},{"upload-icon":o.withCtx(()=>O[4]||(O[4]=[o.createElementVNode("div",{class:"p-2"},"上传",-1)])),_:1},512)]))}}),[["__scopeId","data-v-703ce458"]]),cm={install(e){e.component("Designer",Sr)}};Xe.Designer=Sr,Xe.default=cm,Object.defineProperties(Xe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|