wikiparser-node 1.9.3-b → 1.10.0-b

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.
@@ -1,39 +1,38 @@
1
- "use strict";(()=>{var Ms=Object.create;var st=Object.defineProperty;var Bn=Object.getOwnPropertyDescriptor;var Ws=Object.getOwnPropertyNames;var Us=Object.prototype.hasOwnProperty;var jn=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),ot=a=>{throw TypeError(a)};var Ds=(a,n,e)=>n in a?st(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e;var Pn=(a,n)=>st(a,"name",{value:n,configurable:!0});var k=(a,n)=>()=>(a&&(n=a(a=0)),n);var Hs=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),H=(a,n)=>{for(var e in n)st(a,e,{get:n[e],enumerable:!0})},Vs=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ws(n))!Us.call(a,r)&&r!==e&&st(a,r,{get:()=>n[r],enumerable:!(t=Bn(n,r))||t.enumerable});return a};var O=a=>Vs(st({},"__esModule",{value:!0}),a);var se=a=>{var n;return[,,,Ms((n=a==null?void 0:a[jn("metadata")])!=null?n:null)]},qn=["class","method","getter","setter","accessor","field","value","get","set"],Rt=a=>a!==void 0&&typeof a!="function"?ot("Function expected"):a,Xs=(a,n,e,t,r)=>({kind:qn[a],name:n,metadata:t,addInitializer:i=>e._?ot("Already initialized"):r.push(Rt(i||null))}),oe=(a,n,e,t)=>{for(var r=0,i=a[n>>1],s=i&&i.length;r<s;r++)n&1?i[r].call(e):t=i[r].call(e,t);return t},ae=(a,n,e,t,r,i)=>{var s,o,l,g,p,d=n&7,u=!!(n&8),h=!!(n&16),m=d>3?a.length+1:d?u?1:2:0,x=qn[d+5],b=d>3&&(a[m-1]=[]),E=a[m]||(a[m]=[]),S=d&&(!h&&!u&&(r=r.prototype),d<5&&(d>3||!h)&&Bn(d<4?r:{get[e](){return c(this,i)},set[e](A){return v(this,i,A)}},e));d?h&&d<4&&Pn(i,(d>2?"set ":d>1?"get ":"")+e):Pn(r,e);for(var w=t.length-1;w>=0;w--)g=Xs(d,e,l={},a[3],E),d&&(g.static=u,g.private=h,p=g.access={has:h?A=>Qs(r,A):A=>e in A},d^3&&(p.get=h?A=>(d^1?c:I)(A,r,d^4?i:S.get):A=>A[e]),d>2&&(p.set=h?(A,L)=>v(A,r,L,d^4?i:S.set):(A,L)=>A[e]=L)),o=(0,t[w])(d?d<4?h?i:S[x]:d>4?void 0:{get:S.get,set:S.set}:r,g),l._=1,d^4||o===void 0?Rt(o)&&(d>4?b.unshift(o):d?h?i=o:S[x]=o:r=o):typeof o!="object"||o===null?ot("Object expected"):(Rt(s=o.get)&&(S.get=s),Rt(s=o.set)&&(S.set=s),Rt(s=o.init)&&b.unshift(s));return d||(r[jn("metadata")]=a[3]),S&&st(r,e,S),h?d^4?i:S:r},U=(a,n,e)=>Ds(a,typeof n!="symbol"?n+"":n,e),jr=(a,n,e)=>n.has(a)||ot("Cannot "+e),Qs=(a,n)=>Object(n)!==n?ot('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(jr(a,n,"read from private field"),e?e.call(a):n.get(a)),y=(a,n,e)=>n.has(a)?ot("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),v=(a,n,e,t)=>(jr(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),I=(a,n,e)=>(jr(a,n,"access private method"),e);var tr=(a,n,e,t)=>({set _(r){v(a,n,r,e)},get _(){return c(a,n,t)}});var _n,Gn=k(()=>{"use strict";_n=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"]});var On,Ae,we,at,zn,le,rr,de,Zs,Mn,Wn,Ks,lt,$e,X=k(()=>{"use strict";On=String.raw`[^[\]<>"\0-\x1F\x7F\p{Zs}\uFFFD]`,Ae=String.raw`(?:\[[\da-f:.]+\]|${On})`,we=String.raw`(?:${On}|\0\d+[c!~]\x7F)*`,at=(a,n)=>e=>e.replace(a,n),zn=at(/[\0\x7F]|\r$/gmu,""),le=at(/\0\d+c\x7F/gu,""),rr=at(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),de=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),Zs={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}"},Mn=at(/&(?:#(\d+|x[\da-fA-F]+)|([lLgG][tT]|[lr]brac[ke]));/gu,(a,n,e)=>n?String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n)):Zs[e.toLowerCase()]),Wn=at(/\n/gu,String.raw`\n`),Ks={"&":"amp","<":"lt",">":"gt"},lt=at(/[&<>]/gu,a=>`&${Ks[a]};`),$e=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var Un=Hs((Vo,Js)=>{Js.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{},nsid:{file:6,category:14},parserFunction:[{"#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#regex":"regex","#related":"related","#cscore":"cscore"},["!","="],["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var Dn,Se=k(()=>{"use strict";Dn=Un()});var Ue,F,Q=k(()=>{"use strict";F=class{constructor(n,e){y(this,Ue);U(this,"token");U(this,"start");this.token=n,this.start=e}get top(){var n;return(n=c(this,Ue))!=null||v(this,Ue,this.getPosition()),c(this,Ue).top}get left(){var n;return(n=c(this,Ue))!=null||v(this,Ue,this.getPosition()),c(this,Ue).left}getPosition(){return this.token.getRootNode().posFromIndex(this.start)}};Ue=new WeakMap});var Hn,C,$,j=k(()=>{"use strict";Q();R();Hn=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}="top"in e?e:new F(n,s),{offsetHeight:g,offsetWidth:p}=n,{startIndex:d,startLine:u,startCol:h}=a(n,s,o,l);return{rule:t,message:f.msg(r),severity:i,startIndex:d,endIndex:d+n.toString().length,startLine:u,endLine:u+g-1,startCol:h,endCol:g===1?h+p:p}},C=Hn((a,n,e,t)=>{let r=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(r);return{startIndex:n+r,startLine:e+i,startCol:i?s:t+s}}),$=Hn((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t}))});var Vn,Xn,Pt,Bt,qr,dt,_r=k(()=>{"use strict";Vn=a=>{let n=a.split(`
2
- `),e=n.length;return{height:e,width:n[e-1].length}},Xn=(a,n)=>n.childNodes.slice(0,a).reduce((e,t,r)=>e+t.toString().length+n.getGaps(r),0)+n.getAttribute("padding"),dt=class{constructor(){y(this,Bt);U(this,"childNodes",[]);y(this,Pt)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,Pt)}get nextSibling(){var e;let n=(e=this.parentNode)==null?void 0:e.childNodes;return n&&n[n.indexOf(this)+1]}get previousSibling(){var e;let n=(e=this.parentNode)==null?void 0:e.childNodes;return n&&n[n.indexOf(this)-1]}get offsetHeight(){return I(this,Bt,qr).call(this).height}get offsetWidth(){return I(this,Bt,qr).call(this).width}getAttribute(n){return n==="padding"?0:this[n]}setAttribute(n,e){n==="parentNode"?v(this,Pt,e):this[n]=e}getRootNode(){let{parentNode:n}=this;for(;n!=null&&n.parentNode;)({parentNode:n}=n);return n!=null?n:this}posFromIndex(n){let e=String(this);if(n>=-e.length&&n<=e.length){let{height:t,width:r}=Vn(e.slice(0,n));return{top:t-1,left:r}}}getGaps(n){return 0}getRelativeIndex(n){if(n===void 0){let{parentNode:e}=this;return e?Xn(e.childNodes.indexOf(this),e):0}return Xn(n,this)}getAbsoluteIndex(){let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}};Pt=new WeakMap,Bt=new WeakSet,qr=function(){return Vn(String(this))}});var Gr,Be,Or,zr,nr,Qn=k(()=>{"use strict";X();Te();_r();Gr=a=>{let n=new Set(a.split(",").map(e=>e.trim()));return({type:e})=>n.has(e)},nr=class extends dt{constructor(){super(...arguments);y(this,Be)}get length(){return this.childNodes.length}text(e){return de(this.childNodes,e)}normalize(){let e=[...this.childNodes],t=r=>{e.splice(r,1)};for(let r=e.length-1;r>=0;r--){let{type:i,data:s}=e[r];i!=="text"||this.getGaps(r-1)||s===""&&t(r)}this.setAttribute("childNodes",e)}removeAt(e){return Mr(this,e,1)[0]}insertAt(e,t=this.length){return Mr(this,t,0,[e]),e}closest(e){let t=Gr(e),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=Gr(e);return I(this,Be,Or).call(this,t)}querySelectorAll(e){let t=Gr(e);return I(this,Be,zr).call(this,t)}append(...e){for(let t of e)this.insertAt(t)}replaceChildren(...e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.append(...e)}setText(e,t=0){t+=t<0?this.length:0;let r=this.childNodes[t],{data:i}=r;return r.replaceData(e),i}toString(e=""){return this.childNodes.map(String).join(e)}lint(e=this.getAbsoluteIndex(),t){let r=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];r.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return r}print(e={}){var t;return this.toString()?`<span class="wpb-${(t=e.class)!=null?t:this.type}">${$e(this.childNodes,e)}</span>`:""}json(e,t=this.getAbsoluteIndex()){let r={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();r.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return r}};Be=new WeakSet,Or=function(e){var t;for(let r of this.childNodes){if(r.type==="text")continue;if(e(r))return r;let i=I(t=r,Be,Or).call(t,e);if(i)return i}},zr=function(e){var r;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...I(r=i,Be,zr).call(r,e)));return t}});var Zn,Ys,eo,to,ro,no,io,ir,Kn,jt,Jn=k(()=>{"use strict";X();R();_r();Zn=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+`,Ys=new RegExp(String.raw`${Zn}|https?[:/]/+`,"giu"),eo=new RegExp(Zn,"giu"),to=new RegExp(String.raw`^https?://${Ae}${we}\.(?:gif|png|jpg|jpeg)$`,"iu"),ro={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},no={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http"},io=["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"],jt=class extends dt{constructor(e){super();y(this,ir);U(this,"data","");Object.defineProperties(this,{childNodes:{enumerable:!1,configurable:!1},data:{value:e}})}get type(){return"text"}toString(){return this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var P,q,V;let{data:r,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:g,parentNode:p}=i,d=!1;if(l==="attr-value"){let{type:re,name:fe,tag:Re}=p;if(re!=="ext-attr")d=!0;else if(Re==="choose"&&(fe==="before"||fe==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="image-parameter"&&g==="link"||d?eo:Ys),r.search(t)===-1)return[];t.lastIndex=0;let u=[],h=s==null?void 0:s.type,m=s==null?void 0:s.name,x=o==null?void 0:o.type,b=this.getRootNode(),{ext:E,html:S}=b.getAttribute("config"),{top:w,left:A}=b.posFromIndex(e),L=new Set(["onlyinclude","noinclude","includeonly",E,S,io].flat(2));for(let re=t.exec(r);re;re=t.exec(r)){let[,fe,Re]=re,{0:ie,index:W}=re;if(Re&&Re!=="]"){let{length:ne}=Re;W+=ne,ie=ie.slice(ne)}let{0:N,length:xe}=ie;if(N==="<"&&!L.has(fe.toLowerCase())||N==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(W+1))||h==="ext"&&m==="nowiki"&&((P=s.innerText)!=null&&P.includes("]"))))continue;if(N==="]"&&(W||xe>1))t.lastIndex--;else if(N==="h"&&W===0&&l==="ext-link-text"&&to.test(r))continue;let ye=e+W,Pe=ye+xe,ee=b.toString(),ve=ee[Pe],it=ee[ye-1],Rr=xe>1&&!(N==="<"&&!/[\s/>]/u.test(ve!=null?ve:"")||d&&(N==="["||N==="]"))||N==="{"&&(ve===N||it==="-")||N==="}"&&(it===N||ve==="-")||N==="["&&(ve===N||l==="ext-link-text"||h==="free-ext-link"&&!r.slice(W+1).trim())||N==="]"&&(it===N||x==="free-ext-link"&&!r.slice(0,W).includes("]"))?"error":"warning",Pr=N==="{"||N==="[";if(Rr==="warning"&&(Pr||(N==="]"||N==="}"))){let ne=ro[N],Br=Pr?r.slice(W+1):r.slice(0,W);if(N==="{"&&((q=ne.exec(Br))==null?void 0:q[0])==="}"||N==="}"&&((V=ne.exec(Br))==null?void 0:V[0])==="{")continue;if(!Br.includes(N)){let Rn=Pr?"nextSibling":"previousSibling",We=this[Rn];for(;We&&(We.type!=="text"||!ne.test(We.data));)We=We[Rn];if(We&&ne.exec(We.data)[0]!==N)continue}}let er=r.slice(0,W).split(`
3
- `),In=er.length+w-1,Ln=er[er.length-1],Fn=er.length===1?A+Ln.length:Ln.length,Ft={rule:no[N],message:f.msg('lonely "$1"',N==="h"?ie:N),severity:Rr,startIndex:ye,endIndex:Pe,startLine:In,endLine:In,startCol:Fn,endCol:Fn+xe};if(N==="<")Ft.suggestions=[{desc:"escape",range:[ye,ye+1],text:"&lt;"}];else if(N==="h"&&!(l==="ext-link-text"||l==="link-text")&&/[\p{L}\d_]/u.test(it||""))Ft.suggestions=[{desc:"whitespace",range:[ye,ye],text:" "}];else if(N==="["&&l==="ext-link-text"){let ne=i.getAbsoluteIndex()+i.toString().length;Ft.suggestions=[{desc:"escape",range:[ne,ne+1],text:"&#93;"}]}else if(N==="]"&&x==="free-ext-link"&&Rr==="error"){let ne=e-o.toString().length;Ft.fix={range:[ne,ne],text:"["}}u.push(Ft)}return u}replaceData(e){I(this,ir,Kn).call(this,e)}print(){return lt(this.data)}};ir=new WeakSet,Kn=function(e){this.setAttribute("data",e)}});var ge,De=k(()=>{"use strict";Te();ge=a=>(n,e)=>{class t extends n{text(){return""}lint(i){return a?[]:super.lint(i)}}return sr(t,n),t}});var qt,pe,gt=k(()=>{"use strict";B();pe=class extends T{constructor(e,t,r,i,s,o){super(e,i,s,o);y(this,qt);v(this,qt,r)}get type(){return c(this,qt)}lint(){return[]}};qt=new WeakMap});var pt,z,Ne=k(()=>{"use strict";B();z=class extends T{constructor(e,t,r,i,s){super(e,r,i,s);y(this,pt);v(this,pt,t)}get type(){return c(this,pt)}set type(e){v(this,pt,e)}};pt=new WeakMap});var He,be,je,Ce,Gt=k(()=>{"use strict";j();Q();Se();R();B();Ne();Ce=class extends T{constructor(e,t,r=f.getConfig(),i=[],s="|"){super(void 0,r,i,{});y(this,He,!0);y(this,be);y(this,je);if(this.insertAt(new z(e,"link-target",r,i,{})),t!==void 0){let o=new T(t,r,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}v(this,be,s)}afterBuild(){v(this,je,this.getTitle()),c(this,be).includes("\0")&&v(this,be,this.buildFromStr(c(this,be),0)),this.setAttribute("name",c(this,je).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?v(this,He,t):e==="title"?v(this,je,t):super.setAttribute(e,t)}toString(){let e=super.toString(c(this,be));return c(this,He)?`[[${e}]]`:e}text(){let e=super.text("|");return c(this,He)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,je):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,be).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:g}=c(this,je),p=new F(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&r.push(C(i,p,"unknown-page","template in an internal link target","warning")),l&&r.push(C(i,p,"url-encoding","unnecessary URL encoding in an internal link")),o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.find(u=>u.type==="text"&&u.data.includes("|"));if(d){let u=C(s,p,"pipe-like",'additional "|" in the link text',"warning");u.suggestions=[{desc:"escape",range:[u.startIndex+d.getRelativeIndex(),u.startIndex+d.getRelativeIndex()+d.data.length],text:d.data.replace(/\|/gu,"&#124;")}],r.push(u)}}if(o!=="link"&&o!=="redirect-target"&&g!==void 0){let d=C(i,p,"no-ignored","useless fragment"),u=i.childNodes.find(h=>h.type==="text"&&h.data.includes("#"));u&&(d.fix={range:[d.startIndex+u.getRelativeIndex()+u.data.indexOf("#"),d.endIndex],text:""}),r.push(d)}return r}getTitle(e){return this.normalizeTitle(this.firstChild.text(),0,e,!0,!0)}print(){return super.print(c(this,He)?{pre:"[[",post:"]]",sep:c(this,be)}:{sep:c(this,be)})}};He=new WeakMap,be=new WeakMap,je=new WeakMap});var Y,qe=k(()=>{"use strict";B();Y=class extends T{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var Yn,Wr,so,D,_e=k(()=>{"use strict";De();qe();Yn=[ge(!0)];D=class extends(so=Y){get type(){return"noinclude"}};Wr=se(so),D=ae(Wr,0,"NoincludeToken",Yn,D),oe(Wr,1,D)});var or,ei=k(()=>{"use strict";j();R();Gt();_e();or=class extends Ce{get type(){return"redirect-target"}constructor(n,e,t=f.getConfig(),r=[]){super(n,void 0,t,r),e!==void 0&&this.insertAt(new D(e,t,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!0,!0)}text(){return`[[${this.firstChild.toString()}]]`}lint(n=this.getAbsoluteIndex()){let e=super.lint(n,/\]\]/u);if(this.length===2){let t=C(this.lastChild,{start:n},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:""},e.push(t)}return e}}});var ti,Ge,ut,Ur,oo,Ve,ri=k(()=>{"use strict";De();R();B();gt();ei();ti=[ge()];Ve=class extends(oo=T){constructor(e,t,r,i,s,o=f.getConfig(),l=[]){super(void 0,o,l);y(this,Ge);y(this,ut);v(this,Ge,e),v(this,ut,s);let g=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new pe(t,g,"redirect-syntax",o,l,{}),new or(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,Ge).length:super.getAttribute(e)}toString(){return c(this,Ge)+super.toString()+c(this,ut)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+c(this,Ge).length+this.firstChild.toString().length)}print(){return super.print({pre:c(this,Ge),post:c(this,ut)})}};Ur=se(oo),Ge=new WeakMap,ut=new WeakMap,Ve=ae(Ur,0,"RedirectToken",ti,Ve),oe(Ur,1,Ve)});var ni={};H(ni,{parseRedirect:()=>ao});var ao,ii=k(()=>{"use strict";R();ri();ao=(a,n,e)=>{let t=new RegExp(String.raw`^(\s*)((?:${n.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"),r=t.exec(a);return r&&f.normalizeTitle(r[3],0,!1,n,!0,!0).valid?(a=`\0${e.length}c\x7F${a.slice(r[0].length)}`,new Ve(...r.slice(1),n,e),a):!1}});var ar,si=k(()=>{"use strict";B();ar=class extends T{get type(){return"onlyinclude"}toString(){return`<onlyinclude>${super.toString()}</onlyinclude>`}getAttribute(n){return n==="padding"?13:n==="plain"||super.getAttribute(n)}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}});var Oe,ct,Dr=k(()=>{"use strict";B();ct=class extends T{constructor(e,t,r,i,s,o=[]){super(void 0,s);y(this,Oe);U(this,"closed");U(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),v(this,Oe,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,r);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(){let{selfClosing:e,firstChild:t,lastChild:r}=this,[i,s]=c(this,Oe);return e?`<${i}${t.toString()}/>`:`<${i}${t.toString()}>${r.toString()}${this.closed?`</${s}>`:""}`}text(){let[e,t]=c(this,Oe);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,Oe)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,Oe);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};Oe=new WeakMap});var oi,Hr,lo,Xe,ai=k(()=>{"use strict";j();De();R();Dr();oi=[ge()];Xe=class extends(lo=ct){get type(){return"include"}constructor(n,e="",t,r,i,s){super(n,e,t!=null?t:"",t===void 0||r!=null?r:"",i,s)}lint(n=this.getAbsoluteIndex()){if(this.closed)return[];let e=$(this,{start:n},"unclosed-comment",f.msg("unclosed $1",`<${this.name}>`));return e.suggestions=[{desc:"close",range:[e.endIndex,e.endIndex],text:`</${this.name}>`}],[e]}};Hr=se(lo),Xe=ae(Hr,0,"IncludeToken",oi,Xe),oe(Hr,1,Xe)});var go,Z,li,di,dr,Vr,gi,Ot,ui,ci,hi,pi,lr,po,uo,co,zt,ht,K,ue,mt,mi=k(()=>{"use strict";j();Q();X();Se();R();B();Ne();go=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-level","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Z=new Set(["align"]),li=new Set(["cite"]),di=new Set(["cite","datetime"]),dr=new Set(["width"]),Vr=new Set(["axis","align","bgcolor","height","width","valign"]),gi=new Set([...Vr,"abbr","headers","scope","rowspan","colspan"]),Ot=new Set(["type"]),ui=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ci=new Set(["clear"]),hi=new Set(["bgcolor","align","valign"]),pi={div:Z,h1:Z,h2:Z,h3:Z,h4:Z,h5:Z,h6:Z,blockquote:li,q:li,p:Z,br:ci,pre:dr,ins:di,del:di,ul:Ot,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ui,"border"]),caption:Z,tr:hi,td:gi,th:gi,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:dr,rt:new Set(["rbspan"]),data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails","type"]),poem:new Set(["compact","align"]),categorytree:new Set(["align","hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline","align"])},lr=new Set,po={nowiki:lr,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:lr,inputbox:lr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:lr,poll:new Set(["id","show-results-before-voting"]),sm2:Ot,flashmp3:Ot,score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"])},uo=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,co={table:ui,td:new Set([...Vr,"scope"]),th:Vr,br:ci,caption:Z,div:Z,hr:dr,h1:Z,h2:Z,h3:Z,h4:Z,h5:Z,h6:Z,li:Ot,p:Z,pre:dr,tr:hi,ul:Ot},mt=class extends T{constructor(e,t,r,i="",s,o=[],l=f.getConfig(),g=[]){let p=new z(r,"attr-key",l,g,{}),d;if(r==="title"||t==="img"&&r==="alt")d=new T(s,l,g,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"){let u={...l,excludes:[...l.excludes,"quote","extLink","magicLink","list"]};d=new T(s,u,g,{}),d.type="attr-value",d.setAttribute("stage",5)}else if(t==="choose"&&(r==="before"||r==="after")){let u={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};d=new T(s,u,g,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new z(s,"attr-value",l,g,{});super(void 0,l,g);y(this,zt);y(this,ht);y(this,K);y(this,ue);v(this,zt,e),this.append(p,d),v(this,K,i),v(this,ue,[...o]),v(this,ht,t),this.setAttribute("name",le(r).trim().toLowerCase())}get type(){return c(this,zt)}get tag(){return c(this,ht)}get balanced(){return!c(this,K)||c(this,ue)[0]===c(this,ue)[1]}afterBuild(){c(this,K).includes("\0")&&v(this,K,this.buildFromStr(c(this,K),0)),this.parentNode&&v(this,ht,this.parentNode.name),this.setAttribute("name",this.firstChild.text().trim().toLowerCase()),super.afterBuild()}toString(){let[e="",t=""]=c(this,ue);return c(this,K)?super.toString(c(this,K)+e)+t:this.firstChild.toString()}text(){return c(this,K)?`${super.text(`${c(this,K).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,K)?c(this,K).length+((t=(e=c(this,ue)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var m,x;let r=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:g,tag:p}=this,d=this.getValue(),u=new F(this,e);if(!i){let b=C(o,u,"unclosed-quote",f.msg("unclosed $1","quotes"),"warning");b.startIndex--,b.startCol--;let E={range:[b.endIndex,b.endIndex],text:c(this,ue)[0]};o.childNodes.some(({type:S,data:w})=>S==="text"&&/\s/u.test(w))?b.suggestions=[{desc:"close",...E}]:b.fix=E,r.push(b)}let h=po[p];if(h&&!h.has(g)||(l==="ext-attr"?p in pi:!/\{\{[^{]+\}\}/u.test(g))&&!((m=pi[p])!=null&&m.has(g))&&!/^(?:xmlns:[\w:.-]+|data-[^:]*)$/u.test(g)&&(p==="meta"||p==="link"||!go.has(g)))r.push(C(s,u,"illegal-attr","illegal attribute name"));else if((x=co[p])!=null&&x.has(g))r.push(C(s,u,"obsolete-attr","obsolete attribute","warning"));else if(g==="style"&&typeof d=="string"&&uo.test(d))r.push(C(o,u,"insecure-style","insecure style"));else if(g==="tabindex"&&typeof d=="string"&&d.trim()!=="0"){let b=C(o,u,"illegal-attr","nonzero tabindex");b.suggestions=[{desc:"remove",range:[e,b.endIndex],text:""},{desc:"0 tabindex",range:[b.startIndex,b.endIndex],text:"0"}],r.push(b)}return r}getValue(){if(c(this,K)){let e=this.lastChild.text();return c(this,ue)[1]?e:e[c(this,ue)[0]?"trimEnd":"trim"]()}return this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,ue);return c(this,K)?super.print({sep:lt(c(this,K))+e,post:t}):super.print()}};zt=new WeakMap,ht=new WeakMap,K=new WeakMap,ue=new WeakMap});var gr,fi,ho,Mt,ze,pr=k(()=>{"use strict";j();Q();X();R();B();Ne();mi();gr=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+c\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+c\x7F)*)(?:(["'])(.*?)(\3|$)|(\S*)))?/gsu,fi=a=>a.slice(0,-1),ho=a=>`${fi(a)}-dirty`,ze=class extends T{constructor(e,t,r,i=f.getConfig(),s=[]){super(void 0,i,s,{});y(this,Mt);if(v(this,Mt,t),this.setAttribute("name",r),e){gr.lastIndex=0;let o="",l=gr.exec(e),g=0,p=()=>{o&&(super.insertAt(new z(o,ho(t),i,s,{})),o="")};for(;l;){let{index:d,0:u,1:h,2:m,3:x,4:b,5:E,6:S}=l;if(o+=e.slice(g,d),/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test(le(h).trim())){let w=b!=null?b:S,A=[x,E],L=new mt(fi(t),r,h,m,w,A,i,s);p(),super.insertAt(L)}else o+=u;({lastIndex:g}=gr),l=gr.exec(e)}o+=e.slice(g),p()}}get type(){return c(this,Mt)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&e.subtype==="caption"&&this.setAttribute("name","caption"),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof mt&&(!e||t.name===e.toLowerCase().trim()))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{parentNode:i,length:s,childNodes:o}=this,l=new Map,g=new Set,p=new F(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let d=$(this,p,"no-ignored","attributes of a closing tag");d.fix={range:[e,d.endIndex],text:""},r.push(d)}for(let d=0;d<s;d++){let u=o[d];if(u instanceof z&&u.text().trim()){let h=C(u,p,"no-ignored","containing invalid attribute");h.suggestions=[{desc:"remove",range:[h.startIndex,h.endIndex],text:" "}],r.push(h)}else if(u instanceof mt){let{name:h}=u;l.has(h)?(g.add(h),l.get(h).push(u)):h!=="class"&&l.set(h,[u])}}if(g.size>0)for(let d of g)r.push(...l.get(d).map(u=>C(u,p,"no-duplicate",f.msg("duplicated $1 attribute",d))));return r}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof z?{class:"attr-dirty"}:void 0)).join("")}</span>`:""}};Mt=new WeakMap});var xi={};H(xi,{PreToken:()=>Xr});var Xr,Ti=k(()=>{"use strict";Se();R();B();_e();Xr=class extends T{get type(){return"ext-inner"}constructor(n,e=f.getConfig(),t=[]){if(n){let r="<nowiki>",i="</nowiki>",{length:s}=r,o=n.indexOf(r),l=n.indexOf(i,o+s),g="";for(;o!==-1&&l!==-1;)new D(r,e,t),new D(i,e,t),g+=`${n.slice(0,o)}\0${t.length-1}c\x7F${n.slice(o+s,l)}\0${t.length}c\x7F`,n=n.slice(l+s+1),o=n.indexOf(r),l=n.indexOf(i,o+s);n=g+n}super(n,e,t,{}),this.setAttribute("stage",10)}getAttribute(n){return n==="plain"||super.getAttribute(n)}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*\/\s*(pre)\b/giu)}}});var bi={};H(bi,{ParamTagToken:()=>Wt});var Wt,Qr=k(()=>{"use strict";j();Q();R();B();Ne();Wt=class extends T{get type(){return"ext-inner"}constructor(n,e=f.getConfig(),t=[],r={}){if(super(void 0,e,t,{}),n){let i=z;this.append(...n.split(`
4
- `).map(s=>new i(s,"param-line",e,t,{})))}}toString(){return super.toString(`
1
+ "use strict";(()=>{var Ms=Object.create;var it=Object.defineProperty;var Bn=Object.getOwnPropertyDescriptor;var Ws=Object.getOwnPropertyNames;var Us=Object.prototype.hasOwnProperty;var jn=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),st=a=>{throw TypeError(a)};var Ds=(a,n,e)=>n in a?it(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e;var Pn=(a,n)=>it(a,"name",{value:n,configurable:!0});var b=(a,n)=>()=>(a&&(n=a(a=0)),n);var Hs=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),V=(a,n)=>{for(var e in n)it(a,e,{get:n[e],enumerable:!0})},Vs=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ws(n))!Us.call(a,r)&&r!==e&&it(a,r,{get:()=>n[r],enumerable:!(t=Bn(n,r))||t.enumerable});return a};var O=a=>Vs(it({},"__esModule",{value:!0}),a);var oe=a=>{var n;return[,,,Ms((n=a==null?void 0:a[jn("metadata")])!=null?n:null)]},qn=["class","method","getter","setter","accessor","field","value","get","set"],Rt=a=>a!==void 0&&typeof a!="function"?st("Function expected"):a,Xs=(a,n,e,t,r)=>({kind:qn[a],name:n,metadata:t,addInitializer:i=>e._?st("Already initialized"):r.push(Rt(i||null))}),ae=(a,n,e,t)=>{for(var r=0,i=a[n>>1],s=i&&i.length;r<s;r++)n&1?i[r].call(e):t=i[r].call(e,t);return t},le=(a,n,e,t,r,i)=>{var s,o,l,g,p,d=n&7,u=!!(n&8),h=!!(n&16),m=d>3?a.length+1:d?u?1:2:0,x=qn[d+5],y=d>3&&(a[m-1]=[]),L=a[m]||(a[m]=[]),w=d&&(!h&&!u&&(r=r.prototype),d<5&&(d>3||!h)&&Bn(d<4?r:{get[e](){return c(this,i)},set[e](v){return A(this,i,v)}},e));d?h&&d<4&&Pn(i,(d>2?"set ":d>1?"get ":"")+e):Pn(r,e);for(var C=t.length-1;C>=0;C--)g=Xs(d,e,l={},a[3],L),d&&(g.static=u,g.private=h,p=g.access={has:h?v=>Qs(r,v):v=>e in v},d^3&&(p.get=h?v=>(d^1?c:E)(v,r,d^4?i:w.get):v=>v[e]),d>2&&(p.set=h?(v,P)=>A(v,r,P,d^4?i:w.set):(v,P)=>v[e]=P)),o=(0,t[C])(d?d<4?h?i:w[x]:d>4?void 0:{get:w.get,set:w.set}:r,g),l._=1,d^4||o===void 0?Rt(o)&&(d>4?y.unshift(o):d?h?i=o:w[x]=o:r=o):typeof o!="object"||o===null?st("Object expected"):(Rt(s=o.get)&&(w.get=s),Rt(s=o.set)&&(w.set=s),Rt(s=o.init)&&y.unshift(s));return d||(r[jn("metadata")]=a[3]),w&&it(r,e,w),h?d^4?i:w:r},U=(a,n,e)=>Ds(a,typeof n!="symbol"?n+"":n,e),jr=(a,n,e)=>n.has(a)||st("Cannot "+e),Qs=(a,n)=>Object(n)!==n?st('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(jr(a,n,"read from private field"),e?e.call(a):n.get(a)),k=(a,n,e)=>n.has(a)?st("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),A=(a,n,e,t)=>(jr(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),E=(a,n,e)=>(jr(a,n,"access private method"),e);var tr=(a,n,e,t)=>({set _(r){A(a,n,r,e)},get _(){return c(a,n,t)}});var _n,On=b(()=>{"use strict";_n=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"]});var Gn,ve,Ae,ot,zn,te,rr,de,Zs,Mn,Wn,Ks,at,$e,X=b(()=>{"use strict";Gn=String.raw`[^[\]<>"\0-\x1F\x7F\p{Zs}\uFFFD]`,ve=String.raw`(?:\[[\da-f:.]+\]|${Gn})`,Ae=String.raw`(?:${Gn}|\0\d+[c!~]\x7F)*`,ot=(a,n)=>e=>e.replace(a,n),zn=ot(/[\0\x7F]|\r$/gmu,""),te=ot(/\0\d+c\x7F/gu,""),rr=ot(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),de=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),Zs={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}"},Mn=ot(/&(?:#(\d+|x[\da-fA-F]+)|([lLgG][tT]|[lr]brac[ke]));/gu,(a,n,e)=>n?String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n)):Zs[e.toLowerCase()]),Wn=ot(/\n/gu,String.raw`\n`),Ks={"&":"amp","<":"lt",">":"gt"},at=ot(/[&<>]/gu,a=>`&${Ks[a]};`),$e=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var Un=Hs((Vo,Js)=>{Js.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{},nsid:{file:6,category:14},parserFunction:[{"#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#regex":"regex","#related":"related","#cscore":"cscore"},["!","="],["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var Dn,we=b(()=>{"use strict";Dn=Un()});var Ue,I,Q=b(()=>{"use strict";I=class{constructor(n,e){k(this,Ue);U(this,"token");U(this,"start");this.token=n,this.start=e}get top(){var n;return(n=c(this,Ue))!=null||A(this,Ue,this.getPosition()),c(this,Ue).top}get left(){var n;return(n=c(this,Ue))!=null||A(this,Ue,this.getPosition()),c(this,Ue).left}getPosition(){return this.token.getRootNode().posFromIndex(this.start)}};Ue=new WeakMap});var Hn,S,$,j=b(()=>{"use strict";Q();R();Hn=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof I?e:new I(n,s),{offsetHeight:g,offsetWidth:p}=n,{startIndex:d,startLine:u,startCol:h}=a(n,s,o,l);return{rule:t,message:f.msg(r),severity:i,startIndex:d,endIndex:d+n.toString().length,startLine:u,endLine:u+g-1,startCol:h,endCol:g===1?h+p:p}},S=Hn((a,n,e,t)=>{let r=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(r);return{startIndex:n+r,startLine:e+i,startCol:i?s:t+s}}),$=Hn((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t}))});var Vn,Xn,Pt,Bt,qr,lt,_r=b(()=>{"use strict";Vn=a=>{let n=a.split(`
2
+ `),e=n.length;return{height:e,width:n[e-1].length}},Xn=(a,n)=>n.childNodes.slice(0,a).reduce((e,t,r)=>e+t.toString().length+n.getGaps(r),0)+n.getAttribute("padding"),lt=class{constructor(){k(this,Bt);U(this,"childNodes",[]);k(this,Pt)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,Pt)}get nextSibling(){var e;let n=(e=this.parentNode)==null?void 0:e.childNodes;return n&&n[n.indexOf(this)+1]}get previousSibling(){var e;let n=(e=this.parentNode)==null?void 0:e.childNodes;return n&&n[n.indexOf(this)-1]}get offsetHeight(){return E(this,Bt,qr).call(this).height}get offsetWidth(){return E(this,Bt,qr).call(this).width}getAttribute(n){return n==="padding"?0:this[n]}setAttribute(n,e){n==="parentNode"?A(this,Pt,e):this[n]=e}getRootNode(){let{parentNode:n}=this;for(;n!=null&&n.parentNode;)({parentNode:n}=n);return n!=null?n:this}posFromIndex(n){let e=String(this);if(n>=-e.length&&n<=e.length){let{height:t,width:r}=Vn(e.slice(0,n));return{top:t-1,left:r}}}getGaps(n){return 0}getRelativeIndex(n){if(n===void 0){let{parentNode:e}=this;return e?Xn(e.childNodes.indexOf(this),e):0}return Xn(n,this)}getAbsoluteIndex(){let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}is(n){return this.type===n}};Pt=new WeakMap,Bt=new WeakSet,qr=function(){return Vn(String(this))}});var Or,Be,Gr,zr,nr,Qn=b(()=>{"use strict";X();xe();_r();Or=a=>{let n=new Set(a.split(",").map(e=>e.trim()));return({type:e})=>n.has(e)},nr=class extends lt{constructor(){super(...arguments);k(this,Be)}get length(){return this.childNodes.length}text(e){return de(this.childNodes,e)}normalize(){let e=[...this.childNodes],t=r=>{e.splice(r,1)};for(let r=e.length-1;r>=0;r--){let{type:i,data:s}=e[r];i!=="text"||this.getGaps(r-1)||s===""&&t(r)}this.setAttribute("childNodes",e)}removeAt(e){return Mr(this,e,1)[0]}insertAt(e,t=this.length){return Mr(this,t,0,[e]),e}closest(e){let t=Or(e),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=Or(e);return E(this,Be,Gr).call(this,t)}querySelectorAll(e){let t=Or(e);return E(this,Be,zr).call(this,t)}append(...e){for(let t of e)this.insertAt(t)}replaceChildren(...e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.append(...e)}setText(e,t=0){t+=t<0?this.length:0;let r=this.childNodes[t],{data:i}=r;return r.replaceData(e),i}toString(e,t=""){return this.childNodes.map(r=>r.toString(e)).join(t)}lint(e=this.getAbsoluteIndex(),t){let r=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];r.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return r}print(e={}){var t;return this.toString()?`<span class="wpb-${(t=e.class)!=null?t:this.type}">${$e(this.childNodes,e)}</span>`:""}json(e,t=this.getAbsoluteIndex()){let r={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();r.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return r}};Be=new WeakSet,Gr=function(e){var t;for(let r of this.childNodes){if(r.type==="text")continue;if(e(r))return r;let i=E(t=r,Be,Gr).call(t,e);if(i)return i}},zr=function(e){var r;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...E(r=i,Be,zr).call(r,e)));return t}});var Zn,Ys,eo,to,ro,no,io,ir,Kn,jt,Jn=b(()=>{"use strict";X();R();_r();Zn=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+`,Ys=new RegExp(String.raw`${Zn}|https?[:/]/+`,"giu"),eo=new RegExp(Zn,"giu"),to=new RegExp(String.raw`^https?://${ve}${Ae}\.(?:gif|png|jpg|jpeg)$`,"iu"),ro={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},no={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http"},io=["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"],jt=class extends lt{constructor(e){super();k(this,ir);U(this,"data","");Object.defineProperties(this,{childNodes:{enumerable:!1,configurable:!1},data:{value:e}})}get type(){return"text"}toString(){return this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var F,z,H;if(t===!1)return[];let{data:r,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:g,parentNode:p}=i,d=!1;if(l==="attr-value"){let{type:ne,name:me,tag:Re}=p;if(ne!=="ext-attr")d=!0;else if(Re==="choose"&&(me==="before"||me==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="image-parameter"&&g==="link"||d?eo:Ys),r.search(t)===-1)return[];t.lastIndex=0;let u=[],h=s==null?void 0:s.type,m=s==null?void 0:s.name,x=o==null?void 0:o.type,y=this.getRootNode(),{ext:L,html:w}=y.getAttribute("config"),{top:C,left:v}=y.posFromIndex(e),P=new Set(["onlyinclude","noinclude","includeonly",L,w,io].flat(2));for(let ne=t.exec(r);ne;ne=t.exec(r)){let[,me,Re]=ne,{0:se,index:W}=ne;if(Re&&Re!=="]"){let{length:ie}=Re;W+=ie,se=se.slice(ie)}let{0:N,length:fe}=se;if(N==="<"&&!P.has(me.toLowerCase())||N==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(W+1))||s!=null&&s.is("ext")&&m==="nowiki"&&((F=s.innerText)!=null&&F.includes("]"))))continue;if(N==="]"&&(W||fe>1))t.lastIndex--;else if(N==="h"&&W===0&&l==="ext-link-text"&&to.test(r))continue;let ke=e+W,Pe=ke+fe,ee=y.toString(),ye=ee[Pe],nt=ee[ke-1],Rr=fe>1&&!(N==="<"&&!/[\s/>]/u.test(ye!=null?ye:"")||d&&(N==="["||N==="]"))||N==="{"&&(ye===N||nt==="-")||N==="}"&&(nt===N||ye==="-")||N==="["&&(ye===N||l==="ext-link-text"||h==="free-ext-link"&&!r.slice(W+1).trim())||N==="]"&&(nt===N||x==="free-ext-link"&&!r.slice(0,W).includes("]"))?"error":"warning",Pr=N==="{"||N==="[";if(Rr==="warning"&&(Pr||(N==="]"||N==="}"))){let ie=ro[N],Br=Pr?r.slice(W+1):r.slice(0,W);if(N==="{"&&((z=ie.exec(Br))==null?void 0:z[0])==="}"||N==="}"&&((H=ie.exec(Br))==null?void 0:H[0])==="{")continue;if(!Br.includes(N)){let Rn=Pr?"nextSibling":"previousSibling",We=this[Rn];for(;We&&(We.type!=="text"||!ie.test(We.data));)We=We[Rn];if(We&&ie.exec(We.data)[0]!==N)continue}}let er=r.slice(0,W).split(`
3
+ `),In=er.length+C-1,Ln=er[er.length-1],Fn=er.length===1?v+Ln.length:Ln.length,Ft={rule:no[N],message:f.msg('lonely "$1"',N==="h"?se:N),severity:Rr,startIndex:ke,endIndex:Pe,startLine:In,endLine:In,startCol:Fn,endCol:Fn+fe};if(N==="<")Ft.suggestions=[{desc:"escape",range:[ke,ke+1],text:"&lt;"}];else if(N==="h"&&!(l==="ext-link-text"||l==="link-text")&&/[\p{L}\d_]/u.test(nt||""))Ft.suggestions=[{desc:"whitespace",range:[ke,ke],text:" "}];else if(N==="["&&l==="ext-link-text"){let ie=i.getAbsoluteIndex()+i.toString().length;Ft.suggestions=[{desc:"escape",range:[ie,ie+1],text:"&#93;"}]}else if(N==="]"&&x==="free-ext-link"&&Rr==="error"){let ie=e-o.toString().length;Ft.fix={range:[ie,ie],text:"["}}u.push(Ft)}return u}replaceData(e){E(this,ir,Kn).call(this,e)}print(){return at(this.data)}};ir=new WeakSet,Kn=function(e){this.setAttribute("data",e)}});var ge,De=b(()=>{"use strict";xe();ge=(a=!0,n=!0)=>(e,t)=>{class r extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return sr(r,e),r}});var qt,pe,dt=b(()=>{"use strict";B();pe=class extends T{constructor(e,t,r,i,s,o){super(e,i,s,o);k(this,qt);A(this,qt,r)}get type(){return c(this,qt)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};qt=new WeakMap});var gt,G,Ne=b(()=>{"use strict";B();G=class extends T{constructor(e,t,r,i,s){super(e,r,i,s);k(this,gt);A(this,gt,t)}get type(){return c(this,gt)}set type(e){A(this,gt,e)}};gt=new WeakMap});var so,He,Te,je,Se,Ot=b(()=>{"use strict";j();Q();we();R();B();Ne();so=a=>a==="redirect-target"||a==="link",Se=class extends T{constructor(e,t,r=f.getConfig(),i=[],s="|"){super(void 0,r,i,{});k(this,He,!0);k(this,Te);k(this,je);if(this.insertAt(new G(e,"link-target",r,i,{})),t!==void 0){let o=new T(t,r,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}A(this,Te,s)}afterBuild(){A(this,je,this.getTitle()),c(this,Te).includes("\0")&&A(this,Te,this.buildFromStr(c(this,Te),0)),this.setAttribute("name",c(this,je).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?A(this,He,t):e==="title"?A(this,je,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Te));return c(this,He)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,He)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,je):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,Te).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:g}=c(this,je),p=new I(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&r.push(S(i,p,"unknown-page","template in an internal link target","warning")),l&&r.push(S(i,p,"url-encoding","unnecessary URL encoding in an internal link")),o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.find(u=>u.type==="text"&&u.data.includes("|"));if(d){let u=S(s,p,"pipe-like",'additional "|" in the link text',"warning");u.suggestions=[{desc:"escape",range:[u.startIndex+d.getRelativeIndex(),u.startIndex+d.getRelativeIndex()+d.data.length],text:d.data.replace(/\|/gu,"&#124;")}],r.push(u)}}if(g!==void 0&&!so(o)){let d=S(i,p,"no-ignored","useless fragment"),u=i.childNodes.find(h=>h.type==="text"&&h.data.includes("#"));u&&(d.fix={range:[d.startIndex+u.getRelativeIndex()+u.data.indexOf("#"),d.endIndex],text:""}),r.push(d)}return r}getTitle(e){return this.normalizeTitle(this.firstChild.toString(!0),0,e,!0,!0)}print(){return super.print(c(this,He)?{pre:"[[",post:"]]",sep:c(this,Te)}:{sep:c(this,Te)})}};He=new WeakMap,Te=new WeakMap,je=new WeakMap});var Y,qe=b(()=>{"use strict";B();Y=class extends T{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var Yn,Wr,oo,D,_e=b(()=>{"use strict";De();qe();Yn=[ge()];D=class extends(oo=Y){get type(){return"noinclude"}toString(n){return n?"":super.toString()}};Wr=oe(oo),D=le(Wr,0,"NoincludeToken",Yn,D),ae(Wr,1,D)});var or,ei=b(()=>{"use strict";j();R();Ot();_e();or=class extends Se{get type(){return"redirect-target"}constructor(n,e,t=f.getConfig(),r=[]){super(n,void 0,t,r),e!==void 0&&this.insertAt(new D(e,t,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!0,!0)}lint(n=this.getAbsoluteIndex()){let e=super.lint(n,!1);if(this.length===2){let t=S(this.lastChild,{start:n},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:""},e.push(t)}return e}}});var ti,Oe,pt,Ur,ao,Ve,ri=b(()=>{"use strict";De();R();B();dt();ei();ti=[ge(!1,!1)];Ve=class extends(ao=T){constructor(e,t,r,i,s,o=f.getConfig(),l=[]){super(void 0,o,l);k(this,Oe);k(this,pt);A(this,Oe,e),A(this,pt,s);let g=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new pe(t,g,"redirect-syntax",o,l,{}),new or(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,Oe).length:super.getAttribute(e)}toString(e){return c(this,Oe)+super.toString(e)+c(this,pt)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+c(this,Oe).length+this.firstChild.toString().length)}print(){return super.print({pre:c(this,Oe),post:c(this,pt)})}};Ur=oe(ao),Oe=new WeakMap,pt=new WeakMap,Ve=le(Ur,0,"RedirectToken",ti,Ve),ae(Ur,1,Ve)});var ni={};V(ni,{parseRedirect:()=>lo});var lo,ii=b(()=>{"use strict";R();ri();lo=(a,n,e)=>{let t=new RegExp(String.raw`^(\s*)((?:${n.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"),r=t.exec(a);return r&&f.normalizeTitle(r[3],0,!1,n,!0,!0).valid?(a=`\0${e.length}c\x7F${a.slice(r[0].length)}`,new Ve(...r.slice(1),n,e),a):!1}});var ar,si=b(()=>{"use strict";B();ar=class extends T{get type(){return"onlyinclude"}toString(n){return`<onlyinclude>${super.toString(n)}</onlyinclude>`}getAttribute(n){return n==="padding"?13:n==="plain"||super.getAttribute(n)}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}});var Ge,ut,Dr=b(()=>{"use strict";B();ut=class extends T{constructor(e,t,r,i,s,o=[]){super(void 0,s);k(this,Ge);U(this,"closed");U(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),A(this,Ge,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,r);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:r,lastChild:i}=this,[s,o]=c(this,Ge);return t?`<${s}${r.toString(e)}/>`:`<${s}${r.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,Ge);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,Ge)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,Ge);return super.print(this.selfClosing?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};Ge=new WeakMap});var oi,Hr,go,Xe,ai=b(()=>{"use strict";j();De();R();Dr();oi=[ge(!1)];Xe=class extends(go=ut){get type(){return"include"}constructor(n,e="",t,r,i,s){super(n,e,t!=null?t:"",t===void 0||r!=null?r:"",i,s)}toString(n){return n?"":super.toString()}lint(n=this.getAbsoluteIndex()){if(this.closed)return[];let e=$(this,{start:n},"unclosed-comment",f.msg("unclosed $1",`<${this.name}>`));return e.suggestions=[{desc:"close",range:[e.endIndex,e.endIndex],text:`</${this.name}>`}],[e]}};Hr=oe(go),Xe=le(Hr,0,"IncludeToken",oi,Xe),ae(Hr,1,Xe)});var po,Z,li,di,dr,Vr,gi,Gt,ui,ci,hi,pi,lr,uo,co,ho,zt,ct,K,Ce,ht,mi=b(()=>{"use strict";j();Q();X();we();R();B();Ne();po=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-level","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),Z=new Set(["align"]),li=new Set(["cite"]),di=new Set(["cite","datetime"]),dr=new Set(["width"]),Vr=new Set(["axis","align","bgcolor","height","width","valign"]),gi=new Set([...Vr,"abbr","headers","scope","rowspan","colspan"]),Gt=new Set(["type"]),ui=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ci=new Set(["clear"]),hi=new Set(["bgcolor","align","valign"]),pi={div:Z,h1:Z,h2:Z,h3:Z,h4:Z,h5:Z,h6:Z,blockquote:li,q:li,p:Z,br:ci,pre:dr,ins:di,del:di,ul:Gt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ui,"border"]),caption:Z,tr:hi,td:gi,th:gi,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:dr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails","type"]),poem:new Set(["compact","align"]),categorytree:new Set(["align","hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline","align"])},lr=new Set,uo={nowiki:lr,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:lr,inputbox:lr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:lr,poll:new Set(["id","show-results-before-voting"]),sm2:Gt,flashmp3:Gt,score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"])},co=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,ho={table:ui,td:new Set([...Vr,"scope"]),th:Vr,br:ci,caption:Z,div:Z,hr:dr,h1:Z,h2:Z,h3:Z,h4:Z,h5:Z,h6:Z,li:Gt,p:Z,pre:dr,tr:hi,ul:Gt},ht=class extends T{constructor(e,t,r,i="",s,o=[],l=f.getConfig(),g=[]){let p=new G(r,"attr-key",l,g),d;if(r==="title"||t==="img"&&r==="alt")d=new T(s,l,g,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"||t==="choose"&&(r==="before"||r==="after")){let u={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};d=new T(s,u,g,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new G(s,"attr-value",l,g,{});super(void 0,l,g);k(this,zt);k(this,ct);k(this,K);k(this,Ce);A(this,zt,e),this.append(p,d),A(this,K,i),A(this,Ce,[...o]),A(this,ct,t),this.setAttribute("name",te(r).trim().toLowerCase())}get type(){return c(this,zt)}get tag(){return c(this,ct)}get balanced(){return!c(this,K)||c(this,Ce)[0]===c(this,Ce)[1]}afterBuild(){c(this,K).includes("\0")&&A(this,K,this.buildFromStr(c(this,K),0)),this.parentNode&&A(this,ct,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",r=""]=c(this,Ce);return c(this,K)?super.toString(e,c(this,K)+t)+r:this.firstChild.toString(e)}text(){return c(this,K)?`${super.text(`${c(this,K).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,K)?c(this,K).length+((t=(e=c(this,Ce)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var m,x;let r=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:g,tag:p}=this,d=this.getValue(),u=new I(this,e);if(!i){let y=S(o,u,"unclosed-quote",f.msg("unclosed $1","quotes"),"warning");y.startIndex--,y.startCol--;let L={range:[y.endIndex,y.endIndex],text:c(this,Ce)[0]};o.childNodes.some(({type:w,data:C})=>w==="text"&&/\s/u.test(C))?y.suggestions=[{desc:"close",...L}]:y.fix=L,r.push(y)}let h=uo[p];if(h&&!h.has(g)||(l==="ext-attr"?p in pi:!/\{\{[^{]+\}\}/u.test(g))&&!((m=pi[p])!=null&&m.has(g))&&!/^(?:xmlns:[\w:.-]+|data-[^:]*)$/u.test(g)&&(p==="meta"||p==="link"||!po.has(g)))r.push(S(s,u,"illegal-attr","illegal attribute name"));else if((x=ho[p])!=null&&x.has(g))r.push(S(s,u,"obsolete-attr","obsolete attribute","warning"));else if(g==="style"&&typeof d=="string"&&co.test(d))r.push(S(o,u,"insecure-style","insecure style"));else if(g==="tabindex"&&typeof d=="string"&&d!=="0"){let y=S(o,u,"illegal-attr","nonzero tabindex");y.suggestions=[{desc:"remove",range:[e,y.endIndex],text:""},{desc:"0 tabindex",range:[y.startIndex,y.endIndex],text:"0"}],r.push(y)}return r}getValue(){return c(this,K)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Ce);return c(this,K)?super.print({sep:at(c(this,K))+e,post:t}):super.print()}};zt=new WeakMap,ct=new WeakMap,K=new WeakMap,Ce=new WeakMap});var gr,fi,mo,Mt,ze,pr=b(()=>{"use strict";j();Q();X();R();B();Ne();mi();gr=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+c\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+c\x7F)*)(?:(["'])(.*?)(\3|$)|(\S*)))?/gsu,fi=a=>a.slice(0,-1),mo=a=>`${fi(a)}-dirty`,ze=class extends T{constructor(e,t,r,i=f.getConfig(),s=[]){super(void 0,i,s,{});k(this,Mt);if(A(this,Mt,t),this.setAttribute("name",r),e){gr.lastIndex=0;let o="",l=gr.exec(e),g=0,p=()=>{o&&(super.insertAt(new G(o,mo(t),i,s,{})),o="")};for(;l;){let{index:d,0:u,1:h,2:m,3:x,4:y,5:L,6:w}=l;if(o+=e.slice(g,d),/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test(te(h).trim())){let C=y!=null?y:w,v=[x,L],P=new ht(fi(t),r,h,m,C,v,i,s);p(),super.insertAt(P)}else o+=u;({lastIndex:g}=gr),l=gr.exec(e)}o+=e.slice(g),p()}}get type(){return c(this,Mt)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&e.subtype==="caption"&&this.setAttribute("name","caption"),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof ht&&(!e||t.name===e.toLowerCase().trim()))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{parentNode:i,length:s,childNodes:o}=this,l=new Map,g=new Set,p=new I(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let d=$(this,p,"no-ignored","attributes of a closing tag");d.fix={range:[e,d.endIndex],text:""},r.push(d)}for(let d=0;d<s;d++){let u=o[d];if(u instanceof G&&u.text().trim()){let h=S(u,p,"no-ignored","containing invalid attribute");h.suggestions=[{desc:"remove",range:[h.startIndex,h.endIndex],text:" "}],r.push(h)}else if(u instanceof ht){let{name:h}=u;l.has(h)?(g.add(h),l.get(h).push(u)):l.set(h,[u])}}if(g.size>0)for(let d of g)r.push(...l.get(d).map(u=>S(u,p,"no-duplicate",f.msg("duplicated $1 attribute",d))));return r}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof G?{class:"attr-dirty"}:void 0)).join("")}</span>`:""}};Mt=new WeakMap});var xi={};V(xi,{PreToken:()=>Xr});var Xr,Ti=b(()=>{"use strict";we();R();B();_e();Xr=class extends T{get type(){return"ext-inner"}constructor(n,e=f.getConfig(),t=[]){if(n){let r="<nowiki>",i="</nowiki>",{length:s}=r,o=n.indexOf(r),l=n.indexOf(i,o+s),g="";for(;o!==-1&&l!==-1;)new D(r,e,t),new D(i,e,t),g+=`${n.slice(0,o)}\0${t.length-1}c\x7F${n.slice(o+s,l)}\0${t.length}c\x7F`,n=n.slice(l+s+1),o=n.indexOf(r),l=n.indexOf(i,o+s);n=g+n}super(n,e,t,{}),this.setAttribute("stage",10)}getAttribute(n){return n==="plain"||super.getAttribute(n)}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*\/\s*(pre)\b/giu)}}});var bi={};V(bi,{ParamTagToken:()=>Wt});var Wt,Qr=b(()=>{"use strict";j();Q();R();B();Ne();Wt=class extends T{get type(){return"ext-inner"}constructor(n,e=f.getConfig(),t=[],r={}){if(super(void 0,e,t,{}),n){let i=G;this.append(...n.split(`
4
+ `).map(s=>new i(s,"param-line",e,t,{})))}}toString(n){return super.toString(n,`
5
5
  `)}text(){return super.text(`
6
- `)}getGaps(){return 1}lint(n=this.getAbsoluteIndex()){let e=new F(this,n);return this.childNodes.filter(t=>{let{childNodes:r}=t,i=r.findIndex(({type:o})=>o!=="text"),s=(i>=0?r.slice(0,i).map(String).join(""):t.toString()).trim();return s&&!(i>=0?/^[a-z]+(?:\[\])?\s*(?:=|$)/iu:/^[a-z]+(?:\[\])?\s*=/iu).test(s)}).map(t=>{let r=C(t,e,"no-ignored",f.msg("invalid parameter of <$1>",this.name));return r.suggestions=[{desc:"remove",range:[r.startIndex,r.endIndex],text:""}],r})}print(){return super.print({sep:`
7
- `})}}});var Ut,ft,ur,xt,Zr=k(()=>{"use strict";j();Q();R();B();gt();xt=class extends T{constructor(e,t,r=f.getConfig(),i=[]){super(void 0,r,i);y(this,ft);y(this,Ut);v(this,Ut,e);let s=new T(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new pe(t[1],/^[^\S\n]*$/u,"heading-trail",r,i,{});this.append(s,o)}get type(){return"heading"}get level(){return c(this,Ut)}toString(){let e=c(this,ft,ur);return e+this.firstChild.toString()+e+this.lastChild.toString()}text(){let e=c(this,ft,ur);return e+this.firstChild.text()+e}getAttribute(e){return e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=i.childNodes.filter(u=>u.type==="quote"),g=l.filter(({bold:u})=>u),p=l.filter(({italic:u})=>u),d=new F(this,e);return this.level===1&&r.push(C(i,d,"h1","<h1>")),(o.startsWith("=")||o.endsWith("="))&&r.push(C(i,d,"unbalanced-header",f.msg("unbalanced $1 in a section header",'"="'))),this.closest("html-attrs, table-attrs")&&r.push($(this,d,"parsing-order","section header in a HTML tag")),g.length%2&&r.push(C(g[g.length-1],{...d,start:e+s,left:d.left+s},"format-leakage",f.msg("unbalanced $1 in a section header","bold apostrophes"))),p.length%2&&r.push(C(p[p.length-1],{start:e+s},"format-leakage",f.msg("unbalanced $1 in a section header","italic apostrophes"))),r}print(){let e=c(this,ft,ur);return super.print({pre:e,sep:e})}json(){let e=super.json();return e.level=this.level,e}};Ut=new WeakMap,ft=new WeakSet,ur=function(){return"=".repeat(this.level)}});var mo,fo,cr,ki=k(()=>{"use strict";X();j();R();B();mo=a=>a.text().replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),fo=new RegExp(`https?://${Ae}${we}$`,"iu"),cr=class extends T{get type(){return"parameter"}get anon(){return this.firstChild.length===0}constructor(n,e,t=f.getConfig(),r=[]){super(void 0,t,r);let i=new T(typeof n=="number"?void 0:n,t,r,{}),s=new T(e,t,r);i.type="parameter-key",s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}afterBuild(){if(!this.anon){let{parentNode:n,firstChild:e}=this,t=mo(e);this.setAttribute("name",t),n&&n.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(){return this.anon?this.lastChild.toString():super.toString("=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(n=this.getAbsoluteIndex(),e){var s;let t=super.lint(n,e),{firstChild:r}=this,i=(s=fo.exec(r.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=C(r,{start:n},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(){let n=super.json();return n.anon=this.anon,n}}});var xo,Ht,Qe,Ze,Tt,yi,vi,Dt,Ai=k(()=>{"use strict";X();j();Q();Te();Se();R();B();ki();Ne();gt();xo=new Set(["pageid","articlepath","server","servername","scriptpath","stylepath"]),Dt=class extends T{constructor(e,t,r=f.getConfig(),i=[]){var u,h;super(void 0,r,i,{});y(this,Tt);U(this,"modifier","");y(this,Ht,"template");y(this,Qe,!1);y(this,Ze,new Map);let{parserFunction:[s,o]}=r,l=(u=/^(?:\s|\0\d+c\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:u[0];if(l)this.setAttribute("modifier",l),e=e.slice(l.length);else if(e.includes(":")){let[m,...x]=e.split(":"),[b]=/^(?:\s|\0\d+c\x7F)*/u.exec((h=x[0])!=null?h:"");this.setModifier(`${m}:${b}`)&&(e=x.join(":").slice(b.length))}let g=e.includes(":");if(g||t.length===0&&!c(this,Qe)){let[m,...x]=e.split(":"),b=le(m),E=b[x.length>0?"trimStart":"trim"](),S=E.toLowerCase(),w=s[S],A=o.includes(E);if(A||xo.has(w)||g&&w){this.setAttribute("name",w!=null?w:S),v(this,Ht,"magic-word");let P=new RegExp(String.raw`^\s*${E}\s*$`,A?"u":"iu"),q=new pe(m,P,"magic-word-name",r,i,{});if(super.insertAt(q),x.length>0&&t.unshift([x.join(":")]),this.name==="invoke")for(let V=0;V<2;V++){let re=t.shift();if(!re)break;let fe=new z(re.join("="),`invoke-${V?"function":"module"}`,r,i);super.insertAt(fe)}}}if(this.type==="template"){let m=le(e).trim();if(!this.normalizeTitle(m,10,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let x=new z(e,"template-name",r,i,{});super.insertAt(x)}let p=this.isTemplate(),d=1;for(let m=0;m<t.length;m++){let x=t[m];!p&&!(this.name==="switch"&&m>0)&&(x[0]=x.join("="),x.length=1),x.length===1&&(x.unshift(d),d++),this.insertAt(new cr(...x,r,i))}this.seal("modifier")}get type(){return c(this,Ht)}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),i=le(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=r.includes(s);return c(this,Qe)&&o||!c(this,Qe)&&(l||e==="")||(ke.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),v(this,Qe,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild()}toString(){return`{{${this.modifier}${this.type==="magic-word"?`${this.firstChild.toString()}${this.length===1?"":":"}${this.childNodes.slice(1).map(String).join("|")}`:super.toString("|")}}}`}text(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?r.text()+(t===1?"":":")+de(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{type:i,childNodes:s,length:o}=this,l=new F(this,e);if(!this.isTemplate())return r;let g=I(this,Tt,yi).call(this);if(g.fragment!==void 0){let d=s[i==="template"?0:1],u=C(d,l,"no-ignored","useless fragment"),h=d.childNodes.find(m=>m.type==="text"&&m.data.includes("#"));h&&(u.fix={range:[u.startIndex+h.getRelativeIndex()+h.data.indexOf("#"),u.endIndex],text:""}),r.push(u)}if(g.valid||r.push(C(s[1],l,"invalid-invoke","illegal module name")),i==="magic-word"&&o===2)return r.push($(this,l,"invalid-invoke","missing module function")),r;let p=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));return p.length>0&&r.push(...p.flatMap(([,d])=>d).map(d=>C(d,l,"no-duplicate","duplicated parameter"))),r}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?I(this,Tt,vi).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Ke("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,r=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,Ze).has(i)?s=c(this,Ze).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,Ze).set(i,s)),s}getDuplicatedArgs(){return[...c(this,Ze)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:r}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}let s=r.slice(i,i+2).map(({childNodes:[,o]})=>o);for(let o=0;o<s.length;){let{length:l,0:g}=s[o].childNodes.filter(p=>p.text().trim());if(l===0)s.splice(o,1);else if(l>1||g.type!=="magic-word")o++;else try{let p=g.getPossibleValues();s.splice(o,1,...p),o+=p.length}catch(p){o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${lt(i)}${s==="magic-word"?r.print()+(t===1?"":":")+$e(e.slice(1),{sep:"|"}):$e(e,{sep:"|"})}}}</span>`}};Ht=new WeakMap,Qe=new WeakMap,Ze=new WeakMap,Tt=new WeakSet,yi=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return this.normalizeTitle(t.text(),e?10:828)},vi=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let i=r?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);o!==l&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var wi,Kr,To,Je,Si=k(()=>{"use strict";De();B();wi=[ge(!0)];Je=class extends(To=T){get type(){return"hidden"}};Kr=se(To),Je=ae(Kr,0,"HiddenToken",wi,Je),oe(Kr,1,Je)});var hr,Ci=k(()=>{"use strict";X();j();Q();R();B();Ne();Si();hr=class extends T{get type(){return"arg"}get default(){var n,e;return(e=(n=this.childNodes[1])==null?void 0:n.text())!=null?e:!1}constructor(n,e=f.getConfig(),t=[]){super(void 0,e,t,{});for(let r=0;r<n.length;r++)if(r===0){let i=new z(n[r],"arg-name",e,t,{});super.insertAt(i)}else if(r>1){let i=new Je(n[r],e,t);super.insertAt(i)}else{let i=new T(n[r],e,t);i.type="arg-default",i.setAttribute("stage",2),super.insertAt(i)}}toString(){return`{{{${super.toString("|")}}}}`}text(){return`{{{${de(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(n){return n==="padding"?3:super.getAttribute(n)}getGaps(){return 1}lint(n=this.getAbsoluteIndex(),e){let{childNodes:[t,r,...i]}=this;if(!this.getAttribute("include")){let o=$(this,{start:n},"no-arg","unexpected template argument");return r&&(o.fix={range:[n,o.endIndex],text:r.text()}),[o]}let s=t.lint(n+3,e);if(r&&s.push(...r.lint(n+4+t.toString().length,e)),i.length>0){let o=new F(this,n);s.push(...i.map(l=>{let g=C(l,o,"no-ignored","invisible content inside triple braces");return g.startIndex--,g.startCol--,g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""},{desc:"escape",range:[g.startIndex,g.startIndex+1],text:"{{!}}"}],g}))}return s}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(){let n=super.json();return n.default=this.default,n}}});var $i={};H($i,{parseBraces:()=>Jr});var bo,mr,ko,Jr,Yr=k(()=>{"use strict";X();Zr();Ai();Ci();bo={"=":`
8
- `,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},mr=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"]]),ko=new RegExp(String.raw`\{\{\s*(${[...mr.keys()].map(rr).join("|")})\s*\}\}(?!\})`,"gu"),Jr=(a,n,e)=>{var u,h,m,x,b,E;let t=String.raw`${(u=n.excludes)!=null&&u.includes("heading")?"":String.raw`^(\0\d+c\x7F)*={1,6}|`}\[\[|-\{(?!\{)`,r=String.raw`|\{{2,}`,{parserFunction:[,,,i]}=n,s=[];a=a.replace(ko,(S,w)=>(new Dt(S.slice(2,-2),[],n,e),`\0${e.length-2}${mr.get(w)}\x7F`));let o=a.lastIndexOf("}}")-a.length,l=o+a.length!==-1,g=new RegExp(t+(l?r:""),"gmu"),p=g.exec(a),d;for(;p||d!==void 0&&d<=a.length&&((m=(h=s[s.length-1])==null?void 0:h[0])!=null&&m.startsWith("="));){if(p!=null&&p[1]){let[,{length:W}]=p;p[0]=p[0].slice(W),p.index+=W}let{0:S,index:w}=p!=null?p:{0:`
9
- `,index:a.length},A=(x=s.pop())!=null?x:{},{0:L,index:P,parts:q,findEqual:V,pos:re}=A,fe=S==="="&&V,Re=W=>{q[q.length-1].push(W.slice(re,w))};if(S==="]]"||S==="}-")d=w+2;else if(S===`
10
- `){d=w+1;let{pos:W,findEqual:N}=(b=s[s.length-1])!=null?b:{};if(W===void 0||N||le(a.slice(W,P))!==""){let xe=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(a.slice(P,w));xe&&(a=`${a.slice(0,P)}\0${e.length}h\x7F${a.slice(w)}`,d=P+4+String(e.length).length,new xt(xe[1].length,xe.slice(2),n,e))}}else if(S==="|"||fe)d=w+1,Re(a),S==="|"&&q.push([]),A.pos=d,A.findEqual=S==="|",s.push(A);else if(S.startsWith("}}")){let W=S.slice(0,Math.min(L.length,3)),N=L.length-W.length,{length:xe}=e;d=w+W.length,Re(a);let ye=!1,Pe="t";if(W.length===3){let ee=q.map(it=>it.join("=")),ve=ee.length>1&&le(ee[1]).trim();new hr(ee,n,e),ve&&ve.endsWith(":")&&i.includes(ve.slice(0,-1).toLowerCase())&&(Pe="s")}else try{new Dt(q[0][0],q.slice(1),n,e);let ee=le(q[0][0]).trim();mr.has(ee)?Pe=mr.get(ee):/^(?:filepath|(?:full|canonical)urle?):.|^server$/iu.test(ee)?Pe="m":/^#vardefine:./iu.test(ee)&&(Pe="c")}catch(ee){if(ee instanceof SyntaxError&&ee.message==="Invalid template name")ye=!0;else throw ee}ye||(a=`${a.slice(0,P+N)}\0${xe}${Pe}\x7F${a.slice(d)}`,d=P+N+3+String(xe).length,N>1?s.push({0:L.slice(0,N),index:P,pos:P+N,parts:[[]]}):N===1&&a[P-1]==="-"&&s.push({0:"-{",index:P-1,pos:P+1,parts:[[]]}))}else d=w+S.length,S.startsWith("{")&&(p.pos=d,p.parts=[[]]),s.push(..."0"in A?[A]:[],p);let ie=s[s.length-1];if(l&&o+a.length<d)for(l=!1;(E=ie==null?void 0:ie[0])!=null&&E.startsWith("{");)s.pop(),ie=s[s.length-1];g=new RegExp(t+(l?r:"")+(ie?`|${bo[ie[0][0]]}${ie.findEqual?"|=":""}`:""),"gmu"),g.lastIndex=d,p=g.exec(a)}return a}});var Ni={};H(Ni,{InputboxToken:()=>en});var en,Ei=k(()=>{"use strict";Yr();R();Qr();en=class extends Wt{constructor(n,e=f.getConfig(),t=[]){let r=Symbol("InputboxToken"),{length:i}=t;t.push(r),n&&(n=Jr(n,e,t)),t.splice(i,1),super(n,e,t,{})}}});var Ii,tn,yo,Ee,rn=k(()=>{"use strict";j();De();R();qe();Ii=[ge()];Ee=class extends(yo=Y){constructor(e,t=!0,r,i){super(e,r,i);U(this,"closed");this.closed=t}get type(){return"comment"}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=$(this,{start:e},"unclosed-comment",f.msg("unclosed $1","HTML comment"));return t.fix={range:[t.endIndex,t.endIndex],text:"-->"},[t]}toString(){return`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}};tn=se(yo),Ee=ae(tn,0,"CommentToken",Ii,Ee),oe(tn,1,Ee)});var fr={};H(fr,{NestedToken:()=>nn});var nn,xr=k(()=>{"use strict";j();Q();R();B();sn();_e();rn();nn=class extends T{get type(){return"ext-inner"}constructor(n,e,t,r=f.getConfig(),i=[]){n=n==null?void 0:n.replace(e,(s,o,l,g,p)=>{let d=`\0${i.length+1}${o?"e":"c"}\x7F`;if(o)new bt(o,l,g,p,r,i);else{let u=s.endsWith("-->");new Ee(s.slice(4,u?-3:void 0),u,r,i)}return d}).replace(/(^|\0\d+[ce]\x7F)([^\0]+)(?=$|\0\d+[ce]\x7F)/gu,(s,o,l)=>(new D(l,r,i),`${o}\0${i.length}c\x7F`)),super(n,r,i,{})}lint(n=this.getAbsoluteIndex(),e){let t=new F(this,n);return[...super.lint(n,e),...this.childNodes.filter(r=>{if(r.type==="ext"||r.type==="comment")return!1;let i=r.toString().trim();return i&&!/^<!--.*-->$/su.test(i)}).map(r=>{let i=C(r,t,"no-ignored",f.msg("invalid content in <$1>",this.name));return i.suggestions=[{desc:"remove",range:[i.startIndex,i.endIndex],text:""},{desc:"comment",range:[i.startIndex,i.startIndex],text:`<!--${r.toString()}-->`}],i})]}}});function Li(a,n,e,t,r){n=n.trim();let i=n.replace(/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(!i||new RegExp(String.raw`^(?:(?:${e.protocol}|//)${Ae}|\0\d+m\x7F)${we}$`,"iu").test(i))return n;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2));let o=f.normalizeTitle(i,0,!1,e,t,!0,!0);return o.valid&&o}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var vo,te,br,Fi,Tr,Ri=k(()=>{"use strict";X();j();R();B();vo=new Set(["alt","link","lang","page","caption"]);Tr=class extends T{constructor(e,t,r=f.getConfig(),i){var n=(...Gd)=>(super(...Gd),y(this,br),y(this,te,""),this);var g;let s,o=Object.entries(r.img).map(([p,d])=>[p,d,new RegExp(String.raw`^(\s*(?!\s))${p.replace("$1","(.*)")}${p.endsWith("$1")?`(?=$|
11
- )`:""}(\s*)$`,"u")]),l=o.find(([,p,d])=>(s=d.exec(e),s&&(s.length!==4||Li(p,s[2],r,!0,t)!==!1)));if(l&&s){s.length===3?(n(void 0,r,i),v(this,te,e)):(n(s[2],r,i,{}),v(this,te,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}n(e,{...r,excludes:[...(g=r.excludes)!=null?g:[],"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?Li("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!vo.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(){return c(this,te)?c(this,te).replace("$1",super.toString()):super.toString()}text(){return c(this,te)?c(this,te).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,c(this,te).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=$(this,{start:e},"invalid-gallery","invalid gallery image parameter");o.fix={range:[e,e+o.endIndex],text:""},r.push(o)}else typeof i=="object"&&i.encoded&&r.push($(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link"));return r}getValue(){return this.name==="invalid"?this.text():I(this,br,Fi).call(this)||super.text()}print(){return c(this,te)?`<span class="wpb-image-parameter">${c(this,te).replace("$1",`<span class="wpb-image-caption">${$e(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};te=new WeakMap,br=new WeakSet,Fi=function(){return c(this,te)&&!c(this,te).includes("$1")}});var on,an,ln,Ao,kt,kr,yt,dn=k(()=>{"use strict";X();j();Q();R();Gt();Ri();on=new Set(["manualthumb","frameless","framed","thumbnail"]),an=new Set(["left","right","center","none"]),ln=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),Ao=(a,n,e,t)=>{if(t===void 0)return[];let r=new RegExp(`${[a,n,e].map(rr).join("|")}`,"gu"),i=[],s=r.exec(t),o=0,l=0;for(;s;){let{0:g,index:p}=s;g!==e?o+=g===a?1:-1:o===0&&(i.push(t.slice(l,p)),{lastIndex:l}=r),s=r.exec(t)}return i.push(t.slice(l)),i},yt=class extends Ce{constructor(e,t,r=f.getConfig(),i=[],s="|"){super(e,void 0,r,i,s);y(this,kt);let{extension:o}=this.getTitle(!0);this.append(...Ao("-{","}-","|",t).map(l=>new Tr(l,o,r,i)))}get type(){return"file"}get extension(){return this.getTitle().extension}lint(e=this.getAbsoluteIndex(),t){var u;let r=super.lint(e,t),i=this.getAllArgs().filter(({childNodes:h})=>{let m=h.filter(x=>x.text().trim());return m.length!==1||m[0].type!=="arg"}),s=[...new Set(i.map(({name:h})=>h))].filter(h=>h!=="invalid"),o=s.filter(h=>on.has(h)),l=s.filter(h=>an.has(h)),g=s.filter(h=>ln.has(h)),p=new F(this,e);if(this.closest("ext-link-text")&&((u=this.getValue("link"))==null?void 0:u.trim())!==""&&r.push($(this,p,"nested-link","internal link in an external link")),i.length===s.length&&o.length<2&&l.length<2&&g.length<2)return r;let d=(h,m)=>x=>C(x,p,"no-duplicate",f.msg(`${h} image $1 parameter`,m));for(let h of s){let m=i.filter(({name:x})=>x===h);h==="caption"&&(m=[...m.slice(0,-1).filter(x=>x.text()),...m.slice(-1)]),m.length>1&&r.push(...m.map(d("duplicated",h)))}return o.length>1&&r.push(...i.filter(({name:h})=>on.has(h)).map(d("conflicting","frame"))),l.length>1&&r.push(...i.filter(({name:h})=>an.has(h)).map(d("conflicting","horizontal-alignment"))),g.length>1&&r.push(...i.filter(({name:h})=>ln.has(h)).map(d("conflicting","vertical-alignment"))),r}getAllArgs(){return this.childNodes.slice(1)}getArgs(e){return this.getAllArgs().filter(({name:t})=>e===t)}getFrameArgs(){return I(this,kt,kr).call(this,on,"frame")}getHorizAlignArgs(){return I(this,kt,kr).call(this,an,"horizontal-align")}getVertAlignArgs(){return I(this,kt,kr).call(this,ln,"vertical-align")}getArg(e){let t=this.getArgs(e);return t[t.length-1]}getValue(e){var t;return(t=this.getArg(e))==null?void 0:t.getValue()}};kt=new WeakSet,kr=function(e,t){return this.getAllArgs().filter(({name:i})=>e.has(i))}});var vt,gn=k(()=>{"use strict";j();Se();R();B();dn();vt=class extends yt{constructor(e,t,r,i=f.getConfig(),s=[]){let o;if(r!==void 0){let{length:l}=s;o=new T(r,i,s);for(let g=1;g<11;g++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);U(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${e}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(){let e=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),e?0:6,!0,!e)}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{ns:i,interwiki:s}=this.getAttribute("title");return(s||i!==6)&&r.push($(this,{start:e},"invalid-gallery","invalid gallery image")),r}}});var Bi={};H(Bi,{GalleryToken:()=>pn});var yr,Pi,pn,ji=k(()=>{"use strict";R();B();gn();_e();pn=class extends T{constructor(e,t=f.getConfig(),r=[]){var i;super(void 0,t,r,{});y(this,yr);for(let s of(i=e==null?void 0:e.split(`
12
- `))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new D(s,t,r):s);continue}let[,l,g]=o;I(this,yr,Pi).call(this,l)?super.insertAt(new vt("gallery",l,g,t,r)):super.insertAt(new D(s,t,r))}}get type(){return"ext-inner"}toString(){return super.toString(`
6
+ `)}getGaps(){return 1}lint(n=this.getAbsoluteIndex()){let e=new I(this,n);return this.childNodes.filter(t=>{let{childNodes:r}=t,i=r.findIndex(({type:o})=>o!=="text"),s=(i>=0?r.slice(0,i).map(String).join(""):t.toString()).trim();return s&&!(i>=0?/^[a-z]+(?:\[\])?\s*(?:=|$)/iu:/^[a-z]+(?:\[\])?\s*=/iu).test(s)}).map(t=>{let r=S(t,e,"no-ignored",f.msg("invalid parameter of <$1>",this.name));return r.suggestions=[{desc:"remove",range:[r.startIndex,r.endIndex],text:""}],r})}print(){return super.print({sep:`
7
+ `})}}});var Ut,mt,ur,ft,Zr=b(()=>{"use strict";j();Q();xe();R();B();dt();ft=class extends T{constructor(e,t,r=f.getConfig(),i=[]){super(void 0,r,i);k(this,mt);k(this,Ut);A(this,Ut,e);let s=new T(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new pe(t[1],/^[^\S\n]*$/u,"heading-trail",r,i,{});this.append(s,o)}get type(){return"heading"}get level(){return c(this,Ut)}toString(e){let t=c(this,mt,ur);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=c(this,mt,ur);return e+this.firstChild.text()+e}getAttribute(e){return e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=i.childNodes.filter(xt("quote")),g=l.filter(({bold:u})=>u),p=l.filter(({italic:u})=>u),d=new I(this,e);return this.level===1&&r.push(S(i,d,"h1","<h1>")),(o.startsWith("=")||o.endsWith("="))&&r.push(S(i,d,"unbalanced-header",f.msg("unbalanced $1 in a section header",'"="'))),this.closest("html-attrs, table-attrs")&&r.push($(this,d,"parsing-order","section header in a HTML tag")),g.length%2&&r.push(S(g[g.length-1],{...d,start:e+s,left:d.left+s},"format-leakage",f.msg("unbalanced $1 in a section header","bold apostrophes"))),p.length%2&&r.push(S(p[p.length-1],{start:e+s},"format-leakage",f.msg("unbalanced $1 in a section header","italic apostrophes"))),r}print(){let e=c(this,mt,ur);return super.print({pre:e,sep:e})}json(){let e=super.json();return e.level=this.level,e}};Ut=new WeakMap,mt=new WeakSet,ur=function(){return"=".repeat(this.level)}});var fo,cr,ki=b(()=>{"use strict";X();j();R();B();fo=new RegExp(`https?://${ve}${Ae}$`,"iu"),cr=class extends T{get type(){return"parameter"}get anon(){return this.firstChild.length===0}constructor(n,e,t=f.getConfig(),r=[]){super(void 0,t,r);let i=new T(typeof n=="number"?void 0:n,t,r,{}),s=new T(e,t,r);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(n,e=!0){let t=(typeof n=="string"?n:n.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:n,firstChild:e}=this,t=this.trimName(e);n&&n.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(n){return this.anon?this.lastChild.toString(n):super.toString(n,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(n=this.getAbsoluteIndex(),e){var s;let t=super.lint(n,e),{firstChild:r}=this,i=(s=fo.exec(r.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=S(r,{start:n},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(){let n=super.json();return n.anon=this.anon,n}}});var xo,Ht,Qe,Ze,Tt,yi,vi,Dt,Ai=b(()=>{"use strict";X();j();Q();xe();we();R();B();ki();Ne();dt();xo=new Set(["pageid","articlepath","server","servername","scriptpath","stylepath"]),Dt=class extends T{constructor(e,t,r=f.getConfig(),i=[]){var u,h;super(void 0,r,i,{});k(this,Tt);U(this,"modifier","");k(this,Ht,"template");k(this,Qe,!1);k(this,Ze,new Map);let{parserFunction:[s,o]}=r,l=(u=/^(?:\s|\0\d+c\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:u[0];if(l)this.setAttribute("modifier",l),e=e.slice(l.length);else if(e.includes(":")){let[m,...x]=e.split(":"),[y]=/^(?:\s|\0\d+c\x7F)*/u.exec((h=x[0])!=null?h:"");this.setModifier(`${m}:${y}`)&&(e=x.join(":").slice(y.length))}let g=e.includes(":");if(g||t.length===0&&!c(this,Qe)){let[m,...x]=e.split(":"),y=te(m),L=y[x.length>0?"trimStart":"trim"](),w=L.toLowerCase(),C=s[w],v=o.includes(L);if(v||xo.has(C)||g&&C){this.setAttribute("name",C!=null?C:w),A(this,Ht,"magic-word");let F=new RegExp(String.raw`^\s*${L}\s*$`,v?"u":"iu"),z=new pe(m,F,"magic-word-name",r,i,{});if(super.insertAt(z),x.length>0&&t.unshift([x.join(":")]),this.name==="invoke")for(let H=0;H<2;H++){let ne=t.shift();if(!ne)break;let me=new G(ne.join("="),`invoke-${H?"function":"module"}`,r,i);super.insertAt(me)}}}if(this.type==="template"){let m=te(e).trim();if(!this.normalizeTitle(m,10,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let x=new G(e,"template-name",r,i,{});super.insertAt(x)}let p=this.isTemplate(),d=1;for(let m=0;m<t.length;m++){let x=t[m];!p&&!(this.name==="switch"&&m>0)&&(x[0]=x.join("="),x.length=1),x.length===1&&(x.unshift(d),d++),this.insertAt(new cr(...x,r,i))}this.seal("modifier")}get type(){return c(this,Ht)}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),i=te(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=r.includes(s);return c(this,Qe)&&o||!c(this,Qe)&&(l||e==="")||(be.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),A(this,Qe,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild()}toString(e){return`{{${this.modifier}${this.type==="magic-word"?`${this.firstChild.toString(e)}${this.length===1?"":":"}${this.childNodes.slice(1).map(t=>t.toString(e)).join("|")}`:super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?r.text()+(t===1?"":":")+de(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);if(!this.isTemplate())return r;let{type:i,childNodes:s,length:o}=this,l=new I(this,e),g=i==="magic-word";if(g&&!E(this,Tt,yi).call(this).valid)r.push(S(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[g?1:0],u=d.childNodes.find(h=>h.type==="text"&&h.data.includes("#"));if(u){let h=S(d,l,"no-ignored","useless fragment");h.fix={range:[h.startIndex+u.getRelativeIndex()+u.data.indexOf("#"),h.endIndex],text:""},r.push(h)}}if(g&&o===2)return r.push($(this,l,"invalid-invoke","missing module function")),r;let p=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));return p.length>0&&r.push(...p.flatMap(([,d])=>d).map(d=>S(d,l,"no-duplicate","duplicated parameter"))),r}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?E(this,Tt,vi).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(xt("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,r=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,Ze).has(i)?s=c(this,Ze).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,Ze).set(i,s)),s}getDuplicatedArgs(){return[...c(this,Ze)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:r}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}let s=r.slice(i,i+2).map(({childNodes:[,o]})=>o);for(let o=0;o<s.length;){let{length:l,0:g}=s[o].childNodes.filter(p=>p.text().trim());if(l===0)s.splice(o,1);else if(l>1||g.type!=="magic-word")o++;else try{let p=g.getPossibleValues();s.splice(o,1,...p),o+=p.length}catch(p){o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${at(i)}${s==="magic-word"?r.print()+(t===1?"":":")+$e(e.slice(1),{sep:"|"}):$e(e,{sep:"|"})}}}</span>`}};Ht=new WeakMap,Qe=new WeakMap,Ze=new WeakMap,Tt=new WeakSet,yi=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return this.normalizeTitle(t.toString(!0),e?10:828)},vi=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let i=r?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);o!==l&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var wi,Kr,To,Ke,Si=b(()=>{"use strict";De();B();wi=[ge()];Ke=class extends(To=T){get type(){return"hidden"}};Kr=oe(To),Ke=le(Kr,0,"HiddenToken",wi,Ke),ae(Kr,1,Ke)});var hr,Ci=b(()=>{"use strict";X();j();Q();R();B();Ne();Si();hr=class extends T{get type(){return"arg"}get default(){var n,e;return(e=(n=this.childNodes[1])==null?void 0:n.text())!=null?e:!1}constructor(n,e=f.getConfig(),t=[]){super(void 0,e,t,{});for(let r=0;r<n.length;r++)if(r===0){let i=new G(n[r],"arg-name",e,t,{});super.insertAt(i)}else if(r>1){let i=new Ke(n[r],e,t);super.insertAt(i)}else{let i=new T(n[r],e,t);i.type="arg-default",i.setAttribute("stage",2),super.insertAt(i)}}toString(n){return`{{{${super.toString(n,"|")}}}}`}text(){return`{{{${de(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(n){return n==="padding"?3:super.getAttribute(n)}getGaps(){return 1}lint(n=this.getAbsoluteIndex(),e){let{childNodes:[t,r,...i]}=this;if(!this.getAttribute("include")){let o=$(this,{start:n},"no-arg","unexpected template argument");return r&&(o.fix={range:[n,o.endIndex],text:r.text()}),[o]}let s=t.lint(n+3,e);if(r&&s.push(...r.lint(n+4+t.toString().length,e)),i.length>0){let o=new I(this,n);s.push(...i.map(l=>{let g=S(l,o,"no-ignored","invisible content inside triple braces");return g.startIndex--,g.startCol--,g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""},{desc:"escape",range:[g.startIndex,g.startIndex+1],text:"{{!}}"}],g}))}return s}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(){let n=super.json();return n.default=this.default,n}}});var $i={};V($i,{parseBraces:()=>Jr});var bo,mr,ko,Jr,Yr=b(()=>{"use strict";X();Zr();Ai();Ci();bo={"=":`
8
+ `,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},mr=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"]]),ko=new RegExp(String.raw`\{\{\s*(${[...mr.keys()].map(rr).join("|")})\s*\}\}(?!\})`,"gu"),Jr=(a,n,e)=>{var u,h,m,x,y,L;let t=String.raw`${(u=n.excludes)!=null&&u.includes("heading")?"":String.raw`^(\0\d+c\x7F)*={1,6}|`}\[\[|-\{(?!\{)`,r=String.raw`|\{{2,}`,{parserFunction:[,,,i]}=n,s=[];a=a.replace(ko,(w,C)=>(new Dt(w.slice(2,-2),[],n,e),`\0${e.length-2}${mr.get(C)}\x7F`));let o=a.lastIndexOf("}}")-a.length,l=o+a.length!==-1,g=new RegExp(t+(l?r:""),"gmu"),p=g.exec(a),d;for(;p||d!==void 0&&d<=a.length&&((m=(h=s[s.length-1])==null?void 0:h[0])!=null&&m.startsWith("="));){if(p!=null&&p[1]){let[,{length:W}]=p;p[0]=p[0].slice(W),p.index+=W}let{0:w,index:C}=p!=null?p:{0:`
9
+ `,index:a.length},v=(x=s.pop())!=null?x:{},{0:P,index:F,parts:z,findEqual:H,pos:ne}=v,me=w==="="&&H,Re=W=>{z[z.length-1].push(W.slice(ne,C))};if(w==="]]"||w==="}-")d=C+2;else if(w===`
10
+ `){d=C+1;let{pos:W,findEqual:N}=(y=s[s.length-1])!=null?y:{};if(W===void 0||N||te(a.slice(W,F))!==""){let fe=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(a.slice(F,C));fe&&(a=`${a.slice(0,F)}\0${e.length}h\x7F${a.slice(C)}`,d=F+4+String(e.length).length,new ft(fe[1].length,fe.slice(2),n,e))}}else if(w==="|"||me)d=C+1,Re(a),w==="|"&&z.push([]),v.pos=d,v.findEqual=w==="|",s.push(v);else if(w.startsWith("}}")){let W=w.slice(0,Math.min(P.length,3)),N=P.length-W.length,{length:fe}=e;d=C+W.length,Re(a);let ke=!1,Pe="t";if(W.length===3){let ee=z.map(nt=>nt.join("=")),ye=ee.length>1&&te(ee[1]).trim();new hr(ee,n,e),ye&&ye.endsWith(":")&&i.includes(ye.slice(0,-1).toLowerCase())&&(Pe="s")}else try{new Dt(z[0][0],z.slice(1),n,e);let ee=te(z[0][0]).trim();mr.has(ee)?Pe=mr.get(ee):/^(?:filepath|(?:full|canonical)urle?):.|^server$/iu.test(ee)?Pe="m":/^#vardefine:./iu.test(ee)&&(Pe="c")}catch(ee){if(ee instanceof SyntaxError&&ee.message==="Invalid template name")ke=!0;else throw ee}ke||(a=`${a.slice(0,F+N)}\0${fe}${Pe}\x7F${a.slice(d)}`,d=F+N+3+String(fe).length,N>1?s.push({0:P.slice(0,N),index:F,pos:F+N,parts:[[]]}):N===1&&a[F-1]==="-"&&s.push({0:"-{",index:F-1,pos:F+1,parts:[[]]}))}else d=C+w.length,w.startsWith("{")&&(p.pos=d,p.parts=[[]]),s.push(..."0"in v?[v]:[],p);let se=s[s.length-1];if(l&&o+a.length<d)for(l=!1;(L=se==null?void 0:se[0])!=null&&L.startsWith("{");)s.pop(),se=s[s.length-1];g=new RegExp(t+(l?r:"")+(se?`|${bo[se[0][0]]}${se.findEqual?"|=":""}`:""),"gmu"),g.lastIndex=d,p=g.exec(a)}return a}});var Ni={};V(Ni,{InputboxToken:()=>en});var en,Ei=b(()=>{"use strict";Yr();R();Qr();en=class extends Wt{constructor(n,e=f.getConfig(),t=[]){let r=Symbol("InputboxToken"),{length:i}=t;t.push(r),n&&(n=Jr(n,e,t)),t.splice(i,1),super(n,e,t,{})}}});var Ii,tn,yo,Ee,rn=b(()=>{"use strict";j();De();R();qe();Ii=[ge(!1)];Ee=class extends(yo=Y){constructor(e,t=!0,r,i){super(e,r,i);U(this,"closed");this.closed=t}get type(){return"comment"}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=$(this,{start:e},"unclosed-comment",f.msg("unclosed $1","HTML comment"));return t.fix={range:[t.endIndex,t.endIndex],text:"-->"},[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}};tn=oe(yo),Ee=le(tn,0,"CommentToken",Ii,Ee),ae(tn,1,Ee)});var fr={};V(fr,{NestedToken:()=>nn});var nn,xr=b(()=>{"use strict";j();Q();R();B();sn();_e();rn();nn=class extends T{get type(){return"ext-inner"}constructor(n,e,t,r=f.getConfig(),i=[]){n=n==null?void 0:n.replace(e,(s,o,l,g,p)=>{let d=`\0${i.length+1}${o?"e":"c"}\x7F`;if(o)new bt(o,l,g,p,r,i);else{let u=s.endsWith("-->");new Ee(s.slice(4,u?-3:void 0),u,r,i)}return d}).replace(/(^|\0\d+[ce]\x7F)([^\0]+)(?=$|\0\d+[ce]\x7F)/gu,(s,o,l)=>(new D(l,r,i),`${o}\0${i.length}c\x7F`)),super(n,r,i,{})}lint(n=this.getAbsoluteIndex(),e){let t=new I(this,n);return[...super.lint(n,e),...this.childNodes.filter(r=>{if(r.type==="ext"||r.type==="comment")return!1;let i=r.toString().trim();return i&&!/^<!--.*-->$/su.test(i)}).map(r=>{let i=S(r,t,"no-ignored",f.msg("invalid content in <$1>",this.name));return i.suggestions=[{desc:"remove",range:[i.startIndex,i.endIndex],text:""},{desc:"comment",range:[i.startIndex,i.startIndex],text:`<!--${r.toString()}-->`}],i})]}}});function Li(a,n,e,t,r){n=n.trim();let i=n.replace(/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(!i||new RegExp(String.raw`^(?:(?:${e.protocol}|//)${ve}|\0\d+m\x7F)${Ae}$`,"iu").test(i))return n;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2));let o=f.normalizeTitle(i,0,!1,e,t,!0,!0);return o.valid&&o}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var vo,re,br,Fi,Tr,Ri=b(()=>{"use strict";X();j();R();B();vo=new Set(["alt","link","lang","page","caption"]);Tr=class extends T{constructor(e,t,r=f.getConfig(),i){var n=(...Gd)=>(super(...Gd),k(this,br),k(this,re,""),this);var g;let s,o=Object.entries(r.img).map(([p,d])=>[p,d,new RegExp(String.raw`^(\s*(?!\s))${p.replace("$1","(.*)")}${p.endsWith("$1")?`(?=$|
11
+ )`:""}(\s*)$`,"u")]),l=o.find(([,p,d])=>(s=d.exec(e),s&&(s.length!==4||Li(p,s[2],r,!0,t)!==!1)));if(l&&s){s.length===3?(n(void 0,r,i),A(this,re,e)):(n(s[2],r,i,{}),A(this,re,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}n(e,{...r,excludes:[...(g=r.excludes)!=null?g:[],"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?Li("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!vo.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,re)?c(this,re).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,re)?c(this,re).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,c(this,re).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=$(this,{start:e},"invalid-gallery","invalid gallery image parameter");o.fix={range:[e,e+o.endIndex],text:""},r.push(o)}else typeof i=="object"&&i.encoded&&r.push($(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link"));return r}getValue(){return this.name==="invalid"?this.text():E(this,br,Fi).call(this)||super.text()}print(){return c(this,re)?`<span class="wpb-image-parameter">${c(this,re).replace("$1",`<span class="wpb-image-caption">${$e(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};re=new WeakMap,br=new WeakSet,Fi=function(){return c(this,re)&&!c(this,re).includes("$1")}});var on,an,ln,Ao,kt,kr,yt,dn=b(()=>{"use strict";X();j();Q();R();Ot();Ri();on=new Set(["manualthumb","frameless","framed","thumbnail"]),an=new Set(["left","right","center","none"]),ln=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),Ao=(a,n,e,t)=>{if(t===void 0)return[];let r=new RegExp(`${[a,n,e].map(rr).join("|")}`,"gu"),i=[],s=r.exec(t),o=0,l=0;for(;s;){let{0:g,index:p}=s;g!==e?o+=g===a?1:-1:o===0&&(i.push(t.slice(l,p)),{lastIndex:l}=r),s=r.exec(t)}return i.push(t.slice(l)),i},yt=class extends Se{constructor(e,t,r=f.getConfig(),i=[],s="|"){super(e,void 0,r,i,s);k(this,kt);let{extension:o}=this.getTitle(!0);this.append(...Ao("-{","}-","|",t).map(l=>new Tr(l,o,r,i)))}get type(){return"file"}get extension(){return this.getTitle().extension}lint(e=this.getAbsoluteIndex(),t){var u;let r=super.lint(e,t),i=this.getAllArgs().filter(({childNodes:h})=>{let m=h.filter(x=>x.text().trim());return m.length!==1||m[0].type!=="arg"}),s=[...new Set(i.map(({name:h})=>h))].filter(h=>h!=="invalid"),o=s.filter(h=>on.has(h)),l=s.filter(h=>an.has(h)),g=s.filter(h=>ln.has(h)),p=new I(this,e);if(this.closest("ext-link-text")&&((u=this.getValue("link"))==null?void 0:u.trim())!==""&&r.push($(this,p,"nested-link","internal link in an external link")),i.length===s.length&&o.length<2&&l.length<2&&g.length<2)return r;let d=(h,m)=>x=>S(x,p,"no-duplicate",f.msg(`${h} image $1 parameter`,m));for(let h of s){let m=i.filter(({name:x})=>x===h);h==="caption"&&(m=[...m.slice(0,-1).filter(x=>x.text()),...m.slice(-1)]),m.length>1&&r.push(...m.map(d("duplicated",h)))}return o.length>1&&r.push(...i.filter(({name:h})=>on.has(h)).map(d("conflicting","frame"))),l.length>1&&r.push(...i.filter(({name:h})=>an.has(h)).map(d("conflicting","horizontal-alignment"))),g.length>1&&r.push(...i.filter(({name:h})=>ln.has(h)).map(d("conflicting","vertical-alignment"))),r}getAllArgs(){return this.childNodes.slice(1)}getArgs(e){return this.getAllArgs().filter(({name:t})=>e===t)}getFrameArgs(){return E(this,kt,kr).call(this,on,"frame")}getHorizAlignArgs(){return E(this,kt,kr).call(this,an,"horizontal-align")}getVertAlignArgs(){return E(this,kt,kr).call(this,ln,"vertical-align")}getArg(e){let t=this.getArgs(e);return t[t.length-1]}getValue(e){var t;return(t=this.getArg(e))==null?void 0:t.getValue()}};kt=new WeakSet,kr=function(e,t){return this.getAllArgs().filter(({name:i})=>e.has(i))}});var vt,gn=b(()=>{"use strict";j();we();R();B();dn();vt=class extends yt{constructor(e,t,r,i=f.getConfig(),s=[]){let o;if(r!==void 0){let{length:l}=s;o=new T(r,i,s);for(let g=1;g<11;g++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);U(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${e}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(){let e=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),e?0:6,!0,!e)}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{ns:i,interwiki:s}=this.getAttribute("title");return(s||i!==6)&&r.push($(this,{start:e},"invalid-gallery","invalid gallery image")),r}}});var Bi={};V(Bi,{GalleryToken:()=>pn});var yr,Pi,pn,ji=b(()=>{"use strict";R();B();gn();_e();pn=class extends T{constructor(e,t=f.getConfig(),r=[]){var i;super(void 0,t,r,{});k(this,yr);for(let s of(i=e==null?void 0:e.split(`
12
+ `))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new D(s,t,r):s);continue}let[,l,g]=o;E(this,yr,Pi).call(this,l)?super.insertAt(new vt("gallery",l,g,t,r)):super.insertAt(new D(s,t,r))}}get type(){return"ext-inner"}toString(e){return super.toString(e,`
13
13
  `)}text(){return super.text(`
14
14
  `).replace(/\n\s*\n/gu,`
15
15
  `)}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let{top:r,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let o=0;o<this.length;o++){let l=this.childNodes[o],g=l.toString(),{length:p}=g,d=g.trim(),u=r+o,h=o?0:i;l.type==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)?s.push({rule:"no-ignored",message:f.msg("invalid content in <$1>","gallery"),severity:d.startsWith("|")?"warning":"error",startIndex:e,endIndex:e+p,startLine:u,endLine:u,startCol:h,endCol:h+p,suggestions:[{desc:"remove",range:[e,e+p],text:""},{desc:"comment",range:[e,e+p],text:`<!--${g}-->`}]}):l.type!=="noinclude"&&l.type!=="text"&&s.push(...l.lint(e,t)),e+=p+1}return s}print(){return super.print({sep:`
16
- `})}};yr=new WeakSet,Pi=function(e){return this.normalizeTitle(e,6,!0,!0).valid}});var At,un=k(()=>{"use strict";j();Gt();At=class extends Ce{get type(){return"link"}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e);return this.closest("ext-link-text")&&t.push($(this,{start:n},"nested-link","internal link in an external link")),t}}});var wo,So,Vt,Ie,vr=k(()=>{"use strict";j();Q();X();R();B();wo=String.raw`(?:[\p{Zs}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,So=new RegExp(`${wo}+`,"gu"),Ie=class extends T{constructor(e,t="free-ext-link",r=f.getConfig(),i){super(e,r,i,{});y(this,Vt);v(this,Vt,t)}get type(){return c(this,Vt)}get link(){let e={"!":"|","=":"="},t=de(this.childNodes.map(r=>{let{type:i,name:s}=r;return i==="magic-word"&&String(s)in e?e[s]:r}));return this.type==="magic-link"&&(t=t.replace(So," "),t.startsWith("ISBN")&&(t=`ISBN ${t.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`)),t}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new F(this,e);if(this.type==="magic-link"){let{link:p}=this;if(p.startsWith("ISBN")){let d=[...p.slice(5)].map(u=>u==="X"?10:Number(u));(d.length===10&&d.reduce((u,h,m)=>u+h*(10-m),0)%11||d.length===13&&(d[12]===10||d.reduce((u,h,m)=>u+h*(m%2?3:1),0)%10))&&r.push($(this,i,"invalid-isbn","invalid ISBN"))}return r}let s=this.type==="ext-link-url",o=s?String.raw`\|+`:"[\uFF0C\uFF1B\u3002\uFF1A\uFF01\uFF1F\uFF08\uFF09]+",l=new RegExp(o,"u"),g=new RegExp(o,"gu");for(let p of this.childNodes){let{type:d,data:u}=p;if(d!=="text"||!l.test(u))continue;let h=C(p,i,"unterminated-url","","warning");g.lastIndex=0;for(let m=g.exec(u);m;m=g.exec(u)){let{index:x,0:b}=m,E=u.slice(0,x).split(`
17
- `),S=E.length,w=E[S-1].length,A=h.startIndex+x,L=h.startLine+S-1,P=S===1?h.startCol+w:w,q={...h,message:f.msg("$1 in URL",s?'"|"':"full-width punctuation"),startIndex:A,endIndex:A+b.length,startLine:L,endLine:L,startCol:P,endCol:P+b.length};s?b.length===1&&(q.suggestions=[{desc:"whitespace",range:[A,A+1],text:" "}]):q.suggestions=[{desc:"whitespace",range:[A,A],text:" "},{desc:"escape",range:[A,q.endIndex],text:encodeURI(b)}],r.push(q)}}return r}};Vt=new WeakMap});var Le,wt,cn=k(()=>{"use strict";Se();j();R();B();vr();wt=class extends T{constructor(e,t="",r="",i=f.getConfig(),s=[]){super(void 0,i,s,{});y(this,Le);let o=e&&/\0\d+f\x7F/u.test(e)?s[Number(e.slice(1,-2))]:new Ie(e,"ext-link-url",i,s);if(this.insertAt(o),v(this,Le,t),r){let l=new T(r,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(){return this.length===1?`[${super.toString()}${c(this,Le)}]`:`[${super.toString(c(this,Le))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return c(this,Le).length}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&r.push($(this,{start:e},"var-anchor","variable anchor in a section header")),r}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,Le)}]`}:{pre:"[",sep:c(this,Le),post:"]"})}};Le=new WeakMap});var Xt,qi=k(()=>{"use strict";R();B();_e();un();cn();Xt=class extends T{get type(){return"imagemap-link"}constructor(n,e,t,r=f.getConfig(),i=[]){super(void 0,r,i),this.append(n,e.length===2?new At(...e,r,i):new wt(...e,r,i),new D(t,r,i))}}});var _i={};H(_i,{ImagemapToken:()=>hn});var hn,Gi=k(()=>{"use strict";j();Q();Te();R();B();_e();gn();qi();hn=class extends T{get type(){return"ext-inner"}get image(){return this.childNodes.find(Ke("imagemap-image"))}constructor(n,e=f.getConfig(),t=[]){if(super(void 0,e,t,{}),!n)return;let r=n.split(`
18
- `),i=new Set(e.protocol.split("|")),s=D,o=!0,l=!1;for(let g of r){let p=g.trim();if(!(l||!p||p.startsWith("#"))){if(o){let[d,...u]=g.split("|"),h=this.normalizeTitle(d,0,!0);if(h.valid&&!h.interwiki&&h.ns===6){let m=new vt("imagemap",d,u.length>0?u.join("|"):void 0,e,t);super.insertAt(m),o=!1;continue}else l=!0}else if(g.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(g);continue}else if(g.includes("[")){let d=g.indexOf("["),u=g.slice(d),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(u);if(h){if(this.normalizeTitle(h[1],0,!0,!1,!0).valid){super.insertAt(new Xt(g.slice(0,d),h.slice(1),u.slice(u.indexOf("]]")+2),e,t));continue}}else if(i.has(u.slice(1,u.indexOf(":")+1))||i.has(u.slice(1,u.indexOf("//")+2))){let m=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(u);if(m){super.insertAt(new Xt(g.slice(0,d),m.slice(1),u.slice(u.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(g,e,t))}}toString(){return super.toString(`
16
+ `})}};yr=new WeakSet,Pi=function(e){return this.normalizeTitle(e,6,!0,!0).valid}});var At,un=b(()=>{"use strict";j();Ot();At=class extends Se{get type(){return"link"}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e);return this.closest("ext-link-text")&&t.push($(this,{start:n},"nested-link","internal link in an external link")),t}}});var wo,So,Vt,Ie,vr=b(()=>{"use strict";j();Q();X();R();B();wo=String.raw`(?:[\p{Zs}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,So=new RegExp(`${wo}+`,"gu"),Ie=class extends T{constructor(e,t="free-ext-link",r=f.getConfig(),i){super(e,r,i,{});k(this,Vt);A(this,Vt,t)}get type(){return c(this,Vt)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=de(this.childNodes.map(r=>{let{type:i}=r,s=String(r.name);return i==="magic-word"&&e.has(s)?e.get(s):r}));return this.type==="magic-link"&&(t=t.replace(So," ")),t}get link(){let{innerText:e}=this;return this.type==="magic-link"&&e.startsWith("ISBN")&&(e=`ISBN ${e.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`),e}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new I(this,e);if(this.type==="magic-link"){let{link:g}=this;if(g.startsWith("ISBN")){let p=[...g.slice(5)].map(d=>d==="X"?10:Number(d));(p.length===10&&p.reduce((d,u,h)=>d+u*(10-h),0)%11||p.length===13&&(p[12]===10||p.reduce((d,u,h)=>d+u*(h%2?3:1),0)%10))&&r.push($(this,i,"invalid-isbn","invalid ISBN"))}return r}let s=this.type==="ext-link-url",o=s?/\|/u:/[,;。:!?()]+/u,l=this.childNodes.find(g=>g.type==="text"&&o.test(g.data));if(l){let{data:g}=l,p=S(l,i,"unterminated-url",f.msg("$1 in URL",s?'"|"':"full-width punctuation"),"warning"),{index:d,0:u}=o.exec(g),h=p.startIndex+d;p.suggestions=s?[{desc:"whitespace",range:[h,h+1],text:" "}]:[{desc:"whitespace",range:[h,h],text:" "},{desc:"escape",range:[h,h+u.length],text:encodeURI(u)}],r.push(p)}return r}};Vt=new WeakMap});var Le,wt,cn=b(()=>{"use strict";we();j();R();B();vr();wt=class extends T{constructor(e,t="",r="",i=f.getConfig(),s=[]){super(void 0,i,s,{});k(this,Le);let o=e&&/\0\d+f\x7F/u.test(e)?s[Number(e.slice(1,-2))]:new Ie(e,"ext-link-url",i,s);if(this.insertAt(o),A(this,Le,t),r){let l=new T(r,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${c(this,Le)}]`:`[${super.toString(e,c(this,Le))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return c(this,Le).length}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&r.push($(this,{start:e},"var-anchor","variable anchor in a section header")),r}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,Le)}]`}:{pre:"[",sep:c(this,Le),post:"]"})}};Le=new WeakMap});var Xt,qi=b(()=>{"use strict";R();B();_e();un();cn();Xt=class extends T{get type(){return"imagemap-link"}constructor(n,e,t,r=f.getConfig(),i=[]){super(void 0,r,i),this.append(n,e.length===2?new At(...e,r,i):new wt(...e,r,i),new D(t,r,i))}}});var _i={};V(_i,{ImagemapToken:()=>hn});var hn,Oi=b(()=>{"use strict";j();Q();xe();R();B();_e();gn();qi();hn=class extends T{get type(){return"ext-inner"}get image(){return this.childNodes.find(xt("imagemap-image"))}constructor(n,e=f.getConfig(),t=[]){if(super(void 0,e,t,{}),!n)return;let r=n.split(`
17
+ `),i=new Set(e.protocol.split("|")),s=D,o=!0,l=!1;for(let g of r){let p=g.trim();if(!(l||!p||p.startsWith("#"))){if(o){let[d,...u]=g.split("|"),h=this.normalizeTitle(d,0,!0);if(h.valid&&!h.interwiki&&h.ns===6){let m=new vt("imagemap",d,u.length>0?u.join("|"):void 0,e,t);super.insertAt(m),o=!1;continue}else l=!0}else if(g.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(g);continue}else if(g.includes("[")){let d=g.indexOf("["),u=g.slice(d),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(u);if(h){if(this.normalizeTitle(h[1],0,!0,!1,!0).valid){super.insertAt(new Xt(g.slice(0,d),h.slice(1),u.slice(u.indexOf("]]")+2),e,t));continue}}else if(i.has(u.slice(1,u.indexOf(":")+1))||i.has(u.slice(1,u.indexOf("//")+2))){let m=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(u);if(m){super.insertAt(new Xt(g.slice(0,d),m.slice(1),u.slice(u.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(g,e,t))}}toString(n){return super.toString(n,`
19
18
  `)}text(){return super.text(`
20
19
  `).replace(/\n{2,}/gu,`
21
- `)}getGaps(){return 1}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new F(this,n);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>C(i,r,"invalid-imagemap","invalid link in <imagemap>"))):t.push($(this,r,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
22
- `})}}});var Oi={};H(Oi,{NowikiToken:()=>mn});var mn,zi=k(()=>{"use strict";j();R();qe();mn=class extends Y{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let r=$(this,{start:n},"void-ext",f.msg("nothing should be in <$1>",e));return r.fix={range:[n-1,r.endIndex+e.length+3],text:"/>"},[r]}return super.lint(n,new RegExp(String.raw`<\s*(?:/\s*)${e==="nowiki"?"":"?"}(${e})\b`,"giu"))}}});var Mi,bt,sn=k(()=>{"use strict";j();Q();R();B();Dr();pr();Mi=(a,n)=>{let e=new Set(a);return e.delete(n),[...e]},bt=class extends ct{get type(){return"ext"}constructor(n,e,t,r,i=f.getConfig(),s=[]){var d;let o=n.toLowerCase(),l=new ze(!e||e.trimStart()!==e?e:` ${e}`,"ext-attrs",o,i,s),g={...i,ext:Mi(i.ext,o),excludes:[...(d=i.excludes)!=null?d:[]]},p;switch(g.inExt=!0,o){case"tab":g.ext=Mi(g.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":o==="poem"&&g.excludes.push("heading"),p=new T(t,g,s);break;case"pre":{let{PreToken:u}=(Ti(),O(xi));p=new u(t,g,s);break}case"dynamicpagelist":{let{ParamTagToken:u}=(Qr(),O(bi));p=new u(t,g,s);break}case"inputbox":{g.excludes.push("heading");let{InputboxToken:u}=(Ei(),O(Ni));p=new u(t,g,s);break}case"references":{let{NestedToken:u}=(xr(),O(fr));p=new u(t,/<!--.*?(?:-->|$)|<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],g,s);break}case"choose":{let{NestedToken:u}=(xr(),O(fr));p=new u(t,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],g,s);break}case"combobox":{let{NestedToken:u}=(xr(),O(fr));p=new u(t,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],g,s);break}case"gallery":{let{GalleryToken:u}=(ji(),O(Bi));p=new u(t,g,s);break}case"imagemap":{let{ImagemapToken:u}=(Gi(),O(_i));p=new u(t,g,s);break}default:{let{NowikiToken:u}=(zi(),O(Oi));p=new u(t,g,s)}}p.setAttribute("name",o),p.type==="plain"&&(p.type="ext-inner"),super(n,l,p,r,i,s),this.seal("closed",!0)}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new F(this,n);return this.name!=="nowiki"&&this.closest("html-attrs, table-attrs")&&t.push($(this,r,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push($(this,r,"var-anchor","variable anchor in a section header")),t}}});var Wi={};H(Wi,{parseCommentAndExt:()=>Co});var Co,Ui=k(()=>{"use strict";si();_e();ai();sn();rn();Co=(a,n,e,t)=>{let r="<onlyinclude>",i="</onlyinclude>",{length:s}=r,o=()=>{let u=a.indexOf(r);return{i:u,j:a.indexOf(i,u+s)}};if(t){let{i:u,j:h}=o();if(u!==-1&&h!==-1){let m="",x=b=>{new D(b,n,e),m+=`\0${e.length-1}c\x7F`};for(;u!==-1&&h!==-1;){let b=`\0${e.length}e\x7F`;new ar(a.slice(u+s,h),n,e),u>0&&x(a.slice(0,u)),m+=b,a=a.slice(h+s+1),{i:u,j:h}=o()}return a&&x(a),m}}let l=n.ext.join("|"),g=t?"includeonly":"(?:no|only)include",p=t?"noinclude":"includeonly",d=new RegExp(String.raw`<!--.*?(?:-->|$)|<${g}(?:\s[^>]*)?/?>|</${g}\s*>|<(${l})(\s[^>]*?)?(?:/>|>(.*?)</(\1\s*)>)|<(${p})(\s[^>]*?)?(?:/>|>(.*?)(?:</(${p}\s*)>|$))`,"gisu");return a.replace(d,(u,h,m,x,b,E,S,w,A)=>{let L=`\0${e.length}${h?"e":"c"}\x7F`;if(h)new bt(h,m,x,b,n,e);else if(u.startsWith("<!--")){let P=u.endsWith("-->");new Ee(u.slice(4,P?-3:void 0),P,n,e)}else E?new Xe(E,S,w,A,n,e):new D(u,n,e);return L})}});var $o,No,Eo,St,ce,Me,Ar,Di=k(()=>{"use strict";j();Q();X();B();$o=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),No=new Set(["b","big","center","cite","code","del","dfn","em","font","i","ins","kbd","mark","pre","q","s","samp","small","strike","strong","sub","sup","tt","u","var"]),Eo=new Set(["strike","big","center","font","tt"]),Ar=class extends T{constructor(e,t,r,i,s,o){super(void 0,s,o);y(this,St);y(this,ce);y(this,Me);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),v(this,St,r),v(this,ce,i),v(this,Me,e)}get type(){return"html"}get selfClosing(){return c(this,ce)}get closing(){return c(this,St)}toString(){return`<${this.closing?"/":""}${c(this,Me)}${super.toString()}${c(this,ce)?"/":""}>`}text(){let{closing:e}=this,t=c(this,Me)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,ce)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,Me).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let r=super.lint(e,t),i=new F(this,e);this.name==="h1"&&!this.closing&&r.push($(this,i,"h1","<h1>")),this.closest("table-attrs")&&r.push($(this,i,"parsing-order","HTML tag in table attributes"));try{this.findMatchingTag()}catch(o){if(o instanceof SyntaxError){let{message:l}=o,g=l.split(":")[0].toLowerCase(),p=$(this,i,"unmatched-tag",g);if(g==="unclosed tag"&&!this.closest("heading-title"))if(No.has(this.name)){let d=(s=this.parentNode)==null?void 0:s.childNodes,u=d==null?void 0:d.indexOf(this);d!=null&&d.slice(0,u).some(({type:h,name:m})=>h==="html"&&m===this.name)||(p.severity="warning")}else p.severity="warning";else if(g==="unmatched closing tag"){let d=this.closest("magic-word");d&&$o.has(d.name)?p.severity="warning":p.suggestions=[{desc:"remove",range:[e,p.endIndex],text:""}]}else if(g==="tag that is both closing and self-closing"){let{html:[,,d]}=this.getAttribute("config");d.includes(this.name)&&(p.fix={range:[e+1,e+2],text:""})}r.push(p)}}return Eo.has(this.name)&&r.push($(this,i,"obsolete-tag","obsolete HTML tag","warning")),(this.name==="b"||this.name==="strong")&&this.closest("heading-title")&&r.push($(this,i,"bold-header","bold in section header","warning")),r}findMatchingTag(){let{html:[e,t,r]}=this.getAttribute("config"),{name:i,parentNode:s,closing:o}=this,l=Wn(this.toString());if(o&&(c(this,ce)||r.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(r.includes(i)||c(this,ce)&&t.includes(i))return this;if(c(this,ce)&&e.includes(i))throw new SyntaxError(`Invalid self-closing tag: ${l}`);if(!s)return;let{childNodes:g}=s,p=g.indexOf(this),d=(o?g.slice(0,p).reverse():g.slice(p+1)).filter(h=>h.type==="html"&&h.name===i),u=o?-1:1;for(let h of d)if(c(h,St)?u--:u++,u===0)return h;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`&lt;${this.closing?"/":""}${c(this,Me)}`,post:`${c(this,ce)?"/":""}&gt;`})}json(){let e=super.json();return Object.assign(e,{closing:this.closing,selfClosing:c(this,ce)}),e}};St=new WeakMap,ce=new WeakMap,Me=new WeakMap});var Hi={};H(Hi,{parseHtml:()=>Io});var Io,Vi=k(()=>{"use strict";pr();Di();Io=(a,n,e)=>{let t=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,{html:r}=n,i=new Set([...r[0],...r[1],...r[2]]),s=a.split("<"),o=s.shift();for(let l of s){let g=t.exec(l),p=g==null?void 0:g[2],d=p==null?void 0:p.toLowerCase();if(!g||!i.has(d)){o+=`<${l}`;continue}let[,u,,h="",m,x]=g,{length:b}=e,E=new ze(h,"html-attrs",d,n,e),S=E.getAttr("itemprop");if(d==="meta"&&(S===void 0||E.getAttr("content")===void 0)||d==="link"&&(S===void 0||E.getAttr("href")===void 0)){o+=`<${l}`,e.length=b;continue}o+=`\0${e.length}x\x7F${x}`,new Ar(p,E,u==="/",m==="/>",n,e)}return o}});var Xi,Zi=k(()=>{"use strict";Te();Xi=(a=0)=>(n,e)=>{var r,Qi;class t extends n{constructor(){super(...arguments);y(this,r)}getAttr(l){return c(this,r,Qi).getAttr(l)}}return r=new WeakSet,Qi=function(){return this.childNodes[a]},sr(t,n),t}});var Ct,fn=k(()=>{"use strict";Zi();R();B();gt();pr();Ct=class extends Xi(1)(T){constructor(n,e,t,r,i=f.getConfig(),s=[],o={}){super(void 0,i,s,o),this.append(new pe(e,n,"table-syntax",i,s,{}),new ze(r,"table-attrs",t,i,s))}}});var he,Qt,et,xn,Ki,Ye,Tn=k(()=>{"use strict";j();Q();Se();Te();R();B();fn();Ye=class extends Ct{constructor(e,t,r=f.getConfig(),i=[]){var g;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,r,i);y(this,et);y(this,he,"");y(this,Qt);s&&([tr(this,he)._]=s);let l=new T(t==null?void 0:t.slice(((g=s==null?void 0:s.index)!=null?g:NaN)+c(this,he).length),r,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return I(this,et,xn).call(this).subtype}afterBuild(){c(this,he).includes("\0")&&v(this,he,this.buildFromStr(c(this,he),0)),super.afterBuild()}toString(){let{childNodes:[e,t,r]}=this;return e.toString()+t.toString()+c(this,he)+r.toString()}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,he)+r.text()}getGaps(e){return e===1?c(this,he).length:0}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new F(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),g=C(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let p={caption:"|+",td:"|",th:"!"}[this.subtype];g.fix={range:[g.startIndex,g.endIndex],text:o.replace(/\|\|/gu,`
20
+ `)}getGaps(){return 1}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new I(this,n);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>S(i,r,"invalid-imagemap","invalid link in <imagemap>"))):t.push($(this,r,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
21
+ `})}}});var Gi={};V(Gi,{NowikiToken:()=>mn});var mn,zi=b(()=>{"use strict";j();R();qe();mn=class extends Y{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let r=$(this,{start:n},"void-ext",f.msg("nothing should be in <$1>",e));return r.fix={range:[n-1,r.endIndex+e.length+3],text:"/>"},[r]}return super.lint(n,new RegExp(String.raw`<\s*(?:/\s*)${e==="nowiki"?"":"?"}(${e})\b`,"giu"))}}});var Mi,bt,sn=b(()=>{"use strict";j();Q();R();B();Dr();pr();Mi=(a,n)=>{let e=new Set(a);return e.delete(n),[...e]},bt=class extends ut{get type(){return"ext"}constructor(n,e,t,r,i=f.getConfig(),s=[]){var d;let o=n.toLowerCase(),l=new ze(!e||e.trimStart()!==e?e:` ${e}`,"ext-attrs",o,i,s),g={...i,ext:Mi(i.ext,o),excludes:[...(d=i.excludes)!=null?d:[]]},p;switch(g.inExt=!0,o){case"tab":g.ext=Mi(g.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":o==="poem"&&g.excludes.push("heading"),p=new T(t,g,s);break;case"pre":{let{PreToken:u}=(Ti(),O(xi));p=new u(t,g,s);break}case"dynamicpagelist":{let{ParamTagToken:u}=(Qr(),O(bi));p=new u(t,g,s);break}case"inputbox":{g.excludes.push("heading");let{InputboxToken:u}=(Ei(),O(Ni));p=new u(t,g,s);break}case"references":{let{NestedToken:u}=(xr(),O(fr));p=new u(t,/<!--.*?(?:-->|$)|<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],g,s);break}case"choose":{let{NestedToken:u}=(xr(),O(fr));p=new u(t,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],g,s);break}case"combobox":{let{NestedToken:u}=(xr(),O(fr));p=new u(t,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],g,s);break}case"gallery":{let{GalleryToken:u}=(ji(),O(Bi));p=new u(t,g,s);break}case"imagemap":{let{ImagemapToken:u}=(Oi(),O(_i));p=new u(t,g,s);break}default:{let{NowikiToken:u}=(zi(),O(Gi));p=new u(t,g,s)}}p.setAttribute("name",o),p.type==="plain"&&(p.type="ext-inner"),super(n,l,p,r,i,s),this.seal("closed",!0)}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new I(this,n);return this.name!=="nowiki"&&this.closest("html-attrs, table-attrs")&&t.push($(this,r,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push($(this,r,"var-anchor","variable anchor in a section header")),t}}});var Wi={};V(Wi,{parseCommentAndExt:()=>Co});var Co,Ui=b(()=>{"use strict";si();_e();ai();sn();rn();Co=(a,n,e,t)=>{let r="<onlyinclude>",i="</onlyinclude>",{length:s}=r,o=()=>{let u=a.indexOf(r);return{i:u,j:a.indexOf(i,u+s)}};if(t){let{i:u,j:h}=o();if(u!==-1&&h!==-1){let m="",x=y=>{new D(y,n,e),m+=`\0${e.length-1}c\x7F`};for(;u!==-1&&h!==-1;){let y=`\0${e.length}e\x7F`;new ar(a.slice(u+s,h),n,e),u>0&&x(a.slice(0,u)),m+=y,a=a.slice(h+s+1),{i:u,j:h}=o()}return a&&x(a),m}}let l=n.ext.join("|"),g=t?"includeonly":"(?:no|only)include",p=t?"noinclude":"includeonly",d=new RegExp(String.raw`<!--.*?(?:-->|$)|<${g}(?:\s[^>]*)?/?>|</${g}\s*>|<(${l})(\s[^>]*?)?(?:/>|>(.*?)</(\1\s*)>)|<(${p})(\s[^>]*?)?(?:/>|>(.*?)(?:</(${p}\s*)>|$))`,"gisu");return a.replace(d,(u,h,m,x,y,L,w,C,v)=>{let P=`\0${e.length}${h?"e":"c"}\x7F`;if(h)new bt(h,m,x,y,n,e);else if(u.startsWith("<!--")){let F=u.endsWith("-->");new Ee(u.slice(4,F?-3:void 0),F,n,e)}else L?new Xe(L,w,C,v,n,e):new D(u,n,e);return P})}});var $o,No,Eo,St,ue,Me,Ar,Di=b(()=>{"use strict";j();Q();X();B();$o=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),No=new Set(["b","big","center","cite","code","del","dfn","em","font","i","ins","kbd","mark","pre","q","s","samp","small","strike","strong","sub","sup","tt","u","var"]),Eo=new Set(["strike","big","center","font","tt"]),Ar=class extends T{constructor(e,t,r,i,s,o){super(void 0,s,o);k(this,St);k(this,ue);k(this,Me);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),A(this,St,r),A(this,ue,i),A(this,Me,e)}get type(){return"html"}get selfClosing(){return c(this,ue)}get closing(){return c(this,St)}toString(e){return`<${this.closing?"/":""}${c(this,Me)}${super.toString(e)}${c(this,ue)?"/":""}>`}text(){let{closing:e}=this,t=c(this,Me)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,ue)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,Me).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let r=super.lint(e,t),i=new I(this,e);this.name==="h1"&&!this.closing&&r.push($(this,i,"h1","<h1>")),this.closest("table-attrs")&&r.push($(this,i,"parsing-order","HTML tag in table attributes"));try{this.findMatchingTag()}catch(o){if(o instanceof SyntaxError){let{message:l}=o,g=l.split(":")[0].toLowerCase(),p=$(this,i,"unmatched-tag",g);if(g==="unclosed tag"&&!this.closest("heading-title"))if(No.has(this.name)){let d=(s=this.parentNode)==null?void 0:s.childNodes,u=d==null?void 0:d.indexOf(this);d!=null&&d.slice(0,u).some(({type:h,name:m})=>h==="html"&&m===this.name)||(p.severity="warning")}else p.severity="warning";else if(g==="unmatched closing tag"){let d=this.closest("magic-word");d&&$o.has(d.name)?p.severity="warning":p.suggestions=[{desc:"remove",range:[e,p.endIndex],text:""}]}else if(g==="tag that is both closing and self-closing"){let{html:[,,d]}=this.getAttribute("config");d.includes(this.name)&&(p.fix={range:[e+1,e+2],text:""})}r.push(p)}}return Eo.has(this.name)&&r.push($(this,i,"obsolete-tag","obsolete HTML tag","warning")),(this.name==="b"||this.name==="strong")&&this.closest("heading-title")&&r.push($(this,i,"bold-header","bold in section header","warning")),r}findMatchingTag(){let{html:[e,t,r]}=this.getAttribute("config"),{name:i,parentNode:s,closing:o}=this,l=Wn(this.toString());if(o&&(c(this,ue)||r.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(r.includes(i)||c(this,ue)&&t.includes(i))return this;if(c(this,ue)&&e.includes(i))throw new SyntaxError(`Invalid self-closing tag: ${l}`);if(!s)return;let{childNodes:g}=s,p=g.indexOf(this),d=(o?g.slice(0,p).reverse():g.slice(p+1)).filter(h=>h.type==="html"&&h.name===i),u=o?-1:1;for(let h of d)if(c(h,St)?u--:u++,u===0)return h;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`&lt;${this.closing?"/":""}${c(this,Me)}`,post:`${c(this,ue)?"/":""}&gt;`})}json(){let e=super.json();return Object.assign(e,{closing:this.closing,selfClosing:c(this,ue)}),e}};St=new WeakMap,ue=new WeakMap,Me=new WeakMap});var Hi={};V(Hi,{parseHtml:()=>Io});var Io,Vi=b(()=>{"use strict";pr();Di();Io=(a,n,e)=>{let t=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,{html:r}=n,i=new Set([...r[0],...r[1],...r[2]]),s=a.split("<"),o=s.shift();for(let l of s){let g=t.exec(l),p=g==null?void 0:g[2],d=p==null?void 0:p.toLowerCase();if(!g||!i.has(d)){o+=`<${l}`;continue}let[,u,,h="",m,x]=g,{length:y}=e,L=new ze(h,"html-attrs",d,n,e),w=L.getAttr("itemprop");if(d==="meta"&&(w===void 0||L.getAttr("content")===void 0)||d==="link"&&(w===void 0||L.getAttr("href")===void 0)){o+=`<${l}`,e.length=y;continue}o+=`\0${e.length}x\x7F${x}`,new Ar(p,L,u==="/",m==="/>",n,e)}return o}});var Xi,Zi=b(()=>{"use strict";xe();Xi=(a=0)=>(n,e)=>{var r,Qi;class t extends n{constructor(){super(...arguments);k(this,r)}getAttr(l){return c(this,r,Qi).getAttr(l)}}return r=new WeakSet,Qi=function(){return this.childNodes[a]},sr(t,n),t}});var Ct,fn=b(()=>{"use strict";Zi();R();B();dt();pr();Ct=class extends Xi(1)(T){constructor(n,e,t,r,i=f.getConfig(),s=[],o={}){super(void 0,i,s,o),this.append(new pe(e,n,"table-syntax",i,s,{}),new ze(r,"table-attrs",t,i,s))}}});var ce,Qt,Ye,xn,Ki,Je,Tn=b(()=>{"use strict";j();Q();we();xe();R();B();fn();Je=class extends Ct{constructor(e,t,r=f.getConfig(),i=[]){var g;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,r,i);k(this,Ye);k(this,ce,"");k(this,Qt);s&&([tr(this,ce)._]=s);let l=new T(t==null?void 0:t.slice(((g=s==null?void 0:s.index)!=null?g:NaN)+c(this,ce).length),r,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return E(this,Ye,xn).call(this).subtype}afterBuild(){c(this,ce).includes("\0")&&A(this,ce,this.buildFromStr(c(this,ce),0)),super.afterBuild()}toString(e){let{childNodes:[t,r,i]}=this;return t.toString(e)+r.toString(e)+c(this,ce)+i.toString(e)}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,ce)+r.text()}getGaps(e){return e===1?c(this,ce).length:0}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new I(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),g=S(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let p={caption:"|+",td:"|",th:"!"}[this.subtype];g.fix={range:[g.startIndex,g.endIndex],text:o.replace(/\|\|/gu,`
23
22
  ${p}`)}}else g.suggestions=[{desc:"escape",range:[g.startIndex,g.endIndex],text:o.replace(/\|/gu,"&#124;")}];r.push(g)}}return r}isIndependent(){return this.firstChild.text().startsWith(`
24
- `)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,he)}${r.print()}</span>`}json(){let e=super.json();return e.subtype=this.subtype,e}};he=new WeakMap,Qt=new WeakMap,et=new WeakSet,xn=function(){var t;let{rev:e}=ke;return(t=c(this,Qt))!=null||v(this,Qt,[e,I(this,et,Ki).call(this)]),c(this,Qt)[1]},Ki=function(){var o;let e=this.firstChild.text(),t=e.slice(-1),r="td";if(t==="!"?r="th":t==="+"&&(r="caption"),this.isIndependent())return{subtype:r};let{previousSibling:i}=this;return{...I(o=i,et,xn).call(o)}}});var $t,bn=k(()=>{"use strict";j();Te();fn();Tn();$t=class extends Ct{lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=this.childNodes.find(({type:p})=>p==="table-inter");if(!r)return t;let i=r.childNodes.find(p=>p.text().trim()),s=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u,o=Ke("arg"),l=Ke("magic-word");if(!i||s.test(i.toString())||o(i)&&s.test(i.default||""))return t;if(l(i))try{if(i.getPossibleValues().every(p=>s.test(p.text())))return t}catch(p){}let g=C(r,{start:n},"fostered-content","content to be moved out from the table");return g.severity=i.type==="template"?"warning":"error",g.startIndex++,g.startLine++,g.startCol=0,t.push(g),t}getRowCount(){return Number(this.childNodes.some(n=>n instanceof Ye&&n.isIndependent()&&!n.firstChild.text().endsWith("+")))}getNthCol(n,e){let t=0;for(let r of this.childNodes.slice(2))if(r instanceof Ye&&(r.isIndependent()&&(t=+(r.subtype!=="caption")),n-=t,n<0))return r}}});var Lo,Fo,kn,wr,Ji=k(()=>{"use strict";j();Q();Te();R();bn();gt();Lo=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,Fo=({type:a})=>a==="tr"||a==="table-syntax",kn=class extends Array{},wr=class extends $t{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(n,e,t,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,n,"table",e,t,r,{})}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new F(this,n);this.closed||t.push(C(this.firstChild,r,"unclosed-table",f.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,g=0;for(;g<s;g++){let p=i[g],d=p.length;if(d<o)break;d<l&&(l=d);let u=p.indexOf(p[d-1])+1;if(u>l)break;u>o&&(o=u)}if(g<s){let p=C(this.getNthRow(g),r,"table-layout","inconsistent table layout","warning");p.startIndex++,p.startLine++,p.startCol=0,t.push(p)}}return t}close(n=`
25
- |}`,e){let t=this.getAttribute("config"),r=this.getAttribute("accum"),i=e?[n]:f.parse(n,this.getAttribute("include"),2,t).childNodes;ke.run(()=>{let s=new pe(void 0,Lo,"table-syntax",t,r,{});super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(n){let e=this.getAllRows(),{length:t}=e,r=new kn(...Yi(t,()=>[]));for(let i=0;i<t;i++){let s=r[i],o=0,l=0,g;for(let p of e[i].childNodes.slice(2))if(p.type==="td"){if(p.isIndependent()&&(g=p.subtype!=="caption"),g){let d={row:i,column:o},{rowspan:u,colspan:h}=p;for(o++;s[l];)l++;for(let m=i;m<Math.min(i+u,t);m++)for(let x=l;x<l+h;x++)r[m][x]=d;l+=h}}else if(Fo(p))break}return r}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(n=>n.type==="tr"&&n.getRowCount()>0)]}getNthCell(n){var t;let e=n;return e&&((t=this.getNthRow(e.row,!1,!1))==null?void 0:t.getNthCol(e.column))}getNthRow(n,e,t){let r=super.getRowCount();if(n===0&&r)return this;r&&n--;for(let i of this.childNodes.slice(2))if(i.type==="tr"&&i.getRowCount()&&(n--,n<0))return i}json(){let n=super.json();return n.closed=this.closed,n}}});var Sr,es=k(()=>{"use strict";bn();Sr=class extends $t{get type(){return"tr"}constructor(n,e,t,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,n,"tr",e,t,r,{})}}});var Nt,yn=k(()=>{"use strict";qe();Nt=class extends Y{}});var Et,vn=k(()=>{"use strict";yn();Et=class extends Nt{get type(){return"dd"}}});var ts={};H(ts,{parseTable:()=>Po});var Ro,Po,rs=k(()=>{"use strict";B();Ji();es();Tn();vn();Ro=a=>a.lastChild.constructor!==T,Po=({firstChild:{data:a},type:n,name:e},t,r)=>{let i=[],s=a.split(`
23
+ `)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,ce)}${r.print()}</span>`}json(){let e=super.json();return e.subtype=this.subtype,e}};ce=new WeakMap,Qt=new WeakMap,Ye=new WeakSet,xn=function(){var t;let{rev:e}=be;return(t=c(this,Qt))!=null||A(this,Qt,[e,E(this,Ye,Ki).call(this)]),c(this,Qt)[1]},Ki=function(){var o;let e=this.firstChild.text(),t=e.slice(-1),r="td";if(t==="!"?r="th":t==="+"&&(r="caption"),this.isIndependent())return{subtype:r};let{previousSibling:i}=this;return{...E(o=i,Ye,xn).call(o)}}});var $t,bn=b(()=>{"use strict";j();fn();Tn();$t=class extends Ct{lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=this.childNodes.find(({type:l})=>l==="table-inter");if(!r)return t;let i=r.childNodes.find(l=>l.text().trim()),s=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u;if(!i||s.test(i.toString())||i.is("arg")&&s.test(i.default||""))return t;if(i.is("magic-word"))try{if(i.getPossibleValues().every(l=>s.test(l.text())))return t}catch(l){}let o=S(r,{start:n},"fostered-content","content to be moved out from the table");return o.severity=i.type==="template"?"warning":"error",o.startIndex++,o.startLine++,o.startCol=0,t.push(o),t}getRowCount(){return Number(this.childNodes.some(n=>n instanceof Je&&n.isIndependent()&&!n.firstChild.text().endsWith("+")))}getNthCol(n,e){let t=0;for(let r of this.childNodes.slice(2))if(r instanceof Je&&(r.isIndependent()&&(t=+(r.subtype!=="caption")),n-=t,n<0))return r}}});var Lo,Fo,kn,wr,Ji=b(()=>{"use strict";j();Q();xe();R();bn();dt();Lo=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,Fo=({type:a})=>a==="tr"||a==="table-syntax",kn=class extends Array{},wr=class extends $t{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(n,e,t,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,n,"table",e,t,r,{})}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new I(this,n);this.closed||t.push(S(this.firstChild,r,"unclosed-table",f.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,g=0;for(;g<s;g++){let p=i[g],d=p.length;if(d<o)break;d<l&&(l=d);let u=p.indexOf(p[d-1])+1;if(u>l)break;u>o&&(o=u)}if(g<s){let p=S(this.getNthRow(g),r,"table-layout","inconsistent table layout","warning");p.startIndex++,p.startLine++,p.startCol=0,t.push(p)}}return t}close(n=`
24
+ |}`,e){let t=this.getAttribute("config"),r=this.getAttribute("accum"),i=e?[n]:f.parse(n,this.getAttribute("include"),2,t).childNodes;be.run(()=>{let s=new pe(void 0,Lo,"table-syntax",t,r,{});super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(n){let e=this.getAllRows(),{length:t}=e,r=new kn(...Yi(t,()=>[]));for(let i=0;i<t;i++){let s=r[i],o=0,l=0,g;for(let p of e[i].childNodes.slice(2))if(p.type==="td"){if(p.isIndependent()&&(g=p.subtype!=="caption"),g){let d={row:i,column:o},{rowspan:u,colspan:h}=p;for(o++;s[l];)l++;for(let m=i;m<Math.min(i+u,t);m++)for(let x=l;x<l+h;x++)r[m][x]=d;l+=h}}else if(Fo(p))break}return r}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(n=>n.type==="tr"&&n.getRowCount()>0)]}getNthCell(n){var t;let e=n;return e&&((t=this.getNthRow(e.row,!1,!1))==null?void 0:t.getNthCol(e.column))}getNthRow(n,e,t){let r=super.getRowCount();if(n===0&&r)return this;r&&n--;for(let i of this.childNodes.slice(2))if(i.type==="tr"&&i.getRowCount()&&(n--,n<0))return i}json(){let n=super.json();return n.closed=this.closed,n}}});var Sr,es=b(()=>{"use strict";bn();Sr=class extends $t{get type(){return"tr"}constructor(n,e,t,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,n,"tr",e,t,r,{})}}});var Nt,yn=b(()=>{"use strict";qe();Nt=class extends Y{}});var Et,vn=b(()=>{"use strict";yn();Et=class extends Nt{get type(){return"dd"}}});var ts={};V(ts,{parseTable:()=>Po});var Ro,Po,rs=b(()=>{"use strict";B();Ji();es();Tn();vn();Ro=a=>a.lastChild.constructor!==T,Po=({firstChild:{data:a},type:n,name:e},t,r)=>{let i=[],s=a.split(`
26
25
  `),o=n==="root"||n==="parameter-value"||n==="ext-inner"&&e==="poem"?"":`
27
- ${s.shift()}`,l,g=(d,u)=>{if(!u){o+=d;return}let{lastChild:h}=u;if(Ro(u)){let m=new T(d,t,r);m.type="table-inter",m.setAttribute("stage",3),u.insertAt(m)}else h.setText(h.toString()+d)},p=()=>l.type==="td"?i.pop():l;for(let d of s){l=i.pop();let[u]=/^(?:\s|\0\d+c\x7F)*/u.exec(d),h=d.slice(u.length),m=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{(?:\0\d+c\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(h);if(m){for(;l&&l.type!=="td";)l=i.pop();let[,A,L,P,q]=m;A&&new Et(A,t,r),g(`
28
- ${u}${A&&`\0${r.length-1}d\x7F`}${L}\0${r.length}b\x7F`,l),i.push(...l?[l]:[],new wr(P,q,t,r));continue}else if(!l){o+=`
26
+ ${s.shift()}`,l,g=(d,u)=>{if(!u){o+=d;return}let{lastChild:h}=u;if(Ro(u)){let m=new T(d,t,r);m.type="table-inter",m.setAttribute("stage",3),u.insertAt(m)}else h.setText(h.toString()+d)},p=()=>l.type==="td"?i.pop():l;for(let d of s){l=i.pop();let[u]=/^(?:\s|\0\d+c\x7F)*/u.exec(d),h=d.slice(u.length),m=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{(?:\0\d+c\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(h);if(m){for(;l&&l.type!=="td";)l=i.pop();let[,v,P,F,z]=m;v&&new Et(v,t,r),g(`
27
+ ${u}${v&&`\0${r.length-1}d\x7F`}${P}\0${r.length}b\x7F`,l),i.push(...l?[l]:[],new wr(F,z,t,r));continue}else if(!l){o+=`
29
28
  ${d}`;continue}let x=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(h);if(!x){g(`
30
- ${d}`,l),i.push(l);continue}let[,b,E,S,w]=x;if(b){for(;l.type!=="table";)l=i.pop();l.close(`
31
- ${u}${b}`,!0),g(w,i[i.length-1])}else if(E){l=p(),l.type==="tr"&&(l=i.pop());let A=new Sr(`
32
- ${u}${E}`,w,t,r);i.push(l,A),l.insertAt(A)}else{l=p();let A=S==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,L=A.exec(w),P=0,q=`
33
- ${u}${S}`,V=re=>{let fe=new Ye(q,w.slice(P,L==null?void 0:L.index),t,r);return re.insertAt(fe),fe};for(;L;)V(l),{lastIndex:P}=A,[q]=L,L=A.exec(w);i.push(l,V(l))}}return o.slice(1)}});var Cr,ns=k(()=>{"use strict";qe();Cr=class extends Y{get type(){return"hr"}}});var is,An,Bo,tt,ss=k(()=>{"use strict";De();qe();is=[ge(!0)];tt=class extends(Bo=Y){get type(){return"double-underscore"}constructor(n,e,t,r){super(n,t,r)}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};An=se(Bo),tt=ae(An,0,"DoubleUnderscoreToken",is,tt),oe(An,1,tt)});var os={};H(os,{parseHrAndDoubleUnderscore:()=>jo});var jo,as=k(()=>{"use strict";ns();ss();Zr();jo=({firstChild:{data:a},type:n,name:e},t,r)=>{let{doubleUnderscore:i}=t,s=new Set(i[0]),o=new Set(i[1]);return n!=="root"&&(n!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(l,g,p)=>(new Cr(p,t,r),`${g}\0${r.length-1}r\x7F`)).replace(new RegExp(`__(${[...i[0],...i[1]].join("|")})__`,"giu"),(l,g)=>{let p=o.has(g);return p||s.has(g.toLowerCase())?(new tt(g,p,t,r),`\0${r.length-1}u\x7F`):l}).replace(/^((?:\0\d+c\x7F)*)(={1,6})(.+)\2((?:[^\S\n]|\0\d+c\x7F)*)$/gmu,(l,g,p,d,u)=>{let h=`${g}\0${r.length}h\x7F`;return new xt(p.length,[d,u],t,r),h}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var $r,ls=k(()=>{"use strict";j();Q();R();qe();$r=class extends Y{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}lint(n=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:r}=this,i=f.msg('lonely "$1"',"'"),s=[],o=new F(this,n),l,g=(p,d,u)=>({desc:"escape",range:[p,d],text:"&apos;".repeat(u)});if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){l=$(this,o,"lonely-apos",i);let{startIndex:p,startLine:d,startCol:u}=l,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),m=n-h;s.push({...l,startIndex:m,endIndex:p,startCol:u-h,endLine:d,endCol:u,suggestions:[g(m,p,h)]})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){l!=null||(l=$(this,o,"lonely-apos",i));let{endIndex:p,endLine:d,endCol:u}=l,[{length:h}]=/^'+/u.exec(t.data),m=p+h;s.push({...l,startIndex:p,endIndex:m,startLine:d,startCol:u,endCol:u+h,suggestions:[g(p,m,h)]})}return r&&this.closest("heading-title")&&s.push($(this,o,"bold-header","bold in section header","warning")),s}json(){let n=super.json();return Object.assign(n,{bold:this.bold,italic:this.italic}),n}}});var ds={};H(ds,{parseQuotes:()=>wn});var wn,Sn=k(()=>{"use strict";ls();wn=(a,n,e)=>{var p;let t=a.split(/('{2,})/u),{length:r}=t;if(r===1)return a;let i=0,s=0,o,l,g;for(let d=1;d<r;d+=2){let u=t[d].length;switch(u){case 2:s++;break;case 4:t[d-1]+="'",t[d]="'''";case 3:if(i++,o!==void 0)break;t[d-1].endsWith(" ")?l===void 0&&g===void 0&&(g=d):t[d-1].slice(-2,-1)===" "?o=d:l!=null||(l=d);break;default:t[d-1]+="'".repeat(u-5),t[d]="'''''",s++,i++}}if(s%2===1&&i%2===1){let d=(p=o!=null?o:l)!=null?p:g;d!==void 0&&(t[d]="''",t[d-1]+="'")}for(let d=1;d<r;d+=2)new $r(t[d],n,e),t[d]=`\0${e.length-1}q\x7F`;return t.join("")}});var gs={};H(gs,{parseExternalLinks:()=>Cn});var Cn,$n=k(()=>{"use strict";X();cn();vr();Cn=(a,n,e,t)=>{let r=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${Ae}|\0\d+m\x7F)${we}(?=[[\]<>"\t\p{Zs}]|\0\d))(\p{Zs}*(?!\p{Zs}))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu");return a.replace(r,(i,s,o,l)=>{let{length:g}=e,p=/&[lg]t;/u.exec(s);return p&&(s=s.slice(0,p.index),o="",l=s.slice(p.index)+o+l),t?(new Ie(s,"ext-link-url",n,e),`[\0${g}f\x7F${o}${l}]`):(new wt(s,o,l,n,e),`\0${g}w\x7F`)})}});var Nr,ps=k(()=>{"use strict";Gt();Nr=class extends Ce{get type(){return"category"}}});var cs={};H(cs,{parseLinks:()=>us});var us,hs=k(()=>{"use strict";R();Sn();$n();un();dn();ps();us=(a,n,e)=>{let t=n.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,r=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,i=new RegExp(String.raw`^\s*(?:${n.protocol}|//)`,"iu"),s=a.split("[["),o=s.shift();for(let l=0;l<s.length;l++){let g=!1,p,d,u,h,m=s[l],x=t.exec(m);if(x)[,p,d,u,h]=x,h.startsWith("]")&&(u!=null&&u.includes("["))&&(u+="]",h=h.slice(1));else{let P=r.exec(m);P&&(g=!0,[,p,d,u]=P)}if(p===void 0||i.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){o+=`[[${m}`;continue}let b=p.trim().startsWith(":");if(b&&g){o+=`[[${m}`;continue}let E=f.normalizeTitle(p,0,!1,n,!0,!0,!0),{ns:S,valid:w,interwiki:A}=E;if(w){if(g){if(A||S!==6){o+=`[[${m}`;continue}let P=!1;for(l++;l<s.length;l++){let q=s[l],V=q.split("]]");if(V.length>2){P=!0,u+=`[[${V[0]}]]${V[1]}`,h=V.slice(2).join("]]");break}else if(V.length===2)u+=`[[${V[0]}]]${V[1]}`;else{u+=`[[${q}`;break}}if(u=us(u,n,e),!P){o+=`[[${p}${d}${u}`;continue}}}else{o+=`[[${m}`;continue}u&&(u=wn(u,n,e));let L=At;b||(!A&&S===6?(u&&(u=Cn(u,n,e,!0)),L=yt):!A&&S===14&&(L=Nr)),u===void 0&&d&&(u=""),o+=`\0${e.length}l\x7F${h}`,new L(p,u,n,e,d)}return o}});var ms={};H(ms,{parseMagicLinks:()=>Go});var qo,_o,Go,fs=k(()=>{"use strict";X();vr();qo=/[^,;\\.:!?)][,;\\.:!?)]+$/u,_o=/[^,;\\.:!?][,;\\.:!?]+$/u,Go=(a,n,e)=>{let t=String.raw`[\p{Zs}\t]|&nbsp;|&#0*160;|&#x0*a0;`,r=`(?:${t}|-)`,i=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${n.protocol})(${Ae}${we})|(?:RFC|PMID)(?:${t})+\d+\b|ISBN(?:${t})+(?:97[89]${r}?)?(?:\d${r}?){9}[\dx]\b)`,"giu");return a.replace(i,(s,o,l)=>{let g=o?s.slice(o.length):s;if(l){let p="",d=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(g);d&&(p=g.slice(d.index),g=g.slice(0,d.index));let u=g.includes("(")?_o:qo,h=u.exec(g);if(h){let m=1;h[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(g.slice(0,h.index))&&(m=2),p=g.slice(h.index+m)+p,g=g.slice(0,h.index+m)}return p.length>=l.length?s:(new Ie(g,void 0,n,e),`${o}\0${e.length-1}w\x7F${p}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(g))return s;return new Ie(g,"magic-link",n,e),`${o}\0${e.length-1}i\x7F`})}});var Er,xs=k(()=>{"use strict";yn();Er=class extends Nt{get type(){return"list"}}});var Ts={};H(Ts,{parseList:()=>Oo});var Oo,bs=k(()=>{"use strict";xs();vn();Oo=(a,n,e)=>{let t=/^((?:\0\d+c\x7F)*)([;:*#]+)/u.exec(a);if(!t)return a;let[r,i,s]=t,o=`${i}\0${e.length}d\x7F${a.slice(r.length)}`,l=s.split(";").length-1;if(new Er(s,n,e),!l)return o;let{html:[g]}=n,p=/:+|-\{|\0\d+[xq]\x7F/gu,d=p,u=d.exec(o),h=0,m=!1,x=!1,b=0,E=(w,A)=>(new Et(w,n,e),`${o.slice(0,A)}\0${e.length-1}d\x7F${o.slice(A+w.length)}`),S=w=>{w?h&&h--:h++};for(;u&&l;){let{0:w,index:A}=u;if(w==="-{"){if(!b){let{lastIndex:L}=d;d=/-\{|\}-/gu,d.lastIndex=L}b++}else if(w==="}-"){if(b--,!b){let{lastIndex:L}=d;d=p,d.lastIndex=L}}else if(w.endsWith("x\x7F")){let{name:L,closing:P,selfClosing:q}=e[Number(w.slice(1,-2))];(!q||g.includes(L))&&S(P)}else if(w.endsWith("q\x7F")){let{bold:L,italic:P}=e[Number(w.slice(1,-2))];L&&(S(m),m=!m),P&&(S(x),x=!x)}else if(h===0){if(w.length>=l)return E(w.slice(0,l),A);l-=w.length,d.lastIndex=A+4+String(e.length).length,o=E(w,A)}u=d.exec(o)}return o}});var ks,Fe,Ir,ys=k(()=>{"use strict";j();Q();R();B();Ne();ks=new Set(["A","T","R","D","-","H","N"]),Ir=class extends T{constructor(e,t=f.getConfig(),r=[]){super(void 0,t,r,{});y(this,Fe);this.append(...e.map(i=>new z(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){v(this,Fe,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(){return super.toString(";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(c(this,Fe).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,Fe).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,Fe).filter(h=>ks.has(h))),o=c(this,Fe).filter(h=>!h).length,l=c(this,Fe).length-i.size-o,g=super.lint(e,t);if(r.size===l||s.size===l)return g;let p=new F(this,e),{childNodes:d,length:u}=this;for(let h=0;h<u;h++){let m=d[h],x=m.text().trim();if(x&&!r.has(x)&&!i.has(x)&&(r.size>0||!s.has(x))){let b=C(m,p,"no-ignored","invalid conversion flag");r.size===0&&ks.has(x.toUpperCase())?b.fix={range:[b.startIndex,b.endIndex],text:x.toUpperCase()}:b.suggestions=[{desc:"remove",range:[b.startIndex,b.endIndex],text:""}],g.push(b)}}return g}print(){return super.print({sep:";"})}};Fe=new WeakMap});var It,vs=k(()=>{"use strict";R();B();Ne();It=class extends T{get type(){return"converter-rule"}constructor(n,e=!0,t=f.getConfig(),r=[]){super(void 0,t,r);let i=n.indexOf(":"),s=n.slice(0,i).indexOf("=>"),o=s===-1?n.slice(0,i):n.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new z(o,"converter-rule-variant",t,r)),super.insertAt(new z(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new z(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new z(n,"converter-rule-to",t,r))}toString(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`${e.toString()}=>${t.toString()}:${r.toString()}`}return super.toString(":")}text(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`${e.text()}=>${t.text()}:${r.text()}`}return super.text(":")}getGaps(n){return n===0&&this.length===3?2:1}print(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${r.print()}</span>`}return super.print({sep:":"})}}});var Lr,As=k(()=>{"use strict";X();R();B();ys();vs();Lr=class extends T{get type(){return"converter"}constructor(n,e,t=f.getConfig(),r=[]){super(void 0,t,r),this.append(new Ir(n,t,r));let[i]=e,s=i.includes(":"),o=new It(i,s,t,r);s&&o.length===1?this.insertAt(new It(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new It(l,!0,t,r)))}toString(){let{childNodes:[n,...e]}=this;return`-{${n.toString()}${n.length>0?"|":""}${e.map(String).join(";")}}-`}text(){let{childNodes:[n,...e]}=this;return`-{${n.text()}|${de(e,";")}}-`}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}getGaps(n){return n||this.firstChild.length>0?1:0}print(){let{childNodes:[n,...e]}=this;return`<span class="wpb-converter">-{${n.print()}${n.length>0?"|":""}${$e(e,{sep:";"})}}-</span>`}}});var ws={};H(ws,{parseConverter:()=>zo});var zo,Ss=k(()=>{"use strict";As();zo=(a,n,e)=>{let t=`(?:${n.variants.join("|")})`,r=/-\{/gu,i=/-\{|\}-/gu,s=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*${t}\s*:|(?:\s|\0\d+c\x7F)*$)`,"u"),o=[],l=r,g=l.exec(a);for(;g;){let{0:p,index:d}=g;if(p==="}-"){let u=o.pop(),{length:h}=e,m=a.slice(u.index+2,d),x=m.indexOf("|"),[b,E]=x===-1?[[],m]:[m.slice(0,x).split(";"),m.slice(x+1)],S=E.replace(/(&[#a-z\d]+);/giu,"$1"),w=S.split(s).map(A=>A.replace(/\x01/gu,";"));new Lr(b,w,n,e),a=`${a.slice(0,u.index)}\0${h}v\x7F${a.slice(d+2)}`,o.length===0&&(l=r),l.lastIndex=u.index+3+String(h).length}else o.push(g),l=i,l.lastIndex=d+2;g=l.exec(a)}return a}});var Fr={};H(Fr,{Token:()=>T});var Zt,me,_,M,rt,Lt,Kt,G,Cs,$s,Ns,Es,Is,Ls,Fs,Rs,Ps,Bs,js,qs,Nn,T,B=k(()=>{"use strict";X();Se();Te();j();R();Qn();Jn();Nn=class Nn extends nr{constructor(e,t=f.getConfig(),r=[],i){super();y(this,G);y(this,Zt,"plain");y(this,me,0);y(this,_);y(this,M);y(this,rt);y(this,Lt,!1);y(this,Kt);typeof e=="string"&&this.insertAt(e),v(this,_,t),v(this,M,r),r.push(this)}get type(){return c(this,Zt)}set type(e){v(this,Zt,e)}parseOnce(e=c(this,me),t=!1){if(e<c(this,me)||!this.getAttribute("plain")||this.length===0)return this;if(c(this,me)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,M).shift();let r=I(this,G,Cs).call(this);t&&(t=!r)}v(this,rt,t),I(this,G,$s).call(this,t);break;case 1:I(this,G,Ns).call(this);break;case 2:I(this,G,Es).call(this);break;case 3:I(this,G,Is).call(this);break;case 4:I(this,G,Ls).call(this);break;case 5:I(this,G,Fs).call(this);break;case 6:I(this,G,Rs).call(this);break;case 7:I(this,G,Ps).call(this);break;case 8:I(this,G,Bs).call(this);break;case 9:I(this,G,js).call(this);break;case 10:I(this,G,qs).call(this)}if(this.type==="root")for(let r of c(this,M))r.parseOnce(e,t);return tr(this,me)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new jt(i);if(isNaN(i.slice(-1)))return c(this,M)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?de(r):r}build(){v(this,me,11);let{length:e,firstChild:t}=this,r=String(t);if(e===1&&t.type==="text"&&r.includes("\0")&&(this.replaceChildren(...this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,M))i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,M))e.afterBuild();v(this,Lt,!0)}parse(e=11,t){for(e=Math.min(e,11);c(this,me)<e;)this.parseOnce(c(this,me),t);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===Nn;case"config":return c(this,_);case"include":return(t=c(this,rt))!=null?t:!!c(this.getRootNode(),rt);case"accum":return c(this,M);case"built":return c(this,Lt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,me)===0&&this.type==="root"&&c(this,M).shift(),v(this,me,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new jt(e):e;return super.insertAt(r,t),r.type==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r,i,s){return f.normalizeTitle(e,t,c(this,rt),c(this,_),r,i,s)}lint(e=this.getAbsoluteIndex(),t){var i;let r=super.lint(e,t);if(this.type==="root"){let s={};for(let h of this.querySelectorAll("category")){let m=s[h.name];m?m.add(h):s[h.name]=new Set([h])}for(let h of Object.values(s))h.size>1&&r.push(...[...h].map(m=>{let x=$(m,{start:m.getAbsoluteIndex()},"no-duplicate","duplicated category");return x.suggestions=[{desc:"remove",range:[x.startIndex,x.endIndex],text:""}],x}));let o=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,l=this.toString(),g=[],p=o.exec(l),d=0,u=0;for(;p;){let{1:h,index:m}=p,x=(i=p[2])==null?void 0:i.trim();u+=l.slice(d,m).split(`
34
- `).length-1,d=m,g.push({line:u+(h==="disable-line"?0:1),from:h==="disable"?o.lastIndex:void 0,to:h==="enable"?o.lastIndex:void 0,rules:x?new Set(x.split(",").map(b=>b.trim())):void 0}),p=o.exec(l)}r=r.filter(({rule:h,startLine:m,startIndex:x})=>{let b={pos:0};for(let{line:E,from:S,to:w,rules:A}of g){if(E>m+1)break;if(A&&!A.has(h))continue;if(E===m&&S===void 0&&w===void 0)return!1;S<=x&&S>b.pos?(b.pos=S,b.type="from"):w<=x&&w>b.pos&&(b.pos=w,b.type="to")}return b.type!=="from"})}return r}toString(e){var i;let{rev:t}=ke,r=this.getRootNode();return r.type==="root"&&c(r,Lt)?((i=c(this,Kt))!=null||v(this,Kt,[t,super.toString(e)]),c(this,Kt)[1]):super.toString(e)}};Zt=new WeakMap,me=new WeakMap,_=new WeakMap,M=new WeakMap,rt=new WeakMap,Lt=new WeakMap,Kt=new WeakMap,G=new WeakSet,Cs=function(){let{parseRedirect:e}=(ii(),O(ni)),t=this.firstChild.toString(),r=e(t,c(this,_),c(this,M));return r&&this.setText(r),!!r},$s=function(e){let{parseCommentAndExt:t}=(Ui(),O(Wi));this.setText(t(this.firstChild.toString(),c(this,_),c(this,M),e))},Ns=function(){let{parseBraces:e}=(Yr(),O($i)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,_),c(this,M));this.setText(this.type==="root"?r:r.slice(1))},Es=function(){var t;if((t=c(this,_).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(Vi(),O(Hi));this.setText(e(this.firstChild.toString(),c(this,_),c(this,M)))},Is=function(){var t;if((t=c(this,_).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(rs(),O(ts));this.setText(e(this,c(this,_),c(this,M)))},Ls=function(){var t;if((t=c(this,_).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(as(),O(os));this.setText(e(this,c(this,_),c(this,M)))},Fs=function(){let{parseLinks:e}=(hs(),O(cs));this.setText(e(this.firstChild.toString(),c(this,_),c(this,M)))},Rs=function(){var r;if((r=c(this,_).excludes)!=null&&r.includes("quote"))return;let{parseQuotes:e}=(Sn(),O(ds)),t=this.firstChild.toString().split(`
35
- `);for(let i=0;i<t.length;i++)t[i]=e(t[i],c(this,_),c(this,M));this.setText(t.join(`
36
- `))},Ps=function(){var t;if((t=c(this,_).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=($n(),O(gs));this.setText(e(this.firstChild.toString(),c(this,_),c(this,M)))},Bs=function(){var t;if((t=c(this,_).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(fs(),O(ms));this.setText(e(this.firstChild.toString(),c(this,_),c(this,M)))},js=function(){var i;if((i=c(this,_).excludes)!=null&&i.includes("list"))return;let{parseList:e}=(bs(),O(Ts)),t=this.firstChild.toString().split(`
37
- `),r=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;r<t.length;r++)t[r]=e(t[r],c(this,_),c(this,M));this.setText(t.join(`
38
- `))},qs=function(){if(c(this,_).variants.length>0){let{parseConverter:e}=(Ss(),O(ws));this.setText(e(this.firstChild.toString(),c(this,_),c(this,M)))}};T=Nn});var ke,Ke,Mr,Yi,sr,Te=k(()=>{"use strict";ke={running:!1,run(a){let{running:n}=this;this.running=!0;try{let{Token:e}=(B(),O(Fr)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=n,t}catch(e){throw this.running=n,e}},rev:0},Ke=a=>n=>n.type===a,Mr=(a,n,e,t=[])=>{let r=[...a.childNodes],i=r.splice(n,e,...t);a.setAttribute("childNodes",r);for(let s of t)s.setAttribute("parentNode",a);return i},Yi=(a,n)=>new Array(a).fill(void 0).map((e,t)=>n(t)),sr=(a,n)=>{Object.defineProperty(a,"name",{value:n.name})}});var Gs={};H(Gs,{Title:()=>En});var _s,Jt,Yt,En,Os=k(()=>{"use strict";X();_s=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25")),En=class{constructor(n,e,t,r,i){y(this,Jt);y(this,Yt);U(this,"ns");U(this,"fragment");U(this,"interwiki","");U(this,"valid");U(this,"encoded",!1);let s=n.trim().startsWith("../");if(n=Mn(n),r&&n.includes("%"))try{let l=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(n);n=_s(n),this.encoded=l}catch(l){}if(n=n.replace(/_/gu," ").trim(),s)this.ns=0;else{let l=e;n.startsWith(":")&&(l=0,n=n.slice(1).trim());let g=n.split(":");if(g.length>1){let p=t.nsid[g[0].trim().toLowerCase()];p&&(l=p,n=g.slice(1).join(":").trim())}this.ns=l}let o=n.indexOf("#");if(o!==-1){let l=n.slice(o+1).trimEnd();if(l.includes("%"))try{l=_s(l)}catch(g){}this.fragment=l,n=n.slice(0,o).trim()}this.valid=!!(n||this.interwiki||i&&this.ns===0&&this.fragment!==void 0)&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(s?/^(?:\.\.\/)+(.*)/u.exec(n)[1]:n),this.main=n,Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}}),v(this,Yt,t.namespaces)}get main(){return c(this,Jt)}set main(n){n=n.replace(/_/gu," ").trim(),v(this,Jt,n&&n[0].toUpperCase()+n.slice(1))}get prefix(){let n=c(this,Yt)[this.ns];return n+(n&&":")}get title(){return(this.interwiki+(this.interwiki&&":")+this.prefix+this.main).replace(/ /gu,"_")}get extension(){let{main:n}=this,e=n.lastIndexOf(".");return e===-1?void 0:n.slice(e+1).toLowerCase()}toString(){return`${this.title}${this.fragment===void 0?"":`#${this.fragment}`}`}};Jt=new WeakMap,Yt=new WeakMap});var nt,zs,Mo,f,R=k(()=>{Gn();Te();Se();X();nt={i18n:void 0,rules:_n,getConfig(){return{...Dn,...this.config,excludes:[]}},msg(a,n=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(n))},normalizeTitle(a,n=0,e,t=nt.getConfig(),r,i=!1,s=!1){let{Title:o}=(Os(),O(Gs));if(r)return new o(a,n,t,i,s);let{Token:l}=(B(),O(Fr));return ke.run(()=>{let g=new l(a,t);g.type="root",g.parseOnce(0,e).parseOnce();let p=new o(g.toString(),n,t,i,s);for(let d of["main","fragment"]){let u=p[d];u!=null&&u.includes("\0")&&(p[d]=g.buildFromStr(u,1))}return p})},parse(a,n,e=11,t=nt.getConfig()){a=zn(a);let{Token:r}=(B(),O(Fr));return ke.run(()=>{let s=new r(a,t);return s.type="root",s.parse(e,n)})}},zs={},Mo=new Set(["normalizeTitle","parse"]);for(let a in nt)Mo.has(a)||(zs[a]={enumerable:!1});Object.defineProperties(nt,zs);typeof self=="object"?Object.assign(self,{Parser:nt}):typeof globalThis=="object"&&Object.assign(globalThis,{Parser:nt});f=nt});R();})();
29
+ ${d}`,l),i.push(l);continue}let[,y,L,w,C]=x;if(y){for(;l.type!=="table";)l=i.pop();l.close(`
30
+ ${u}${y}`,!0),g(C,i[i.length-1])}else if(L){l=p(),l.type==="tr"&&(l=i.pop());let v=new Sr(`
31
+ ${u}${L}`,C,t,r);i.push(l,v),l.insertAt(v)}else{l=p();let v=w==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,P=v.exec(C),F=0,z=`
32
+ ${u}${w}`,H=ne=>{let me=new Je(z,C.slice(F,P==null?void 0:P.index),t,r);return ne.insertAt(me),me};for(;P;)H(l),{lastIndex:F}=v,[z]=P,P=v.exec(C);i.push(l,H(l))}}return o.slice(1)}});var Cr,ns=b(()=>{"use strict";qe();Cr=class extends Y{get type(){return"hr"}}});var is,An,Bo,et,ss=b(()=>{"use strict";De();qe();is=[ge()];et=class extends(Bo=Y){get type(){return"double-underscore"}constructor(n,e,t,r){super(n,t,r)}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};An=oe(Bo),et=le(An,0,"DoubleUnderscoreToken",is,et),ae(An,1,et)});var os={};V(os,{parseHrAndDoubleUnderscore:()=>jo});var jo,as=b(()=>{"use strict";ns();ss();Zr();jo=({firstChild:{data:a},type:n,name:e},t,r)=>{let{doubleUnderscore:i}=t,s=new Set(i[0]),o=new Set(i[1]);return n!=="root"&&(n!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(l,g,p)=>(new Cr(p,t,r),`${g}\0${r.length-1}r\x7F`)).replace(new RegExp(`__(${[...i[0],...i[1]].join("|")})__`,"giu"),(l,g)=>{let p=o.has(g);return p||s.has(g.toLowerCase())?(new et(g,p,t,r),`\0${r.length-1}u\x7F`):l}).replace(/^((?:\0\d+c\x7F)*)(={1,6})(.+)\2((?:[^\S\n]|\0\d+c\x7F)*)$/gmu,(l,g,p,d,u)=>{let h=`${g}\0${r.length}h\x7F`;return new ft(p.length,[d,u],t,r),h}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var $r,ls=b(()=>{"use strict";j();Q();R();qe();$r=class extends Y{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}lint(n=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:r}=this,i=f.msg('lonely "$1"',"'"),s=[],o=new I(this,n),l,g=(p,d,u)=>({desc:"escape",range:[p,d],text:"&apos;".repeat(u)});if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){l=$(this,o,"lonely-apos",i);let{startIndex:p,startLine:d,startCol:u}=l,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),m=n-h;s.push({...l,startIndex:m,endIndex:p,startCol:u-h,endLine:d,endCol:u,suggestions:[g(m,p,h)]})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){l!=null||(l=$(this,o,"lonely-apos",i));let{endIndex:p,endLine:d,endCol:u}=l,[{length:h}]=/^'+/u.exec(t.data),m=p+h;s.push({...l,startIndex:p,endIndex:m,startLine:d,startCol:u,endCol:u+h,suggestions:[g(p,m,h)]})}return r&&this.closest("heading-title")&&s.push($(this,o,"bold-header","bold in section header","warning")),s}json(){let n=super.json();return Object.assign(n,{bold:this.bold,italic:this.italic}),n}}});var ds={};V(ds,{parseQuotes:()=>wn});var wn,Sn=b(()=>{"use strict";ls();wn=(a,n,e)=>{var p;let t=a.split(/('{2,})/u),{length:r}=t;if(r===1)return a;let i=0,s=0,o,l,g;for(let d=1;d<r;d+=2){let u=t[d].length;switch(u){case 2:s++;break;case 4:t[d-1]+="'",t[d]="'''";case 3:if(i++,o!==void 0)break;t[d-1].endsWith(" ")?l===void 0&&g===void 0&&(g=d):t[d-1].slice(-2,-1)===" "?o=d:l!=null||(l=d);break;default:t[d-1]+="'".repeat(u-5),t[d]="'''''",s++,i++}}if(s%2===1&&i%2===1){let d=(p=o!=null?o:l)!=null?p:g;d!==void 0&&(t[d]="''",t[d-1]+="'")}for(let d=1;d<r;d+=2)new $r(t[d],n,e),t[d]=`\0${e.length-1}q\x7F`;return t.join("")}});var gs={};V(gs,{parseExternalLinks:()=>Cn});var Cn,$n=b(()=>{"use strict";X();cn();vr();Cn=(a,n,e,t)=>{let r=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${ve}|\0\d+m\x7F)${Ae}(?=[[\]<>"\t\p{Zs}]|\0\d))(\p{Zs}*(?!\p{Zs}))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu");return a.replace(r,(i,s,o,l)=>{let{length:g}=e,p=/&[lg]t;/u.exec(s);return p&&(s=s.slice(0,p.index),o="",l=s.slice(p.index)+o+l),t?(new Ie(s,"ext-link-url",n,e),`[\0${g}f\x7F${o}${l}]`):(new wt(s,o,l,n,e),`\0${g}w\x7F`)})}});var Nr,ps=b(()=>{"use strict";Ot();Nr=class extends Se{get type(){return"category"}}});var cs={};V(cs,{parseLinks:()=>us});var us,hs=b(()=>{"use strict";R();Sn();$n();un();dn();ps();us=(a,n,e)=>{let t=n.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,r=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,i=new RegExp(String.raw`^\s*(?:${n.protocol}|//)`,"iu"),s=a.split("[["),o=s.shift();for(let l=0;l<s.length;l++){let g=!1,p,d,u,h,m=s[l],x=t.exec(m);if(x)[,p,d,u,h]=x,h.startsWith("]")&&(u!=null&&u.includes("["))&&(u+="]",h=h.slice(1));else{let F=r.exec(m);F&&(g=!0,[,p,d,u]=F)}if(p===void 0||i.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){o+=`[[${m}`;continue}let y=p.trim().startsWith(":");if(y&&g){o+=`[[${m}`;continue}let L=f.normalizeTitle(p,0,!1,n,!0,!0,!0),{ns:w,valid:C,interwiki:v}=L;if(C){if(g){if(v||w!==6){o+=`[[${m}`;continue}let F=!1;for(l++;l<s.length;l++){let z=s[l],H=z.split("]]");if(H.length>2){F=!0,u+=`[[${H[0]}]]${H[1]}`,h=H.slice(2).join("]]");break}else if(H.length===2)u+=`[[${H[0]}]]${H[1]}`;else{u+=`[[${z}`;break}}if(u=us(u,n,e),!F){o+=`[[${p}${d}${u}`;continue}}}else{o+=`[[${m}`;continue}u&&(u=wn(u,n,e));let P=At;y||(!v&&w===6?(u&&(u=Cn(u,n,e,!0)),P=yt):!v&&w===14&&(P=Nr)),u===void 0&&d&&(u=""),o+=`\0${e.length}l\x7F${h}`,new P(p,u,n,e,d)}return o}});var ms={};V(ms,{parseMagicLinks:()=>Oo});var qo,_o,Oo,fs=b(()=>{"use strict";X();vr();qo=/[^,;\\.:!?)][,;\\.:!?)]+$/u,_o=/[^,;\\.:!?][,;\\.:!?]+$/u,Oo=(a,n,e)=>{let t=String.raw`[\p{Zs}\t]|&nbsp;|&#0*160;|&#x0*a0;`,r=`(?:${t}|-)`,i=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${n.protocol})(${ve}${Ae})|(?:RFC|PMID)(?:${t})+\d+\b|ISBN(?:${t})+(?:97[89]${r}?)?(?:\d${r}?){9}[\dx]\b)`,"giu");return a.replace(i,(s,o,l)=>{let g=o?s.slice(o.length):s;if(l){let p="",d=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(g);d&&(p=g.slice(d.index),g=g.slice(0,d.index));let u=g.includes("(")?_o:qo,h=u.exec(g);if(h){let m=1;h[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(g.slice(0,h.index))&&(m=2),p=g.slice(h.index+m)+p,g=g.slice(0,h.index+m)}return p.length>=l.length?s:(new Ie(g,void 0,n,e),`${o}\0${e.length-1}w\x7F${p}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(g))return s;return new Ie(g,"magic-link",n,e),`${o}\0${e.length-1}i\x7F`})}});var Er,xs=b(()=>{"use strict";yn();Er=class extends Nt{get type(){return"list"}}});var Ts={};V(Ts,{parseList:()=>Go});var Go,bs=b(()=>{"use strict";xs();vn();Go=(a,n,e)=>{let t=/^((?:\0\d+c\x7F)*)([;:*#]+\s*)/u.exec(a);if(!t)return a;let[r,i,s]=t,o=s.split(/(?=;)/u),l=i+o.map((v,P)=>`\0${e.length+P}d\x7F`).join("")+a.slice(r.length),g=o.length-(o[0].startsWith(";")?0:1);for(let v of o)new Er(v,n,e);if(!g)return l;let{html:[p]}=n,d=/:+\s*|-\{|\0\d+[xq]\x7F/gu,u=d,h=u.exec(l),m=0,x=!1,y=!1,L=0,w=(v,P)=>(new Et(v,n,e),`${l.slice(0,P)}\0${e.length-1}d\x7F${l.slice(P+v.length)}`),C=v=>{v?m&&m--:m++};for(;h&&g;){let{0:v,index:P}=h;if(v==="-{"){if(!L){let{lastIndex:F}=u;u=/-\{|\}-/gu,u.lastIndex=F}L++}else if(v==="}-"){if(L--,!L){let{lastIndex:F}=u;u=d,u.lastIndex=F}}else if(v.endsWith("x\x7F")){let{name:F,closing:z,selfClosing:H}=e[Number(v.slice(1,-2))];(!H||p.includes(F))&&C(z)}else if(v.endsWith("q\x7F")){let{bold:F,italic:z}=e[Number(v.slice(1,-2))];F&&(C(x),x=!x),z&&(C(y),y=!y)}else if(m===0){if(v.length>=g)return w(v.slice(0,g),P);g-=v.length,u.lastIndex=P+4+String(e.length).length,l=w(v,P)}h=u.exec(l)}return l}});var ks,Fe,Ir,ys=b(()=>{"use strict";j();Q();R();B();Ne();ks=new Set(["A","T","R","D","-","H","N"]),Ir=class extends T{constructor(e,t=f.getConfig(),r=[]){super(void 0,t,r,{});k(this,Fe);this.append(...e.map(i=>new G(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){A(this,Fe,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(c(this,Fe).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,Fe).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,Fe).filter(h=>ks.has(h))),o=c(this,Fe).filter(h=>!h).length,l=c(this,Fe).length-i.size-o,g=super.lint(e,t);if(r.size===l||s.size===l)return g;let p=new I(this,e),{childNodes:d,length:u}=this;for(let h=0;h<u;h++){let m=d[h],x=m.text().trim();if(x&&!r.has(x)&&!i.has(x)&&(r.size>0||!s.has(x))){let y=S(m,p,"no-ignored","invalid conversion flag");r.size===0&&ks.has(x.toUpperCase())?y.fix={range:[y.startIndex,y.endIndex],text:x.toUpperCase()}:y.suggestions=[{desc:"remove",range:[y.startIndex,y.endIndex],text:""}],g.push(y)}}return g}print(){return super.print({sep:";"})}};Fe=new WeakMap});var It,vs=b(()=>{"use strict";R();B();Ne();It=class extends T{get type(){return"converter-rule"}constructor(n,e=!0,t=f.getConfig(),r=[]){super(void 0,t,r);let i=n.indexOf(":"),s=n.slice(0,i).indexOf("=>"),o=s===-1?n.slice(0,i):n.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new G(o,"converter-rule-variant",t,r)),super.insertAt(new G(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new G(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new G(n,"converter-rule-to",t,r))}toString(n){let{childNodes:e,firstChild:t,lastChild:r}=this;return e.length===3?`${t.toString(n)}=>${e[1].toString(n)}:${r.toString(n)}`:super.toString(n,":")}text(){let{childNodes:n,firstChild:e,lastChild:t}=this;return n.length===3?`${e.text()}=>${n[1].text()}:${t.text()}`:super.text(":")}getGaps(n){return n===0&&this.length===3?2:1}print(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${r.print()}</span>`}return super.print({sep:":"})}}});var Lr,As=b(()=>{"use strict";X();R();B();ys();vs();Lr=class extends T{get type(){return"converter"}constructor(n,e,t=f.getConfig(),r=[]){super(void 0,t,r),this.append(new Ir(n,t,r));let[i]=e,s=i.includes(":"),o=new It(i,s,t,r);s&&o.length===1||!s&&e.length===2&&!te(e[1]).trim()?this.insertAt(new It(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new It(l,!0,t,r)))}toString(n){let{childNodes:[e,...t]}=this;return`-{${e.toString(n)}${e.length>0?"|":""}${t.map(r=>r.toString(n)).join(";")}}-`}text(){let{childNodes:[n,...e]}=this;return`-{${n.text()}|${de(e,";")}}-`}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}getGaps(n){return n||this.firstChild.length>0?1:0}print(){let{childNodes:[n,...e]}=this;return`<span class="wpb-converter">-{${n.print()}${n.length>0?"|":""}${$e(e,{sep:";"})}}-</span>`}}});var ws={};V(ws,{parseConverter:()=>zo});var zo,Ss=b(()=>{"use strict";As();zo=(a,n,e)=>{let t=`(?:${n.variants.join("|")})`,r=/-\{/gu,i=/-\{|\}-/gu,s=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*${t}\s*:|(?:\s|\0\d+c\x7F)*$)`,"u"),o=[],l=r,g=l.exec(a);for(;g;){let{0:p,index:d}=g;if(p==="}-"){let u=o.pop(),{length:h}=e,m=a.slice(u.index+2,d),x=m.indexOf("|"),[y,L]=x===-1?[[],m]:[m.slice(0,x).split(";"),m.slice(x+1)],w=L.replace(/(&[#a-z\d]+);/giu,"$1"),C=w.split(s).map(v=>v.replace(/\x01/gu,";"));new Lr(y,C,n,e),a=`${a.slice(0,u.index)}\0${h}v\x7F${a.slice(d+2)}`,o.length===0&&(l=r),l.lastIndex=u.index+3+String(h).length}else o.push(g),l=i,l.lastIndex=d+2;g=l.exec(a)}return a}});var Fr={};V(Fr,{Token:()=>T});var Zt,he,q,M,tt,Lt,Kt,_,Cs,$s,Ns,Es,Is,Ls,Fs,Rs,Ps,Bs,js,qs,Nn,T,B=b(()=>{"use strict";X();we();xe();j();R();Qn();Jn();Nn=class Nn extends nr{constructor(e,t=f.getConfig(),r=[],i){super();k(this,_);k(this,Zt,"plain");k(this,he,0);k(this,q);k(this,M);k(this,tt);k(this,Lt,!1);k(this,Kt);typeof e=="string"&&this.insertAt(e),A(this,q,t),A(this,M,r),r.push(this)}get type(){return c(this,Zt)}set type(e){A(this,Zt,e)}parseOnce(e=c(this,he),t=!1){if(e<c(this,he)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,he)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,M).pop();let r=E(this,_,Cs).call(this);t&&(t=!r)}A(this,tt,t),E(this,_,$s).call(this,t);break;case 1:E(this,_,Ns).call(this);break;case 2:E(this,_,Es).call(this);break;case 3:E(this,_,Is).call(this);break;case 4:E(this,_,Ls).call(this);break;case 5:E(this,_,Fs).call(this);break;case 6:E(this,_,Rs).call(this);break;case 7:E(this,_,Ps).call(this);break;case 8:E(this,_,Bs).call(this);break;case 9:E(this,_,js).call(this);break;case 10:E(this,_,qs).call(this)}if(this.type==="root")for(let r of c(this,M))r==null||r.parseOnce(e,t);return tr(this,he)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new jt(i);if(isNaN(i.slice(-1)))return c(this,M)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?de(r):r}build(){A(this,he,11);let{length:e,firstChild:t}=this,r=String(t);if(e===1&&t.type==="text"&&r.includes("\0")&&(this.replaceChildren(...this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,M))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,M))e==null||e.afterBuild();A(this,Lt,!0)}parse(e=11,t){for(e=Math.min(e,11);c(this,he)<e;)this.parseOnce(c(this,he),t);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===Nn;case"config":return c(this,q);case"include":return(t=c(this,tt))!=null?t:!!c(this.getRootNode(),tt);case"accum":return c(this,M);case"built":return c(this,Lt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,he)===0&&this.type==="root"&&c(this,M).shift(),A(this,he,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new jt(e):e;return super.insertAt(r,t),r.type==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r,i,s){return f.normalizeTitle(e,t,c(this,tt),c(this,q),r,i,s)}lint(e=this.getAbsoluteIndex(),t){var i;let r=super.lint(e,t);if(this.type==="root"){let s={};for(let h of this.querySelectorAll("category")){let m=s[h.name];m?m.add(h):s[h.name]=new Set([h])}for(let h of Object.values(s))h.size>1&&r.push(...[...h].map(m=>{let x=$(m,{start:m.getAbsoluteIndex()},"no-duplicate","duplicated category");return x.suggestions=[{desc:"remove",range:[x.startIndex,x.endIndex],text:""}],x}));let o=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,l=this.toString(),g=[],p=o.exec(l),d=0,u=0;for(;p;){let{1:h,index:m}=p,x=(i=p[2])==null?void 0:i.trim();u+=l.slice(d,m).split(`
33
+ `).length-1,d=m,g.push({line:u+(h==="disable-line"?0:1),from:h==="disable"?o.lastIndex:void 0,to:h==="enable"?o.lastIndex:void 0,rules:x?new Set(x.split(",").map(y=>y.trim())):void 0}),p=o.exec(l)}r=r.filter(({rule:h,startLine:m,startIndex:x})=>{let y={pos:0};for(let{line:L,from:w,to:C,rules:v}of g){if(L>m+1)break;if(v&&!v.has(h))continue;if(L===m&&w===void 0&&C===void 0)return!1;w<=x&&w>y.pos?(y.pos=w,y.type="from"):C<=x&&C>y.pos&&(y.pos=C,y.type="to")}return y.type!=="from"})}return r}toString(e,t){var s;let{rev:r}=be,i=this.getRootNode();return!e&&i.type==="root"&&c(i,Lt)?((s=c(this,Kt))!=null||A(this,Kt,[r,super.toString(!1,t)]),c(this,Kt)[1]):super.toString(e,t)}};Zt=new WeakMap,he=new WeakMap,q=new WeakMap,M=new WeakMap,tt=new WeakMap,Lt=new WeakMap,Kt=new WeakMap,_=new WeakSet,Cs=function(){let{parseRedirect:e}=(ii(),O(ni)),t=this.firstChild.toString(),r=e(t,c(this,q),c(this,M));return r&&this.setText(r),!!r},$s=function(e){let{parseCommentAndExt:t}=(Ui(),O(Wi));this.setText(t(this.firstChild.toString(),c(this,q),c(this,M),e))},Ns=function(){let{parseBraces:e}=(Yr(),O($i)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,q),c(this,M));this.setText(this.type==="root"?r:r.slice(1))},Es=function(){var t;if((t=c(this,q).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(Vi(),O(Hi));this.setText(e(this.firstChild.toString(),c(this,q),c(this,M)))},Is=function(){var t;if((t=c(this,q).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(rs(),O(ts));this.setText(e(this,c(this,q),c(this,M)))},Ls=function(){var t;if((t=c(this,q).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(as(),O(os));this.setText(e(this,c(this,q),c(this,M)))},Fs=function(){let{parseLinks:e}=(hs(),O(cs));this.setText(e(this.firstChild.toString(),c(this,q),c(this,M)))},Rs=function(){var r;if((r=c(this,q).excludes)!=null&&r.includes("quote"))return;let{parseQuotes:e}=(Sn(),O(ds)),t=this.firstChild.toString().split(`
34
+ `);for(let i=0;i<t.length;i++)t[i]=e(t[i],c(this,q),c(this,M));this.setText(t.join(`
35
+ `))},Ps=function(){var t;if((t=c(this,q).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=($n(),O(gs));this.setText(e(this.firstChild.toString(),c(this,q),c(this,M)))},Bs=function(){var t;if((t=c(this,q).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(fs(),O(ms));this.setText(e(this.firstChild.toString(),c(this,q),c(this,M)))},js=function(){var i;if((i=c(this,q).excludes)!=null&&i.includes("list"))return;let{parseList:e}=(bs(),O(Ts)),t=this.firstChild.toString().split(`
36
+ `),r=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;r<t.length;r++)t[r]=e(t[r],c(this,q),c(this,M));this.setText(t.join(`
37
+ `))},qs=function(){if(c(this,q).variants.length>0){let{parseConverter:e}=(Ss(),O(ws));this.setText(e(this.firstChild.toString(),c(this,q),c(this,M)))}};T=Nn});var be,xt,Mr,Yi,sr,xe=b(()=>{"use strict";be={running:!1,run(a){let{running:n}=this;this.running=!0;try{let{Token:e}=(B(),O(Fr)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=n,t}catch(e){throw this.running=n,e}},rev:0},xt=a=>n=>n.type===a,Mr=(a,n,e,t=[])=>{let r=[...a.childNodes],i=r.splice(n,e,...t);a.setAttribute("childNodes",r);for(let s of t)s.setAttribute("parentNode",a);return i},Yi=(a,n)=>new Array(a).fill(void 0).map((e,t)=>n(t)),sr=(a,n)=>{Object.defineProperty(a,"name",{value:n.name})}});var Os={};V(Os,{Title:()=>En});var _s,Jt,Yt,En,Gs=b(()=>{"use strict";X();_s=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25")),En=class{constructor(n,e,t,r,i){k(this,Jt);k(this,Yt);U(this,"ns");U(this,"fragment");U(this,"interwiki","");U(this,"valid");U(this,"encoded",!1);let s=n.trim().startsWith("../");if(n=Mn(n),r&&n.includes("%"))try{let l=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(n);n=_s(n),this.encoded=l}catch(l){}if(n=n.replace(/_/gu," ").trim(),s)this.ns=0;else{let l=e;n.startsWith(":")&&(l=0,n=n.slice(1).trim());let g=n.split(":");if(g.length>1){let p=t.nsid[g[0].trim().toLowerCase()];p&&(l=p,n=g.slice(1).join(":").trim())}this.ns=l}let o=n.indexOf("#");if(o!==-1){let l=n.slice(o+1).trimEnd();if(l.includes("%"))try{l=_s(l)}catch(g){}this.fragment=l,n=n.slice(0,o).trim()}this.valid=!!(n||this.interwiki||i&&this.ns===0&&this.fragment!==void 0)&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(s?/^(?:\.\.\/)+(.*)/u.exec(n)[1]:n),this.main=n,Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}}),A(this,Yt,t.namespaces)}get main(){return c(this,Jt)}set main(n){n=n.replace(/_/gu," ").trim(),A(this,Jt,n&&n[0].toUpperCase()+n.slice(1))}get prefix(){let n=c(this,Yt)[this.ns];return n+(n&&":")}get title(){return(this.interwiki+(this.interwiki&&":")+this.prefix+this.main).replace(/ /gu,"_")}get extension(){let{main:n}=this,e=n.lastIndexOf(".");return e===-1?void 0:n.slice(e+1).toLowerCase()}toString(){return`${this.title}${this.fragment===void 0?"":`#${this.fragment}`}`}};Jt=new WeakMap,Yt=new WeakMap});var rt,zs,Mo,f,R=b(()=>{On();xe();we();X();rt={i18n:void 0,rules:_n,getConfig(){return{...Dn,...this.config,excludes:[]}},msg(a,n=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(n))},normalizeTitle(a,n=0,e,t=rt.getConfig(),r,i=!1,s=!1){let{Title:o}=(Gs(),O(Os));if(r)return new o(a,n,t,i,s);let{Token:l}=(B(),O(Fr));return be.run(()=>{let g=new l(a,t);g.type="root",g.parseOnce(0,e).parseOnce();let p=new o(g.toString(),n,t,i,s);for(let d of["main","fragment"]){let u=p[d];u!=null&&u.includes("\0")&&(p[d]=g.buildFromStr(u,1))}return p})},parse(a,n,e=11,t=rt.getConfig()){a=zn(a);let{Token:r}=(B(),O(Fr));return be.run(()=>{let s=new r(a,t);return s.type="root",s.parse(e,n)})}},zs={},Mo=new Set(["normalizeTitle","parse"]);for(let a in rt)Mo.has(a)||(zs[a]={enumerable:!1});Object.defineProperties(rt,zs);typeof self=="object"?Object.assign(self,{Parser:rt}):typeof globalThis=="object"&&Object.assign(globalThis,{Parser:rt});f=rt});R();})();
39
38
  //# sourceMappingURL=bundle.min.js.map
@@ -409,5 +409,6 @@
409
409
  "redirection": [
410
410
  "#redirect"
411
411
  ],
412
- "variants": []
412
+ "variants": [],
413
+ "articlePath": "/wiki/$1"
413
414
  }
@@ -597,5 +597,6 @@
597
597
  "zh-sg",
598
598
  "zh-my",
599
599
  "zh-mo"
600
- ]
600
+ ],
601
+ "articlePath": "/zh/$1"
601
602
  }
@@ -687,5 +687,6 @@
687
687
  "zh-cn",
688
688
  "zh-tw",
689
689
  "zh-hk"
690
- ]
690
+ ],
691
+ "articlePath": "/$1"
691
692
  }
@@ -805,5 +805,6 @@
805
805
  "zh-sg",
806
806
  "zh-my",
807
807
  "zh-mo"
808
- ]
808
+ ],
809
+ "articlePath": "/wiki/$1"
809
810
  }
@@ -1,6 +1,6 @@
1
1
  (() => {
2
2
  const workerJS = () => {
3
- importScripts('https://testingcf.jsdelivr.net/npm/wikiparser-node@1.9.3-b/bundle/bundle.min.js');
3
+ importScripts('https://testingcf.jsdelivr.net/npm/wikiparser-node@1.10.0-b/bundle/bundle.min.js');
4
4
  const entities = { '&': 'amp', '<': 'lt', '>': 'gt' };
5
5
  self.onmessage = ({ data }) => {
6
6
  const [command, qid, wikitext, include, stage] = data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikiparser-node",
3
- "version": "1.9.3-b",
3
+ "version": "1.10.0-b",
4
4
  "description": "A Node.js parser for MediaWiki markup with AST",
5
5
  "keywords": [
6
6
  "mediawiki",