const De="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Se="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",U=(e,i)=>{for(const n in i)e[n]=i[n];return e},Ut="numeric",zt="ascii",jt="alpha",Y="asciinumeric",$="alphanumeric",Bt="domain",fe="emoji",Ne="scheme",ve="slashscheme",ne="whitespace";function Le(e,i){return e in i||(i[e]=[]),i[e]}function P(e,i,n){i[Ut]&&(i[Y]=!0,i[$]=!0),i[zt]&&(i[Y]=!0,i[jt]=!0),i[Y]&&(i[$]=!0),i[jt]&&(i[$]=!0),i[$]&&(i[Bt]=!0),i[fe]&&(i[Bt]=!0);for(const s in i){const t=Le(s,n);t.indexOf(e)<0&&t.push(e)}}function Re(e,i){const n={};for(const s in i)i[s].indexOf(e)>=0&&(n[s]=!0);return n}function b(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}b.groups={};b.prototype={accepts(){return!!this.t},go(e){const i=this,n=i.j[e];if(n)return n;for(let s=0;se.ta(i,n,s,t),E=(e,i,n,s,t)=>e.tr(i,n,s,t),se=(e,i,n,s,t)=>e.ts(i,n,s,t),a=(e,i,n,s,t)=>e.tt(i,n,s,t),N="WORD",Vt="UWORD",M="LOCALHOST",Kt="TLD",Mt="UTLD",J="SCHEME",H="SLASH_SCHEME",Wt="NUM",de="WS",$t="NL",B="OPENBRACE",V="CLOSEBRACE",X="OPENBRACKET",Z="CLOSEBRACKET",tt="OPENPAREN",et="CLOSEPAREN",it="OPENANGLEBRACKET",nt="CLOSEANGLEBRACKET",st="FULLWIDTHLEFTPAREN",ot="FULLWIDTHRIGHTPAREN",at="LEFTCORNERBRACKET",rt="RIGHTCORNERBRACKET",ct="LEFTWHITECORNERBRACKET",lt="RIGHTWHITECORNERBRACKET",ut="FULLWIDTHLESSTHAN",ht="FULLWIDTHGREATERTHAN",ft="AMPERSAND",dt="APOSTROPHE",pt="ASTERISK",L="AT",gt="BACKSLASH",mt="BACKTICK",Tt="CARET",R="COLON",Gt="COMMA",yt="DOLLAR",C="DOT",bt="EQUALS",qt="EXCLAMATION",D="HYPHEN",Et="PERCENT",At="PIPE",kt="PLUS",Ct="POUND",Dt="QUERY",_t="QUOTE",Yt="SEMI",S="SLASH",K="TILDE",St="UNDERSCORE",pe="EMOJI",Nt="SYM";var ge=Object.freeze({__proto__:null,WORD:N,UWORD:Vt,LOCALHOST:M,TLD:Kt,UTLD:Mt,SCHEME:J,SLASH_SCHEME:H,NUM:Wt,WS:de,NL:$t,OPENBRACE:B,CLOSEBRACE:V,OPENBRACKET:X,CLOSEBRACKET:Z,OPENPAREN:tt,CLOSEPAREN:et,OPENANGLEBRACKET:it,CLOSEANGLEBRACKET:nt,FULLWIDTHLEFTPAREN:st,FULLWIDTHRIGHTPAREN:ot,LEFTCORNERBRACKET:at,RIGHTCORNERBRACKET:rt,LEFTWHITECORNERBRACKET:ct,RIGHTWHITECORNERBRACKET:lt,FULLWIDTHLESSTHAN:ut,FULLWIDTHGREATERTHAN:ht,AMPERSAND:ft,APOSTROPHE:dt,ASTERISK:pt,AT:L,BACKSLASH:gt,BACKTICK:mt,CARET:Tt,COLON:R,COMMA:Gt,DOLLAR:yt,DOT:C,EQUALS:bt,EXCLAMATION:qt,HYPHEN:D,PERCENT:Et,PIPE:At,PLUS:kt,POUND:Ct,QUERY:Dt,QUOTE:_t,SEMI:Yt,SLASH:S,TILDE:K,UNDERSCORE:St,EMOJI:pe,SYM:Nt});const x=/[a-z]/,Pt=new RegExp("\\p{L}","u"),wt=new RegExp("\\p{Emoji}","u"),xt=/\d/,oe=/\s/,ae=` `,Ie="️",Oe="‍";let G=null,q=null;function Pe(e){e===void 0&&(e=[]);const i={};b.groups=i;const n=new b;G==null&&(G=re(De)),q==null&&(q=re(Se)),a(n,"'",dt),a(n,"{",B),a(n,"}",V),a(n,"[",X),a(n,"]",Z),a(n,"(",tt),a(n,")",et),a(n,"<",it),a(n,">",nt),a(n,"(",st),a(n,")",ot),a(n,"「",at),a(n,"」",rt),a(n,"『",ct),a(n,"』",lt),a(n,"<",ut),a(n,">",ht),a(n,"&",ft),a(n,"*",pt),a(n,"@",L),a(n,"`",mt),a(n,"^",Tt),a(n,":",R),a(n,",",Gt),a(n,"$",yt),a(n,".",C),a(n,"=",bt),a(n,"!",qt),a(n,"-",D),a(n,"%",Et),a(n,"|",At),a(n,"+",kt),a(n,"#",Ct),a(n,"?",Dt),a(n,'"',_t),a(n,"/",S),a(n,";",Yt),a(n,"~",K),a(n,"_",St),a(n,"\\",gt);const s=E(n,xt,Wt,{[Ut]:!0});E(s,xt,s);const t=E(n,x,N,{[zt]:!0});E(t,x,t);const o=E(n,Pt,Vt,{[jt]:!0});E(o,x),E(o,Pt,o);const r=E(n,oe,de,{[ne]:!0});a(n,ae,$t,{[ne]:!0}),a(r,ae),E(r,oe,r);const c=E(n,wt,pe,{[fe]:!0});E(c,wt,c),a(c,Ie,c);const l=a(c,Oe);E(l,wt,c);const d=[[x,t]],p=[[x,null],[Pt,o]];for(let h=0;hh[0]>f[0]?1:-1);for(let h=0;h=0?m[Bt]=!0:x.test(f)?xt.test(f)?m[Y]=!0:m[zt]=!0:m[Ut]=!0,se(n,f,f,m)}return se(n,"localhost",M,{ascii:!0}),n.jd=new b(Nt),{start:n,tokens:U({groups:i},ge)}}function we(e,i){const n=xe(i.replace(/[A-Z]/g,c=>c.toLowerCase())),s=n.length,t=[];let o=0,r=0;for(;r=0&&(h+=n[r].length,f++),d+=n[r].length,o+=n[r].length,r++;o-=h,r-=f,d-=h,t.push({t:p.t,v:i.slice(o-d,o),s:o-d,e:o})}return t}function xe(e){const i=[],n=e.length;let s=0;for(;s56319||s+1===n||(o=e.charCodeAt(s+1))<56320||o>57343?e[s]:e.slice(s,s+2);i.push(r),s+=r.length}return i}function v(e,i,n,s,t){let o;const r=i.length;for(let c=0;c=0;)o++;if(o>0){i.push(n.join(""));for(let r=parseInt(e.substring(s,s+o),10);r>0;r--)n.pop();s+=o}else n.push(e[s]),s++}return i}const F={defaultProtocol:"http",events:null,format:ce,formatHref:ce,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Jt(e,i){i===void 0&&(i=null);let n=U({},F);e&&(n=U(n,e instanceof Jt?e.o:e));const s=n.ignoreTags,t=[];for(let o=0;on?s.substring(0,n)+"…":s},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=F.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const i=this,n=this.toHref(e.get("defaultProtocol")),s=e.get("formatHref",n,this),t=e.get("tagName",n,i),o=this.toFormattedString(e),r={},c=e.get("className",n,i),l=e.get("target",n,i),d=e.get("rel",n,i),p=e.getObj("attributes",n,i),h=e.getObj("events",n,i);return r.href=s,c&&(r.class=c),l&&(r.target=l),d&&(r.rel=d),p&&U(r,p),{tagName:t,attributes:r,content:o,eventListeners:h}}};function Lt(e,i){class n extends me{constructor(t,o){super(t,o),this.t=e}}for(const s in i)n.prototype[s]=i[s];return n.t=e,n}const le=Lt("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),ue=Lt("text"),He=Lt("nl"),_=Lt("url",{isLink:!0,toHref(e){return e===void 0&&(e=F.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==M&&e[1].t===R}}),A=e=>new b(e);function Ue(e){let{groups:i}=e;const n=i.domain.concat([ft,pt,L,gt,mt,Tt,yt,bt,D,Wt,Et,At,kt,Ct,S,Nt,K,St]),s=[dt,R,Gt,C,qt,Dt,_t,Yt,it,nt,B,V,Z,X,tt,et,st,ot,at,rt,ct,lt,ut,ht],t=[ft,dt,pt,gt,mt,Tt,yt,bt,D,B,V,Et,At,kt,Ct,Dt,S,Nt,K,St],o=A(),r=a(o,K);u(r,t,r),u(r,i.domain,r);const c=A(),l=A(),d=A();u(o,i.domain,c),u(o,i.scheme,l),u(o,i.slashscheme,d),u(c,t,r),u(c,i.domain,c);const p=a(c,L);a(r,L,p),a(l,L,p),a(d,L,p);const h=a(r,C);u(h,t,r),u(h,i.domain,r);const f=A();u(p,i.domain,f),u(f,i.domain,f);const I=a(f,C);u(I,i.domain,f);const m=A(le);u(I,i.tld,m),u(I,i.utld,m),a(p,M,m);const Xt=a(f,D);u(Xt,i.domain,f),u(m,i.domain,f),a(m,C,I),a(m,D,Xt);const Ee=a(m,R);u(Ee,i.numeric,le);const Q=a(c,D),O=a(c,C);u(Q,i.domain,c),u(O,t,r),u(O,i.domain,c);const k=A(_);u(O,i.tld,k),u(O,i.utld,k),u(k,i.domain,c),u(k,t,r),a(k,C,O),a(k,D,Q),a(k,L,p);const Ae=a(k,R),Zt=A(_);u(Ae,i.numeric,Zt);const T=A(_),z=A();u(T,n,T),u(T,s,z),u(z,n,T),u(z,s,z),a(k,S,T),a(Zt,S,T);const te=a(l,R),ke=a(d,R),Ce=a(ke,S),Rt=a(Ce,S);u(l,i.domain,c),a(l,C,O),a(l,D,Q),u(d,i.domain,c),a(d,C,O),a(d,D,Q),u(te,i.domain,T),a(te,S,T),u(Rt,i.domain,T),u(Rt,n,T),a(Rt,S,T);const ee=[[B,V],[X,Z],[tt,et],[it,nt],[st,ot],[at,rt],[ct,lt],[ut,ht]];for(let It=0;It=0&&f++,t++,p++;if(f<0)t-=p,t0&&(o.push(Ht(ue,i,r)),r=[]),t-=f,p-=f;const I=h.t,m=n.slice(t-p,t);o.push(Ht(I,i,m))}}return r.length>0&&o.push(Ht(ue,i,r)),o}function Ht(e,i,n){const s=n[0].s,t=n[n.length-1].e,o=i.slice(s,t);return new e(o,n)}const y={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function je(){y.scanner=Pe(y.customSchemes);for(let e=0;e",lt:"<",nbsp:" ",quot:'"'},Ke=/^#[xX]([A-Fa-f0-9]+)$/,Me=/^#([0-9]+)$/,Fe=/^([A-Za-z0-9]+)$/,Qe=function(){function e(i){this.named=i}return e.prototype.parse=function(i){if(i){var n=i.match(Ke);if(n)return String.fromCharCode(parseInt(n[1],16));if(n=i.match(Me),n)return String.fromCharCode(parseInt(n[1],10));if(n=i.match(Fe),n)return this.named[n[1]]||"&"+n[1]+";"}},e}(),We=/[\t\n\f ]/,$e=/[A-Za-z]/,Ge=/\r\n?/g;function g(e){return We.test(e)}function he(e){return $e.test(e)}function qe(e){return e.replace(Ge,` `)}var _e=function(){function e(i,n,s){s===void 0&&(s="precompile"),this.delegate=i,this.entityParser=n,this.mode=s,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var t=this.peek();if(t==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&t===` `){var o=this.tagNameBuffer.toLowerCase();(o==="pre"||o==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var t=this.peek(),o=this.tagNameBuffer;t==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):t==="&"&&o!=="script"&&o!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(t))},tagOpen:function(){var t=this.consume();t==="!"?this.transitionTo("markupDeclarationOpen"):t==="/"?this.transitionTo("endTagOpen"):(t==="@"||t===":"||he(t))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(t))},markupDeclarationOpen:function(){var t=this.consume();if(t==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var o=t.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();o==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var t=this.consume();g(t)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var t=this.consume();g(t)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(t.toLowerCase()))},doctypeName:function(){var t=this.consume();g(t)?this.transitionTo("afterDoctypeName"):t===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(t.toLowerCase())},afterDoctypeName:function(){var t=this.consume();if(!g(t))if(t===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var o=t.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),r=o.toUpperCase()==="PUBLIC",c=o.toUpperCase()==="SYSTEM";(r||c)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),r?this.transitionTo("afterDoctypePublicKeyword"):c&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var t=this.peek();g(t)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):t==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):t==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):t===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var t=this.consume();t==='"'?this.transitionTo("afterDoctypePublicIdentifier"):t===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(t)},doctypePublicIdentifierSingleQuoted:function(){var t=this.consume();t==="'"?this.transitionTo("afterDoctypePublicIdentifier"):t===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(t)},afterDoctypePublicIdentifier:function(){var t=this.consume();g(t)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):t===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):t==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):t==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var t=this.consume();g(t)||(t===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):t==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):t==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var t=this.consume();t==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):t===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(t)},doctypeSystemIdentifierSingleQuoted:function(){var t=this.consume();t==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):t===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(t)},afterDoctypeSystemIdentifier:function(){var t=this.consume();g(t)||t===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var t=this.consume();t==="-"&&this.peek()==="-"?this.transitionTo("commentStartDash"):t===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(t),this.transitionTo("comment"))},commentStartDash:function(){var t=this.consume();t==="-"?this.transitionTo("commentEnd"):t===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var t=this.consume();t==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(t)},commentEndDash:function(){var t=this.consume();t==="-"&&this.peek()==="-"?this.delegate.appendToCommentData(t):t==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+t),this.transitionTo("comment"))},commentEnd:function(){var t=this.consume();t===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+t),this.transitionTo("comment"))},tagName:function(){var t=this.consume();g(t)?this.transitionTo("beforeAttributeName"):t==="/"?this.transitionTo("selfClosingStartTag"):t===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(t)},endTagName:function(){var t=this.consume();g(t)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):t==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):t===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(t)},beforeAttributeName:function(){var t=this.peek();if(g(t)){this.consume();return}else t==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):t===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):t==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(t)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var t=this.peek();g(t)?(this.transitionTo("afterAttributeName"),this.consume()):t==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):t==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):t===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):t==='"'||t==="'"||t==="<"?(this.delegate.reportSyntaxError(t+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(t)):(this.consume(),this.delegate.appendToAttributeName(t))},afterAttributeName:function(){var t=this.peek();if(g(t)){this.consume();return}else t==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):t==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):t===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(t))},beforeAttributeValue:function(){var t=this.peek();g(t)?this.consume():t==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):t==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):t===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(t))},attributeValueDoubleQuoted:function(){var t=this.consume();t==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):t==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(t)},attributeValueSingleQuoted:function(){var t=this.consume();t==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):t==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(t)},attributeValueUnquoted:function(){var t=this.peek();g(t)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):t==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):t==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):t===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(t))},afterAttributeValueQuoted:function(){var t=this.peek();g(t)?(this.consume(),this.transitionTo("beforeAttributeName")):t==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):t===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var t=this.peek();t===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var t=this.consume();(t==="@"||t===":"||he(t))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(t))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(i){this.state=i},e.prototype.tokenize=function(i){this.reset(),this.tokenizePart(i),this.tokenizeEOF()},e.prototype.tokenizePart=function(i){for(this.input+=qe(i);this.index"||i==="style"&&this.input.substring(this.index,this.index+8)!==""||i==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),Ye=function(){function e(i,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new _e(this,i,n.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(i){return this.tokens=[],this.tokenizer.tokenize(i),this.tokens},e.prototype.tokenizePart=function(i){return this.tokens=[],this.tokenizer.tokenizePart(i),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var i=this.token;if(i===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return i;for(var n=0;n=0))continue;let p=s.length;ei(l,n,++r,s),r+=s.length-p-1}else if(c.type!==Ft)s.push(c);else{const l=ti(c.chars,o);s.push.apply(s,l)}}for(let r=0;r0&&(l+=" "+si(c.attributes).join(" ")),c.selfClosing&&(l+=" /"),l+=">",t.push(l);break}case ye:t.push(``);break;case Ft:t.push(Qt(c.chars));break;case Xe:t.push(``);break;case Ze:{let l=`",t.push(l);break}}}return t.join("")}function ti(e,i){const n=Be(e),s=[];for(let t=0;t0;){let o=i[n];o.type===vt&&o.tagName.toUpperCase()===e?t++:o.type===ye&&o.tagName.toUpperCase()===e&&t--,s.push(o),n++}return s}function ii({tagName:e,attributes:i,content:n}){return`<${e} ${ni(i)}>${Qt(n)}`}function Qt(e){return e.replace(//g,">")}function be(e){return e.replace(/"/g,""")}function ni(e){const i=[];for(const n in e){const s=e[n]+"";i.push(`${n}="${be(s)}"`)}return i.join(" ")}function si(e){const i=[];for(let n=0;n